Files
copilotkit__copilotkit/packages/angular/vitest.config.mts
Manfred Steyer b3de484be1 feat(angular): MCP Apps activity renderer
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>
2026-07-23 07:14:55 -07:00

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",
},
}));