(renderToolCall: RenderToolCallConfig<Args>)
| 106 | } |
| 107 | |
| 108 | export function registerRenderToolCall< |
| 109 | Args extends Record<string, unknown> = Record<string, unknown>, |
| 110 | >(renderToolCall: RenderToolCallConfig<Args>): void { |
| 111 | const copilotKit = inject(CopilotKit); |
| 112 | const destroyRef = inject(DestroyRef); |
| 113 | |
| 114 | copilotKit.addRenderToolCall(renderToolCall); |
| 115 | |
| 116 | destroyRef.onDestroy(() => { |
| 117 | copilotKit.removeTool(renderToolCall.name, renderToolCall.agentId); |
| 118 | }); |
| 119 | } |
| 120 | |
| 121 | export function registerFrontendTool< |
| 122 | Args extends Record<string, unknown> = Record<string, unknown>, |
searching dependent graphs…