mindroot 9.3.0__py3-none-any.whl → 9.6.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- mindroot/coreplugins/admin/__init__.py +3 -1
- mindroot/coreplugins/admin/agent_router.py +250 -7
- mindroot/coreplugins/admin/asset_manager.py +164 -0
- mindroot/coreplugins/admin/command_router.py +236 -1
- mindroot/coreplugins/admin/mcp_catalog_routes.py +156 -0
- mindroot/coreplugins/admin/mcp_publish_routes.py +450 -0
- mindroot/coreplugins/admin/mcp_registry_routes.py +495 -0
- mindroot/coreplugins/admin/mcp_routes.py +216 -0
- mindroot/coreplugins/admin/mod.py +62 -0
- mindroot/coreplugins/admin/oauth_callback_router.py +84 -0
- mindroot/coreplugins/admin/persona_handler.py +15 -6
- mindroot/coreplugins/admin/persona_router.py +158 -2
- mindroot/coreplugins/admin/plugin_manager.py +105 -9
- mindroot/coreplugins/admin/plugin_router_fixed.py +23 -0
- mindroot/coreplugins/admin/plugin_router_new_not_working.py +145 -0
- mindroot/coreplugins/admin/plugin_routes.py +114 -0
- mindroot/coreplugins/admin/registry_settings_routes.py +140 -0
- mindroot/coreplugins/admin/router.py +116 -15
- mindroot/coreplugins/admin/service_models.py +1 -1
- mindroot/coreplugins/admin/settings_router.py +1 -0
- mindroot/coreplugins/admin/static/css/admin-custom.css +357 -2
- mindroot/coreplugins/admin/static/css/dark.css +1 -0
- mindroot/coreplugins/admin/static/css/default.css +4 -0
- mindroot/coreplugins/admin/static/js/about-info.js +367 -0
- mindroot/coreplugins/admin/static/js/agent-form.js +83 -3
- mindroot/coreplugins/admin/static/js/api-key-script.js +307 -0
- mindroot/coreplugins/admin/static/js/mcp-manager.js +348 -0
- mindroot/coreplugins/admin/static/js/mcp-publisher.js +780 -0
- mindroot/coreplugins/admin/static/js/persona-editor.js +34 -5
- mindroot/coreplugins/admin/static/js/plugin-toggle.js +1 -1
- mindroot/coreplugins/admin/static/js/recommended-plugin-install.js +63 -0
- mindroot/coreplugins/admin/static/js/registry-auth-section.js +132 -0
- mindroot/coreplugins/admin/static/js/registry-manager-base.js +613 -0
- mindroot/coreplugins/admin/static/js/registry-manager-publish-old-delete.js +166 -0
- mindroot/coreplugins/admin/static/js/registry-manager.js +351 -0
- mindroot/coreplugins/admin/static/js/registry-publish-section.js +377 -0
- mindroot/coreplugins/admin/static/js/registry-search-section.js +400 -0
- mindroot/coreplugins/admin/static/js/registry-search-section.js.bak +3 -0
- mindroot/coreplugins/admin/static/js/registry-settings.js +69 -0
- mindroot/coreplugins/admin/static/js/registry-shared-services.js +903 -0
- mindroot/coreplugins/admin/static/js/registry-simple-sections.js +85 -0
- mindroot/coreplugins/admin/static/js/secure-widget-manager.js +438 -0
- mindroot/coreplugins/admin/static/logo.png +0 -0
- mindroot/coreplugins/admin/templates/admin.jinja2 +275 -110
- mindroot/coreplugins/agent/Assistant/agent.json +27 -11
- mindroot/coreplugins/agent/agent.py +2 -2
- mindroot/coreplugins/agent/command_parser.py +25 -10
- mindroot/coreplugins/agent/templates/system.jinja2 +0 -12
- mindroot/coreplugins/chat/__init__.py +4 -1
- mindroot/coreplugins/chat/router.py +132 -20
- mindroot/coreplugins/chat/router_dedup_patch.py +20 -0
- mindroot/coreplugins/chat/services.py +31 -1
- mindroot/coreplugins/chat/static/css/action-fix.css +32 -0
- mindroot/coreplugins/chat/static/css/admin-custom.css +5 -3
- mindroot/coreplugins/chat/static/css/dark.css +24 -3
- mindroot/coreplugins/chat/static/css/default.css +24 -3
- mindroot/coreplugins/chat/static/css/main.css +1 -0
- mindroot/coreplugins/chat/static/js/action.js +137 -60
- mindroot/coreplugins/chat/static/js/chat-history.js +3 -0
- mindroot/coreplugins/chat/static/js/chat.js +59 -16
- mindroot/coreplugins/chat/static/js/chat.js.diff +221 -0
- mindroot/coreplugins/chat/static/js/chatform.js +2 -2
- mindroot/coreplugins/chat/static/site.webmanifest +1 -1
- mindroot/coreplugins/chat/templates/chat.jinja2 +3 -3
- mindroot/coreplugins/chat/widget_manager.py +139 -0
- mindroot/coreplugins/chat/widget_routes.py +287 -0
- mindroot/coreplugins/check_list/inject/admin.jinja2 +1 -1
- mindroot/coreplugins/email/__init__.py +2 -0
- mindroot/coreplugins/email/email_provider.py +2 -2
- mindroot/coreplugins/email/mod.py +100 -0
- mindroot/coreplugins/email/services.py +5 -3
- mindroot/coreplugins/email/smtp_handler.py +9 -3
- mindroot/coreplugins/email/test_email_service.py +75 -0
- mindroot/coreplugins/env_manager/mod.py +61 -25
- mindroot/coreplugins/home/router.py +37 -2
- mindroot/coreplugins/home/static/imgs/logo.png +0 -0
- mindroot/coreplugins/home/static/imgs/logo.png.bak +0 -0
- mindroot/coreplugins/home/static/imgs/logo_teal.png +0 -0
- mindroot/coreplugins/home/static/imgs/logo_teal2.png +0 -0
- mindroot/coreplugins/home/static/imgs/logo_teal_detailed.png +0 -0
- mindroot/coreplugins/home/static/imgs/logo_teal_python.png +0 -0
- mindroot/coreplugins/home/templates/home.jinja2 +15 -6
- mindroot/coreplugins/index/indices/default/index.json +39 -6
- mindroot/coreplugins/jwt_auth/middleware.py +47 -2
- mindroot/coreplugins/jwt_auth/mod.py +40 -17
- mindroot/coreplugins/l8n/__init__.py +6 -0
- mindroot/coreplugins/l8n/debug_loader.py +85 -0
- mindroot/coreplugins/l8n/debug_middleware.py +74 -0
- mindroot/coreplugins/l8n/l8n_constants.py +19 -0
- mindroot/coreplugins/l8n/language_detection.py +183 -0
- mindroot/coreplugins/l8n/middleware.py +151 -0
- mindroot/coreplugins/l8n/mod.py +277 -0
- mindroot/coreplugins/l8n/monkey_patch_to_delete.py +186 -0
- mindroot/coreplugins/l8n/test_enhanced.py +298 -0
- mindroot/coreplugins/l8n/test_l8n.py +95 -0
- mindroot/coreplugins/l8n/test_l8n_standalone.py +251 -0
- mindroot/coreplugins/l8n/test_middleware.py +272 -0
- mindroot/coreplugins/l8n/utils.py +232 -0
- mindroot/coreplugins/mcp_/__init__.py +14 -0
- mindroot/coreplugins/mcp_/catalog_commands.py +328 -0
- mindroot/coreplugins/mcp_/catalog_manager.py +263 -0
- mindroot/coreplugins/mcp_/dynamic_commands.py +154 -0
- mindroot/coreplugins/mcp_/mcp_manager.py +1031 -0
- mindroot/coreplugins/mcp_/mod.py +367 -0
- mindroot/coreplugins/mcp_/oauth_storage.py +144 -0
- mindroot/coreplugins/mcp_/server_installer.py +79 -0
- mindroot/coreplugins/mcp_/setup.py +26 -0
- mindroot/coreplugins/mcp_/test_dynamic_commands.py +134 -0
- mindroot/coreplugins/mcp_/testmcpclient.py +92 -0
- mindroot/coreplugins/persona/mod.py +12 -7
- mindroot/coreplugins/signup/templates/signup.jinja2 +1 -1
- mindroot/coreplugins/subscriptions/__init__.py +1 -0
- mindroot/coreplugins/subscriptions/mod.py +14 -3
- mindroot/coreplugins/subscriptions/router.py +3 -0
- mindroot/coreplugins/user_service/__init__.py +1 -2
- mindroot/coreplugins/user_service/admin_init.py +1 -0
- mindroot/coreplugins/user_service/email_service.py +72 -17
- mindroot/coreplugins/user_service/mod.py +10 -2
- mindroot/coreplugins/user_service/router.py +2 -0
- mindroot/lib/auth/api_key.py +28 -0
- mindroot/lib/cli/plugins.py +94 -0
- mindroot/lib/plugins/default_plugin_manifest.json +20 -0
- mindroot/lib/plugins/installation.py +5 -5
- mindroot/lib/plugins/l8n_static_handler.py +225 -0
- mindroot/lib/plugins/loader.py +33 -3
- mindroot/lib/plugins/loader_with_l8n.py +281 -0
- mindroot/lib/plugins/manifest.py +236 -24
- mindroot/lib/providers/commands.py +3 -1
- mindroot/lib/route_decorators.py +5 -5
- mindroot/lib/templates.py +183 -11
- mindroot/lib/utils/merge_arrays.py +1 -1
- mindroot/migrate.py +39 -20
- mindroot/registry/data_access.py +1 -1
- mindroot/server.py +42 -13
- mindroot/server_missing_normal_args.py +197 -0
- mindroot/server_prev.py +173 -0
- {mindroot-9.3.0.dist-info → mindroot-9.6.0.dist-info}/METADATA +7 -2
- {mindroot-9.3.0.dist-info → mindroot-9.6.0.dist-info}/RECORD +143 -113
- mindroot/coreplugins/admin/plugin_manager_backup.py +0 -615
- mindroot/coreplugins/admin/static/favicon/about.txt +0 -6
- mindroot/coreplugins/admin/static/favicon/android-chrome-512x512.png +0 -0
- mindroot/coreplugins/admin/static/favicon/apple-touch-icon.png +0 -0
- mindroot/coreplugins/admin/static/favicon/favicon-16x16.png +0 -0
- mindroot/coreplugins/admin/static/favicon/favicon-32x32.png +0 -0
- mindroot/coreplugins/admin/static/favicon/favicon.ico +0 -0
- mindroot/coreplugins/admin/static/favicon/favicon_io (1)/about.txt +0 -6
- mindroot/coreplugins/admin/static/favicon/favicon_io (1)/android-chrome-192x192.png +0 -0
- mindroot/coreplugins/admin/static/favicon/favicon_io (1)/android-chrome-512x512.png +0 -0
- mindroot/coreplugins/admin/static/favicon/favicon_io (1)/apple-touch-icon.png +0 -0
- mindroot/coreplugins/admin/static/favicon/favicon_io (1)/favicon-16x16.png +0 -0
- mindroot/coreplugins/admin/static/favicon/favicon_io (1)/favicon-32x32.png +0 -0
- mindroot/coreplugins/admin/static/favicon/favicon_io (1)/favicon.ico +0 -0
- mindroot/coreplugins/admin/static/favicon/favicon_io (1)/site.webmanifest +0 -1
- mindroot/coreplugins/admin/static/favicon/logo.png +0 -0
- mindroot/coreplugins/admin/static/favicon/site.webmanifest +0 -1
- mindroot/coreplugins/admin/static/js/backup/agent-editor.js +0 -186
- mindroot/coreplugins/admin/static/js/backup/agent-form.js +0 -1133
- mindroot/coreplugins/admin/static/js/backup/agent-list.js +0 -94
- mindroot/coreplugins/chat/static/favicon/about.txt +0 -6
- mindroot/coreplugins/chat/static/favicon/android-chrome-192x192.png +0 -0
- mindroot/coreplugins/chat/static/favicon/android-chrome-512x512.png +0 -0
- mindroot/coreplugins/chat/static/favicon/apple-touch-icon.png +0 -0
- mindroot/coreplugins/chat/static/favicon/favicon-16x16.png +0 -0
- mindroot/coreplugins/chat/static/favicon/favicon-32x32.png +0 -0
- mindroot/coreplugins/chat/static/favicon/favicon.ico +0 -0
- mindroot/coreplugins/chat/static/favicon/favicon_io (1)/about.txt +0 -6
- mindroot/coreplugins/chat/static/favicon/favicon_io (1)/android-chrome-192x192.png +0 -0
- mindroot/coreplugins/chat/static/favicon/favicon_io (1)/android-chrome-512x512.png +0 -0
- mindroot/coreplugins/chat/static/favicon/favicon_io (1)/apple-touch-icon.png +0 -0
- mindroot/coreplugins/chat/static/favicon/favicon_io (1)/favicon-16x16.png +0 -0
- mindroot/coreplugins/chat/static/favicon/favicon_io (1)/favicon-32x32.png +0 -0
- mindroot/coreplugins/chat/static/favicon/favicon_io (1)/favicon.ico +0 -0
- mindroot/coreplugins/chat/static/favicon/favicon_io (1)/site.webmanifest +0 -1
- mindroot/coreplugins/chat/static/favicon/logo.png +0 -0
- mindroot/coreplugins/chat/static/favicon/site.webmanifest +0 -1
- mindroot/coreplugins/index/default.json +0 -76
- mindroot/coreplugins/user_service/file_trigger_service.py +0 -12
- mindroot/coreplugins/user_service/hooks.py +0 -23
- /mindroot/coreplugins/{admin/static/favicon/android-chrome-192x192.png → home/static/imgs/backuplogo.png} +0 -0
- {mindroot-9.3.0.dist-info → mindroot-9.6.0.dist-info}/WHEEL +0 -0
- {mindroot-9.3.0.dist-info → mindroot-9.6.0.dist-info}/entry_points.txt +0 -0
- {mindroot-9.3.0.dist-info → mindroot-9.6.0.dist-info}/licenses/LICENSE +0 -0
- {mindroot-9.3.0.dist-info → mindroot-9.6.0.dist-info}/top_level.txt +0 -0
|
@@ -23,11 +23,16 @@
|
|
|
23
23
|
<script type="module" src="/admin/static/js/model-preferences.js"></script>
|
|
24
24
|
<script type="module" src="/admin/static/js/plugin-manager.js"></script>
|
|
25
25
|
<script type="module" src="/admin/static/js/server-control.js"></script>
|
|
26
|
+
<script type="module" src="/admin/static/js/about-info.js"></script>
|
|
27
|
+
<script type="module" src="/admin/static/js/registry-manager.js"></script>
|
|
28
|
+
<script type="module" src="/admin/static/js/api-key-script.js"></script>
|
|
29
|
+
<script type="module" src="/admin/static/js/secure-widget-manager.js"></script>
|
|
30
|
+
<script type="module" src="/admin/static/js/mcp-registry-browser.js"></script>
|
|
26
31
|
|
|
27
32
|
{% block head_favicon %}
|
|
28
|
-
<link rel="apple-touch-icon" sizes="180x180" href="/
|
|
29
|
-
<link rel="icon" type="image/png" sizes="32x32" href="/
|
|
30
|
-
<link rel="icon" type="image/png" sizes="16x16" href="/
|
|
33
|
+
<link rel="apple-touch-icon" sizes="180x180" href="/imgs/logo.png">
|
|
34
|
+
<link rel="icon" type="image/png" sizes="32x32" href="/imgs/logo.png">
|
|
35
|
+
<link rel="icon" type="image/png" sizes="16x16" href="/imgs/logo.png">
|
|
31
36
|
|
|
32
37
|
{% endblock %}
|
|
33
38
|
|
|
@@ -39,7 +44,7 @@
|
|
|
39
44
|
{% block content_top %}
|
|
40
45
|
<header class="admin-header">
|
|
41
46
|
<a href="/" class="logo">
|
|
42
|
-
<img src="/
|
|
47
|
+
<img src="/imgs/logo.png" class="logo"/>
|
|
43
48
|
</a>
|
|
44
49
|
</header>
|
|
45
50
|
<script>window.theme = 'default';</script>
|
|
@@ -47,64 +52,108 @@
|
|
|
47
52
|
|
|
48
53
|
{% block content %}
|
|
49
54
|
<div class="admin-container">
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
<span>
|
|
55
|
+
<!-- Customize Category -->
|
|
56
|
+
<details data-category="customize">
|
|
57
|
+
<summary class="category-header">
|
|
58
|
+
<span class="material-icons">tune</span>
|
|
59
|
+
<span>Customize</span>
|
|
54
60
|
</summary>
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
61
|
+
|
|
62
|
+
<details>
|
|
63
|
+
<summary>
|
|
64
|
+
<span class="material-icons">cloud</span>
|
|
65
|
+
<span>Install / Registry</span>
|
|
66
|
+
</summary>
|
|
67
|
+
<div class="details-content">
|
|
68
|
+
<registry-manager theme="dark" scope="local"></registry-manager>
|
|
69
|
+
</div>
|
|
70
|
+
</details>
|
|
59
71
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
72
|
+
<details>
|
|
73
|
+
<summary>
|
|
74
|
+
<span class="material-icons">smart_toy</span>
|
|
75
|
+
<span>Agents</span>
|
|
76
|
+
</summary>
|
|
77
|
+
<div class="details-content">
|
|
78
|
+
<agent-editor theme="dark" scope="local"></agent-editor>
|
|
79
|
+
</div>
|
|
80
|
+
</details>
|
|
69
81
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
82
|
+
<details>
|
|
83
|
+
<summary>
|
|
84
|
+
<span class="material-icons">person</span>
|
|
85
|
+
<span>Personas</span>
|
|
86
|
+
</summary>
|
|
87
|
+
<div class="details-content">
|
|
88
|
+
<persona-editor theme="dark" scope="local"></persona-editor>
|
|
89
|
+
</div>
|
|
90
|
+
</details>
|
|
78
91
|
</details>
|
|
79
92
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
<span>
|
|
93
|
+
<!-- Server Settings Category -->
|
|
94
|
+
<details data-category="server">
|
|
95
|
+
<summary class="category-header">
|
|
96
|
+
<span class="material-icons">dns</span>
|
|
97
|
+
<span>Server Settings</span>
|
|
84
98
|
</summary>
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
99
|
+
|
|
100
|
+
<details>
|
|
101
|
+
<summary>
|
|
102
|
+
<span class="material-icons">power_settings_new</span>
|
|
103
|
+
<span>Server Control</span>
|
|
104
|
+
</summary>
|
|
105
|
+
<div class="details-content">
|
|
106
|
+
<server-control theme="dark"></server-control>
|
|
107
|
+
</div>
|
|
108
|
+
</details>
|
|
89
109
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
110
|
+
<details>
|
|
111
|
+
<summary>
|
|
112
|
+
<span class="material-icons">info</span>
|
|
113
|
+
<span>About</span>
|
|
114
|
+
</summary>
|
|
115
|
+
<div class="details-content">
|
|
116
|
+
<about-info theme="dark" scope="local"></about-info>
|
|
117
|
+
</div>
|
|
118
|
+
</details>
|
|
119
|
+
|
|
120
|
+
<details>
|
|
121
|
+
<summary>
|
|
122
|
+
<span class="material-icons">settings</span>
|
|
123
|
+
<span>Model Preferences</span>
|
|
124
|
+
</summary>
|
|
125
|
+
<div class="details-content">
|
|
126
|
+
<model-preferences theme="dark" scope="local"></model-preferences>
|
|
127
|
+
</div>
|
|
128
|
+
</details>
|
|
98
129
|
</details>
|
|
99
130
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
<span>
|
|
131
|
+
<!-- Advanced Category -->
|
|
132
|
+
<details data-category="advanced">
|
|
133
|
+
<summary class="category-header">
|
|
134
|
+
<span class="material-icons">build</span>
|
|
135
|
+
<span>Advanced</span>
|
|
104
136
|
</summary>
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
137
|
+
|
|
138
|
+
<details>
|
|
139
|
+
<summary>
|
|
140
|
+
<span class="material-icons">apps</span>
|
|
141
|
+
<span>Plugins</span>
|
|
142
|
+
</summary>
|
|
143
|
+
<div class="details-content">
|
|
144
|
+
<plugin-manager></plugin-manager>
|
|
145
|
+
</div>
|
|
146
|
+
</details>
|
|
147
|
+
|
|
148
|
+
<details>
|
|
149
|
+
<summary>
|
|
150
|
+
<span class="material-icons">code</span>
|
|
151
|
+
<span>Secure Chat Widgets</span>
|
|
152
|
+
</summary>
|
|
153
|
+
<div class="details-content">
|
|
154
|
+
<secure-widget-manager theme="dark" scope="local"></secure-widget-manager>
|
|
155
|
+
</div>
|
|
156
|
+
</details>
|
|
108
157
|
</details>
|
|
109
158
|
|
|
110
159
|
{% endblock %}
|
|
@@ -114,86 +163,202 @@
|
|
|
114
163
|
{% endblock %}
|
|
115
164
|
<script>
|
|
116
165
|
|
|
117
|
-
|
|
118
|
-
|
|
166
|
+
let tabContainer = null;
|
|
167
|
+
let tabNav = null;
|
|
168
|
+
let tabContents = null;
|
|
169
|
+
let observer = null;
|
|
170
|
+
|
|
171
|
+
function moveInjectedDetailsToCategories() {
|
|
172
|
+
// Find any injected details elements that specify a category
|
|
173
|
+
const injectedDetails = document.querySelectorAll('details[data-inject-category]');
|
|
119
174
|
|
|
120
|
-
|
|
175
|
+
injectedDetails.forEach(details => {
|
|
176
|
+
const targetCategory = details.dataset.injectCategory;
|
|
177
|
+
const categoryElement = document.querySelector(`details[data-category="${targetCategory}"]`);
|
|
178
|
+
|
|
179
|
+
if (categoryElement) {
|
|
180
|
+
// Remove the data-inject-category attribute and move to category
|
|
181
|
+
details.removeAttribute('data-inject-category');
|
|
182
|
+
categoryElement.appendChild(details);
|
|
183
|
+
}
|
|
184
|
+
});
|
|
121
185
|
|
|
122
|
-
|
|
186
|
+
// Also handle any standalone details without category (default to advanced)
|
|
187
|
+
const standaloneDetails = document.querySelectorAll('.admin-container > details:not([data-category])');
|
|
188
|
+
const advancedCategory = document.querySelector('details[data-category="advanced"]');
|
|
189
|
+
|
|
190
|
+
if (advancedCategory) {
|
|
191
|
+
standaloneDetails.forEach(details => {
|
|
192
|
+
advancedCategory.appendChild(details);
|
|
193
|
+
});
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
function initializeTabs() {
|
|
198
|
+
// First, move any injected details to their proper categories
|
|
199
|
+
moveInjectedDetailsToCategories();
|
|
200
|
+
|
|
201
|
+
const categoryDetails = document.querySelectorAll('details[data-category]');
|
|
202
|
+
|
|
203
|
+
if (categoryDetails.length === 0) return;
|
|
204
|
+
|
|
205
|
+
// Clear existing tab container if it exists
|
|
206
|
+
if (tabContainer) {
|
|
207
|
+
tabContainer.remove();
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
tabContainer = document.createElement('div');
|
|
123
211
|
tabContainer.className = 'tab-container';
|
|
124
212
|
|
|
125
|
-
|
|
213
|
+
tabNav = document.createElement('div');
|
|
126
214
|
tabNav.className = 'tab-nav';
|
|
127
|
-
|
|
215
|
+
tabContents = document.createElement('div');
|
|
128
216
|
tabContents.className = 'tab-contents';
|
|
129
217
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
const tabButton = document.createElement('button');
|
|
137
|
-
tabButton.className = 'tab-button';
|
|
138
|
-
|
|
139
|
-
// Get the original spans
|
|
140
|
-
const originalIcon = summary.querySelector('.material-icons');
|
|
141
|
-
const originalText = summary.querySelector('span:not(.material-icons)');
|
|
218
|
+
let firstActiveSet = false;
|
|
219
|
+
|
|
220
|
+
// Create category sections in the tab nav
|
|
221
|
+
categoryDetails.forEach((categoryDetail, categoryIndex) => {
|
|
222
|
+
const categorySummary = categoryDetail.querySelector('.category-header');
|
|
223
|
+
const categoryItems = categoryDetail.querySelectorAll('details:not([data-category])');
|
|
142
224
|
|
|
143
|
-
|
|
144
|
-
const iconSpan = document.createElement('span');
|
|
145
|
-
iconSpan.className = 'material-icons';
|
|
146
|
-
iconSpan.textContent = originalIcon ? originalIcon.textContent : '';
|
|
225
|
+
if (categoryItems.length === 0) return;
|
|
147
226
|
|
|
148
|
-
// Create
|
|
149
|
-
const
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
originalText.textContent.trim() :
|
|
153
|
-
summary.textContent.replace('material-icons', '').trim();
|
|
154
|
-
textSpan.textContent = textContent;
|
|
227
|
+
// Create collapsible category section in nav
|
|
228
|
+
const categorySection = document.createElement('details');
|
|
229
|
+
categorySection.className = 'nav-category';
|
|
230
|
+
categorySection.open = categoryIndex === 0; // First category open by default
|
|
155
231
|
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
232
|
+
const categoryNavSummary = document.createElement('summary');
|
|
233
|
+
categoryNavSummary.className = 'nav-category-header';
|
|
234
|
+
categoryNavSummary.innerHTML = categorySummary.innerHTML;
|
|
159
235
|
|
|
160
|
-
|
|
161
|
-
tabButton.setAttribute('aria-selected', index === 0 ? 'true' : 'false');
|
|
162
|
-
tabButton.setAttribute('aria-controls', `tab-${index}`);
|
|
163
|
-
if (index === 0) tabButton.classList.add('active');
|
|
236
|
+
categorySection.appendChild(categoryNavSummary);
|
|
164
237
|
|
|
165
|
-
const
|
|
166
|
-
|
|
167
|
-
tabContent.id = `tab-${index}`;
|
|
168
|
-
tabContent.setAttribute('role', 'tabpanel');
|
|
169
|
-
tabContent.innerHTML = content.innerHTML;
|
|
170
|
-
if (index === 0) tabContent.classList.add('active');
|
|
238
|
+
const categoryNavContent = document.createElement('div');
|
|
239
|
+
categoryNavContent.className = 'nav-category-content';
|
|
171
240
|
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
241
|
+
// Process items within this category
|
|
242
|
+
categoryItems.forEach((details, itemIndex) => {
|
|
243
|
+
const summary = details.querySelector('summary');
|
|
244
|
+
const content = details.cloneNode(true);
|
|
245
|
+
content.removeChild(content.querySelector('summary'));
|
|
246
|
+
|
|
247
|
+
// Create tab button
|
|
248
|
+
const tabButton = document.createElement('button');
|
|
249
|
+
tabButton.className = 'tab-button';
|
|
250
|
+
|
|
251
|
+
const originalIcon = summary.querySelector('.material-icons');
|
|
252
|
+
const originalText = summary.querySelector('span:not(.material-icons)');
|
|
253
|
+
|
|
254
|
+
const iconSpan = document.createElement('span');
|
|
255
|
+
iconSpan.className = 'material-icons';
|
|
256
|
+
iconSpan.textContent = originalIcon ? originalIcon.textContent : '';
|
|
257
|
+
|
|
258
|
+
const textSpan = document.createElement('span');
|
|
259
|
+
let textContent = originalText ?
|
|
260
|
+
originalText.textContent.trim() :
|
|
261
|
+
summary.textContent.replace('material-icons', '').trim();
|
|
262
|
+
textSpan.textContent = textContent;
|
|
263
|
+
|
|
264
|
+
tabButton.appendChild(iconSpan);
|
|
265
|
+
tabButton.appendChild(textSpan);
|
|
266
|
+
|
|
267
|
+
const tabId = `tab-${categoryDetail.dataset.category}-${itemIndex}`;
|
|
268
|
+
|
|
269
|
+
tabButton.setAttribute('role', 'tab');
|
|
270
|
+
tabButton.setAttribute('aria-controls', tabId);
|
|
271
|
+
|
|
272
|
+
// First item of first category is active by default
|
|
273
|
+
const isFirstActive = !firstActiveSet;
|
|
274
|
+
if (isFirstActive) {
|
|
275
|
+
firstActiveSet = true;
|
|
276
|
+
tabButton.setAttribute('aria-selected', 'true');
|
|
277
|
+
tabButton.classList.add('active');
|
|
278
|
+
} else {
|
|
279
|
+
tabButton.setAttribute('aria-selected', 'false');
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
const tabContent = document.createElement('div');
|
|
283
|
+
tabContent.className = 'tab-content';
|
|
284
|
+
tabContent.id = tabId;
|
|
285
|
+
tabContent.setAttribute('role', 'tabpanel');
|
|
286
|
+
tabContent.innerHTML = content.innerHTML;
|
|
287
|
+
if (isFirstActive) tabContent.classList.add('active');
|
|
288
|
+
|
|
289
|
+
tabButton.addEventListener('click', () => {
|
|
290
|
+
// Remove active from all buttons and contents
|
|
291
|
+
tabNav.querySelectorAll('.tab-button').forEach(btn => {
|
|
292
|
+
btn.classList.remove('active');
|
|
293
|
+
btn.setAttribute('aria-selected', 'false');
|
|
294
|
+
});
|
|
295
|
+
tabContents.querySelectorAll('.tab-content').forEach(content => {
|
|
296
|
+
content.classList.remove('active');
|
|
297
|
+
});
|
|
298
|
+
|
|
299
|
+
// Activate clicked tab
|
|
300
|
+
tabButton.classList.add('active');
|
|
301
|
+
tabButton.setAttribute('aria-selected', 'true');
|
|
302
|
+
tabContent.classList.add('active');
|
|
179
303
|
});
|
|
180
304
|
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
tabContent.classList.add('active');
|
|
305
|
+
categoryNavContent.appendChild(tabButton);
|
|
306
|
+
tabContents.appendChild(tabContent);
|
|
184
307
|
});
|
|
185
308
|
|
|
186
|
-
|
|
187
|
-
|
|
309
|
+
categorySection.appendChild(categoryNavContent);
|
|
310
|
+
tabNav.appendChild(categorySection);
|
|
188
311
|
});
|
|
189
312
|
|
|
190
313
|
tabContainer.appendChild(tabNav);
|
|
191
314
|
tabContainer.appendChild(tabContents);
|
|
192
315
|
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
316
|
+
// Replace the first category with the tab container
|
|
317
|
+
const firstCategory = document.querySelector('details[data-category]');
|
|
318
|
+
if (firstCategory) {
|
|
319
|
+
firstCategory.parentNode.replaceChild(tabContainer, firstCategory);
|
|
320
|
+
|
|
321
|
+
// Remove remaining category elements
|
|
322
|
+
const remainingCategories = document.querySelectorAll('details[data-category]');
|
|
323
|
+
remainingCategories.forEach(cat => cat.remove());
|
|
196
324
|
}
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
function setupMutationObserver() {
|
|
328
|
+
// Watch for new details elements being added
|
|
329
|
+
observer = new MutationObserver((mutations) => {
|
|
330
|
+
let shouldRebuild = false;
|
|
331
|
+
|
|
332
|
+
mutations.forEach((mutation) => {
|
|
333
|
+
mutation.addedNodes.forEach((node) => {
|
|
334
|
+
if (node.nodeType === Node.ELEMENT_NODE) {
|
|
335
|
+
// Check if a details element was added
|
|
336
|
+
if (node.tagName === 'DETAILS' || node.querySelector('details')) {
|
|
337
|
+
shouldRebuild = true;
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
});
|
|
341
|
+
});
|
|
342
|
+
|
|
343
|
+
if (shouldRebuild) {
|
|
344
|
+
// Debounce rebuilds
|
|
345
|
+
clearTimeout(window.tabRebuildTimeout);
|
|
346
|
+
window.tabRebuildTimeout = setTimeout(initializeTabs, 100);
|
|
347
|
+
}
|
|
348
|
+
});
|
|
349
|
+
|
|
350
|
+
observer.observe(document.querySelector('.admin-container'), {
|
|
351
|
+
childList: true,
|
|
352
|
+
subtree: true
|
|
353
|
+
});
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
document.addEventListener('DOMContentLoaded', function() {
|
|
357
|
+
// Initial tab setup
|
|
358
|
+
setTimeout(() => {
|
|
359
|
+
initializeTabs();
|
|
360
|
+
setupMutationObserver();
|
|
361
|
+
}, 100);
|
|
197
362
|
});
|
|
198
363
|
|
|
199
364
|
</script>
|
|
@@ -202,4 +367,4 @@ document.addEventListener('DOMContentLoaded', function() {
|
|
|
202
367
|
{% block footer %}
|
|
203
368
|
{% endblock %}
|
|
204
369
|
</body>
|
|
205
|
-
</html>
|
|
370
|
+
</html>
|
|
@@ -1,11 +1,27 @@
|
|
|
1
|
-
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
{
|
|
2
|
+
"persona": "Assistant",
|
|
3
|
+
"name": "Assistant",
|
|
4
|
+
"instructions": "You are an extremely intelligent SOTA LLM-based agent with superhuman knowledge of many subjects including math, software engineering, and many more.\\n\\nYou may have direct access to the user's local system or the server. Do your best to help the user and comply with their wishes using the commands you have available. You should assume they have full authorization and control over this system to the degree that the user makes requests.\\n\\nDo not add extra commentary for political correctness or to please both sides of an issue. Rather be direct about your own opinion.\\n\\nFeel free to be critical when you think it is warranted and will help the user most. Definitely don't be a \"Yes man\". ",
|
|
5
|
+
"flags": [],
|
|
6
|
+
"uncensored": false,
|
|
7
|
+
"commands": [
|
|
8
|
+
"wait_for_user_reply",
|
|
9
|
+
"tell_and_continue",
|
|
10
|
+
"markdown_await_user",
|
|
11
|
+
"read",
|
|
12
|
+
"write",
|
|
13
|
+
"dir",
|
|
14
|
+
"append",
|
|
15
|
+
"execute_command",
|
|
16
|
+
"mkdir",
|
|
17
|
+
"tree",
|
|
18
|
+
"examine_image",
|
|
19
|
+
"get_pdf_stats",
|
|
20
|
+
"examine_pdf",
|
|
21
|
+
"think",
|
|
22
|
+
"task_complete",
|
|
23
|
+
"update_workspace"
|
|
24
|
+
],
|
|
25
|
+
"added_at": "2024-12-08T09:31:21.675628"
|
|
26
|
+
}
|
|
27
|
+
|
|
@@ -272,7 +272,7 @@ class Agent:
|
|
|
272
272
|
results.append({"cmd": "UNKNOWN", "args": { "invalid": "(" }, "result": error_result + "\n\n" + started_with})
|
|
273
273
|
return results, full_cmds
|
|
274
274
|
|
|
275
|
-
if buffer[0] == '{':
|
|
275
|
+
if len(buffer) > 0 and buffer[0] == '{':
|
|
276
276
|
buffer = "[" + buffer
|
|
277
277
|
|
|
278
278
|
# happened with Qwen 3 for some reason
|
|
@@ -362,7 +362,7 @@ class Agent:
|
|
|
362
362
|
cmd_args = partial_cmd[cmd_name]
|
|
363
363
|
logger.debug(f"Partial command detected: {partial_cmd}")
|
|
364
364
|
await context.partial_command(cmd_name, json.dumps(cmd_args), cmd_args)
|
|
365
|
-
except
|
|
365
|
+
except Exception as de:
|
|
366
366
|
logger.error("Failed to parse partial command")
|
|
367
367
|
logger.error(str(de))
|
|
368
368
|
pass
|
|
@@ -44,6 +44,7 @@ def parse_streaming_commands(buffer: str) -> Tuple[List[Dict[str, Any]], str]:
|
|
|
44
44
|
#print("Trying merge_json_arrays in parse_streaming_commands")
|
|
45
45
|
complete_commands = merge_json_arrays(raw_replaced)
|
|
46
46
|
if len(complete_commands) > 0:
|
|
47
|
+
print('AA')
|
|
47
48
|
return complete_commands, None
|
|
48
49
|
except Exception:
|
|
49
50
|
pass
|
|
@@ -53,28 +54,32 @@ def parse_streaming_commands(buffer: str) -> Tuple[List[Dict[str, Any]], str]:
|
|
|
53
54
|
complete_commands = json.loads(raw_replaced)
|
|
54
55
|
##print("Found complete command from escape_for_json")
|
|
55
56
|
#print(2)
|
|
57
|
+
print('BB')
|
|
56
58
|
return complete_commands, None
|
|
57
59
|
except Exception:
|
|
58
60
|
pass
|
|
59
61
|
try:
|
|
62
|
+
d=1
|
|
63
|
+
|
|
60
64
|
##print("trying merge_json_arrays with partial=True")
|
|
61
|
-
complete_commands = merge_json_arrays(buffer, partial=True)
|
|
62
|
-
num_commands = len(complete_commands)
|
|
65
|
+
#complete_commands = merge_json_arrays(buffer, partial=True)
|
|
66
|
+
#num_commands = len(complete_commands)
|
|
63
67
|
#print("complete_commands before assigning current partial:", complete_commands)
|
|
64
68
|
#print("current_partial", current_partial)
|
|
65
69
|
|
|
66
|
-
if num_commands > 1:
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
else:
|
|
70
|
-
|
|
71
|
-
|
|
70
|
+
#if num_commands > 1:
|
|
71
|
+
# complete_commands = complete_commands[:num_commands-1]
|
|
72
|
+
# current_partial = complete_commands[-1]
|
|
73
|
+
#else:
|
|
74
|
+
# current_partial = complete_commands[-1]
|
|
75
|
+
# complete_commands = []
|
|
72
76
|
#print("complete_commands AFTER assigning current partial:", complete_commands)
|
|
73
77
|
#print("current_partial", current_partial)
|
|
74
78
|
|
|
75
79
|
##print("Found partial command from merge_json_arrays")
|
|
76
80
|
#print(3)
|
|
77
|
-
|
|
81
|
+
#print('CC')
|
|
82
|
+
#return complete_commands, current_partial
|
|
78
83
|
except Exception as e:
|
|
79
84
|
##print("Failed to find partial command from merge_json_arrays")
|
|
80
85
|
##print(e)
|
|
@@ -93,6 +98,7 @@ def parse_streaming_commands(buffer: str) -> Tuple[List[Dict[str, Any]], str]:
|
|
|
93
98
|
current_partial = complete_commands[-1]
|
|
94
99
|
complete_commands = []
|
|
95
100
|
#print(4)
|
|
101
|
+
print('DD')
|
|
96
102
|
return complete_commands, current_partial
|
|
97
103
|
except Exception as e:
|
|
98
104
|
#print("Failed to parse using loads")
|
|
@@ -108,8 +114,9 @@ def parse_streaming_commands(buffer: str) -> Tuple[List[Dict[str, Any]], str]:
|
|
|
108
114
|
|
|
109
115
|
#print("parsed, num complete commands:", num_commands)
|
|
110
116
|
if len(complete_commands) > 0:
|
|
117
|
+
print('EE')
|
|
111
118
|
return complete_commands, None
|
|
112
|
-
|
|
119
|
+
print('FF')
|
|
113
120
|
return complete_commands, current_partial
|
|
114
121
|
except Exception as e:
|
|
115
122
|
#print("Failed to parse using loads")
|
|
@@ -129,6 +136,7 @@ def parse_streaming_commands(buffer: str) -> Tuple[List[Dict[str, Any]], str]:
|
|
|
129
136
|
##print("complete_commands before assigning current partial:", complete_commands)
|
|
130
137
|
##print("Found partial command from merge_json_arrays")
|
|
131
138
|
#print(5)
|
|
139
|
+
print('GG')
|
|
132
140
|
return complete_commands, current_partial
|
|
133
141
|
except Exception as e:
|
|
134
142
|
##print("Failed to find partial command from merge_json_arrays")
|
|
@@ -147,6 +155,7 @@ def parse_streaming_commands(buffer: str) -> Tuple[List[Dict[str, Any]], str]:
|
|
|
147
155
|
current_partial = complete_commands[-1]
|
|
148
156
|
complete_commands = []
|
|
149
157
|
#print(6)
|
|
158
|
+
print('HH')
|
|
150
159
|
return complete_commands, current_partial
|
|
151
160
|
except Exception:
|
|
152
161
|
pass
|
|
@@ -160,6 +169,7 @@ def parse_streaming_commands(buffer: str) -> Tuple[List[Dict[str, Any]], str]:
|
|
|
160
169
|
current_partial = complete_commands[-1]
|
|
161
170
|
complete_commands = []
|
|
162
171
|
#print(7)
|
|
172
|
+
print('II')
|
|
163
173
|
return complete_commands, current_partial
|
|
164
174
|
except Exception:
|
|
165
175
|
# if ends in ']', then may be end of command list
|
|
@@ -177,6 +187,7 @@ def parse_streaming_commands(buffer: str) -> Tuple[List[Dict[str, Any]], str]:
|
|
|
177
187
|
current_partial = complete_commands[-1]
|
|
178
188
|
complete_commands = []
|
|
179
189
|
#print(7)
|
|
190
|
+
print('JJ')
|
|
180
191
|
return complete_commands, current_partial
|
|
181
192
|
except Exception:
|
|
182
193
|
#print("\033[93m", end="")
|
|
@@ -192,6 +203,7 @@ def parse_streaming_commands(buffer: str) -> Tuple[List[Dict[str, Any]], str]:
|
|
|
192
203
|
else:
|
|
193
204
|
complete_commands = []
|
|
194
205
|
current_partial = parsed_data[-1]
|
|
206
|
+
print('KK')
|
|
195
207
|
return complete_commands, current_partial
|
|
196
208
|
except Exception:
|
|
197
209
|
pass
|
|
@@ -199,6 +211,7 @@ def parse_streaming_commands(buffer: str) -> Tuple[List[Dict[str, Any]], str]:
|
|
|
199
211
|
try:
|
|
200
212
|
complete_commands = json.loads(buffer + "]")
|
|
201
213
|
num_commands = len(complete_commands)
|
|
214
|
+
print("LL")
|
|
202
215
|
return complete_commands, None
|
|
203
216
|
except Exception:
|
|
204
217
|
# If parsing fails, return an empty list of commands and None as partial
|
|
@@ -213,6 +226,7 @@ def parse_streaming_commands(buffer: str) -> Tuple[List[Dict[str, Any]], str]:
|
|
|
213
226
|
else:
|
|
214
227
|
complete_commands = []
|
|
215
228
|
current_partial = parsed_data[-1]
|
|
229
|
+
print("MM")
|
|
216
230
|
return complete_commands, current_partial
|
|
217
231
|
except Exception:
|
|
218
232
|
# If parsing fails, return an empty list of commands and None as partial
|
|
@@ -221,6 +235,7 @@ def parse_streaming_commands(buffer: str) -> Tuple[List[Dict[str, Any]], str]:
|
|
|
221
235
|
if not isinstance(current_partial, dict):
|
|
222
236
|
current_partial = None
|
|
223
237
|
#print(10)
|
|
238
|
+
print("NN")
|
|
224
239
|
return complete_commands, current_partial
|
|
225
240
|
|
|
226
241
|
def invalid_start_format(str):
|
|
@@ -56,18 +56,6 @@ NEVER output multiple arrays in one response!
|
|
|
56
56
|
|
|
57
57
|
{% block commands_alt %}
|
|
58
58
|
|
|
59
|
-
# Alternative if necessary: A single JSON object containing commands array
|
|
60
|
-
|
|
61
|
-
If having issues outputting an array due to model restrictions, you can also output the command
|
|
62
|
-
list inside of an object with a literal 'commands' property:
|
|
63
|
-
|
|
64
|
-
{
|
|
65
|
-
"commands": [
|
|
66
|
-
{ "command": { "param": "value" },
|
|
67
|
-
{ "command2": { "param2": "value" }
|
|
68
|
-
]
|
|
69
|
-
}
|
|
70
|
-
|
|
71
59
|
{% endblock %}
|
|
72
60
|
|
|
73
61
|
{% block commands_1 %}
|