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

Function isPendingToolCallAtIndex

packages/kosong/src/generate.ts:279–284  ·  view source on GitHub ↗

True when `pending` is a ToolCall whose _streamIndex equals `index`.

(
  pending: StreamedMessagePart | null,
  index: number | string,
)

Source from the content-addressed store, hash-verified

277
278/** True when `pending` is a ToolCall whose _streamIndex equals `index`. */
279function isPendingToolCallAtIndex(
280 pending: StreamedMessagePart | null,
281 index: number | string,
282): pending is ToolCall {
283 return pending !== null && isToolCall(pending) && pending._streamIndex === index;
284}
285
286/**
287 * Append a fully-merged part to the message.

Callers 1

generateFunction · 0.85

Calls 1

isToolCallFunction · 0.90

Tested by

no test coverage detected