mixdog 1.3.2 → 1.3.4
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/package.json +8 -8
- package/scripts/verify-runtime-dependency-versions.mjs +158 -0
- package/src/agents/reviewer/AGENT.md +5 -7
- package/src/agents/reviewer/agent.json +1 -1
- package/src/defaults/shipped-history.json +4 -0
- package/src/defaults/skills/browser-use/SKILL.md +6 -3
- package/src/defaults/skills/local-provider/SKILL.md +33 -6
- package/src/rules/lead/LEAD.md +5 -8
- package/src/rules/shared/45-destructive.md +5 -1
- package/src/rules/shared/60-verification.md +6 -4
- package/src/runtime/agent/orchestrator/providers/anthropic-api-request.mjs +4 -1
- package/src/runtime/agent/orchestrator/providers/anthropic-max-tokens.mjs +38 -11
- package/src/runtime/agent/orchestrator/providers/anthropic-messages.mjs +15 -3
- package/src/runtime/agent/orchestrator/providers/anthropic-oauth-client-version.mjs +1 -1
- package/src/runtime/agent/orchestrator/providers/anthropic-oauth.mjs +17 -4
- package/src/runtime/agent/orchestrator/providers/anthropic.mjs +14 -1
- package/src/runtime/agent/orchestrator/providers/cursor-client-version.mjs +1 -1
- package/src/runtime/agent/orchestrator/providers/custom-provider-config.mjs +14 -1
- package/src/runtime/agent/orchestrator/providers/grok-client-version.mjs +1 -1
- package/src/runtime/agent/orchestrator/providers/registry.mjs +10 -0
- package/src/runtime/agent/orchestrator/providers/wire-gateway.mjs +13 -1
- package/src/runtime/agent/orchestrator/runtime-core/goal-runtime.mjs +5 -0
- package/src/runtime/agent/orchestrator/runtime-core/goal-turns.mjs +10 -1
- package/src/runtime/agent/orchestrator/runtime-core/tool-catalog.mjs +40 -5
- package/src/runtime/agent/orchestrator/runtime-core/tool-defs.mjs +32 -11
- package/src/runtime/agent/orchestrator/runtime-core/workflow.mjs +6 -3
- package/src/runtime/agent/orchestrator/session/agent-loop.mjs +1 -1
- package/src/runtime/agent/orchestrator/session/agent-room.d.mts +13 -0
- package/src/runtime/agent/orchestrator/session/agent-room.mjs +68 -12
- package/src/runtime/agent/orchestrator/session/compact/continuation.mjs +15 -6
- package/src/runtime/agent/orchestrator/session/compact/execution-tail.mjs +31 -8
- package/src/runtime/agent/orchestrator/session/compact/messages.mjs +44 -0
- package/src/runtime/agent/orchestrator/session/compact/runner.mjs +117 -19
- package/src/runtime/agent/orchestrator/session/compact/text-utils.mjs +1 -1
- package/src/runtime/agent/orchestrator/session/compact/user-message-kind.mjs +3 -0
- package/src/runtime/agent/orchestrator/session/human-gate/delegation.mjs +147 -137
- package/src/runtime/agent/orchestrator/session/human-gate/gate.mjs +37 -74
- package/src/runtime/agent/orchestrator/session/human-gate/requests.mjs +0 -2
- package/src/runtime/agent/orchestrator/session/human-gate/run-policy.mjs +2 -2
- package/src/runtime/agent/orchestrator/session/loop/fresh-context.mjs +13 -7
- package/src/runtime/agent/orchestrator/session/loop/loop-state.mjs +5 -0
- package/src/runtime/agent/orchestrator/session/loop/no-tool-turn/continuation.mjs +2 -0
- package/src/runtime/agent/orchestrator/session/loop/no-tool-turn/empty-nudge.mjs +1 -1
- package/src/runtime/agent/orchestrator/session/loop/no-tool-turn/output-limit.mjs +62 -13
- package/src/runtime/agent/orchestrator/session/loop/no-tool-turn.mjs +22 -6
- package/src/runtime/agent/orchestrator/session/loop/send-phase.mjs +7 -0
- package/src/runtime/agent/orchestrator/session/loop/tool-exec/before-hook.mjs +12 -20
- package/src/runtime/agent/orchestrator/session/loop/tool-exec/call-prep.mjs +5 -0
- package/src/runtime/agent/orchestrator/session/loop/tool-exec/dispatch.mjs +11 -5
- package/src/runtime/agent/orchestrator/session/manager/agent-listing-notice.mjs +102 -0
- package/src/runtime/agent/orchestrator/session/manager/ask-queue.mjs +2 -0
- package/src/runtime/agent/orchestrator/session/manager/ask-session.mjs +13 -1
- package/src/runtime/agent/orchestrator/session/manager/ask-turn-execute.mjs +24 -15
- package/src/runtime/agent/orchestrator/session/manager/ask-turn-prepare.mjs +8 -0
- package/src/runtime/agent/orchestrator/session/manager/ask-turn-steering-drain.mjs +1 -0
- package/src/runtime/agent/orchestrator/session/manager/idle-cleanup.mjs +32 -1
- package/src/runtime/agent/orchestrator/session/manager/orchestration-mode-switch-notice.mjs +17 -1
- package/src/runtime/agent/orchestrator/session/manager/pending-message-entry.mjs +6 -0
- package/src/runtime/agent/orchestrator/session/manager/prompt-utils.mjs +36 -0
- package/src/runtime/agent/orchestrator/session/manager/session-crud.mjs +28 -9
- package/src/runtime/agent/orchestrator/session/manager/session-prompt-composition.mjs +1 -1
- package/src/runtime/agent/orchestrator/session/manager/session-record.mjs +7 -5
- package/src/runtime/agent/orchestrator/session/manager/session-tool-surface.mjs +7 -3
- package/src/runtime/agent/orchestrator/session/pre-send-compact.mjs +10 -1
- package/src/runtime/agent/orchestrator/session/routine-result.mjs +7 -4
- package/src/runtime/agent/orchestrator/session/runtime-user-context.mjs +3 -1
- package/src/runtime/agent/orchestrator/session/send-with-recovery.mjs +11 -2
- package/src/runtime/agent/orchestrator/session/store/sweep/stale-sweep.mjs +5 -4
- package/src/runtime/agent/orchestrator/session/store/sweep/sub-agent-retention.mjs +140 -0
- package/src/runtime/agent/orchestrator/session/store/sweep/sweep-plan.mjs +5 -0
- package/src/runtime/agent/orchestrator/session/store/sweep/sweep-record.mjs +7 -2
- package/src/runtime/agent/orchestrator/session/store/sweep/sweep-row.mjs +13 -0
- package/src/runtime/agent/orchestrator/session/store-summary-catalog.mjs +76 -0
- package/src/runtime/agent/orchestrator/session/store-summary-reader.mjs +33 -1
- package/src/runtime/agent/orchestrator/session/store-summary-visibility.d.mts +5 -0
- package/src/runtime/agent/orchestrator/session/store-summary-visibility.mjs +37 -0
- package/src/runtime/agent/orchestrator/session/store.mjs +1 -0
- package/src/runtime/agent/orchestrator/tools/builtin/advisory-lock.mjs +18 -7
- package/src/runtime/agent/orchestrator/tools/builtin/bash-tool/backgrounded-result.mjs +2 -0
- package/src/runtime/agent/orchestrator/tools/builtin/git-command-tool.mjs +127 -20
- package/src/runtime/agent/orchestrator/tools/builtin/git-worktree-tool.mjs +557 -0
- package/src/runtime/agent/orchestrator/tools/builtin/lib/shell-job-records.mjs +6 -0
- package/src/runtime/agent/orchestrator/tools/builtin/shell-jobs.mjs +8 -2
- package/src/runtime/attachments/legacy-office.mjs +110 -0
- package/src/runtime/attachments/prompt-restore.mjs +70 -0
- package/src/runtime/attachments/store.mjs +60 -3
- package/src/runtime/effort-judge/judge-client.mjs +61 -14
- package/src/runtime/effort-judge/model-install.mjs +34 -2
- package/src/runtime/memory/lib/memory-chunk-quality.mjs +14 -2
- package/src/runtime/office/portable/portable-soffice.mjs +132 -30
- package/src/runtime/shared/agent-avatar-sprites.mjs +23 -8
- package/src/runtime/shared/agent-avatar.mjs +3 -2
- package/src/runtime/shared/agent-room-host.d.mts +31 -0
- package/src/runtime/shared/agent-room-host.mjs +58 -0
- package/src/runtime/shared/bot-hops.mjs +16 -11
- package/src/runtime/shared/llm/usage-rollup.mjs +4 -383
- package/src/runtime/shared/redact-directories.mjs +18 -0
- package/src/runtime/shared/remove-directory.mjs +28 -0
- package/src/runtime/shared/session-sidebar-host.d.mts +11 -2
- package/src/runtime/shared/session-sidebar-host.mjs +16 -3
- package/src/runtime/shared/tool-execution-contract.mjs +4 -0
- package/src/runtime/shared/tool-work-units.mjs +12 -9
- package/src/runtime/shared/turn-snapshot.mjs +233 -122
- package/src/runtime/shared/user-data-guard.mjs +51 -19
- package/src/runtime/shared/worktrees/activity-gate.mjs +209 -227
- package/src/runtime/shared/worktrees/contract.mjs +11 -3
- package/src/runtime/shared/worktrees/maintenance.mjs +11 -2
- package/src/runtime/shared/worktrees/manager.mjs +419 -52
- package/src/runtime/shared/worktrees/registry.mjs +3 -1
- package/src/runtime/shared/worktrees/tool-host.mjs +39 -0
- package/src/runtime/tidy/process.mjs +41 -8
- package/src/runtime/tidy/resolve.mjs +10 -7
- package/src/session-runtime/agent-home-delivery.mjs +73 -91
- package/src/session-runtime/agent-profile-changes.mjs +16 -0
- package/src/session-runtime/agent-room-delivery.mjs +2 -63
- package/src/session-runtime/agent-task-sessions.mjs +194 -64
- package/src/session-runtime/agent-tool-routing.mjs +49 -4
- package/src/session-runtime/boot/apis.mjs +3 -0
- package/src/session-runtime/boot/facade.mjs +5 -6
- package/src/session-runtime/boot/tools.mjs +23 -1
- package/src/session-runtime/held-requests.mjs +20 -25
- package/src/session-runtime/internal-tool-executor/workspace-tools.mjs +5 -22
- package/src/session-runtime/model-recency.mjs +1 -0
- package/src/session-runtime/provider-models/row-hydration.mjs +8 -1
- package/src/session-runtime/quick-model-rows/model-meta.mjs +2 -0
- package/src/session-runtime/quick-model-rows/provider-rows.mjs +7 -1
- package/src/session-runtime/runtime-review-api.mjs +4 -1
- package/src/session-runtime/services/agent-tool/close-flow.mjs +14 -2
- package/src/session-runtime/services/agent-tool/execute.mjs +6 -1
- package/src/session-runtime/services/agent-tool/job-views/agent-list.mjs +44 -20
- package/src/session-runtime/services/agent-tool/render.mjs +3 -1
- package/src/session-runtime/services/agent-tool/spawn-flow/job-start.mjs +3 -0
- package/src/session-runtime/services/agent-tool/tool-def.mjs +1 -1
- package/src/session-runtime/services/provider-admin.mjs +12 -2
- package/src/session-runtime/services/worktree-access.mjs +27 -0
- package/src/session-runtime/session-hooks.mjs +9 -17
- package/src/session-runtime/settings-builtin-tools-api.mjs +2 -0
- package/src/session-runtime/setup-tool/executor.mjs +4 -0
- package/src/session-runtime/setup-tool/settings-contract.mjs +3 -0
- package/src/session-runtime/tool-policy/agent-profile-fold.mjs +98 -14
- package/src/session-runtime/tool-policy/policy-stage.mjs +23 -5
- package/src/session-runtime/tool-policy-refresh.mjs +1 -0
- package/src/session-runtime/tool-surface.mjs +9 -5
- package/src/session-runtime/turn/session-ops.mjs +8 -0
- package/src/session-runtime/turn/turn-run.mjs +5 -1
- package/src/session-runtime/usage-stats-api.mjs +1 -1
- package/src/session-runtime/workflow-agents-api/agent-editor.mjs +10 -2
- package/src/session-runtime/workflow-agents-api/agent-route.mjs +39 -17
- package/src/session-runtime/workspace/transition-steps.mjs +1 -18
- package/src/session-runtime/workspace/transitions.mjs +279 -67
- package/src/session-runtime/workspace/worktree-tool.mjs +194 -0
- package/src/standalone/daemon-lag-profiler.mjs +3 -1
- package/src/standalone/daemon-session-control.mjs +140 -23
- package/src/standalone/daemon-telemetry.mjs +9 -0
- package/src/standalone/daemon.mjs +5 -0
- package/src/standalone/local-session-runtime.mjs +11 -2
- package/src/standalone/session-protocol.mjs +1 -0
- package/src/standalone/session-runtime-inline-host/boot-loaders.mjs +2 -0
- package/src/standalone/session-service/agent-route-follow.mjs +69 -0
- package/src/standalone/session-service/session-calls/session-turns.mjs +33 -4
- package/src/standalone/session-service.mjs +10 -0
- package/src/standalone/session-tool-output.mjs +1 -0
- package/src/standalone/staged-import.mjs +47 -0
- package/src/tui/App.jsx +2 -0
- package/src/tui/app/message-selector.mjs +15 -2
- package/src/tui/app/model-options.mjs +16 -2
- package/src/tui/app/model-picker.mjs +2 -1
- package/src/tui/app/route-pickers.mjs +3 -1
- package/src/tui/dist/index.mjs +403 -210
- package/src/tui/paste-attachments.mjs +0 -1
- package/src/tui/paste-text-policy.mjs +4 -5
- package/src/tui/session/agent-job-feed/execution-delivery.mjs +4 -1
- package/src/tui/session/notice-surface.mjs +3 -0
- package/src/tui/session/session-api/intake/abort.mjs +33 -17
- package/src/tui/session/session-api/intake/rewind.mjs +39 -4
- package/src/tui/session/session-api/routes-agent-definitions.mjs +1 -0
- package/src/tui/session/tool-approval.mjs +11 -48
- package/src/vendor/statusline/src/gateway/claude-current.mjs +0 -58
- package/src/vendor/statusline/src/gateway/route-meta.mjs +1 -361
- package/src/vendor/statusline/src/gateway/session-routes.mjs +0 -55
- package/src/session-runtime/room-member-gate.mjs +0 -61
- package/src/vendor/statusline/scripts/lib/gateway-settings.mjs +0 -285
|
@@ -23,6 +23,7 @@ import { createViewerRegistry } from './session-service/viewers.mjs';
|
|
|
23
23
|
import { createSessionEntries } from './session-service/entries.mjs';
|
|
24
24
|
import { createSessionCalls } from './session-service/session-calls.mjs';
|
|
25
25
|
import { createQuotaResumeScheduler } from './session-service/quota-resume.mjs';
|
|
26
|
+
import { createAgentRouteFollow } from './session-service/agent-route-follow.mjs';
|
|
26
27
|
import { registerDelegatedApprovalOpener } from '../runtime/shared/delegated-approval-host.mjs';
|
|
27
28
|
|
|
28
29
|
const EXTERNAL_SESSION_ACTIONS = new Set([
|
|
@@ -209,6 +210,14 @@ export function createSessionService({
|
|
|
209
210
|
// A sub-agent's approval shows in its top-level chat; one not loaded is
|
|
210
211
|
// brought up so the copy (and its notifications) appear there.
|
|
211
212
|
const unregisterApprovalOpener = registerDelegatedApprovalOpener((sessionId) => calls.materializeSession(sessionId));
|
|
213
|
+
// A bot's saved route reaches its hosted home and room-member chats from their next turn.
|
|
214
|
+
const agentRouteFollow = createAgentRouteFollow({
|
|
215
|
+
sessionsById,
|
|
216
|
+
sessionOwner: projection.sessionOwner,
|
|
217
|
+
advance: projection.advance,
|
|
218
|
+
publishStep: projection.publishStep,
|
|
219
|
+
log,
|
|
220
|
+
});
|
|
212
221
|
const quotaUsableReader = typeof readQuotaUsable === 'function' ? readQuotaUsable : async () => false;
|
|
213
222
|
const quotaResume = quotaResumeStore
|
|
214
223
|
? createQuotaResumeScheduler({
|
|
@@ -224,6 +233,7 @@ export function createSessionService({
|
|
|
224
233
|
if (stopPromise) return stopPromise;
|
|
225
234
|
closed = true;
|
|
226
235
|
unregisterApprovalOpener();
|
|
236
|
+
agentRouteFollow.unsubscribe();
|
|
227
237
|
quotaResume?.stop();
|
|
228
238
|
stopPromise = Promise.resolve().then(async () => {
|
|
229
239
|
try {
|
|
@@ -24,6 +24,7 @@ export function sessionListOutput(page, limit, { rich = true } = {}) {
|
|
|
24
24
|
: {}),
|
|
25
25
|
...(row.status ? { status: row.status } : {}),
|
|
26
26
|
...(row.cwd ? { cwd: row.cwd } : {}),
|
|
27
|
+
...(row.archived === true ? { archived: true } : {}),
|
|
27
28
|
};
|
|
28
29
|
if (!rich) return base;
|
|
29
30
|
// The bot it belongs to: its chat, room seat or the task's creator.
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
// Staged dynamic import of a large module graph. Loading a graph (file reads,
|
|
2
|
+
// compilation, evaluation) runs synchronously inside one import() call, so the
|
|
3
|
+
// daemon's session-runtime warm-up held the event loop for ~0.5 s in one
|
|
4
|
+
// piece right after `daemon-ready`. Importing the graph's top-level stages one
|
|
5
|
+
// loop turn apart splits that block without changing what is loaded.
|
|
6
|
+
import { readFileSync } from 'node:fs';
|
|
7
|
+
import { fileURLToPath } from 'node:url';
|
|
8
|
+
|
|
9
|
+
// A static `import … from './x'`, `export … from './x'` or bare `import './x'`
|
|
10
|
+
// at the start of a line, in source order.
|
|
11
|
+
const STATIC_RELATIVE_IMPORT =
|
|
12
|
+
/^(?:import|export)\b[^;]*?\bfrom\s*['"](\.{1,2}\/[^'"]+)['"]|^import\s*['"](\.{1,2}\/[^'"]+)['"]/gm;
|
|
13
|
+
|
|
14
|
+
/** The relative static imports of the module at `url`, resolved, in source order. */
|
|
15
|
+
export function staticRelativeImports(url) {
|
|
16
|
+
const source = readFileSync(fileURLToPath(url), 'utf8');
|
|
17
|
+
return [...source.matchAll(STATIC_RELATIVE_IMPORT)].map((match) => new URL(match[1] || match[2], url).href);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const nextTurn = () => new Promise((resolve) => setImmediate(resolve));
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* import(url), after importing each static relative dependency of `stagesOf`
|
|
24
|
+
* (in its source order, one loop turn apart). Module evaluation order is the
|
|
25
|
+
* one a single import gives — dependencies depth-first in source order — as
|
|
26
|
+
* long as no module of a stage's graph imports `stagesOf` or an importer of it
|
|
27
|
+
* back. Staging stops at the first stage that fails, so no later stage
|
|
28
|
+
* evaluates; the final import then reports the failure as a single import
|
|
29
|
+
* would.
|
|
30
|
+
*/
|
|
31
|
+
export async function importInStages(url, stagesOf) {
|
|
32
|
+
let stages = [];
|
|
33
|
+
try {
|
|
34
|
+
stages = staticRelativeImports(stagesOf);
|
|
35
|
+
} catch {
|
|
36
|
+
// Unreadable source: one import, as before.
|
|
37
|
+
}
|
|
38
|
+
for (const stage of stages) {
|
|
39
|
+
try {
|
|
40
|
+
await import(stage);
|
|
41
|
+
} catch {
|
|
42
|
+
break;
|
|
43
|
+
}
|
|
44
|
+
await nextTurn();
|
|
45
|
+
}
|
|
46
|
+
return import(url);
|
|
47
|
+
}
|
package/src/tui/App.jsx
CHANGED
|
@@ -516,6 +516,8 @@ export function App({ store, initialStatusLine = '', forceOnboarding = false, on
|
|
|
516
516
|
syncPromptLayoutRows,
|
|
517
517
|
showPromptHint,
|
|
518
518
|
clearPromptHint,
|
|
519
|
+
installPastedImages,
|
|
520
|
+
installPastedTexts,
|
|
519
521
|
});
|
|
520
522
|
|
|
521
523
|
// PROMPT HANDLER cluster extracted to app/use-prompt-handlers.mjs.
|
|
@@ -45,6 +45,8 @@ export function useMessageSelector({
|
|
|
45
45
|
syncPromptLayoutRows,
|
|
46
46
|
showPromptHint,
|
|
47
47
|
clearPromptHint,
|
|
48
|
+
installPastedImages,
|
|
49
|
+
installPastedTexts,
|
|
48
50
|
}) {
|
|
49
51
|
// Cheap enough to recompute only when the transcript array identity changes;
|
|
50
52
|
// the prompt asks for this on every Escape, never per keystroke.
|
|
@@ -64,11 +66,22 @@ export function useMessageSelector({
|
|
|
64
66
|
return false;
|
|
65
67
|
}
|
|
66
68
|
clearPromptHint();
|
|
69
|
+
// The prompt's pasted blocks return with it, so its tokens still expand.
|
|
70
|
+
if (restored.pastedImages) installPastedImages?.(restored.pastedImages, { merge: true });
|
|
71
|
+
if (restored.pastedTexts) installPastedTexts?.(restored.pastedTexts, { merge: true });
|
|
67
72
|
syncPromptLayoutRows(text);
|
|
68
73
|
setPromptDraftOverride({ id: Date.now(), value: text });
|
|
74
|
+
if (restored.notice) showPromptHint(restored.notice, 'error');
|
|
69
75
|
return true;
|
|
70
76
|
},
|
|
71
|
-
[
|
|
77
|
+
[
|
|
78
|
+
clearPromptHint,
|
|
79
|
+
syncPromptLayoutRows,
|
|
80
|
+
setPromptDraftOverride,
|
|
81
|
+
showPromptHint,
|
|
82
|
+
installPastedImages,
|
|
83
|
+
installPastedTexts,
|
|
84
|
+
]
|
|
72
85
|
);
|
|
73
86
|
|
|
74
87
|
const openMessageSelector = useCallback(() => {
|
|
@@ -89,7 +102,7 @@ export function useMessageSelector({
|
|
|
89
102
|
own.close();
|
|
90
103
|
let restored;
|
|
91
104
|
try {
|
|
92
|
-
restored = store.rewindToItem?.(value);
|
|
105
|
+
restored = store.rewindToItem?.(value, { restoreFiles: false });
|
|
93
106
|
} catch (error) {
|
|
94
107
|
showPromptHint(`rewind failed: ${error?.message || error}`, 'error');
|
|
95
108
|
return;
|
|
@@ -221,6 +221,18 @@ export const loadProviderDisplayNames = async (store) => {
|
|
|
221
221
|
return names;
|
|
222
222
|
};
|
|
223
223
|
|
|
224
|
+
/** Provider names for the picker: custom rows' own `providerName` first, then
|
|
225
|
+
* setup names over them (setup wins). Works when setup is missing or failed. */
|
|
226
|
+
export const catalogProviderDisplayNames = (models, setupNames = null) => {
|
|
227
|
+
const names = {};
|
|
228
|
+
for (const model of Array.isArray(models) ? models : []) {
|
|
229
|
+
const provider = String(model?.provider || '').trim();
|
|
230
|
+
const name = String(model?.providerName || '').trim();
|
|
231
|
+
if (provider.startsWith('custom-') && name) names[provider] = name;
|
|
232
|
+
}
|
|
233
|
+
return { ...names, ...setupNames };
|
|
234
|
+
};
|
|
235
|
+
|
|
224
236
|
/** `{ id, text }` for each provider whose model list failed, with the reason
|
|
225
237
|
* (the setup row's `catalogError`) and what to do about it. */
|
|
226
238
|
export const loadProviderCatalogFailures = async (store) => {
|
|
@@ -368,9 +380,11 @@ const routeModelDetails = (route) =>
|
|
|
368
380
|
.filter(Boolean)
|
|
369
381
|
.join(' · ');
|
|
370
382
|
|
|
371
|
-
export const routeLabel = (route) => {
|
|
383
|
+
export const routeLabel = (route, providerNames = null) => {
|
|
372
384
|
if (!route?.provider || !route?.model) return '(unset)';
|
|
373
|
-
return [
|
|
385
|
+
return [resolveProviderDisplayName(route.provider, providerNames), routeModelDetails(route)]
|
|
386
|
+
.filter(Boolean)
|
|
387
|
+
.join(' · ');
|
|
374
388
|
};
|
|
375
389
|
|
|
376
390
|
export const routeModelLabel = (route) => (route?.model ? routeModelDetails(route) : '(unset)');
|
|
@@ -14,6 +14,7 @@ import {
|
|
|
14
14
|
normalizeModelOptions,
|
|
15
15
|
buildCatalogFailureItems,
|
|
16
16
|
buildModelProviderItems,
|
|
17
|
+
catalogProviderDisplayNames,
|
|
17
18
|
loadProviderCatalogFailures,
|
|
18
19
|
loadProviderDisplayNames,
|
|
19
20
|
} from './model-options.mjs';
|
|
@@ -83,7 +84,7 @@ export function createModelPicker({
|
|
|
83
84
|
}
|
|
84
85
|
|
|
85
86
|
const models = normalizeModelOptions(providerModels);
|
|
86
|
-
const providerNames = await loadProviderDisplayNames(store);
|
|
87
|
+
const providerNames = catalogProviderDisplayNames(models, await loadProviderDisplayNames(store));
|
|
87
88
|
const catalogFailures = await loadProviderCatalogFailures(store);
|
|
88
89
|
const activeRoute = options.currentRoute || {
|
|
89
90
|
provider: state.provider,
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
* openers (openModelPicker) thread as lazy getter wrappers so they resolve the
|
|
8
8
|
* live binding at call time.
|
|
9
9
|
*/
|
|
10
|
+
import { loadProviderDisplayNames } from './model-options.mjs';
|
|
10
11
|
import { createAgentsPicker } from './route-pickers/agents-picker.mjs';
|
|
11
12
|
import { createOutputStylePicker } from './route-pickers/output-style-picker.mjs';
|
|
12
13
|
import { createWorkflowPicker } from './route-pickers/workflow-picker.mjs';
|
|
@@ -59,7 +60,8 @@ export function createRoutePickers({
|
|
|
59
60
|
store.pushNotice('Web-search model save is already running.', 'warn');
|
|
60
61
|
return;
|
|
61
62
|
}
|
|
62
|
-
|
|
63
|
+
const providerNames = await loadProviderDisplayNames(store);
|
|
64
|
+
store.pushNotice(`Web-search model set to ${routeLabel(result, providerNames)}`, 'info');
|
|
63
65
|
return result;
|
|
64
66
|
},
|
|
65
67
|
onAfterSelect: null,
|