summaryrefslogtreecommitdiffhomepage
path: root/packages/frontend/src/lib
diff options
context:
space:
mode:
authorAdam Malczewski <[email protected]>2026-05-22 00:23:57 +0900
committerAdam Malczewski <[email protected]>2026-05-22 00:23:57 +0900
commite43df9a50ed9ad25dc07a7d5ee90c66d14e8a16f (patch)
tree62cb73fce55e8ffe5352619c2751cc307ceb6fd3 /packages/frontend/src/lib
parentfb97d4cb72d0a90dde102b7001603716ee6e4c3b (diff)
downloaddispatch-e43df9a50ed9ad25dc07a7d5ee90c66d14e8a16f.tar.gz
dispatch-e43df9a50ed9ad25dc07a7d5ee90c66d14e8a16f.zip
fix: child tabs now show correct key/model in Model Choice view
Include keyId and modelId in the tab-created WebSocket event so child agent tabs inherit the parent's model selection on the frontend.
Diffstat (limited to 'packages/frontend/src/lib')
-rw-r--r--packages/frontend/src/lib/tabs.svelte.ts11
-rw-r--r--packages/frontend/src/lib/types.ts8
2 files changed, 15 insertions, 4 deletions
diff --git a/packages/frontend/src/lib/tabs.svelte.ts b/packages/frontend/src/lib/tabs.svelte.ts
index 119df2d..9615c3d 100644
--- a/packages/frontend/src/lib/tabs.svelte.ts
+++ b/packages/frontend/src/lib/tabs.svelte.ts
@@ -334,7 +334,12 @@ function createTabStore() {
break;
}
case "tab-created": {
- const newTabEvent = event as AgentEvent & { id: string; title: string };
+ const newTabEvent = event as AgentEvent & {
+ id: string;
+ title: string;
+ keyId: string | null;
+ modelId: string | null;
+ };
// Only add if we don't already have this tab
if (!getTabById(newTabEvent.id)) {
const tab: Tab = {
@@ -342,8 +347,8 @@ function createTabStore() {
title: newTabEvent.title,
messages: [],
agentStatus: "running",
- keyId: null,
- modelId: null,
+ keyId: newTabEvent.keyId ?? null,
+ modelId: newTabEvent.modelId ?? null,
reasoningEffort: "max",
currentAssistantId: null,
tasks: [],
diff --git a/packages/frontend/src/lib/types.ts b/packages/frontend/src/lib/types.ts
index a1ec24b..e810864 100644
--- a/packages/frontend/src/lib/types.ts
+++ b/packages/frontend/src/lib/types.ts
@@ -64,7 +64,13 @@ export type AgentEvent =
}
| { type: "permission-prompt"; pending: PermissionPrompt[] }
| { type: "shell-output"; data: string; stream: "stdout" | "stderr" }
- | { type: "tab-created"; id: string; title: string };
+ | {
+ type: "tab-created";
+ id: string;
+ title: string;
+ keyId: string | null;
+ modelId: string | null;
+ };
export interface TaskItem {
id: string;