mirror of
https://github.com/CopilotKit/CopilotKit.git
synced 2026-09-14 16:26:20 +08:00
5693a60625
Adds /a2ui-catalog page and a runtime endpoint with NO a2ui config, so A2UI switches on purely from the provider's a2ui.catalog (the #5774 path). Also fixes DemoButtonAgent, which never actually rendered: it emitted the wrong activity content key (operations -> a2ui_operations) and a non-canonical operation/component format. Rewritten to the A2UI v0.9 wire format (createSurface/updateComponents, flat components, root id "root") so the surface paints and the Confirm round-trip works.
35 lines
909 B
TypeScript
35 lines
909 B
TypeScript
import {
|
|
createCopilotEndpoint,
|
|
createCopilotEndpointSingleRoute,
|
|
} from "@copilotkit/runtime/v2";
|
|
import {
|
|
createCatalogOnlyRuntime,
|
|
createDefaultRuntime,
|
|
createMcpRuntime,
|
|
} from "./runtime";
|
|
|
|
const defaultRuntime = createDefaultRuntime();
|
|
const singleRuntime = createDefaultRuntime();
|
|
const mcpRuntime = createMcpRuntime();
|
|
const catalogOnlyRuntime = createCatalogOnlyRuntime();
|
|
|
|
export const copilotEndpoint = createCopilotEndpoint({
|
|
runtime: defaultRuntime,
|
|
basePath: "/api/copilotkit",
|
|
});
|
|
|
|
export const copilotSingleEndpoint = createCopilotEndpointSingleRoute({
|
|
runtime: singleRuntime,
|
|
basePath: "/api/copilotkit-single",
|
|
});
|
|
|
|
export const copilotMcpEndpoint = createCopilotEndpoint({
|
|
runtime: mcpRuntime,
|
|
basePath: "/api/copilotkit-mcp",
|
|
});
|
|
|
|
export const copilotCatalogEndpoint = createCopilotEndpoint({
|
|
runtime: catalogOnlyRuntime,
|
|
basePath: "/api/copilotkit-catalog",
|
|
});
|