MCPcopy Index your code
hub / github.com/CopilotKit/CopilotKit / #bindClientTool

Method #bindClientTool

packages/angular/src/lib/copilotkit.ts:263–275  ·  view source on GitHub ↗
(
    clientToolWithInjector: FrontendToolConfig & {
      injector: Injector;
    },
  )

Source from the content-addressed store, hash-verified

261 }
262
263 #bindClientTool(
264 clientToolWithInjector: FrontendToolConfig & {
265 injector: Injector;
266 },
267 ): FrontendTool {
268 const { injector, handler, ...frontendCandidate } = clientToolWithInjector;
269
270 return {
271 ...frontendCandidate,
272 handler: (args, context) =>
273 runInInjectionContext(injector, () => handler(args, context)),
274 };
275 }
276
277 addFrontendTool(
278 clientToolWithInjector: FrontendToolConfig & {

Callers 2

addFrontendToolMethod · 0.95

Calls 1

handlerFunction · 0.50

Tested by

no test coverage detected