mirror of
https://github.com/CopilotKit/CopilotKit.git
synced 2026-09-14 16:26:20 +08:00
b3de484be1
Adds the opt-in secondary entry point @copilotkit/angular/mcp-apps for rendering MCP Apps (MCP ext-apps) inline in the chat: - CopilotMCPAppsActivityRenderer plus a ready-to-register mcpAppsActivityRendererConfig for activityType mcp-apps - CopilotMCPAppsWidget loads the app's ui:// resource from the configured MCP server, embeds it in a sandboxed iframe, and connects an AppBridge that relays tool input/result, size changes, links, and log messages - provideMCPApps registers server URLs and the host identity, capabilities, and context announced to embedded apps - @modelcontextprotocol/sdk and @modelcontextprotocol/ext-apps are optional peer dependencies; the main entry point stays free of MCP imports Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
51 lines
1.3 KiB
TypeScript
51 lines
1.3 KiB
TypeScript
/// <reference types="vitest" />
|
|
import { defineConfig } from "vite";
|
|
import angular from "@analogjs/vite-plugin-angular";
|
|
import { fileURLToPath } from "node:url";
|
|
import { dirname, resolve } from "node:path";
|
|
|
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
const r = (...p: string[]) => resolve(__dirname, ...p);
|
|
|
|
export default defineConfig(({ mode }) => ({
|
|
plugins: [angular()],
|
|
resolve: {
|
|
alias: {
|
|
"@copilotkit/angular": r("src/public-api.ts"),
|
|
},
|
|
dedupe: [
|
|
"@angular/core",
|
|
"@angular/common",
|
|
"@angular/platform-browser",
|
|
"@angular/platform-browser-dynamic",
|
|
"@angular/compiler",
|
|
"@angular/core/testing",
|
|
],
|
|
},
|
|
test: {
|
|
globals: true,
|
|
environment: "jsdom",
|
|
setupFiles: [r("src/test-setup.ts")], // Use absolute path
|
|
include: ["src/**/*.{spec,test}.{ts,tsx}"],
|
|
pool: "threads",
|
|
poolOptions: { threads: { singleThread: true } },
|
|
reporters: [["default", { summary: false }]],
|
|
silent: true,
|
|
coverage: {
|
|
provider: "v8",
|
|
reporter: ["text", "json", "html"],
|
|
exclude: [
|
|
"node_modules/",
|
|
"dist/",
|
|
"*.config.*",
|
|
"src/test-setup.ts",
|
|
"src/index.ts",
|
|
"src/public-api.ts",
|
|
],
|
|
},
|
|
},
|
|
define: {
|
|
"import.meta.vitest": mode !== "production",
|
|
},
|
|
}));
|