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

Function toAppSession

apps/kimi-web/src/api/daemon/mappers.ts:93–114  ·  view source on GitHub ↗
(wire: WireSession)

Source from the content-addressed store, hash-verified

91}
92
93export function toAppSession(wire: WireSession): AppSession {
94 return {
95 id: wire.id,
96 title: wire.title,
97 createdAt: wire.created_at,
98 updatedAt: wire.updated_at,
99 status: toAppSessionStatus(wire.status),
100 archived: wire.archived ?? false,
101 currentPromptId: wire.current_prompt_id,
102 lastPrompt: wire.last_prompt,
103 cwd: wire.metadata.cwd,
104 model: wire.agent_config.model,
105 usage: toAppSessionUsage(wire.usage),
106 messageCount: wire.message_count,
107 lastSeq: wire.last_seq,
108 workspaceId: wire.workspace_id,
109 parentSessionId:
110 typeof wire.metadata['parent_session_id'] === 'string'
111 ? wire.metadata['parent_session_id']
112 : undefined,
113 };
114}
115
116export function toAppWorkspace(wire: WireWorkspace): AppWorkspace {
117 return {

Callers 7

createSessionMethod · 0.90
getSessionMethod · 0.90
updateSessionMethod · 0.90
getSessionSnapshotMethod · 0.90
forkSessionMethod · 0.90
createChildSessionMethod · 0.90
toAppEventFunction · 0.85

Calls 2

toAppSessionStatusFunction · 0.85
toAppSessionUsageFunction · 0.85

Tested by

no test coverage detected