(humanInTheLoop: HumanInTheLoopConfig<Args>)
| 136 | } |
| 137 | |
| 138 | export function registerHumanInTheLoop< |
| 139 | Args extends Record<string, unknown> = Record<string, unknown>, |
| 140 | >(humanInTheLoop: HumanInTheLoopConfig<Args>): void { |
| 141 | const destroyRef = inject(DestroyRef); |
| 142 | const copilotKit = inject(CopilotKit); |
| 143 | |
| 144 | copilotKit.addHumanInTheLoop(humanInTheLoop); |
| 145 | |
| 146 | destroyRef.onDestroy(() => { |
| 147 | copilotKit.removeTool(humanInTheLoop.name, humanInTheLoop.agentId); |
| 148 | }); |
| 149 | } |
searching dependent graphs…