@promptbook/remote-client
Version:
Promptbook: Create persistent AI agents that turn your company's scattered knowledge into action
13 lines (12 loc) • 628 B
TypeScript
import type { ToolCall } from '../../types/ToolCall';
/**
* Merges streamed tool-call snapshots by stable identity while preserving incremental logs,
* warnings, and partial results.
*
* @param existingToolCalls - Previously known tool-call snapshots.
* @param incomingToolCalls - Newly observed tool-call snapshots.
* @returns Aggregated tool-call list with newer snapshots merged in place.
*
* @private shared helper for streaming chat surfaces
*/
export declare function mergeToolCalls(existingToolCalls: ReadonlyArray<ToolCall> | undefined, incomingToolCalls: ReadonlyArray<ToolCall> | undefined): Array<ToolCall>;