MCPcopy
hub / github.com/CopilotKit/CopilotKit / updateRuntime

Method updateRuntime

packages/angular/src/lib/copilotkit.ts:559–591  ·  view source on GitHub ↗
(options: {
    runtimeUrl?: string;
    runtimeTransport?: CopilotRuntimeTransport;
    headers?: Record<string, string>;
    properties?: Record<string, unknown>;
    agents?: Record<string, AbstractAgent>;
    selfManagedAgents?: Record<string, AbstractAgent>;
  })

Source from the content-addressed store, hash-verified

557 }
558
559 updateRuntime(options: {
560 runtimeUrl?: string;
561 runtimeTransport?: CopilotRuntimeTransport;
562 headers?: Record<string, string>;
563 properties?: Record<string, unknown>;
564 agents?: Record<string, AbstractAgent>;
565 selfManagedAgents?: Record<string, AbstractAgent>;
566 }): void {
567 if (options.runtimeUrl !== undefined) {
568 this.core.setRuntimeUrl(options.runtimeUrl);
569 this.#runtimeUrl.set(options.runtimeUrl);
570 }
571 if (options.runtimeTransport !== undefined) {
572 this.core.setRuntimeTransport(options.runtimeTransport);
573 this.#runtimeTransport.set(options.runtimeTransport);
574 }
575 if (options.headers !== undefined) {
576 this.core.setHeaders(options.headers);
577 this.#headers.set(options.headers);
578 }
579 if (options.properties !== undefined) {
580 this.core.setProperties(options.properties);
581 }
582 if (
583 options.agents !== undefined ||
584 options.selfManagedAgents !== undefined
585 ) {
586 this.core.setAgents__unsafe_dev_only({
587 ...(options.agents ?? this.#config.agents),
588 ...(options.selfManagedAgents ?? this.#config.selfManagedAgents),
589 });
590 }
591 }
592}

Callers 1

copilotkit.spec.tsFile · 0.80

Calls 6

setPropertiesMethod · 0.80
setRuntimeUrlMethod · 0.45
setMethod · 0.45
setRuntimeTransportMethod · 0.45
setHeadersMethod · 0.45

Tested by

no test coverage detected