MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / createState

Function createState

apps/kimi-web/test/workspace-state.test.ts:52–90  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

50}
51
52function createState(): ExtendedState {
53 return {
54 ...createInitialState(),
55 sessions: [createSession()],
56 activeSessionId: 'sess_1',
57 connected: true,
58 serverVersion: '',
59 workspaceName: 'kimi-web',
60 connection: 'connected',
61 permission: 'manual',
62 thinking: 'high',
63 planModeBySession: {},
64 swarmModeBySession: {},
65 goalModeBySession: {},
66 loading: false,
67 sessionLoading: false,
68 queuedBySession: {},
69 gitStatusBySession: {},
70 promptIdBySession: { sess_1: 'prompt_stale' },
71 sendingBySession: {},
72 unreadBySession: {},
73 authReady: true,
74 defaultModel: null,
75 managedProviderStatus: null,
76 workspaces: [],
77 activeWorkspaceId: null,
78 fsHome: null,
79 recentRoots: [],
80 hiddenWorkspaceRoots: [],
81 availableOpenInApps: [],
82 config: null,
83 sideChatMessagesByAgent: {},
84 sideChatSendingByAgent: {},
85 sideChatUserMessageIdsBySession: {},
86 messagesLoadingMoreBySession: {},
87 messagesHasMoreBySession: {},
88 messagesLoadMoreErrorBySession: {},
89 };
90}
91
92function createDeps(): UseWorkspaceStateDeps {
93 return {

Callers 1

Calls 2

createInitialStateFunction · 0.90
createSessionFunction · 0.70

Tested by

no test coverage detected