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

Function useContext

apps/vis/web/src/hooks/useContext.ts:18–28  ·  view source on GitHub ↗
(
  sessionId: string,
  agentId: string,
  mode: 'model' | 'full' = 'model',
)

Source from the content-addressed store, hash-verified

16 * cached independently (the mode is part of the React Query key).
17 */
18export function useContext(
19 sessionId: string,
20 agentId: string,
21 mode: 'model' | 'full' = 'model',
22) {
23 return useQuery({
24 queryKey: ['context', sessionId, agentId, mode] as const,
25 queryFn: () => api.getContext(sessionId, agentId, mode),
26 enabled: sessionId.length > 0 && agentId.length > 0,
27 });
28}

Callers 1

ContextTabFunction · 0.90

Calls 1

getContextMethod · 0.45

Tested by

no test coverage detected