返回 DeepSeek-Reasonix
sessionSwitchFixtures.ts
根目录 / desktop / frontend / src / __tests__ / helpers / sessionSwitchFixtures.ts
1 import type { Meta, TabMeta } from "../../lib/types";
2
3 export function tabMeta(overrides: Partial<TabMeta> = {}): TabMeta {
4 return {
5 id: "tab-a",
6 scope: "project",
7 workspaceRoot: "/repo",
8 workspaceName: "repo",
9 workspacePath: "/repo",
10 gitBranch: "main",
11 topicId: "topic-a",
12 topicTitle: "General",
13 label: "model",
14 ready: true,
15 running: false,
16 mode: "normal",
17 toolApprovalMode: "ask",
18 tokenMode: "full",
19 active: true,
20 cwd: "/repo",
21 ...overrides,
22 };
23 }
24
25 export function meta(overrides: Partial<Meta> = {}): Meta {
26 return {
27 label: "model",
28 ready: true,
29 eventChannel: "agent:event",
30 cwd: "/repo",
31 workspaceRoot: "/repo",
32 workspaceName: "repo",
33 workspacePath: "/repo",
34 gitBranch: "main",
35 autoApproveTools: false,
36 bypass: false,
37 collaborationMode: "normal",
38 toolApprovalMode: "ask",
39 tokenMode: "full",
40 goal: "",
41 goalStatus: "stopped",
42 ...overrides,
43 };
44 }
45
45 lines TYPESCRIPT