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

Function appendToolUse

apps/kimi-web/src/api/daemon/agentEventProjector.ts:403–414  ·  view source on GitHub ↗
(
  state: SessionState,
  messageId: string,
  toolCallId: string,
  toolName: string,
  input: unknown,
  outputLines?: string[],
)

Source from the content-addressed store, hash-verified

401}
402
403function appendToolUse(
404 state: SessionState,
405 messageId: string,
406 toolCallId: string,
407 toolName: string,
408 input: unknown,
409 outputLines?: string[],
410): void {
411 const msg = state.messages.find((m) => m.id === messageId);
412 if (!msg) return;
413 msg.content.push({ type: 'toolUse', toolCallId, toolName, input, outputLines });
414}
415
416function toolProgressOutput(payload: Record<string, unknown>): { outputChunk: string; stream: 'stdout' | 'stderr' } | null {
417 const update = payload['update'];

Callers 1

_projectFunction · 0.85

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected