@symerian/symi 3.5.0 → 3.5.2
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.
- package/dist/build-info.json +3 -3
- package/dist/bundled/boot-md/handler.js +4 -4
- package/dist/bundled/session-memory/handler.js +4 -4
- package/dist/canvas-host/a2ui/.bundle.hash +1 -1
- package/dist/{chrome-C_I81hbq.js → chrome-B7-rO4i9.js} +4 -4
- package/dist/{chrome-BKUACyeO.js → chrome-DPjznJQ-.js} +4 -4
- package/dist/control-ui/css/revert-red-theme.md +141 -0
- package/dist/control-ui/css/style.css +5843 -0
- package/dist/control-ui/css/style.css.backup-2026-03-03-162525 +3546 -0
- package/dist/control-ui/css/style.css.backup-before-red-2026-03-03-162525 +3546 -0
- package/dist/control-ui/css/style.css.backup-before-red-theme-2026-03-03-162530 +3546 -0
- package/dist/control-ui/css/style.css.pre-2row +2165 -0
- package/dist/control-ui/css/style.css.pre-brand +1776 -0
- package/dist/control-ui/css/style.css.pre-history +1974 -0
- package/dist/control-ui/css/style.css.pre-nav +2264 -0
- package/dist/control-ui/css/style.css.pre-newsession +1898 -0
- package/dist/control-ui/css/style.css.pre-queue +2195 -0
- package/dist/control-ui/css/style.css.pre-red-prompt +2524 -0
- package/dist/control-ui/css/style.css.pre-stop +2239 -0
- package/dist/control-ui/css/style.css.pre-textarea +2184 -0
- package/dist/control-ui/css/style.css.pre-watchdog +1848 -0
- package/dist/control-ui/css/style.css.red-theme +2999 -0
- package/dist/control-ui/index.html +1049 -0
- package/dist/control-ui/js/app.js +1304 -0
- package/dist/control-ui/js/app.js.pre-2row +463 -0
- package/dist/control-ui/js/app.js.pre-heartbeat-filter +595 -0
- package/dist/control-ui/js/app.js.pre-newsession +408 -0
- package/dist/control-ui/js/app.js.pre-queue +476 -0
- package/dist/control-ui/js/app.js.pre-stop +564 -0
- package/dist/control-ui/js/app.js.pre-textarea +467 -0
- package/dist/control-ui/js/app.js.pre-watchdog +293 -0
- package/dist/control-ui/js/connections.js +438 -0
- package/dist/control-ui/js/gateway.js +233 -0
- package/dist/control-ui/js/gateway.js.pre-stop +110 -0
- package/dist/control-ui/js/history.js +732 -0
- package/dist/control-ui/js/logs.js +238 -0
- package/dist/control-ui/js/menu.js +232 -0
- package/dist/control-ui/js/menu.js.pre-nav +66 -0
- package/dist/control-ui/js/metrics.js +53 -0
- package/dist/control-ui/js/models.js +138 -0
- package/dist/control-ui/js/render.js +882 -0
- package/dist/control-ui/js/render.test.js +112 -0
- package/dist/control-ui/js/scheduling.js +461 -0
- package/dist/control-ui/js/settings.js +910 -0
- package/dist/control-ui/js/slash-autocomplete.js +168 -0
- package/dist/control-ui/js/subagents.js +560 -0
- package/dist/control-ui/js/utils.js +29 -0
- package/dist/control-ui/vendor/highlight.min.js +2518 -0
- package/dist/control-ui/vendor/marked.min.js +69 -0
- package/dist/{deliver-DyO3QD8O.js → deliver-DTRkeYm3.js} +4 -4
- package/dist/{deliver-Cjyb6h4g.js → deliver-oWGJwzFf.js} +4 -4
- package/dist/extensionAPI.js +4 -4
- package/dist/llm-slug-generator.js +4 -4
- package/dist/{manager-rvtFoeFT.js → manager-CFenq_aO.js} +1 -1
- package/dist/{manager-PTSjHNVq.js → manager-CsxTf96V.js} +1 -1
- package/dist/{pi-embedded-BPuUM-gD.js → pi-embedded-Cdub5Vs9.js} +10 -10
- package/dist/{pw-ai-BFS9ezWe.js → pw-ai-BOOB8qoi.js} +1 -1
- package/dist/{pw-ai-Cx-Ko_FL.js → pw-ai-D2pEVS5n.js} +1 -1
- package/dist/{synthesis-7UL3pCpj.js → synthesis-Be9nYyDd.js} +4 -4
- package/dist/{synthesis-fD8J2vag.js → synthesis-CBIT6Vnk.js} +4 -4
- package/dist/{unified-runner-BIiKFnNF.js → unified-runner-BVvvnjXW.js} +10 -10
- package/package.json +3 -3
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
// ── Model Routing Toggle ─────────────────────────────────────────────
|
|
2
|
+
// Spider dropdown (4 models) ↔ CoreWeave (Qwen vLLM) ↔ API (Anthropic).
|
|
3
|
+
// The Spider dropdown is a single <select> that maps each option value
|
|
4
|
+
// (the provider key) to a fully-qualified model id.
|
|
5
|
+
|
|
6
|
+
(function () {
|
|
7
|
+
// Button keys → full model id
|
|
8
|
+
const BUTTON_MODELS = {
|
|
9
|
+
redsand: "qwen-cw/qwen35-35b-fp8",
|
|
10
|
+
coreweave2: "qwen-cw2/qwen36-35b-fp8",
|
|
11
|
+
api: "anthropic/claude-sonnet-4-6",
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
// Spider option values → full model id. The option value is the
|
|
15
|
+
// provider key in symi.json; the model id includes the HuggingFace
|
|
16
|
+
// path after the provider prefix (parseModelRef splits on the first
|
|
17
|
+
// slash only, so slashes in the model id survive).
|
|
18
|
+
const SPIDER_MODELS = {
|
|
19
|
+
"spider-gemma4": "spider-gemma4/TrevorJS/gemma-4-31B-it-uncensored",
|
|
20
|
+
"spider-qwen35": "spider-qwen35/Qwen/Qwen3.5-35B-A3B-FP8",
|
|
21
|
+
"spider-qwen35-uncen":
|
|
22
|
+
"spider-qwen35-uncen/Li101/Qwen3.5-35B-A3B-Uncensored-Aggressive-safetensors",
|
|
23
|
+
"spider-qwen36": "spider-qwen36/Qwen/Qwen3.6-35B-A3B-FP8",
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
const buttons = document.querySelectorAll("#model-toggle .model-toggle-btn");
|
|
27
|
+
const spiderSelect = document.getElementById("model-toggle-spider");
|
|
28
|
+
const statusEl = document.getElementById("model-status");
|
|
29
|
+
|
|
30
|
+
if (!buttons.length && !spiderSelect) {
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
let currentHash = null;
|
|
35
|
+
|
|
36
|
+
// Reverse lookups: model id → (button key | spider option value)
|
|
37
|
+
const idToButtonKey = {};
|
|
38
|
+
for (const [key, id] of Object.entries(BUTTON_MODELS)) {
|
|
39
|
+
idToButtonKey[id] = key;
|
|
40
|
+
}
|
|
41
|
+
const idToSpiderKey = {};
|
|
42
|
+
for (const [key, id] of Object.entries(SPIDER_MODELS)) {
|
|
43
|
+
idToSpiderKey[id] = key;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
function setActive(primaryId) {
|
|
47
|
+
const buttonKey = idToButtonKey[primaryId];
|
|
48
|
+
buttons.forEach((btn) => {
|
|
49
|
+
btn.classList.toggle("active", btn.dataset.model === buttonKey);
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
const spiderKey = idToSpiderKey[primaryId];
|
|
53
|
+
if (spiderSelect) {
|
|
54
|
+
spiderSelect.classList.toggle("active", Boolean(spiderKey));
|
|
55
|
+
// Reset to the placeholder when the active model isn't a Spider one
|
|
56
|
+
spiderSelect.value = spiderKey ?? "";
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
async function init() {
|
|
61
|
+
try {
|
|
62
|
+
const cfg = await window.gateway.rpc("config.get", {});
|
|
63
|
+
currentHash = cfg.hash || null;
|
|
64
|
+
const primaryId = cfg.config?.agents?.defaults?.model?.primary || "";
|
|
65
|
+
setActive(primaryId);
|
|
66
|
+
window.activeModelId = primaryId;
|
|
67
|
+
statusEl.textContent = "";
|
|
68
|
+
} catch (err) {
|
|
69
|
+
console.warn("[models] init failed:", err.message);
|
|
70
|
+
statusEl.textContent = "error loading";
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
async function switchToModelId(newId) {
|
|
75
|
+
if (!newId) {
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
setActive(newId);
|
|
79
|
+
window.activeModelId = newId;
|
|
80
|
+
statusEl.textContent = "switching…";
|
|
81
|
+
|
|
82
|
+
try {
|
|
83
|
+
const freshCfg = await window.gateway.rpc("config.get", {});
|
|
84
|
+
currentHash = freshCfg.hash;
|
|
85
|
+
|
|
86
|
+
await window.gateway.rpc("config.patch", {
|
|
87
|
+
baseHash: currentHash,
|
|
88
|
+
raw: JSON.stringify({
|
|
89
|
+
agents: { defaults: { model: { primary: newId } } },
|
|
90
|
+
}),
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
statusEl.textContent = "applied";
|
|
94
|
+
// Profile arrives via WebSocket "profile" event after reload
|
|
95
|
+
} catch (err) {
|
|
96
|
+
console.warn("[models] switch failed:", err.message);
|
|
97
|
+
statusEl.textContent = "switch failed";
|
|
98
|
+
setTimeout(init, 1500);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
// Listen for profile broadcasts to update status text
|
|
103
|
+
window.addEventListener("symi:profile-changed", (e) => {
|
|
104
|
+
const profile = e.detail;
|
|
105
|
+
if (profile?.label) {
|
|
106
|
+
statusEl.textContent = profile.label;
|
|
107
|
+
// Clear after 3s
|
|
108
|
+
setTimeout(() => {
|
|
109
|
+
if (statusEl.textContent === profile.label) {
|
|
110
|
+
statusEl.textContent = "";
|
|
111
|
+
}
|
|
112
|
+
}, 3000);
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
|
|
116
|
+
buttons.forEach((btn) => {
|
|
117
|
+
btn.addEventListener("click", () => {
|
|
118
|
+
const id = BUTTON_MODELS[btn.dataset.model];
|
|
119
|
+
if (id) {
|
|
120
|
+
void switchToModelId(id);
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
});
|
|
124
|
+
|
|
125
|
+
if (spiderSelect) {
|
|
126
|
+
spiderSelect.addEventListener("change", () => {
|
|
127
|
+
const id = SPIDER_MODELS[spiderSelect.value];
|
|
128
|
+
if (id) {
|
|
129
|
+
void switchToModelId(id);
|
|
130
|
+
}
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
window.addEventListener("gateway:connected", () => init());
|
|
135
|
+
if (window.gateway && window.gateway.connected) {
|
|
136
|
+
void init();
|
|
137
|
+
}
|
|
138
|
+
})();
|