synabun 2.2.2 → 2.3.0
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/CHANGELOG.md +26 -0
- package/README.md +1 -1
- package/docs/whatsapp.md +52 -20
- package/lib/mcp-build.js +519 -0
- package/lib/mcp-dist.js +10 -4
- package/lib/server-supervisor.js +7 -1
- package/lib/virustotal.mjs +4 -2
- package/mcp-server/dist/http.d.ts +38 -0
- package/mcp-server/dist/http.d.ts.map +1 -1
- package/mcp-server/dist/http.js +75 -7
- package/mcp-server/dist/http.js.map +1 -1
- package/mcp-server/dist/services/browser-route-flow.d.ts +3 -2
- package/mcp-server/dist/services/browser-route-flow.d.ts.map +1 -1
- package/mcp-server/dist/services/browser-route-flow.js +4 -3
- package/mcp-server/dist/services/browser-route-flow.js.map +1 -1
- package/mcp-server/dist/services/embedding-service.d.ts.map +1 -1
- package/mcp-server/dist/services/embedding-service.js +2 -1
- package/mcp-server/dist/services/embedding-service.js.map +1 -1
- package/mcp-server/dist/services/neural-interface.d.ts +21 -0
- package/mcp-server/dist/services/neural-interface.d.ts.map +1 -1
- package/mcp-server/dist/services/neural-interface.js +76 -4
- package/mcp-server/dist/services/neural-interface.js.map +1 -1
- package/mcp-server/dist/services/tool-catalog.js +2 -2
- package/mcp-server/dist/services/tool-catalog.js.map +1 -1
- package/mcp-server/dist/tools/agents.d.ts +3 -2
- package/mcp-server/dist/tools/agents.d.ts.map +1 -1
- package/mcp-server/dist/tools/agents.js +6 -4
- package/mcp-server/dist/tools/agents.js.map +1 -1
- package/mcp-server/dist/tools/browser-advanced.d.ts +3 -1
- package/mcp-server/dist/tools/browser-advanced.d.ts.map +1 -1
- package/mcp-server/dist/tools/browser-advanced.js +30 -8
- package/mcp-server/dist/tools/browser-advanced.js.map +1 -1
- package/mcp-server/dist/tools/browser-navigate.d.ts +3 -3
- package/mcp-server/dist/tools/browser-navigate.d.ts.map +1 -1
- package/mcp-server/dist/tools/browser-navigate.js +19 -16
- package/mcp-server/dist/tools/browser-navigate.js.map +1 -1
- package/mcp-server/dist/tools/browser-observe.d.ts +2 -1
- package/mcp-server/dist/tools/browser-observe.d.ts.map +1 -1
- package/mcp-server/dist/tools/browser-observe.js +61 -20
- package/mcp-server/dist/tools/browser-observe.js.map +1 -1
- package/mcp-server/dist/tools/morelogin.d.ts +13 -3
- package/mcp-server/dist/tools/morelogin.d.ts.map +1 -1
- package/mcp-server/dist/tools/morelogin.js +81 -20
- package/mcp-server/dist/tools/morelogin.js.map +1 -1
- package/mcp-server/dist/tools/youtube/upload.d.ts.map +1 -1
- package/mcp-server/dist/tools/youtube/upload.js +225 -88
- package/mcp-server/dist/tools/youtube/upload.js.map +1 -1
- package/mcp-server/package-lock.json +2 -2
- package/mcp-server/package.json +1 -1
- package/mcp-server/src/http.ts +79 -7
- package/mcp-server/src/services/browser-route-flow.ts +4 -3
- package/mcp-server/src/services/embedding-service.ts +2 -1
- package/mcp-server/src/services/neural-interface.ts +77 -4
- package/mcp-server/src/services/tool-catalog.ts +2 -2
- package/mcp-server/src/tools/agents.ts +8 -4
- package/mcp-server/src/tools/browser-advanced.ts +29 -8
- package/mcp-server/src/tools/browser-navigate.ts +19 -16
- package/mcp-server/src/tools/browser-observe.ts +62 -20
- package/mcp-server/src/tools/morelogin.ts +81 -20
- package/mcp-server/src/tools/youtube/upload.ts +218 -99
- package/neural-interface/i18n/en.json +631 -123
- package/neural-interface/i18n/pt-BR.json +518 -10
- package/neural-interface/lib/assistant-api.js +26 -0
- package/neural-interface/lib/assistant-brains/claude.js +5 -0
- package/neural-interface/lib/assistant-catalog.js +114 -1
- package/neural-interface/lib/assistant-dispatch.js +71 -1
- package/neural-interface/lib/assistant-persona.js +14 -7
- package/neural-interface/lib/assistant-router.js +6 -4
- package/neural-interface/lib/assistant-runtime.js +3 -0
- package/neural-interface/lib/assistant-task-prompt.js +5 -0
- package/neural-interface/lib/automation-approval.js +249 -0
- package/neural-interface/lib/automation-browser-owner-access.js +82 -0
- package/neural-interface/lib/backup-service.js +16 -1
- package/neural-interface/lib/browser-background-tab.js +72 -3
- package/neural-interface/lib/browser-extraction.js +106 -45
- package/neural-interface/lib/browser-profile-choices.js +143 -0
- package/neural-interface/lib/browser-profiles.js +142 -0
- package/neural-interface/lib/browser-tab-recovery.js +153 -0
- package/neural-interface/lib/browser-tool-policy.js +2 -0
- package/neural-interface/lib/chromium-on-device-model.js +67 -0
- package/neural-interface/lib/claude-agent-bridge.js +7 -4
- package/neural-interface/lib/claude-model-catalog.js +12 -0
- package/neural-interface/lib/effort-levels.js +28 -2
- package/neural-interface/lib/local-profile-proxy.js +362 -0
- package/neural-interface/lib/local-profiles.js +929 -0
- package/neural-interface/lib/loop-logger.js +25 -4
- package/neural-interface/lib/maritaca/api.js +179 -0
- package/neural-interface/lib/maritaca/attachments.js +44 -0
- package/neural-interface/lib/maritaca/client.js +362 -0
- package/neural-interface/lib/maritaca/key-store.js +122 -0
- package/neural-interface/lib/maritaca/models.js +181 -0
- package/neural-interface/lib/maritaca/modes.js +39 -0
- package/neural-interface/lib/maritaca/opencode-proxy.js +236 -0
- package/neural-interface/lib/maritaca/opencode-stream.js +345 -0
- package/neural-interface/lib/maritaca/opencode.js +218 -0
- package/neural-interface/lib/maritaca/panel-bridge.js +273 -0
- package/neural-interface/lib/maritaca/sessions.js +198 -0
- package/neural-interface/lib/morelogin-agent-profiles.js +149 -0
- package/neural-interface/lib/morelogin.js +278 -14
- package/neural-interface/lib/native-loop-providers.js +3 -1
- package/neural-interface/lib/owner-authority.js +30 -12
- package/neural-interface/lib/page-session.js +43 -17
- package/neural-interface/lib/request-gate.js +2 -0
- package/neural-interface/lib/system-activity.js +1 -1
- package/neural-interface/lib/terminal-tokens.js +82 -5
- package/neural-interface/package-lock.json +3 -2
- package/neural-interface/package.json +2 -1
- package/neural-interface/public/assets/mascot/README.md +11 -0
- package/neural-interface/public/assets/mascot/ask.gif +0 -0
- package/neural-interface/public/assets/mascot/ask.png +0 -0
- package/neural-interface/public/assets/mascot/blocked.gif +0 -0
- package/neural-interface/public/assets/mascot/blocked.png +0 -0
- package/neural-interface/public/assets/mascot/budget.gif +0 -0
- package/neural-interface/public/assets/mascot/budget.png +0 -0
- package/neural-interface/public/assets/mascot/computer.gif +0 -0
- package/neural-interface/public/assets/mascot/computer.png +0 -0
- package/neural-interface/public/assets/mascot/edit.gif +0 -0
- package/neural-interface/public/assets/mascot/edit.png +0 -0
- package/neural-interface/public/assets/mascot/error.gif +0 -0
- package/neural-interface/public/assets/mascot/error.png +0 -0
- package/neural-interface/public/assets/mascot/hover-attention.gif +0 -0
- package/neural-interface/public/assets/mascot/hover-attention.png +0 -0
- package/neural-interface/public/assets/mascot/idle-hero.gif +0 -0
- package/neural-interface/public/assets/mascot/idle-hero.png +0 -0
- package/neural-interface/public/assets/mascot/idle.gif +0 -0
- package/neural-interface/public/assets/mascot/idle.png +0 -0
- package/neural-interface/public/assets/mascot/manifest.json +254 -0
- package/neural-interface/public/assets/mascot/mcp.gif +0 -0
- package/neural-interface/public/assets/mascot/mcp.png +0 -0
- package/neural-interface/public/assets/mascot/memory.gif +0 -0
- package/neural-interface/public/assets/mascot/memory.png +0 -0
- package/neural-interface/public/assets/mascot/offline.gif +0 -0
- package/neural-interface/public/assets/mascot/offline.png +0 -0
- package/neural-interface/public/assets/mascot/pick.gif +0 -0
- package/neural-interface/public/assets/mascot/pick.png +0 -0
- package/neural-interface/public/assets/mascot/plan.gif +0 -0
- package/neural-interface/public/assets/mascot/plan.png +0 -0
- package/neural-interface/public/assets/mascot/present.gif +0 -0
- package/neural-interface/public/assets/mascot/present.png +0 -0
- package/neural-interface/public/assets/mascot/project.gif +0 -0
- package/neural-interface/public/assets/mascot/project.png +0 -0
- package/neural-interface/public/assets/mascot/read.gif +0 -0
- package/neural-interface/public/assets/mascot/read.png +0 -0
- package/neural-interface/public/assets/mascot/runs.gif +0 -0
- package/neural-interface/public/assets/mascot/runs.png +0 -0
- package/neural-interface/public/assets/mascot/scenes/automation.gif +0 -0
- package/neural-interface/public/assets/mascot/scenes/automation.png +0 -0
- package/neural-interface/public/assets/mascot/scenes/browser.gif +0 -0
- package/neural-interface/public/assets/mascot/scenes/browser.png +0 -0
- package/neural-interface/public/assets/mascot/scenes/code.gif +0 -0
- package/neural-interface/public/assets/mascot/scenes/code.png +0 -0
- package/neural-interface/public/assets/mascot/scenes/complex.gif +0 -0
- package/neural-interface/public/assets/mascot/scenes/complex.png +0 -0
- package/neural-interface/public/assets/mascot/scenes/computer.gif +0 -0
- package/neural-interface/public/assets/mascot/scenes/computer.png +0 -0
- package/neural-interface/public/assets/mascot/scenes/design.gif +0 -0
- package/neural-interface/public/assets/mascot/scenes/design.png +0 -0
- package/neural-interface/public/assets/mascot/scenes/edit.gif +0 -0
- package/neural-interface/public/assets/mascot/scenes/edit.png +0 -0
- package/neural-interface/public/assets/mascot/scenes/generic.gif +0 -0
- package/neural-interface/public/assets/mascot/scenes/generic.png +0 -0
- package/neural-interface/public/assets/mascot/scenes/image_gen.gif +0 -0
- package/neural-interface/public/assets/mascot/scenes/image_gen.png +0 -0
- package/neural-interface/public/assets/mascot/scenes/manifest.json +173 -0
- package/neural-interface/public/assets/mascot/scenes/memory.gif +0 -0
- package/neural-interface/public/assets/mascot/scenes/memory.png +0 -0
- package/neural-interface/public/assets/mascot/scenes/quick.gif +0 -0
- package/neural-interface/public/assets/mascot/scenes/quick.png +0 -0
- package/neural-interface/public/assets/mascot/scenes/read.gif +0 -0
- package/neural-interface/public/assets/mascot/scenes/read.png +0 -0
- package/neural-interface/public/assets/mascot/scenes/research.gif +0 -0
- package/neural-interface/public/assets/mascot/scenes/research.png +0 -0
- package/neural-interface/public/assets/mascot/scenes/review.gif +0 -0
- package/neural-interface/public/assets/mascot/scenes/review.png +0 -0
- package/neural-interface/public/assets/mascot/scenes/search.gif +0 -0
- package/neural-interface/public/assets/mascot/scenes/search.png +0 -0
- package/neural-interface/public/assets/mascot/scenes/shell.gif +0 -0
- package/neural-interface/public/assets/mascot/scenes/shell.png +0 -0
- package/neural-interface/public/assets/mascot/scenes/thinking.gif +0 -0
- package/neural-interface/public/assets/mascot/scenes/thinking.png +0 -0
- package/neural-interface/public/assets/mascot/scenes/video_gen.gif +0 -0
- package/neural-interface/public/assets/mascot/scenes/video_gen.png +0 -0
- package/neural-interface/public/assets/mascot/scenes/web.gif +0 -0
- package/neural-interface/public/assets/mascot/scenes/web.png +0 -0
- package/neural-interface/public/assets/mascot/search.gif +0 -0
- package/neural-interface/public/assets/mascot/search.png +0 -0
- package/neural-interface/public/assets/mascot/shell.gif +0 -0
- package/neural-interface/public/assets/mascot/shell.png +0 -0
- package/neural-interface/public/assets/mascot/skill.gif +0 -0
- package/neural-interface/public/assets/mascot/skill.png +0 -0
- package/neural-interface/public/assets/mascot/sleep.gif +0 -0
- package/neural-interface/public/assets/mascot/sleep.png +0 -0
- package/neural-interface/public/assets/mascot/subagent.gif +0 -0
- package/neural-interface/public/assets/mascot/subagent.png +0 -0
- package/neural-interface/public/assets/mascot/success.gif +0 -0
- package/neural-interface/public/assets/mascot/success.png +0 -0
- package/neural-interface/public/assets/mascot/think.gif +0 -0
- package/neural-interface/public/assets/mascot/think.png +0 -0
- package/neural-interface/public/assets/mascot/wait.gif +0 -0
- package/neural-interface/public/assets/mascot/wait.png +0 -0
- package/neural-interface/public/assets/mascot/watch.gif +0 -0
- package/neural-interface/public/assets/mascot/watch.png +0 -0
- package/neural-interface/public/assets/mascot/web.gif +0 -0
- package/neural-interface/public/assets/mascot/web.png +0 -0
- package/neural-interface/public/onboarding.html +14 -1
- package/neural-interface/public/shared/agent-runtime-options.js +49 -8
- package/neural-interface/public/shared/agy/agy-panel.js +2 -2
- package/neural-interface/public/shared/api.js +4 -4
- package/neural-interface/public/shared/assistant/asst-ask-styles.js +8 -8
- package/neural-interface/public/shared/assistant/asst-ask.js +1 -1
- package/neural-interface/public/shared/assistant/asst-brain-picker.js +99 -9
- package/neural-interface/public/shared/assistant/asst-control.js +1 -1
- package/neural-interface/public/shared/assistant/asst-limit-wait.js +4 -4
- package/neural-interface/public/shared/assistant/asst-panel.js +6 -2
- package/neural-interface/public/shared/assistant/asst-rack-styles.js +4 -4
- package/neural-interface/public/shared/assistant/asst-render.js +6 -6
- package/neural-interface/public/shared/assistant/asst-route-models.js +64 -4
- package/neural-interface/public/shared/assistant/asst-route.js +24 -7
- package/neural-interface/public/shared/assistant/asst-routes-editor.js +154 -39
- package/neural-interface/public/shared/assistant/asst-run-stage.js +3 -3
- package/neural-interface/public/shared/assistant/asst-scene-styles.js +8 -111
- package/neural-interface/public/shared/assistant/asst-scenes.js +46 -318
- package/neural-interface/public/shared/assistant/asst-sidepanel.js +2 -2
- package/neural-interface/public/shared/assistant/asst-state.js +72 -2
- package/neural-interface/public/shared/assistant/asst-styles.js +58 -14
- package/neural-interface/public/shared/automation-approval-view.js +75 -0
- package/neural-interface/public/shared/cdx/cdx-panel.js +2 -2
- package/neural-interface/public/shared/context-menu-model.js +2 -0
- package/neural-interface/public/shared/editor/editor-panel-logic.js +10 -0
- package/neural-interface/public/shared/editor/editor-panel.js +10 -2
- package/neural-interface/public/shared/html-shell.js +30 -22
- package/neural-interface/public/shared/morelogin-profile-choices.js +107 -0
- package/neural-interface/public/shared/morelogin-profile-field.js +186 -0
- package/neural-interface/public/shared/mtc/mtc-client.js +181 -0
- package/neural-interface/public/shared/mtc/mtc-compose.js +40 -0
- package/neural-interface/public/shared/mtc/mtc-copy.js +253 -0
- package/neural-interface/public/shared/mtc/mtc-logic.js +478 -0
- package/neural-interface/public/shared/mtc/mtc-panel.js +1354 -0
- package/neural-interface/public/shared/mtc/mtc-render.js +172 -0
- package/neural-interface/public/shared/mtc/mtc-styles.js +437 -0
- package/neural-interface/public/shared/ocp-v2/ocp-v2-panel.js +6 -2
- package/neural-interface/public/shared/provider-icons.js +3 -0
- package/neural-interface/public/shared/schedules-view.js +7 -0
- package/neural-interface/public/shared/server-back.js +50 -0
- package/neural-interface/public/shared/settings/settings-browser-owner-access.js +72 -0
- package/neural-interface/public/shared/settings/settings-data.js +1 -0
- package/neural-interface/public/shared/settings/settings-ia.js +3 -1
- package/neural-interface/public/shared/settings/settings-local-profiles.js +153 -0
- package/neural-interface/public/shared/settings/settings-maritaca-opencode.js +105 -0
- package/neural-interface/public/shared/sidepanel-session-status.js +16 -2
- package/neural-interface/public/shared/state.js +1 -1
- package/neural-interface/public/shared/styles.css +356 -157
- package/neural-interface/public/shared/synabun-mascot-assets.js +67 -0
- package/neural-interface/public/shared/synabun-mascot.js +136 -12
- package/neural-interface/public/shared/synabun-ticker.js +3 -0
- package/neural-interface/public/shared/topright-overflow-logic.js +1 -0
- package/neural-interface/public/shared/ui-automation-approval.js +188 -0
- package/neural-interface/public/shared/ui-automation-studio.js +130 -90
- package/neural-interface/public/shared/ui-claude-panel.js +50 -2
- package/neural-interface/public/shared/ui-maritaca-panel.js +15 -0
- package/neural-interface/public/shared/ui-navbar.js +17 -0
- package/neural-interface/public/shared/ui-panels.js +3 -1
- package/neural-interface/public/shared/ui-schedules-studio.js +118 -17
- package/neural-interface/public/shared/ui-scroll-follow.js +3 -0
- package/neural-interface/public/shared/ui-settings.js +590 -27
- package/neural-interface/public/shared/ui-sidepanel-session-entry.js +8 -2
- package/neural-interface/public/shared/ui-sidepanel-sessions.js +3 -3
- package/neural-interface/public/shared/ui-sidepanel-tray.js +24 -0
- package/neural-interface/public/shared/ui-sidepanel-windows.js +1 -1
- package/neural-interface/scripts/build-mascot-assets.mjs +30 -0
- package/neural-interface/server.js +1784 -195
- package/npm-shrinkwrap.json +5 -17
- package/package.json +5 -6
- package/postinstall.js +38 -39
- package/setup.js +33 -31
- package/skills/synabun/modules/changelog.md +14 -0
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
// Model routes: draft-only editor. All model data comes through asst-route-models.
|
|
2
2
|
// The global default and saved preferences are written together only on Save.
|
|
3
|
-
import { clampEffortId,
|
|
3
|
+
import { clampEffortId, modelEffortIds, fetchClaudeAccounts, fetchCodexAccounts, getCachedClaudeAccounts, getCachedCodexAccounts, getClaudeWorkerAccountId, getCodexWorkerAccountId } from '../agent-runtime-options.js';
|
|
4
4
|
import { accountSummary, accountName, accountBadge, accountIdentity } from '../account-view.js';
|
|
5
5
|
import { accountUsageText, autoAccountLabel } from '../account-usage.js';
|
|
6
|
-
import {
|
|
6
|
+
import { putRouting } from './asst-api.js';
|
|
7
7
|
import { catalogModelRow, hiddenModelFor, ICON_CARET, openModelMenu } from './asst-brain-picker.js';
|
|
8
8
|
import { closeMenu, currentMenu } from './asst-menu.js';
|
|
9
|
-
import { loadRouteModels, routeModelLabel, routeModelsStatus, watchRouteModels } from './asst-route-models.js';
|
|
10
|
-
import { designRouteSight, openModelsManager, routeCatalogRow, routeModeLabel } from './asst-route.js';
|
|
11
|
-
import { DEFAULT_ROUTE_MODE, normalizeRouteMode, PROVIDERS, providerMeta, ROUTE_MODES } from './asst-state.js';
|
|
9
|
+
import { cachedRouteModels, cachedRouting, catalogSignature, loadRouteModels, loadRouting, rememberRouting, routeModelLabel, routeModelsStatus, watchRouteModels } from './asst-route-models.js';
|
|
10
|
+
import { designRouteSight, openModelsManager, routeCatalogRow, routeEffortChoices, routeModeLabel } from './asst-route.js';
|
|
11
|
+
import { DEFAULT_ROUTE_MODE, displayProvider, normalizeRouteMode, PROVIDERS, providerMeta, ROUTE_EFFORT_OFF, ROUTE_MODES } from './asst-state.js';
|
|
12
12
|
|
|
13
13
|
const ICON_ROUTE = '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round"><path d="M4 7h15l-4-4M20 17H5l4 4"/></svg>';
|
|
14
14
|
const ICON_X = '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round"><path d="m6 6 12 12M18 6 6 18"/></svg>';
|
|
@@ -88,7 +88,7 @@ export function routePreferenceIssue(pref, task, catalog, { hidden = hiddenModel
|
|
|
88
88
|
if (row.status === 'unavailable') return 'unavailable';
|
|
89
89
|
if (task.requires && row.outputs?.[task.requires] !== true) return 'incapable';
|
|
90
90
|
if ((task.id === 'computer' || task.id === 'vision') && row.vision === false) return 'blind';
|
|
91
|
-
if (pref.effort && !
|
|
91
|
+
if (pref.effort && pref.effort !== 'off' && !routeEffortChoices(pref.provider, row).some(e => e.id === pref.effort)) return 'effort';
|
|
92
92
|
return null;
|
|
93
93
|
}
|
|
94
94
|
|
|
@@ -120,7 +120,10 @@ export async function openRoutesEditor(hooks = {}) {
|
|
|
120
120
|
foot.append(resetAllBtn, draft, cancelBtn, saveBtn);
|
|
121
121
|
modal.append(head, body, cue, confirmation, foot); overlay.append(modal);
|
|
122
122
|
|
|
123
|
-
|
|
123
|
+
// modelsLoading: no catalog to draw from yet (rows are drawn, their checks wait).
|
|
124
|
+
// catalogRefreshing: rows are drawn from the page's last catalog while a new build is read.
|
|
125
|
+
const state = { data: null, catalog: null, version: null, mode: DEFAULT_ROUTE_MODE, initialMode: DEFAULT_ROUTE_MODE, prefs: {}, patch: {}, loading: true, modelsLoading: true, catalogRefreshing: false, modelError: false, error: '', conflict: false, saving: false, confirm: null, suspended: false, offline: navigator.onLine === false, menuFocus: '', notice: '' };
|
|
126
|
+
state.expandedTask = null;
|
|
124
127
|
const effectivePref = key => own(state.patch, key) ? state.patch[key] : state.prefs[key] || null;
|
|
125
128
|
const changes = () => routeEditorPatch(state.mode, state.initialMode, state.prefs, state.patch);
|
|
126
129
|
const dirty = () => Object.keys(changes()).length > 0;
|
|
@@ -195,6 +198,7 @@ export async function openRoutesEditor(hooks = {}) {
|
|
|
195
198
|
e.preventDefault(); e.stopImmediatePropagation();
|
|
196
199
|
if (menu) closeMenu({ restoreFocus: true });
|
|
197
200
|
else if (state.confirm) confirmationOff();
|
|
201
|
+
else if (state.expandedTask) { const key = state.expandedTask; state.expandedTask = null; render(`${key}-toggle`); }
|
|
198
202
|
else close();
|
|
199
203
|
return;
|
|
200
204
|
}
|
|
@@ -211,6 +215,8 @@ export async function openRoutesEditor(hooks = {}) {
|
|
|
211
215
|
}
|
|
212
216
|
function onFocus(e) {
|
|
213
217
|
if (!state.suspended && !overlay.contains(e.target) && !currentMenu()?.contains(e.target)) (tabbables()[0] || closeBtn).focus();
|
|
218
|
+
// New lists arrived while a menu was open: drawn once focus is back in the dialog.
|
|
219
|
+
if (state.pendingRender && !state.suspended && !currentMenu() && overlay.contains(e.target)) render(e.target?.dataset?.focusKey);
|
|
214
220
|
}
|
|
215
221
|
function network() { state.offline = navigator.onLine === false; render(); }
|
|
216
222
|
overlay.addEventListener('keydown', e => e.stopPropagation());
|
|
@@ -252,7 +258,16 @@ export async function openRoutesEditor(hooks = {}) {
|
|
|
252
258
|
if (!list.some(t => t.id === 'vision')) list.push({ id: 'vision', label: tr('assistant.routes.visionRow', 'Screenshots & images'), description: tr('assistant.routes.visionDesc', 'Fallback when a task needs a model that can see.'), defaultKind: 'direct', visionOnly: false });
|
|
253
259
|
return list;
|
|
254
260
|
}
|
|
255
|
-
|
|
261
|
+
// One choice redraws its own row and the footer; the rest of the table stands.
|
|
262
|
+
function setChoice(key, pref, focusKey) {
|
|
263
|
+
state.patch[key] = pref;
|
|
264
|
+
const noticeShown = !!state.notice; state.notice = '';
|
|
265
|
+
const current = body.querySelector(`.asst-routes-row[data-task-class="${CSS.escape(key)}"]`);
|
|
266
|
+
const task = current && !noticeShown && !state.confirm && !state.pendingRender ? tasks().find(t => t.id === key) : null;
|
|
267
|
+
if (!task) { render(focusKey); return; }
|
|
268
|
+
current.replaceWith(taskRow(task)); updateFoot();
|
|
269
|
+
if (focusKey && !state.suspended) focus(focusKey);
|
|
270
|
+
}
|
|
256
271
|
function effortName(value) { return tr(`assistant.routes.efforts.${value}`, value); }
|
|
257
272
|
function defaultEffort(row) { return row?.defaultEffort ? tr('assistant.routes.effortAutoDefault', 'Default · {effort}', { effort: effortName(row.defaultEffort) }) : tr('assistant.routes.effortDefaultUnknown', 'Default · unknown'); }
|
|
258
273
|
function updateFoot() {
|
|
@@ -277,6 +292,7 @@ export async function openRoutesEditor(hooks = {}) {
|
|
|
277
292
|
if (action) b.append(button('asst-btn asst-btn-secondary', actionLabel, action)); body.append(b);
|
|
278
293
|
}
|
|
279
294
|
function render(focusKey) {
|
|
295
|
+
state.pendingRender = false;
|
|
280
296
|
const scroll = body.scrollTop;
|
|
281
297
|
const active = focusKey || document.activeElement?.dataset?.focusKey;
|
|
282
298
|
body.innerHTML = ''; body.setAttribute('aria-busy', state.loading ? 'true' : 'false');
|
|
@@ -285,9 +301,11 @@ export async function openRoutesEditor(hooks = {}) {
|
|
|
285
301
|
if (state.notice) banner(state.notice);
|
|
286
302
|
if (state.loading && !state.data) body.append(el('div', 'asst-modal-note', tr('assistant.routes.editorState.loadingRoutes', 'Loading routing settings and models…')));
|
|
287
303
|
if (!state.data) { updateFoot(); return; }
|
|
288
|
-
const section = el('section', 'asst-routes-section');
|
|
304
|
+
const section = el('section', 'asst-routes-section asst-routes-ask');
|
|
305
|
+
// One slim row: the heading, the segmented control and the conversation's own mode; one line under it.
|
|
306
|
+
const askHead = el('div', 'asst-routes-section-head asst-routes-ask-head');
|
|
289
307
|
const heading = el('h2', 'asst-routes-section-title', tr('assistant.routes.whenToAsk', 'When to ask')); heading.id = `${id}-modes`;
|
|
290
|
-
|
|
308
|
+
askHead.append(heading);
|
|
291
309
|
const modes = el('div', 'asst-routes-modes'); modes.setAttribute('role', 'radiogroup'); modes.setAttribute('aria-labelledby', heading.id);
|
|
292
310
|
const modeCopy = {
|
|
293
311
|
'always-ask': 'Asks before every task. Routes saved in Never ask are offered first on the route card.',
|
|
@@ -303,12 +321,14 @@ export async function openRoutesEditor(hooks = {}) {
|
|
|
303
321
|
input.addEventListener('change', () => { if (input.checked) { closeMenu(); state.mode = mode; state.notice = ''; body.scrollTop = 0; render(`mode-${mode}`); } }); modes.append(label);
|
|
304
322
|
}
|
|
305
323
|
const desc = el('p', 'asst-routes-mode-desc', tr(`assistant.routes.modeSummary.${state.mode}`, modeCopy[state.mode], { pct: threshold() })); desc.id = `${id}-mode-desc`;
|
|
306
|
-
|
|
324
|
+
desc.title = desc.textContent;
|
|
325
|
+
askHead.append(modes);
|
|
307
326
|
const current = hooks.getRouting?.();
|
|
308
327
|
if (current?.mode != null) {
|
|
309
328
|
const note = el('p', 'asst-routes-session-note', tr('assistant.routes.editorSessionOverride', 'This conversation overrides the default: {mode}.', { mode: routeModeLabel(current.effectiveMode || current.mode, hooks.t) }));
|
|
310
|
-
note.title = note.textContent;
|
|
329
|
+
note.title = note.textContent; askHead.append(note);
|
|
311
330
|
}
|
|
331
|
+
section.append(askHead, desc);
|
|
312
332
|
body.append(section);
|
|
313
333
|
// The draft is independent of the rendered table: mode switches never clear
|
|
314
334
|
// route edits, and updateFoot counts them while the table is absent.
|
|
@@ -327,19 +347,32 @@ export async function openRoutesEditor(hooks = {}) {
|
|
|
327
347
|
taskHeading.title = tr('assistant.routes.brainLabel', 'Routing brain: {model}', { model: brainLabel }); taskTitle.append(taskHeading);
|
|
328
348
|
top.append(taskTitle);
|
|
329
349
|
const actions = el('div', 'asst-routes-list-actions');
|
|
330
|
-
|
|
350
|
+
// A new build in progress is said in place of the Reload action, never as a spinner over the rows.
|
|
351
|
+
const reloadText = state.modelsLoading ? tr('assistant.routes.editorState.loadingModels', 'Loading models…') : state.catalogRefreshing ? tr('assistant.routes.editorState.modelsUpdating', 'Updating models…') : tr('assistant.routes.reloadModels', 'Reload models');
|
|
352
|
+
const reload = button('asst-btn asst-btn-secondary asst-routes-reload-models', reloadText, reloadModels); reload.disabled = state.modelsLoading || state.catalogRefreshing || state.saving || state.offline; reload.dataset.focusKey = 'reload-models';
|
|
353
|
+
reload.dataset.state = state.modelsLoading ? 'loading' : state.catalogRefreshing ? 'refreshing' : 'idle';
|
|
331
354
|
const manage = button('asst-btn asst-btn-secondary asst-routes-manage-models', tr('assistant.models.manage', 'Manage models…'), () => manageModels('manage-models')); manage.dataset.focusKey = 'manage-models';
|
|
332
355
|
actions.append(manage, reload); top.append(actions); table.append(top);
|
|
333
|
-
if (state.modelsLoading
|
|
334
|
-
else if (state.modelError) {
|
|
356
|
+
if (!state.modelsLoading && state.modelError) {
|
|
335
357
|
const note = el('div', 'asst-routes-catalog-note'); note.setAttribute('role', 'status'); note.append(el('span', '', tr('assistant.routes.editorState.modelsFailed', 'Could not refresh the model list. Showing provider lists where available. Reload models to verify your choices.'))); table.append(note);
|
|
336
358
|
} else if (!rowsOf(state.catalog).length) table.append(el('div', 'asst-routes-catalog-note', tr('assistant.routes.editorState.modelsEmpty', 'No models are available. Check Models or connect a provider, then reload.')));
|
|
337
|
-
const
|
|
338
|
-
for (const key of ['task', 'model', 'effort', 'run', 'account', 'reset']) columns.append(el('span', '', tr(`assistant.routes.columns.${key}`, key)));
|
|
339
|
-
table.append(columns);
|
|
340
|
-
const list = el('div', 'asst-routes-list');
|
|
359
|
+
const list = el('div', 'asst-routes-list'); list.setAttribute('aria-busy', state.modelsLoading || state.catalogRefreshing ? 'true' : 'false');
|
|
341
360
|
const taskList = tasks();
|
|
342
|
-
|
|
361
|
+
const groups = [
|
|
362
|
+
['everyday', 'Everyday', ['quick', 'research', 'chat']],
|
|
363
|
+
['engineering', 'Engineering', ['code', 'complex', 'review']],
|
|
364
|
+
['desktop', 'Web & desktop', ['browser', 'computer', 'automation']],
|
|
365
|
+
['media', 'Design & media', ['design', 'image_gen', 'video_gen', 'vision']],
|
|
366
|
+
];
|
|
367
|
+
for (const [key, label, ids] of groups) {
|
|
368
|
+
const group = el('section', 'asst-routes-group');
|
|
369
|
+
const heading = el('h3', '', tr(`assistant.routes.groups.${key}`, label));
|
|
370
|
+
heading.id = `${id}-group-${key}`; group.setAttribute('aria-labelledby', heading.id); group.append(heading);
|
|
371
|
+
for (const task of taskList.filter(t => ids.includes(t.id))) group.append(taskRow(task));
|
|
372
|
+
list.append(group);
|
|
373
|
+
}
|
|
374
|
+
// Future server task classes retain their labels and remain editable.
|
|
375
|
+
for (const task of taskList.filter(t => !groups.some(g => g[2].includes(t.id)))) list.append(taskRow(task));
|
|
343
376
|
if (!taskList.length) list.append(el('div', 'asst-modal-note', tr('assistant.routes.editorState.tasksEmpty', 'No task classes are available on this server.')));
|
|
344
377
|
table.append(list); body.append(table);
|
|
345
378
|
updateFoot(); body.scrollTop = scroll;
|
|
@@ -349,7 +382,8 @@ export async function openRoutesEditor(hooks = {}) {
|
|
|
349
382
|
function taskRow(task) {
|
|
350
383
|
const pref = effectivePref(task.id);
|
|
351
384
|
const model = pref ? routeCatalogRow(pref, state.catalog) : null;
|
|
352
|
-
|
|
385
|
+
// Before the first catalog a choice is neither verified nor unverified: its check waits for the lists.
|
|
386
|
+
const issue = state.modelsLoading ? null : routePreferenceIssue(pref, task, state.catalog, { partial: state.modelError });
|
|
353
387
|
const node = el('div', 'asst-routes-row'); node.dataset.taskClass = task.id;
|
|
354
388
|
const nameId = `${id}-task-${task.id}`;
|
|
355
389
|
node.setAttribute('role', 'group'); node.setAttribute('aria-labelledby', nameId);
|
|
@@ -390,8 +424,12 @@ export async function openRoutesEditor(hooks = {}) {
|
|
|
390
424
|
onSelect: target => {
|
|
391
425
|
if (target?.here) setChoice(task.id, null, modelBtn.dataset.focusKey);
|
|
392
426
|
else if (target?.model) {
|
|
393
|
-
const
|
|
394
|
-
const
|
|
427
|
+
const nextRow = catalogModelRow(target.provider, target.model, state.catalog);
|
|
428
|
+
const levels = modelEffortIds(nextRow);
|
|
429
|
+
// Off stays Off only on a model that can run without thinking; elsewhere it goes back to the default, never to a level.
|
|
430
|
+
const effort = !pref?.effort ? null
|
|
431
|
+
: pref.effort === ROUTE_EFFORT_OFF ? (routeEffortChoices(target.provider, nextRow).some(e => e.off) ? ROUTE_EFFORT_OFF : null)
|
|
432
|
+
: levels ? clampEffortId(pref.effort, levels) : pref.provider === target.provider ? pref.effort : null;
|
|
395
433
|
setChoice(task.id, { kind: task.dispatchOnly ? 'dispatch' : pref?.kind || task.defaultKind || 'direct', provider: target.provider, model: target.model, effort, accountId: routeModelAccount(pref, target.provider), label: target.label || target.model }, modelBtn.dataset.focusKey);
|
|
396
434
|
}
|
|
397
435
|
},
|
|
@@ -401,7 +439,7 @@ export async function openRoutesEditor(hooks = {}) {
|
|
|
401
439
|
// Keys are stable across translations; accessible names use the translated field.
|
|
402
440
|
modelBtn.dataset.focusKey = `${task.id}-model`; caret(modelBtn); modelBtn.setAttribute('aria-haspopup', 'dialog');
|
|
403
441
|
modelBtn.title = label;
|
|
404
|
-
if (pref?.provider) { const mark = el('span', 'asst-icon'); mark.setAttribute('aria-hidden', 'true'); mark.innerHTML =
|
|
442
|
+
if (pref?.provider) { const shown = providerMeta(displayProvider(pref)); const mark = el('span', 'asst-icon'); mark.setAttribute('aria-hidden', 'true'); mark.innerHTML = shown.icon; mark.style.color = shown.color; modelBtn.prepend(mark); }
|
|
405
443
|
modelCell.append(modelBtn);
|
|
406
444
|
const source = el('span', 'asst-routes-source');
|
|
407
445
|
let sourceText = pref ? tr('assistant.routes.source.yours', 'Your choice') : tr('assistant.routes.source.default', 'Assistant chooses');
|
|
@@ -414,14 +452,14 @@ export async function openRoutesEditor(hooks = {}) {
|
|
|
414
452
|
modelBtn.insertBefore(source, modelBtn.querySelector('.asst-dd-caret')); modelBtn.setAttribute('aria-describedby', source.id);
|
|
415
453
|
node.append(modelCell);
|
|
416
454
|
|
|
417
|
-
const efforts = pref ?
|
|
418
|
-
const hasEffort = efforts.some(e => e.
|
|
455
|
+
const efforts = pref ? routeEffortChoices(pref.provider, model) : [];
|
|
456
|
+
const hasEffort = efforts.some(e => !e.off);
|
|
419
457
|
const effortText = !pref ? tr('assistant.routes.brainDecides', 'Assistant chooses') : pref.effort ? effortName(pref.effort) : hasEffort ? defaultEffort(model) : tr('assistant.routes.effortNotSupported', 'Not supported');
|
|
420
458
|
const effortBtn = fieldButton('asst-routes-effort', task, tr('assistant.routes.columns.effort', 'Effort'), effortText, () => {
|
|
421
459
|
state.menuFocus = effortBtn.dataset.focusKey;
|
|
422
460
|
const menu = openMenuFor(effortBtn, tr('assistant.brain.effort', 'Thinking effort'), [
|
|
423
461
|
{ kind: 'radio', id: '', label: defaultEffort(model), desc: tr('assistant.routes.effortNote', 'Default effort uses the model default when the brain does not propose a level.'), selected: !pref.effort, onSelect: () => setChoice(task.id, { ...pref, effort: null }, effortBtn.dataset.focusKey) },
|
|
424
|
-
...efforts.
|
|
462
|
+
...efforts.map(e => ({ kind: 'radio', id: e.id, label: effortName(e.id), selected: e.id === pref.effort, onSelect: () => setChoice(task.id, { ...pref, effort: e.id }, effortBtn.dataset.focusKey) })),
|
|
425
463
|
]); return menu;
|
|
426
464
|
});
|
|
427
465
|
effortBtn.dataset.focusKey = `${task.id}-effort`; effortBtn.disabled = !pref || (!hasEffort && !pref.effort); if (!effortBtn.disabled) caret(effortBtn);
|
|
@@ -462,17 +500,46 @@ export async function openRoutesEditor(hooks = {}) {
|
|
|
462
500
|
const resetCell = el('div', 'asst-routes-reset-cell');
|
|
463
501
|
if (pref) { const reset = button('asst-iconbtn asst-routes-reset', tr('assistant.routes.reset', 'Reset {taskClass}', { taskClass: task.label }), () => setChoice(task.id, null, `${task.id}-model`)); reset.dataset.focusKey = `${task.id}-reset`; reset.title = reset.getAttribute('aria-label'); reset.innerHTML = ICON_RESET; resetCell.append(reset); }
|
|
464
502
|
node.append(resetCell);
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
if (
|
|
503
|
+
// A note, a warning or a context line takes the description's own line under the task name
|
|
504
|
+
// (one line, cut with an ellipsis, whole in its title), so every row keeps the same height.
|
|
505
|
+
if (account.warning) { const note = el('div', 'asst-routes-row-warning', account.warning); note.title = account.warning; note.id = `${nameId}-account-warning`; accountBtn.setAttribute('aria-describedby', note.id); description.hidden = true; main.append(note); }
|
|
506
|
+
if (capabilityNote) main.append(capabilityNote);
|
|
507
|
+
if (issue) { description.hidden = true; main.querySelector('.asst-routes-row-note')?.remove(); const note = el('div', 'asst-routes-row-warning', issueText(issue, task)); note.title = note.textContent; note.id = `${nameId}-issue`; modelBtn.setAttribute('aria-describedby', `${source.id} ${note.id}`); modelBtn.title = `${label} — ${note.textContent}`; main.append(note); }
|
|
468
508
|
if (task.id === 'chat' || task.id === 'vision') {
|
|
469
509
|
description.hidden = true;
|
|
470
510
|
const text = task.id === 'chat' ? tr('assistant.routes.chatInactive', 'Plain chat stays on the current brain. A stored Chat choice is not applied in any mode.') : tr('assistant.routes.visionFallback', 'Vision fallback, not a task class. Used when the chosen model cannot see image input.');
|
|
471
|
-
const context = el('div', 'asst-routes-row-context', text); context.title = text; context.id = `${nameId}-context`;
|
|
511
|
+
const context = el('div', 'asst-routes-row-context', text); context.title = text; context.id = `${nameId}-context`; main.append(context);
|
|
472
512
|
context.hidden = !!issue;
|
|
473
513
|
modelBtn.setAttribute('aria-describedby', `${modelBtn.getAttribute('aria-describedby')} ${context.id}`);
|
|
474
514
|
if (task.id === 'chat') { node.dataset.inactive = 'true'; const inactive = el('span', 'asst-routes-inactive', tr('assistant.routes.notApplied', 'Not applied')); inactive.title = text; name.append(inactive); }
|
|
475
515
|
}
|
|
516
|
+
const expanded = state.expandedTask === task.id;
|
|
517
|
+
const details = el('div', 'asst-routes-details'); details.id = `${nameId}-details`; details.hidden = !expanded;
|
|
518
|
+
// Move the existing controls, preserving their draft semantics and custom menus.
|
|
519
|
+
for (const child of [...node.children]) if (child !== main) details.append(child);
|
|
520
|
+
const summary = button('asst-routes-toggle', '', () => {
|
|
521
|
+
closeMenu(); state.expandedTask = expanded ? null : task.id; render(`${task.id}-toggle`);
|
|
522
|
+
});
|
|
523
|
+
summary.dataset.focusKey = `${task.id}-toggle`;
|
|
524
|
+
summary.setAttribute('aria-expanded', String(expanded)); summary.setAttribute('aria-controls', details.id);
|
|
525
|
+
const summaryName = el('span', 'asst-routes-summary-name', task.label);
|
|
526
|
+
const summaryValue = el('span', 'asst-routes-summary-value');
|
|
527
|
+
if (pref?.provider) {
|
|
528
|
+
const mark = el('span', 'asst-icon'); mark.setAttribute('aria-hidden', 'true');
|
|
529
|
+
const shown = providerMeta(displayProvider(pref)); mark.innerHTML = shown.icon; mark.style.color = shown.color; summaryValue.append(mark);
|
|
530
|
+
}
|
|
531
|
+
summaryValue.append(el('span', 'asst-routes-summary-model', label));
|
|
532
|
+
if (pref) summaryValue.append(el('span', 'asst-routes-summary-meta', [pref.effort ? effortName(pref.effort) : '', runValue].filter(Boolean).join(' · ')));
|
|
533
|
+
const status = el('span', 'asst-routes-summary-status', task.id === 'chat' ? tr('assistant.routes.notApplied', 'Not applied') : issue ? tr(`assistant.routes.issueLabel.${issue}`, 'Unverified') : pref ? tr('assistant.routes.source.yours', 'Your choice') : '');
|
|
534
|
+
const chevron = el('span', 'asst-routes-chevron'); chevron.innerHTML = ICON_CARET; chevron.setAttribute('aria-hidden', 'true');
|
|
535
|
+
summary.append(summaryName, summaryValue, status, chevron);
|
|
536
|
+
summary.title = [task.label, label, pref ? runLabel : '', issue ? issueText(issue, task) : ''].filter(Boolean).join(' · ');
|
|
537
|
+
summary.setAttribute('aria-label', [task.label, label, pref ? [pref.effort ? effortName(pref.effort) : '', runLabel].filter(Boolean).join(' · ') : '', status.textContent].filter(Boolean).join(' · '));
|
|
538
|
+
node.dataset.custom = String(!!pref); node.dataset.issue = String(!!issue);
|
|
539
|
+
// Warnings and Chat/vision exceptions stay visible even with the controls closed.
|
|
540
|
+
node.replaceChildren(summary, main, details);
|
|
541
|
+
main.querySelector('.asst-routes-row-label').hidden = true;
|
|
542
|
+
description.hidden = !expanded || description.hidden;
|
|
476
543
|
return node;
|
|
477
544
|
}
|
|
478
545
|
async function manageModels(focusKey = 'reload-models') {
|
|
@@ -482,33 +549,81 @@ export async function openRoutesEditor(hooks = {}) {
|
|
|
482
549
|
} catch { state.suspended = false; overlay.hidden = false; focus(focusKey); }
|
|
483
550
|
}
|
|
484
551
|
async function reloadModels() {
|
|
485
|
-
if (state.modelsLoading || state.offline) return;
|
|
552
|
+
if (state.modelsLoading || state.catalogRefreshing || state.offline) return;
|
|
486
553
|
state.modelsLoading = true; closeMenu(); render();
|
|
487
554
|
try { state.catalog = await loadRouteModels(); state.modelError = routeModelsStatus().partial; modelsWatch.seed(state.catalog); }
|
|
488
555
|
catch { state.modelError = true; }
|
|
489
556
|
if (!overlay.isConnected) return;
|
|
490
557
|
state.modelsLoading = false; state.notice = state.modelError ? '' : tr('assistant.routes.editorState.modelsUpdated', 'Model list updated. Your unsaved changes are kept.'); render();
|
|
491
558
|
}
|
|
559
|
+
function adoptRouting(data, pending) {
|
|
560
|
+
state.data = data; state.version = data.version ?? null; state.initialMode = normalizeRouteMode(data.routing?.defaultMode, DEFAULT_ROUTE_MODE);
|
|
561
|
+
state.mode = pending.defaultMode || state.initialMode; state.prefs = { ...(data.routing?.preferences || {}) }; state.patch = pending.preferences || {}; state.conflict = false;
|
|
562
|
+
}
|
|
563
|
+
// Rows are drawn from the page's last catalog; a new build replaces them only when it draws differently.
|
|
564
|
+
let catalogRefresh = 0;
|
|
565
|
+
async function refreshCatalog() {
|
|
566
|
+
const mine = ++catalogRefresh;
|
|
567
|
+
state.catalogRefreshing = true;
|
|
568
|
+
let next = null, failed = false;
|
|
569
|
+
try { next = await loadRouteModels(); } catch { failed = true; }
|
|
570
|
+
if (!overlay.isConnected || mine !== catalogRefresh) return;
|
|
571
|
+
state.catalogRefreshing = false;
|
|
572
|
+
const partial = failed || routeModelsStatus().partial;
|
|
573
|
+
// A build without the server's catalog (the window's lists standing in) never replaces a complete one
|
|
574
|
+
// the rows already show: they stay, marked unverified, and Reload models is offered again.
|
|
575
|
+
if (next && partial && state.catalog && !state.modelError) next = null;
|
|
576
|
+
const changed = next && catalogSignature(next) !== catalogSignature(state.catalog);
|
|
577
|
+
const checksChanged = state.modelsLoading || partial !== state.modelError;
|
|
578
|
+
if (next) { state.catalog = next; modelsWatch.seed(next); state.modelError = partial; } else state.modelError = true;
|
|
579
|
+
state.modelsLoading = false;
|
|
580
|
+
// The same lists: only the Reload action changes back. Otherwise the rows are drawn again where
|
|
581
|
+
// the user is (focus kept); an open menu is not taken away: the rows follow once it closes.
|
|
582
|
+
if (changed || checksChanged || !next) { if (!currentMenu()) render(document.activeElement?.dataset?.focusKey); else state.pendingRender = true; }
|
|
583
|
+
else { const reload = body.querySelector('.asst-routes-reload-models'); if (reload) { reload.textContent = tr('assistant.routes.reloadModels', 'Reload models'); reload.setAttribute('aria-label', reload.textContent); reload.disabled = state.saving || state.offline; reload.dataset.state = 'idle'; } body.querySelector('.asst-routes-list')?.setAttribute('aria-busy', 'false'); }
|
|
584
|
+
}
|
|
492
585
|
async function load(preserve = false) {
|
|
493
586
|
const pending = preserve ? changes() : {};
|
|
494
|
-
state.loading = true; state.error = '';
|
|
587
|
+
state.loading = true; state.error = '';
|
|
588
|
+
// First paint from what the page already has: the routing answer kept from the last open
|
|
589
|
+
// (or the panel's warm-up) and the last catalog loaded. Both are read again right after.
|
|
590
|
+
const kept = !preserve && cachedRouting();
|
|
591
|
+
const catalog = cachedRouteModels();
|
|
592
|
+
state.catalog = catalog; state.modelsLoading = !catalog; state.modelError = catalog ? routeModelsStatus().partial : false; modelsWatch.seed(catalog);
|
|
593
|
+
if (kept) { adoptRouting(kept, pending); state.loading = false; }
|
|
594
|
+
const catalogDone = refreshCatalog(); // starts now; the paint below already says "Updating models…"
|
|
595
|
+
render();
|
|
596
|
+
// Accounts: the cached lists draw the Account column now; the fresh ones redraw it if they differ.
|
|
597
|
+
const accountsBefore = JSON.stringify([getCachedClaudeAccounts(), getCachedCodexAccounts()]);
|
|
598
|
+
const accountsDone = Promise.allSettled([fetchClaudeAccounts(true), fetchCodexAccounts(true)]).then(() => {
|
|
599
|
+
if (overlay.isConnected && state.data && JSON.stringify([getCachedClaudeAccounts(), getCachedCodexAccounts()]) !== accountsBefore && !currentMenu()) render(document.activeElement?.dataset?.focusKey);
|
|
600
|
+
});
|
|
495
601
|
try {
|
|
496
|
-
const
|
|
602
|
+
const data = await loadRouting();
|
|
497
603
|
if (!overlay.isConnected) return;
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
604
|
+
const moved = state.data && (data.version ?? null) !== state.version;
|
|
605
|
+
// A later version while the user already edits: say so, as a Reload does; otherwise adopt it quietly.
|
|
606
|
+
if (!state.data || moved || preserve) {
|
|
607
|
+
adoptRouting(data, state.data ? changes() : pending);
|
|
608
|
+
if (preserve || (moved && dirty())) state.notice = tr('assistant.routes.editorState.settingsReloaded', 'Latest settings loaded. Your edits are kept; review them before saving.');
|
|
609
|
+
}
|
|
502
610
|
} catch (err) {
|
|
611
|
+
if (!overlay.isConnected) return;
|
|
503
612
|
state.error = err.status === 403 ? tr('assistant.routes.editorState.permission', 'You do not have permission to edit routing settings.') : err.status === 404 ? tr('assistant.routes.unavailable', 'Model routing is not available on this server yet.') : tr('assistant.routes.loadFailed', 'Could not load model routes');
|
|
504
613
|
}
|
|
505
|
-
state.loading = false;
|
|
614
|
+
state.loading = false;
|
|
615
|
+
if (!kept || state.notice || state.error) render(document.activeElement?.dataset?.focusKey); else updateFoot();
|
|
616
|
+
if (!preserve && !kept) focus();
|
|
617
|
+
// The open is done at the first complete paint; the catalog and the accounts finish on their own.
|
|
618
|
+
catalogDone.catch(() => {}); accountsDone.catch(() => {});
|
|
506
619
|
}
|
|
507
620
|
async function save() {
|
|
508
621
|
if (saveBtn.disabled) return;
|
|
509
622
|
const patch = changes(); state.saving = true; state.error = ''; updateFoot(); closeMenu();
|
|
510
623
|
try {
|
|
511
624
|
const res = await putRouting(patch, state.version);
|
|
625
|
+
// The next open paints from what was just saved.
|
|
626
|
+
rememberRouting({ ...state.data, ...res, routing: res?.routing || state.data?.routing });
|
|
512
627
|
try { hooks.onSaved?.(res?.routing || null, res); } catch { /* host callback */ }
|
|
513
628
|
finishClose();
|
|
514
629
|
} catch (err) {
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
|
|
24
24
|
import * as mascotLib from '../synabun-mascot.js';
|
|
25
25
|
import { isTerminalRunStatus } from './asst-state.js';
|
|
26
|
-
import { SCENE_SPECS, compactActivity, finalFrame, isLivePhase, phaseLine, sceneFor, sceneSvg, stageLabel, stagePhase, stepLine } from './asst-scenes.js';
|
|
26
|
+
import { ACTIVITY_SCENE_SPECS, SCENE_SPECS, compactActivity, finalFrame, isLivePhase, phaseLine, sceneFor, sceneSvg, stageLabel, stagePhase, stepLine } from './asst-scenes.js';
|
|
27
27
|
|
|
28
28
|
export const STAGE_TIMING = Object.freeze({
|
|
29
29
|
settleHoldMs: 1400, // the final frame shows this long before the stage folds
|
|
@@ -77,7 +77,7 @@ export function createWorkerStage(card, { t = (_key, fallback) => fallback, calm
|
|
|
77
77
|
|
|
78
78
|
function ensureRig() {
|
|
79
79
|
if (rig || destroyed) return;
|
|
80
|
-
rig = safe(() => mascot.createMascot(face, { width:
|
|
80
|
+
rig = safe(() => mascot.createMascot(face, { width: 112, height: 56, rangeX: 10, rangeY: 7, pose: 'idle' })) || null;
|
|
81
81
|
pose = '';
|
|
82
82
|
}
|
|
83
83
|
|
|
@@ -120,7 +120,7 @@ export function createWorkerStage(card, { t = (_key, fallback) => fallback, calm
|
|
|
120
120
|
stage.toggleAttribute('data-live', live);
|
|
121
121
|
if (final) stage.dataset.final = final; else delete stage.dataset.final;
|
|
122
122
|
sceneHost.firstElementChild?.toggleAttribute('data-live', live);
|
|
123
|
-
if (rig && !final) setPose(phase === 'waiting' ? 'blocked' : (SCENE_SPECS[scene] || SCENE_SPECS.generic).pose);
|
|
123
|
+
if (rig && !final) setPose(phase === 'waiting' ? 'blocked' : (SCENE_SPECS[scene] || ACTIVITY_SCENE_SPECS[scene] || SCENE_SPECS.generic).pose);
|
|
124
124
|
const text = final ? phaseLine(phase, run, scene, t)
|
|
125
125
|
: phase === 'working' ? (stepLine(activity, t, at) || phaseLine(phase, run, scene, t))
|
|
126
126
|
: phaseLine(phase, run, scene, t);
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
// the mascot, the scene and the step in one faint panel of a
|
|
10
10
|
// fixed height, the rack's gold sweep on its bottom edge; it folds like the
|
|
11
11
|
// rack's stage (grid rows 0fr ↔ 1fr, 240 ms) once the worker settles;
|
|
12
|
-
// - the scenes (asst-scenes.js):
|
|
12
|
+
// - the scenes (asst-scenes.js): approved GIFs with PNG resting frames, running
|
|
13
13
|
// while the scene carries data-live, never while it waits on you (calm,
|
|
14
14
|
// dimmed, no gold) or after it settled;
|
|
15
15
|
// - the agents tray's mini scenes and lanes (asst-agents-dock.js).
|
|
@@ -22,45 +22,8 @@
|
|
|
22
22
|
// standing layer hints: a moving layer is promoted (will-change) only while
|
|
23
23
|
// its scene is live and on screen.
|
|
24
24
|
//
|
|
25
|
-
// A scene's moving parts are HTML layers (asst-scenes.js), so every motion is
|
|
26
|
-
// a box's transform or opacity, run by the compositor. Lengths are written in
|
|
27
|
-
// the scene's own units (the SVG's px) and turned into percentages of the box
|
|
28
|
-
// here (sc() below): a scene is drawn at several sizes, and a percentage of
|
|
29
|
-
// the box is the same distance in units at every one of them.
|
|
30
|
-
|
|
31
|
-
import { CODE_LINES, CODE_STEP, CODE_WINDOW, FILM_MINI_WINDOW, FILM_WINDOW, SCENE_BOX, boxPct, codeCaretX } from './asst-scenes.js';
|
|
32
|
-
|
|
33
25
|
export const SCENE_STYLE_ID = 'asst-scene-styles';
|
|
34
26
|
|
|
35
|
-
const FULL = SCENE_BOX.full;
|
|
36
|
-
const MINI = SCENE_BOX.mini;
|
|
37
|
-
const win = ([, , w, h]) => ({ w, h });
|
|
38
|
-
|
|
39
|
-
/** A move of (x, y) scene units in a box: `translate(…%, …%)`, plus any scale or rotation after it. */
|
|
40
|
-
function sc(box, x, y, more = '') {
|
|
41
|
-
return `transform: translate(${boxPct(x, box.w)}, ${boxPct(y, box.h)})${more ? ` ${more}` : ''};`;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
/** The code scene's stepped scroll (one line per step, inside its window) and its caret, which lands on each new bottom line's end. */
|
|
45
|
-
function codeFrames() {
|
|
46
|
-
const n = CODE_LINES.length;
|
|
47
|
-
const at = (s) => Math.round((s * 100000) / n) / 1000;
|
|
48
|
-
const hold = (s) => Math.round(((s * 100) / n + (100 / n) * 0.72) * 1000) / 1000;
|
|
49
|
-
const view = win(CODE_WINDOW);
|
|
50
|
-
let scroll = '';
|
|
51
|
-
let caret = '';
|
|
52
|
-
for (let s = 0; s < n; s += 1) {
|
|
53
|
-
scroll += ` ${at(s)}%, ${hold(s)}% { ${sc(view, 0, -CODE_STEP * s)} }`;
|
|
54
|
-
caret += ` ${at(s)}%, ${hold(s)}% { ${sc(FULL, codeCaretX(s), 0)} }`;
|
|
55
|
-
}
|
|
56
|
-
scroll += ` 100% { ${sc(view, 0, -CODE_STEP * n)} }`;
|
|
57
|
-
caret += ` 100% { ${sc(FULL, codeCaretX(n), 0)} }`;
|
|
58
|
-
return `@keyframes asst-sc-code {${scroll} }\n @keyframes asst-sc-code-caret {${caret} }`;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
/** The pointer scenes: rest on the button, travel to the page, back (units of their own box). */
|
|
62
|
-
const pointFrames = (name, box, [x0, y0], [x1, y1], more = '', [a, b, c, d] = [22, 46, 72, 96]) => `@keyframes ${name} { 0%, ${a}% { ${sc(box, x0, y0, more)} } ${b}%, ${c}% { ${sc(box, x1, y1, more)} } ${d}%, 100% { ${sc(box, x0, y0, more)} } }`;
|
|
63
|
-
|
|
64
27
|
export const SCENE_CSS = `
|
|
65
28
|
/* ── The stage in a run card ──────────────────────────────────────── */
|
|
66
29
|
.asst-run-stage-wrap {
|
|
@@ -101,7 +64,7 @@ export const SCENE_CSS = `
|
|
|
101
64
|
transition: margin-top var(--asst-dur-moderate, 240ms) var(--asst-ease-standard, cubic-bezier(.2,0,.38,.9)), padding var(--asst-dur-moderate, 240ms) var(--asst-ease-standard, cubic-bezier(.2,0,.38,.9)), visibility 0s;
|
|
102
65
|
}
|
|
103
66
|
.asst-run-stage-face { grid-area: face; width: 56px; height: 28px; color: var(--asst-text, rgba(255,255,255,.9)); line-height: 0; }
|
|
104
|
-
.asst-run-stage-face svg { display: block; width:
|
|
67
|
+
.asst-run-stage-face svg { display: block; width: 112px; height: 56px; }
|
|
105
68
|
.asst-run-stage-scene { grid-area: scene; min-width: 0; height: 40px; overflow: hidden; color: var(--asst-text-2, rgba(255,255,255,.64)); line-height: 0; }
|
|
106
69
|
.asst-run-stage-scene .asst-scene { width: 120px; height: 40px; }
|
|
107
70
|
.asst-run-stage-line { grid-area: line; display: flex; align-items: baseline; gap: 8px; min-width: 0; font-size: 11.5px; line-height: 16px; }
|
|
@@ -131,55 +94,10 @@ export const SCENE_CSS = `
|
|
|
131
94
|
.asst-run.is-revealed { background: var(--asst-fill-1, rgba(255,255,255,.04)); box-shadow: 0 0 0 1px var(--asst-line-2, rgba(255,255,255,.12)); }
|
|
132
95
|
|
|
133
96
|
/* ── Scenes ─────────────────────────────────────────────────────────── */
|
|
134
|
-
|
|
135
|
-
The box takes its holder's size (120×40 and 40×20 by default); its still SVG and every layer cover
|
|
136
|
-
it, in the same viewBox; strokes are 1.5 units unless the holder says otherwise (they inherit). */
|
|
137
|
-
.asst-scene { position: relative; display: block; overflow: visible; stroke-width: 1.5; }
|
|
97
|
+
.asst-scene { position: relative; display: block; aspect-ratio: 3 / 1; }
|
|
138
98
|
:where(.asst-scene) { width: 120px; height: 40px; }
|
|
139
|
-
:where(.asst-scene.is-mini) { width: 40px; height:
|
|
140
|
-
.asst-scene
|
|
141
|
-
.asst-scene .sc-layer { position: absolute; inset: 0; display: block; transform-origin: 0 0; pointer-events: none; }
|
|
142
|
-
.asst-scene .sc-clip { position: absolute; display: block; overflow: hidden; pointer-events: none; }
|
|
143
|
-
.asst-scene .sc-dim { stroke-opacity: .5; }
|
|
144
|
-
.asst-scene .sc-mid { stroke-opacity: .72; }
|
|
145
|
-
.asst-scene .sc-gold { stroke: var(--sc-gold, var(--asst-brand, rgba(255,215,0,.85))); }
|
|
146
|
-
.asst-scene .sc-fill { fill: currentColor; stroke: none; }
|
|
147
|
-
.asst-scene .sc-fill.sc-dim { fill-opacity: .34; }
|
|
148
|
-
.asst-scene .sc-fill.sc-mid { fill-opacity: .55; }
|
|
149
|
-
.asst-scene .sc-fill.sc-gold { fill: var(--sc-gold, var(--asst-brand, rgba(255,215,0,.85))); }
|
|
150
|
-
.asst-scene .sc-shade { fill: var(--sc-shade, #131316); }
|
|
151
|
-
.asst-scene .sc-ring { opacity: 0; }
|
|
152
|
-
/* A layer that only turns or travels gets its compositor layer up front, and only while its scene is
|
|
153
|
-
live and on screen and motion is allowed (no standing hints). Layers that scale are left to the
|
|
154
|
-
browser, which rasterises them at the largest scale they reach (a hint would fix it at rest). */
|
|
155
|
-
@media (prefers-reduced-motion: no-preference) {
|
|
156
|
-
.asst-scene[data-live]:not([data-offscreen] *) :is(.sc-gear-big, .sc-gear-small, .sc-hand, .sc-wrench, .sc-code-scroll, .sc-code-caret, .sc-lens, .sc-lens-mini, .sc-point-browser, .sc-point-computer, .sc-point-mini, .sc-run-dot, .sc-pen, .sc-film, .sc-film-mini, .sc-slide) { will-change: transform; }
|
|
157
|
-
}
|
|
158
|
-
.asst-scene[data-live] .sc-code-scroll { animation: asst-sc-code 6.6s cubic-bezier(.45, 0, .55, 1) infinite; }
|
|
159
|
-
.asst-scene[data-live] .sc-code-caret { animation: asst-sc-code-caret 6.6s cubic-bezier(.45, 0, .55, 1) infinite; }
|
|
160
|
-
.asst-scene[data-live] .sc-caret { animation: asst-rk-caret 1.06s steps(1) infinite; }
|
|
161
|
-
.asst-scene[data-live] .sc-gear-big { animation: asst-sc-spin 8s linear infinite; }
|
|
162
|
-
.asst-scene[data-live] .sc-gear-small { animation: asst-sc-spin 6s linear infinite reverse; }
|
|
163
|
-
.asst-scene[data-live] .sc-tick { animation: asst-sc-tick 3.2s cubic-bezier(.2, 0, .38, .9) calc(var(--i, 0) * .45s) infinite both; }
|
|
164
|
-
.asst-scene[data-live] .sc-lens { animation: asst-sc-lens 4s cubic-bezier(.45, 0, .55, 1) infinite; }
|
|
165
|
-
.asst-scene[data-live] .sc-lens-mini { animation: asst-sc-lens-mini 2.6s cubic-bezier(.45, 0, .55, 1) infinite; }
|
|
166
|
-
.asst-scene[data-live] .sc-point-browser { animation: asst-sc-point-browser 3.6s cubic-bezier(.45, 0, .55, 1) infinite; }
|
|
167
|
-
.asst-scene[data-live] .sc-point-computer { animation: asst-sc-point-computer 3.6s cubic-bezier(.45, 0, .55, 1) infinite; }
|
|
168
|
-
.asst-scene[data-live] .sc-point-mini { animation: asst-sc-point-mini 3.2s cubic-bezier(.45, 0, .55, 1) infinite; }
|
|
169
|
-
.asst-scene[data-live] :is(.sc-ripple-browser, .sc-ripple-computer) { animation: asst-sc-ripple 3.6s cubic-bezier(0, 0, .38, .9) infinite; }
|
|
170
|
-
.asst-scene[data-live] .sc-hand { animation: asst-sc-spin 4s linear infinite; }
|
|
171
|
-
.asst-scene[data-live] .sc-run-dot { animation: asst-sc-run 3s cubic-bezier(.45, 0, .55, 1) infinite; }
|
|
172
|
-
.asst-scene[data-live] .sc-shape { animation: asst-sc-shape 3.6s cubic-bezier(.2, 0, .38, .9) calc(var(--i, 0) * .5s) infinite both; }
|
|
173
|
-
.asst-scene[data-live] .sc-pen { animation: asst-sc-pen 3.6s cubic-bezier(.45, 0, .55, 1) infinite; }
|
|
174
|
-
.asst-scene[data-live] .sc-tile { animation: asst-sc-develop 3.6s ease-in-out calc(var(--i, 0) * .22s) infinite both; }
|
|
175
|
-
.asst-scene[data-live] .sc-sparkle { animation: asst-sc-twinkle 2.2s ease-in-out infinite; }
|
|
176
|
-
.asst-scene[data-live] .sc-zap { animation: asst-sc-zap 1.1s ease-in-out infinite; }
|
|
177
|
-
.asst-scene[data-live] .sc-film { animation: asst-sc-film 1.4s linear infinite; }
|
|
178
|
-
.asst-scene[data-live] .sc-film-mini { animation: asst-sc-film-mini 1.2s linear infinite; }
|
|
179
|
-
.asst-scene[data-live] .sc-wrench { animation: asst-sc-wrench 1.1s cubic-bezier(.45, 0, .55, 1) infinite; }
|
|
180
|
-
.asst-scene[data-live] .sc-spark { animation: asst-sc-spark 1.1s ease-out calc(var(--i, 0) * .08s) infinite both; }
|
|
181
|
-
.asst-scene[data-live] .sc-slide { animation: asst-sc-slide 2.4s cubic-bezier(.45, 0, .55, 1) infinite; }
|
|
182
|
-
.asst-scene[data-live] .sc-dot { animation: asst-sc-dot 1.2s ease-in-out calc(var(--i, 0) * .2s) infinite both; }
|
|
99
|
+
:where(.asst-scene.is-mini) { width: 40px; height: calc(40px / 3); }
|
|
100
|
+
.asst-scene-art { display: block; width: 100%; height: 100%; object-fit: contain; }
|
|
183
101
|
|
|
184
102
|
/* ── The agents tray: mini scenes (collapsed) and lanes (open) ──────── */
|
|
185
103
|
/* The minis keep their size: the summary beside them ellipsizes first (narrow panels: their own row, below). */
|
|
@@ -203,7 +121,7 @@ export const SCENE_CSS = `
|
|
|
203
121
|
transition: background-color var(--asst-dur-fast, 140ms) var(--asst-ease-standard, cubic-bezier(.2,0,.38,.9)), box-shadow var(--asst-dur-fast, 140ms) var(--asst-ease-standard, cubic-bezier(.2,0,.38,.9));
|
|
204
122
|
}
|
|
205
123
|
.asst-dock-mini { width: 38px; }
|
|
206
|
-
.asst-dock-mini .asst-scene { width: 32px; height:
|
|
124
|
+
.asst-dock-mini .asst-scene { width: 32px; height: calc(32px / 3); }
|
|
207
125
|
.asst-dock-more { min-width: var(--asst-pill-h-sm, 22px); padding: 0 6px; font-family: var(--asst-mono, 'JetBrains Mono', monospace); font-size: 10.5px; font-weight: 500; font-variant-numeric: tabular-nums; }
|
|
208
126
|
:is(.asst-dock-mini, .asst-dock-more):hover { background: var(--asst-fill-2, rgba(255,255,255,.065)); color: var(--asst-text-2, rgba(255,255,255,.64)); }
|
|
209
127
|
.asst-dock-mini:is([data-phase="working"], [data-phase="queued"], [data-phase="starting"]) { box-shadow: inset 0 0 0 1px var(--asst-pill-on-ring, rgba(255,215,0,.36)); }
|
|
@@ -231,7 +149,7 @@ export const SCENE_CSS = `
|
|
|
231
149
|
cursor: pointer;
|
|
232
150
|
}
|
|
233
151
|
.asst-run-lane:hover { background: var(--asst-fill-1, rgba(255,255,255,.04)); }
|
|
234
|
-
.asst-run-lane .asst-scene { flex: none; width: 32px; height:
|
|
152
|
+
.asst-run-lane .asst-scene { flex: none; width: 32px; height: calc(32px / 3); color: var(--asst-text-3, rgba(255,255,255,.52)); }
|
|
235
153
|
.asst-run-lane[data-phase="waiting"] .asst-scene { --sc-gold: currentColor; opacity: .55; }
|
|
236
154
|
.asst-run-lane-step { flex: 1 1 auto; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
|
|
237
155
|
.asst-run-lane[data-phase="waiting"] .asst-run-lane-step { color: var(--asst-warn, #ffb74d); }
|
|
@@ -239,7 +157,7 @@ export const SCENE_CSS = `
|
|
|
239
157
|
/* ── Wider containers: a larger face and scene (the stage's height is still fixed for the width) ── */
|
|
240
158
|
@container asst (min-width: 361px) {
|
|
241
159
|
.asst-run-stage { grid-template-rows: 50px 16px; column-gap: 12px; }
|
|
242
|
-
.asst-run-stage-face, .asst-run-stage-face svg { width:
|
|
160
|
+
.asst-run-stage-face, .asst-run-stage-face svg { width: 112px; height: 56px; }
|
|
243
161
|
.asst-run-stage-scene { height: 50px; }
|
|
244
162
|
.asst-run-stage-scene .asst-scene { width: 150px; height: 50px; }
|
|
245
163
|
}
|
|
@@ -258,27 +176,6 @@ export const SCENE_CSS = `
|
|
|
258
176
|
}
|
|
259
177
|
|
|
260
178
|
/* ── Motion ─────────────────────────────────────────────────────────── */
|
|
261
|
-
${codeFrames()}
|
|
262
|
-
@keyframes asst-sc-spin { to { transform: rotate(360deg); } }
|
|
263
|
-
@keyframes asst-sc-tick { 0%, 8% { opacity: 0; transform: scale(.4); } 16%, 80% { opacity: 1; transform: scale(1); } 92%, 100% { opacity: 0; transform: scale(1); } }
|
|
264
|
-
@keyframes asst-sc-lens { 0%, 100% { ${sc(FULL, 0, 0)} } 25% { ${sc(FULL, 14, 4)} } 50% { ${sc(FULL, 48, 0)} } 75% { ${sc(FULL, 34, 5)} } }
|
|
265
|
-
@keyframes asst-sc-lens-mini { 0%, 100% { ${sc(MINI, 0, 0)} } 50% { ${sc(MINI, 12, 2)} } }
|
|
266
|
-
${pointFrames('asst-sc-point-browser', FULL, [92, 29], [26, 16])}
|
|
267
|
-
${pointFrames('asst-sc-point-computer', FULL, [90, 22.5], [32, 9])}
|
|
268
|
-
${pointFrames('asst-sc-point-mini', MINI, [29, 13], [12, 8], 'scale(.6)', [24, 48, 74, 98])}
|
|
269
|
-
@keyframes asst-sc-ripple { 0% { opacity: .9; transform: scale(.3); } 16% { opacity: 0; transform: scale(1.5); } 100% { opacity: 0; transform: scale(1.5); } }
|
|
270
|
-
@keyframes asst-sc-run { 0% { opacity: 0; ${sc(FULL, 0, 0)} } 8%, 12% { opacity: 1; ${sc(FULL, 0, 0)} } 45%, 55% { ${sc(FULL, 23, 0)} } 88% { opacity: 1; ${sc(FULL, 46, 0)} } 100% { opacity: 0; ${sc(FULL, 46, 0)} } }
|
|
271
|
-
@keyframes asst-sc-shape { 0%, 6% { opacity: 0; transform: scale(.4); } 16%, 84% { opacity: 1; transform: scale(1); } 94%, 100% { opacity: 0; transform: scale(.9); } }
|
|
272
|
-
@keyframes asst-sc-pen { 0%, 8% { ${sc(FULL, 47, 13)} } 18%, 24% { ${sc(FULL, 73, 13)} } 32%, 84% { ${sc(FULL, 100, 20)} } 100% { ${sc(FULL, 47, 13)} } }
|
|
273
|
-
@keyframes asst-sc-develop { 0% { opacity: .08; } 30%, 82% { opacity: 1; } 100% { opacity: .08; } }
|
|
274
|
-
@keyframes asst-sc-twinkle { 0%, 100% { opacity: .35; transform: scale(.7) rotate(0deg); } 50% { opacity: 1; transform: scale(1.1) rotate(45deg); } }
|
|
275
|
-
@keyframes asst-sc-zap { 0%, 100% { opacity: .45; transform: scale(.92); } 40% { opacity: 1; transform: scale(1.06); } }
|
|
276
|
-
@keyframes asst-sc-film { to { ${sc(win(FILM_WINDOW), -24, 0)} } }
|
|
277
|
-
@keyframes asst-sc-film-mini { to { ${sc(win(FILM_MINI_WINDOW), -12, 0)} } }
|
|
278
|
-
@keyframes asst-sc-wrench { 0%, 100% { transform: rotate(-14deg); } 50% { transform: rotate(16deg); } }
|
|
279
|
-
@keyframes asst-sc-spark { 0%, 38% { opacity: 0; } 50% { opacity: 1; } 72%, 100% { opacity: 0; } }
|
|
280
|
-
@keyframes asst-sc-slide { 0%, 100% { ${sc(FULL, 0, 0)} } 50% { ${sc(FULL, 68, 0)} } }
|
|
281
|
-
@keyframes asst-sc-dot { 0%, 100% { opacity: .3; } 40% { opacity: 1; } }
|
|
282
179
|
body.ui-interacting .asst-scene *,
|
|
283
180
|
body.ui-interacting .asst-run-stage-sweep::after { animation-play-state: paused !important; }
|
|
284
181
|
@media (prefers-reduced-motion: reduce) {
|