MCPcopy Create free account
hub / github.com/ChatLab/ChatLab / createRenderOnlyToolPendingBlock

Function createRenderOnlyToolPendingBlock

src/stores/aiChatChartBlocks.ts:39–58  ·  view source on GitHub ↗
(
  toolName: string | undefined,
  params?: Record<string, unknown>,
  toolCallId?: string
)

Source from the content-addressed store, hash-verified

37}
38
39export function createRenderOnlyToolPendingBlock(
40 toolName: string | undefined,
41 params?: Record<string, unknown>,
42 toolCallId?: string
43): RenderOnlyToolPendingBlock | null {
44 if (!toolName || !isRenderOnlyTool(toolName)) return null
45 const name = toolName
46
47 return {
48 type: 'tool',
49 tool: {
50 name,
51 displayName: name,
52 status: 'running',
53 params,
54 toolCallId,
55 transient: true,
56 },
57 }
58}
59
60function isMatchingPendingRenderOnlyToolBlock(
61 block: unknown,

Callers 2

Calls 1

isRenderOnlyToolFunction · 0.85

Tested by

no test coverage detected