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

Function getSessionContext

apps/kimi-code/src/tui/commands/undo.ts:189–201  ·  view source on GitHub ↗
(
  session: SlashCommandHost['session'],
)

Source from the content-addressed store, hash-verified

187}
188
189async function getSessionContext(
190 session: SlashCommandHost['session'],
191): Promise<UndoSessionContext | undefined> {
192 const getContext = (
193 session as { getContext?: () => Promise<UndoSessionContext> } | undefined
194 )?.getContext;
195 if (session === undefined || getContext === undefined) return undefined;
196 try {
197 return await getContext.call(session);
198 } catch {
199 return undefined;
200 }
201}
202
203function undoAvailabilityFromTranscript(
204 entries: readonly TranscriptEntry[],

Callers 1

resolveUndoAvailabilityFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected