@copilotkit/angular 0.6.0 → 2.0.0-rc.53

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/.attw.json +1 -2
  2. package/README.md +31 -133
  3. package/dist/README.md +31 -133
  4. package/dist/fesm2022/copilotkit-angular-generative-ui-chart.mjs +28 -0
  5. package/dist/fesm2022/copilotkit-angular-generative-ui-chart.mjs.map +1 -0
  6. package/dist/fesm2022/copilotkit-angular-generative-ui-icons.mjs +30 -0
  7. package/dist/fesm2022/copilotkit-angular-generative-ui-icons.mjs.map +1 -0
  8. package/dist/fesm2022/copilotkit-angular-generative-ui-map.mjs +28 -0
  9. package/dist/fesm2022/copilotkit-angular-generative-ui-map.mjs.map +1 -0
  10. package/dist/fesm2022/copilotkit-angular-generative-ui.mjs +11975 -0
  11. package/dist/fesm2022/copilotkit-angular-generative-ui.mjs.map +1 -0
  12. package/dist/fesm2022/copilotkit-angular-mcp-apps.mjs +43 -142
  13. package/dist/fesm2022/copilotkit-angular-mcp-apps.mjs.map +1 -1
  14. package/dist/fesm2022/copilotkit-angular.mjs +7422 -7467
  15. package/dist/fesm2022/copilotkit-angular.mjs.map +1 -1
  16. package/dist/types/copilotkit-angular-generative-ui-chart.d.ts +16 -0
  17. package/dist/types/copilotkit-angular-generative-ui-chart.d.ts.map +1 -0
  18. package/dist/types/copilotkit-angular-generative-ui-icons.d.ts +18 -0
  19. package/dist/types/copilotkit-angular-generative-ui-icons.d.ts.map +1 -0
  20. package/dist/types/copilotkit-angular-generative-ui-map.d.ts +16 -0
  21. package/dist/types/copilotkit-angular-generative-ui-map.d.ts.map +1 -0
  22. package/dist/types/copilotkit-angular-generative-ui.d.ts +8011 -0
  23. package/dist/types/copilotkit-angular-generative-ui.d.ts.map +1 -0
  24. package/dist/types/copilotkit-angular-mcp-apps.d.ts +234 -5560
  25. package/dist/types/copilotkit-angular-mcp-apps.d.ts.map +1 -1
  26. package/dist/types/copilotkit-angular.d.ts +1195 -820
  27. package/dist/types/copilotkit-angular.d.ts.map +1 -1
  28. package/package.json +54 -39
  29. package/scripts/generate-stylesheet.mjs +63 -0
  30. package/tsconfig.json +11 -1
  31. package/vitest.config.mts +6 -0
  32. package/dist/fesm2022/copilotkit-angular-a2ui.mjs +0 -1492
  33. package/dist/fesm2022/copilotkit-angular-a2ui.mjs.map +0 -1
  34. package/dist/styles.css +0 -2679
  35. package/dist/types/copilotkit-angular-a2ui.d.ts +0 -178
  36. package/dist/types/copilotkit-angular-a2ui.d.ts.map +0 -1
  37. package/scripts/scope-preflight.mjs +0 -100
@@ -1 +1 @@
1
- {"version":3,"file":"copilotkit-angular.mjs","sources":["../../src/lib/license-watermark.ts","../../src/lib/config.ts","../../src/lib/activity-renderer.ts","../../src/lib/human-in-the-loop.ts","../../src/lib/explicit-effect.ts","../../src/lib/components/a2ui/a2ui-surface-host.ts","../../src/lib/components/tools/default-tool-renderer.ts","../../src/lib/components/a2ui/a2ui-progress.ts","../../src/lib/components/a2ui/a2ui-recovery.ts","../../src/lib/slots/slot.types.ts","../../src/lib/slots/slot.utils.ts","../../src/lib/slots/copilot-slot.ts","../../src/lib/components/a2ui/surface-outlet.ts","../../src/lib/components/a2ui/a2ui-activity-renderer.ts","../../src/lib/components/a2ui/a2ui-catalog-context.ts","../../src/lib/components/a2ui/a2ui-render-tool-call.ts","../../src/lib/components/a2ui/a2ui-tool-types.ts","../../src/lib/components/a2ui/a2ui-tool-operations.ts","../../src/lib/components/a2ui/a2ui-tool-renderer.ts","../../src/lib/open-generative-ui.ts","../../src/lib/components/open-generative-ui/process-partial-html.ts","../../src/lib/components/open-generative-ui/open-generative-ui-renderer-utils.ts","../../src/lib/components/open-generative-ui/open-generative-ui-activity-renderer.ts","../../src/lib/components/open-generative-ui/open-generative-ui-tool-renderer.ts","../../src/lib/standard-schema-zod.ts","../../src/lib/package-version.ts","../../src/lib/inspector.ts","../../src/lib/copilotkit.ts","../../src/lib/tools.ts","../../src/lib/render-tool-calls.ts","../../src/lib/interrupt.ts","../../src/lib/agent.ts","../../src/lib/chat-configuration.ts","../../src/lib/capabilities.ts","../../src/lib/inject-interrupt.ts","../../src/lib/threads.ts","../../src/lib/chat-config.ts","../../src/lib/chat-state.ts","../../src/lib/transcription.ts","../../src/lib/scroll-position.ts","../../src/lib/resize-observer.ts","../../src/lib/utils.ts","../../src/lib/agent-context.ts","../../src/lib/memories.ts","../../src/lib/directives/copilotkit-agent-context.ts","../../src/lib/directives/stick-to-bottom.ts","../../src/lib/directives/tooltip.ts","../../src/lib/components/chat/copilot-chat-tool-calls-view.ts","../../src/lib/components/icons/copilot-icon.ts","../../src/lib/components/chat/copilot-chat-code-block-header.ts","../../src/lib/components/chat/markdown.ts","../../src/lib/components/chat/copilot-chat-assistant-message-renderer.ts","../../src/lib/components/chat/copilot-chat-assistant-message-buttons.ts","../../src/lib/components/chat/copilot-chat-assistant-message-toolbar.ts","../../src/lib/components/chat/copilot-chat-view-handlers.ts","../../src/lib/components/chat/copilot-chat-assistant-message.ts","../../src/lib/components/chat/copilot-chat-user-message-renderer.ts","../../src/lib/components/chat/copilot-chat-user-message-buttons.ts","../../src/lib/components/chat/copilot-chat-user-message-toolbar.ts","../../src/lib/components/chat/copilot-chat-user-message-branch-navigation.ts","../../src/lib/components/chat/copilot-chat-attachment-renderer.ts","../../src/lib/components/chat/copilot-chat-user-message-utils.ts","../../src/lib/components/chat/copilot-chat-user-message.ts","../../src/lib/components/chat/copilot-chat-message-view-cursor.ts","../../src/lib/components/chat/copilot-chat-reasoning-message-utils.ts","../../src/lib/components/chat/copilot-chat-reasoning-message.ts","../../src/lib/components/activity/pick-activity-renderer.ts","../../src/lib/components/activity/copilot-activity.ts","../../src/lib/components/chat/copilot-chat-message-view.ts","../../src/lib/components/chat/copilot-chat-view-scroll-to-bottom-button.ts","../../src/lib/components/chat/copilot-chat-suggestion-pill.ts","../../src/lib/components/chat/copilot-chat-suggestion-view.ts","../../src/lib/components/chat/copilot-chat-view-scroll-view.ts","../../src/lib/components/chat/copilot-chat-view-scroll-view.html","../../src/lib/components/chat/copilot-chat-view-feather.ts","../../src/lib/components/chat/copilot-chat-textarea.ts","../../src/lib/components/chat/copilot-chat-input.types.ts","../../src/lib/components/chat/copilot-chat-audio-recorder.ts","../../src/lib/components/chat/copilot-chat-buttons.ts","../../src/lib/components/chat/copilot-chat-toolbar.ts","../../src/lib/components/chat/copilot-chat-tools-menu.ts","../../src/lib/components/chat/copilot-chat-input.ts","../../src/lib/components/chat/copilot-chat-view-disclaimer.ts","../../src/lib/components/chat/copilot-chat-attachment-queue.ts","../../src/lib/components/chat/copilot-chat-view-input-container.ts","../../src/lib/components/chat/copilot-chat-view-input-measure.ts","../../src/lib/components/chat/copilot-chat-view.ts","../../src/lib/components/chat/copilot-chat-attachments.directive.ts","../../src/lib/active-thread-connector.ts","../../src/lib/components/chat/copilot-chat.ts","../../src/lib/components/chat/copilot-chat-input-defaults.ts","../../src/lib/components/chat/copilot-threads-drawer.ts","../../src/lib/components/modal/modal-utils.ts","../../src/lib/components/modal/copilot-popup.ts","../../src/lib/components/modal/docked-sidebar-registry.ts","../../src/lib/components/modal/copilot-sidebar.ts","../../src/copilotkit-angular.ts"],"sourcesContent":["// The license watermark is currently disabled. The implementation below is\n// kept intact so it can be re-enabled by flipping this flag back to `true`.\nexport const LICENSE_WATERMARK_ENABLED = false;\n\nconst WATERMARK_ID = \"copilotkit-license-watermark\";\nconst HEADER_NAME = \"X-CopilotCloud-Public-Api-Key\";\nconst LICENSE_KEY_REGEX = /^ck_pub_[0-9a-f]{32}$/i;\n\n// Accepts the raw record shape (values may be `null`/`undefined` before\n// normalization) so callers can pass a `CopilotKitHeadersSource` record branch\n// straight through without an extra cast.\ntype MaybeHeaderRecord = Record<string, string | null | undefined>;\n\nfunction hasValidLicenseHeader(headers?: MaybeHeaderRecord): boolean {\n if (!headers) return false;\n const key = headers[HEADER_NAME];\n return Boolean(key && LICENSE_KEY_REGEX.test(key));\n}\n\nexport function ensureLicenseWatermark(headers?: MaybeHeaderRecord): void {\n if (!LICENSE_WATERMARK_ENABLED) {\n return;\n }\n\n if (typeof document === \"undefined\" || hasValidLicenseHeader(headers)) {\n return;\n }\n\n if (document.getElementById(WATERMARK_ID)) {\n return;\n }\n\n const watermark = document.createElement(\"div\");\n watermark.id = WATERMARK_ID;\n watermark.setAttribute(\"aria-hidden\", \"true\");\n watermark.textContent = \"CopilotKit Unlicensed\";\n watermark.style.position = \"fixed\";\n watermark.style.right = \"12px\";\n watermark.style.bottom = \"12px\";\n watermark.style.zIndex = \"2147483647\";\n watermark.style.pointerEvents = \"none\";\n watermark.style.userSelect = \"none\";\n watermark.style.padding = \"6px 10px\";\n watermark.style.borderRadius = \"8px\";\n watermark.style.background = \"rgba(17, 24, 39, 0.88)\";\n watermark.style.color = \"#ffffff\";\n watermark.style.fontFamily =\n \"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace\";\n watermark.style.fontSize = \"11px\";\n watermark.style.fontWeight = \"600\";\n watermark.style.letterSpacing = \"0.02em\";\n watermark.style.opacity = \"0.9\";\n watermark.style.boxShadow = \"0 6px 18px rgba(0, 0, 0, 0.25)\";\n\n document.body.appendChild(watermark);\n}\n","import { Provider, Type, inject, InjectionToken } from \"@angular/core\";\nimport { AbstractAgent } from \"@ag-ui/client\";\nimport {\n ClientTool,\n FrontendToolConfig,\n HumanInTheLoopConfig,\n RenderToolCallConfig,\n} from \"./tools\";\nimport { LICENSE_WATERMARK_ENABLED } from \"./license-watermark\";\nimport { RenderActivityMessageConfig } from \"./activity-renderer\";\n// Type-only: a VALUE import here would pull the whole `@copilotkit/core`\n// dist into the app's startup graph, since `config.ts` sits on it\n// (`provideCopilotKit` runs at bootstrap). The public-key header default is\n// wrapped in `copilotkit.ts` instead, which already imports core at runtime\n// (see `ɵresolvePublicKeyHeaderDefaults` below and #1937's bundle-size fix).\nimport type {\n CopilotKitHeadersSource,\n CopilotKitMessageFilter,\n SuggestionsConfig,\n} from \"@copilotkit/core\";\nimport { OpenGenerativeUIConfig } from \"./open-generative-ui\";\nimport { A2UICatalog } from \"./components/a2ui/a2ui-types\";\n\nexport interface A2UIConfig {\n theme?: Record<string, unknown>;\n /**\n * The catalog surfaces render with: `basicCatalog`, or one from\n * `createAngularCatalog`, both in `@copilotkit/angular/a2ui`. Without one,\n * A2UI stays off, even when the runtime enables it.\n */\n catalog?: A2UICatalog;\n /** Shown until the first surface renders. */\n loadingComponent?: Type<unknown>;\n includeSchema?: boolean;\n recovery?: A2UIRecoveryOptions;\n}\n\nexport interface A2UIRecoveryOptions {\n /** Delay before revealing a transient retry. Defaults to 2000ms. */\n showAfterMs?: number;\n /** Attempt number that reveals retry state immediately. Defaults to 2. */\n showAfterAttempts?: number;\n /** Client diagnostic visibility, overridden by server lifecycle content. */\n debugExposure?: \"hidden\" | \"collapsed\" | \"verbose\";\n}\n\nexport interface CopilotKitConfig {\n runtimeUrl?: string;\n /**\n * Headers sent with every runtime request: a record, or a sync or async\n * builder evaluated when each request is sent. See #1937.\n */\n headers?: CopilotKitHeadersSource;\n /** Fetch credentials mode used for CopilotKit runtime requests. */\n credentials?: RequestCredentials;\n /**\n * Rewrites the message list sent to runtime agents on every run.\n *\n * CopilotKit sends the whole thread each time. When your agent already\n * stores the conversation, most of that payload is waste, and an agent that\n * merges the inbound list with its own store can show the model every turn\n * twice. Return the messages to send:\n *\n * ```ts\n * provideCopilotKit({\n * runtimeUrl: \"/api/copilotkit\",\n * messageFilter: (messages) => messages.slice(-1),\n * });\n * ```\n *\n * The filter changes the request body only. The transcript the UI renders is\n * untouched. Broken tool-call pairs are repaired before the request is sent,\n * so a filter this blunt cannot strand a tool result mid-HITL.\n *\n * Agents reached through your CopilotRuntime honor this. An agent your app\n * passes in directly does not, and neither Intelligence runs nor suggestion\n * runs are ever filtered.\n */\n messageFilter?: CopilotKitMessageFilter;\n licenseKey?: string;\n properties?: Record<string, unknown>;\n agents?: Record<string, AbstractAgent>;\n selfManagedAgents?: Record<string, AbstractAgent>;\n tools?: ClientTool[];\n renderToolCalls?: RenderToolCallConfig[];\n renderActivityMessages?: RenderActivityMessageConfig[];\n suggestionsConfig?: SuggestionsConfig[];\n frontendTools?: FrontendToolConfig[];\n humanInTheLoop?: HumanInTheLoopConfig[];\n /** Opt in to a text-only renderer for otherwise unknown tool calls. */\n defaultToolRendering?: boolean;\n a2ui?: A2UIConfig;\n openGenerativeUI?: OpenGenerativeUIConfig;\n /**\n * Disable the CopilotKit Inspector in development.\n * The Inspector is enabled by default in development browser builds and is\n * always disabled in production and during server rendering.\n */\n enableInspector?: boolean;\n}\n\nconst COPILOT_CLOUD_PUBLIC_API_KEY_HEADER = \"X-CopilotCloud-Public-Api-Key\";\nconst COPILOT_CLOUD_PUBLIC_API_KEY_REGEX = /^ck_pub_[0-9a-f]{32}$/i;\nconst LICENSE_WATERMARK_LOG_FLAG = \"__copilotkitAngularLicenseWatermarkLogged\";\n\ntype ResolvedLicense = {\n key?: string;\n valid: boolean;\n warning?: string;\n};\n\nfunction logLicenseWatermarkWarning(message: string): void {\n const globalWindow = globalThis as typeof globalThis & {\n [LICENSE_WATERMARK_LOG_FLAG]?: boolean;\n };\n if (globalWindow[LICENSE_WATERMARK_LOG_FLAG]) {\n return;\n }\n globalWindow[LICENSE_WATERMARK_LOG_FLAG] = true;\n\n console.warn(\n [\n \"========================================\",\n \"[CopilotKit] License Required\",\n message,\n \"Get your CopilotCloud license key and add it as `licenseKey` to remove this watermark.\",\n \"========================================\",\n ].join(\"\\n\"),\n );\n}\n\nfunction resolveLicense(config: CopilotKitConfig): ResolvedLicense {\n // A builder is only evaluated at send time, so it can't be read here. Rely\n // on `licenseKey` in that case (same fallback the record branch already has).\n const headerKey =\n typeof config.headers === \"function\"\n ? undefined\n : config.headers?.[COPILOT_CLOUD_PUBLIC_API_KEY_HEADER];\n const key = config.licenseKey ?? headerKey;\n\n if (!key) {\n return {\n valid: false,\n warning:\n \"No CopilotCloud license key was found. A watermark will be shown until one is added.\",\n };\n }\n\n if (!COPILOT_CLOUD_PUBLIC_API_KEY_REGEX.test(key)) {\n return {\n key,\n valid: false,\n warning:\n \"Your CopilotCloud license key appears invalid. A watermark will be shown until a valid key is added.\",\n };\n }\n\n return { key, valid: true };\n}\n\nexport const COPILOT_KIT_CONFIG = new InjectionToken<CopilotKitConfig>(\n \"COPILOT_KIT_CONFIG\",\n);\n\nexport function injectCopilotKitConfig(): CopilotKitConfig {\n return inject(COPILOT_KIT_CONFIG);\n}\n\n/**\n * The public-key header default `provideCopilotKit` used to merge directly\n * into `config.headers` (main's behavior, record-only). Now that `headers`\n * can be a builder (#1937), the merge can't happen here — a builder is only\n * evaluated at send time — so `copilotkit.ts` applies these defaults itself,\n * via `ɵwithHeaderDefaults`, where `CopilotKitCore` is constructed and\n * wherever `setHeaders` is called. Kept in this file (rather than\n * `copilotkit.ts`) so the license-key condition has one definition, shared\n * with `resolveLicense`'s watermark check below; this function itself stays\n * a plain computation with no `@copilotkit/core` value import.\n */\nexport function ɵresolvePublicKeyHeaderDefaults(\n config: CopilotKitConfig,\n): Record<string, string> {\n const resolvedLicense = resolveLicense(config);\n return !resolvedLicense.valid || !resolvedLicense.key\n ? {}\n : { [COPILOT_CLOUD_PUBLIC_API_KEY_HEADER]: resolvedLicense.key };\n}\n\nexport function provideCopilotKit(config: CopilotKitConfig = {}): Provider {\n const resolvedLicense = resolveLicense(config);\n if (\n LICENSE_WATERMARK_ENABLED &&\n !resolvedLicense.valid &&\n resolvedLicense.warning\n ) {\n logLicenseWatermarkWarning(resolvedLicense.warning);\n }\n\n return {\n provide: COPILOT_KIT_CONFIG,\n useValue: config,\n };\n}\n","import {\n DestroyRef,\n InjectionToken,\n Type,\n Signal,\n inject,\n} from \"@angular/core\";\nimport type { AbstractAgent, ActivityMessage } from \"@ag-ui/client\";\nimport { CopilotKit } from \"./copilotkit\";\n\nexport type AngularActivityContentParseResult<T> =\n | { success: true; data: T }\n | { success: false; error?: unknown };\n\nexport interface AngularActivityContentSchema<T> {\n safeParse(content: unknown): AngularActivityContentParseResult<T>;\n}\n\nexport interface ActivityRenderer<TActivityContent = unknown> {\n activityType: Signal<string>;\n content: Signal<TActivityContent>;\n message: Signal<ActivityMessage>;\n agent: Signal<AbstractAgent | undefined>;\n}\n\nexport interface RenderActivityMessageConfig<TActivityContent = unknown> {\n activityType: string;\n agentId?: string;\n content: AngularActivityContentSchema<TActivityContent>;\n component: Type<ActivityRenderer<TActivityContent>>;\n}\n\n/**\n * Extension point used by optional secondary entry points to contribute\n * lower-precedence built-in activity renderers.\n *\n * @internal\n */\nexport const ɵCOPILOTKIT_BUILT_IN_ACTIVITY_RENDERERS = new InjectionToken<\n RenderActivityMessageConfig[]\n>(\"COPILOTKIT_BUILT_IN_ACTIVITY_RENDERERS\", { factory: () => [] });\n\nexport const anyActivityContentSchema: AngularActivityContentSchema<unknown> = {\n safeParse: (content: unknown) => ({ success: true, data: content }),\n};\n\n/** Register an activity renderer for the lifetime of the current injector. */\nexport function registerRenderActivityMessage(\n config: RenderActivityMessageConfig,\n): void {\n const copilotKit = inject(CopilotKit);\n const destroyRef = inject(DestroyRef);\n\n copilotKit.addRenderActivityMessage(config);\n destroyRef.onDestroy(() => copilotKit.removeRenderActivityMessage(config));\n}\n","import { Injectable } from \"@angular/core\";\nimport {\n filter,\n lastValueFrom,\n map,\n Observable,\n Subject,\n take,\n takeUntil,\n} from \"rxjs\";\n\n@Injectable({ providedIn: \"root\" })\nexport class HumanInTheLoop {\n results = new Subject<{\n toolCallId: string;\n toolName: string;\n result: unknown;\n }>();\n\n addResult(toolCallId: string, toolName: string, result: unknown) {\n this.results.next({ toolCallId, toolName, result });\n }\n\n onResult(\n toolCallId: string,\n toolName: string,\n signal?: AbortSignal,\n ): Promise<unknown> {\n const result = this.results.pipe(\n filter(\n (entry) =>\n entry.toolCallId === toolCallId && entry.toolName === toolName,\n ),\n take(1),\n // Resolve with the bare result. toolCallId/toolName are routing keys for\n // this bus only — leaking them would make the tool result an envelope\n // that no consumer expects.\n map((entry) => entry.result),\n );\n if (!signal) return lastValueFrom(result);\n\n const aborted = new Observable<never>((subscriber) => {\n const onAbort = () =>\n subscriber.error(new Error(\"Human-in-the-loop interaction aborted\"));\n if (signal.aborted) {\n onAbort();\n return;\n }\n signal.addEventListener(\"abort\", onAbort, { once: true });\n return () => signal.removeEventListener(\"abort\", onAbort);\n });\n\n // Completing the result detaches the abort listener. An abort errors the\n // stream, rejecting the promise and unsubscribing from results.\n return lastValueFrom(result.pipe(takeUntil(aborted)));\n }\n}\n","import {\n effect,\n untracked,\n type CreateEffectOptions,\n type EffectCleanupRegisterFn,\n type EffectRef,\n} from \"@angular/core\";\n\n/**\n * Creates an effect whose reactive dependencies are stated up front.\n *\n * `deps` is the only reactive scope: every signal read there is tracked, and\n * nothing read in `run` is. That split is the point — a plain `effect()` tracks\n * whatever its body happens to touch, so an incidental signal read buried in\n * imperative code silently becomes a re-run trigger. Here the trigger set is\n * the first function, and a reader does not have to trace the body to find it.\n *\n * @param deps - Reactive computation; signals read here drive re-runs.\n * @param run - Imperative body, always invoked untracked. Receives the value\n * `deps` returned and the effect's cleanup registration function.\n * @param options - Standard Angular effect options (`injector`, `manualCleanup`).\n * @returns The underlying {@link EffectRef}, so callers can `destroy()` it.\n *\n * @example\n * ```ts\n * explicitEffect(\n * () => ({ threadId: threadId(), agentId: agentId() }),\n * ({ threadId, agentId }, onCleanup) => {\n * const connection = connect(agentId, threadId);\n * onCleanup(() => connection.close());\n * },\n * );\n * ```\n *\n * @example\n * ```ts\n * explicitEffect(\n * threadId,\n * (threadId) => {\n * console.log(threadId);\n * },\n * );\n * ```\n */\nexport function explicitEffect<T>(\n deps: () => T,\n run: (value: T, onCleanup: EffectCleanupRegisterFn) => void,\n options?: CreateEffectOptions,\n): EffectRef {\n return effect((onCleanup) => {\n const value = deps();\n untracked(() => run(value, onCleanup));\n }, options);\n}\n","import { AbstractAgent } from \"@ag-ui/client\";\nimport { A2UIClientEventMessage, A2UISurfaceError } from \"./a2ui-types\";\n\nexport const A2UI_OPERATIONS_KEY = \"a2ui_operations\";\n\nexport type A2UIOperation = Record<string, unknown>;\n\ntype CopilotKitActionBridge = {\n core: {\n properties: Record<string, unknown>;\n setProperties(properties: Record<string, unknown>): void;\n runAgent(options: { agent: AbstractAgent }): Promise<unknown>;\n };\n};\n\nexport function isRecord(value: unknown): value is Record<string, unknown> {\n return Boolean(value && typeof value === \"object\" && !Array.isArray(value));\n}\n\nexport function getA2UIOperations(content: unknown): A2UIOperation[] {\n if (!isRecord(content)) return [];\n\n const operations = content[A2UI_OPERATIONS_KEY] ?? content.operations;\n if (!Array.isArray(operations)) return [];\n return operations.filter(isRecord);\n}\n\n/** Whether operations can paint visible static or data-bound content. */\nexport function surfaceHasRenderableContent(\n operations: readonly A2UIOperation[],\n): boolean {\n const componentOperations = operations.filter((operation) =>\n isRecord(operation[\"updateComponents\"]),\n );\n if (componentOperations.length === 0) return false;\n const requiresData = JSON.stringify(componentOperations).includes('\"path\"');\n if (!requiresData) return true;\n return operations.some((operation) => {\n const update = operation[\"updateDataModel\"];\n if (!isRecord(update) || !isRecord(update[\"value\"])) return false;\n return Object.values(update[\"value\"]).some((value) =>\n Array.isArray(value)\n ? value.length > 0\n : value !== null && value !== undefined && value !== \"\",\n );\n });\n}\n\nexport function logA2UIRenderError(error: A2UISurfaceError): void {\n console.warn(\"[A2UI Angular] render error:\", error);\n}\n\nexport async function bridgeA2UIAction(\n copilotKit: CopilotKitActionBridge | null | undefined,\n agent: AbstractAgent | undefined,\n message: A2UIClientEventMessage,\n): Promise<void> {\n if (!copilotKit || !agent) return;\n\n try {\n copilotKit.core.setProperties({\n ...copilotKit.core.properties,\n a2uiAction: message,\n });\n await copilotKit.core.runAgent({ agent });\n } finally {\n const { a2uiAction: _a2uiAction, ...rest } = copilotKit.core.properties;\n copilotKit.core.setProperties(rest);\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n computed,\n input,\n signal,\n} from \"@angular/core\";\n\nimport type { AngularToolCall, ToolRenderer } from \"../../tools\";\n\n/** Serialize untrusted tool values defensively for text-only display. */\nexport function safeToolValue(value: unknown): string {\n if (typeof value === \"string\") return value;\n const seen = new WeakSet<object>();\n try {\n const serialized = JSON.stringify(\n value,\n (_key, candidate: unknown) => {\n if (typeof candidate === \"bigint\") return `${candidate.toString()}n`;\n if (typeof candidate === \"undefined\") return \"[Undefined]\";\n if (typeof candidate === \"function\") return \"[Function]\";\n if (typeof candidate === \"symbol\") return candidate.toString();\n if (typeof candidate === \"object\" && candidate !== null) {\n if (seen.has(candidate)) return \"[Circular]\";\n seen.add(candidate);\n }\n return candidate;\n },\n 2,\n );\n return serialized ?? String(value);\n } catch {\n return \"[Unserializable value]\";\n }\n}\n\n/** Opt-in text-only fallback for tool calls without an application renderer. */\n@Component({\n selector: \"copilot-default-tool-renderer\",\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { class: \"copilot-default-tool-renderer\" },\n template: `\n <article\n class=\"tool-card\"\n data-testid=\"copilot-tool-render\"\n [attr.data-tool-name]=\"toolCall().name || 'unknown'\"\n [attr.data-status]=\"statusValue()\"\n >\n <button\n type=\"button\"\n class=\"tool-summary\"\n [attr.aria-expanded]=\"expanded()\"\n (click)=\"toggleExpanded()\"\n >\n <span class=\"tool-name\">{{ toolCall().name || \"Tool call\" }}</span>\n <span\n class=\"tool-status\"\n data-testid=\"copilot-tool-render-status\"\n aria-live=\"polite\"\n >{{ statusLabel() }}</span\n >\n <span aria-hidden=\"true\">{{ expanded() ? \"▾\" : \"▸\" }}</span>\n </button>\n @if (expanded()) {\n <div class=\"tool-details\">\n <h3>Arguments</h3>\n <pre>{{ argumentsText() }}</pre>\n @if (toolCall().result !== undefined) {\n <h3>Result</h3>\n <pre>{{ resultText() }}</pre>\n }\n </div>\n }\n </article>\n `,\n styles: `\n :host {\n display: block;\n margin-block: 0.5rem;\n }\n .tool-card {\n overflow: hidden;\n border: 1px solid #dbe3eb;\n border-radius: 0.5rem;\n color: #1e293b;\n background: #f8fafc;\n }\n .tool-summary {\n display: grid;\n width: 100%;\n grid-template-columns: minmax(0, 1fr) auto auto;\n align-items: center;\n gap: 0.75rem;\n padding: 0.65rem 0.75rem;\n border: 0;\n color: inherit;\n background: transparent;\n text-align: left;\n cursor: pointer;\n }\n .tool-summary:focus-visible {\n outline: 3px solid #2563eb;\n outline-offset: -3px;\n }\n .tool-name {\n overflow-wrap: anywhere;\n font-family: ui-monospace, SFMono-Regular, Menlo, monospace;\n font-size: 0.8125rem;\n font-weight: 600;\n }\n .tool-status {\n color: #52637a;\n font-size: 0.75rem;\n }\n .tool-details {\n padding: 0 0.75rem 0.75rem;\n border-top: 1px solid #dbe3eb;\n }\n .tool-details h3 {\n margin: 0.75rem 0 0.25rem;\n font-size: 0.75rem;\n }\n .tool-details pre {\n max-height: 16rem;\n margin: 0;\n overflow: auto;\n white-space: pre-wrap;\n overflow-wrap: anywhere;\n font-size: 0.75rem;\n }\n `,\n})\nexport class CopilotDefaultToolRenderer implements ToolRenderer {\n readonly toolCall = input.required<AngularToolCall>();\n protected readonly expanded = signal(false);\n protected readonly argumentsText = computed(() =>\n safeToolValue(this.toolCall().args),\n );\n protected readonly resultText = computed(() =>\n safeToolValue(this.toolCall().result),\n );\n protected readonly statusValue = computed(() => {\n switch (this.toolCall().status as string) {\n case \"in-progress\":\n return \"inProgress\";\n case \"executing\":\n case \"complete\":\n return this.toolCall().status as string;\n default:\n return \"unknown\";\n }\n });\n protected readonly statusLabel = computed(() => {\n switch (this.toolCall().status as string) {\n case \"in-progress\":\n return \"Preparing\";\n case \"executing\":\n return \"Running\";\n case \"complete\":\n return \"Complete\";\n default:\n return \"Unknown status\";\n }\n });\n\n protected toggleExpanded(): void {\n this.expanded.update((value) => !value);\n }\n}\n","import { ChangeDetectionStrategy, Component, input } from \"@angular/core\";\n\n/**\n * Presentational loading placeholder shown while an A2UI tool call is still\n * streaming. Renders an animated skeleton card whose rows reveal as the\n * estimated token count climbs through `phase`.\n */\n@Component({\n selector: \"copilot-a2ui-progress\",\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <div\n class=\"copilot-a2ui-progress\"\n data-testid=\"a2ui-progress\"\n role=\"status\"\n aria-live=\"polite\"\n >\n <div class=\"copilot-a2ui-progress-card\">\n <div class=\"copilot-a2ui-topbar\">\n <div class=\"copilot-a2ui-dot-group\">\n <span class=\"copilot-a2ui-dot\"></span>\n <span class=\"copilot-a2ui-dot\"></span>\n <span class=\"copilot-a2ui-dot\"></span>\n </div>\n <span [class]=\"topbarBarClass()\"></span>\n </div>\n\n <div class=\"copilot-a2ui-lines\">\n <div [class]=\"rowClass(0, 'cpk:[transition-delay:0s]')\">\n <span\n class=\"copilot-a2ui-bar cpk:w-[36px] cpk:h-[7px] cpk:bg-[rgba(147,197,253,0.7)] cpk:[animation-delay:0s]\"\n ></span>\n <span\n class=\"copilot-a2ui-bar cpk:w-20 cpk:h-[7px] cpk:bg-[rgba(219,234,254,0.8)] cpk:[animation-delay:0.2s]\"\n ></span>\n </div>\n\n <div [class]=\"rowClass(0, 'cpk:[transition-delay:0.1s]')\">\n <span class=\"copilot-a2ui-spacer\"></span>\n <span class=\"copilot-a2ui-dot\"></span>\n <span\n class=\"copilot-a2ui-bar cpk:w-[100px] cpk:h-[7px] cpk:bg-[rgba(24,24,27,0.2)] cpk:[animation-delay:0.3s]\"\n ></span>\n </div>\n\n <div [class]=\"rowClass(1, 'cpk:[transition-delay:0.15s]')\">\n <span class=\"copilot-a2ui-spacer\"></span>\n <span\n class=\"copilot-a2ui-bar cpk:w-12 cpk:h-[7px] cpk:bg-[rgba(24,24,27,0.15)] cpk:[animation-delay:0.1s]\"\n ></span>\n <span\n class=\"copilot-a2ui-bar cpk:w-10 cpk:h-[7px] cpk:bg-[rgba(153,246,228,0.6)] cpk:[animation-delay:0.5s]\"\n ></span>\n <span\n class=\"copilot-a2ui-bar cpk:w-14 cpk:h-[7px] cpk:bg-[rgba(147,197,253,0.6)] cpk:[animation-delay:0.3s]\"\n ></span>\n </div>\n\n <div [class]=\"rowClass(1, 'cpk:[transition-delay:0.2s]')\">\n <span class=\"copilot-a2ui-spacer\"></span>\n <span class=\"copilot-a2ui-dot\"></span>\n <span\n class=\"copilot-a2ui-bar cpk:w-[60px] cpk:h-[7px] cpk:bg-[rgba(24,24,27,0.15)] cpk:[animation-delay:0.4s]\"\n ></span>\n </div>\n\n <div [class]=\"rowClass(2, 'cpk:[transition-delay:0.25s]')\">\n <span\n class=\"copilot-a2ui-bar cpk:w-10 cpk:h-[7px] cpk:bg-[rgba(153,246,228,0.5)] cpk:[animation-delay:0.2s]\"\n ></span>\n <span class=\"copilot-a2ui-dot\"></span>\n <span\n class=\"copilot-a2ui-bar cpk:w-12 cpk:h-[7px] cpk:bg-[rgba(24,24,27,0.15)] cpk:[animation-delay:0.6s]\"\n ></span>\n <span\n class=\"copilot-a2ui-bar cpk:w-16 cpk:h-[7px] cpk:bg-[rgba(147,197,253,0.5)] cpk:[animation-delay:0.1s]\"\n ></span>\n </div>\n\n <div [class]=\"rowClass(2, 'cpk:[transition-delay:0.3s]')\">\n <span\n class=\"copilot-a2ui-bar cpk:w-[36px] cpk:h-[7px] cpk:bg-[rgba(147,197,253,0.6)] cpk:[animation-delay:0.5s]\"\n ></span>\n <span\n class=\"copilot-a2ui-bar cpk:w-[36px] cpk:h-[7px] cpk:bg-[rgba(24,24,27,0.12)] cpk:[animation-delay:0.7s]\"\n ></span>\n </div>\n\n <div [class]=\"rowClass(3, 'cpk:[transition-delay:0.35s]')\">\n <span class=\"copilot-a2ui-dot\"></span>\n <span\n class=\"copilot-a2ui-bar cpk:w-11 cpk:h-[7px] cpk:bg-[rgba(24,24,27,0.18)] cpk:[animation-delay:0.3s]\"\n ></span>\n <span class=\"copilot-a2ui-dot\"></span>\n <span\n class=\"copilot-a2ui-bar cpk:w-14 cpk:h-[7px] cpk:bg-[rgba(153,246,228,0.5)] cpk:[animation-delay:0.8s]\"\n ></span>\n <span\n class=\"copilot-a2ui-bar cpk:w-12 cpk:h-[7px] cpk:bg-[rgba(147,197,253,0.5)] cpk:[animation-delay:0.4s]\"\n ></span>\n </div>\n </div>\n\n <div class=\"copilot-a2ui-shimmer\"></div>\n </div>\n\n <div class=\"copilot-a2ui-label\">\n <span>{{ label() }}</span>\n @if (tokens() > 0) {\n <span class=\"copilot-a2ui-token-count\">\n ~{{ tokens().toLocaleString() }} tokens\n </span>\n }\n </div>\n </div>\n `,\n styles: [\n `\n .copilot-a2ui-progress {\n margin: 12px 0;\n max-width: 320px;\n }\n\n .copilot-a2ui-progress-card {\n position: relative;\n overflow: hidden;\n border-radius: 12px;\n border: 1px solid rgba(228, 228, 231, 0.8);\n background-color: #fff;\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);\n padding: 16px 18px 14px;\n }\n\n .copilot-a2ui-topbar,\n .copilot-a2ui-row,\n .copilot-a2ui-label,\n .copilot-a2ui-dot-group {\n display: flex;\n align-items: center;\n }\n\n .copilot-a2ui-topbar {\n gap: 8px;\n margin-bottom: 12px;\n }\n\n .copilot-a2ui-dot-group,\n .copilot-a2ui-row {\n gap: 6px;\n }\n\n .copilot-a2ui-lines {\n display: grid;\n gap: 7px;\n }\n\n .copilot-a2ui-row {\n transition-property: opacity;\n transition-duration: 0.4s;\n }\n\n .copilot-a2ui-dot {\n width: 7px;\n height: 7px;\n border-radius: 9999px;\n background-color: #d4d4d8;\n flex-shrink: 0;\n }\n\n .copilot-a2ui-spacer {\n width: 12px;\n flex: 0 0 12px;\n }\n\n .copilot-a2ui-bar {\n display: inline-flex;\n border-radius: 9999px;\n animation: copilot-a2ui-fade 2.4s ease-in-out infinite;\n }\n\n .copilot-a2ui-shimmer {\n pointer-events: none;\n position: absolute;\n inset: 0;\n background: linear-gradient(\n 105deg,\n transparent 0%,\n transparent 40%,\n rgba(255, 255, 255, 0.6) 50%,\n transparent 60%,\n transparent 100%\n );\n background-size: 250% 100%;\n animation: copilot-a2ui-sweep 3s ease-in-out infinite;\n }\n\n .copilot-a2ui-label {\n justify-content: center;\n gap: 8px;\n margin-top: 8px;\n font-size: 12px;\n color: #a1a1aa;\n }\n\n .copilot-a2ui-token-count {\n font-size: 11px;\n color: #d4d4d8;\n font-variant-numeric: tabular-nums;\n }\n\n @keyframes copilot-a2ui-fade {\n 0%,\n 100% {\n opacity: 1;\n }\n 50% {\n opacity: 0.5;\n }\n }\n\n @keyframes copilot-a2ui-sweep {\n 0% {\n background-position: 250% 0;\n }\n 100% {\n background-position: -250% 0;\n }\n }\n\n @media (prefers-reduced-motion: reduce) {\n .copilot-a2ui-bar,\n .copilot-a2ui-shimmer {\n animation: none;\n }\n }\n `,\n ],\n})\nexport class CopilotA2UIProgress {\n readonly phase = input.required<number>();\n readonly tokens = input(0);\n readonly label = input(\"Building interface\");\n\n protected topbarBarClass(): string {\n return [\n \"copilot-a2ui-bar\",\n \"cpk:w-16\",\n \"cpk:h-1.5\",\n \"cpk:bg-[#e4e4e7]\",\n this.phase() >= 1 ? \"cpk:opacity-100\" : \"cpk:opacity-40\",\n ].join(\" \");\n }\n\n protected rowClass(phase: number, delayClass: string): string {\n return [\n \"copilot-a2ui-row\",\n delayClass,\n this.phase() >= phase ? \"cpk:opacity-100\" : \"cpk:opacity-0\",\n ].join(\" \");\n }\n}\n","import { isPlatformBrowser } from \"@angular/common\";\nimport {\n ChangeDetectionStrategy,\n Component,\n NgZone,\n PLATFORM_ID,\n computed,\n inject,\n input,\n signal,\n} from \"@angular/core\";\n\nimport type { A2UIRecoveryOptions } from \"../../config\";\nimport { explicitEffect } from \"../../explicit-effect\";\nimport { safeToolValue } from \"../tools/default-tool-renderer\";\nimport { CopilotA2UIProgress } from \"./a2ui-progress\";\nimport { isRecord } from \"./a2ui-surface-host\";\n\nexport type A2UIDebugExposure = \"hidden\" | \"collapsed\" | \"verbose\";\nexport type A2UILifecycleStatus = \"building\" | \"retrying\" | \"failed\";\n\nexport interface A2UILifecycleContent {\n status: A2UILifecycleStatus;\n attempt?: number;\n maxAttempts?: number;\n progressTokens?: number;\n error?: string;\n errors?: unknown[];\n attempts?: unknown[];\n debugExposure?: A2UIDebugExposure;\n}\n\n/** Read only the server-owned A2UI lifecycle fields from activity content. */\nexport function readA2UILifecycleContent(\n content: unknown,\n): A2UILifecycleContent {\n if (!isRecord(content)) return { status: \"building\" };\n const status =\n content[\"status\"] === \"retrying\" || content[\"status\"] === \"failed\"\n ? content[\"status\"]\n : \"building\";\n const debugExposure =\n content[\"debugExposure\"] === \"hidden\" ||\n content[\"debugExposure\"] === \"verbose\" ||\n content[\"debugExposure\"] === \"collapsed\"\n ? content[\"debugExposure\"]\n : undefined;\n return {\n status,\n attempt:\n typeof content[\"attempt\"] === \"number\" ? content[\"attempt\"] : undefined,\n maxAttempts:\n typeof content[\"maxAttempts\"] === \"number\"\n ? content[\"maxAttempts\"]\n : undefined,\n progressTokens:\n typeof content[\"progressTokens\"] === \"number\"\n ? content[\"progressTokens\"]\n : undefined,\n error: typeof content[\"error\"] === \"string\" ? content[\"error\"] : undefined,\n errors: Array.isArray(content[\"errors\"]) ? content[\"errors\"] : undefined,\n attempts: Array.isArray(content[\"attempts\"])\n ? content[\"attempts\"]\n : undefined,\n debugExposure,\n };\n}\n\n/** Pre-paint building, retry, and failure UI for a stable A2UI activity. */\n@Component({\n selector: \"copilot-a2ui-recovery\",\n imports: [CopilotA2UIProgress],\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n @if (lifecycle().status === \"failed\") {\n <section class=\"failure\" role=\"status\" data-testid=\"a2ui-failure\">\n <strong>Couldn't generate the UI</strong>\n <p>\n Something went wrong rendering this. You can keep chatting and try again.\n </p>\n @if (debugExposure() !== \"hidden\") {\n <details [attr.open]=\"debugExposure() === 'verbose' ? '' : null\">\n <summary>Developer details</summary>\n <pre>{{ failureDiagnostics() }}</pre>\n </details>\n }\n </section>\n } @else {\n <copilot-a2ui-progress\n [phase]=\"phase()\"\n [tokens]=\"lifecycle().progressTokens ?? 0\"\n [label]=\"label()\"\n />\n @if (\n lifecycle().status === \"retrying\" &&\n retryRevealed() &&\n debugExposure() !== \"hidden\" &&\n (lifecycle().errors?.length ?? 0) > 0\n ) {\n <details\n class=\"diagnostics\"\n [attr.open]=\"debugExposure() === 'verbose' ? '' : null\"\n >\n <summary>Validation issues</summary>\n <pre>{{ retryDiagnostics() }}</pre>\n </details>\n }\n }\n `,\n styles: `\n .failure {\n margin-block: 0.75rem;\n max-width: 32rem;\n padding: 0.75rem;\n border: 1px solid #fde68a;\n border-radius: 0.5rem;\n color: #92400e;\n background: #fffbeb;\n font-size: 0.875rem;\n }\n .failure p {\n margin: 0.25rem 0 0;\n font-size: 0.75rem;\n }\n details {\n margin-top: 0.5rem;\n font-size: 0.75rem;\n }\n summary {\n cursor: pointer;\n }\n pre {\n max-height: 14rem;\n overflow: auto;\n white-space: pre-wrap;\n overflow-wrap: anywhere;\n }\n .diagnostics {\n max-width: 32rem;\n color: #52525b;\n }\n `,\n})\nexport class CopilotA2UIRecovery {\n readonly content = input.required<unknown>();\n readonly options = input<A2UIRecoveryOptions | undefined>();\n readonly lifecycle = computed(() => readA2UILifecycleContent(this.content()));\n readonly retryRevealed = signal(false);\n readonly debugExposure = computed(\n () =>\n this.lifecycle().debugExposure ??\n this.options()?.debugExposure ??\n \"collapsed\",\n );\n readonly label = computed(() => {\n const lifecycle = this.lifecycle();\n if (lifecycle.status !== \"retrying\" || !this.retryRevealed()) {\n return \"Building interface\";\n }\n return lifecycle.attempt !== undefined &&\n lifecycle.maxAttempts !== undefined\n ? `Retrying generation… (${lifecycle.attempt}/${lifecycle.maxAttempts} attempts)`\n : \"Retrying generation…\";\n });\n readonly phase = computed(() => {\n const tokens = this.lifecycle().progressTokens;\n if (tokens === undefined) return 3;\n if (tokens < 50) return 0;\n if (tokens < 200) return 1;\n if (tokens < 400) return 2;\n return 3;\n });\n readonly failureDiagnostics = computed(() =>\n safeToolValue({\n error: this.lifecycle().error,\n attempts: this.lifecycle().attempts,\n }),\n );\n readonly retryDiagnostics = computed(() =>\n safeToolValue({\n attempt: this.lifecycle().attempt,\n errors: this.lifecycle().errors,\n }),\n );\n readonly #platformId = inject(PLATFORM_ID);\n readonly #zone = inject(NgZone);\n\n constructor() {\n explicitEffect(\n () => ({ lifecycle: this.lifecycle(), options: this.options() }),\n ({ lifecycle, options }, onCleanup) => {\n this.retryRevealed.set(false);\n if (lifecycle.status !== \"retrying\") return;\n\n const showAfterAttempts = options?.showAfterAttempts ?? 2;\n if (\n lifecycle.attempt !== undefined &&\n lifecycle.attempt >= showAfterAttempts\n ) {\n this.retryRevealed.set(true);\n return;\n }\n if (!isPlatformBrowser(this.#platformId)) return;\n const timeout = this.#zone.runOutsideAngular(() =>\n globalThis.setTimeout(\n () => this.#zone.run(() => this.retryRevealed.set(true)),\n options?.showAfterMs ?? 2000,\n ),\n );\n onCleanup(() => globalThis.clearTimeout(timeout));\n },\n );\n }\n}\n","import type { Type, TemplateRef, Injector } from \"@angular/core\";\nimport { InjectionToken } from \"@angular/core\";\n\n/**\n * Represents a value that can be used as a slot override.\n * Can be a component type or template reference only.\n * @internal - This type is for internal use only\n */\nexport type SlotValue<T = any> = Type<T> | TemplateRef<T>;\n\n/**\n * Handlers for a slot component's outputs, keyed by the output's public\n * (template) name. Keys that do not match a declared output are ignored.\n */\nexport type SlotOutputs = Record<string, (event: any) => void>;\n\n/**\n * Configuration for a slot\n * @internal - This interface is for internal use only\n */\nexport interface SlotConfig<T = any> {\n value?: SlotValue<T>;\n default?: Type<T>;\n}\n\n/**\n * Context passed to slot templates\n */\nexport interface SlotContext<T = any> {\n $implicit: T;\n props?: Partial<T>;\n [key: string]: any;\n}\n\n/**\n * Slot registry entry\n * @internal - This interface is for internal use only\n */\nexport interface SlotRegistryEntry<T = any> {\n component?: Type<T>;\n template?: TemplateRef<T>;\n}\n\n/**\n * Options for rendering a slot\n */\nexport interface RenderSlotOptions<T = any> {\n slot?: SlotValue<T>;\n defaultComponent: Type<T>;\n props?: Partial<T>;\n injector?: Injector;\n outputs?: SlotOutputs;\n}\n\n/**\n * Injection token for slot configuration\n */\nexport const SLOT_CONFIG = new InjectionToken<\n ReadonlyMap<string, SlotRegistryEntry>\n>(\"SLOT_CONFIG\");\n\n/**\n * Type for components with slots\n */\nexport type WithSlots<S extends Record<string, Type<any>>, Rest = object> = {\n [K in keyof S as `${string & K}Component`]?: Type<any>;\n} & {\n [K in keyof S as `${string & K}Template`]?: TemplateRef<any>;\n} & {\n [K in keyof S as `${string & K}Class`]?: string;\n} & Rest;\n","import type {\n Binding,\n ComponentRef,\n EmbeddedViewRef,\n Type,\n ViewContainerRef,\n} from \"@angular/core\";\nimport {\n TemplateRef,\n inject,\n inputBinding,\n outputBinding,\n reflectComponentType,\n} from \"@angular/core\";\nimport type {\n SlotValue,\n SlotOutputs,\n RenderSlotOptions,\n SlotRegistryEntry,\n} from \"./slot.types\";\nimport { SLOT_CONFIG } from \"./slot.types\";\n\n/**\n * Returns the component inputs that should be bound for the current context.\n *\n * Context keys are matched against public (template) input names so unknown\n * keys are ignored without overwriting defaults for omitted inputs. A `props`\n * input retains the legacy aggregate-context behavior.\n */\nexport function slotInputNames(\n type: Type<unknown>,\n context: unknown,\n): string[] {\n const mirror = reflectComponentType(type);\n if (!mirror) return [];\n\n if (\n context != null &&\n mirror.inputs.some(({ templateName }) => templateName === \"props\")\n ) {\n return [\"props\"];\n }\n\n const contextKeys = new Set(\n Object.keys((context as Record<string, unknown> | undefined) ?? {}),\n );\n return mirror.inputs\n .filter(({ templateName }) => contextKeys.has(templateName))\n .map(({ templateName }) => templateName);\n}\n\n/**\n * Builds `createComponent` bindings for a slot component.\n *\n * The input-name set is fixed for the lifetime of the component; callers must\n * recreate the component when {@link slotInputNames} changes. Input values and\n * output handlers remain live through their getters. Every declared output is\n * bound so handlers can be added, replaced, or removed without recreation.\n */\nexport function slotBindings(\n type: Type<unknown>,\n inputNames: readonly string[],\n context: () => unknown,\n outputs: () => SlotOutputs | undefined,\n): Binding[] {\n const mirror = reflectComponentType(type);\n if (!mirror) return [];\n const values = () => context() as Record<string, unknown> | undefined;\n return [\n ...inputNames.map((templateName) =>\n inputBinding(templateName, () =>\n templateName === \"props\" ? context() : values()?.[templateName],\n ),\n ),\n ...mirror.outputs.map(({ templateName }) =>\n outputBinding(templateName, (event) =>\n outputs()?.[templateName]?.(event),\n ),\n ),\n ];\n}\n\n/**\n * Renders a slot value into a ViewContainerRef.\n *\n * Templates receive `{ $implicit: props, props }` as their context. Components\n * get individual `props` keys bound to matching inputs, or the entire object\n * when the component declares a `props` input. `outputs` are matched by public\n * name via {@link slotBindings}; bindings are applied on the next change\n * detection pass.\n *\n * @param viewContainer - The ViewContainerRef to render into\n * @param options - Options for rendering the slot\n * @returns The created component or embedded view reference\n *\n * @example\n * ```typescript\n * export class MyComponent {\n * @ViewChild('container', { read: ViewContainerRef }) container!: ViewContainerRef;\n *\n * renderButton() {\n * renderSlot(this.container, {\n * slot: this.buttonOverride,\n * defaultComponent: DefaultButton,\n * props: { text: 'Click me' },\n * outputs: { click: (event) => this.handleClick(event) }\n * });\n * }\n * }\n * ```\n */\nexport function renderSlot<T = any>(\n viewContainer: ViewContainerRef,\n options: RenderSlotOptions<T>,\n): ComponentRef<T> | EmbeddedViewRef<T> {\n const { slot, defaultComponent, props, injector, outputs } = options;\n\n viewContainer.clear();\n\n const effectiveSlot = slot ?? defaultComponent;\n\n if (effectiveSlot instanceof TemplateRef) {\n return viewContainer.createEmbeddedView(effectiveSlot, {\n $implicit: props ?? {},\n props: props ?? {},\n } as any);\n }\n\n return viewContainer.createComponent(effectiveSlot, {\n injector: injector ?? viewContainer.injector,\n bindings: slotBindings(\n effectiveSlot,\n slotInputNames(effectiveSlot, props),\n () => props,\n () => outputs,\n ),\n });\n}\n\n/**\n * Checks if a value is an Angular component type.\n */\nexport function isComponentType(value: unknown): value is Type<unknown> {\n return (\n typeof value === \"function\" &&\n reflectComponentType(value as Type<unknown>) !== null\n );\n}\n\n/**\n * Checks if a value is a valid slot value.\n */\nexport function isSlotValue(value: unknown): value is SlotValue {\n return value instanceof TemplateRef || isComponentType(value);\n}\n\n/**\n * Normalizes a slot value to a consistent format.\n */\nexport function normalizeSlotValue<T = any>(\n value: SlotValue<T> | undefined,\n defaultComponent: Type<T> | undefined,\n): SlotRegistryEntry<T> {\n if (!value) {\n return { component: defaultComponent };\n }\n\n if (value instanceof TemplateRef) {\n return { template: value };\n }\n\n if (isComponentType(value)) {\n return { component: value as Type<T> };\n }\n\n return { component: defaultComponent };\n}\n\n/**\n * Creates a slot configuration map for a component.\n *\n * @example\n * ```typescript\n * const slots = createSlotConfig({\n * sendButton: CustomSendButton,\n * toolbar: 'custom-toolbar-class',\n * footer: footerTemplate\n * }, {\n * sendButton: DefaultSendButton,\n * toolbar: DefaultToolbar,\n * footer: DefaultFooter\n * });\n * ```\n */\nexport function createSlotConfig<T extends Record<string, Type<any>>>(\n overrides: Partial<Record<keyof T, SlotValue>>,\n defaults: T,\n): Map<keyof T, SlotRegistryEntry> {\n const config = new Map<keyof T, SlotRegistryEntry>();\n\n for (const key in defaults) {\n const override = overrides[key];\n const defaultComponent = defaults[key];\n config.set(key, normalizeSlotValue(override, defaultComponent));\n }\n\n return config;\n}\n\n/**\n * Provides slot configuration to child components via DI.\n *\n * @example\n * ```typescript\n * @Component({\n * providers: [\n * provideSlots({\n * sendButton: CustomSendButton,\n * toolbar: CustomToolbar\n * })\n * ]\n * })\n * ```\n */\nexport function provideSlots(slots: Record<string, Type<any>>) {\n const slotMap = new Map<string, SlotRegistryEntry>();\n\n // Only accept component types in DI (templates lack view context)\n for (const [key, value] of Object.entries(slots)) {\n if (isComponentType(value)) {\n slotMap.set(key, { component: value as Type<any> });\n }\n }\n\n return {\n provide: SLOT_CONFIG,\n useValue: slotMap,\n };\n}\n\n/**\n * Gets slot configuration from DI.\n * Must be called within an injection context.\n *\n * @example\n * ```typescript\n * export class MyComponent {\n * slots = getSlotConfig();\n *\n * ngOnInit() {\n * const sendButton = this.slots?.get('sendButton');\n * }\n * }\n * ```\n */\nexport function getSlotConfig(): ReadonlyMap<string, SlotRegistryEntry> | null {\n return inject(SLOT_CONFIG, { optional: true });\n}\n\n/**\n * Creates a render function for a specific slot.\n * Useful for creating reusable slot renderers.\n *\n * @example\n * ```typescript\n * const renderSendButton = createSlotRenderer(\n * DefaultSendButton,\n * 'sendButton'\n * );\n *\n * // Later in template\n * renderSendButton(this.viewContainer, this.sendButtonOverride);\n * ```\n */\nexport function createSlotRenderer<T>(\n defaultComponent: Type<T>,\n slotName?: string,\n) {\n // Get config in the injection context when the renderer is created\n const config = slotName ? getSlotConfig() : null;\n\n return (\n viewContainer: ViewContainerRef,\n slot?: SlotValue<T>,\n props?: Partial<T>,\n outputs?: SlotOutputs,\n ) => {\n // Check DI for overrides if slot name provided\n if (slotName && !slot && config) {\n const entry = config.get(slotName);\n if (entry) {\n if (entry.component) slot = entry.component;\n else if (entry.template) slot = entry.template;\n }\n }\n\n return renderSlot(viewContainer, {\n slot,\n defaultComponent,\n props,\n outputs,\n });\n };\n}\n","import type { Injector, Type } from \"@angular/core\";\nimport {\n Component,\n TemplateRef,\n ViewContainerRef,\n computed,\n effect,\n input,\n untracked,\n viewChild,\n} from \"@angular/core\";\nimport { NgTemplateOutlet } from \"@angular/common\";\nimport type { SlotOutputs } from \"./slot.types\";\nimport { slotBindings, slotInputNames } from \"./slot.utils\";\n\n/**\n * @internal - This component is for internal use only.\n * Renders a slot override, a default component, or the projected fallback.\n *\n * - A `TemplateRef` slot is rendered with `context` as its template context,\n * so context keys are available as `let-` variables.\n * - A component slot (or `defaultComponent`) is created with `context` keys\n * bound to its matching inputs and `outputs` handlers bound to its matching\n * outputs. Bound values stay live; the component is only recreated when the\n * resolved type, the set of bound input names, or the `injector` changes.\n * - With neither a slot nor a default component, the projected content shows.\n *\n * @example\n * ```html\n * <copilot-slot [slot]=\"sendButtonTemplate\" [context]=\"buttonContext\">\n * <button class=\"default-btn\">Default</button>\n * </copilot-slot>\n * ```\n */\n@Component({\n selector: \"copilot-slot\",\n imports: [NgTemplateOutlet],\n template: `\n @if (template(); as tpl) {\n <ng-container *ngTemplateOutlet=\"tpl; context: context()\" />\n }\n <ng-container #host />\n @if (!slot() && !defaultComponent()) {\n <ng-content />\n }\n `,\n})\nexport class CopilotSlot {\n readonly slot = input<TemplateRef<unknown> | Type<unknown>>();\n readonly context = input<object>();\n readonly defaultComponent = input<Type<unknown>>();\n readonly outputs = input<SlotOutputs>();\n /** Element injector for the created component. */\n readonly injector = input<Injector>();\n\n private readonly host = viewChild.required(\"host\", {\n read: ViewContainerRef,\n });\n\n protected readonly template = computed(() => {\n const slot = this.slot();\n return slot instanceof TemplateRef ? slot : undefined;\n });\n\n private readonly componentType = computed(() => {\n const slot = this.slot();\n return slot instanceof TemplateRef\n ? undefined\n : (slot ?? this.defaultComponent());\n });\n\n private readonly inputNames = computed(\n () => {\n const type = this.componentType();\n return type ? slotInputNames(type, this.context()) : [];\n },\n {\n equal: (previous, current) =>\n previous.length === current.length &&\n previous.every((name, index) => name === current[index]),\n },\n );\n\n constructor() {\n effect((onCleanup) => {\n const type = this.componentType();\n if (!type) return;\n const inputNames = this.inputNames();\n const injector = this.injector();\n const ref = untracked(() =>\n this.host().createComponent(type, {\n injector,\n bindings: slotBindings(\n type,\n inputNames,\n () => this.context(),\n () => this.outputs(),\n ),\n }),\n );\n onCleanup(() => ref.destroy());\n });\n }\n}\n","import { Component, computed, inject, input, output } from \"@angular/core\";\nimport { AbstractAgent } from \"@ag-ui/client\";\nimport { COPILOT_KIT_CONFIG } from \"../../config\";\nimport { CopilotKit } from \"../../copilotkit\";\nimport { CopilotSlot } from \"../../slots/copilot-slot\";\nimport { SlotOutputs } from \"../../slots/slot.types\";\nimport { bridgeA2UIAction, logA2UIRenderError } from \"./a2ui-surface-host\";\nimport { A2UIClientEventMessage } from \"./a2ui-types\";\n\n/**\n * @internal\n * Renders operations with the configured catalog's surface, sends its actions\n * to `agent` and logs its render errors.\n */\n@Component({\n selector: \"copilot-a2ui-surface-outlet\",\n imports: [CopilotSlot],\n host: { style: \"display: contents\" },\n template: `\n @if (a2ui?.catalog; as catalog) {\n <copilot-slot\n style=\"display: contents\"\n [slot]=\"catalog.surfaceComponent\"\n [context]=\"context()\"\n [outputs]=\"outputs\"\n />\n }\n `,\n})\nexport class CopilotA2UISurfaceOutlet {\n readonly operations = input<readonly unknown[]>([]);\n readonly agent = input<AbstractAgent | undefined>();\n readonly rendered = output<void>();\n\n protected readonly a2ui = inject(COPILOT_KIT_CONFIG, { optional: true })\n ?.a2ui;\n private readonly copilotKit = inject(CopilotKit, { optional: true });\n\n protected readonly context = computed(() => ({\n catalog: this.a2ui?.catalog,\n operations: this.operations(),\n theme: this.a2ui?.theme,\n loadingComponent: this.a2ui?.loadingComponent,\n }));\n\n protected readonly outputs: SlotOutputs = {\n action: (message: A2UIClientEventMessage) =>\n bridgeA2UIAction(this.copilotKit, this.agent(), message),\n error: logA2UIRenderError,\n rendered: () => this.rendered.emit(),\n };\n}\n","import {\n Component,\n NgZone,\n PLATFORM_ID,\n computed,\n inject,\n input,\n signal,\n} from \"@angular/core\";\nimport { isPlatformBrowser } from \"@angular/common\";\nimport type { AbstractAgent, ActivityMessage } from \"@ag-ui/client\";\nimport type { ActivityRenderer } from \"../../activity-renderer\";\nimport { injectCopilotKitConfig } from \"../../config\";\nimport { explicitEffect } from \"../../explicit-effect\";\nimport {\n getA2UIOperations,\n surfaceHasRenderableContent,\n} from \"./a2ui-surface-host\";\nimport { CopilotA2UIRecovery } from \"./a2ui-recovery\";\nimport { CopilotA2UISurfaceOutlet } from \"./surface-outlet\";\n\n@Component({\n selector: \"copilot-a2ui-activity-renderer\",\n imports: [CopilotA2UIRecovery, CopilotA2UISurfaceOutlet],\n host: {\n class: \"copilot-a2ui-surface-renderer-layout\",\n },\n template: `\n @if (hasOperations()) {\n <div class=\"handoff\">\n <div\n class=\"surface-container\"\n data-testid=\"a2ui-activity-surface-host\"\n [class.surface-pending]=\"!surfaceReady()\"\n [attr.aria-hidden]=\"!surfaceReady()\"\n >\n <div\n class=\"copilot-a2ui-surface-scroll\"\n data-testid=\"a2ui-activity-surface-scroll\"\n >\n <copilot-a2ui-surface-outlet\n [operations]=\"operations()\"\n [agent]=\"agent()\"\n (rendered)=\"handleRendered()\"\n />\n </div>\n </div>\n @if (!surfaceReady()) {\n <copilot-a2ui-recovery\n [content]=\"loaderContent()\"\n [options]=\"config.a2ui?.recovery\"\n />\n }\n </div>\n } @else {\n <copilot-a2ui-recovery\n [content]=\"content()\"\n [options]=\"config.a2ui?.recovery\"\n />\n }\n `,\n styles: `\n .handoff {\n position: relative;\n }\n .surface-pending {\n position: absolute;\n inset: 0;\n opacity: 0;\n pointer-events: none;\n }\n `,\n})\nexport class CopilotA2UIActivityRenderer implements ActivityRenderer<unknown> {\n readonly activityType = input.required<string>();\n readonly content = input.required<unknown>();\n readonly message = input.required<ActivityMessage>();\n readonly agent = input<AbstractAgent | undefined>();\n\n protected readonly config = injectCopilotKitConfig();\n private readonly platformId = inject(PLATFORM_ID);\n private readonly zone = inject(NgZone);\n protected readonly operations = computed(() =>\n getA2UIOperations(this.content()),\n );\n protected readonly hasOperations = computed(\n () => this.operations().length > 0,\n );\n protected readonly surfaceReady = signal(false);\n protected readonly loaderContent = signal<unknown>({ status: \"building\" });\n\n constructor() {\n explicitEffect(this.content, (content) => {\n if (getA2UIOperations(content).length === 0) {\n this.loaderContent.set(content);\n }\n });\n explicitEffect(this.hasOperations, (hasOperations, onCleanup) => {\n if (!hasOperations) {\n this.surfaceReady.set(false);\n return;\n }\n this.surfaceReady.set(false);\n if (!isPlatformBrowser(this.platformId)) return;\n const timeout = this.zone.runOutsideAngular(() =>\n globalThis.setTimeout(\n () => this.zone.run(() => this.surfaceReady.set(true)),\n 8000,\n ),\n );\n onCleanup(() => globalThis.clearTimeout(timeout));\n });\n }\n\n protected handleRendered(): void {\n if (this.surfaceReady()) return;\n if (!surfaceHasRenderableContent(this.operations())) return;\n const reveal = () => this.zone.run(() => this.surfaceReady.set(true));\n if (\n isPlatformBrowser(this.platformId) &&\n typeof globalThis.requestAnimationFrame === \"function\"\n ) {\n globalThis.requestAnimationFrame(reveal);\n } else {\n reveal();\n }\n }\n}\n","import { BASIC_COMPONENTS } from \"@a2ui/web_core/v0_9/basic_catalog\";\nimport { zodToJsonSchema } from \"zod-to-json-schema\";\nimport { A2UICatalog } from \"./a2ui-types\";\n\n/**\n * Context description used to identify the A2UI component schema in\n * RunAgentInput.context. Must match the constant in @ag-ui/a2ui-middleware so\n * the middleware can overwrite a frontend-provided schema with a server-side one.\n */\nexport const A2UI_SCHEMA_CONTEXT_DESCRIPTION =\n \"A2UI Component Schema — available components for generating UI surfaces. Use these component names and properties when creating A2UI operations.\";\n\n/** Id of the A2UI basic catalog, which web_core does not export. */\nexport const A2UI_BASIC_CATALOG_ID =\n \"https://a2ui.org/specification/v0_9/basic_catalog.json\";\n\ntype CatalogSchemas = Pick<A2UICatalog, \"id\" | \"components\">;\n\nconst basicComponentNames = new Set(BASIC_COMPONENTS.map((api) => api.name));\n\n/** Describes the catalog's id and its components beyond the basic catalog. */\nexport function buildCatalogContextValue(catalog: CatalogSchemas): string {\n const lines: string[] = [\"Available A2UI catalog:\"];\n\n if (catalog.id === A2UI_BASIC_CATALOG_ID) {\n lines.push(`- ${catalog.id} (basic catalog)`);\n return lines.join(\"\\n\");\n }\n\n const isSuperset = [...basicComponentNames].every((name) =>\n catalog.components.has(name),\n );\n\n lines.push(`- ${catalog.id}`);\n if (isSuperset) {\n lines.push(\n \" Extends the basic catalog with all standard components plus:\",\n );\n } else {\n lines.push(\" Custom catalog (does NOT include all basic components).\");\n lines.push(\" Custom components:\");\n }\n\n for (const [name, component] of catalog.components) {\n if (basicComponentNames.has(name)) continue;\n const jsonSchema = zodToJsonSchema(component.schema);\n lines.push(` - ${name}:`);\n lines.push(\n ` ${JSON.stringify(jsonSchema, null, 2).split(\"\\n\").join(\"\\n \")}`,\n );\n }\n\n return lines.join(\"\\n\");\n}\n\n/** The catalog's component schemas in the A2UI v0.9 inline catalog format. */\nexport function extractCatalogComponentSchemas(catalog: CatalogSchemas): {\n catalogId: string;\n components: Record<string, Record<string, unknown>>;\n} {\n const components: Record<string, Record<string, unknown>> = {};\n for (const [name, component] of catalog.components) {\n const zodSchema = zodToJsonSchema(component.schema, {\n target: \"jsonSchema2019-09\",\n }) as { properties?: Record<string, unknown>; required?: string[] };\n components[name] = {\n allOf: [\n { $ref: \"common_types.json#/$defs/ComponentCommon\" },\n {\n properties: {\n component: { const: name },\n ...zodSchema.properties,\n },\n required: [\"component\", ...(zodSchema.required ?? [])],\n },\n ],\n };\n }\n return { catalogId: catalog.id, components };\n}\n","import { Component, input } from \"@angular/core\";\nimport type { AngularToolCall, ToolRenderer } from \"../../tools\";\nimport type { RenderA2UIArgs } from \"./a2ui-tool-types\";\n\n/**\n * @internal\n * Renders nothing for `render_a2ui`. The A2UI middleware streams the whole\n * lifecycle on the `a2ui-surface` activity, so drawing the tool call as well\n * would paint the surface twice. Registering it still keeps a wildcard tool\n * renderer from showing the raw arguments.\n */\n@Component({\n selector: \"copilot-a2ui-render-tool-call\",\n template: \"\",\n})\nexport class CopilotA2UIRenderToolCall implements ToolRenderer<RenderA2UIArgs> {\n readonly toolCall = input.required<AngularToolCall<RenderA2UIArgs>>();\n}\n","import { z } from \"zod\";\n\nexport const RENDER_A2UI_TOOL_NAME = \"render_a2ui\";\nexport const AGUI_SEND_STATE_SNAPSHOT_TOOL_NAME = \"AGUISendStateSnapshot\";\nexport const RenderA2UIArgsSchema = z.record(z.string(), z.unknown());\n\nexport interface RenderA2UIArgs extends Record<string, unknown> {\n items?: unknown[];\n components?: unknown[];\n snapshot?: unknown;\n}\n","import { AngularToolCall } from \"../../tools\";\nimport {\n A2UIOperation,\n getA2UIOperations,\n isRecord,\n} from \"./a2ui-surface-host\";\nimport {\n AGUI_SEND_STATE_SNAPSHOT_TOOL_NAME,\n RenderA2UIArgs,\n} from \"./a2ui-tool-types\";\nimport { A2UI_BASIC_CATALOG_ID } from \"./a2ui-catalog-context\";\n\ntype A2UISnapshot = {\n surfaceId: string;\n catalogId?: string;\n data?: unknown;\n components: unknown[];\n};\n\nfunction parseJsonResult(result: string): unknown {\n try {\n return JSON.parse(result);\n } catch {\n return undefined;\n }\n}\n\nfunction getSnapshot(payload: unknown): A2UISnapshot | undefined {\n if (!isRecord(payload)) return undefined;\n const snapshot = isRecord(payload.snapshot) ? payload.snapshot : payload;\n if (\n typeof snapshot.surfaceId !== \"string\" ||\n !Array.isArray(snapshot.components)\n ) {\n return undefined;\n }\n\n return {\n surfaceId: snapshot.surfaceId,\n catalogId:\n typeof snapshot.catalogId === \"string\" ? snapshot.catalogId : undefined,\n data: snapshot.data,\n components: snapshot.components,\n };\n}\n\nfunction operationsFromSnapshot(snapshot: A2UISnapshot): A2UIOperation[] {\n const operations: A2UIOperation[] = [\n {\n version: \"v0.9\",\n createSurface: {\n surfaceId: snapshot.surfaceId,\n catalogId: snapshot.catalogId ?? A2UI_BASIC_CATALOG_ID,\n theme: {},\n },\n },\n ];\n\n if (snapshot.data !== undefined) {\n operations.push({\n version: \"v0.9\",\n updateDataModel: {\n surfaceId: snapshot.surfaceId,\n path: \"/\",\n value: snapshot.data,\n },\n });\n }\n\n operations.push({\n version: \"v0.9\",\n updateComponents: {\n surfaceId: snapshot.surfaceId,\n components: snapshot.components,\n },\n });\n\n return operations;\n}\n\nfunction getOperationsFromPayload(payload: unknown): A2UIOperation[] {\n if (!isRecord(payload)) return [];\n\n const operations = getA2UIOperations(payload);\n if (operations.length > 0) return operations;\n\n const snapshot = getSnapshot(payload);\n return snapshot ? operationsFromSnapshot(snapshot) : [];\n}\n\nfunction getOperationsFromResult(result: string | undefined): A2UIOperation[] {\n if (!result) return [];\n const payload = parseJsonResult(result);\n return getOperationsFromPayload(payload);\n}\n\nexport function getRenderedA2UIOperations(\n toolCall: AngularToolCall<RenderA2UIArgs>,\n): A2UIOperation[] {\n const resultOperations = getOperationsFromResult(toolCall.result);\n if (resultOperations.length > 0) {\n return resultOperations;\n }\n\n if (\n toolCall.name === AGUI_SEND_STATE_SNAPSHOT_TOOL_NAME &&\n toolCall.status !== \"complete\"\n ) {\n return [];\n }\n\n return getOperationsFromPayload(toolCall.args);\n}\n","import { Component, computed, input } from \"@angular/core\";\nimport type { AbstractAgent } from \"@ag-ui/client\";\nimport type { AngularToolCall, ToolRenderer } from \"../../tools\";\nimport { getRenderedA2UIOperations } from \"./a2ui-tool-operations\";\nimport { CopilotA2UIProgress } from \"./a2ui-progress\";\nimport {\n AGUI_SEND_STATE_SNAPSHOT_TOOL_NAME,\n type RenderA2UIArgs,\n} from \"./a2ui-tool-types\";\nimport { CopilotA2UISurfaceOutlet } from \"./surface-outlet\";\n\n@Component({\n selector: \"copilot-a2ui-tool-renderer\",\n imports: [CopilotA2UIProgress, CopilotA2UISurfaceOutlet],\n host: {\n class: \"copilot-a2ui-surface-renderer-layout\",\n },\n template: `\n @if (renderedOperations().length > 0) {\n <div\n class=\"copilot-a2ui-surface-scroll\"\n data-testid=\"a2ui-tool-surface-scroll\"\n >\n <copilot-a2ui-surface-outlet\n data-testid=\"a2ui-tool-surface\"\n [operations]=\"renderedOperations()\"\n [agent]=\"agent()\"\n />\n </div>\n } @else if (!isHidden()) {\n <copilot-a2ui-progress [phase]=\"phase()\" [tokens]=\"tokens()\" />\n }\n `,\n})\nexport class CopilotA2UIToolRenderer implements ToolRenderer<RenderA2UIArgs> {\n readonly toolCall = input.required<AngularToolCall<RenderA2UIArgs>>();\n readonly agent = input<AbstractAgent | undefined>();\n\n protected readonly renderedOperations = computed(() =>\n getRenderedA2UIOperations(this.toolCall()),\n );\n\n protected readonly tokens = computed(() =>\n Math.round(JSON.stringify(this.toolCall().args ?? {}).length / 4),\n );\n\n protected readonly phase = computed(() => {\n const tokens = this.tokens();\n if (tokens < 50) return 0;\n if (tokens < 200) return 1;\n if (tokens < 400) return 2;\n return 3;\n });\n\n protected readonly isHidden = computed(() => {\n const toolCall = this.toolCall();\n if (toolCall.status === \"complete\") {\n return this.renderedOperations().length === 0;\n }\n\n if (toolCall.name === AGUI_SEND_STATE_SNAPSHOT_TOOL_NAME) {\n return false;\n }\n\n const { items, components } = toolCall.args;\n if (Array.isArray(items) && items.length > 0) return true;\n return Array.isArray(components) && components.length > 2;\n });\n}\n","import type { StandardSchemaV1 } from \"@copilotkit/shared\";\nimport type { FrontendToolHandlerContext } from \"@copilotkit/core\";\nimport { z } from \"zod\";\n\nexport const OPEN_GENERATIVE_UI_ACTIVITY_TYPE = \"open-generative-ui\";\nexport const GENERATE_SANDBOXED_UI_TOOL_NAME = \"generateSandboxedUi\";\n\nexport const DEFAULT_OPEN_GENERATIVE_UI_DESIGN_SKILL = `When generating UI with generateSandboxedUi, follow these design principles inspired by shadcn/ui:\n\n- Use a minimal, flat aesthetic. Avoid drop shadows and gradients — rely on subtle borders (1px solid, light gray like #e5e7eb) to define surfaces.\n- Neutral base palette: white backgrounds, zinc/slate gray text (#09090b for headings, #71717a for secondary text). One accent color for interactive elements.\n- Use system font stacks (system-ui, -apple-system, sans-serif) at readable sizes (14px body, 600 weight for headings). Tight line-heights.\n- Small, consistent border-radius (6–8px). Cards and containers use border, not shadow, for separation.\n- Buttons: solid fill for primary (dark bg, white text), outline for secondary (border + transparent bg). Subtle hover state (slight opacity or background shift).\n- Use CSS Grid or Flexbox for layout. Ensure the UI looks good at any width.\n- Minimal transitions (150ms) for hover/focus states only. No decorative animations.\n- Keep the UI focused and dense — avoid excessive padding. Use compact spacing (8–12px gaps, 10–14px padding in controls).`;\n\nexport { GENERATE_SANDBOXED_UI_DESCRIPTION } from \"@copilotkit/shared\";\n\nexport const OpenGenerativeUIContentSchema = z.object({\n initialHeight: z.number().optional(),\n generating: z.boolean().optional(),\n css: z.string().optional(),\n cssComplete: z.boolean().optional(),\n html: z.array(z.string()).optional(),\n htmlComplete: z.boolean().optional(),\n jsFunctions: z.string().optional(),\n jsFunctionsComplete: z.boolean().optional(),\n jsExpressions: z.array(z.string()).optional(),\n jsExpressionsComplete: z.boolean().optional(),\n});\n\nexport type OpenGenerativeUIContent = z.infer<\n typeof OpenGenerativeUIContentSchema\n>;\n\nexport const GenerateSandboxedUiArgsSchema = z.object({\n initialHeight: z.number().optional(),\n placeholderMessages: z.array(z.string()).optional(),\n css: z.string().optional(),\n html: z.string().optional(),\n jsFunctions: z.string().optional(),\n jsExpressions: z.array(z.string()).optional(),\n});\n\nexport type GenerateSandboxedUiArgs = z.infer<\n typeof GenerateSandboxedUiArgsSchema\n>;\n\nexport type SandboxFunction<\n Args extends Record<string, unknown> = Record<string, unknown>,\n> = {\n name: string;\n description: string;\n parameters: StandardSchemaV1<unknown, Args>;\n handler: (\n args: Args,\n context?: FrontendToolHandlerContext,\n ) => Promise<unknown> | unknown;\n};\n\nexport interface OpenGenerativeUIConfig {\n sandboxFunctions?: SandboxFunction[];\n designSkill?: string;\n}\n","/**\n * Extracts all complete `<style>` blocks from raw HTML.\n */\nexport function extractCompleteStyles(html: string): string {\n const matches = html.match(/<style\\b[^>]*>[\\s\\S]*?<\\/style>/gi);\n return matches ? matches.join(\"\") : \"\";\n}\n\n/**\n * Processes accumulated HTML into a preview-safe body fragment.\n */\nexport function processPartialHtml(html: string): string {\n let result = html;\n\n result = result.replace(/<[^>]*$/, \"\");\n result = result.replace(/<(style|script|head)\\b[^>]*>[\\s\\S]*?<\\/\\1>/gi, \"\");\n result = result.replace(/<(style|script|head)\\b[^>]*>[\\s\\S]*$/gi, \"\");\n result = result.replace(/&[a-zA-Z0-9#]*$/, \"\");\n\n const bodyMatch = result.match(/<body[^>]*>([\\s\\S]*)/i);\n if (bodyMatch) {\n result = bodyMatch[1]!;\n result = result.replace(/<\\/body>[\\s\\S]*/i, \"\");\n }\n\n return result;\n}\n\nexport function ensureHead(html: string): string {\n if (/<head[\\s>]/i.test(html)) return html;\n return `<head></head>${html}`;\n}\n\nexport function injectCssIntoHtml(html: string, css: string): string {\n const headCloseIdx = html.indexOf(\"</head>\");\n if (headCloseIdx !== -1) {\n return (\n html.slice(0, headCloseIdx) +\n `<style>${css}</style>` +\n html.slice(headCloseIdx)\n );\n }\n return `<head><style>${css}</style></head>${html}`;\n}\n","import type Websandbox from \"@jetbrains/websandbox\";\nimport {\n OpenGenerativeUIContentSchema,\n type OpenGenerativeUIContent,\n} from \"../../open-generative-ui\";\n\nexport type WebsandboxConstructor = typeof Websandbox;\nexport type WebsandboxInstance = InstanceType<WebsandboxConstructor>;\n\nexport type WebsandboxModuleShape = {\n default:\n | WebsandboxConstructor\n | {\n default: WebsandboxConstructor;\n };\n};\n\nexport function resolveWebsandboxConstructor(\n module: WebsandboxModuleShape,\n): WebsandboxConstructor {\n const defaultExport = module.default;\n return \"default\" in defaultExport ? defaultExport.default : defaultExport;\n}\n\nexport function hasRenderableOpenGenerativeUIContent(\n content: OpenGenerativeUIContent | undefined,\n): boolean {\n if (!content) return false;\n const hasHtml = !!content.html?.join(\"\").trim();\n const hasFinalHtml = content.htmlComplete && hasHtml;\n const hasPreviewHtml =\n content.cssComplete && !content.htmlComplete && hasHtml;\n return !!hasFinalHtml || !!hasPreviewHtml;\n}\n\nexport function shouldFlushOpenGenerativeUIImmediately(\n previous: OpenGenerativeUIContent | undefined,\n next: OpenGenerativeUIContent,\n): boolean {\n if (\n hasRenderableOpenGenerativeUIContent(previous) &&\n !hasRenderableOpenGenerativeUIContent(next)\n ) {\n return true;\n }\n if (next.cssComplete && !previous?.cssComplete) return true;\n if (next.htmlComplete) return true;\n if (next.generating === false) return true;\n if (next.jsFunctions && !previous?.jsFunctions) return true;\n if (\n (next.jsExpressions?.length ?? 0) > (previous?.jsExpressions?.length ?? 0)\n ) {\n return true;\n }\n if (next.html?.length && !previous?.html?.length) return true;\n return false;\n}\n\nexport function parseOpenGenerativeUIContent(\n content: unknown,\n): OpenGenerativeUIContent {\n const parsed = OpenGenerativeUIContentSchema.safeParse(content);\n return parsed.success ? parsed.data : {};\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n DestroyRef,\n ElementRef,\n type OnChanges,\n afterRenderEffect,\n computed,\n inject,\n input,\n signal,\n untracked,\n viewChild,\n InjectionToken,\n} from \"@angular/core\";\nimport type { AbstractAgent, ActivityMessage } from \"@ag-ui/client\";\nimport type { API } from \"@jetbrains/websandbox/dist/types\";\nimport type { ActivityRenderer } from \"../../activity-renderer\";\nimport type { OpenGenerativeUIContent } from \"../../open-generative-ui\";\nimport { injectCopilotKitConfig } from \"../../config\";\nimport {\n ensureHead,\n extractCompleteStyles,\n injectCssIntoHtml,\n processPartialHtml,\n} from \"./process-partial-html\";\nimport {\n hasRenderableOpenGenerativeUIContent,\n parseOpenGenerativeUIContent,\n resolveWebsandboxConstructor,\n shouldFlushOpenGenerativeUIImmediately,\n type WebsandboxConstructor,\n type WebsandboxInstance,\n type WebsandboxModuleShape,\n} from \"./open-generative-ui-renderer-utils\";\n\nexport const OPEN_GENERATIVE_UI_WEBSANDBOX_LOADER = new InjectionToken<\n () => Promise<WebsandboxConstructor>\n>(\"OPEN_GENERATIVE_UI_WEBSANDBOX_LOADER\", {\n providedIn: \"root\",\n factory: () => async (): Promise<WebsandboxConstructor> => {\n const websandboxModule =\n (await import(\"@jetbrains/websandbox\")) as unknown as WebsandboxModuleShape;\n return resolveWebsandboxConstructor(websandboxModule);\n },\n});\n\nconst THROTTLE_MS = 1000;\n\ntype OpenGenerativeUIRenderState = {\n content: OpenGenerativeUIContent;\n fullHtml: string | undefined;\n css: string | undefined;\n hasPreview: boolean;\n previewBody: string | undefined;\n previewStyles: string;\n jsFunctions: string | undefined;\n jsExpressions: string[] | undefined;\n generatingDone: boolean;\n};\n\n@Component({\n selector: \"copilot-open-generative-ui-renderer\",\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <div\n #container\n data-testid=\"open-generative-ui-renderer\"\n class=\"copilot-open-generative-ui-container\"\n [style.height.px]=\"height()\"\n [class.has-visible-sandbox]=\"hasVisibleSandbox()\"\n >\n @if (!hasVisibleSandbox() && isGenerating()) {\n <div\n data-testid=\"open-generative-ui-placeholder\"\n class=\"copilot-open-generative-ui-placeholder\"\n >\n <svg\n width=\"48\"\n height=\"48\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n class=\"copilot-open-generative-ui-spinner\"\n >\n <circle cx=\"12\" cy=\"12\" r=\"10\" stroke=\"#e0e0e0\" stroke-width=\"3\" />\n <path\n d=\"M12 2a10 10 0 0 1 10 10\"\n stroke=\"#999\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n />\n </svg>\n </div>\n }\n @if (hasVisibleSandbox() && isGenerating()) {\n <div\n data-testid=\"open-generative-ui-progress-overlay\"\n class=\"copilot-open-generative-ui-overlay\"\n >\n <svg\n width=\"48\"\n height=\"48\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n class=\"copilot-open-generative-ui-spinner\"\n >\n <circle cx=\"12\" cy=\"12\" r=\"10\" stroke=\"#e0e0e0\" stroke-width=\"3\" />\n <path\n d=\"M12 2a10 10 0 0 1 10 10\"\n stroke=\"#999\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n />\n </svg>\n </div>\n }\n </div>\n `,\n styles: [\n `\n .copilot-open-generative-ui-container {\n position: relative;\n width: 100%;\n border-radius: 8px;\n background-color: #f5f5f5;\n border: 1px solid #e0e0e0;\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n }\n\n .copilot-open-generative-ui-container.has-visible-sandbox {\n background-color: transparent;\n border: none;\n display: block;\n }\n\n .copilot-open-generative-ui-placeholder {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n .copilot-open-generative-ui-overlay {\n position: absolute;\n inset: 0;\n z-index: 10;\n pointer-events: all;\n background-color: rgba(255, 255, 255, 0.5);\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n .copilot-open-generative-ui-spinner {\n animation: copilot-open-generative-ui-spin 1s linear infinite;\n }\n\n @keyframes copilot-open-generative-ui-spin {\n to {\n transform: rotate(360deg);\n }\n }\n `,\n ],\n})\nexport class CopilotOpenGenerativeUIRenderer implements OnChanges {\n readonly content = input.required<OpenGenerativeUIContent>();\n\n private readonly containerRef = viewChild<\n unknown,\n ElementRef<HTMLDivElement>\n >(\"container\", { read: ElementRef });\n private readonly destroyRef = inject(DestroyRef);\n private readonly config = injectCopilotKitConfig();\n private readonly loadWebsandboxModule = inject(\n OPEN_GENERATIVE_UI_WEBSANDBOX_LOADER,\n );\n private readonly throttledContent = signal<OpenGenerativeUIContent>({});\n private throttleTimer: ReturnType<typeof setTimeout> | undefined;\n private latestContent: OpenGenerativeUIContent = {};\n private sandbox: WebsandboxInstance | undefined;\n private previewSandbox: WebsandboxInstance | undefined;\n private sandboxReady = false;\n private previewReady = false;\n private executedExpressionIndex = 0;\n private pendingQueue: string[] = [];\n private jsFunctionsInjected = false;\n private heightMeasured = false;\n private autoHeight = signal<number | undefined>(undefined);\n private hasReceivedContent = false;\n\n protected readonly fullHtml = computed(() => {\n const content = this.throttledContent();\n return content.htmlComplete && content.html?.length\n ? content.html.join(\"\")\n : undefined;\n });\n\n protected readonly css = computed(() => {\n const content = this.throttledContent();\n return content.cssComplete ? content.css : undefined;\n });\n\n protected readonly partialHtml = computed(() => {\n const content = this.throttledContent();\n return !content.htmlComplete && content.html?.length\n ? content.html.join(\"\")\n : undefined;\n });\n\n protected readonly previewBody = computed(() => {\n const partialHtml = this.partialHtml();\n return partialHtml ? processPartialHtml(partialHtml) : undefined;\n });\n\n protected readonly previewStyles = computed(() => {\n const partialHtml = this.partialHtml();\n return partialHtml ? extractCompleteStyles(partialHtml) : \"\";\n });\n\n protected readonly hasPreview = computed(\n () => !!this.throttledContent().cssComplete && !!this.previewBody()?.trim(),\n );\n\n protected readonly hasVisibleSandbox = computed(\n () => !!this.fullHtml() || this.hasPreview(),\n );\n\n protected readonly height = computed(\n () => this.autoHeight() ?? this.throttledContent().initialHeight ?? 200,\n );\n\n protected readonly isGenerating = computed(\n () => this.throttledContent().generating !== false,\n );\n\n private readonly renderState = computed<OpenGenerativeUIRenderState>(() => {\n const content = this.throttledContent();\n return {\n content,\n fullHtml: this.fullHtml(),\n css: this.css(),\n hasPreview: this.hasPreview(),\n previewBody: this.previewBody(),\n previewStyles: this.previewStyles(),\n jsFunctions: content.jsFunctions,\n jsExpressions: content.jsExpressions,\n generatingDone: content.generating === false,\n };\n });\n\n constructor() {\n this.destroyRef.onDestroy(() => {\n this.clearThrottle();\n this.destroyPreviewSandbox();\n this.destroyFinalSandbox();\n });\n\n afterRenderEffect({\n write: (onCleanup) => {\n const fullHtml = this.fullHtml();\n const css = this.css();\n const container = this.containerRef()?.nativeElement;\n\n untracked(() => {\n let cancelled = false;\n\n onCleanup(() => {\n cancelled = true;\n this.destroyFinalSandbox();\n });\n\n this.resetFinalRuntimeState();\n this.autoHeight.set(undefined);\n if (!container || !fullHtml) return;\n\n this.destroyPreviewSandbox();\n void this.createFinalSandbox(\n fullHtml,\n css,\n container,\n () => cancelled,\n );\n });\n },\n });\n\n afterRenderEffect({\n write: () => {\n const state = this.renderState();\n this.containerRef();\n this.reconcileSandboxState(state);\n\n if (!state.generatingDone || this.heightMeasured || !this.sandbox) {\n return;\n }\n this.heightMeasured = true;\n const cleanup = this.measureFinalHeight();\n if (cleanup) this.destroyRef.onDestroy(cleanup);\n },\n });\n }\n\n /** Applies input updates synchronously before the matching render pass. */\n ngOnChanges(): void {\n const next = parseOpenGenerativeUIContent(this.content());\n this.latestContent = next;\n const previous = this.throttledContent();\n\n if (!this.hasReceivedContent) {\n this.hasReceivedContent = true;\n this.clearThrottle();\n this.commitContent(previous, next);\n return;\n }\n\n if (shouldFlushOpenGenerativeUIImmediately(previous, next)) {\n this.clearThrottle();\n this.commitContent(previous, next);\n return;\n }\n\n if (!this.throttleTimer) {\n this.throttleTimer = setTimeout(() => {\n this.throttleTimer = undefined;\n this.throttledContent.set(this.latestContent);\n }, THROTTLE_MS);\n }\n }\n\n /** Commits content and synchronously removes stale sandbox DOM on restart. */\n private commitContent(\n previous: OpenGenerativeUIContent,\n next: OpenGenerativeUIContent,\n ): void {\n this.throttledContent.set(next);\n\n if (\n hasRenderableOpenGenerativeUIContent(previous) &&\n !hasRenderableOpenGenerativeUIContent(next)\n ) {\n this.destroyPreviewSandbox();\n this.destroyFinalSandbox();\n this.resetFinalRuntimeState();\n this.autoHeight.set(undefined);\n }\n }\n\n private clearThrottle(): void {\n if (!this.throttleTimer) return;\n clearTimeout(this.throttleTimer);\n this.throttleTimer = undefined;\n }\n\n private async loadWebsandbox(): Promise<WebsandboxConstructor> {\n return this.loadWebsandboxModule();\n }\n\n private createLocalApi(): API {\n const api: API = {};\n for (const fn of this.config.openGenerativeUI?.sandboxFunctions ?? []) {\n api[fn.name] = fn.handler;\n }\n return api;\n }\n\n private createPreviewSandbox(state: OpenGenerativeUIRenderState): void {\n const container = this.containerRef()?.nativeElement;\n if (\n !container ||\n state.fullHtml ||\n !state.hasPreview ||\n this.previewSandbox\n ) {\n return;\n }\n\n void this.loadWebsandbox()\n .then((Websandbox) => {\n if (\n !this.containerRef() ||\n this.previewSandbox ||\n this.renderState().fullHtml ||\n !this.renderState().hasPreview\n ) {\n return;\n }\n\n const sandbox = Websandbox.create(\n {},\n {\n frameContainer: container,\n frameContent: \"<head></head><body></body>\",\n allowAdditionalAttributes: \"\",\n },\n );\n this.previewSandbox = sandbox;\n sandbox.iframe.setAttribute(\n \"data-testid\",\n \"open-generative-ui-preview-sandbox\",\n );\n this.styleIframe(sandbox.iframe);\n\n sandbox.promise.then(() => {\n if (this.previewSandbox !== sandbox) return;\n this.previewReady = true;\n void sandbox.run(`\n var s = document.createElement('style');\n s.textContent = 'html, body { overflow: hidden !important; }';\n document.head.appendChild(s);\n `);\n this.updatePreviewSandbox(this.renderState());\n });\n })\n .catch((error: unknown) => {\n console.error(\n \"[OpenGenerativeUI] Failed to load sandbox module:\",\n error,\n );\n });\n }\n\n private updatePreviewSandbox(state: OpenGenerativeUIRenderState): void {\n if (!this.previewSandbox || !this.previewReady) return;\n\n const headParts: string[] = [];\n if (state.css) headParts.push(`<style>${state.css}</style>`);\n if (state.previewStyles) headParts.push(state.previewStyles);\n if (headParts.length) {\n void this.previewSandbox.run(\n `document.head.innerHTML = ${JSON.stringify(headParts.join(\"\"))}`,\n );\n }\n if (state.previewBody) {\n void this.previewSandbox.run(\n `document.body.innerHTML = ${JSON.stringify(state.previewBody)}`,\n );\n }\n }\n\n private reconcileSandboxState(state: OpenGenerativeUIRenderState): void {\n if (!state.fullHtml) {\n if (!state.hasPreview) {\n this.destroyPreviewSandbox();\n return;\n }\n\n this.createPreviewSandbox(state);\n this.updatePreviewSandbox(state);\n return;\n }\n\n this.destroyPreviewSandbox();\n this.injectJsFunctions(state.jsFunctions);\n void this.executeNewExpressions(state.jsExpressions);\n }\n\n private async createFinalSandbox(\n fullHtml: string,\n css: string | undefined,\n container: HTMLDivElement,\n isCancelled: () => boolean,\n ): Promise<void> {\n const htmlContent = css ? injectCssIntoHtml(fullHtml, css) : fullHtml;\n\n try {\n const Websandbox = await this.loadWebsandbox();\n if (isCancelled()) return;\n\n const sandbox = Websandbox.create(this.createLocalApi(), {\n frameContainer: container,\n frameContent: ensureHead(htmlContent),\n allowAdditionalAttributes: \"\",\n });\n this.sandbox = sandbox;\n sandbox.iframe.setAttribute(\n \"data-testid\",\n \"open-generative-ui-final-sandbox\",\n );\n this.styleIframe(sandbox.iframe);\n\n sandbox.promise.then(() => {\n if (isCancelled() || this.sandbox !== sandbox) return;\n this.sandboxReady = true;\n void sandbox.run(`\n var s = document.createElement('style');\n s.textContent = 'html, body { overflow: hidden !important; }';\n document.head.appendChild(s);\n `);\n const queue = this.pendingQueue;\n this.pendingQueue = [];\n for (const code of queue) void sandbox.run(code);\n });\n } catch (error) {\n console.error(\"[OpenGenerativeUI] Failed to load sandbox module:\", error);\n }\n }\n\n private resetFinalRuntimeState(): void {\n this.executedExpressionIndex = 0;\n this.jsFunctionsInjected = false;\n this.heightMeasured = false;\n this.pendingQueue = [];\n this.sandboxReady = false;\n }\n\n private injectJsFunctions(jsFunctions: string | undefined): void {\n if (!jsFunctions || this.jsFunctionsInjected) return;\n this.jsFunctionsInjected = true;\n this.runOrQueue(jsFunctions);\n }\n\n private async executeNewExpressions(\n expressions: string[] | undefined,\n ): Promise<void> {\n if (!expressions?.length) return;\n\n const startIndex = this.executedExpressionIndex;\n if (startIndex >= expressions.length) return;\n const newExpressions = expressions.slice(startIndex);\n this.executedExpressionIndex = expressions.length;\n\n if (this.sandboxReady && this.sandbox) {\n for (const expression of newExpressions) {\n await this.sandbox.run(expression);\n }\n return;\n }\n\n this.pendingQueue.push(...newExpressions);\n }\n\n private runOrQueue(code: string): void {\n if (this.sandboxReady && this.sandbox) {\n void this.sandbox.run(code);\n return;\n }\n this.pendingQueue.push(code);\n }\n\n private measureFinalHeight(): (() => void) | undefined {\n const sandbox = this.sandbox;\n if (!sandbox) return undefined;\n\n let handled = false;\n const onMessage = (event: MessageEvent) => {\n if (handled) return;\n if (\n event.source === sandbox.iframe.contentWindow &&\n event.data?.type === \"__ck_resize\"\n ) {\n handled = true;\n this.autoHeight.set(event.data.height);\n window.removeEventListener(\"message\", onMessage);\n }\n };\n\n window.addEventListener(\"message\", onMessage);\n\n const measureOnce = `\n (function() {\n var s = document.createElement('style');\n s.textContent = 'body { height: auto !important; min-height: 0 !important; }';\n document.head.appendChild(s);\n var h = document.body.scrollHeight;\n var cs = getComputedStyle(document.body);\n h += parseFloat(cs.marginTop) || 0;\n h += parseFloat(cs.marginBottom) || 0;\n s.remove();\n parent.postMessage({ type: \"__ck_resize\", height: Math.ceil(h) }, \"*\");\n })();\n `;\n\n this.runOrQueue(measureOnce);\n return () => window.removeEventListener(\"message\", onMessage);\n }\n\n private styleIframe(iframe: HTMLIFrameElement): void {\n iframe.style.width = \"100%\";\n iframe.style.height = \"100%\";\n iframe.style.border = \"none\";\n iframe.style.backgroundColor = \"transparent\";\n }\n\n private destroyPreviewSandbox(): void {\n if (!this.previewSandbox) return;\n this.previewSandbox.destroy();\n this.previewSandbox = undefined;\n this.previewReady = false;\n }\n\n private destroyFinalSandbox(): void {\n if (this.sandbox) {\n this.sandbox.destroy();\n this.sandbox = undefined;\n }\n this.sandboxReady = false;\n this.heightMeasured = false;\n }\n}\n\n@Component({\n selector: \"copilot-open-generative-ui-activity-renderer\",\n imports: [CopilotOpenGenerativeUIRenderer],\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <copilot-open-generative-ui-renderer [content]=\"content()\" />\n `,\n})\nexport class CopilotOpenGenerativeUIActivityRenderer implements ActivityRenderer<OpenGenerativeUIContent> {\n readonly activityType = input.required<string>();\n readonly content = input.required<OpenGenerativeUIContent>();\n readonly message = input.required<ActivityMessage>();\n readonly agent = input<AbstractAgent | undefined>();\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n DestroyRef,\n computed,\n inject,\n input,\n signal,\n} from \"@angular/core\";\nimport type { AngularToolCall, ToolRenderer } from \"../../tools\";\nimport type { GenerateSandboxedUiArgs } from \"../../open-generative-ui\";\nimport { explicitEffect } from \"../../explicit-effect\";\n\n@Component({\n selector: \"copilot-open-generative-ui-tool-renderer\",\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n @if (visibleMessage(); as message) {\n <div\n data-testid=\"open-generative-ui-tool-placeholder\"\n class=\"copilot-open-generative-ui-placeholder\"\n >\n {{ message }}\n </div>\n }\n `,\n styles: [\n `\n .copilot-open-generative-ui-placeholder {\n padding: 8px 12px;\n color: #999;\n font-size: 14px;\n }\n `,\n ],\n})\nexport class CopilotOpenGenerativeUIToolRenderer implements ToolRenderer<GenerateSandboxedUiArgs> {\n readonly toolCall =\n input.required<AngularToolCall<GenerateSandboxedUiArgs>>();\n\n private readonly visibleMessageIndex = signal(0);\n private readonly destroyRef = inject(DestroyRef);\n private previousMessageCount = 0;\n private interval: ReturnType<typeof setInterval> | undefined;\n\n protected readonly visibleMessage = computed(() => {\n const call = this.toolCall();\n if (call.status === \"complete\") return undefined;\n\n const messages = call.args.placeholderMessages;\n if (!messages?.length) return undefined;\n\n return messages[this.visibleMessageIndex()] ?? messages[0];\n });\n\n constructor() {\n this.destroyRef.onDestroy(() => this.clearTimer());\n\n explicitEffect(this.toolCall, (call, onCleanup) => {\n const messages = call.args.placeholderMessages;\n this.clearTimer();\n\n if (!messages?.length) {\n this.previousMessageCount = 0;\n this.visibleMessageIndex.set(0);\n return;\n }\n\n if (messages.length !== this.previousMessageCount) {\n this.previousMessageCount = messages.length;\n this.visibleMessageIndex.set(messages.length - 1);\n }\n\n if (call.status === \"complete\") return;\n\n this.interval = setInterval(() => {\n this.visibleMessageIndex.update(\n (index) => (index + 1) % messages.length,\n );\n }, 5000);\n\n onCleanup(() => this.clearTimer());\n });\n }\n\n private clearTimer(): void {\n if (this.interval === undefined) return;\n clearInterval(this.interval);\n this.interval = undefined;\n }\n}\n","import type { SchemaToJsonSchemaOptions } from \"@copilotkit/shared\";\nimport { zodToJsonSchema } from \"zod-to-json-schema\";\n\ntype ZodToJsonSchemaInput = Parameters<typeof zodToJsonSchema>[0];\ntype ZodToJsonSchemaOptions = Parameters<typeof zodToJsonSchema>[1];\n\nexport const standardSchemaZodToJsonSchema: NonNullable<\n SchemaToJsonSchemaOptions[\"zodToJsonSchema\"]\n> = (schema, options) =>\n zodToJsonSchema(\n schema as ZodToJsonSchemaInput,\n options as ZodToJsonSchemaOptions,\n ) as Record<string, unknown>;\n","// Generated from package.json. Do not edit.\nexport const ANGULAR_SDK_VERSION = \"0.6.0\";\n","import { ANGULAR_SDK_VERSION } from \"./package-version\";\nimport { DOCUMENT, isPlatformBrowser } from \"@angular/common\";\nimport {\n afterNextRender,\n DestroyRef,\n Injectable,\n InjectionToken,\n Injector,\n PLATFORM_ID,\n inject,\n isDevMode,\n} from \"@angular/core\";\nimport { shouldEnableInspector } from \"@copilotkit/shared\";\nimport type { WebInspectorElement } from \"@copilotkit/web-inspector\";\n\nimport { COPILOT_KIT_CONFIG, type CopilotKitConfig } from \"./config\";\nimport { CopilotKit } from \"./copilotkit\";\n\n/**\n * Injection token that reports whether the Inspector treats the app as\n * development. Tests can override it. Applications must not depend on it.\n *\n * @internal\n */\nexport const ɵCOPILOTKIT_INSPECTOR_DEVELOPMENT_MODE =\n new InjectionToken<boolean>(\"CopilotKit Inspector development mode\", {\n factory: isDevMode,\n });\n\nexport type AngularInspectorOpenRequest = {\n messageId: string;\n threadId?: string;\n agentId?: string;\n};\n\n@Injectable({ providedIn: \"root\" })\nexport class CopilotInspector {\n private readonly config = inject<CopilotKitConfig | null>(\n COPILOT_KIT_CONFIG,\n { optional: true },\n );\n private readonly injector = inject(Injector);\n private readonly document = inject(DOCUMENT);\n private readonly destroyRef = inject(DestroyRef);\n private readonly platformId = inject(PLATFORM_ID);\n private readonly isDevelopment = inject(\n ɵCOPILOTKIT_INSPECTOR_DEVELOPMENT_MODE,\n );\n private element: WebInspectorElement | null = null;\n private ownsElement = false;\n private destroyed = false;\n\n readonly shouldRenderInspector = shouldEnableInspector({\n enableInspector: this.config?.enableInspector,\n isBrowser: isPlatformBrowser(this.platformId),\n isDevelopment: this.isDevelopment,\n });\n\n /** Whether Inspector-backed message actions should be shown. */\n readonly isInspectorEnabled = this.shouldRenderInspector;\n\n constructor() {\n this.destroyRef.onDestroy(() => {\n this.destroyed = true;\n if (this.ownsElement) this.element?.remove();\n this.element = null;\n });\n\n if (this.shouldRenderInspector) {\n afterNextRender(() => void this.mount());\n }\n }\n\n openInspector(request: AngularInspectorOpenRequest): void {\n this.element?.openInspector?.(\"message_toolbar\", request);\n }\n\n private async mount(): Promise<void> {\n try {\n const mod = await import(\"@copilotkit/web-inspector\");\n if (this.destroyed) return;\n\n mod.defineWebInspector?.();\n const existing = this.document.querySelector<WebInspectorElement>(\n mod.WEB_INSPECTOR_TAG,\n );\n const element =\n existing ??\n (this.document.createElement(\n mod.WEB_INSPECTOR_TAG,\n ) as WebInspectorElement);\n\n mod.configureWebInspectorElement(\n element,\n this.injector.get(CopilotKit).core,\n {\n development: this.isDevelopment,\n framework: \"angular\",\n sdkVersion: ANGULAR_SDK_VERSION,\n },\n );\n\n if (!existing) {\n this.document.body.appendChild(element);\n this.ownsElement = true;\n }\n this.element = element;\n } catch (error) {\n console.error(\"Failed to load CopilotKit inspector:\", error);\n }\n }\n}\n","import { AbstractAgent } from \"@ag-ui/client\";\nimport {\n FrontendTool,\n CopilotKitCore,\n CopilotKitCoreRuntimeConnectionStatus,\n CopilotRuntimeTransport,\n CopilotKitCoreGetSuggestionsResult,\n CopilotKitHeadersSource,\n CopilotKitMessageFilter,\n IntelligenceRuntimeInfo,\n RuntimeLicenseStatus,\n SuggestionsConfig,\n ThreadEndpointRuntimeInfo,\n ɵwithHeaderDefaults,\n} from \"@copilotkit/core\";\nimport {\n Injectable,\n Injector,\n Signal,\n WritableSignal,\n computed,\n runInInjectionContext,\n signal,\n inject,\n} from \"@angular/core\";\nimport {\n FrontendToolConfig,\n HumanInTheLoopConfig,\n RenderToolCallConfig,\n} from \"./tools\";\nimport {\n A2UI_DEFAULT_DESIGN_GUIDELINES,\n A2UI_DEFAULT_GENERATION_GUIDELINES,\n schemaToJsonSchema,\n RuntimeEntitlementResponse,\n} from \"@copilotkit/shared\";\nimport {\n ɵCOPILOTKIT_BUILT_IN_ACTIVITY_RENDERERS,\n RenderActivityMessageConfig,\n anyActivityContentSchema,\n} from \"./activity-renderer\";\nimport {\n injectCopilotKitConfig,\n ɵresolvePublicKeyHeaderDefaults,\n} from \"./config\";\nimport { HumanInTheLoop } from \"./human-in-the-loop\";\nimport { ensureLicenseWatermark } from \"./license-watermark\";\nimport { CopilotA2UIActivityRenderer } from \"./components/a2ui/a2ui-activity-renderer\";\nimport {\n A2UI_SCHEMA_CONTEXT_DESCRIPTION,\n buildCatalogContextValue,\n extractCatalogComponentSchemas,\n} from \"./components/a2ui/a2ui-catalog-context\";\nimport { CopilotA2UIRenderToolCall } from \"./components/a2ui/a2ui-render-tool-call\";\nimport { CopilotA2UIToolRenderer } from \"./components/a2ui/a2ui-tool-renderer\";\nimport {\n AGUI_SEND_STATE_SNAPSHOT_TOOL_NAME,\n RENDER_A2UI_TOOL_NAME,\n RenderA2UIArgsSchema,\n} from \"./components/a2ui/a2ui-tool-types\";\nimport {\n DEFAULT_OPEN_GENERATIVE_UI_DESIGN_SKILL,\n GENERATE_SANDBOXED_UI_DESCRIPTION,\n GENERATE_SANDBOXED_UI_TOOL_NAME,\n GenerateSandboxedUiArgsSchema,\n OPEN_GENERATIVE_UI_ACTIVITY_TYPE,\n GenerateSandboxedUiArgs,\n} from \"./open-generative-ui\";\nimport { CopilotOpenGenerativeUIActivityRenderer } from \"./components/open-generative-ui/open-generative-ui-activity-renderer\";\nimport { CopilotOpenGenerativeUIToolRenderer } from \"./components/open-generative-ui/open-generative-ui-tool-renderer\";\nimport { standardSchemaZodToJsonSchema } from \"./standard-schema-zod\";\nimport { CopilotInspector } from \"./inspector\";\n\n/**\n * Advertise a client-provided A2UI catalog to the runtime without mutating the\n * caller's properties object. The runtime uses this per-run capability to\n * enable A2UI middleware and inject its render tool when endpoint configuration\n * does not opt in separately; this mirrors the React provider contract.\n */\nfunction withA2UICatalogCapability(\n properties: Record<string, unknown> | undefined,\n hasCatalog: boolean,\n): Record<string, unknown> | undefined {\n return hasCatalog\n ? { ...properties, a2uiCatalogAvailable: true }\n : properties;\n}\n\n@Injectable({ providedIn: \"root\" })\nexport class CopilotKit {\n readonly #config = injectCopilotKitConfig();\n readonly #extensionActivityMessageRenderers = inject(\n ɵCOPILOTKIT_BUILT_IN_ACTIVITY_RENDERERS,\n );\n readonly #hitl = inject(HumanInTheLoop);\n readonly #rootInjector = inject(Injector);\n readonly #inspector = inject(CopilotInspector);\n /** Whether unknown tools may use the built-in text-only fallback renderer. */\n readonly defaultToolRenderingEnabled =\n this.#config.defaultToolRendering === true;\n readonly #agents = signal<Record<string, AbstractAgent>>(\n this.#config.agents ?? {},\n );\n readonly agents = this.#agents.asReadonly();\n readonly #runtimeConnectionStatus =\n signal<CopilotKitCoreRuntimeConnectionStatus>(\n CopilotKitCoreRuntimeConnectionStatus.Disconnected,\n );\n readonly runtimeConnectionStatus = this.#runtimeConnectionStatus.asReadonly();\n readonly #runtimeUrl = signal<string | undefined>(undefined);\n readonly runtimeUrl = this.#runtimeUrl.asReadonly();\n readonly #runtimeTransport = signal<CopilotRuntimeTransport>(\"auto\");\n readonly runtimeTransport = this.#runtimeTransport.asReadonly();\n readonly #headers = signal<Record<string, string>>({});\n /**\n * Snapshot as of the last header SOURCE change (a `setHeaders()`/\n * `updateRuntime({ headers })` call) — not necessarily current for a\n * builder. It updates from `onHeadersChanged`, which fires only on a real\n * source change, never on a builder merely resolving a fresh token during a\n * run. With a builder this can read `{}` (or a stale record) between\n * source changes even though requests are already carrying the current\n * token (#1937). For the value a builder would resolve right now, call\n * `copilotkit.core.resolveHeaders()` instead.\n */\n readonly headers = this.#headers.asReadonly();\n readonly #headersGeneration = signal<number>(0);\n /**\n * Bumped only when `setHeaders` accepts a real source change (a new\n * builder identity, or a record whose normalized values actually differ) —\n * never when a builder merely resolves a new token. Set from\n * `onHeadersChanged`, which fires only from a real `setHeaders()` call, so\n * subscribers can key thread-context dispatch and agent header refresh on\n * this signal instead of on header VALUES (see #1937).\n */\n readonly ɵheadersGeneration = this.#headersGeneration.asReadonly();\n readonly #credentials = signal<RequestCredentials | undefined>(undefined);\n readonly credentials = this.#credentials.asReadonly();\n readonly #threadEndpoints = signal<ThreadEndpointRuntimeInfo | undefined>(\n undefined,\n );\n /**\n * Thread-endpoint capability advertised by the connected runtime's `/info`\n * response, or `undefined` before the runtime reports `Connected`. Exposed\n * as a signal (rather than a plain `core.threadEndpoints` read) so reactive\n * consumers re-run when `/info` lands.\n */\n readonly threadEndpoints = this.#threadEndpoints.asReadonly();\n readonly #audioFileTranscriptionEnabled = signal(false);\n /**\n * Voice transcription capability advertised by the connected runtime's\n * `/info` response. The value remains false until the runtime explicitly\n * reports support.\n */\n readonly audioFileTranscriptionEnabled =\n this.#audioFileTranscriptionEnabled.asReadonly();\n readonly #intelligence = signal<IntelligenceRuntimeInfo | undefined>(\n undefined,\n );\n /**\n * Intelligence runtime info advertised by the connected runtime's `/info`\n * response, or `undefined` before the runtime reports `Connected`. Carries\n * the realtime `wsUrl`. Exposed as a signal so reactive consumers re-run\n * when `/info` populates it — even if the connection status does not\n * transition in the same turn.\n */\n readonly intelligence = this.#intelligence.asReadonly();\n readonly #licenseStatus = signal<RuntimeLicenseStatus | undefined>(undefined);\n /**\n * Server-reported license status from the connected runtime's `/info`\n * response, or `undefined` before the runtime reports it. Exposed as a signal\n * (rather than a plain `core.licenseStatus` read) so reactive consumers — e.g.\n * the threads drawer's license gate — re-run once the status resolves.\n */\n readonly licenseStatus = this.#licenseStatus.asReadonly();\n readonly #runtimeEntitlements = signal<\n RuntimeEntitlementResponse | undefined\n >(undefined);\n /**\n * Structured entitlement authority from the connected runtime's `/info`\n * response. Ready managed entitlements override legacy license status.\n */\n readonly runtimeEntitlements = this.#runtimeEntitlements.asReadonly();\n readonly #runtimeEntitlementRetryPending = signal(false);\n /**\n * Whether Core still owes the one bounded retry for a retryable entitlement\n * lookup. Gated UI stays pending until that retry settles.\n */\n readonly runtimeEntitlementRetryPending =\n this.#runtimeEntitlementRetryPending.asReadonly();\n readonly #suggestionsByAgent = signal<\n Record<string, CopilotKitCoreGetSuggestionsResult>\n >({});\n readonly suggestionsByAgent = this.#suggestionsByAgent.asReadonly();\n\n /**\n * The public-key header default, computed once from this instance's config\n * (license key / already-present header, see `resolveLicense` in\n * `config.ts`).\n */\n readonly #publicKeyDefaults = ɵresolvePublicKeyHeaderDefaults(this.#config);\n\n // `ɵwithHeaderDefaults` returns a new function for a function source on\n // every call. Remember the last source and its wrapper, so passing the same\n // builder again hands core the same function and stays a no-op (#1937).\n #lastHeadersSource: CopilotKitHeadersSource | undefined;\n #lastWrappedHeaders: CopilotKitHeadersSource | undefined;\n\n #withPublicKeyDefaults(\n source: CopilotKitHeadersSource,\n ): CopilotKitHeadersSource {\n if (source !== this.#lastHeadersSource) {\n this.#lastHeadersSource = source;\n this.#lastWrappedHeaders = ɵwithHeaderDefaults(\n source,\n this.#publicKeyDefaults,\n );\n }\n return this.#lastWrappedHeaders!;\n }\n\n readonly core = new CopilotKitCore({\n runtimeUrl: this.#config.runtimeUrl,\n headers: this.#withPublicKeyDefaults(this.#config.headers ?? {}),\n credentials: this.#config.credentials,\n messageFilter: this.#config.messageFilter,\n agents__unsafe_dev_only: {\n ...this.#config.agents,\n ...this.#config.selfManagedAgents,\n },\n tools: this.#config.tools,\n suggestionsConfig: this.#config.suggestionsConfig,\n properties: withA2UICatalogCapability(\n this.#config.properties,\n this.#config.a2ui?.catalog !== undefined,\n ),\n });\n\n readonly #toolCallRenderConfigs: WritableSignal<RenderToolCallConfig[]> =\n signal([]);\n readonly #builtInToolCallRenderConfigs: WritableSignal<\n RenderToolCallConfig[]\n > = signal([]);\n readonly #clientToolCallRenderConfigs: WritableSignal<FrontendToolConfig[]> =\n signal([]);\n readonly #builtInClientToolCallRenderConfigs: WritableSignal<\n FrontendToolConfig[]\n > = signal([]);\n readonly #humanInTheLoopToolRenderConfigs: WritableSignal<\n HumanInTheLoopConfig[]\n > = signal([]);\n readonly #activityMessageRenderConfigs: WritableSignal<\n RenderActivityMessageConfig[]\n > = signal([]);\n readonly #builtInActivityMessageRenderConfigs: WritableSignal<\n RenderActivityMessageConfig[]\n > = signal([]);\n\n readonly toolCallRenderConfigs: Signal<RenderToolCallConfig[]> = computed(\n () => [\n ...this.#toolCallRenderConfigs(),\n ...this.#builtInToolCallRenderConfigs(),\n ],\n );\n readonly clientToolCallRenderConfigs: Signal<FrontendToolConfig[]> = computed(\n () => [\n ...this.#clientToolCallRenderConfigs(),\n ...this.#builtInClientToolCallRenderConfigs(),\n ],\n );\n readonly humanInTheLoopToolRenderConfigs: Signal<HumanInTheLoopConfig[]> =\n this.#humanInTheLoopToolRenderConfigs.asReadonly();\n readonly activityMessageRenderConfigs: Signal<RenderActivityMessageConfig[]> =\n computed(() => [\n ...this.#activityMessageRenderConfigs(),\n ...this.#extensionActivityMessageRenderers,\n ...this.#builtInActivityMessageRenderConfigs(),\n ]);\n\n #openGenerativeUIToolRegistered = false;\n #openGenerativeUIContextIds: string[] = [];\n #warnedMissingA2UICatalog = false;\n #a2UIContextIds: string[] = [];\n\n constructor() {\n void this.#inspector.isInspectorEnabled;\n // A builder is only evaluated at send time, so it can't be read here.\n // The record branch below already has its own key-header fallback.\n ensureLicenseWatermark(\n typeof this.#config.headers === \"function\"\n ? undefined\n : this.#config.headers,\n );\n\n this.#runtimeConnectionStatus.set(this.core.runtimeConnectionStatus);\n this.#runtimeUrl.set(this.core.runtimeUrl);\n this.#runtimeTransport.set(this.core.runtimeTransport);\n this.#headers.set(this.core.headers);\n this.#headersGeneration.set(this.core.ɵheadersGeneration);\n this.#credentials.set(this.core.credentials);\n this.#threadEndpoints.set(this.core.threadEndpoints);\n this.#audioFileTranscriptionEnabled.set(\n this.core.audioFileTranscriptionEnabled,\n );\n this.#intelligence.set(this.core.intelligence);\n this.#licenseStatus.set(this.core.licenseStatus);\n this.#runtimeEntitlements.set(this.core.runtimeEntitlements);\n this.#runtimeEntitlementRetryPending.set(\n this.core.runtimeEntitlementRetryPending,\n );\n this.#config.renderToolCalls?.forEach((renderConfig) => {\n this.addRenderToolCall(renderConfig);\n });\n this.#config.renderActivityMessages?.forEach((renderConfig) => {\n this.addRenderActivityMessage(renderConfig);\n });\n\n this.#config.tools?.forEach((tool) => {\n if (tool.renderer && tool.parameters) {\n this.addRenderToolCall({\n name: tool.name,\n args: tool.parameters,\n component: tool.renderer,\n agentId: tool.agentId,\n });\n }\n });\n\n this.#config.frontendTools?.forEach((clientTool) => {\n this.addFrontendTool({ ...clientTool, injector: this.#rootInjector });\n });\n\n this.#config.humanInTheLoop?.forEach((humanInTheLoopTool) => {\n this.addHumanInTheLoop(humanInTheLoopTool);\n });\n\n // The core constructor registers dev agents without announcing them, so\n // its run tracking (per-run state, subagents) never subscribes to them.\n // Publish them once, as the React provider does on mount.\n const devAgents = {\n ...this.#config.agents,\n ...this.#config.selfManagedAgents,\n };\n if (Object.keys(devAgents).length > 0) {\n this.core.setAgents__unsafe_dev_only(devAgents);\n }\n\n this.core.subscribe({\n onAgentsChanged: () => {\n this.#agents.set(this.core.agents);\n },\n onRuntimeConnectionStatusChanged: ({ status }) => {\n // Core assigns `threadEndpoints`/`intelligence` synchronously before it\n // notifies this callback (see agent-registry `ensureRuntimeMode`), so\n // mirroring them here keeps the signals in lockstep with the status\n // signal and lets reactive consumers observe `intelligence.wsUrl` once\n // `/info` resolves.\n this.#runtimeConnectionStatus.set(status);\n this.#threadEndpoints.set(this.core.threadEndpoints);\n this.#audioFileTranscriptionEnabled.set(\n this.core.audioFileTranscriptionEnabled,\n );\n this.#intelligence.set(this.core.intelligence);\n this.#licenseStatus.set(this.core.licenseStatus);\n this.#runtimeEntitlements.set(this.core.runtimeEntitlements);\n this.#runtimeEntitlementRetryPending.set(\n this.core.runtimeEntitlementRetryPending,\n );\n this.#syncBuiltInActivityMessageRenderers();\n this.#syncBuiltInOpenGenerativeUI();\n },\n onHeadersChanged: ({ headers }) => {\n this.#headers.set(headers);\n // Fires only from a real `setHeaders()` call (a new source), never\n // from a builder resolving a new token — same generation core bumps.\n // Without this, nothing pokes Angular's reactivity when a source\n // change lands: `ɵheadersGeneration` (core's) is a plain property\n // read, not a signal, so `ɵheadersGeneration`-keyed dependents\n // (threads.ts, agent.ts) only re-read it when this handler sets ours.\n this.#headersGeneration.set(this.core.ɵheadersGeneration);\n },\n onSuggestionsChanged: ({ agentId, suggestions }) => {\n this.#setSuggestions(agentId, {\n suggestions,\n isLoading: this.core.getSuggestions(agentId).isLoading,\n });\n },\n onSuggestionsStartedLoading: ({ agentId }) => {\n this.#setSuggestions(agentId, {\n suggestions: this.core.getSuggestions(agentId).suggestions,\n isLoading: true,\n });\n },\n onSuggestionsFinishedLoading: ({ agentId }) => {\n this.#setSuggestions(agentId, {\n suggestions: this.core.getSuggestions(agentId).suggestions,\n isLoading: false,\n });\n },\n });\n this.#syncBuiltInActivityMessageRenderers();\n this.#syncBuiltInOpenGenerativeUI();\n }\n\n #setSuggestions(\n agentId: string,\n result: CopilotKitCoreGetSuggestionsResult,\n ): void {\n this.#suggestionsByAgent.update((current) => ({\n ...current,\n [agentId]: result,\n }));\n }\n\n #bindClientTool(\n clientToolWithInjector: FrontendToolConfig & {\n injector: Injector;\n },\n ): FrontendTool {\n const { injector, handler, ...frontendCandidate } = clientToolWithInjector;\n\n // A display-only registration declares no handler, and core has its own path\n // for that: it inserts an empty tool result and completes the turn. Binding a\n // wrapper here regardless would call `undefined` on the first tool call, and\n // substituting a stub would put an invented result into the thread instead.\n if (!handler) {\n return frontendCandidate;\n }\n\n return {\n ...frontendCandidate,\n handler: (args, context) =>\n runInInjectionContext(injector, () => handler(args, context)),\n };\n }\n\n addFrontendTool(\n clientToolWithInjector: FrontendToolConfig & {\n injector: Injector;\n },\n ): void {\n const tool = this.#bindClientTool(clientToolWithInjector);\n\n this.core.addTool(tool);\n\n this.#clientToolCallRenderConfigs.update((current) => [\n ...current,\n clientToolWithInjector,\n ]);\n }\n\n addRenderToolCall(renderConfig: RenderToolCallConfig): void {\n this.#toolCallRenderConfigs.update((current) => [...current, renderConfig]);\n }\n\n addRenderActivityMessage(renderConfig: RenderActivityMessageConfig): void {\n this.#activityMessageRenderConfigs.update((current) => [\n ...current,\n renderConfig,\n ]);\n }\n\n /** Remove one dynamically registered activity renderer by identity. */\n removeRenderActivityMessage(renderConfig: RenderActivityMessageConfig): void {\n this.#activityMessageRenderConfigs.update((current) =>\n current.filter((candidate) => candidate !== renderConfig),\n );\n }\n\n #syncBuiltInActivityMessageRenderers(): void {\n const renderers: RenderActivityMessageConfig[] = [];\n\n if (this.#isA2UIActive()) {\n renderers.push({\n activityType: \"a2ui-surface\",\n content: anyActivityContentSchema,\n component: CopilotA2UIActivityRenderer,\n });\n }\n\n if (this.#isOpenGenerativeUIActive()) {\n renderers.push({\n activityType: OPEN_GENERATIVE_UI_ACTIVITY_TYPE,\n content: anyActivityContentSchema,\n component: CopilotOpenGenerativeUIActivityRenderer,\n });\n }\n\n this.#builtInActivityMessageRenderConfigs.set(renderers);\n this.#syncBuiltInA2UI();\n }\n\n #syncBuiltInA2UI(): void {\n if (!this.#isA2UIActive()) {\n this.#builtInToolCallRenderConfigs.set([]);\n this.#removeA2UIContexts();\n return;\n }\n\n this.#builtInToolCallRenderConfigs.set([\n {\n name: RENDER_A2UI_TOOL_NAME,\n args: RenderA2UIArgsSchema,\n component: CopilotA2UIRenderToolCall,\n },\n {\n name: AGUI_SEND_STATE_SNAPSHOT_TOOL_NAME,\n args: RenderA2UIArgsSchema,\n component: CopilotA2UIToolRenderer,\n passAgent: true,\n },\n ]);\n this.#syncA2UIContexts();\n }\n\n /**\n * A2UI renders only with a configured catalog. Without one, the runtime may\n * still enable it, but surfaces could not render, so CopilotKit registers no\n * renderers or agent context and says how to fix it.\n */\n #isA2UIActive(): boolean {\n const hasCatalog = this.#config.a2ui?.catalog !== undefined;\n if (\n this.core.a2uiEnabled &&\n !hasCatalog &&\n !this.#warnedMissingA2UICatalog\n ) {\n this.#warnedMissingA2UICatalog = true;\n console.warn(\n \"[CopilotKit] The runtime enables A2UI, but no `a2ui.catalog` is configured, so A2UI stays off. \" +\n \"Pass `basicCatalog` or a catalog from `createAngularCatalog`, both in `@copilotkit/angular/a2ui`.\",\n );\n }\n return hasCatalog;\n }\n\n #syncA2UIContexts(): void {\n this.#removeA2UIContexts();\n\n const catalog = this.#config.a2ui?.catalog;\n if (!catalog) return;\n this.#a2UIContextIds.push(\n this.core.addContext({\n description:\n \"A2UI catalog capabilities: available catalog IDs and custom component definitions the client can render.\",\n value: buildCatalogContextValue(catalog),\n }),\n );\n\n if (this.#config.a2ui?.includeSchema === false) return;\n\n this.#a2UIContextIds.push(\n this.core.addContext({\n description: A2UI_SCHEMA_CONTEXT_DESCRIPTION,\n value: JSON.stringify(extractCatalogComponentSchemas(catalog)),\n }),\n );\n this.#a2UIContextIds.push(\n this.core.addContext({\n description:\n \"A2UI generation guidelines — protocol rules, tool arguments, path rules, data model format, and form/two-way-binding instructions.\",\n value: A2UI_DEFAULT_GENERATION_GUIDELINES,\n }),\n );\n this.#a2UIContextIds.push(\n this.core.addContext({\n description:\n \"A2UI design guidelines — visual design rules, component hierarchy tips, and action handler patterns.\",\n value: A2UI_DEFAULT_DESIGN_GUIDELINES,\n }),\n );\n }\n\n #removeA2UIContexts(): void {\n for (const id of this.#a2UIContextIds) {\n this.core.removeContext(id);\n }\n this.#a2UIContextIds = [];\n }\n\n #isOpenGenerativeUIActive(): boolean {\n return !!this.#config.openGenerativeUI || this.core.openGenerativeUIEnabled;\n }\n\n #createOpenGenerativeUITool(): FrontendToolConfig<GenerateSandboxedUiArgs> & {\n injector: Injector;\n } {\n return {\n name: GENERATE_SANDBOXED_UI_TOOL_NAME,\n description: GENERATE_SANDBOXED_UI_DESCRIPTION,\n parameters: GenerateSandboxedUiArgsSchema,\n component: CopilotOpenGenerativeUIToolRenderer,\n handler: async () => \"UI generated\",\n followUp: true,\n injector: this.#rootInjector,\n };\n }\n\n #syncBuiltInOpenGenerativeUI(): void {\n const active = this.#isOpenGenerativeUIActive();\n\n if (!active) {\n this.#builtInClientToolCallRenderConfigs.set([]);\n this.#removeOpenGenerativeUIContexts();\n if (this.#openGenerativeUIToolRegistered) {\n this.core.removeTool(GENERATE_SANDBOXED_UI_TOOL_NAME);\n this.#openGenerativeUIToolRegistered = false;\n }\n return;\n }\n\n const builtInTool = this.#createOpenGenerativeUITool();\n this.#builtInClientToolCallRenderConfigs.set([builtInTool]);\n\n if (\n !this.#openGenerativeUIToolRegistered &&\n !this.core.getTool({ toolName: GENERATE_SANDBOXED_UI_TOOL_NAME })\n ) {\n this.core.addTool(this.#bindClientTool(builtInTool));\n this.#openGenerativeUIToolRegistered = true;\n }\n\n this.#syncOpenGenerativeUIContexts();\n }\n\n #syncOpenGenerativeUIContexts(): void {\n this.#removeOpenGenerativeUIContexts();\n\n const designSkill =\n this.#config.openGenerativeUI?.designSkill ??\n DEFAULT_OPEN_GENERATIVE_UI_DESIGN_SKILL;\n this.#openGenerativeUIContextIds.push(\n this.core.addContext({\n description:\n \"Design guidelines for the generateSandboxedUi tool. Follow these when building UI.\",\n value: designSkill,\n }),\n );\n\n const sandboxFunctions =\n this.#config.openGenerativeUI?.sandboxFunctions ?? [];\n if (!sandboxFunctions.length) return;\n\n const descriptors = JSON.stringify(\n sandboxFunctions.map((fn) => ({\n name: fn.name,\n description: fn.description,\n parameters: schemaToJsonSchema(fn.parameters, {\n zodToJsonSchema: standardSchemaZodToJsonSchema,\n }),\n })),\n );\n\n this.#openGenerativeUIContextIds.push(\n this.core.addContext({\n description:\n \"Sandbox functions available in generated sandboxed UI code. Call via: await Websandbox.connection.remote.<functionName>(args)\",\n value: descriptors,\n }),\n );\n }\n\n #removeOpenGenerativeUIContexts(): void {\n for (const id of this.#openGenerativeUIContextIds) {\n this.core.removeContext(id);\n }\n this.#openGenerativeUIContextIds = [];\n }\n\n #bindHumanInTheLoopTool(\n humanInTheLoopTool: HumanInTheLoopConfig,\n ): FrontendTool {\n return {\n ...humanInTheLoopTool,\n type: \"human-in-the-loop\",\n handler: (args, { toolCall, signal: abortSignal }) => {\n return this.#hitl.onResult(\n toolCall.id,\n humanInTheLoopTool.name,\n abortSignal,\n );\n },\n };\n }\n\n addHumanInTheLoop(humanInTheLoopTool: HumanInTheLoopConfig): void {\n this.#humanInTheLoopToolRenderConfigs.update((current) => [\n ...current,\n humanInTheLoopTool,\n ]);\n\n const tool = this.#bindHumanInTheLoopTool(humanInTheLoopTool);\n\n this.core.addTool(tool);\n }\n\n addSuggestionsConfig(config: SuggestionsConfig): string {\n return this.core.addSuggestionsConfig(config);\n }\n\n removeSuggestionsConfig(id: string): void {\n this.core.removeSuggestionsConfig(id);\n }\n\n reloadSuggestions(agentId: string): void {\n this.core.reloadSuggestions(agentId);\n }\n\n clearSuggestions(agentId: string): void {\n this.core.clearSuggestions(agentId);\n }\n\n getSuggestions(agentId: string): CopilotKitCoreGetSuggestionsResult {\n return (\n this.#suggestionsByAgent()[agentId] ?? this.core.getSuggestions(agentId)\n );\n }\n\n #isSameAgentId<T extends { agentId?: string }>(\n target: T,\n agentId?: string,\n ): boolean {\n if (agentId) {\n return target.agentId === agentId;\n }\n\n return true;\n }\n\n removeTool(toolName: string, agentId?: string): void {\n this.core.removeTool(toolName, agentId);\n const keep = (config: { name: string; agentId?: string }) =>\n config.name !== toolName ||\n (agentId === undefined\n ? !!config.agentId\n : !this.#isSameAgentId(config, agentId));\n this.#clientToolCallRenderConfigs.update((current) => current.filter(keep));\n this.#humanInTheLoopToolRenderConfigs.update((current) =>\n current.filter(keep),\n );\n this.#toolCallRenderConfigs.update((current) => current.filter(keep));\n }\n\n getAgent(agentId: string): AbstractAgent | undefined {\n return this.core.getAgent(agentId);\n }\n\n updateRuntime(options: {\n runtimeUrl?: string;\n runtimeTransport?: CopilotRuntimeTransport;\n headers?: CopilotKitHeadersSource;\n credentials?: RequestCredentials;\n messageFilter?: CopilotKitMessageFilter;\n properties?: Record<string, unknown>;\n agents?: Record<string, AbstractAgent>;\n selfManagedAgents?: Record<string, AbstractAgent>;\n }): void {\n if (options.runtimeUrl !== undefined) {\n this.core.setRuntimeUrl(options.runtimeUrl);\n this.#runtimeUrl.set(options.runtimeUrl);\n }\n if (options.runtimeTransport !== undefined) {\n this.core.setRuntimeTransport(options.runtimeTransport);\n this.#runtimeTransport.set(options.runtimeTransport);\n }\n if (options.headers !== undefined) {\n this.core.setHeaders(this.#withPublicKeyDefaults(options.headers));\n this.#headers.set(this.core.headers);\n }\n if (\"credentials\" in options) {\n this.core.setCredentials(options.credentials);\n this.#credentials.set(options.credentials);\n }\n // `in`, not `!== undefined`: clearing the filter is a real instruction, and\n // `undefined` is the value that expresses it.\n if (\"messageFilter\" in options) {\n this.core.setMessageFilter(options.messageFilter);\n }\n if (options.properties !== undefined) {\n this.core.setProperties(\n withA2UICatalogCapability(\n options.properties,\n this.#config.a2ui?.catalog !== undefined,\n ) ?? options.properties,\n );\n }\n if (\n options.agents !== undefined ||\n options.selfManagedAgents !== undefined\n ) {\n this.core.setAgents__unsafe_dev_only({\n ...(options.agents ?? this.#config.agents),\n ...(options.selfManagedAgents ?? this.#config.selfManagedAgents),\n });\n }\n }\n}\n","import { DestroyRef, Injector, Signal, Type, inject } from \"@angular/core\";\nimport type { AbstractAgent } from \"@ag-ui/client\";\nimport { FrontendTool, FrontendToolHandlerContext } from \"@copilotkit/core\";\nimport type {\n FrontendToolReconnectBehavior,\n WebMCPToolConfig,\n} from \"@copilotkit/core\";\nimport type { StandardSchemaV1 } from \"@copilotkit/shared\";\nimport { CopilotKit } from \"./copilotkit\";\n\nexport type AngularToolCall<\n Args extends Record<string, unknown> = Record<string, unknown>,\n> =\n | {\n name?: string;\n args: Partial<Args>;\n status: \"in-progress\";\n result: undefined;\n }\n | {\n name?: string;\n args: Args;\n status: \"executing\";\n result: undefined;\n }\n | {\n name?: string;\n args: Args;\n status: \"complete\";\n result: string;\n };\n\nexport type HumanInTheLoopToolCall<\n Args extends Record<string, unknown> = Record<string, unknown>,\n> =\n | {\n name?: string;\n args: Partial<Args>;\n status: \"in-progress\";\n result: undefined;\n respond: (result: unknown) => void;\n }\n | {\n name?: string;\n args: Args;\n status: \"executing\";\n result: undefined;\n respond: (result: unknown) => void;\n }\n | {\n name?: string;\n args: Args;\n status: \"complete\";\n result: string;\n respond: (result: unknown) => void;\n };\n\nexport interface ToolRenderer<\n Args extends Record<string, unknown> = Record<string, unknown>,\n> {\n toolCall: Signal<AngularToolCall<Args>>;\n agent?: Signal<AbstractAgent | undefined>;\n}\n\nexport interface HumanInTheLoopToolRenderer<\n Args extends Record<string, unknown> = Record<string, unknown>,\n> {\n toolCall: Signal<HumanInTheLoopToolCall<Args>>;\n}\n\nexport type ClientTool<\n Args extends Record<string, unknown> = Record<string, unknown>,\n> = Omit<FrontendTool<Args>, \"handler\"> & {\n renderer?: Type<ToolRenderer<Args>>;\n};\n\nexport interface RenderToolCallConfig<\n Args extends Record<string, unknown> = Record<string, unknown>,\n> {\n name: string;\n args: StandardSchemaV1<unknown, Args>;\n component: Type<ToolRenderer<Args>>;\n agentId?: string;\n passAgent?: boolean;\n}\n\nexport interface FrontendToolConfig<\n Args extends Record<string, unknown> = Record<string, unknown>,\n> {\n name: string;\n description: string;\n parameters: StandardSchemaV1<unknown, Args>;\n component?: Type<ToolRenderer<Args>>;\n /**\n * Application code the agent runs by calling this tool.\n *\n * Optional, because a display-only registration has none: the agent calls the\n * tool to show `component` and nothing else happens. Core inserts an empty tool\n * result for a tool that declares no handler, so leaving this out completes the\n * turn without writing an invented result into the thread. Prefer\n * `registerComponent` for that case -- it is this shape with the model-facing\n * description built for you.\n */\n handler?: (\n args: Args,\n context: FrontendToolHandlerContext,\n ) => Promise<unknown>;\n followUp?: boolean;\n /**\n * Whether to run the handler again for a call that is still unanswered when\n * the thread's history is restored. Defaults to `\"passive\"`. See\n * `FrontendToolReconnectBehavior` in `@copilotkit/core`.\n */\n reconnectBehavior?: FrontendToolReconnectBehavior;\n agentId?: string;\n /**\n * Also expose this tool to browser agents through the WebMCP API\n * (`document.modelContext`). `true` uses default annotations;\n * `{ annotations }` provides WebMCP annotations.\n */\n webmcp?: boolean | WebMCPToolConfig;\n}\n\n/**\n * A component the agent can render in chat, with no application code behind it.\n *\n * The Angular counterpart of react-core's and vue's `useComponent`. It carries no\n * `handler` field at all rather than an optional one: a display-only component\n * that quietly ran application code would be a different feature, and a caller\n * who wants both wants `registerFrontendTool`.\n */\nexport interface RegisterComponentConfig<\n Args extends Record<string, unknown> = Record<string, unknown>,\n> {\n name: string;\n description?: string;\n parameters: StandardSchemaV1<unknown, Args>;\n component: Type<ToolRenderer<Args>>;\n agentId?: string;\n followUp?: boolean;\n}\n\nexport interface HumanInTheLoopConfig<\n Args extends Record<string, unknown> = Record<string, unknown>,\n> {\n name: string;\n description: string;\n parameters: StandardSchemaV1<unknown, Args>;\n component: Type<HumanInTheLoopToolRenderer<Args>>;\n agentId?: string;\n}\n\nexport function registerRenderToolCall<\n Args extends Record<string, unknown> = Record<string, unknown>,\n>(renderToolCall: RenderToolCallConfig<Args>): void {\n const copilotKit = inject(CopilotKit);\n const destroyRef = inject(DestroyRef);\n\n copilotKit.addRenderToolCall(renderToolCall);\n\n destroyRef.onDestroy(() => {\n copilotKit.removeTool(renderToolCall.name, renderToolCall.agentId);\n });\n}\n\nexport function registerFrontendTool<\n Args extends Record<string, unknown> = Record<string, unknown>,\n>(frontendTool: FrontendToolConfig<Args>): void {\n const injector = inject(Injector);\n const destroyRef = inject(DestroyRef);\n const copilotKit = inject(CopilotKit);\n\n copilotKit.addFrontendTool({\n ...(frontendTool as FrontendToolConfig),\n injector,\n });\n\n destroyRef.onDestroy(() => {\n copilotKit.removeTool(frontendTool.name, frontendTool.agentId);\n });\n}\n\n/**\n * Registers an Angular component as a tool the agent can call to display it.\n *\n * The simplest generative-UI registration there is, and the only one that needs\n * nothing on the agent side: the tool is declared by the frontend and forwarded to\n * the agent over AG-UI, so it works the same behind a Python agent as a TypeScript\n * one. Contrast `registerRenderToolCall`, which draws a tool the agent already\n * has and therefore requires that tool to exist in the agent.\n *\n * The component is an ordinary `ToolRenderer`: it takes the required `toolCall`\n * signal input and reads `toolCall().args`, exactly as it would under\n * `registerFrontendTool` or `registerRenderToolCall`.\n *\n * Registration is removed when the calling injector is destroyed.\n *\n * @param config - Name, parameter schema, and component to render.\n *\n * @example\n * ```ts\n * registerComponent({\n * name: \"show_incident\",\n * description: \"Show one incident from the incident table.\",\n * parameters: z.object({ id: z.string(), severity: z.string() }),\n * component: IncidentCardComponent,\n * });\n * ```\n */\nexport function registerComponent<\n Args extends Record<string, unknown> = Record<string, unknown>,\n>(config: RegisterComponentConfig<Args>): void {\n // The same prefix react-core and vue build, so the tool reads identically to the\n // model whichever frontend registered the component.\n const prefix = `Use this tool to display the \"${config.name}\" component in the chat. This tool renders a visual UI component for the user.`;\n\n registerFrontendTool<Args>({\n name: config.name,\n description: config.description\n ? `${prefix}\\n\\n${config.description}`\n : prefix,\n parameters: config.parameters,\n component: config.component,\n agentId: config.agentId,\n followUp: config.followUp,\n });\n}\n\nexport function registerHumanInTheLoop<\n Args extends Record<string, unknown> = Record<string, unknown>,\n>(humanInTheLoop: HumanInTheLoopConfig<Args>): void {\n const destroyRef = inject(DestroyRef);\n const copilotKit = inject(CopilotKit);\n\n copilotKit.addHumanInTheLoop(humanInTheLoop);\n\n destroyRef.onDestroy(() => {\n copilotKit.removeTool(humanInTheLoop.name, humanInTheLoop.agentId);\n });\n}\n","import { NgComponentOutlet } from \"@angular/common\";\nimport {\n Component,\n inject,\n input,\n ChangeDetectionStrategy,\n} from \"@angular/core\";\nimport type {\n AssistantMessage,\n Message,\n ToolCall,\n ToolMessage,\n} from \"@ag-ui/client\";\nimport type { AbstractAgent } from \"@ag-ui/client\";\nimport { contentToText } from \"@ag-ui/client\";\nimport { CopilotKit } from \"./copilotkit\";\nimport type {\n FrontendToolConfig,\n HumanInTheLoopToolCall,\n HumanInTheLoopConfig,\n AngularToolCall,\n RenderToolCallConfig,\n} from \"./tools\";\nimport { partialJSONParse } from \"@copilotkit/shared\";\nimport { HumanInTheLoop } from \"./human-in-the-loop\";\nimport { CopilotDefaultToolRenderer } from \"./components/tools/default-tool-renderer\";\n\ntype RendererToolCallHandler = {\n type: \"renderer\";\n config: RenderToolCallConfig;\n};\ntype ClientToolCallHandler = {\n type: \"clientTool\";\n config: FrontendToolConfig;\n};\ntype HumanInTheLoopToolCallHandler = {\n type: \"humanInTheLoopTool\";\n config: HumanInTheLoopConfig;\n};\ntype BuiltInToolCallHandler = {\n type: \"builtIn\";\n config: { component: typeof CopilotDefaultToolRenderer };\n};\n\nexport type ToolCallHandler =\n | RendererToolCallHandler\n | ClientToolCallHandler\n | HumanInTheLoopToolCallHandler\n | BuiltInToolCallHandler;\n\n/** Parse tool-call arguments without allowing malformed payloads to escape. */\nexport function parseToolCallArguments(\n rawArguments: string,\n allowPartial = false,\n): Record<string, unknown> {\n try {\n const parsed = allowPartial\n ? partialJSONParse(rawArguments)\n : JSON.parse(rawArguments);\n\n if (\n typeof parsed === \"object\" &&\n parsed !== null &&\n !Array.isArray(parsed)\n ) {\n return parsed as Record<string, unknown>;\n }\n\n return { _value: parsed };\n } catch {\n return { _raw: rawArguments };\n }\n}\n\ninterface PickToolCallHandlerOptions {\n name: string;\n agentId?: string;\n application: readonly RenderToolCallConfig[];\n frontend: readonly FrontendToolConfig[];\n humanInTheLoop: readonly HumanInTheLoopConfig[];\n builtInFallback: boolean;\n}\n\nfunction namedForAgent<T extends { name: string; agentId?: string }>(\n entries: readonly T[],\n name: string,\n agentId: string | undefined,\n): T | undefined {\n const scoped =\n agentId === undefined\n ? undefined\n : entries.find(\n (entry) => entry.name === name && entry.agentId === agentId,\n );\n return (\n scoped ?? entries.find((entry) => entry.name === name && !entry.agentId)\n );\n}\n\n/** Resolve the documented application/frontend/wildcard/fallback precedence. */\nexport function pickToolCallHandler(\n options: PickToolCallHandlerOptions,\n): ToolCallHandler | undefined {\n const application = namedForAgent(\n options.application.filter((entry) => entry.name !== \"*\"),\n options.name,\n options.agentId,\n );\n if (application) return { type: \"renderer\", config: application };\n\n const frontend = namedForAgent(\n options.frontend.filter((entry) => entry.component !== undefined),\n options.name,\n options.agentId,\n );\n if (frontend) return { type: \"clientTool\", config: frontend };\n\n const humanInTheLoop = namedForAgent(\n options.humanInTheLoop,\n options.name,\n options.agentId,\n );\n if (humanInTheLoop) {\n return { type: \"humanInTheLoopTool\", config: humanInTheLoop };\n }\n\n const wildcard = namedForAgent(\n options.application.filter((entry) => entry.name === \"*\"),\n \"*\",\n options.agentId,\n );\n if (wildcard) return { type: \"renderer\", config: wildcard };\n if (options.builtInFallback) {\n return {\n type: \"builtIn\",\n config: { component: CopilotDefaultToolRenderer },\n };\n }\n return undefined;\n}\n\n@Component({\n selector: \"copilot-render-tool-calls\",\n imports: [NgComponentOutlet],\n changeDetection: ChangeDetectionStrategy.Eager,\n template: `\n @for (toolCall of message().toolCalls ?? []; track toolCall.id) {\n @let renderConfig = pickRenderer(toolCall.function.name);\n @if (\n renderConfig &&\n renderConfig.type !== \"humanInTheLoopTool\" &&\n renderConfig.config.component\n ) {\n <ng-container\n *ngComponentOutlet=\"\n renderConfig.config.component;\n inputs: buildRendererInputs(toolCall, renderConfig)\n \"\n />\n }\n @if (\n renderConfig &&\n renderConfig.type === \"humanInTheLoopTool\" &&\n renderConfig.config.component\n ) {\n <ng-container\n *ngComponentOutlet=\"\n renderConfig.config.component;\n inputs: { toolCall: buildHumanInTheLoopToolCall(toolCall) }\n \"\n />\n }\n }\n `,\n})\nexport class RenderToolCalls {\n readonly #copilotKit = inject(CopilotKit);\n readonly #hitl = inject(HumanInTheLoop);\n readonly message = input.required<AssistantMessage>();\n readonly messages = input.required<Message[]>();\n readonly isLoading = input<boolean>(false);\n readonly agentId = input<string | undefined>();\n\n protected pickRenderer(name: string): ToolCallHandler | undefined {\n type AssistantMessageWithAgent = AssistantMessage & {\n agentId?: string;\n };\n const messageAgentId = (this.message() as AssistantMessageWithAgent)\n .agentId;\n const renderers = this.#copilotKit.toolCallRenderConfigs();\n const clientTools = this.#copilotKit.clientToolCallRenderConfigs();\n const humanInTheLoopTools =\n this.#copilotKit.humanInTheLoopToolRenderConfigs();\n\n return pickToolCallHandler({\n name,\n agentId: this.agentId() ?? messageAgentId,\n application: renderers,\n frontend: clientTools,\n humanInTheLoop: humanInTheLoopTools,\n builtInFallback: this.#copilotKit.defaultToolRenderingEnabled,\n });\n }\n\n protected buildToolCall<Args extends Record<string, unknown>>(\n toolCall: ToolCall,\n ): AngularToolCall<Args> {\n const args = parseToolCallArguments(\n toolCall.function.arguments,\n this.isLoading(),\n ) as Args;\n const message = this.#getToolMessage(toolCall.id);\n\n if (message) {\n return {\n name: toolCall.function.name,\n args,\n status: \"complete\",\n result: contentToText(message.content),\n };\n } else if (this.isLoading()) {\n return {\n name: toolCall.function.name,\n args,\n status: \"in-progress\",\n result: undefined,\n };\n } else {\n return {\n name: toolCall.function.name,\n args,\n status: \"executing\",\n result: undefined,\n };\n }\n }\n\n protected buildRendererInputs<Args extends Record<string, unknown>>(\n toolCall: ToolCall,\n handler:\n | RendererToolCallHandler\n | ClientToolCallHandler\n | BuiltInToolCallHandler,\n ): {\n toolCall: AngularToolCall<Args>;\n agent?: AbstractAgent;\n } {\n const inputs: {\n toolCall: AngularToolCall<Args>;\n agent?: AbstractAgent;\n } = {\n toolCall: this.buildToolCall<Args>(toolCall),\n };\n\n const shouldPassAgent =\n \"passAgent\" in handler.config && handler.config.passAgent === true;\n\n if (!shouldPassAgent) {\n return inputs;\n }\n\n const agentId = this.agentId() ?? this.#messageAgentId();\n if (!agentId) {\n return inputs;\n }\n\n const agent = this.#copilotKit.getAgent(agentId);\n if (agent) {\n inputs.agent = agent;\n }\n\n return inputs;\n }\n\n protected buildHumanInTheLoopToolCall<Args extends Record<string, unknown>>(\n toolCall: ToolCall,\n ): HumanInTheLoopToolCall<Args> {\n const args = parseToolCallArguments(\n toolCall.function.arguments,\n this.isLoading(),\n ) as Args;\n const message = this.#getToolMessage(toolCall.id);\n const respond = (result: unknown) => {\n this.#hitl.addResult(toolCall.id, toolCall.function.name, result);\n };\n\n if (message) {\n return {\n name: toolCall.function.name,\n args,\n status: \"complete\",\n result: contentToText(message.content),\n respond,\n };\n } else if (this.isLoading()) {\n return {\n name: toolCall.function.name,\n args,\n status: \"in-progress\",\n result: undefined,\n respond,\n };\n } else {\n return {\n name: toolCall.function.name,\n args,\n status: \"executing\",\n result: undefined,\n respond,\n };\n }\n }\n\n #getToolMessage(toolCallId: string): ToolMessage | undefined {\n const message = this.messages().find(\n (m): m is ToolMessage => m.role === \"tool\" && m.toolCallId === toolCallId,\n );\n\n return message;\n }\n\n #messageAgentId(): string | undefined {\n return (this.message() as AssistantMessage & { agentId?: string }).agentId;\n }\n}\n","import type { Signal } from \"@angular/core\";\nimport { computed, signal } from \"@angular/core\";\nimport { randomUUID } from \"@ag-ui/client\";\nimport type {\n AbstractAgent,\n Interrupt,\n Message,\n ResumeEntry,\n RunAgentResult,\n} from \"@ag-ui/client\";\nimport { ɵInterruptState } from \"@copilotkit/core\";\nimport type { ɵInterruptDecision, ɵPendingInterrupt } from \"@copilotkit/core\";\n\nconst INTERRUPT_EVENT_NAME = \"on_interrupt\";\n\ntype PendingInterrupt<TValue> = ɵPendingInterrupt<TValue>;\n\n/** Legacy custom-event interrupt payload. */\nexport interface InterruptEvent<TValue = unknown> {\n name: string;\n value: TValue;\n}\n\n/** Options forwarded when resuming an interrupted agent. */\nexport interface InterruptRunOptions {\n runId?: string;\n resume?: ResumeEntry[];\n forwardedProps?: Record<string, unknown>;\n}\n\n/** Injectable interrupt filtering and preprocessing options. */\nexport interface InjectInterruptOptions<TValue = unknown, TResult = never> {\n /** Agent id or signal. Defaults to the ambient chat agent. */\n agentId?: string | Signal<string | undefined>;\n /** Return false to leave this interrupt for a different controller. */\n enabled?: (event: InterruptEvent<TValue>) => boolean | PromiseLike<boolean>;\n /** Optionally prepare data for the interrupt UI. */\n handler?: (\n props: InterruptHandlerProps<TValue>,\n ) => TResult | PromiseLike<TResult>;\n}\n\n/** Actions and normalized protocol data passed to interrupt handlers. */\nexport interface InterruptHandlerProps<TValue = unknown> {\n event: InterruptEvent<TValue>;\n interrupt: Interrupt | null;\n interrupts: readonly Interrupt[];\n resolve: InterruptController<TValue>[\"resolve\"];\n cancel: InterruptController<TValue>[\"cancel\"];\n}\n\n/** Reactive data suitable for binding to an application interrupt component. */\nexport interface InterruptView<\n TValue = unknown,\n TResult = unknown,\n> extends InterruptHandlerProps<TValue> {\n result: TResult | null;\n}\n\nexport type InterruptRunner = (\n agent: AbstractAgent,\n options: InterruptRunOptions,\n) => Promise<RunAgentResult>;\n\n/** Error surfaced when an application attempts to resume an expired interrupt. */\nexport class InterruptExpiredError extends Error {\n constructor(readonly interrupt: Interrupt) {\n super(\n `Interrupt ${interrupt.id} expired at ${interrupt.expiresAt ?? \"an unknown time\"}.`,\n );\n this.name = \"InterruptExpiredError\";\n }\n}\n\nfunction toLegacyEvent<TValue>(\n pending: PendingInterrupt<TValue>,\n): InterruptEvent<TValue> {\n if (pending.kind === \"legacy\") return pending.event;\n return {\n name: INTERRUPT_EVENT_NAME,\n value: pending.interrupts[0] as TValue,\n };\n}\n\nfunction isPromiseLike<TValue>(\n value: TValue | PromiseLike<TValue>,\n): value is PromiseLike<TValue> {\n return (\n (typeof value === \"object\" || typeof value === \"function\") &&\n value !== null &&\n typeof Reflect.get(value, \"then\") === \"function\"\n );\n}\n\n/**\n * Signal-based state machine for standard AG-UI and legacy interrupts.\n *\n * Prefer {@link injectInterrupt} in application components. The public class is\n * useful for framework adapters and deterministic lifecycle tests.\n */\nexport class InterruptController<TValue = unknown, TResult = never> {\n readonly #pending = signal<PendingInterrupt<TValue> | null>(null);\n readonly #accepted = signal(false);\n readonly #result = signal<TResult | null>(null);\n readonly #error = signal<unknown | null>(null);\n readonly #interruptState = new ɵInterruptState<TValue>();\n readonly #runner: InterruptRunner;\n readonly #options: InjectInterruptOptions<TValue, TResult>;\n #agent?: AbstractAgent;\n #unsubscribe?: () => void;\n #threadId?: string;\n #handlerGeneration = 0;\n #resumePromise?: Promise<RunAgentResult | void>;\n\n readonly event = computed<InterruptEvent<TValue> | null>(() => {\n const pending = this.#pending();\n return pending && this.#accepted() ? toLegacyEvent(pending) : null;\n });\n readonly interrupt = computed<Interrupt | null>(() => {\n const pending = this.#pending();\n return pending?.kind === \"standard\" && this.#accepted()\n ? (pending.interrupts[0] ?? null)\n : null;\n });\n readonly interrupts = computed<readonly Interrupt[]>(() => {\n const pending = this.#pending();\n return pending?.kind === \"standard\" && this.#accepted()\n ? pending.interrupts\n : [];\n });\n readonly result = this.#result.asReadonly();\n readonly error = this.#error.asReadonly();\n readonly hasInterrupt = computed(\n () => this.#pending() !== null && this.#accepted(),\n );\n readonly view = computed<InterruptView<TValue, TResult> | null>(() => {\n const event = this.event();\n if (!event) return null;\n return {\n event,\n interrupt: this.interrupt(),\n interrupts: this.interrupts(),\n result: this.result(),\n resolve: this.resolve,\n cancel: this.cancel,\n };\n });\n\n constructor(\n runner: InterruptRunner,\n options: InjectInterruptOptions<TValue, TResult> = {},\n ) {\n this.#runner = runner;\n this.#options = options;\n }\n\n /** Subscribe to an agent, replacing any previous lifecycle subscription. */\n connect(agent: AbstractAgent): void {\n if (agent === this.#agent) return;\n this.#unsubscribe?.();\n this.#agent = agent;\n this.#threadId = agent.threadId;\n this.#clear();\n\n let legacy: InterruptEvent<TValue> | null = null;\n let standard: Interrupt[] | null = null;\n const subscription = agent.subscribe({\n onCustomEvent: ({ event }) => {\n if (event.name === INTERRUPT_EVENT_NAME) {\n legacy = {\n name: event.name,\n value: event.value as TValue,\n };\n }\n },\n onRunFinishedEvent: (params) => {\n if (params.outcome === \"interrupt\") {\n standard = params.interrupts;\n }\n },\n onRunStartedEvent: () => {\n legacy = null;\n standard = null;\n this.#threadId = agent.threadId;\n this.#clear();\n },\n onRunFinalized: () => {\n if (standard && standard.length > 0) {\n this.#setPending({ kind: \"standard\", interrupts: standard });\n } else if (legacy) {\n this.#setPending({ kind: \"legacy\", event: legacy });\n }\n legacy = null;\n standard = null;\n },\n onRunFailed: ({ error }) => {\n legacy = null;\n standard = null;\n this.#clear(error);\n },\n onRunErrorEvent: ({ event }) => {\n legacy = null;\n standard = null;\n this.#clear(new Error(event.message));\n },\n });\n this.#unsubscribe = () => subscription.unsubscribe();\n if (agent.pendingInterrupts.length > 0) {\n this.#setPending({\n kind: \"standard\",\n interrupts: [...agent.pendingInterrupts],\n });\n }\n }\n\n /** Clear pending decisions when the host changes threads. */\n setThreadId(threadId: string): void {\n if (this.#threadId === undefined) {\n this.#threadId = threadId;\n return;\n }\n if (threadId === this.#threadId) return;\n this.#threadId = threadId;\n this.#clear();\n }\n\n /** Resolve one interrupt, resuming only after the complete set is addressed. */\n readonly resolve = async (\n payload?: unknown,\n interruptId?: string,\n ): Promise<RunAgentResult | void> => {\n if (this.#resumePromise) return this.#resumePromise;\n if (!this.#accepted()) return;\n const current = this.#pending();\n const agent = this.#agent;\n if (!current || !agent) return;\n if (!this.#isCurrentThread(agent)) return;\n\n if (current.kind === \"legacy\") {\n const decision = this.#interruptState.resolve(payload, interruptId);\n if (decision.kind !== \"legacy-resume\") return;\n return this.#startResume(agent, {\n forwardedProps: {\n command: {\n resume: decision.payload,\n interruptEvent: decision.interruptValue,\n },\n },\n });\n }\n\n const id = this.#targetId(current.interrupts, interruptId);\n if (!id) return;\n return this.#handleStandardDecision(\n agent,\n this.#interruptState.resolve(payload, id),\n );\n };\n\n /** Cancel one standard interrupt; legacy interrupts are dismissed locally. */\n readonly cancel = async (\n interruptId?: string,\n ): Promise<RunAgentResult | void> => {\n if (this.#resumePromise) return this.#resumePromise;\n if (!this.#accepted()) return;\n const current = this.#pending();\n const agent = this.#agent;\n if (!current || !agent) return;\n if (!this.#isCurrentThread(agent)) return;\n\n if (current.kind === \"legacy\") {\n const decision = this.#interruptState.cancel(interruptId);\n if (decision.kind !== \"dismiss\") return;\n console.warn(\n \"[CopilotKit] injectInterrupt: legacy on_interrupt events cannot be cancelled; dismissing.\",\n );\n this.#clear();\n return;\n }\n\n const id = this.#targetId(current.interrupts, interruptId);\n if (!id) return;\n return this.#handleStandardDecision(agent, this.#interruptState.cancel(id));\n };\n\n /** Alias retained for parity with other CopilotKit framework adapters. */\n readonly resolveInterrupt = this.resolve;\n /** Alias retained for parity with other CopilotKit framework adapters. */\n readonly cancelInterrupt = this.cancel;\n\n /** Release the agent subscription and clear sensitive pending state. */\n destroy(): void {\n this.#unsubscribe?.();\n this.#unsubscribe = undefined;\n this.#agent = undefined;\n this.#clear();\n }\n\n #setPending(pending: PendingInterrupt<TValue>): void {\n this.#handlerGeneration += 1;\n const generation = this.#handlerGeneration;\n this.#pending.set(pending);\n this.#accepted.set(false);\n this.#result.set(null);\n this.#error.set(null);\n if (pending.kind === \"standard\") {\n this.#interruptState.setStandard(pending.interrupts);\n } else {\n this.#interruptState.setLegacy(pending.event);\n }\n\n const event = toLegacyEvent(pending);\n let enabled: boolean | PromiseLike<boolean> = true;\n try {\n enabled = this.#options.enabled?.(event) ?? true;\n } catch (error) {\n this.#handlePredicateFailure(error, generation);\n return;\n }\n\n if (isPromiseLike(enabled)) {\n Promise.resolve(enabled).then(\n (accepted) => {\n if (generation !== this.#handlerGeneration || !accepted) return;\n this.#activatePending(pending, event, generation);\n },\n (error: unknown) => this.#handlePredicateFailure(error, generation),\n );\n return;\n }\n if (!enabled) return;\n this.#activatePending(pending, event, generation);\n }\n\n #activatePending(\n pending: PendingInterrupt<TValue>,\n event: InterruptEvent<TValue>,\n generation: number,\n ): void {\n if (generation !== this.#handlerGeneration) return;\n this.#accepted.set(true);\n const handler = this.#options.handler;\n if (!handler) return;\n let prepared: TResult | PromiseLike<TResult>;\n try {\n prepared = handler({\n event,\n interrupt:\n pending.kind === \"standard\" ? (pending.interrupts[0] ?? null) : null,\n interrupts: pending.kind === \"standard\" ? pending.interrupts : [],\n resolve: this.resolve,\n cancel: this.cancel,\n });\n } catch (error) {\n this.#handlePreparationFailure(error, generation);\n return;\n }\n\n if (isPromiseLike(prepared)) {\n Promise.resolve(prepared).then(\n (result) => {\n if (generation === this.#handlerGeneration) this.#result.set(result);\n },\n (error: unknown) => this.#handlePreparationFailure(error, generation),\n );\n } else {\n this.#result.set(prepared);\n }\n }\n\n #handlePredicateFailure(error: unknown, generation: number): void {\n if (generation !== this.#handlerGeneration) return;\n console.error(\n \"[CopilotKit] injectInterrupt enabled predicate failed; ignoring interrupt:\",\n error,\n );\n this.#accepted.set(false);\n this.#error.set(error);\n }\n\n #handlePreparationFailure(error: unknown, generation: number): void {\n if (generation !== this.#handlerGeneration) return;\n console.error(\"[CopilotKit] injectInterrupt handler failed:\", error);\n this.#result.set(null);\n this.#error.set(error);\n }\n\n #targetId(\n interrupts: readonly Interrupt[],\n requestedId: string | undefined,\n ): string | undefined {\n if (interrupts.length > 1 && requestedId === undefined) {\n console.warn(\n `[CopilotKit] injectInterrupt: resolve()/cancel() called without an interruptId while ${interrupts.length} interrupts are open; defaulting to the first.`,\n );\n }\n const id = requestedId ?? interrupts[0]?.id;\n if (!id || !interrupts.some((interrupt) => interrupt.id === id)) {\n console.warn(\n `[CopilotKit] injectInterrupt: ignored unknown interrupt id ${String(id)}.`,\n );\n return undefined;\n }\n return id;\n }\n\n async #handleStandardDecision(\n agent: AbstractAgent,\n decision: ɵInterruptDecision,\n ): Promise<RunAgentResult | void> {\n if (decision.kind === \"waiting\" || decision.kind === \"ignored\") return;\n if (decision.kind === \"expired\") {\n const error = new InterruptExpiredError(decision.interrupt);\n console.error(`[CopilotKit] injectInterrupt: ${error.message}`);\n this.#clear(error);\n return;\n }\n if (decision.kind !== \"resume\") return;\n\n try {\n const toolMessages = decision.toolResults.map(\n (toolResult): Message =>\n ({\n id: randomUUID(),\n role: \"tool\",\n toolCallId: toolResult.toolCallId,\n content: toolResult.content,\n }) as Message,\n );\n for (const message of toolMessages) agent.addMessage(message);\n return this.#startResume(agent, {\n resume: decision.resume,\n });\n } catch (error) {\n this.#clear(error);\n throw error;\n }\n }\n\n #startResume(\n agent: AbstractAgent,\n options: InterruptRunOptions,\n ): Promise<RunAgentResult | void> {\n const pending = this.#pending();\n let run: Promise<RunAgentResult>;\n try {\n run = this.#runner(agent, options);\n } catch (error) {\n this.#clear(error);\n return Promise.reject(error);\n }\n\n const tracked = run.catch((error: unknown) => {\n const stillCurrent = this.#pending() === pending;\n console.error(\n stillCurrent\n ? \"[CopilotKit] injectInterrupt resume failed; pending state was cleared and the run will not be retried:\"\n : \"[CopilotKit] a stale injectInterrupt resume failed after the controller moved on:\",\n error,\n );\n if (stillCurrent) this.#clear(error);\n throw error;\n });\n if (this.#pending() === pending) this.#resumePromise = tracked;\n return tracked;\n }\n\n #isCurrentThread(agent: AbstractAgent): boolean {\n if (this.#threadId === agent.threadId) return true;\n this.setThreadId(agent.threadId);\n return false;\n }\n\n #clear(error: unknown | null = null): void {\n this.#handlerGeneration += 1;\n this.#pending.set(null);\n this.#accepted.set(false);\n this.#result.set(null);\n this.#error.set(error);\n this.#resumePromise = undefined;\n this.#interruptState.clear();\n }\n}\n","import type { Signal, WritableSignal } from \"@angular/core\";\nimport {\n DestroyRef,\n Injectable,\n inject,\n signal,\n computed,\n untracked,\n} from \"@angular/core\";\nimport { CopilotKit } from \"./copilotkit\";\nimport { InterruptController, type InterruptRunner } from \"./interrupt\";\nimport type { AbstractAgent } from \"@ag-ui/client\";\nimport type { AgentSubscriber, Message, State } from \"@ag-ui/client\";\nimport { DEFAULT_AGENT_ID } from \"@copilotkit/shared\";\nimport type { CopilotKitCore } from \"@copilotkit/core\";\nimport {\n ProxiedCopilotRuntimeAgent,\n CopilotKitCoreRuntimeConnectionStatus,\n} from \"@copilotkit/core\";\n\n/** Function signature for subscribing to an agent — derived from\n * CopilotKitCore so the types stay in sync automatically. Injected\n * by the factory so that AgentStore stays decoupled from the concrete class. */\ntype SubscribeToAgentFn = CopilotKitCore[\"subscribeToAgentWithOptions\"];\ntype AgentWithCredentials = AbstractAgent & {\n credentials?: RequestCredentials;\n};\n\nconst missingInterruptRunner: InterruptRunner = async () => {\n throw new Error(\n \"AgentStore.interruptController requires a store created by injectAgentStore().\",\n );\n};\n\nfunction hasAgentCredentials(\n agent: AbstractAgent,\n): agent is AgentWithCredentials {\n return \"credentials\" in agent;\n}\n\nexport class AgentStore {\n readonly #subscription?: {\n unsubscribe: () => void;\n };\n readonly #isRunning: WritableSignal<boolean>;\n readonly #messages: WritableSignal<Message[]>;\n readonly #state: WritableSignal<unknown>;\n #unregisterDestroy?: () => void;\n #tornDown = false;\n\n readonly agent: AbstractAgent;\n readonly isRunning: Signal<boolean>;\n readonly messages: Signal<Message[]>;\n readonly state: Signal<unknown>;\n /** Unfiltered interrupt controller bound to this store's agent. */\n readonly interruptController: InterruptController;\n\n constructor(\n abstractAgent: AbstractAgent,\n destroyRef: DestroyRef,\n subscribeToAgent: SubscribeToAgentFn,\n interruptRunner: InterruptRunner = missingInterruptRunner,\n ) {\n this.agent = abstractAgent;\n this.interruptController = new InterruptController(interruptRunner);\n // A connected agent can already carry restored thread data before this\n // store subscribes. Seed the signals synchronously so the first render is\n // complete instead of waiting for a future mutation that may never occur.\n this.#isRunning = signal(abstractAgent.isRunning);\n this.isRunning = this.#isRunning.asReadonly();\n this.#messages = signal([...abstractAgent.messages]);\n this.#state = signal(snapshotState(abstractAgent.state));\n this.messages = this.#messages.asReadonly();\n this.state = this.#state.asReadonly();\n\n this.#subscription = subscribeToAgent(abstractAgent, {\n onMessagesChanged: () => {\n this.#isRunning.set(abstractAgent.isRunning);\n this.#messages.set([...abstractAgent.messages]);\n },\n onStateChanged: () => {\n this.#isRunning.set(abstractAgent.isRunning);\n this.#state.set(snapshotState(abstractAgent.state));\n },\n onRunInitialized: () => {\n this.#isRunning.set(true);\n },\n onRunStartedEvent: () => {\n this.#isRunning.set(abstractAgent.isRunning);\n },\n onRunFinalized: () => {\n this.#isRunning.set(false);\n },\n onRunFailed: () => {\n this.#isRunning.set(false);\n },\n // Protocol-level RUN_ERROR event (distinct from onRunFailed which\n // handles local exceptions like network errors).\n onRunErrorEvent: () => {\n // A replayed error does not end the connection restoring history.\n this.#isRunning.set(abstractAgent.isRunning);\n },\n });\n // Preserve the store projection as the agent's first subscriber so its\n // synchronous message/state updates keep their existing timing.\n untracked(() => this.interruptController.connect(abstractAgent));\n\n this.#unregisterDestroy = destroyRef.onDestroy(() => {\n this.teardown();\n });\n }\n\n teardown(): void {\n if (this.#tornDown) return;\n this.#tornDown = true;\n this.#unregisterDestroy?.();\n this.#unregisterDestroy = undefined;\n if (this.#subscription) {\n this.#subscription.unsubscribe();\n }\n // Agent swaps can tear down a store while the factory computed is running.\n untracked(() => this.interruptController.destroy());\n }\n}\n\nfunction snapshotState(state: unknown): unknown {\n if (Array.isArray(state)) return [...state];\n if (state !== null && typeof state === \"object\") return { ...state };\n return state;\n}\n\n@Injectable({ providedIn: \"root\" })\nexport class CopilotkitAgentFactory {\n readonly #copilotkit = inject(CopilotKit);\n readonly #provisionalCache = new Map<string, AgentHandoffBridge>();\n\n createAgentStoreSignal(\n agentId: Signal<string | undefined>,\n destroyRef: DestroyRef,\n ): Signal<AgentStore> {\n let lastAgentStore: AgentStore | undefined;\n let lastAgent: AbstractAgent | undefined;\n const subscribeToAgent: SubscribeToAgentFn =\n this.#copilotkit.core.subscribeToAgentWithOptions.bind(\n this.#copilotkit.core,\n );\n const interruptRunner: InterruptRunner = (agent, runOptions) =>\n this.#copilotkit.core.runAgent({ agent, ...runOptions });\n\n const resolveAgent = (): AbstractAgent => {\n const resolvedAgentId = agentId() || DEFAULT_AGENT_ID;\n const existing = this.#copilotkit.getAgent(resolvedAgentId);\n if (existing) {\n const handoff = this.#provisionalCache.get(resolvedAgentId);\n if (handoff && handoff.provisional !== existing) {\n // Runtime discovery invalidates this computed. Handoff mirroring can\n // synchronously notify the provisional store, whose subscriber must\n // update signals outside the computed's read-only reactive context.\n untracked(() => handoff.attachRegistered(existing));\n }\n this.#provisionalCache.delete(resolvedAgentId);\n return existing;\n }\n\n const runtimeUrl = this.#copilotkit.runtimeUrl();\n const isRuntimeConfigured = runtimeUrl !== undefined;\n const { runtimeConnectionStatus } = this.#copilotkit.core;\n\n if (\n isRuntimeConfigured &&\n (runtimeConnectionStatus ===\n CopilotKitCoreRuntimeConnectionStatus.Disconnected ||\n runtimeConnectionStatus ===\n CopilotKitCoreRuntimeConnectionStatus.Connecting ||\n runtimeConnectionStatus ===\n CopilotKitCoreRuntimeConnectionStatus.Error)\n ) {\n const credentials = this.#copilotkit.credentials();\n const cached = this.#provisionalCache.get(resolvedAgentId);\n if (cached) {\n // Void, never invokes the builder: installs `ɵruntimeFetch` on a\n // `ProxiedCopilotRuntimeAgent`, which resolves headers fresh at\n // send time (#1937) rather than baking in a snapshot here.\n this.#copilotkit.core.applyHeadersToAgent(cached.provisional);\n if (hasAgentCredentials(cached.provisional)) {\n cached.provisional.credentials = credentials;\n }\n return cached.provisional;\n }\n\n const provisional = new ProxiedCopilotRuntimeAgent({\n runtimeUrl,\n agentId: resolvedAgentId,\n transport: this.#copilotkit.runtimeTransport(),\n credentials,\n });\n this.#copilotkit.core.applyHeadersToAgent(provisional);\n const handoff = new AgentHandoffBridge(provisional);\n this.#provisionalCache.set(resolvedAgentId, handoff);\n return provisional;\n }\n\n const knownAgents = Object.keys(this.#copilotkit.agents() ?? {});\n const runtimePart = isRuntimeConfigured\n ? `runtimeUrl=${runtimeUrl}`\n : \"no runtimeUrl\";\n throw new Error(\n `injectAgentStore: Agent '${resolvedAgentId}' not found after runtime sync (${runtimePart}). ` +\n (knownAgents.length\n ? `Known agents: [${knownAgents.join(\", \")}]`\n : \"No agents registered.\") +\n \" Verify your runtime /info and/or agents__unsafe_dev_only.\",\n );\n };\n\n return computed(() => {\n this.#copilotkit.agents();\n this.#copilotkit.runtimeConnectionStatus();\n this.#copilotkit.runtimeUrl();\n this.#copilotkit.runtimeTransport();\n // Keyed on the generation, not header VALUES: a builder's returned\n // token can change on every resolution without a new source ever being\n // set, and this must not re-run `resolveAgent` on that (#1937).\n this.#copilotkit.ɵheadersGeneration();\n this.#copilotkit.credentials();\n\n const agent = resolveAgent();\n\n if (lastAgentStore && lastAgent === agent) {\n return lastAgentStore;\n }\n\n lastAgentStore?.teardown();\n lastAgent = agent;\n lastAgentStore = new AgentStore(\n agent,\n destroyRef,\n subscribeToAgent,\n interruptRunner,\n );\n const resolvedAgentId = agentId() || DEFAULT_AGENT_ID;\n const handoff = this.#provisionalCache.get(resolvedAgentId);\n if (handoff?.provisional === agent) {\n handoff.start();\n }\n return lastAgentStore;\n });\n }\n}\n\ntype HandoffSide = \"provisional\" | \"registered\";\ntype HandoffChannel = \"messages\" | \"state\";\n\nclass AgentHandoffBridge {\n readonly #provisional: AbstractAgent;\n #provisionalSubscription?: { unsubscribe: () => void };\n #registered?: AbstractAgent;\n #registeredSubscription?: { unsubscribe: () => void };\n readonly #suppressed: Record<HandoffSide, Record<HandoffChannel, number>> = {\n provisional: { messages: 0, state: 0 },\n registered: { messages: 0, state: 0 },\n };\n\n constructor(provisional: AbstractAgent) {\n this.#provisional = provisional;\n }\n\n get provisional(): AbstractAgent {\n return this.#provisional;\n }\n\n /**\n * Subscribe before a provisional run starts. AG-UI snapshots subscribers at\n * run initialization, so a bridge added only after runtime discovery cannot\n * observe the remainder of an already-active run. Re-subscribing after each\n * store is created also keeps the bridge last in the live subscriber list,\n * so mirrored updates reach every consumer synchronously before suppression.\n */\n start(): void {\n this.#provisionalSubscription?.unsubscribe();\n this.#provisionalSubscription = this.#provisional.subscribe(\n this.#subscriber(\n this.#provisional,\n () => this.#registered,\n \"provisional\",\n \"registered\",\n ),\n );\n }\n\n /** Attach the identity published by runtime discovery and synchronize it. */\n attachRegistered(registered: AbstractAgent): void {\n if (this.#registered === registered) return;\n this.#registeredSubscription?.unsubscribe();\n this.#registered = registered;\n this.#registeredSubscription = registered.subscribe(\n this.#subscriber(\n registered,\n () => this.#provisional,\n \"registered\",\n \"provisional\",\n ),\n );\n\n if (hasAgentSessionData(this.#provisional)) {\n this.#mirrorMessages(this.#provisional, registered, \"registered\");\n this.#mirrorState(this.#provisional, registered, \"registered\");\n return;\n }\n\n this.#mirrorMessages(registered, this.#provisional, \"provisional\");\n this.#mirrorState(registered, this.#provisional, \"provisional\");\n }\n\n #subscriber(\n source: AbstractAgent,\n resolveTarget: () => AbstractAgent | undefined,\n sourceSide: HandoffSide,\n targetSide: HandoffSide,\n ): AgentSubscriber {\n const mirrorRunStatus = (): void => {\n const target = resolveTarget();\n if (!target) return;\n this.#mirrorRunStatus(source, target, targetSide);\n };\n return {\n onMessagesChanged: () => {\n if (this.#consumeSuppression(sourceSide, \"messages\")) return;\n const target = resolveTarget();\n if (!target) return;\n this.#mirrorMessages(source, target, targetSide);\n },\n onStateChanged: () => {\n if (this.#consumeSuppression(sourceSide, \"state\")) return;\n const target = resolveTarget();\n if (!target) return;\n this.#mirrorState(source, target, targetSide);\n },\n onRunInitialized: mirrorRunStatus,\n onRunFinalized: mirrorRunStatus,\n onRunFailed: mirrorRunStatus,\n onRunErrorEvent: mirrorRunStatus,\n };\n }\n\n #mirrorMessages(\n source: AbstractAgent,\n target: AbstractAgent,\n targetSide: HandoffSide,\n ): void {\n this.#suppress(targetSide, \"messages\");\n this.#syncMetadata(source, target);\n target.setMessages([...source.messages]);\n }\n\n #mirrorState(\n source: AbstractAgent,\n target: AbstractAgent,\n targetSide: HandoffSide,\n ): void {\n this.#suppress(targetSide, \"state\");\n this.#syncMetadata(source, target);\n target.setState(snapshotState(source.state) as State);\n }\n\n #mirrorRunStatus(\n source: AbstractAgent,\n target: AbstractAgent,\n targetSide: HandoffSide,\n ): void {\n this.#suppress(targetSide, \"state\");\n this.#syncMetadata(source, target);\n target.setState(snapshotState(target.state) as State);\n }\n\n #syncMetadata(source: AbstractAgent, target: AbstractAgent): void {\n target.isRunning = source.isRunning;\n target.threadId = source.threadId;\n }\n\n #suppress(side: HandoffSide, channel: HandoffChannel): void {\n this.#suppressed[side][channel]++;\n }\n\n #consumeSuppression(side: HandoffSide, channel: HandoffChannel): boolean {\n if (this.#suppressed[side][channel] === 0) return false;\n this.#suppressed[side][channel]--;\n return true;\n }\n}\n\n/** Return whether a provisional agent already owns observable session data. */\nfunction hasAgentSessionData(agent: AbstractAgent): boolean {\n if (agent.isRunning || agent.messages.length > 0) return true;\n const state = agent.state;\n return (\n state !== null && typeof state === \"object\" && Object.keys(state).length > 0\n );\n}\n\nexport function injectAgentStore(\n agentId: string | Signal<string | undefined>,\n): Signal<AgentStore> {\n const agentFactory = inject(CopilotkitAgentFactory);\n const destroyRef = inject(DestroyRef);\n const agentIdSignal =\n typeof agentId === \"function\" ? agentId : computed(() => agentId);\n\n return agentFactory.createAgentStoreSignal(agentIdSignal, destroyRef);\n}\n","import {\n InjectionToken,\n Injectable,\n inject,\n computed,\n signal,\n} from \"@angular/core\";\nimport type { Provider, Signal } from \"@angular/core\";\nimport { DEFAULT_AGENT_ID, randomUUID } from \"@copilotkit/shared\";\n\n/**\n * Options for configuring the CopilotChat session.\n * Mirrors the React CopilotChatConfigurationProvider props so behaviour\n * is consistent across frameworks.\n */\nexport interface CopilotChatConfigurationOptions {\n /**\n * The agent id to connect to.\n * When omitted the runtime's default agent is used.\n */\n agentId?: string;\n\n /**\n * An explicit thread id to resume.\n * When provided the session joins the existing thread instead of starting a\n * new one.\n */\n threadId?: string;\n\n /**\n * Whether the thread id was supplied explicitly by the host application.\n * Defaults to `false`, which seeds a non-explicit thread id that the runtime\n * may override.\n */\n hasExplicitThreadId?: boolean;\n}\n\n/**\n * Angular service that holds the runtime chat configuration state.\n *\n * Active-thread resolution mirrors the React\n * `CopilotChatConfigurationProvider` precedence (prop → override → minted)\n * without parent-provider branches (PR1 has no nested providers).\n */\n@Injectable()\nexport class CopilotChatConfiguration {\n readonly #options = inject(COPILOT_CHAT_CONFIGURATION_OPTIONS);\n\n /** Imperative override set by internal runtime helpers (e.g. thread-switch). */\n readonly #override = signal<{ threadId: string; explicit: boolean } | null>(\n null,\n );\n\n /**\n * Auto-minted UUID used when neither a prop-driven nor an imperative\n * override thread id is present. Generated once per service instance.\n */\n readonly #mintedFallback = randomUUID();\n\n /**\n * Whether the host application is driving `threadId` authoritatively.\n * A prop-driven `threadId` without an explicit `hasExplicitThreadId: false`\n * override locks the session to that value and prevents imperative overrides.\n */\n readonly #propIsAuthoritative =\n this.#options.threadId !== undefined &&\n this.#options.hasExplicitThreadId !== false;\n\n /**\n * The resolved agent id for this chat session.\n * Falls back to {@link DEFAULT_AGENT_ID} when no agent id is provided.\n */\n readonly agentId: Signal<string> = computed(\n () => this.#options.agentId ?? DEFAULT_AGENT_ID,\n );\n\n /**\n * The resolved thread id for this chat session.\n *\n * Precedence (highest → lowest):\n * 1. Prop-driven `threadId` when `#propIsAuthoritative` is true.\n * 2. Imperative `#override` set by internal helpers.\n * 3. Non-authoritative seed `threadId` from options.\n * 4. Auto-minted UUID fallback.\n */\n readonly threadId: Signal<string> = computed(() => {\n if (this.#propIsAuthoritative) {\n return this.#options.threadId as string;\n }\n const o = this.#override();\n if (o) {\n return o.threadId;\n }\n if (this.#options.threadId) {\n return this.#options.threadId;\n }\n return this.#mintedFallback;\n });\n\n /**\n * Whether the current thread id was supplied explicitly by the host\n * application (as opposed to being auto-minted or seeded without intent).\n */\n readonly hasExplicitThreadId: Signal<boolean> = computed(() => {\n if (this.#propIsAuthoritative) {\n return true;\n }\n return (\n this.#override()?.explicit ?? this.#options.hasExplicitThreadId ?? false\n );\n });\n\n /** Returns `true` when the host application controls the thread id via props. */\n protected get isControlled(): boolean {\n return this.#propIsAuthoritative;\n }\n\n /**\n * Sets an imperative thread override. No-ops when the session is\n * controlled by the host application via props.\n *\n * @param threadId - The thread id to activate.\n * @param explicit - Whether the override represents a deliberate user choice.\n */\n protected _setOverride(threadId: string, explicit: boolean): void {\n if (this.isControlled) {\n return;\n }\n this.#override.set({ threadId, explicit });\n }\n\n /**\n * Switches the active thread to the given id.\n *\n * By default the switch is treated as an explicit user-driven choice\n * (`explicit` defaults to `true`). Pass `{ explicit: false }` to mark it as\n * a non-explicit seed that the runtime may replace.\n *\n * No-ops when the threadId is controlled by the host application via props.\n *\n * @param threadId - The thread id to activate.\n * @param options - Optional overrides; `explicit` defaults to `true`.\n */\n setActiveThreadId(threadId: string, options?: { explicit?: boolean }): void {\n this._setOverride(threadId, options?.explicit ?? true);\n }\n\n /**\n * Abandons the current thread and starts a fresh one by minting a new UUID.\n *\n * The new thread is marked as non-explicit so the runtime may assign a\n * server-side thread id once the first message is sent.\n *\n * No-ops when the threadId is controlled by the host application via props.\n */\n startNewThread(): void {\n this._setOverride(randomUUID(), false);\n }\n\n // ─── Drawer open-state coordination ──────────────────────────────────────\n // Consumed by CopilotThreadsDrawer to drive the element's controlled `open`\n // property and to announce drawer presence (so a future header launcher can\n // render). A future popup/sidebar can additionally use these for mobile\n // mutual-exclusion between the drawer and other overlays.\n\n /** Tracks whether the drawer open-state is currently `true`. */\n readonly #drawerOpen = signal(false);\n\n /** Count of registered drawer instances. Used to derive {@link drawerRegistered}. */\n readonly #drawerCount = signal(0);\n\n /**\n * Read-only signal reflecting the current drawer open-state.\n *\n * @remarks\n * Consumed by {@link CopilotThreadsDrawer} to drive the element's controlled\n * `open` property; a future popup or sidebar component may also toggle it to\n * implement mobile mutual-exclusion between the drawer and other overlays.\n */\n readonly drawerOpen = this.#drawerOpen.asReadonly();\n\n /**\n * Sets the drawer open-state imperatively.\n *\n * @remarks\n * Called by {@link CopilotThreadsDrawer} in response to the element's\n * `open-change` event to keep the shared open-state coordinated.\n *\n * @param open - `true` to mark the drawer as open, `false` to close it.\n */\n setDrawerOpen(open: boolean): void {\n this.#drawerOpen.set(open);\n }\n\n /**\n * Computed signal that is `true` when at least one drawer instance has\n * registered itself via {@link registerDrawer}.\n */\n readonly drawerRegistered = computed(() => this.#drawerCount() > 0);\n\n /**\n * Registers a drawer instance and returns an idempotent unregister function.\n *\n * Increments the internal drawer count so that {@link drawerRegistered}\n * becomes `true`. The returned function decrements the count when called;\n * calling it more than once is safe — subsequent calls are no-ops (guarded\n * by an `active` flag, floor at 0).\n *\n * @remarks\n * Called by {@link CopilotThreadsDrawer} on construction with cleanup on\n * destroy. Intended for future popup/sidebar coordination as well.\n *\n * @returns An idempotent cleanup function that unregisters this drawer.\n */\n registerDrawer(): () => void {\n this.#drawerCount.update((n) => n + 1);\n let active = true;\n return () => {\n if (!active) return;\n active = false;\n this.#drawerCount.update((n) => Math.max(0, n - 1));\n };\n }\n}\n\n/**\n * Injection token for the {@link CopilotChatConfiguration} service instance.\n * Use {@link injectChatConfiguration} to retrieve it from the injector.\n */\nexport const COPILOT_CHAT_CONFIGURATION =\n new InjectionToken<CopilotChatConfiguration>(\"COPILOT_CHAT_CONFIGURATION\");\n\n/**\n * Injection token for the raw {@link CopilotChatConfigurationOptions} value\n * supplied to {@link provideCopilotChatConfiguration}.\n */\nexport const COPILOT_CHAT_CONFIGURATION_OPTIONS =\n new InjectionToken<CopilotChatConfigurationOptions>(\n \"COPILOT_CHAT_CONFIGURATION_OPTIONS\",\n );\n\n/**\n * Registers the {@link CopilotChatConfiguration} service and its options into\n * the current injector.\n *\n * `CopilotChatConfiguration` is registered as the canonical class provider.\n * `COPILOT_CHAT_CONFIGURATION` is aliased to the same instance via\n * `useExisting`, so both `inject(COPILOT_CHAT_CONFIGURATION)` (via\n * {@link injectChatConfiguration}) and a direct `inject(CopilotChatConfiguration)`\n * resolve to the **same object** with shared signal state.\n *\n * @param options - Optional chat configuration overrides.\n * @returns An array of Angular providers to pass to `providers` or\n * `TestBed.configureTestingModule`.\n */\nexport function provideCopilotChatConfiguration(\n options: CopilotChatConfigurationOptions = {},\n): Provider[] {\n return [\n { provide: COPILOT_CHAT_CONFIGURATION_OPTIONS, useValue: options },\n CopilotChatConfiguration,\n {\n provide: COPILOT_CHAT_CONFIGURATION,\n useExisting: CopilotChatConfiguration,\n },\n ];\n}\n\n/**\n * Retrieves the {@link CopilotChatConfiguration} service from the current\n * injection context.\n *\n * Must be called inside an injection context (component constructor, factory\n * function, or `TestBed.runInInjectionContext`).\n */\nexport function injectChatConfiguration(): CopilotChatConfiguration {\n return inject(COPILOT_CHAT_CONFIGURATION);\n}\n","import { computed, type Signal } from \"@angular/core\";\nimport type { AgentCapabilities } from \"@ag-ui/core\";\nimport { injectAgentStore } from \"./agent\";\nimport { injectChatConfiguration } from \"./chat-configuration\";\n\n/**\n * Returns the capabilities declared by the resolved AG-UI agent.\n *\n * @param agentId - Optional agent ID or signal. When omitted, agent resolution\n * uses the ambient chat configuration and then the default agent.\n */\nexport function injectCapabilities(\n agentId?: string | Signal<string | undefined>,\n): Signal<AgentCapabilities | undefined> {\n const resolvedAgentId = agentId ?? injectChatConfiguration().agentId;\n const agentStore = injectAgentStore(resolvedAgentId);\n\n return computed(() => {\n const agent = agentStore().agent;\n if (agent && \"capabilities\" in agent) {\n return (agent as { capabilities?: AgentCapabilities }).capabilities;\n }\n return undefined;\n });\n}\n","import {\n DestroyRef,\n computed,\n effect,\n inject,\n type Signal,\n} from \"@angular/core\";\nimport { DEFAULT_AGENT_ID } from \"@copilotkit/shared\";\n\nimport { injectAgentStore } from \"./agent\";\nimport { COPILOT_CHAT_CONFIGURATION } from \"./chat-configuration\";\nimport { CopilotKit } from \"./copilotkit\";\nimport { InterruptController } from \"./interrupt\";\nimport type { InjectInterruptOptions } from \"./interrupt\";\n\ntype InterruptAgentId = string | Signal<string | undefined>;\n\n/**\n * Create an interrupt controller in the current Angular injection context.\n *\n * The controller follows the ambient chat agent and thread unless an explicit\n * agent id or signal is supplied as the first argument. Bind its signals in a\n * template and call `resolve` or `cancel` from user-driven event handlers.\n */\nexport function injectInterrupt<TValue = unknown, TResult = never>(\n agentId?: InterruptAgentId,\n options?: Omit<InjectInterruptOptions<TValue, TResult>, \"agentId\">,\n): InterruptController<TValue, TResult>;\n/** Compatibility overload for the original options-only call shape. */\nexport function injectInterrupt<TValue = unknown, TResult = never>(\n options?: InjectInterruptOptions<TValue, TResult>,\n): InterruptController<TValue, TResult>;\nexport function injectInterrupt<TValue = unknown, TResult = never>(\n agentIdOrOptions?: InterruptAgentId | InjectInterruptOptions<TValue, TResult>,\n controllerOptions?: Omit<InjectInterruptOptions<TValue, TResult>, \"agentId\">,\n): InterruptController<TValue, TResult> {\n const copilotKit = inject(CopilotKit);\n const destroyRef = inject(DestroyRef);\n const chatConfiguration = inject(COPILOT_CHAT_CONFIGURATION, {\n optional: true,\n });\n const hasAgentIdArgument =\n controllerOptions !== undefined ||\n typeof agentIdOrOptions === \"string\" ||\n typeof agentIdOrOptions === \"function\";\n const options: InjectInterruptOptions<TValue, TResult> = hasAgentIdArgument\n ? (controllerOptions ?? {})\n : ((agentIdOrOptions as\n | InjectInterruptOptions<TValue, TResult>\n | undefined) ?? {});\n const configuredAgentId = hasAgentIdArgument\n ? (agentIdOrOptions as InterruptAgentId | undefined)\n : options.agentId;\n const agentId =\n configuredAgentId ??\n computed(() => chatConfiguration?.agentId() ?? DEFAULT_AGENT_ID);\n const store = injectAgentStore(agentId);\n const controller = new InterruptController<TValue, TResult>(\n (agent, runOptions) => copilotKit.core.runAgent({ agent, ...runOptions }),\n options,\n );\n const connection = effect(() => {\n const agent = store().agent;\n controller.connect(agent);\n controller.setThreadId(\n configuredAgentId === undefined\n ? (chatConfiguration?.threadId() ?? agent.threadId)\n : agent.threadId,\n );\n });\n\n destroyRef.onDestroy(() => {\n connection.destroy();\n controller.destroy();\n });\n return controller;\n}\n","import type { Signal } from \"@angular/core\";\nimport {\n computed,\n DestroyRef,\n effect,\n inject,\n Injectable,\n signal,\n untracked,\n} from \"@angular/core\";\nimport type { Subscription } from \"rxjs\";\nimport {\n CopilotKitCoreRuntimeConnectionStatus,\n ɵcreateThreadStore,\n ɵselectHasNextPage,\n ɵselectIsFetchingNextPage,\n ɵselectIsMutating,\n ɵselectFetchMoreError,\n ɵselectThreads,\n ɵselectThreadsError,\n ɵselectThreadsIsLoading,\n} from \"@copilotkit/core\";\nimport type {\n ɵThread,\n ɵThreadRuntimeContext,\n ɵThreadStore,\n} from \"@copilotkit/core\";\nimport { CopilotKit } from \"./copilotkit\";\nimport { explicitEffect } from \"./explicit-effect\";\n\n/**\n * A conversation thread managed by CopilotKit Intelligence.\n *\n * Each thread has a unique `id`, an optional human-readable `name`, and\n * timestamp fields tracking creation and update times. This mirrors the\n * `Thread` projection exposed by react-core's `useThreads` so framework\n * wrappers share an identical shape.\n */\nexport interface Thread {\n /** Stable, server-assigned thread identifier. */\n id: string;\n /** The agent this thread belongs to. */\n agentId: string;\n /** Human-readable name, or `null` when the thread is unnamed. */\n name: string | null;\n /** `true` when the thread has been archived. */\n archived: boolean;\n /** ISO-8601 creation timestamp. */\n createdAt: string;\n /** ISO-8601 timestamp of the most recent metadata update. */\n updatedAt: string;\n /**\n * ISO-8601 timestamp of the most recent agent run on this thread. Absent\n * when the thread has never been run. Prefer this over `updatedAt` for\n * user-facing \"last activity\" displays — it is not bumped by metadata-only\n * actions like rename or archive.\n */\n lastRunAt?: string;\n}\n\n/**\n * Configuration for {@link injectThreads}.\n *\n * Thread operations are scoped to the runtime-authenticated user and the\n * provided agent on CopilotKit Intelligence. Each field may be supplied as\n * a plain value or a {@link Signal}; when a signal is used the underlying\n * runtime context is re-synced whenever its value changes.\n */\nexport interface InjectThreadsInput {\n /** The ID of the agent whose threads to list and manage. */\n agentId: string | Signal<string>;\n /** When `true`, archived threads are included in the list. Defaults to `false`. */\n includeArchived?: boolean | Signal<boolean | undefined>;\n /** Maximum number of threads to fetch per page. When set, enables cursor-based pagination. */\n limit?: number | Signal<number | undefined>;\n /**\n * When `false`, the store stays inert: no runtime context is dispatched, so\n * NO thread-list fetch or realtime subscription is issued, and the\n * synthesized pre-connect loading state is suppressed. Used by gated\n * surfaces (e.g. an unlicensed `<copilotkit-threads-drawer>`) that must not touch\n * the network until the gate opens. Defaults to `true`. Mirrors react-core's\n * `UseThreadsInput.enabled`.\n */\n enabled?: boolean | Signal<boolean | undefined>;\n}\n\n/**\n * Signal-based threads-list API returned by {@link injectThreads}.\n *\n * The `threads` signal is kept in sync with the platform via a realtime\n * WebSocket subscription (when available) and is sorted most-recently-active\n * first. Mutation methods reject with an `Error` if the platform request\n * fails; `delete` additionally rolls back its optimistic removal.\n */\nexport interface InjectThreadsResult {\n /**\n * Threads for the current user/agent pair, sorted most-recently-active\n * first. Updated in realtime when the platform pushes metadata events.\n * Includes archived threads only when `includeArchived` is set.\n */\n threads: Signal<Thread[]>;\n /**\n * `true` while the initial thread list is being fetched from the platform.\n * Subsequent realtime updates do not re-enter the loading state.\n */\n isLoading: Signal<boolean>;\n /**\n * The most recent error from fetching threads or executing a mutation, or\n * `null` when there is no error. Reset to `null` on the next successful\n * fetch.\n */\n error: Signal<Error | null>;\n /**\n * List/mutation errors only — excludes developer/config errors (missing\n * runtime URL, runtime without thread endpoints) so consumer UIs do not\n * surface dev strings to end users. Prefer this over `error` for\n * user-facing error display.\n */\n listError: Signal<Error | null>;\n /**\n * Error from the most recent FAILED next-page (fetch-more) load, or `null`.\n * Tracked separately from {@link InjectThreadsResult.listError} so a\n * paginated-load failure surfaces an inline \"couldn't load more\" affordance\n * while the loaded list stays visible. Cleared when a fetch-more is retried\n * or succeeds.\n */\n fetchMoreError: Signal<Error | null>;\n /**\n * `true` when there are more threads available to fetch via\n * {@link InjectThreadsResult.fetchMoreThreads}. Only meaningful when `limit`\n * is set.\n */\n hasMoreThreads: Signal<boolean>;\n /** `true` while a subsequent page of threads is being fetched. */\n isFetchingMoreThreads: Signal<boolean>;\n /**\n * `true` while at least one thread mutation (rename, archive, unarchive,\n * delete) is awaiting a server response. Mutations apply optimistically, so\n * this is primarily useful for disabling controls or showing a subtle\n * in-flight indicator.\n */\n isMutating: Signal<boolean>;\n /**\n * Fetch the next page of threads. No-op when\n * {@link InjectThreadsResult.hasMoreThreads} is `false` or a fetch is\n * already in progress.\n */\n fetchMoreThreads: () => void;\n /**\n * Re-fetch the thread list from the platform without clearing the current\n * list. Backs the drawer's error-state Retry and the Active/All filter\n * refetch. No-op until the runtime is connected.\n */\n refetchThreads: () => void;\n /**\n * Reset to a fresh, non-explicit client-side thread so the welcome screen\n * shows. Lazy creation: no row appears in {@link InjectThreadsResult.threads}\n * until the new thread's first run persists server-side.\n */\n startNewThread: () => void;\n /**\n * Rename a thread on the platform. Resolves when the server confirms the\n * update; rejects on failure.\n */\n renameThread: (threadId: string, name: string) => Promise<void>;\n /**\n * Archive a thread on the platform. Archived threads are excluded from\n * subsequent list results. Resolves when the server confirms the update;\n * rejects on failure.\n */\n archiveThread: (threadId: string) => Promise<void>;\n /**\n * Restore a previously archived thread on the platform. The thread\n * re-appears in default (non-archived) list results. Resolves when the\n * server confirms the update; rejects on failure.\n */\n unarchiveThread: (threadId: string) => Promise<void>;\n /**\n * Permanently delete a thread from the platform. This is irreversible.\n * Resolves when the server confirms deletion; rejects on failure (the\n * optimistic removal is rolled back).\n */\n deleteThread: (threadId: string) => Promise<void>;\n}\n\n/** Normalizes a value-or-signal field into a no-arg accessor. */\nfunction toAccessor<T>(value: T | Signal<T>): () => T {\n return typeof value === \"function\" ? (value as () => T) : () => value;\n}\n\n/**\n * Projects a core {@link ɵThread} record down to the public {@link Thread}\n * shape, omitting `lastRunAt` entirely when the source value is absent so the\n * field stays optional rather than `undefined`.\n */\nfunction projectThread(thread: ɵThread): Thread {\n const { id, agentId, name, archived, createdAt, updatedAt, lastRunAt } =\n thread;\n return {\n id,\n agentId,\n name,\n archived,\n createdAt,\n updatedAt,\n ...(lastRunAt !== undefined ? { lastRunAt } : {}),\n };\n}\n\n/**\n * Owns a single core thread store, bridges its selector observables onto\n * Angular writable signals, keeps the store's runtime context in sync with the\n * ambient {@link CopilotKit} configuration, and registers/unregisters the\n * store with core for the active agent.\n *\n * One instance backs each {@link injectThreads} call. Tear-down (selector\n * unsubscribe, store stop, core unregister) runs on the host's\n * {@link DestroyRef}.\n */\nexport class ThreadsStore implements InjectThreadsResult {\n readonly #copilotkit = inject(CopilotKit);\n readonly #store: ɵThreadStore = ɵcreateThreadStore({\n fetch: this.#copilotkit.core.ɵruntimeFetch,\n });\n readonly #subscriptions: Subscription[] = [];\n\n readonly #threads = signal<Thread[]>([]);\n readonly #storeIsLoading = signal<boolean>(false);\n readonly #storeError = signal<Error | null>(null);\n readonly #fetchMoreError = signal<Error | null>(null);\n readonly #hasMoreThreads = signal<boolean>(false);\n readonly #isFetchingMoreThreads = signal<boolean>(false);\n readonly #isMutating = signal<boolean>(false);\n\n /**\n * Tracks whether a real runtime context has been dispatched to the store\n * yet. The store itself starts `isLoading: false`, so before the first\n * dispatch consumers would otherwise see an empty, non-loading list (the\n * empty-list flash). While a runtime URL is configured and the endpoints\n * are available but no context has been dispatched, we synthesize loading.\n */\n readonly #hasDispatchedContext = signal<boolean>(false);\n\n readonly threads = this.#threads.asReadonly();\n readonly error: Signal<Error | null>;\n readonly listError: Signal<Error | null>;\n readonly fetchMoreError = this.#fetchMoreError.asReadonly();\n readonly isLoading: Signal<boolean>;\n readonly hasMoreThreads = this.#hasMoreThreads.asReadonly();\n readonly isFetchingMoreThreads = this.#isFetchingMoreThreads.asReadonly();\n readonly isMutating = this.#isMutating.asReadonly();\n\n constructor(input: InjectThreadsInput, destroyRef: DestroyRef) {\n const agentId = toAccessor(input.agentId);\n const includeArchived = toAccessor(input.includeArchived);\n const limit = toAccessor(input.limit);\n const enabled = toAccessor(input.enabled);\n // `enabled` defaults to `true`; only an explicit `false` keeps the store\n // inert. An unset/`undefined` input is treated as enabled.\n const isEnabled = (): boolean => enabled() !== false;\n\n this.#bridgeSelectors();\n this.#store.start();\n\n // Synthesized error/loading reconcile the core store's internal state with\n // configuration-level conditions (no runtime URL, unavailable endpoints),\n // mirroring react-core's useThreads.\n const runtimeUrl = this.#copilotkit.runtimeUrl;\n const runtimeStatus = this.#copilotkit.runtimeConnectionStatus;\n // Read `threadEndpoints`/`intelligence.wsUrl` through the CopilotKit\n // signals (not plain `core.*` getters) so the computeds/effect re-run when\n // `/info` populates them — even if it lands without a connection-status\n // transition. This mirrors react-core, which lists both in its effect deps.\n const threadEndpoints = this.#copilotkit.threadEndpoints;\n const threadListSupported = (): boolean =>\n threadEndpoints()?.list !== false;\n const threadMutationsSupported = (): boolean =>\n threadEndpoints()?.mutations !== false;\n const threadEndpointsUnavailable = (): boolean =>\n !!runtimeUrl() &&\n runtimeStatus() === CopilotKitCoreRuntimeConnectionStatus.Connected &&\n !threadListSupported();\n\n const runtimeError = (): Error | null =>\n runtimeUrl() ? null : new Error(\"Runtime URL is not configured\");\n const endpointsError = (): Error | null =>\n threadEndpointsUnavailable()\n ? new Error(\n \"Thread endpoints are not available on this CopilotKit runtime\",\n )\n : null;\n const mutationsError = (): Error | null =>\n threadMutationsSupported()\n ? null\n : new Error(\n \"Thread mutations are not available on this CopilotKit runtime\",\n );\n\n const preConnectLoading = (): boolean =>\n isEnabled() &&\n !!runtimeUrl() &&\n !threadEndpointsUnavailable() &&\n !this.#hasDispatchedContext();\n\n // Synthesized error/loading combine configuration-level conditions with\n // the core store's own state; expressed as pure derived signals.\n this.error = computed(\n () => runtimeError() ?? endpointsError() ?? this.#storeError(),\n );\n // listError exposes only genuine fetch/mutation errors, excluding the\n // dev/config errors (missing runtime URL, runtime without thread\n // endpoints). Use this for user-facing error display so dev strings are\n // never shown to end users.\n this.listError = computed(() => this.#storeError());\n this.isLoading = computed(() =>\n runtimeError() || endpointsError()\n ? false\n : preConnectLoading() || this.#storeIsLoading(),\n );\n\n // Register/unregister this store with core for the active agent so core can\n // route realtime/agent-driven thread updates to it. Re-runs when the agent\n // id changes; the previous registration is cleared first.\n let registeredAgentId: string | undefined;\n explicitEffect(\n () => ({ nextAgentId: agentId(), enabled: isEnabled() }),\n ({ nextAgentId, enabled }) => {\n // Disabled (e.g. unlicensed): ensure this store is NOT registered. The\n // registry is single-slot/last-writer-wins, so an inert store claiming\n // the agentId slot would evict — and on destroy tear down — a co-mounted\n // live store for the same agent. Mirrors react-core's use-threads gate.\n if (!enabled) {\n if (registeredAgentId !== undefined) {\n this.#copilotkit.core.unregisterThreadStore(registeredAgentId);\n registeredAgentId = undefined;\n }\n return;\n }\n if (registeredAgentId === nextAgentId) {\n return;\n }\n if (registeredAgentId !== undefined) {\n this.#copilotkit.core.unregisterThreadStore(registeredAgentId);\n }\n this.#copilotkit.core.registerThreadStore(nextAgentId, this.#store);\n registeredAgentId = nextAgentId;\n },\n );\n\n // Sync the runtime context. Defer until the runtime reports Connected so\n // the initial context carries `intelligence.wsUrl` and avoids a redundant\n // second list fetch + subscribe round-trip (mirrors react-core).\n //\n // The store dispatches `setContext` onto an `asapScheduler` queue, and its\n // bootstrap effect issues a list fetch for every queued `contextChanged`\n // whose state is non-null at drain time. So if this effect runs once with\n // no URL (clearing to `null`) and again once Connected (the real context)\n // before that queue drains, BOTH queued actions observe the latest\n // (non-null) state and two identical list fetches fire — the second\n // clobbering the first response. We therefore dispatch only on a\n // meaningful change: skip a clear-to-`null` when nothing was ever\n // dispatched (the store already holds `null`), and skip a re-dispatch of\n // an unchanged context. This collapses the benign URL→Connected transition\n // to a single dispatch and matches react-core's dependency-gated effect.\n let lastDispatchedContext: string | null = null;\n effect(() => {\n // Track every reactive input the dispatched context depends on, so the\n // effect re-runs when any of them changes — including `wsUrl`, which\n // arrives with `/info` and (via the dedup signature below) triggers a\n // single re-dispatch carrying the realtime URL.\n const active = isEnabled();\n const url = runtimeUrl();\n const status = runtimeStatus();\n // Keyed on the generation, not header VALUES: a builder's returned\n // token can change on every resolution without a new source ever being\n // set (e.g. a run refreshing the snapshot), and this must not\n // re-dispatch the thread context on that (#1937). A real\n // `setHeaders()` call still re-runs this effect: `ɵheadersGeneration`\n // is set from `onHeadersChanged`, which fires only then.\n const headersGeneration = this.#copilotkit.ɵheadersGeneration();\n const id = agentId();\n const archived = includeArchived();\n const pageLimit = limit();\n const listSupported = threadListSupported();\n const wsUrl = this.#copilotkit.intelligence()?.wsUrl;\n\n untracked(() => {\n const clearContext = (): void => {\n if (this.#hasDispatchedContext()) {\n this.#store.setContext(null);\n }\n lastDispatchedContext = null;\n this.#hasDispatchedContext.set(false);\n };\n\n // Disabled: stay inert. Clear any previously-dispatched context so an\n // in-flight subscription is torn down and no further fetch is issued.\n if (!active) {\n clearContext();\n return;\n }\n\n if (!url) {\n clearContext();\n return;\n }\n\n if (status !== CopilotKitCoreRuntimeConnectionStatus.Connected) {\n return;\n }\n\n if (!listSupported) {\n clearContext();\n return;\n }\n\n // Headers are deliberately NOT part of this context: the store's\n // `fetch` is `ɵruntimeFetch`, which already resolves and overlays the\n // current core headers at send time (#1937) — a header snapshot\n // spread here would go stale the moment a builder's token rotates.\n const context: ɵThreadRuntimeContext = {\n runtimeUrl: url,\n wsUrl,\n agentId: id,\n includeArchived: archived,\n limit: pageLimit,\n };\n\n // The dedup signature adds `headersGeneration` explicitly, even\n // though it's absent from `context` itself: a real header source\n // change must still force exactly one re-dispatch (a fresh\n // subscribe/refetch), even when nothing else about the context\n // changed. Mirrors react-core's `headersKey` dependency.\n const signature = JSON.stringify({ ...context, headersGeneration });\n if (signature === lastDispatchedContext) {\n return;\n }\n\n lastDispatchedContext = signature;\n this.#store.setContext(context);\n this.#hasDispatchedContext.set(true);\n });\n });\n\n this.renameThread = this.#guardMutation(mutationsError, (threadId, name) =>\n this.#store.renameThread(threadId, name),\n );\n this.archiveThread = this.#guardMutation(mutationsError, (threadId) =>\n this.#store.archiveThread(threadId),\n );\n this.unarchiveThread = this.#guardMutation(mutationsError, (threadId) =>\n this.#store.unarchiveThread(threadId),\n );\n this.deleteThread = this.#guardMutation(mutationsError, (threadId, _name) =>\n this.#store.deleteThread(threadId),\n );\n\n destroyRef.onDestroy(() => {\n this.teardown();\n if (registeredAgentId !== undefined) {\n this.#copilotkit.core.unregisterThreadStore(registeredAgentId);\n registeredAgentId = undefined;\n }\n });\n }\n\n readonly renameThread: (threadId: string, name: string) => Promise<void>;\n readonly archiveThread: (threadId: string) => Promise<void>;\n readonly unarchiveThread: (threadId: string) => Promise<void>;\n readonly deleteThread: (threadId: string) => Promise<void>;\n\n // Arrow-bound instance fields (not prototype methods) so they keep working\n // when destructured off the result — matching the mutation members above and\n // react-core's standalone callbacks.\n readonly fetchMoreThreads = (): void => {\n this.#store.fetchNextPage();\n };\n\n readonly refetchThreads = (): void => {\n this.#store.refetchThreads();\n };\n\n readonly startNewThread = (): void => {\n this.#store.startNewThread();\n };\n\n /** Unsubscribes all selector bridges and stops the underlying core store. */\n teardown(): void {\n for (const subscription of this.#subscriptions) {\n subscription.unsubscribe();\n }\n this.#subscriptions.length = 0;\n this.#store.stop();\n }\n\n /**\n * Subscribes each core selector to its mirroring writable signal. The\n * `select` operator emits the current value synchronously on subscribe, so\n * the signals are seeded immediately and stay current thereafter.\n */\n #bridgeSelectors(): void {\n this.#subscriptions.push(\n this.#store.select(ɵselectThreads).subscribe((threads) => {\n this.#threads.set(threads.map(projectThread));\n }),\n this.#store.select(ɵselectThreadsIsLoading).subscribe((value) => {\n this.#storeIsLoading.set(value);\n }),\n this.#store.select(ɵselectThreadsError).subscribe((value) => {\n this.#storeError.set(value);\n }),\n this.#store.select(ɵselectFetchMoreError).subscribe((value) => {\n this.#fetchMoreError.set(value);\n }),\n this.#store.select(ɵselectHasNextPage).subscribe((value) => {\n this.#hasMoreThreads.set(value);\n }),\n this.#store.select(ɵselectIsFetchingNextPage).subscribe((value) => {\n this.#isFetchingMoreThreads.set(value);\n }),\n this.#store.select(ɵselectIsMutating).subscribe((value) => {\n this.#isMutating.set(value);\n }),\n );\n }\n\n /**\n * Wraps a mutation so that, when thread mutations are unavailable on the\n * connected runtime, the call rejects with a descriptive error instead of\n * issuing a request doomed to fail.\n */\n #guardMutation(\n mutationsError: () => Error | null,\n mutation: (threadId: string, name: string) => Promise<void>,\n ): (threadId: string, name?: string) => Promise<void> {\n return (threadId: string, name = \"\") => {\n const error = mutationsError();\n if (error) {\n return Promise.reject(error);\n }\n return mutation(threadId, name);\n };\n }\n}\n\n/**\n * Factory for {@link ThreadsStore} instances. Provided at the root so the\n * ambient {@link CopilotKit} configuration is resolved from the application's\n * injector.\n */\n@Injectable({ providedIn: \"root\" })\nexport class CopilotkitThreadsFactory {\n /**\n * Creates a {@link ThreadsStore} bound to the given input and host\n * `DestroyRef`.\n *\n * @param input - Agent identifier and optional list controls.\n * @param destroyRef - Host lifetime; tears the store down on destroy.\n */\n create(input: InjectThreadsInput, destroyRef: DestroyRef): ThreadsStore {\n return new ThreadsStore(input, destroyRef);\n }\n}\n\n/**\n * Angular threads-list API over the platform-agnostic core thread store —\n * the signal-based counterpart to react-core's `useThreads`.\n *\n * On creation the store fetches the thread list for the runtime-authenticated\n * user and the given `agentId`. When CopilotKit Intelligence exposes a\n * WebSocket URL it also opens a realtime subscription so the `threads` signal\n * stays current without polling. Mutation methods return promises that resolve\n * once the platform confirms the operation and reject with an `Error` on\n * failure.\n *\n * Must be called within an injection context (component/directive constructor\n * or field initializer). The underlying store is torn down on the host's\n * `DestroyRef`.\n *\n * @param input - Agent identifier and optional list controls. Each field\n * accepts a plain value or a `Signal`.\n * @returns Thread list state as signals plus stable mutation callbacks.\n *\n * @example\n * ```ts\n * @Component({ ... })\n * class ThreadList {\n * readonly threads = injectThreads({ agentId: \"agent-1\" });\n * }\n * ```\n */\nexport function injectThreads(input: InjectThreadsInput): InjectThreadsResult {\n const factory = inject(CopilotkitThreadsFactory);\n const destroyRef = inject(DestroyRef);\n return factory.create(input, destroyRef);\n}\n","import { inject, InjectionToken, Provider } from \"@angular/core\";\n\n// Type for chat labels\nexport interface CopilotChatLabels {\n chatInputPlaceholder: string;\n chatInputToolbarStartTranscribeButtonLabel: string;\n chatInputToolbarCancelTranscribeButtonLabel: string;\n chatInputToolbarFinishTranscribeButtonLabel: string;\n chatInputToolbarAddButtonLabel: string;\n chatInputToolbarToolsButtonLabel: string;\n assistantMessageToolbarCopyCodeLabel: string;\n assistantMessageToolbarCopyCodeCopiedLabel: string;\n assistantMessageToolbarCopyMessageLabel: string;\n assistantMessageToolbarThumbsUpLabel: string;\n assistantMessageToolbarThumbsDownLabel: string;\n assistantMessageToolbarReadAloudLabel: string;\n assistantMessageToolbarRegenerateLabel: string;\n userMessageToolbarCopyMessageLabel: string;\n userMessageToolbarEditMessageLabel: string;\n chatDisclaimerText: string;\n welcomeMessageText: string;\n}\n\n// Default labels constant\nexport const COPILOT_CHAT_DEFAULT_LABELS: CopilotChatLabels = {\n chatInputPlaceholder: \"Type a message...\",\n chatInputToolbarStartTranscribeButtonLabel: \"Transcribe\",\n chatInputToolbarCancelTranscribeButtonLabel: \"Cancel\",\n chatInputToolbarFinishTranscribeButtonLabel: \"Finish\",\n chatInputToolbarAddButtonLabel: \"Add photos or files\",\n chatInputToolbarToolsButtonLabel: \"Tools\",\n assistantMessageToolbarCopyCodeLabel: \"Copy\",\n assistantMessageToolbarCopyCodeCopiedLabel: \"Copied\",\n assistantMessageToolbarCopyMessageLabel: \"Copy\",\n assistantMessageToolbarThumbsUpLabel: \"Good response\",\n assistantMessageToolbarThumbsDownLabel: \"Bad response\",\n assistantMessageToolbarReadAloudLabel: \"Read aloud\",\n assistantMessageToolbarRegenerateLabel: \"Regenerate\",\n userMessageToolbarCopyMessageLabel: \"Copy\",\n userMessageToolbarEditMessageLabel: \"Edit\",\n chatDisclaimerText:\n \"AI can make mistakes. Please verify important information.\",\n welcomeMessageText: \"How can I help you today?\",\n};\n\nexport const COPILOT_CHAT_LABELS = new InjectionToken<CopilotChatLabels>(\n \"COPILOT_CHAT_LABELS\",\n);\n\nexport function injectChatLabels(): CopilotChatLabels {\n return (\n inject(COPILOT_CHAT_LABELS, { optional: true }) ??\n COPILOT_CHAT_DEFAULT_LABELS\n );\n}\n\nexport function provideCopilotChatLabels(\n config: Partial<CopilotChatLabels>,\n): Provider {\n return {\n provide: COPILOT_CHAT_LABELS,\n useValue: {\n ...COPILOT_CHAT_DEFAULT_LABELS,\n ...config,\n },\n };\n}\n","import {\n inject,\n Injectable,\n Signal,\n signal,\n WritableSignal,\n} from \"@angular/core\";\nimport type { Attachment } from \"@copilotkit/shared\";\nimport type { Suggestion } from \"@copilotkit/core\";\n\n@Injectable()\nexport abstract class ChatState {\n abstract readonly inputValue: WritableSignal<string>;\n readonly attachments = signal<Attachment[]>([]);\n readonly attachmentsEnabled: Signal<boolean> = signal(false);\n readonly attachmentsUploading: Signal<boolean> = signal(false);\n readonly dragOver = signal(false);\n readonly suggestions = signal<Suggestion[]>([]);\n readonly suggestionsLoading = signal(false);\n readonly isTranscribing = signal(false);\n\n abstract submitInput(value: string): void;\n abstract changeInput(value: string): void;\n selectSuggestion(_suggestion: Suggestion, _index: number): void {}\n finishTranscription(_audioBlob: Blob): void | Promise<void> {}\n\n addFile(): void {}\n removeAttachment(_id: string): void {}\n handleDragOver(_event: DragEvent): void {}\n handleDragLeave(_event: DragEvent): void {}\n handleDrop(_event: DragEvent): void {}\n}\n\nexport function injectChatState(): ChatState {\n try {\n return inject(ChatState);\n } catch {\n throw new Error(\n \"ChatState not found. A parent component must provide ChatState.\",\n );\n }\n}\n","import type { CopilotKitCore } from \"@copilotkit/core\";\nimport {\n TranscriptionErrorCode,\n type TranscriptionErrorResponse,\n} from \"@copilotkit/shared\";\n\nexport { TranscriptionErrorCode };\n\nexport interface TranscriptionResult {\n text: string;\n size: number;\n type: string;\n}\n\nexport interface TranscriptionErrorInfo {\n code: TranscriptionErrorCode;\n message: string;\n retryable: boolean;\n}\n\nexport class TranscriptionError extends Error {\n readonly info: TranscriptionErrorInfo;\n\n constructor(info: TranscriptionErrorInfo) {\n super(info.message);\n this.name = \"TranscriptionError\";\n this.info = info;\n }\n}\n\n/**\n * Transcribe an audio blob via the CopilotKit runtime. Uses single-endpoint\n * (base64 JSON) or REST (multipart `/transcribe`) mode to match the transport\n * configured on the core.\n *\n * @throws {TranscriptionError} with typed error info on any failure.\n */\nexport async function transcribeAudio(\n core: CopilotKitCore,\n audioBlob: Blob,\n filename = \"recording.webm\",\n): Promise<TranscriptionResult> {\n const { runtimeUrl } = core;\n if (!runtimeUrl) {\n throw new TranscriptionError({\n code: TranscriptionErrorCode.INVALID_REQUEST,\n message: \"Runtime URL is not configured\",\n retryable: false,\n });\n }\n\n // Resolve once, up front, OUTSIDE the try below — never through\n // `ɵruntimeFetch` (this request is built by hand, not sent via an agent),\n // and never a stale snapshot: a key that no longer resolves must not ride\n // along (#1937). A builder failure here must surface as itself, not get\n // caught and re-wrapped as a NETWORK_ERROR `TranscriptionError`.\n const resolvedHeaders = { ...(await core.resolveHeaders()) };\n\n let response: Response;\n try {\n response =\n core.runtimeTransport === \"single\"\n ? await fetch(runtimeUrl, {\n method: \"POST\",\n headers: { ...resolvedHeaders, \"Content-Type\": \"application/json\" },\n body: JSON.stringify({\n method: \"transcribe\",\n body: {\n audio: await blobToBase64(audioBlob),\n mimeType: audioBlob.type || \"audio/webm\",\n filename,\n },\n }),\n })\n : await fetch(`${runtimeUrl}/transcribe`, {\n method: \"POST\",\n // No Content-Type: the browser sets it (with boundary) for FormData.\n headers: omitContentType(resolvedHeaders),\n body: toFormData(audioBlob, filename),\n });\n } catch (error) {\n throw new TranscriptionError({\n code: TranscriptionErrorCode.NETWORK_ERROR,\n message:\n error instanceof Error ? error.message : \"Network request failed\",\n retryable: true,\n });\n }\n\n if (!response.ok) {\n throw await toTranscriptionError(response);\n }\n\n return (await response.json()) as TranscriptionResult;\n}\n\nfunction toFormData(audioBlob: Blob, filename: string): FormData {\n const formData = new FormData();\n formData.append(\"audio\", audioBlob, filename);\n return formData;\n}\n\nfunction omitContentType(\n headers: Readonly<Record<string, string>>,\n): Record<string, string> {\n const result = { ...headers };\n delete result[\"Content-Type\"];\n return result;\n}\n\nfunction blobToBase64(blob: Blob): Promise<string> {\n return new Promise((resolve, reject) => {\n const reader = new FileReader();\n reader.onloadend = () => {\n // Strip the `data:...;base64,` prefix to get the raw base64 payload.\n const result = reader.result as string;\n resolve(result.slice(result.indexOf(\",\") + 1));\n };\n reader.onerror = () => reject(new Error(\"Failed to read audio data\"));\n reader.readAsDataURL(blob);\n });\n}\n\n/** Build a typed error from a non-OK transcription response. */\nasync function toTranscriptionError(\n response: Response,\n): Promise<TranscriptionError> {\n const retryable = response.status >= 500;\n\n let data: unknown;\n try {\n data = await response.json();\n } catch {\n return new TranscriptionError({\n code: TranscriptionErrorCode.PROVIDER_ERROR,\n message: `HTTP ${response.status}: ${response.statusText}`,\n retryable,\n });\n }\n\n if (isTranscriptionErrorResponse(data)) {\n return new TranscriptionError({\n code: data.error,\n message: data.message,\n retryable: data.retryable ?? false,\n });\n }\n\n const message =\n typeof data === \"object\" && data !== null && \"message\" in data\n ? String((data as { message: unknown }).message)\n : \"Transcription failed\";\n\n return new TranscriptionError({\n code: TranscriptionErrorCode.PROVIDER_ERROR,\n message,\n retryable,\n });\n}\n\nfunction isTranscriptionErrorResponse(\n data: unknown,\n): data is TranscriptionErrorResponse {\n return (\n typeof data === \"object\" &&\n data !== null &&\n typeof (data as TranscriptionErrorResponse).error === \"string\" &&\n typeof (data as TranscriptionErrorResponse).message === \"string\"\n );\n}\n","import { Injectable, ElementRef, NgZone, OnDestroy } from \"@angular/core\";\nimport { ScrollDispatcher, ViewportRuler } from \"@angular/cdk/scrolling\";\nimport {\n Observable,\n Subject,\n BehaviorSubject,\n fromEvent,\n merge,\n animationFrameScheduler,\n} from \"rxjs\";\nimport {\n takeUntil,\n debounceTime,\n throttleTime,\n distinctUntilChanged,\n map,\n startWith,\n} from \"rxjs/operators\";\n\nexport interface ScrollState {\n isAtBottom: boolean;\n scrollTop: number;\n scrollHeight: number;\n clientHeight: number;\n}\n\n@Injectable({\n providedIn: \"root\",\n})\nexport class ScrollPosition implements OnDestroy {\n private destroy$ = new Subject<void>();\n private scrollStateSubject = new BehaviorSubject<ScrollState>({\n isAtBottom: true,\n scrollTop: 0,\n scrollHeight: 0,\n clientHeight: 0,\n });\n\n public scrollState$ = this.scrollStateSubject.asObservable();\n\n constructor(\n private scrollDispatcher: ScrollDispatcher,\n private viewportRuler: ViewportRuler,\n private ngZone: NgZone,\n ) {}\n\n /**\n * Monitor scroll position of an element\n * @param element The element to monitor\n * @param threshold Pixels from bottom to consider \"at bottom\" (default 10)\n */\n monitorScrollPosition(\n element: ElementRef<HTMLElement> | HTMLElement,\n threshold: number = 10,\n ): Observable<ScrollState> {\n const el = element instanceof ElementRef ? element.nativeElement : element;\n\n // Create scroll observable\n const scroll$ = merge(\n fromEvent(el, \"scroll\"),\n this.viewportRuler.change(150), // Monitor viewport changes\n ).pipe(\n startWith(null), // Emit initial state\n throttleTime(16, animationFrameScheduler, { trailing: true }), // ~60fps\n map(() => this.getScrollState(el, threshold)),\n distinctUntilChanged(\n (a, b) =>\n a.isAtBottom === b.isAtBottom &&\n a.scrollTop === b.scrollTop &&\n a.scrollHeight === b.scrollHeight,\n ),\n takeUntil(this.destroy$),\n );\n\n // Subscribe and update subject\n scroll$.subscribe((state) => {\n this.scrollStateSubject.next(state);\n });\n\n return scroll$;\n }\n\n /**\n * Scroll element to bottom with smooth animation\n * @param element The element to scroll\n * @param smooth Whether to use smooth scrolling\n */\n scrollToBottom(\n element: ElementRef<HTMLElement> | HTMLElement,\n smooth: boolean = true,\n ): void {\n const el = element instanceof ElementRef ? element.nativeElement : element;\n\n this.ngZone.runOutsideAngular(() => {\n if (smooth && \"scrollBehavior\" in document.documentElement.style) {\n el.scrollTo({\n top: el.scrollHeight,\n behavior: \"smooth\",\n });\n } else {\n el.scrollTop = el.scrollHeight;\n }\n });\n }\n\n /**\n * Check if element is at bottom\n * @param element The element to check\n * @param threshold Pixels from bottom to consider \"at bottom\"\n */\n isAtBottom(\n element: ElementRef<HTMLElement> | HTMLElement,\n threshold: number = 10,\n ): boolean {\n const el = element instanceof ElementRef ? element.nativeElement : element;\n return this.getScrollState(el, threshold).isAtBottom;\n }\n\n /**\n * Get current scroll state of element\n */\n public getScrollState(element: HTMLElement, threshold: number): ScrollState {\n const scrollTop = element.scrollTop;\n const scrollHeight = element.scrollHeight;\n const clientHeight = element.clientHeight;\n const distanceFromBottom = scrollHeight - scrollTop - clientHeight;\n const isAtBottom = distanceFromBottom <= threshold;\n\n return {\n isAtBottom,\n scrollTop,\n scrollHeight,\n clientHeight,\n };\n }\n\n /**\n * Create a ResizeObserver for element size changes\n * @param element The element to observe\n * @param debounceMs Debounce time in milliseconds\n */\n observeResize(\n element: ElementRef<HTMLElement> | HTMLElement,\n debounceMs: number = 250,\n ): Observable<ResizeObserverEntry> {\n const el = element instanceof ElementRef ? element.nativeElement : element;\n const resize$ = new Subject<ResizeObserverEntry>();\n\n const resizeObserver = new ResizeObserver((entries) => {\n const entry = entries[0];\n if (entry) {\n this.ngZone.run(() => {\n resize$.next(entry);\n });\n }\n });\n\n resizeObserver.observe(el);\n\n // Cleanup on destroy\n this.destroy$.subscribe(() => {\n resizeObserver.disconnect();\n });\n\n return resize$.pipe(debounceTime(debounceMs), takeUntil(this.destroy$));\n }\n\n ngOnDestroy(): void {\n this.destroy$.next();\n this.destroy$.complete();\n this.scrollStateSubject.complete();\n }\n}\n","import { Injectable, ElementRef, NgZone, OnDestroy } from \"@angular/core\";\nimport { Observable, Subject, BehaviorSubject } from \"rxjs\";\nimport { debounceTime, takeUntil, distinctUntilChanged } from \"rxjs/operators\";\n\nexport interface ResizeState {\n width: number;\n height: number;\n isResizing: boolean;\n}\n\n@Injectable({\n providedIn: \"root\",\n})\nexport class ResizeObserverService implements OnDestroy {\n private destroy$ = new Subject<void>();\n private observers = new Map<HTMLElement, ResizeObserver>();\n private resizeStates = new Map<HTMLElement, BehaviorSubject<ResizeState>>();\n private resizeTimeouts = new Map<HTMLElement, number>();\n\n constructor(private ngZone: NgZone) {}\n\n /**\n * Observe element resize with debouncing and resizing state\n * @param element Element to observe\n * @param debounceMs Debounce time (default 250ms)\n * @param resizingDurationMs How long to show \"isResizing\" state (default 250ms)\n */\n observeElement(\n element: ElementRef<HTMLElement> | HTMLElement,\n debounceMs: number = 0,\n resizingDurationMs: number = 250,\n ): Observable<ResizeState> {\n const el = element instanceof ElementRef ? element.nativeElement : element;\n\n // Return existing observer if already observing\n if (this.resizeStates.has(el)) {\n return this.resizeStates.get(el)!.asObservable();\n }\n\n // Create new subject for this element\n const resizeState$ = new BehaviorSubject<ResizeState>({\n width: el.offsetWidth,\n height: el.offsetHeight,\n isResizing: false,\n });\n\n this.resizeStates.set(el, resizeState$);\n\n // Create ResizeObserver\n const resizeObserver = new ResizeObserver((entries) => {\n if (entries.length === 0) return;\n\n const entry = entries[0];\n if (!entry) return;\n\n const { width, height } = entry.contentRect;\n\n this.ngZone.run(() => {\n // Clear existing timeout\n const existingTimeout = this.resizeTimeouts.get(el);\n if (existingTimeout) {\n clearTimeout(existingTimeout);\n }\n\n // Update state with isResizing = true\n resizeState$.next({\n width,\n height,\n isResizing: true,\n });\n\n // Set timeout to clear isResizing flag\n if (resizingDurationMs > 0) {\n const timeout = window.setTimeout(() => {\n resizeState$.next({\n width,\n height,\n isResizing: false,\n });\n this.resizeTimeouts.delete(el);\n }, resizingDurationMs);\n\n this.resizeTimeouts.set(el, timeout);\n } else {\n // If no duration, immediately set isResizing to false\n resizeState$.next({\n width,\n height,\n isResizing: false,\n });\n }\n });\n });\n\n // Start observing\n resizeObserver.observe(el);\n this.observers.set(el, resizeObserver);\n\n // Return observable with debouncing if specified\n const observable = resizeState$.asObservable().pipe(\n debounceMs > 0 ? debounceTime(debounceMs) : (source) => source,\n distinctUntilChanged(\n (a, b) =>\n a.width === b.width &&\n a.height === b.height &&\n a.isResizing === b.isResizing,\n ),\n takeUntil(this.destroy$),\n );\n\n return observable;\n }\n\n /**\n * Stop observing an element\n * @param element Element to stop observing\n */\n unobserve(element: ElementRef<HTMLElement> | HTMLElement): void {\n const el = element instanceof ElementRef ? element.nativeElement : element;\n\n // Clear timeout if exists\n const timeout = this.resizeTimeouts.get(el);\n if (timeout) {\n clearTimeout(timeout);\n this.resizeTimeouts.delete(el);\n }\n\n // Disconnect observer\n const observer = this.observers.get(el);\n if (observer) {\n observer.disconnect();\n this.observers.delete(el);\n }\n\n // Complete and remove subject\n const subject = this.resizeStates.get(el);\n if (subject) {\n subject.complete();\n this.resizeStates.delete(el);\n }\n }\n\n /**\n * Get current size of element\n * @param element Element to measure\n */\n getCurrentSize(element: ElementRef<HTMLElement> | HTMLElement): {\n width: number;\n height: number;\n } {\n const el = element instanceof ElementRef ? element.nativeElement : element;\n return {\n width: el.offsetWidth,\n height: el.offsetHeight,\n };\n }\n\n /**\n * Get current resize state of element\n * @param element Element to check\n */\n getCurrentState(\n element: ElementRef<HTMLElement> | HTMLElement,\n ): ResizeState | null {\n const el = element instanceof ElementRef ? element.nativeElement : element;\n const subject = this.resizeStates.get(el);\n return subject ? subject.value : null;\n }\n\n ngOnDestroy(): void {\n // Clear all timeouts\n this.resizeTimeouts.forEach((timeout) => clearTimeout(timeout));\n this.resizeTimeouts.clear();\n\n // Disconnect all observers\n this.observers.forEach((observer) => observer.disconnect());\n this.observers.clear();\n\n // Complete all subjects\n this.resizeStates.forEach((subject) => subject.complete());\n this.resizeStates.clear();\n\n // Complete destroy subject\n this.destroy$.next();\n this.destroy$.complete();\n }\n}\n","import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\n/**\n * Utility function to merge Tailwind CSS classes\n * Combines clsx for conditional classes and tailwind-merge for proper Tailwind class merging\n */\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n\n/**\n * Asserts that a value is neither `null` nor `undefined` and narrows its type\n * to `NonNullable<T>`.\n *\n * @param value - The value to validate.\n * @param message - The error message to use when the value is nullish.\n * @throws {Error} If the value is `null` or `undefined`.\n */\nexport function assertDefined<T>(\n value: T,\n message = `Value must be defined ${String(value)}`,\n): asserts value is NonNullable<T> {\n if (value === undefined || value === null) {\n throw new Error(message);\n }\n}\n","import { inject, Injector, runInInjectionContext } from \"@angular/core\";\nimport { Context } from \"@ag-ui/client\";\nimport { CopilotKit } from \"./copilotkit\";\nimport { explicitEffect } from \"./explicit-effect\";\n\nexport interface ConnectAgentContextConfig {\n injector?: Injector;\n}\n\n/**\n * Connects context to the agent.\n *\n * @param context - The context (or reactive zero-argument accessor) to connect.\n * @param config - Optional configuration for connecting the context.\n */\nexport function connectAgentContext(\n context: Context | (() => Context),\n config?: ConnectAgentContextConfig,\n): void {\n const injector = config?.injector ?? inject(Injector);\n\n runInInjectionContext(injector, () => {\n const copilotkit = inject(CopilotKit);\n\n explicitEffect(\n () => (typeof context === \"function\" ? context() : context),\n (contextValue, onCleanup) => {\n const id = copilotkit.core.addContext(contextValue);\n\n onCleanup(() => {\n copilotkit.core.removeContext(id);\n });\n },\n );\n });\n}\n","import { inject, Signal } from \"@angular/core\";\nimport { toSignal } from \"@angular/core/rxjs-interop\";\nimport {\n ɵselectMemories,\n ɵselectMemoriesAvailable,\n ɵselectMemoriesError,\n ɵselectMemoriesIsLoading,\n ɵselectMemoriesRealtimeStatus,\n} from \"@copilotkit/core\";\nimport type {\n Memory,\n MemoryChanges,\n MemoryRealtimeStatus,\n NewMemory,\n} from \"@copilotkit/core\";\nimport { CopilotKit } from \"./copilotkit\";\n\n/**\n * Return value of {@link injectMemories}.\n *\n * The `memories` signal is the server-authoritative list for the current\n * runtime-authenticated user. It is hydrated from a REST snapshot and kept\n * current by realtime `memory_metadata` deltas pushed over the memory store's\n * own channel. Mutations resolve once the platform confirms the operation and\n * reject with an `Error` on failure.\n */\nexport interface MemoriesController {\n /**\n * Memories for the current user, newest first. Updated in realtime when the\n * platform pushes `memory_metadata` events over the memory store's channel.\n */\n memories: Signal<Memory[]>;\n /**\n * `true` while the initial memory snapshot is being fetched. Subsequent\n * realtime updates do not re-enter the loading state.\n */\n isLoading: Signal<boolean>;\n /**\n * The most recent error from fetching memories or a mutation, or `null`\n * when there is no error. Cleared on the next fetch attempt, on a\n * successful fetch, when the runtime context changes, and on a successful\n * mutation (a failed mutation replaces it with that mutation's error).\n */\n error: Signal<Error | null>;\n /**\n * `true` when the platform memory routes are available. Set to `false`\n * after a 404 or 501, indicating memory is not supported by the current\n * runtime configuration.\n */\n isAvailable: Signal<boolean>;\n /**\n * Health of the realtime connection that streams live `memory_metadata`\n * deltas. Distinct from `isAvailable`/`error` (which describe the REST list\n * route): `\"connecting\"` while the socket opens/joins, `\"connected\"` once\n * live deltas are flowing, and `\"unavailable\"` once the socket permanently\n * gives up — at which point the list is a frozen snapshot. Lets a template\n * drop a \"live\" indicator instead of showing it over stale data.\n */\n realtimeStatus: Signal<MemoryRealtimeStatus>;\n /**\n * Re-fetch the memory snapshot from the platform. Resolves when the re-pull\n * succeeds; rejects if it fails or the store is torn down mid-flight.\n */\n refresh: () => Promise<void>;\n /**\n * Create a memory. Resolves to the stored memory (server-authoritative);\n * rejects on failure.\n */\n addMemory: (input: NewMemory) => Promise<Memory>;\n /**\n * Supersede a memory: the old memory is retired and a new one is created.\n * Resolves to the new memory (its `id` differs from the supplied `id`);\n * rejects on failure.\n *\n * Supersede is a FULL replacement, not a partial patch: `changes` is the\n * complete definition of the new memory. You must re-supply `content` and\n * `kind`, and an omitted `sourceThreadIds` resets the new memory's source\n * threads to empty — it does not preserve the prior memory's value.\n */\n updateMemory: (id: string, changes: MemoryChanges) => Promise<Memory>;\n /**\n * Retire a memory (non-lossy delete). Resolves when the server confirms;\n * rejects on failure.\n */\n removeMemory: (id: string) => Promise<void>;\n}\n\n/**\n * Angular injection function for listing and managing platform memories — the\n * signal-based counterpart to react-core's `useMemories`.\n *\n * Reads the user-scoped memory store owned and wired by `CopilotKitCore`. The\n * binding does not create, register, start, or stop the store: core owns its\n * lifecycle and opens its own `user_meta:memories:<joinCode>` channel, applying\n * `memory_metadata` deltas to the list. The binding only bridges the store's\n * selectors onto Angular signals and forwards the stable mutation callbacks.\n *\n * Mutations are server-authoritative: each resolves once the platform confirms\n * the operation and rejects with an `Error` on failure. You can still call\n * `refresh()` to re-pull the REST snapshot on demand.\n *\n * Must be called inside an injection context (component constructor, field\n * initializer, `inject` callback, or `TestBed.runInInjectionContext`) so the\n * selector→signal bridges (`toSignal`) tear down with the host.\n *\n * @returns Signals for memory state and stable mutation callbacks.\n *\n * @example\n * ```ts\n * import { injectMemories } from \"@copilotkit/angular\";\n *\n * @Component({ ... })\n * class MemoryList {\n * readonly #m = injectMemories();\n * memories = this.#m.memories;\n * isLoading = this.#m.isLoading;\n * isAvailable = this.#m.isAvailable;\n *\n * remove(id: string) { this.#m.removeMemory(id); }\n * }\n * ```\n */\nexport function injectMemories(): MemoriesController {\n const store = inject(CopilotKit).core.getMemoryStore();\n\n const initialState = store.getState();\n\n const memories = toSignal(store.select(ɵselectMemories), {\n initialValue: ɵselectMemories(initialState),\n });\n const isLoading = toSignal(store.select(ɵselectMemoriesIsLoading), {\n initialValue: ɵselectMemoriesIsLoading(initialState),\n });\n const error = toSignal(store.select(ɵselectMemoriesError), {\n initialValue: ɵselectMemoriesError(initialState),\n });\n const isAvailable = toSignal(store.select(ɵselectMemoriesAvailable), {\n initialValue: ɵselectMemoriesAvailable(initialState),\n });\n const realtimeStatus = toSignal(store.select(ɵselectMemoriesRealtimeStatus), {\n initialValue: ɵselectMemoriesRealtimeStatus(initialState),\n });\n\n return {\n memories,\n isLoading,\n error,\n isAvailable,\n realtimeStatus,\n refresh: () => store.refresh(),\n addMemory: (input: NewMemory) => store.addMemory(input),\n updateMemory: (id: string, changes: MemoryChanges) =>\n store.updateMemory(id, changes),\n removeMemory: (id: string) => store.removeMemory(id),\n };\n}\n","import {\n Directive,\n Input,\n OnInit,\n OnChanges,\n OnDestroy,\n SimpleChanges,\n Inject,\n} from \"@angular/core\";\nimport { CopilotKit } from \"../copilotkit\";\nimport type { Context } from \"@ag-ui/client\";\n\n/**\n * Directive to manage agent context in CopilotKit.\n * Automatically adds context on init, updates on changes, and removes on destroy.\n *\n * @example\n * ```html\n * <!-- With separate inputs -->\n * <div copilotkitAgentContext\n * [description]=\"'User preferences'\"\n * [value]=\"userSettings\">\n * </div>\n *\n * <!-- With context object -->\n * <div [copilotkitAgentContext]=\"contextObject\">\n * </div>\n *\n * <!-- With dynamic values -->\n * <div copilotkitAgentContext\n * description=\"Form state\"\n * [value]=\"formData$ | async\">\n * </div>\n * ```\n */\n@Directive({\n selector: \"[copilotkitAgentContext]\",\n standalone: true,\n})\nexport class CopilotKitAgentContext implements OnInit, OnChanges, OnDestroy {\n private contextId?: string;\n\n constructor(@Inject(CopilotKit) private readonly copilotkit: CopilotKit) {}\n\n /**\n * Context object containing both description and value.\n * If provided, this takes precedence over individual inputs.\n */\n @Input(\"copilotkitAgentContext\") context?: Context;\n\n /**\n * Description of the context.\n * Used when context object is not provided.\n */\n @Input() description?: string;\n\n /**\n * Value of the context.\n * Used when context object is not provided.\n */\n @Input() value?: any;\n\n ngOnInit(): void {\n this.addContext();\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n // Check if any relevant input has changed\n const hasContextChange = \"context\" in changes;\n const hasDescriptionChange = \"description\" in changes;\n const hasValueChange = \"value\" in changes;\n\n if (hasContextChange || hasDescriptionChange || hasValueChange) {\n // Skip the first change as ngOnInit handles initial setup\n if (this.contextId) {\n this.updateContext();\n }\n }\n }\n\n ngOnDestroy(): void {\n this.removeContext();\n }\n\n /**\n * Adds the context to CopilotKit\n */\n private addContext(): void {\n const contextToAdd = this.getContext();\n\n if (contextToAdd) {\n this.contextId = this.copilotkit.core.addContext(contextToAdd);\n }\n }\n\n /**\n * Updates the context by removing the old one and adding a new one\n */\n private updateContext(): void {\n this.removeContext();\n this.addContext();\n }\n\n /**\n * Removes the current context from CopilotKit\n */\n private removeContext(): void {\n if (this.contextId) {\n this.copilotkit.core.removeContext(this.contextId);\n this.contextId = undefined;\n }\n }\n\n /**\n * Gets the context object from inputs\n */\n private getContext(): Context | null {\n // If context object is provided, use it\n if (this.context) {\n return this.context;\n }\n\n // Otherwise, build from individual inputs\n // Note: null is a valid value, but undefined means not set\n if (this.description !== undefined && this.value !== undefined) {\n return {\n description: this.description,\n value: this.value,\n };\n }\n\n return null;\n }\n}\n","import {\n Directive,\n ElementRef,\n OnDestroy,\n AfterViewInit,\n PLATFORM_ID,\n afterNextRender,\n inject,\n input,\n output,\n} from \"@angular/core\";\nimport { isPlatformBrowser } from \"@angular/common\";\nimport { ScrollPosition } from \"../scroll-position\";\nimport { ResizeObserverService } from \"../resize-observer\";\nimport { Subject } from \"rxjs\";\nimport {\n takeUntil,\n debounceTime,\n filter,\n distinctUntilChanged,\n} from \"rxjs/operators\";\n\nexport type ScrollBehavior = \"smooth\" | \"instant\" | \"auto\";\n\n/**\n * Directive for implementing stick-to-bottom scroll behavior\n * Similar to the React use-stick-to-bottom library\n *\n * @example\n * ```html\n * <div copilotStickToBottom\n * [enabled]=\"true\"\n * [threshold]=\"10\"\n * [initialBehavior]=\"'smooth'\"\n * [resizeBehavior]=\"'smooth'\"\n * (isAtBottomChange)=\"onBottomChange($event)\">\n * <!-- Content -->\n * </div>\n * ```\n */\n@Directive({\n standalone: true,\n selector: \"[copilotStickToBottom]\",\n providers: [ScrollPosition, ResizeObserverService],\n})\nexport class StickToBottom implements AfterViewInit, OnDestroy {\n enabled = input<boolean>(true);\n threshold = input<number>(10);\n initialBehavior = input<ScrollBehavior>(\"smooth\");\n resizeBehavior = input<ScrollBehavior>(\"smooth\");\n debounceMs = input<number>(100);\n\n isAtBottomChange = output<boolean>();\n scrollToBottomRequested = output<void>();\n\n private elementRef = inject(ElementRef);\n private scrollService = inject(ScrollPosition);\n private resizeService = inject(ResizeObserverService);\n private platformId = inject(PLATFORM_ID);\n\n private destroy$ = new Subject<void>();\n private contentElement?: HTMLElement;\n private wasAtBottom = true;\n private hasInitialized = false;\n private userHasScrolled = false;\n private destroyed = false;\n\n constructor() {\n afterNextRender(() => {\n if (this.destroyed) return;\n this.hasInitialized = true;\n if (this.enabled()) {\n this.scrollToBottom(this.initialBehavior());\n }\n });\n }\n\n ngAfterViewInit(): void {\n if (!isPlatformBrowser(this.platformId)) return;\n\n const element = this.elementRef.nativeElement as HTMLElement;\n\n // Find or create content wrapper\n this.contentElement = element.querySelector(\n \"[data-stick-to-bottom-content]\",\n ) as HTMLElement;\n if (!this.contentElement) {\n this.contentElement = element;\n }\n\n this.setupScrollMonitoring();\n this.setupResizeMonitoring();\n this.setupContentMutationObserver();\n }\n\n private setupScrollMonitoring(): void {\n if (!this.enabled()) return;\n\n const element = this.elementRef.nativeElement;\n\n // Monitor scroll position\n this.scrollService\n .monitorScrollPosition(element, this.threshold())\n .pipe(\n takeUntil(this.destroy$),\n debounceTime(this.debounceMs()),\n distinctUntilChanged((a, b) => a.isAtBottom === b.isAtBottom),\n )\n .subscribe((state) => {\n const wasAtBottom = this.wasAtBottom;\n this.wasAtBottom = state.isAtBottom;\n\n // Detect user scroll\n if (!state.isAtBottom && wasAtBottom && this.hasInitialized) {\n this.userHasScrolled = true;\n } else if (state.isAtBottom) {\n this.userHasScrolled = false;\n }\n\n // Emit change\n this.isAtBottomChange.emit(state.isAtBottom);\n });\n }\n\n private setupResizeMonitoring(): void {\n if (!this.enabled() || !this.contentElement) return;\n\n // Monitor content resize\n this.resizeService\n .observeElement(this.contentElement, 0, 250)\n .pipe(\n takeUntil(this.destroy$),\n filter(() => this.enabled() && !this.userHasScrolled),\n )\n .subscribe((state) => {\n // Auto-scroll on resize if we were at bottom\n if (this.wasAtBottom && !state.isResizing) {\n this.scrollToBottom(this.resizeBehavior());\n }\n });\n\n // Monitor container resize\n const element = this.elementRef.nativeElement;\n this.resizeService\n .observeElement(element, 0, 250)\n .pipe(\n takeUntil(this.destroy$),\n filter(\n () => this.enabled() && !this.userHasScrolled && this.wasAtBottom,\n ),\n )\n .subscribe(() => {\n // Adjust scroll on container resize\n this.scrollToBottom(this.resizeBehavior());\n });\n }\n\n private setupContentMutationObserver(): void {\n if (!this.enabled() || !this.contentElement) return;\n\n const mutationObserver = new MutationObserver(() => {\n if (this.enabled() && this.wasAtBottom && !this.userHasScrolled) {\n // Content changed, scroll to bottom if we were there\n requestAnimationFrame(() => {\n this.scrollToBottom(this.resizeBehavior());\n });\n }\n });\n\n mutationObserver.observe(this.contentElement, {\n childList: true,\n subtree: true,\n characterData: true,\n });\n\n // Cleanup on destroy\n this.destroy$.subscribe(() => {\n mutationObserver.disconnect();\n });\n }\n\n /**\n * Public method to scroll to bottom\n * Can be called from parent component\n */\n public scrollToBottom(behavior: ScrollBehavior = \"smooth\"): void {\n const element = this.elementRef.nativeElement;\n const smooth = behavior === \"smooth\";\n\n this.scrollService.scrollToBottom(element, smooth);\n this.userHasScrolled = false;\n this.scrollToBottomRequested.emit();\n }\n\n /**\n * Check if currently at bottom\n */\n public isAtBottom(): boolean {\n return this.scrollService.isAtBottom(\n this.elementRef.nativeElement,\n this.threshold(),\n );\n }\n\n /**\n * Get current scroll state\n */\n public getScrollState() {\n const element = this.elementRef.nativeElement;\n return {\n scrollTop: element.scrollTop,\n scrollHeight: element.scrollHeight,\n clientHeight: element.clientHeight,\n isAtBottom: this.isAtBottom(),\n };\n }\n\n ngOnDestroy(): void {\n this.destroyed = true;\n this.destroy$.next();\n this.destroy$.complete();\n }\n}\n","import {\n Directive,\n Input,\n ElementRef,\n HostListener,\n OnDestroy,\n inject,\n ViewContainerRef,\n} from \"@angular/core\";\nimport {\n Overlay,\n OverlayRef,\n OverlayPositionBuilder,\n ConnectedPosition,\n} from \"@angular/cdk/overlay\";\nimport { ComponentPortal } from \"@angular/cdk/portal\";\nimport {\n Component,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n} from \"@angular/core\";\n\n@Component({\n selector: \"copilot-tooltip-content\",\n standalone: true,\n template: `\n <div class=\"copilot-tooltip-wrapper\" [attr.data-position]=\"position\">\n <div class=\"copilot-tooltip\">\n {{ text }}\n </div>\n <div class=\"copilot-tooltip-arrow\"></div>\n </div>\n `,\n styles: [\n `\n .copilot-tooltip-wrapper {\n position: relative;\n display: inline-block;\n animation: fadeIn 0.15s ease-in-out;\n }\n\n .copilot-tooltip {\n background-color: #1a1a1a;\n color: white;\n padding: 6px 10px;\n border-radius: 6px;\n font-size: 12px;\n font-weight: 500;\n white-space: nowrap;\n max-width: 200px;\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);\n }\n\n .copilot-tooltip-arrow {\n position: absolute;\n width: 0;\n height: 0;\n border-style: solid;\n }\n\n /* Arrow for tooltip below element (arrow points up to tooltip) */\n .copilot-tooltip-wrapper[data-position=\"below\"] .copilot-tooltip-arrow {\n top: -4px;\n left: 50%;\n transform: translateX(-50%);\n border-width: 0 4px 4px 4px;\n border-color: transparent transparent #1a1a1a transparent;\n }\n\n /* Arrow for tooltip above element (arrow points down to element) */\n .copilot-tooltip-wrapper[data-position=\"above\"] .copilot-tooltip-arrow {\n bottom: -4px;\n left: 50%;\n transform: translateX(-50%);\n border-width: 4px 4px 0 4px;\n border-color: #1a1a1a transparent transparent transparent;\n }\n\n /* Arrow for tooltip to the left */\n .copilot-tooltip-wrapper[data-position=\"left\"] .copilot-tooltip-arrow {\n right: -4px;\n top: 50%;\n transform: translateY(-50%);\n border-width: 4px 0 4px 4px;\n border-color: transparent transparent transparent #1a1a1a;\n }\n\n /* Arrow for tooltip to the right */\n .copilot-tooltip-wrapper[data-position=\"right\"] .copilot-tooltip-arrow {\n left: -4px;\n top: 50%;\n transform: translateY(-50%);\n border-width: 4px 4px 4px 0;\n border-color: transparent #1a1a1a transparent transparent;\n }\n\n @keyframes fadeIn {\n from {\n opacity: 0;\n transform: translateY(2px);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n }\n `,\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TooltipContent {\n text = \"\";\n private _position: \"above\" | \"below\" | \"left\" | \"right\" = \"below\";\n\n get position(): \"above\" | \"below\" | \"left\" | \"right\" {\n return this._position;\n }\n\n set position(value: \"above\" | \"below\" | \"left\" | \"right\") {\n this._position = value;\n this.cdr.markForCheck();\n }\n\n constructor(private cdr: ChangeDetectorRef) {}\n}\n\n@Directive({\n selector: \"[copilotTooltip]\",\n standalone: true,\n})\nexport class CopilotTooltip implements OnDestroy {\n @Input(\"copilotTooltip\") tooltipText = \"\";\n @Input() tooltipPosition: \"above\" | \"below\" | \"left\" | \"right\" = \"below\";\n @Input() tooltipDelay = 500; // milliseconds\n\n private overlay = inject(Overlay);\n private overlayPositionBuilder = inject(OverlayPositionBuilder);\n private elementRef = inject(ElementRef);\n private viewContainerRef = inject(ViewContainerRef);\n\n private overlayRef?: OverlayRef;\n private tooltipTimeout?: number;\n private originalTitle?: string;\n\n @HostListener(\"mouseenter\")\n onMouseEnter(): void {\n if (!this.tooltipText) return;\n\n // Store and remove native title to prevent OS tooltip\n const element = this.elementRef.nativeElement;\n if (element.hasAttribute(\"title\")) {\n this.originalTitle = element.getAttribute(\"title\");\n element.removeAttribute(\"title\");\n }\n\n // Clear any existing timeout\n if (this.tooltipTimeout) {\n clearTimeout(this.tooltipTimeout);\n }\n\n // Set timeout to show tooltip after delay\n this.tooltipTimeout = window.setTimeout(() => {\n this.show();\n }, this.tooltipDelay);\n }\n\n @HostListener(\"mouseleave\")\n onMouseLeave(): void {\n // Clear timeout if mouse leaves before tooltip shows\n if (this.tooltipTimeout) {\n clearTimeout(this.tooltipTimeout);\n this.tooltipTimeout = undefined;\n }\n\n // Restore original title if it existed\n if (this.originalTitle !== undefined) {\n this.elementRef.nativeElement.setAttribute(\"title\", this.originalTitle);\n this.originalTitle = undefined;\n }\n\n // Hide tooltip if it's showing\n this.hide();\n }\n\n private show(): void {\n if (this.overlayRef) {\n return;\n }\n\n // Create overlay\n const positionStrategy = this.overlayPositionBuilder\n .flexibleConnectedTo(this.elementRef)\n .withPositions(this.getPositions())\n .withPush(false);\n\n this.overlayRef = this.overlay.create({\n positionStrategy,\n scrollStrategy: this.overlay.scrollStrategies.close(),\n hasBackdrop: false,\n });\n\n // Create component portal and attach\n const portal = new ComponentPortal(TooltipContent, this.viewContainerRef);\n const componentRef = this.overlayRef.attach(portal);\n componentRef.instance.text = this.tooltipText;\n\n // Detect actual position after overlay is positioned\n setTimeout(() => {\n if (this.overlayRef && this.elementRef.nativeElement) {\n const tooltipRect =\n this.overlayRef.overlayElement.getBoundingClientRect();\n const elementRect =\n this.elementRef.nativeElement.getBoundingClientRect();\n\n let actualPosition: \"above\" | \"below\" | \"left\" | \"right\" = \"below\";\n\n // Determine actual position based on relative positions\n if (tooltipRect.bottom <= elementRect.top) {\n actualPosition = \"above\";\n } else if (tooltipRect.top >= elementRect.bottom) {\n actualPosition = \"below\";\n } else if (tooltipRect.right <= elementRect.left) {\n actualPosition = \"left\";\n } else if (tooltipRect.left >= elementRect.right) {\n actualPosition = \"right\";\n }\n\n componentRef.instance.position = actualPosition;\n }\n }, 0);\n }\n\n private hide(): void {\n if (this.overlayRef) {\n this.overlayRef.dispose();\n this.overlayRef = undefined;\n }\n }\n\n private getPositions(): ConnectedPosition[] {\n const positions: Record<string, ConnectedPosition[]> = {\n above: [\n {\n originX: \"center\",\n originY: \"top\",\n overlayX: \"center\",\n overlayY: \"bottom\",\n offsetY: -12,\n },\n ],\n below: [\n {\n originX: \"center\",\n originY: \"bottom\",\n overlayX: \"center\",\n overlayY: \"top\",\n offsetY: 12,\n },\n ],\n left: [\n {\n originX: \"start\",\n originY: \"center\",\n overlayX: \"end\",\n overlayY: \"center\",\n offsetX: -12,\n },\n ],\n right: [\n {\n originX: \"end\",\n originY: \"center\",\n overlayX: \"start\",\n overlayY: \"center\",\n offsetX: 12,\n },\n ],\n };\n\n // Prefer below position, but use above as fallback\n const primary = positions[this.tooltipPosition] || positions.below;\n // For below position, add above as first fallback\n const fallbacks =\n this.tooltipPosition === \"below\"\n ? [\n ...(positions.above || []),\n ...(positions.left || []),\n ...(positions.right || []),\n ]\n : Object.values(positions)\n .filter((p) => p !== primary)\n .flat();\n\n return [...(primary || []), ...fallbacks];\n }\n\n ngOnDestroy(): void {\n if (this.tooltipTimeout) {\n clearTimeout(this.tooltipTimeout);\n }\n // Restore original title if it existed\n if (this.originalTitle !== undefined) {\n this.elementRef.nativeElement.setAttribute(\"title\", this.originalTitle);\n }\n this.hide();\n }\n}\n","import { Component, ChangeDetectionStrategy, input } from \"@angular/core\";\n\nimport type { AssistantMessage, Message } from \"@ag-ui/core\";\nimport { RenderToolCalls } from \"../../render-tool-calls\";\n\n@Component({\n selector: \"copilot-chat-tool-calls-view\",\n imports: [RenderToolCalls],\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <copilot-render-tool-calls\n [message]=\"message()\"\n [messages]=\"messages()\"\n [agentId]=\"agentId()\"\n [isLoading]=\"isLoading()\"\n >\n </copilot-render-tool-calls>\n `,\n})\nexport class CopilotChatToolCallsView {\n readonly message = input.required<AssistantMessage>();\n readonly messages = input.required<Message[]>();\n readonly agentId = input<string | undefined>();\n readonly isLoading = input<boolean>(false);\n}\n","import { ChangeDetectionStrategy, Component, input } from \"@angular/core\";\n\nexport interface CopilotIconNode {\n readonly tag: \"path\" | \"rect\";\n readonly attributes: Readonly<Record<string, string>>;\n}\n\nexport type CopilotIconData = readonly CopilotIconNode[];\n\n/** Framework-independent renderer for the small Lucide subset used by chat. */\n@Component({\n selector: \"copilot-icon\",\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { \"aria-hidden\": \"true\" },\n styles: `\n :host {\n display: inline-flex;\n line-height: 0;\n }\n\n svg {\n display: block;\n }\n `,\n template: `\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n focusable=\"false\"\n aria-hidden=\"true\"\n [attr.width]=\"size()\"\n [attr.height]=\"size()\"\n >\n @for (node of img(); track $index) {\n @switch (node.tag) {\n @case (\"path\") {\n <path [attr.d]=\"node.attributes['d']\" />\n }\n @case (\"rect\") {\n <rect\n [attr.x]=\"node.attributes['x']\"\n [attr.y]=\"node.attributes['y']\"\n [attr.width]=\"node.attributes['width']\"\n [attr.height]=\"node.attributes['height']\"\n [attr.rx]=\"node.attributes['rx']\"\n [attr.ry]=\"node.attributes['ry']\"\n />\n }\n }\n }\n </svg>\n `,\n})\nexport class CopilotIcon {\n readonly img = input.required<CopilotIconData>();\n readonly size = input(24);\n}\n\nfunction path(d: string): CopilotIconNode {\n return { tag: \"path\", attributes: { d } };\n}\n\nfunction rect(attributes: Readonly<Record<string, string>>): CopilotIconNode {\n return { tag: \"rect\", attributes };\n}\n\n// Icon paths are from Lucide (ISC), limited to the subset used by chat.\nexport const ArrowUp: CopilotIconData = [\n path(\"m5 12 7-7 7 7\"),\n path(\"M12 19V5\"),\n];\nexport const Check: CopilotIconData = [path(\"M20 6 9 17l-5-5\")];\nexport const ChevronDown: CopilotIconData = [path(\"m6 9 6 6 6-6\")];\nexport const ChevronLeft: CopilotIconData = [path(\"m15 18-6-6 6-6\")];\nexport const ChevronRight: CopilotIconData = [path(\"m9 18 6-6-6-6\")];\nexport const Copy: CopilotIconData = [\n rect({ width: \"14\", height: \"14\", x: \"8\", y: \"8\", rx: \"2\", ry: \"2\" }),\n path(\"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2\"),\n];\nexport const Edit: CopilotIconData = [\n path(\"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"),\n path(\n \"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z\",\n ),\n];\nexport const Mic: CopilotIconData = [\n path(\"M12 19v3\"),\n path(\"M19 10v2a7 7 0 0 1-14 0v-2\"),\n rect({ x: \"9\", y: \"2\", width: \"6\", height: \"13\", rx: \"3\" }),\n];\nexport const Plus: CopilotIconData = [path(\"M5 12h14\"), path(\"M12 5v14\")];\nexport const RefreshCw: CopilotIconData = [\n path(\"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8\"),\n path(\"M21 3v5h-5\"),\n path(\"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16\"),\n path(\"M8 16H3v5\"),\n];\nexport const ThumbsDown: CopilotIconData = [\n path(\"M17 14V2\"),\n path(\n \"M9 18.12 10 14H4.17a2 2 0 0 1-1.92-2.56l2.33-8A2 2 0 0 1 6.5 2H20a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.76a2 2 0 0 0-1.79 1.11L12 22a3.13 3.13 0 0 1-3-3.88Z\",\n ),\n];\nexport const ThumbsUp: CopilotIconData = [\n path(\"M7 10v12\"),\n path(\n \"M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z\",\n ),\n];\nexport const Upload: CopilotIconData = [\n path(\"M12 3v12\"),\n path(\"m17 8-5-5-5 5\"),\n path(\"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4\"),\n];\nexport const Volume2: CopilotIconData = [\n path(\n \"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z\",\n ),\n path(\"M16 9a5 5 0 0 1 0 6\"),\n path(\"M19.364 18.364a9 9 0 0 0 0-12.728\"),\n];\nexport const X: CopilotIconData = [path(\"M18 6 6 18\"), path(\"m6 6 12 12\")];\n","import {\n Component,\n DestroyRef,\n computed,\n inject,\n input,\n signal,\n} from \"@angular/core\";\nimport { copyToClipboard } from \"@copilotkit/shared\";\nimport { CopilotIcon, Copy, Check } from \"../icons/copilot-icon\";\nimport { injectChatLabels } from \"../../chat-config\";\n\n/**\n * Language label and copy button above a rendered markdown code block.\n * Mounted by CopilotChatAssistantMessageRenderer into the sanitized markdown\n * DOM; styled by that component.\n */\n@Component({\n selector: \"copilot-chat-code-block-header\",\n imports: [CopilotIcon],\n host: { class: \"code-block-header\" },\n template: `\n <span [class.code-block-language]=\"language()\">{{ language() }}</span>\n <button\n type=\"button\"\n class=\"code-block-copy-button\"\n [attr.aria-label]=\"label() + ' code'\"\n (click)=\"copy()\"\n >\n <copilot-icon [img]=\"copied() ? CheckIcon : CopyIcon\" [size]=\"10\" />\n <span>{{ label() }}</span>\n </button>\n `,\n})\nexport class CopilotChatCodeBlockHeader {\n readonly language = input(\"\");\n readonly code = input.required<string>();\n\n protected readonly CopyIcon = Copy;\n protected readonly CheckIcon = Check;\n protected readonly copied = signal(false);\n private readonly labels = injectChatLabels();\n protected readonly label = computed(() =>\n this.copied()\n ? this.labels.assistantMessageToolbarCopyCodeCopiedLabel\n : this.labels.assistantMessageToolbarCopyCodeLabel,\n );\n\n private resetTimer?: ReturnType<typeof setTimeout>;\n\n constructor() {\n inject(DestroyRef).onDestroy(() => clearTimeout(this.resetTimer));\n }\n\n protected copy(): void {\n copyToClipboard(this.code()).then((success) => {\n if (!success) return;\n this.copied.set(true);\n clearTimeout(this.resetTimer);\n this.resetTimer = setTimeout(() => this.copied.set(false), 2000);\n });\n }\n}\n","import { Marked, TokenizerAndRendererExtension } from \"marked\";\nimport hljs from \"highlight.js\";\nimport DOMPurify from \"dompurify\";\nimport { renderToString } from \"katex\";\nimport { completePartialMarkdown } from \"@copilotkit/core\";\n\n/**\n * DOMPurify instance owned by this module, or undefined without a DOM. The\n * default export is a global instance shared with the host app, whose\n * setConfig() overrides our per-call config and whose hooks would run inside\n * our sanitization, so it is not used here.\n */\nconst purifier = typeof window === \"undefined\" ? undefined : DOMPurify(window);\npurifier?.addHook(\"afterSanitizeAttributes\", (node) => {\n if (node.tagName === \"A\" && node.hasAttribute(\"href\")) {\n node.setAttribute(\"rel\", \"noopener noreferrer\");\n }\n});\n\n/**\n * Sanitizes rendered markdown into a DOM fragment with DOMPurify's default\n * allowlist. Returning nodes instead of a string means the sanitized tree is\n * never serialized and parsed again, which is where mutation XSS happens.\n *\n * Returns null when sanitization cannot run (no DOM, for example during server\n * rendering, or an unsupported environment, where sanitize() would return its\n * input unchanged). Callers must fail closed and render text instead.\n *\n * KaTeX wraps its MathML in <semantics> and puts the TeX source in an\n * <annotation>. DOMPurify unwraps both by default but keeps their content, so\n * the TeX source leaks as visible text and the MathML structure breaks. They\n * are allowed explicitly; DOMPurify still sanitizes their children and\n * attributes.\n * The renderer uses ViewEncapsulation.None, so a <style> in model output would\n * restyle the whole host page; it is forbidden.\n */\nfunction sanitizeHtml(html: string): DocumentFragment | null {\n if (!purifier?.isSupported) {\n return null;\n }\n return purifier.sanitize(html, {\n ADD_TAGS: [\"semantics\", \"annotation\"],\n FORBID_TAGS: [\"style\"],\n RETURN_DOM_FRAGMENT: true,\n });\n}\n\n/**\n * Tokenizes `$$...$$` display math and `$...$` inline math as markdown, so\n * math is never matched inside code spans, link targets, or other attributes.\n * A closing inline delimiter cannot be preceded by whitespace or followed by a\n * digit. Those delimiter rules keep ordinary currency ranges such as\n * \"$349 ... $289\" from becoming one large KaTeX expression.\n */\nconst mathExtension: TokenizerAndRendererExtension = {\n name: \"math\",\n level: \"inline\",\n start: (src) => src.indexOf(\"$\"),\n tokenizer(src) {\n const display = /^\\$\\$([\\s\\S]+?)\\$\\$/.exec(src);\n if (display) {\n return { type: \"math\", raw: display[0], text: display[1], display: true };\n }\n const inline = /^\\$(?!\\s)([^$\\n]*?\\S)\\$(?!\\d)/.exec(src);\n if (inline) {\n return { type: \"math\", raw: inline[0], text: inline[1], display: false };\n }\n return undefined;\n },\n renderer: (token) =>\n renderToString(token[\"text\"], {\n displayMode: token[\"display\"],\n throwOnError: false,\n }),\n};\n\nconst marked = new Marked(\n { gfm: true, breaks: true },\n { extensions: [mathExtension] },\n);\n\n/**\n * Highlights a code block in place. marked has already escaped the code and\n * its language class; the highlighted markup is sanitized before insertion.\n * Returns the fence language.\n */\nfunction highlightCode(code: HTMLElement): string {\n const lang = /\\blanguage-(\\S+)/.exec(code.className)?.[1] ?? \"\";\n const language = hljs.getLanguage(lang) ? lang : \"plaintext\";\n const source = (code.textContent ?? \"\").replace(/\\n$/, \"\");\n const highlighted = sanitizeHtml(hljs.highlight(source, { language }).value);\n if (highlighted) {\n code.replaceChildren(highlighted);\n }\n code.classList.add(\"hljs\");\n return lang;\n}\n\n/**\n * Renders possibly incomplete (streaming) markdown into sanitized DOM nodes,\n * with math and highlighted code. `decorateCodeBlock` is called for each code\n * block so the caller can add its own UI around it.\n * Without a working sanitizer (for example during server rendering), returns\n * the markdown source as a string to show as text; the browser renders it\n * when it hydrates.\n */\nexport function renderMarkdown(\n content: string,\n decorateCodeBlock: (code: HTMLElement, language: string) => void,\n): DocumentFragment | string {\n const source = completePartialMarkdown(content);\n const fragment = sanitizeHtml(marked.parse(source) as string);\n if (!fragment) {\n return source;\n }\n for (const code of Array.from(\n fragment.querySelectorAll<HTMLElement>(\"pre > code\"),\n )) {\n decorateCodeBlock(code, highlightCode(code));\n }\n return fragment;\n}\n","import {\n ApplicationRef,\n Component,\n ComponentRef,\n DestroyRef,\n ElementRef,\n EnvironmentInjector,\n Injector,\n ViewEncapsulation,\n createComponent,\n inject,\n input,\n inputBinding,\n viewChild,\n} from \"@angular/core\";\n\nimport { injectChatLabels } from \"../../chat-config\";\nimport { explicitEffect } from \"../../explicit-effect\";\nimport { CopilotChatCodeBlockHeader } from \"./copilot-chat-code-block-header\";\nimport { renderMarkdown } from \"./markdown\";\n\n@Component({\n selector: \"copilot-chat-assistant-message-renderer\",\n encapsulation: ViewEncapsulation.None,\n template: `\n <div #markdownContainer [class]=\"inputClass()\"></div>\n `,\n styles: [\n `\n copilot-chat-assistant-message-renderer {\n display: block;\n width: 100%;\n }\n\n /* Inline code styling */\n copilot-chat-assistant-message-renderer code:not(pre code) {\n padding: 2.5px 4.8px;\n background-color: rgb(236, 236, 236);\n border-radius: 0.25rem;\n font-size: 0.875rem;\n font-family:\n ui-monospace, SFMono-Regular, \"SF Mono\", Consolas, \"Liberation Mono\", Menlo,\n monospace;\n font-weight: 500;\n color: #000000;\n }\n\n .dark copilot-chat-assistant-message-renderer code:not(pre code) {\n background-color: #171717; /* same as code blocks */\n color: rgb(248, 250, 252); /* text-foreground in dark mode */\n }\n\n /* Code block container */\n copilot-chat-assistant-message-renderer .code-block-container {\n position: relative;\n margin: 0.25rem 0;\n background-color: rgb(249, 249, 249);\n border-radius: 1rem;\n }\n\n .dark copilot-chat-assistant-message-renderer .code-block-container {\n background-color: #171717;\n }\n\n copilot-chat-assistant-message-renderer .code-block-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 0.75rem 1rem 0.75rem 1rem;\n font-size: 0.75rem;\n background-color: transparent;\n }\n\n copilot-chat-assistant-message-renderer .code-block-language {\n font-weight: 400;\n color: rgba(115, 115, 115, 1);\n }\n\n .dark copilot-chat-assistant-message-renderer .code-block-language {\n color: white;\n }\n\n copilot-chat-assistant-message-renderer .code-block-copy-button {\n display: flex;\n align-items: center;\n gap: 0.125rem;\n padding: 0 0.5rem;\n font-size: 0.75rem;\n color: rgba(115, 115, 115, 1);\n cursor: pointer;\n background: none;\n border: none;\n transition: opacity 0.2s;\n }\n\n .dark copilot-chat-assistant-message-renderer .code-block-copy-button {\n color: white;\n }\n\n copilot-chat-assistant-message-renderer .code-block-copy-button:hover {\n opacity: 0.8;\n }\n\n copilot-chat-assistant-message-renderer .code-block-copy-button svg {\n width: 10px;\n height: 10px;\n }\n\n copilot-chat-assistant-message-renderer .code-block-copy-button span {\n font-size: 11px;\n }\n\n copilot-chat-assistant-message-renderer pre {\n margin: 0;\n padding: 0 1rem 1rem 1rem;\n overflow-x: auto;\n background-color: transparent;\n border-radius: 1rem;\n }\n\n .dark copilot-chat-assistant-message-renderer pre {\n background-color: transparent;\n }\n\n copilot-chat-assistant-message-renderer pre code {\n background-color: transparent;\n padding: 0;\n font-size: 0.875rem;\n font-family:\n ui-monospace, SFMono-Regular, \"SF Mono\", Consolas, \"Liberation Mono\", Menlo,\n monospace;\n }\n\n /* Highlight.js theme adjustments */\n copilot-chat-assistant-message-renderer .hljs {\n background: transparent;\n color: rgb(56, 58, 66);\n }\n\n .dark copilot-chat-assistant-message-renderer .hljs {\n background: transparent;\n color: #abb2bf;\n }\n\n /* Math equations */\n copilot-chat-assistant-message-renderer .katex-display {\n overflow-x: auto;\n overflow-y: hidden;\n padding: 1rem 0;\n }\n `,\n ],\n})\nexport class CopilotChatAssistantMessageRenderer {\n readonly content = input<string>(\"\");\n readonly inputClass = input<string | undefined>();\n readonly labels = injectChatLabels();\n\n private readonly markdownContainer =\n viewChild<ElementRef<HTMLDivElement>>(\"markdownContainer\");\n private readonly appRef = inject(ApplicationRef);\n private readonly environmentInjector = inject(EnvironmentInjector);\n private readonly injector = inject(Injector);\n private codeBlockHeaders: ComponentRef<CopilotChatCodeBlockHeader>[] = [];\n\n constructor() {\n explicitEffect(\n () => ({\n container: this.markdownContainer()?.nativeElement,\n content: this.content(),\n }),\n ({ container, content }) => {\n if (!container) return;\n this.destroyCodeBlockHeaders();\n const rendered = renderMarkdown(content, (code, language) =>\n this.addCodeBlockHeader(code, language),\n );\n // The server DOM has no replaceChildren(); it only gets the text.\n if (typeof rendered === \"string\") {\n container.textContent = rendered;\n } else {\n container.replaceChildren(rendered);\n }\n },\n );\n\n inject(DestroyRef).onDestroy(() => this.destroyCodeBlockHeaders());\n }\n\n /** Wraps a rendered code block and mounts its header component above it. */\n private addCodeBlockHeader(code: HTMLElement, language: string): void {\n const pre = code.parentElement!;\n const container = pre.ownerDocument.createElement(\"div\");\n container.className = \"code-block-container\";\n pre.replaceWith(container);\n\n const source = code.textContent ?? \"\";\n const header = createComponent(CopilotChatCodeBlockHeader, {\n environmentInjector: this.environmentInjector,\n elementInjector: this.injector,\n bindings: [\n inputBinding(\"language\", () => language),\n inputBinding(\"code\", () => source),\n ],\n });\n this.appRef.attachView(header.hostView);\n header.changeDetectorRef.detectChanges();\n this.codeBlockHeaders.push(header);\n\n container.append(header.location.nativeElement, pre);\n }\n\n private destroyCodeBlockHeaders(): void {\n this.codeBlockHeaders.forEach((header) => header.destroy());\n this.codeBlockHeaders = [];\n }\n}\n","import {\n Component,\n input,\n output,\n signal,\n computed,\n ChangeDetectionStrategy,\n ViewEncapsulation,\n} from \"@angular/core\";\n\nimport {\n CopilotIcon,\n Copy,\n Check,\n ThumbsUp,\n ThumbsDown,\n Volume2,\n RefreshCw,\n} from \"../icons/copilot-icon\";\nimport { CopilotTooltip } from \"../../directives/tooltip\";\nimport { cn } from \"../../utils\";\nimport { injectChatLabels } from \"../../chat-config\";\nimport { copyToClipboard } from \"@copilotkit/shared\";\n\n// Base toolbar button component\n@Component({\n selector: \"button[copilotChatAssistantMessageToolbarButton]\",\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `\n <ng-content></ng-content>\n `,\n host: {\n \"[class]\": \"computedClass()\",\n \"[attr.disabled]\": \"disabled() ? true : null\",\n type: \"button\",\n \"[attr.aria-label]\": \"title()\",\n },\n hostDirectives: [\n {\n directive: CopilotTooltip,\n inputs: [\"copilotTooltip: title\", \"tooltipPosition\", \"tooltipDelay\"],\n },\n ],\n})\nexport class CopilotChatAssistantMessageToolbarButton {\n title = input<string>(\"\");\n disabled = input<boolean>(false);\n inputClass = input<string | undefined>();\n\n computedClass = computed(() => {\n return cn(\n // Flex centering with gap (from React button base styles)\n \"cpk:inline-flex cpk:items-center cpk:justify-center cpk:gap-2\",\n // Cursor\n \"cpk:cursor-pointer\",\n // Background and text\n \"cpk:p-0 cpk:text-[rgb(93,93,93)] cpk:hover:bg-[#E8E8E8]\",\n // Dark mode\n \"cpk:dark:text-[rgb(243,243,243)] cpk:dark:hover:bg-[#303030]\",\n // Shape and sizing\n \"cpk:h-8 cpk:w-8 cpk:rounded-md\",\n // Interactions\n \"cpk:transition-colors\",\n // Hover states\n \"cpk:hover:text-[rgb(93,93,93)]\",\n \"cpk:dark:hover:text-[rgb(243,243,243)]\",\n // Focus states\n \"cpk:focus:outline-none cpk:focus:ring-2 cpk:focus:ring-offset-2\",\n // Disabled state\n \"cpk:disabled:opacity-50 cpk:disabled:cursor-not-allowed\",\n // SVG styling from React Button component\n \"cpk:[&_svg]:pointer-events-none cpk:[&_svg]:shrink-0\",\n // Ensure proper sizing\n \"cpk:shrink-0\",\n this.inputClass(),\n );\n });\n}\n\n// Copy button component\n@Component({\n selector: \"copilot-chat-assistant-message-copy-button\",\n imports: [CopilotIcon, CopilotChatAssistantMessageToolbarButton],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `\n <button\n copilotChatAssistantMessageToolbarButton\n [title]=\"title() || labels.assistantMessageToolbarCopyMessageLabel\"\n [disabled]=\"disabled()\"\n [inputClass]=\"inputClass()\"\n (click)=\"handleCopy($event)\"\n >\n @if (copied()) {\n <copilot-icon [img]=\"CheckIcon\" [size]=\"18\"></copilot-icon>\n } @else {\n <copilot-icon [img]=\"CopyIcon\" [size]=\"18\"></copilot-icon>\n }\n </button>\n `,\n})\nexport class CopilotChatAssistantMessageCopyButton {\n readonly title = input<string | undefined>();\n readonly disabled = input<boolean>(false);\n readonly inputClass = input<string | undefined>();\n readonly content = input<string | undefined>();\n readonly clicked = output<void>();\n readonly CopyIcon = Copy;\n readonly CheckIcon = Check;\n readonly copied = signal(false);\n readonly labels = injectChatLabels();\n\n handleCopy(event?: Event): void {\n event?.stopPropagation();\n if (!this.content()) return;\n\n copyToClipboard(this.content()!).then((success) => {\n if (success) {\n this.copied.set(true);\n this.clicked.emit();\n setTimeout(() => this.copied.set(false), 2000);\n }\n });\n }\n}\n\n// Thumbs up button component\n@Component({\n selector: \"copilot-chat-assistant-message-thumbs-up-button\",\n imports: [CopilotIcon, CopilotChatAssistantMessageToolbarButton],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `\n <button\n copilotChatAssistantMessageToolbarButton\n [title]=\"title() || labels.assistantMessageToolbarThumbsUpLabel\"\n [disabled]=\"disabled()\"\n [inputClass]=\"inputClass()\"\n (click)=\"handleClick($event)\"\n >\n <copilot-icon [img]=\"ThumbsUpIcon\" [size]=\"18\"></copilot-icon>\n </button>\n `,\n})\nexport class CopilotChatAssistantMessageThumbsUpButton {\n readonly title = input<string | undefined>();\n readonly disabled = input<boolean>(false);\n readonly inputClass = input<string | undefined>();\n readonly clicked = output<void>();\n readonly ThumbsUpIcon = ThumbsUp;\n readonly labels = injectChatLabels();\n\n handleClick(event?: Event): void {\n event?.stopPropagation();\n if (!this.disabled()) {\n this.clicked.emit();\n }\n }\n}\n\n// Thumbs down button component\n@Component({\n selector: \"copilot-chat-assistant-message-thumbs-down-button\",\n imports: [CopilotIcon, CopilotChatAssistantMessageToolbarButton],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `\n <button\n copilotChatAssistantMessageToolbarButton\n [title]=\"title() || labels.assistantMessageToolbarThumbsDownLabel\"\n [disabled]=\"disabled()\"\n [inputClass]=\"inputClass()\"\n (click)=\"handleClick($event)\"\n >\n <copilot-icon [img]=\"ThumbsDownIcon\" [size]=\"18\"></copilot-icon>\n </button>\n `,\n})\nexport class CopilotChatAssistantMessageThumbsDownButton {\n readonly title = input<string | undefined>();\n readonly disabled = input<boolean>(false);\n readonly inputClass = input<string | undefined>();\n readonly clicked = output<void>();\n readonly ThumbsDownIcon = ThumbsDown;\n readonly labels = injectChatLabels();\n\n handleClick(event?: Event): void {\n event?.stopPropagation();\n if (!this.disabled()) {\n this.clicked.emit();\n }\n }\n}\n\n// Read aloud button component\n@Component({\n selector: \"copilot-chat-assistant-message-read-aloud-button\",\n imports: [CopilotIcon, CopilotChatAssistantMessageToolbarButton],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `\n <button\n copilotChatAssistantMessageToolbarButton\n [title]=\"title() || labels.assistantMessageToolbarReadAloudLabel\"\n [disabled]=\"disabled()\"\n [inputClass]=\"inputClass()\"\n (click)=\"handleClick($event)\"\n >\n <copilot-icon [img]=\"Volume2Icon\" [size]=\"20\"></copilot-icon>\n </button>\n `,\n})\nexport class CopilotChatAssistantMessageReadAloudButton {\n readonly title = input<string | undefined>();\n readonly disabled = input<boolean>(false);\n readonly inputClass = input<string | undefined>();\n readonly clicked = output<void>();\n readonly Volume2Icon = Volume2;\n readonly labels = injectChatLabels();\n\n handleClick(event?: Event): void {\n event?.stopPropagation();\n if (!this.disabled()) {\n this.clicked.emit();\n }\n }\n}\n\n// Regenerate button component\n@Component({\n selector: \"copilot-chat-assistant-message-regenerate-button\",\n imports: [CopilotIcon, CopilotChatAssistantMessageToolbarButton],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `\n <button\n copilotChatAssistantMessageToolbarButton\n [title]=\"title() || labels.assistantMessageToolbarRegenerateLabel\"\n [disabled]=\"disabled()\"\n [inputClass]=\"inputClass()\"\n (click)=\"handleClick($event)\"\n >\n <copilot-icon [img]=\"RefreshCwIcon\" [size]=\"18\"></copilot-icon>\n </button>\n `,\n})\nexport class CopilotChatAssistantMessageRegenerateButton {\n readonly title = input<string | undefined>();\n readonly disabled = input<boolean>(false);\n readonly inputClass = input<string | undefined>();\n readonly clicked = output<void>();\n readonly RefreshCwIcon = RefreshCw;\n readonly labels = injectChatLabels();\n\n handleClick(event?: Event): void {\n event?.stopPropagation();\n if (!this.disabled()) {\n this.clicked.emit();\n }\n }\n}\n","import { Directive, input, computed } from \"@angular/core\";\nimport { cn } from \"../../utils\";\n\n@Directive({\n selector: \"[copilotChatAssistantMessageToolbar]\",\n host: {\n \"[class]\": \"computedClass()\",\n },\n})\nexport class CopilotChatAssistantMessageToolbar {\n readonly inputClass = input<string | undefined>();\n\n readonly computedClass = computed(() => {\n return cn(\n \"cpk:w-full cpk:bg-transparent cpk:flex cpk:items-center cpk:-ml-[5px] cpk:-mt-[0px]\",\n this.inputClass(),\n );\n });\n}\n","import { Injectable, signal } from \"@angular/core\";\n\n@Injectable({ providedIn: \"root\" })\nexport class CopilotChatViewHandlers {\n // Assistant message handler availability\n hasAssistantThumbsUpHandler = signal(false);\n hasAssistantThumbsDownHandler = signal(false);\n hasAssistantReadAloudHandler = signal(false);\n hasAssistantRegenerateHandler = signal(false);\n\n // User message handler availability\n hasUserCopyHandler = signal(false);\n hasUserEditHandler = signal(false);\n}\n","import {\n Component,\n TemplateRef,\n ContentChild,\n signal,\n computed,\n Type,\n ChangeDetectionStrategy,\n ViewEncapsulation,\n Optional,\n Inject,\n input,\n output,\n} from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\nimport { CopilotSlot } from \"../../slots/copilot-slot\";\nimport { CopilotChatToolCallsView } from \"./copilot-chat-tool-calls-view\";\nimport type { Message } from \"@ag-ui/core\";\nimport {\n type AssistantMessage,\n type CopilotChatAssistantMessageOnThumbsUpProps,\n type CopilotChatAssistantMessageOnThumbsDownProps,\n type CopilotChatAssistantMessageOnReadAloudProps,\n type CopilotChatAssistantMessageOnRegenerateProps,\n type AssistantMessageMarkdownRendererContext,\n type AssistantMessageCopyButtonContext,\n type ThumbsUpButtonContext,\n type ThumbsDownButtonContext,\n type ReadAloudButtonContext,\n type RegenerateButtonContext,\n type AssistantMessageToolbarContext,\n} from \"./copilot-chat-assistant-message.types\";\nimport { CopilotChatAssistantMessageRenderer } from \"./copilot-chat-assistant-message-renderer\";\nimport {\n CopilotChatAssistantMessageCopyButton,\n CopilotChatAssistantMessageThumbsUpButton,\n CopilotChatAssistantMessageThumbsDownButton,\n} from \"./copilot-chat-assistant-message-buttons\";\nimport { CopilotChatAssistantMessageToolbar } from \"./copilot-chat-assistant-message-toolbar\";\nimport { cn } from \"../../utils\";\nimport { CopilotChatViewHandlers } from \"./copilot-chat-view-handlers\";\n\n@Component({\n selector: \"copilot-chat-assistant-message\",\n host: { \"data-copilotkit\": \"\", class: \"cpk:block cpk:w-full\" },\n imports: [\n CommonModule,\n CopilotSlot,\n CopilotChatAssistantMessageRenderer,\n CopilotChatAssistantMessageCopyButton,\n CopilotChatAssistantMessageToolbar,\n CopilotChatToolCallsView,\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `\n <div\n [class]=\"computedClass()\"\n [attr.data-message-id]=\"message().id\"\n data-testid=\"copilot-assistant-message\"\n data-message-role=\"assistant\"\n role=\"article\"\n >\n <!-- Markdown Renderer -->\n @if (markdownRendererTemplate || markdownRendererComponent()) {\n <copilot-slot\n [slot]=\"markdownRendererTemplate || markdownRendererComponent()\"\n [context]=\"markdownRendererContext()\"\n [defaultComponent]=\"CopilotChatAssistantMessageRenderer\"\n >\n </copilot-slot>\n } @else {\n <copilot-chat-assistant-message-renderer\n [content]=\"message().content || ''\"\n [inputClass]=\"markdownRendererClass()\"\n >\n </copilot-chat-assistant-message-renderer>\n }\n\n <!-- Tool Calls View -->\n @if (toolCallsViewTemplate || toolCallsViewComponent()) {\n <copilot-slot\n [slot]=\"toolCallsViewTemplate || toolCallsViewComponent()\"\n [context]=\"toolCallsViewContext()\"\n [defaultComponent]=\"CopilotChatToolCallsView\"\n >\n </copilot-slot>\n } @else if (message().toolCalls && message()!.toolCalls!.length > 0) {\n <copilot-chat-tool-calls-view\n [message]=\"message()!\"\n [messages]=\"messages()\"\n [agentId]=\"agentId()\"\n [isLoading]=\"isLoading()\"\n >\n </copilot-chat-tool-calls-view>\n }\n\n <!-- Toolbar: show only when there is assistant text content -->\n @if (toolbarVisible() && hasMessageContent()) {\n @if (toolbarTemplate || toolbarComponent()) {\n <copilot-slot\n [slot]=\"toolbarTemplate || toolbarComponent()\"\n [context]=\"toolbarContext()\"\n [defaultComponent]=\"CopilotChatAssistantMessageToolbar\"\n >\n </copilot-slot>\n } @else {\n <div copilotChatAssistantMessageToolbar [inputClass]=\"toolbarClass()\">\n <div class=\"cpk:flex cpk:items-center cpk:gap-1\">\n <!-- Copy button -->\n @if (copyButtonTemplate || copyButtonComponent()) {\n <copilot-slot\n [slot]=\"copyButtonTemplate || copyButtonComponent()\"\n [context]=\"{ content: message().content || '' }\"\n [defaultComponent]=\"CopilotChatAssistantMessageCopyButton\"\n [outputs]=\"copyButtonOutputs\"\n >\n </copilot-slot>\n } @else {\n <copilot-chat-assistant-message-copy-button\n [content]=\"message().content\"\n [inputClass]=\"copyButtonClass()\"\n (clicked)=\"handleCopy()\"\n >\n </copilot-chat-assistant-message-copy-button>\n }\n\n <!-- Thumbs up button - show if custom slot provided OR if handler available at top level -->\n @if (\n thumbsUpButtonComponent() ||\n thumbsUpButtonTemplate ||\n handlers.hasAssistantThumbsUpHandler()\n ) {\n <copilot-slot\n [slot]=\"thumbsUpButtonTemplate || thumbsUpButtonComponent()\"\n [context]=\"{}\"\n [defaultComponent]=\"defaultThumbsUpButtonComponent\"\n [outputs]=\"thumbsUpButtonOutputs\"\n >\n </copilot-slot>\n }\n\n <!-- Thumbs down button - show if custom slot provided OR if handler available at top level -->\n @if (\n thumbsDownButtonComponent() ||\n thumbsDownButtonTemplate ||\n handlers.hasAssistantThumbsDownHandler()\n ) {\n <copilot-slot\n [slot]=\"thumbsDownButtonTemplate || thumbsDownButtonComponent()\"\n [context]=\"{}\"\n [defaultComponent]=\"defaultThumbsDownButtonComponent\"\n [outputs]=\"thumbsDownButtonOutputs\"\n >\n </copilot-slot>\n }\n\n <!-- Read aloud button - only show if custom slot provided -->\n @if (readAloudButtonComponent() || readAloudButtonTemplate) {\n <copilot-slot\n [slot]=\"readAloudButtonTemplate || readAloudButtonComponent()\"\n [context]=\"{}\"\n [outputs]=\"readAloudButtonOutputs\"\n >\n </copilot-slot>\n }\n\n <!-- Regenerate button - only show if custom slot provided -->\n @if (regenerateButtonComponent() || regenerateButtonTemplate) {\n <copilot-slot\n [slot]=\"regenerateButtonTemplate || regenerateButtonComponent()\"\n [context]=\"{}\"\n [outputs]=\"regenerateButtonOutputs\"\n >\n </copilot-slot>\n }\n\n <!-- Additional toolbar items -->\n @if (additionalToolbarItems()) {\n <ng-container\n [ngTemplateOutlet]=\"additionalToolbarItems() || null\"\n ></ng-container>\n }\n </div>\n </div>\n }\n }\n </div>\n `,\n styles: [\n `\n /* Import KaTeX styles */\n @import \"katex/dist/katex.min.css\";\n\n /* Atom One Light theme for highlight.js */\n .hljs {\n color: rgb(56, 58, 66);\n background: transparent;\n }\n\n .hljs-comment,\n .hljs-quote {\n color: #a0a1a7;\n font-style: italic;\n }\n\n .hljs-doctag,\n .hljs-formula,\n .hljs-keyword {\n color: #a626a4;\n }\n\n .hljs-deletion,\n .hljs-name,\n .hljs-section,\n .hljs-selector-tag,\n .hljs-subst {\n color: #e45649;\n }\n\n .hljs-literal {\n color: #0184bb;\n }\n\n .hljs-addition,\n .hljs-attribute,\n .hljs-meta .hljs-string,\n .hljs-regexp,\n .hljs-string {\n color: #50a14f;\n }\n\n .hljs-attr,\n .hljs-number,\n .hljs-selector-attr,\n .hljs-selector-class,\n .hljs-selector-pseudo,\n .hljs-template-variable,\n .hljs-type,\n .hljs-variable {\n color: #986801;\n }\n\n .hljs-params {\n color: rgb(56, 58, 66);\n }\n\n .hljs-bullet,\n .hljs-link,\n .hljs-meta,\n .hljs-selector-id,\n .hljs-symbol,\n .hljs-title {\n color: #4078f2;\n }\n\n .hljs-built_in,\n .hljs-class .hljs-title,\n .hljs-title.class_ {\n color: #c18401;\n }\n\n .hljs-emphasis {\n font-style: italic;\n }\n\n .hljs-strong {\n font-weight: 700;\n }\n\n .hljs-link {\n text-decoration: underline;\n }\n\n /* Atom One Dark theme for highlight.js */\n .dark .hljs {\n color: #abb2bf;\n background: transparent;\n }\n\n .dark .hljs-comment,\n .dark .hljs-quote {\n color: #5c6370;\n font-style: italic;\n }\n\n .dark .hljs-doctag,\n .dark .hljs-formula,\n .dark .hljs-keyword {\n color: #c678dd;\n }\n\n .dark .hljs-deletion,\n .dark .hljs-name,\n .dark .hljs-section,\n .dark .hljs-selector-tag,\n .dark .hljs-subst {\n color: #e06c75;\n }\n\n .dark .hljs-literal {\n color: #56b6c2;\n }\n\n .dark .hljs-addition,\n .dark .hljs-attribute,\n .dark .hljs-meta .hljs-string,\n .dark .hljs-regexp,\n .dark .hljs-string {\n color: #98c379;\n }\n\n .dark .hljs-attr,\n .dark .hljs-number,\n .dark .hljs-selector-attr,\n .dark .hljs-selector-class,\n .dark .hljs-selector-pseudo,\n .dark .hljs-template-variable,\n .dark .hljs-type,\n .dark .hljs-variable {\n color: #d19a66;\n }\n\n .dark .hljs-bullet,\n .dark .hljs-link,\n .dark .hljs-meta,\n .dark .hljs-selector-id,\n .dark .hljs-symbol,\n .dark .hljs-title {\n color: #61aeee;\n }\n\n .dark .hljs-built_in,\n .dark .hljs-class .hljs-title,\n .dark .hljs-title.class_ {\n color: #e6c07b;\n }\n\n .dark .hljs-params {\n color: #abb2bf; /* same as regular text */\n }\n\n .dark .hljs-emphasis {\n font-style: italic;\n }\n\n .dark .hljs-strong {\n font-weight: 700;\n }\n\n .dark .hljs-link {\n text-decoration: underline;\n }\n `,\n ],\n})\nexport class CopilotChatAssistantMessage {\n // Capture templates from content projection\n @ContentChild(\"markdownRenderer\", { read: TemplateRef })\n markdownRendererTemplate?: TemplateRef<AssistantMessageMarkdownRendererContext>;\n @ContentChild(\"toolbar\", { read: TemplateRef })\n toolbarTemplate?: TemplateRef<AssistantMessageToolbarContext>;\n @ContentChild(\"copyButton\", { read: TemplateRef })\n copyButtonTemplate?: TemplateRef<AssistantMessageCopyButtonContext>;\n @ContentChild(\"thumbsUpButton\", { read: TemplateRef })\n thumbsUpButtonTemplate?: TemplateRef<ThumbsUpButtonContext>;\n @ContentChild(\"thumbsDownButton\", { read: TemplateRef })\n thumbsDownButtonTemplate?: TemplateRef<ThumbsDownButtonContext>;\n @ContentChild(\"readAloudButton\", { read: TemplateRef })\n readAloudButtonTemplate?: TemplateRef<ReadAloudButtonContext>;\n @ContentChild(\"regenerateButton\", { read: TemplateRef })\n regenerateButtonTemplate?: TemplateRef<RegenerateButtonContext>;\n @ContentChild(\"toolCallsView\", { read: TemplateRef })\n toolCallsViewTemplate?: TemplateRef<any>;\n\n // Class inputs for styling default components\n readonly markdownRendererClass = input<string | undefined>(undefined);\n readonly toolbarClass = input<string | undefined>(undefined);\n readonly copyButtonClass = input<string | undefined>(undefined);\n readonly thumbsUpButtonClass = input<string | undefined>(undefined);\n readonly thumbsDownButtonClass = input<string | undefined>(undefined);\n readonly readAloudButtonClass = input<string | undefined>(undefined);\n readonly regenerateButtonClass = input<string | undefined>(undefined);\n readonly toolCallsViewClass = input<string | undefined>(undefined);\n\n // Component inputs for overrides\n readonly markdownRendererComponent = input<Type<any> | undefined>(undefined);\n readonly toolbarComponent = input<Type<any> | undefined>(undefined);\n readonly copyButtonComponent = input<Type<any> | undefined>(undefined);\n readonly thumbsUpButtonComponent = input<Type<any> | undefined>(undefined);\n readonly thumbsDownButtonComponent = input<Type<any> | undefined>(undefined);\n readonly readAloudButtonComponent = input<Type<any> | undefined>(undefined);\n readonly regenerateButtonComponent = input<Type<any> | undefined>(undefined);\n readonly toolCallsViewComponent = input<Type<any> | undefined>(undefined);\n\n // Regular inputs\n readonly message = input.required<AssistantMessage>();\n readonly messages = input<Message[]>([]);\n readonly agentId = input<string | undefined>();\n readonly isLoading = input<boolean>(false);\n readonly additionalToolbarItems = input<TemplateRef<any> | undefined>(\n undefined,\n );\n readonly toolbarVisible = input<boolean>(true);\n readonly inputClass = input<string | undefined>(undefined);\n\n // DI service exposes handler availability scoped to CopilotChatView\n // Make it optional with a default fallback for testing\n handlers: CopilotChatViewHandlers;\n\n constructor(\n @Optional()\n @Inject(CopilotChatViewHandlers)\n handlers?: CopilotChatViewHandlers | null,\n ) {\n this.handlers = handlers || new CopilotChatViewHandlers();\n }\n\n // Output events\n thumbsUp = output<CopilotChatAssistantMessageOnThumbsUpProps>();\n thumbsDown = output<CopilotChatAssistantMessageOnThumbsDownProps>();\n readAloud = output<CopilotChatAssistantMessageOnReadAloudProps>();\n regenerate = output<CopilotChatAssistantMessageOnRegenerateProps>();\n\n // Signals\n customClass = signal<string | undefined>(undefined);\n\n // Computed values\n computedClass = computed(() => {\n return cn(\n \"copilotKitMessage copilotKitAssistantMessage cpk:prose cpk:max-w-full cpk:break-words cpk:dark:prose-invert\",\n this.customClass(),\n );\n });\n\n // Default components\n protected readonly defaultThumbsUpButtonComponent =\n CopilotChatAssistantMessageThumbsUpButton;\n protected readonly defaultThumbsDownButtonComponent =\n CopilotChatAssistantMessageThumbsDownButton;\n protected readonly CopilotChatAssistantMessageRenderer =\n CopilotChatAssistantMessageRenderer;\n protected readonly CopilotChatAssistantMessageToolbar =\n CopilotChatAssistantMessageToolbar;\n protected readonly CopilotChatAssistantMessageCopyButton =\n CopilotChatAssistantMessageCopyButton;\n protected readonly CopilotChatToolCallsView = CopilotChatToolCallsView;\n\n // Context for slots (reactive via signals)\n markdownRendererContext = computed<AssistantMessageMarkdownRendererContext>(\n () => ({\n content: this.message()?.content || \"\",\n }),\n );\n\n // Output maps for slots\n copyButtonOutputs = { clicked: () => this.handleCopy() };\n thumbsUpButtonOutputs = { clicked: () => this.handleThumbsUp() };\n thumbsDownButtonOutputs = { clicked: () => this.handleThumbsDown() };\n readAloudButtonOutputs = { clicked: () => this.handleReadAloud() };\n regenerateButtonOutputs = { clicked: () => this.handleRegenerate() };\n\n toolbarContext = computed<AssistantMessageToolbarContext>(() => ({\n children: null, // Will be populated by the toolbar content\n }));\n\n // Return true if assistant message has non-empty text content\n hasMessageContent(): boolean {\n return (this.message()?.content ?? \"\").trim().length > 0;\n }\n\n toolCallsViewContext = computed(() => ({\n message: this.message(),\n messages: this.messages(),\n isLoading: this.isLoading(),\n }));\n\n handleCopy(): void {\n // Copy is handled by the button component itself\n // This is just for any additional logic if needed\n }\n\n handleThumbsUp(): void {\n this.thumbsUp.emit({ message: this.message() });\n }\n\n handleThumbsDown(): void {\n this.thumbsDown.emit({ message: this.message() });\n }\n\n handleReadAloud(): void {\n this.readAloud.emit({ message: this.message() });\n }\n\n handleRegenerate(): void {\n this.regenerate.emit({ message: this.message() });\n }\n}\n","import {\n Component,\n input,\n ChangeDetectionStrategy,\n ViewEncapsulation,\n computed,\n} from \"@angular/core\";\n\nimport { cn } from \"../../utils\";\n\n@Component({\n selector: \"copilot-chat-user-message-renderer\",\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n \"[class]\": \"computedClass()\",\n },\n template: `\n {{ content() }}\n `,\n})\nexport class CopilotChatUserMessageRenderer {\n readonly content = input<string>(\"\");\n readonly inputClass = input<string | undefined>();\n\n readonly computedClass = computed(() => {\n return cn(\n \"cpk:prose cpk:dark:prose-invert cpk:bg-muted cpk:relative cpk:max-w-[80%] cpk:rounded-[18px] cpk:px-4 cpk:py-1.5 cpk:data-[multiline]:py-3 cpk:inline-block cpk:whitespace-pre-wrap\",\n this.inputClass(),\n );\n });\n}\n","import {\n Component,\n input,\n output,\n signal,\n computed,\n ChangeDetectionStrategy,\n ViewEncapsulation,\n} from \"@angular/core\";\n\nimport { Check, CopilotIcon, Copy, Edit } from \"../icons/copilot-icon\";\nimport { CopilotTooltip } from \"../../directives/tooltip\";\nimport { cn } from \"../../utils\";\nimport { injectChatLabels } from \"../../chat-config\";\nimport { copyToClipboard } from \"@copilotkit/shared\";\n\n// Base toolbar button component\n@Component({\n selector: \"button[copilotChatUserMessageToolbarButton]\",\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `\n <ng-content></ng-content>\n `,\n host: {\n \"[class]\": \"computedClass()\",\n \"[attr.disabled]\": \"disabled() ? true : null\",\n type: \"button\",\n \"[attr.aria-label]\": \"title()\",\n },\n hostDirectives: [\n {\n directive: CopilotTooltip,\n inputs: [\"copilotTooltip: title\", \"tooltipPosition\", \"tooltipDelay\"],\n },\n ],\n})\nexport class CopilotChatUserMessageToolbarButton {\n title = input<string>(\"\");\n disabled = input<boolean>(false);\n inputClass = input<string | undefined>();\n\n computedClass = computed(() => {\n return cn(\n // Flex centering\n \"cpk:inline-flex cpk:items-center cpk:justify-center\",\n // Cursor\n \"cpk:cursor-pointer\",\n // Background and text\n \"cpk:p-0 cpk:text-[rgb(93,93,93)] cpk:hover:bg-[#E8E8E8]\",\n // Dark mode\n \"cpk:dark:text-[rgb(243,243,243)] cpk:dark:hover:bg-[#303030]\",\n // Shape and sizing\n \"cpk:h-8 cpk:w-8 cpk:rounded-md\",\n // Interactions\n \"cpk:transition-colors\",\n // Hover states\n \"cpk:hover:text-[rgb(93,93,93)]\",\n \"cpk:dark:hover:text-[rgb(243,243,243)]\",\n // Focus states\n \"cpk:focus:outline-none cpk:focus:ring-2 cpk:focus:ring-offset-2\",\n // Disabled state\n \"cpk:disabled:opacity-50 cpk:disabled:cursor-not-allowed\",\n this.inputClass(),\n );\n });\n}\n\n// Copy button component\n@Component({\n selector: \"copilot-chat-user-message-copy-button\",\n imports: [CopilotIcon, CopilotChatUserMessageToolbarButton],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `\n <button\n copilotChatUserMessageToolbarButton\n [title]=\"title() || labels.userMessageToolbarCopyMessageLabel\"\n [disabled]=\"disabled()\"\n [inputClass]=\"inputClass()\"\n (click)=\"handleCopy()\"\n >\n @if (copied()) {\n <copilot-icon [img]=\"CheckIcon\" [size]=\"18\"></copilot-icon>\n } @else {\n <copilot-icon [img]=\"CopyIcon\" [size]=\"18\"></copilot-icon>\n }\n </button>\n `,\n})\nexport class CopilotChatUserMessageCopyButton {\n readonly title = input<string | undefined>();\n readonly disabled = input<boolean>(false);\n readonly inputClass = input<string | undefined>();\n readonly content = input<string | undefined>();\n readonly clicked = output<void>();\n readonly CopyIcon = Copy;\n readonly CheckIcon = Check;\n readonly copied = signal(false);\n readonly labels = injectChatLabels();\n\n handleCopy(): void {\n if (!this.content()) return;\n\n copyToClipboard(this.content()!).then((success) => {\n if (success) {\n this.copied.set(true);\n this.clicked.emit();\n setTimeout(() => this.copied.set(false), 2000);\n }\n });\n }\n}\n\n// Edit button component\n@Component({\n selector: \"copilot-chat-user-message-edit-button\",\n imports: [CopilotIcon, CopilotChatUserMessageToolbarButton],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `\n <button\n copilotChatUserMessageToolbarButton\n [title]=\"title() || labels.userMessageToolbarEditMessageLabel\"\n [disabled]=\"disabled()\"\n [inputClass]=\"inputClass()\"\n (click)=\"handleEdit()\"\n >\n <copilot-icon [img]=\"EditIcon\" [size]=\"18\"></copilot-icon>\n </button>\n `,\n})\nexport class CopilotChatUserMessageEditButton {\n title = input<string | undefined>();\n disabled = input<boolean>(false);\n inputClass = input<string | undefined>();\n clicked = output<void>();\n\n readonly EditIcon = Edit;\n readonly labels = injectChatLabels();\n\n handleEdit(): void {\n if (!this.disabled()) {\n this.clicked.emit();\n }\n }\n}\n","import {\n Component,\n input,\n computed,\n ChangeDetectionStrategy,\n ViewEncapsulation,\n} from \"@angular/core\";\n\nimport { cn } from \"../../utils\";\n\n@Component({\n selector: \"div[copilotChatUserMessageToolbar]\",\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `\n <ng-content></ng-content>\n `,\n host: {\n \"[class]\": \"computedClass()\",\n },\n})\nexport class CopilotChatUserMessageToolbar {\n readonly inputClass = input<string | undefined>();\n\n readonly computedClass = computed(() =>\n cn(\n \"cpk:w-full cpk:bg-transparent cpk:flex cpk:items-center cpk:justify-end cpk:mt-[4px] cpk:invisible cpk:group-hover:visible\",\n this.inputClass(),\n ),\n );\n}\n","import {\n Component,\n input,\n output,\n ChangeDetectionStrategy,\n ViewEncapsulation,\n computed,\n} from \"@angular/core\";\n\nimport { ChevronLeft, ChevronRight, CopilotIcon } from \"../icons/copilot-icon\";\nimport { type CopilotChatUserMessageOnSwitchToBranchProps } from \"./copilot-chat-user-message.types\";\nimport { cn } from \"../../utils\";\nimport { UserMessage } from \"@ag-ui/core\";\n\n@Component({\n selector: \"copilot-chat-user-message-branch-navigation\",\n imports: [CopilotIcon],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `\n @if (showNavigation()) {\n <div [class]=\"computedClass()\">\n <button\n type=\"button\"\n aria-label=\"Previous message branch\"\n [class]=\"buttonClass\"\n [disabled]=\"!canGoPrev()\"\n (click)=\"handlePrevious()\"\n >\n <copilot-icon [img]=\"ChevronLeftIcon\" [size]=\"20\"></copilot-icon>\n </button>\n <span\n class=\"cpk:text-sm cpk:text-muted-foreground cpk:px-0 cpk:font-medium\"\n >\n {{ currentBranch() + 1 }}/{{ numberOfBranches() }}\n </span>\n <button\n type=\"button\"\n aria-label=\"Next message branch\"\n [class]=\"buttonClass\"\n [disabled]=\"!canGoNext()\"\n (click)=\"handleNext()\"\n >\n <copilot-icon [img]=\"ChevronRightIcon\" [size]=\"20\"></copilot-icon>\n </button>\n </div>\n }\n `,\n})\nexport class CopilotChatUserMessageBranchNavigation {\n currentBranch = input<number>(0);\n numberOfBranches = input<number>(1);\n message = input<UserMessage>();\n inputClass = input<string | undefined>();\n switchToBranch = output<CopilotChatUserMessageOnSwitchToBranchProps>();\n\n readonly ChevronLeftIcon = ChevronLeft;\n readonly ChevronRightIcon = ChevronRight;\n\n readonly buttonClass = cn(\n // Flex centering\n \"cpk:inline-flex cpk:items-center cpk:justify-center\",\n // Cursor\n \"cpk:cursor-pointer\",\n // Background and text\n \"cpk:p-0 cpk:text-[rgb(93,93,93)] cpk:hover:bg-[#E8E8E8]\",\n // Dark mode\n \"cpk:dark:text-[rgb(243,243,243)] cpk:dark:hover:bg-[#303030]\",\n // Shape and sizing\n \"cpk:h-6 cpk:w-6 cpk:rounded-md\",\n // Interactions\n \"cpk:transition-colors\",\n // Disabled state\n \"cpk:disabled:opacity-50 cpk:disabled:cursor-not-allowed\",\n );\n\n showNavigation = computed(() => this.numberOfBranches() > 1);\n\n canGoPrev = computed(() => this.currentBranch() > 0);\n\n canGoNext = computed(\n () => this.currentBranch() < this.numberOfBranches() - 1,\n );\n\n computedClass = computed(() => {\n return cn(\"cpk:flex cpk:items-center cpk:gap-1\", this.inputClass());\n });\n\n handlePrevious(): void {\n if (this.canGoPrev()) {\n const newIndex = this.currentBranch() - 1;\n this.switchToBranch.emit({\n branchIndex: newIndex,\n numberOfBranches: this.numberOfBranches(),\n message: this.message()!,\n });\n }\n }\n\n handleNext(): void {\n if (this.canGoNext()) {\n const newIndex = this.currentBranch() + 1;\n this.switchToBranch.emit({\n branchIndex: newIndex,\n numberOfBranches: this.numberOfBranches(),\n message: this.message()!,\n });\n }\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n computed,\n input,\n signal,\n ViewEncapsulation,\n} from \"@angular/core\";\nimport type {\n AttachmentModality,\n InputContentSource,\n} from \"@copilotkit/shared\";\nimport { getDocumentIcon, getSourceUrl } from \"@copilotkit/shared\";\nimport { cn } from \"../../utils\";\n\n@Component({\n selector: \"copilot-chat-attachment-renderer\",\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: { \"data-copilotkit\": \"\" },\n template: `\n @switch (type()) {\n @case (\"image\") {\n @if (imageFailed()) {\n <div [class]=\"failedImageClass()\">\n <div class=\"copilotKitImageRenderingErrorMessage\">\n Failed to load image\n </div>\n </div>\n } @else {\n <div [class]=\"imageWrapperClass()\">\n <img\n [src]=\"sourceUrl()\"\n alt=\"Image attachment\"\n class=\"copilotKitImageRenderingImage\"\n (error)=\"imageFailed.set(true)\"\n />\n </div>\n }\n }\n @case (\"audio\") {\n <div [class]=\"audioClass()\">\n <audio [src]=\"sourceUrl()\" controls preload=\"metadata\"></audio>\n @if (filename()) {\n <span class=\"copilotKitAttachmentFilename\">\n {{ filename() }}\n </span>\n }\n </div>\n }\n @case (\"video\") {\n <video\n [src]=\"sourceUrl()\"\n controls\n preload=\"metadata\"\n [class]=\"videoClass()\"\n ></video>\n }\n @default {\n <div [class]=\"documentClass()\">\n <div class=\"copilotKitAttachmentDocIcon\">{{ documentIcon() }}</div>\n <div class=\"copilotKitAttachmentDocInfo\">\n <span class=\"copilotKitAttachmentDocName\">\n {{ filename() || source().mimeType || \"Unknown type\" }}\n </span>\n </div>\n </div>\n }\n }\n `,\n})\nexport class CopilotChatAttachmentRenderer {\n readonly type = input.required<AttachmentModality>();\n readonly source = input.required<InputContentSource>();\n readonly filename = input<string | undefined>();\n readonly inputClass = input<string | undefined>();\n\n readonly imageFailed = signal(false);\n readonly sourceUrl = computed(() => getSourceUrl(this.source()));\n readonly documentIcon = computed(() =>\n getDocumentIcon(this.source().mimeType ?? \"\"),\n );\n\n readonly imageWrapperClass = computed(() =>\n cn(\"copilotKitImageRendering\", this.inputClass()),\n );\n readonly failedImageClass = computed(() =>\n cn(\n \"copilotKitImageRendering copilotKitImageRenderingError\",\n this.inputClass(),\n ),\n );\n readonly audioClass = computed(() =>\n cn(\"copilotKitAttachment copilotKitAttachmentAudio\", this.inputClass()),\n );\n readonly videoClass = computed(() =>\n cn(\"copilotKitAttachment copilotKitAttachmentVideo\", this.inputClass()),\n );\n readonly documentClass = computed(() =>\n cn(\"copilotKitAttachment copilotKitAttachmentDocument\", this.inputClass()),\n );\n}\n","import type { UserMessage } from \"@ag-ui/core\";\nimport type {\n AudioInputPart,\n DocumentInputPart,\n ImageInputPart,\n VideoInputPart,\n} from \"@copilotkit/shared\";\n\nexport type UserMessageMediaPart =\n | ImageInputPart\n | AudioInputPart\n | VideoInputPart\n | DocumentInputPart;\n\nexport function flattenUserMessageContent(\n content?: UserMessage[\"content\"],\n): string {\n if (!content) {\n return \"\";\n }\n\n if (typeof content === \"string\") {\n return content;\n }\n\n return content\n .map((part) => (part.type === \"text\" ? part.text : \"\"))\n .filter((text) => text.length > 0)\n .join(\"\\n\");\n}\n\nexport function getUserMessageMediaParts(\n content?: UserMessage[\"content\"],\n): UserMessageMediaPart[] {\n if (!content || typeof content === \"string\") {\n return [];\n }\n\n return content.filter(\n (part): part is UserMessageMediaPart =>\n part.type === \"image\" ||\n part.type === \"audio\" ||\n part.type === \"video\" ||\n part.type === \"document\",\n );\n}\n\nexport function getUserMessageMediaFilename(\n part: UserMessageMediaPart,\n): string | undefined {\n const meta = part.metadata;\n if (\n meta != null &&\n typeof meta === \"object\" &&\n \"filename\" in meta &&\n typeof meta.filename === \"string\"\n ) {\n return meta.filename;\n }\n return undefined;\n}\n","import {\n Component,\n input,\n output,\n TemplateRef,\n ContentChild,\n computed,\n Type,\n ChangeDetectionStrategy,\n ViewEncapsulation,\n} from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\nimport { CopilotSlot } from \"../../slots/copilot-slot\";\nimport {\n type CopilotChatUserMessageOnEditMessageProps,\n type CopilotChatUserMessageOnSwitchToBranchProps,\n type MessageRendererContext,\n type CopyButtonContext,\n type EditButtonContext,\n type BranchNavigationContext,\n type UserMessageToolbarContext,\n} from \"./copilot-chat-user-message.types\";\nimport { CopilotChatUserMessageRenderer } from \"./copilot-chat-user-message-renderer\";\nimport {\n CopilotChatUserMessageCopyButton,\n CopilotChatUserMessageEditButton,\n} from \"./copilot-chat-user-message-buttons\";\nimport { CopilotChatUserMessageToolbar } from \"./copilot-chat-user-message-toolbar\";\nimport { CopilotChatUserMessageBranchNavigation } from \"./copilot-chat-user-message-branch-navigation\";\nimport { cn } from \"../../utils\";\nimport { UserMessage } from \"@ag-ui/core\";\nimport { CopilotChatAttachmentRenderer } from \"./copilot-chat-attachment-renderer\";\nimport {\n flattenUserMessageContent,\n getUserMessageMediaFilename,\n getUserMessageMediaParts,\n type UserMessageMediaPart,\n} from \"./copilot-chat-user-message-utils\";\n\n@Component({\n selector: \"copilot-chat-user-message\",\n host: { \"data-copilotkit\": \"\", class: \"cpk:block cpk:w-full\" },\n imports: [\n CommonModule,\n CopilotSlot,\n CopilotChatUserMessageRenderer,\n CopilotChatUserMessageCopyButton,\n CopilotChatUserMessageEditButton,\n CopilotChatUserMessageToolbar,\n CopilotChatUserMessageBranchNavigation,\n CopilotChatAttachmentRenderer,\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `\n <div\n [class]=\"computedClass()\"\n [attr.data-message-id]=\"message()?.id\"\n data-message-role=\"user\"\n role=\"article\"\n >\n @if (mediaParts().length > 0) {\n <div\n class=\"cpk:flex cpk:flex-row cpk:flex-wrap cpk:justify-end cpk:gap-2 cpk:mb-2\"\n >\n @for (part of mediaParts(); track $index) {\n <copilot-chat-attachment-renderer\n [type]=\"part.type\"\n [source]=\"part.source\"\n [filename]=\"filenameFor(part)\"\n />\n }\n </div>\n }\n\n <!-- Message Renderer -->\n @if (messageRendererTemplate || messageRendererComponent()) {\n <copilot-slot\n [slot]=\"messageRendererTemplate || messageRendererComponent()\"\n [context]=\"messageRendererContext()\"\n [defaultComponent]=\"CopilotChatUserMessageRenderer\"\n >\n </copilot-slot>\n } @else {\n <copilot-chat-user-message-renderer\n [content]=\"flattenedContent()\"\n [inputClass]=\"messageRendererClass()\"\n >\n </copilot-chat-user-message-renderer>\n }\n\n <!-- Toolbar -->\n @if (toolbarTemplate || toolbarComponent()) {\n <copilot-slot\n [slot]=\"toolbarTemplate || toolbarComponent()\"\n [context]=\"toolbarContext()\"\n [defaultComponent]=\"CopilotChatUserMessageToolbar\"\n >\n </copilot-slot>\n } @else {\n <div copilotChatUserMessageToolbar [inputClass]=\"toolbarClass()\">\n <div class=\"cpk:flex cpk:items-center cpk:gap-1 cpk:justify-end\">\n <!-- Additional toolbar items -->\n @if (additionalToolbarItems()) {\n <ng-container\n [ngTemplateOutlet]=\"additionalToolbarItems() || null\"\n ></ng-container>\n }\n\n <!-- Copy button -->\n @if (copyButtonTemplate || copyButtonComponent()) {\n <copilot-slot\n [slot]=\"copyButtonTemplate || copyButtonComponent()\"\n [context]=\"{ content: flattenedContent() }\"\n [outputs]=\"copyButtonOutputs\"\n [defaultComponent]=\"CopilotChatUserMessageCopyButton\"\n >\n </copilot-slot>\n } @else {\n <copilot-chat-user-message-copy-button\n [content]=\"flattenedContent()\"\n [inputClass]=\"copyButtonClass()\"\n (clicked)=\"handleCopy()\"\n >\n </copilot-chat-user-message-copy-button>\n }\n\n <!-- Edit button -->\n @if (true) {\n @if (editButtonTemplate || editButtonComponent()) {\n <copilot-slot\n [slot]=\"editButtonTemplate || editButtonComponent()\"\n [context]=\"{}\"\n [outputs]=\"editButtonOutputs\"\n [defaultComponent]=\"CopilotChatUserMessageEditButton\"\n >\n </copilot-slot>\n } @else {\n <copilot-chat-user-message-edit-button\n [inputClass]=\"editButtonClass()\"\n (clicked)=\"handleEdit()\"\n >\n </copilot-chat-user-message-edit-button>\n }\n }\n\n <!-- Branch navigation -->\n @if (showBranchNavigation()) {\n @if (branchNavigationTemplate || branchNavigationComponent()) {\n <copilot-slot\n [slot]=\"branchNavigationTemplate || branchNavigationComponent()\"\n [context]=\"branchNavigationContext()\"\n [defaultComponent]=\"CopilotChatUserMessageBranchNavigation\"\n >\n </copilot-slot>\n } @else {\n <copilot-chat-user-message-branch-navigation\n [currentBranch]=\"branchIndexValue()\"\n [numberOfBranches]=\"numberOfBranchesValue()\"\n [message]=\"message()!\"\n [inputClass]=\"branchNavigationClass()\"\n (switchToBranch)=\"handleSwitchToBranch($event)\"\n >\n </copilot-chat-user-message-branch-navigation>\n }\n }\n </div>\n </div>\n }\n </div>\n `,\n})\nexport class CopilotChatUserMessage {\n // Capture templates from content projection\n @ContentChild(\"messageRenderer\", { read: TemplateRef })\n messageRendererTemplate?: TemplateRef<MessageRendererContext>;\n @ContentChild(\"toolbar\", { read: TemplateRef })\n toolbarTemplate?: TemplateRef<UserMessageToolbarContext>;\n @ContentChild(\"copyButton\", { read: TemplateRef })\n copyButtonTemplate?: TemplateRef<CopyButtonContext>;\n @ContentChild(\"editButton\", { read: TemplateRef })\n editButtonTemplate?: TemplateRef<EditButtonContext>;\n @ContentChild(\"branchNavigation\", { read: TemplateRef })\n branchNavigationTemplate?: TemplateRef<BranchNavigationContext>;\n\n // Props for tweaking default components\n messageRendererClass = input<string | undefined>();\n toolbarClass = input<string | undefined>();\n copyButtonClass = input<string | undefined>();\n editButtonClass = input<string | undefined>();\n branchNavigationClass = input<string | undefined>();\n\n // Component inputs for overrides\n messageRendererComponent = input<Type<any> | undefined>();\n toolbarComponent = input<Type<any> | undefined>();\n copyButtonComponent = input<Type<any> | undefined>();\n editButtonComponent = input<Type<any> | undefined>();\n branchNavigationComponent = input<Type<any> | undefined>();\n\n // Regular inputs\n message = input<UserMessage>();\n branchIndex = input<number | undefined>();\n numberOfBranches = input<number | undefined>();\n additionalToolbarItems = input<TemplateRef<any> | undefined>();\n inputClass = input<string | undefined>();\n\n // Output events\n editMessage = output<CopilotChatUserMessageOnEditMessageProps>();\n switchToBranch = output<CopilotChatUserMessageOnSwitchToBranchProps>();\n\n // Derived values\n branchIndexValue = computed(() => this.branchIndex() ?? 0);\n numberOfBranchesValue = computed(() => this.numberOfBranches() ?? 1);\n\n // Default components\n CopilotChatUserMessageRenderer = CopilotChatUserMessageRenderer;\n CopilotChatUserMessageToolbar = CopilotChatUserMessageToolbar;\n CopilotChatUserMessageCopyButton = CopilotChatUserMessageCopyButton;\n CopilotChatUserMessageEditButton = CopilotChatUserMessageEditButton;\n CopilotChatUserMessageBranchNavigation =\n CopilotChatUserMessageBranchNavigation;\n\n // Computed values\n showBranchNavigation = computed(() => (this.numberOfBranches() ?? 1) > 1);\n\n computedClass = computed(() =>\n cn(\n \"copilotKitMessage copilotKitUserMessage cpk:flex cpk:flex-col cpk:items-end cpk:group cpk:pt-10\",\n this.inputClass(),\n ),\n );\n\n // Context for slots (reactive via signals)\n flattenedContent = computed(() =>\n flattenUserMessageContent(this.message()?.content),\n );\n mediaParts = computed(() =>\n getUserMessageMediaParts(this.message()?.content),\n );\n\n messageRendererContext = computed<MessageRendererContext>(() => ({\n content: this.flattenedContent(),\n }));\n\n // Output maps for slots\n copyButtonOutputs = { clicked: () => this.handleCopy() };\n editButtonOutputs = { clicked: () => this.handleEdit() };\n\n branchNavigationContext = computed<BranchNavigationContext>(() => ({\n currentBranch: this.branchIndexValue(),\n numberOfBranches: this.numberOfBranchesValue(),\n onSwitchToBranch: (props) => this.handleSwitchToBranch(props),\n message: this.message()!,\n }));\n\n toolbarContext = computed<UserMessageToolbarContext>(() => ({\n children: null, // Will be populated by the toolbar content\n }));\n\n handleCopy(): void {\n // Copy is handled by the button component itself\n // This is just for any additional logic if needed\n }\n\n handleEdit(): void {\n this.editMessage.emit({ message: this.message()! });\n }\n\n handleSwitchToBranch(\n props: CopilotChatUserMessageOnSwitchToBranchProps,\n ): void {\n this.switchToBranch.emit(props);\n }\n\n filenameFor(part: UserMessageMediaPart): string | undefined {\n return getUserMessageMediaFilename(part);\n }\n constructor() {}\n}\n","import {\n Component,\n input,\n ChangeDetectionStrategy,\n ViewEncapsulation,\n computed,\n} from \"@angular/core\";\n\nimport { cn } from \"../../utils\";\n\n/**\n * Cursor component that matches the React implementation exactly.\n * Shows a pulsing dot animation to indicate activity.\n */\n@Component({\n selector: \"copilot-chat-message-view-cursor\",\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `\n <div data-testid=\"copilot-loading-cursor\" [class]=\"computedClass()\"></div>\n `,\n})\nexport class CopilotChatMessageViewCursor {\n inputClass = input<string | undefined>();\n\n // Computed class that matches React exactly, with the Angular package Tailwind prefix.\n computedClass = computed(() =>\n cn(\n \"cpk:w-[11px] cpk:h-[11px] cpk:rounded-full cpk:bg-foreground cpk:animate-pulse-cursor cpk:ml-1\",\n this.inputClass(),\n ),\n );\n}\n","export function formatReasoningDuration(seconds: number): string {\n if (seconds < 1) return \"a few seconds\";\n if (seconds < 60) return `${Math.round(seconds)} seconds`;\n\n const mins = Math.floor(seconds / 60);\n const secs = Math.round(seconds % 60);\n if (secs === 0) return `${mins} minute${mins > 1 ? \"s\" : \"\"}`;\n return `${mins}m ${secs}s`;\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n computed,\n input,\n linkedSignal,\n signal,\n untracked,\n} from \"@angular/core\";\nimport type { Message, ReasoningMessage } from \"@ag-ui/core\";\nimport { cn } from \"../../utils\";\nimport { CopilotChatAssistantMessageRenderer } from \"./copilot-chat-assistant-message-renderer\";\nimport { formatReasoningDuration } from \"./copilot-chat-reasoning-message-utils\";\n\n@Component({\n selector: \"copilot-chat-reasoning-message\",\n imports: [CopilotChatAssistantMessageRenderer],\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <div\n [class]=\"computedClass()\"\n [attr.data-message-id]=\"message().id\"\n data-testid=\"copilot-chat-reasoning-message\"\n data-copilot-reasoning-message\n >\n <button\n type=\"button\"\n data-testid=\"reasoning-block\"\n [class]=\"headerClass()\"\n [attr.aria-expanded]=\"hasContent() ? open() : null\"\n (click)=\"toggle()\"\n >\n <span class=\"cpk:font-medium\">{{ label() }}</span>\n @if (isStreaming() && !hasContent()) {\n <span class=\"cpk:inline-flex cpk:items-center cpk:ml-1\">\n <span\n class=\"cpk:w-1.5 cpk:h-1.5 cpk:rounded-full cpk:bg-muted-foreground cpk:animate-pulse\"\n ></span>\n </span>\n }\n @if (hasContent()) {\n <svg\n aria-hidden=\"true\"\n focusable=\"false\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n [class]=\"chevronClass()\"\n >\n <path d=\"m9 18 6-6-6-6\"></path>\n </svg>\n }\n </button>\n\n @if (hasContent() || isStreaming()) {\n <div\n class=\"cpk:grid cpk:transition-[grid-template-rows] cpk:duration-200 cpk:ease-in-out\"\n [style.grid-template-rows]=\"open() ? '1fr' : '0fr'\"\n >\n <div class=\"cpk:overflow-hidden\">\n <div class=\"cpk:pb-2 cpk:pt-1\">\n <div class=\"cpk:text-sm cpk:text-muted-foreground\">\n <copilot-chat-assistant-message-renderer\n [content]=\"reasoningContent()\"\n inputClass=\"cpk:text-sm cpk:text-muted-foreground cpk:leading-relaxed cpk:[&_p]:m-0 cpk:[&_p+p]:mt-2 cpk:[&_strong]:font-semibold cpk:[&_strong]:text-foreground cpk:[&_ul]:my-1 cpk:[&_ol]:my-1 cpk:[&_li]:ml-4\"\n ></copilot-chat-assistant-message-renderer>\n @if (isStreaming() && hasContent()) {\n <span\n class=\"cpk:inline-flex cpk:items-center cpk:ml-1 cpk:align-middle\"\n >\n <span\n class=\"cpk:w-2 cpk:h-2 cpk:rounded-full cpk:bg-muted-foreground cpk:animate-pulse-cursor\"\n ></span>\n </span>\n }\n </div>\n </div>\n </div>\n </div>\n }\n </div>\n `,\n})\nexport class CopilotChatReasoningMessage {\n readonly message = input.required<ReasoningMessage>();\n readonly messages = input<Message[]>([]);\n readonly isRunning = input<boolean>(false);\n readonly inputClass = input<string | undefined>();\n\n private readonly userToggled = signal(false);\n\n protected readonly isLatest = computed(() => {\n const messages = this.messages();\n return messages[messages.length - 1]?.id === this.message().id;\n });\n\n protected readonly isStreaming = computed(\n () => this.isRunning() && this.isLatest(),\n );\n\n // Captures the wall-clock start the moment streaming begins and holds it\n // afterwards. `label` reads this in both branches, keeping the linkedSignal\n // warm so it recomputes across the streaming transition (no effect needed).\n private readonly startTime = linkedSignal<boolean, number | undefined>({\n source: this.isStreaming,\n computation: (streaming, prev) =>\n streaming ? (prev?.value ?? Date.now()) : prev?.value,\n });\n\n // Opens automatically while streaming. Once the user toggles, their choice is\n // respected; otherwise the panel auto-collapses when streaming ends. Reads\n // userToggled untracked so a mid-stream toggle doesn't re-force it open.\n protected readonly open = linkedSignal<boolean, boolean>({\n source: this.isStreaming,\n computation: (streaming, prev) =>\n streaming\n ? true\n : untracked(() => this.userToggled())\n ? (prev?.value ?? false)\n : false,\n });\n\n protected readonly hasContent = computed(\n () => (this.message().content?.length ?? 0) > 0,\n );\n\n protected readonly reasoningContent = computed(\n () => this.message().content ?? \"\",\n );\n\n protected readonly label = computed(() => {\n const start = this.startTime();\n if (this.isStreaming()) return \"Thinking…\";\n const seconds = start === undefined ? 0 : (Date.now() - start) / 1000;\n return `Thought for ${formatReasoningDuration(seconds)}`;\n });\n\n protected readonly computedClass = computed(() =>\n cn(\"cpk:my-1\", this.inputClass()),\n );\n\n protected readonly headerClass = computed(() =>\n cn(\n \"cpk:inline-flex cpk:items-center cpk:gap-1 cpk:py-1 cpk:text-sm cpk:text-muted-foreground cpk:transition-colors cpk:select-none\",\n this.hasContent()\n ? \"cpk:hover:text-foreground cpk:cursor-pointer\"\n : \"cpk:cursor-default\",\n ),\n );\n\n protected readonly chevronClass = computed(() =>\n cn(\n \"cpk:size-3.5 cpk:shrink-0 cpk:transition-transform cpk:duration-200\",\n this.open() && \"cpk:rotate-90\",\n ),\n );\n\n protected toggle(): void {\n if (!this.hasContent()) return;\n this.userToggled.set(true);\n this.open.update((value) => !value);\n }\n}\n","import type { RenderActivityMessageConfig } from \"../../activity-renderer\";\n\nexport interface PickActivityRendererOptions {\n activityType: string;\n agentId?: string;\n renderers: readonly RenderActivityMessageConfig[];\n}\n\n/**\n * Resolve the activity renderer for an activity type.\n *\n * Precedence (first match wins within each tier, in registration order):\n * 1. a renderer for `activityType` registered for `agentId`\n * 2. a renderer for `activityType` without an `agentId` (global)\n * 3. the `\"*\"` wildcard renderer\n *\n * Note that the wildcard is matched regardless of its `agentId`, which differs\n * from `pickToolCallHandler`, where the wildcard is agent-scoped as well. This\n * preserves the behaviour `CopilotChatMessageView` has always had.\n *\n * Kept internal for now (not part of the public API); it can be exposed later\n * without a breaking change if there is demand for a headless resolver.\n */\nexport function pickActivityRenderer(\n options: PickActivityRendererOptions,\n): RenderActivityMessageConfig | undefined {\n const { activityType, agentId, renderers } = options;\n const matches = renderers.filter(\n (candidate) => candidate.activityType === activityType,\n );\n\n return (\n matches.find((candidate) => candidate.agentId === agentId) ??\n matches.find((candidate) => candidate.agentId === undefined) ??\n renderers.find((candidate) => candidate.activityType === \"*\")\n );\n}\n","import {\n Component,\n ChangeDetectionStrategy,\n inject,\n input,\n} from \"@angular/core\";\nimport { NgComponentOutlet } from \"@angular/common\";\nimport type { ActivityMessage } from \"@ag-ui/core\";\nimport type { AbstractAgent } from \"@ag-ui/client\";\nimport { CopilotKit } from \"../../copilotkit\";\nimport type { RenderActivityMessageConfig } from \"../../activity-renderer\";\nimport { pickActivityRenderer } from \"./pick-activity-renderer\";\n\ninterface ActivityRender {\n component: RenderActivityMessageConfig[\"component\"];\n inputs: {\n activityType: string;\n content: unknown;\n message: ActivityMessage;\n agent: AbstractAgent | undefined;\n };\n}\n\n/**\n * Renders a single activity message through the activity renderer registered\n * for its `activityType` (see `provideCopilotKit({ renderActivityMessages })`\n * and `registerRenderActivityMessage`).\n *\n * This is the activity counterpart of `RenderToolCalls` and the Angular\n * equivalent of React's `useRenderActivityMessage()`: `CopilotChatMessageView`\n * uses it for the `activity` role, and custom chat shells or non-chat surfaces\n * (dashboards, side panels) can host an activity with it directly instead of\n * instantiating the whole message view.\n *\n * ```html\n * <copilot-activity [message]=\"activityMessage\" [agentId]=\"agentId\" />\n * ```\n *\n * Renders nothing when no renderer matches or when the renderer's content\n * schema rejects the message content (a warning is logged in that case).\n */\n@Component({\n selector: \"copilot-activity\",\n imports: [NgComponentOutlet],\n changeDetection: ChangeDetectionStrategy.Eager,\n template: `\n @let render = resolveRender(message());\n @if (render) {\n <ng-container *ngComponentOutlet=\"render.component; inputs: render.inputs\" />\n }\n `,\n})\nexport class CopilotActivity {\n readonly #copilotKit = inject(CopilotKit);\n\n /** The activity message to render. */\n readonly message = input.required<ActivityMessage>();\n /** Agent scope used for renderer resolution and passed to the renderer. */\n readonly agentId = input<string | undefined>();\n\n protected resolveRender(\n message: ActivityMessage,\n ): ActivityRender | undefined {\n const agentId = this.agentId();\n const renderer = pickActivityRenderer({\n activityType: message.activityType,\n agentId,\n renderers: this.#copilotKit.activityMessageRenderConfigs(),\n });\n if (!renderer) return undefined;\n\n const parseResult = renderer.content.safeParse(message.content);\n if (parseResult.success === false) {\n console.warn(\n `Failed to parse content for activity message '${message.activityType}':`,\n parseResult.error,\n );\n return undefined;\n }\n\n return {\n component: renderer.component,\n inputs: {\n activityType: message.activityType,\n content: parseResult.data,\n message,\n agent: agentId ? this.#copilotKit.getAgent(agentId) : undefined,\n },\n };\n }\n}\n","import type { TemplateRef, Type } from \"@angular/core\";\nimport {\n Component,\n input,\n output,\n ContentChild,\n ChangeDetectionStrategy,\n ViewEncapsulation,\n afterRenderEffect,\n computed,\n} from \"@angular/core\";\nimport { NgTemplateOutlet } from \"@angular/common\";\nimport { CopilotSlot } from \"../../slots/copilot-slot\";\nimport type { Message, ReasoningMessage } from \"@ag-ui/core\";\nimport { CopilotChatAssistantMessage } from \"./copilot-chat-assistant-message\";\nimport { CopilotChatUserMessage } from \"./copilot-chat-user-message\";\nimport { CopilotChatMessageViewCursor } from \"./copilot-chat-message-view-cursor\";\nimport { CopilotChatReasoningMessage } from \"./copilot-chat-reasoning-message\";\nimport { CopilotActivity } from \"../activity/copilot-activity\";\nimport { cn } from \"../../utils\";\nimport {\n commitRowKeyStore,\n createRowKeyStore,\n resolveRowRenderKeys,\n} from \"@copilotkit/shared\";\n\n/**\n * CopilotChatMessageView component - Angular port of the React component.\n * Renders a list of chat messages with support for custom slots and layouts.\n * DOM structure and Tailwind classes match the React implementation exactly.\n */\n@Component({\n selector: \"copilot-chat-message-view\",\n host: { \"data-copilotkit\": \"\" },\n imports: [\n NgTemplateOutlet,\n CopilotSlot,\n CopilotChatAssistantMessage,\n CopilotChatUserMessage,\n CopilotChatReasoningMessage,\n CopilotChatMessageViewCursor,\n CopilotActivity,\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `\n <!-- Custom layout template support (render prop pattern) -->\n @if (customLayoutTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"customLayoutTemplate\"\n [ngTemplateOutletContext]=\"layoutContext()\"\n ></ng-container>\n } @else {\n <!-- Default layout - exact React DOM structure: div with \"flex flex-col\" classes -->\n <div [class]=\"computedClass()\">\n <!-- Message iteration - simplified without tool calls -->\n @for (message of messagesValue(); track rowRenderKey($index, message)) {\n @if (message && message.role === \"assistant\") {\n <!-- Assistant message with slot support -->\n @if (assistantMessageComponent() || assistantMessageTemplate()) {\n <copilot-slot\n [slot]=\"assistantMessageTemplate() || assistantMessageComponent()\"\n [context]=\"mergeAssistantProps(message)\"\n [defaultComponent]=\"defaultAssistantComponent\"\n >\n </copilot-slot>\n } @else {\n <copilot-chat-assistant-message\n [message]=\"message\"\n [messages]=\"messagesValue()\"\n [agentId]=\"agentId()\"\n [isLoading]=\"isLoadingValue()\"\n [inputClass]=\"assistantMessageClass()\"\n (thumbsUp)=\"handleAssistantThumbsUp($event)\"\n (thumbsDown)=\"handleAssistantThumbsDown($event)\"\n (readAloud)=\"handleAssistantReadAloud($event)\"\n (regenerate)=\"handleAssistantRegenerate($event)\"\n >\n </copilot-chat-assistant-message>\n }\n } @else if (message && message.role === \"user\") {\n <!-- User message with slot support -->\n @if (userMessageComponent() || userMessageTemplate()) {\n <copilot-slot\n [slot]=\"userMessageTemplate() || userMessageComponent()\"\n [context]=\"mergeUserProps(message)\"\n [defaultComponent]=\"defaultUserComponent\"\n >\n </copilot-slot>\n } @else {\n <copilot-chat-user-message\n [message]=\"message\"\n [inputClass]=\"userMessageClass()\"\n >\n </copilot-chat-user-message>\n }\n } @else if (message && message.role === \"reasoning\") {\n @if (reasoningMessageComponent() || reasoningMessageTemplate()) {\n <copilot-slot\n [slot]=\"reasoningMessageTemplate() || reasoningMessageComponent()\"\n [context]=\"mergeReasoningProps(asReasoningMessage(message))\"\n [defaultComponent]=\"defaultReasoningComponent\"\n />\n } @else {\n <copilot-chat-reasoning-message\n [message]=\"asReasoningMessage(message)\"\n [messages]=\"messagesValue()\"\n [isRunning]=\"isLoadingValue()\"\n [inputClass]=\"reasoningMessageClass()\"\n />\n }\n } @else if (message && message.role === \"activity\") {\n <copilot-activity [message]=\"message\" [agentId]=\"agentId()\" />\n }\n }\n\n @if (childrenComponent() || childrenTemplate()) {\n <copilot-slot\n [slot]=\"childrenTemplate() || childrenComponent()\"\n [context]=\"childrenContext()\"\n />\n }\n\n <!-- Cursor - exactly like React's conditional rendering -->\n @if (showCursorValue()) {\n @if (cursorComponent() || cursorTemplate()) {\n <copilot-slot\n [slot]=\"cursorTemplate() || cursorComponent()\"\n [context]=\"{ inputClass: cursorClass() }\"\n [defaultComponent]=\"defaultCursorComponent\"\n >\n </copilot-slot>\n } @else {\n <copilot-chat-message-view-cursor [inputClass]=\"cursorClass()\">\n </copilot-chat-message-view-cursor>\n }\n }\n </div>\n }\n `,\n})\nexport class CopilotChatMessageView {\n // Core inputs matching React props\n messages = input<Message[]>([]);\n /** Current agent state exposed to transcript-children slots. */\n state = input<unknown>({});\n showCursor = input<boolean>(false);\n isLoading = input<boolean>(false);\n inputClass = input<string | undefined>();\n agentId = input<string | undefined>();\n\n // Handler availability handled via DI service\n\n // Assistant message slot inputs\n assistantMessageComponent = input<Type<any> | undefined>();\n assistantMessageTemplate = input<TemplateRef<any> | undefined>();\n assistantMessageClass = input<string | undefined>();\n\n // ReasoningMessage slot inputs\n reasoningMessageComponent = input<Type<any> | undefined>();\n reasoningMessageTemplate = input<TemplateRef<any> | undefined>();\n reasoningMessageClass = input<string | undefined>();\n\n // Content rendered after the message collection and before the cursor.\n childrenComponent = input<Type<any> | undefined>();\n childrenTemplate = input<TemplateRef<any> | undefined>();\n childrenClass = input<string | undefined>();\n\n // User message slot inputs\n userMessageComponent = input<Type<any> | undefined>();\n userMessageTemplate = input<TemplateRef<any> | undefined>();\n userMessageClass = input<string | undefined>();\n\n // Cursor slot inputs\n cursorComponent = input<Type<any> | undefined>();\n cursorTemplate = input<TemplateRef<any> | undefined>();\n cursorClass = input<string | undefined>();\n\n // Custom layout template (render prop pattern)\n @ContentChild(\"customLayout\") customLayoutTemplate?: TemplateRef<any>;\n\n // Output events (bubbled from child components)\n assistantMessageThumbsUp = output<{ message: Message }>();\n assistantMessageThumbsDown = output<{ message: Message }>();\n assistantMessageReadAloud = output<{ message: Message }>();\n assistantMessageRegenerate = output<{ message: Message }>();\n userMessageCopy = output<{ message: Message }>();\n userMessageEdit = output<{ message: Message }>();\n\n // Default components for slots\n protected readonly defaultAssistantComponent = CopilotChatAssistantMessage;\n protected readonly defaultUserComponent = CopilotChatUserMessage;\n protected readonly defaultReasoningComponent = CopilotChatReasoningMessage;\n protected readonly defaultCursorComponent = CopilotChatMessageViewCursor;\n\n // Derived values from inputs\n protected messagesValue = computed(() => this.messages());\n\n /**\n * Override table backing `rowRenderKey`. Per component instance, so its\n * lifetime matches the rendered list.\n */\n private readonly rowKeyStore = createRowKeyStore();\n protected rowRenderKeys = computed(() =>\n resolveRowRenderKeys(this.rowKeyStore, this.messagesValue()),\n );\n\n // Record what actually rendered, never what the computed merely evaluated:\n // an anchor from an evaluation that never reaches the DOM would re-key a\n // rendered row and recreate it.\n private readonly rowKeyStoreCommit = afterRenderEffect(() => {\n commitRowKeyStore(this.rowKeyStore, this.messagesValue());\n });\n protected showCursorValue = computed(\n () => this.showCursor() && this.lastMessage()?.role !== \"reasoning\",\n );\n protected isLoadingValue = computed(() => this.isLoading());\n protected lastMessage = computed(() => {\n const messages = this.messagesValue();\n return messages[messages.length - 1];\n });\n\n // Computed class matching React: twMerge(\"flex flex-col\", className)\n computedClass = computed(() =>\n cn(\"cpk:flex cpk:flex-col\", this.inputClass()),\n );\n\n // Layout context for custom templates (render prop pattern)\n layoutContext = computed(() => ({\n isLoading: this.isLoadingValue(),\n messages: this.messagesValue(),\n showCursor: this.showCursorValue(),\n messageElements: this.messagesValue().filter(\n (m) =>\n m &&\n (m.role === \"assistant\" ||\n m.role === \"user\" ||\n m.role === \"reasoning\" ||\n m.role === \"activity\"),\n ),\n }));\n\n // Slot resolution computed signals\n assistantMessageSlot = computed(\n () => this.assistantMessageComponent() || this.assistantMessageClass(),\n );\n\n userMessageSlot = computed(\n () => this.userMessageComponent() || this.userMessageClass(),\n );\n\n cursorSlot = computed(() => this.cursorComponent() || this.cursorClass());\n\n // Props merging helpers\n mergeAssistantProps(message: Message) {\n return {\n message,\n messages: this.messagesValue(),\n isLoading: this.isLoadingValue(),\n inputClass: this.assistantMessageClass(),\n };\n }\n\n mergeReasoningProps(message: ReasoningMessage) {\n return {\n message,\n messages: this.messagesValue(),\n isRunning: this.isLoadingValue(),\n inputClass: this.reasoningMessageClass(),\n };\n }\n\n childrenContext() {\n return {\n messages: this.messagesValue(),\n state: this.state(),\n agentId: this.agentId(),\n isRunning: this.isLoadingValue(),\n inputClass: this.childrenClass(),\n };\n }\n\n mergeUserProps(message: Message) {\n return {\n message,\n inputClass: this.userMessageClass(),\n };\n }\n\n asReasoningMessage(message: Message): ReasoningMessage {\n return message as ReasoningMessage;\n }\n\n /**\n * Stable `@for` track key. A message's canonical id can change mid-stream, and\n * tracking by it destroys and recreates the row on that swap (the HITL chat\n * flash). See ./row-render-keys for the mechanism and its limits.\n */\n rowRenderKey(index: number, message: Message): string {\n return this.rowRenderKeys()[index] ?? message?.id ?? `index-${index}`;\n }\n\n // Event handlers - just pass them through\n handleAssistantThumbsUp(event: { message: Message }): void {\n this.assistantMessageThumbsUp.emit(event);\n }\n\n handleAssistantThumbsDown(event: { message: Message }): void {\n this.assistantMessageThumbsDown.emit(event);\n }\n\n handleAssistantReadAloud(event: { message: Message }): void {\n this.assistantMessageReadAloud.emit(event);\n }\n\n handleAssistantRegenerate(event: { message: Message }): void {\n this.assistantMessageRegenerate.emit(event);\n }\n}\n","import {\n Component,\n input,\n output,\n ChangeDetectionStrategy,\n ViewEncapsulation,\n} from \"@angular/core\";\n\nimport { ChevronDown, CopilotIcon } from \"../icons/copilot-icon\";\nimport { cn } from \"../../utils\";\n\n/**\n * ScrollToBottomButton component for CopilotChatView\n * Matches React implementation exactly with same Tailwind classes\n */\n@Component({\n selector: \"copilot-chat-view-scroll-to-bottom-button\",\n imports: [CopilotIcon],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `\n <button\n type=\"button\"\n aria-label=\"Scroll to bottom\"\n [class]=\"computedClass\"\n [disabled]=\"disabled()\"\n (click)=\"handleClick()\"\n >\n <copilot-icon\n [img]=\"ChevronDown\"\n class=\"cpk:w-4 cpk:h-4 cpk:text-gray-600 cpk:dark:text-white\"\n >\n </copilot-icon>\n </button>\n `,\n})\nexport class CopilotChatViewScrollToBottomButton {\n inputClass = input<string | undefined>();\n disabled = input<boolean>(false);\n // Support function-style click handler via slot context\n onClick = input<(() => void) | undefined>();\n\n // Simple, idiomatic Angular output\n clicked = output<void>();\n\n // Icon reference\n protected readonly ChevronDown = ChevronDown;\n\n // Computed class matching React exactly\n get computedClass(): string {\n return cn(\n // Base button styles\n \"cpk:rounded-full cpk:w-10 cpk:h-10 cpk:p-0\",\n // Background colors\n \"cpk:bg-white cpk:dark:bg-gray-900\",\n // Border and shadow\n \"cpk:shadow-lg cpk:border cpk:border-gray-200 cpk:dark:border-gray-700\",\n // Hover states\n \"cpk:hover:bg-gray-50 cpk:dark:hover:bg-gray-800\",\n // Layout\n \"cpk:flex cpk:items-center cpk:justify-center cpk:cursor-pointer\",\n // Transition\n \"cpk:transition-colors\",\n // Focus states\n \"cpk:focus:outline-none cpk:focus-visible:ring-2 cpk:focus-visible:ring-offset-2\",\n // Custom classes\n this.inputClass(),\n );\n }\n\n handleClick(): void {\n if (!this.disabled()) {\n // Call input handler if provided (slot-style)\n if (this.onClick()) {\n this.onClick()!();\n }\n this.clicked.emit();\n }\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ViewEncapsulation,\n computed,\n input,\n output,\n} from \"@angular/core\";\nimport { cn } from \"../../utils\";\n\nconst suggestionPillClass = cn(\n \"cpk:group cpk:inline-flex cpk:h-7 cpk:sm:h-8 cpk:items-center cpk:gap-1 cpk:sm:gap-1.5 cpk:rounded-full\",\n \"cpk:border cpk:border-border/60 cpk:bg-background cpk:px-2.5 cpk:sm:px-3\",\n \"cpk:text-[11px] cpk:sm:text-xs cpk:leading-none cpk:text-foreground cpk:transition-colors\",\n \"cpk:cursor-pointer cpk:hover:bg-accent/60 cpk:hover:text-foreground\",\n \"cpk:focus-visible:outline-none cpk:focus-visible:ring-2 cpk:focus-visible:ring-ring\",\n \"cpk:focus-visible:ring-offset-2 cpk:focus-visible:ring-offset-background\",\n \"cpk:disabled:cursor-not-allowed cpk:disabled:text-muted-foreground\",\n \"cpk:disabled:hover:bg-background cpk:disabled:hover:text-muted-foreground\",\n \"cpk:pointer-events-auto\",\n);\n\n@Component({\n selector: \"copilot-chat-suggestion-pill\",\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: { \"data-copilotkit\": \"\" },\n template: `\n <button\n data-copilotkit\n data-testid=\"copilot-suggestion\"\n data-slot=\"suggestion-pill\"\n type=\"button\"\n [class]=\"computedClass()\"\n [disabled]=\"disabled() || isLoading()\"\n [attr.aria-busy]=\"isLoading() ? 'true' : null\"\n (click)=\"handleClick()\"\n >\n @if (isLoading()) {\n <span\n class=\"cpk:inline-block cpk:size-3 cpk:animate-spin cpk:rounded-full cpk:border cpk:border-current cpk:border-t-transparent cpk:opacity-70\"\n aria-hidden=\"true\"\n ></span>\n }\n <span class=\"cpk:whitespace-nowrap cpk:font-medium cpk:leading-none\">\n {{ title() }}\n </span>\n </button>\n `,\n})\nexport class CopilotChatSuggestionPill {\n readonly title = input<string>(\"\");\n readonly disabled = input(false);\n readonly isLoading = input(false);\n readonly inputClass = input<string | undefined>();\n\n readonly clicked = output<void>();\n\n protected readonly computedClass = computed(() =>\n cn(suggestionPillClass, this.inputClass()),\n );\n\n handleClick(): void {\n if (this.disabled() || this.isLoading()) {\n return;\n }\n\n this.clicked.emit();\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ViewEncapsulation,\n computed,\n input,\n output,\n} from \"@angular/core\";\nimport type { Suggestion } from \"@copilotkit/core\";\nimport { cn } from \"../../utils\";\nimport { CopilotChatSuggestionPill } from \"./copilot-chat-suggestion-pill\";\n\nconst suggestionViewClass = cn(\n \"cpk:flex cpk:flex-wrap cpk:items-center cpk:gap-1.5 cpk:sm:gap-2 cpk:pl-0 cpk:pr-4 cpk:@3xl:px-0\",\n \"cpk:pointer-events-none\",\n);\n\n@Component({\n selector: \"copilot-chat-suggestion-view\",\n imports: [CopilotChatSuggestionPill],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: { \"data-copilotkit\": \"\" },\n template: `\n @if (suggestions().length > 0) {\n <div\n data-copilotkit\n data-testid=\"copilot-suggestions\"\n [class]=\"computedClass()\"\n >\n @for (suggestion of suggestions(); track suggestion.message + $index) {\n <copilot-chat-suggestion-pill\n [title]=\"suggestion.title\"\n [inputClass]=\"suggestion.className\"\n [isLoading]=\"suggestion.isLoading === true\"\n (clicked)=\"handleSelect(suggestion, $index)\"\n />\n }\n </div>\n }\n `,\n})\nexport class CopilotChatSuggestionView {\n readonly suggestions = input<Suggestion[]>([]);\n readonly inputClass = input<string | undefined>();\n\n readonly selectSuggestion = output<{\n suggestion: Suggestion;\n index: number;\n }>();\n\n protected readonly computedClass = computed(() =>\n cn(suggestionViewClass, this.inputClass()),\n );\n\n handleSelect(suggestion: Suggestion, index: number): void {\n if (suggestion.isLoading) {\n return;\n }\n\n this.selectSuggestion.emit({ suggestion, index });\n }\n}\n","import {\n Component,\n input,\n TemplateRef,\n Type,\n output,\n ViewChild,\n ElementRef,\n ChangeDetectionStrategy,\n ViewEncapsulation,\n signal,\n computed,\n AfterViewInit,\n OnDestroy,\n inject,\n ChangeDetectorRef,\n afterNextRender,\n} from \"@angular/core\";\nimport { NgTemplateOutlet } from \"@angular/common\";\nimport { ScrollingModule } from \"@angular/cdk/scrolling\";\nimport { CopilotSlot } from \"../../slots/copilot-slot\";\nimport { CopilotChatMessageView } from \"./copilot-chat-message-view\";\nimport { CopilotChatViewScrollToBottomButton } from \"./copilot-chat-view-scroll-to-bottom-button\";\nimport { CopilotChatSuggestionView } from \"./copilot-chat-suggestion-view\";\nimport { StickToBottom } from \"../../directives/stick-to-bottom\";\nimport { ScrollPosition } from \"../../scroll-position\";\nimport { ChatState } from \"../../chat-state\";\nimport { Message } from \"@ag-ui/client\";\nimport { cn } from \"../../utils\";\nimport { Subject } from \"rxjs\";\nimport { takeUntil } from \"rxjs/operators\";\n\n/**\n * ScrollView component for CopilotChatView\n * Handles auto-scrolling and scroll position management\n */\n@Component({\n selector: \"copilot-chat-view-scroll-view\",\n host: { class: \"cpk:block cpk:flex-1 cpk:min-h-0\" },\n imports: [\n ScrollingModule,\n NgTemplateOutlet,\n CopilotSlot,\n CopilotChatMessageView,\n CopilotChatSuggestionView,\n StickToBottom,\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [ScrollPosition],\n templateUrl: \"./copilot-chat-view-scroll-view.html\",\n})\nexport class CopilotChatViewScrollView implements AfterViewInit, OnDestroy {\n private cdr = inject(ChangeDetectorRef);\n protected readonly chatState = inject(ChatState, { optional: true });\n\n autoScroll = input<boolean>(true);\n\n inputContainerHeight = input<number>(0);\n\n isResizing = input<boolean>(false);\n inputClass = input<string | undefined>();\n messages = input<Message[]>([]);\n /** Current agent state forwarded to message-view extension slots. */\n state = input<unknown>({});\n agentId = input<string | undefined>();\n messageView = input<any | undefined>();\n messageViewClass = input<string | undefined>();\n assistantMessageComponent = input<Type<any> | undefined>();\n assistantMessageTemplate = input<TemplateRef<any> | undefined>();\n assistantMessageClass = input<string | undefined>();\n reasoningMessageComponent = input<Type<any> | undefined>();\n reasoningMessageTemplate = input<TemplateRef<any> | undefined>();\n reasoningMessageClass = input<string | undefined>();\n messageViewChildrenComponent = input<Type<any> | undefined>();\n messageViewChildrenTemplate = input<TemplateRef<any> | undefined>();\n messageViewChildrenClass = input<string | undefined>();\n showCursor = input<boolean>(false);\n\n // Handler availability flags removed in favor of DI service\n\n // Slot inputs\n scrollToBottomButton = input<any | undefined>();\n scrollToBottomButtonClass = input<string | undefined>();\n\n // Output events (bubbled from message view)\n assistantMessageThumbsUp = output<{ message: Message }>();\n assistantMessageThumbsDown = output<{ message: Message }>();\n assistantMessageReadAloud = output<{ message: Message }>();\n assistantMessageRegenerate = output<{ message: Message }>();\n userMessageCopy = output<{ message: Message }>();\n userMessageEdit = output<{ message: Message }>();\n\n // ViewChild references\n @ViewChild(\"scrollContainer\", { read: ElementRef })\n scrollContainer?: ElementRef<HTMLElement>;\n @ViewChild(\"contentContainer\", { read: ElementRef })\n contentContainer?: ElementRef<HTMLElement>;\n @ViewChild(StickToBottom) stickToBottomDirective?: StickToBottom;\n\n // Default components\n protected readonly defaultMessageViewComponent = CopilotChatMessageView;\n protected readonly defaultScrollToBottomButtonComponent =\n CopilotChatViewScrollToBottomButton;\n\n // Signals\n protected hasMounted = signal(false);\n protected showScrollButton = signal(false);\n protected isAtBottom = signal(true);\n protected hasSuggestions = computed(\n () =>\n !this.showCursor() && (this.chatState?.suggestions?.() ?? []).length > 0,\n );\n protected paddingBottom = computed(\n () => this.inputContainerHeight() + (this.hasSuggestions() ? 4 : 32),\n );\n\n // Computed class\n protected computedClass = computed(() => cn(this.inputClass()));\n\n private destroy$ = new Subject<void>();\n private scrollPositionService = inject(ScrollPosition);\n\n constructor() {\n afterNextRender(() => {\n this.hasMounted.set(true);\n });\n }\n\n ngAfterViewInit(): void {\n if (!this.autoScroll()) {\n // Wait for the view to be fully rendered after hasMounted is set\n setTimeout(() => {\n if (this.scrollContainer) {\n // Check initial scroll position\n const initialState = this.scrollPositionService.getScrollState(\n this.scrollContainer.nativeElement,\n 10,\n );\n this.showScrollButton.set(!initialState.isAtBottom);\n\n // Monitor scroll position for manual mode\n this.scrollPositionService\n .monitorScrollPosition(this.scrollContainer, 10)\n .pipe(takeUntil(this.destroy$))\n .subscribe((state) => {\n this.showScrollButton.set(!state.isAtBottom);\n });\n }\n }, 100);\n }\n }\n\n /**\n * Handle isAtBottom change from StickToBottom directive\n */\n onIsAtBottomChange(isAtBottom: boolean): void {\n this.isAtBottom.set(isAtBottom);\n }\n\n /**\n * Scroll to bottom for manual mode\n */\n scrollToBottom(): void {\n if (this.scrollContainer) {\n this.scrollPositionService.scrollToBottom(this.scrollContainer, true);\n }\n }\n\n /**\n * Scroll to bottom for stick-to-bottom mode\n */\n scrollToBottomFromStick(): void {\n if (this.stickToBottomDirective) {\n this.stickToBottomDirective.scrollToBottom(\"smooth\");\n }\n }\n\n ngOnDestroy(): void {\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n // Output maps for slots\n scrollToBottomOutputs = { clicked: () => this.scrollToBottom() };\n scrollToBottomFromStickOutputs = {\n clicked: () => this.scrollToBottomFromStick(),\n };\n\n // Context methods for templates\n messageViewContext(): any {\n return {\n messages: this.messages(),\n state: this.state(),\n agentId: this.agentId(),\n inputClass: this.messageViewClass(),\n showCursor: this.showCursor(),\n assistantMessageComponent: this.assistantMessageComponent(),\n assistantMessageTemplate: this.assistantMessageTemplate(),\n assistantMessageClass: this.assistantMessageClass(),\n reasoningMessageComponent: this.reasoningMessageComponent(),\n reasoningMessageTemplate: this.reasoningMessageTemplate(),\n reasoningMessageClass: this.reasoningMessageClass(),\n childrenComponent: this.messageViewChildrenComponent(),\n childrenTemplate: this.messageViewChildrenTemplate(),\n childrenClass: this.messageViewChildrenClass(),\n };\n }\n\n scrollToBottomContext(): any {\n return {\n inputClass: this.scrollToBottomButtonClass(),\n onClick: () => this.scrollToBottom(),\n };\n }\n\n scrollToBottomFromStickContext(): any {\n return {\n inputClass: this.scrollToBottomButtonClass(),\n onClick: () => this.scrollToBottomFromStick(),\n };\n }\n}\n","<ng-template #scrollContent>\n <div [style.padding-bottom.px]=\"paddingBottom()\">\n <div class=\"cpk:max-w-3xl cpk:mx-auto\">\n @if (messageView()) {\n <copilot-slot\n [slot]=\"messageView()\"\n [context]=\"messageViewContext()\"\n [defaultComponent]=\"defaultMessageViewComponent\"\n >\n </copilot-slot>\n } @else {\n <copilot-chat-message-view\n [messages]=\"messages()\"\n [state]=\"state()\"\n [agentId]=\"agentId()\"\n [inputClass]=\"messageViewClass()\"\n [showCursor]=\"showCursor()\"\n [assistantMessageComponent]=\"assistantMessageComponent()\"\n [assistantMessageTemplate]=\"assistantMessageTemplate()\"\n [assistantMessageClass]=\"assistantMessageClass()\"\n [reasoningMessageComponent]=\"reasoningMessageComponent()\"\n [reasoningMessageTemplate]=\"reasoningMessageTemplate()\"\n [reasoningMessageClass]=\"reasoningMessageClass()\"\n [childrenComponent]=\"messageViewChildrenComponent()\"\n [childrenTemplate]=\"messageViewChildrenTemplate()\"\n [childrenClass]=\"messageViewChildrenClass()\"\n (assistantMessageThumbsUp)=\"assistantMessageThumbsUp.emit($event)\"\n (assistantMessageThumbsDown)=\"assistantMessageThumbsDown.emit($event)\"\n (assistantMessageReadAloud)=\"assistantMessageReadAloud.emit($event)\"\n (assistantMessageRegenerate)=\"assistantMessageRegenerate.emit($event)\"\n (userMessageCopy)=\"userMessageCopy.emit($event)\"\n (userMessageEdit)=\"userMessageEdit.emit($event)\"\n >\n </copilot-chat-message-view>\n } @if (hasSuggestions()) {\n <div class=\"cpk:pl-0 cpk:pr-4 cpk:@3xl:px-0 cpk:mt-4\">\n <copilot-chat-suggestion-view\n [suggestions]=\"chatState?.suggestions?.() ?? []\"\n inputClass=\"cpk:mb-3 cpk:lg:ml-4 cpk:lg:mr-4 cpk:ml-0 cpk:mr-0\"\n (selectSuggestion)=\"\n chatState?.selectSuggestion($event.suggestion, $event.index)\n \"\n />\n </div>\n }\n </div>\n </div>\n</ng-template>\n\n@if (!hasMounted()) {\n<!-- SSR/Initial render without stick-to-bottom -->\n<div\n class=\"cpk:h-full cpk:max-h-full cpk:flex cpk:flex-col cpk:flex-1 cpk:min-h-0 cpk:overflow-y-auto cpk:overflow-x-hidden\"\n>\n <div class=\"cpk:px-4 cpk:@3xl:px-0\">\n <ng-content></ng-content>\n </div>\n</div>\n} @else {\n<div\n class=\"cpk:h-full cpk:max-h-full cpk:flex cpk:flex-col cpk:min-h-0 cpk:relative\"\n>\n @if (autoScroll()) {\n <!-- Auto-scroll mode with StickToBottom directive -->\n <div\n #scrollContainer\n cdkScrollable\n copilotStickToBottom\n [enabled]=\"autoScroll()\"\n [threshold]=\"10\"\n [debounceMs]=\"0\"\n [initialBehavior]=\"'smooth'\"\n [resizeBehavior]=\"'smooth'\"\n (isAtBottomChange)=\"onIsAtBottomChange($event)\"\n [class]=\"computedClass()\"\n class=\"cpk:flex-1 cpk:min-h-0 cpk:overflow-y-auto cpk:overflow-x-hidden\"\n >\n <!-- Scrollable content wrapper -->\n <div class=\"cpk:px-4 cpk:@3xl:px-0\">\n <!-- Content with padding-bottom matching React -->\n <ng-container [ngTemplateOutlet]=\"scrollContent\"></ng-container>\n </div>\n </div>\n } @else {\n <!-- Manual scroll mode -->\n <div\n #scrollContainer\n cdkScrollable\n [class]=\"computedClass()\"\n class=\"cpk:flex-1 cpk:min-h-0 cpk:overflow-y-auto cpk:overflow-x-hidden\"\n >\n <div #contentContainer class=\"cpk:px-4 cpk:@3xl:px-0\">\n <!-- Content with padding-bottom matching React -->\n <ng-container [ngTemplateOutlet]=\"scrollContent\"></ng-container>\n </div>\n </div>\n } @if ((autoScroll() ? !isAtBottom() : showScrollButton()) && !isResizing()) {\n <div\n class=\"cpk:absolute cpk:inset-x-0 cpk:flex cpk:justify-center cpk:z-30\"\n [style.bottom.px]=\"inputContainerHeight() + 16\"\n >\n <copilot-slot\n [slot]=\"scrollToBottomButton()\"\n [context]=\"\n autoScroll()\n ? scrollToBottomFromStickContext()\n : scrollToBottomContext()\n \"\n [defaultComponent]=\"defaultScrollToBottomButtonComponent\"\n [outputs]=\"\n autoScroll() ? scrollToBottomFromStickOutputs : scrollToBottomOutputs\n \"\n >\n </copilot-slot>\n </div>\n }\n</div>\n}\n","import {\n Component,\n input,\n ChangeDetectionStrategy,\n ViewEncapsulation,\n} from \"@angular/core\";\n\nimport { cn } from \"../../utils\";\n\n/**\n * Feather component for CopilotChatView\n * Creates a gradient overlay effect between messages and input\n * Matches React implementation exactly with same Tailwind classes\n */\n@Component({\n selector: \"copilot-chat-view-feather\",\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `\n <div [class]=\"computedClass\" [style]=\"style()\"></div>\n `,\n})\nexport class CopilotChatViewFeather {\n inputClass = input<string | undefined>();\n style = input<{ [key: string]: any } | undefined>();\n\n // Computed class matching React exactly\n get computedClass(): string {\n return cn(\n // Positioning\n \"cpk:absolute cpk:bottom-0 cpk:left-0 cpk:right-4 cpk:h-24 cpk:pointer-events-none cpk:z-10\",\n // Gradient\n \"cpk:bg-gradient-to-t\",\n // Light mode colors\n \"cpk:from-white cpk:via-white cpk:to-transparent\",\n // Dark mode colors\n \"cpk:dark:from-[rgb(33,33,33)] cpk:dark:via-[rgb(33,33,33)]\",\n // Custom classes\n this.inputClass(),\n );\n }\n}\n","import {\n Component,\n input,\n output,\n ElementRef,\n AfterViewInit,\n signal,\n computed,\n inject,\n ChangeDetectionStrategy,\n ViewEncapsulation,\n PLATFORM_ID,\n afterNextRender,\n} from \"@angular/core\";\nimport { isPlatformBrowser } from \"@angular/common\";\nimport { cn } from \"../../utils\";\nimport { injectChatLabels } from \"../../chat-config\";\nimport { injectChatState } from \"../../chat-state\";\n\n@Component({\n selector: \"textarea[copilotChatTextarea]\",\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n \"[value]\": \"computedValue()\",\n \"[placeholder]\": \"placeholder()\",\n \"[disabled]\": \"disabled()\",\n \"[class]\": \"computedClass()\",\n \"[style.max-height.px]\": \"maxHeight()\",\n \"[style.overflow]\": \"'auto'\",\n \"[style.resize]\": \"'none'\",\n \"[attr.data-testid]\": \"'copilot-chat-textarea'\",\n \"(input)\": \"onInput($event)\",\n \"(keydown)\": \"onKeyDown($event)\",\n \"[attr.rows]\": \"1\",\n },\n template: \"\",\n styles: [],\n})\nexport class CopilotChatTextarea implements AfterViewInit {\n private elementRef = inject(ElementRef<HTMLTextAreaElement>);\n private platformId = inject(PLATFORM_ID);\n get textareaRef() {\n return this.elementRef;\n }\n\n inputValue = input<string | undefined>();\n inputPlaceholder = input<string | undefined>();\n inputMaxRows = input<number | undefined>();\n inputAutoFocus = input<boolean | undefined>();\n inputDisabled = input<boolean | undefined>();\n inputClass = input<string | undefined>();\n\n valueChange = output<string>();\n keyDown = output<KeyboardEvent>();\n\n readonly chatLabels = injectChatLabels();\n readonly chatState = injectChatState();\n\n // Internal signals\n maxHeight = signal<number>(0);\n\n // Computed values\n computedValue = computed(\n () => this.inputValue() ?? this.chatState.inputValue() ?? \"\",\n );\n placeholder = computed(\n () => this.inputPlaceholder() || this.chatLabels.chatInputPlaceholder,\n );\n disabled = computed(() => this.inputDisabled() ?? false);\n\n computedClass = computed(() => {\n const baseClasses = cn(\n // Layout and sizing\n \"cpk:w-full\",\n // Behavior\n \"cpk:outline-none cpk:resize-none\",\n // Background\n \"cpk:bg-transparent\",\n // Typography\n \"cpk:antialiased cpk:font-regular cpk:leading-relaxed cpk:text-[16px]\",\n // Placeholder styles\n \"cpk:placeholder:text-[#00000077] cpk:dark:placeholder:text-[#fffc]\",\n );\n return cn(baseClasses, this.inputClass());\n });\n\n constructor() {\n afterNextRender(() => {\n if (this.inputAutoFocus() ?? true) {\n this.elementRef.nativeElement.focus();\n }\n });\n }\n\n ngAfterViewInit(): void {\n if (!isPlatformBrowser(this.platformId)) return;\n\n this.calculateMaxHeight();\n this.adjustHeight();\n }\n\n onInput(event: Event): void {\n const textarea = event.target as HTMLTextAreaElement;\n const newValue = textarea.value;\n this.valueChange.emit(newValue);\n\n this.chatState.changeInput(newValue);\n\n this.adjustHeight();\n }\n\n onKeyDown(event: KeyboardEvent): void {\n // Check for Enter key without Shift\n if (event.key === \"Enter\" && !event.shiftKey) {\n event.preventDefault();\n this.keyDown.emit(event);\n } else {\n this.keyDown.emit(event);\n }\n }\n\n private calculateMaxHeight(): void {\n const textarea = this.elementRef.nativeElement;\n const maxRowsValue = this.inputMaxRows() ?? 5;\n\n // Save current value\n const currentValue = textarea.value;\n\n // Clear content to measure single row height\n textarea.value = \"\";\n textarea.style.height = \"auto\";\n\n // Get computed styles to account for padding\n const computedStyle = window.getComputedStyle(textarea);\n const paddingTop = parseFloat(computedStyle.paddingTop);\n const paddingBottom = parseFloat(computedStyle.paddingBottom);\n\n // Calculate actual content height (without padding)\n const contentHeight = textarea.scrollHeight - paddingTop - paddingBottom;\n\n // Calculate max height: content height for maxRows + padding\n const calculatedMaxHeight =\n contentHeight * maxRowsValue + paddingTop + paddingBottom;\n this.maxHeight.set(calculatedMaxHeight);\n\n // Restore original value\n textarea.value = currentValue;\n\n // Adjust height after calculating maxHeight\n if (currentValue) {\n this.adjustHeight();\n }\n }\n\n private adjustHeight(): void {\n const textarea = this.elementRef.nativeElement;\n const maxHeightValue = this.maxHeight();\n\n if (maxHeightValue > 0) {\n textarea.style.height = \"auto\";\n textarea.style.height = `${Math.min(textarea.scrollHeight, maxHeightValue)}px`;\n }\n }\n\n /**\n * Public method to focus the textarea\n */\n focus(): void {\n this.elementRef.nativeElement.focus();\n }\n\n /**\n * Public method to get current value\n */\n getValue(): string {\n return this.elementRef.nativeElement.value;\n }\n\n /**\n * Public method to set value programmatically\n */\n setValue(value: string): void {\n this.elementRef.nativeElement.value = value;\n this.valueChange.emit(value);\n\n this.chatState.changeInput(value);\n\n setTimeout(() => this.adjustHeight());\n }\n}\n","import type { Type, TemplateRef } from \"@angular/core\";\n\n/**\n * Mode of the chat input component\n */\nexport type CopilotChatInputMode = \"input\" | \"transcribe\" | \"processing\";\n\n/**\n * Represents a menu item in the tools menu\n */\nexport type ToolsMenuItem = {\n label: string;\n} & (\n | {\n action: () => void;\n items?: never;\n }\n | {\n action?: never;\n items: (ToolsMenuItem | \"-\")[];\n }\n);\n\n/**\n * Audio recorder state\n */\nexport type AudioRecorderState = \"idle\" | \"recording\" | \"processing\";\n\n/**\n * Error class for audio recorder failures\n */\nexport class AudioRecorderError extends Error {\n constructor(message: string) {\n super(message);\n this.name = \"AudioRecorderError\";\n }\n}\n\n/**\n * Props for textarea component\n */\nexport interface CopilotChatTextareaProps {\n value?: string;\n placeholder?: string;\n maxRows?: number;\n autoFocus?: boolean;\n disabled?: boolean;\n onChange?: (value: string) => void;\n onKeyDown?: (event: KeyboardEvent) => void;\n inputClass?: string;\n style?: any;\n rows?: number;\n cols?: number;\n readonly?: boolean;\n spellcheck?: boolean;\n wrap?: \"hard\" | \"soft\" | \"off\";\n}\n\n/**\n * Props for button components\n */\nexport interface CopilotChatButtonProps {\n disabled?: boolean;\n onClick?: () => void;\n inputClass?: string;\n style?: any;\n type?: \"button\" | \"submit\" | \"reset\";\n ariaLabel?: string;\n ariaPressed?: boolean;\n ariaExpanded?: boolean;\n title?: string;\n}\n\n/**\n * Props for toolbar button with tooltip\n */\nexport interface CopilotChatToolbarButtonProps extends CopilotChatButtonProps {\n icon?: TemplateRef<any>;\n tooltip?: string;\n variant?: \"primary\" | \"secondary\";\n}\n\n/**\n * Props for tools menu button\n */\nexport interface CopilotChatToolsButtonProps extends CopilotChatButtonProps {\n toolsMenu?: (ToolsMenuItem | \"-\")[];\n}\n\n/**\n * Props for audio recorder\n */\nexport interface CopilotChatAudioRecorderProps {\n inputClass?: string;\n style?: any;\n onStateChange?: (state: AudioRecorderState) => void;\n showControls?: boolean;\n maxDuration?: number;\n}\n\n/**\n * Props for toolbar\n */\nexport interface CopilotChatToolbarProps {\n inputClass?: string;\n style?: any;\n position?: \"top\" | \"bottom\";\n alignment?: \"left\" | \"center\" | \"right\" | \"space-between\";\n}\n\n/**\n * Slot configuration for chat input\n */\nexport interface CopilotChatInputSlots {\n textArea?: Type<any> | TemplateRef<any>;\n sendButton?: Type<any> | TemplateRef<any>;\n startTranscribeButton?: Type<any> | TemplateRef<any>;\n cancelTranscribeButton?: Type<any> | TemplateRef<any>;\n finishTranscribeButton?: Type<any> | TemplateRef<any>;\n addFileButton?: Type<any> | TemplateRef<any>;\n toolsButton?: Type<any> | TemplateRef<any>;\n toolbar?: Type<any> | TemplateRef<any>;\n audioRecorder?: Type<any> | TemplateRef<any>;\n}\n\n/**\n * Input configuration for the chat input component\n */\nexport interface CopilotChatInputConfig {\n mode?: CopilotChatInputMode;\n toolsMenu?: (ToolsMenuItem | \"-\")[];\n autoFocus?: boolean;\n additionalToolbarItems?: TemplateRef<any>;\n value?: string;\n class?: string;\n}\n\n/**\n * Output events for the chat input component\n */\nexport interface CopilotChatInputOutputs {\n submitMessage: (value: string) => void;\n startTranscribe: () => void;\n cancelTranscribe: () => void;\n finishTranscribe: () => void;\n addFile: () => void;\n changeValue: (value: string) => void;\n}\n","import {\n Component,\n DestroyRef,\n ElementRef,\n AfterViewInit,\n input,\n output,\n signal,\n computed,\n inject,\n viewChild,\n ChangeDetectionStrategy,\n ViewEncapsulation,\n} from \"@angular/core\";\nimport {\n AudioRecorderState,\n AudioRecorderError,\n} from \"./copilot-chat-input.types\";\n\n@Component({\n selector: \"copilot-chat-audio-recorder\",\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `\n <div [class]=\"computedClass()\">\n <canvas\n #canvasRef\n class=\"cpk:w-full cpk:h-full\"\n [style.imageRendering]=\"'pixelated'\"\n ></canvas>\n </div>\n `,\n host: {\n \"[class.copilot-chat-audio-recorder]\": \"true\",\n },\n})\nexport class CopilotChatAudioRecorder implements AfterViewInit {\n private readonly canvasRef =\n viewChild.required<ElementRef<HTMLCanvasElement>>(\"canvasRef\");\n\n inputClass = input<string | undefined>();\n inputShowControls = input<boolean>(false);\n\n stateChange = output<AudioRecorderState>();\n error = output<AudioRecorderError>();\n\n readonly state = signal<AudioRecorderState>(\"idle\");\n\n readonly computedClass = computed(() => {\n const baseClasses = \"cpk:h-11 cpk:w-full cpk:px-5\";\n return `${baseClasses} ${this.inputClass() || \"\"}`;\n });\n\n // Capture resources\n private mediaRecorder?: MediaRecorder;\n private stream?: MediaStream;\n private audioContext?: AudioContext;\n private analyser?: AnalyserNode;\n private audioChunks: Blob[] = [];\n\n // Guards the async window before `state` flips to \"recording\".\n private starting = false;\n\n // Waveform animation state\n private animationFrameId?: number;\n private amplitudeHistory: number[] = [];\n private scrollOffset = 0;\n private smoothedAmplitude = 0;\n private fadeOpacity = 0;\n\n constructor() {\n inject(DestroyRef).onDestroy(() => this.dispose());\n }\n\n ngAfterViewInit(): void {\n this.startAnimation();\n }\n\n /**\n * Request microphone access and start recording.\n */\n async start(): Promise<void> {\n if (this.starting || this.state() !== \"idle\") {\n return;\n }\n this.starting = true;\n\n try {\n const stream = await navigator.mediaDevices.getUserMedia({ audio: true });\n this.stream = stream;\n\n // Wire an analyser for the live waveform.\n const audioContext = new AudioContext();\n this.audioContext = audioContext;\n const source = audioContext.createMediaStreamSource(stream);\n const analyser = audioContext.createAnalyser();\n analyser.fftSize = 2048;\n source.connect(analyser);\n this.analyser = analyser;\n\n const mimeType = MediaRecorder.isTypeSupported(\"audio/webm;codecs=opus\")\n ? \"audio/webm;codecs=opus\"\n : MediaRecorder.isTypeSupported(\"audio/webm\")\n ? \"audio/webm\"\n : MediaRecorder.isTypeSupported(\"audio/mp4\")\n ? \"audio/mp4\"\n : \"\";\n\n const options: MediaRecorderOptions = mimeType ? { mimeType } : {};\n const mediaRecorder = new MediaRecorder(stream, options);\n this.mediaRecorder = mediaRecorder;\n this.audioChunks = [];\n\n mediaRecorder.ondataavailable = (event) => {\n if (event.data.size > 0) {\n this.audioChunks.push(event.data);\n }\n };\n\n mediaRecorder.start(100);\n this.setState(\"recording\");\n } catch (err) {\n this.cleanup();\n const error = this.toRecorderError(err);\n this.error.emit(error);\n this.setState(\"idle\");\n throw error;\n } finally {\n this.starting = false;\n }\n }\n\n /**\n * Stop recording and resolve with the captured audio.\n */\n stop(): Promise<Blob> {\n return new Promise<Blob>((resolve, reject) => {\n const mediaRecorder = this.mediaRecorder;\n if (!mediaRecorder || this.state() !== \"recording\") {\n reject(new AudioRecorderError(\"No active recording\"));\n return;\n }\n\n this.setState(\"processing\");\n\n mediaRecorder.onstop = () => {\n const mimeType = mediaRecorder.mimeType || \"audio/webm\";\n const audioBlob = new Blob(this.audioChunks, { type: mimeType });\n this.cleanup();\n this.setState(\"idle\");\n resolve(audioBlob);\n };\n\n mediaRecorder.onerror = () => {\n this.cleanup();\n const error = new AudioRecorderError(\"Recording failed\");\n this.error.emit(error);\n this.setState(\"idle\");\n reject(error);\n };\n\n mediaRecorder.stop();\n });\n }\n\n getState(): AudioRecorderState {\n return this.state();\n }\n\n /**\n * Release every capture/animation resource. Safe to call repeatedly.\n */\n dispose(): void {\n this.cleanup();\n }\n\n private setState(state: AudioRecorderState): void {\n this.state.set(state);\n this.stateChange.emit(state);\n }\n\n private toRecorderError(err: unknown): AudioRecorderError {\n if (err instanceof Error && err.name === \"NotAllowedError\") {\n return new AudioRecorderError(\"Microphone permission denied\");\n }\n if (err instanceof Error && err.name === \"NotFoundError\") {\n return new AudioRecorderError(\"No microphone found\");\n }\n return new AudioRecorderError(\n err instanceof Error ? err.message : \"Failed to start recording\",\n );\n }\n\n private cleanup(): void {\n if (this.animationFrameId) {\n cancelAnimationFrame(this.animationFrameId);\n this.animationFrameId = undefined;\n }\n if (this.mediaRecorder && this.mediaRecorder.state !== \"inactive\") {\n try {\n this.mediaRecorder.stop();\n } catch {\n // Ignore errors during cleanup\n }\n }\n this.stream?.getTracks().forEach((track) => track.stop());\n if (this.audioContext && this.audioContext.state !== \"closed\") {\n this.audioContext.close().catch(() => {});\n }\n this.mediaRecorder = undefined;\n this.stream = undefined;\n this.audioContext = undefined;\n this.analyser = undefined;\n this.audioChunks = [];\n this.amplitudeHistory = [];\n this.scrollOffset = 0;\n this.smoothedAmplitude = 0;\n this.fadeOpacity = 0;\n }\n\n /** RMS amplitude from time-domain samples (128 is silence). */\n private calculateAmplitude(dataArray: Uint8Array): number {\n let sum = 0;\n for (let i = 0; i < dataArray.length; i++) {\n const sample = (dataArray[i] ?? 128) / 128 - 1;\n sum += sample * sample;\n }\n return Math.sqrt(sum / dataArray.length);\n }\n\n private startAnimation(): void {\n const canvas = this.canvasRef().nativeElement;\n const ctx = canvas.getContext(\"2d\");\n if (!ctx) return;\n\n const barWidth = 2;\n const barGap = 1;\n const barSpacing = barWidth + barGap;\n const scrollSpeed = 1 / 3;\n\n const draw = () => {\n const rect = canvas.getBoundingClientRect();\n const dpr = window.devicePixelRatio || 1;\n\n if (\n canvas.width !== rect.width * dpr ||\n canvas.height !== rect.height * dpr\n ) {\n canvas.width = rect.width * dpr;\n canvas.height = rect.height * dpr;\n ctx.scale(dpr, dpr);\n }\n\n const maxBars = Math.floor(rect.width / barSpacing) + 2;\n\n if (this.analyser && this.state() === \"recording\") {\n if (this.amplitudeHistory.length === 0) {\n this.amplitudeHistory = new Array(maxBars).fill(0);\n }\n\n if (this.fadeOpacity < 1) {\n this.fadeOpacity = Math.min(1, this.fadeOpacity + 0.03);\n }\n\n this.scrollOffset += scrollSpeed;\n\n const bufferLength = this.analyser.fftSize;\n const dataArray = new Uint8Array(bufferLength);\n this.analyser.getByteTimeDomainData(dataArray);\n const rawAmplitude = this.calculateAmplitude(dataArray);\n\n const attackSpeed = 0.12;\n const decaySpeed = 0.08;\n const speed =\n rawAmplitude > this.smoothedAmplitude ? attackSpeed : decaySpeed;\n this.smoothedAmplitude +=\n (rawAmplitude - this.smoothedAmplitude) * speed;\n\n if (this.scrollOffset >= barSpacing) {\n this.scrollOffset -= barSpacing;\n this.amplitudeHistory.push(this.smoothedAmplitude);\n if (this.amplitudeHistory.length > maxBars) {\n this.amplitudeHistory = this.amplitudeHistory.slice(-maxBars);\n }\n }\n }\n\n ctx.clearRect(0, 0, rect.width, rect.height);\n\n const computedStyle = getComputedStyle(canvas);\n ctx.fillStyle = computedStyle.color;\n ctx.globalAlpha = this.fadeOpacity;\n\n const centerY = rect.height / 2;\n const maxAmplitude = rect.height / 2 - 2;\n const history = this.amplitudeHistory;\n\n if (history.length > 0) {\n const offset = this.scrollOffset;\n const edgeFadeWidth = 12;\n\n for (let i = 0; i < history.length; i++) {\n const amplitude = history[i] ?? 0;\n const scaledAmplitude = Math.min(amplitude * 4, 1);\n const barHeight = Math.max(2, scaledAmplitude * maxAmplitude * 2);\n\n const x = rect.width - (history.length - i) * barSpacing - offset;\n const y = centerY - barHeight / 2;\n\n if (x + barWidth > 0 && x < rect.width) {\n let edgeOpacity = 1;\n if (x < edgeFadeWidth) {\n edgeOpacity = Math.max(0, x / edgeFadeWidth);\n } else if (x > rect.width - edgeFadeWidth) {\n edgeOpacity = Math.max(0, (rect.width - x) / edgeFadeWidth);\n }\n ctx.globalAlpha = this.fadeOpacity * edgeOpacity;\n ctx.fillRect(x, y, barWidth, barHeight);\n }\n }\n }\n\n this.animationFrameId = requestAnimationFrame(draw);\n };\n\n draw();\n }\n}\n","import {\n Component,\n input,\n output,\n ChangeDetectionStrategy,\n computed,\n ViewEncapsulation,\n} from \"@angular/core\";\n\nimport {\n ArrowUp,\n CopilotIcon,\n Mic,\n X,\n Check,\n Plus,\n} from \"../icons/copilot-icon\";\nimport { injectChatLabels } from \"../../chat-config\";\nimport { CopilotTooltip } from \"../../directives/tooltip\";\nimport { cn } from \"../../utils\";\n\n// Base button classes matching React's button variants\nconst buttonBase = cn(\n \"cpk:inline-flex cpk:items-center cpk:justify-center cpk:gap-2 cpk:whitespace-nowrap cpk:rounded-md cpk:text-sm cpk:font-medium\",\n \"cpk:transition-all cpk:disabled:pointer-events-none cpk:disabled:opacity-50\",\n \"cpk:shrink-0 cpk:outline-none\",\n \"cpk:focus-visible:border-ring cpk:focus-visible:ring-ring/50 cpk:focus-visible:ring-[3px]\",\n);\n\nconst chatInputToolbarPrimary = cn(\n \"cpk:cursor-pointer\",\n // Background and text\n \"cpk:bg-black cpk:text-white\",\n // Dark mode\n \"cpk:dark:bg-white cpk:dark:text-black cpk:dark:focus-visible:outline-white\",\n // Shape and sizing\n \"cpk:rounded-full cpk:h-9 cpk:w-9\",\n // Interactions\n \"cpk:transition-colors\",\n // Focus states\n \"cpk:focus:outline-none\",\n // Hover states\n \"cpk:hover:opacity-70 cpk:disabled:hover:opacity-100\",\n // Disabled states\n \"cpk:disabled:cursor-not-allowed cpk:disabled:bg-[#00000014] cpk:disabled:text-[rgb(13,13,13)]\",\n \"cpk:dark:disabled:bg-[#454545] cpk:dark:disabled:text-white\",\n);\n\nconst chatInputToolbarSecondary = cn(\n \"cpk:cursor-pointer\",\n // Background and text\n \"cpk:bg-transparent cpk:text-[#444444]\",\n // Dark mode\n \"cpk:dark:text-white cpk:dark:border-[#404040]\",\n // Shape and sizing\n \"cpk:rounded-full cpk:h-9 cpk:w-9\",\n // Interactions\n \"cpk:transition-colors\",\n // Focus states\n \"cpk:focus:outline-none\",\n // Hover states\n \"cpk:hover:bg-[#f8f8f8] cpk:hover:text-[#333333]\",\n \"cpk:dark:hover:bg-[#404040] cpk:dark:hover:text-[#FFFFFF]\",\n // Disabled states\n \"cpk:disabled:cursor-not-allowed cpk:disabled:opacity-50\",\n \"cpk:disabled:hover:bg-transparent cpk:disabled:hover:text-[#444444]\",\n \"cpk:dark:disabled:hover:bg-transparent cpk:dark:disabled:hover:text-[#CCCCCC]\",\n);\n\n@Component({\n selector: \"copilot-chat-send-button\",\n imports: [CopilotIcon],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `\n <div class=\"cpk:mr-[10px]\">\n <button\n type=\"button\"\n aria-label=\"Send message\"\n [disabled]=\"disabled()\"\n [class]=\"buttonClass\"\n (click)=\"onClick()\"\n >\n <copilot-icon [img]=\"ArrowUpIcon\" [size]=\"18\"></copilot-icon>\n </button>\n </div>\n `,\n styles: [``],\n})\nexport class CopilotChatSendButton {\n disabled = input(false);\n clicked = output<void>();\n\n readonly ArrowUpIcon = ArrowUp;\n buttonClass = cn(buttonBase, chatInputToolbarPrimary);\n\n onClick(): void {\n if (!this.disabled()) {\n this.clicked.emit();\n }\n }\n}\n\n@Component({\n selector: \"copilot-chat-start-transcribe-button\",\n imports: [CopilotIcon, CopilotTooltip],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `\n <button\n type=\"button\"\n [attr.aria-label]=\"label\"\n [disabled]=\"disabled()\"\n [class]=\"buttonClass\"\n [copilotTooltip]=\"label\"\n tooltipPosition=\"below\"\n (click)=\"onClick()\"\n >\n <copilot-icon [img]=\"MicIcon\" [size]=\"18\"></copilot-icon>\n </button>\n `,\n styles: [``],\n})\nexport class CopilotChatStartTranscribeButton {\n disabled = input(false);\n clicked = output<void>();\n\n readonly labels = injectChatLabels();\n\n readonly MicIcon = Mic;\n buttonClass = cn(buttonBase, chatInputToolbarSecondary, \"cpk:mr-2\");\n\n get label(): string {\n return this.labels.chatInputToolbarStartTranscribeButtonLabel;\n }\n\n onClick(): void {\n if (!this.disabled()) {\n this.clicked.emit();\n }\n }\n}\n\n@Component({\n selector: \"copilot-chat-cancel-transcribe-button\",\n imports: [CopilotIcon, CopilotTooltip],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `\n <button\n type=\"button\"\n [attr.aria-label]=\"label\"\n [disabled]=\"disabled()\"\n [class]=\"buttonClass\"\n [copilotTooltip]=\"label\"\n tooltipPosition=\"below\"\n (click)=\"onClick()\"\n >\n <copilot-icon [img]=\"XIcon\" [size]=\"18\"></copilot-icon>\n </button>\n `,\n styles: [``],\n})\nexport class CopilotChatCancelTranscribeButton {\n disabled = input(false);\n clicked = output<void>();\n\n readonly labels = injectChatLabels();\n\n readonly XIcon = X;\n buttonClass = cn(buttonBase, chatInputToolbarSecondary, \"cpk:mr-2\");\n\n get label(): string {\n return this.labels.chatInputToolbarCancelTranscribeButtonLabel;\n }\n\n onClick(): void {\n if (!this.disabled()) {\n this.clicked.emit();\n }\n }\n}\n\n@Component({\n selector: \"copilot-chat-finish-transcribe-button\",\n imports: [CopilotIcon, CopilotTooltip],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `\n <button\n type=\"button\"\n [attr.aria-label]=\"label\"\n [disabled]=\"disabled()\"\n [class]=\"buttonClass\"\n [copilotTooltip]=\"label\"\n tooltipPosition=\"below\"\n (click)=\"onClick()\"\n >\n <copilot-icon [img]=\"CheckIcon\" [size]=\"18\"></copilot-icon>\n </button>\n `,\n styles: [``],\n})\nexport class CopilotChatFinishTranscribeButton {\n disabled = input(false);\n clicked = output<void>();\n\n readonly labels = injectChatLabels();\n\n readonly CheckIcon = Check;\n buttonClass = cn(buttonBase, chatInputToolbarSecondary, \"cpk:mr-[10px]\");\n\n get label(): string {\n return this.labels.chatInputToolbarFinishTranscribeButtonLabel;\n }\n\n onClick(): void {\n if (!this.disabled()) {\n this.clicked.emit();\n }\n }\n}\n\n@Component({\n selector: \"copilot-chat-add-file-button\",\n imports: [CopilotIcon, CopilotTooltip],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `\n <button\n type=\"button\"\n [attr.aria-label]=\"label\"\n [disabled]=\"disabled()\"\n [class]=\"buttonClass\"\n [copilotTooltip]=\"label\"\n tooltipPosition=\"below\"\n (click)=\"onClick()\"\n >\n <copilot-icon [img]=\"PlusIcon\" [size]=\"20\"></copilot-icon>\n </button>\n `,\n styles: [``],\n})\nexport class CopilotChatAddFileButton {\n disabled = input(false);\n clicked = output<void>();\n\n readonly labels = injectChatLabels();\n\n readonly PlusIcon = Plus;\n buttonClass = cn(buttonBase, chatInputToolbarSecondary, \"cpk:ml-2\");\n\n get label(): string {\n return this.labels.chatInputToolbarAddButtonLabel;\n }\n\n onClick(): void {\n if (!this.disabled()) {\n this.clicked.emit();\n }\n }\n}\n\n// Base toolbar button component that other buttons can use\n@Component({\n selector: \"copilot-chat-toolbar-button\",\n imports: [CopilotTooltip],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `\n <button\n type=\"button\"\n [disabled]=\"disabled()\"\n [class]=\"computedClass()\"\n [attr.aria-label]=\"title() || null\"\n [copilotTooltip]=\"title()\"\n tooltipPosition=\"below\"\n (click)=\"onClick()\"\n >\n <ng-content></ng-content>\n </button>\n `,\n styles: [``],\n})\nexport class CopilotChatToolbarButton {\n disabled = input(false);\n variant = input<\"primary\" | \"secondary\">(\"secondary\");\n customClass = input(\"\");\n title = input(\"\");\n\n clicked = output<void>();\n\n computedClass = computed(() => {\n const variantClass =\n this.variant() === \"primary\"\n ? chatInputToolbarPrimary\n : chatInputToolbarSecondary;\n return cn(buttonBase, variantClass, this.customClass());\n });\n\n onClick(): void {\n if (!this.disabled()) {\n this.clicked.emit();\n }\n }\n}\n","import {\n Component,\n input,\n computed,\n ChangeDetectionStrategy,\n ViewEncapsulation,\n} from \"@angular/core\";\n\nimport { cn } from \"../../utils\";\n\n@Component({\n selector: \"div[copilotChatToolbar]\",\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n \"[class]\": \"computedClass()\",\n },\n template: `\n <ng-content></ng-content>\n `,\n styles: [],\n})\nexport class CopilotChatToolbar {\n readonly inputClass = input<string | undefined>();\n\n readonly computedClass = computed(() => {\n const baseClasses =\n \"cpk:w-full cpk:h-[60px] cpk:bg-transparent cpk:flex cpk:items-center cpk:justify-between\";\n return cn(baseClasses, this.inputClass());\n });\n}\n","import {\n Component,\n input,\n computed,\n ChangeDetectionStrategy,\n ViewEncapsulation,\n} from \"@angular/core\";\n\nimport { CdkMenuModule } from \"@angular/cdk/menu\";\nimport { OverlayModule } from \"@angular/cdk/overlay\";\nimport { ChevronRight, CopilotIcon, Plus } from \"../icons/copilot-icon\";\nimport type { ToolsMenuItem } from \"./copilot-chat-input.types\";\nimport { cn } from \"../../utils\";\nimport { injectChatLabels } from \"../../chat-config\";\nimport { CopilotTooltip } from \"../../directives/tooltip\";\n\n@Component({\n selector: \"copilot-chat-tools-menu\",\n imports: [CdkMenuModule, OverlayModule, CopilotIcon, CopilotTooltip],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `\n <button\n type=\"button\"\n [attr.aria-label]=\"tooltipLabel()\"\n [disabled]=\"triggerDisabled()\"\n [class]=\"buttonClass()\"\n [cdkMenuTriggerFor]=\"menu\"\n [copilotTooltip]=\"tooltipLabel()\"\n tooltipPosition=\"below\"\n >\n <copilot-icon [img]=\"PlusIcon\" [size]=\"20\"></copilot-icon>\n </button>\n\n <ng-template #menu>\n <div\n data-copilotkit\n class=\"cpk:bg-popover cpk:text-popover-foreground cpk:z-50 cpk:max-h-[var(--radix-dropdown-menu-content-available-height)] cpk:min-w-[8rem] cpk:overflow-x-hidden cpk:overflow-y-auto cpk:rounded-md cpk:border cpk:p-1 cpk:shadow-md\"\n cdkMenu\n >\n @for (item of menuItems(); track $index) {\n @if (item === \"-\") {\n <div class=\"cpk:-mx-1 cpk:my-1 cpk:h-px cpk:bg-border\"></div>\n } @else if (isMenuItem(item)) {\n @if (item.items && item.items.length > 0) {\n <!-- Submenu trigger -->\n <button\n type=\"button\"\n class=\"cpk:relative cpk:flex cpk:w-full cpk:cursor-default cpk:select-none cpk:items-center cpk:gap-2 cpk:rounded-sm cpk:border-none cpk:bg-transparent cpk:px-2 cpk:py-1.5 cpk:text-left cpk:text-sm cpk:outline-hidden cpk:hover:bg-accent cpk:hover:text-accent-foreground cpk:focus:bg-accent cpk:focus:text-accent-foreground\"\n [cdkMenuTriggerFor]=\"submenu\"\n cdkMenuItem\n >\n {{ item.label }}\n <copilot-icon\n [img]=\"ChevronRightIcon\"\n [size]=\"12\"\n class=\"cpk:ml-auto\"\n ></copilot-icon>\n </button>\n\n <!-- Submenu template -->\n <ng-template #submenu>\n <div\n data-copilotkit\n class=\"cpk:bg-popover cpk:text-popover-foreground cpk:z-50 cpk:max-h-[var(--radix-dropdown-menu-content-available-height)] cpk:min-w-[8rem] cpk:overflow-x-hidden cpk:overflow-y-auto cpk:rounded-md cpk:border cpk:p-1 cpk:shadow-md\"\n cdkMenu\n >\n @for (subItem of item.items; track $index) {\n @if (subItem === \"-\") {\n <div class=\"cpk:-mx-1 cpk:my-1 cpk:h-px cpk:bg-border\"></div>\n } @else if (isMenuItem(subItem)) {\n <button\n type=\"button\"\n class=\"cpk:relative cpk:flex cpk:w-full cpk:cursor-default cpk:select-none cpk:items-center cpk:gap-2 cpk:rounded-sm cpk:border-none cpk:bg-transparent cpk:px-2 cpk:py-1.5 cpk:text-left cpk:text-sm cpk:outline-hidden cpk:hover:bg-accent cpk:hover:text-accent-foreground cpk:focus:bg-accent cpk:focus:text-accent-foreground\"\n (click)=\"handleItemClick(subItem)\"\n cdkMenuItem\n >\n {{ subItem.label }}\n </button>\n }\n }\n </div>\n </ng-template>\n } @else {\n <!-- Regular menu item -->\n <button\n type=\"button\"\n class=\"cpk:relative cpk:flex cpk:w-full cpk:cursor-default cpk:select-none cpk:items-center cpk:gap-2 cpk:rounded-sm cpk:border-none cpk:bg-transparent cpk:px-2 cpk:py-1.5 cpk:text-left cpk:text-sm cpk:outline-hidden cpk:hover:bg-accent cpk:hover:text-accent-foreground cpk:focus:bg-accent cpk:focus:text-accent-foreground\"\n (click)=\"handleItemClick(item)\"\n cdkMenuItem\n >\n {{ item.label }}\n </button>\n }\n }\n }\n </div>\n </ng-template>\n `,\n styles: [\n `\n /* CDK Overlay styles for positioning */\n .cdk-overlay-pane {\n position: absolute;\n pointer-events: auto;\n z-index: 1000;\n }\n\n /* Ensure menu appears above other content */\n .cdk-overlay-container {\n position: fixed;\n z-index: 1000;\n }\n\n /* Menu animation */\n [cdkMenu] {\n animation: menuFadeIn 0.15s ease-out;\n }\n\n @keyframes menuFadeIn {\n from {\n opacity: 0;\n transform: translateY(4px);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n }\n `,\n ],\n})\nexport class CopilotChatToolsMenu {\n readonly PlusIcon = Plus;\n readonly ChevronRightIcon = ChevronRight;\n inputToolsMenu = input<(ToolsMenuItem | \"-\")[] | undefined>();\n inputDisabled = input<boolean | undefined>();\n inputClass = input<string | undefined>();\n inputAddFile = input<(() => void) | undefined>();\n\n private labels = injectChatLabels();\n\n // Derive state from inputs\n toolsMenu = computed(() => this.inputToolsMenu() ?? []);\n disabled = computed(() => this.inputDisabled() ?? false);\n customClass = computed(() => this.inputClass());\n addFile = computed(() => this.inputAddFile());\n\n menuItems = computed<(ToolsMenuItem | \"-\")[]>(() => {\n const items: (ToolsMenuItem | \"-\")[] = [];\n const addFile = this.addFile();\n\n if (addFile) {\n items.push({\n label: this.labels.chatInputToolbarAddButtonLabel,\n action: addFile,\n });\n }\n\n for (const item of this.toolsMenu()) {\n if (item === \"-\") {\n if (items.length === 0 || items[items.length - 1] === \"-\") {\n continue;\n }\n items.push(item);\n } else {\n items.push(item);\n }\n }\n\n while (items.length > 0 && items[items.length - 1] === \"-\") {\n items.pop();\n }\n\n return items;\n });\n\n hasItems = computed(() => this.menuItems().length > 0);\n triggerDisabled = computed(() => this.disabled() || !this.hasItems());\n\n readonly label = this.labels.chatInputToolbarToolsButtonLabel;\n\n tooltipLabel = computed(() =>\n this.addFile()\n ? this.labels.chatInputToolbarAddButtonLabel\n : this.labels.chatInputToolbarToolsButtonLabel,\n );\n\n buttonClass = computed(() => {\n const baseClasses = cn(\n // Base button styles\n \"cpk:inline-flex cpk:items-center cpk:justify-center cpk:gap-2 cpk:whitespace-nowrap cpk:rounded-full cpk:text-sm cpk:font-medium\",\n \"cpk:transition-all cpk:disabled:pointer-events-none cpk:disabled:opacity-50\",\n \"cpk:shrink-0 cpk:outline-none\",\n \"cpk:focus-visible:ring-[3px]\",\n // chatInputToolbarSecondary variant\n \"cpk:cursor-pointer\",\n \"cpk:bg-transparent cpk:text-[#444444]\",\n \"cpk:dark:text-white cpk:dark:border-[#404040]\",\n \"cpk:transition-colors\",\n \"cpk:focus:outline-none\",\n \"cpk:hover:bg-[#f8f8f8] cpk:hover:text-[#333333]\",\n \"cpk:dark:hover:bg-[#404040] cpk:dark:hover:text-[#FFFFFF]\",\n \"cpk:disabled:cursor-not-allowed cpk:disabled:opacity-50\",\n \"cpk:disabled:hover:bg-transparent cpk:disabled:hover:text-[#444444]\",\n \"cpk:dark:disabled:hover:bg-transparent cpk:dark:disabled:hover:text-[#CCCCCC]\",\n // Size\n \"cpk:h-9 cpk:w-9\",\n );\n return cn(baseClasses, this.customClass());\n });\n\n isMenuItem(item: any): item is ToolsMenuItem {\n return item && typeof item === \"object\" && \"label\" in item;\n }\n\n handleItemClick(item: ToolsMenuItem): void {\n if (item.action) {\n item.action();\n }\n }\n}\n","import {\n Component,\n TemplateRef,\n signal,\n computed,\n ChangeDetectionStrategy,\n OnDestroy,\n Type,\n ViewEncapsulation,\n contentChild,\n input,\n output,\n viewChild,\n afterNextRender,\n inject,\n} from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\nimport { CopilotSlot } from \"../../slots/copilot-slot\";\nimport { injectChatLabels } from \"../../chat-config\";\nimport { ArrowUp, CopilotIcon } from \"../icons/copilot-icon\";\nimport { CopilotChatTextarea } from \"./copilot-chat-textarea\";\nimport { CopilotChatAudioRecorder } from \"./copilot-chat-audio-recorder\";\nimport {\n CopilotChatStartTranscribeButton,\n CopilotChatCancelTranscribeButton,\n CopilotChatFinishTranscribeButton,\n CopilotChatAddFileButton,\n} from \"./copilot-chat-buttons\";\nimport { CopilotChatToolbar } from \"./copilot-chat-toolbar\";\nimport { CopilotChatToolsMenu } from \"./copilot-chat-tools-menu\";\nimport type {\n CopilotChatInputMode,\n ToolsMenuItem,\n} from \"./copilot-chat-input.types\";\nimport { cn } from \"../../utils\";\nimport { injectChatState } from \"../../chat-state\";\nimport { explicitEffect } from \"../../explicit-effect\";\nimport { CopilotKit } from \"../../copilotkit\";\n\n/**\n * Context provided to slot templates\n */\nexport interface SendButtonContext {\n send: () => void;\n disabled: boolean;\n value: string;\n}\n\nexport interface ToolbarContext {\n mode: CopilotChatInputMode;\n value: string;\n}\n\n@Component({\n selector: \"copilot-chat-input\",\n host: { \"data-copilotkit\": \"\", class: \"cpk:block cpk:w-full\" },\n imports: [\n CommonModule,\n CopilotSlot,\n CopilotIcon,\n CopilotChatTextarea,\n CopilotChatAudioRecorder,\n CopilotChatStartTranscribeButton,\n CopilotChatCancelTranscribeButton,\n CopilotChatFinishTranscribeButton,\n CopilotChatAddFileButton,\n CopilotChatToolsMenu,\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `\n <ng-template #mainInputArea>\n @if (computedMode() === \"transcribe\") {\n @if (audioRecorderTemplate() || audioRecorderComponent()) {\n <copilot-slot\n [slot]=\"audioRecorderTemplate() || audioRecorderComponent()\"\n [context]=\"audioRecorderContext()\"\n [defaultComponent]=\"defaultAudioRecorder\"\n >\n </copilot-slot>\n } @else {\n <copilot-chat-audio-recorder [inputShowControls]=\"true\">\n </copilot-chat-audio-recorder>\n }\n } @else {\n @if (textAreaTemplate() || textAreaComponent()) {\n <copilot-slot\n [slot]=\"textAreaTemplate() || textAreaComponent()\"\n [context]=\"textAreaContext()\"\n >\n </copilot-slot>\n } @else {\n <textarea\n copilotChatTextarea\n [inputValue]=\"computedValue()\"\n [inputAutoFocus]=\"computedAutoFocus()\"\n [inputDisabled]=\"computedMode() === 'processing'\"\n [inputClass]=\"defaultTextAreaClass()\"\n [inputMaxRows]=\"textAreaMaxRows()\"\n [inputPlaceholder]=\"textAreaPlaceholder()\"\n (keyDown)=\"handleKeyDown($event)\"\n (valueChange)=\"handleValueChange($event)\"\n ></textarea>\n }\n }\n </ng-template>\n\n <ng-template #leadingToolbarItems>\n @if (\n addFileButtonTemplate() ||\n addFileButtonComponent() ||\n toolsButtonTemplate() ||\n toolsButtonComponent()\n ) {\n @if (addFileButtonTemplate() || addFileButtonComponent()) {\n <copilot-slot\n [slot]=\"addFileButtonTemplate() || addFileButtonComponent()\"\n [context]=\"{\n inputDisabled: addFileButtonDisabled(),\n }\"\n [outputs]=\"addFileButtonOutputs\"\n [defaultComponent]=\"CopilotChatAddFileButton\"\n >\n </copilot-slot>\n } @else if (chatState.attachmentsEnabled()) {\n <copilot-chat-add-file-button\n [disabled]=\"addFileButtonDisabled()\"\n (clicked)=\"handleAddFile()\"\n >\n </copilot-chat-add-file-button>\n }\n @if (computedToolsMenu().length > 0) {\n @if (toolsButtonTemplate() || toolsButtonComponent()) {\n <copilot-slot\n [slot]=\"toolsButtonTemplate() || toolsButtonComponent()\"\n [context]=\"toolsContext()\"\n [defaultComponent]=\"CopilotChatToolsMenu\"\n >\n </copilot-slot>\n } @else {\n <copilot-chat-tools-menu\n [inputToolsMenu]=\"computedToolsMenu()\"\n [inputDisabled]=\"computedMode() === 'transcribe'\"\n >\n </copilot-chat-tools-menu>\n }\n }\n } @else {\n <copilot-chat-tools-menu\n [inputToolsMenu]=\"computedToolsMenu()\"\n [inputAddFile]=\"addFileMenuAction()\"\n [inputDisabled]=\"computedMode() === 'transcribe'\"\n >\n </copilot-chat-tools-menu>\n }\n @if (additionalToolbarItems()) {\n <ng-container\n [ngTemplateOutlet]=\"additionalToolbarItems() || null\"\n ></ng-container>\n }\n </ng-template>\n\n <ng-template #trailingToolbarItems>\n @if (computedMode() === \"transcribe\") {\n @if (\n cancelTranscribeButtonTemplate() || cancelTranscribeButtonComponent()\n ) {\n <copilot-slot\n [slot]=\"\n cancelTranscribeButtonTemplate() || cancelTranscribeButtonComponent()\n \"\n [context]=\"{}\"\n [outputs]=\"cancelTranscribeButtonOutputs\"\n [defaultComponent]=\"CopilotChatCancelTranscribeButton\"\n >\n </copilot-slot>\n } @else {\n <copilot-chat-cancel-transcribe-button\n (clicked)=\"handleCancelTranscribe()\"\n >\n </copilot-chat-cancel-transcribe-button>\n }\n @if (\n finishTranscribeButtonTemplate() || finishTranscribeButtonComponent()\n ) {\n <copilot-slot\n [slot]=\"\n finishTranscribeButtonTemplate() || finishTranscribeButtonComponent()\n \"\n [context]=\"{}\"\n [outputs]=\"finishTranscribeButtonOutputs\"\n [defaultComponent]=\"CopilotChatFinishTranscribeButton\"\n >\n </copilot-slot>\n } @else {\n <copilot-chat-finish-transcribe-button\n (clicked)=\"handleFinishTranscribe()\"\n >\n </copilot-chat-finish-transcribe-button>\n }\n } @else {\n @if (audioTranscriptionEnabled()) {\n @if (\n startTranscribeButtonTemplate() || startTranscribeButtonComponent()\n ) {\n <copilot-slot\n [slot]=\"\n startTranscribeButtonTemplate() || startTranscribeButtonComponent()\n \"\n [context]=\"{}\"\n [outputs]=\"startTranscribeButtonOutputs\"\n [defaultComponent]=\"CopilotChatStartTranscribeButton\"\n >\n </copilot-slot>\n } @else {\n <copilot-chat-start-transcribe-button\n (clicked)=\"handleStartTranscribe()\"\n >\n </copilot-chat-start-transcribe-button>\n }\n }\n <!-- Send button with slot -->\n @if (sendButtonTemplate() || sendButtonComponent()) {\n <copilot-slot\n [slot]=\"sendButtonTemplate() || sendButtonComponent()\"\n [context]=\"sendButtonContext()\"\n [outputs]=\"sendButtonOutputs\"\n >\n </copilot-slot>\n } @else {\n <div class=\"cpk:mr-[10px]\">\n <button\n type=\"button\"\n aria-label=\"Send message\"\n [class]=\"sendButtonClass() || defaultButtonClass\"\n [disabled]=\"sendButtonDisabled()\"\n (click)=\"send()\"\n >\n <copilot-icon [img]=\"ArrowUpIcon\" [size]=\"18\"></copilot-icon>\n </button>\n </div>\n }\n }\n </ng-template>\n\n <div [class]=\"computedClass()\">\n @if (toolbarTemplate() || toolbarComponent()) {\n <ng-container [ngTemplateOutlet]=\"mainInputArea\"></ng-container>\n <copilot-slot\n [slot]=\"toolbarTemplate() || toolbarComponent()\"\n [context]=\"toolbarContext()\"\n [defaultComponent]=\"CopilotChatToolbar\"\n >\n </copilot-slot>\n } @else {\n <div\n class=\"cpk:grid cpk:w-full cpk:grid-cols-[auto_minmax(0,1fr)_auto] cpk:items-center cpk:gap-x-3 cpk:gap-y-3 cpk:px-3 cpk:py-2\"\n data-layout=\"compact\"\n >\n <div class=\"cpk:col-start-1 cpk:row-start-1 cpk:flex cpk:items-center\">\n <ng-container [ngTemplateOutlet]=\"leadingToolbarItems\"></ng-container>\n </div>\n <div\n class=\"cpk:relative cpk:col-start-2 cpk:row-start-1 cpk:flex cpk:min-h-[50px] cpk:min-w-0 cpk:flex-col cpk:justify-center\"\n >\n <ng-container [ngTemplateOutlet]=\"mainInputArea\"></ng-container>\n </div>\n <div\n class=\"cpk:col-start-3 cpk:row-start-1 cpk:flex cpk:items-center cpk:justify-end cpk:gap-2\"\n >\n <ng-container [ngTemplateOutlet]=\"trailingToolbarItems\"></ng-container>\n </div>\n </div>\n }\n </div>\n `,\n styles: [\n `\n .ck-input-shadow {\n box-shadow:\n 0 4px 4px 0 #0000000a,\n 0 0 1px 0 #0000009e !important;\n }\n `,\n ],\n})\nexport class CopilotChatInput implements OnDestroy {\n readonly textAreaRef = viewChild(CopilotChatTextarea);\n\n readonly audioRecorderRef = viewChild(CopilotChatAudioRecorder);\n\n // Capture templates from content projection\n readonly sendButtonTemplate = contentChild<\n unknown,\n TemplateRef<SendButtonContext>\n >(\"sendButton\", { read: TemplateRef });\n readonly toolbarTemplate = contentChild<unknown, TemplateRef<ToolbarContext>>(\n \"toolbar\",\n { read: TemplateRef },\n );\n readonly textAreaTemplate = contentChild<unknown, TemplateRef<any>>(\n \"textArea\",\n { read: TemplateRef },\n );\n readonly audioRecorderTemplate = contentChild<unknown, TemplateRef<any>>(\n \"audioRecorder\",\n { read: TemplateRef },\n );\n readonly startTranscribeButtonTemplate = contentChild<\n unknown,\n TemplateRef<any>\n >(\"startTranscribeButton\", { read: TemplateRef });\n readonly cancelTranscribeButtonTemplate = contentChild<\n unknown,\n TemplateRef<any>\n >(\"cancelTranscribeButton\", { read: TemplateRef });\n readonly finishTranscribeButtonTemplate = contentChild<\n unknown,\n TemplateRef<any>\n >(\"finishTranscribeButton\", { read: TemplateRef });\n readonly addFileButtonTemplate = contentChild<unknown, TemplateRef<any>>(\n \"addFileButton\",\n { read: TemplateRef },\n );\n readonly toolsButtonTemplate = contentChild<unknown, TemplateRef<any>>(\n \"toolsButton\",\n { read: TemplateRef },\n );\n\n // Class inputs for styling default components\n sendButtonClass = input<string | undefined>(undefined);\n toolbarClass = input<string | undefined>(undefined);\n textAreaClass = input<string | undefined>(undefined);\n textAreaMaxRows = input<number | undefined>(undefined);\n textAreaPlaceholder = input<string | undefined>(undefined);\n audioRecorderClass = input<string | undefined>(undefined);\n startTranscribeButtonClass = input<string | undefined>(undefined);\n cancelTranscribeButtonClass = input<string | undefined>(undefined);\n finishTranscribeButtonClass = input<string | undefined>(undefined);\n addFileButtonClass = input<string | undefined>(undefined);\n toolsButtonClass = input<string | undefined>(undefined);\n\n // Component inputs for overrides\n sendButtonComponent = input<Type<any> | undefined>(undefined);\n toolbarComponent = input<Type<any> | undefined>(undefined);\n textAreaComponent = input<Type<any> | undefined>(undefined);\n audioRecorderComponent = input<Type<any> | undefined>(undefined);\n startTranscribeButtonComponent = input<Type<any> | undefined>(undefined);\n cancelTranscribeButtonComponent = input<Type<any> | undefined>(undefined);\n finishTranscribeButtonComponent = input<Type<any> | undefined>(undefined);\n addFileButtonComponent = input<Type<any> | undefined>(undefined);\n toolsButtonComponent = input<Type<any> | undefined>(undefined);\n\n // Regular inputs\n mode = input<CopilotChatInputMode | undefined>(undefined);\n toolsMenu = input<(ToolsMenuItem | \"-\")[] | undefined>(undefined);\n autoFocus = input<boolean | undefined>(undefined);\n value = input<string | undefined>(undefined);\n inputClass = input<string | undefined>(undefined);\n // Note: Prefer host `class` for styling this component;\n // keep only `inputClass` to style the internal wrapper if needed.\n additionalToolbarItems = input<TemplateRef<any> | undefined>(undefined);\n\n // Output events\n submitMessage = output<string>();\n startTranscribe = output<void>();\n cancelTranscribe = output<void>();\n finishTranscribe = output<void>();\n finishTranscribeWithAudio = output<Blob>();\n addFile = output<void>();\n valueChange = output<string>();\n\n // Icons and default classes\n readonly ArrowUpIcon = ArrowUp;\n readonly defaultButtonClass = cn(\n // Base button styles\n \"cpk:inline-flex cpk:items-center cpk:justify-center cpk:gap-2 cpk:whitespace-nowrap cpk:rounded-md cpk:text-sm cpk:font-medium\",\n \"cpk:transition-all cpk:disabled:pointer-events-none cpk:disabled:opacity-50\",\n \"cpk:shrink-0 cpk:outline-none\",\n \"cpk:focus-visible:border-ring cpk:focus-visible:ring-ring/50 cpk:focus-visible:ring-[3px]\",\n // chatInputToolbarPrimary variant\n \"cpk:cursor-pointer\",\n \"cpk:bg-black cpk:text-white\",\n \"cpk:dark:bg-white cpk:dark:text-black cpk:dark:focus-visible:outline-white\",\n \"cpk:rounded-full cpk:h-9 cpk:w-9\",\n \"cpk:transition-colors\",\n \"cpk:focus:outline-none\",\n \"cpk:hover:opacity-70 cpk:disabled:hover:opacity-100\",\n \"cpk:disabled:cursor-not-allowed cpk:disabled:bg-[#00000014] cpk:disabled:text-[rgb(13,13,13)]\",\n \"cpk:dark:disabled:bg-[#454545] cpk:dark:disabled:text-white\",\n );\n\n // Services\n readonly labels = injectChatLabels();\n // readonly chatConfig = injectChatConfig();\n readonly chatState = injectChatState();\n readonly copilotKit = inject(CopilotKit);\n\n // Signals\n modeSignal = signal<CopilotChatInputMode>(\"input\");\n toolsMenuSignal = signal<(ToolsMenuItem | \"-\")[]>([]);\n autoFocusSignal = signal<boolean>(true);\n customClass = signal<string | undefined>(undefined);\n\n // Default components\n // Note: CopilotChatTextarea uses attribute selector but is a component\n defaultAudioRecorder = CopilotChatAudioRecorder;\n defaultSendButton: any = null; // Will be set to avoid circular dependency\n CopilotChatToolbar = CopilotChatToolbar;\n CopilotChatAddFileButton = CopilotChatAddFileButton;\n CopilotChatToolsMenu = CopilotChatToolsMenu;\n CopilotChatCancelTranscribeButton = CopilotChatCancelTranscribeButton;\n CopilotChatFinishTranscribeButton = CopilotChatFinishTranscribeButton;\n CopilotChatStartTranscribeButton = CopilotChatStartTranscribeButton;\n\n // Computed values\n computedMode = computed(() => this.mode() ?? this.modeSignal());\n computedToolsMenu = computed(() => this.toolsMenu() ?? []);\n computedAutoFocus = computed(() => this.autoFocus() ?? true);\n audioTranscriptionEnabled = computed(\n () => this.copilotKit.audioFileTranscriptionEnabled() === true,\n );\n computedValue = computed(() => {\n const customValue = this.value();\n return customValue !== undefined\n ? customValue\n : (this.chatState.inputValue() ?? \"\");\n });\n addFileButtonDisabled = computed(\n () =>\n this.computedMode() === \"transcribe\" ||\n !this.chatState.attachmentsEnabled(),\n );\n addFileMenuAction = computed<(() => void) | undefined>(() =>\n this.chatState.attachmentsEnabled()\n ? () => this.handleAddFile()\n : undefined,\n );\n sendButtonDisabled = computed(\n () =>\n !this.computedValue().trim() ||\n this.computedMode() === \"processing\" ||\n this.chatState.attachmentsUploading(),\n );\n\n computedClass = computed(() => {\n const baseClasses = cn(\n // V1 compatibility class for custom styling\n \"copilotKitInput\",\n // Layout\n \"cpk:flex cpk:w-full cpk:flex-col cpk:items-center cpk:justify-center\",\n // Interaction\n \"cpk:cursor-text\",\n // Overflow and clipping\n \"cpk:overflow-visible cpk:bg-clip-padding cpk:contain-inline-size\",\n // Background\n \"cpk:bg-white cpk:dark:bg-[#303030]\",\n // Visual effects\n \"ck-input-shadow cpk:rounded-[28px]\",\n );\n return cn(baseClasses, this.customClass());\n });\n\n defaultTextAreaClass = computed(() =>\n cn(\"cpk:w-full cpk:py-3 cpk:pr-5\", this.textAreaClass()),\n );\n\n // Context for slots (reactive via signals)\n sendButtonContext = computed<SendButtonContext>(() => ({\n send: () => this.send(),\n disabled: this.sendButtonDisabled(),\n value: this.computedValue(),\n }));\n\n toolbarContext = computed<ToolbarContext>(() => ({\n mode: this.computedMode(),\n value: this.computedValue(),\n }));\n\n textAreaContext = computed(() => ({\n value: this.computedValue(),\n autoFocus: this.computedAutoFocus(),\n disabled: this.computedMode() === \"processing\",\n maxRows: this.textAreaMaxRows(),\n placeholder: this.textAreaPlaceholder(),\n inputClass: this.textAreaClass(),\n onKeyDown: (event: KeyboardEvent) => this.handleKeyDown(event),\n onChange: (value: string) => this.handleValueChange(value),\n }));\n\n audioRecorderContext = computed(() => ({\n inputShowControls: true,\n }));\n\n // Button contexts removed - now using outputs map for click handlers\n\n toolsContext = computed(() => ({\n inputToolsMenu: this.computedToolsMenu(),\n inputDisabled: this.computedMode() === \"transcribe\",\n }));\n\n constructor() {\n explicitEffect(\n () => ({\n recorder: this.audioRecorderRef(),\n mode: this.computedMode(),\n }),\n ({ recorder, mode }) => {\n if (!recorder) return;\n if (mode === \"transcribe\") {\n if (recorder.getState() === \"idle\") {\n recorder.start().catch((error) => console.error(error));\n }\n } else if (recorder.getState() === \"recording\") {\n recorder.stop().catch((error) => console.error(error));\n }\n },\n );\n\n afterNextRender(() => {\n if (this.computedAutoFocus()) {\n this.textAreaRef()?.focus();\n }\n });\n }\n\n // Output maps for slots\n addFileButtonOutputs = { clicked: () => this.handleAddFile() };\n cancelTranscribeButtonOutputs = {\n clicked: () => this.handleCancelTranscribe(),\n };\n finishTranscribeButtonOutputs = {\n clicked: () => this.handleFinishTranscribe(),\n };\n startTranscribeButtonOutputs = {\n clicked: () => this.handleStartTranscribe(),\n };\n // Support both `clicked` (idiomatic in our slots) and `click` (legacy)\n sendButtonOutputs = { clicked: () => this.send(), click: () => this.send() };\n\n ngOnDestroy(): void {\n // Clean up any resources\n const recorder = this.audioRecorderRef();\n if (recorder?.getState() === \"recording\") {\n recorder.stop().catch(console.error);\n }\n }\n\n handleKeyDown(event: KeyboardEvent): void {\n // Skip key handling during IME composition (e.g. CJK input).\n // The compositionend event will fire separately when composition ends.\n if (event.isComposing || event.keyCode === 229) {\n return;\n }\n\n if (event.key === \"Enter\" && !event.shiftKey) {\n event.preventDefault();\n this.send();\n }\n }\n\n handleValueChange(value: string): void {\n this.valueChange.emit(value);\n if (this.chatState) this.chatState.changeInput(value);\n }\n\n send(): void {\n const trimmed = this.computedValue().trim();\n if (trimmed && !this.chatState.attachmentsUploading()) {\n this.submitMessage.emit(trimmed);\n\n this.chatState.submitInput(trimmed);\n\n if (this.chatState) this.chatState.changeInput(\"\");\n this.textAreaRef()?.setValue(\"\");\n\n // Refocus input\n if (this.textAreaRef()) {\n setTimeout(() => {\n this.textAreaRef()?.focus();\n });\n }\n }\n }\n\n handleStartTranscribe(): void {\n if (!this.audioTranscriptionEnabled()) {\n return;\n }\n this.startTranscribe.emit();\n this.modeSignal.set(\"transcribe\");\n }\n\n handleCancelTranscribe(): void {\n this.cancelTranscribe.emit();\n this.modeSignal.set(\"input\");\n }\n\n async handleFinishTranscribe(): Promise<void> {\n const recorder = this.audioRecorderRef();\n let audioBlob: Blob | undefined;\n if (recorder?.getState() === \"recording\") {\n try {\n audioBlob = await recorder.stop();\n } catch (error) {\n console.error(\"Failed to stop recording:\", error);\n }\n }\n\n this.finishTranscribe.emit();\n this.modeSignal.set(\"input\");\n\n if (audioBlob) {\n this.finishTranscribeWithAudio.emit(audioBlob);\n await this.chatState.finishTranscription(audioBlob);\n }\n }\n\n handleAddFile(): void {\n if (this.addFileButtonDisabled()) {\n return;\n }\n this.addFile.emit();\n this.chatState.addFile();\n }\n}\n","import {\n Component,\n input,\n ChangeDetectionStrategy,\n ViewEncapsulation,\n} from \"@angular/core\";\n\nimport { cn } from \"../..//utils\";\nimport { injectChatLabels } from \"../../chat-config\";\n\n/**\n * Disclaimer component for CopilotChatView\n * Shows configurable disclaimer text below the input\n * Integrates with CopilotChatConfigurationService for labels\n */\n@Component({\n selector: \"copilot-chat-view-disclaimer\",\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `\n <div [class]=\"computedClass\">\n {{ disclaimerText }}\n </div>\n `,\n})\nexport class CopilotChatViewDisclaimer {\n inputClass = input<string | undefined>();\n text = input<string | undefined>();\n\n readonly labels = injectChatLabels();\n\n // Get disclaimer text from input or configuration\n get disclaimerText(): string {\n if (this.text()) {\n return this.text() as string;\n }\n\n return this.labels.chatDisclaimerText;\n }\n\n // Computed class matching React exactly\n get computedClass(): string {\n return cn(\n \"cpk:text-center cpk:text-xs cpk:text-muted-foreground cpk:py-3 cpk:px-4 cpk:max-w-3xl cpk:mx-auto\",\n this.inputClass(),\n );\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n computed,\n input,\n output,\n ViewEncapsulation,\n} from \"@angular/core\";\nimport type { Attachment } from \"@copilotkit/shared\";\nimport {\n formatFileSize,\n getDocumentIcon,\n getSourceUrl,\n} from \"@copilotkit/shared\";\nimport { cn } from \"../../utils\";\n\n@Component({\n selector: \"copilot-chat-attachment-queue\",\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: { \"data-copilotkit\": \"\" },\n template: `\n @if (attachments().length > 0) {\n <div data-testid=\"copilot-attachment-queue\" [class]=\"computedClass()\">\n @for (attachment of attachments(); track attachment.id) {\n <div [class]=\"itemClass(attachment)\">\n @if (attachment.status === \"uploading\") {\n <div class=\"copilotKitAttachmentQueueOverlay\">\n <div class=\"copilotKitAttachmentQueueSpinner\"></div>\n </div>\n }\n\n @if (attachment.status === \"uploading\") {\n <div class=\"copilotKitAttachmentQueuePreviewPlaceholder\"></div>\n } @else {\n @switch (attachment.type) {\n @case (\"image\") {\n <img\n [src]=\"sourceUrl(attachment)\"\n [alt]=\"attachment.filename || 'Image attachment'\"\n class=\"copilotKitAttachmentQueuePreviewImage\"\n />\n }\n @case (\"audio\") {\n <div class=\"copilotKitAttachmentQueuePreviewAudio\">\n <audio\n [src]=\"sourceUrl(attachment)\"\n controls\n preload=\"metadata\"\n ></audio>\n @if (attachment.filename) {\n <span class=\"copilotKitAttachmentQueueFilename\">\n {{ attachment.filename }}\n </span>\n }\n </div>\n }\n @case (\"video\") {\n <div class=\"copilotKitAttachmentQueuePreviewVideo\">\n @if (attachment.thumbnail) {\n <img\n [src]=\"attachment.thumbnail\"\n [alt]=\"attachment.filename || 'Video thumbnail'\"\n class=\"copilotKitAttachmentQueuePreviewImage\"\n />\n } @else {\n <video\n [src]=\"sourceUrl(attachment)\"\n preload=\"metadata\"\n muted\n class=\"copilotKitAttachmentQueuePreviewImage\"\n ></video>\n }\n </div>\n }\n @default {\n <div class=\"copilotKitAttachmentQueuePreviewDocument\">\n <div class=\"copilotKitAttachmentQueueDocIcon\">\n {{ documentIcon(attachment) }}\n </div>\n <div class=\"copilotKitAttachmentQueueDocInfo\">\n <span class=\"copilotKitAttachmentQueueFilename\">\n {{ attachment.filename || \"Document\" }}\n </span>\n @if (attachment.size != null) {\n <span class=\"copilotKitAttachmentQueueFileSize\">\n {{ fileSize(attachment) }}\n </span>\n }\n </div>\n </div>\n }\n }\n }\n\n <button\n type=\"button\"\n class=\"copilotKitAttachmentQueueRemoveButton\"\n aria-label=\"Remove attachment\"\n (click)=\"removeAttachment.emit(attachment.id)\"\n >\n &times;\n </button>\n </div>\n }\n </div>\n }\n `,\n})\nexport class CopilotChatAttachmentQueue {\n readonly attachments = input<Attachment[]>([]);\n readonly inputClass = input<string | undefined>();\n readonly removeAttachment = output<string>();\n\n readonly computedClass = computed(() =>\n cn(\n \"copilotKitAttachmentQueue cpk:flex cpk:flex-wrap cpk:gap-2 cpk:p-2\",\n this.inputClass(),\n ),\n );\n\n itemClass(attachment: Attachment): string {\n return cn(\n \"copilotKitAttachmentQueueItem\",\n `copilotKitAttachmentQueueItem--${attachment.type}`,\n );\n }\n\n sourceUrl(attachment: Attachment): string {\n return getSourceUrl(attachment.source);\n }\n\n documentIcon(attachment: Attachment): string {\n return getDocumentIcon(attachment.source.mimeType ?? \"\");\n }\n\n fileSize(attachment: Attachment): string {\n return formatFileSize(attachment.size ?? 0);\n }\n}\n","import {\n Component,\n input,\n ChangeDetectionStrategy,\n ViewEncapsulation,\n forwardRef,\n ElementRef,\n inject,\n} from \"@angular/core\";\n\nimport { CopilotSlot } from \"../../slots/copilot-slot\";\nimport { CopilotChatInput } from \"./copilot-chat-input\";\nimport { CopilotChatViewDisclaimer } from \"./copilot-chat-view-disclaimer\";\nimport { cn } from \"../../utils\";\nimport { ChatState } from \"../../chat-state\";\nimport { CopilotChatAttachmentQueue } from \"./copilot-chat-attachment-queue\";\n\n/**\n * InputContainer component for CopilotChatView\n * Container for input and disclaimer components\n * Uses ForwardRef for DOM access\n */\n@Component({\n selector: \"copilot-chat-view-input-container\",\n imports: [CopilotSlot, CopilotChatAttachmentQueue],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [\n {\n provide: ElementRef,\n useExisting: forwardRef(() => CopilotChatViewInputContainer),\n },\n ],\n template: `\n <div [class]=\"computedClass\">\n <!-- Input component -->\n @if ((chatState?.attachments() ?? []).length > 0) {\n <div class=\"cpk:max-w-3xl cpk:mx-auto cpk:w-full cpk:pointer-events-auto\">\n <copilot-chat-attachment-queue\n [attachments]=\"chatState?.attachments() ?? []\"\n inputClass=\"cpk:px-4\"\n (removeAttachment)=\"chatState?.removeAttachment($event)\"\n />\n </div>\n }\n\n <div class=\"cpk:max-w-3xl cpk:mx-auto cpk:py-0 cpk:px-4 cpk:@3xl:px-0\">\n <copilot-slot\n [slot]=\"input()\"\n [context]=\"{ inputClass: inputClass() }\"\n [defaultComponent]=\"defaultInputComponent\"\n >\n </copilot-slot>\n </div>\n\n <!-- Disclaimer - always rendered like in React -->\n <copilot-slot\n [slot]=\"disclaimer()\"\n [context]=\"{ text: disclaimerText(), inputClass: disclaimerClass() }\"\n [defaultComponent]=\"defaultDisclaimerComponent\"\n >\n </copilot-slot>\n\n <!-- Bottom gap inside the overlay, so the measured height that the\n scroll view reserves includes it and content never slides under\n the input. -->\n <div class=\"cpk:h-6\" aria-hidden=\"true\"></div>\n </div>\n `,\n})\nexport class CopilotChatViewInputContainer extends ElementRef {\n readonly chatState = inject(ChatState, { optional: true });\n\n inputContainerClass = input<string | undefined>();\n\n // Input slot configuration\n input = input<any | undefined>();\n inputClass = input<string | undefined>();\n\n // Disclaimer slot configuration\n disclaimer = input<any | undefined>();\n disclaimerText = input<string | undefined>();\n disclaimerClass = input<string | undefined>();\n\n // Default components\n protected readonly defaultInputComponent = CopilotChatInput;\n protected readonly defaultDisclaimerComponent = CopilotChatViewDisclaimer;\n\n constructor(elementRef: ElementRef) {\n super(elementRef.nativeElement);\n }\n\n get computedClass(): string {\n return cn(\n \"cpk:absolute cpk:bottom-0 cpk:left-0 cpk:right-0 cpk:z-20\",\n this.inputContainerClass(),\n );\n }\n}\n","import {\n DestroyRef,\n Directive,\n ElementRef,\n afterNextRender,\n computed,\n inject,\n signal,\n} from \"@angular/core\";\nimport { toObservable, toSignal } from \"@angular/core/rxjs-interop\";\nimport { EMPTY } from \"rxjs\";\nimport { switchMap } from \"rxjs/operators\";\nimport { ResizeObserverService } from \"../../resize-observer\";\n\n/**\n * Measures the chat view's floating input container and exposes its height\n * as a signal.\n *\n * Applied to the copilot-slot hosting the input container. Because the slot\n * only exists on the chat-view branch of the template (the welcome-screen\n * branch omits it), the directive's lifecycle mirrors the overlay's: it is\n * created when the overlay mounts — including after the user sends their\n * first message from the welcome screen — and torn down with it.\n *\n * Measurement is platform-driven: afterNextRender fires once the slot's\n * dynamically created content is in the DOM (and never during SSR), and the\n * ResizeObserver keeps the height current from there, including the initial\n * 0 → laid-out transition.\n */\n@Directive({\n selector: \"[copilotChatViewInputMeasure]\",\n})\nexport class CopilotChatViewInputMeasure {\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly resizeObserverService = inject(ResizeObserverService);\n private readonly destroyRef = inject(DestroyRef);\n\n /**\n * Root element of the input container component — its absolutely\n * positioned overlay wrapper — once it has been rendered into the slot.\n * Custom input containers without that element are left unmeasured.\n */\n private readonly target = signal<HTMLElement | null>(null);\n\n private readonly state = toSignal(\n toObservable(this.target).pipe(\n switchMap((el) =>\n el\n ? this.resizeObserverService.observeElement(new ElementRef(el))\n : EMPTY,\n ),\n ),\n );\n\n /** Measured height of the input container in px; 0 until first laid out. */\n readonly height = computed(() => this.state()?.height ?? 0);\n\n /** True while the input container is resizing, false once it has settled. */\n readonly resizing = computed(() => this.state()?.isResizing ?? false);\n\n constructor() {\n afterNextRender(() => {\n const el = this.host.nativeElement.querySelector(\n \"copilot-chat-view-input-container\",\n )?.firstElementChild;\n if (el instanceof HTMLElement) {\n this.destroyRef.onDestroy(() =>\n this.resizeObserverService.unobserve(el),\n );\n this.target.set(el);\n }\n });\n }\n}\n","import {\n Component,\n ContentChild,\n TemplateRef,\n Type,\n ChangeDetectionStrategy,\n ViewEncapsulation,\n computed,\n OnInit,\n OnChanges,\n input,\n output,\n inject,\n viewChild,\n} from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\nimport { CopilotSlot } from \"../../slots/copilot-slot\";\nimport { CopilotChatViewScrollView } from \"./copilot-chat-view-scroll-view\";\nimport { CopilotChatViewScrollToBottomButton } from \"./copilot-chat-view-scroll-to-bottom-button\";\nimport { CopilotChatViewFeather } from \"./copilot-chat-view-feather\";\nimport { CopilotChatViewInputContainer } from \"./copilot-chat-view-input-container\";\nimport { CopilotChatViewInputMeasure } from \"./copilot-chat-view-input-measure\";\nimport { CopilotChatViewDisclaimer } from \"./copilot-chat-view-disclaimer\";\nimport { CopilotChatInput } from \"./copilot-chat-input\";\nimport { CopilotChatAttachmentQueue } from \"./copilot-chat-attachment-queue\";\nimport { CopilotChatSuggestionView } from \"./copilot-chat-suggestion-view\";\nimport { Message } from \"@ag-ui/client\";\nimport { cn } from \"../../utils\";\nimport { ResizeObserverService } from \"../../resize-observer\";\nimport { CopilotChatViewHandlers } from \"./copilot-chat-view-handlers\";\nimport { ChatState } from \"../../chat-state\";\nimport { CopilotIcon, Upload } from \"../icons/copilot-icon\";\nimport { injectChatLabels } from \"../../chat-config\";\n\n/**\n * CopilotChatView component - Angular port of the React component.\n * A complete chat interface with message feed and input components.\n *\n * @example\n * ```html\n * <copilot-chat-view\n * [messages]=\"messages\"\n * [autoScroll]=\"true\"\n * [messageViewProps]=\"{ assistantMessage: { onThumbsUp: handleThumbsUp } }\">\n * </copilot-chat-view>\n * ```\n */\n@Component({\n selector: \"copilot-chat-view\",\n imports: [\n CommonModule,\n CopilotSlot,\n CopilotChatViewScrollView,\n CopilotChatViewInputMeasure,\n CopilotChatAttachmentQueue,\n CopilotChatSuggestionView,\n CopilotIcon,\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [ResizeObserverService, CopilotChatViewHandlers],\n host: { class: \"cpk:block cpk:h-full cpk:min-h-0\" },\n template: `\n <!-- Custom layout template support (render prop pattern) -->\n @if (customLayoutTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"customLayoutTemplate\"\n [ngTemplateOutletContext]=\"layoutContext()\"\n ></ng-container>\n } @else if (shouldShowWelcomeScreen()) {\n <div\n [class]=\"computedClass()\"\n (dragover)=\"chatState?.handleDragOver($event)\"\n (dragleave)=\"chatState?.handleDragLeave($event)\"\n (drop)=\"chatState?.handleDrop($event)\"\n >\n @if (chatState?.dragOver?.()) {\n <div [class]=\"dropOverlayClass()\">\n <div\n class=\"cpk:flex cpk:flex-col cpk:items-center cpk:gap-2 cpk:text-primary/70\"\n >\n <copilot-icon [img]=\"UploadIcon\" [size]=\"32\"></copilot-icon>\n <span class=\"cpk:text-sm cpk:font-medium\">Drop files here</span>\n </div>\n </div>\n }\n\n <div\n data-testid=\"copilot-welcome-screen\"\n class=\"cpk:flex-1 cpk:flex cpk:flex-col cpk:items-center cpk:justify-center cpk:px-4\"\n >\n <div\n class=\"cpk:w-full cpk:max-w-3xl cpk:flex cpk:flex-col cpk:items-center\"\n >\n <div class=\"cpk:mb-6\">\n <h1\n class=\"cpk:text-xl cpk:sm:text-2xl cpk:font-medium cpk:text-foreground cpk:text-center\"\n >\n {{ labels.welcomeMessageText }}\n </h1>\n </div>\n\n <div class=\"cpk:w-full\">\n @if ((chatState?.attachments?.() ?? []).length > 0) {\n <copilot-chat-attachment-queue\n [attachments]=\"chatState?.attachments?.() ?? []\"\n inputClass=\"cpk:mb-2\"\n (removeAttachment)=\"chatState?.removeAttachment($event)\"\n />\n }\n\n <copilot-slot\n [slot]=\"inputSlot()\"\n [context]=\"{ inputClass: undefined }\"\n [defaultComponent]=\"defaultInputComponent\"\n >\n </copilot-slot>\n\n <copilot-slot\n [slot]=\"disclaimerSlot()\"\n [context]=\"{\n text: disclaimerTextSignal(),\n inputClass: disclaimerClassSignal(),\n }\"\n [defaultComponent]=\"defaultDisclaimerComponent\"\n >\n </copilot-slot>\n </div>\n\n @if ((chatState?.suggestions?.() ?? []).length > 0) {\n <div class=\"cpk:mt-4 cpk:flex cpk:justify-center\">\n <copilot-chat-suggestion-view\n [suggestions]=\"chatState?.suggestions?.() ?? []\"\n (selectSuggestion)=\"\n chatState?.selectSuggestion($event.suggestion, $event.index)\n \"\n />\n </div>\n }\n </div>\n </div>\n </div>\n } @else {\n <!-- Default layout - exact React DOM structure -->\n <div\n [class]=\"computedClass()\"\n (dragover)=\"chatState?.handleDragOver($event)\"\n (dragleave)=\"chatState?.handleDragLeave($event)\"\n (drop)=\"chatState?.handleDrop($event)\"\n >\n @if (chatState?.dragOver?.()) {\n <div [class]=\"dropOverlayClass()\">\n <div\n class=\"cpk:flex cpk:flex-col cpk:items-center cpk:gap-2 cpk:text-primary/70\"\n >\n <copilot-icon [img]=\"UploadIcon\" [size]=\"32\"></copilot-icon>\n <span class=\"cpk:text-sm cpk:font-medium\">Drop files here</span>\n </div>\n </div>\n }\n\n <!-- ScrollView -->\n <copilot-chat-view-scroll-view\n [autoScroll]=\"autoScrollSignal()\"\n [inputContainerHeight]=\"inputContainerHeight()\"\n [isResizing]=\"isResizing()\"\n [messages]=\"messagesValue()\"\n [state]=\"state()\"\n [agentId]=\"agentId()\"\n [messageView]=\"messageViewSlot()\"\n [messageViewClass]=\"messageViewClass()\"\n [assistantMessageComponent]=\"assistantMessageComponent()\"\n [assistantMessageTemplate]=\"assistantMessageTemplate()\"\n [assistantMessageClass]=\"assistantMessageClass()\"\n [reasoningMessageComponent]=\"reasoningMessageComponent()\"\n [reasoningMessageTemplate]=\"reasoningMessageTemplate()\"\n [reasoningMessageClass]=\"reasoningMessageClass()\"\n [messageViewChildrenComponent]=\"messageViewChildrenComponent()\"\n [messageViewChildrenTemplate]=\"messageViewChildrenTemplate()\"\n [messageViewChildrenClass]=\"messageViewChildrenClass()\"\n [scrollToBottomButton]=\"scrollToBottomButtonSlot()\"\n [scrollToBottomButtonClass]=\"scrollToBottomButtonClass()\"\n [showCursor]=\"showCursorSignal()\"\n (assistantMessageThumbsUp)=\"assistantMessageThumbsUp.emit($event)\"\n (assistantMessageThumbsDown)=\"assistantMessageThumbsDown.emit($event)\"\n (assistantMessageReadAloud)=\"assistantMessageReadAloud.emit($event)\"\n (assistantMessageRegenerate)=\"assistantMessageRegenerate.emit($event)\"\n (userMessageCopy)=\"userMessageCopy.emit($event)\"\n (userMessageEdit)=\"userMessageEdit.emit($event)\"\n >\n </copilot-chat-view-scroll-view>\n\n <!-- Feather effect -->\n <copilot-slot\n [slot]=\"featherSlot()\"\n [context]=\"{ inputClass: featherClass }\"\n [defaultComponent]=\"defaultFeatherComponent\"\n >\n </copilot-slot>\n\n <!-- Input container -->\n <copilot-slot\n copilotChatViewInputMeasure\n [slot]=\"inputContainerSlot()\"\n [context]=\"inputContainerContext()\"\n [defaultComponent]=\"defaultInputContainerComponent\"\n >\n </copilot-slot>\n </div>\n }\n `,\n})\nexport class CopilotChatView implements OnInit, OnChanges {\n // Core inputs matching React props\n protected readonly chatState = inject(ChatState, { optional: true });\n protected readonly UploadIcon = Upload;\n messages = input<Message[]>([]);\n /** Current agent state forwarded to message-view extension slots. */\n state = input<unknown>({});\n agentId = input<string | undefined>();\n autoScroll = input<boolean>(true);\n showCursor = input<boolean>(false);\n hasExplicitThreadId = input<boolean>(false);\n\n // MessageView slot inputs\n messageViewComponent = input<Type<any> | undefined>(undefined);\n messageViewTemplate = input<TemplateRef<any> | undefined>(undefined);\n messageViewClass = input<string | undefined>(undefined);\n\n // AssistantMessage slot inputs\n assistantMessageComponent = input<Type<any> | undefined>(undefined);\n assistantMessageTemplate = input<TemplateRef<any> | undefined>(undefined);\n assistantMessageClass = input<string | undefined>(undefined);\n\n // ReasoningMessage slot inputs\n reasoningMessageComponent = input<Type<any> | undefined>(undefined);\n reasoningMessageTemplate = input<TemplateRef<any> | undefined>(undefined);\n reasoningMessageClass = input<string | undefined>(undefined);\n\n // Content rendered after the default message collection.\n messageViewChildrenComponent = input<Type<any> | undefined>(undefined);\n messageViewChildrenTemplate = input<TemplateRef<any> | undefined>(undefined);\n messageViewChildrenClass = input<string | undefined>(undefined);\n\n // ScrollView slot inputs\n scrollViewComponent = input<Type<any> | undefined>(undefined);\n scrollViewTemplate = input<TemplateRef<any> | undefined>(undefined);\n scrollViewClass = input<string | undefined>(undefined);\n\n // ScrollToBottomButton slot inputs\n scrollToBottomButtonComponent = input<Type<any> | undefined>(undefined);\n scrollToBottomButtonTemplate = input<TemplateRef<any> | undefined>(undefined);\n scrollToBottomButtonClass = input<string | undefined>(undefined);\n\n // Input slot inputs\n inputComponent = input<Type<any> | undefined>(undefined);\n inputTemplate = input<TemplateRef<any> | undefined>(undefined);\n\n // InputContainer slot inputs\n inputContainerComponent = input<Type<any> | undefined>(undefined);\n inputContainerTemplate = input<TemplateRef<any> | undefined>(undefined);\n inputContainerClass = input<string | undefined>(undefined);\n\n // Feather slot inputs\n featherComponent = input<Type<any> | undefined>(undefined);\n featherTemplate = input<TemplateRef<any> | undefined>(undefined);\n featherClass = input<string | undefined>(undefined);\n\n // Disclaimer slot inputs\n disclaimerComponent = input<Type<any> | undefined>(undefined);\n disclaimerTemplate = input<TemplateRef<any> | undefined>(undefined);\n disclaimerClass = input<string | undefined>(undefined);\n disclaimerText = input<string | undefined>(undefined);\n\n // Custom layout template (render prop pattern)\n @ContentChild(\"customLayout\") customLayoutTemplate?: TemplateRef<any>;\n\n // Named template slots for deep customization\n @ContentChild(\"sendButton\") sendButtonTemplate?: TemplateRef<any>;\n @ContentChild(\"toolbar\") toolbarTemplate?: TemplateRef<any>;\n @ContentChild(\"textArea\") textAreaTemplate?: TemplateRef<any>;\n @ContentChild(\"audioRecorder\") audioRecorderTemplate?: TemplateRef<any>;\n @ContentChild(\"assistantMessageMarkdownRenderer\")\n assistantMessageMarkdownRendererTemplate?: TemplateRef<any>;\n @ContentChild(\"thumbsUpButton\") thumbsUpButtonTemplate?: TemplateRef<any>;\n @ContentChild(\"thumbsDownButton\") thumbsDownButtonTemplate?: TemplateRef<any>;\n @ContentChild(\"readAloudButton\") readAloudButtonTemplate?: TemplateRef<any>;\n @ContentChild(\"regenerateButton\") regenerateButtonTemplate?: TemplateRef<any>;\n\n // Output events for assistant message actions (bubbled from child components)\n assistantMessageThumbsUp = output<{ message: Message }>();\n assistantMessageThumbsDown = output<{ message: Message }>();\n assistantMessageReadAloud = output<{ message: Message }>();\n assistantMessageRegenerate = output<{ message: Message }>();\n\n // Output events for user message actions (if applicable)\n userMessageCopy = output<{ message: Message }>();\n userMessageEdit = output<{ message: Message }>();\n\n // Default components for slots\n protected readonly defaultScrollViewComponent = CopilotChatViewScrollView;\n protected readonly defaultScrollToBottomButtonComponent =\n CopilotChatViewScrollToBottomButton;\n protected readonly defaultInputContainerComponent =\n CopilotChatViewInputContainer;\n protected readonly defaultInputComponent = CopilotChatInput;\n protected readonly defaultFeatherComponent = CopilotChatViewFeather;\n protected readonly defaultDisclaimerComponent = CopilotChatViewDisclaimer;\n protected readonly labels = injectChatLabels();\n\n // Signals for reactive state\n protected messagesValue = computed(() => this.messages());\n protected autoScrollSignal = computed(() => this.autoScroll());\n protected showCursorSignal = computed(() => this.showCursor());\n protected disclaimerTextSignal = computed(() => this.disclaimerText());\n protected disclaimerClassSignal = computed(() => this.disclaimerClass());\n private readonly inputMeasure = viewChild(CopilotChatViewInputMeasure);\n protected readonly inputContainerHeight = computed(\n () => this.inputMeasure()?.height() ?? 0,\n );\n protected readonly isResizing = computed(\n () => this.inputMeasure()?.resizing() ?? false,\n );\n protected shouldShowWelcomeScreen = computed(\n () => this.messagesValue().length === 0 && !this.hasExplicitThreadId(),\n );\n\n // Computed signals\n protected computedClass = computed(() =>\n cn(\n \"copilotKitChat cpk:@container cpk:relative cpk:h-full cpk:flex cpk:flex-col\",\n ),\n );\n protected dropOverlayClass = computed(() =>\n cn(\n \"cpk:absolute cpk:inset-0 cpk:z-50 cpk:pointer-events-none\",\n \"cpk:flex cpk:items-center cpk:justify-center\",\n \"cpk:bg-primary/5 cpk:backdrop-blur-[2px]\",\n \"cpk:border-2 cpk:border-dashed cpk:border-primary/40 cpk:rounded-lg cpk:m-2\",\n ),\n );\n\n // Slot resolution computed signals\n protected messageViewSlot = computed(\n () => this.messageViewTemplate() || this.messageViewComponent(),\n );\n\n protected scrollViewSlot = computed(\n () => this.scrollViewTemplate() || this.scrollViewComponent(),\n );\n\n protected scrollToBottomButtonSlot = computed(\n () =>\n this.scrollToBottomButtonTemplate() ||\n this.scrollToBottomButtonComponent(),\n );\n\n protected inputSlot = computed(\n () => this.inputTemplate() || this.inputComponent(),\n );\n\n protected inputContainerSlot = computed(\n () => this.inputContainerTemplate() || this.inputContainerComponent(),\n );\n\n protected featherSlot = computed(\n () => this.featherTemplate() || this.featherComponent(),\n );\n\n protected disclaimerSlot = computed(\n () => this.disclaimerTemplate() || this.disclaimerComponent(),\n );\n\n // Context objects for slots\n protected scrollViewContext = computed(() => ({\n autoScroll: this.autoScrollSignal(),\n scrollToBottomButton: this.scrollToBottomButtonSlot(),\n scrollToBottomButtonClass: this.scrollToBottomButtonClass(),\n inputContainerHeight: this.inputContainerHeight(),\n isResizing: this.isResizing(),\n messages: this.messagesValue(),\n state: this.state(),\n agentId: this.agentId(),\n messageView: this.messageViewSlot(),\n messageViewClass: this.messageViewClass(),\n assistantMessageComponent: this.assistantMessageComponent(),\n assistantMessageTemplate: this.assistantMessageTemplate(),\n assistantMessageClass: this.assistantMessageClass(),\n reasoningMessageComponent: this.reasoningMessageComponent(),\n reasoningMessageTemplate: this.reasoningMessageTemplate(),\n reasoningMessageClass: this.reasoningMessageClass(),\n messageViewChildrenComponent: this.messageViewChildrenComponent(),\n messageViewChildrenTemplate: this.messageViewChildrenTemplate(),\n messageViewChildrenClass: this.messageViewChildrenClass(),\n }));\n\n // Removed scrollViewPropsComputed - no longer needed\n\n protected inputContainerContext = computed(() => ({\n input: this.inputSlot(),\n disclaimer: this.disclaimerSlot(),\n disclaimerText: this.disclaimerTextSignal(),\n disclaimerClass: this.disclaimerClassSignal(),\n inputContainerClass: this.inputContainerClass(),\n }));\n\n // Removed inputContainerPropsComputed - no longer needed\n\n // Layout context for custom templates (render prop pattern)\n protected layoutContext = computed(() => ({\n messageView: this.messageViewSlot(),\n input: this.inputSlot(),\n scrollView: this.scrollViewSlot(),\n scrollToBottomButton: this.scrollToBottomButtonSlot(),\n feather: this.featherSlot(),\n inputContainer: this.inputContainerSlot(),\n disclaimer: this.disclaimerSlot(),\n }));\n\n constructor(private handlers: CopilotChatViewHandlers) {}\n\n ngOnInit(): void {\n // Initialize handler availability in the view-scoped service\n // OutputEmitterRef doesn't expose 'observed'; default to true to enable UI affordances\n this.handlers.hasAssistantThumbsUpHandler.set(true);\n this.handlers.hasAssistantThumbsDownHandler.set(true);\n this.handlers.hasAssistantReadAloudHandler.set(true);\n this.handlers.hasAssistantRegenerateHandler.set(true);\n this.handlers.hasUserCopyHandler.set(true);\n this.handlers.hasUserEditHandler.set(true);\n }\n\n ngOnChanges(): void {\n // Keep handler availability in sync (assume available)\n this.handlers.hasAssistantThumbsUpHandler.set(true);\n this.handlers.hasAssistantThumbsDownHandler.set(true);\n this.handlers.hasAssistantReadAloudHandler.set(true);\n this.handlers.hasAssistantRegenerateHandler.set(true);\n this.handlers.hasUserCopyHandler.set(true);\n this.handlers.hasUserEditHandler.set(true);\n }\n}\n","import {\n Directive,\n DestroyRef,\n ElementRef,\n HostListener,\n Renderer2,\n inject,\n input,\n} from \"@angular/core\";\nimport {\n createAttachmentContent,\n exceedsMaxSize,\n formatFileSize,\n generateVideoThumbnail,\n getModalityFromMimeType,\n matchesAcceptFilter,\n randomUUID,\n readFileAsBase64,\n type Attachment,\n type AttachmentsConfig,\n type InputContent,\n} from \"@copilotkit/shared\";\nimport { ChatState } from \"../../chat-state\";\n\n@Directive({\n selector: \"[copilotChatAttachments]\",\n})\nexport class CopilotChatAttachmentsDirective {\n readonly config = input<AttachmentsConfig | undefined>();\n\n private readonly chat = inject(ChatState);\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly renderer = inject(Renderer2);\n private readonly destroyRef = inject(DestroyRef);\n\n private fileInput?: HTMLInputElement;\n\n private get enabled(): boolean {\n return this.config()?.enabled ?? false;\n }\n\n onDragOver(event: DragEvent): void {\n if (!this.enabled) return;\n event.preventDefault();\n event.stopPropagation();\n this.chat.dragOver.set(true);\n }\n\n onDragLeave(event: DragEvent): void {\n event.preventDefault();\n event.stopPropagation();\n this.chat.dragOver.set(false);\n }\n\n async onDrop(event: DragEvent): Promise<void> {\n event.preventDefault();\n event.stopPropagation();\n this.chat.dragOver.set(false);\n\n if (!this.enabled) return;\n\n const files = Array.from(event.dataTransfer?.files ?? []);\n if (files.length > 0) {\n await this.processFiles(files);\n }\n }\n\n @HostListener(\"document:paste\", [\"$event\"])\n async onPaste(event: ClipboardEvent): Promise<void> {\n if (!this.enabled) return;\n\n const target = event.target as Node | null;\n if (!target || !this.host.nativeElement.contains(target)) return;\n\n const accept = this.config()?.accept ?? \"*/*\";\n const files = Array.from(event.clipboardData?.items ?? [])\n .filter((item) => item.kind === \"file\")\n .map((item) => item.getAsFile())\n .filter(\n (file): file is File => !!file && matchesAcceptFilter(file, accept),\n );\n\n if (files.length === 0) return;\n\n event.preventDefault();\n await this.processFiles(files);\n }\n\n openFilePicker(): void {\n const input = this.ensureFileInput();\n input.accept = this.config()?.accept ?? \"*/*\";\n input.click();\n }\n\n removeAttachment(id: string): void {\n this.chat.attachments.update((attachments) =>\n attachments.filter((attachment) => attachment.id !== id),\n );\n }\n\n consume(): Attachment[] {\n const readyAttachments = this.chat\n .attachments()\n .filter((attachment) => attachment.status === \"ready\");\n\n if (readyAttachments.length > 0) {\n this.chat.attachments.update((attachments) =>\n attachments.filter((attachment) => attachment.status !== \"ready\"),\n );\n }\n\n if (this.fileInput) {\n this.fileInput.value = \"\";\n }\n\n return readyAttachments;\n }\n\n buildContent(value: string, attachments: Attachment[]): InputContent[] {\n const content: InputContent[] = [];\n const trimmed = value.trim();\n\n if (trimmed) {\n content.push({ type: \"text\", text: trimmed });\n }\n\n for (const attachment of attachments) {\n content.push(createAttachmentContent(attachment));\n }\n\n return content;\n }\n\n private ensureFileInput(): HTMLInputElement {\n if (this.fileInput) return this.fileInput;\n\n const input: HTMLInputElement = this.renderer.createElement(\"input\");\n this.renderer.setAttribute(input, \"type\", \"file\");\n this.renderer.setProperty(input, \"multiple\", true);\n this.renderer.setStyle(input, \"display\", \"none\");\n const unlisten = this.renderer.listen(input, \"change\", (event: Event) => {\n void this.handleFileInputChange(event);\n });\n this.renderer.appendChild(this.host.nativeElement, input);\n\n this.destroyRef.onDestroy(() => {\n unlisten();\n input.remove();\n });\n\n this.fileInput = input;\n return input;\n }\n\n private async handleFileInputChange(event: Event): Promise<void> {\n const input = event.target as HTMLInputElement;\n const files = Array.from(input.files ?? []);\n if (files.length === 0) return;\n await this.processFiles(files);\n }\n\n private async processFiles(files: File[]): Promise<void> {\n const config = this.config();\n if (!config?.enabled) {\n return;\n }\n\n const accept = config.accept ?? \"*/*\";\n const maxSize = config.maxSize ?? 20 * 1024 * 1024;\n\n for (const file of files) {\n if (!matchesAcceptFilter(file, accept)) {\n config.onUploadFailed?.({\n reason: \"invalid-type\",\n file,\n message: `File \"${file.name}\" is not accepted. Supported types: ${accept}`,\n });\n continue;\n }\n\n if (exceedsMaxSize(file, maxSize)) {\n config.onUploadFailed?.({\n reason: \"file-too-large\",\n file,\n message: `File \"${\n file.name\n }\" exceeds the maximum size of ${formatFileSize(maxSize)}`,\n });\n continue;\n }\n\n const placeholderId = randomUUID();\n const modality = getModalityFromMimeType(file.type);\n const placeholder: Attachment = {\n id: placeholderId,\n type: modality,\n source: { type: \"data\", value: \"\", mimeType: file.type },\n filename: file.name,\n size: file.size,\n status: \"uploading\",\n };\n\n this.chat.attachments.update((attachments) => [\n ...attachments,\n placeholder,\n ]);\n\n try {\n const uploadResult = config.onUpload\n ? await config.onUpload(file)\n : {\n type: \"data\" as const,\n value: await readFileAsBase64(file),\n mimeType: file.type,\n };\n const { metadata, ...source } = uploadResult;\n const thumbnail =\n modality === \"video\" ? await generateVideoThumbnail(file) : undefined;\n\n this.chat.attachments.update((attachments) =>\n attachments.map((attachment) =>\n attachment.id === placeholderId\n ? {\n ...attachment,\n source,\n status: \"ready\",\n thumbnail,\n metadata,\n }\n : attachment,\n ),\n );\n } catch (error) {\n this.chat.attachments.update((attachments) =>\n attachments.filter((attachment) => attachment.id !== placeholderId),\n );\n console.error(`[CopilotKit] Failed to upload \"${file.name}\":`, error);\n config.onUploadFailed?.({\n reason: \"upload-failed\",\n file,\n message:\n error instanceof Error\n ? error.message\n : `Failed to upload \"${file.name}\"`,\n });\n }\n }\n }\n}\n","import type { Signal } from \"@angular/core\";\nimport type { AbstractAgent } from \"@ag-ui/client\";\nimport type { AgentStore } from \"./agent\";\nimport type { CopilotChatConfiguration } from \"./chat-configuration\";\nimport { explicitEffect } from \"./explicit-effect\";\n\n/**\n * Opens a connect for `agent` (whose `threadId` the connector has already\n * pinned) and returns a handle that tears it down. The chat component owns\n * the connection's abort, detach and loading state.\n */\nexport type ConnectFn = (agent: AbstractAgent) => {\n dispose(): void | Promise<void>;\n};\n\n/**\n * Wires the active chat thread to the live agent.\n *\n * Reactively observes the resolved thread id (and whether it was chosen\n * explicitly) from {@link CopilotChatConfiguration} and the current agent from\n * the agent-store signal. On every change it pins the thread onto\n * `agent.threadId`, then:\n *\n * - **Explicit switch** (user picked a thread): opens a connect through\n * {@link ConnectFn} and disposes it on the next effect re-run (thread/agent\n * switch) and on destroy, so a rapid switch or component destroy does not\n * leak a prior run.\n * - **Fresh / non-explicit switch** (e.g. {@link CopilotChatConfiguration.startNewThread}):\n * clears the agent's messages via `agent.setMessages([])` and skips the\n * connect — the runtime assigns the server thread id on first send. The clear\n * fires only on an actual transition to a *new* fresh thread id, never on the\n * initial mount nor on an agent-store swap that leaves the thread id unchanged\n * (which would otherwise wipe a resumed/shared agent's existing history).\n *\n * The tracked reads are exactly the `explicitEffect` dependency function; all\n * mutation and the connect call run in its untracked body, so they do not\n * register as dependencies.\n *\n * @param config - The chat configuration exposing the resolved thread signals.\n * @param agentStore - Signal yielding the current {@link AgentStore}.\n * @param connect - Opens a connect and returns its tear-down handle.\n */\nexport function connectActiveThread(\n config: Pick<CopilotChatConfiguration, \"threadId\" | \"hasExplicitThreadId\">,\n agentStore: Signal<AgentStore>,\n connect: ConnectFn,\n): void {\n // Tracks the thread id observed on the previous effect run so the\n // non-explicit branch can distinguish a genuine new-thread transition from\n // the initial mount (`undefined`) or an agent-store swap that left the thread\n // unchanged. Clearing only on a real transition prevents wiping a\n // resumed/shared agent's existing message history.\n let lastThreadId: string | undefined;\n let lastAgent: AbstractAgent | undefined;\n // Keep teardown ordered across agent swaps, since clones can share cursors.\n let pendingDetach: Promise<void> | undefined;\n explicitEffect(\n () => ({\n threadId: config.threadId(),\n explicit: config.hasExplicitThreadId(),\n store: agentStore(),\n }),\n ({ threadId, explicit, store }, onCleanup) => {\n const agent = store.agent;\n const discardedThreadId =\n lastAgent === agent ? lastThreadId : agent.threadId;\n let active = true;\n let handle: ReturnType<ConnectFn> | undefined;\n agent.threadId = threadId;\n if (explicit) {\n if (pendingDetach) {\n void pendingDetach.then(() => {\n if (active) handle = connect(agent);\n });\n } else {\n handle = connect(agent);\n }\n } else if (lastThreadId !== undefined && threadId !== lastThreadId) {\n const clearCursor = () => {\n if (!discardedThreadId) return;\n if (\n \"clearReplayCursor\" in agent &&\n typeof agent.clearReplayCursor === \"function\"\n )\n agent.clearReplayCursor(discardedThreadId);\n if (\n \"clearReconnectCursor\" in agent &&\n typeof agent.clearReconnectCursor === \"function\"\n )\n agent.clearReconnectCursor(discardedThreadId);\n };\n const clearBaseline = () => {\n if (!active) return;\n agent.setMessages([]);\n agent.setState({});\n agent.pendingInterrupts = [];\n };\n const detach = pendingDetach ?? agent.detachActiveRun();\n clearCursor();\n clearBaseline();\n const reset = detach.then(() => {\n clearCursor();\n clearBaseline();\n });\n pendingDetach = reset;\n void reset.finally(() => {\n if (pendingDetach === reset) pendingDetach = undefined;\n });\n }\n onCleanup(() => {\n active = false;\n const detached = handle?.dispose();\n if (detached) {\n pendingDetach = detached;\n void detached.finally(() => {\n if (pendingDetach === detached) pendingDetach = undefined;\n });\n }\n });\n lastThreadId = threadId;\n lastAgent = agent;\n },\n );\n}\n","import type { TemplateRef, Type } from \"@angular/core\";\nimport {\n Component,\n input,\n ChangeDetectionStrategy,\n ViewEncapsulation,\n signal,\n ChangeDetectorRef,\n Injector,\n computed,\n inject,\n viewChild,\n DestroyRef,\n} from \"@angular/core\";\n\nimport { CopilotChatView } from \"./copilot-chat-view\";\nimport { CopilotChatAttachmentsDirective } from \"./copilot-chat-attachments.directive\";\n\nimport { DEFAULT_AGENT_ID, randomUUID } from \"@copilotkit/shared\";\nimport type { AttachmentsConfig } from \"@copilotkit/shared\";\nimport { AGUIConnectNotImplementedError } from \"@ag-ui/client\";\nimport type { AbstractAgent, Message, RunAgentInput } from \"@ag-ui/client\";\nimport { isRunCompletionAware, ɵisHttpAgent } from \"@copilotkit/core\";\nimport type { Suggestion } from \"@copilotkit/core\";\nimport { injectAgentStore } from \"../../agent\";\nimport { CopilotKit } from \"../../copilotkit\";\nimport { ChatState } from \"../../chat-state\";\nimport { transcribeAudio } from \"../../transcription\";\nimport { COPILOT_CHAT_CONFIGURATION } from \"../../chat-configuration\";\nimport { connectActiveThread } from \"../../active-thread-connector\";\nimport { explicitEffect } from \"../../explicit-effect\";\n\n/**\n * CopilotChat component - Angular equivalent of React's <CopilotChat>\n * Provides a complete chat interface that wires an agent to the chat view\n *\n * @example\n * ```html\n * <copilot-chat [agentId]=\"'default'\" [threadId]=\"'abc123'\"></copilot-chat>\n * ```\n */\n@Component({\n selector: \"copilot-chat\",\n imports: [CopilotChatView, CopilotChatAttachmentsDirective],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: { \"data-copilotkit\": \"\", class: \"cpk:block cpk:h-full cpk:min-h-0\" },\n template: `\n <div\n style=\"display: contents\"\n copilotChatAttachments\n [config]=\"attachmentsConfig()\"\n >\n <copilot-chat-view\n [messages]=\"messages()\"\n [state]=\"agentState()\"\n [agentId]=\"resolvedAgentId()\"\n [autoScroll]=\"true\"\n [messageViewClass]=\"'cpk:w-full'\"\n [showCursor]=\"showCursor()\"\n [inputComponent]=\"inputComponent()\"\n [assistantMessageComponent]=\"assistantMessageComponent()\"\n [assistantMessageTemplate]=\"assistantMessageTemplate()\"\n [assistantMessageClass]=\"assistantMessageClass()\"\n [reasoningMessageComponent]=\"reasoningMessageComponent()\"\n [reasoningMessageTemplate]=\"reasoningMessageTemplate()\"\n [reasoningMessageClass]=\"reasoningMessageClass()\"\n [messageViewChildrenComponent]=\"messageViewChildrenComponent()\"\n [messageViewChildrenTemplate]=\"messageViewChildrenTemplate()\"\n [messageViewChildrenClass]=\"messageViewChildrenClass()\"\n [hasExplicitThreadId]=\"hasExplicitThreadId()\"\n >\n </copilot-chat-view>\n </div>\n `,\n providers: [\n {\n provide: ChatState,\n useExisting: CopilotChat,\n },\n ],\n})\nexport class CopilotChat extends ChatState {\n private readonly attachmentsDirective = viewChild(\n CopilotChatAttachmentsDirective,\n );\n\n readonly inputValue = signal<string>(\"\");\n readonly agentId = input<string | undefined>();\n readonly threadId = input<string | undefined>();\n readonly inputComponent = input<Type<any> | undefined>();\n /** Component used to render each assistant message in the prebuilt chat. */\n readonly assistantMessageComponent = input<Type<any> | undefined>();\n /** Template used to render each assistant message in the prebuilt chat. */\n readonly assistantMessageTemplate = input<TemplateRef<any> | undefined>();\n /** Class forwarded to the default or custom assistant-message renderer. */\n readonly assistantMessageClass = input<string | undefined>();\n /** Component used to render each reasoning message in the prebuilt chat. */\n readonly reasoningMessageComponent = input<Type<any> | undefined>();\n /** Template used to render each reasoning message in the prebuilt chat. */\n readonly reasoningMessageTemplate = input<TemplateRef<any> | undefined>();\n /** Class forwarded to the default or custom reasoning-message renderer. */\n readonly reasoningMessageClass = input<string | undefined>();\n /** Component rendered after the transcript messages and before the cursor. */\n readonly messageViewChildrenComponent = input<Type<any> | undefined>();\n /** Template rendered after the transcript messages and before the cursor. */\n readonly messageViewChildrenTemplate = input<TemplateRef<any> | undefined>();\n /** Class forwarded to custom transcript-children renderers. */\n readonly messageViewChildrenClass = input<string | undefined>();\n readonly attachmentsConfig = input<AttachmentsConfig | undefined>(undefined, {\n alias: \"attachments\",\n });\n /**\n * Ambient chat configuration, when a {@link provideCopilotChatConfiguration}\n * provider is in scope. Absent (`null`) for standalone\n * `<copilot-chat [threadId]>` usage, which has no provider — resolved via the\n * optional inject so the component does not throw without one.\n */\n private readonly config = inject(COPILOT_CHAT_CONFIGURATION, {\n optional: true,\n });\n protected readonly resolvedAgentId = computed(\n () => this.agentId() ?? this.config?.agentId() ?? DEFAULT_AGENT_ID,\n );\n readonly agentStore = injectAgentStore(this.resolvedAgentId);\n private readonly copilotKit = inject(CopilotKit);\n readonly cdr = inject(ChangeDetectorRef);\n readonly injector = inject(Injector);\n private readonly destroyRef = inject(DestroyRef);\n private readonly connecting = signal(false);\n private activeConnection?: { dispose(): void };\n protected readonly showCursor = computed(\n () => this.connecting() || this.agentStore().isRunning(),\n );\n\n protected messages = computed(() => this.agentStore().messages());\n protected agentState = computed(() => this.agentStore().state());\n protected readonly hasExplicitThreadId =\n this.config?.hasExplicitThreadId ??\n computed(() => Boolean(this.threadId()));\n protected readonly agentRef = computed(() => this.agentStore().agent);\n protected readonly resolvedThreadId = computed(\n () => this.threadId() || this.generatedThreadId,\n );\n override readonly attachmentsEnabled = computed(\n () => this.attachmentsConfig()?.enabled ?? false,\n );\n override readonly attachmentsUploading = computed(() =>\n this.attachments().some((attachment) => attachment.status === \"uploading\"),\n );\n\n private generatedThreadId: string = randomUUID();\n\n constructor() {\n super();\n\n this.destroyRef.onDestroy(() => this.activeConnection?.dispose());\n\n const suggestionsSubscription = this.copilotKit.core.subscribe({\n onAgentsChanged: () => {\n const agentId = this.resolvedAgentId();\n this.syncSuggestionsFromCore(agentId);\n if (this.copilotKit.core.getAgent(agentId)) {\n this.copilotKit.reloadSuggestions(agentId);\n }\n },\n onSuggestionsChanged: ({ agentId, suggestions }) => {\n if (agentId !== this.resolvedAgentId()) {\n return;\n }\n\n this.suggestions.set(suggestions);\n this.suggestionsLoading.set(\n this.copilotKit.core.getSuggestions(agentId).isLoading,\n );\n this.cdr.markForCheck();\n },\n onSuggestionsStartedLoading: ({ agentId }) => {\n if (agentId !== this.resolvedAgentId()) {\n return;\n }\n\n this.suggestionsLoading.set(true);\n this.cdr.markForCheck();\n },\n onSuggestionsFinishedLoading: ({ agentId }) => {\n if (agentId !== this.resolvedAgentId()) {\n return;\n }\n\n this.syncSuggestionsFromCore(agentId);\n },\n onSuggestionsConfigChanged: () => {\n const agentId = this.resolvedAgentId();\n this.syncSuggestionsFromCore(agentId);\n this.copilotKit.reloadSuggestions(agentId);\n },\n });\n\n this.destroyRef.onDestroy(() => suggestionsSubscription.unsubscribe());\n\n explicitEffect(this.resolvedAgentId, (agentId) => {\n this.syncSuggestionsFromCore(agentId);\n this.copilotKit.reloadSuggestions(agentId);\n });\n\n if (this.config) {\n // A set `[threadId]` input seeds the ambient config so the input\n // actually drives the active thread (not just the welcome flag). When\n // the config is controlled by a host-provided `threadId` option,\n // `setActiveThreadId` no-ops — so a controlled config wins over the\n // input, matching React's prop-precedence. When `[threadId]` is unset,\n // the effect does nothing and the config drives as before.\n explicitEffect(this.threadId, (inputThreadId) => {\n if (inputThreadId) {\n this.config!.setActiveThreadId(inputThreadId, { explicit: true });\n }\n });\n }\n // Both ambient and standalone threads share reset and connection cleanup.\n connectActiveThread(\n this.config ?? {\n threadId: this.resolvedThreadId,\n hasExplicitThreadId: this.hasExplicitThreadId,\n },\n this.agentStore,\n (agent) => this.connectToAgent(agent),\n );\n }\n\n private connectToAgent(agent: AbstractAgent) {\n let disposed = false;\n let initialized: RunAgentInput | undefined;\n let replaced = false;\n let completion: Promise<void> | undefined;\n let detachCompletion: Promise<void> | undefined;\n const controller = new AbortController();\n if (ɵisHttpAgent(agent)) agent.abortController = controller;\n\n const ownsPipeline = () => {\n if (!initialized || replaced) return false;\n const candidate: unknown = agent;\n const current = isRunCompletionAware(candidate)\n ? candidate.activeRunCompletionPromise\n : undefined;\n if (!current) return false;\n completion ??= current;\n return current === completion;\n };\n let refresh: ReturnType<typeof setTimeout> | undefined;\n const subscription = agent.subscribe({\n onRunInitialized: ({ input }) => {\n if (initialized && input !== initialized) {\n replaced = true;\n } else {\n initialized = input;\n // AG-UI installs the pipeline after initialization subscribers finish.\n refresh = setTimeout(ownsPipeline, 0);\n }\n },\n onRunStartedEvent: () => {\n ownsPipeline();\n },\n });\n const cleanup = () => {\n clearTimeout(refresh);\n subscription.unsubscribe();\n if (this.activeConnection === handle) {\n this.activeConnection = undefined;\n this.connecting.set(false);\n }\n };\n const handle = {\n dispose: () => {\n if (disposed) return detachCompletion;\n disposed = true;\n const current = this.activeConnection === handle;\n const detach = current && (ownsPipeline() || !initialized);\n // A successor connect may reuse HttpAgent's controller.\n if (\n !replaced &&\n (current ||\n (ɵisHttpAgent(agent) && agent.abortController !== controller))\n ) {\n controller.abort();\n }\n cleanup();\n if (detach) detachCompletion = agent.detachActiveRun().catch(() => {});\n return detachCompletion;\n },\n };\n this.activeConnection = handle;\n this.connecting.set(true);\n void Promise.resolve()\n .then(async () => {\n if (!disposed && !this.destroyRef.destroyed) {\n await this.copilotKit.core.connectAgent({ agent });\n }\n })\n .catch((error: unknown) => {\n if (!disposed && !(error instanceof AGUIConnectNotImplementedError)) {\n console.error(\"[CopilotKit] Failed to connect to agent:\", error);\n }\n })\n .finally(cleanup);\n return handle;\n }\n\n // Match React: wait for the current agent pipeline before sending another turn.\n private async waitForActiveRunToSettle(agent: AbstractAgent): Promise<void> {\n const candidate: unknown = agent;\n const completion = isRunCompletionAware(candidate)\n ? candidate.activeRunCompletionPromise\n : undefined;\n if (agent.isRunning && completion) {\n try {\n await completion;\n } catch (error) {\n console.error(\n \"[CopilotKit] In-flight run rejected while queuing send:\",\n error,\n );\n }\n }\n }\n\n async submitInput(value: string): Promise<void> {\n if (\n this.destroyRef.destroyed ||\n !value.trim() ||\n this.attachmentsUploading()\n )\n return;\n const agent = this.agentStore().agent;\n const threadId = agent.threadId;\n this.inputValue.set(\"\");\n await this.waitForActiveRunToSettle(agent);\n if (\n this.destroyRef.destroyed ||\n this.agentStore().agent !== agent ||\n agent.threadId !== threadId\n )\n return;\n\n // An upload can begin while this send is waiting, just as in React.\n if (this.attachmentsUploading()) {\n this.inputValue.set(value);\n console.error(\"[CopilotKit] Cannot send while attachments are uploading\");\n return;\n }\n\n try {\n const attachments = this.attachmentsDirective();\n const ready = attachments?.consume() ?? [];\n const message: Message =\n ready.length > 0\n ? {\n id: randomUUID(),\n role: \"user\",\n content: attachments!.buildContent(value, ready),\n }\n : { id: randomUUID(), role: \"user\", content: value };\n agent.addMessage(message);\n await this.copilotKit.core.runAgent({ agent });\n } catch (error) {\n console.error(\"[CopilotKit] Agent run error:\", error);\n }\n }\n\n async selectSuggestion(\n suggestion: Suggestion,\n _index: number,\n ): Promise<void> {\n const message = suggestion.message.trim();\n if (this.destroyRef.destroyed || !message || suggestion.isLoading) return;\n const agent = this.agentStore().agent;\n const threadId = agent.threadId;\n await this.waitForActiveRunToSettle(agent);\n if (\n this.destroyRef.destroyed ||\n this.agentStore().agent !== agent ||\n agent.threadId !== threadId\n )\n return;\n\n try {\n agent.addMessage({ id: randomUUID(), role: \"user\", content: message });\n await this.copilotKit.core.runAgent({ agent });\n } catch (error) {\n console.error(\"[CopilotKit] Agent run error:\", error);\n }\n }\n\n changeInput(value: string): void {\n this.inputValue.set(value);\n }\n\n override async finishTranscription(audioBlob: Blob): Promise<void> {\n this.isTranscribing.set(true);\n this.cdr.markForCheck();\n\n try {\n const result = await transcribeAudio(this.copilotKit.core, audioBlob);\n const text = result.text?.trim();\n if (text) {\n const previous = this.inputValue().trim();\n this.inputValue.set(previous ? `${previous} ${text}` : text);\n }\n } catch (error) {\n console.error(\"[CopilotKit] Transcription failed:\", error);\n } finally {\n this.isTranscribing.set(false);\n this.cdr.markForCheck();\n }\n }\n\n private syncSuggestionsFromCore(agentId: string): void {\n const result = this.copilotKit.core.getSuggestions(agentId);\n this.suggestions.set(result.suggestions);\n this.suggestionsLoading.set(result.isLoading);\n this.cdr.markForCheck();\n }\n\n addFile(): void {\n this.attachmentsDirective()?.openFilePicker();\n }\n\n removeAttachment(id: string): void {\n this.attachmentsDirective()?.removeAttachment(id);\n }\n\n handleDragOver(event: DragEvent): void {\n this.attachmentsDirective()?.onDragOver(event);\n }\n\n handleDragLeave(event: DragEvent): void {\n this.attachmentsDirective()?.onDragLeave(event);\n }\n\n handleDrop(event: DragEvent): void {\n void this.attachmentsDirective()?.onDrop(event);\n }\n}\n","import { CopilotChatTextarea } from \"./copilot-chat-textarea\";\nimport { CopilotChatAudioRecorder } from \"./copilot-chat-audio-recorder\";\nimport {\n CopilotChatSendButton,\n CopilotChatStartTranscribeButton,\n CopilotChatCancelTranscribeButton,\n CopilotChatFinishTranscribeButton,\n CopilotChatAddFileButton,\n} from \"./copilot-chat-buttons\";\nimport { CopilotChatToolbar } from \"./copilot-chat-toolbar\";\nimport { CopilotChatToolsMenu } from \"./copilot-chat-tools-menu\";\n\n/**\n * Default components used by CopilotChatInput.\n * These can be imported and reused when creating custom slot implementations.\n *\n * @example\n * ```typescript\n * import { CopilotChatInputDefaults } from '@copilotkit/angular';\n *\n * @Component({\n * template: `\n * <copilot-chat-input [sendButtonSlot]=\"CustomSendButton\">\n * </copilot-chat-input>\n * `\n * })\n * export class MyComponent {\n * CustomSendButton = class extends CopilotChatInputDefaults.SendButton {\n * // Custom implementation\n * };\n * }\n * ```\n */\nexport class CopilotChatInputDefaults {\n static readonly TextArea = CopilotChatTextarea;\n static readonly AudioRecorder = CopilotChatAudioRecorder;\n static readonly SendButton = CopilotChatSendButton;\n static readonly StartTranscribeButton = CopilotChatStartTranscribeButton;\n static readonly CancelTranscribeButton = CopilotChatCancelTranscribeButton;\n static readonly FinishTranscribeButton = CopilotChatFinishTranscribeButton;\n static readonly AddFileButton = CopilotChatAddFileButton;\n static readonly Toolbar = CopilotChatToolbar;\n static readonly ToolsMenu = CopilotChatToolsMenu;\n}\n","import {\n CUSTOM_ELEMENTS_SCHEMA,\n ChangeDetectionStrategy,\n Component,\n DestroyRef,\n Directive,\n ElementRef,\n EventEmitter,\n Output,\n TemplateRef,\n computed,\n contentChild,\n effect,\n inject,\n input,\n signal,\n viewChild,\n} from \"@angular/core\";\nimport { NgTemplateOutlet } from \"@angular/common\";\nimport {\n DEFAULT_AGENT_ID,\n createLicenseContextValue,\n} from \"@copilotkit/shared\";\nimport { defineCopilotKitThreadsDrawer } from \"@copilotkit/web-components/threads-drawer\";\nimport type {\n ArchiveDetail,\n DeleteDetail,\n DrawerThread,\n OpenChangeDetail,\n RetryDetail,\n ThreadSelectedDetail,\n UnarchiveDetail,\n CopilotKitThreadsDrawer as CopilotKitThreadsDrawerElement,\n} from \"@copilotkit/web-components/threads-drawer\";\n// TODO(ENT-1051): import `CollapseChangeDetail` from\n// \"@copilotkit/web-components/threads-drawer\" once the parallel element PR that\n// adds the collapse feature (property `collapsible` + event `collapse-change`)\n// lands and is published; declared locally here because the built element types\n// in this worktree predate it.\ntype CollapseChangeDetail = { collapsed: boolean };\nimport { COPILOT_CHAT_CONFIGURATION } from \"../../chat-configuration\";\nimport { CopilotKit } from \"../../copilotkit\";\nimport { injectThreads } from \"../../threads\";\nimport type { Thread } from \"../../threads\";\n\n/**\n * Maps a {@link Thread} from the platform store onto the minimal\n * {@link DrawerThread} shape the `<copilotkit-threads-drawer>` element accepts.\n *\n * `lastRunAt` is spread conditionally so the key is absent (rather than\n * `undefined`) when the source thread has never been run — matching the\n * element's optional typing and avoiding spurious property pollution.\n */\nfunction toDrawerThread(thread: Thread): DrawerThread {\n return {\n id: thread.id,\n name: thread.name,\n archived: thread.archived,\n createdAt: thread.createdAt,\n updatedAt: thread.updatedAt,\n ...(thread.lastRunAt !== undefined ? { lastRunAt: thread.lastRunAt } : {}),\n };\n}\n\n/**\n * The Angular chat view container's element selector. Used to scope the\n * focus-return lookup so a multi-chat page focuses THIS drawer's composer.\n */\nconst CHAT_CONTAINER_SELECTOR = \"copilot-chat-view\";\n/**\n * The Angular chat input's element selector (`<textarea copilotChatTextarea>`).\n * Note: this is the Angular chat input, NOT React's `copilot-chat-textarea` or\n * Vue's `copilot-chat-input-textarea` `data-testid` — the Angular chat\n * components identify by element/attribute selector rather than `data-testid`.\n */\nconst CHAT_INPUT_SELECTOR = \"textarea[copilotChatTextarea]\";\n\n/**\n * Returns the chat input element for focus-return after a thread is selected.\n *\n * Best-effort and SCOPED: walks up from the drawer element looking for an\n * ancestor chat-view container ({@link CHAT_CONTAINER_SELECTOR}), then returns\n * the chat input ({@link CHAT_INPUT_SELECTOR}) within that subtree. This avoids\n * focusing the wrong composer on a page hosting more than one chat, where a\n * document-global lookup would grab whichever input appears first in DOM order.\n *\n * Falls back to a document-global lookup when no scoping ancestor is found\n * (e.g. the drawer and chat share no common container, or headless usage), and\n * returns `null` when there is no chat input at all. Mirrors the React and Vue\n * wrappers' `findChatInput`, scoped to the Angular chat selectors.\n *\n * @param origin - The drawer element to scope the search from.\n */\nfunction findChatInput(origin: Element | null): HTMLElement | null {\n if (typeof document === \"undefined\") return null;\n const container = origin?.closest?.(CHAT_CONTAINER_SELECTOR);\n if (container) {\n const scoped = container.querySelector<HTMLElement>(CHAT_INPUT_SELECTOR);\n if (scoped) return scoped;\n }\n return document.querySelector<HTMLElement>(CHAT_INPUT_SELECTOR);\n}\n\n/**\n * Structural directive that captures a per-row template for projection into\n * the `<copilotkit-threads-drawer>` element as light-DOM children with\n * `slot=\"row:{id}\"`.\n *\n * Apply it to an `<ng-template>` that is a direct child of `<copilot-threads-drawer>`.\n * The implicit context variable (`let-t`) receives the full {@link Thread}\n * record for that row.\n *\n * @example\n * ```html\n * <copilot-threads-drawer>\n * <ng-template copilotThreadsDrawerRow let-t>\n * <span>{{ t.name }}</span>\n * </ng-template>\n * </copilot-threads-drawer>\n * ```\n */\n@Directive({ selector: \"[copilotThreadsDrawerRow]\", standalone: true })\nexport class CopilotThreadsDrawerRow {\n /** The captured template reference for the per-row content. */\n readonly template = inject(TemplateRef);\n}\n\n/**\n * Angular wrapper around the `<copilotkit-threads-drawer>` Lit web component.\n *\n * Registers the custom element on construction (idempotent; SSR-guarded\n * internally by {@link defineCopilotKitThreadsDrawer}) and projects it into the DOM\n * via the `CUSTOM_ELEMENTS_SCHEMA`-enabled template.\n *\n * Thread list state is fetched from CopilotKit Intelligence via\n * {@link injectThreads} and pushed onto the element's JS properties via an\n * `effect`, following the imperative property-assignment pattern used elsewhere\n * in this package (see `CopilotA2UIActivityRenderer`).\n *\n * DOM events emitted by the element are routed back to the chat configuration\n * and thread mutation methods via declarative Angular event bindings.\n *\n * @example\n * ```html\n * <copilot-threads-drawer data-testid=\"my-drawer\" />\n * ```\n */\n@Component({\n selector: \"copilot-threads-drawer\",\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\n imports: [NgTemplateOutlet],\n template: `\n <copilotkit-threads-drawer\n #drawer\n [attr.data-testid]=\"dataTestId()\"\n [attr.recent-label]=\"recentLabel() ?? null\"\n (thread-selected)=\"onThreadSelected($event)\"\n (new-thread)=\"onNewThread()\"\n (archive)=\"onArchive($event)\"\n (unarchive)=\"onUnarchive($event)\"\n (delete)=\"onDelete($event)\"\n (filter-change)=\"onFilterChange()\"\n (collapse-change)=\"onCollapseChange($event)\"\n (retry)=\"onRetry($event)\"\n (load-more)=\"onLoadMore()\"\n (open-change)=\"onOpenChange($event)\"\n (licensed)=\"onLicensed()\"\n ><ng-content></ng-content>\n @if (rowDirective(); as row) {\n @for (t of threads.threads(); track t.id) {\n <div [attr.slot]=\"'row:' + t.id\">\n <ng-container\n [ngTemplateOutlet]=\"row.template\"\n [ngTemplateOutletContext]=\"{ $implicit: t }\"\n ></ng-container>\n </div>\n }\n }\n </copilotkit-threads-drawer>\n `,\n})\nexport class CopilotThreadsDrawer {\n /**\n * Optional agent id whose threads this drawer lists/manages. Scopes the\n * {@link injectThreads} store (via the resolved-agent precedence: this input\n * → ambient config's `agentId` → {@link DEFAULT_AGENT_ID}). NOT forwarded to\n * the element (the element has no `agentId` property).\n */\n readonly agentId = input<string | undefined>();\n\n /**\n * Value applied as the `data-testid` attribute on the inner\n * `<copilotkit-threads-drawer>` element. Defaults to `\"copilot-threads-drawer\"`.\n */\n readonly dataTestId = input<string>(\"copilot-threads-drawer\", {\n alias: \"data-testid\",\n });\n\n /**\n * Optional accessible/region + default-header label forwarded to the element's\n * `label` property; defaults to the element's own `\"Threads\"` when unset.\n */\n readonly label = input<string | undefined>();\n\n /**\n * Optional heading for the \"Recent Conversations\" section, forwarded to the\n * element's `recent-label` attribute; defaults to the element's own\n * `\"Recent Conversations\"` when unset.\n */\n readonly recentLabel = input<string | undefined>();\n\n /**\n * Whether the drawer offers a collapse toggle. Pushed onto the element's\n * `collapsible` PROPERTY (a default-true boolean, exactly like `licensed` — a\n * string attribute cannot represent it since any non-empty value is truthy).\n * When `false`, the drawer has no collapse toggle and is always expanded.\n * Defaults to the element's own `true` when unset.\n */\n readonly collapsible = input<boolean | undefined>();\n\n /**\n * Emits the new collapsed state whenever the drawer's collapsed state changes\n * (mirrors the element's `collapse-change` event).\n */\n @Output() readonly collapseChange = new EventEmitter<boolean>();\n\n /**\n * Optional host override for the thread-select action.\n *\n * When provided, this callback is invoked instead of driving\n * `config.setActiveThreadId`. Bound via `[onThreadSelect]=\"fn\"`.\n */\n readonly threadSelectHandler = input<\n ((threadId: string) => void) | undefined\n >(undefined, {\n alias: \"onThreadSelect\",\n });\n\n /**\n * Optional host override for the new-thread action.\n *\n * When provided, this callback is invoked instead of driving\n * `config.startNewThread`. The core `threads.startNewThread()` reset is\n * always called regardless. Bound via `[onNewThread]=\"fn\"`.\n */\n readonly newThreadHandler = input<(() => void) | undefined>(undefined, {\n alias: \"onNewThread\",\n });\n\n /**\n * Page size for thread pagination. When set, threads load in pages of this\n * size and the element shows a \"Load more\" control while more remain. When\n * unset, the full list loads at once and no pagination control shows.\n */\n readonly limit = input<number | undefined>();\n\n /**\n * Destination the locked view's Upgrade CTA opens in a new tab. Forwarded to\n * the element's `licenseUrl` property; defaults to the element's built-in\n * CopilotKit Intelligence docs URL when unset. Set to an empty string to\n * suppress the default navigation and handle the click via `onLicensed`.\n */\n readonly licenseUrl = input<string | undefined>();\n\n /**\n * Optional host hook fired when the locked view's Upgrade CTA is clicked. The\n * element still performs its default navigation unless `licenseUrl` is blank;\n * use this for telemetry or to drive your own upgrade flow. Bound via\n * `[onLicensed]=\"fn\"`.\n */\n readonly licensedHandler = input<(() => void) | undefined>(undefined, {\n alias: \"onLicensed\",\n });\n\n private readonly config = inject(COPILOT_CHAT_CONFIGURATION, {\n optional: true,\n });\n\n private readonly copilotkit = inject(CopilotKit);\n\n private readonly drawerRef = viewChild<\n unknown,\n ElementRef<CopilotKitThreadsDrawerElement>\n >(\"drawer\", {\n read: ElementRef,\n });\n\n /**\n * Optional per-row template directive projected as a direct child of this\n * component. When present, a `<div slot=\"row:{id}\">` is rendered inside the\n * `<copilotkit-threads-drawer>` element for each thread, allowing the host to inject\n * custom light-DOM content into each row slot.\n */\n protected readonly rowDirective = contentChild(CopilotThreadsDrawerRow);\n\n /**\n * The resolved agent id for the threads store. Precedence:\n * 1. `agentId` input prop.\n * 2. Ambient `CopilotChatConfiguration.agentId`.\n * 3. {@link DEFAULT_AGENT_ID}.\n */\n protected readonly resolvedAgentId = computed(\n () => this.agentId() ?? this.config?.agentId() ?? DEFAULT_AGENT_ID,\n );\n\n /**\n * Normalized license context derived from Core's structured and legacy\n * Runtime authority, with the same precedence as the React provider.\n */\n private readonly licenseContext = computed(() => {\n const runtimeLicenseStatus = this.copilotkit.licenseStatus();\n const runtimeEntitlements = this.copilotkit.runtimeEntitlements?.();\n const retryableRuntimeEntitlementFailure =\n runtimeEntitlements?.status !== \"ready\" &&\n runtimeEntitlements?.error.retryable === true;\n const hasNonReadyRuntimeEntitlement =\n runtimeEntitlements !== undefined &&\n runtimeEntitlements.status !== \"ready\";\n const hasLegacyRuntimeEntitlementFallback =\n runtimeLicenseStatus === \"valid\" || runtimeLicenseStatus === \"expiring\";\n const runtimeEntitlementRetryInProgress =\n retryableRuntimeEntitlementFailure &&\n (this.copilotkit.runtimeEntitlementRetryPending?.() ?? false) &&\n !hasLegacyRuntimeEntitlementFallback;\n // Only a terminal failure denies features. A retryable failure (a\n // timeout, a network error, a 5xx) says nothing about what the project\n // may use.\n const terminalRuntimeEntitlementFailure =\n hasNonReadyRuntimeEntitlement &&\n !retryableRuntimeEntitlementFailure &&\n !hasLegacyRuntimeEntitlementFallback;\n const runtimeLicenseContext = createLicenseContextValue(\n runtimeEntitlementRetryInProgress ? undefined : runtimeLicenseStatus,\n runtimeEntitlements,\n );\n\n if (!terminalRuntimeEntitlementFailure) {\n return runtimeLicenseContext;\n }\n\n return {\n ...runtimeLicenseContext,\n checkFeature: () => false,\n getLimit: () => null,\n };\n });\n\n /**\n * Two-pronged license gate, mirroring the React wrapper. `checkFeature` fails\n * OPEN (returns true) when no license is configured, so it cannot by itself\n * detect the no-license case; we therefore also require a positive\n * license-present signal. Only a resolved `valid`/`expiring` status counts as\n * present — a resolved `none`/`expired`/`invalid` gates the drawer to the\n * locked view. `unknown` is an unrecovered retryable entitlement lookup, not\n * a settled negative: fetch the list and let the threads endpoint decide.\n */\n protected readonly licensed = computed(() => {\n const ctx = this.licenseContext();\n if (ctx.status === \"unknown\") return true;\n const licensePresent = ctx.status === \"valid\" || ctx.status === \"expiring\";\n return licensePresent && ctx.checkFeature(\"threads\");\n });\n\n /**\n * Whether the runtime has not yet reported a license status. The status is\n * `null` until the first `/info` response lands; treat that window as\n * \"not yet unlicensed\" — show the loading state, never the locked view — so a\n * licensed drawer never flashes (or strands) the Upgrade CTA mid-resolution.\n */\n protected readonly licensePending = computed(\n () => this.licenseContext().status === null,\n );\n\n /** Live thread list from CopilotKit Intelligence for the resolved agent. */\n protected readonly threads = injectThreads({\n agentId: this.resolvedAgentId,\n includeArchived: true,\n limit: this.limit,\n // While unlicensed, skip the thread fetch entirely: the element shows only\n // its locked view and no `/threads` request is issued.\n enabled: this.licensed,\n });\n\n /** Thread records mapped to the element's {@link DrawerThread} shape. */\n protected readonly drawerThreads = computed(() =>\n this.threads.threads().map(toDrawerThread),\n );\n\n /**\n * User-facing error message from the filtered list error signal, or `null`\n * when there is no error. Uses `listError` (not `error`) so developer/config\n * errors (missing runtime URL, runtime without thread endpoints) are excluded\n * and never displayed to end users.\n */\n protected readonly errorMessage = computed(\n () => this.threads.listError()?.message ?? null,\n );\n\n /**\n * The currently-active thread id, sourced from the ambient chat\n * configuration, or `null` when no configuration is present.\n */\n protected readonly activeThreadId = computed(\n () => this.config?.threadId() ?? null,\n );\n\n /**\n * User-facing fetch-more error message from the dedicated fetch-more error\n * signal, or `null`. Drives the element's inline \"couldn't load more — retry\"\n * panel without disturbing the loaded list or the initial-list `error`.\n */\n protected readonly fetchMoreErrorMessage = computed(\n () => this.threads.fetchMoreError()?.message ?? null,\n );\n\n private readonly destroyRef = inject(DestroyRef);\n\n /**\n * Provider-less fallback open-state. Without a surrounding chat configuration\n * there is no shared open-state to bind to, so the wrapper keeps its own\n * local state. Starts CLOSED — matching the configuration's own default — so\n * the element does not spring open (and scroll-lock the page on mobile) on\n * load, and the element's `open-change` events still toggle it.\n */\n private readonly localDrawerOpen = signal(false);\n\n /**\n * The effective drawer open-state: the ambient chat configuration's\n * `drawerOpen` when present, else the provider-less {@link localDrawerOpen}.\n * Pushed onto the element's controlled `open` property in the effect below.\n */\n protected readonly drawerOpen = computed(() =>\n this.config ? this.config.drawerOpen() : this.localDrawerOpen(),\n );\n\n constructor() {\n defineCopilotKitThreadsDrawer();\n\n // Announce drawer presence to the surrounding chat configuration so a\n // future header launcher can render, and de-register on destroy. Mirrors\n // the React (`registerDrawer()` effect) and Vue (`onScopeDispose`) wrappers.\n const unregisterDrawer = this.config?.registerDrawer();\n if (unregisterDrawer) {\n this.destroyRef.onDestroy(unregisterDrawer);\n }\n\n // Push signal-derived values onto the element's JS properties every time\n // any reactive dependency changes. Using an effect (rather than template\n // bindings) is required because Lit elements accept object/boolean domains\n // only as JS properties, not as HTML attributes.\n effect(() => {\n const el = this.drawerRef()?.nativeElement;\n if (!el) return;\n el.threads = this.drawerThreads();\n // While the license is still resolving, force the loading state so the\n // element shows its spinner instead of an empty/locked body.\n el.loading = this.threads.isLoading() || this.licensePending();\n el.error = this.errorMessage();\n el.fetchMoreError = this.fetchMoreErrorMessage();\n el.activeThreadId = this.activeThreadId();\n el.hasMore = this.threads.hasMoreThreads();\n el.fetchingMore = this.threads.isFetchingMoreThreads();\n // Drive the element's controlled `open` from the (config-backed or local)\n // open-state so the element does not default open=true on load.\n el.open = this.drawerOpen();\n // Pending counts as licensed for rendering: the element shows the locked\n // view only when `licensed` is false, so keeping it true until the status\n // resolves prevents the locked view from flashing mid-resolution.\n el.licensed = this.licensed() || this.licensePending();\n if (this.label() !== undefined) el.label = this.label() as string;\n const licenseUrl = this.licenseUrl();\n if (licenseUrl !== undefined) el.licenseUrl = licenseUrl;\n // `collapsible` is a default-true boolean PROPERTY (like `licensed`);\n // leave the element's own default in place when the input is unset.\n const collapsible = this.collapsible();\n if (collapsible !== undefined) {\n // TODO(ENT-1051): drop the intersection cast once the published element\n // type declares `collapsible` (see the local CollapseChangeDetail note).\n (\n el as CopilotKitThreadsDrawerElement & { collapsible: boolean }\n ).collapsible = collapsible;\n }\n });\n }\n\n /**\n * Handles the `thread-selected` event from the drawer element.\n *\n * When a `threadSelectHandler` override is provided by the host, it is called\n * exclusively. Otherwise, the ambient chat configuration is driven directly so\n * a bare `<copilot-threads-drawer>` works without any host wiring.\n *\n * @param event - The raw DOM event; cast to `CustomEvent<ThreadSelectedDetail>` to extract `threadId`.\n */\n protected onThreadSelected(event: Event): void {\n const { threadId } = (event as CustomEvent<ThreadSelectedDetail>).detail;\n const handler = this.threadSelectHandler();\n if (handler) {\n handler(threadId);\n } else {\n this.config?.setActiveThreadId(threadId, { explicit: true });\n }\n // Return focus to the chat input so keyboard users land in the composer.\n // Scope the lookup to this drawer's own chat (not document-global). Mirrors\n // the React (`findChatInput(...).focus()`) and Vue (`focusChatInput()`)\n // wrappers.\n findChatInput(this.drawerRef()?.nativeElement ?? null)?.focus();\n }\n\n /**\n * Handles the `open-change` event from the drawer element.\n *\n * Drives the ambient chat configuration's `setDrawerOpen` when present, else\n * the provider-less {@link localDrawerOpen} fallback — mirroring the React\n * and Vue wrappers so the element's open-state stays coordinated.\n *\n * @param event - The raw DOM event; cast to `CustomEvent<OpenChangeDetail>` to extract `open`.\n */\n protected onOpenChange(event: Event): void {\n const { open } = (event as CustomEvent<OpenChangeDetail>).detail;\n if (this.config) {\n this.config.setDrawerOpen(open);\n } else {\n this.localDrawerOpen.set(open);\n }\n }\n\n /**\n * Handles the `new-thread` event from the drawer element.\n *\n * Always resets the core thread store to a fresh, non-explicit client-side\n * thread first. When a `newThreadHandler` override is provided by the host,\n * it is called exclusively. Otherwise, the ambient chat configuration is\n * driven directly so a bare `<copilot-threads-drawer>` works without any host wiring.\n */\n protected onNewThread(): void {\n this.threads.startNewThread();\n const handler = this.newThreadHandler();\n if (handler) {\n handler();\n } else {\n this.config?.startNewThread();\n }\n }\n\n /**\n * Handles the `archive` event from the drawer element.\n *\n * Delegates to the threads mutation and logs any failure to the console.\n *\n * @param event - The raw DOM event; cast to `CustomEvent<ArchiveDetail>` to extract `threadId`.\n */\n protected onArchive(event: Event): void {\n const { threadId } = (event as CustomEvent<ArchiveDetail>).detail;\n this.threads.archiveThread(threadId).catch((err) => {\n console.error(\"CopilotThreadsDrawer: archiveThread failed\", err);\n });\n }\n\n /**\n * Handles the `unarchive` event from the drawer element.\n *\n * Delegates to the threads mutation and logs any failure to the console.\n *\n * @param event - The raw DOM event; cast to `CustomEvent<UnarchiveDetail>` to extract `threadId`.\n */\n protected onUnarchive(event: Event): void {\n const { threadId } = (event as CustomEvent<UnarchiveDetail>).detail;\n this.threads.unarchiveThread(threadId).catch((err) => {\n console.error(\"CopilotThreadsDrawer: unarchiveThread failed\", err);\n });\n }\n\n /**\n * Handles the `delete` event from the drawer element.\n *\n * Deleting the active thread resets to a fresh, non-explicit thread so the\n * user is not stranded on a now-gone conversation. Archiving the active\n * thread keeps the user viewing it.\n *\n * The core `threads.startNewThread()` reset is always called when the deleted\n * thread was active. When a `newThreadHandler` override is provided by the\n * host, it is called exclusively; otherwise the ambient chat configuration is\n * driven directly.\n *\n * @param event - The raw DOM event; cast to `CustomEvent<DeleteDetail>` to extract `threadId`.\n */\n protected onDelete(event: Event): void {\n const { threadId } = (event as CustomEvent<DeleteDetail>).detail;\n const wasActive = threadId === this.activeThreadId();\n this.threads\n .deleteThread(threadId)\n .then(() => {\n if (wasActive) {\n this.threads.startNewThread();\n const handler = this.newThreadHandler();\n if (handler) {\n handler();\n } else {\n this.config?.startNewThread();\n }\n }\n })\n .catch((err) => {\n console.error(\"CopilotThreadsDrawer: deleteThread failed\", err);\n });\n }\n\n /**\n * Handles the `filter-change` event from the drawer element.\n *\n * The element owns the Active/All filter; on change we refetch so the list\n * reflects the server.\n */\n protected onFilterChange(): void {\n this.threads.refetchThreads();\n }\n\n /**\n * Handles the `collapse-change` event from the drawer element — re-emits the\n * new collapsed state through the component's `collapseChange` output so hosts\n * can observe (or persist) the drawer's collapsed state.\n *\n * @param event - The raw DOM event; cast to `CustomEvent<CollapseChangeDetail>` to extract `collapsed`.\n */\n protected onCollapseChange(event: Event): void {\n const { collapsed } = (event as CustomEvent<CollapseChangeDetail>).detail;\n this.collapseChange.emit(collapsed);\n }\n\n /**\n * Handles the `retry` event from the drawer element.\n *\n * `scope` distinguishes an initial fetch retry from a fetch-more retry so\n * the correct pagination operation is invoked.\n *\n * @param event - The raw DOM event; cast to `CustomEvent<RetryDetail>` to extract `scope`.\n */\n protected onRetry(event: Event): void {\n const { scope } = (event as CustomEvent<RetryDetail>).detail;\n if (scope === \"fetch-more\") {\n this.threads.fetchMoreThreads();\n } else {\n this.threads.refetchThreads();\n }\n }\n\n /**\n * Handles the `load-more` event from the drawer element — advances pagination\n * by fetching the next page. No-op when there is no next page (the element\n * only surfaces the \"Load more\" control while `hasMoreThreads` is true).\n */\n protected onLoadMore(): void {\n this.threads.fetchMoreThreads();\n }\n\n /**\n * Handles the `licensed` event from the drawer element (Upgrade CTA click).\n *\n * The element performs its own default navigation to `licenseUrl`; this hook\n * lets the host observe the click (e.g. for telemetry) or drive a custom\n * upgrade flow when provided via `[onLicensed]`.\n */\n protected onLicensed(): void {\n this.licensedHandler()?.();\n }\n}\n","/** Convert a finite number or non-empty CSS dimension to a safe fallback. */\nexport function dimensionToCss(\n value: number | string | undefined,\n fallback: number,\n): string {\n if (typeof value === \"number\" && Number.isFinite(value)) return `${value}px`;\n if (typeof value === \"string\" && value.trim().length > 0) return value.trim();\n return `${fallback}px`;\n}\n","import { CdkTrapFocus } from \"@angular/cdk/a11y\";\nimport { NgComponentOutlet } from \"@angular/common\";\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n Type,\n afterNextRender,\n computed,\n input,\n model,\n viewChild,\n} from \"@angular/core\";\nimport { randomUUID } from \"@copilotkit/shared\";\n\nimport { CopilotChat } from \"../chat/copilot-chat\";\nimport { dimensionToCss } from \"./modal-utils\";\n\n/** Accessible, responsive floating chat surface with an explicit open model. */\n@Component({\n selector: \"copilot-popup\",\n imports: [CdkTrapFocus, NgComponentOutlet],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { class: \"copilot-popup-host\", \"data-copilotkit\": \"\" },\n template: `\n <button\n #launcher\n type=\"button\"\n class=\"copilot-modal-toggle\"\n data-copilot-popup-toggle\n [attr.aria-controls]=\"dialogId\"\n [attr.aria-expanded]=\"open()\"\n [attr.aria-label]=\"open() ? 'Close Copilot chat' : 'Open Copilot chat'\"\n [tabIndex]=\"open() ? -1 : 0\"\n (click)=\"toggle()\"\n >\n <span aria-hidden=\"true\">{{ open() ? \"×\" : \"✦\" }}</span>\n </button>\n\n @if (open()) {\n <div\n class=\"copilot-modal-backdrop\"\n data-copilot-popup-backdrop\n aria-hidden=\"true\"\n (click)=\"closeFromBackdrop()\"\n ></div>\n <section\n cdkTrapFocus\n [cdkTrapFocusAutoCapture]=\"true\"\n class=\"copilot-popup-window copilotKitPopup\"\n role=\"dialog\"\n aria-modal=\"true\"\n [attr.id]=\"dialogId\"\n [attr.aria-labelledby]=\"headerComponent() ? null : titleId\"\n [attr.aria-label]=\"headerComponent() ? title() : null\"\n [style.--copilot-popup-width]=\"resolvedWidth()\"\n [style.--copilot-popup-height]=\"resolvedHeight()\"\n (keydown.escape)=\"close()\"\n >\n <header class=\"copilot-modal-header\">\n @if (headerComponent(); as header) {\n <ng-container [ngComponentOutlet]=\"header\" />\n } @else {\n <h2 [attr.id]=\"titleId\">{{ title() }}</h2>\n }\n <button\n #initialFocus\n type=\"button\"\n cdkFocusInitial\n aria-label=\"Close Copilot chat\"\n (click)=\"close()\"\n >\n <span aria-hidden=\"true\">×</span>\n </button>\n </header>\n <div class=\"copilot-modal-chat\">\n <ng-container [ngComponentOutlet]=\"chatComponent()\" />\n </div>\n </section>\n }\n `,\n styles: `\n :host {\n display: contents;\n }\n .copilot-modal-toggle {\n position: fixed;\n right: max(1.5rem, env(safe-area-inset-right));\n bottom: max(1.5rem, env(safe-area-inset-bottom));\n z-index: 1202;\n display: grid;\n width: 3.25rem;\n height: 3.25rem;\n place-items: center;\n border: 0;\n border-radius: 999px;\n color: white;\n background: #111827;\n box-shadow: 0 12px 30px rgb(15 23 42 / 24%);\n cursor: pointer;\n }\n .copilot-modal-toggle:focus-visible,\n .copilot-modal-header button:focus-visible {\n outline: 3px solid #2563eb;\n outline-offset: 3px;\n }\n .copilot-modal-backdrop {\n position: fixed;\n inset: 0;\n z-index: 1200;\n background: rgb(15 23 42 / 24%);\n }\n .copilot-popup-window {\n position: fixed;\n right: max(1.5rem, env(safe-area-inset-right));\n bottom: max(6rem, calc(4.5rem + env(safe-area-inset-bottom)));\n z-index: 1201;\n display: grid;\n width: min(var(--copilot-popup-width), calc(100vw - 3rem));\n height: min(var(--copilot-popup-height), calc(100dvh - 7.5rem));\n grid-template-rows: auto minmax(0, 1fr);\n overflow: hidden;\n border: 1px solid #dbe3eb;\n border-radius: 1rem;\n color: #111827;\n background: white;\n box-shadow: 0 24px 60px rgb(15 23 42 / 28%);\n }\n .copilot-modal-header {\n display: flex;\n min-height: 3.5rem;\n align-items: center;\n justify-content: space-between;\n gap: 1rem;\n padding: 0.75rem 1rem;\n border-bottom: 1px solid #e2e8f0;\n }\n .copilot-modal-header h2 {\n margin: 0;\n font-size: 1rem;\n }\n .copilot-modal-header button {\n border: 0;\n color: inherit;\n background: transparent;\n font-size: 1.5rem;\n cursor: pointer;\n }\n .copilot-modal-chat {\n min-height: 0;\n overflow: hidden;\n }\n @media (max-width: 47.999rem) {\n .copilot-popup-window {\n inset: 0;\n width: 100%;\n height: 100dvh;\n border: 0;\n border-radius: 0;\n padding: env(safe-area-inset-top) env(safe-area-inset-right)\n env(safe-area-inset-bottom) env(safe-area-inset-left);\n }\n }\n @media (prefers-reduced-motion: no-preference) {\n .copilot-popup-window {\n animation: copilot-popup-enter 180ms ease-out;\n }\n @keyframes copilot-popup-enter {\n from {\n opacity: 0;\n transform: translateY(1rem) scale(0.98);\n }\n }\n }\n @media (prefers-reduced-motion: reduce) {\n .copilot-popup-window {\n animation: none;\n }\n }\n `,\n})\nexport class CopilotPopup {\n readonly open = model(true);\n readonly title = input(\"Copilot\");\n readonly width = input<number | string>(420);\n readonly height = input<number | string>(560);\n readonly clickOutsideToClose = input(false);\n readonly chatComponent = input<Type<unknown>>(CopilotChat);\n readonly headerComponent = input<Type<unknown> | undefined>();\n\n protected readonly dialogId = `copilot-popup-${randomUUID()}`;\n protected readonly titleId = `${this.dialogId}-title`;\n protected readonly resolvedWidth = computed(() =>\n dimensionToCss(this.width(), 420),\n );\n protected readonly resolvedHeight = computed(() =>\n dimensionToCss(this.height(), 560),\n );\n private readonly launcher =\n viewChild.required<ElementRef<HTMLButtonElement>>(\"launcher\");\n private readonly initialFocus =\n viewChild<ElementRef<HTMLButtonElement>>(\"initialFocus\");\n\n constructor() {\n afterNextRender(() => {\n if (this.open()) this.focusModal();\n });\n }\n\n protected toggle(): void {\n if (this.open()) this.close();\n else {\n this.open.set(true);\n queueMicrotask(() => this.focusModal());\n }\n }\n\n protected closeFromBackdrop(): void {\n if (this.clickOutsideToClose()) this.close();\n }\n\n protected close(): void {\n if (!this.open()) return;\n this.open.set(false);\n queueMicrotask(() =>\n this.launcher().nativeElement.focus({ preventScroll: true }),\n );\n }\n\n private focusModal(): void {\n this.initialFocus()?.nativeElement.focus({ preventScroll: true });\n }\n}\n","import { DOCUMENT } from \"@angular/common\";\nimport { Injectable, inject } from \"@angular/core\";\n\n/** Coordinates the single document-level layout reservation for docked sidebars. */\n@Injectable({ providedIn: \"root\" })\nexport class DockedSidebarRegistry {\n private readonly document = inject(DOCUMENT);\n private owner: symbol | undefined;\n private originalMarginInlineStart = \"\";\n private originalMarginInlineEnd = \"\";\n\n /** Acquire document docking ownership for one component instance. */\n acquire(candidate: symbol): boolean {\n if (this.owner !== undefined && this.owner !== candidate) return false;\n if (this.owner === undefined) {\n this.originalMarginInlineStart =\n this.document.body.style.marginInlineStart;\n this.originalMarginInlineEnd = this.document.body.style.marginInlineEnd;\n this.owner = candidate;\n }\n return true;\n }\n\n /** Apply the owned sidebar's logical position and width. */\n update(candidate: symbol, position: \"left\" | \"right\", width: string): void {\n if (this.owner !== candidate) return;\n this.document.body.style.marginInlineStart =\n position === \"left\" ? width : this.originalMarginInlineStart;\n this.document.body.style.marginInlineEnd =\n position === \"right\" ? width : this.originalMarginInlineEnd;\n }\n\n /** Release ownership and restore the pre-existing document margins exactly. */\n release(candidate: symbol): void {\n if (this.owner !== candidate) return;\n this.document.body.style.marginInlineStart = this.originalMarginInlineStart;\n this.document.body.style.marginInlineEnd = this.originalMarginInlineEnd;\n this.owner = undefined;\n }\n}\n","import { CdkTrapFocus } from \"@angular/cdk/a11y\";\nimport { DOCUMENT, NgComponentOutlet, NgTemplateOutlet } from \"@angular/common\";\nimport {\n ChangeDetectionStrategy,\n Component,\n DestroyRef,\n ElementRef,\n PLATFORM_ID,\n Type,\n afterNextRender,\n computed,\n inject,\n input,\n model,\n signal,\n viewChild,\n} from \"@angular/core\";\nimport { isPlatformBrowser } from \"@angular/common\";\nimport { randomUUID } from \"@copilotkit/shared\";\n\nimport { CopilotChat } from \"../chat/copilot-chat\";\nimport { explicitEffect } from \"../../explicit-effect\";\nimport { DockedSidebarRegistry } from \"./docked-sidebar-registry\";\nimport { dimensionToCss } from \"./modal-utils\";\n\nexport type CopilotSidebarMode = \"docked\" | \"overlay\";\nexport type CopilotSidebarPosition = \"left\" | \"right\";\n\n/** Responsive chat sidebar with independent overlay and single-owner docked modes. */\n@Component({\n selector: \"copilot-sidebar\",\n imports: [CdkTrapFocus, NgComponentOutlet, NgTemplateOutlet],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { class: \"copilot-sidebar-host\", \"data-copilotkit\": \"\" },\n template: `\n <button\n #launcher\n type=\"button\"\n class=\"copilot-sidebar-toggle\"\n data-copilot-sidebar-toggle\n [class.position-left]=\"position() === 'left'\"\n [attr.aria-controls]=\"sidebarId\"\n [attr.aria-expanded]=\"open()\"\n [attr.aria-label]=\"open() ? 'Close Copilot sidebar' : 'Open Copilot sidebar'\"\n [tabIndex]=\"open() ? -1 : 0\"\n (click)=\"toggle()\"\n >\n <span aria-hidden=\"true\">{{ open() ? \"×\" : \"✦\" }}</span>\n </button>\n\n @if (open() && isModal()) {\n <div\n class=\"copilot-sidebar-backdrop\"\n data-copilot-sidebar-backdrop\n aria-hidden=\"true\"\n (click)=\"closeFromBackdrop()\"\n ></div>\n <section\n cdkTrapFocus\n [cdkTrapFocusAutoCapture]=\"true\"\n class=\"copilot-sidebar-window copilotKitSidebar modal\"\n data-copilot-sidebar\n role=\"dialog\"\n aria-modal=\"true\"\n [attr.id]=\"sidebarId\"\n [attr.data-position]=\"position()\"\n [attr.aria-labelledby]=\"headerComponent() ? null : titleId\"\n [attr.aria-label]=\"headerComponent() ? title() : null\"\n [style.--copilot-sidebar-width]=\"resolvedWidth()\"\n (keydown.escape)=\"close()\"\n >\n <ng-container [ngTemplateOutlet]=\"sidebarContents\" />\n </section>\n } @else if (open() && dockAccepted()) {\n <aside\n class=\"copilot-sidebar-window copilotKitSidebar docked\"\n data-copilot-sidebar\n role=\"complementary\"\n [attr.id]=\"sidebarId\"\n [attr.data-position]=\"position()\"\n [attr.aria-labelledby]=\"headerComponent() ? null : titleId\"\n [attr.aria-label]=\"headerComponent() ? title() : null\"\n [style.--copilot-sidebar-width]=\"resolvedWidth()\"\n >\n <ng-container [ngTemplateOutlet]=\"sidebarContents\" />\n </aside>\n }\n\n <ng-template #sidebarContents>\n <header class=\"copilot-sidebar-header\">\n @if (headerComponent(); as header) {\n <ng-container [ngComponentOutlet]=\"header\" />\n } @else {\n <h2 [attr.id]=\"titleId\">{{ title() }}</h2>\n }\n <button\n #initialFocus\n type=\"button\"\n cdkFocusInitial\n aria-label=\"Close Copilot sidebar\"\n (click)=\"close()\"\n >\n <span aria-hidden=\"true\">×</span>\n </button>\n </header>\n <div class=\"copilot-sidebar-chat\">\n <ng-container [ngComponentOutlet]=\"chatComponent()\" />\n </div>\n </ng-template>\n `,\n styles: `\n :host {\n display: contents;\n }\n .copilot-sidebar-toggle {\n position: fixed;\n right: max(1.5rem, env(safe-area-inset-right));\n bottom: max(1.5rem, env(safe-area-inset-bottom));\n z-index: 1202;\n display: grid;\n width: 3.25rem;\n height: 3.25rem;\n place-items: center;\n border: 0;\n border-radius: 999px;\n color: white;\n background: #111827;\n box-shadow: 0 12px 30px rgb(15 23 42 / 24%);\n cursor: pointer;\n }\n .copilot-sidebar-toggle.position-left {\n right: auto;\n left: max(1.5rem, env(safe-area-inset-left));\n }\n .copilot-sidebar-toggle:focus-visible,\n .copilot-sidebar-header button:focus-visible {\n outline: 3px solid #2563eb;\n outline-offset: 3px;\n }\n .copilot-sidebar-backdrop {\n position: fixed;\n inset: 0;\n z-index: 1200;\n background: rgb(15 23 42 / 24%);\n }\n .copilot-sidebar-window {\n position: fixed;\n top: 0;\n bottom: 0;\n z-index: 1201;\n display: grid;\n width: min(var(--copilot-sidebar-width), 100vw);\n grid-template-rows: auto minmax(0, 1fr);\n overflow: hidden;\n color: #111827;\n background: white;\n box-shadow: 0 0 42px rgb(15 23 42 / 20%);\n padding-top: env(safe-area-inset-top);\n padding-bottom: env(safe-area-inset-bottom);\n }\n .copilot-sidebar-window[data-position=\"left\"] {\n left: 0;\n border-right: 1px solid #dbe3eb;\n }\n .copilot-sidebar-window[data-position=\"right\"] {\n right: 0;\n border-left: 1px solid #dbe3eb;\n }\n .copilot-sidebar-header {\n display: flex;\n min-height: 3.5rem;\n align-items: center;\n justify-content: space-between;\n gap: 1rem;\n padding: 0.75rem 1rem;\n border-bottom: 1px solid #e2e8f0;\n }\n .copilot-sidebar-header h2 {\n margin: 0;\n font-size: 1rem;\n }\n .copilot-sidebar-header button {\n border: 0;\n color: inherit;\n background: transparent;\n font-size: 1.5rem;\n cursor: pointer;\n }\n .copilot-sidebar-chat {\n min-height: 0;\n overflow: hidden;\n }\n @media (max-width: 47.999rem) {\n .copilot-sidebar-window {\n width: 100%;\n }\n }\n @media (prefers-reduced-motion: no-preference) {\n .copilot-sidebar-window {\n animation: copilot-sidebar-enter 220ms ease-out;\n }\n @keyframes copilot-sidebar-enter {\n from {\n opacity: 0;\n transform: translateX(8%);\n }\n }\n }\n @media (prefers-reduced-motion: reduce) {\n .copilot-sidebar-window {\n animation: none;\n }\n }\n `,\n})\nexport class CopilotSidebar {\n readonly open = model(true);\n readonly mode = input<CopilotSidebarMode>(\"docked\");\n readonly position = input<CopilotSidebarPosition>(\"right\");\n readonly width = input<number | string>(480);\n readonly title = input(\"Copilot\");\n readonly clickOutsideToClose = input(false);\n readonly chatComponent = input<Type<unknown>>(CopilotChat);\n readonly headerComponent = input<Type<unknown> | undefined>();\n\n protected readonly sidebarId = `copilot-sidebar-${randomUUID()}`;\n protected readonly titleId = `${this.sidebarId}-title`;\n protected readonly resolvedWidth = computed(() =>\n dimensionToCss(this.width(), 480),\n );\n protected readonly isCompact = signal(false);\n protected readonly isModal = computed(\n () => this.mode() === \"overlay\" || this.isCompact(),\n );\n protected readonly dockAccepted = signal(true);\n\n private readonly owner = Symbol(\"copilot-sidebar\");\n private readonly registry = inject(DockedSidebarRegistry);\n private readonly document = inject(DOCUMENT);\n private readonly isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n private readonly destroyRef = inject(DestroyRef);\n private readonly launcher =\n viewChild.required<ElementRef<HTMLButtonElement>>(\"launcher\");\n private readonly initialFocus =\n viewChild<ElementRef<HTMLButtonElement>>(\"initialFocus\");\n private ownsDock = false;\n\n constructor() {\n afterNextRender(() => {\n if (this.open() && this.isModal()) this.focusModal();\n const media = this.document.defaultView?.matchMedia?.(\n \"(max-width: 47.999rem)\",\n );\n if (!media) return;\n const update = () => this.isCompact.set(media.matches);\n update();\n media.addEventListener(\"change\", update);\n this.destroyRef.onDestroy(() =>\n media.removeEventListener(\"change\", update),\n );\n });\n\n // `position` and `resolvedWidth` are dependencies even though they are only\n // consumed on the docked path: a width or side change while docked must\n // re-push the registry entry. On the undocked path the extra re-run is\n // inert — `releaseDock()` is a no-op without ownership and `dockAccepted`\n // is set to the value it already holds.\n explicitEffect(\n () => ({\n shouldDock: this.isBrowser && this.open() && !this.isModal(),\n position: this.position(),\n width: this.resolvedWidth(),\n }),\n ({ shouldDock, position, width }) => {\n if (!shouldDock) {\n this.releaseDock();\n this.dockAccepted.set(true);\n return;\n }\n if (!this.ownsDock) {\n this.ownsDock = this.registry.acquire(this.owner);\n this.dockAccepted.set(this.ownsDock);\n if (!this.ownsDock) {\n console.warn(\n \"[CopilotKit] Only one docked CopilotSidebar may be open per document.\",\n );\n return;\n }\n }\n this.registry.update(this.owner, position, width);\n },\n );\n\n this.destroyRef.onDestroy(() => this.releaseDock());\n }\n\n protected toggle(): void {\n if (this.open()) this.close();\n else {\n this.open.set(true);\n queueMicrotask(() => {\n if (this.isModal()) this.focusModal();\n });\n }\n }\n\n protected closeFromBackdrop(): void {\n if (this.clickOutsideToClose()) this.close();\n }\n\n protected close(): void {\n if (!this.open()) return;\n this.open.set(false);\n queueMicrotask(() =>\n this.launcher().nativeElement.focus({ preventScroll: true }),\n );\n }\n\n private releaseDock(): void {\n if (!this.ownsDock) return;\n this.registry.release(this.owner);\n this.ownsDock = false;\n }\n\n private focusModal(): void {\n this.initialFocus()?.nativeElement.focus({ preventScroll: true });\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["ɵwithHeaderDefaults","ɵInterruptState","randomUUID","ɵcreateThreadStore","ɵselectThreads","ɵselectThreadsIsLoading","ɵselectThreadsError","ɵselectFetchMoreError","ɵselectHasNextPage","ɵselectIsFetchingNextPage","ɵselectIsMutating","map","takeUntil","ɵselectMemories","ɵselectMemoriesIsLoading","ɵselectMemoriesError","ɵselectMemoriesAvailable","ɵselectMemoriesRealtimeStatus","filter","i1.CopilotTooltip","i1","i1.CopilotChatViewHandlers","i2","ɵisHttpAgent"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACO,MAAM,yBAAyB,GAAG,KAAK;AAE9C,MAAM,YAAY,GAAG,8BAA8B;AACnD,MAAM,WAAW,GAAG,+BAA+B;AACnD,MAAM,iBAAiB,GAAG,wBAAwB;AAOlD,SAAS,qBAAqB,CAAC,OAA2B,EAAA;AACxD,IAAA,IAAI,CAAC,OAAO;AAAE,QAAA,OAAO,KAAK;AAC1B,IAAA,MAAM,GAAG,GAAG,OAAO,CAAC,WAAW,CAAC;IAChC,OAAO,OAAO,CAAC,GAAG,IAAI,iBAAiB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACpD;AAEM,SAAU,sBAAsB,CAAC,OAA2B,EAAA;IAChE,IAAI,CAAC,yBAAyB,EAAE;QAC9B;IACF;IAEA,IAAI,OAAO,QAAQ,KAAK,WAAW,IAAI,qBAAqB,CAAC,OAAO,CAAC,EAAE;QACrE;IACF;AAEA,IAAA,IAAI,QAAQ,CAAC,cAAc,CAAC,YAAY,CAAC,EAAE;QACzC;IACF;IAEA,MAAM,SAAS,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC;AAC/C,IAAA,SAAS,CAAC,EAAE,GAAG,YAAY;AAC3B,IAAA,SAAS,CAAC,YAAY,CAAC,aAAa,EAAE,MAAM,CAAC;AAC7C,IAAA,SAAS,CAAC,WAAW,GAAG,uBAAuB;AAC/C,IAAA,SAAS,CAAC,KAAK,CAAC,QAAQ,GAA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AAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,OAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,KAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,OAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,mBAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,qBAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,aAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,eAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,QAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,SAAA,EAAA,IAAA,EAAA,CAAA,UAAU,sEAEnB,cAAc,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;ACpP3D;;AAEG;;;;"}
1
+ {"version":3,"file":"copilotkit-angular.mjs","sources":["../../src/lib/config.ts","../../src/lib/activity-renderer.ts","../../src/lib/open-generative-ui.ts","../../src/lib/components/open-generative-ui/open-generative-ui-activity-renderer.ts","../../src/lib/explicit-effect.ts","../../src/lib/components/open-generative-ui/open-generative-ui-tool-renderer.ts","../../src/lib/package-version.ts","../../src/lib/inspector.ts","../../src/lib/open-thread-bindings.ts","../../src/lib/chat-configuration.ts","../../src/lib/copilotkit.ts","../../src/lib/tools.ts","../../src/lib/chat-config.ts","../../src/lib/utils.ts","../../src/lib/components/icons/copilot-icon.ts","../../src/lib/components/tools/tool-call-parts.ts","../../src/lib/components/tools/tool-call-render-context.ts","../../src/lib/components/tools/default-tool-renderer.ts","../../src/lib/render-tool-calls.ts","../../src/lib/interrupt.ts","../../src/lib/agent.ts","../../src/lib/capabilities.ts","../../src/lib/inject-interrupt.ts","../../src/lib/threads.ts","../../src/lib/chat-state.ts","../../src/lib/transcription.ts","../../src/lib/scroll-position.ts","../../src/lib/resize-observer.ts","../../src/lib/agent-context.ts","../../src/lib/memories.ts","../../src/lib/slots/slot.types.ts","../../src/lib/slots/slot.utils.ts","../../src/lib/slots/copilot-slot.ts","../../src/lib/directives/copilotkit-agent-context.ts","../../src/lib/directives/stick-to-bottom.ts","../../src/lib/directives/tooltip.ts","../../src/lib/components/stylesheet.ts","../../src/lib/components/copilot-kit-styles.ts","../../src/lib/components/chat/copilot-chat-tool-call-group.ts","../../src/lib/components/chat/tool-call-display-context.ts","../../src/lib/components/chat/tool-call-layout.ts","../../src/lib/components/chat/copilot-chat-tool-calls-view.ts","../../src/lib/components/chat/markdown.ts","../../src/lib/components/chat/copilot-chat-assistant-message-renderer.ts","../../src/lib/components/chat/copy-feedback.ts","../../src/lib/components/chat/copilot-chat-assistant-message-buttons.ts","../../src/lib/components/chat/copilot-chat-assistant-message-toolbar.ts","../../src/lib/components/chat/copilot-chat-inspector-button.ts","../../src/lib/components/host-styles.ts","../../src/lib/components/chat/copilot-chat-view-handlers.ts","../../src/lib/components/chat/copilot-chat-assistant-message.ts","../../src/lib/components/chat/copilot-chat-user-message-renderer.ts","../../src/lib/components/chat/copilot-chat-user-message-buttons.ts","../../src/lib/components/chat/copilot-chat-user-message-toolbar.ts","../../src/lib/components/chat/copilot-chat-user-message-branch-navigation.ts","../../src/lib/components/chat/copilot-chat-lightbox.ts","../../src/lib/components/chat/copilot-chat-attachment-renderer.ts","../../src/lib/components/chat/copilot-chat-user-message.ts","../../src/lib/components/chat/copilot-chat-message-view-cursor.ts","../../src/lib/components/chat/copilot-chat-reasoning-message.ts","../../src/lib/components/activity/pick-activity-renderer.ts","../../src/lib/components/activity/copilot-activity.ts","../../src/lib/components/chat/copilot-chat-work-summary.ts","../../src/lib/components/chat/copilot-chat-message-view.ts","../../src/lib/components/chat/copilot-chat-view-scroll-to-bottom-button.ts","../../src/lib/components/chat/copilot-chat-suggestion-pill.ts","../../src/lib/components/chat/copilot-chat-suggestion-view.ts","../../src/lib/components/chat/copilot-chat-view-scroll-view.ts","../../src/lib/components/chat/copilot-chat-view-scroll-view.html","../../src/lib/components/chat/copilot-chat-view-feather.ts","../../src/lib/components/chat/copilot-chat-textarea.ts","../../src/lib/components/chat/copilot-chat-audio-recorder.ts","../../src/lib/components/chat/copilot-chat-buttons.ts","../../src/lib/components/chat/copilot-chat-toolbar.ts","../../src/lib/components/chat/copilot-chat-tools-menu.ts","../../src/lib/components/chat/copilot-chat-run-control.ts","../../src/lib/components/chat/copilot-chat-input.ts","../../src/lib/components/chat/copilot-chat-view-disclaimer.ts","../../src/lib/components/chat/copilot-chat-attachment-queue.ts","../../src/lib/components/chat/copilot-chat-view-input-container.ts","../../src/lib/components/chat/copilot-chat-view-input-measure.ts","../../src/lib/components/chat/copilot-chat-welcome-layout.ts","../../src/lib/components/chat/copilot-chat-view.ts","../../src/lib/components/chat/copilot-chat-attachments.directive.ts","../../src/lib/active-thread-connector.ts","../../src/lib/components/chat/copilot-chat.ts","../../src/lib/components/chat/copilot-chat-input-defaults.ts","../../src/lib/components/chat/copilot-chat-input.types.ts","../../src/lib/components/chat/copilot-threads-drawer.ts","../../src/lib/components/modal/modal-dialog.ts","../../src/lib/components/modal/copilot-popup.ts","../../src/lib/components/modal/copilot-sidebar.ts","../../src/copilotkit-angular.ts"],"sourcesContent":["import type { Provider } from \"@angular/core\";\nimport { inject, InjectionToken } from \"@angular/core\";\nimport type { AbstractAgent } from \"@ag-ui/client\";\nimport type {\n ClientTool,\n FrontendToolConfig,\n HumanInTheLoopConfig,\n RenderToolCallConfig,\n} from \"./tools\";\nimport type { RenderActivityMessageConfig } from \"./activity-renderer\";\n// Type-only: a VALUE import here would pull the whole `@copilotkit/core`\n// dist into the app's startup graph, since `config.ts` sits on it\n// (`provideCopilotKit` runs at bootstrap). `copilotkit.ts` takes the\n// public-key header defaults from core (#1937's bundle-size fix).\nimport type {\n CopilotRuntimeTransport,\n SuggestionsConfig,\n ɵCopilotKitLearningOptions,\n ɵCopilotKitProviderBaseOptions,\n} from \"@copilotkit/core\";\nimport type { OpenGenerativeUIConfig } from \"./open-generative-ui\";\n\n/**\n * The options of `provideCopilotKit`. The options shared with the React and\n * Vue providers (same names) are documented on\n * `ɵCopilotKitProviderBaseOptions` in `@copilotkit/core`.\n */\nexport interface CopilotKitConfig extends Pick<\n ɵCopilotKitProviderBaseOptions,\n | \"runtimeUrl\"\n | \"headers\"\n | \"credentials\"\n | \"messageFilter\"\n | \"properties\"\n | \"selfManagedAgents\"\n | \"debug\"\n | \"defaultThrottleMs\"\n | \"onError\"\n> {\n /**\n * Transport style for CopilotKitRuntime endpoints: `\"single\"`, `\"rest\"`, or\n * `\"auto\"` (the default) to detect it from the runtime.\n */\n runtimeTransport?: CopilotRuntimeTransport;\n /**\n * Your CopilotKit public license key (`publicApiKey` in React and Vue).\n * With no `runtimeUrl`, CopilotKit uses Copilot Cloud.\n */\n licenseKey?: string;\n /** Local agents, keyed by id (`agents__unsafe_dev_only` in React and Vue). */\n agents?: Record<string, AbstractAgent>;\n tools?: ClientTool[];\n renderToolCalls?: RenderToolCallConfig[];\n renderActivityMessages?: RenderActivityMessageConfig[];\n suggestionsConfig?: SuggestionsConfig[];\n frontendTools?: FrontendToolConfig[];\n humanInTheLoop?: HumanInTheLoopConfig[];\n /** Opt in to a text-only renderer for otherwise unknown tool calls. */\n defaultToolRendering?: boolean;\n openGenerativeUI?: OpenGenerativeUIConfig;\n /**\n * Disable the CopilotKit Inspector in development.\n * The Inspector is enabled by default in development browser builds and is\n * always disabled in production and during server rendering.\n */\n enableInspector?: boolean;\n /**\n * Turns on interaction capture (`@copilotkit/learning`). `true` records with\n * the default options; pass an object for options. Without a sink, Core\n * authenticates with the runtime and sends browser events to Intelligence;\n * a custom sink keeps the standalone collector behavior.\n *\n * Capture starts in the browser once `CopilotKit` is created. Set\n * `trajectoryId` to use your own ID; otherwise one is generated. Set\n * `autoStart: false` to start capture yourself with\n * `copilotKit.core.startTrajectory()`. Capture stops when the application\n * is destroyed, including manually started Trajectories. Read the active ID\n * from `copilotKit.core.trajectoryId`.\n *\n * @example\n * provideCopilotKit({ runtimeUrl: \"/api/copilotkit\", learning: true })\n */\n learning?: boolean | ɵCopilotKitLearningOptions;\n /**\n * Set to `false` when you list `@copilotkit/core/styles.css` in your\n * `angular.json` styles, so browsers cache the CSS as a file. CopilotKit then\n * adds no `<style>` tag. For a CSP nonce, provide Angular's `CSP_NONCE`.\n * @default true\n */\n injectStyles?: boolean;\n}\n\nexport const COPILOT_KIT_CONFIG = new InjectionToken<CopilotKitConfig>(\n \"COPILOT_KIT_CONFIG\",\n);\n\nexport function injectCopilotKitConfig(): CopilotKitConfig {\n return inject(COPILOT_KIT_CONFIG);\n}\n\nexport function provideCopilotKit(config: CopilotKitConfig = {}): Provider {\n return {\n provide: COPILOT_KIT_CONFIG,\n useValue: config,\n };\n}\n","import {\n DestroyRef,\n InjectionToken,\n Type,\n Signal,\n inject,\n} from \"@angular/core\";\nimport type { AbstractAgent, ActivityMessage } from \"@ag-ui/client\";\nimport { CopilotKit } from \"./copilotkit\";\n\nexport type AngularActivityContentParseResult<T> =\n | { success: true; data: T }\n | { success: false; error?: unknown };\n\nexport interface AngularActivityContentSchema<T> {\n safeParse(content: unknown): AngularActivityContentParseResult<T>;\n}\n\nexport interface ActivityRenderer<TActivityContent = unknown> {\n activityType: Signal<string>;\n content: Signal<TActivityContent>;\n message: Signal<ActivityMessage>;\n agent: Signal<AbstractAgent | undefined>;\n}\n\nexport interface RenderActivityMessageConfig<TActivityContent = unknown> {\n activityType: string;\n agentId?: string;\n content: AngularActivityContentSchema<TActivityContent>;\n component: Type<ActivityRenderer<TActivityContent>>;\n}\n\n/**\n * Extension point used by optional secondary entry points to contribute\n * lower-precedence built-in activity renderers.\n *\n * @internal\n */\nexport const ɵCOPILOTKIT_BUILT_IN_ACTIVITY_RENDERERS = new InjectionToken<\n RenderActivityMessageConfig[]\n>(\"COPILOTKIT_BUILT_IN_ACTIVITY_RENDERERS\", { factory: () => [] });\n\nexport const anyActivityContentSchema: AngularActivityContentSchema<unknown> = {\n safeParse: (content: unknown) => ({ success: true, data: content }),\n};\n\n/** Register an activity renderer for the lifetime of the current injector. */\nexport function registerRenderActivityMessage(\n config: RenderActivityMessageConfig,\n): void {\n const copilotKit = inject(CopilotKit);\n const destroyRef = inject(DestroyRef);\n\n copilotKit.addRenderActivityMessage(config);\n destroyRef.onDestroy(() => copilotKit.removeRenderActivityMessage(config));\n}\n","import type { StandardSchemaV1 } from \"@copilotkit/shared\";\nimport type {\n FrontendToolHandlerContext,\n GenerateSandboxedUiArgs,\n OpenGenerativeUIContent,\n} from \"@copilotkit/core\";\nimport {\n ɵGENERATE_SANDBOXED_UI_ARGS_SCHEMA,\n ɵOPEN_GENERATIVE_UI_CONTENT_SCHEMA,\n} from \"@copilotkit/core\";\n\nexport {\n OPEN_GENERATIVE_UI_ACTIVITY_TYPE,\n GENERATE_SANDBOXED_UI_TOOL_NAME,\n DEFAULT_OPEN_GENERATIVE_UI_DESIGN_SKILL,\n} from \"@copilotkit/core\";\nexport type {\n OpenGenerativeUIContent,\n GenerateSandboxedUiArgs,\n} from \"@copilotkit/core\";\n\nexport { GENERATE_SANDBOXED_UI_DESCRIPTION } from \"@copilotkit/shared\";\n\n/** Validates Open Generative UI activity content (shared with React and Vue). */\nexport const OpenGenerativeUIContentSchema = ɵOPEN_GENERATIVE_UI_CONTENT_SCHEMA;\n\n/**\n * Schema for the generateSandboxedUi tool call arguments (shared with React\n * and Vue). It also describes the arguments to the model as JSON Schema.\n */\nexport const GenerateSandboxedUiArgsSchema = ɵGENERATE_SANDBOXED_UI_ARGS_SCHEMA;\n\nexport type SandboxFunction<\n Args extends Record<string, unknown> = Record<string, unknown>,\n> = {\n name: string;\n description: string;\n parameters: StandardSchemaV1<unknown, Args>;\n handler: (\n args: Args,\n context?: FrontendToolHandlerContext,\n ) => Promise<unknown> | unknown;\n};\n\nexport interface OpenGenerativeUIConfig {\n sandboxFunctions?: SandboxFunction[];\n designSkill?: string;\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n DestroyRef,\n ElementRef,\n type OnChanges,\n afterRenderEffect,\n computed,\n inject,\n input,\n signal,\n viewChild,\n InjectionToken,\n} from \"@angular/core\";\nimport type { AbstractAgent, ActivityMessage } from \"@ag-ui/client\";\nimport {\n ɵOpenGenerativeUIController,\n ɵloadWebsandbox,\n type ɵWebsandboxLoader,\n} from \"@copilotkit/core\";\nimport type { ActivityRenderer } from \"../../activity-renderer\";\nimport {\n OpenGenerativeUIContentSchema,\n type OpenGenerativeUIContent,\n} from \"../../open-generative-ui\";\nimport { injectCopilotKitConfig } from \"../../config\";\n\n/** Loads the websandbox class. Provide a fake in tests. */\nexport const OPEN_GENERATIVE_UI_WEBSANDBOX_LOADER =\n new InjectionToken<ɵWebsandboxLoader>(\n \"OPEN_GENERATIVE_UI_WEBSANDBOX_LOADER\",\n {\n providedIn: \"root\",\n factory: () => ɵloadWebsandbox,\n },\n );\n\nfunction parseOpenGenerativeUIContent(\n content: unknown,\n): OpenGenerativeUIContent {\n const result = OpenGenerativeUIContentSchema[\"~standard\"].validate(content);\n if (result instanceof Promise || result.issues) return {};\n return result.value;\n}\n\n@Component({\n selector: \"copilot-open-generative-ui-renderer\",\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <div\n #container\n data-testid=\"open-generative-ui-renderer\"\n class=\"copilot-open-generative-ui-container\"\n [style.height.px]=\"height()\"\n [class.has-visible-sandbox]=\"hasVisibleSandbox()\"\n >\n @if (state().showOverlay) {\n <div\n data-testid=\"open-generative-ui-progress-overlay\"\n class=\"copilot-open-generative-ui-overlay\"\n >\n @if (state().showSpinner) {\n <svg\n data-testid=\"open-generative-ui-spinner\"\n width=\"48\"\n height=\"48\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n class=\"copilot-open-generative-ui-spinner\"\n >\n <circle cx=\"12\" cy=\"12\" r=\"10\" stroke=\"#e0e0e0\" stroke-width=\"3\" />\n <path\n d=\"M12 2a10 10 0 0 1 10 10\"\n stroke=\"#999\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n />\n </svg>\n }\n </div>\n }\n </div>\n `,\n styles: [\n `\n .copilot-open-generative-ui-container {\n position: relative;\n width: 100%;\n border-radius: 8px;\n background-color: #f5f5f5;\n border: 1px solid #e0e0e0;\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n }\n\n .copilot-open-generative-ui-container.has-visible-sandbox {\n background-color: transparent;\n border: none;\n display: block;\n }\n\n .copilot-open-generative-ui-overlay {\n position: absolute;\n inset: 0;\n z-index: 10;\n pointer-events: all;\n background-color: rgba(255, 255, 255, 0.5);\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n .copilot-open-generative-ui-spinner {\n animation: copilot-open-generative-ui-spin 1s linear infinite;\n }\n\n @keyframes copilot-open-generative-ui-spin {\n to {\n transform: rotate(360deg);\n }\n }\n `,\n ],\n})\nexport class CopilotOpenGenerativeUIRenderer implements OnChanges {\n readonly content = input.required<OpenGenerativeUIContent>();\n\n private readonly containerRef = viewChild<\n unknown,\n ElementRef<HTMLDivElement>\n >(\"container\", { read: ElementRef });\n private readonly controller = new ɵOpenGenerativeUIController({\n loadWebsandbox: inject(OPEN_GENERATIVE_UI_WEBSANDBOX_LOADER),\n });\n protected readonly state = signal(this.controller.getState());\n\n protected readonly hasVisibleSandbox = computed(\n () => this.state().phase !== \"placeholder\",\n );\n protected readonly height = computed(() => this.state().height);\n\n constructor() {\n this.controller.setSandboxFunctions(\n injectCopilotKitConfig().openGenerativeUI?.sandboxFunctions ?? [],\n );\n const unsubscribe = this.controller.subscribe(() =>\n this.state.set(this.controller.getState()),\n );\n inject(DestroyRef).onDestroy(() => {\n unsubscribe();\n this.controller.destroy();\n });\n\n afterRenderEffect({\n write: () => {\n this.controller.setHost(this.containerRef()?.nativeElement ?? null);\n },\n });\n }\n\n /** Applies input updates synchronously before the matching render pass. */\n ngOnChanges(): void {\n this.controller.setContent(parseOpenGenerativeUIContent(this.content()));\n }\n}\n\n@Component({\n selector: \"copilot-open-generative-ui-activity-renderer\",\n imports: [CopilotOpenGenerativeUIRenderer],\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <copilot-open-generative-ui-renderer [content]=\"content()\" />\n `,\n})\nexport class CopilotOpenGenerativeUIActivityRenderer implements ActivityRenderer<OpenGenerativeUIContent> {\n readonly activityType = input.required<string>();\n readonly content = input.required<OpenGenerativeUIContent>();\n readonly message = input.required<ActivityMessage>();\n readonly agent = input<AbstractAgent | undefined>();\n}\n","import {\n effect,\n untracked,\n type CreateEffectOptions,\n type EffectCleanupRegisterFn,\n type EffectRef,\n} from \"@angular/core\";\n\n/**\n * Creates an effect whose reactive dependencies are stated up front.\n *\n * `deps` is the only reactive scope: every signal read there is tracked, and\n * nothing read in `run` is. That split is the point — a plain `effect()` tracks\n * whatever its body happens to touch, so an incidental signal read buried in\n * imperative code silently becomes a re-run trigger. Here the trigger set is\n * the first function, and a reader does not have to trace the body to find it.\n *\n * @param deps - Reactive computation; signals read here drive re-runs.\n * @param run - Imperative body, always invoked untracked. Receives the value\n * `deps` returned and the effect's cleanup registration function.\n * @param options - Standard Angular effect options (`injector`, `manualCleanup`).\n * @returns The underlying {@link EffectRef}, so callers can `destroy()` it.\n *\n * @example\n * ```ts\n * explicitEffect(\n * () => ({ threadId: threadId(), agentId: agentId() }),\n * ({ threadId, agentId }, onCleanup) => {\n * const connection = connect(agentId, threadId);\n * onCleanup(() => connection.close());\n * },\n * );\n * ```\n *\n * @example\n * ```ts\n * explicitEffect(\n * threadId,\n * (threadId) => {\n * console.log(threadId);\n * },\n * );\n * ```\n */\nexport function explicitEffect<T>(\n deps: () => T,\n run: (value: T, onCleanup: EffectCleanupRegisterFn) => void,\n options?: CreateEffectOptions,\n): EffectRef {\n return effect((onCleanup) => {\n const value = deps();\n untracked(() => run(value, onCleanup));\n }, options);\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n DestroyRef,\n NgZone,\n inject,\n input,\n signal,\n} from \"@angular/core\";\nimport { ɵPlaceholderCycler } from \"@copilotkit/core\";\nimport type { AngularToolCall, ToolRenderer } from \"../../tools\";\nimport type { GenerateSandboxedUiArgs } from \"../../open-generative-ui\";\nimport { explicitEffect } from \"../../explicit-effect\";\n\n@Component({\n selector: \"copilot-open-generative-ui-tool-renderer\",\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n @if (visibleMessage(); as message) {\n <div\n data-testid=\"open-generative-ui-tool-placeholder\"\n class=\"copilot-open-generative-ui-placeholder\"\n >\n {{ message }}\n </div>\n }\n `,\n styles: [\n `\n .copilot-open-generative-ui-placeholder {\n padding: 8px 12px;\n color: #999;\n font-size: 14px;\n }\n `,\n ],\n})\nexport class CopilotOpenGenerativeUIToolRenderer implements ToolRenderer<GenerateSandboxedUiArgs> {\n readonly toolCall =\n input.required<AngularToolCall<GenerateSandboxedUiArgs>>();\n\n readonly #cycler = new ɵPlaceholderCycler();\n protected readonly visibleMessage = signal(\n this.#cycler.getSnapshot().message,\n );\n\n constructor() {\n const zone = inject(NgZone);\n const unsubscribe = this.#cycler.subscribe(() =>\n zone.run(() =>\n this.visibleMessage.set(this.#cycler.getSnapshot().message),\n ),\n );\n inject(DestroyRef).onDestroy(() => {\n unsubscribe();\n this.#cycler.dispose();\n });\n explicitEffect(this.toolCall, (call) =>\n this.#cycler.update(\n call.args.placeholderMessages,\n call.status === \"complete\",\n ),\n );\n }\n}\n","// Generated from package.json. Do not edit.\nexport const ANGULAR_SDK_VERSION = \"2.0.0-rc.53\";\n","import { ANGULAR_SDK_VERSION } from \"./package-version\";\nimport { DOCUMENT, isPlatformBrowser } from \"@angular/common\";\nimport {\n afterNextRender,\n DestroyRef,\n Injectable,\n InjectionToken,\n Injector,\n PLATFORM_ID,\n inject,\n isDevMode,\n signal,\n} from \"@angular/core\";\nimport { shouldEnableInspector } from \"@copilotkit/shared\";\nimport { ɵmountInspector } from \"@copilotkit/web-inspector/mount\";\nimport type { ɵInspectorMount } from \"@copilotkit/web-inspector/mount\";\n\nimport { COPILOT_KIT_CONFIG, type CopilotKitConfig } from \"./config\";\nimport { CopilotKit } from \"./copilotkit\";\n\n/**\n * Injection token that reports whether the Inspector treats the app as\n * development. Tests can override it. Applications must not depend on it.\n *\n * @internal\n */\nexport const ɵCOPILOTKIT_INSPECTOR_DEVELOPMENT_MODE =\n new InjectionToken<boolean>(\"CopilotKit Inspector development mode\", {\n factory: isDevMode,\n });\n\nexport type AngularInspectorOpenRequest = {\n messageId: string;\n threadId?: string;\n agentId?: string;\n};\n\n@Injectable({ providedIn: \"root\" })\nexport class CopilotInspector {\n private readonly config = inject<CopilotKitConfig | null>(\n COPILOT_KIT_CONFIG,\n { optional: true },\n );\n private readonly injector = inject(Injector);\n private readonly document = inject(DOCUMENT);\n private readonly destroyRef = inject(DestroyRef);\n private readonly platformId = inject(PLATFORM_ID);\n private readonly isDevelopment = inject(\n ɵCOPILOTKIT_INSPECTOR_DEVELOPMENT_MODE,\n );\n readonly #visible = signal(false);\n #mount: ɵInspectorMount | null = null;\n #pendingRequest: AngularInspectorOpenRequest | null = null;\n #destroyed = false;\n\n readonly shouldRenderInspector = shouldEnableInspector({\n enableInspector: this.config?.enableInspector,\n isBrowser: isPlatformBrowser(this.platformId),\n isDevelopment: this.isDevelopment,\n hostname: this.document.defaultView?.location.hostname,\n });\n\n /**\n * Whether Inspector-backed message actions should be shown: the Inspector\n * is mounted and not hidden by a dismissal. Reads a signal, so a `computed`\n * that reads it follows Inspector visibility.\n */\n get isInspectorEnabled() {\n return this.shouldRenderInspector && this.#visible();\n }\n\n constructor() {\n this.destroyRef.onDestroy(() => {\n this.#destroyed = true;\n this.#mount?.dispose();\n this.#mount = null;\n });\n\n if (this.shouldRenderInspector) {\n afterNextRender(() => this.#mountInspector());\n }\n }\n\n /** Opens the Inspector at a message. A request made before it loads opens once it is ready. */\n openInspector(request: AngularInspectorOpenRequest): void {\n if (this.#mount) {\n this.#mount.open(request);\n return;\n }\n this.#pendingRequest = request;\n }\n\n #mountInspector(): void {\n if (this.#destroyed) return;\n const mount = ɵmountInspector(\n this.document.body,\n this.injector.get(CopilotKit).core,\n {\n load: () => import(\"@copilotkit/web-inspector\"),\n notificationContext: {\n development: this.isDevelopment,\n framework: \"angular\",\n sdkVersion: ANGULAR_SDK_VERSION,\n },\n },\n );\n mount.onVisibility((visible) => this.#visible.set(visible));\n if (this.#pendingRequest) mount.open(this.#pendingRequest);\n this.#pendingRequest = null;\n this.#mount = mount;\n }\n}\n","import { Injectable } from \"@angular/core\";\nimport type {\n ɵChatConfigurationStore,\n ɵOpenThreadRegistry,\n} from \"@copilotkit/core/chat-configuration\";\n\n/**\n * Binds each chat configuration's shown Thread to core's open-Thread registry.\n * `CopilotKit` attaches its core when it is created, so this file does not\n * import the `CopilotKit` service (and core) into an app's initial bundle.\n * Configurations created first bind when core attaches.\n *\n * @internal\n */\n@Injectable({ providedIn: \"root\" })\nexport class ɵOpenThreadBindings {\n #registry: ɵOpenThreadRegistry | undefined;\n readonly #stores = new Map<\n ɵChatConfigurationStore,\n (() => void) | undefined\n >();\n\n /** Binds every configuration to `registry`, or unbinds them all. */\n attach(registry: ɵOpenThreadRegistry | undefined): void {\n this.#registry = registry;\n for (const [store, unbind] of this.#stores) {\n unbind?.();\n this.#stores.set(store, registry && store.bindOpenThread(registry));\n }\n }\n\n /** Binds `store` now or once core attaches. Returns the cleanup. */\n add(store: ɵChatConfigurationStore): () => void {\n const registry = this.#registry;\n this.#stores.set(store, registry && store.bindOpenThread(registry));\n return () => {\n this.#stores.get(store)?.();\n this.#stores.delete(store);\n };\n }\n}\n","import {\n DestroyRef,\n InjectionToken,\n Injectable,\n inject,\n computed,\n signal,\n} from \"@angular/core\";\nimport type { Provider, Signal } from \"@angular/core\";\n// The store's own entry, not the core index: a chat configuration is often\n// provided in an app's initial bundle, which must not load all of core.\nimport { ɵChatConfigurationStore } from \"@copilotkit/core/chat-configuration\";\nimport { COPILOT_KIT_CONFIG } from \"./config\";\nimport { ɵOpenThreadBindings } from \"./open-thread-bindings\";\n\n/**\n * Options for configuring the CopilotChat session.\n * Mirrors the React CopilotChatConfigurationProvider props so behaviour\n * is consistent across frameworks.\n */\nexport interface CopilotChatConfigurationOptions {\n /**\n * The agent id to connect to.\n * When omitted the runtime's default agent is used.\n */\n agentId?: string;\n\n /**\n * An explicit thread id to resume.\n * When provided the session joins the existing thread instead of starting a\n * new one.\n */\n threadId?: string;\n\n /**\n * Whether the thread id was supplied explicitly by the host application.\n * Defaults to `false`, which seeds a non-explicit thread id that the runtime\n * may override.\n */\n hasExplicitThreadId?: boolean;\n}\n\n/**\n * Angular service that holds the runtime chat configuration state.\n *\n * Active-thread resolution mirrors the React\n * `CopilotChatConfigurationProvider` precedence (prop → override → minted)\n * without parent-provider branches (PR1 has no nested providers).\n */\n@Injectable()\nexport class CopilotChatConfiguration {\n readonly #options = inject(COPILOT_CHAT_CONFIGURATION_OPTIONS);\n\n readonly #store = new ɵChatConfigurationStore(this.#options);\n\n readonly #snapshot = signal(this.#store.getSnapshot());\n\n constructor() {\n const destroyRef = inject(DestroyRef);\n const unsubscribe = this.#store.subscribe(() => {\n this.#snapshot.set(this.#store.getSnapshot());\n });\n // Tell Core which Thread this view shows, so captured interactions can\n // link to it. Works without a CopilotKit provider: nothing to register.\n const hasCopilotKit =\n inject(COPILOT_KIT_CONFIG, { optional: true }) !== null;\n const unbindOpenThread = hasCopilotKit\n ? inject(ɵOpenThreadBindings).add(this.#store)\n : undefined;\n destroyRef.onDestroy(() => {\n unbindOpenThread?.();\n unsubscribe();\n this.#store.dispose();\n });\n }\n\n /** The agent this chat renders. */\n readonly agentId: Signal<string> = computed(() => this.#snapshot().agentId);\n\n /**\n * The active thread: a controlled `threadId` option, else a picked or new\n * thread, else a seed `threadId`, else a UUID minted once.\n */\n readonly threadId: Signal<string> = computed(() => this.#snapshot().threadId);\n\n /** `true` when a caller chose the thread (not a minted placeholder). */\n readonly hasExplicitThreadId: Signal<boolean> = computed(\n () => this.#snapshot().hasExplicitThreadId,\n );\n\n /** `true` when the `threadId` option controls the thread. */\n protected get isControlled(): boolean {\n const { threadId, hasExplicitThreadId } = this.#options;\n return threadId !== undefined && hasExplicitThreadId !== false;\n }\n\n /**\n * Show `threadId`. `explicit` (default `true`) marks it as a caller choice.\n * Ignored with a warning when the `threadId` option controls the thread.\n */\n setActiveThreadId(threadId: string, options?: { explicit?: boolean }): void {\n this.#store.setActiveThreadId(threadId, options);\n }\n\n /**\n * Show a fresh client-side thread so the welcome screen shows. Ignored with\n * a warning when the `threadId` option controls the thread.\n */\n startNewThread(): void {\n this.#store.startNewThread();\n }\n\n /** Whether the thread-list drawer is open. */\n readonly drawerOpen: Signal<boolean> = computed(\n () => this.#snapshot().drawerOpen,\n );\n\n /** Open or close the drawer. */\n setDrawerOpen(open: boolean): void {\n this.#store.setDrawerOpen(open);\n }\n\n /** `true` while at least one threads drawer is mounted. */\n readonly drawerRegistered: Signal<boolean> = computed(\n () => this.#snapshot().drawerRegistered,\n );\n\n /** Announce a mounted drawer. The returned cleanup runs once. */\n registerDrawer(): () => void {\n return this.#store.registerDrawer();\n }\n}\n\nexport const COPILOT_CHAT_CONFIGURATION =\n new InjectionToken<CopilotChatConfiguration>(\"COPILOT_CHAT_CONFIGURATION\");\n\n/**\n * Injection token for the raw {@link CopilotChatConfigurationOptions} value\n * supplied to {@link provideCopilotChatConfiguration}.\n */\nexport const COPILOT_CHAT_CONFIGURATION_OPTIONS =\n new InjectionToken<CopilotChatConfigurationOptions>(\n \"COPILOT_CHAT_CONFIGURATION_OPTIONS\",\n );\n\n/**\n * Registers the {@link CopilotChatConfiguration} service and its options into\n * the current injector.\n *\n * `CopilotChatConfiguration` is registered as the canonical class provider.\n * `COPILOT_CHAT_CONFIGURATION` is aliased to the same instance via\n * `useExisting`, so both `inject(COPILOT_CHAT_CONFIGURATION)` (via\n * {@link injectChatConfiguration}) and a direct `inject(CopilotChatConfiguration)`\n * resolve to the **same object** with shared signal state.\n *\n * @param options - Optional chat configuration overrides.\n * @returns An array of Angular providers to pass to `providers` or\n * `TestBed.configureTestingModule`.\n */\nexport function provideCopilotChatConfiguration(\n options: CopilotChatConfigurationOptions = {},\n): Provider[] {\n return [\n { provide: COPILOT_CHAT_CONFIGURATION_OPTIONS, useValue: options },\n CopilotChatConfiguration,\n {\n provide: COPILOT_CHAT_CONFIGURATION,\n useExisting: CopilotChatConfiguration,\n },\n ];\n}\n\n/**\n * Retrieves the {@link CopilotChatConfiguration} service from the current\n * injection context.\n *\n * Must be called inside an injection context (component constructor, factory\n * function, or `TestBed.runInInjectionContext`).\n */\nexport function injectChatConfiguration(): CopilotChatConfiguration {\n return inject(COPILOT_CHAT_CONFIGURATION);\n}\n","import type { AbstractAgent } from \"@ag-ui/client\";\nimport { isPlatformBrowser } from \"@angular/common\";\nimport type {\n FrontendTool,\n CopilotRuntimeTransport,\n CopilotKitCoreGetSuggestionsResult,\n CopilotKitHeadersSource,\n CopilotKitMessageFilter,\n SuggestionsConfig,\n ɵSuggestionsConfigInput,\n ɵCopilotKitCoreConfigPatch,\n ɵProviderConfigInput,\n ɵRuntimeInfo,\n} from \"@copilotkit/core\";\nimport type { DebugConfig } from \"@copilotkit/shared\";\nimport { GENERATIVE_UI_ACTIVITY_TYPE } from \"@copilotkit/shared\";\nimport {\n CopilotKitCore,\n CopilotKitCoreRuntimeConnectionStatus,\n ɵbindSuggestionsConfig,\n ɵbuildHumanInTheLoopTool,\n ɵLearningAutoStarter,\n ɵRendererRegistry,\n ɵassembleActivityRenderers,\n ɵpublicKeyHeaderDefaults,\n ɵreportProviderConfigDiagnostics,\n ɵresolveProviderConfig,\n ɵwithHeaderDefaults,\n} from \"@copilotkit/core\";\nimport type { Signal, WritableSignal } from \"@angular/core\";\nimport {\n DestroyRef,\n Injectable,\n Injector,\n PLATFORM_ID,\n computed,\n effect,\n isDevMode,\n runInInjectionContext,\n signal,\n inject,\n untracked,\n} from \"@angular/core\";\nimport type {\n FrontendToolConfig,\n HumanInTheLoopConfig,\n RenderToolCallConfig,\n} from \"./tools\";\nimport type { RenderActivityMessageConfig } from \"./activity-renderer\";\nimport {\n ɵCOPILOTKIT_BUILT_IN_ACTIVITY_RENDERERS,\n anyActivityContentSchema,\n} from \"./activity-renderer\";\nimport { injectCopilotKitConfig } from \"./config\";\nimport type { CopilotKitConfig } from \"./config\";\nimport type { GenerateSandboxedUiArgs } from \"./open-generative-ui\";\nimport {\n GENERATE_SANDBOXED_UI_TOOL_NAME,\n OPEN_GENERATIVE_UI_ACTIVITY_TYPE,\n} from \"./open-generative-ui\";\nimport {\n ɵaddOpenGenerativeUIContexts,\n ɵcreateOpenGenerativeUITool,\n ɵisOpenGenerativeUIActive,\n} from \"@copilotkit/core\";\nimport { CopilotOpenGenerativeUIActivityRenderer } from \"./components/open-generative-ui/open-generative-ui-activity-renderer\";\nimport { CopilotOpenGenerativeUIToolRenderer } from \"./components/open-generative-ui/open-generative-ui-tool-renderer\";\nimport { CopilotInspector } from \"./inspector\";\nimport { COPILOT_CHAT_CONFIGURATION } from \"./chat-configuration\";\nimport { ɵOpenThreadBindings } from \"./open-thread-bindings\";\n\n/** Map Angular's option names onto core's provider config input. */\nfunction toProviderConfigInput(config: CopilotKitConfig): ɵProviderConfigInput {\n return {\n runtimeUrl: config.runtimeUrl,\n publicApiKey: config.licenseKey,\n runtimeTransport: config.runtimeTransport,\n agents__unsafe_dev_only: config.agents,\n selfManagedAgents: config.selfManagedAgents,\n properties: config.properties,\n };\n}\n\n@Injectable({ providedIn: \"root\" })\nexport class CopilotKit {\n readonly #config = injectCopilotKitConfig();\n readonly #extensionActivityMessageRenderers = inject(\n ɵCOPILOTKIT_BUILT_IN_ACTIVITY_RENDERERS,\n );\n readonly #rootInjector = inject(Injector);\n readonly #inspector = inject(CopilotInspector);\n /** Whether unknown tools may use the built-in text-only fallback renderer. */\n readonly defaultToolRenderingEnabled =\n this.#config.defaultToolRendering === true;\n readonly #agents = signal<Record<string, AbstractAgent>>(\n this.#config.agents ?? {},\n );\n readonly agents = this.#agents.asReadonly();\n /**\n * Core's runtime info snapshot (`core.ɵruntimeInfo`). Set in the\n * constructor, then on every change. The runtime signals below read it.\n */\n readonly #runtimeInfo = signal<ɵRuntimeInfo | undefined>(undefined);\n readonly runtimeConnectionStatus = computed(\n () =>\n this.#runtimeInfo()?.status ??\n CopilotKitCoreRuntimeConnectionStatus.Disconnected,\n );\n readonly #runtimeUrl = signal<string | undefined>(undefined);\n readonly runtimeUrl = this.#runtimeUrl.asReadonly();\n readonly #runtimeTransport = signal<CopilotRuntimeTransport>(\"auto\");\n readonly runtimeTransport = this.#runtimeTransport.asReadonly();\n readonly #headers = signal<Record<string, string>>({});\n /**\n * Snapshot as of the last header SOURCE change (a `setHeaders()`/\n * `updateRuntime({ headers })` call) — not necessarily current for a\n * builder. It updates from `onHeadersChanged`, which fires only on a real\n * source change, never on a builder merely resolving a fresh token during a\n * run. With a builder this can read `{}` (or a stale record) between\n * source changes even though requests are already carrying the current\n * token (#1937). For the value a builder would resolve right now, call\n * `copilotkit.core.resolveHeaders()` instead.\n */\n readonly headers = this.#headers.asReadonly();\n readonly #headersGeneration = signal<number>(0);\n /**\n * Bumped only when `setHeaders` accepts a real source change (a new\n * builder identity, or a record whose normalized values actually differ) —\n * never when a builder merely resolves a new token. Set from\n * `onHeadersChanged`, which fires only from a real `setHeaders()` call, so\n * subscribers can key thread-context dispatch and agent header refresh on\n * this signal instead of on header VALUES (see #1937).\n */\n readonly ɵheadersGeneration = this.#headersGeneration.asReadonly();\n readonly #credentials = signal<RequestCredentials | undefined>(undefined);\n readonly credentials = this.#credentials.asReadonly();\n /**\n * Thread-endpoint capability advertised by the connected runtime's `/info`\n * response, or `undefined` before the runtime reports `Connected`. Exposed\n * as a signal (rather than a plain `core.threadEndpoints` read) so reactive\n * consumers re-run when `/info` lands.\n */\n readonly threadEndpoints = computed(\n () => this.#runtimeInfo()?.threadEndpoints,\n );\n /**\n * Voice transcription capability advertised by the connected runtime's\n * `/info` response. The value remains false until the runtime explicitly\n * reports support.\n */\n readonly audioFileTranscriptionEnabled = computed(\n () => this.#runtimeInfo()?.audioFileTranscriptionEnabled ?? false,\n );\n /**\n * Intelligence runtime info advertised by the connected runtime's `/info`\n * response, or `undefined` before the runtime reports `Connected`. Carries\n * the realtime `wsUrl`. Exposed as a signal so reactive consumers re-run\n * when `/info` populates it — even if the connection status does not\n * transition in the same turn.\n */\n readonly intelligence = computed(() => this.#runtimeInfo()?.intelligence);\n /**\n * Server-reported license status from the connected runtime's `/info`\n * response, or `undefined` before the runtime reports it. Exposed as a signal\n * (rather than a plain `core.licenseStatus` read) so reactive consumers — e.g.\n * the threads drawer's license gate — re-run once the status resolves.\n */\n readonly licenseStatus = computed(() => this.#runtimeInfo()?.licenseStatus);\n /**\n * Structured entitlement authority from the connected runtime's `/info`\n * response. Ready managed entitlements override legacy license status.\n */\n readonly runtimeEntitlements = computed(\n () => this.#runtimeInfo()?.runtimeEntitlements,\n );\n /**\n * Whether Core still owes the one bounded retry for a retryable entitlement\n * lookup. Gated UI stays pending until that retry settles.\n */\n readonly runtimeEntitlementRetryPending = computed(\n () => this.#runtimeInfo()?.runtimeEntitlementRetryPending ?? false,\n );\n readonly #suggestionsByAgent = signal<\n Record<string, CopilotKitCoreGetSuggestionsResult>\n >({});\n readonly suggestionsByAgent = this.#suggestionsByAgent.asReadonly();\n\n /**\n * The provider inputs core normalizes (key fallback, Copilot Cloud URL,\n * transport, agent merge). `updateRuntime` replaces the\n * keys it is given and resolves again.\n */\n #providerInput = toProviderConfigInput(this.#config);\n readonly #initialConfig = ɵresolveProviderConfig(this.#providerInput);\n /** The public-key header default. The key is fixed for this instance. */\n readonly #publicKeyDefaults = ɵpublicKeyHeaderDefaults(\n this.#initialConfig.publicKey,\n );\n\n // `ɵwithHeaderDefaults` returns a new function for a function source on\n // every call. Remember the last source and its wrapper, so passing the same\n // builder again hands core the same function and stays a no-op (#1937).\n #lastHeadersSource: CopilotKitHeadersSource | undefined;\n readonly #loggedDiagnostics = new Set<string>();\n #lastWrappedHeaders: CopilotKitHeadersSource | undefined;\n\n #withPublicKeyDefaults(\n source: CopilotKitHeadersSource,\n ): CopilotKitHeadersSource {\n if (source !== this.#lastHeadersSource) {\n this.#lastHeadersSource = source;\n this.#lastWrappedHeaders = ɵwithHeaderDefaults(\n source,\n this.#publicKeyDefaults,\n );\n }\n return this.#lastWrappedHeaders!;\n }\n\n readonly core = new CopilotKitCore({\n runtimeUrl: this.#initialConfig.runtimeUrl,\n runtimeTransport: this.#initialConfig.runtimeTransport,\n // `/info` starts in the constructor, and only in the browser, so server\n // rendering never fetches it.\n deferInitialConnection: true,\n headers: this.#withPublicKeyDefaults(this.#config.headers ?? {}),\n credentials: this.#config.credentials,\n messageFilter: this.#config.messageFilter,\n agents__unsafe_dev_only: this.#initialConfig.agents,\n tools: this.#config.tools,\n suggestionsConfig: this.#config.suggestionsConfig,\n properties: this.#initialConfig.properties,\n debug: this.#config.debug,\n defaultThrottleMs: this.#config.defaultThrottleMs,\n onError: this.#config.onError,\n });\n\n /**\n * App tool-call renderers and activity renderers. Config renderers are the\n * prop list; `addRenderToolCall` adds hook entries, so the latest\n * registration for a name and agent wins.\n */\n readonly #renderers = new ɵRendererRegistry<\n RenderToolCallConfig,\n RenderActivityMessageConfig,\n never\n >();\n readonly #toolCallRenderConfigs = signal(this.#renderers.toolCalls);\n readonly #clientToolCallRenderConfigs: WritableSignal<FrontendToolConfig[]> =\n signal([]);\n readonly #builtInClientToolCallRenderConfigs: WritableSignal<\n FrontendToolConfig[]\n > = signal([]);\n readonly #humanInTheLoopToolRenderConfigs: WritableSignal<\n HumanInTheLoopConfig[]\n > = signal([]);\n readonly #activityMessageRenderConfigs = signal(this.#renderers.activity);\n readonly #builtInActivityMessageRenderConfigs: WritableSignal<\n RenderActivityMessageConfig[]\n > = signal([]);\n\n readonly toolCallRenderConfigs: Signal<RenderToolCallConfig[]> = computed(\n () => [...this.#toolCallRenderConfigs()],\n );\n readonly clientToolCallRenderConfigs: Signal<FrontendToolConfig[]> = computed(\n () => [\n ...this.#clientToolCallRenderConfigs(),\n ...this.#builtInClientToolCallRenderConfigs(),\n ],\n );\n readonly humanInTheLoopToolRenderConfigs: Signal<HumanInTheLoopConfig[]> =\n this.#humanInTheLoopToolRenderConfigs.asReadonly();\n readonly activityMessageRenderConfigs: Signal<RenderActivityMessageConfig[]> =\n computed(() => [\n ...this.#activityMessageRenderConfigs(),\n ...this.#extensionActivityMessageRenderers,\n ...this.#builtInActivityMessageRenderConfigs(),\n ]);\n\n readonly #executingToolCallIds = signal(this.core.executingToolCallIds);\n /**\n * Ids of the tool calls whose frontend handler runs now. Mirrors\n * `core.executingToolCallIds`: a call stays in it until its result is in\n * the agent's messages.\n */\n readonly executingToolCallIds = this.#executingToolCallIds.asReadonly();\n\n /** Removes the built-in Open Generative UI tool, while it is registered. */\n #unregisterOpenGenerativeUITool: (() => void) | undefined;\n #removeOpenGenerativeUIContexts: (() => void) | undefined;\n #warnedMissingGenerativeUI = false;\n\n constructor() {\n // Chat configurations register their shown Thread with this core.\n const openThreads = inject(ɵOpenThreadBindings);\n openThreads.attach(this.core);\n // This service creates `core`, so it owns it and stops it on destroy.\n inject(DestroyRef).onDestroy(() => {\n openThreads.attach(undefined);\n this.core.dispose();\n });\n // Throws in production for a missing runtime config; otherwise warns.\n ɵreportProviderConfigDiagnostics(this.#initialConfig.diagnostics, {\n isProduction: !isDevMode(),\n logged: this.#loggedDiagnostics,\n });\n void this.#inspector.isInspectorEnabled;\n this.#startLearning();\n\n this.#runtimeInfo.set(this.core.ɵruntimeInfo);\n this.core.ɵsubscribeToRuntimeInfo(() => {\n this.#runtimeInfo.set(this.core.ɵruntimeInfo);\n });\n this.#runtimeUrl.set(this.core.runtimeUrl);\n this.#runtimeTransport.set(this.core.runtimeTransport);\n this.#headers.set(this.core.headers);\n this.#headersGeneration.set(this.core.ɵheadersGeneration);\n this.#credentials.set(this.core.credentials);\n this.#renderers.subscribe((kind) => {\n if (kind === \"toolCalls\") {\n this.#toolCallRenderConfigs.set(this.#renderers.toolCalls);\n } else if (kind === \"activity\") {\n this.#activityMessageRenderConfigs.set(this.#renderers.activity);\n }\n });\n const configToolRenderers: RenderToolCallConfig[] = (\n this.#config.tools ?? []\n ).flatMap((tool) =>\n tool.renderer && tool.parameters\n ? [\n {\n name: tool.name,\n args: tool.parameters,\n component: tool.renderer,\n agentId: tool.agentId,\n },\n ]\n : [],\n );\n this.#renderers.setPropToolCalls([\n ...(this.#config.renderToolCalls ?? []),\n ...configToolRenderers,\n ]);\n this.#renderers.setActivity(this.#config.renderActivityMessages ?? []);\n\n this.#config.frontendTools?.forEach((clientTool) => {\n this.addFrontendTool({ ...clientTool, injector: this.#rootInjector });\n });\n\n this.#config.humanInTheLoop?.forEach((humanInTheLoopTool) => {\n this.addHumanInTheLoop(humanInTheLoopTool);\n });\n\n // The core constructor registers dev agents without announcing them, so\n // its run tracking (per-run state, subagents) never subscribes to them.\n // Publish them once, as the React provider does on mount.\n const devAgents = this.#initialConfig.agents;\n if (Object.keys(devAgents).length > 0) {\n this.core.setAgents__unsafe_dev_only(devAgents);\n }\n\n this.core.subscribe({\n onAgentsChanged: () => {\n this.#agents.set(this.core.agents);\n },\n onExecutingToolCallsChanged: ({ executingToolCallIds }) => {\n this.#executingToolCallIds.set(executingToolCallIds);\n },\n // The runtime signals follow `ɵsubscribeToRuntimeInfo` above, which\n // core updates before it notifies this callback.\n onRuntimeConnectionStatusChanged: () => {\n this.#syncBuiltInActivityMessageRenderers();\n this.#syncBuiltInOpenGenerativeUI();\n this.#warnIfGenerativeUIMissing();\n },\n onHeadersChanged: ({ headers }) => {\n this.#headers.set(headers);\n // Fires only from a real `setHeaders()` call (a new source), never\n // from a builder resolving a new token — same generation core bumps.\n // Without this, nothing pokes Angular's reactivity when a source\n // change lands: `ɵheadersGeneration` (core's) is a plain property\n // read, not a signal, so `ɵheadersGeneration`-keyed dependents\n // (threads.ts, agent.ts) only re-read it when this handler sets ours.\n this.#headersGeneration.set(this.core.ɵheadersGeneration);\n },\n onSuggestionsChanged: ({ agentId, suggestions }) => {\n this.#setSuggestions(agentId, {\n suggestions,\n isLoading: this.core.getSuggestions(agentId).isLoading,\n });\n },\n onSuggestionsStartedLoading: ({ agentId }) => {\n this.#setSuggestions(agentId, {\n suggestions: this.core.getSuggestions(agentId).suggestions,\n isLoading: true,\n });\n },\n onSuggestionsFinishedLoading: ({ agentId }) => {\n this.#setSuggestions(agentId, {\n suggestions: this.core.getSuggestions(agentId).suggestions,\n isLoading: false,\n });\n },\n });\n this.#syncBuiltInActivityMessageRenderers();\n this.#syncBuiltInOpenGenerativeUI();\n if (isPlatformBrowser(inject(PLATFORM_ID))) {\n this.core.connect();\n }\n }\n\n #setSuggestions(\n agentId: string,\n result: CopilotKitCoreGetSuggestionsResult,\n ): void {\n this.#suggestionsByAgent.update((current) => ({\n ...current,\n [agentId]: result,\n }));\n }\n\n #bindClientTool(\n clientToolWithInjector: FrontendToolConfig & {\n injector: Injector;\n },\n ): FrontendTool {\n const { injector, handler, ...frontendCandidate } = clientToolWithInjector;\n\n // A display-only registration declares no handler, and core has its own path\n // for that: it inserts an empty tool result and completes the turn. Binding a\n // wrapper here regardless would call `undefined` on the first tool call, and\n // substituting a stub would put an invented result into the thread instead.\n if (!handler) {\n return frontendCandidate;\n }\n\n return {\n ...frontendCandidate,\n handler: (args, context) =>\n runInInjectionContext(injector, () => handler(args, context)),\n };\n }\n\n /**\n * Register a frontend tool, and the component that draws its calls when it\n * has one.\n *\n * A tool with the same name and `agentId` as an existing tool (from the\n * `tools` config or an earlier registration) hides that tool. The latest\n * registration runs. Among frontend tools with that name, its component\n * draws the calls.\n *\n * @param clientToolWithInjector - The tool, plus the injector its handler\n * runs in.\n * @returns A function that removes only this registration. The tool it hid\n * becomes active again. Calling it more than once does nothing.\n *\n * @example\n * ```ts\n * const unregister = copilotKit.addFrontendTool({ ...tool, injector });\n * // later\n * unregister();\n * ```\n */\n addFrontendTool(\n clientToolWithInjector: FrontendToolConfig & {\n injector: Injector;\n },\n ) {\n const tool = this.#bindClientTool(clientToolWithInjector);\n const unregisterTool = this.core.addTool(tool);\n\n // Newest first, so the drawn component belongs to the tool core runs.\n this.#clientToolCallRenderConfigs.update((current) => [\n clientToolWithInjector,\n ...current,\n ]);\n\n return () => {\n unregisterTool();\n this.#clientToolCallRenderConfigs.update((current) =>\n current.filter((candidate) => candidate !== clientToolWithInjector),\n );\n };\n }\n\n /**\n * Register a component that draws calls of a tool the agent already has.\n *\n * It replaces a renderer with the same `name` and `agentId`, so the latest\n * registration wins, as in React and Vue.\n *\n * @param renderConfig - The tool name, its argument schema, and the\n * component.\n * @returns A function that removes this renderer while it is still the one\n * registered for its name and agent. A `renderToolCalls` config entry it\n * replaced shows again. Calling it more than once does nothing.\n */\n addRenderToolCall(renderConfig: RenderToolCallConfig) {\n return this.#renderers.addHookToolCall(renderConfig);\n }\n\n addRenderActivityMessage(renderConfig: RenderActivityMessageConfig): void {\n this.#renderers.setActivity([...this.#renderers.activity, renderConfig]);\n }\n\n /** Remove one dynamically registered activity renderer by identity. */\n removeRenderActivityMessage(renderConfig: RenderActivityMessageConfig): void {\n this.#renderers.setActivity(\n this.#renderers.activity.filter(\n (candidate) => candidate !== renderConfig,\n ),\n );\n }\n\n #syncBuiltInActivityMessageRenderers(): void {\n this.#builtInActivityMessageRenderConfigs.set(\n ɵassembleActivityRenderers<RenderActivityMessageConfig>({\n builtIns: [\n this.#isOpenGenerativeUIActive() && {\n activityType: OPEN_GENERATIVE_UI_ACTIVITY_TYPE,\n content: anyActivityContentSchema,\n component: CopilotOpenGenerativeUIActivityRenderer,\n },\n ],\n }),\n );\n }\n\n /**\n * The runtime turns generative UI on, but nothing in the app renders its\n * surfaces. React and Vue fall back to `standardUI` here. Angular cannot:\n * `@copilotkit/angular/generative-ui` imports this entry, so this entry\n * cannot load it, not even lazily (ng-packagr rejects the cycle). The app\n * opts in with `provideGenerativeUI`, which registers the surface\n * renderer, so a missing renderer means a missing provider.\n */\n #warnIfGenerativeUIMissing(): void {\n if (this.#warnedMissingGenerativeUI || !isDevMode()) return;\n if (!this.core.ɵruntimeInfo.generativeUIEnabled) return;\n const rendered = [\n ...this.#extensionActivityMessageRenderers,\n ...this.#renderers.activity,\n ].some((renderer) => renderer.activityType === GENERATIVE_UI_ACTIVITY_TYPE);\n if (rendered) return;\n this.#warnedMissingGenerativeUI = true;\n console.warn(\n \"[CopilotKit] The runtime turns generative UI on, but no generative UI is set up, so its surfaces do not render. \" +\n \"Add `provideGenerativeUI({ ui: standardUI })` from `@copilotkit/angular/generative-ui` to the application providers.\",\n );\n }\n\n #isOpenGenerativeUIActive(): boolean {\n return ɵisOpenGenerativeUIActive({\n runtimeEnabled: this.core.ɵruntimeInfo.openGenerativeUIEnabled,\n configured: !!this.#config.openGenerativeUI,\n });\n }\n\n /** Register sandbox rendering with a side-effect-free acknowledgement safe to replay. */\n #createOpenGenerativeUITool(): FrontendToolConfig<GenerateSandboxedUiArgs> & {\n injector: Injector;\n } {\n return {\n ...ɵcreateOpenGenerativeUITool(),\n component: CopilotOpenGenerativeUIToolRenderer,\n injector: this.#rootInjector,\n };\n }\n\n #syncBuiltInOpenGenerativeUI(): void {\n const active = this.#isOpenGenerativeUIActive();\n\n if (!active) {\n this.#builtInClientToolCallRenderConfigs.set([]);\n this.#removeOpenGenerativeUIContexts?.();\n this.#removeOpenGenerativeUIContexts = undefined;\n this.#unregisterOpenGenerativeUITool?.();\n this.#unregisterOpenGenerativeUITool = undefined;\n return;\n }\n\n const builtInTool = this.#createOpenGenerativeUITool();\n this.#builtInClientToolCallRenderConfigs.set([builtInTool]);\n\n const needsBuiltInTool =\n this.#unregisterOpenGenerativeUITool === undefined &&\n !this.core.getTool({ toolName: GENERATE_SANDBOXED_UI_TOOL_NAME });\n if (needsBuiltInTool) {\n this.#unregisterOpenGenerativeUITool = this.core.addTool(\n this.#bindClientTool(builtInTool),\n );\n }\n\n this.#removeOpenGenerativeUIContexts?.();\n this.#removeOpenGenerativeUIContexts = ɵaddOpenGenerativeUIContexts(\n this.core,\n {\n designSkill: this.#config.openGenerativeUI?.designSkill,\n sandboxFunctions: this.#config.openGenerativeUI?.sandboxFunctions ?? [],\n },\n );\n }\n\n /**\n * Register a human-in-the-loop tool and the component that asks the user.\n *\n * A tool with the same name and `agentId` as an existing tool hides that\n * tool. The latest registration runs. Among human-in-the-loop tools with\n * that name, its component draws the calls.\n *\n * @param humanInTheLoopTool - The tool and its component.\n * @returns A function that removes only this registration. The tool it hid\n * becomes active again. Calling it more than once does nothing.\n */\n addHumanInTheLoop(humanInTheLoopTool: HumanInTheLoopConfig) {\n // Newest first, so the drawn component belongs to the tool core runs.\n this.#humanInTheLoopToolRenderConfigs.update((current) => [\n humanInTheLoopTool,\n ...current,\n ]);\n\n const tool = ɵbuildHumanInTheLoopTool(\n humanInTheLoopTool,\n this.core.ɵhumanInTheLoop,\n );\n const unregisterTool = this.core.addTool(tool);\n\n return () => {\n unregisterTool();\n this.#humanInTheLoopToolRenderConfigs.update((current) =>\n current.filter((candidate) => candidate !== humanInTheLoopTool),\n );\n };\n }\n\n /** Applies `config.learning` in the browser; capture stops on destroy. */\n #startLearning() {\n const { learning } = this.#config;\n if (learning === undefined || !isPlatformBrowser(inject(PLATFORM_ID))) {\n return;\n }\n const learningStarter = new ɵLearningAutoStarter(this.core);\n learningStarter.update(learning);\n inject(DestroyRef).onDestroy(() => learningStarter.dispose());\n }\n\n addSuggestionsConfig(config: SuggestionsConfig): string {\n return this.core.addSuggestionsConfig(config);\n }\n\n /**\n * Registers a suggestions config for as long as the calling context lives:\n * the Angular counterpart of `useConfigureSuggestions` in React and Vue.\n *\n * Call it in an injection context (a constructor or field initializer), or\n * pass `injector`. A global config (no `consumerAgentId`, or `\"*\"`) loads\n * for the surrounding chat configuration's agent and every idle agent. The\n * config is removed when that context is destroyed or `dispose()` is called.\n * Pass a function to re-apply the config when signals it reads change;\n * configs with equal content are no-ops.\n *\n * @example\n * readonly suggestions = inject(CopilotKit).configureSuggestions(() => ({\n * instructions: `Suggest next steps about ${this.topic()}`,\n * available: \"always\",\n * }));\n */\n configureSuggestions(\n config:\n | ɵSuggestionsConfigInput\n | null\n | undefined\n | (() => ɵSuggestionsConfigInput | null | undefined),\n options: { injector?: Injector } = {},\n ) {\n const injector = options.injector ?? inject(Injector);\n const chatConfig = injector.get(COPILOT_CHAT_CONFIGURATION, null);\n const readConfig = typeof config === \"function\" ? config : () => config;\n const readChatAgentId = () => chatConfig?.agentId();\n const binding = ɵbindSuggestionsConfig(this.core, untracked(readConfig), {\n chatAgentId: untracked(readChatAgentId),\n });\n const watcher = effect(\n () => {\n const next = readConfig();\n const chatAgentId = readChatAgentId();\n untracked(() => binding.update(next, { chatAgentId }));\n },\n { injector },\n );\n const dispose = () => {\n watcher.destroy();\n binding.dispose();\n };\n injector.get(DestroyRef).onDestroy(dispose);\n return { reload: () => binding.reload(), dispose };\n }\n\n removeSuggestionsConfig(id: string): void {\n this.core.removeSuggestionsConfig(id);\n }\n\n reloadSuggestions(agentId: string): void {\n this.core.reloadSuggestions(agentId);\n }\n\n clearSuggestions(agentId: string): void {\n this.core.clearSuggestions(agentId);\n }\n\n getSuggestions(agentId: string): CopilotKitCoreGetSuggestionsResult {\n return (\n this.#suggestionsByAgent()[agentId] ?? this.core.getSuggestions(agentId)\n );\n }\n\n #isSameAgentId<T extends { agentId?: string }>(\n target: T,\n agentId?: string,\n ): boolean {\n if (agentId) {\n return target.agentId === agentId;\n }\n\n return true;\n }\n\n /**\n * Remove every tool and renderer with this name.\n *\n * With an `agentId`, only entries for that agent go. Without one, only\n * global entries go. This also removes a tool from the `tools` config with\n * that name. To remove one registration and bring back the tool it hid,\n * call the function that `addFrontendTool`, `addHumanInTheLoop`, or\n * `addRenderToolCall` returned.\n *\n * @param toolName - The tool name.\n * @param agentId - The agent the entries belong to. Omit it for global\n * entries.\n */\n removeTool(toolName: string, agentId?: string): void {\n this.core.removeTool(toolName, agentId);\n const keep = (config: { name: string; agentId?: string }) =>\n config.name !== toolName ||\n (agentId === undefined\n ? !!config.agentId\n : !this.#isSameAgentId(config, agentId));\n this.#clientToolCallRenderConfigs.update((current) => current.filter(keep));\n this.#humanInTheLoopToolRenderConfigs.update((current) =>\n current.filter(keep),\n );\n this.#renderers.removeToolCall(toolName, agentId);\n }\n\n getAgent(agentId: string): AbstractAgent | undefined {\n return this.core.getAgent(agentId);\n }\n\n /**\n * Change the runtime config after startup.\n *\n * A key that is present is applied. `runtimeUrl`, `credentials`,\n * `messageFilter`, `debug` and `defaultThrottleMs` can be cleared by\n * passing `undefined`; the other keys are ignored when `undefined`.\n * `agents` and `selfManagedAgents` replace the last value of that key.\n */\n updateRuntime(options: {\n runtimeUrl?: string;\n runtimeTransport?: CopilotRuntimeTransport;\n headers?: CopilotKitHeadersSource;\n credentials?: RequestCredentials;\n messageFilter?: CopilotKitMessageFilter;\n properties?: Record<string, unknown>;\n agents?: Record<string, AbstractAgent>;\n selfManagedAgents?: Record<string, AbstractAgent>;\n debug?: DebugConfig;\n defaultThrottleMs?: number;\n }): void {\n const hasRuntimeUrl = \"runtimeUrl\" in options;\n const hasTransport = options.runtimeTransport !== undefined;\n const hasProperties = options.properties !== undefined;\n const hasAgents =\n options.agents !== undefined || options.selfManagedAgents !== undefined;\n this.#providerInput = {\n ...this.#providerInput,\n ...(hasRuntimeUrl && { runtimeUrl: options.runtimeUrl }),\n ...(hasTransport && { runtimeTransport: options.runtimeTransport }),\n ...(hasProperties && { properties: options.properties }),\n ...(options.agents !== undefined && {\n agents__unsafe_dev_only: options.agents,\n }),\n ...(options.selfManagedAgents !== undefined && {\n selfManagedAgents: options.selfManagedAgents,\n }),\n };\n const resolved = ɵresolveProviderConfig(this.#providerInput);\n\n const patch: ɵCopilotKitCoreConfigPatch = {};\n // `in`, not `!== undefined`: clearing these is a real instruction, and\n // `undefined` is the value that expresses it.\n if (\"messageFilter\" in options) patch.messageFilter = options.messageFilter;\n if (hasRuntimeUrl) patch.runtimeUrl = resolved.runtimeUrl;\n if (hasTransport) patch.runtimeTransport = resolved.runtimeTransport;\n if (options.headers !== undefined) {\n patch.headers = this.#withPublicKeyDefaults(options.headers);\n }\n if (\"credentials\" in options) patch.credentials = options.credentials;\n if (hasProperties) patch.properties = resolved.properties;\n if (hasAgents) patch.agents__unsafe_dev_only = resolved.agents;\n if (\"debug\" in options) patch.debug = options.debug;\n if (\"defaultThrottleMs\" in options) {\n patch.defaultThrottleMs = options.defaultThrottleMs;\n }\n this.core.ɵupdateConfig(patch);\n\n if (hasRuntimeUrl) this.#runtimeUrl.set(resolved.runtimeUrl);\n if (hasTransport) this.#runtimeTransport.set(resolved.runtimeTransport);\n if (options.headers !== undefined) this.#headers.set(this.core.headers);\n if (\"credentials\" in options) this.#credentials.set(options.credentials);\n }\n}\n","import type { Signal, Type } from \"@angular/core\";\nimport { DestroyRef, Injector, inject } from \"@angular/core\";\nimport type { AbstractAgent } from \"@ag-ui/client\";\nimport type {\n FrontendTool,\n FrontendToolHandlerContext,\n} from \"@copilotkit/core\";\nimport type {\n FrontendToolReconnectBehavior,\n WebMCPToolConfig,\n} from \"@copilotkit/core\";\nimport { ɵcomponentToolDescription } from \"@copilotkit/core\";\nimport type { StandardSchemaV1 } from \"@copilotkit/shared\";\nimport { CopilotKit } from \"./copilotkit\";\n\nexport type AngularToolCall<\n Args extends Record<string, unknown> = Record<string, unknown>,\n> =\n | {\n name?: string;\n args: Partial<Args>;\n status: \"in-progress\";\n result: undefined;\n }\n | {\n name?: string;\n args: Args;\n status: \"executing\";\n result: undefined;\n }\n | {\n name?: string;\n args: Args;\n status: \"complete\";\n result: string;\n };\n\nexport type HumanInTheLoopToolCall<\n Args extends Record<string, unknown> = Record<string, unknown>,\n> =\n | {\n name?: string;\n args: Partial<Args>;\n status: \"in-progress\";\n result: undefined;\n respond: (result: unknown) => void;\n }\n | {\n name?: string;\n args: Args;\n status: \"executing\";\n result: undefined;\n respond: (result: unknown) => void;\n }\n | {\n name?: string;\n args: Args;\n status: \"complete\";\n result: string;\n respond: (result: unknown) => void;\n };\n\nexport interface ToolRenderer<\n Args extends Record<string, unknown> = Record<string, unknown>,\n> {\n toolCall: Signal<AngularToolCall<Args>>;\n agent?: Signal<AbstractAgent | undefined>;\n}\n\nexport interface HumanInTheLoopToolRenderer<\n Args extends Record<string, unknown> = Record<string, unknown>,\n> {\n toolCall: Signal<HumanInTheLoopToolCall<Args>>;\n}\n\nexport type ClientTool<\n Args extends Record<string, unknown> = Record<string, unknown>,\n> = Omit<FrontendTool<Args>, \"handler\"> & {\n renderer?: Type<ToolRenderer<Args>>;\n};\n\nexport interface RenderToolCallConfig<\n Args extends Record<string, unknown> = Record<string, unknown>,\n> {\n name: string;\n args: StandardSchemaV1<unknown, Args>;\n component: Type<ToolRenderer<Args>>;\n agentId?: string;\n passAgent?: boolean;\n /**\n * Let the chat group this renderer's calls with other calls made in a row,\n * like the built-in card (see `toolCallDisplay`). Off by default, since a\n * custom renderer may draw anything.\n */\n group?: boolean;\n}\n\nexport interface FrontendToolConfig<\n Args extends Record<string, unknown> = Record<string, unknown>,\n> {\n name: string;\n description: string;\n parameters: StandardSchemaV1<unknown, Args>;\n component?: Type<ToolRenderer<Args>>;\n /**\n * Application code the agent runs by calling this tool.\n *\n * Optional, because a display-only registration has none: the agent calls the\n * tool to show `component` and nothing else happens. Core inserts an empty tool\n * result for a tool that declares no handler, so leaving this out completes the\n * turn without writing an invented result into the thread. Prefer\n * `registerComponent` for that case -- it is this shape with the model-facing\n * description built for you.\n */\n // The result, or a promise of it.\n handler?: (args: Args, context: FrontendToolHandlerContext) => unknown;\n followUp?: boolean;\n /**\n * Whether to run the handler again for a call that is still unanswered when\n * the thread's history is restored. Defaults to `\"passive\"`. See\n * `FrontendToolReconnectBehavior` in `@copilotkit/core`.\n */\n reconnectBehavior?: FrontendToolReconnectBehavior;\n agentId?: string;\n /**\n * Also expose this tool to browser agents through the WebMCP API\n * (`document.modelContext`). `true` uses default annotations;\n * `{ annotations }` provides WebMCP annotations.\n */\n webmcp?: boolean | WebMCPToolConfig;\n}\n\n/**\n * A component the agent can render in chat, with no application code behind it.\n *\n * The Angular counterpart of react-core's and vue's `useComponent`. It carries no\n * `handler` field at all rather than an optional one: a display-only component\n * that quietly ran application code would be a different feature, and a caller\n * who wants both wants `registerFrontendTool`.\n */\nexport interface RegisterComponentConfig<\n Args extends Record<string, unknown> = Record<string, unknown>,\n> {\n name: string;\n description?: string;\n parameters: StandardSchemaV1<unknown, Args>;\n component: Type<ToolRenderer<Args>>;\n agentId?: string;\n followUp?: boolean;\n}\n\nexport interface HumanInTheLoopConfig<\n Args extends Record<string, unknown> = Record<string, unknown>,\n> {\n name: string;\n description: string;\n parameters: StandardSchemaV1<unknown, Args>;\n component: Type<HumanInTheLoopToolRenderer<Args>>;\n agentId?: string;\n}\n\nexport function registerRenderToolCall<\n Args extends Record<string, unknown> = Record<string, unknown>,\n>(renderToolCall: RenderToolCallConfig<Args>): void {\n const copilotKit = inject(CopilotKit);\n const destroyRef = inject(DestroyRef);\n\n destroyRef.onDestroy(copilotKit.addRenderToolCall(renderToolCall));\n}\n\nexport function registerFrontendTool<\n Args extends Record<string, unknown> = Record<string, unknown>,\n>(frontendTool: FrontendToolConfig<Args>): void {\n const injector = inject(Injector);\n const destroyRef = inject(DestroyRef);\n const copilotKit = inject(CopilotKit);\n\n // Removing only this registration brings back a tool it hid, such as a\n // tool from the `tools` config with the same name.\n const unregister = copilotKit.addFrontendTool({\n ...(frontendTool as FrontendToolConfig),\n injector,\n });\n\n destroyRef.onDestroy(unregister);\n}\n\n/**\n * Registers an Angular component as a tool the agent can call to display it.\n *\n * It needs nothing on the agent side: the tool is declared by the frontend and\n * forwarded to the agent over AG-UI, so it works the same behind a Python agent as\n * a TypeScript one. Contrast `registerRenderToolCall`, which draws a tool the agent already\n * has and therefore requires that tool to exist in the agent.\n *\n * The component is an ordinary `ToolRenderer`: it takes the required `toolCall`\n * signal input and reads `toolCall().args`, exactly as it would under\n * `registerFrontendTool` or `registerRenderToolCall`.\n *\n * Registration is removed when the calling injector is destroyed.\n *\n * @param config - Name, parameter schema, and component to render.\n *\n * @example\n * ```ts\n * registerComponent({\n * name: \"show_incident\",\n * description: \"Show one incident from the incident table.\",\n * parameters: z.object({ id: z.string(), severity: z.string() }),\n * component: IncidentCardComponent,\n * });\n * ```\n */\nexport function registerComponent<\n Args extends Record<string, unknown> = Record<string, unknown>,\n>(config: RegisterComponentConfig<Args>): void {\n registerFrontendTool<Args>({\n name: config.name,\n // The same text React and Vue build, so the model reads it the same way.\n description: ɵcomponentToolDescription(config.name, config.description),\n parameters: config.parameters,\n component: config.component,\n agentId: config.agentId,\n followUp: config.followUp,\n });\n}\n\nexport function registerHumanInTheLoop<\n Args extends Record<string, unknown> = Record<string, unknown>,\n>(humanInTheLoop: HumanInTheLoopConfig<Args>): void {\n const destroyRef = inject(DestroyRef);\n const copilotKit = inject(CopilotKit);\n\n destroyRef.onDestroy(copilotKit.addHumanInTheLoop(humanInTheLoop));\n}\n","import type { Provider } from \"@angular/core\";\nimport { inject, InjectionToken } from \"@angular/core\";\nimport { CopilotChatDefaultLabels } from \"@copilotkit/core\";\nimport type { CopilotChatLabels } from \"@copilotkit/core\";\n\nexport type { CopilotChatLabels };\n\n/**\n * The default English chat text. The same object as `CopilotChatDefaultLabels`\n * from `@copilotkit/core`, so React, Vue and Angular show the same text.\n */\nexport const COPILOT_CHAT_DEFAULT_LABELS = CopilotChatDefaultLabels;\n\n/**\n * The chat text in scope. Set it with {@link provideCopilotChatLabels}, and\n * read it with {@link injectChatLabels}.\n */\nexport const COPILOT_CHAT_LABELS = new InjectionToken<CopilotChatLabels>(\n \"COPILOT_CHAT_LABELS\",\n);\n\n/**\n * Get the chat text in scope: the labels from the nearest\n * {@link provideCopilotChatLabels}, or the default English text when no\n * provider is in scope.\n *\n * Call it in an injection context, such as a component field initializer.\n *\n * @example\n * ```ts\n * readonly labels = injectChatLabels();\n * // labels.chatInputPlaceholder\n * ```\n */\nexport function injectChatLabels() {\n const labels: CopilotChatLabels =\n inject(COPILOT_CHAT_LABELS, { optional: true }) ?? CopilotChatDefaultLabels;\n return labels;\n}\n\n/**\n * Change or translate the chat text. Keys you leave out keep their default\n * English text.\n *\n * Some values are templates with `{name}` placeholders, such as\n * `\"Thought for {duration}\"`. Keep the placeholders when you translate them.\n *\n * @param config - The labels to change, by key.\n *\n * @example\n * ```ts\n * bootstrapApplication(App, {\n * providers: [\n * provideCopilotChatLabels({\n * chatInputPlaceholder: \"Frag mich etwas...\",\n * toolCallUsedToolsOther: \"{count} Tools benutzt\",\n * }),\n * ],\n * });\n * ```\n */\nexport function provideCopilotChatLabels(\n config: Partial<CopilotChatLabels>,\n): Provider {\n return {\n provide: COPILOT_CHAT_LABELS,\n useValue: {\n ...CopilotChatDefaultLabels,\n ...config,\n },\n };\n}\n","// The class-name joiner lives in core, shared with React and Vue.\nexport { ɵcn as cn } from \"@copilotkit/core\";\nexport type { ɵClassValue as ClassValue } from \"@copilotkit/core\";\n\n/**\n * Asserts that a value is neither `null` nor `undefined` and narrows its type\n * to `NonNullable<T>`.\n *\n * @param value - The value to validate.\n * @param message - The error message to use when the value is nullish.\n * @throws {Error} If the value is `null` or `undefined`.\n */\nexport function assertDefined<T>(\n value: T,\n message = `Value must be defined ${String(value)}`,\n): asserts value is NonNullable<T> {\n if (value === undefined || value === null) {\n throw new Error(message);\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n computed,\n input,\n} from \"@angular/core\";\nimport { ɵcopilotIcons, ɵcopilotIconSvgAttributes } from \"@copilotkit/core\";\nimport type { CopilotIconData } from \"@copilotkit/core\";\nimport { cn } from \"../../utils\";\n\nexport type { CopilotIconData, CopilotIconNode } from \"@copilotkit/core\";\n\n/** Lucide names of the icons from `@copilotkit/core`, keyed by their data. */\nconst lucideNames = new Map(\n Object.values(ɵcopilotIcons).map(({ nodes, name }) => [nodes, name]),\n);\n\n/**\n * Draws one chat icon from SVG data, such as `ArrowUp` from this file.\n *\n * The icon is decorative (`aria-hidden`). Put the accessible name on the\n * button or link that holds it.\n *\n * ```html\n * <copilot-icon [img]=\"ArrowUpIcon\" iconClass=\"cpk-chat-input-send-icon\" />\n * ```\n *\n * An icon from `@copilotkit/core` also gets the `lucide lucide-<name>`\n * classes, so CSS that selects Lucide classes applies to it.\n */\n@Component({\n selector: \"copilot-icon\",\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { \"aria-hidden\": \"true\" },\n styles: `\n :host {\n display: contents;\n }\n\n svg {\n display: block;\n }\n `,\n template: `\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n [attr.viewBox]=\"svgAttributes['viewBox']\"\n [attr.fill]=\"svgAttributes['fill']\"\n [attr.stroke]=\"svgAttributes['stroke']\"\n [attr.stroke-width]=\"svgAttributes['stroke-width']\"\n [attr.stroke-linecap]=\"svgAttributes['stroke-linecap']\"\n [attr.stroke-linejoin]=\"svgAttributes['stroke-linejoin']\"\n focusable=\"false\"\n aria-hidden=\"true\"\n [attr.class]=\"svgClass()\"\n [attr.width]=\"size()\"\n [attr.height]=\"size()\"\n >\n @for (node of img(); track $index) {\n @switch (node.tag) {\n @case (\"path\") {\n <path [attr.d]=\"node.attributes['d']\" />\n }\n @case (\"rect\") {\n <rect\n [attr.x]=\"node.attributes['x']\"\n [attr.y]=\"node.attributes['y']\"\n [attr.width]=\"node.attributes['width']\"\n [attr.height]=\"node.attributes['height']\"\n [attr.rx]=\"node.attributes['rx']\"\n [attr.ry]=\"node.attributes['ry']\"\n />\n }\n @case (\"circle\") {\n <circle\n [attr.cx]=\"node.attributes['cx']\"\n [attr.cy]=\"node.attributes['cy']\"\n [attr.r]=\"node.attributes['r']\"\n />\n }\n @case (\"polygon\") {\n <polygon [attr.points]=\"node.attributes['points']\" />\n }\n }\n }\n </svg>\n `,\n})\nexport class CopilotIcon {\n /** The SVG data to draw, for example `ArrowUp` from this file. */\n readonly img = input.required<CopilotIconData>();\n /** Width and height of the `<svg>` in pixels. */\n readonly size = input(24);\n /** Class for the `<svg>`. Its CSS width and height override `size`. */\n readonly iconClass = input<string | undefined>();\n\n protected readonly svgAttributes = ɵcopilotIconSvgAttributes;\n\n protected readonly svgClass = computed(() => {\n const name = lucideNames.get(this.img());\n return cn(name && `lucide lucide-${name}`, this.iconClass()) || null;\n });\n}\n\n// The chat icons from `@copilotkit/core` (Lucide data). Pass one to `img`.\nexport const ArrowUp = ɵcopilotIcons.ArrowUp.nodes;\nexport const Check = ɵcopilotIcons.Check.nodes;\nexport const ChevronDown = ɵcopilotIcons.ChevronDown.nodes;\nexport const ChevronLeft = ɵcopilotIcons.ChevronLeft.nodes;\nexport const ChevronRight = ɵcopilotIcons.ChevronRight.nodes;\nexport const Circle = ɵcopilotIcons.Circle.nodes;\nexport const Copy = ɵcopilotIcons.Copy.nodes;\nexport const Edit = ɵcopilotIcons.Edit.nodes;\nexport const EyeOff = ɵcopilotIcons.EyeOff.nodes;\nexport const Loader2 = ɵcopilotIcons.Loader2.nodes;\nexport const MessageCircle = ɵcopilotIcons.MessageCircle.nodes;\nexport const Mic = ɵcopilotIcons.Mic.nodes;\nexport const PanelLeftOpen = ɵcopilotIcons.PanelLeftOpen.nodes;\nexport const Play = ɵcopilotIcons.Play.nodes;\nexport const Plus = ɵcopilotIcons.Plus.nodes;\nexport const RefreshCw = ɵcopilotIcons.RefreshCw.nodes;\nexport const Square = ɵcopilotIcons.Square.nodes;\nexport const ThumbsDown = ɵcopilotIcons.ThumbsDown.nodes;\nexport const ThumbsUp = ɵcopilotIcons.ThumbsUp.nodes;\nexport const Upload = ɵcopilotIcons.Upload.nodes;\nexport const Volume2 = ɵcopilotIcons.Volume2.nodes;\nexport const Wrench = ɵcopilotIcons.Wrench.nodes;\nexport const X = ɵcopilotIcons.X.nodes;\n","import {\n ChangeDetectionStrategy,\n Component,\n ViewEncapsulation,\n computed,\n input,\n} from \"@angular/core\";\nimport { ɵTOOL_CALL_STATUS_ICONS, ɵcopilotIcons } from \"@copilotkit/core\";\nimport { CopilotIcon, type CopilotIconData } from \"../icons/copilot-icon\";\nimport type { ToolCallRowStatus } from \"./tool-call-render-context\";\nimport { cn } from \"../../utils\";\n\n/**\n * Height transition between closed and its content's height, like React's\n * `Collapsible`. Closed content stays rendered (so its state survives) but is\n * inert.\n * @internal\n */\n@Component({\n selector: \"div[copilotCollapsible]\",\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n class: \"cpk-collapsible\",\n \"[style.grid-template-rows]\": \"open() ? '1fr' : '0fr'\",\n \"[attr.inert]\": \"open() ? null : ''\",\n },\n template: `\n <div class=\"cpk-collapsible-content\"><ng-content /></div>\n `,\n})\nexport class CopilotCollapsible {\n readonly open = input(false, { alias: \"copilotCollapsible\" });\n}\n\n/** A status icon for a call or group: spinner, check, cross or circle. */\n@Component({\n selector: \"copilot-tool-call-status-icon\",\n imports: [CopilotIcon],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: { style: \"display: contents\" },\n template: `\n <copilot-icon [img]=\"icon()\" [iconClass]=\"iconClass()\" />\n `,\n})\nexport class CopilotToolCallStatusIcon {\n readonly status = input.required<ToolCallRowStatus>();\n protected readonly icon = computed<CopilotIconData>(\n () => ɵcopilotIcons[ɵTOOL_CALL_STATUS_ICONS[this.status()]].nodes,\n );\n protected readonly iconClass = computed(() =>\n cn(\n \"cpk-tool-call-status-icon\",\n this.status() === \"running\" && \"cpk-tool-call-status-icon-running\",\n this.status() === \"failed\" && \"cpk-tool-call-status-icon-failed\",\n ),\n );\n}\n","import { InjectionToken } from \"@angular/core\";\nimport type { Signal } from \"@angular/core\";\nimport { ɵTOOL_CALL_STATUS_LABEL_KEYS } from \"@copilotkit/core\";\nimport type {\n ɵToolCallGroupAppearance,\n ɵToolCallRowStatus,\n} from \"@copilotkit/core\";\n\n/** A grouped call that never got a result after the run ended is \"stopped\". */\nexport type ToolCallRowStatus = ɵToolCallRowStatus;\n\nexport type CopilotChatToolCallGroupAppearance = ɵToolCallGroupAppearance;\n\n/**\n * The label key for each row status, so a row's status reads from the chat\n * labels in scope.\n * @internal\n */\nexport const toolCallRowStatusLabelKeys = ɵTOOL_CALL_STATUS_LABEL_KEYS;\n\n/**\n * Handed to each tool-call renderer through its injector, like React's\n * `ToolCallGroupContext`. Inside a group, `row` is set, so CopilotKit's\n * built-in card draws itself as a compact row that fits the group.\n * @internal\n */\nexport interface ToolCallRenderContext {\n toolCallId: string;\n row?: {\n appearance: CopilotChatToolCallGroupAppearance;\n status: Signal<ToolCallRowStatus>;\n };\n}\n\n/** @internal */\nexport const TOOL_CALL_RENDER_CONTEXT =\n new InjectionToken<ToolCallRenderContext>(\"TOOL_CALL_RENDER_CONTEXT\");\n","import {\n ChangeDetectionStrategy,\n Component,\n ViewEncapsulation,\n computed,\n inject,\n input,\n signal,\n} from \"@angular/core\";\n\nimport {\n ɵgetArgumentPreview,\n ɵgetToolCallBadge,\n ɵnormalizeToolCallStatus,\n ɵstringifyToolCallAttr,\n ɵstringifyToolCallPayload,\n} from \"@copilotkit/core\";\nimport type { AngularToolCall, ToolRenderer } from \"../../tools\";\nimport { injectChatLabels } from \"../../chat-config\";\nimport { ChevronRight, CopilotIcon } from \"../icons/copilot-icon\";\nimport {\n CopilotCollapsible,\n CopilotToolCallStatusIcon,\n} from \"./tool-call-parts\";\nimport {\n TOOL_CALL_RENDER_CONTEXT,\n toolCallRowStatusLabelKeys,\n} from \"./tool-call-render-context\";\nimport { cn } from \"../../utils\";\n\n/**\n * Serialize untrusted tool values defensively for text-only display.\n *\n * Unlike a plain `JSON.stringify`, a value that cannot be encoded does not\n * fail the whole payload: a circular reference reads `\"[Circular]\"`, a\n * `bigint` reads `\"12n\"`, and `undefined`, functions and symbols get a\n * placeholder. Strings pass through. Core's `ɵstringifyToolCallPayload`.\n *\n * @param value - A tool call's arguments or result.\n */\nexport function safeToolValue(value: unknown): string {\n return ɵstringifyToolCallPayload(value);\n}\n\nlet nextId = 0;\n\n/**\n * CopilotKit's built-in tool-call card, the same as React's\n * `DefaultToolCallRenderer`. Turn it on with `defaultToolRendering: true`.\n * Inside a group of calls (see `toolCallDisplay`) it draws a compact row that\n * fits the group instead of a card.\n */\n@Component({\n selector: \"copilot-default-tool-renderer\",\n imports: [CopilotCollapsible, CopilotIcon, CopilotToolCallStatusIcon],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: { class: \"copilot-default-tool-renderer\", style: \"display: contents\" },\n template: `\n @if (row(); as row) {\n <div\n data-copilotkit\n data-testid=\"copilot-tool-render\"\n [attr.data-tool-name]=\"name()\"\n [attr.data-tool-call-id]=\"toolCallId\"\n [attr.data-status]=\"statusValue()\"\n [attr.data-args]=\"argsAttr()\"\n [attr.data-result]=\"resultAttr()\"\n [class]=\"'cpk-tool-call-row cpk-tool-call-row-' + row.appearance\"\n >\n <button\n type=\"button\"\n [attr.aria-expanded]=\"expanded()\"\n [attr.aria-controls]=\"detailsId\"\n (click)=\"toggleExpanded()\"\n class=\"cpk-tool-call-row-button\"\n >\n <copilot-tool-call-status-icon [status]=\"row.status()\" />\n <span\n data-testid=\"copilot-tool-render-name\"\n class=\"cpk-tool-call-row-name\"\n [class.cpk-shimmer]=\"row.status() === 'running'\"\n >{{ name() }}</span\n >\n @if (preview(); as preview) {\n <span class=\"cpk-tool-call-row-preview\">{{ preview }}</span>\n }\n <span\n data-testid=\"copilot-tool-render-status\"\n class=\"cpk-tool-call-row-status\"\n >{{ labels[rowStatusLabelKeys[row.status()]] }}</span\n >\n <copilot-icon [img]=\"ChevronRightIcon\" [iconClass]=\"rowChevronClass()\" />\n </button>\n <div [copilotCollapsible]=\"expanded()\" [id]=\"detailsId\">\n <div class=\"cpk-tool-call-payloads cpk-tool-call-row-payloads\">\n <div>\n <div class=\"cpk-tool-call-payload-label\">\n {{ labels.toolCallArgumentsLabel }}\n </div>\n <pre class=\"cpk-tool-call-payload-code\">{{ argumentsText() }}</pre>\n </div>\n @if (toolCall().result !== undefined) {\n <div>\n <div class=\"cpk-tool-call-payload-label\">\n {{ labels.toolCallResultLabel }}\n </div>\n <pre class=\"cpk-tool-call-payload-code\">{{ resultText() }}</pre>\n </div>\n }\n </div>\n </div>\n </div>\n } @else {\n <div\n data-testid=\"copilot-tool-render\"\n [attr.data-tool-name]=\"name()\"\n [attr.data-tool-call-id]=\"toolCallId\"\n [attr.data-status]=\"statusValue()\"\n [attr.data-args]=\"argsAttr()\"\n [attr.data-result]=\"resultAttr()\"\n class=\"cpk-default-tool-call\"\n >\n <div class=\"cpk-default-tool-call-card\">\n <button\n type=\"button\"\n [attr.aria-expanded]=\"expanded()\"\n (click)=\"toggleExpanded()\"\n class=\"cpk-default-tool-call-header\"\n style=\"font: inherit\"\n >\n <div class=\"cpk-default-tool-call-title\">\n <copilot-icon [img]=\"ChevronRightIcon\" [iconClass]=\"chevronClass()\" />\n <span\n [class]=\"\n 'cpk-default-tool-call-dot cpk-default-tool-call-dot-' + tone()\n \"\n ></span>\n <span\n data-testid=\"copilot-tool-render-name\"\n class=\"cpk-default-tool-call-name\"\n >{{ name() }}</span\n >\n </div>\n <span\n data-testid=\"copilot-tool-render-status\"\n [class]=\"\n 'cpk-default-tool-call-badge cpk-default-tool-call-badge-' + tone()\n \"\n >{{ statusLabel() }}</span\n >\n </button>\n\n @if (expanded()) {\n <div class=\"cpk-default-tool-call-details\">\n <div>\n <div class=\"cpk-default-tool-call-label\">\n {{ labels.toolCallArgumentsLabel }}\n </div>\n <pre class=\"cpk-default-tool-call-code\">{{ argumentsText() }}</pre>\n </div>\n @if (toolCall().result !== undefined) {\n <div>\n <div class=\"cpk-default-tool-call-label\">\n {{ labels.toolCallResultLabel }}\n </div>\n <pre class=\"cpk-default-tool-call-code\">{{ resultText() }}</pre>\n </div>\n }\n </div>\n }\n </div>\n </div>\n }\n `,\n})\nexport class CopilotDefaultToolRenderer implements ToolRenderer {\n readonly toolCall = input.required<AngularToolCall>();\n readonly #context = inject(TOOL_CALL_RENDER_CONTEXT, { optional: true });\n protected readonly toolCallId = this.#context?.toolCallId ?? null;\n protected readonly row = signal(this.#context?.row);\n protected readonly detailsId = `cpk-tool-call-details-${nextId++}`;\n protected readonly labels = injectChatLabels();\n protected readonly rowStatusLabelKeys = toolCallRowStatusLabelKeys;\n protected readonly ChevronRightIcon = ChevronRight;\n\n protected readonly expanded = signal(false);\n protected readonly name = computed(() => this.toolCall().name || \"Tool call\");\n protected readonly argumentsText = computed(() =>\n safeToolValue(this.toolCall().args ?? {}),\n );\n protected readonly resultText = computed(() =>\n safeToolValue(this.toolCall().result),\n );\n protected readonly argsAttr = computed(() =>\n ɵstringifyToolCallAttr(this.toolCall().args),\n );\n protected readonly resultAttr = computed(() =>\n ɵstringifyToolCallAttr(this.toolCall().result),\n );\n protected readonly preview = computed(() =>\n ɵgetArgumentPreview(this.toolCall().args),\n );\n protected readonly statusValue = computed(() =>\n ɵnormalizeToolCallStatus(this.toolCall().status),\n );\n readonly #badge = computed(() => ɵgetToolCallBadge(this.statusValue()));\n /** Colors the status dot and badge: running, done, or anything else. */\n protected readonly tone = computed(() => this.#badge().tone);\n protected readonly statusLabel = computed(\n () => this.labels[this.#badge().labelKey],\n );\n protected readonly chevronClass = computed(() =>\n cn(\n \"cpk-default-tool-call-chevron\",\n this.expanded() && \"cpk-default-tool-call-chevron-open\",\n ),\n );\n protected readonly rowChevronClass = computed(() =>\n cn(\n \"cpk-tool-call-chevron cpk-tool-call-row-chevron\",\n this.expanded() && \"cpk-tool-call-chevron-open\",\n ),\n );\n\n protected toggleExpanded(): void {\n this.expanded.update((value) => !value);\n }\n}\n","import { NgComponentOutlet } from \"@angular/common\";\nimport {\n Component,\n Injector,\n computed,\n inject,\n input,\n ChangeDetectionStrategy,\n} from \"@angular/core\";\nimport type { AssistantMessage, Message, ToolCall } from \"@ag-ui/client\";\nimport type { AbstractAgent } from \"@ag-ui/client\";\nimport { CopilotKit } from \"./copilotkit\";\nimport type {\n FrontendToolConfig,\n HumanInTheLoopToolCall,\n HumanInTheLoopConfig,\n AngularToolCall,\n RenderToolCallConfig,\n} from \"./tools\";\nimport {\n ToolCallStatus,\n ɵbuildToolCallRenderProps,\n ɵfindToolMessage,\n ɵparseToolCallArguments,\n ɵresolveToolCallAgentId,\n ɵresolveToolCallRenderer,\n} from \"@copilotkit/core\";\nimport { CopilotDefaultToolRenderer } from \"./components/tools/default-tool-renderer\";\nimport { TOOL_CALL_RENDER_CONTEXT } from \"./components/tools/tool-call-render-context\";\nimport type { ToolCallRenderContext } from \"./components/tools/tool-call-render-context\";\n\ntype RendererToolCallHandler = {\n type: \"renderer\";\n config: RenderToolCallConfig;\n};\ntype ClientToolCallHandler = {\n type: \"clientTool\";\n config: FrontendToolConfig;\n};\ntype HumanInTheLoopToolCallHandler = {\n type: \"humanInTheLoopTool\";\n config: HumanInTheLoopConfig;\n};\ntype BuiltInToolCallHandler = {\n type: \"builtIn\";\n config: { component: typeof CopilotDefaultToolRenderer };\n};\n\nexport type ToolCallHandler =\n | RendererToolCallHandler\n | ClientToolCallHandler\n | HumanInTheLoopToolCallHandler\n | BuiltInToolCallHandler;\n\n/**\n * Parse tool-call arguments without allowing malformed payloads to escape.\n * See `ɵparseToolCallArguments` in `@copilotkit/core` for the rules.\n */\nexport function parseToolCallArguments(\n rawArguments: string,\n allowPartial = false,\n): Record<string, unknown> {\n return ɵparseToolCallArguments(rawArguments, { partial: allowPartial });\n}\n\ninterface PickToolCallHandlerOptions {\n name: string;\n agentId?: string;\n application: readonly RenderToolCallConfig[];\n frontend: readonly FrontendToolConfig[];\n humanInTheLoop: readonly HumanInTheLoopConfig[];\n builtInFallback: boolean;\n}\n\n/** One entry of the flat list that core's renderer lookup walks. */\ninterface ToolCallCandidate {\n name: string;\n agentId?: string;\n handler: ToolCallHandler;\n}\n\n/**\n * Pick what draws a tool call. This follows the same rules as React and Vue.\n *\n * The first rule that matches wins:\n *\n * 1. A renderer for `name` with `agentId` equal to the current agent.\n * 2. A renderer for `name` with no `agentId`.\n * 3. The first renderer for `name` from any other agent.\n * 4. The first `\"*\"` renderer, from any agent.\n * 5. The built-in card, when `builtInFallback` is `true`.\n *\n * Inside rules 1 to 4, `application` renderers come first, then `frontend`\n * tools that have a `component`, then `humanInTheLoop` tools. Inside each\n * group, the earlier entry in its list wins.\n *\n * @param options - The tool name, the current agent, the three renderer\n * lists, and whether the built-in card may draw unknown tools.\n * @returns The handler to draw with, or `undefined` to draw nothing.\n *\n * @example\n * ```ts\n * const handler = pickToolCallHandler({\n * name: toolCall.function.name,\n * agentId: \"weather-agent\",\n * application: copilotKit.toolCallRenderConfigs(),\n * frontend: copilotKit.clientToolCallRenderConfigs(),\n * humanInTheLoop: copilotKit.humanInTheLoopToolRenderConfigs(),\n * builtInFallback: copilotKit.defaultToolRenderingEnabled,\n * });\n * ```\n */\nexport function pickToolCallHandler(\n options: PickToolCallHandlerOptions,\n): ToolCallHandler | undefined {\n const frontendWithComponent = options.frontend.filter(\n (config) => config.component !== undefined,\n );\n const candidates: ToolCallCandidate[] = [\n ...options.application.map((config) => ({\n name: config.name,\n agentId: config.agentId,\n handler: { type: \"renderer\", config } satisfies ToolCallHandler,\n })),\n ...frontendWithComponent.map((config) => ({\n name: config.name,\n agentId: config.agentId,\n handler: { type: \"clientTool\", config } satisfies ToolCallHandler,\n })),\n ...options.humanInTheLoop.map((config) => ({\n name: config.name,\n agentId: config.agentId,\n handler: { type: \"humanInTheLoopTool\", config } satisfies ToolCallHandler,\n })),\n ];\n\n const match = ɵresolveToolCallRenderer(\n candidates,\n options.name,\n options.agentId,\n );\n if (match) return match.handler;\n if (!options.builtInFallback) return undefined;\n\n return {\n type: \"builtIn\",\n config: { component: CopilotDefaultToolRenderer },\n };\n}\n\n/**\n * Renders one tool call through the registered renderers. The renderer can\n * inject `TOOL_CALL_RENDER_CONTEXT` for the call's id and, inside a group,\n * the row it is drawn as.\n */\n@Component({\n selector: \"copilot-render-tool-call\",\n imports: [NgComponentOutlet],\n changeDetection: ChangeDetectionStrategy.Eager,\n template: `\n @let renderConfig = pickRenderer(toolCall().function.name);\n @if (\n renderConfig &&\n renderConfig.type !== \"humanInTheLoopTool\" &&\n renderConfig.config.component\n ) {\n <ng-container\n *ngComponentOutlet=\"\n renderConfig.config.component;\n inputs: buildRendererInputs(toolCall(), renderConfig);\n injector: renderInjector()\n \"\n />\n }\n @if (\n renderConfig &&\n renderConfig.type === \"humanInTheLoopTool\" &&\n renderConfig.config.component\n ) {\n <ng-container\n *ngComponentOutlet=\"\n renderConfig.config.component;\n inputs: { toolCall: buildHumanInTheLoopToolCall(toolCall()) };\n injector: renderInjector()\n \"\n />\n }\n `,\n})\nexport class RenderToolCall {\n readonly #copilotKit = inject(CopilotKit);\n readonly #injector = inject(Injector);\n readonly toolCall = input.required<ToolCall>();\n /** The assistant message the call belongs to (or whose group it joined). */\n readonly message = input.required<AssistantMessage>();\n readonly messages = input.required<Message[]>();\n readonly isLoading = input<boolean>(false);\n readonly agentId = input<string | undefined>();\n /** Set by a tool-call group: how the call's row looks. */\n readonly row = input<ToolCallRenderContext[\"row\"]>();\n\n readonly #toolCallId = computed(() => this.toolCall().id);\n // Depends on the id, not the streamed call, so the renderer isn't recreated\n // on every update.\n protected readonly renderInjector = computed(() =>\n Injector.create({\n providers: [\n {\n provide: TOOL_CALL_RENDER_CONTEXT,\n useValue: {\n toolCallId: this.#toolCallId(),\n row: this.row(),\n } satisfies ToolCallRenderContext,\n },\n ],\n parent: this.#injector,\n }),\n );\n\n protected pickRenderer(name: string): ToolCallHandler | undefined {\n return pickToolCallHandler({\n name,\n agentId: ɵresolveToolCallAgentId(this.agentId(), this.#messageAgentId()),\n application: this.#copilotKit.toolCallRenderConfigs(),\n frontend: this.#copilotKit.clientToolCallRenderConfigs(),\n humanInTheLoop: this.#copilotKit.humanInTheLoopToolRenderConfigs(),\n builtInFallback: this.#copilotKit.defaultToolRenderingEnabled,\n });\n }\n\n protected buildToolCall<Args extends Record<string, unknown>>(\n toolCall: ToolCall,\n ): AngularToolCall<Args> {\n const props = this.#buildCoreProps(toolCall);\n const name = toolCall.function.name;\n // Core parses the arguments into an object; `Args` is the renderer's\n // declared shape for them.\n const args = props.args as Args;\n switch (props.status) {\n case ToolCallStatus.Complete:\n return { name, args, status: \"complete\", result: props.result };\n case ToolCallStatus.Executing:\n return { name, args, status: \"executing\", result: undefined };\n case ToolCallStatus.InProgress:\n return { name, args, status: \"in-progress\", result: undefined };\n }\n }\n\n /** Status, arguments and result from core, using its executing calls. */\n #buildCoreProps(toolCall: ToolCall) {\n return ɵbuildToolCallRenderProps(\n toolCall,\n ɵfindToolMessage(this.messages(), toolCall.id),\n {\n isExecuting: this.#copilotKit.executingToolCallIds().has(toolCall.id),\n },\n );\n }\n\n protected buildRendererInputs<Args extends Record<string, unknown>>(\n toolCall: ToolCall,\n handler:\n | RendererToolCallHandler\n | ClientToolCallHandler\n | BuiltInToolCallHandler,\n ): {\n toolCall: AngularToolCall<Args>;\n agent?: AbstractAgent;\n } {\n const inputs: {\n toolCall: AngularToolCall<Args>;\n agent?: AbstractAgent;\n } = {\n toolCall: this.buildToolCall<Args>(toolCall),\n };\n\n const shouldPassAgent =\n \"passAgent\" in handler.config && handler.config.passAgent === true;\n\n if (!shouldPassAgent) {\n return inputs;\n }\n\n const agentId = this.agentId() ?? this.#messageAgentId();\n if (!agentId) {\n return inputs;\n }\n\n const agent = this.#copilotKit.getAgent(agentId);\n if (agent) {\n inputs.agent = agent;\n }\n\n return inputs;\n }\n\n protected buildHumanInTheLoopToolCall<Args extends Record<string, unknown>>(\n toolCall: ToolCall,\n ): HumanInTheLoopToolCall<Args> {\n const toolCallWithStatus = this.buildToolCall<Args>(toolCall);\n // Keyed by call id, so a catch-all (\"*\") and parallel calls of one tool\n // each reach their own parked call.\n const respond = (result: unknown) => {\n this.#copilotKit.core.ɵhumanInTheLoop.respond(toolCall.id, result);\n };\n return { ...toolCallWithStatus, respond };\n }\n\n #messageAgentId(): string | undefined {\n return (this.message() as AssistantMessage & { agentId?: string }).agentId;\n }\n}\n\n/** Renders every tool call of an assistant message, each on its own. */\n@Component({\n selector: \"copilot-render-tool-calls\",\n imports: [RenderToolCall],\n changeDetection: ChangeDetectionStrategy.Eager,\n template: `\n @for (toolCall of message().toolCalls ?? []; track toolCall.id) {\n <copilot-render-tool-call\n [toolCall]=\"toolCall\"\n [message]=\"message()\"\n [messages]=\"messages()\"\n [agentId]=\"agentId()\"\n [isLoading]=\"isLoading()\"\n />\n }\n `,\n})\nexport class RenderToolCalls {\n readonly message = input.required<AssistantMessage>();\n readonly messages = input.required<Message[]>();\n readonly isLoading = input<boolean>(false);\n readonly agentId = input<string | undefined>();\n}\n","import type { Signal } from \"@angular/core\";\nimport { computed, signal, type WritableSignal } from \"@angular/core\";\nimport type {\n AbstractAgent,\n Interrupt,\n ResumeEntry,\n RunAgentResult,\n} from \"@ag-ui/client\";\nimport { ɵInterruptController } from \"@copilotkit/core\";\nimport type {\n InterruptEvent,\n InterruptHandlerProps,\n InterruptRenderProps,\n ɵInterruptSnapshot,\n} from \"@copilotkit/core\";\n\n// The interrupt event and handler props are core's, shared with React and Vue.\nexport type { InterruptEvent, InterruptHandlerProps } from \"@copilotkit/core\";\n\n/** Options forwarded when resuming an interrupted agent. */\nexport interface InterruptRunOptions {\n runId?: string;\n resume?: ResumeEntry[];\n forwardedProps?: Record<string, unknown>;\n}\n\n/** Injectable interrupt filtering and preprocessing options. */\nexport interface InjectInterruptOptions<TValue = unknown, TResult = never> {\n /** Agent id or signal. Defaults to the ambient chat agent. */\n agentId?: string | Signal<string | undefined>;\n /** Return false to leave this interrupt for a different controller. */\n enabled?: (event: InterruptEvent<TValue>) => boolean | PromiseLike<boolean>;\n /** Optionally prepare data for the interrupt UI. */\n handler?: (\n props: InterruptHandlerProps<TValue>,\n ) => TResult | PromiseLike<TResult>;\n}\n\n/**\n * Reactive data suitable for binding to an application interrupt component:\n * the handler props plus the handler's `result` (`null` until it settles).\n */\nexport type InterruptView<\n TValue = unknown,\n TResult = unknown,\n> = InterruptRenderProps<TValue, TResult | null>;\n\nexport type InterruptRunner = (\n agent: AbstractAgent,\n options: InterruptRunOptions,\n) => Promise<RunAgentResult>;\n\n/** Error surfaced when an application attempts to resume an expired interrupt. */\nexport { ɵInterruptExpiredError as InterruptExpiredError } from \"@copilotkit/core\";\n\n/**\n * Signal-based state machine for standard AG-UI and legacy interrupts. It\n * projects core's `ɵInterruptController` into Angular signals.\n *\n * Prefer {@link injectInterrupt} in application components. The public class is\n * useful for framework adapters and deterministic lifecycle tests.\n */\nexport class InterruptController<TValue = unknown, TResult = never> {\n readonly #controller: ɵInterruptController<TValue, TResult>;\n readonly #snapshot: WritableSignal<ɵInterruptSnapshot<TValue, TResult>>;\n\n readonly view = computed<InterruptView<TValue, TResult> | null>(\n () => this.#snapshot().renderProps,\n );\n readonly event = computed<InterruptEvent<TValue> | null>(\n () => this.view()?.event ?? null,\n );\n readonly interrupt = computed<Interrupt | null>(\n () => this.view()?.interrupt ?? null,\n );\n readonly interrupts = computed<readonly Interrupt[]>(\n () => this.view()?.interrupts ?? [],\n );\n readonly result = computed<TResult | null>(() => this.#snapshot().result);\n readonly error = computed<unknown | null>(() => this.#snapshot().error);\n readonly hasInterrupt = computed(() => this.view() !== null);\n\n /** Resolve one interrupt, resuming only after the complete set is addressed. */\n readonly resolve: (\n payload?: unknown,\n interruptId?: string,\n ) => Promise<RunAgentResult | void>;\n /** Cancel one standard interrupt; legacy interrupts are dismissed locally. */\n readonly cancel: (interruptId?: string) => Promise<RunAgentResult | void>;\n /** Alias retained for parity with other CopilotKit framework adapters. */\n readonly resolveInterrupt: InterruptController<TValue, TResult>[\"resolve\"];\n /** Alias retained for parity with other CopilotKit framework adapters. */\n readonly cancelInterrupt: InterruptController<TValue, TResult>[\"cancel\"];\n\n /** Configure the runner and optional interrupt filtering and preprocessing. */\n constructor(\n runner: InterruptRunner,\n options: InjectInterruptOptions<TValue, TResult> = {},\n ) {\n this.#controller = new ɵInterruptController<TValue, TResult>(\n { runAgent: ({ agent, ...runOptions }) => runner(agent, runOptions) },\n {\n enabled: options.enabled,\n handler: options.handler,\n name: \"injectInterrupt\",\n },\n );\n this.#snapshot = signal(this.#controller.getSnapshot());\n this.#controller.subscribe(() =>\n this.#snapshot.set(this.#controller.getSnapshot()),\n );\n this.resolve = this.#controller.resolve;\n this.cancel = this.#controller.cancel;\n this.resolveInterrupt = this.resolve;\n this.cancelInterrupt = this.cancel;\n }\n\n /** Subscribe to an agent, replacing any previous lifecycle subscription. */\n connect(agent: AbstractAgent): void {\n this.#controller.connect(agent);\n }\n\n /** Clear pending decisions when the host changes threads. */\n setThreadId(threadId: string): void {\n this.#controller.setThreadId(threadId);\n }\n\n /** Release the agent subscription and clear sensitive pending state. */\n destroy(): void {\n this.#controller.disconnect();\n }\n}\n","import type { Signal, WritableSignal } from \"@angular/core\";\nimport {\n DestroyRef,\n Injectable,\n inject,\n signal,\n computed,\n untracked,\n} from \"@angular/core\";\nimport { CopilotKit } from \"./copilotkit\";\nimport { InterruptController, type InterruptRunner } from \"./interrupt\";\nimport type { AbstractAgent } from \"@ag-ui/client\";\nimport type { Message } from \"@ag-ui/client\";\nimport type { CopilotKitCore } from \"@copilotkit/core\";\nimport {\n ɵagentUpdateHandlers,\n ɵgetAgentResolver,\n ɵresolveAgentId,\n ɵsnapshotAgentState,\n} from \"@copilotkit/core\";\n\n/** Function signature for subscribing to an agent — derived from\n * CopilotKitCore so the types stay in sync automatically. Injected\n * by the factory so that AgentStore stays decoupled from the concrete class. */\ntype SubscribeToAgentFn = CopilotKitCore[\"subscribeToAgentWithOptions\"];\nconst missingInterruptRunner: InterruptRunner = async () => {\n throw new Error(\n \"AgentStore.interruptController requires a store created by injectAgentStore().\",\n );\n};\n\nexport class AgentStore {\n readonly #subscription?: {\n unsubscribe: () => void;\n };\n readonly #isRunning: WritableSignal<boolean>;\n readonly #messages: WritableSignal<Message[]>;\n readonly #state: WritableSignal<unknown>;\n #unregisterDestroy?: () => void;\n #tornDown = false;\n\n readonly agent: AbstractAgent;\n readonly isRunning: Signal<boolean>;\n readonly messages: Signal<Message[]>;\n readonly state: Signal<unknown>;\n /** Unfiltered interrupt controller bound to this store's agent. */\n readonly interruptController: InterruptController;\n\n constructor(\n abstractAgent: AbstractAgent,\n destroyRef: DestroyRef,\n subscribeToAgent: SubscribeToAgentFn,\n interruptRunner: InterruptRunner = missingInterruptRunner,\n ) {\n this.agent = abstractAgent;\n this.interruptController = new InterruptController(interruptRunner);\n // A connected agent can already carry restored thread data before this\n // store subscribes. Seed the signals synchronously so the first render is\n // complete instead of waiting for a future mutation that may never occur.\n this.#isRunning = signal(abstractAgent.isRunning);\n this.isRunning = this.#isRunning.asReadonly();\n this.#messages = signal([...abstractAgent.messages]);\n this.#state = signal(ɵsnapshotAgentState(abstractAgent.state));\n this.messages = this.#messages.asReadonly();\n this.state = this.#state.asReadonly();\n\n // Core's `useAgent` handler map, with notifies that update the signals\n // synchronously (not batched per microtask like React and Vue), so a\n // reader right after an agent event already sees it. `AbstractAgent` sets\n // `isRunning` before it calls the run callbacks, so every callback reads\n // the run status from the agent.\n const syncIsRunning = () => this.#isRunning.set(abstractAgent.isRunning);\n this.#subscription = subscribeToAgent(abstractAgent, {\n ...ɵagentUpdateHandlers([\"OnRunStatusChanged\"], syncIsRunning),\n ...ɵagentUpdateHandlers([\"OnMessagesChanged\"], () => {\n syncIsRunning();\n this.#messages.set([...abstractAgent.messages]);\n }),\n ...ɵagentUpdateHandlers([\"OnStateChanged\"], () => {\n syncIsRunning();\n this.#state.set(ɵsnapshotAgentState(abstractAgent.state));\n }),\n });\n // Preserve the store projection as the agent's first subscriber so its\n // synchronous message/state updates keep their existing timing.\n untracked(() => this.interruptController.connect(abstractAgent));\n\n this.#unregisterDestroy = destroyRef.onDestroy(() => {\n this.teardown();\n });\n }\n\n teardown(): void {\n if (this.#tornDown) return;\n this.#tornDown = true;\n this.#unregisterDestroy?.();\n this.#unregisterDestroy = undefined;\n if (this.#subscription) {\n this.#subscription.unsubscribe();\n }\n // Agent swaps can tear down a store while the factory computed is running.\n untracked(() => this.interruptController.destroy());\n }\n}\n\n@Injectable({ providedIn: \"root\" })\nexport class CopilotkitAgentFactory {\n readonly #copilotkit = inject(CopilotKit);\n\n createAgentStoreSignal(\n agentId: Signal<string | undefined>,\n destroyRef: DestroyRef,\n ): Signal<AgentStore> {\n let lastAgentStore: AgentStore | undefined;\n let lastAgent: AbstractAgent | undefined;\n const core = this.#copilotkit.core;\n const resolver = ɵgetAgentResolver(core);\n const subscribeToAgent: SubscribeToAgentFn =\n core.subscribeToAgentWithOptions.bind(core);\n const interruptRunner: InterruptRunner = (agent, runOptions) =>\n core.runAgent({ agent, ...runOptions });\n\n return computed(() => {\n this.#copilotkit.agents();\n this.#copilotkit.runtimeConnectionStatus();\n this.#copilotkit.runtimeUrl();\n this.#copilotkit.runtimeTransport();\n // Keyed on the generation, not header VALUES: a builder's returned\n // token can change on every resolution without a new source ever being\n // set, and this must not re-run the resolution on that (#1937).\n this.#copilotkit.ɵheadersGeneration();\n this.#copilotkit.credentials();\n const resolvedAgentId = ɵresolveAgentId({\n agentId: agentId() || undefined,\n });\n\n // Runtime discovery invalidates this computed. The hand-off can notify\n // the provisional store synchronously, and its subscriber must update\n // signals outside the computed's read-only reactive context.\n const { agent } = untracked(() =>\n resolver.resolve({\n agentId: resolvedAgentId,\n caller: \"injectAgentStore\",\n }),\n );\n\n if (lastAgentStore && lastAgent === agent) {\n return lastAgentStore;\n }\n\n lastAgentStore?.teardown();\n lastAgent = agent;\n lastAgentStore = new AgentStore(\n agent,\n destroyRef,\n subscribeToAgent,\n interruptRunner,\n );\n untracked(() => resolver.retainHandoffOrder(agent));\n return lastAgentStore;\n });\n }\n}\n\nexport function injectAgentStore(\n agentId: string | Signal<string | undefined>,\n): Signal<AgentStore> {\n const agentFactory = inject(CopilotkitAgentFactory);\n const destroyRef = inject(DestroyRef);\n const agentIdSignal =\n typeof agentId === \"function\" ? agentId : computed(() => agentId);\n\n return agentFactory.createAgentStoreSignal(agentIdSignal, destroyRef);\n}\n","import { computed, inject, type Signal } from \"@angular/core\";\nimport type { AgentCapabilities } from \"@ag-ui/core\";\nimport { ɵgetAgentCapabilities } from \"@copilotkit/core\";\nimport { DEFAULT_AGENT_ID } from \"@copilotkit/shared\";\nimport { injectAgentStore } from \"./agent\";\nimport { COPILOT_CHAT_CONFIGURATION } from \"./chat-configuration\";\n\n/**\n * Returns the capabilities declared by the resolved AG-UI agent.\n *\n * @param agentId - Optional agent ID or signal. When omitted, agent resolution\n * uses the ambient chat configuration and then the default agent.\n */\nexport function injectCapabilities(\n agentId?: string | Signal<string | undefined>,\n): Signal<AgentCapabilities | undefined> {\n const resolvedAgentId =\n agentId ??\n inject(COPILOT_CHAT_CONFIGURATION, { optional: true })?.agentId ??\n DEFAULT_AGENT_ID;\n const agentStore = injectAgentStore(resolvedAgentId);\n\n return computed(() => ɵgetAgentCapabilities(agentStore().agent));\n}\n","import {\n DestroyRef,\n computed,\n effect,\n inject,\n type Signal,\n} from \"@angular/core\";\nimport { DEFAULT_AGENT_ID } from \"@copilotkit/shared\";\n\nimport { injectAgentStore } from \"./agent\";\nimport { COPILOT_CHAT_CONFIGURATION } from \"./chat-configuration\";\nimport { CopilotKit } from \"./copilotkit\";\nimport { InterruptController } from \"./interrupt\";\nimport type { InjectInterruptOptions } from \"./interrupt\";\n\ntype InterruptAgentId = string | Signal<string | undefined>;\n\n/**\n * Create an interrupt controller in the current Angular injection context.\n *\n * The controller follows the ambient chat agent and thread unless an explicit\n * agent id or signal is supplied as the first argument. Bind its signals in a\n * template and call `resolve` or `cancel` from user-driven event handlers.\n */\nexport function injectInterrupt<TValue = unknown, TResult = never>(\n agentId?: InterruptAgentId,\n options?: Omit<InjectInterruptOptions<TValue, TResult>, \"agentId\">,\n): InterruptController<TValue, TResult>;\n/** Compatibility overload for the original options-only call shape. */\nexport function injectInterrupt<TValue = unknown, TResult = never>(\n options?: InjectInterruptOptions<TValue, TResult>,\n): InterruptController<TValue, TResult>;\nexport function injectInterrupt<TValue = unknown, TResult = never>(\n agentIdOrOptions?: InterruptAgentId | InjectInterruptOptions<TValue, TResult>,\n controllerOptions?: Omit<InjectInterruptOptions<TValue, TResult>, \"agentId\">,\n): InterruptController<TValue, TResult> {\n const copilotKit = inject(CopilotKit);\n const destroyRef = inject(DestroyRef);\n const chatConfiguration = inject(COPILOT_CHAT_CONFIGURATION, {\n optional: true,\n });\n const hasAgentIdArgument =\n controllerOptions !== undefined ||\n typeof agentIdOrOptions === \"string\" ||\n typeof agentIdOrOptions === \"function\";\n const options: InjectInterruptOptions<TValue, TResult> = hasAgentIdArgument\n ? (controllerOptions ?? {})\n : ((agentIdOrOptions as\n | InjectInterruptOptions<TValue, TResult>\n | undefined) ?? {});\n const configuredAgentId = hasAgentIdArgument\n ? (agentIdOrOptions as InterruptAgentId | undefined)\n : options.agentId;\n const agentId =\n configuredAgentId ??\n computed(() => chatConfiguration?.agentId() ?? DEFAULT_AGENT_ID);\n const store = injectAgentStore(agentId);\n const controller = new InterruptController<TValue, TResult>(\n (agent, runOptions) => copilotKit.core.runAgent({ agent, ...runOptions }),\n options,\n );\n const connection = effect(() => {\n const agent = store().agent;\n controller.connect(agent);\n controller.setThreadId(\n configuredAgentId === undefined\n ? (chatConfiguration?.threadId() ?? agent.threadId)\n : agent.threadId,\n );\n });\n\n destroyRef.onDestroy(() => {\n connection.destroy();\n controller.destroy();\n });\n return controller;\n}\n","import type { Signal } from \"@angular/core\";\nimport {\n computed,\n DestroyRef,\n effect,\n inject,\n Injectable,\n signal,\n untracked,\n} from \"@angular/core\";\nimport { ɵThreadsController, ɵcreateThreadStore } from \"@copilotkit/core\";\nimport type { ɵThreadSummary, ɵThreadsCore } from \"@copilotkit/core\";\nimport { CopilotKit } from \"./copilotkit\";\n\n/**\n * A conversation thread managed by CopilotKit Intelligence.\n *\n * Each thread has a unique `id`, the `agentId` it belongs to, an optional\n * human-readable `name` (`null` when unnamed), an `archived` flag, and the\n * ISO-8601 `createdAt` and `updatedAt` timestamps. `lastRunAt` is the time of\n * the most recent agent run, absent when the thread has never run; prefer it\n * over `updatedAt` for \"last activity\", since rename and archive do not bump\n * it. The shape is core's, shared with React and Vue.\n */\nexport type Thread = ɵThreadSummary;\n\n/**\n * Configuration for {@link injectThreads}.\n *\n * Thread operations are scoped to the runtime-authenticated user and the\n * provided agent on CopilotKit Intelligence. Each field may be supplied as\n * a plain value or a {@link Signal}; when a signal is used the underlying\n * runtime context is re-synced whenever its value changes.\n */\nexport interface InjectThreadsInput {\n /** The ID of the agent whose threads to list and manage. */\n agentId: string | Signal<string>;\n /** When `true`, archived threads are included in the list. Defaults to `false`. */\n includeArchived?: boolean | Signal<boolean | undefined>;\n /** Maximum number of threads to fetch per page. When set, enables cursor-based pagination. */\n limit?: number | Signal<number | undefined>;\n /**\n * When `false`, the store stays inert: no runtime context is dispatched, so\n * NO thread-list fetch or realtime subscription is issued, and the\n * synthesized pre-connect loading state is suppressed. Used by gated\n * surfaces (e.g. an unlicensed `<copilotkit-threads-drawer>`) that must not touch\n * the network until the gate opens. Defaults to `true`. Mirrors react-core's\n * `UseThreadsInput.enabled`.\n */\n enabled?: boolean | Signal<boolean | undefined>;\n}\n\n/**\n * Signal-based threads-list API returned by {@link injectThreads}.\n *\n * The `threads` signal is kept in sync with the platform via a realtime\n * WebSocket subscription (when available) and is sorted most-recently-active\n * first. Mutation methods reject with an `Error` if the platform request\n * fails; `delete` additionally rolls back its optimistic removal.\n */\nexport interface InjectThreadsResult {\n /**\n * Threads for the current user/agent pair, sorted most-recently-active\n * first. Updated in realtime when the platform pushes metadata events.\n * Includes archived threads only when `includeArchived` is set.\n */\n threads: Signal<Thread[]>;\n /**\n * `true` while the initial thread list is being fetched from the platform.\n * Subsequent realtime updates do not re-enter the loading state.\n */\n isLoading: Signal<boolean>;\n /**\n * The most recent error from fetching threads or executing a mutation, or\n * `null` when there is no error. Reset to `null` on the next successful\n * fetch.\n */\n error: Signal<Error | null>;\n /**\n * List/mutation errors only — excludes developer/config errors (missing\n * runtime URL, runtime without thread endpoints) so consumer UIs do not\n * surface dev strings to end users. Prefer this over `error` for\n * user-facing error display. Also reports a runtime that refuses to list\n * threads for a caller without identity (no `identifyUser`).\n */\n listError: Signal<Error | null>;\n /**\n * Error from the most recent FAILED next-page (fetch-more) load, or `null`.\n * Tracked separately from {@link InjectThreadsResult.listError} so a\n * paginated-load failure surfaces an inline \"couldn't load more\" affordance\n * while the loaded list stays visible. Cleared when a fetch-more is retried\n * or succeeds.\n */\n fetchMoreError: Signal<Error | null>;\n /**\n * `true` when there are more threads available to fetch via\n * {@link InjectThreadsResult.fetchMoreThreads}. Only meaningful when `limit`\n * is set.\n */\n hasMoreThreads: Signal<boolean>;\n /** `true` while a subsequent page of threads is being fetched. */\n isFetchingMoreThreads: Signal<boolean>;\n /**\n * `true` while at least one thread mutation (rename, archive, unarchive,\n * delete) is awaiting a server response. Mutations apply optimistically, so\n * this is primarily useful for disabling controls or showing a subtle\n * in-flight indicator.\n */\n isMutating: Signal<boolean>;\n /**\n * Fetch the next page of threads. No-op when\n * {@link InjectThreadsResult.hasMoreThreads} is `false` or a fetch is\n * already in progress.\n */\n fetchMoreThreads: () => void;\n /**\n * Re-fetch the thread list from the platform without clearing the current\n * list. Backs the drawer's error-state Retry and the Active/All filter\n * refetch. No-op until the runtime is connected.\n */\n refetchThreads: () => void;\n /**\n * Reset to a fresh, non-explicit client-side thread so the welcome screen\n * shows. Lazy creation: no row appears in {@link InjectThreadsResult.threads}\n * until the new thread's first run persists server-side.\n */\n startNewThread: () => void;\n /**\n * Rename a thread on the platform. Resolves when the server confirms the\n * update; rejects on failure.\n */\n renameThread: (threadId: string, name: string) => Promise<void>;\n /**\n * Archive a thread on the platform. Archived threads are excluded from\n * subsequent list results. Resolves when the server confirms the update;\n * rejects on failure.\n */\n archiveThread: (threadId: string) => Promise<void>;\n /**\n * Restore a previously archived thread on the platform. The thread\n * re-appears in default (non-archived) list results. Resolves when the\n * server confirms the update; rejects on failure.\n */\n unarchiveThread: (threadId: string) => Promise<void>;\n /**\n * Permanently delete a thread from the platform. This is irreversible.\n * Resolves when the server confirms deletion; rejects on failure (the\n * optimistic removal is rolled back).\n */\n deleteThread: (threadId: string) => Promise<void>;\n}\n\n/** Normalizes a value-or-signal field into a no-arg accessor. */\nfunction toAccessor<T>(value: T | Signal<T>): () => T {\n return typeof value === \"function\" ? (value as () => T) : () => value;\n}\n\n/**\n * Projects a core {@link ɵThread} record down to the public {@link Thread}\n * shape, omitting `lastRunAt` entirely when the source value is absent so the\n * field stays optional rather than `undefined`.\n */\nexport class ThreadsStore implements InjectThreadsResult {\n readonly #copilotkit = inject(CopilotKit);\n // Core's ɵThreadsController owns the view model: thread projection, the\n // configuration errors, the gated and de-duplicated context dispatch, the\n // registry claim and the mutation guard. This class feeds it from signals\n // and projects its snapshot into signals.\n readonly #controller: ɵThreadsController;\n readonly #stop: () => void;\n readonly #unsubscribe: () => void;\n\n readonly threads: Signal<Thread[]>;\n readonly error: Signal<Error | null>;\n readonly listError: Signal<Error | null>;\n readonly fetchMoreError: Signal<Error | null>;\n readonly isLoading: Signal<boolean>;\n readonly hasMoreThreads: Signal<boolean>;\n readonly isFetchingMoreThreads: Signal<boolean>;\n readonly isMutating: Signal<boolean>;\n\n constructor(input: InjectThreadsInput, destroyRef: DestroyRef) {\n const agentId = toAccessor(input.agentId);\n const includeArchived = toAccessor(input.includeArchived);\n const limit = toAccessor(input.limit);\n const enabled = toAccessor(input.enabled);\n const service = this.#copilotkit;\n const core = service.core;\n // The runtime state as this service's signals project it from core.\n const runtime: ɵThreadsCore = {\n get runtimeUrl() {\n return service.runtimeUrl();\n },\n get ɵruntimeInfo() {\n return core.ɵruntimeInfo;\n },\n get ɵheadersGeneration() {\n return service.ɵheadersGeneration();\n },\n registerThreadStore: (agentId, store) =>\n core.registerThreadStore(agentId, store),\n unregisterThreadStore: (agentId) => core.unregisterThreadStore(agentId),\n };\n const readInput = () => ({\n core: runtime,\n agentId: agentId(),\n includeArchived: includeArchived(),\n limit: limit(),\n enabled: enabled() !== false,\n });\n\n const controller = new ɵThreadsController(\n ɵcreateThreadStore({ fetch: core.ɵruntimeFetch }),\n untracked(readInput),\n );\n this.#controller = controller;\n const snapshot = signal(controller.getSnapshot());\n this.#unsubscribe = controller.subscribe(() => {\n snapshot.set(controller.getSnapshot());\n });\n this.#stop = controller.start();\n\n this.threads = computed(() => snapshot().threads);\n this.error = computed(() => snapshot().error);\n this.listError = computed(() => snapshot().listError);\n this.fetchMoreError = computed(() => snapshot().fetchMoreError);\n this.isLoading = computed(() => snapshot().isLoading);\n this.hasMoreThreads = computed(() => snapshot().hasMoreThreads);\n this.isFetchingMoreThreads = computed(\n () => snapshot().isFetchingMoreThreads,\n );\n this.isMutating = computed(() => snapshot().isMutating);\n\n this.renameThread = controller.renameThread;\n this.archiveThread = controller.archiveThread;\n this.unarchiveThread = controller.unarchiveThread;\n this.deleteThread = controller.deleteThread;\n this.fetchMoreThreads = controller.fetchMoreThreads;\n this.refetchThreads = controller.refetchThreads;\n this.startNewThread = controller.startNewThread;\n\n // Re-apply on any input or runtime-state change. Keyed on the header\n // generation, not header values (#1937).\n effect(() => {\n const next = readInput();\n service.runtimeUrl();\n service.runtimeConnectionStatus();\n service.threadEndpoints();\n service.ɵheadersGeneration();\n service.intelligence();\n untracked(() => controller.update(next));\n });\n\n destroyRef.onDestroy(() => this.teardown());\n }\n\n readonly renameThread: (threadId: string, name: string) => Promise<void>;\n readonly archiveThread: (threadId: string) => Promise<void>;\n readonly unarchiveThread: (threadId: string) => Promise<void>;\n readonly deleteThread: (threadId: string) => Promise<void>;\n readonly fetchMoreThreads: () => void;\n readonly refetchThreads: () => void;\n readonly startNewThread: () => void;\n\n /** Stop the store and release its registry claim. Safe to call twice. */\n teardown(): void {\n this.#unsubscribe();\n this.#stop();\n this.#controller.dispose();\n }\n}\n\n@Injectable({ providedIn: \"root\" })\nexport class CopilotkitThreadsFactory {\n /**\n * Creates a {@link ThreadsStore} bound to the given input and host\n * `DestroyRef`.\n *\n * @param input - Agent identifier and optional list controls.\n * @param destroyRef - Host lifetime; tears the store down on destroy.\n */\n create(input: InjectThreadsInput, destroyRef: DestroyRef): ThreadsStore {\n return new ThreadsStore(input, destroyRef);\n }\n}\n\n/**\n * Angular threads-list API over the platform-agnostic core thread store —\n * the signal-based counterpart to react-core's `useThreads`.\n *\n * On creation the store fetches the thread list for the runtime-authenticated\n * user and the given `agentId`. When CopilotKit Intelligence exposes a\n * WebSocket URL it also opens a realtime subscription so the `threads` signal\n * stays current without polling. Mutation methods return promises that resolve\n * once the platform confirms the operation and reject with an `Error` on\n * failure.\n *\n * Must be called within an injection context (component/directive constructor\n * or field initializer). The underlying store is torn down on the host's\n * `DestroyRef`.\n *\n * @param input - Agent identifier and optional list controls. Each field\n * accepts a plain value or a `Signal`.\n * @returns Thread list state as signals plus stable mutation callbacks.\n *\n * @example\n * ```ts\n * @Component({ ... })\n * class ThreadList {\n * readonly threads = injectThreads({ agentId: \"agent-1\" });\n * }\n * ```\n */\nexport function injectThreads(input: InjectThreadsInput): InjectThreadsResult {\n const factory = inject(CopilotkitThreadsFactory);\n const destroyRef = inject(DestroyRef);\n return factory.create(input, destroyRef);\n}\n","import {\n inject,\n Injectable,\n Signal,\n signal,\n WritableSignal,\n} from \"@angular/core\";\nimport type { Attachment } from \"@copilotkit/shared\";\nimport type { Suggestion } from \"@copilotkit/core\";\n\n@Injectable()\nexport abstract class ChatState {\n abstract readonly inputValue: WritableSignal<string>;\n readonly attachments = signal<Attachment[]>([]);\n readonly attachmentsEnabled: Signal<boolean> = signal(false);\n readonly attachmentsUploading: Signal<boolean> = signal(false);\n readonly dragOver = signal(false);\n readonly suggestions = signal<Suggestion[]>([]);\n readonly suggestionsLoading = signal(false);\n readonly isTranscribing = signal(false);\n\n abstract submitInput(value: string): void | Promise<void>;\n abstract changeInput(value: string): void;\n selectSuggestion(\n _suggestion: Suggestion,\n _index: number,\n ): void | Promise<void> {}\n finishTranscription(_audioBlob: Blob): void | Promise<void> {}\n\n addFile(): void {}\n removeAttachment(_id: string): void {}\n handleDragOver(_event: DragEvent): void {}\n handleDragLeave(_event: DragEvent): void {}\n handleDrop(_event: DragEvent): void {}\n}\n\nexport function injectChatState(): ChatState {\n try {\n return inject(ChatState);\n } catch {\n throw new Error(\n \"ChatState not found. A parent component must provide ChatState.\",\n );\n }\n}\n","/**\n * Audio transcription through the CopilotKit runtime. The request and the\n * error handling come from `@copilotkit/core`, so React, Vue and Angular\n * behave the same.\n *\n * `transcribeAudio(core, blob)` sends a recording and returns its text. It\n * throws a `TranscriptionError`. Read `error.info.code` to pick a message for\n * the user.\n */\nexport {\n ɵtranscribeAudio as transcribeAudio,\n TranscriptionError,\n TranscriptionErrorCode,\n} from \"@copilotkit/core\";\nexport type {\n TranscriptionResult,\n TranscriptionErrorInfo,\n} from \"@copilotkit/core\";\n","import { Injectable, ElementRef, NgZone, OnDestroy } from \"@angular/core\";\nimport { ScrollDispatcher, ViewportRuler } from \"@angular/cdk/scrolling\";\nimport {\n ɵSCROLL_BOTTOM_THRESHOLD_PX,\n ɵisScrolledToBottom,\n} from \"@copilotkit/core\";\nimport {\n Observable,\n Subject,\n BehaviorSubject,\n fromEvent,\n merge,\n animationFrameScheduler,\n} from \"rxjs\";\nimport {\n takeUntil,\n debounceTime,\n throttleTime,\n distinctUntilChanged,\n map,\n startWith,\n} from \"rxjs/operators\";\n\nexport interface ScrollState {\n isAtBottom: boolean;\n scrollTop: number;\n scrollHeight: number;\n clientHeight: number;\n}\n\n@Injectable({\n providedIn: \"root\",\n})\nexport class ScrollPosition implements OnDestroy {\n private destroy$ = new Subject<void>();\n private scrollStateSubject = new BehaviorSubject<ScrollState>({\n isAtBottom: true,\n scrollTop: 0,\n scrollHeight: 0,\n clientHeight: 0,\n });\n\n public scrollState$ = this.scrollStateSubject.asObservable();\n\n constructor(\n private scrollDispatcher: ScrollDispatcher,\n private viewportRuler: ViewportRuler,\n private ngZone: NgZone,\n ) {}\n\n /**\n * Monitor scroll position of an element\n * @param element The element to monitor\n * @param threshold Pixels from bottom to consider \"at bottom\" (default `ɵSCROLL_BOTTOM_THRESHOLD_PX`, 12)\n */\n monitorScrollPosition(\n element: ElementRef<HTMLElement> | HTMLElement,\n threshold: number = ɵSCROLL_BOTTOM_THRESHOLD_PX,\n ): Observable<ScrollState> {\n const el = element instanceof ElementRef ? element.nativeElement : element;\n\n // Create scroll observable\n const scroll$ = merge(\n fromEvent(el, \"scroll\"),\n this.viewportRuler.change(150), // Monitor viewport changes\n ).pipe(\n startWith(null), // Emit initial state\n throttleTime(16, animationFrameScheduler, { trailing: true }), // ~60fps\n map(() => this.getScrollState(el, threshold)),\n distinctUntilChanged(\n (a, b) =>\n a.isAtBottom === b.isAtBottom &&\n a.scrollTop === b.scrollTop &&\n a.scrollHeight === b.scrollHeight,\n ),\n takeUntil(this.destroy$),\n );\n\n // Subscribe and update subject\n scroll$.subscribe((state) => {\n this.scrollStateSubject.next(state);\n });\n\n return scroll$;\n }\n\n /**\n * Scroll element to bottom with smooth animation\n * @param element The element to scroll\n * @param smooth Whether to use smooth scrolling\n */\n scrollToBottom(\n element: ElementRef<HTMLElement> | HTMLElement,\n smooth: boolean = true,\n ): void {\n const el = element instanceof ElementRef ? element.nativeElement : element;\n\n this.ngZone.runOutsideAngular(() => {\n if (smooth && \"scrollBehavior\" in document.documentElement.style) {\n el.scrollTo({\n top: el.scrollHeight,\n behavior: \"smooth\",\n });\n } else {\n el.scrollTop = el.scrollHeight;\n }\n });\n }\n\n /**\n * Check if element is at bottom\n * @param element The element to check\n * @param threshold Pixels from bottom to consider \"at bottom\"\n */\n isAtBottom(\n element: ElementRef<HTMLElement> | HTMLElement,\n threshold: number = ɵSCROLL_BOTTOM_THRESHOLD_PX,\n ): boolean {\n const el = element instanceof ElementRef ? element.nativeElement : element;\n return this.getScrollState(el, threshold).isAtBottom;\n }\n\n /**\n * Get current scroll state of element\n */\n public getScrollState(element: HTMLElement, threshold: number): ScrollState {\n const scrollTop = element.scrollTop;\n const scrollHeight = element.scrollHeight;\n const clientHeight = element.clientHeight;\n const isAtBottom = ɵisScrolledToBottom(element, threshold);\n\n return {\n isAtBottom,\n scrollTop,\n scrollHeight,\n clientHeight,\n };\n }\n\n /**\n * Create a ResizeObserver for element size changes\n * @param element The element to observe\n * @param debounceMs Debounce time in milliseconds\n */\n observeResize(\n element: ElementRef<HTMLElement> | HTMLElement,\n debounceMs: number = 250,\n ): Observable<ResizeObserverEntry> {\n const el = element instanceof ElementRef ? element.nativeElement : element;\n const resize$ = new Subject<ResizeObserverEntry>();\n\n const resizeObserver = new ResizeObserver((entries) => {\n const entry = entries[0];\n if (entry) {\n this.ngZone.run(() => {\n resize$.next(entry);\n });\n }\n });\n\n resizeObserver.observe(el);\n\n // Cleanup on destroy\n this.destroy$.subscribe(() => {\n resizeObserver.disconnect();\n });\n\n return resize$.pipe(debounceTime(debounceMs), takeUntil(this.destroy$));\n }\n\n ngOnDestroy(): void {\n this.destroy$.next();\n this.destroy$.complete();\n this.scrollStateSubject.complete();\n }\n}\n","import { Injectable, ElementRef, NgZone, OnDestroy } from \"@angular/core\";\nimport { Observable, Subject, BehaviorSubject } from \"rxjs\";\nimport { debounceTime, takeUntil, distinctUntilChanged } from \"rxjs/operators\";\n\nexport interface ResizeState {\n width: number;\n height: number;\n isResizing: boolean;\n}\n\n@Injectable({\n providedIn: \"root\",\n})\nexport class ResizeObserverService implements OnDestroy {\n private destroy$ = new Subject<void>();\n private observers = new Map<HTMLElement, ResizeObserver>();\n private resizeStates = new Map<HTMLElement, BehaviorSubject<ResizeState>>();\n private resizeTimeouts = new Map<HTMLElement, number>();\n\n constructor(private ngZone: NgZone) {}\n\n /**\n * Observe element resize with debouncing and resizing state\n * @param element Element to observe\n * @param debounceMs Debounce time (default 250ms)\n * @param resizingDurationMs How long to show \"isResizing\" state (default 250ms)\n */\n observeElement(\n element: ElementRef<HTMLElement> | HTMLElement,\n debounceMs: number = 0,\n resizingDurationMs: number = 250,\n ): Observable<ResizeState> {\n const el = element instanceof ElementRef ? element.nativeElement : element;\n\n // Return existing observer if already observing\n if (this.resizeStates.has(el)) {\n return this.resizeStates.get(el)!.asObservable();\n }\n\n // Create new subject for this element\n const resizeState$ = new BehaviorSubject<ResizeState>({\n width: el.offsetWidth,\n height: el.offsetHeight,\n isResizing: false,\n });\n\n this.resizeStates.set(el, resizeState$);\n\n // Create ResizeObserver\n const resizeObserver = new ResizeObserver((entries) => {\n if (entries.length === 0) return;\n\n const entry = entries[0];\n if (!entry) return;\n\n const { width, height } = entry.contentRect;\n\n this.ngZone.run(() => {\n // Clear existing timeout\n const existingTimeout = this.resizeTimeouts.get(el);\n if (existingTimeout) {\n clearTimeout(existingTimeout);\n }\n\n // Update state with isResizing = true\n resizeState$.next({\n width,\n height,\n isResizing: true,\n });\n\n // Set timeout to clear isResizing flag\n if (resizingDurationMs > 0) {\n const timeout = window.setTimeout(() => {\n resizeState$.next({\n width,\n height,\n isResizing: false,\n });\n this.resizeTimeouts.delete(el);\n }, resizingDurationMs);\n\n this.resizeTimeouts.set(el, timeout);\n } else {\n // If no duration, immediately set isResizing to false\n resizeState$.next({\n width,\n height,\n isResizing: false,\n });\n }\n });\n });\n\n // Start observing\n resizeObserver.observe(el);\n this.observers.set(el, resizeObserver);\n\n // Return observable with debouncing if specified\n const observable = resizeState$.asObservable().pipe(\n debounceMs > 0 ? debounceTime(debounceMs) : (source) => source,\n distinctUntilChanged(\n (a, b) =>\n a.width === b.width &&\n a.height === b.height &&\n a.isResizing === b.isResizing,\n ),\n takeUntil(this.destroy$),\n );\n\n return observable;\n }\n\n /**\n * Stop observing an element\n * @param element Element to stop observing\n */\n unobserve(element: ElementRef<HTMLElement> | HTMLElement): void {\n const el = element instanceof ElementRef ? element.nativeElement : element;\n\n // Clear timeout if exists\n const timeout = this.resizeTimeouts.get(el);\n if (timeout) {\n clearTimeout(timeout);\n this.resizeTimeouts.delete(el);\n }\n\n // Disconnect observer\n const observer = this.observers.get(el);\n if (observer) {\n observer.disconnect();\n this.observers.delete(el);\n }\n\n // Complete and remove subject\n const subject = this.resizeStates.get(el);\n if (subject) {\n subject.complete();\n this.resizeStates.delete(el);\n }\n }\n\n /**\n * Get current size of element\n * @param element Element to measure\n */\n getCurrentSize(element: ElementRef<HTMLElement> | HTMLElement): {\n width: number;\n height: number;\n } {\n const el = element instanceof ElementRef ? element.nativeElement : element;\n return {\n width: el.offsetWidth,\n height: el.offsetHeight,\n };\n }\n\n /**\n * Get current resize state of element\n * @param element Element to check\n */\n getCurrentState(\n element: ElementRef<HTMLElement> | HTMLElement,\n ): ResizeState | null {\n const el = element instanceof ElementRef ? element.nativeElement : element;\n const subject = this.resizeStates.get(el);\n return subject ? subject.value : null;\n }\n\n ngOnDestroy(): void {\n // Clear all timeouts\n this.resizeTimeouts.forEach((timeout) => clearTimeout(timeout));\n this.resizeTimeouts.clear();\n\n // Disconnect all observers\n this.observers.forEach((observer) => observer.disconnect());\n this.observers.clear();\n\n // Complete all subjects\n this.resizeStates.forEach((subject) => subject.complete());\n this.resizeStates.clear();\n\n // Complete destroy subject\n this.destroy$.next();\n this.destroy$.complete();\n }\n}\n","import { inject, Injector, runInInjectionContext } from \"@angular/core\";\nimport { ɵserializeContextValue } from \"@copilotkit/core\";\nimport type { ɵAgentContextInput } from \"@copilotkit/core\";\nimport { CopilotKit } from \"./copilotkit\";\nimport { explicitEffect } from \"./explicit-effect\";\n\nexport interface ConnectAgentContextConfig {\n injector?: Injector;\n}\n\n/**\n * Connects context to the agent. A non-string `value` is sent as its JSON\n * text, as in React and Vue.\n *\n * @param context - The context (or reactive zero-argument accessor) to connect.\n * @param config - Optional configuration for connecting the context.\n */\nexport function connectAgentContext(\n context: ɵAgentContextInput | (() => ɵAgentContextInput),\n config?: ConnectAgentContextConfig,\n): void {\n const injector = config?.injector ?? inject(Injector);\n\n runInInjectionContext(injector, () => {\n const copilotkit = inject(CopilotKit);\n\n explicitEffect(\n () => (typeof context === \"function\" ? context() : context),\n (contextValue, onCleanup) => {\n const id = copilotkit.core.addContext({\n description: contextValue.description,\n value: ɵserializeContextValue(contextValue.value),\n });\n\n onCleanup(() => {\n copilotkit.core.removeContext(id);\n });\n },\n );\n });\n}\n","import { inject, Signal } from \"@angular/core\";\nimport { toSignal } from \"@angular/core/rxjs-interop\";\nimport {\n ɵselectMemories,\n ɵselectMemoriesAvailable,\n ɵselectMemoriesError,\n ɵselectMemoriesIsLoading,\n ɵselectMemoriesRealtimeStatus,\n} from \"@copilotkit/core\";\nimport type {\n Memory,\n MemoryChanges,\n MemoryRealtimeStatus,\n NewMemory,\n} from \"@copilotkit/core\";\nimport { CopilotKit } from \"./copilotkit\";\n\n/**\n * Return value of {@link injectMemories}.\n *\n * The `memories` signal is the server-authoritative list for the current\n * runtime-authenticated user. It is hydrated from a REST snapshot and kept\n * current by realtime `memory_metadata` deltas pushed over the memory store's\n * own channel. Mutations resolve once the platform confirms the operation and\n * reject with an `Error` on failure.\n */\nexport interface MemoriesController {\n /**\n * Memories for the current user, newest first. Updated in realtime when the\n * platform pushes `memory_metadata` events over the memory store's channel.\n */\n memories: Signal<Memory[]>;\n /**\n * `true` while the initial memory snapshot is being fetched. Subsequent\n * realtime updates do not re-enter the loading state.\n */\n isLoading: Signal<boolean>;\n /**\n * The most recent error from fetching memories or a mutation, or `null`\n * when there is no error. Cleared on the next fetch attempt, on a\n * successful fetch, when the runtime context changes, and on a successful\n * mutation (a failed mutation replaces it with that mutation's error).\n */\n error: Signal<Error | null>;\n /**\n * `true` when the platform memory routes are available. Set to `false`\n * after a 404 or 501, indicating memory is not supported by the current\n * runtime configuration.\n */\n isAvailable: Signal<boolean>;\n /**\n * Health of the realtime connection that streams live `memory_metadata`\n * deltas. Distinct from `isAvailable`/`error` (which describe the REST list\n * route): `\"connecting\"` while the socket opens/joins, `\"connected\"` once\n * live deltas are flowing, and `\"unavailable\"` once the socket permanently\n * gives up — at which point the list is a frozen snapshot. Lets a template\n * drop a \"live\" indicator instead of showing it over stale data.\n */\n realtimeStatus: Signal<MemoryRealtimeStatus>;\n /**\n * Re-fetch the memory snapshot from the platform. Resolves when the re-pull\n * succeeds; rejects if it fails or the store is torn down mid-flight.\n */\n refresh: () => Promise<void>;\n /**\n * Create a memory. Resolves to the stored memory (server-authoritative);\n * rejects on failure.\n */\n addMemory: (input: NewMemory) => Promise<Memory>;\n /**\n * Supersede a memory: the old memory is retired and a new one is created.\n * Resolves to the new memory (its `id` differs from the supplied `id`);\n * rejects on failure.\n *\n * Supersede is a FULL replacement, not a partial patch: `changes` is the\n * complete definition of the new memory. You must re-supply `content` and\n * `kind`, and an omitted `sourceThreadIds` resets the new memory's source\n * threads to empty — it does not preserve the prior memory's value.\n */\n updateMemory: (id: string, changes: MemoryChanges) => Promise<Memory>;\n /**\n * Retire a memory (non-lossy delete). Resolves when the server confirms;\n * rejects on failure.\n */\n removeMemory: (id: string) => Promise<void>;\n}\n\n/**\n * Angular injection function for listing and managing platform memories — the\n * signal-based counterpart to react-core's `useMemories`.\n *\n * Reads the user-scoped memory store owned and wired by `CopilotKitCore`. The\n * binding does not create, register, start, or stop the store: core owns its\n * lifecycle and opens its own `user_meta:memories:<joinCode>` channel, applying\n * `memory_metadata` deltas to the list. The binding only bridges the store's\n * selectors onto Angular signals and forwards the stable mutation callbacks.\n *\n * Mutations are server-authoritative: each resolves once the platform confirms\n * the operation and rejects with an `Error` on failure. You can still call\n * `refresh()` to re-pull the REST snapshot on demand.\n *\n * Must be called inside an injection context (component constructor, field\n * initializer, `inject` callback, or `TestBed.runInInjectionContext`) so the\n * selector→signal bridges (`toSignal`) tear down with the host.\n *\n * @returns Signals for memory state and stable mutation callbacks.\n *\n * @example\n * ```ts\n * import { injectMemories } from \"@copilotkit/angular\";\n *\n * @Component({ ... })\n * class MemoryList {\n * readonly #m = injectMemories();\n * memories = this.#m.memories;\n * isLoading = this.#m.isLoading;\n * isAvailable = this.#m.isAvailable;\n *\n * remove(id: string) { this.#m.removeMemory(id); }\n * }\n * ```\n */\nexport function injectMemories(): MemoriesController {\n const store = inject(CopilotKit).core.getMemoryStore();\n\n const initialState = store.getState();\n\n const memories = toSignal(store.select(ɵselectMemories), {\n initialValue: ɵselectMemories(initialState),\n });\n const isLoading = toSignal(store.select(ɵselectMemoriesIsLoading), {\n initialValue: ɵselectMemoriesIsLoading(initialState),\n });\n const error = toSignal(store.select(ɵselectMemoriesError), {\n initialValue: ɵselectMemoriesError(initialState),\n });\n const isAvailable = toSignal(store.select(ɵselectMemoriesAvailable), {\n initialValue: ɵselectMemoriesAvailable(initialState),\n });\n const realtimeStatus = toSignal(store.select(ɵselectMemoriesRealtimeStatus), {\n initialValue: ɵselectMemoriesRealtimeStatus(initialState),\n });\n\n return {\n memories,\n isLoading,\n error,\n isAvailable,\n realtimeStatus,\n refresh: () => store.refresh(),\n addMemory: (input: NewMemory) => store.addMemory(input),\n updateMemory: (id: string, changes: MemoryChanges) =>\n store.updateMemory(id, changes),\n removeMemory: (id: string) => store.removeMemory(id),\n };\n}\n","import type { Type, TemplateRef, Injector } from \"@angular/core\";\nimport { InjectionToken } from \"@angular/core\";\n\n/**\n * Represents a value that can be used as a slot override.\n * Can be a component type or template reference only.\n * @internal - This type is for internal use only\n */\nexport type SlotValue<T = any> = Type<T> | TemplateRef<T>;\n\n/**\n * Handlers for a slot component's outputs, keyed by the output's public\n * (template) name. Keys that do not match a declared output are ignored.\n */\nexport type SlotOutputs = Record<string, (event: any) => void>;\n\n/**\n * Configuration for a slot\n * @internal - This interface is for internal use only\n */\nexport interface SlotConfig<T = any> {\n value?: SlotValue<T>;\n default?: Type<T>;\n}\n\n/**\n * Context passed to slot templates\n */\nexport interface SlotContext<T = any> {\n $implicit: T;\n props?: Partial<T>;\n [key: string]: any;\n}\n\n/**\n * Slot registry entry\n * @internal - This interface is for internal use only\n */\nexport interface SlotRegistryEntry<T = any> {\n component?: Type<T>;\n template?: TemplateRef<T>;\n}\n\n/**\n * Options for rendering a slot\n */\nexport interface RenderSlotOptions<T = any> {\n slot?: SlotValue<T>;\n defaultComponent: Type<T>;\n props?: Partial<T>;\n injector?: Injector;\n outputs?: SlotOutputs;\n}\n\n/**\n * Injection token for slot configuration\n */\nexport const SLOT_CONFIG = new InjectionToken<\n ReadonlyMap<string, SlotRegistryEntry>\n>(\"SLOT_CONFIG\");\n\n/**\n * Type for components with slots\n */\nexport type WithSlots<S extends Record<string, Type<any>>, Rest = object> = {\n [K in keyof S as `${string & K}Component`]?: Type<any>;\n} & {\n [K in keyof S as `${string & K}Template`]?: TemplateRef<any>;\n} & {\n [K in keyof S as `${string & K}Class`]?: string;\n} & Rest;\n","import type {\n Binding,\n ComponentRef,\n EmbeddedViewRef,\n Type,\n ViewContainerRef,\n} from \"@angular/core\";\nimport {\n TemplateRef,\n inject,\n inputBinding,\n outputBinding,\n reflectComponentType,\n} from \"@angular/core\";\nimport type {\n SlotValue,\n SlotOutputs,\n RenderSlotOptions,\n SlotRegistryEntry,\n} from \"./slot.types\";\nimport { SLOT_CONFIG } from \"./slot.types\";\n\n/**\n * Returns the component inputs that should be bound for the current context.\n *\n * Context keys are matched against public (template) input names so unknown\n * keys are ignored without overwriting defaults for omitted inputs. A `props`\n * input retains the legacy aggregate-context behavior.\n */\nexport function slotInputNames(\n type: Type<unknown>,\n context: unknown,\n): string[] {\n const mirror = reflectComponentType(type);\n if (!mirror) return [];\n\n if (\n context != null &&\n mirror.inputs.some(({ templateName }) => templateName === \"props\")\n ) {\n return [\"props\"];\n }\n\n const contextKeys = new Set(\n Object.keys((context as Record<string, unknown> | undefined) ?? {}),\n );\n return mirror.inputs\n .filter(({ templateName }) => contextKeys.has(templateName))\n .map(({ templateName }) => templateName);\n}\n\n/**\n * Builds `createComponent` bindings for a slot component.\n *\n * The input-name set is fixed for the lifetime of the component; callers must\n * recreate the component when {@link slotInputNames} changes. Input values and\n * output handlers remain live through their getters. Every declared output is\n * bound so handlers can be added, replaced, or removed without recreation.\n */\nexport function slotBindings(\n type: Type<unknown>,\n inputNames: readonly string[],\n context: () => unknown,\n outputs: () => SlotOutputs | undefined,\n): Binding[] {\n const mirror = reflectComponentType(type);\n if (!mirror) return [];\n const values = () => context() as Record<string, unknown> | undefined;\n return [\n ...inputNames.map((templateName) =>\n inputBinding(templateName, () =>\n templateName === \"props\" ? context() : values()?.[templateName],\n ),\n ),\n ...mirror.outputs.map(({ templateName }) =>\n outputBinding(templateName, (event) =>\n outputs()?.[templateName]?.(event),\n ),\n ),\n ];\n}\n\n/**\n * Renders a slot value into a ViewContainerRef.\n *\n * Templates receive `{ $implicit: props, props }` as their context. Components\n * get individual `props` keys bound to matching inputs, or the entire object\n * when the component declares a `props` input. `outputs` are matched by public\n * name via {@link slotBindings}; bindings are applied on the next change\n * detection pass.\n *\n * @param viewContainer - The ViewContainerRef to render into\n * @param options - Options for rendering the slot\n * @returns The created component or embedded view reference\n *\n * @example\n * ```typescript\n * export class MyComponent {\n * @ViewChild('container', { read: ViewContainerRef }) container!: ViewContainerRef;\n *\n * renderButton() {\n * renderSlot(this.container, {\n * slot: this.buttonOverride,\n * defaultComponent: DefaultButton,\n * props: { text: 'Click me' },\n * outputs: { click: (event) => this.handleClick(event) }\n * });\n * }\n * }\n * ```\n */\nexport function renderSlot<T = any>(\n viewContainer: ViewContainerRef,\n options: RenderSlotOptions<T>,\n): ComponentRef<T> | EmbeddedViewRef<T> {\n const { slot, defaultComponent, props, injector, outputs } = options;\n\n viewContainer.clear();\n\n const effectiveSlot = slot ?? defaultComponent;\n\n if (effectiveSlot instanceof TemplateRef) {\n return viewContainer.createEmbeddedView(effectiveSlot, {\n $implicit: props ?? {},\n props: props ?? {},\n } as any);\n }\n\n return viewContainer.createComponent(effectiveSlot, {\n injector: injector ?? viewContainer.injector,\n bindings: slotBindings(\n effectiveSlot,\n slotInputNames(effectiveSlot, props),\n () => props,\n () => outputs,\n ),\n });\n}\n\n/**\n * Checks if a value is an Angular component type.\n */\nexport function isComponentType(value: unknown): value is Type<unknown> {\n return (\n typeof value === \"function\" &&\n reflectComponentType(value as Type<unknown>) !== null\n );\n}\n\n/**\n * Checks if a value is a valid slot value.\n */\nexport function isSlotValue(value: unknown): value is SlotValue {\n return value instanceof TemplateRef || isComponentType(value);\n}\n\n/**\n * Normalizes a slot value to a consistent format.\n */\nexport function normalizeSlotValue<T = any>(\n value: SlotValue<T> | undefined,\n defaultComponent: Type<T> | undefined,\n): SlotRegistryEntry<T> {\n if (!value) {\n return { component: defaultComponent };\n }\n\n if (value instanceof TemplateRef) {\n return { template: value };\n }\n\n if (isComponentType(value)) {\n return { component: value as Type<T> };\n }\n\n return { component: defaultComponent };\n}\n\n/**\n * Creates a slot configuration map for a component.\n *\n * @example\n * ```typescript\n * const slots = createSlotConfig({\n * sendButton: CustomSendButton,\n * toolbar: 'custom-toolbar-class',\n * footer: footerTemplate\n * }, {\n * sendButton: DefaultSendButton,\n * toolbar: DefaultToolbar,\n * footer: DefaultFooter\n * });\n * ```\n */\nexport function createSlotConfig<T extends Record<string, Type<any>>>(\n overrides: Partial<Record<keyof T, SlotValue>>,\n defaults: T,\n): Map<keyof T, SlotRegistryEntry> {\n const config = new Map<keyof T, SlotRegistryEntry>();\n\n for (const key in defaults) {\n const override = overrides[key];\n const defaultComponent = defaults[key];\n config.set(key, normalizeSlotValue(override, defaultComponent));\n }\n\n return config;\n}\n\n/**\n * Provides slot configuration to child components via DI.\n *\n * @example\n * ```typescript\n * @Component({\n * providers: [\n * provideSlots({\n * sendButton: CustomSendButton,\n * toolbar: CustomToolbar\n * })\n * ]\n * })\n * ```\n */\nexport function provideSlots(slots: Record<string, Type<any>>) {\n const slotMap = new Map<string, SlotRegistryEntry>();\n\n // Only accept component types in DI (templates lack view context)\n for (const [key, value] of Object.entries(slots)) {\n if (isComponentType(value)) {\n slotMap.set(key, { component: value as Type<any> });\n }\n }\n\n return {\n provide: SLOT_CONFIG,\n useValue: slotMap,\n };\n}\n\n/**\n * Gets slot configuration from DI.\n * Must be called within an injection context.\n *\n * @example\n * ```typescript\n * export class MyComponent {\n * slots = getSlotConfig();\n *\n * ngOnInit() {\n * const sendButton = this.slots?.get('sendButton');\n * }\n * }\n * ```\n */\nexport function getSlotConfig(): ReadonlyMap<string, SlotRegistryEntry> | null {\n return inject(SLOT_CONFIG, { optional: true });\n}\n\n/**\n * Creates a render function for a specific slot.\n * Useful for creating reusable slot renderers.\n *\n * @example\n * ```typescript\n * const renderSendButton = createSlotRenderer(\n * DefaultSendButton,\n * 'sendButton'\n * );\n *\n * // Later in template\n * renderSendButton(this.viewContainer, this.sendButtonOverride);\n * ```\n */\nexport function createSlotRenderer<T>(\n defaultComponent: Type<T>,\n slotName?: string,\n) {\n // Get config in the injection context when the renderer is created\n const config = slotName ? getSlotConfig() : null;\n\n return (\n viewContainer: ViewContainerRef,\n slot?: SlotValue<T>,\n props?: Partial<T>,\n outputs?: SlotOutputs,\n ) => {\n // Check DI for overrides if slot name provided\n if (slotName && !slot && config) {\n const entry = config.get(slotName);\n if (entry) {\n if (entry.component) slot = entry.component;\n else if (entry.template) slot = entry.template;\n }\n }\n\n return renderSlot(viewContainer, {\n slot,\n defaultComponent,\n props,\n outputs,\n });\n };\n}\n","import type { Injector, Type } from \"@angular/core\";\nimport {\n Component,\n TemplateRef,\n ViewContainerRef,\n computed,\n effect,\n input,\n untracked,\n viewChild,\n} from \"@angular/core\";\nimport { NgTemplateOutlet } from \"@angular/common\";\nimport type { SlotOutputs } from \"./slot.types\";\nimport { slotBindings, slotInputNames } from \"./slot.utils\";\n\n/**\n * @internal - This component is for internal use only.\n * Renders a slot override, a default component, or the projected fallback.\n *\n * - A `TemplateRef` slot is rendered with `context` as its template context,\n * so context keys are available as `let-` variables.\n * - A component slot (or `defaultComponent`) is created with `context` keys\n * bound to its matching inputs and `outputs` handlers bound to its matching\n * outputs. Bound values stay live; the component is only recreated when the\n * resolved type, the set of bound input names, or the `injector` changes.\n * - With neither a slot nor a default component, the projected content shows.\n *\n * @example\n * ```html\n * <copilot-slot [slot]=\"sendButtonTemplate\" [context]=\"buttonContext\">\n * <button class=\"default-btn\">Default</button>\n * </copilot-slot>\n * ```\n */\n@Component({\n selector: \"copilot-slot\",\n imports: [NgTemplateOutlet],\n template: `\n @if (template(); as tpl) {\n <ng-container *ngTemplateOutlet=\"tpl; context: context()\" />\n }\n <ng-container #host />\n @if (!slot() && !defaultComponent()) {\n <ng-content />\n }\n `,\n})\nexport class CopilotSlot {\n readonly slot = input<TemplateRef<unknown> | Type<unknown>>();\n readonly context = input<object>();\n readonly defaultComponent = input<Type<unknown>>();\n readonly outputs = input<SlotOutputs>();\n /** Element injector for the created component. */\n readonly injector = input<Injector>();\n\n private readonly host = viewChild.required(\"host\", {\n read: ViewContainerRef,\n });\n\n protected readonly template = computed(() => {\n const slot = this.slot();\n return slot instanceof TemplateRef ? slot : undefined;\n });\n\n private readonly componentType = computed(() => {\n const slot = this.slot();\n return slot instanceof TemplateRef\n ? undefined\n : (slot ?? this.defaultComponent());\n });\n\n private readonly inputNames = computed(\n () => {\n const type = this.componentType();\n return type ? slotInputNames(type, this.context()) : [];\n },\n {\n equal: (previous, current) =>\n previous.length === current.length &&\n previous.every((name, index) => name === current[index]),\n },\n );\n\n constructor() {\n effect((onCleanup) => {\n const type = this.componentType();\n if (!type) return;\n const inputNames = this.inputNames();\n const injector = this.injector();\n const ref = untracked(() =>\n this.host().createComponent(type, {\n injector,\n bindings: slotBindings(\n type,\n inputNames,\n () => this.context(),\n () => this.outputs(),\n ),\n }),\n );\n onCleanup(() => ref.destroy());\n });\n }\n}\n","import {\n Directive,\n Input,\n OnInit,\n OnChanges,\n OnDestroy,\n SimpleChanges,\n Inject,\n} from \"@angular/core\";\nimport { CopilotKit } from \"../copilotkit\";\nimport type { Context } from \"@ag-ui/client\";\nimport { ɵserializeContextValue } from \"@copilotkit/core\";\nimport type { ɵAgentContextInput } from \"@copilotkit/core\";\n\n/**\n * Directive to manage agent context in CopilotKit.\n * Automatically adds context on init, updates on changes, and removes on destroy.\n *\n * @example\n * ```html\n * <!-- With separate inputs -->\n * <div copilotkitAgentContext\n * [description]=\"'User preferences'\"\n * [value]=\"userSettings\">\n * </div>\n *\n * <!-- With context object -->\n * <div [copilotkitAgentContext]=\"contextObject\">\n * </div>\n *\n * <!-- With dynamic values -->\n * <div copilotkitAgentContext\n * description=\"Form state\"\n * [value]=\"formData$ | async\">\n * </div>\n * ```\n */\n@Directive({\n selector: \"[copilotkitAgentContext]\",\n standalone: true,\n})\nexport class CopilotKitAgentContext implements OnInit, OnChanges, OnDestroy {\n private contextId?: string;\n\n constructor(@Inject(CopilotKit) private readonly copilotkit: CopilotKit) {}\n\n /**\n * Context object containing both description and value.\n * If provided, this takes precedence over individual inputs.\n */\n @Input(\"copilotkitAgentContext\") context?: ɵAgentContextInput;\n\n /**\n * Description of the context.\n * Used when context object is not provided.\n */\n @Input() description?: string;\n\n /**\n * Value of the context.\n * Used when context object is not provided.\n */\n @Input() value?: any;\n\n ngOnInit(): void {\n this.addContext();\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n // Check if any relevant input has changed\n const hasContextChange = \"context\" in changes;\n const hasDescriptionChange = \"description\" in changes;\n const hasValueChange = \"value\" in changes;\n\n if (hasContextChange || hasDescriptionChange || hasValueChange) {\n // Skip the first change as ngOnInit handles initial setup\n if (this.contextId) {\n this.updateContext();\n }\n }\n }\n\n ngOnDestroy(): void {\n this.removeContext();\n }\n\n /**\n * Adds the context to CopilotKit\n */\n private addContext(): void {\n const contextToAdd = this.getContext();\n\n if (contextToAdd) {\n this.contextId = this.copilotkit.core.addContext(contextToAdd);\n }\n }\n\n /**\n * Updates the context by removing the old one and adding a new one\n */\n private updateContext(): void {\n this.removeContext();\n this.addContext();\n }\n\n /**\n * Removes the current context from CopilotKit\n */\n private removeContext(): void {\n if (this.contextId) {\n this.copilotkit.core.removeContext(this.contextId);\n this.contextId = undefined;\n }\n }\n\n /**\n * Gets the context object from inputs\n */\n private getContext(): Context | null {\n // If context object is provided, use it\n if (this.context) {\n return {\n description: this.context.description,\n value: ɵserializeContextValue(this.context.value),\n };\n }\n\n // Otherwise, build from individual inputs\n // Note: null is a valid value, but undefined means not set\n if (this.description !== undefined && this.value !== undefined) {\n return {\n description: this.description,\n value: ɵserializeContextValue(this.value),\n };\n }\n\n return null;\n }\n}\n","import {\n Directive,\n ElementRef,\n OnDestroy,\n AfterViewInit,\n PLATFORM_ID,\n inject,\n input,\n output,\n} from \"@angular/core\";\nimport { isPlatformBrowser } from \"@angular/common\";\nimport {\n ɵSCROLL_BOTTOM_THRESHOLD_PX,\n ɵcreateStickToBottom,\n ɵisScrolledToBottom,\n} from \"@copilotkit/core\";\nimport type { ɵStickToBottom } from \"@copilotkit/core\";\nimport { explicitEffect } from \"../explicit-effect\";\n\nexport type ScrollBehavior = \"smooth\" | \"instant\" | \"auto\";\n\n/**\n * Keeps a scroll container at its bottom while content arrives, and stops\n * when the reader scrolls up. Scrolling back to the bottom, or a call to\n * `scrollToBottom()`, starts it again. Core's `ɵStickToBottom` does the work.\n *\n * The content is the descendant with `data-stick-to-bottom-content`, or the\n * first child element.\n *\n * @example\n * ```html\n * <div copilotStickToBottom\n * [enabled]=\"true\"\n * [threshold]=\"12\"\n * [initialBehavior]=\"'smooth'\"\n * [resizeBehavior]=\"'smooth'\"\n * (isAtBottomChange)=\"onBottomChange($event)\">\n * <!-- Content -->\n * </div>\n * ```\n */\n@Directive({\n standalone: true,\n selector: \"[copilotStickToBottom]\",\n})\nexport class StickToBottom implements AfterViewInit, OnDestroy {\n /** `false` only tracks the position and does not follow new content. */\n enabled = input<boolean>(true);\n /** Pixels from the end that still count as the bottom. Default: 12. */\n threshold = input<number>(ɵSCROLL_BOTTOM_THRESHOLD_PX);\n initialBehavior = input<ScrollBehavior>(\"smooth\");\n resizeBehavior = input<ScrollBehavior>(\"smooth\");\n /** Wait this many ms before `isAtBottomChange` reports a change. */\n debounceMs = input<number>(100);\n\n isAtBottomChange = output<boolean>();\n scrollToBottomRequested = output();\n\n private elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private platformId = inject(PLATFORM_ID);\n private controller?: ɵStickToBottom;\n private emitTimer?: ReturnType<typeof setTimeout>;\n\n constructor() {\n explicitEffect(this.enabled, (enabled) =>\n this.controller?.setFollow(enabled),\n );\n }\n\n ngAfterViewInit(): void {\n if (!isPlatformBrowser(this.platformId)) return;\n\n const element = this.elementRef.nativeElement;\n const content =\n element.querySelector<HTMLElement>(\"[data-stick-to-bottom-content]\") ??\n (element.firstElementChild instanceof HTMLElement\n ? element.firstElementChild\n : element);\n\n // The first value goes out once below, so the controller's own first\n // report during creation is skipped.\n let created = false;\n this.controller = ɵcreateStickToBottom({\n scrollElement: element,\n contentElement: content,\n threshold: this.threshold(),\n follow: this.enabled(),\n initialBehavior: this.initialBehavior(),\n followBehavior: this.resizeBehavior(),\n onChange: (isAtBottom) => {\n if (created) this.emitIsAtBottom(isAtBottom);\n },\n });\n created = true;\n // A recreated directive (autoScroll off and on) starts from the real\n // position, not the parent's last value.\n this.emitIsAtBottom(this.controller.isAtBottom);\n }\n\n /**\n * Public method to scroll to bottom\n * Can be called from parent component\n */\n public scrollToBottom(behavior: ScrollBehavior = \"smooth\"): void {\n if (this.controller) {\n this.controller.scrollToBottom(behavior);\n } else {\n const element = this.elementRef.nativeElement;\n element.scrollTop = element.scrollHeight;\n }\n this.scrollToBottomRequested.emit();\n }\n\n /**\n * Check if currently at bottom\n */\n public isAtBottom(): boolean {\n return ɵisScrolledToBottom(this.elementRef.nativeElement, this.threshold());\n }\n\n /**\n * Get current scroll state\n */\n public getScrollState() {\n const element = this.elementRef.nativeElement;\n return {\n scrollTop: element.scrollTop,\n scrollHeight: element.scrollHeight,\n clientHeight: element.clientHeight,\n isAtBottom: this.isAtBottom(),\n };\n }\n\n ngOnDestroy(): void {\n this.controller?.dispose();\n this.controller = undefined;\n clearTimeout(this.emitTimer);\n }\n\n private emitIsAtBottom(isAtBottom: boolean): void {\n clearTimeout(this.emitTimer);\n const delay = this.debounceMs();\n if (delay <= 0) {\n this.isAtBottomChange.emit(isAtBottom);\n return;\n }\n this.emitTimer = setTimeout(\n () => this.isAtBottomChange.emit(isAtBottom),\n delay,\n );\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ComponentRef,\n Directive,\n DOCUMENT,\n ElementRef,\n Input,\n OnChanges,\n OnDestroy,\n ViewContainerRef,\n ViewEncapsulation,\n computed,\n inject,\n signal,\n} from \"@angular/core\";\nimport {\n ConnectedPosition,\n Overlay,\n OverlayRef,\n OverlayPositionBuilder,\n} from \"@angular/cdk/overlay\";\nimport { ComponentPortal } from \"@angular/cdk/portal\";\nimport type { Subscription } from \"rxjs\";\n\ntype TooltipPosition = \"above\" | \"below\" | \"left\" | \"right\";\ntype TooltipSide = \"top\" | \"bottom\" | \"left\" | \"right\";\n\nconst SIDE: Record<TooltipPosition, TooltipSide> = {\n above: \"top\",\n below: \"bottom\",\n left: \"left\",\n right: \"right\",\n};\n\nconst POSITION: Record<TooltipSide, TooltipPosition> = {\n top: \"above\",\n bottom: \"below\",\n left: \"left\",\n right: \"right\",\n};\n\n// Radix adds the arrow's height (0.625rem in ui/tooltip.css) to the offset.\nconst ARROW_SIZE = 10;\n\n// Radix's PopperArrow wrapper: it puts the arrow on the side of the content\n// that faces the trigger.\nconst ARROW_STYLE: Record<TooltipSide, Record<string, string>> = {\n top: {\n left: `calc(50% - ${ARROW_SIZE / 2}px)`,\n bottom: \"0\",\n transform: \"translateY(100%)\",\n },\n bottom: {\n left: `calc(50% - ${ARROW_SIZE / 2}px)`,\n top: \"0\",\n \"transform-origin\": \"center 0\",\n transform: \"rotate(180deg)\",\n },\n left: {\n top: `calc(50% - ${ARROW_SIZE / 2}px)`,\n right: \"0\",\n \"transform-origin\": \"0 0\",\n transform: \"translateY(50%) rotate(-90deg) translateX(50%)\",\n },\n right: {\n top: `calc(50% - ${ARROW_SIZE / 2}px)`,\n left: \"0\",\n \"transform-origin\": \"100% 0\",\n transform: \"translateY(50%) rotate(90deg) translateX(-50%)\",\n },\n};\n\n// The point the content zooms from: the tip of the arrow.\nconst TRANSFORM_ORIGIN: Record<TooltipSide, string> = {\n top: `50% calc(100% + ${ARROW_SIZE}px)`,\n bottom: `50% -${ARROW_SIZE}px`,\n left: `calc(100% + ${ARROW_SIZE}px) 50%`,\n right: `-${ARROW_SIZE}px 50%`,\n};\n\n/**\n * The tooltip that `copilotTooltip` shows. Same markup and classes as React's\n * `<TooltipContent>` (`ui/tooltip.css` in `@copilotkit/core`).\n */\n@Component({\n selector: \"copilot-tooltip-content\",\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `\n <div\n data-copilotkit\n data-slot=\"tooltip-content\"\n class=\"cpk-tooltip\"\n [class]=\"extraClass()\"\n data-align=\"center\"\n data-state=\"delayed-open\"\n [attr.data-side]=\"side()\"\n [style.--radix-tooltip-content-transform-origin]=\"transformOrigin()\"\n >\n <p>{{ textValue() }}</p>\n <span\n role=\"tooltip\"\n [id]=\"id\"\n style=\"\n position: absolute;\n border: 0;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n word-wrap: normal;\n \"\n >{{ textValue() }}</span\n >\n <span style=\"position: absolute\" [style]=\"arrowStyle()\">\n <svg\n class=\"cpk-tooltip-arrow\"\n width=\"10\"\n height=\"5\"\n viewBox=\"0 0 30 10\"\n preserveAspectRatio=\"none\"\n style=\"display: block\"\n >\n <polygon points=\"0,0 30,0 15,10\" />\n </svg>\n </span>\n </div>\n `,\n})\nexport class TooltipContent {\n id = \"\";\n readonly textValue = signal(\"\");\n /** Classes added to `.cpk-tooltip`. */\n readonly extraClass = signal(\"\");\n readonly side = signal<TooltipSide>(\"bottom\");\n readonly arrowStyle = computed(() => ARROW_STYLE[this.side()]);\n readonly transformOrigin = computed(() => TRANSFORM_ORIGIN[this.side()]);\n\n get text(): string {\n return this.textValue();\n }\n\n set text(value: string) {\n this.textValue.set(value);\n }\n\n get position(): TooltipPosition {\n return POSITION[this.side()];\n }\n\n set position(value: TooltipPosition) {\n this.side.set(SIDE[value]);\n }\n}\n\nlet nextTooltipId = 0;\nlet openTooltip: CopilotTooltip | undefined;\n\n/**\n * Shows a tooltip like React's Radix tooltip: on hover and on keyboard focus,\n * hidden on pointer down, click, blur, scroll, and Escape. Only one tooltip\n * is open at a time.\n */\n@Directive({\n selector: \"[copilotTooltip]\",\n host: {\n \"[attr.aria-describedby]\": \"isOpen() ? contentId : null\",\n \"[attr.data-state]\":\n \"tooltipText ? (isOpen() ? 'delayed-open' : 'closed') : null\",\n \"(pointerenter)\": \"onPointerEnter($event)\",\n \"(pointerleave)\": \"hide()\",\n \"(pointerdown)\": \"onPointerDown()\",\n \"(focus)\": \"onFocus()\",\n \"(blur)\": \"hide()\",\n \"(click)\": \"hide()\",\n },\n})\nexport class CopilotTooltip implements OnChanges, OnDestroy {\n @Input(\"copilotTooltip\") tooltipText = \"\";\n @Input() tooltipPosition: TooltipPosition = \"below\";\n /** Milliseconds to wait on hover. React shows its tooltips at once. */\n @Input() tooltipDelay = 0;\n /** Classes added to the tooltip, like React's `TooltipContent` `className`. */\n @Input() tooltipClass = \"\";\n\n private readonly overlay = inject(Overlay);\n private readonly overlayPositionBuilder = inject(OverlayPositionBuilder);\n private readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly viewContainerRef = inject(ViewContainerRef);\n private readonly document = inject(DOCUMENT);\n\n readonly contentId = `cpk-tooltip-${nextTooltipId++}`;\n readonly isOpen = signal(false);\n\n private overlayRef?: OverlayRef;\n private contentRef?: ComponentRef<TooltipContent>;\n private positionSubscription?: Subscription;\n private tooltipTimeout?: ReturnType<typeof setTimeout>;\n private originalTitle?: string;\n private pointerDown = false;\n\n private readonly onDocumentKeydown = (event: KeyboardEvent): void => {\n if (event.key === \"Escape\") this.hide();\n };\n private readonly onPointerUp = (): void => {\n this.pointerDown = false;\n };\n\n ngOnChanges(): void {\n if (!this.tooltipText) {\n this.hide();\n return;\n }\n if (this.contentRef) this.contentRef.instance.text = this.tooltipText;\n }\n\n onPointerEnter(event: PointerEvent): void {\n if (event.pointerType === \"touch\" || !this.tooltipText) return;\n this.clearTimeout();\n if (this.tooltipDelay > 0) {\n this.tooltipTimeout = setTimeout(() => this.show(), this.tooltipDelay);\n } else {\n this.show();\n }\n }\n\n onPointerDown(): void {\n this.hide();\n this.pointerDown = true;\n this.document.addEventListener(\"pointerup\", this.onPointerUp, {\n once: true,\n });\n }\n\n onFocus(): void {\n // Keyboard focus opens the tooltip; focus from a click does not.\n if (!this.pointerDown && this.tooltipText) this.show();\n }\n\n /** Opens the tooltip now, without the hover delay. */\n show(): void {\n this.clearTimeout();\n if (this.overlayRef || !this.tooltipText) return;\n openTooltip?.hide();\n openTooltip = this;\n\n // Keep the browser's own title tooltip from showing as well.\n const element = this.elementRef.nativeElement;\n if (element.hasAttribute(\"title\")) {\n this.originalTitle = element.getAttribute(\"title\") ?? undefined;\n element.removeAttribute(\"title\");\n }\n\n const positionStrategy = this.overlayPositionBuilder\n .flexibleConnectedTo(this.elementRef)\n .withPositions(this.getPositions())\n .withFlexibleDimensions(false)\n .withPush(false);\n\n this.overlayRef = this.overlay.create({\n positionStrategy,\n scrollStrategy: this.overlay.scrollStrategies.close(),\n hasBackdrop: false,\n panelClass: \"cpk-tooltip-pane\",\n });\n\n const portal = new ComponentPortal(TooltipContent, this.viewContainerRef);\n this.contentRef = this.overlayRef.attach(portal);\n this.contentRef.instance.id = this.contentId;\n this.contentRef.instance.text = this.tooltipText;\n this.contentRef.instance.extraClass.set(this.tooltipClass);\n this.contentRef.instance.position = this.tooltipPosition;\n this.positionSubscription = positionStrategy.positionChanges.subscribe(\n ({ connectionPair }) => {\n this.contentRef?.instance.side.set(sideOf(connectionPair));\n },\n );\n this.overlayRef.detachments().subscribe(() => this.hide());\n this.document.addEventListener(\"keydown\", this.onDocumentKeydown, true);\n this.isOpen.set(true);\n }\n\n hide(): void {\n this.clearTimeout();\n if (openTooltip === this) openTooltip = undefined;\n if (this.originalTitle !== undefined) {\n this.elementRef.nativeElement.setAttribute(\"title\", this.originalTitle);\n this.originalTitle = undefined;\n }\n if (!this.overlayRef) return;\n this.document.removeEventListener(\"keydown\", this.onDocumentKeydown, true);\n this.positionSubscription?.unsubscribe();\n this.positionSubscription = undefined;\n const overlayRef = this.overlayRef;\n this.overlayRef = undefined;\n this.contentRef = undefined;\n overlayRef.dispose();\n this.isOpen.set(false);\n }\n\n ngOnDestroy(): void {\n this.document.removeEventListener(\"pointerup\", this.onPointerUp);\n this.hide();\n }\n\n private clearTimeout(): void {\n if (this.tooltipTimeout !== undefined) {\n clearTimeout(this.tooltipTimeout);\n this.tooltipTimeout = undefined;\n }\n }\n\n private getPositions(): ConnectedPosition[] {\n const positions: Record<TooltipPosition, ConnectedPosition> = {\n above: {\n originX: \"center\",\n originY: \"top\",\n overlayX: \"center\",\n overlayY: \"bottom\",\n offsetY: -ARROW_SIZE,\n },\n below: {\n originX: \"center\",\n originY: \"bottom\",\n overlayX: \"center\",\n overlayY: \"top\",\n offsetY: ARROW_SIZE,\n },\n left: {\n originX: \"start\",\n originY: \"center\",\n overlayX: \"end\",\n overlayY: \"center\",\n offsetX: -ARROW_SIZE,\n },\n right: {\n originX: \"end\",\n originY: \"center\",\n overlayX: \"start\",\n overlayY: \"center\",\n offsetX: ARROW_SIZE,\n },\n };\n // Like Radix, flip to the opposite side first when there is no room.\n const opposite: Record<TooltipPosition, TooltipPosition> = {\n above: \"below\",\n below: \"above\",\n left: \"right\",\n right: \"left\",\n };\n const primary = positions[this.tooltipPosition]\n ? this.tooltipPosition\n : \"below\";\n const order: TooltipPosition[] = [\n primary,\n opposite[primary],\n ...(Object.keys(positions) as TooltipPosition[]).filter(\n (p) => p !== primary && p !== opposite[primary],\n ),\n ];\n return order.map((p) => positions[p]);\n }\n}\n\nfunction sideOf(pair: ConnectedPosition): TooltipSide {\n if (pair.originY === \"top\" && pair.overlayY === \"bottom\") return \"top\";\n if (pair.originY === \"bottom\" && pair.overlayY === \"top\") return \"bottom\";\n if (pair.originX === \"start\" && pair.overlayX === \"end\") return \"left\";\n return \"right\";\n}\n","// Generated from @copilotkit/core/styles. Do not edit.\nexport const stylesheet = \"@layer theme,base,components,utilities;@layer base{:where([data-copilotkit]){--background: oklch(1 0 0);--foreground: oklch(.145 0 0);--card: oklch(1 0 0);--card-foreground: oklch(.145 0 0);--popover: oklch(1 0 0);--popover-foreground: oklch(.145 0 0);--primary: oklch(.205 0 0);--primary-foreground: oklch(.985 0 0);--secondary: oklch(.97 0 0);--secondary-foreground: oklch(.205 0 0);--muted: oklch(.97 0 0);--muted-foreground: oklch(.556 0 0);--accent: oklch(.97 0 0);--accent-foreground: oklch(.205 0 0);--destructive: oklch(.577 .245 27.325);--destructive-foreground: oklch(.577 .245 27.325);--border: oklch(.922 0 0);--input: oklch(.922 0 0);--ring: oklch(.708 0 0);--chart-1: oklch(.646 .222 41.116);--chart-2: oklch(.6 .118 184.704);--chart-3: oklch(.398 .07 227.392);--chart-4: oklch(.828 .189 84.429);--chart-5: oklch(.769 .188 70.08);--radius: .625rem;--sidebar: oklch(.985 0 0);--sidebar-foreground: oklch(.145 0 0);--sidebar-primary: oklch(.205 0 0);--sidebar-primary-foreground: oklch(.985 0 0);--sidebar-accent: oklch(.97 0 0);--sidebar-accent-foreground: oklch(.205 0 0);--sidebar-border: oklch(.922 0 0);--sidebar-ring: oklch(.708 0 0)}:where(.dark [data-copilotkit],[data-copilotkit].dark){--background: oklch(.145 0 0);--foreground: oklch(.985 0 0);--card: oklch(.145 0 0);--card-foreground: oklch(.985 0 0);--popover: oklch(.145 0 0);--popover-foreground: oklch(.985 0 0);--primary: oklch(.985 0 0);--primary-foreground: oklch(.205 0 0);--secondary: oklch(.269 0 0);--secondary-foreground: oklch(.985 0 0);--muted: oklch(.269 0 0);--muted-foreground: oklch(.708 0 0);--accent: oklch(.269 0 0);--accent-foreground: oklch(.985 0 0);--destructive: oklch(.396 .141 25.723);--destructive-foreground: oklch(.637 .237 25.331);--border: oklch(.269 0 0);--input: oklch(.269 0 0);--ring: oklch(.556 0 0);--chart-1: oklch(.488 .243 264.376);--chart-2: oklch(.696 .17 162.48);--chart-3: oklch(.769 .188 70.08);--chart-4: oklch(.627 .265 303.9);--chart-5: oklch(.645 .246 16.439);--sidebar: oklch(.205 0 0);--sidebar-foreground: oklch(.985 0 0);--sidebar-primary: oklch(.488 .243 264.376);--sidebar-primary-foreground: oklch(.985 0 0);--sidebar-accent: oklch(.269 0 0);--sidebar-accent-foreground: oklch(.985 0 0);--sidebar-border: oklch(.269 0 0);--sidebar-ring: oklch(.439 0 0);--a2ui-color-surface: var(--card);--a2ui-color-border: oklch(.371 0 0);--a2ui-color-muted: var(--muted-foreground);--a2ui-color-error: #f87171}}@layer utilities{:where([data-copilotkit]),:where([data-copilotkit] *),:where([data-copilotkit] :after),:where([data-copilotkit] :before){box-sizing:border-box;border:0 solid;margin:0;padding:0}:where([data-copilotkit]) ::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}:where([data-copilotkit]){-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:ui-sans-serif,system-ui,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\",Segoe UI Symbol,\\\"Noto Color Emoji\\\";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}:where([data-copilotkit] hr){height:0;color:inherit;border-top-width:1px}:where([data-copilotkit] abbr:where([title])){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}:where([data-copilotkit] h1),:where([data-copilotkit] h2),:where([data-copilotkit] h3),:where([data-copilotkit] h4),:where([data-copilotkit] h5),:where([data-copilotkit] h6){font-size:inherit;font-weight:inherit}:where([data-copilotkit] a){color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}:where([data-copilotkit] b),:where([data-copilotkit] strong){font-weight:bolder}:where([data-copilotkit] code),:where([data-copilotkit] kbd),:where([data-copilotkit] samp),:where([data-copilotkit] pre){font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}:where([data-copilotkit] small){font-size:80%}:where([data-copilotkit] sub),:where([data-copilotkit] sup){vertical-align:baseline;font-size:75%;line-height:0;position:relative}:where([data-copilotkit] sub){bottom:-.25em}:where([data-copilotkit] sup){top:-.5em}:where([data-copilotkit] table){text-indent:0;border-color:inherit;border-collapse:collapse}:where([data-copilotkit] :-moz-focusring){outline:auto}:where([data-copilotkit] progress){vertical-align:baseline}:where([data-copilotkit] summary){display:list-item}:where([data-copilotkit] ol),:where([data-copilotkit] ul),:where([data-copilotkit] menu){list-style:none}:where([data-copilotkit] img),:where([data-copilotkit] svg),:where([data-copilotkit] video),:where([data-copilotkit] canvas),:where([data-copilotkit] audio),:where([data-copilotkit] iframe),:where([data-copilotkit] embed),:where([data-copilotkit] object){vertical-align:middle;display:block}:where([data-copilotkit] img),:where([data-copilotkit] video){max-width:100%;height:auto}:where([data-copilotkit] button),:where(button[data-copilotkit]),:where([data-copilotkit] input),:where([data-copilotkit] select),:where([data-copilotkit] optgroup),:where([data-copilotkit] textarea){font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where([data-copilotkit]) ::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where([data-copilotkit] :where(select:is([multiple],[size])) optgroup){font-weight:bolder}:where([data-copilotkit] :where(select:is([multiple],[size])) optgroup option){padding-inline-start:20px}:where([data-copilotkit]) ::file-selector-button{margin-inline-end:4px}:where([data-copilotkit]) ::placeholder{opacity:1}@supports (not ((-webkit-appearance: -apple-pay-button))) or (contain-intrinsic-size: 1px){:where([data-copilotkit]) ::placeholder{color:currentColor}@supports (color: color-mix(in lab,red,red)){:where([data-copilotkit]) ::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}:where([data-copilotkit] textarea){resize:vertical}:where([data-copilotkit]) ::-webkit-search-decoration{-webkit-appearance:none}:where([data-copilotkit]) ::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}:where([data-copilotkit]) ::-webkit-datetime-edit{display:inline-flex}:where([data-copilotkit]) ::-webkit-datetime-edit-fields-wrapper{padding:0}:where([data-copilotkit]) ::-webkit-datetime-edit{padding-block:0}:where([data-copilotkit]) ::-webkit-datetime-edit-year-field{padding-block:0}:where([data-copilotkit]) ::-webkit-datetime-edit-month-field{padding-block:0}:where([data-copilotkit]) ::-webkit-datetime-edit-day-field{padding-block:0}:where([data-copilotkit]) ::-webkit-datetime-edit-hour-field{padding-block:0}:where([data-copilotkit]) ::-webkit-datetime-edit-minute-field{padding-block:0}:where([data-copilotkit]) ::-webkit-datetime-edit-second-field{padding-block:0}:where([data-copilotkit]) ::-webkit-datetime-edit-millisecond-field{padding-block:0}:where([data-copilotkit]) ::-webkit-datetime-edit-meridiem-field{padding-block:0}:where([data-copilotkit]) ::-webkit-calendar-picker-indicator{line-height:1}:where([data-copilotkit] :-moz-ui-invalid){box-shadow:none}:where([data-copilotkit] button),:where(button[data-copilotkit]),:where([data-copilotkit] input:where([type=button],[type=reset],[type=submit])),:where(input:where([type=button],[type=reset],[type=submit])[data-copilotkit]){appearance:button}:where([data-copilotkit]) ::file-selector-button{appearance:button}:where([data-copilotkit]) ::-webkit-inner-spin-button{height:auto}:where([data-copilotkit]) ::-webkit-outer-spin-button{height:auto}:where([data-copilotkit] [hidden]:where(:not([hidden=until-found]))),:where([hidden]:where(:not([hidden=until-found]))[data-copilotkit]){display:none!important}:where([data-copilotkit],[data-copilotkit] *){border-color:var(--border);outline-color:color-mix(in oklab,var(--ring) 50%,transparent)}:where([data-copilotkit]){color:var(--foreground);background-color:var(--background)}:where(.copilotKitChat[data-copilotkit]){width:100%}@supports (height: 100dvh){:where([data-copilot-sidebar]){height:100dvh}}@media(min-width:768px){:where([data-copilot-sidebar]){width:var(--sidebar-width, 480px)!important}}@media(max-width:767px){:where([data-copilot-sidebar]){width:100%!important;-webkit-overflow-scrolling:touch}:where([data-sidebar-chat]){touch-action:pan-y}}:where([data-copilotkit]) ::-webkit-scrollbar{width:6px}:where([data-copilotkit]) ::-webkit-scrollbar-track{background:transparent}:where([data-copilotkit]) ::-webkit-scrollbar-thumb{background:#636363;border-radius:9999px}:where([data-copilotkit]) ::-webkit-scrollbar-thumb:hover{background:#484848}:where([data-copilotkit] *){scrollbar-width:thin;scrollbar-color:oklch(.5 0 0) transparent}:where([data-copilotkit] .cpk-shimmer){--cpk-shimmer-base: color-mix( in oklab, var(--foreground) 38%, var(--background) );background-image:linear-gradient(90deg,var(--cpk-shimmer-base) 0%,var(--cpk-shimmer-base) 32%,var(--foreground) 50%,var(--cpk-shimmer-base) 68%,var(--cpk-shimmer-base) 100%);background-size:250% 100%;background-clip:text;-webkit-background-clip:text;color:transparent;animation:cpk-shimmer 1.8s linear infinite}@media(prefers-reduced-motion:reduce){:where([data-copilotkit] .cpk-shimmer){animation:none;color:var(--muted-foreground);background:none}}@keyframes cpk-spin{to{transform:rotate(360deg)}}@keyframes cpk-pulse{50%{opacity:.5}}@keyframes cpk-pulse-cursor{0%,to{transform:scale(1);opacity:1}50%{transform:scale(1.5);opacity:.8}}@keyframes cpk-shimmer{0%{background-position:100% 0}to{background-position:-150% 0}}@keyframes cpk-stack-drop{0%{transform:translateY(-6px);opacity:.2}}@keyframes cpk-stack-fan{0%{transform:translateY(-6px) scale(.985);opacity:0}}:where(.cpk-button){display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;gap:.5rem;border-radius:calc(var(--radius) - 2px);font-size:.875rem;line-height:calc(1.25 / .875);font-weight:500;white-space:nowrap;outline-style:none;transition-property:all;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}:where(.cpk-button-default){background-color:var(--primary);color:var(--primary-foreground);box-shadow:0 1px 2px #0000000d}:where(.cpk-button-destructive){background-color:var(--destructive);color:#fff;box-shadow:0 1px 2px #0000000d}:where(.cpk-button-outline){border-width:1px;border-style:solid;background-color:var(--background);box-shadow:0 1px 2px #0000000d}:where(.cpk-button-secondary){background-color:var(--secondary);color:var(--secondary-foreground);box-shadow:0 1px 2px #0000000d}:where(.cpk-button-ghost){cursor:pointer}:where(.cpk-button-link){color:var(--primary);text-underline-offset:4px}:where(.cpk-button-assistant-message-toolbar){width:2rem;height:2rem;padding:0;color:#5d5d5d;cursor:pointer;transition-property:color,background-color,border-color}:where(.cpk-button-chat-input-toolbar-primary){border-radius:calc(infinity * 1px);background-color:#000;color:#fff;cursor:pointer;transition-property:color,background-color,border-color}:where(.cpk-button-chat-input-toolbar-secondary){border-radius:calc(infinity * 1px);background-color:transparent;color:#444;cursor:pointer;transition-property:color,background-color,border-color}:where(.cpk-button-size-default){height:2.25rem;padding-inline:1rem;padding-block:.5rem}:where(.cpk-button-size-sm){height:2rem;gap:.375rem;border-radius:calc(var(--radius) - 2px);padding-inline:.75rem}:where(.cpk-button-size-lg){height:2.5rem;border-radius:calc(var(--radius) - 2px);padding-inline:1.5rem}:where(.cpk-button-size-icon){width:2.25rem;height:2.25rem}:where(.cpk-button-size-chat-input-toolbar-icon){width:2.25rem;height:2.25rem;border-radius:calc(infinity * 1px)}:where(.cpk-button-size-chat-input-toolbar-icon-label){height:2.25rem;gap:.5rem;border-radius:calc(infinity * 1px);padding-inline:.75rem;font-weight:400}:where(.cpk-button-size-default:has(>svg)){padding-inline:.75rem}:where(.cpk-button-size-sm:has(>svg)){padding-inline:.625rem}:where(.cpk-button-size-lg:has(>svg)){padding-inline:1rem}:where(.cpk-button svg){flex-shrink:0;pointer-events:none}:where(.cpk-button svg:not([class*=size-])){width:1rem;height:1rem}@media(hover:hover){:where(.cpk-button-default:hover){background-color:color-mix(in oklab,var(--primary) 90%,transparent)}:where(.cpk-button-destructive:hover){background-color:color-mix(in oklab,var(--destructive) 90%,transparent)}:where(.cpk-button-outline:hover){background-color:var(--accent);color:var(--accent-foreground)}:where(.cpk-button-secondary:hover){background-color:color-mix(in oklab,var(--secondary) 80%,transparent)}:where(.cpk-button-ghost:hover){background-color:var(--accent);color:var(--accent-foreground)}:where(.cpk-button-link:hover){text-decoration-line:underline}:where(.cpk-button-assistant-message-toolbar:hover){background-color:#e8e8e8;color:#5d5d5d}:where(.cpk-button-chat-input-toolbar-primary:hover){opacity:.7}:where(.cpk-button-chat-input-toolbar-secondary:hover){background-color:#f8f8f8;color:#333}}:where(.cpk-button:focus-visible){border-color:var(--ring);box-shadow:0 0 0 3px color-mix(in oklab,var(--ring) 50%,transparent)}:where(.cpk-button-default:focus-visible,.cpk-button-outline:focus-visible,.cpk-button-secondary:focus-visible){box-shadow:0 0 0 3px color-mix(in oklab,var(--ring) 50%,transparent),0 1px 2px #0000000d}:where(.cpk-button-destructive:focus-visible){box-shadow:0 0 0 3px color-mix(in oklab,var(--destructive) 20%,transparent),0 1px 2px #0000000d}:where(.cpk-button:disabled){pointer-events:none;opacity:.5}:where(.cpk-button-chat-input-toolbar-primary:disabled){background-color:#00000014;color:#0d0d0d;cursor:not-allowed}:where(.cpk-button-chat-input-toolbar-secondary:disabled){cursor:not-allowed}:where(.cpk-button[aria-invalid=true]){border-color:var(--destructive)}:where(.cpk-button[aria-invalid=true]:focus-visible){box-shadow:0 0 0 3px color-mix(in oklab,var(--destructive) 20%,transparent)}:where(.cpk-button-default[aria-invalid=true]:focus-visible,.cpk-button-destructive[aria-invalid=true]:focus-visible,.cpk-button-outline[aria-invalid=true]:focus-visible,.cpk-button-secondary[aria-invalid=true]:focus-visible){box-shadow:0 0 0 3px color-mix(in oklab,var(--destructive) 20%,transparent),0 1px 2px #0000000d}:where(.dark .cpk-button-destructive){background-color:color-mix(in oklab,var(--destructive) 60%,transparent)}:where(.dark .cpk-button-outline){border-color:var(--input);background-color:color-mix(in oklab,var(--input) 30%,transparent)}:where(.dark .cpk-button-assistant-message-toolbar){color:#f3f3f3}:where(.dark .cpk-button-chat-input-toolbar-primary){background-color:#fff;color:#000}:where(.dark .cpk-button-chat-input-toolbar-secondary){border-color:#404040;color:#fff}@media(hover:hover){:where(.cpk-button-chat-input-toolbar-primary:disabled:hover){opacity:1}:where(.cpk-button-chat-input-toolbar-secondary:disabled:hover){background-color:transparent;color:#444}:where(.dark .cpk-button-outline:hover){background-color:color-mix(in oklab,var(--input) 50%,transparent)}:where(.dark .cpk-button-ghost:hover){background-color:color-mix(in oklab,var(--accent) 50%,transparent)}:where(.dark .cpk-button-assistant-message-toolbar:hover){background-color:#303030;color:#f3f3f3}:where(.dark .cpk-button-chat-input-toolbar-secondary:hover){background-color:#404040;color:#fff}}:where(.dark .cpk-button-destructive:focus-visible){box-shadow:0 0 0 3px color-mix(in oklab,var(--destructive) 40%,transparent),0 1px 2px #0000000d}:where(.dark .cpk-button-chat-input-toolbar-primary:focus-visible){outline-color:#fff}:where(.dark .cpk-button-chat-input-toolbar-primary:disabled){background-color:#454545;color:#fff}:where(.dark .cpk-button[aria-invalid=true]:focus-visible){box-shadow:0 0 0 3px color-mix(in oklab,var(--destructive) 40%,transparent)}:where(.dark .cpk-button-default[aria-invalid=true]:focus-visible,.dark .cpk-button-destructive[aria-invalid=true]:focus-visible,.dark .cpk-button-outline[aria-invalid=true]:focus-visible,.dark .cpk-button-secondary[aria-invalid=true]:focus-visible){box-shadow:0 0 0 3px color-mix(in oklab,var(--destructive) 40%,transparent),0 1px 2px #0000000d}@media(hover:hover){:where(.dark .cpk-button-chat-input-toolbar-secondary:disabled:hover){background-color:transparent;color:#ccc}}:where(.cpk-dropdown-menu-content,.cpk-dropdown-menu-sub-content){z-index:50;min-width:8rem;transform-origin:var(--radix-dropdown-menu-content-transform-origin);border-width:1px;border-style:solid;border-radius:calc(var(--radius) - 2px);background-color:var(--popover);padding:.25rem;color:var(--popover-foreground)}:where(.cpk-dropdown-menu-content){max-height:var(--radix-dropdown-menu-content-available-height);overflow-x:hidden;overflow-y:auto;box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -2px #0000001a}:where(.cpk-dropdown-menu-sub-content){overflow:hidden;box-shadow:0 10px 15px -3px #0000001a,0 4px 6px -4px #0000001a}:where(.cpk-dropdown-menu-content[data-state=open],.cpk-dropdown-menu-sub-content[data-state=open]){animation:cpk-dropdown-menu-enter .15s ease}:where(.cpk-dropdown-menu-content[data-state=open][data-side=bottom],.cpk-dropdown-menu-sub-content[data-state=open][data-side=bottom]){animation-name:cpk-dropdown-menu-enter-from-top}:where(.cpk-dropdown-menu-content[data-state=open][data-side=left],.cpk-dropdown-menu-sub-content[data-state=open][data-side=left]){animation-name:cpk-dropdown-menu-enter-from-right}:where(.cpk-dropdown-menu-content[data-state=open][data-side=right],.cpk-dropdown-menu-sub-content[data-state=open][data-side=right]){animation-name:cpk-dropdown-menu-enter-from-left}:where(.cpk-dropdown-menu-content[data-state=open][data-side=top],.cpk-dropdown-menu-sub-content[data-state=open][data-side=top]){animation-name:cpk-dropdown-menu-enter-from-bottom}:where(.cpk-dropdown-menu-content[data-state=closed],.cpk-dropdown-menu-sub-content[data-state=closed]){animation:cpk-dropdown-menu-exit .15s ease}:where(.cpk-dropdown-menu-item,.cpk-dropdown-menu-checkbox-item,.cpk-dropdown-menu-radio-item,.cpk-dropdown-menu-sub-trigger){display:flex;align-items:center;border-radius:calc(var(--radius) - 4px);padding-block:.375rem;font-size:.875rem;line-height:calc(1.25 / .875);outline-style:none;cursor:default;-webkit-user-select:none;user-select:none}:where(.cpk-dropdown-menu-item,.cpk-dropdown-menu-checkbox-item,.cpk-dropdown-menu-radio-item){position:relative;gap:.5rem}:where(.cpk-dropdown-menu-item,.cpk-dropdown-menu-sub-trigger){padding-inline:.5rem}:where(.cpk-dropdown-menu-checkbox-item,.cpk-dropdown-menu-radio-item){padding-right:.5rem;padding-left:2rem}@media(forced-colors:active){:where(.cpk-dropdown-menu-item,.cpk-dropdown-menu-checkbox-item,.cpk-dropdown-menu-radio-item,.cpk-dropdown-menu-sub-trigger){outline:2px solid transparent;outline-offset:2px}}:where(.cpk-dropdown-menu-item svg,.cpk-dropdown-menu-checkbox-item svg,.cpk-dropdown-menu-radio-item svg){flex-shrink:0;pointer-events:none}:where(.cpk-dropdown-menu-item svg:not([class*=size-]),.cpk-dropdown-menu-checkbox-item svg:not([class*=size-]),.cpk-dropdown-menu-radio-item svg:not([class*=size-])){width:1rem;height:1rem}:where(.cpk-dropdown-menu-item svg:not([class*=text-])){color:var(--muted-foreground)}:where(.cpk-dropdown-menu-item:focus,.cpk-dropdown-menu-checkbox-item:focus,.cpk-dropdown-menu-radio-item:focus,.cpk-dropdown-menu-sub-trigger:focus,.cpk-dropdown-menu-sub-trigger[data-state=open]){background-color:var(--accent);color:var(--accent-foreground)}:where(.cpk-dropdown-menu-item[data-disabled],.cpk-dropdown-menu-checkbox-item[data-disabled],.cpk-dropdown-menu-radio-item[data-disabled]){pointer-events:none;opacity:.5}:where(.cpk-dropdown-menu-item[data-inset],.cpk-dropdown-menu-sub-trigger[data-inset]){padding-left:2rem}:where(.cpk-dropdown-menu-item[data-variant=destructive]){color:var(--destructive)}:where(.cpk-dropdown-menu-item[data-variant=destructive]:focus){background-color:color-mix(in oklab,var(--destructive) 10%,transparent);color:var(--destructive)}:where(.cpk-dropdown-menu-item[data-variant=destructive]>svg){color:var(--destructive)}:where(.dark .cpk-dropdown-menu-item[data-variant=destructive]:focus){background-color:color-mix(in oklab,var(--destructive) 20%,transparent)}:where(.cpk-dropdown-menu-item-indicator){pointer-events:none;position:absolute;left:.5rem;display:flex;width:.875rem;height:.875rem;align-items:center;justify-content:center}:where(.cpk-dropdown-menu-check-icon){width:1rem;height:1rem}:where(.cpk-dropdown-menu-radio-icon){width:.5rem;height:.5rem;fill:currentColor}:where(.cpk-dropdown-menu-sub-trigger-icon){margin-left:auto;width:1rem;height:1rem}:where(.cpk-dropdown-menu-label){padding-inline:.5rem;padding-block:.375rem;font-size:.875rem;line-height:calc(1.25 / .875);font-weight:500}:where(.cpk-dropdown-menu-label[data-inset]){padding-left:2rem}:where(.cpk-dropdown-menu-separator){margin-inline:-.25rem;margin-block:.25rem;height:1px;background-color:var(--border)}:where(.cpk-dropdown-menu-shortcut){margin-left:auto;font-size:.75rem;line-height:calc(1 / .75);letter-spacing:.1em;color:var(--muted-foreground)}@keyframes cpk-dropdown-menu-enter{0%{opacity:0;transform:scale(.95)}}@keyframes cpk-dropdown-menu-enter-from-top{0%{opacity:0;transform:translateY(-.5rem) scale(.95)}}@keyframes cpk-dropdown-menu-enter-from-right{0%{opacity:0;transform:translate(.5rem) scale(.95)}}@keyframes cpk-dropdown-menu-enter-from-left{0%{opacity:0;transform:translate(-.5rem) scale(.95)}}@keyframes cpk-dropdown-menu-enter-from-bottom{0%{opacity:0;transform:translateY(.5rem) scale(.95)}}@keyframes cpk-dropdown-menu-exit{to{opacity:0;transform:scale(.95)}}:where(.cpk-popover){z-index:50;outline-style:none}:where(.cpk-popover[data-state=open]){animation:cpk-popover-enter .15s ease}:where(.cpk-popover[data-state=open][data-side=bottom]){animation-name:cpk-popover-enter-from-top}:where(.cpk-popover[data-state=open][data-side=top]){animation-name:cpk-popover-enter-from-bottom}@keyframes cpk-popover-enter{0%{opacity:0;transform:scale(.95)}}@keyframes cpk-popover-enter-from-top{0%{opacity:0;transform:translateY(-.25rem) scale(.95)}}@keyframes cpk-popover-enter-from-bottom{0%{opacity:0;transform:translateY(.25rem) scale(.95)}}:where(.cpk-tooltip){z-index:50;width:fit-content;transform-origin:var(--radix-tooltip-content-transform-origin);border-radius:calc(var(--radius) - 2px);background-color:var(--primary);padding-inline:.75rem;padding-block:.375rem;font-size:.75rem;line-height:calc(1 / .75);text-wrap:balance;color:var(--primary-foreground);animation:cpk-tooltip-enter .15s ease}:where(.cpk-tooltip[data-side=bottom]){animation-name:cpk-tooltip-enter-from-top}:where(.cpk-tooltip[data-side=left]){animation-name:cpk-tooltip-enter-from-right}:where(.cpk-tooltip[data-side=right]){animation-name:cpk-tooltip-enter-from-left}:where(.cpk-tooltip[data-side=top]){animation-name:cpk-tooltip-enter-from-bottom}:where(.cpk-tooltip[data-state=closed]){animation:cpk-tooltip-exit .15s ease}:where(.cpk-tooltip-arrow){z-index:50;width:.625rem;height:.625rem;translate:0 calc(-50% - 2px);rotate:45deg;border-radius:2px;background-color:var(--primary);fill:var(--primary)}@keyframes cpk-tooltip-enter{0%{opacity:0;transform:scale(.95)}}@keyframes cpk-tooltip-enter-from-top{0%{opacity:0;transform:translateY(-.5rem) scale(.95)}}@keyframes cpk-tooltip-enter-from-right{0%{opacity:0;transform:translate(.5rem) scale(.95)}}@keyframes cpk-tooltip-enter-from-left{0%{opacity:0;transform:translate(-.5rem) scale(.95)}}@keyframes cpk-tooltip-enter-from-bottom{0%{opacity:0;transform:translateY(.5rem) scale(.95)}}@keyframes cpk-tooltip-exit{to{opacity:0;transform:scale(.95)}}:where(.cpk-assistant-message-work-text){margin-inline:-.5rem}:where(.cpk-assistant-message-work-text-content){padding-inline:.5rem}:where(.cpk-assistant-message-markdown){max-width:100%;overflow-wrap:break-word}:where(.cpk-assistant-message-toolbar){display:flex;width:100%;align-items:center;margin-top:0;margin-left:-5px;background-color:transparent}:where(.cpk-assistant-message-toolbar-items){display:flex;width:100%;align-items:center;gap:.25rem}:where(.cpk-assistant-message-toolbar-icon){width:18px;height:18px}:where(.cpk-assistant-message-read-aloud-icon){width:20px;height:20px}:where(.cpk-assistant-message-feedback-popover){z-index:1300}:where(.cpk-assistant-message-feedback-comment){display:flex;width:20rem;max-width:calc(100vw - 1rem);align-items:center;gap:.25rem;border:1px solid var(--border);border-radius:calc(infinity * 1px);background-color:var(--background);padding:.125rem .125rem .125rem .75rem;font-size:.875rem;line-height:calc(1.25 / .875);box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -2px #0000001a}:where(.cpk-assistant-message-feedback-comment-input){min-width:0;flex:1;background-color:transparent;padding-block:.25rem;color:var(--foreground);outline-style:none}:where(.cpk-assistant-message-feedback-comment-input)::placeholder{color:var(--muted-foreground)}:where(.cpk-assistant-message-feedback-comment-submit-icon){width:16px;height:16px}:where(.cpk-attachment-lightbox,.cpk-attachment-lightbox *,.cpk-attachment-lightbox :before,.cpk-attachment-lightbox :after){box-sizing:border-box;margin:0;padding:0;border:0 solid}:where(.cpk-attachment-lightbox :is(img,video,iframe)){display:block;vertical-align:middle}:where(.cpk-attachment-lightbox){position:fixed;inset:0;z-index:9999;display:flex;align-items:center;justify-content:center;background-color:color-mix(in oklab,#000 80%,transparent)}:where(.cpk-attachment-lightbox-close-button){position:absolute;top:1rem;right:1rem;z-index:10;display:flex;width:2.5rem;height:2.5rem;align-items:center;justify-content:center;border-style:none;border-radius:calc(infinity * 1px);background-color:color-mix(in oklab,#fff 10%,transparent);color:#fff;cursor:pointer}@media(hover:hover){:where(.cpk-attachment-lightbox-close-button:hover){background-color:color-mix(in oklab,#fff 20%,transparent)}}:where(.cpk-attachment-lightbox-close-icon){width:1.25rem;height:1.25rem}:where(.cpk-attachment-lightbox-trigger){display:block;border-radius:inherit;cursor:pointer}:where(.cpk-attachment-lightbox-trigger:focus-visible){outline:2px solid var(--ring);outline-offset:2px}:where(.cpk-attachment-queue-item>.cpk-attachment-lightbox-trigger){width:100%;height:100%}:where(.cpk-attachment-queue-item>.cpk-attachment-lightbox-trigger:focus-visible){outline-offset:-2px}:where(.cpk-attachment-queue){display:flex;flex-wrap:wrap;gap:.5rem;padding:.5rem}:where(.cpk-attachment-queue-item){position:relative;display:inline-flex;overflow:hidden;border:1px solid var(--border);border-radius:var(--radius)}:where(.cpk-attachment-queue-item-media){width:72px;height:72px}:where(.cpk-attachment-queue-item-audio){min-width:200px;max-width:280px;flex-direction:column;padding:.25rem 2rem .25rem .25rem}:where(.cpk-attachment-queue-item-document){max-width:240px;padding:.5rem 2rem .5rem .75rem}:where(.cpk-attachment-queue-remove-button){position:absolute;top:.375rem;right:.375rem;z-index:20;display:flex;width:1.25rem;height:1.25rem;align-items:center;justify-content:center;border-style:none;border-radius:calc(infinity * 1px);background-color:color-mix(in oklab,#000 60%,transparent);font-size:10px;color:#fff;cursor:pointer}:where(.cpk-attachment-queue-item-media>.cpk-attachment-queue-remove-button){top:.25rem;right:.25rem}:where(.cpk-attachment-queue-uploading-overlay){position:absolute;inset:0;z-index:10;display:flex;align-items:center;justify-content:center;background-color:color-mix(in oklab,#000 40%,transparent)}:where(.cpk-attachment-queue-uploading-spinner){width:1.25rem;height:1.25rem;border:2px solid #fff;border-top-color:transparent;border-radius:calc(infinity * 1px);animation:cpk-spin 1s linear infinite}:where(.cpk-attachment-queue-placeholder){width:100%;height:100%}:where(.cpk-attachment-queue-preview-button){width:100%;height:100%;text-align:start}:where(.cpk-attachment-queue-image){width:100%;height:100%;object-fit:cover;cursor:pointer}:where(.cpk-attachment-queue-lightbox-image){max-width:90vw;max-height:90vh;object-fit:contain;border-radius:var(--radius)}:where(.cpk-attachment-queue-audio){display:flex;width:100%;flex-direction:column;gap:.25rem}:where(.cpk-attachment-queue-audio-player){width:100%;height:2rem}:where(.cpk-attachment-queue-audio-filename){overflow:hidden;font-size:.75rem;line-height:calc(1 / .75);font-weight:500;text-overflow:ellipsis;white-space:nowrap}:where(.cpk-attachment-queue-video){width:100%;height:100%}:where(.cpk-attachment-queue-video-thumbnail){width:100%;height:100%;object-fit:cover}:where(.cpk-attachment-queue-video-play-button){position:absolute;inset:0;z-index:10;display:flex;align-items:center;justify-content:center;border-style:none;background-color:color-mix(in oklab,#000 20%,transparent);padding:0;cursor:pointer}:where(.cpk-attachment-queue-video-play-badge){display:flex;width:2rem;height:2rem;align-items:center;justify-content:center;border-radius:calc(infinity * 1px);background-color:color-mix(in oklab,#000 60%,transparent)}:where(.cpk-attachment-queue-video-play-icon){width:1rem;height:1rem;margin-left:.125rem;color:#fff}:where(.cpk-attachment-queue-lightbox-video){max-width:90vw;max-height:90vh;border-radius:var(--radius)}:where(.cpk-attachment-queue-pdf-preview){width:90vw;max-width:1000px;height:90vh;border-radius:var(--radius);background-color:#fff}:where(.cpk-attachment-queue-text-preview){width:90vw;max-width:800px;max-height:90vh;overflow:auto;border-radius:var(--radius);background-color:#fff;padding:1.5rem}:where(.dark .cpk-attachment-queue-text-preview){background-color:#101828}:where(.cpk-attachment-queue-text-preview-filename){margin-bottom:1rem;border-bottom:1px solid oklch(92.8% .006 264.531);padding-bottom:.5rem;font-size:.875rem;line-height:calc(1.25 / .875);font-weight:500;color:#6a7282}:where(.dark .cpk-attachment-queue-text-preview-filename){border-color:#364153;color:#99a1af}:where(.cpk-attachment-queue-text-preview-content){margin:0;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:.875rem;line-height:calc(1.25 / .875);overflow-wrap:break-word;white-space:pre-wrap;color:#1e2939}:where(.dark .cpk-attachment-queue-text-preview-content){color:#e5e7eb}:where(.cpk-attachment-queue-text-preview-frame){width:100%;height:80vh;border-style:none}:where(.cpk-attachment-queue-document-card){display:flex;flex-direction:column;align-items:center;gap:1rem;border-radius:var(--radius);background-color:#fff;padding:2rem}:where(.dark .cpk-attachment-queue-document-card){background-color:#101828}:where(.cpk-attachment-queue-document-card-icon){display:flex;width:4rem;height:4rem;align-items:center;justify-content:center;border-radius:calc(var(--radius) + 4px);background-color:var(--primary);font-size:1.25rem;line-height:calc(1.75 / 1.25);font-weight:700;color:var(--primary-foreground)}:where(.cpk-attachment-queue-document-card-details){text-align:center}:where(.cpk-attachment-queue-document-card-name){font-size:1rem;line-height:1.5;font-weight:500;color:#1e2939}:where(.dark .cpk-attachment-queue-document-card-name){color:#e5e7eb}:where(.cpk-attachment-queue-document-card-meta){margin-top:.25rem;font-size:.875rem;line-height:calc(1.25 / .875);color:#6a7282}:where(.dark .cpk-attachment-queue-document-card-meta){color:#99a1af}:where(.cpk-attachment-queue-document-card-note){font-size:.75rem;line-height:calc(1 / .75);color:#99a1af}:where(.dark .cpk-attachment-queue-document-card-note){color:#6a7282}:where(.cpk-attachment-queue-document){display:flex;align-items:center;gap:.5rem}:where(.cpk-attachment-queue-document-previewable){cursor:pointer}:where(.cpk-attachment-queue-document-icon){display:flex;width:2rem;height:2rem;flex-shrink:0;align-items:center;justify-content:center;border-radius:calc(var(--radius) - 2px);background-color:var(--primary);font-size:10px;font-weight:600;color:var(--primary-foreground)}:where(.cpk-attachment-queue-document-info){display:flex;min-width:0;flex-direction:column}:where(.cpk-attachment-queue-document-name){font-size:.75rem;line-height:1.25;font-weight:500;word-break:break-all}:where(.cpk-attachment-queue-document-size){font-size:11px;color:var(--muted-foreground)}:where(.cpk-attachment-renderer-image){width:auto;max-width:80px;height:auto;max-height:80px;border-radius:calc(var(--radius) + 4px);background-color:var(--muted);object-fit:cover;cursor:pointer}:where(.cpk-attachment-renderer-image-button){display:block;margin:0;border:0;border-radius:calc(var(--radius) + 4px);background:none;padding:0;cursor:pointer}:where(.cpk-attachment-renderer-image-error){display:flex;flex-direction:column;align-items:center;justify-content:center;border-radius:var(--radius);background-color:var(--muted);padding:1rem;font-size:.875rem;line-height:calc(1.25 / .875);color:var(--muted-foreground)}:where(.cpk-attachment-renderer-lightbox-image){max-width:90vw;max-height:90vh;object-fit:contain;border-radius:var(--radius)}:where(.cpk-attachment-renderer-audio){display:flex;flex-direction:column;gap:.25rem}:where(.cpk-attachment-renderer-audio-player){width:100%;max-width:300px;height:2.5rem}:where(.cpk-attachment-renderer-audio-filename){max-width:300px;overflow:hidden;font-size:.75rem;line-height:calc(1 / .75);text-overflow:ellipsis;white-space:nowrap;color:var(--muted-foreground)}:where(.cpk-attachment-renderer-video){width:100%;max-width:400px;border-radius:var(--radius)}:where(.cpk-attachment-renderer-document){color:inherit;text-decoration:inherit;display:inline-flex;max-width:100%;align-items:center;gap:.5rem;border:1px solid var(--border);border-radius:var(--radius);background-color:var(--muted);padding:.5rem .75rem}:where(.cpk-attachment-renderer-document-icon){font-size:.75rem;line-height:calc(1 / .75);font-weight:700;text-transform:uppercase}:where(.cpk-attachment-renderer-document-name){overflow:hidden;font-size:.875rem;line-height:calc(1.25 / .875);text-overflow:ellipsis;white-space:nowrap;color:var(--muted-foreground)}:where(.cpk-audio-recorder){width:100%;padding-block:.75rem;padding-inline:1.25rem}:where(.cpk-audio-recorder-canvas){display:block;width:100%;height:26px}:where(.cpk-chat-input){pointer-events:none;position:relative;z-index:20}:where(.cpk-chat-input-absolute){position:absolute;right:0;bottom:0;left:0}:where(.cpk-chat-input-wrapper){pointer-events:auto;margin-inline:auto;max-width:48rem;padding-inline:1rem;padding-block:0}@container (width >= 48rem){:where(.cpk-chat-input-wrapper){padding-inline:0}}:where(div[data-popup-chat] .cpk-chat-input-wrapper){padding-inline:1rem}:where(div[data-sidebar-chat] .cpk-chat-input-wrapper){padding-inline:2rem}:where(.cpk-chat-input-pill){display:flex;width:100%;flex-direction:column;align-items:center;justify-content:center;overflow:visible;border-radius:28px;background-color:#fff;background-clip:padding-box;box-shadow:0 4px 4px #0000000a,0 0 1px #0000009e;contain:inline-size;cursor:text}:where(.dark .cpk-chat-input-pill){background-color:#303030}:where(.cpk-chat-input-grid){display:grid;width:100%;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;column-gap:.75rem;row-gap:.75rem;padding-inline:.75rem;padding-block:.5rem}:where(.cpk-chat-input-grid[data-layout=expanded]){grid-template-rows:auto auto;align-items:normal}:where(.cpk-chat-input-start){display:flex;align-items:center;grid-column-start:1;grid-row-start:1}:where(.cpk-chat-input-field){position:relative;display:flex;min-width:0;min-height:50px;flex-direction:column;justify-content:center;grid-column-start:2;grid-row-start:1}:where(.cpk-chat-input-actions){display:flex;align-items:center;justify-content:flex-end;gap:.5rem;grid-column-start:3;grid-row-start:1}:where(.cpk-chat-input-grid[data-layout=expanded]>.cpk-chat-input-start){grid-row-start:2}:where(.cpk-chat-input-grid[data-layout=expanded]>.cpk-chat-input-field){grid-column:span 3 / span 3}:where(.cpk-chat-input-grid[data-layout=expanded]>.cpk-chat-input-actions){grid-row-start:2}:where(.cpk-chat-input-processing){display:flex;width:100%;align-items:center;justify-content:center;padding-inline:1.25rem;padding-block:.75rem}:where(.cpk-chat-input-processing-spinner){width:26px;height:26px;color:var(--muted-foreground);animation:cpk-spin 1s linear infinite}:where(.cpk-chat-input-textarea){background-color:transparent;font-size:16px;line-height:1.5;outline-style:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}:where(.cpk-chat-input-textarea)::placeholder{color:#0007}:where(.dark .cpk-chat-input-textarea)::placeholder{color:#fffc}:where(.cpk-chat-input-textarea-compact){width:100%;padding-block:.75rem;padding-right:1.25rem}:where(.cpk-chat-input-textarea-expanded){width:100%;padding-block:.75rem;padding-inline:1.25rem}:where(.cpk-chat-input-slash-menu){position:absolute;right:0;bottom:100%;left:0;z-index:30;margin-bottom:.5rem;max-height:16rem;overflow-y:auto;border-width:1px;border-style:solid;border-color:var(--border);border-radius:var(--radius);background-color:#fff;box-shadow:0 10px 15px -3px #0000001a,0 4px 6px -4px #0000001a}:where(.dark .cpk-chat-input-slash-menu){border-color:#3a3a3a;background-color:#1f1f1f}:where(.cpk-chat-input-slash-menu-empty){padding-inline:.75rem;padding-block:.5rem;font-size:.875rem;line-height:calc(1.25 / .875);color:var(--muted-foreground)}:where(.cpk-chat-input-slash-menu-item){width:100%;background-color:transparent;padding-inline:.75rem;padding-block:.5rem;text-align:left;font-size:.875rem;line-height:calc(1.25 / .875);transition-property:color,background-color,border-color;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}:where(.cpk-chat-input-slash-menu-item[data-active=true]){background-color:var(--muted)}@media(hover:hover){:where(.cpk-chat-input-slash-menu-item:hover){background-color:var(--muted)}}:where(.dark .cpk-chat-input-slash-menu-item[data-active=true]){background-color:#2f2f2f}@media(hover:hover){:where(.dark .cpk-chat-input-slash-menu-item:hover){background-color:#2f2f2f}}:where(.cpk-chat-input-send){margin-right:10px}:where(.cpk-chat-input-send-icon){width:18px;height:18px}:where(.cpk-chat-input-stop-icon){width:18px;height:18px;fill:currentColor}:where(.cpk-chat-input-start-transcribe-button,.cpk-chat-input-cancel-transcribe-button){margin-right:.5rem}:where(.cpk-chat-input-finish-transcribe-button){margin-right:10px}:where(.cpk-chat-input-toolbar-icon){width:18px;height:18px}:where(.cpk-chat-input-add-menu-button){margin-left:.25rem}:where(.cpk-chat-input-add-menu-icon){width:20px;height:20px}:where(.cpk-chat-input-add-menu-tooltip){display:flex;align-items:center;gap:.25rem;font-size:.75rem;line-height:calc(1 / .75);font-weight:500}:where(.cpk-chat-input-add-menu-shortcut){border-radius:.25rem;background-color:#4a4a4a;padding-inline:.25rem;padding-block:1px;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:11px;color:#fff}:where(.dark .cpk-chat-input-add-menu-shortcut){background-color:#e0e0e0;color:#000}:where(.cpk-chat-input-disclaimer){margin-inline:auto;max-width:48rem;padding-inline:1rem;padding-block:.75rem;text-align:center;font-size:.75rem;line-height:calc(1 / .75);color:var(--muted-foreground)}:where(.cpk-chat-toggle-button){position:fixed;right:1.5rem;bottom:1.5rem;z-index:1100;display:flex;width:3.5rem;height:3.5rem;align-items:center;justify-content:center;border:1px solid var(--primary);border-radius:calc(infinity * 1px);background-color:var(--primary);color:var(--primary-foreground);box-shadow:0 1px 3px #0000001a,0 1px 2px -1px #0000001a;cursor:pointer;transition-property:scale,box-shadow,opacity;transition-duration:.2s;transition-timing-function:cubic-bezier(0,0,.2,1)}@media(hover:hover){:where(.cpk-chat-toggle-button:hover){scale:1.04;box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -2px #0000001a}}:where(.cpk-chat-toggle-button:active){scale:.96}:where(.cpk-chat-toggle-button:focus-visible){outline-style:none;box-shadow:0 0 0 2px var(--background),0 0 0 4px color-mix(in oklab,var(--primary) 50%,transparent),0 1px 3px #0000001a,0 1px 2px -1px #0000001a}@media(hover:hover){:where(.cpk-chat-toggle-button:focus-visible:hover){box-shadow:0 0 0 2px var(--background),0 0 0 4px color-mix(in oklab,var(--primary) 50%,transparent),0 4px 6px -1px #0000001a,0 2px 4px -2px #0000001a}}:where(.cpk-chat-toggle-button:disabled){pointer-events:none;opacity:.6}:where(.cpk-chat-toggle-button-icon-wrapper){pointer-events:none;position:absolute;inset:0;display:flex;align-items:center;justify-content:center;will-change:transform}:where(.cpk-chat-toggle-button-icon){width:1.5rem;height:1.5rem}:where(.cpk-default-tool-call){margin-top:.5rem;padding-bottom:.5rem}:where(.cpk-default-tool-call-card){border-radius:calc(var(--radius) + 4px);border:1px solid color-mix(in oklab,oklch(92% .004 286.32) 60%,transparent);background-color:color-mix(in oklab,#fff 70%,transparent);padding:1rem;box-shadow:0 1px 3px #0000001a,0 1px 2px -1px #0000001a;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}:where(.dark .cpk-default-tool-call-card){border-color:color-mix(in oklab,oklch(27.4% .006 286.033) 60%,transparent);background-color:color-mix(in oklab,oklch(21% .006 285.885) 50%,transparent)}:where(.cpk-default-tool-call-header){margin:0;display:flex;width:100%;cursor:pointer;user-select:none;-webkit-user-select:none;align-items:center;justify-content:space-between;gap:.625rem;border-style:none;background-color:transparent;padding:0;text-align:left;color:inherit}:where(.cpk-default-tool-call-title){display:flex;min-width:0;align-items:center;gap:.5rem}:where(.cpk-default-tool-call-chevron){width:.875rem;height:.875rem;flex-shrink:0;color:#71717b;transition-property:rotate;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}:where(.dark .cpk-default-tool-call-chevron){color:#9f9fa9}:where(.cpk-default-tool-call-chevron-open){rotate:90deg}:where(.cpk-default-tool-call-dot){display:inline-block;width:.5rem;height:.5rem;flex-shrink:0;border-radius:calc(infinity * 1px)}:where(.cpk-default-tool-call-dot-running){background-color:oklch(76.9% .188 70.08)}:where(.cpk-default-tool-call-dot-done){background-color:oklch(69.6% .17 162.48)}:where(.cpk-default-tool-call-dot-other){background-color:#9f9fa9}:where(.cpk-default-tool-call-name){overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px;font-weight:600;color:#18181b}:where(.dark .cpk-default-tool-call-name){color:#f4f4f5}:where(.cpk-default-tool-call-badge){display:inline-flex;flex-shrink:0;align-items:center;border-radius:calc(infinity * 1px);padding:.125rem .5rem;font-size:11px;font-weight:500}:where(.cpk-default-tool-call-badge-running){background-color:#fef3c6;color:oklch(47.3% .137 46.201)}:where(.dark .cpk-default-tool-call-badge-running){background-color:color-mix(in oklab,oklch(76.9% .188 70.08) 15%,transparent);color:oklch(82.8% .189 84.429)}:where(.cpk-default-tool-call-badge-done){background-color:#d0fae5;color:oklch(43.2% .095 166.913)}:where(.dark .cpk-default-tool-call-badge-done){background-color:color-mix(in oklab,oklch(69.6% .17 162.48) 15%,transparent);color:oklch(76.5% .177 163.223)}:where(.cpk-default-tool-call-badge-other){background-color:#f4f4f5;color:#27272a}:where(.dark .cpk-default-tool-call-badge-other){background-color:color-mix(in oklab,oklch(37% .013 285.805) 40%,transparent);color:#d4d4d8}:where(.cpk-default-tool-call-details){margin-top:.75rem;display:grid;gap:.75rem}:where(.cpk-default-tool-call-label){font-size:10px;text-transform:uppercase;color:#71717b}:where(.dark .cpk-default-tool-call-label){color:#9f9fa9}:where(.cpk-default-tool-call-code){margin-top:.375rem;max-height:200px;overflow:auto;border-radius:calc(var(--radius) - 2px);background-color:#f4f4f5;padding:.625rem;font-size:11px;line-height:1.625;color:#27272a;white-space:pre-wrap;overflow-wrap:break-word}:where(.dark .cpk-default-tool-call-code){background-color:color-mix(in oklab,oklch(27.4% .006 286.033) 60%,transparent);color:#e4e4e7}:where(.cpk-generative-ui-chat-card){width:100%;margin-block:.5rem;border:1px solid oklch(92.8% .006 264.531);border-radius:calc(var(--radius) + 4px);padding:.75rem}:where(.cpk-generative-ui-chat-card-error){margin-top:.5rem;font-size:.75rem;line-height:calc(1 / .75);color:oklch(57.7% .245 27.325)}:where(.cpk-inspector-button){width:2rem;height:2rem;padding:.375rem}:where(.cpk-inspector-button-icon){width:1rem;height:1rem}:where(.cpk-inspector-button-menu){width:16rem;padding:.25rem;font-size:.875rem;line-height:calc(1.25 / .875)}:where(.cpk-inspector-button-menu-header){display:flex;align-items:center;justify-content:space-between;gap:.75rem;padding-inline:.5rem;padding-block:.5rem}:where(.cpk-inspector-button-menu-title){font-size:.75rem;line-height:calc(1 / .75);font-weight:500}:where(.cpk-inspector-button-local-badge){border-radius:.25rem;background-color:var(--muted);padding-inline:.375rem;padding-block:.125rem;font-size:10px;font-weight:400;color:var(--muted-foreground);cursor:help}:where(.cpk-inspector-button-local-tooltip){max-width:12rem;text-wrap:wrap}:where(.cpk-inspector-button-menu-item){align-items:flex-start;cursor:pointer}:where(.cpk-inspector-button-inspect-item){width:100%;text-align:left}:where(.cpk-inspector-button-menu-item-icon){margin-top:.125rem}:where(.cpk-inspector-button-kite-icon){width:1rem;height:1rem}:where(.cpk-inspector-button-menu-item-label){display:block}:where(.cpk-inspector-button-menu-item-description){display:block;font-size:.75rem;line-height:calc(1 / .75);color:var(--muted-foreground)}.cpk-intelligence-indicator{position:relative;display:inline-flex;align-items:center;gap:.55rem;padding:.4rem .85rem;align-self:flex-start;margin:.4rem 0;white-space:nowrap}.cpk-intelligence-indicator__chrome{position:absolute;inset:0;border-radius:999px;border:1px solid rgb(149 153 224 / .32);background:linear-gradient(135deg,#ffffff8c,#eee6fe8c);-webkit-backdrop-filter:blur(14px) saturate(160%);backdrop-filter:blur(14px) saturate(160%);box-shadow:0 1px 2px #5e64ad0f,0 8px 24px #9599e014,inset 0 1px #fff9;opacity:1;pointer-events:none;transition:opacity .4s ease-out .25s}.cpk-intelligence-indicator[data-status=finished] .cpk-intelligence-indicator__chrome{opacity:0}.cpk-intelligence-indicator__content{position:relative;display:inline-flex;align-items:center;gap:.55rem;color:#5b21b6eb;font-size:.78rem;font-weight:500;letter-spacing:.01em;transition:color .4s ease-out .25s}.cpk-intelligence-indicator[data-status=finished] .cpk-intelligence-indicator__content{color:#737373cc}.cpk-intelligence-indicator__label{display:inline-block;transform:skew(0);transition:transform .4s ease-out .25s}.cpk-intelligence-indicator[data-status=finished] .cpk-intelligence-indicator__label{transform:skew(-10deg)}.cpk-intelligence-indicator__icon{display:block;flex-shrink:0}.cpk-intelligence-indicator__icon-arc,.cpk-intelligence-indicator__icon-check{fill:none;stroke:currentColor;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round}.cpk-intelligence-indicator__icon-arc{stroke-dasharray:.53 .47;opacity:1;transform-box:fill-box;transform-origin:center;animation:cpk-intelligence-spin .9s linear infinite;transition:opacity .2s cubic-bezier(.4,0,.2,1)}.cpk-intelligence-indicator__icon-check{stroke-dasharray:1;stroke-dashoffset:1;opacity:0;transition:stroke-dashoffset .36s cubic-bezier(.22,.61,.36,1) 90ms,opacity .14s linear 90ms}.cpk-intelligence-indicator[data-status=finished] .cpk-intelligence-indicator__icon-arc{opacity:0}.cpk-intelligence-indicator[data-status=finished] .cpk-intelligence-indicator__icon-check{stroke-dashoffset:0;opacity:1}@keyframes cpk-intelligence-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.cpk-intelligence-indicator__icon-arc{animation:none}.cpk-intelligence-indicator__chrome,.cpk-intelligence-indicator__content,.cpk-intelligence-indicator__label,.cpk-intelligence-indicator__icon-arc,.cpk-intelligence-indicator__icon-check{transition:none}}:where(.cpk-markdown-chat-surface){position:relative;display:flex;width:100%;min-width:0;max-width:100%;flex-direction:column;margin-block:1rem}:where(.cpk-markdown-chat-surface-error){margin-top:.5rem;font-size:.75rem;line-height:calc(1 / .75);color:oklch(57.7% .245 27.325)}:where(.cpk-markdown){--cpk-markdown-body: oklch(37.3% .034 259.733);--cpk-markdown-headings: oklch(21% .034 264.665);--cpk-markdown-links: oklch(21% .034 264.665);--cpk-markdown-bold: oklch(21% .034 264.665);--cpk-markdown-counters: oklch(55.1% .027 264.364);--cpk-markdown-bullets: oklch(87.2% .01 258.338);--cpk-markdown-hr: oklch(92.8% .006 264.531);--cpk-markdown-quotes: oklch(21% .034 264.665);--cpk-markdown-quote-borders: oklch(92.8% .006 264.531);--cpk-markdown-code: oklch(21% .034 264.665);--cpk-markdown-pre-code: oklch(92.8% .006 264.531);--cpk-markdown-pre-bg: oklch(27.8% .033 256.848);--cpk-markdown-th-borders: oklch(87.2% .01 258.338);--cpk-markdown-td-borders: oklch(92.8% .006 264.531);--cpk-markdown-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \\\"Liberation Mono\\\", \\\"Courier New\\\", monospace;color:var(--cpk-markdown-body);font-size:1rem;line-height:1.75}:where(.dark .cpk-markdown){--cpk-markdown-body: oklch(87.2% .01 258.338);--cpk-markdown-headings: #fff;--cpk-markdown-links: #fff;--cpk-markdown-bold: #fff;--cpk-markdown-counters: oklch(70.7% .022 261.325);--cpk-markdown-bullets: oklch(44.6% .03 256.802);--cpk-markdown-hr: oklch(37.3% .034 259.733);--cpk-markdown-quotes: oklch(96.7% .003 264.542);--cpk-markdown-quote-borders: oklch(37.3% .034 259.733);--cpk-markdown-code: #fff;--cpk-markdown-pre-code: oklch(87.2% .01 258.338);--cpk-markdown-pre-bg: rgb(0 0 0 / .5);--cpk-markdown-th-borders: oklch(44.6% .03 256.802);--cpk-markdown-td-borders: oklch(37.3% .034 259.733)}:where(.cpk-markdown p){margin-block:1.25em}:where(.cpk-markdown a){color:var(--cpk-markdown-links);font-weight:500;text-decoration:underline}:where(.cpk-markdown strong){color:var(--cpk-markdown-bold);font-weight:600}:where(.cpk-markdown :is(a,blockquote,thead th) strong){color:inherit}:where(.cpk-markdown ol){margin-block:1.25em;padding-inline-start:1.625em;list-style-type:decimal}:where(.cpk-markdown ul){margin-block:1.25em;padding-inline-start:1.625em;list-style-type:disc}:where(.cpk-markdown ol>li)::marker{color:var(--cpk-markdown-counters);font-weight:400}:where(.cpk-markdown ul>li)::marker{color:var(--cpk-markdown-bullets)}:where(.cpk-markdown hr){border-color:var(--cpk-markdown-hr);border-top-width:1px;margin-block:3em}:where(.cpk-markdown blockquote){color:var(--cpk-markdown-quotes);border-inline-start-width:.25rem;border-inline-start-color:var(--cpk-markdown-quote-borders);quotes:\\\"\\\\201c\\\" \\\"\\\\201d\\\" \\\"\\\\2018\\\" \\\"\\\\2019\\\";margin-block:1.6em;padding-inline-start:1em;font-style:italic;font-weight:500}:where(.cpk-markdown blockquote p:first-of-type):before{content:open-quote}:where(.cpk-markdown blockquote p:last-of-type):after{content:close-quote}:where(.cpk-markdown h1){color:var(--cpk-markdown-headings);margin-top:0;margin-bottom:.888889em;font-size:2.25em;font-weight:800;line-height:1.11111}:where(.cpk-markdown h1 strong){color:inherit;font-weight:900}:where(.cpk-markdown h2){color:var(--cpk-markdown-headings);margin-top:2em;margin-bottom:1em;font-size:1.5em;font-weight:700;line-height:1.33333}:where(.cpk-markdown h2 strong){color:inherit;font-weight:800}:where(.cpk-markdown h3){color:var(--cpk-markdown-headings);margin-top:1.6em;margin-bottom:.6em;font-size:1.25em;font-weight:600;line-height:1.6}:where(.cpk-markdown h4){color:var(--cpk-markdown-headings);margin-top:1.5em;margin-bottom:.5em;font-size:1em;font-weight:600;line-height:1.5}:where(.cpk-markdown :is(h3,h4) strong){color:inherit;font-weight:700}:where(.cpk-markdown :is(h5,h6)){font-size:inherit;font-weight:inherit}:where(.cpk-markdown img){display:block;max-width:100%;height:auto;margin-block:2em}:where(.cpk-markdown code){color:var(--cpk-markdown-code);font-family:var(--cpk-markdown-mono);font-size:.875em;font-weight:600}:where(.cpk-markdown code):before,:where(.cpk-markdown code):after{content:\\\"`\\\"}:where(.cpk-markdown :is(a,h1,h4,blockquote,thead th) code){color:inherit}:where(.cpk-markdown h2 code){color:inherit;font-size:.875em}:where(.cpk-markdown h3 code){color:inherit;font-size:.9em}:where(.cpk-markdown pre){color:var(--cpk-markdown-pre-code);background-color:var(--cpk-markdown-pre-bg);padding:.857143em 1.14286em;border-radius:.375rem;margin-block:1.71429em;font-family:var(--cpk-markdown-mono);font-size:.875em;font-weight:400;line-height:1.71429;overflow-x:auto}:where(.cpk-markdown pre code){font-weight:inherit;color:inherit;font-size:inherit;font-family:inherit;line-height:inherit;background-color:transparent;border-width:0;border-radius:0;padding:0}:where(.cpk-markdown pre code):before,:where(.cpk-markdown pre code):after{content:none}:where(.cpk-markdown table){table-layout:auto;width:100%;margin-block:2em;border-collapse:collapse;font-size:.875em;line-height:1.71429}:where(.cpk-markdown thead){border-bottom-width:1px;border-bottom-color:var(--cpk-markdown-th-borders)}:where(.cpk-markdown thead th){color:var(--cpk-markdown-headings);vertical-align:bottom;padding-inline:.571429em;padding-bottom:.571429em;font-weight:600}:where(.cpk-markdown tbody tr){border-bottom-width:1px;border-bottom-color:var(--cpk-markdown-td-borders)}:where(.cpk-markdown tbody tr:last-child){border-bottom-width:0}:where(.cpk-markdown tbody td){vertical-align:baseline;padding:.571429em}:where(.cpk-markdown :is(th,td)){text-align:start}:where(.cpk-markdown li){margin-block:.5em}:where(.cpk-markdown :is(ol,ul)>li){padding-inline-start:.375em}:where(.cpk-markdown :is(ul,ol) :is(ul,ol)){margin-block:.75em}:where(.cpk-markdown :is(hr,h2,h3,h4)+*){margin-top:0}:where(.cpk-markdown thead th:first-child,.cpk-markdown tbody td:first-child){padding-inline-start:0}:where(.cpk-markdown thead th:last-child,.cpk-markdown tbody td:last-child){padding-inline-end:0}:where(.cpk-markdown>:first-child){margin-top:0}:where(.cpk-markdown>:last-child){margin-bottom:0}:where(.cpk-markdown input[type=checkbox]){appearance:none;background-color:#fff;background-origin:border-box;border-color:#9b9b9b;border-width:1px;color:#004f99;display:inline-block;flex-shrink:0;width:1rem;height:1rem;padding:0;-webkit-print-color-adjust:exact;print-color-adjust:exact;-webkit-user-select:none;user-select:none;vertical-align:middle;border-radius:2px}:where(.cpk-markdown input[type=checkbox]:checked){background-color:#004f99;border-color:#004f99;background-image:url(\\\"data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 16 16' fill='%23fff' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12.207 4.793a1 1 0 0 1 0 1.414l-5 5a1 1 0 0 1-1.414 0l-2-2a1 1 0 0 1 1.414-1.414L6.5 9.086l4.293-4.293a1 1 0 0 1 1.414 0z'/%3E%3C/svg%3E\\\");background-position:center;background-repeat:no-repeat;background-size:100% 100%}:where(.cpk-markdown-code-block){overflow-x:auto;border-radius:var(--radius);background-color:var(--muted);padding:.75rem;color:var(--foreground);font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}:where(.cpk-markdown-inline-code){border-radius:.25rem;background-color:color-mix(in oklab,#000 5%,transparent);padding:.125rem .25rem;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}:where(.cpk-markdown-image){max-width:100%}:where(.cpk-markdown-table-container){overflow-x:auto}:where([data-work-text] .cpk-markdown,[data-work-text] .cpk-markdown *){transition:color .6s ease}:where([data-work-text=narration] .cpk-markdown,[data-work-text=narration] .cpk-markdown *){color:var(--muted-foreground)}:where(.cpk-message-view){display:flex;flex-direction:column}:where(.cpk-message-view-work-summary){padding-top:.25rem;padding-bottom:.5rem}:where(.cpk-message-view-cursor-container){margin-top:.5rem}:where(.cpk-message-view-cursor){width:11px;height:11px;margin-left:.25rem;border-radius:calc(infinity * 1px);background-color:var(--foreground);animation:cpk-pulse-cursor .9s cubic-bezier(.4,0,.2,1) infinite}:where(.cpk-modal-header){display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--border);background-color:color-mix(in oklab,var(--background) 95%,transparent);padding:1rem;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}@supports (backdrop-filter: blur(0)) or (-webkit-backdrop-filter: blur(0)){:where(.cpk-modal-header){background-color:color-mix(in oklab,var(--background) 80%,transparent)}}:where(.cpk-modal-header-content){display:flex;width:100%;align-items:center;gap:.5rem}:where(.cpk-modal-header-start,.cpk-modal-header-center,.cpk-modal-header-end){display:flex;flex:1}:where(.cpk-modal-header-start){justify-content:flex-start}:where(.cpk-modal-header-center){justify-content:center;text-align:center}:where(.cpk-modal-header-end){justify-content:flex-end}:where(.cpk-modal-header-title){width:100%;font-size:1rem;line-height:1;font-weight:500;letter-spacing:-.025em;color:var(--foreground)}:where(.cpk-modal-header-close-button,.cpk-modal-header-drawer-launcher){display:inline-flex;width:2rem;height:2rem;align-items:center;justify-content:center;border-radius:calc(infinity * 1px);color:var(--muted-foreground);cursor:pointer;transition-property:color,background-color,box-shadow;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}@media(hover:hover){:where(.cpk-modal-header-close-button:hover,.cpk-modal-header-drawer-launcher:hover){background-color:var(--muted);color:var(--foreground)}}:where(.cpk-modal-header-close-button:focus-visible,.cpk-modal-header-drawer-launcher:focus-visible){outline-style:none;box-shadow:0 0 0 2px var(--ring)}:where(.cpk-modal-header-close-icon,.cpk-modal-header-drawer-launcher-icon){width:1rem;height:1rem}:where(.cpk-reasoning-message){margin-block:.25rem}:where(.cpk-reasoning-message-header){display:inline-flex;align-items:center;gap:.25rem;padding-block:.25rem;font-size:.875rem;line-height:calc(1.25 / .875);color:var(--muted-foreground);cursor:default;-webkit-user-select:none;user-select:none;transition-property:color;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}:where(.cpk-reasoning-message-header-expandable){cursor:pointer}@media(hover:hover){:where(.cpk-reasoning-message-header-expandable:hover){color:var(--foreground)}}:where(.cpk-reasoning-message-label){font-weight:500}:where(.cpk-reasoning-message-indicator){display:inline-flex;align-items:center;margin-left:.25rem}:where(.cpk-reasoning-message-indicator-dot){width:.375rem;height:.375rem;border-radius:calc(infinity * 1px);background-color:var(--muted-foreground);animation:cpk-pulse 2s cubic-bezier(.4,0,.6,1) infinite}:where(.cpk-reasoning-message-chevron){width:.875rem;height:.875rem;flex-shrink:0;transition-property:rotate;transition-duration:.2s;transition-timing-function:cubic-bezier(.4,0,.2,1)}:where(.cpk-reasoning-message-chevron-open){rotate:90deg}:where(.cpk-reasoning-message-toggle){display:grid;transition-property:grid-template-rows;transition-duration:.2s;transition-timing-function:cubic-bezier(.4,0,.2,1)}:where(.cpk-reasoning-message-toggle-content){overflow:hidden}:where(.cpk-reasoning-message-content){padding-top:.25rem;padding-bottom:.5rem}:where(.cpk-reasoning-message-text){font-size:.875rem;line-height:calc(1.25 / .875);color:var(--muted-foreground)}:where(.cpk-reasoning-message-text :is(h1,h2,h3,h4,h5,h6)){font-size:inherit;font-weight:inherit}:where(.cpk-reasoning-message-text a){color:inherit;text-decoration:inherit}:where(.cpk-reasoning-message-text :is(ol,ul)){list-style:none}:where(.cpk-reasoning-message-text code){font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}:where(.cpk-reasoning-message-text img){display:block;max-width:100%;height:auto}:where(.cpk-reasoning-message-text table){border-collapse:collapse}:where(.cpk-reasoning-message-text hr){height:0;color:inherit;border-top-width:1px}:where(.cpk-reasoning-message-cursor){display:inline-flex;align-items:center;margin-left:.25rem;vertical-align:middle}:where(.cpk-reasoning-message-cursor-dot){width:.5rem;height:.5rem;border-radius:calc(infinity * 1px);background-color:var(--muted-foreground);animation:cpk-pulse-cursor .9s cubic-bezier(.4,0,.2,1) infinite}:where(.cpk-suggestion-pill){display:inline-flex;height:1.75rem;align-items:center;gap:.25rem;border:1px solid color-mix(in oklab,var(--border) 60%,transparent);border-radius:calc(infinity * 1px);background-color:var(--background);padding-inline:.625rem;font-size:11px;line-height:1;color:var(--foreground);cursor:pointer;pointer-events:auto;transition-property:color,background-color,border-color;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}@media(hover:hover){:where(.cpk-suggestion-pill:hover){background-color:color-mix(in oklab,var(--accent) 60%,transparent)}}:where(.cpk-suggestion-pill:focus-visible){outline:none;box-shadow:0 0 0 2px var(--background),0 0 0 4px var(--ring)}:where(.cpk-suggestion-pill:disabled){cursor:not-allowed;background-color:var(--background);color:var(--muted-foreground)}:where(.cpk-suggestion-pill-icon){display:flex;width:.875rem;height:.875rem;align-items:center;justify-content:center;color:var(--muted-foreground)}:where(.cpk-suggestion-pill-spinner){width:100%;height:100%;animation:cpk-spin 1s linear infinite}:where(.cpk-suggestion-pill-label){white-space:nowrap;font-weight:500;line-height:1}@media(width>=40rem){:where(.cpk-suggestion-pill){height:2rem;gap:.375rem;padding-inline:.75rem;font-size:.75rem}:where(.cpk-suggestion-pill-icon){width:1rem;height:1rem}}:where(.cpk-suggestion-view){display:flex;flex-wrap:wrap;align-items:center;gap:.375rem;padding-left:0;padding-right:1rem;pointer-events:none}@media(width>=40rem){:where(.cpk-suggestion-view){gap:.5rem}}@container (width >= 48rem){:where(.cpk-suggestion-view){padding-inline:0}}:where(.cpk-collapsible){display:grid;transition-property:grid-template-rows;transition-duration:.3s;transition-timing-function:cubic-bezier(.16,1,.3,1)}@media(prefers-reduced-motion:reduce){:where(.cpk-collapsible){transition-property:none}}:where(.cpk-collapsible-content){min-height:0;overflow:hidden}:where(.cpk-tool-call-status-icon){width:.875rem;height:.875rem;flex-shrink:0;color:var(--muted-foreground)}:where(.cpk-tool-call-status-icon-running){animation:cpk-spin 1s linear infinite}:where(.cpk-tool-call-status-icon-failed){color:var(--destructive)}:where(.cpk-tool-call-chevron){width:.875rem;height:.875rem;flex-shrink:0;transition-property:rotate;transition-duration:.2s;transition-timing-function:cubic-bezier(.4,0,.2,1)}:where(.cpk-tool-call-chevron-open){rotate:90deg}:where(.cpk-tool-call-failed-count){flex-shrink:0;color:var(--destructive)}:where(.cpk-tool-call-payloads){display:grid;gap:.75rem}:where(.cpk-tool-call-payload-label){font-size:11px;font-weight:500;text-transform:uppercase;letter-spacing:.025em;color:var(--muted-foreground)}:where(.cpk-tool-call-payload-code){margin:0;margin-top:.375rem;max-height:200px;overflow:auto;border-radius:var(--radius);background-color:var(--muted);padding:.625rem;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:.75rem;line-height:1.625;color:var(--foreground);white-space:pre-wrap;overflow-wrap:break-word}:where(.cpk-tool-call-row-card){border-top:1px solid var(--border)}:where(.cpk-tool-call-row-button){margin:0;display:flex;min-width:0;cursor:pointer;align-items:center;gap:.5rem;border-style:none;background-color:transparent;text-align:left;font-size:13px;color:inherit;transition-property:background-color,outline-color;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}:where(.cpk-tool-call-row-card>.cpk-tool-call-row-button){width:100%;padding:.5rem .875rem}:where(.cpk-tool-call-row-stack>.cpk-tool-call-row-button){width:100%;padding:.625rem .875rem}:where(.cpk-tool-call-row-line>.cpk-tool-call-row-button){margin-inline:-.375rem;width:calc(100% + .75rem);border-radius:calc(var(--radius) - 2px);padding:.25rem .375rem}@media(hover:hover){:where(.cpk-tool-call-row-button:hover){background-color:color-mix(in oklab,var(--accent) 60%,transparent)}}:where(.cpk-tool-call-row-button:focus-visible){outline:2px solid var(--ring);outline-offset:-2px}:where(.cpk-tool-call-row-name){flex-shrink:0;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:13px;font-weight:500}:where(.cpk-tool-call-row-name:not(.cpk-shimmer)){color:var(--foreground)}:where(.cpk-tool-call-row-preview){min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:13px;color:var(--muted-foreground)}:where(.cpk-tool-call-row-chevron){margin-left:auto;color:var(--muted-foreground)}:where(.cpk-tool-call-row-chevron:not(.cpk-tool-call-chevron-open)){opacity:0}@media(hover:hover){:where(.cpk-tool-call-row-button:hover .cpk-tool-call-row-chevron){opacity:1}}:where(.cpk-tool-call-row-button:focus-visible .cpk-tool-call-row-chevron){opacity:1}:where(.cpk-tool-call-row-payloads){padding:.25rem .875rem .75rem}:where(.cpk-tool-call-row-line .cpk-tool-call-row-payloads){padding:0;margin:.25rem 0 .5rem 1.375rem}:where(.cpk-tool-call-row-status,.cpk-tool-call-group-stack-status,.cpk-tool-call-group-stack-live){position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border-width:0}:where(.cpk-tool-call-group){margin-block:.75rem}:where(.cpk-tool-call-group-single){margin-block:.5rem}:where(.cpk-tool-call-group-running){flex-shrink:0;font-weight:500}:where(.cpk-tool-call-group-preview){min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:.75rem;line-height:calc(1 / .75);opacity:.7}:where(.cpk-tool-call-group-line-toggle){margin:0;display:inline-flex;max-width:100%;min-width:0;cursor:pointer;align-items:center;gap:.375rem;border-radius:calc(var(--radius) - 2px);border-style:none;background-color:transparent;padding:.125rem 0;font-size:.875rem;line-height:calc(1.25 / .875);color:var(--muted-foreground);transition-property:color,outline-color;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}@media(hover:hover){:where(.cpk-tool-call-group-line-toggle:hover){color:var(--foreground)}}:where(.cpk-tool-call-group-line-toggle:focus-visible){outline:2px solid var(--ring)}:where(.cpk-tool-call-group-line-summary){flex-shrink:0;font-weight:500}:where(.cpk-tool-call-group-line-names){min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:.75rem;line-height:calc(1 / .75);opacity:.7}:where(.cpk-tool-call-group-line-body){margin-top:.25rem;margin-left:.25rem;border-left:2px solid var(--border);padding-block:.125rem;padding-left:.75rem}:where(.cpk-tool-call-group-stack-pile){position:relative;isolation:isolate}:where(.cpk-tool-call-group-stack-layer){border-radius:calc(var(--radius) + 4px);border:1px solid var(--border);background-color:var(--card);color:var(--card-foreground)}:where(.cpk-tool-call-group-stack-behind){position:absolute;inset:0}:where(.cpk-tool-call-group-stack-toggle){position:relative;margin:0;display:flex;width:100%;min-width:0;cursor:pointer;align-items:center;text-align:left;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}:where(.cpk-tool-call-group-stack-toggle:focus-visible){outline:2px solid var(--ring)}:where(.cpk-tool-call-group-stack-toggle-closed){gap:.5rem;padding:.625rem .875rem;font-size:13px;box-shadow:0 1px 2px #0000000a;transition-property:background-color,outline-color}@media(hover:hover){:where(.cpk-tool-call-group-stack-toggle-closed:hover){background-color:var(--accent)}}:where(.cpk-tool-call-group-stack-toggle-open){margin-bottom:.375rem;gap:.375rem;border-radius:calc(var(--radius) - 2px);border-style:none;background-color:transparent;padding:.125rem 0;font-size:.75rem;line-height:calc(1 / .75);color:var(--muted-foreground);transition-property:color,outline-color}@media(hover:hover){:where(.cpk-tool-call-group-stack-toggle-open:hover){color:var(--foreground)}}:where(.cpk-tool-call-group-stack-latest){display:flex;min-width:0;flex:1;align-items:center;gap:.5rem;animation:cpk-stack-drop .26s cubic-bezier(.16,1,.3,1)}:where(.cpk-tool-call-group-stack-name){flex-shrink:0;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-weight:500}:where(.cpk-tool-call-group-stack-name:not(.cpk-shimmer)){color:var(--foreground)}:where(.cpk-tool-call-group-stack-preview){min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;color:var(--muted-foreground)}:where(.cpk-tool-call-group-stack-meta){margin-left:.5rem;display:inline-flex;flex-shrink:0;align-items:center;gap:.5rem;font-size:.75rem;line-height:calc(1 / .75);color:var(--muted-foreground)}:where(.cpk-tool-call-group-stack-count){font-variant-numeric:tabular-nums}:where(.cpk-tool-call-group-stack-expand-icon){rotate:90deg}:where(.cpk-tool-call-group-stack-collapse){margin-left:auto;display:inline-flex;align-items:center;gap:.25rem}:where(.cpk-tool-call-group-stack-collapse-icon){rotate:-90deg}:where(.cpk-tool-call-group-stack-items){display:grid;gap:.375rem}:where(.cpk-tool-call-group-stack-item){overflow:hidden;box-shadow:0 1px 2px #0000000a;animation:cpk-stack-fan .24s cubic-bezier(.16,1,.3,1) both}@media(prefers-reduced-motion:reduce){:where(.cpk-tool-call-group-stack-latest,.cpk-tool-call-group-stack-item){animation:none}}:where(.cpk-tool-call-group-card){overflow:hidden;border-radius:calc(var(--radius) + 4px);border:1px solid var(--border);background-color:var(--card);color:var(--card-foreground)}:where(.cpk-tool-call-group-card-toggle){margin:0;display:flex;width:100%;min-width:0;cursor:pointer;align-items:center;gap:.625rem;border-style:none;background-color:transparent;padding:.625rem .875rem;text-align:left;font-size:13px;color:inherit;transition-property:background-color,outline-color;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}@media(hover:hover){:where(.cpk-tool-call-group-card-toggle:hover){background-color:color-mix(in oklab,var(--accent) 60%,transparent)}}:where(.cpk-tool-call-group-card-toggle:focus-visible){outline:2px solid var(--ring);outline-offset:-2px}:where(.cpk-tool-call-group-card-summary){flex-shrink:0;font-weight:500;color:var(--foreground)}:where(.cpk-tool-call-group-card-names){min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:.75rem;line-height:calc(1 / .75);color:var(--muted-foreground)}:where(.cpk-tool-call-group-card-meta){margin-left:auto;display:flex;flex-shrink:0;align-items:center;gap:.5rem;padding-left:.5rem;font-size:.75rem;line-height:calc(1 / .75);color:var(--muted-foreground)}:where(.cpk-tool-call-group-card-status){font-variant-numeric:tabular-nums}:where(.cpk-tool-calls-view-turn){margin-inline:-.5rem}:where(.cpk-tool-calls-view-turn-rows){padding:.375rem .5rem}:where(.cpk-user-message){display:flex;flex-direction:column;align-items:flex-end;padding-top:2.5rem}:where(.cpk-user-message-container){display:flex;flex-direction:column;align-items:flex-end}:where(.cpk-user-message-attachments){display:flex;max-width:100%;flex-direction:row;flex-wrap:wrap;justify-content:flex-end;gap:.5rem;margin-bottom:.5rem}:where(.cpk-user-message-bubble){position:relative;display:inline-block;max-width:80%;border-radius:18px;background-color:var(--muted);padding:.375rem 1rem;white-space:pre-wrap;color:#364153;font-size:1rem;line-height:1.75}:where(.cpk-user-message-bubble[data-multiline]){padding-block:.75rem}:where(.dark .cpk-user-message-bubble){color:#d1d5dc}:where(.cpk-user-message-toolbar){display:flex;width:100%;align-items:center;justify-content:flex-end;margin-top:4px;margin-right:-5px;background-color:transparent;visibility:hidden}@media(hover:hover){:where(.cpk-user-message:hover .cpk-user-message-toolbar,.cpk-user-message-container:hover .cpk-user-message-toolbar){visibility:visible}}:where(.cpk-user-message-toolbar-items){display:flex;align-items:center;justify-content:flex-end;gap:.25rem}:where(.cpk-user-message-toolbar-icon){width:18px;height:18px}:where(.cpk-user-message-branch-navigation){display:flex;align-items:center;gap:.25rem}:where(.cpk-user-message-branch-button){width:1.5rem;height:1.5rem;padding:0}:where(.cpk-user-message-branch-icon){width:20px;height:20px}:where(.cpk-user-message-branch-counter){padding-inline:0;font-size:.875rem;line-height:calc(1.25 / .875);font-weight:500;color:var(--muted-foreground)}:where(.cpk-work-summary){margin:0;display:inline-flex;max-width:100%;cursor:pointer;align-items:center;gap:.375rem;border-radius:calc(var(--radius) - 2px);border-style:none;background-color:transparent;padding:.125rem 0;font-size:.875rem;line-height:calc(1.25 / .875);color:var(--muted-foreground);transition-property:color,outline-color;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}@media(hover:hover){:where(.cpk-work-summary:hover){color:var(--foreground)}}:where(.cpk-work-summary:focus-visible){outline:2px solid var(--ring)}:where(.cpk-work-summary-label){font-weight:500}:where(.cpk-work-summary-detail){font-size:.75rem;line-height:calc(1 / .75);opacity:.7}:where(.cpk-work-summary-timer){font-variant-numeric:tabular-nums}:where(.cpk-work-summary-failed){color:var(--destructive)}:where(.cpk-work-summary-chevron){width:.875rem;height:.875rem;flex-shrink:0;transition-property:rotate;transition-duration:.2s;transition-timing-function:cubic-bezier(.4,0,.2,1)}:where(.cpk-work-summary-chevron-open){rotate:90deg}:where(.cpk-chat-view){container-type:inline-size;position:relative;display:flex;height:100%;flex-direction:column}:where(.cpk-chat-view-drop-overlay){pointer-events:none;position:absolute;inset:0;z-index:50;margin:.5rem;display:flex;align-items:center;justify-content:center;border:2px dashed color-mix(in oklab,var(--primary) 40%,transparent);border-radius:var(--radius);background-color:color-mix(in oklab,var(--primary) 5%,transparent);-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px)}:where(.cpk-chat-view-drop-overlay-content){display:flex;flex-direction:column;align-items:center;gap:.5rem;color:color-mix(in oklab,var(--primary) 70%,transparent)}:where(.cpk-chat-view-drop-overlay-icon){width:2rem;height:2rem}:where(.cpk-chat-view-drop-overlay-label){font-size:.875rem;line-height:calc(1.25 / .875);font-weight:500}:where(.cpk-chat-view-scroll-view){display:flex;max-height:100%;min-height:0;flex:1;flex-direction:column}:where(.cpk-chat-view-scroll-area){position:relative;display:flex;height:100%;max-height:100%;min-height:0;flex-direction:column}:where(.cpk-chat-view-scroll-viewport){overflow-x:hidden;overflow-y:auto}:where(.cpk-chat-view-scroll-area>.cpk-chat-view-scroll-viewport){min-height:0;flex:1}:where(.cpk-chat-view-scroll-content){padding-inline:1rem}@container (width >= 48rem){:where(.cpk-chat-view-scroll-content){padding-inline:0}}:where(.cpk-chat-view-feed){max-width:48rem;margin-inline:auto}:where(.cpk-chat-view-suggestions){margin-top:1rem;padding-right:1rem;padding-left:0}@container (width >= 48rem){:where(.cpk-chat-view-suggestions){padding-inline:0}}:where(.cpk-chat-view-suggestion-view){margin-right:0;margin-bottom:.75rem;margin-left:0}@media(width>=64rem){:where(.cpk-chat-view-suggestion-view){margin-right:1rem;margin-left:1rem}}:where(.cpk-chat-view-scroll-to-bottom){pointer-events:none;position:absolute;inset-inline:0;z-index:30;display:flex;justify-content:center}:where(.cpk-chat-view-scroll-to-bottom-button){pointer-events:auto;display:flex;width:2.5rem;height:2.5rem;align-items:center;justify-content:center;padding:0;border:1px solid oklch(92.8% .006 264.531);border-radius:calc(infinity * 1px);background-color:#fff;box-shadow:0 10px 15px -3px #0000001a,0 4px 6px -4px #0000001a;cursor:pointer}:where(.dark .cpk-chat-view-scroll-to-bottom-button){border-color:#364153;background-color:#101828}@media(hover:hover){:where(.cpk-chat-view-scroll-to-bottom-button:hover){background-color:#f9fafb}:where(.dark .cpk-chat-view-scroll-to-bottom-button:hover){background-color:#1e2939}}:where(.cpk-chat-view-scroll-to-bottom-button:focus-visible){border-color:var(--ring);box-shadow:0 0 0 3px color-mix(in oklab,var(--ring) 50%,transparent),0 10px 15px -3px #0000001a,0 4px 6px -4px #0000001a}:where(.cpk-chat-view-scroll-to-bottom-button:disabled){pointer-events:none}:where(.cpk-chat-view-scroll-to-bottom-icon){width:1rem;height:1rem;color:#4a5565}:where(.dark .cpk-chat-view-scroll-to-bottom-icon){color:#fff}:where(.cpk-chat-view-connecting-indicator){display:flex;justify-content:center;padding-block:2rem}:where(.cpk-chat-view-connecting-spinner){width:1.5rem;height:1.5rem;color:var(--muted-foreground);animation:cpk-spin 1s linear infinite}:where(.cpk-chat-view-connecting-label){position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}:where(.cpk-chat-view-input-overlay){pointer-events:none;position:absolute;right:0;bottom:0;left:0;z-index:20}:where(.cpk-chat-view-attachments){pointer-events:auto;width:100%;max-width:48rem;margin-inline:auto}:where(.cpk-chat-view-attachment-queue){padding-inline:1rem}:where(.cpk-chat-view-welcome-input-group){width:100%}:where(.cpk-chat-view-welcome-attachment-queue){margin-bottom:.5rem}:where(.cpk-chat-view-welcome-screen){display:flex;flex:1;flex-direction:column;align-items:center;justify-content:center;padding-inline:1rem}:where(.cpk-chat-view-welcome-screen-content){display:flex;width:100%;max-width:48rem;flex-direction:column;align-items:center}:where(.cpk-chat-view-welcome-screen-message){margin-bottom:1.5rem}:where(.cpk-chat-view-welcome-screen-input){width:100%}:where(.cpk-chat-view-welcome-screen-suggestions){margin-top:1rem;display:flex;justify-content:center}:where(.cpk-chat-view-welcome-message){font-size:1.25rem;line-height:calc(1.75 / 1.25);font-weight:500;color:var(--foreground);text-align:center}@media(width>=40rem){:where(.cpk-chat-view-welcome-message){font-size:1.5rem;line-height:calc(2 / 1.5)}}:where(.cpk-popup-view){position:fixed;inset:0;z-index:1200;display:flex;max-width:100%;flex-direction:column;align-items:stretch;background-color:transparent}@media(width>=48rem){:where(.cpk-popup-view){inset:auto;right:1.5rem;bottom:6rem;align-items:flex-end;gap:1rem}}:where(.cpk-popup-view-window){pointer-events:none;position:relative;display:flex;width:100%;height:100%;flex-direction:column;overflow:hidden;border:1px solid transparent;border-radius:0;background-color:var(--background);color:var(--foreground);box-shadow:none;opacity:0;transform:translateZ(0);transform-origin:bottom;translate:0 1rem;transition-property:translate,scale;transition-duration:.2s;transition-timing-function:cubic-bezier(0,0,.2,1)}:where(.cpk-popup-view-window:focus){outline-style:none}@media(width>=48rem){:where(.cpk-popup-view-window){width:var(--copilot-popup-width);height:var(--copilot-popup-height);max-width:var(--copilot-popup-max-width);max-height:var(--copilot-popup-max-height);border-color:var(--border);border-radius:1rem;box-shadow:0 0 0 1px color-mix(in oklab,var(--border) 40%,transparent),0 20px 25px -5px #0000001a,0 8px 10px -6px #0000001a;transform-origin:100% 100%;translate:0 1.25rem;scale:.95}}:where(.cpk-popup-view-window-open){pointer-events:auto;opacity:1;translate:0 0}@media(width>=48rem){:where(.cpk-popup-view-window-open){scale:1}}:where(.cpk-popup-view-chat){flex:1;overflow:hidden}:where(.cpk-popup-view-chat-view){height:100%;min-height:0}:where(div[data-popup-chat] .cpk-chat-view-scroll-content){padding-inline:1.5rem}:where(.cpk-popup-view-welcome-screen){display:flex;height:100%;flex-direction:column}:where(.cpk-popup-view-welcome-screen-message){display:flex;flex:1;flex-direction:column;align-items:center;justify-content:center;padding-inline:1rem}:where(.cpk-popup-view-welcome-screen-suggestions){margin-bottom:1rem;display:flex;justify-content:center;padding-inline:1rem}:where(.cpk-sidebar-view){position:fixed;top:0;right:0;z-index:1200;display:flex;width:100%;height:100vh;height:100dvh;max-height:100vh;border-left:1px solid var(--border);background-color:var(--background);color:var(--foreground);box-shadow:0 20px 25px -5px #0000001a,0 8px 10px -6px #0000001a;translate:0 0;transition-property:translate;transition-duration:.3s;transition-timing-function:cubic-bezier(0,0,.2,1)}:where(.cpk-sidebar-view[data-position=left]){right:auto;left:0;border-left-width:0;border-right:1px solid var(--border)}:where(.cpk-sidebar-view-closed){pointer-events:none;translate:100% 0}:where(.cpk-sidebar-view-closed[data-position=left]){translate:-100% 0}:where(.cpk-sidebar-view-panel){display:flex;width:100%;height:100%;flex-direction:column;overflow:hidden}:where(.cpk-sidebar-view-chat){flex:1;overflow:hidden}:where(div[data-sidebar-chat] .cpk-chat-view-scroll-content){padding-inline:2rem}:where(.cpk-sidebar-view-toggle-button-left){right:auto;left:1.5rem}:where(.cpk-sidebar-view-welcome-screen){display:flex;height:100%;flex-direction:column}:where(.cpk-sidebar-view-welcome-screen-message){display:flex;flex:1;flex-direction:column;align-items:center;justify-content:center;padding-inline:1rem}:where(.cpk-sidebar-view-welcome-screen-footer){padding-inline:2rem;padding-bottom:1rem}:where(.cpk-sidebar-view-welcome-screen-content){max-width:48rem;margin-inline:auto}:where(.cpk-sidebar-view-welcome-screen-suggestions){margin-bottom:1rem;display:flex;justify-content:center}}\";\n","import {\n ChangeDetectionStrategy,\n Component,\n ViewEncapsulation,\n inject,\n} from \"@angular/core\";\nimport { COPILOT_KIT_CONFIG } from \"../config\";\n// Generated from @copilotkit/core/styles before build, test and type checking.\nimport { stylesheet } from \"./stylesheet\";\n\n/**\n * Holds the stylesheet. Angular adds a component's styles to `<head>` once,\n * however many instances render, inlines them in server-rendered HTML, and\n * gives the tag the `CSP_NONCE` nonce.\n */\n@Component({\n selector: \"copilot-kit-stylesheet\",\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: { hidden: \"\" },\n template: \"\",\n styles: [stylesheet],\n})\nclass CopilotKitStylesheet {}\n\n/**\n * Adds the CSS for CopilotKit's UI to the page, so apps never import a\n * stylesheet. `<copilot-chat>`, `<copilot-chat-view>`, `<copilot-popup>` and\n * `<copilot-sidebar>` render it for you. Render `<copilot-kit-styles />`\n * yourself only when you build a layout from the chat parts without them.\n *\n * Adds nothing when `provideCopilotKit` has `injectStyles: false`.\n */\n@Component({\n selector: \"copilot-kit-styles\",\n imports: [CopilotKitStylesheet],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { hidden: \"\" },\n template: `\n @if (enabled) {\n <copilot-kit-stylesheet />\n }\n `,\n})\nexport class CopilotKitStyles {\n protected readonly enabled =\n inject(COPILOT_KIT_CONFIG, { optional: true })?.injectStyles !== false;\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ViewEncapsulation,\n computed,\n input,\n signal,\n} from \"@angular/core\";\nimport type { Signal } from \"@angular/core\";\nimport { NgTemplateOutlet } from \"@angular/common\";\nimport type { AssistantMessage, Message } from \"@ag-ui/core\";\nimport {\n ɵformatLabel,\n ɵformatToolNames,\n ɵgetToolCallGroupState,\n ɵformatCountLabel,\n} from \"@copilotkit/core\";\nimport { ChevronRight, CopilotIcon } from \"../icons/copilot-icon\";\nimport {\n CopilotCollapsible,\n CopilotToolCallStatusIcon,\n} from \"../tools/tool-call-parts\";\nimport { RenderToolCall } from \"../../render-tool-calls\";\nimport { toolCallRowStatusLabelKeys } from \"../tools/tool-call-render-context\";\nimport type {\n CopilotChatToolCallGroupAppearance,\n ToolCallRenderContext,\n ToolCallRowStatus,\n} from \"../tools/tool-call-render-context\";\nimport type { ToolCallEntry } from \"./tool-call-layout\";\nimport { injectChatLabels } from \"../../chat-config\";\nimport { cn } from \"../../utils\";\n\nlet nextId = 0;\n\n/**\n * Tool calls made in a row, collapsed into one summary, like React's\n * `CopilotChatToolCallGroup`. While a call runs the summary names it\n * (\"Running read_file src/app.ts\"); once they're all done it reads\n * \"Used 3 tools\" and opens to the calls.\n *\n * Each call is drawn by its registered renderer. CopilotKit's built-in card\n * draws a compact row inside the card and line appearances and an open stack.\n */\n@Component({\n selector: \"copilot-chat-tool-call-group\",\n imports: [\n CopilotCollapsible,\n CopilotIcon,\n CopilotToolCallStatusIcon,\n NgTemplateOutlet,\n RenderToolCall,\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: { style: \"display: contents\" },\n template: `\n <ng-template #rows>\n @for (call of calls(); track call.toolCall.id) {\n <ng-container\n *ngTemplateOutlet=\"callTemplate; context: { $implicit: call }\"\n />\n }\n </ng-template>\n\n <ng-template #callTemplate let-call>\n <copilot-render-tool-call\n [toolCall]=\"call.toolCall\"\n [message]=\"message()\"\n [messages]=\"messages()\"\n [agentId]=\"agentId()\"\n [isLoading]=\"isLoading()\"\n [row]=\"rowFor(call.toolCall.id)\"\n />\n </ng-template>\n\n @if (latest(); as latest) {\n @switch (appearance()) {\n @case (\"line\") {\n @if (calls().length === 1 && !current()) {\n <div\n data-copilotkit\n data-testid=\"copilot-tool-call-group\"\n data-appearance=\"line\"\n [attr.data-state]=\"status()\"\n class=\"cpk-tool-call-group cpk-tool-call-group-line cpk-tool-call-group-single\"\n >\n <ng-container\n *ngTemplateOutlet=\"callTemplate; context: { $implicit: latest }\"\n />\n </div>\n } @else {\n <div\n data-copilotkit\n data-testid=\"copilot-tool-call-group\"\n data-appearance=\"line\"\n [attr.data-state]=\"status()\"\n class=\"cpk-tool-call-group cpk-tool-call-group-line\"\n >\n <button\n type=\"button\"\n [attr.aria-expanded]=\"open()\"\n [attr.aria-controls]=\"bodyId\"\n (click)=\"toggle()\"\n class=\"cpk-tool-call-group-line-toggle\"\n >\n @if (current(); as current) {\n <ng-container\n *ngTemplateOutlet=\"\n runningLabel;\n context: { $implicit: current }\n \"\n />\n } @else {\n <span class=\"cpk-tool-call-group-line-summary\">\n {{ usedToolsText() }}\n </span>\n <span class=\"cpk-tool-call-group-line-names\">\n {{ names() }}\n </span>\n <ng-container *ngTemplateOutlet=\"failedCountLabel\" />\n }\n <copilot-icon\n [img]=\"ChevronRightIcon\"\n [iconClass]=\"chevronClass()\"\n />\n </button>\n <div [copilotCollapsible]=\"open()\" [id]=\"bodyId\">\n <div class=\"cpk-tool-call-group-line-body\">\n <ng-container *ngTemplateOutlet=\"rows\" />\n </div>\n </div>\n </div>\n }\n }\n @case (\"stack\") {\n <div\n data-copilotkit\n data-testid=\"copilot-tool-call-group\"\n data-appearance=\"stack\"\n [attr.data-state]=\"status()\"\n class=\"cpk-tool-call-group cpk-tool-call-group-stack\"\n [style.padding-bottom.px]=\"behind().length * 6\"\n >\n <div class=\"cpk-tool-call-group-stack-pile\">\n @for (index of behind(); track index) {\n <div\n aria-hidden=\"true\"\n class=\"cpk-tool-call-group-stack-layer cpk-tool-call-group-stack-behind\"\n [style.transform]=\"\n 'translateY(' +\n (index + 1) * 6 +\n 'px) scaleX(' +\n (1 - (index + 1) * 0.045) +\n ')'\n \"\n [style.z-index]=\"-1 - index\"\n [style.opacity]=\"1 - (index + 1) * 0.28\"\n ></div>\n }\n <button\n type=\"button\"\n [attr.aria-expanded]=\"open()\"\n [attr.aria-controls]=\"open() ? bodyId : null\"\n (click)=\"toggle()\"\n [class]=\"\n open()\n ? 'cpk-tool-call-group-stack-toggle cpk-tool-call-group-stack-toggle-open'\n : 'cpk-tool-call-group-stack-toggle cpk-tool-call-group-stack-layer cpk-tool-call-group-stack-toggle-closed'\n \"\n >\n @if (open()) {\n {{ toolCallCountText() }}\n <ng-container *ngTemplateOutlet=\"failedCountLabel\" />\n <span class=\"cpk-tool-call-group-stack-collapse\">\n {{ labels.toolCallCollapseLabel }}\n <copilot-icon\n [img]=\"ChevronRightIcon\"\n iconClass=\"cpk-tool-call-chevron cpk-tool-call-chevron-open cpk-tool-call-group-stack-collapse-icon\"\n />\n </span>\n } @else {\n <span class=\"cpk-tool-call-group-stack-latest\">\n <copilot-tool-call-status-icon [status]=\"latestStatus()\" />\n <span\n class=\"cpk-tool-call-group-stack-name\"\n [class.cpk-shimmer]=\"latestStatus() === 'running'\"\n >\n {{ latest.toolCall.function.name }}\n </span>\n @if (latestPreview(); as preview) {\n <span class=\"cpk-tool-call-group-stack-preview\">\n {{ preview }}\n </span>\n }\n <!-- The status icon is decorative, so say the status. -->\n <span class=\"cpk-tool-call-group-stack-status\">\n {{ statusText(latestStatus()) }}\n </span>\n </span>\n <span class=\"cpk-tool-call-group-stack-meta\">\n <ng-container *ngTemplateOutlet=\"failedCountLabel\" />\n <span class=\"cpk-tool-call-group-stack-count\">\n {{ callCountText() }}\n </span>\n <copilot-icon\n [img]=\"ChevronRightIcon\"\n iconClass=\"cpk-tool-call-chevron cpk-tool-call-group-stack-expand-icon\"\n />\n </span>\n }\n </button>\n <!-- Always rendered, so screen readers hear the closed stack's\n latest call change; the button only names it. -->\n <span aria-live=\"polite\" class=\"cpk-tool-call-group-stack-live\">{{\n open()\n ? \"\"\n : latest.toolCall.function.name +\n \": \" +\n statusText(latestStatus())\n }}</span>\n </div>\n @if (open()) {\n <!-- Each call gets the collapsed stack's card, easing out of the stack. -->\n <div [id]=\"bodyId\" class=\"cpk-tool-call-group-stack-items\">\n @for (call of calls(); track call.toolCall.id; let index = $index) {\n <div\n class=\"cpk-tool-call-group-stack-layer cpk-tool-call-group-stack-item\"\n [style.animation-delay.ms]=\"index * 30\"\n >\n <ng-container\n *ngTemplateOutlet=\"callTemplate; context: { $implicit: call }\"\n />\n </div>\n }\n </div>\n }\n </div>\n }\n @default {\n <!-- card: one call gets the same card as several, so the card a run\n starts with doesn't change style when the next call joins it. -->\n <div\n data-copilotkit\n data-testid=\"copilot-tool-call-group\"\n data-appearance=\"card\"\n [attr.data-state]=\"status()\"\n class=\"cpk-tool-call-group cpk-tool-call-group-card\"\n >\n <button\n type=\"button\"\n [attr.aria-expanded]=\"open()\"\n [attr.aria-controls]=\"bodyId\"\n (click)=\"toggle()\"\n class=\"cpk-tool-call-group-card-toggle\"\n >\n <copilot-tool-call-status-icon [status]=\"status()\" />\n @if (current(); as current) {\n <ng-container\n *ngTemplateOutlet=\"runningLabel; context: { $implicit: current }\"\n />\n } @else {\n <span class=\"cpk-tool-call-group-card-summary\">\n {{ usedToolsText() }}\n </span>\n <span class=\"cpk-tool-call-group-card-names\">\n {{ names() }}\n </span>\n }\n <span class=\"cpk-tool-call-group-card-meta\">\n @if (status() === \"failed\") {\n <ng-container *ngTemplateOutlet=\"failedCountLabel\" />\n } @else {\n <span class=\"cpk-tool-call-group-card-status\">\n @if (status() !== \"running\") {\n {{ statusText(status()) }}\n } @else if (doneCount() > 0) {\n {{ doneCountText() }}\n }\n </span>\n }\n <copilot-icon\n [img]=\"ChevronRightIcon\"\n [iconClass]=\"chevronClass()\"\n />\n </span>\n </button>\n <div [copilotCollapsible]=\"open()\" [id]=\"bodyId\">\n <div><ng-container *ngTemplateOutlet=\"rows\" /></div>\n </div>\n </div>\n }\n }\n }\n\n <ng-template #runningLabel let-current>\n <span class=\"cpk-tool-call-group-running cpk-shimmer\">\n {{ runningText(current) }}\n </span>\n @if (preview(); as preview) {\n <span class=\"cpk-tool-call-group-preview\">{{ preview }}</span>\n }\n </ng-template>\n\n <ng-template #failedCountLabel>\n @if (failedCount() > 0) {\n <span class=\"cpk-tool-call-failed-count\">{{ failedCountText() }}</span>\n }\n </ng-template>\n `,\n})\nexport class CopilotChatToolCallGroup {\n /** The calls in the group, in order. */\n readonly calls = input.required<ToolCallEntry[]>();\n /**\n * - `\"card\"` (default): one card with a summary header and a row per call.\n * - `\"line\"`: a quiet line of text that opens to a list of rows.\n * - `\"stack\"`: the latest call on a stack of the earlier ones.\n */\n readonly appearance = input<CopilotChatToolCallGroupAppearance>(\"card\");\n /** The agent is running and nothing follows the group, so more calls may join it. */\n readonly isActive = input(false);\n /** The message the group starts in. */\n readonly message = input.required<AssistantMessage>();\n readonly messages = input<Message[]>([]);\n readonly agentId = input<string | undefined>();\n readonly isLoading = input(false);\n\n protected readonly open = signal(false);\n protected readonly bodyId = `cpk-tool-call-group-${nextId++}`;\n protected readonly labels = injectChatLabels();\n protected readonly ChevronRightIcon = ChevronRight;\n\n readonly #state = computed(() =>\n ɵgetToolCallGroupState(this.calls(), this.isActive(), this.open()),\n );\n protected readonly latest = computed(() => this.#state().latest);\n /**\n * Only an active group has a call in progress. Between calls nothing is\n * running, so the latest call stays the subject (or the label flickers).\n */\n protected readonly current = computed(() => this.#state().current);\n protected readonly preview = computed(() => this.#state().preview);\n protected readonly statuses = computed(() => this.#state().statusById);\n protected readonly failedCount = computed(() => this.#state().failedIds.size);\n protected readonly failedCountText = computed(() =>\n ɵformatLabel(this.labels.toolCallFailedCountLabel, {\n count: this.failedCount(),\n }),\n );\n protected readonly usedToolsText = computed(() =>\n ɵformatCountLabel(this.calls().length, {\n one: this.labels.toolCallUsedToolsOne,\n other: this.labels.toolCallUsedToolsOther,\n }),\n );\n protected readonly toolCallCountText = computed(() =>\n ɵformatCountLabel(this.calls().length, {\n one: this.labels.toolCallToolCallCountOne,\n other: this.labels.toolCallToolCallCountOther,\n }),\n );\n protected readonly callCountText = computed(() =>\n ɵformatCountLabel(this.calls().length, {\n one: this.labels.toolCallCallCountOne,\n other: this.labels.toolCallCallCountOther,\n }),\n );\n protected readonly doneCount = computed(() => this.#state().done);\n protected readonly doneCountText = computed(() =>\n ɵformatLabel(this.labels.toolCallDoneCountLabel, {\n count: this.doneCount(),\n }),\n );\n protected readonly status = computed(() => this.#state().status);\n protected readonly names = computed(() => ɵformatToolNames(this.calls()));\n protected readonly latestStatus = computed(() => this.#state().latestStatus);\n protected readonly latestPreview = computed(\n () => this.#state().latestPreview,\n );\n /** A lone call is the top card of a stack with nothing behind it yet. */\n protected readonly behind = computed(() =>\n Array.from({ length: this.#state().behind }, (_, index) => index),\n );\n protected readonly chevronClass = computed(() =>\n cn(\"cpk-tool-call-chevron\", this.open() && \"cpk-tool-call-chevron-open\"),\n );\n // One row context per call, kept while the call is in the group, so its\n // renderer isn't recreated when the calls update.\n readonly #rows = new Map<\n string,\n {\n appearance: CopilotChatToolCallGroupAppearance;\n row: NonNullable<ToolCallRenderContext[\"row\"]>;\n }\n >();\n\n protected rowFor(toolCallId: string): ToolCallRenderContext[\"row\"] {\n const appearance = this.appearance();\n const cached = this.#rows.get(toolCallId);\n if (cached && cached.appearance === appearance) return cached.row;\n const status: Signal<ToolCallRowStatus> = computed(\n () => this.statuses().get(toolCallId) ?? \"done\",\n );\n const row = { appearance, status };\n this.#rows.set(toolCallId, { appearance, row });\n return row;\n }\n\n protected statusText(status: ToolCallRowStatus) {\n return this.labels[toolCallRowStatusLabelKeys[status]];\n }\n\n protected runningText(entry: ToolCallEntry) {\n return ɵformatLabel(this.labels.toolCallRunningLabel, {\n name: entry.toolCall.function.name,\n });\n }\n\n protected toggle(): void {\n this.open.update((value) => !value);\n }\n}\n","import { InjectionToken, type Signal } from \"@angular/core\";\nimport type {\n CopilotChatToolCallDisplay,\n ToolCallLayout,\n} from \"./tool-call-layout\";\n\n/**\n * Provided by the message view so each message's tool calls follow the\n * view's `toolCallDisplay`, like React's `ToolCallDisplayContext`.\n * @internal\n */\nexport interface ToolCallDisplayContext {\n display: Signal<CopilotChatToolCallDisplay>;\n isRunning: Signal<boolean>;\n /** Each assistant message's tool calls, laid out across the whole list. */\n layouts: Signal<ReadonlyMap<string, ToolCallLayout>>;\n /**\n * `\"turn\"` display: for each message in a reply's working phase, whether\n * that work is showing. Messages not in here are the reply itself.\n */\n workOpen: Signal<ReadonlyMap<string, boolean>>;\n /**\n * Like `workOpen`, for the messages' text: text that ends the reply stays\n * out of it even when its message also calls a tool.\n */\n workTextOpen: Signal<ReadonlyMap<string, boolean>>;\n}\n\n/** @internal */\nexport const TOOL_CALL_DISPLAY_CONTEXT =\n new InjectionToken<ToolCallDisplayContext>(\"TOOL_CALL_DISPLAY_CONTEXT\");\n","import { ɵgetToolCallRendererNames } from \"@copilotkit/core\";\nimport type { CopilotKit } from \"../../copilotkit\";\n\nexport type {\n CopilotChatToolCallDisplay,\n ToolCallEntry,\n} from \"@copilotkit/core\";\nexport type {\n ɵToolCallSegment as ToolCallSegment,\n ɵToolCallLayout as ToolCallLayout,\n ɵToolCallRendererNames as ToolCallRendererNames,\n} from \"@copilotkit/core\";\nexport {\n ɵgetToolResults as getToolResults,\n ɵgetToolCallLayouts as getToolCallLayouts,\n} from \"@copilotkit/core\";\n\n/**\n * Which tool-call renderers are registered on the Angular `CopilotKit`, for\n * grouping (see `getToolCallLayouts`). Like React's `useToolCallRendererNames`.\n *\n * - Renderers registered with `group: true` group.\n * - Client tools with a component, and human-in-the-loop tools, have a\n * renderer of their own and never group.\n * - The built-in card (`defaultToolRendering: true`) draws the remaining\n * tools and groups. A registered `\"*\"` renderer wins over it.\n *\n * @param copilotKit - The Angular `CopilotKit` service.\n */\nexport function getToolCallRendererNames(\n copilotKit: Pick<\n CopilotKit,\n | \"toolCallRenderConfigs\"\n | \"clientToolCallRenderConfigs\"\n | \"humanInTheLoopToolRenderConfigs\"\n | \"defaultToolRenderingEnabled\"\n >,\n) {\n const clientToolNames = copilotKit\n .clientToolCallRenderConfigs()\n .filter((entry) => entry.component !== undefined)\n .map((entry) => entry.name);\n const humanInTheLoopNames = copilotKit\n .humanInTheLoopToolRenderConfigs()\n .map((entry) => entry.name);\n return ɵgetToolCallRendererNames(copilotKit.toolCallRenderConfigs(), {\n extraNamed: [...clientToolNames, ...humanInTheLoopNames],\n builtInWildcard: {\n enabled: copilotKit.defaultToolRenderingEnabled,\n groups: true,\n },\n });\n}\n","import {\n Component,\n ChangeDetectionStrategy,\n computed,\n inject,\n input,\n} from \"@angular/core\";\n\nimport type { Signal } from \"@angular/core\";\nimport type { AssistantMessage, Message } from \"@ag-ui/core\";\nimport { CopilotKit } from \"../../copilotkit\";\nimport { RenderToolCall } from \"../../render-tool-calls\";\nimport { ɵgetToolCallGroupState, ɵtoolCallAppearance } from \"@copilotkit/core\";\nimport { CopilotChatToolCallGroup } from \"./copilot-chat-tool-call-group\";\nimport { CopilotCollapsible } from \"../tools/tool-call-parts\";\nimport type {\n ToolCallRenderContext,\n ToolCallRowStatus,\n} from \"../tools/tool-call-render-context\";\nimport { TOOL_CALL_DISPLAY_CONTEXT } from \"./tool-call-display-context\";\nimport {\n getToolCallLayouts,\n getToolCallRendererNames,\n} from \"./tool-call-layout\";\nimport type { CopilotChatToolCallDisplay } from \"./tool-call-layout\";\n\n/**\n * An assistant message's tool calls, each drawn by its registered renderer.\n * Calls made in a row by renderers that opt into grouping share one\n * `copilot-chat-tool-call-group`, as in React.\n */\n@Component({\n selector: \"copilot-chat-tool-calls-view\",\n imports: [RenderToolCall, CopilotChatToolCallGroup, CopilotCollapsible],\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n @if (layout(); as layout) {\n @for (segment of layout.segments; track segment.id) {\n @if (segment.kind === \"call\") {\n <copilot-render-tool-call\n [toolCall]=\"segment.call.toolCall\"\n [message]=\"message()\"\n [messages]=\"messages()\"\n [agentId]=\"agentId()\"\n [isLoading]=\"isLoading()\"\n />\n } @else if (resolvedDisplay() === \"turn\") {\n <!-- A row per call, in the open while the agent works; the message\n view folds them away with the rest of the work once it's done. -->\n <div\n [copilotCollapsible]=\"workOpen() ?? true\"\n class=\"cpk-tool-calls-view-turn\"\n >\n <div class=\"cpk-tool-calls-view-turn-rows\">\n @for (call of segment.calls; track call.toolCall.id) {\n <copilot-render-tool-call\n [toolCall]=\"call.toolCall\"\n [message]=\"message()\"\n [messages]=\"messages()\"\n [agentId]=\"agentId()\"\n [isLoading]=\"isLoading()\"\n [row]=\"turnRowFor(call.toolCall.id)\"\n />\n }\n </div>\n </div>\n } @else {\n <copilot-chat-tool-call-group\n [calls]=\"segment.calls\"\n [appearance]=\"appearance()\"\n [isActive]=\"segment.trailing && isRunning()\"\n [message]=\"message()\"\n [messages]=\"messages()\"\n [agentId]=\"agentId()\"\n [isLoading]=\"isLoading()\"\n />\n }\n }\n } @else {\n @for (toolCall of message().toolCalls ?? []; track toolCall.id) {\n <copilot-render-tool-call\n [toolCall]=\"toolCall\"\n [message]=\"message()\"\n [messages]=\"messages()\"\n [agentId]=\"agentId()\"\n [isLoading]=\"isLoading()\"\n />\n }\n }\n `,\n})\nexport class CopilotChatToolCallsView {\n readonly message = input.required<AssistantMessage>();\n readonly messages = input.required<Message[]>();\n readonly agentId = input<string | undefined>();\n readonly isLoading = input<boolean>(false);\n /**\n * How to show the calls (see `CopilotChatToolCallDisplay`). Inside a\n * message view it follows the view's `toolCallDisplay`; on its own it\n * defaults to `\"grouped\"`.\n */\n readonly display = input<CopilotChatToolCallDisplay | undefined>();\n\n readonly #copilotKit = inject(CopilotKit);\n readonly #context = inject(TOOL_CALL_DISPLAY_CONTEXT, { optional: true });\n\n protected readonly resolvedDisplay = computed(\n () => this.display() ?? this.#context?.display() ?? \"grouped\",\n );\n protected readonly appearance = computed(\n () => ɵtoolCallAppearance(this.resolvedDisplay()) ?? \"card\",\n );\n /**\n * Whether the agent may still finish a trailing group's calls. Without a\n * message view there's no run state, so a call with no result is assumed\n * to be running.\n */\n protected readonly isRunning = computed(\n () => this.#context?.isRunning() ?? true,\n );\n\n // Inside a message view, groups can span messages, so the view lays them\n // out for the whole list; on its own, this message's calls are grouped.\n protected readonly layout = computed(() => {\n if (this.resolvedDisplay() === \"separate\") return undefined;\n const message = this.message();\n return (\n this.#context?.layouts().get(message.id) ??\n getToolCallLayouts(\n [message],\n this.messages(),\n getToolCallRendererNames(this.#copilotKit),\n ).get(message.id)\n );\n });\n\n /** `\"turn\"` display: whether this message's work is showing. */\n protected readonly workOpen = computed(() =>\n this.#context?.workOpen().get(this.message().id),\n );\n\n // `\"turn\"` display: each call's row status, by call id.\n readonly #turnStatuses = computed(() => {\n const statuses = new Map<string, ToolCallRowStatus>();\n for (const segment of this.layout()?.segments ?? []) {\n if (segment.kind !== \"group\") continue;\n const active = segment.trailing && this.isRunning();\n const { statusById } = ɵgetToolCallGroupState(\n segment.calls,\n active,\n false,\n );\n for (const [id, status] of statusById) statuses.set(id, status);\n }\n return statuses;\n });\n // One row context per call, so its renderer isn't recreated on updates.\n readonly #turnRows = new Map<\n string,\n NonNullable<ToolCallRenderContext[\"row\"]>\n >();\n\n protected turnRowFor(toolCallId: string): ToolCallRenderContext[\"row\"] {\n let row = this.#turnRows.get(toolCallId);\n if (!row) {\n const status: Signal<ToolCallRowStatus> = computed(\n () => this.#turnStatuses().get(toolCallId) ?? \"done\",\n );\n row = { appearance: \"line\", status };\n this.#turnRows.set(toolCallId, row);\n }\n return row;\n }\n}\n","import { render as renderKatex } from \"katex\";\nimport {\n CHAT_MARKDOWN_NODE_CLASS_NAMES,\n warnUnsupportedRichSyntaxOnce,\n} from \"@copilotkit/markdown\";\nimport { createStreamingMarkdownDomRenderer } from \"@copilotkit/markdown/dom\";\nimport type {\n StreamingMarkdownDomNodeRenderers,\n StreamingMarkdownDomRenderer,\n} from \"@copilotkit/markdown/dom\";\n\n/**\n * Typesets `math` nodes with KaTeX. `katex.render()` builds DOM nodes itself,\n * so no HTML string is parsed and no sanitizer is needed; `trust: false`\n * keeps KaTeX's own link and HTML commands off.\n *\n * KaTeX creates nodes with the global `document`, which server DOMs do not\n * have; there the TeX source is shown until the browser renders it.\n */\nconst nodeRenderers: StreamingMarkdownDomNodeRenderers = {\n math: ({ node, document }) => {\n const span = document.createElement(\"span\");\n if (node.type !== \"math\") return span;\n if (typeof globalThis.document === \"undefined\") {\n span.textContent = node.text;\n return span;\n }\n renderKatex(node.text, span, {\n displayMode: node.display,\n throwOnError: false,\n trust: false,\n });\n return span;\n },\n};\n\n/** What the assistant message renderer passes on each change. */\nexport interface AssistantMarkdownInput {\n content: string;\n isStreaming: boolean;\n}\n\n/**\n * Renders assistant markdown into `container` with `@copilotkit/markdown`'s\n * shared engine (the same parser, markup, sanitization, caret and per-token\n * fade-in as React and Vue), plus KaTeX math.\n *\n * Empty content renders nothing, like React's default renderer.\n *\n * @param container - Element to render into; the renderer owns its children.\n * @returns `render(input)` for each change and `destroy()` for teardown.\n */\nexport function createAssistantMarkdownRenderer(container: HTMLElement) {\n let renderer: StreamingMarkdownDomRenderer | null = null;\n\n function destroy() {\n renderer?.destroy();\n renderer = null;\n }\n\n function render({ content, isStreaming }: AssistantMarkdownInput) {\n if (!content) {\n destroy();\n return;\n }\n warnUnsupportedRichSyntaxOnce(content, { rendersMath: true });\n renderer ??= createStreamingMarkdownDomRenderer(container);\n renderer.render({\n content,\n isComplete: !isStreaming,\n caret: isStreaming,\n options: { enableMath: true },\n nodeRenderers,\n nodeClassNames: CHAT_MARKDOWN_NODE_CLASS_NAMES,\n });\n }\n\n return { render, destroy };\n}\n","import {\n Component,\n DestroyRef,\n ElementRef,\n ViewEncapsulation,\n inject,\n input,\n viewChild,\n} from \"@angular/core\";\n\nimport { injectChatLabels } from \"../../chat-config\";\nimport { explicitEffect } from \"../../explicit-effect\";\nimport { createAssistantMarkdownRenderer } from \"./markdown\";\n\n@Component({\n selector: \"copilot-chat-assistant-message-renderer\",\n encapsulation: ViewEncapsulation.None,\n template: `\n <div #markdownContainer [class]=\"inputClass()\"></div>\n `,\n styles: [\n `\n copilot-chat-assistant-message-renderer {\n display: block;\n width: 100%;\n }\n\n /* Math equations */\n copilot-chat-assistant-message-renderer .katex-display {\n overflow-x: auto;\n overflow-y: hidden;\n padding: 1rem 0;\n }\n `,\n ],\n})\nexport class CopilotChatAssistantMessageRenderer {\n readonly content = input<string>(\"\");\n /** True while this message is still streaming: shows the caret. */\n readonly isStreaming = input<boolean>(false);\n readonly inputClass = input<string | undefined>();\n readonly labels = injectChatLabels();\n\n private readonly markdownContainer =\n viewChild<ElementRef<HTMLDivElement>>(\"markdownContainer\");\n\n constructor() {\n let renderer: ReturnType<typeof createAssistantMarkdownRenderer> | null =\n null;\n inject(DestroyRef).onDestroy(() => renderer?.destroy());\n\n explicitEffect(\n () => ({\n container: this.markdownContainer()?.nativeElement,\n content: this.content(),\n isStreaming: this.isStreaming(),\n }),\n ({ container, content, isStreaming }) => {\n if (!container) return;\n renderer ??= createAssistantMarkdownRenderer(container);\n renderer.render({ content, isStreaming });\n },\n );\n }\n}\n","import { DestroyRef, inject, signal } from \"@angular/core\";\nimport { ɵCopyFeedback } from \"@copilotkit/core\";\n\n/**\n * The \"copied\" check mark of a copy button, from core's `ɵCopyFeedback`:\n * `copy(text)` writes to the clipboard and shows the check mark for two\n * seconds; a second copy restarts the wait. Call it in an injection context.\n */\nexport function injectCopyFeedback() {\n const feedback = new ɵCopyFeedback();\n const copied = signal(feedback.getSnapshot());\n const unsubscribe = feedback.subscribe(() =>\n copied.set(feedback.getSnapshot()),\n );\n inject(DestroyRef).onDestroy(() => {\n unsubscribe();\n feedback.dispose();\n });\n return { copied: copied.asReadonly(), copy: feedback.copy };\n}\n","import {\n Component,\n input,\n output,\n computed,\n ChangeDetectionStrategy,\n ViewEncapsulation,\n} from \"@angular/core\";\n\nimport {\n CopilotIcon,\n Copy,\n Check,\n ThumbsUp,\n ThumbsDown,\n Volume2,\n RefreshCw,\n} from \"../icons/copilot-icon\";\nimport { CopilotTooltip } from \"../../directives/tooltip\";\nimport { cn } from \"../../utils\";\nimport { injectChatLabels } from \"../../chat-config\";\nimport { injectCopyFeedback } from \"./copy-feedback\";\n\n// Base toolbar button component\n@Component({\n selector: \"button[copilotChatAssistantMessageToolbarButton]\",\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `\n <ng-content></ng-content>\n `,\n host: {\n \"[class]\": \"computedClass()\",\n \"[attr.disabled]\": \"disabled() ? true : null\",\n type: \"button\",\n \"[attr.aria-label]\": \"title()\",\n },\n hostDirectives: [\n {\n directive: CopilotTooltip,\n inputs: [\"copilotTooltip: title\", \"tooltipPosition\", \"tooltipDelay\"],\n },\n ],\n})\nexport class CopilotChatAssistantMessageToolbarButton {\n title = input<string>(\"\");\n disabled = input<boolean>(false);\n inputClass = input<string | undefined>();\n\n computedClass = computed(() => {\n return cn(\n \"cpk-button cpk-button-assistant-message-toolbar cpk-button-size-default\",\n this.inputClass(),\n );\n });\n}\n\n// Copy button component\n@Component({\n selector: \"copilot-chat-assistant-message-copy-button\",\n imports: [CopilotIcon, CopilotChatAssistantMessageToolbarButton],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `\n <button\n copilotChatAssistantMessageToolbarButton\n [title]=\"title() || labels.assistantMessageToolbarCopyMessageLabel\"\n [disabled]=\"disabled()\"\n [inputClass]=\"inputClass()\"\n (click)=\"handleCopy($event)\"\n >\n @if (copied()) {\n <copilot-icon\n [img]=\"CheckIcon\"\n iconClass=\"cpk-assistant-message-toolbar-icon\"\n ></copilot-icon>\n } @else {\n <copilot-icon\n [img]=\"CopyIcon\"\n iconClass=\"cpk-assistant-message-toolbar-icon\"\n ></copilot-icon>\n }\n </button>\n `,\n})\nexport class CopilotChatAssistantMessageCopyButton {\n readonly title = input<string | undefined>();\n readonly disabled = input<boolean>(false);\n readonly inputClass = input<string | undefined>();\n readonly content = input<string | undefined>();\n readonly clicked = output();\n readonly CopyIcon = Copy;\n readonly CheckIcon = Check;\n readonly #copyFeedback = injectCopyFeedback();\n readonly copied = this.#copyFeedback.copied;\n readonly labels = injectChatLabels();\n\n handleCopy(event?: Event): void {\n event?.stopPropagation();\n void this.#copyFeedback.copy(this.content() ?? \"\").then((copied) => {\n if (copied) this.clicked.emit();\n });\n }\n}\n\n// Thumbs up button component\n@Component({\n selector: \"copilot-chat-assistant-message-thumbs-up-button\",\n imports: [CopilotIcon, CopilotChatAssistantMessageToolbarButton],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `\n <button\n copilotChatAssistantMessageToolbarButton\n [title]=\"title() || labels.assistantMessageToolbarThumbsUpLabel\"\n [disabled]=\"disabled()\"\n [inputClass]=\"inputClass()\"\n (click)=\"handleClick($event)\"\n >\n <copilot-icon\n [img]=\"ThumbsUpIcon\"\n iconClass=\"cpk-assistant-message-toolbar-icon\"\n ></copilot-icon>\n </button>\n `,\n})\nexport class CopilotChatAssistantMessageThumbsUpButton {\n readonly title = input<string | undefined>();\n readonly disabled = input<boolean>(false);\n readonly inputClass = input<string | undefined>();\n readonly clicked = output();\n readonly ThumbsUpIcon = ThumbsUp;\n readonly labels = injectChatLabels();\n\n handleClick(event?: Event): void {\n event?.stopPropagation();\n if (!this.disabled()) {\n this.clicked.emit();\n }\n }\n}\n\n// Thumbs down button component\n@Component({\n selector: \"copilot-chat-assistant-message-thumbs-down-button\",\n imports: [CopilotIcon, CopilotChatAssistantMessageToolbarButton],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `\n <button\n copilotChatAssistantMessageToolbarButton\n [title]=\"title() || labels.assistantMessageToolbarThumbsDownLabel\"\n [disabled]=\"disabled()\"\n [inputClass]=\"inputClass()\"\n (click)=\"handleClick($event)\"\n >\n <copilot-icon\n [img]=\"ThumbsDownIcon\"\n iconClass=\"cpk-assistant-message-toolbar-icon\"\n ></copilot-icon>\n </button>\n `,\n})\nexport class CopilotChatAssistantMessageThumbsDownButton {\n readonly title = input<string | undefined>();\n readonly disabled = input<boolean>(false);\n readonly inputClass = input<string | undefined>();\n readonly clicked = output();\n readonly ThumbsDownIcon = ThumbsDown;\n readonly labels = injectChatLabels();\n\n handleClick(event?: Event): void {\n event?.stopPropagation();\n if (!this.disabled()) {\n this.clicked.emit();\n }\n }\n}\n\n// Read aloud button component\n@Component({\n selector: \"copilot-chat-assistant-message-read-aloud-button\",\n imports: [CopilotIcon, CopilotChatAssistantMessageToolbarButton],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `\n <button\n copilotChatAssistantMessageToolbarButton\n [title]=\"title() || labels.assistantMessageToolbarReadAloudLabel\"\n [disabled]=\"disabled()\"\n [inputClass]=\"inputClass()\"\n (click)=\"handleClick($event)\"\n >\n <copilot-icon\n [img]=\"Volume2Icon\"\n iconClass=\"cpk-assistant-message-read-aloud-icon\"\n ></copilot-icon>\n </button>\n `,\n})\nexport class CopilotChatAssistantMessageReadAloudButton {\n readonly title = input<string | undefined>();\n readonly disabled = input<boolean>(false);\n readonly inputClass = input<string | undefined>();\n readonly clicked = output();\n readonly Volume2Icon = Volume2;\n readonly labels = injectChatLabels();\n\n handleClick(event?: Event): void {\n event?.stopPropagation();\n if (!this.disabled()) {\n this.clicked.emit();\n }\n }\n}\n\n// Regenerate button component\n@Component({\n selector: \"copilot-chat-assistant-message-regenerate-button\",\n imports: [CopilotIcon, CopilotChatAssistantMessageToolbarButton],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `\n <button\n copilotChatAssistantMessageToolbarButton\n [title]=\"title() || labels.assistantMessageToolbarRegenerateLabel\"\n [disabled]=\"disabled()\"\n [inputClass]=\"inputClass()\"\n (click)=\"handleClick($event)\"\n >\n <copilot-icon\n [img]=\"RefreshCwIcon\"\n iconClass=\"cpk-assistant-message-toolbar-icon\"\n ></copilot-icon>\n </button>\n `,\n})\nexport class CopilotChatAssistantMessageRegenerateButton {\n readonly title = input<string | undefined>();\n readonly disabled = input<boolean>(false);\n readonly inputClass = input<string | undefined>();\n readonly clicked = output();\n readonly RefreshCwIcon = RefreshCw;\n readonly labels = injectChatLabels();\n\n handleClick(event?: Event): void {\n event?.stopPropagation();\n if (!this.disabled()) {\n this.clicked.emit();\n }\n }\n}\n","import { Directive, input, computed } from \"@angular/core\";\nimport { cn } from \"../../utils\";\n\n@Directive({\n selector: \"[copilotChatAssistantMessageToolbar]\",\n host: {\n \"[class]\": \"computedClass()\",\n },\n})\nexport class CopilotChatAssistantMessageToolbar {\n readonly inputClass = input<string | undefined>();\n\n readonly computedClass = computed(() => {\n return cn(\"cpk-assistant-message-toolbar\", this.inputClass());\n });\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n DestroyRef,\n ElementRef,\n TemplateRef,\n ViewContainerRef,\n ViewEncapsulation,\n computed,\n inject,\n input,\n output,\n signal,\n viewChild,\n} from \"@angular/core\";\nimport { CdkMenu, CdkMenuItem } from \"@angular/cdk/menu\";\nimport { Overlay, OverlayRef } from \"@angular/cdk/overlay\";\nimport { TemplatePortal } from \"@angular/cdk/portal\";\nimport { CopilotIcon, EyeOff, Wrench } from \"../icons/copilot-icon\";\nimport { CopilotTooltip } from \"../../directives/tooltip\";\nimport { CopilotInspector } from \"../../inspector\";\nimport { injectChatLabels } from \"../../chat-config\";\nimport { cn } from \"../../utils\";\nimport {\n ɵHoverMenuController,\n ɵinspectorKiteFill,\n ɵinspectorKiteIcon,\n ɵinspectorShortcuts,\n} from \"@copilotkit/core\";\n\n// Core's `ɵinspectorShortcuts` holds the page-lifetime preference, shared by\n// every message and chat; this signal mirrors it for templates.\nconst shortcutsHidden = signal(ɵinspectorShortcuts.hidden);\nɵinspectorShortcuts.subscribe(() =>\n shortcutsHidden.set(ɵinspectorShortcuts.hidden),\n);\n\n/** Whether the user hid the Inspector shortcuts until the page reloads. */\nexport const inspectorShortcutsHidden = shortcutsHidden.asReadonly();\n\n/** @internal Resets the page-lifetime preference. For tests. */\nexport function ɵresetInspectorShortcuts(): void {\n ɵinspectorShortcuts.reset();\n}\n\nlet nextId = 0;\n\n/**\n * The Inspector shortcut in an assistant message's toolbar, like React's\n * `CopilotChatInspectorButton`. Shown only while the Inspector is enabled\n * (in development). A click opens the message in the Inspector; hovering, or\n * ArrowDown on the button, opens a menu that explains it and can hide it until\n * the page reloads.\n */\n@Component({\n selector: \"copilot-chat-inspector-button\",\n imports: [CdkMenu, CdkMenuItem, CopilotIcon, CopilotTooltip],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: { style: \"display: contents\" },\n template: `\n @if (visible()) {\n <button\n #trigger\n type=\"button\"\n data-testid=\"copilot-inspector-button\"\n aria-haspopup=\"menu\"\n [attr.aria-expanded]=\"open()\"\n [attr.aria-controls]=\"open() ? menuId : null\"\n [attr.data-state]=\"open() ? 'open' : 'closed'\"\n [attr.aria-label]=\"\n labels.assistantMessageToolbarInspectorTitle +\n ' (' +\n labels.assistantMessageToolbarInspectorLocalOnlyLabel.toLowerCase() +\n ')'\n \"\n [disabled]=\"disabled()\"\n [class]=\"buttonClass()\"\n (pointerenter)=\"onPointerEnter($event)\"\n (pointerleave)=\"scheduleClose()\"\n (click)=\"inspect()\"\n (keydown)=\"onKeydown($event)\"\n >\n <copilot-icon\n [img]=\"WrenchIcon\"\n iconClass=\"cpk-inspector-button-icon\"\n data-testid=\"copilot-inspector-icon\"\n />\n </button>\n }\n\n <ng-template #menu>\n <div\n data-copilotkit\n cdkMenu\n [id]=\"menuId\"\n data-state=\"open\"\n data-side=\"top\"\n data-align=\"start\"\n [class]=\"menuClass()\"\n (pointerenter)=\"cancelClose()\"\n (pointerleave)=\"scheduleClose()\"\n (keydown)=\"keyboardUsed()\"\n (focusout)=\"onMenuFocusOut($event)\"\n >\n <div class=\"cpk-dropdown-menu-label cpk-inspector-button-menu-header\">\n <span class=\"cpk-inspector-button-menu-title\">\n {{ labels.assistantMessageToolbarInspectorTitle }}\n </span>\n <span\n tabindex=\"0\"\n class=\"cpk-inspector-button-local-badge\"\n [copilotTooltip]=\"\n labels.assistantMessageToolbarInspectorLocalOnlyDescription\n \"\n tooltipPosition=\"above\"\n [tooltipDelay]=\"1000\"\n [tooltipClass]=\"localTooltipClass()\"\n >{{ labels.assistantMessageToolbarInspectorLocalOnlyLabel }}</span\n >\n </div>\n <div role=\"separator\" class=\"cpk-dropdown-menu-separator\"></div>\n <button\n type=\"button\"\n cdkMenuItem\n class=\"cpk-dropdown-menu-item cpk-inspector-button-menu-item cpk-inspector-button-inspect-item\"\n (cdkMenuItemTriggered)=\"inspect()\"\n >\n <svg\n aria-hidden=\"true\"\n class=\"cpk-inspector-button-kite-icon cpk-inspector-button-menu-item-icon\"\n [attr.viewBox]=\"kite.viewBox\"\n fill=\"none\"\n >\n @for (path of kite.paths; track path.d) {\n <path\n [attr.d]=\"path.d\"\n [attr.fill]=\"kiteFill(svgId, path) ?? null\"\n [attr.stroke]=\"path.stroke ?? null\"\n [attr.stroke-width]=\"path.strokeWidth ?? null\"\n [attr.stroke-linecap]=\"path.strokeLinecap ?? null\"\n />\n }\n <defs>\n @for (gradient of kite.gradients; track gradient.id) {\n <linearGradient\n [attr.id]=\"svgId + '-' + gradient.id\"\n [attr.x1]=\"gradient.x1\"\n [attr.y1]=\"gradient.y1\"\n [attr.x2]=\"gradient.x2\"\n [attr.y2]=\"gradient.y2\"\n gradientUnits=\"userSpaceOnUse\"\n >\n @for (stop of gradient.stops; track $index) {\n <stop\n [attr.offset]=\"stop.offset ?? null\"\n [attr.stop-color]=\"stop.color\"\n />\n }\n </linearGradient>\n }\n </defs>\n </svg>\n <span>\n <span class=\"cpk-inspector-button-menu-item-label\">{{\n primaryLabel()\n }}</span>\n <span class=\"cpk-inspector-button-menu-item-description\">{{\n labels.assistantMessageToolbarInspectorDescription\n }}</span>\n </span>\n </button>\n <!-- A div, like React's (Radix) menu item; CdkMenuItem makes it a\n focusable menuitem. -->\n <div\n cdkMenuItem\n class=\"cpk-dropdown-menu-item cpk-inspector-button-menu-item cpk-inspector-button-hide-item\"\n (cdkMenuItemTriggered)=\"hideShortcuts()\"\n >\n <copilot-icon\n [img]=\"EyeOffIcon\"\n iconClass=\"cpk-inspector-button-menu-item-icon\"\n />\n <span>\n <span class=\"cpk-inspector-button-menu-item-label\">{{\n labels.assistantMessageToolbarInspectorHideLabel\n }}</span>\n <span class=\"cpk-inspector-button-menu-item-description\">{{\n labels.assistantMessageToolbarInspectorHideDescription\n }}</span>\n </span>\n </div>\n </div>\n </ng-template>\n `,\n})\nexport class CopilotChatInspectorButton {\n /** The message to open in the Inspector. */\n readonly messageId = input.required<string>();\n readonly threadId = input<string | undefined>();\n readonly agentId = input<string | undefined>();\n /** Replaces the \"View in Inspector\" label of the menu item. */\n readonly title = input<string | undefined>();\n readonly disabled = input(false);\n readonly inputClass = input<string | undefined>();\n /** Emits after the message opens in the Inspector. */\n readonly clicked = output();\n\n protected readonly labels = injectChatLabels();\n protected readonly WrenchIcon = Wrench;\n protected readonly EyeOffIcon = EyeOff;\n protected readonly menuId = `cpk-inspector-menu-${nextId}`;\n protected readonly svgId = `cpk-inspector-kite-${nextId++}`;\n protected readonly kite = ɵinspectorKiteIcon;\n protected readonly kiteFill = ɵinspectorKiteFill;\n readonly #menu = new ɵHoverMenuController();\n readonly #menuState = signal(this.#menu.getSnapshot());\n protected readonly open = computed(() => this.#menuState().open);\n protected readonly dark = computed(() => this.#menuState().dark);\n\n readonly #inspector = inject(CopilotInspector);\n readonly #overlay = inject(Overlay);\n readonly #viewContainerRef = inject(ViewContainerRef);\n private readonly _trigger =\n viewChild<ElementRef<HTMLButtonElement>>(\"trigger\");\n private readonly _menuTemplate =\n viewChild.required<TemplateRef<unknown>>(\"menu\");\n private readonly _menu = viewChild(CdkMenu);\n #overlayRef?: OverlayRef;\n\n protected readonly visible = computed(\n () => this.#inspector.isInspectorEnabled && !shortcutsHidden(),\n );\n protected readonly primaryLabel = computed(\n () => this.title() || this.labels.assistantMessageToolbarInspectorLabel,\n );\n protected readonly buttonClass = computed(() =>\n cn(\n \"cpk-button cpk-button-assistant-message-toolbar cpk-button-size-icon cpk-inspector-button\",\n this.inputClass(),\n ),\n );\n protected readonly menuClass = computed(() =>\n cn(\n \"cpk-dropdown-menu-content cpk-inspector-button-menu\",\n this.dark() && \"dark\",\n ),\n );\n protected readonly localTooltipClass = computed(() =>\n cn(\"cpk-inspector-button-local-tooltip\", this.dark() && \"dark\"),\n );\n\n constructor() {\n // The controller decides when the menu is open; the overlay follows it.\n const unsubscribe = this.#menu.subscribe(() => {\n const state = this.#menu.getSnapshot();\n this.#menuState.set(state);\n if (state.open) this.attachOverlay();\n else this.detachOverlay();\n });\n inject(DestroyRef).onDestroy(() => {\n unsubscribe();\n this.#menu.dispose();\n this.detachOverlay();\n });\n }\n\n protected onPointerEnter(event: PointerEvent): void {\n const trigger = this._trigger()?.nativeElement;\n if (!trigger) return;\n this.#menu.pointerEnter({\n pointerType: event.pointerType,\n disabled: this.disabled(),\n trigger,\n });\n }\n\n protected keyboardUsed(): void {\n this.#menu.keyboardUsed();\n }\n\n protected onKeydown(event: KeyboardEvent): void {\n this.#menu.keyboardUsed();\n if (event.key === \"Enter\" || event.key === \" \") {\n // Like a click: open the message, not the menu.\n event.preventDefault();\n this._trigger()?.nativeElement.click();\n } else if (event.key === \"ArrowDown\") {\n event.preventDefault();\n this.openMenu();\n this._menu()?.focusFirstItem(\"keyboard\");\n }\n }\n\n protected inspect(): void {\n this.closeMenu();\n this.#inspector.openInspector({\n messageId: this.messageId(),\n threadId: this.threadId(),\n agentId: this.agentId(),\n });\n this.clicked.emit();\n }\n\n protected hideShortcuts(): void {\n this.closeMenu();\n ɵinspectorShortcuts.hide();\n }\n\n protected cancelClose(): void {\n this.#menu.cancelClose();\n }\n\n protected scheduleClose(): void {\n this.#menu.scheduleClose();\n }\n\n protected onMenuFocusOut(event: FocusEvent): void {\n const next = event.relatedTarget as Node | null;\n if (!next) return;\n if (this.#overlayRef?.overlayElement.contains(next)) return;\n if (this._trigger()?.nativeElement.contains(next)) return;\n this.closeMenu();\n }\n\n private openMenu(): void {\n const trigger = this._trigger()?.nativeElement;\n if (!trigger) return;\n this.#menu.setOpen(true, trigger);\n }\n\n private closeMenu(): void {\n this.#menu.setOpen(false);\n }\n\n private attachOverlay(): void {\n const trigger = this._trigger()?.nativeElement;\n if (this.#overlayRef || !trigger) return;\n const positionStrategy = this.#overlay\n .position()\n .flexibleConnectedTo(trigger)\n .withPositions([\n {\n originX: \"start\",\n originY: \"top\",\n overlayX: \"start\",\n overlayY: \"bottom\",\n offsetY: -6,\n },\n {\n originX: \"start\",\n originY: \"bottom\",\n overlayX: \"start\",\n overlayY: \"top\",\n offsetY: 6,\n },\n ]);\n this.#overlayRef = this.#overlay.create({\n positionStrategy,\n scrollStrategy: this.#overlay.scrollStrategies.reposition(),\n });\n this.#overlayRef.attach(\n new TemplatePortal(this._menuTemplate(), this.#viewContainerRef),\n );\n this.#overlayRef.keydownEvents().subscribe((event) => {\n if (event.key !== \"Escape\") return;\n event.preventDefault();\n const hadFocus = this.#overlayRef?.overlayElement.contains(\n trigger.ownerDocument.activeElement,\n );\n this.closeMenu();\n if (hadFocus) this._trigger()?.nativeElement.focus();\n });\n }\n\n private detachOverlay(): void {\n this.#overlayRef?.dispose();\n this.#overlayRef = undefined;\n }\n}\n","/**\n * CSS for what only Angular renders: the components' host elements and a few\n * Angular-only parts. A custom element is inline by default, and React renders\n * no element in its place, so the shared CSS in `@copilotkit/core` does not\n * cover it.\n *\n * Every component that needs it lists this string in `styles`. Angular adds\n * one copy, also when `injectStyles` is `false`. The rules use the same cascade\n * layers and zero specificity as the shared CSS, so a class the app sets on the\n * element wins.\n */\nexport const hostStyles = `\n@layer theme, base, components, utilities;\n@layer base {\n :where(.dark [data-copilotkit], [data-copilotkit].dark) {\n --copilot-kit-error-background: #7f1d1d;\n --copilot-kit-error-border: #dc2626;\n --copilot-kit-error-text: #fca5a5;\n }\n}\n@layer utilities {\n :where(\n copilot-chat,\n copilot-chat-view,\n copilot-chat-input,\n copilot-chat-message-view,\n copilot-chat-user-message,\n copilot-chat-assistant-message,\n copilot-chat-reasoning-message,\n copilot-chat-suggestion-view,\n copilot-chat-attachment-queue\n ) {\n display: block;\n }\n :where(copilot-chat, copilot-chat-view) {\n height: 100%;\n min-height: 0;\n }\n :where(\n copilot-chat-input,\n copilot-chat-user-message,\n copilot-chat-assistant-message\n ) {\n width: 100%;\n }\n /* <div copilotChatToolbar> */\n :where(.copilot-chat-toolbar) {\n display: flex;\n width: 100%;\n height: 60px;\n align-items: center;\n justify-content: space-between;\n background-color: transparent;\n }\n}\n`;\n","import { Injectable, signal } from \"@angular/core\";\n\n@Injectable({ providedIn: \"root\" })\nexport class CopilotChatViewHandlers {\n // Assistant message handler availability\n hasAssistantThumbsUpHandler = signal(false);\n hasAssistantThumbsDownHandler = signal(false);\n hasAssistantReadAloudHandler = signal(false);\n hasAssistantRegenerateHandler = signal(false);\n\n // User message handler availability\n hasUserCopyHandler = signal(false);\n hasUserEditHandler = signal(false);\n}\n","import {\n Component,\n TemplateRef,\n ContentChild,\n signal,\n computed,\n Type,\n ChangeDetectionStrategy,\n ViewEncapsulation,\n Optional,\n Inject,\n inject,\n input,\n output,\n InjectionToken,\n} from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\nimport { CopilotSlot } from \"../../slots/copilot-slot\";\nimport { CopilotChatToolCallsView } from \"./copilot-chat-tool-calls-view\";\nimport { CopilotCollapsible } from \"../tools/tool-call-parts\";\nimport { TOOL_CALL_DISPLAY_CONTEXT } from \"./tool-call-display-context\";\nimport type { Message } from \"@ag-ui/core\";\nimport {\n type AssistantMessage,\n type CopilotChatAssistantMessageOnThumbsUpProps,\n type CopilotChatAssistantMessageOnThumbsDownProps,\n type CopilotChatAssistantMessageOnReadAloudProps,\n type CopilotChatAssistantMessageOnRegenerateProps,\n type AssistantMessageMarkdownRendererContext,\n type AssistantMessageCopyButtonContext,\n type ThumbsUpButtonContext,\n type ThumbsDownButtonContext,\n type ReadAloudButtonContext,\n type RegenerateButtonContext,\n type AssistantMessageToolbarContext,\n} from \"./copilot-chat-assistant-message.types\";\nimport { CopilotChatAssistantMessageRenderer } from \"./copilot-chat-assistant-message-renderer\";\nimport {\n CopilotChatAssistantMessageCopyButton,\n CopilotChatAssistantMessageThumbsUpButton,\n CopilotChatAssistantMessageThumbsDownButton,\n} from \"./copilot-chat-assistant-message-buttons\";\nimport { CopilotChatAssistantMessageToolbar } from \"./copilot-chat-assistant-message-toolbar\";\nimport {\n CopilotChatInspectorButton,\n inspectorShortcutsHidden,\n} from \"./copilot-chat-inspector-button\";\nimport { CopilotInspector } from \"../../inspector\";\nimport {\n ɵhasAssistantMessageText,\n ɵshouldShowAssistantToolbar,\n} from \"@copilotkit/core\";\nimport { COPILOT_CHAT_CONFIGURATION } from \"../../chat-configuration\";\nimport { cn } from \"../../utils\";\nimport { hostStyles } from \"../host-styles\";\nimport { CopilotChatViewHandlers } from \"./copilot-chat-view-handlers\";\n\n/**\n * @internal\n * The markdown renderer of an assistant message when the app gives none:\n * a secondary entry point (`@copilotkit/angular/generative-ui` with the\n * markdown transport) provides a component that renders the fences of the\n * message as surfaces. The component gets the\n * {@link AssistantMessageMarkdownRendererContext} as inputs.\n */\nexport const ɵCOPILOTKIT_ASSISTANT_MARKDOWN_RENDERER =\n new InjectionToken<Type<unknown> | null>(\n \"COPILOTKIT_ASSISTANT_MARKDOWN_RENDERER\",\n { factory: () => null },\n );\n\n@Component({\n selector: \"copilot-chat-assistant-message\",\n host: { \"data-copilotkit\": \"\" },\n imports: [\n CommonModule,\n CopilotSlot,\n CopilotChatAssistantMessageRenderer,\n CopilotChatAssistantMessageCopyButton,\n CopilotChatAssistantMessageToolbar,\n CopilotChatInspectorButton,\n CopilotChatToolCallsView,\n CopilotCollapsible,\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `\n <div\n [class]=\"computedClass()\"\n [attr.data-message-id]=\"message().id\"\n data-testid=\"copilot-assistant-message\"\n data-message-role=\"assistant\"\n role=\"article\"\n >\n <!-- In the \"turn\" display, text in a reply's working phase is narration:\n it fades once a call follows it and folds away with the work. -->\n @if (workTextDisplay()) {\n <div\n [copilotCollapsible]=\"workTextOpen() ?? true\"\n class=\"cpk-assistant-message-work-text\"\n >\n <div\n class=\"cpk-assistant-message-work-text-content\"\n [attr.data-work-text]=\"\n workTextOpen() === undefined ? 'reply' : 'narration'\n \"\n >\n <ng-container *ngTemplateOutlet=\"markdown\" />\n </div>\n </div>\n } @else {\n <ng-container *ngTemplateOutlet=\"markdown\" />\n }\n\n <ng-template #markdown>\n <!-- Markdown Renderer -->\n <div class=\"cpk-markdown cpk-assistant-message-markdown\">\n @if (\n markdownRendererTemplate ||\n markdownRendererComponent() ||\n defaultMarkdownRenderer\n ) {\n <copilot-slot\n [slot]=\"\n markdownRendererTemplate ||\n markdownRendererComponent() ||\n defaultMarkdownRenderer\n \"\n [context]=\"markdownRendererContext()\"\n [defaultComponent]=\"CopilotChatAssistantMessageRenderer\"\n >\n </copilot-slot>\n } @else {\n <copilot-chat-assistant-message-renderer\n [content]=\"message().content || ''\"\n [isStreaming]=\"isStreaming()\"\n [inputClass]=\"markdownRendererClass()\"\n >\n </copilot-chat-assistant-message-renderer>\n }\n </div>\n </ng-template>\n\n <!-- Tool Calls View -->\n @if (toolCallsViewTemplate || toolCallsViewComponent()) {\n <copilot-slot\n [slot]=\"toolCallsViewTemplate || toolCallsViewComponent()\"\n [context]=\"toolCallsViewContext()\"\n [defaultComponent]=\"CopilotChatToolCallsView\"\n >\n </copilot-slot>\n } @else if (message().toolCalls && message()!.toolCalls!.length > 0) {\n <copilot-chat-tool-calls-view\n [message]=\"message()!\"\n [messages]=\"messages()\"\n [agentId]=\"agentId()\"\n [isLoading]=\"isLoading()\"\n >\n </copilot-chat-tool-calls-view>\n }\n\n <!-- Toolbar: hidden while this message streams; needs text or the Inspector shortcut -->\n @if (shouldShowToolbar()) {\n @if (toolbarTemplate || toolbarComponent()) {\n <copilot-slot\n [slot]=\"toolbarTemplate || toolbarComponent()\"\n [context]=\"toolbarContext()\"\n [defaultComponent]=\"CopilotChatAssistantMessageToolbar\"\n >\n </copilot-slot>\n } @else {\n <div copilotChatAssistantMessageToolbar [inputClass]=\"toolbarClass()\">\n <div class=\"cpk-assistant-message-toolbar-items\">\n <!-- Copy button -->\n @if (copyButtonTemplate || copyButtonComponent()) {\n <copilot-slot\n [slot]=\"copyButtonTemplate || copyButtonComponent()\"\n [context]=\"{ content: message().content || '' }\"\n [defaultComponent]=\"CopilotChatAssistantMessageCopyButton\"\n [outputs]=\"copyButtonOutputs\"\n >\n </copilot-slot>\n } @else {\n <copilot-chat-assistant-message-copy-button\n [content]=\"message().content\"\n [inputClass]=\"copyButtonClass()\"\n (clicked)=\"handleCopy()\"\n >\n </copilot-chat-assistant-message-copy-button>\n }\n\n <!-- Thumbs up button - show if custom slot provided OR if handler available at top level -->\n @if (\n thumbsUpButtonComponent() ||\n thumbsUpButtonTemplate ||\n handlers.hasAssistantThumbsUpHandler()\n ) {\n <copilot-slot\n [slot]=\"thumbsUpButtonTemplate || thumbsUpButtonComponent()\"\n [context]=\"{}\"\n [defaultComponent]=\"defaultThumbsUpButtonComponent\"\n [outputs]=\"thumbsUpButtonOutputs\"\n >\n </copilot-slot>\n }\n\n <!-- Thumbs down button - show if custom slot provided OR if handler available at top level -->\n @if (\n thumbsDownButtonComponent() ||\n thumbsDownButtonTemplate ||\n handlers.hasAssistantThumbsDownHandler()\n ) {\n <copilot-slot\n [slot]=\"thumbsDownButtonTemplate || thumbsDownButtonComponent()\"\n [context]=\"{}\"\n [defaultComponent]=\"defaultThumbsDownButtonComponent\"\n [outputs]=\"thumbsDownButtonOutputs\"\n >\n </copilot-slot>\n }\n\n <!-- Read aloud button - only show if custom slot provided -->\n @if (readAloudButtonComponent() || readAloudButtonTemplate) {\n <copilot-slot\n [slot]=\"readAloudButtonTemplate || readAloudButtonComponent()\"\n [context]=\"{}\"\n [outputs]=\"readAloudButtonOutputs\"\n >\n </copilot-slot>\n }\n\n <!-- Regenerate button - only show if custom slot provided -->\n @if (regenerateButtonComponent() || regenerateButtonTemplate) {\n <copilot-slot\n [slot]=\"regenerateButtonTemplate || regenerateButtonComponent()\"\n [context]=\"{}\"\n [outputs]=\"regenerateButtonOutputs\"\n >\n </copilot-slot>\n }\n\n <!-- Additional toolbar items -->\n @if (additionalToolbarItems()) {\n <ng-container\n [ngTemplateOutlet]=\"additionalToolbarItems() || null\"\n ></ng-container>\n }\n\n <!-- Inspector shortcut, only while the Inspector is enabled -->\n <copilot-chat-inspector-button\n [messageId]=\"message().id\"\n [threadId]=\"chatConfiguration?.threadId()\"\n [agentId]=\"agentId() ?? chatConfiguration?.agentId()\"\n />\n </div>\n </div>\n }\n }\n </div>\n `,\n styles: [hostStyles],\n // Generated before build, test and type checking: KaTeX's CSS with only the\n // woff2 fonts, so the package embeds 20 font files instead of 60.\n styleUrl: \"./katex/katex.css\",\n})\nexport class CopilotChatAssistantMessage {\n // Capture templates from content projection\n @ContentChild(\"markdownRenderer\", { read: TemplateRef })\n markdownRendererTemplate?: TemplateRef<AssistantMessageMarkdownRendererContext>;\n @ContentChild(\"toolbar\", { read: TemplateRef })\n toolbarTemplate?: TemplateRef<AssistantMessageToolbarContext>;\n @ContentChild(\"copyButton\", { read: TemplateRef })\n copyButtonTemplate?: TemplateRef<AssistantMessageCopyButtonContext>;\n @ContentChild(\"thumbsUpButton\", { read: TemplateRef })\n thumbsUpButtonTemplate?: TemplateRef<ThumbsUpButtonContext>;\n @ContentChild(\"thumbsDownButton\", { read: TemplateRef })\n thumbsDownButtonTemplate?: TemplateRef<ThumbsDownButtonContext>;\n @ContentChild(\"readAloudButton\", { read: TemplateRef })\n readAloudButtonTemplate?: TemplateRef<ReadAloudButtonContext>;\n @ContentChild(\"regenerateButton\", { read: TemplateRef })\n regenerateButtonTemplate?: TemplateRef<RegenerateButtonContext>;\n @ContentChild(\"toolCallsView\", { read: TemplateRef })\n toolCallsViewTemplate?: TemplateRef<any>;\n\n // Class inputs for styling default components\n readonly markdownRendererClass = input<string | undefined>(undefined);\n readonly toolbarClass = input<string | undefined>(undefined);\n readonly copyButtonClass = input<string | undefined>(undefined);\n readonly thumbsUpButtonClass = input<string | undefined>(undefined);\n readonly thumbsDownButtonClass = input<string | undefined>(undefined);\n readonly readAloudButtonClass = input<string | undefined>(undefined);\n readonly regenerateButtonClass = input<string | undefined>(undefined);\n readonly toolCallsViewClass = input<string | undefined>(undefined);\n\n // Component inputs for overrides\n readonly markdownRendererComponent = input<Type<any> | undefined>(undefined);\n readonly toolbarComponent = input<Type<any> | undefined>(undefined);\n readonly copyButtonComponent = input<Type<any> | undefined>(undefined);\n readonly thumbsUpButtonComponent = input<Type<any> | undefined>(undefined);\n readonly thumbsDownButtonComponent = input<Type<any> | undefined>(undefined);\n readonly readAloudButtonComponent = input<Type<any> | undefined>(undefined);\n readonly regenerateButtonComponent = input<Type<any> | undefined>(undefined);\n readonly toolCallsViewComponent = input<Type<any> | undefined>(undefined);\n\n // Regular inputs\n readonly message = input.required<AssistantMessage>();\n readonly messages = input<Message[]>([]);\n readonly agentId = input<string | undefined>();\n readonly isLoading = input<boolean>(false);\n readonly additionalToolbarItems = input<TemplateRef<any> | undefined>(\n undefined,\n );\n readonly toolbarVisible = input<boolean>(true);\n readonly inputClass = input<string | undefined>(undefined);\n\n // DI service exposes handler availability scoped to CopilotChatView\n // Make it optional with a default fallback for testing\n handlers: CopilotChatViewHandlers;\n protected readonly chatConfiguration = inject(COPILOT_CHAT_CONFIGURATION, {\n optional: true,\n });\n\n constructor(\n @Optional()\n @Inject(CopilotChatViewHandlers)\n handlers?: CopilotChatViewHandlers | null,\n ) {\n this.handlers = handlers || new CopilotChatViewHandlers();\n }\n\n // Output events\n thumbsUp = output<CopilotChatAssistantMessageOnThumbsUpProps>();\n thumbsDown = output<CopilotChatAssistantMessageOnThumbsDownProps>();\n readAloud = output<CopilotChatAssistantMessageOnReadAloudProps>();\n regenerate = output<CopilotChatAssistantMessageOnRegenerateProps>();\n\n // Signals\n customClass = signal<string | undefined>(undefined);\n\n // Computed values\n computedClass = computed(() => {\n return cn(\n \"copilotKitMessage copilotKitAssistantMessage\",\n this.customClass(),\n this.inputClass(),\n );\n });\n\n // Default components\n protected readonly defaultThumbsUpButtonComponent =\n CopilotChatAssistantMessageThumbsUpButton;\n protected readonly defaultThumbsDownButtonComponent =\n CopilotChatAssistantMessageThumbsDownButton;\n protected readonly CopilotChatAssistantMessageRenderer =\n CopilotChatAssistantMessageRenderer;\n protected readonly CopilotChatAssistantMessageToolbar =\n CopilotChatAssistantMessageToolbar;\n protected readonly CopilotChatAssistantMessageCopyButton =\n CopilotChatAssistantMessageCopyButton;\n protected readonly CopilotChatToolCallsView = CopilotChatToolCallsView;\n\n // Like React: only the latest assistant message streams while running.\n readonly isStreaming = computed(() => {\n const messages = this.messages();\n return (\n this.isLoading() &&\n messages[messages.length - 1]?.id === this.message().id\n );\n });\n\n // Context for slots (reactive via signals)\n markdownRendererContext = computed<AssistantMessageMarkdownRendererContext>(\n () => ({\n content: this.message()?.content || \"\",\n messageId: this.message()?.id,\n isStreaming: this.isStreaming(),\n }),\n );\n /** The renderer a secondary entry point provides, or null. */\n protected readonly defaultMarkdownRenderer: Type<unknown> | undefined =\n inject(ɵCOPILOTKIT_ASSISTANT_MARKDOWN_RENDERER, { optional: true }) ??\n undefined;\n\n // Output maps for slots\n copyButtonOutputs = { clicked: () => this.handleCopy() };\n thumbsUpButtonOutputs = { clicked: () => this.handleThumbsUp() };\n thumbsDownButtonOutputs = { clicked: () => this.handleThumbsDown() };\n readAloudButtonOutputs = { clicked: () => this.handleReadAloud() };\n regenerateButtonOutputs = { clicked: () => this.handleRegenerate() };\n\n toolbarContext = computed<AssistantMessageToolbarContext>(() => ({\n children: null, // Will be populated by the toolbar content\n }));\n\n // Return true if assistant message has non-empty text content\n hasMessageContent() {\n return ɵhasAssistantMessageText(this.message()?.content);\n }\n\n readonly #inspector = inject(CopilotInspector);\n readonly #toolCallDisplay = inject(TOOL_CALL_DISPLAY_CONTEXT, {\n optional: true,\n });\n /** Inside a message view with the `\"turn\"` tool-call display. */\n protected readonly workTextDisplay = computed(\n () => this.#toolCallDisplay?.display() === \"turn\",\n );\n /** `\"turn\"` display: whether this message's narration shows, or `undefined` for the reply. */\n protected readonly workTextOpen = computed(() =>\n this.#toolCallDisplay?.workTextOpen().get(this.message().id),\n );\n\n /** Core's toolbar rule: also hides it while the latest message streams. */\n readonly shouldShowToolbar = computed(() =>\n ɵshouldShowAssistantToolbar({\n toolbarVisible: this.toolbarVisible(),\n hasContent: this.hasMessageContent(),\n showInspectorShortcut:\n this.#inspector.isInspectorEnabled && !inspectorShortcutsHidden(),\n isRunning: this.isLoading(),\n isLatest: this.messages().at(-1)?.id === this.message().id,\n }),\n );\n\n toolCallsViewContext = computed(() => ({\n message: this.message(),\n messages: this.messages(),\n isLoading: this.isLoading(),\n }));\n\n handleCopy(): void {\n // Copy is handled by the button component itself\n // This is just for any additional logic if needed\n }\n\n handleThumbsUp(): void {\n this.thumbsUp.emit({ message: this.message() });\n }\n\n handleThumbsDown(): void {\n this.thumbsDown.emit({ message: this.message() });\n }\n\n handleReadAloud(): void {\n this.readAloud.emit({ message: this.message() });\n }\n\n handleRegenerate(): void {\n this.regenerate.emit({ message: this.message() });\n }\n}\n","import {\n Component,\n input,\n ChangeDetectionStrategy,\n ViewEncapsulation,\n computed,\n} from \"@angular/core\";\n\nimport { cn } from \"../../utils\";\n\n@Component({\n selector: \"copilot-chat-user-message-renderer\",\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n \"[class]\": \"computedClass()\",\n },\n // No whitespace around the content: the bubble keeps it (pre-wrap).\n template: `\n {{ content() }}\n `,\n})\nexport class CopilotChatUserMessageRenderer {\n readonly content = input<string>(\"\");\n readonly inputClass = input<string | undefined>();\n\n readonly computedClass = computed(() => {\n return cn(\"cpk-user-message-bubble\", this.inputClass());\n });\n}\n","import {\n Component,\n input,\n output,\n computed,\n ChangeDetectionStrategy,\n ViewEncapsulation,\n} from \"@angular/core\";\n\nimport { Check, CopilotIcon, Copy, Edit } from \"../icons/copilot-icon\";\nimport { CopilotTooltip } from \"../../directives/tooltip\";\nimport { cn } from \"../../utils\";\nimport { injectChatLabels } from \"../../chat-config\";\nimport { injectCopyFeedback } from \"./copy-feedback\";\n\n// Base toolbar button component\n@Component({\n selector: \"button[copilotChatUserMessageToolbarButton]\",\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `\n <ng-content></ng-content>\n `,\n host: {\n \"[class]\": \"computedClass()\",\n \"[attr.disabled]\": \"disabled() ? true : null\",\n type: \"button\",\n \"[attr.aria-label]\": \"title()\",\n },\n hostDirectives: [\n {\n directive: CopilotTooltip,\n inputs: [\"copilotTooltip: title\", \"tooltipPosition\", \"tooltipDelay\"],\n },\n ],\n})\nexport class CopilotChatUserMessageToolbarButton {\n title = input<string>(\"\");\n disabled = input<boolean>(false);\n inputClass = input<string | undefined>();\n\n computedClass = computed(() => {\n return cn(\n \"cpk-button cpk-button-assistant-message-toolbar cpk-button-size-default\",\n this.inputClass(),\n );\n });\n}\n\n// Copy button component\n@Component({\n selector: \"copilot-chat-user-message-copy-button\",\n imports: [CopilotIcon, CopilotChatUserMessageToolbarButton],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `\n <button\n copilotChatUserMessageToolbarButton\n [title]=\"title() || labels.userMessageToolbarCopyMessageLabel\"\n [disabled]=\"disabled()\"\n [inputClass]=\"inputClass()\"\n (click)=\"handleCopy()\"\n >\n @if (copied()) {\n <copilot-icon\n [img]=\"CheckIcon\"\n iconClass=\"cpk-user-message-toolbar-icon\"\n ></copilot-icon>\n } @else {\n <copilot-icon\n [img]=\"CopyIcon\"\n iconClass=\"cpk-user-message-toolbar-icon\"\n ></copilot-icon>\n }\n </button>\n `,\n})\nexport class CopilotChatUserMessageCopyButton {\n readonly title = input<string | undefined>();\n readonly disabled = input<boolean>(false);\n readonly inputClass = input<string | undefined>();\n readonly content = input<string | undefined>();\n readonly clicked = output();\n readonly CopyIcon = Copy;\n readonly CheckIcon = Check;\n readonly #copyFeedback = injectCopyFeedback();\n readonly copied = this.#copyFeedback.copied;\n readonly labels = injectChatLabels();\n\n handleCopy(): void {\n void this.#copyFeedback.copy(this.content() ?? \"\").then((copied) => {\n if (copied) this.clicked.emit();\n });\n }\n}\n\n// Edit button component\n@Component({\n selector: \"copilot-chat-user-message-edit-button\",\n imports: [CopilotIcon, CopilotChatUserMessageToolbarButton],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `\n <button\n copilotChatUserMessageToolbarButton\n [title]=\"title() || labels.userMessageToolbarEditMessageLabel\"\n [disabled]=\"disabled()\"\n [inputClass]=\"inputClass()\"\n (click)=\"handleEdit()\"\n >\n <copilot-icon\n [img]=\"EditIcon\"\n iconClass=\"cpk-user-message-toolbar-icon\"\n ></copilot-icon>\n </button>\n `,\n})\nexport class CopilotChatUserMessageEditButton {\n title = input<string | undefined>();\n disabled = input<boolean>(false);\n inputClass = input<string | undefined>();\n clicked = output();\n\n readonly EditIcon = Edit;\n readonly labels = injectChatLabels();\n\n handleEdit(): void {\n if (!this.disabled()) {\n this.clicked.emit();\n }\n }\n}\n","import {\n Component,\n input,\n computed,\n ChangeDetectionStrategy,\n ViewEncapsulation,\n} from \"@angular/core\";\n\nimport { cn } from \"../../utils\";\n\n@Component({\n selector: \"div[copilotChatUserMessageToolbar]\",\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `\n <ng-content></ng-content>\n `,\n host: {\n \"[class]\": \"computedClass()\",\n },\n})\nexport class CopilotChatUserMessageToolbar {\n readonly inputClass = input<string | undefined>();\n\n readonly computedClass = computed(() =>\n cn(\"cpk-user-message-toolbar\", this.inputClass()),\n );\n}\n","import {\n Component,\n input,\n output,\n ChangeDetectionStrategy,\n ViewEncapsulation,\n computed,\n} from \"@angular/core\";\n\nimport { ChevronLeft, ChevronRight, CopilotIcon } from \"../icons/copilot-icon\";\nimport { type CopilotChatUserMessageOnSwitchToBranchProps } from \"./copilot-chat-user-message.types\";\nimport { cn } from \"../../utils\";\nimport { injectChatLabels } from \"../../chat-config\";\nimport { ɵgetBranchNavState } from \"@copilotkit/core\";\nimport { UserMessage } from \"@ag-ui/core\";\n\n@Component({\n selector: \"copilot-chat-user-message-branch-navigation\",\n imports: [CopilotIcon],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `\n @if (showNavigation()) {\n <div data-testid=\"copilot-branch-navigation\" [class]=\"computedClass()\">\n <button\n type=\"button\"\n [attr.aria-label]=\"labels.userMessageToolbarPreviousBranchLabel\"\n [class]=\"buttonClass\"\n [disabled]=\"!canGoPrev()\"\n (click)=\"handlePrevious()\"\n >\n <copilot-icon\n [img]=\"ChevronLeftIcon\"\n iconClass=\"cpk-user-message-branch-icon\"\n ></copilot-icon>\n </button>\n <span class=\"cpk-user-message-branch-counter\">\n {{ currentBranch() + 1 }}/{{ numberOfBranches() }}\n </span>\n <button\n type=\"button\"\n [attr.aria-label]=\"labels.userMessageToolbarNextBranchLabel\"\n [class]=\"buttonClass\"\n [disabled]=\"!canGoNext()\"\n (click)=\"handleNext()\"\n >\n <copilot-icon\n [img]=\"ChevronRightIcon\"\n iconClass=\"cpk-user-message-branch-icon\"\n ></copilot-icon>\n </button>\n </div>\n }\n `,\n})\nexport class CopilotChatUserMessageBranchNavigation {\n currentBranch = input<number>(0);\n numberOfBranches = input<number>(1);\n /**\n * Whether something handles `switchToBranch`, so the branch arrows can work.\n * With `false` the branch navigation stays hidden, as React and Vue hide it\n * without an `onSwitchToBranch` handler. An Angular `output()` cannot tell\n * whether a listener is bound, so this defaults to `true`: navigation shows\n * whenever there is more than one branch.\n */\n branchSwitchEnabled = input<boolean>(true);\n message = input<UserMessage>();\n inputClass = input<string | undefined>();\n switchToBranch = output<CopilotChatUserMessageOnSwitchToBranchProps>();\n\n readonly ChevronLeftIcon = ChevronLeft;\n readonly ChevronRightIcon = ChevronRight;\n readonly labels = injectChatLabels();\n\n readonly buttonClass =\n \"cpk-button cpk-button-assistant-message-toolbar cpk-button-size-default cpk-user-message-branch-button\";\n\n readonly #navState = computed(() =>\n ɵgetBranchNavState({\n branchIndex: this.currentBranch(),\n numberOfBranches: this.numberOfBranches(),\n canSwitch: this.branchSwitchEnabled(),\n }),\n );\n\n showNavigation = computed(() => this.#navState().show);\n\n canGoPrev = computed(() => this.#navState().canGoPrev);\n\n canGoNext = computed(() => this.#navState().canGoNext);\n\n computedClass = computed(() => {\n return cn(\"cpk-user-message-branch-navigation\", this.inputClass());\n });\n\n handlePrevious(): void {\n if (this.canGoPrev()) {\n const newIndex = this.currentBranch() - 1;\n this.switchToBranch.emit({\n branchIndex: newIndex,\n numberOfBranches: this.numberOfBranches(),\n message: this.message()!,\n });\n }\n }\n\n handleNext(): void {\n if (this.canGoNext()) {\n const newIndex = this.currentBranch() + 1;\n this.switchToBranch.emit({\n branchIndex: newIndex,\n numberOfBranches: this.numberOfBranches(),\n message: this.message()!,\n });\n }\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ComponentRef,\n DestroyRef,\n DOCUMENT,\n ElementRef,\n TemplateRef,\n ViewContainerRef,\n ViewEncapsulation,\n inject,\n input,\n output,\n afterNextRender,\n signal,\n viewChild,\n} from \"@angular/core\";\nimport { NgTemplateOutlet } from \"@angular/common\";\nimport { A11yModule } from \"@angular/cdk/a11y\";\nimport { Overlay, OverlayRef } from \"@angular/cdk/overlay\";\nimport { ComponentPortal } from \"@angular/cdk/portal\";\nimport { CopilotIcon, X } from \"../icons/copilot-icon\";\nimport { ɵmorphViewTransition } from \"@copilotkit/core\";\nimport { injectChatLabels } from \"../../chat-config\";\n\n/**\n * A full-screen preview, like React's `<Lightbox>`. It closes on Escape, a\n * click on the backdrop, or its close button, which is named by\n * `labels.attachmentPreviewCloseButtonLabel`. It is a modal dialog: focus\n * moves to the close button, stays inside, and returns to the opener.\n */\n@Component({\n selector: \"copilot-chat-lightbox\",\n imports: [A11yModule, CopilotIcon, NgTemplateOutlet],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `\n <div\n class=\"cpk-attachment-lightbox\"\n role=\"dialog\"\n aria-modal=\"true\"\n [attr.aria-label]=\"label() || null\"\n cdkTrapFocus\n (click)=\"closed.emit()\"\n >\n <button\n #closeButton\n type=\"button\"\n class=\"cpk-attachment-lightbox-close-button\"\n [attr.aria-label]=\"labels.attachmentPreviewCloseButtonLabel\"\n (click)=\"closed.emit()\"\n >\n <copilot-icon\n [img]=\"XIcon\"\n iconClass=\"cpk-attachment-lightbox-close-icon\"\n ></copilot-icon>\n </button>\n <div (click)=\"$event.stopPropagation()\">\n <ng-container [ngTemplateOutlet]=\"content()\"></ng-container>\n </div>\n </div>\n `,\n})\nexport class CopilotChatLightbox {\n readonly content = input.required<TemplateRef<unknown>>();\n /** The dialog's accessible name. */\n readonly label = input<string>();\n readonly closed = output();\n readonly labels = injectChatLabels();\n readonly XIcon = X;\n private readonly closeButton =\n viewChild.required<ElementRef<HTMLButtonElement>>(\"closeButton\");\n\n constructor() {\n afterNextRender(() => this.closeButton().nativeElement.focus());\n }\n}\n\nlet nextTransitionName = 0;\n\n/**\n * Opens a template in a `CopilotChatLightbox` on `document.body`, like\n * React's `useLightbox()`. Where the browser supports view transitions, the\n * thumbnail morphs into the preview: `view-transition-name` sits on the\n * thumbnail before the change and on the preview (`transitionName`) after it.\n * Call it in an injection context.\n */\nexport function injectLightbox() {\n const overlay = inject(Overlay);\n const viewContainerRef = inject(ViewContainerRef);\n const document = inject(DOCUMENT);\n const transitionName = `cpk-lightbox-${nextTransitionName++}`;\n const isOpen = signal(false);\n let overlayRef: OverlayRef | undefined;\n let thumbnail: HTMLElement | undefined;\n let focusedBefore: HTMLElement | undefined;\n\n const attach = (content: TemplateRef<unknown>, label: string) => {\n focusedBefore = document.activeElement as HTMLElement | undefined;\n overlayRef = overlay.create();\n const ref: ComponentRef<CopilotChatLightbox> = overlayRef.attach(\n new ComponentPortal(CopilotChatLightbox, viewContainerRef),\n );\n ref.setInput(\"content\", content);\n ref.setInput(\"label\", label);\n ref.instance.closed.subscribe(() => close());\n overlayRef.keydownEvents().subscribe((event) => {\n if (event.key === \"Escape\") close();\n });\n // Render now, so a view transition sees the new state.\n ref.changeDetectorRef.detectChanges();\n isOpen.set(true);\n };\n\n const detach = () => {\n const ref = overlayRef;\n overlayRef = undefined;\n ref?.dispose();\n isOpen.set(false);\n // Return focus to the control that opened the preview.\n if (ref && focusedBefore?.isConnected) focusedBefore.focus();\n focusedBefore = undefined;\n };\n\n /** Opens `content`. `opener` is the thumbnail it morphs from. */\n function open(\n content: TemplateRef<unknown>,\n label: string,\n opener?: HTMLElement,\n ): void {\n if (overlayRef) return;\n thumbnail = opener;\n ɵmorphViewTransition(\n opener,\n transitionName,\n () => attach(content, label),\n \"open\",\n );\n }\n\n function close(): void {\n if (!overlayRef) return;\n ɵmorphViewTransition(thumbnail, transitionName, detach, \"close\");\n }\n\n inject(DestroyRef).onDestroy(detach);\n\n return { isOpen: isOpen.asReadonly(), transitionName, open, close };\n}\n\nexport type CopilotChatLightboxRef = ReturnType<typeof injectLightbox>;\n","import {\n ChangeDetectionStrategy,\n Component,\n computed,\n input,\n signal,\n ViewEncapsulation,\n} from \"@angular/core\";\nimport type {\n AttachmentModality,\n InputContentSource,\n} from \"@copilotkit/shared\";\nimport { getDocumentIcon, getSourceUrl } from \"@copilotkit/shared\";\nimport { cn } from \"../../utils\";\nimport { injectChatLabels } from \"../../chat-config\";\nimport { injectLightbox } from \"./copilot-chat-lightbox\";\n\n@Component({\n selector: \"copilot-chat-attachment-renderer\",\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: { \"data-copilotkit\": \"\" },\n template: `\n @switch (type()) {\n @case (\"image\") {\n @if (imageFailed()) {\n <div [class]=\"failedImageClass()\">\n <span>{{ labels.attachmentImageLoadErrorText }}</span>\n </div>\n } @else {\n <button\n #thumbnail\n type=\"button\"\n class=\"cpk-attachment-lightbox-trigger\"\n (click)=\"\n lightbox.open(imagePreview, labels.attachmentImageAltText, thumbnail)\n \"\n >\n <img\n [src]=\"sourceUrl()\"\n [alt]=\"labels.attachmentImageAltText\"\n [class]=\"imageClass()\"\n (error)=\"imageFailed.set(true)\"\n />\n </button>\n <ng-template #imagePreview>\n <img\n [style.view-transition-name]=\"lightbox.transitionName\"\n [src]=\"sourceUrl()\"\n [alt]=\"labels.attachmentImageAltText\"\n class=\"cpk-attachment-renderer-lightbox-image\"\n />\n </ng-template>\n }\n }\n @case (\"audio\") {\n <div [class]=\"audioClass()\">\n <audio\n [src]=\"sourceUrl()\"\n controls\n preload=\"metadata\"\n class=\"cpk-attachment-renderer-audio-player\"\n ></audio>\n @if (filename()) {\n <span class=\"cpk-attachment-renderer-audio-filename\">\n {{ filename() }}\n </span>\n }\n </div>\n }\n @case (\"video\") {\n <video\n [src]=\"sourceUrl()\"\n controls\n preload=\"metadata\"\n [class]=\"videoClass()\"\n ></video>\n }\n @default {\n <!-- download works for same-origin, data: and blob: URLs; target=\"_blank\"\n opens other files in a new tab instead of leaving the chat. -->\n <a\n [href]=\"sourceUrl()\"\n [attr.download]=\"filename() ?? ''\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n [attr.aria-label]=\"\n filename() || source().mimeType || labels.attachmentDocumentAltText\n \"\n [class]=\"documentClass()\"\n >\n <span class=\"cpk-attachment-renderer-document-icon\">\n {{ documentIcon() }}\n </span>\n <span class=\"cpk-attachment-renderer-document-name\">\n {{\n filename() || source().mimeType || labels.attachmentUnknownTypeText\n }}\n </span>\n </a>\n }\n }\n `,\n})\nexport class CopilotChatAttachmentRenderer {\n readonly type = input.required<AttachmentModality>();\n readonly source = input.required<InputContentSource>();\n readonly filename = input<string | undefined>();\n readonly inputClass = input<string | undefined>();\n\n readonly imageFailed = signal(false);\n readonly labels = injectChatLabels();\n /** Opens the image full screen. */\n readonly lightbox = injectLightbox();\n readonly sourceUrl = computed(() => getSourceUrl(this.source()));\n readonly documentIcon = computed(() =>\n getDocumentIcon(this.source().mimeType ?? \"\"),\n );\n\n readonly imageClass = computed(() =>\n cn(\n \"cpk-attachment-renderer cpk-attachment-renderer-image\",\n this.inputClass(),\n ),\n );\n readonly failedImageClass = computed(() =>\n cn(\n \"cpk-attachment-renderer cpk-attachment-renderer-image-error\",\n this.inputClass(),\n ),\n );\n readonly audioClass = computed(() =>\n cn(\n \"cpk-attachment-renderer cpk-attachment-renderer-audio\",\n this.inputClass(),\n ),\n );\n readonly videoClass = computed(() =>\n cn(\n \"cpk-attachment-renderer cpk-attachment-renderer-video\",\n this.inputClass(),\n ),\n );\n readonly documentClass = computed(() =>\n cn(\n \"cpk-attachment-renderer cpk-attachment-renderer-document\",\n this.inputClass(),\n ),\n );\n}\n","import {\n Component,\n input,\n output,\n TemplateRef,\n ContentChild,\n computed,\n Type,\n ChangeDetectionStrategy,\n ViewEncapsulation,\n} from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\nimport { CopilotSlot } from \"../../slots/copilot-slot\";\nimport {\n type CopilotChatUserMessageOnEditMessageProps,\n type CopilotChatUserMessageOnSwitchToBranchProps,\n type MessageRendererContext,\n type CopyButtonContext,\n type EditButtonContext,\n type BranchNavigationContext,\n type UserMessageToolbarContext,\n} from \"./copilot-chat-user-message.types\";\nimport { CopilotChatUserMessageRenderer } from \"./copilot-chat-user-message-renderer\";\nimport {\n CopilotChatUserMessageCopyButton,\n CopilotChatUserMessageEditButton,\n} from \"./copilot-chat-user-message-buttons\";\nimport { CopilotChatUserMessageToolbar } from \"./copilot-chat-user-message-toolbar\";\nimport { CopilotChatUserMessageBranchNavigation } from \"./copilot-chat-user-message-branch-navigation\";\nimport { cn } from \"../../utils\";\nimport { hostStyles } from \"../host-styles\";\nimport { UserMessage } from \"@ag-ui/core\";\nimport { CopilotChatAttachmentRenderer } from \"./copilot-chat-attachment-renderer\";\nimport {\n ɵflattenUserMessageContent,\n ɵgetBranchNavState,\n ɵgetUserMessageMediaFilename,\n ɵgetUserMessageMediaParts,\n} from \"@copilotkit/core\";\nimport type { ɵUserMessageMediaPart } from \"@copilotkit/core\";\n\n@Component({\n selector: \"copilot-chat-user-message\",\n host: { \"data-copilotkit\": \"\" },\n styles: [hostStyles],\n imports: [\n CommonModule,\n CopilotSlot,\n CopilotChatUserMessageRenderer,\n CopilotChatUserMessageCopyButton,\n CopilotChatUserMessageEditButton,\n CopilotChatUserMessageToolbar,\n CopilotChatUserMessageBranchNavigation,\n CopilotChatAttachmentRenderer,\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `\n <div\n [class]=\"computedClass()\"\n [attr.data-message-id]=\"message()?.id\"\n data-message-role=\"user\"\n role=\"article\"\n >\n @if (mediaParts().length > 0) {\n <div class=\"cpk-user-message-attachments\">\n @for (part of mediaParts(); track $index) {\n <copilot-chat-attachment-renderer\n [type]=\"part.type\"\n [source]=\"part.source\"\n [filename]=\"filenameFor(part)\"\n />\n }\n </div>\n }\n\n <!-- Message Renderer -->\n @if (messageRendererTemplate || messageRendererComponent()) {\n <copilot-slot\n [slot]=\"messageRendererTemplate || messageRendererComponent()\"\n [context]=\"messageRendererContext()\"\n [defaultComponent]=\"CopilotChatUserMessageRenderer\"\n >\n </copilot-slot>\n } @else {\n <copilot-chat-user-message-renderer\n [content]=\"flattenedContent()\"\n [inputClass]=\"messageRendererClass()\"\n >\n </copilot-chat-user-message-renderer>\n }\n\n <!-- Toolbar -->\n @if (toolbarTemplate || toolbarComponent()) {\n <copilot-slot\n [slot]=\"toolbarTemplate || toolbarComponent()\"\n [context]=\"toolbarContext()\"\n [defaultComponent]=\"CopilotChatUserMessageToolbar\"\n >\n </copilot-slot>\n } @else {\n <div copilotChatUserMessageToolbar [inputClass]=\"toolbarClass()\">\n <div class=\"cpk-user-message-toolbar-items\">\n <!-- Additional toolbar items -->\n @if (additionalToolbarItems()) {\n <ng-container\n [ngTemplateOutlet]=\"additionalToolbarItems() || null\"\n ></ng-container>\n }\n\n <!-- Copy button -->\n @if (copyButtonTemplate || copyButtonComponent()) {\n <copilot-slot\n [slot]=\"copyButtonTemplate || copyButtonComponent()\"\n [context]=\"{ content: flattenedContent() }\"\n [outputs]=\"copyButtonOutputs\"\n [defaultComponent]=\"CopilotChatUserMessageCopyButton\"\n >\n </copilot-slot>\n } @else {\n <copilot-chat-user-message-copy-button\n [content]=\"flattenedContent()\"\n [inputClass]=\"copyButtonClass()\"\n (clicked)=\"handleCopy()\"\n >\n </copilot-chat-user-message-copy-button>\n }\n\n <!-- Edit button -->\n @if (true) {\n @if (editButtonTemplate || editButtonComponent()) {\n <copilot-slot\n [slot]=\"editButtonTemplate || editButtonComponent()\"\n [context]=\"{}\"\n [outputs]=\"editButtonOutputs\"\n [defaultComponent]=\"CopilotChatUserMessageEditButton\"\n >\n </copilot-slot>\n } @else {\n <copilot-chat-user-message-edit-button\n [inputClass]=\"editButtonClass()\"\n (clicked)=\"handleEdit()\"\n >\n </copilot-chat-user-message-edit-button>\n }\n }\n\n <!-- Branch navigation -->\n @if (showBranchNavigation()) {\n @if (branchNavigationTemplate || branchNavigationComponent()) {\n <copilot-slot\n [slot]=\"branchNavigationTemplate || branchNavigationComponent()\"\n [context]=\"branchNavigationContext()\"\n [defaultComponent]=\"CopilotChatUserMessageBranchNavigation\"\n >\n </copilot-slot>\n } @else {\n <copilot-chat-user-message-branch-navigation\n [currentBranch]=\"branchIndexValue()\"\n [numberOfBranches]=\"numberOfBranchesValue()\"\n [branchSwitchEnabled]=\"branchSwitchEnabled()\"\n [message]=\"message()!\"\n [inputClass]=\"branchNavigationClass()\"\n (switchToBranch)=\"handleSwitchToBranch($event)\"\n >\n </copilot-chat-user-message-branch-navigation>\n }\n }\n </div>\n </div>\n }\n </div>\n `,\n})\nexport class CopilotChatUserMessage {\n // Capture templates from content projection\n @ContentChild(\"messageRenderer\", { read: TemplateRef })\n messageRendererTemplate?: TemplateRef<MessageRendererContext>;\n @ContentChild(\"toolbar\", { read: TemplateRef })\n toolbarTemplate?: TemplateRef<UserMessageToolbarContext>;\n @ContentChild(\"copyButton\", { read: TemplateRef })\n copyButtonTemplate?: TemplateRef<CopyButtonContext>;\n @ContentChild(\"editButton\", { read: TemplateRef })\n editButtonTemplate?: TemplateRef<EditButtonContext>;\n @ContentChild(\"branchNavigation\", { read: TemplateRef })\n branchNavigationTemplate?: TemplateRef<BranchNavigationContext>;\n\n // Props for tweaking default components\n messageRendererClass = input<string | undefined>();\n toolbarClass = input<string | undefined>();\n copyButtonClass = input<string | undefined>();\n editButtonClass = input<string | undefined>();\n branchNavigationClass = input<string | undefined>();\n\n // Component inputs for overrides\n messageRendererComponent = input<Type<any> | undefined>();\n toolbarComponent = input<Type<any> | undefined>();\n copyButtonComponent = input<Type<any> | undefined>();\n editButtonComponent = input<Type<any> | undefined>();\n branchNavigationComponent = input<Type<any> | undefined>();\n\n // Regular inputs\n message = input<UserMessage>();\n branchIndex = input<number | undefined>();\n numberOfBranches = input<number | undefined>();\n /**\n * Whether something handles `switchToBranch`, so the branch arrows can work.\n * With `false` the branch navigation stays hidden, as React and Vue hide it\n * without an `onSwitchToBranch` handler. An Angular `output()` cannot tell\n * whether a listener is bound, so this defaults to `true`: navigation shows\n * whenever there is more than one branch.\n */\n branchSwitchEnabled = input<boolean>(true);\n additionalToolbarItems = input<TemplateRef<any> | undefined>();\n inputClass = input<string | undefined>();\n\n // Output events\n editMessage = output<CopilotChatUserMessageOnEditMessageProps>();\n switchToBranch = output<CopilotChatUserMessageOnSwitchToBranchProps>();\n\n // Derived values\n branchIndexValue = computed(() => this.branchIndex() ?? 0);\n numberOfBranchesValue = computed(() => this.numberOfBranches() ?? 1);\n\n // Default components\n CopilotChatUserMessageRenderer = CopilotChatUserMessageRenderer;\n CopilotChatUserMessageToolbar = CopilotChatUserMessageToolbar;\n CopilotChatUserMessageCopyButton = CopilotChatUserMessageCopyButton;\n CopilotChatUserMessageEditButton = CopilotChatUserMessageEditButton;\n CopilotChatUserMessageBranchNavigation =\n CopilotChatUserMessageBranchNavigation;\n\n // Computed values\n showBranchNavigation = computed(\n () =>\n ɵgetBranchNavState({\n branchIndex: this.branchIndexValue(),\n numberOfBranches: this.numberOfBranchesValue(),\n canSwitch: this.branchSwitchEnabled(),\n }).show,\n );\n\n computedClass = computed(() =>\n cn(\n \"copilotKitMessage copilotKitUserMessage cpk-user-message\",\n this.inputClass(),\n ),\n );\n\n // Context for slots (reactive via signals)\n flattenedContent = computed(() =>\n ɵflattenUserMessageContent(this.message()?.content),\n );\n mediaParts = computed(() =>\n ɵgetUserMessageMediaParts(this.message()?.content),\n );\n\n messageRendererContext = computed<MessageRendererContext>(() => ({\n content: this.flattenedContent(),\n }));\n\n // Output maps for slots\n copyButtonOutputs = { clicked: () => this.handleCopy() };\n editButtonOutputs = { clicked: () => this.handleEdit() };\n\n branchNavigationContext = computed<BranchNavigationContext>(() => ({\n currentBranch: this.branchIndexValue(),\n numberOfBranches: this.numberOfBranchesValue(),\n onSwitchToBranch: (props) => this.handleSwitchToBranch(props),\n message: this.message()!,\n }));\n\n toolbarContext = computed<UserMessageToolbarContext>(() => ({\n children: null, // Will be populated by the toolbar content\n }));\n\n handleCopy(): void {\n // Copy is handled by the button component itself\n // This is just for any additional logic if needed\n }\n\n handleEdit(): void {\n this.editMessage.emit({ message: this.message()! });\n }\n\n handleSwitchToBranch(\n props: CopilotChatUserMessageOnSwitchToBranchProps,\n ): void {\n this.switchToBranch.emit(props);\n }\n\n filenameFor(part: ɵUserMessageMediaPart) {\n return ɵgetUserMessageMediaFilename(part);\n }\n}\n","import {\n Component,\n input,\n ChangeDetectionStrategy,\n ViewEncapsulation,\n computed,\n} from \"@angular/core\";\n\nimport { cn } from \"../../utils\";\n\n/**\n * Cursor component that matches the React implementation exactly.\n * Shows a pulsing dot animation to indicate activity.\n */\n@Component({\n selector: \"copilot-chat-message-view-cursor\",\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `\n <div data-testid=\"copilot-loading-cursor\" [class]=\"computedClass()\"></div>\n `,\n})\nexport class CopilotChatMessageViewCursor {\n inputClass = input<string | undefined>();\n\n computedClass = computed(() =>\n cn(\"cpk-message-view-cursor\", this.inputClass()),\n );\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n computed,\n DestroyRef,\n effect,\n inject,\n input,\n signal,\n ViewEncapsulation,\n} from \"@angular/core\";\nimport { hostStyles } from \"../host-styles\";\nimport type { Message, ReasoningMessage } from \"@ag-ui/core\";\nimport {\n ɵgetReasoningHeaderLabel,\n ɵReasoningDisclosure,\n} from \"@copilotkit/core\";\nimport { cn } from \"../../utils\";\nimport { CopilotChatAssistantMessageRenderer } from \"./copilot-chat-assistant-message-renderer\";\nimport { injectChatLabels } from \"../../chat-config\";\nimport { ChevronRight, CopilotIcon } from \"../icons/copilot-icon\";\n\n@Component({\n selector: \"copilot-chat-reasoning-message\",\n imports: [CopilotChatAssistantMessageRenderer, CopilotIcon],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n styles: [hostStyles],\n template: `\n <div\n [class]=\"computedClass()\"\n [attr.data-message-id]=\"message().id\"\n data-testid=\"copilot-chat-reasoning-message\"\n data-copilot-reasoning-message\n >\n <button\n type=\"button\"\n data-testid=\"reasoning-block\"\n [class]=\"headerClass()\"\n [attr.aria-expanded]=\"hasContent() ? open() : null\"\n (click)=\"toggle()\"\n >\n <span class=\"cpk-reasoning-message-label\">{{ label() }}</span>\n @if (isStreaming() && !hasContent()) {\n <span class=\"cpk-reasoning-message-indicator\">\n <span class=\"cpk-reasoning-message-indicator-dot\"></span>\n </span>\n }\n @if (hasContent()) {\n <copilot-icon\n [img]=\"ChevronRightIcon\"\n [iconClass]=\"chevronClass()\"\n ></copilot-icon>\n }\n </button>\n\n @if (hasContent() || isStreaming()) {\n <div\n class=\"cpk-reasoning-message-toggle\"\n [style.grid-template-rows]=\"open() ? '1fr' : '0fr'\"\n >\n <div class=\"cpk-reasoning-message-toggle-content\">\n <div class=\"cpk-reasoning-message-content\">\n <div class=\"cpk-reasoning-message-text\">\n <copilot-chat-assistant-message-renderer\n [content]=\"reasoningContent()\"\n ></copilot-chat-assistant-message-renderer>\n @if (isStreaming() && hasContent()) {\n <span class=\"cpk-reasoning-message-cursor\">\n <span class=\"cpk-reasoning-message-cursor-dot\"></span>\n </span>\n }\n </div>\n </div>\n </div>\n </div>\n }\n </div>\n `,\n})\nexport class CopilotChatReasoningMessage {\n readonly message = input.required<ReasoningMessage>();\n readonly messages = input<Message[]>([]);\n readonly isRunning = input<boolean>(false);\n readonly inputClass = input<string | undefined>();\n private readonly labels = injectChatLabels();\n protected readonly ChevronRightIcon = ChevronRight;\n\n protected readonly isLatest = computed(() => {\n const messages = this.messages();\n return messages[messages.length - 1]?.id === this.message().id;\n });\n\n protected readonly isStreaming = computed(\n () => this.isRunning() && this.isLatest(),\n );\n\n // Open while streaming, auto-collapse when it ends unless the user\n // toggled, and the elapsed time: see core's ɵReasoningDisclosure.\n // Inputs are not set yet here; the effect below passes the first state.\n readonly #disclosure = new ɵReasoningDisclosure();\n readonly #disclosureState = signal(this.#disclosure.getSnapshot());\n\n protected readonly open = computed(() => this.#disclosureState().isOpen);\n\n protected readonly hasContent = computed(\n // Untyped data can leave `content` out.\n () => (this.message().content || \"\").length > 0,\n );\n\n protected readonly reasoningContent = computed(\n () => this.message().content || \"\",\n );\n\n /**\n * `labels.reasoningMessageThinkingLabel` while streaming, then\n * `labels.reasoningMessageThoughtForLabel` (\"Thought for 4 seconds\").\n */\n protected readonly label = computed(() =>\n ɵgetReasoningHeaderLabel(\n {\n isStreaming: this.isStreaming(),\n elapsedSeconds: this.#disclosureState().elapsedSeconds,\n },\n this.labels,\n ),\n );\n\n constructor() {\n const unsubscribe = this.#disclosure.subscribe(() =>\n this.#disclosureState.set(this.#disclosure.getSnapshot()),\n );\n effect(() => this.#disclosure.setStreaming(this.isStreaming()));\n inject(DestroyRef).onDestroy(() => {\n unsubscribe();\n this.#disclosure.dispose();\n });\n }\n\n protected readonly computedClass = computed(() =>\n cn(\"cpk-reasoning-message\", this.inputClass()),\n );\n\n protected readonly headerClass = computed(() =>\n cn(\n \"cpk-reasoning-message-header\",\n this.hasContent() && \"cpk-reasoning-message-header-expandable\",\n ),\n );\n\n protected readonly chevronClass = computed(() =>\n cn(\n \"cpk-reasoning-message-chevron\",\n this.open() && \"cpk-reasoning-message-chevron-open\",\n ),\n );\n\n protected toggle(): void {\n if (!this.hasContent()) return;\n this.#disclosure.toggle();\n }\n}\n","import { ɵfindActivityRenderer } from \"@copilotkit/core\";\nimport type { RenderActivityMessageConfig } from \"../../activity-renderer\";\n\nexport interface PickActivityRendererOptions {\n activityType: string;\n agentId?: string;\n renderers: readonly RenderActivityMessageConfig[];\n}\n\n/**\n * Resolve the activity renderer for an activity type, with the same rules as\n * React and Vue.\n *\n * Precedence (first match wins within each tier, in registration order):\n * 1. a renderer for `activityType` registered for `agentId`\n * 2. a renderer for `activityType` without an `agentId` (global)\n * 3. the first `\"*\"` wildcard renderer, from any agent\n *\n * This only picks the renderer. It does not validate the content: the caller\n * runs the renderer's `content.safeParse`, so it can report a failure.\n *\n * Kept internal for now (not part of the public API); it can be exposed later\n * without a breaking change if there is demand for a headless resolver.\n */\nexport function pickActivityRenderer(options: PickActivityRendererOptions) {\n const { activityType, agentId, renderers } = options;\n return (\n ɵfindActivityRenderer(renderers, { activityType, agentId }) ?? undefined\n );\n}\n","import {\n Component,\n ChangeDetectionStrategy,\n inject,\n input,\n} from \"@angular/core\";\nimport { NgComponentOutlet } from \"@angular/common\";\nimport type { ActivityMessage } from \"@ag-ui/core\";\nimport type { AbstractAgent } from \"@ag-ui/client\";\nimport { ɵdescribeActivityRendererFailure } from \"@copilotkit/core\";\nimport { DEFAULT_AGENT_ID } from \"@copilotkit/shared\";\nimport { CopilotKit } from \"../../copilotkit\";\nimport type { RenderActivityMessageConfig } from \"../../activity-renderer\";\nimport { pickActivityRenderer } from \"./pick-activity-renderer\";\n\ninterface ActivityRender {\n component: RenderActivityMessageConfig[\"component\"];\n inputs: {\n activityType: string;\n content: unknown;\n message: ActivityMessage;\n agent: AbstractAgent | undefined;\n };\n}\n\n/**\n * Renders a single activity message through the activity renderer registered\n * for its `activityType` (see `provideCopilotKit({ renderActivityMessages })`\n * and `registerRenderActivityMessage`).\n *\n * This is the activity counterpart of `RenderToolCalls` and the Angular\n * equivalent of React's `useRenderActivityMessage()`: `CopilotChatMessageView`\n * uses it for the `activity` role, and custom chat shells or non-chat surfaces\n * (dashboards, side panels) can host an activity with it directly instead of\n * instantiating the whole message view.\n *\n * ```html\n * <copilot-activity [message]=\"activityMessage\" [agentId]=\"agentId\" />\n * ```\n *\n * Renders nothing when no renderer matches or when the renderer's content\n * schema rejects the message content (a warning is logged in that case).\n */\n@Component({\n selector: \"copilot-activity\",\n imports: [NgComponentOutlet],\n changeDetection: ChangeDetectionStrategy.Eager,\n template: `\n @let render = resolveRender(message());\n @if (render) {\n <ng-container *ngComponentOutlet=\"render.component; inputs: render.inputs\" />\n }\n `,\n})\nexport class CopilotActivity {\n readonly #copilotKit = inject(CopilotKit);\n\n /** The activity message to render. */\n readonly message = input.required<ActivityMessage>();\n /**\n * Agent scope used for renderer resolution and passed to the renderer.\n * Without one, the default agent's, as in React and Vue.\n */\n readonly agentId = input<string | undefined>();\n\n protected resolveRender(\n message: ActivityMessage,\n ): ActivityRender | undefined {\n const agentId = this.agentId() ?? DEFAULT_AGENT_ID;\n const renderer = pickActivityRenderer({\n activityType: message.activityType,\n agentId,\n renderers: this.#copilotKit.activityMessageRenderConfigs(),\n });\n if (!renderer) return undefined;\n\n const parseResult = renderer.content.safeParse(message.content);\n if (parseResult.success === false) {\n const warning = ɵdescribeActivityRendererFailure(message.activityType, {\n reason: \"invalid\",\n issues: [parseResult.error],\n });\n console.warn(warning?.message, ...(warning?.details ?? []));\n return undefined;\n }\n\n return {\n component: renderer.component,\n inputs: {\n activityType: message.activityType,\n content: parseResult.data,\n message,\n agent: this.#copilotKit.getAgent(agentId),\n },\n };\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ViewEncapsulation,\n computed,\n effect,\n input,\n signal,\n} from \"@angular/core\";\nimport { ɵgetWorkSummaryText } from \"@copilotkit/core\";\nimport type { ToolCallEntry } from \"@copilotkit/core\";\nimport { ChevronRight, CopilotIcon } from \"../icons/copilot-icon\";\nimport { injectChatLabels } from \"../../chat-config\";\nimport { cn } from \"../../utils\";\n\n/**\n * The line at the top of a reply in the `\"turn\"` tool-call display, like\n * React's `CopilotChatWorkSummary`. While the agent works it reads \"Working\n * 4s\". Once the reply is done it reads \"Worked for 9s\" and \"7 tools\". The\n * message view toggles the work it folded away when the button is clicked.\n * The text comes from the `workSummary...` and `toolCall...` chat labels.\n */\n@Component({\n selector: \"copilot-chat-work-summary\",\n imports: [CopilotIcon],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: { style: \"display: contents\" },\n template: `\n <button\n type=\"button\"\n data-copilotkit\n data-testid=\"copilot-work-summary\"\n [attr.data-state]=\"isWorking() ? 'working' : 'done'\"\n [attr.aria-expanded]=\"isOpen()\"\n [class]=\"buttonClass()\"\n >\n <span [class]=\"labelClass()\">{{ text().label }}</span>\n @if (text().detail !== null) {\n <span [class]=\"detailClass()\">{{ text().detail }}</span>\n }\n @if (text().failed !== null) {\n <span class=\"cpk-work-summary-failed\">{{ text().failed }}</span>\n }\n <copilot-icon\n aria-hidden=\"true\"\n [img]=\"ChevronRightIcon\"\n [iconClass]=\"chevronClass()\"\n />\n </button>\n `,\n})\nexport class CopilotChatWorkSummary {\n /** The agent is still working on this reply. */\n readonly isWorking = input(false);\n /** Whether the work (narration and tool calls) is showing. */\n readonly isOpen = input(false);\n /** The tool calls the reply made. */\n readonly calls = input<ToolCallEntry[]>([]);\n /**\n * How long the agent has worked on the reply, in ms, summed over its runs.\n * Only known for replies this client watched start; without it the summary\n * shows the tool count.\n */\n readonly elapsedMs = input<number | undefined>();\n /** When the current run started (epoch ms), while the agent is working. */\n readonly workingSince = input<number | undefined>();\n readonly inputClass = input<string | undefined>();\n\n protected readonly ChevronRightIcon = ChevronRight;\n readonly #labels = injectChatLabels();\n // The current time, updated every second while the agent works.\n readonly #now = signal(Date.now());\n\n constructor() {\n effect((onCleanup) => {\n if (!this.isWorking()) return;\n this.#now.set(Date.now());\n const timer = setInterval(() => this.#now.set(Date.now()), 1000);\n onCleanup(() => clearInterval(timer));\n });\n }\n\n protected readonly text = computed(() =>\n ɵgetWorkSummaryText({\n isWorking: this.isWorking(),\n calls: this.calls(),\n elapsedMs: this.elapsedMs(),\n workingSince: this.workingSince(),\n now: this.#now(),\n labels: this.#labels,\n }),\n );\n protected readonly buttonClass = computed(() =>\n cn(\"cpk-work-summary\", this.inputClass()),\n );\n protected readonly labelClass = computed(() =>\n cn(\"cpk-work-summary-label\", this.isWorking() && \"cpk-shimmer\"),\n );\n protected readonly detailClass = computed(() =>\n cn(\"cpk-work-summary-detail\", this.isWorking() && \"cpk-work-summary-timer\"),\n );\n protected readonly chevronClass = computed(() =>\n cn(\n \"cpk-work-summary-chevron\",\n this.isOpen() && \"cpk-work-summary-chevron-open\",\n ),\n );\n}\n","import type { TemplateRef, Type } from \"@angular/core\";\nimport {\n Component,\n input,\n output,\n ContentChild,\n ChangeDetectionStrategy,\n ViewEncapsulation,\n DestroyRef,\n afterRenderEffect,\n computed,\n inject,\n signal,\n} from \"@angular/core\";\nimport { NgTemplateOutlet } from \"@angular/common\";\nimport { CopilotSlot } from \"../../slots/copilot-slot\";\nimport type { Message, ReasoningMessage } from \"@ag-ui/core\";\nimport { CopilotChatAssistantMessage } from \"./copilot-chat-assistant-message\";\nimport { CopilotChatUserMessage } from \"./copilot-chat-user-message\";\nimport { CopilotChatMessageViewCursor } from \"./copilot-chat-message-view-cursor\";\nimport { CopilotChatReasoningMessage } from \"./copilot-chat-reasoning-message\";\nimport { CopilotActivity } from \"../activity/copilot-activity\";\nimport { CopilotCollapsible } from \"../tools/tool-call-parts\";\nimport { CopilotChatWorkSummary } from \"./copilot-chat-work-summary\";\nimport { cn } from \"../../utils\";\nimport {\n ɵcreateMessageViewModel,\n ɵdeduplicateMessages,\n ɵshouldShowMessageCursor,\n} from \"@copilotkit/core\";\nimport {\n commitRowKeyStore,\n createRowKeyStore,\n resolveRowRenderKeys,\n} from \"@copilotkit/shared\";\nimport { hostStyles } from \"../host-styles\";\nimport { CopilotKit } from \"../../copilotkit\";\nimport { TOOL_CALL_DISPLAY_CONTEXT } from \"./tool-call-display-context\";\nimport type { ToolCallDisplayContext } from \"./tool-call-display-context\";\nimport { getToolCallRendererNames } from \"./tool-call-layout\";\nimport type {\n CopilotChatToolCallDisplay,\n ToolCallEntry,\n} from \"./tool-call-layout\";\n\n/**\n * CopilotChatMessageView component - Angular port of the React component.\n * Renders a list of chat messages with support for custom slots and layouts.\n * DOM structure and Tailwind classes match the React implementation exactly.\n */\n@Component({\n selector: \"copilot-chat-message-view\",\n host: { \"data-copilotkit\": \"\" },\n providers: [\n {\n provide: TOOL_CALL_DISPLAY_CONTEXT,\n useFactory: (): ToolCallDisplayContext =>\n inject(CopilotChatMessageView).toolCallDisplayContext,\n },\n ],\n imports: [\n NgTemplateOutlet,\n CopilotSlot,\n CopilotChatAssistantMessage,\n CopilotChatUserMessage,\n CopilotChatReasoningMessage,\n CopilotChatMessageViewCursor,\n CopilotChatWorkSummary,\n CopilotCollapsible,\n CopilotActivity,\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n styles: [hostStyles],\n template: `\n <!-- The \"turn\" display's summary line for a reply, or its slot -->\n <ng-template #workSummaryRow let-turnKey let-calls=\"calls\">\n <div [copilotCollapsible]=\"isTurnWorking(turnKey) || calls.length > 0\">\n <div class=\"cpk-message-view-work-summary\">\n @if (workSummaryComponent() || workSummaryTemplate()) {\n <copilot-slot\n [slot]=\"workSummaryTemplate() || workSummaryComponent()\"\n [context]=\"workSummaryContext(turnKey, calls)\"\n />\n } @else {\n <copilot-chat-work-summary\n [isWorking]=\"isTurnWorking(turnKey)\"\n [isOpen]=\"isTurnOpen(turnKey)\"\n [calls]=\"calls\"\n [elapsedMs]=\"workTime(turnKey)?.elapsedMs\"\n [workingSince]=\"workTime(turnKey)?.workingSince\"\n [inputClass]=\"workSummaryClass()\"\n (click)=\"toggleTurn(turnKey)\"\n />\n }\n </div>\n </div>\n </ng-template>\n\n <ng-template #reasoningRow let-message>\n @if (reasoningMessageComponent() || reasoningMessageTemplate()) {\n <copilot-slot\n [slot]=\"reasoningMessageTemplate() || reasoningMessageComponent()\"\n [context]=\"mergeReasoningProps(asReasoningMessage(message))\"\n [defaultComponent]=\"defaultReasoningComponent\"\n />\n } @else {\n <copilot-chat-reasoning-message\n [message]=\"asReasoningMessage(message)\"\n [messages]=\"messagesValue()\"\n [isRunning]=\"isRunningValue()\"\n [inputClass]=\"reasoningMessageClass()\"\n />\n }\n </ng-template>\n\n <!-- Custom layout template support (render prop pattern) -->\n @if (customLayoutTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"customLayoutTemplate\"\n [ngTemplateOutletContext]=\"layoutContext()\"\n ></ng-container>\n } @else {\n <!-- Default layout - exact React DOM structure: div with \"flex flex-col\" classes -->\n <div [class]=\"computedClass()\">\n <!-- Message iteration - simplified without tool calls -->\n @for (message of renderedMessages(); track rowRenderKey($index, message)) {\n @if (viewState().turnByFirstMessage.get(message.id); as turn) {\n <ng-container\n *ngTemplateOutlet=\"\n workSummaryRow;\n context: { $implicit: turn.key, calls: turn.calls }\n \"\n />\n }\n @if (message && message.role === \"assistant\") {\n <!-- Assistant message with slot support -->\n @if (assistantMessageComponent() || assistantMessageTemplate()) {\n <copilot-slot\n [slot]=\"assistantMessageTemplate() || assistantMessageComponent()\"\n [context]=\"mergeAssistantProps(message)\"\n [defaultComponent]=\"defaultAssistantComponent\"\n >\n </copilot-slot>\n } @else {\n <copilot-chat-assistant-message\n [message]=\"message\"\n [messages]=\"messagesValue()\"\n [agentId]=\"agentId()\"\n [isLoading]=\"isRunningValue()\"\n [inputClass]=\"assistantMessageClass()\"\n (thumbsUp)=\"handleAssistantThumbsUp($event)\"\n (thumbsDown)=\"handleAssistantThumbsDown($event)\"\n (readAloud)=\"handleAssistantReadAloud($event)\"\n (regenerate)=\"handleAssistantRegenerate($event)\"\n >\n </copilot-chat-assistant-message>\n }\n } @else if (message && message.role === \"user\") {\n <!-- User message with slot support -->\n @if (userMessageComponent() || userMessageTemplate()) {\n <copilot-slot\n [slot]=\"userMessageTemplate() || userMessageComponent()\"\n [context]=\"mergeUserProps(message)\"\n [defaultComponent]=\"defaultUserComponent\"\n >\n </copilot-slot>\n } @else {\n <copilot-chat-user-message\n [message]=\"message\"\n [inputClass]=\"userMessageClass()\"\n >\n </copilot-chat-user-message>\n }\n } @else if (message && message.role === \"reasoning\") {\n <!-- Reasoning in a reply's working phase folds away with the work -->\n @if (toolCallDisplay() === \"turn\") {\n <div\n [copilotCollapsible]=\"viewState().workOpen.get(message.id) ?? true\"\n >\n <ng-container\n *ngTemplateOutlet=\"reasoningRow; context: { $implicit: message }\"\n />\n </div>\n } @else {\n <ng-container\n *ngTemplateOutlet=\"reasoningRow; context: { $implicit: message }\"\n />\n }\n } @else if (message && message.role === \"activity\") {\n <copilot-activity [message]=\"message\" [agentId]=\"agentId()\" />\n }\n }\n\n @if (childrenComponent() || childrenTemplate()) {\n <copilot-slot\n [slot]=\"childrenTemplate() || childrenComponent()\"\n [context]=\"childrenContext()\"\n />\n }\n\n @if (viewState().pendingWorkSummary) {\n <ng-container\n *ngTemplateOutlet=\"\n workSummaryRow;\n context: { $implicit: viewState().latestTurnKey, calls: [] }\n \"\n />\n }\n\n <!-- Cursor - exactly like React's conditional rendering -->\n @if (showCursorValue()) {\n <div class=\"cpk-message-view-cursor-container\">\n @if (cursorComponent() || cursorTemplate()) {\n <copilot-slot\n [slot]=\"cursorTemplate() || cursorComponent()\"\n [context]=\"{ inputClass: cursorClass() }\"\n [defaultComponent]=\"defaultCursorComponent\"\n >\n </copilot-slot>\n } @else {\n <copilot-chat-message-view-cursor [inputClass]=\"cursorClass()\">\n </copilot-chat-message-view-cursor>\n }\n </div>\n }\n </div>\n }\n `,\n})\nexport class CopilotChatMessageView {\n // Core inputs matching React props\n messages = input<Message[]>([]);\n /** Current agent state exposed to transcript-children slots. */\n state = input<unknown>({});\n showCursor = input<boolean>(false);\n isLoading = input<boolean>(false);\n inputClass = input<string | undefined>();\n agentId = input<string | undefined>();\n /**\n * How assistant messages show tool calls: `\"grouped\"` (default), `\"line\"`,\n * `\"stacked\"` or `\"separate\"`. See `CopilotChatToolCallDisplay`.\n */\n toolCallDisplay = input<CopilotChatToolCallDisplay>(\"grouped\");\n\n // Handler availability handled via DI service\n\n // Assistant message slot inputs\n assistantMessageComponent = input<Type<any> | undefined>();\n assistantMessageTemplate = input<TemplateRef<any> | undefined>();\n assistantMessageClass = input<string | undefined>();\n\n // ReasoningMessage slot inputs\n reasoningMessageComponent = input<Type<any> | undefined>();\n reasoningMessageTemplate = input<TemplateRef<any> | undefined>();\n reasoningMessageClass = input<string | undefined>();\n\n // Content rendered after the message collection and before the cursor.\n childrenComponent = input<Type<any> | undefined>();\n childrenTemplate = input<TemplateRef<any> | undefined>();\n childrenClass = input<string | undefined>();\n\n // User message slot inputs\n userMessageComponent = input<Type<any> | undefined>();\n userMessageTemplate = input<TemplateRef<any> | undefined>();\n userMessageClass = input<string | undefined>();\n\n // Cursor slot inputs\n cursorComponent = input<Type<any> | undefined>();\n cursorTemplate = input<TemplateRef<any> | undefined>();\n cursorClass = input<string | undefined>();\n\n // `\"turn\"` display work summary slot inputs. A slot gets `isWorking`,\n // `isOpen`, `calls`, `elapsedMs`, `workingSince` and `onClick`, which\n // toggles the reply's work.\n workSummaryComponent = input<Type<unknown> | undefined>();\n workSummaryTemplate = input<TemplateRef<unknown> | undefined>();\n workSummaryClass = input<string | undefined>();\n\n // Custom layout template (render prop pattern)\n @ContentChild(\"customLayout\") customLayoutTemplate?: TemplateRef<any>;\n\n // Output events (bubbled from child components)\n assistantMessageThumbsUp = output<{ message: Message }>();\n assistantMessageThumbsDown = output<{ message: Message }>();\n assistantMessageReadAloud = output<{ message: Message }>();\n assistantMessageRegenerate = output<{ message: Message }>();\n userMessageCopy = output<{ message: Message }>();\n userMessageEdit = output<{ message: Message }>();\n\n // Default components for slots\n protected readonly defaultAssistantComponent = CopilotChatAssistantMessage;\n protected readonly defaultUserComponent = CopilotChatUserMessage;\n protected readonly defaultReasoningComponent = CopilotChatReasoningMessage;\n protected readonly defaultCursorComponent = CopilotChatMessageViewCursor;\n\n // Derived values from inputs\n protected messagesValue = computed(() => this.messages());\n /**\n * The rows the list draws: one per message id. A streaming agent can list\n * the same message, or the same tool call, more than once.\n */\n protected readonly renderedMessages = computed(() =>\n ɵdeduplicateMessages(this.messagesValue()),\n );\n\n /**\n * Override table backing `rowRenderKey`. Per component instance, so its\n * lifetime matches the rendered list.\n */\n private readonly rowKeyStore = createRowKeyStore();\n protected rowRenderKeys = computed(() =>\n resolveRowRenderKeys(this.rowKeyStore, this.renderedMessages()),\n );\n\n // Record what actually rendered, never what the computed merely evaluated:\n // an anchor from an evaluation that never reaches the DOM would re-key a\n // rendered row and recreate it.\n private readonly rowKeyStoreCommit = afterRenderEffect(() => {\n commitRowKeyStore(this.rowKeyStore, this.renderedMessages());\n });\n protected isLoadingValue = computed(() => this.isLoading());\n protected showCursorValue = computed(() =>\n ɵshouldShowMessageCursor({\n isRunning: this.showCursor(),\n lastMessage: this.lastMessage(),\n display: this.toolCallDisplay(),\n }),\n );\n /**\n * Whether the agent runs. The prebuilt chat sets `showCursor` while it\n * runs; a view used on its own may set `isLoading` instead.\n */\n readonly #isRunning = computed(() => this.showCursor() || this.isLoading());\n protected readonly isRunningValue = this.#isRunning;\n\n readonly #copilotKit = inject(CopilotKit);\n // The list's tool-call layout and turn state live in core. A user's open or\n // close of a reply's work is the only change it reports by itself.\n readonly #viewModel = ɵcreateMessageViewModel();\n readonly #toggledTurns = signal(this.#viewModel.getSnapshot());\n /** Groups can span messages, so the view lays out every message's calls. */\n protected readonly viewState = computed(() => {\n this.#toggledTurns();\n return this.#viewModel.update({\n display: this.toolCallDisplay(),\n messages: this.messagesValue(),\n rendered: this.renderedMessages(),\n isRunning: this.#isRunning(),\n rendererNames: getToolCallRendererNames(this.#copilotKit),\n now: Date.now(),\n });\n });\n\n constructor() {\n inject(DestroyRef).onDestroy(\n this.#viewModel.subscribe(() =>\n this.#toggledTurns.set(this.#viewModel.getSnapshot()),\n ),\n );\n }\n\n /** @internal Read by each message's tool-calls view. */\n readonly toolCallDisplayContext: ToolCallDisplayContext = {\n display: this.toolCallDisplay,\n isRunning: this.#isRunning,\n layouts: computed(() => this.viewState().layouts),\n workOpen: computed(() => this.viewState().workOpen),\n workTextOpen: computed(() => this.viewState().workTextOpen),\n };\n protected lastMessage = computed(() => {\n const messages = this.renderedMessages();\n return messages[messages.length - 1];\n });\n\n // Computed class matching React: twMerge(\"flex flex-col\", className)\n computedClass = computed(() =>\n cn(\"copilotKitMessages cpk-message-view\", this.inputClass()),\n );\n\n // Layout context for custom templates (render prop pattern)\n layoutContext = computed(() => ({\n isLoading: this.isLoadingValue(),\n messages: this.messagesValue(),\n showCursor: this.showCursorValue(),\n messageElements: this.renderedMessages().filter(\n (m) =>\n m &&\n (m.role === \"assistant\" ||\n m.role === \"user\" ||\n m.role === \"reasoning\" ||\n m.role === \"activity\"),\n ),\n }));\n\n // Slot resolution computed signals\n assistantMessageSlot = computed(\n () => this.assistantMessageComponent() || this.assistantMessageClass(),\n );\n\n userMessageSlot = computed(\n () => this.userMessageComponent() || this.userMessageClass(),\n );\n\n cursorSlot = computed(() => this.cursorComponent() || this.cursorClass());\n\n // Props merging helpers\n mergeAssistantProps(message: Message) {\n return {\n message,\n messages: this.messagesValue(),\n isLoading: this.#isRunning(),\n inputClass: this.assistantMessageClass(),\n };\n }\n\n mergeReasoningProps(message: ReasoningMessage) {\n return {\n message,\n messages: this.messagesValue(),\n isRunning: this.#isRunning(),\n inputClass: this.reasoningMessageClass(),\n };\n }\n\n childrenContext() {\n return {\n messages: this.messagesValue(),\n state: this.state(),\n agentId: this.agentId(),\n isRunning: this.#isRunning(),\n inputClass: this.childrenClass(),\n };\n }\n\n protected isTurnWorking(turnKey: string) {\n this.viewState();\n return this.#viewModel.isTurnWorking(turnKey);\n }\n\n protected isTurnOpen(turnKey: string) {\n this.viewState();\n return this.#viewModel.isTurnOpen(turnKey);\n }\n\n protected workTime(turnKey: string) {\n this.viewState();\n return this.#viewModel.getWorkTime(turnKey);\n }\n\n protected toggleTurn(turnKey: string): void {\n this.#viewModel.toggleTurn(turnKey);\n }\n\n workSummaryContext(turnKey: string, calls: ToolCallEntry[]) {\n const times = this.workTime(turnKey);\n return {\n isWorking: this.isTurnWorking(turnKey),\n isOpen: this.isTurnOpen(turnKey),\n calls,\n elapsedMs: times?.elapsedMs,\n workingSince: times?.workingSince,\n inputClass: this.workSummaryClass(),\n onClick: () => this.toggleTurn(turnKey),\n };\n }\n\n mergeUserProps(message: Message) {\n return {\n message,\n inputClass: this.userMessageClass(),\n };\n }\n\n asReasoningMessage(message: Message): ReasoningMessage {\n return message as ReasoningMessage;\n }\n\n /**\n * Stable `@for` track key. A message's canonical id can change mid-stream, and\n * tracking by it destroys and recreates the row on that swap (the HITL chat\n * flash). See ./row-render-keys for the mechanism and its limits.\n */\n rowRenderKey(index: number, message: Message): string {\n return this.rowRenderKeys()[index] ?? message?.id ?? `index-${index}`;\n }\n\n // Event handlers - just pass them through\n handleAssistantThumbsUp(event: { message: Message }): void {\n this.assistantMessageThumbsUp.emit(event);\n }\n\n handleAssistantThumbsDown(event: { message: Message }): void {\n this.assistantMessageThumbsDown.emit(event);\n }\n\n handleAssistantReadAloud(event: { message: Message }): void {\n this.assistantMessageReadAloud.emit(event);\n }\n\n handleAssistantRegenerate(event: { message: Message }): void {\n this.assistantMessageRegenerate.emit(event);\n }\n}\n","import {\n Component,\n input,\n output,\n ChangeDetectionStrategy,\n ViewEncapsulation,\n} from \"@angular/core\";\n\nimport { ChevronDown, CopilotIcon } from \"../icons/copilot-icon\";\nimport { cn } from \"../../utils\";\nimport { injectChatLabels } from \"../../chat-config\";\n\n/**\n * ScrollToBottomButton component for CopilotChatView\n * Matches React implementation exactly with same Tailwind classes\n */\n@Component({\n selector: \"copilot-chat-view-scroll-to-bottom-button\",\n imports: [CopilotIcon],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `\n <button\n type=\"button\"\n [attr.aria-label]=\"labels.chatScrollToBottomLabel\"\n [class]=\"computedClass\"\n [disabled]=\"disabled()\"\n (click)=\"handleClick()\"\n >\n <copilot-icon\n [img]=\"ChevronDown\"\n iconClass=\"cpk-chat-view-scroll-to-bottom-icon\"\n >\n </copilot-icon>\n </button>\n `,\n})\nexport class CopilotChatViewScrollToBottomButton {\n inputClass = input<string | undefined>();\n disabled = input<boolean>(false);\n // Support function-style click handler via slot context\n onClick = input<(() => void) | undefined>();\n\n // Simple, idiomatic Angular output\n clicked = output();\n\n readonly labels = injectChatLabels();\n\n // Icon reference\n protected readonly ChevronDown = ChevronDown;\n\n // Computed class matching React exactly\n get computedClass(): string {\n return cn(\n \"cpk-button cpk-button-outline cpk-button-size-sm cpk-chat-view-scroll-to-bottom-button\",\n this.inputClass(),\n );\n }\n\n handleClick(): void {\n if (!this.disabled()) {\n // Call input handler if provided (slot-style)\n if (this.onClick()) {\n this.onClick()!();\n }\n this.clicked.emit();\n }\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ViewEncapsulation,\n computed,\n input,\n output,\n} from \"@angular/core\";\nimport { cn } from \"../../utils\";\nimport { CopilotIcon, Loader2 } from \"../icons/copilot-icon\";\n\n@Component({\n selector: \"copilot-chat-suggestion-pill\",\n imports: [CopilotIcon],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: { \"data-copilotkit\": \"\" },\n template: `\n <button\n data-copilotkit\n data-testid=\"copilot-suggestion\"\n data-slot=\"suggestion-pill\"\n type=\"button\"\n [class]=\"computedClass()\"\n [disabled]=\"disabled() || isLoading()\"\n [attr.aria-busy]=\"isLoading() ? 'true' : null\"\n (click)=\"handleClick()\"\n >\n @if (isLoading()) {\n <span class=\"cpk-suggestion-pill-icon\">\n <copilot-icon\n [img]=\"Loader2Icon\"\n iconClass=\"cpk-suggestion-pill-spinner\"\n ></copilot-icon>\n </span>\n }\n <span class=\"cpk-suggestion-pill-label\">{{ title() }}</span>\n </button>\n `,\n})\nexport class CopilotChatSuggestionPill {\n readonly title = input<string>(\"\");\n readonly disabled = input(false);\n readonly isLoading = input(false);\n readonly inputClass = input<string | undefined>();\n\n readonly clicked = output();\n protected readonly Loader2Icon = Loader2;\n\n protected readonly computedClass = computed(() =>\n cn(\"cpk-suggestion-pill\", this.inputClass()),\n );\n\n handleClick(): void {\n if (this.disabled() || this.isLoading()) {\n return;\n }\n\n this.clicked.emit();\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ViewEncapsulation,\n computed,\n input,\n output,\n} from \"@angular/core\";\nimport type { Suggestion } from \"@copilotkit/core\";\nimport { cn } from \"../../utils\";\nimport { hostStyles } from \"../host-styles\";\nimport { CopilotChatSuggestionPill } from \"./copilot-chat-suggestion-pill\";\n\n@Component({\n selector: \"copilot-chat-suggestion-view\",\n imports: [CopilotChatSuggestionPill],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: { \"data-copilotkit\": \"\" },\n styles: [hostStyles],\n template: `\n @if (suggestions().length > 0) {\n <div\n data-copilotkit\n data-testid=\"copilot-suggestions\"\n [class]=\"computedClass()\"\n >\n @for (suggestion of suggestions(); track suggestion.message + $index) {\n <copilot-chat-suggestion-pill\n [title]=\"suggestion.title\"\n [inputClass]=\"suggestion.className\"\n [isLoading]=\"suggestion.isLoading === true\"\n (clicked)=\"handleSelect(suggestion, $index)\"\n />\n }\n </div>\n }\n `,\n})\nexport class CopilotChatSuggestionView {\n readonly suggestions = input<Suggestion[]>([]);\n readonly inputClass = input<string | undefined>();\n\n readonly selectSuggestion = output<{\n suggestion: Suggestion;\n index: number;\n }>();\n\n protected readonly computedClass = computed(() =>\n cn(\"cpk-suggestion-view\", this.inputClass()),\n );\n\n handleSelect(suggestion: Suggestion, index: number): void {\n if (suggestion.isLoading) {\n return;\n }\n\n this.selectSuggestion.emit({ suggestion, index });\n }\n}\n","import {\n Component,\n input,\n TemplateRef,\n Type,\n output,\n ViewChild,\n ElementRef,\n ChangeDetectionStrategy,\n ViewEncapsulation,\n signal,\n computed,\n inject,\n afterNextRender,\n viewChild,\n} from \"@angular/core\";\nimport { NgTemplateOutlet } from \"@angular/common\";\nimport { ScrollingModule } from \"@angular/cdk/scrolling\";\nimport { CopilotSlot } from \"../../slots/copilot-slot\";\nimport { CopilotChatMessageView } from \"./copilot-chat-message-view\";\nimport { CopilotChatViewScrollToBottomButton } from \"./copilot-chat-view-scroll-to-bottom-button\";\nimport { CopilotChatSuggestionView } from \"./copilot-chat-suggestion-view\";\nimport { StickToBottom } from \"../../directives/stick-to-bottom\";\nimport { ChatState } from \"../../chat-state\";\nimport { explicitEffect } from \"../../explicit-effect\";\nimport { Message } from \"@ag-ui/client\";\nimport { cn } from \"../../utils\";\nimport type { CopilotChatToolCallDisplay } from \"./tool-call-layout\";\nimport { ɵcreateStickToBottom, ɵgetChatViewState } from \"@copilotkit/core\";\nimport type { ɵStickToBottom } from \"@copilotkit/core\";\n\n/**\n * ScrollView component for CopilotChatView\n * Handles auto-scrolling and scroll position management\n */\n@Component({\n selector: \"copilot-chat-view-scroll-view\",\n host: { class: \"cpk-chat-view-scroll-view\" },\n imports: [\n ScrollingModule,\n NgTemplateOutlet,\n CopilotSlot,\n CopilotChatMessageView,\n CopilotChatSuggestionView,\n StickToBottom,\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n templateUrl: \"./copilot-chat-view-scroll-view.html\",\n})\nexport class CopilotChatViewScrollView {\n protected readonly chatState = inject(ChatState, { optional: true });\n\n autoScroll = input<boolean>(true);\n\n inputContainerHeight = input<number>(0);\n\n isResizing = input<boolean>(false);\n inputClass = input<string | undefined>();\n messages = input<Message[]>([]);\n /** Current agent state forwarded to message-view extension slots. */\n state = input<unknown>({});\n agentId = input<string | undefined>();\n messageView = input<any | undefined>();\n messageViewClass = input<string | undefined>();\n assistantMessageComponent = input<Type<any> | undefined>();\n assistantMessageTemplate = input<TemplateRef<any> | undefined>();\n assistantMessageClass = input<string | undefined>();\n reasoningMessageComponent = input<Type<any> | undefined>();\n reasoningMessageTemplate = input<TemplateRef<any> | undefined>();\n reasoningMessageClass = input<string | undefined>();\n workSummaryComponent = input<Type<unknown> | undefined>();\n workSummaryTemplate = input<TemplateRef<unknown> | undefined>();\n workSummaryClass = input<string | undefined>();\n messageViewChildrenComponent = input<Type<any> | undefined>();\n messageViewChildrenTemplate = input<TemplateRef<any> | undefined>();\n messageViewChildrenClass = input<string | undefined>();\n showCursor = input<boolean>(false);\n /** `true` while the agent runs. Suggestions hide meanwhile. */\n isRunning = input<boolean>(false);\n /** `true` while the thread's connect is loading. Suggestions hide meanwhile. */\n isConnecting = input<boolean>(false);\n /**\n * How assistant messages show tool calls: `\"grouped\"` (default), `\"line\"`,\n * `\"stacked\"` or `\"separate\"`. Forwarded to the message view.\n */\n toolCallDisplay = input<CopilotChatToolCallDisplay>(\"grouped\");\n\n // Handler availability flags removed in favor of DI service\n\n // Slot inputs\n scrollToBottomButton = input<any | undefined>();\n scrollToBottomButtonClass = input<string | undefined>();\n\n // Output events (bubbled from message view)\n assistantMessageThumbsUp = output<{ message: Message }>();\n assistantMessageThumbsDown = output<{ message: Message }>();\n assistantMessageReadAloud = output<{ message: Message }>();\n assistantMessageRegenerate = output<{ message: Message }>();\n userMessageCopy = output<{ message: Message }>();\n userMessageEdit = output<{ message: Message }>();\n\n // ViewChild references\n @ViewChild(\"scrollContainer\", { read: ElementRef })\n scrollContainer?: ElementRef<HTMLElement>;\n @ViewChild(\"contentContainer\", { read: ElementRef })\n contentContainer?: ElementRef<HTMLElement>;\n @ViewChild(StickToBottom) stickToBottomDirective?: StickToBottom;\n private readonly scrollElement =\n viewChild<ElementRef<HTMLElement>>(\"scrollContainer\");\n /** Tracks the position for the button when `autoScroll` is off. */\n private manualScroll?: ɵStickToBottom;\n\n // Default components\n protected readonly defaultMessageViewComponent = CopilotChatMessageView;\n protected readonly defaultScrollToBottomButtonComponent =\n CopilotChatViewScrollToBottomButton;\n\n // Signals\n protected hasMounted = signal(false);\n protected showScrollButton = signal(false);\n protected isAtBottom = signal(true);\n // Suggestions and the bottom padding follow core's rules: no suggestions\n // while connecting or running.\n private readonly viewState = computed(() =>\n ɵgetChatViewState({\n messageCount: this.messages().length,\n suggestionCount: this.chatState?.suggestions?.().length ?? 0,\n isRunning: this.isRunning(),\n isConnecting: this.isConnecting(),\n hasExplicitThreadId: false,\n welcomeScreenEnabled: false,\n inputContainerHeight: this.inputContainerHeight(),\n }),\n );\n protected hasSuggestions = computed(() => this.viewState().hasSuggestions);\n protected paddingBottom = computed(() => this.viewState().paddingBottom);\n\n // Computed class\n protected computedClass = computed(() => cn(this.inputClass()));\n\n constructor() {\n afterNextRender(() => {\n this.hasMounted.set(true);\n });\n\n // Without auto-scroll, core only tracks the position (same 12px threshold\n // as the directive) so the scroll-to-bottom button shows when the reader\n // is above the end.\n explicitEffect(\n () => ({\n element: this.scrollElement()?.nativeElement,\n autoScroll: this.autoScroll(),\n }),\n ({ element, autoScroll }, onCleanup) => {\n if (!element || autoScroll) return;\n const content = element.firstElementChild;\n const controller = ɵcreateStickToBottom({\n scrollElement: element,\n contentElement: content instanceof HTMLElement ? content : element,\n follow: false,\n onChange: (isAtBottom) => this.showScrollButton.set(!isAtBottom),\n });\n this.manualScroll = controller;\n this.showScrollButton.set(!controller.isAtBottom);\n onCleanup(() => {\n controller.dispose();\n if (this.manualScroll === controller) this.manualScroll = undefined;\n });\n },\n );\n }\n\n /**\n * Handle isAtBottom change from StickToBottom directive\n */\n onIsAtBottomChange(isAtBottom: boolean): void {\n this.isAtBottom.set(isAtBottom);\n }\n\n /**\n * Scroll to bottom for manual mode\n */\n scrollToBottom(): void {\n this.manualScroll?.scrollToBottom(\"smooth\");\n }\n\n /**\n * Scroll to bottom for stick-to-bottom mode\n */\n scrollToBottomFromStick(): void {\n if (this.stickToBottomDirective) {\n this.stickToBottomDirective.scrollToBottom(\"smooth\");\n }\n }\n\n // Output maps for slots\n scrollToBottomOutputs = { clicked: () => this.scrollToBottom() };\n scrollToBottomFromStickOutputs = {\n clicked: () => this.scrollToBottomFromStick(),\n };\n\n // Context methods for templates\n messageViewContext(): any {\n return {\n messages: this.messages(),\n state: this.state(),\n agentId: this.agentId(),\n inputClass: this.messageViewClass(),\n showCursor: this.showCursor(),\n toolCallDisplay: this.toolCallDisplay(),\n assistantMessageComponent: this.assistantMessageComponent(),\n assistantMessageTemplate: this.assistantMessageTemplate(),\n assistantMessageClass: this.assistantMessageClass(),\n reasoningMessageComponent: this.reasoningMessageComponent(),\n reasoningMessageTemplate: this.reasoningMessageTemplate(),\n reasoningMessageClass: this.reasoningMessageClass(),\n workSummaryComponent: this.workSummaryComponent(),\n workSummaryTemplate: this.workSummaryTemplate(),\n workSummaryClass: this.workSummaryClass(),\n childrenComponent: this.messageViewChildrenComponent(),\n childrenTemplate: this.messageViewChildrenTemplate(),\n childrenClass: this.messageViewChildrenClass(),\n };\n }\n\n scrollToBottomContext(): any {\n return {\n inputClass: this.scrollToBottomButtonClass(),\n onClick: () => this.scrollToBottom(),\n };\n }\n\n scrollToBottomFromStickContext(): any {\n return {\n inputClass: this.scrollToBottomButtonClass(),\n onClick: () => this.scrollToBottomFromStick(),\n };\n }\n}\n","<ng-template #scrollContent>\n <div [style.padding-bottom.px]=\"paddingBottom()\">\n <div class=\"cpk-chat-view-feed\">\n @if (messageView()) {\n <copilot-slot\n [slot]=\"messageView()\"\n [context]=\"messageViewContext()\"\n [defaultComponent]=\"defaultMessageViewComponent\"\n >\n </copilot-slot>\n } @else {\n <copilot-chat-message-view\n [messages]=\"messages()\"\n [state]=\"state()\"\n [agentId]=\"agentId()\"\n [inputClass]=\"messageViewClass()\"\n [showCursor]=\"showCursor()\"\n [toolCallDisplay]=\"toolCallDisplay()\"\n [assistantMessageComponent]=\"assistantMessageComponent()\"\n [assistantMessageTemplate]=\"assistantMessageTemplate()\"\n [assistantMessageClass]=\"assistantMessageClass()\"\n [reasoningMessageComponent]=\"reasoningMessageComponent()\"\n [reasoningMessageTemplate]=\"reasoningMessageTemplate()\"\n [reasoningMessageClass]=\"reasoningMessageClass()\"\n [workSummaryComponent]=\"workSummaryComponent()\"\n [workSummaryTemplate]=\"workSummaryTemplate()\"\n [workSummaryClass]=\"workSummaryClass()\"\n [childrenComponent]=\"messageViewChildrenComponent()\"\n [childrenTemplate]=\"messageViewChildrenTemplate()\"\n [childrenClass]=\"messageViewChildrenClass()\"\n (assistantMessageThumbsUp)=\"assistantMessageThumbsUp.emit($event)\"\n (assistantMessageThumbsDown)=\"assistantMessageThumbsDown.emit($event)\"\n (assistantMessageReadAloud)=\"assistantMessageReadAloud.emit($event)\"\n (assistantMessageRegenerate)=\"assistantMessageRegenerate.emit($event)\"\n (userMessageCopy)=\"userMessageCopy.emit($event)\"\n (userMessageEdit)=\"userMessageEdit.emit($event)\"\n >\n </copilot-chat-message-view>\n } @if (hasSuggestions()) {\n <div class=\"cpk-chat-view-suggestions\">\n <copilot-chat-suggestion-view\n [suggestions]=\"chatState?.suggestions?.() ?? []\"\n inputClass=\"cpk-chat-view-suggestion-view\"\n (selectSuggestion)=\"\n chatState?.selectSuggestion($event.suggestion, $event.index)\n \"\n />\n </div>\n }\n </div>\n </div>\n</ng-template>\n\n@if (!hasMounted()) {\n<!-- SSR/Initial render without stick-to-bottom -->\n<div class=\"cpk-chat-view-scroll-area cpk-chat-view-scroll-viewport\">\n <div class=\"cpk-chat-view-scroll-content\">\n <ng-content></ng-content>\n </div>\n</div>\n} @else {\n<div class=\"cpk-chat-view-scroll-area\">\n @if (autoScroll()) {\n <!-- Auto-scroll mode with StickToBottom directive -->\n <div\n #scrollContainer\n cdkScrollable\n copilotStickToBottom\n [enabled]=\"autoScroll()\"\n [debounceMs]=\"0\"\n [initialBehavior]=\"'smooth'\"\n [resizeBehavior]=\"'smooth'\"\n (isAtBottomChange)=\"onIsAtBottomChange($event)\"\n [class]=\"computedClass()\"\n class=\"cpk-chat-view-scroll-viewport\"\n >\n <!-- Scrollable content wrapper -->\n <div class=\"cpk-chat-view-scroll-content\">\n <!-- Content with padding-bottom matching React -->\n <ng-container [ngTemplateOutlet]=\"scrollContent\"></ng-container>\n </div>\n </div>\n } @else {\n <!-- Manual scroll mode -->\n <div\n #scrollContainer\n cdkScrollable\n [class]=\"computedClass()\"\n class=\"cpk-chat-view-scroll-viewport\"\n >\n <div #contentContainer class=\"cpk-chat-view-scroll-content\">\n <!-- Content with padding-bottom matching React -->\n <ng-container [ngTemplateOutlet]=\"scrollContent\"></ng-container>\n </div>\n </div>\n } @if ((autoScroll() ? !isAtBottom() : showScrollButton()) && !isResizing()) {\n <div\n class=\"cpk-chat-view-scroll-to-bottom\"\n [style.bottom.px]=\"inputContainerHeight() + 16\"\n >\n <copilot-slot\n [slot]=\"scrollToBottomButton()\"\n [context]=\"\n autoScroll()\n ? scrollToBottomFromStickContext()\n : scrollToBottomContext()\n \"\n [defaultComponent]=\"defaultScrollToBottomButtonComponent\"\n [outputs]=\"\n autoScroll() ? scrollToBottomFromStickOutputs : scrollToBottomOutputs\n \"\n >\n </copilot-slot>\n </div>\n }\n</div>\n}\n","import {\n Component,\n input,\n ChangeDetectionStrategy,\n ViewEncapsulation,\n} from \"@angular/core\";\n\n/**\n * Feather slot for CopilotChatView, between the messages and the input. Like\n * React's, the default renders an empty element: pass a class or a component\n * to draw a fade.\n */\n@Component({\n selector: \"copilot-chat-view-feather\",\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `\n <div [class]=\"inputClass()\" [style]=\"style()\"></div>\n `,\n})\nexport class CopilotChatViewFeather {\n inputClass = input<string | undefined>();\n style = input<{ [key: string]: any } | undefined>();\n}\n","import {\n Component,\n input,\n output,\n ElementRef,\n signal,\n computed,\n inject,\n ChangeDetectionStrategy,\n ViewEncapsulation,\n PLATFORM_ID,\n afterNextRender,\n afterRenderEffect,\n untracked,\n} from \"@angular/core\";\nimport { isPlatformBrowser } from \"@angular/common\";\nimport {\n ɵCOMPOSER_DEFAULT_MAX_ROWS,\n ɵfitTextareaHeight,\n ɵmeasureTextarea,\n} from \"@copilotkit/core\";\nimport type { ɵTextareaMetrics } from \"@copilotkit/core\";\nimport { cn } from \"../../utils\";\nimport { injectChatLabels } from \"../../chat-config\";\nimport { injectChatState } from \"../../chat-state\";\n\n@Component({\n selector: \"textarea[copilotChatTextarea]\",\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n \"[value]\": \"computedValue()\",\n \"[placeholder]\": \"placeholder()\",\n \"[disabled]\": \"disabled()\",\n \"[class]\": \"computedClass()\",\n \"[style.max-height.px]\": \"maxHeight()\",\n \"[style.overflow]\": \"'auto'\",\n \"[style.resize]\": \"'none'\",\n \"[attr.data-testid]\": \"'copilot-chat-textarea'\",\n \"(input)\": \"onInput($event)\",\n \"(keydown)\": \"onKeyDown($event)\",\n \"[attr.rows]\": \"1\",\n },\n template: \"\",\n styles: [],\n})\nexport class CopilotChatTextarea {\n private elementRef = inject(ElementRef<HTMLTextAreaElement>);\n private platformId = inject(PLATFORM_ID);\n get textareaRef() {\n return this.elementRef;\n }\n\n inputValue = input<string | undefined>();\n inputPlaceholder = input<string | undefined>();\n inputMaxRows = input<number | undefined>();\n inputAutoFocus = input<boolean | undefined>();\n inputDisabled = input<boolean | undefined>();\n inputClass = input<string | undefined>();\n\n valueChange = output<string>();\n keyDown = output<KeyboardEvent>();\n\n readonly chatLabels = injectChatLabels();\n readonly chatState = injectChatState();\n\n // Internal signals\n maxHeight = signal<number>(0);\n\n // Computed values\n computedValue = computed(\n () => this.inputValue() ?? this.chatState.inputValue() ?? \"\",\n );\n placeholder = computed(\n () => this.inputPlaceholder() || this.chatLabels.chatInputPlaceholder,\n );\n disabled = computed(() => this.inputDisabled() ?? false);\n\n computedClass = computed(() => {\n return cn(\"cpk-chat-input-textarea\", this.inputClass());\n });\n\n constructor() {\n afterNextRender(() => {\n if (this.inputAutoFocus() ?? true) {\n this.elementRef.nativeElement.focus();\n }\n });\n // Measure again whenever `inputMaxRows` changes, not only once.\n afterRenderEffect(() => {\n this.inputMaxRows();\n if (!isPlatformBrowser(this.platformId)) return;\n untracked(() => {\n this.calculateMaxHeight();\n this.adjustHeight();\n });\n });\n }\n\n onInput(event: Event): void {\n const textarea = event.target as HTMLTextAreaElement;\n const newValue = textarea.value;\n this.valueChange.emit(newValue);\n\n this.chatState.changeInput(newValue);\n\n this.adjustHeight();\n }\n\n /**\n * Passes every key press to `keyDown`. The chat input decides what Enter\n * does (send, stop, or nothing during IME composition) and prevents the\n * line break itself.\n */\n onKeyDown(event: KeyboardEvent): void {\n this.keyDown.emit(event);\n }\n\n private metrics: ɵTextareaMetrics | null = null;\n\n /** Measures one row and the height of `inputMaxRows` rows. */\n private calculateMaxHeight(): void {\n const maxRows = this.inputMaxRows() ?? ɵCOMPOSER_DEFAULT_MAX_ROWS;\n this.metrics = ɵmeasureTextarea(this.elementRef.nativeElement, maxRows);\n this.maxHeight.set(this.metrics.maxHeight);\n }\n\n private adjustHeight(): number {\n return ɵfitTextareaHeight(this.elementRef.nativeElement, this.maxHeight());\n }\n\n /**\n * Fits the height to the text and returns the text's height and the height\n * of one line, for the input to choose its layout.\n */\n measure(): { scrollHeight: number; singleLineHeight: number } {\n if (!isPlatformBrowser(this.platformId)) {\n return { scrollHeight: 0, singleLineHeight: 0 };\n }\n if (!this.metrics?.singleLineHeight) this.calculateMaxHeight();\n return {\n scrollHeight: this.adjustHeight(),\n singleLineHeight: this.metrics?.singleLineHeight ?? 0,\n };\n }\n\n /**\n * Public method to focus the textarea\n */\n focus(): void {\n this.elementRef.nativeElement.focus();\n }\n\n /**\n * Public method to get current value\n */\n getValue(): string {\n return this.elementRef.nativeElement.value;\n }\n\n /**\n * Public method to set value programmatically\n */\n setValue(value: string): void {\n this.elementRef.nativeElement.value = value;\n this.valueChange.emit(value);\n\n this.chatState.changeInput(value);\n\n setTimeout(() => this.adjustHeight());\n }\n}\n","import {\n Component,\n DestroyRef,\n ElementRef,\n AfterViewInit,\n input,\n output,\n signal,\n computed,\n inject,\n viewChild,\n ChangeDetectionStrategy,\n ViewEncapsulation,\n} from \"@angular/core\";\nimport { ɵAudioRecorder, ɵcreateWaveformRenderer } from \"@copilotkit/core\";\nimport { cn } from \"../../utils\";\nimport type {\n AudioRecorderState,\n AudioRecorderError,\n} from \"./copilot-chat-input.types\";\n\n@Component({\n selector: \"copilot-chat-audio-recorder\",\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `\n <div [class]=\"computedClass()\">\n <canvas\n #canvasRef\n class=\"cpk-audio-recorder-canvas\"\n [style.imageRendering]=\"'pixelated'\"\n ></canvas>\n </div>\n `,\n host: {\n \"[class.copilot-chat-audio-recorder]\": \"true\",\n },\n})\n/**\n * Records from the microphone and draws the live level as a scrolling\n * waveform. The recording itself is `ɵAudioRecorder` from\n * `@copilotkit/core`.\n */\nexport class CopilotChatAudioRecorder implements AfterViewInit {\n private readonly canvasRef =\n viewChild.required<ElementRef<HTMLCanvasElement>>(\"canvasRef\");\n\n inputClass = input<string | undefined>();\n inputShowControls = input<boolean>(false);\n\n stateChange = output<AudioRecorderState>();\n error = output<AudioRecorderError>();\n\n private readonly recorder = new ɵAudioRecorder();\n readonly state = signal<AudioRecorderState>(this.recorder.getSnapshot());\n\n readonly computedClass = computed(() => {\n return cn(\"cpk-audio-recorder\", this.inputClass());\n });\n\n private waveform?: { dispose: () => void };\n\n constructor() {\n const unsubscribe = this.recorder.subscribe(() => {\n const state = this.recorder.getSnapshot();\n this.state.set(state);\n this.stateChange.emit(state);\n });\n inject(DestroyRef).onDestroy(() => {\n this.waveform?.dispose();\n this.dispose();\n unsubscribe();\n });\n }\n\n ngAfterViewInit(): void {\n this.waveform = ɵcreateWaveformRenderer(\n this.canvasRef().nativeElement,\n this.recorder,\n );\n }\n\n /**\n * Request microphone access and start recording.\n *\n * @throws {AudioRecorderError} When the recorder is already starting or\n * recording, or the microphone cannot be used. `error` emits it too.\n */\n start(): Promise<void> {\n return this.recorder.start().catch((error: AudioRecorderError) => {\n this.error.emit(error);\n throw error;\n });\n }\n\n /**\n * Stop recording and resolve with the captured audio.\n *\n * @throws {AudioRecorderError} When nothing records or the recording\n * fails. `error` emits it too.\n */\n stop(): Promise<Blob> {\n return this.recorder.stop().catch((error: AudioRecorderError) => {\n this.error.emit(error);\n throw error;\n });\n }\n\n getState(): AudioRecorderState {\n return this.state();\n }\n\n /**\n * Release every capture resource. Safe to call repeatedly.\n */\n dispose(): void {\n this.recorder.dispose();\n }\n}\n","import {\n Component,\n input,\n output,\n ChangeDetectionStrategy,\n computed,\n ViewEncapsulation,\n} from \"@angular/core\";\n\nimport {\n ArrowUp,\n CopilotIcon,\n Mic,\n X,\n Check,\n Plus,\n} from \"../icons/copilot-icon\";\nimport { injectChatLabels } from \"../../chat-config\";\nimport { CopilotTooltip } from \"../../directives/tooltip\";\nimport { cn } from \"../../utils\";\n\n// Same classes as React's <Button> variants (core's ui/button.css).\nconst chatInputToolbarPrimary =\n \"cpk-button cpk-button-chat-input-toolbar-primary cpk-button-size-chat-input-toolbar-icon\";\nconst chatInputToolbarSecondary =\n \"cpk-button cpk-button-chat-input-toolbar-secondary cpk-button-size-chat-input-toolbar-icon\";\n\n@Component({\n selector: \"copilot-chat-send-button\",\n imports: [CopilotIcon],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `\n <div class=\"cpk-chat-input-send\">\n <button\n type=\"button\"\n [attr.aria-label]=\"labels.chatInputToolbarSendButtonLabel\"\n [disabled]=\"disabled()\"\n [class]=\"buttonClass\"\n (click)=\"onClick()\"\n >\n <copilot-icon\n [img]=\"ArrowUpIcon\"\n iconClass=\"cpk-chat-input-send-icon\"\n ></copilot-icon>\n </button>\n </div>\n `,\n})\nexport class CopilotChatSendButton {\n disabled = input(false);\n clicked = output();\n readonly labels = injectChatLabels();\n\n readonly ArrowUpIcon = ArrowUp;\n buttonClass = chatInputToolbarPrimary;\n\n onClick(): void {\n if (!this.disabled()) {\n this.clicked.emit();\n }\n }\n}\n\n@Component({\n selector: \"copilot-chat-start-transcribe-button\",\n imports: [CopilotIcon, CopilotTooltip],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `\n <button\n type=\"button\"\n [attr.aria-label]=\"label\"\n [disabled]=\"disabled()\"\n [class]=\"buttonClass\"\n [copilotTooltip]=\"label\"\n tooltipPosition=\"below\"\n (click)=\"onClick()\"\n >\n <copilot-icon\n [img]=\"MicIcon\"\n iconClass=\"cpk-chat-input-toolbar-icon\"\n ></copilot-icon>\n </button>\n `,\n})\nexport class CopilotChatStartTranscribeButton {\n disabled = input(false);\n clicked = output();\n\n readonly labels = injectChatLabels();\n\n readonly MicIcon = Mic;\n buttonClass = `${chatInputToolbarSecondary} cpk-chat-input-start-transcribe-button`;\n\n get label(): string {\n return this.labels.chatInputToolbarStartTranscribeButtonLabel;\n }\n\n onClick(): void {\n if (!this.disabled()) {\n this.clicked.emit();\n }\n }\n}\n\n@Component({\n selector: \"copilot-chat-cancel-transcribe-button\",\n imports: [CopilotIcon, CopilotTooltip],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `\n <button\n type=\"button\"\n [attr.aria-label]=\"label\"\n [disabled]=\"disabled()\"\n [class]=\"buttonClass\"\n [copilotTooltip]=\"label\"\n tooltipPosition=\"below\"\n (click)=\"onClick()\"\n >\n <copilot-icon\n [img]=\"XIcon\"\n iconClass=\"cpk-chat-input-toolbar-icon\"\n ></copilot-icon>\n </button>\n `,\n})\nexport class CopilotChatCancelTranscribeButton {\n disabled = input(false);\n clicked = output();\n\n readonly labels = injectChatLabels();\n\n readonly XIcon = X;\n buttonClass = `${chatInputToolbarSecondary} cpk-chat-input-cancel-transcribe-button`;\n\n get label(): string {\n return this.labels.chatInputToolbarCancelTranscribeButtonLabel;\n }\n\n onClick(): void {\n if (!this.disabled()) {\n this.clicked.emit();\n }\n }\n}\n\n@Component({\n selector: \"copilot-chat-finish-transcribe-button\",\n imports: [CopilotIcon, CopilotTooltip],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `\n <button\n type=\"button\"\n [attr.aria-label]=\"label\"\n [disabled]=\"disabled()\"\n [class]=\"buttonClass\"\n [copilotTooltip]=\"label\"\n tooltipPosition=\"below\"\n (click)=\"onClick()\"\n >\n <copilot-icon\n [img]=\"CheckIcon\"\n iconClass=\"cpk-chat-input-toolbar-icon\"\n ></copilot-icon>\n </button>\n `,\n})\nexport class CopilotChatFinishTranscribeButton {\n disabled = input(false);\n clicked = output();\n\n readonly labels = injectChatLabels();\n\n readonly CheckIcon = Check;\n buttonClass = `${chatInputToolbarSecondary} cpk-chat-input-finish-transcribe-button`;\n\n get label(): string {\n return this.labels.chatInputToolbarFinishTranscribeButtonLabel;\n }\n\n onClick(): void {\n if (!this.disabled()) {\n this.clicked.emit();\n }\n }\n}\n\n@Component({\n selector: \"copilot-chat-add-file-button\",\n imports: [CopilotIcon, CopilotTooltip],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `\n <button\n type=\"button\"\n [attr.aria-label]=\"label\"\n [disabled]=\"disabled()\"\n [class]=\"buttonClass\"\n [copilotTooltip]=\"label\"\n tooltipPosition=\"below\"\n (click)=\"onClick()\"\n >\n <copilot-icon\n [img]=\"PlusIcon\"\n iconClass=\"cpk-chat-input-add-menu-icon\"\n ></copilot-icon>\n </button>\n `,\n})\nexport class CopilotChatAddFileButton {\n disabled = input(false);\n clicked = output();\n\n readonly labels = injectChatLabels();\n\n readonly PlusIcon = Plus;\n buttonClass = `${chatInputToolbarSecondary} cpk-chat-input-add-menu-button`;\n\n get label(): string {\n return this.labels.chatInputToolbarAddButtonLabel;\n }\n\n onClick(): void {\n if (!this.disabled()) {\n this.clicked.emit();\n }\n }\n}\n\n// Base toolbar button component that other buttons can use\n@Component({\n selector: \"copilot-chat-toolbar-button\",\n imports: [CopilotTooltip],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `\n <button\n type=\"button\"\n [disabled]=\"disabled()\"\n [class]=\"computedClass()\"\n [attr.aria-label]=\"title() || null\"\n [copilotTooltip]=\"title()\"\n tooltipPosition=\"below\"\n (click)=\"onClick()\"\n >\n <ng-content></ng-content>\n </button>\n `,\n})\nexport class CopilotChatToolbarButton {\n disabled = input(false);\n variant = input<\"primary\" | \"secondary\">(\"secondary\");\n customClass = input(\"\");\n title = input(\"\");\n\n clicked = output();\n\n computedClass = computed(() => {\n const variantClass =\n this.variant() === \"primary\"\n ? chatInputToolbarPrimary\n : chatInputToolbarSecondary;\n return cn(variantClass, this.customClass());\n });\n\n onClick(): void {\n if (!this.disabled()) {\n this.clicked.emit();\n }\n }\n}\n","import {\n Component,\n input,\n computed,\n ChangeDetectionStrategy,\n ViewEncapsulation,\n} from \"@angular/core\";\n\nimport { cn } from \"../../utils\";\nimport { hostStyles } from \"../host-styles\";\n\n@Component({\n selector: \"div[copilotChatToolbar]\",\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n \"[class]\": \"computedClass()\",\n },\n template: `\n <ng-content></ng-content>\n `,\n styles: [hostStyles],\n})\nexport class CopilotChatToolbar {\n readonly inputClass = input<string | undefined>();\n\n readonly computedClass = computed(() => {\n return cn(\"copilot-chat-toolbar\", this.inputClass());\n });\n}\n","import {\n Component,\n input,\n computed,\n ChangeDetectionStrategy,\n ViewEncapsulation,\n} from \"@angular/core\";\n\nimport { CdkMenuModule } from \"@angular/cdk/menu\";\nimport { OverlayModule } from \"@angular/cdk/overlay\";\nimport { ChevronRight, CopilotIcon, Plus } from \"../icons/copilot-icon\";\nimport type { ToolsMenuItem } from \"./copilot-chat-input.types\";\nimport { ɵnormalizeToolsMenu } from \"@copilotkit/core\";\nimport { cn } from \"../../utils\";\nimport { injectChatLabels } from \"../../chat-config\";\nimport { CopilotTooltip } from \"../../directives/tooltip\";\n\n@Component({\n selector: \"copilot-chat-tools-menu\",\n imports: [CdkMenuModule, OverlayModule, CopilotIcon, CopilotTooltip],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `\n <button\n type=\"button\"\n [attr.aria-label]=\"tooltipLabel()\"\n [disabled]=\"triggerDisabled()\"\n [class]=\"buttonClass()\"\n [cdkMenuTriggerFor]=\"menu\"\n [copilotTooltip]=\"tooltipLabel()\"\n tooltipPosition=\"below\"\n >\n <copilot-icon\n [img]=\"PlusIcon\"\n iconClass=\"cpk-chat-input-add-menu-icon\"\n ></copilot-icon>\n </button>\n\n <ng-template #menu>\n <div\n data-copilotkit\n class=\"cpk-dropdown-menu-content\"\n data-state=\"open\"\n cdkMenu\n >\n @for (item of menuItems(); track $index) {\n @if (item === \"-\") {\n <div class=\"cpk-dropdown-menu-separator\"></div>\n } @else if (isMenuItem(item)) {\n @if (item.items && item.items.length > 0) {\n <!-- Submenu trigger -->\n <button\n type=\"button\"\n class=\"cpk-dropdown-menu-sub-trigger\"\n [cdkMenuTriggerFor]=\"submenu\"\n cdkMenuItem\n >\n {{ item.label }}\n <copilot-icon\n [img]=\"ChevronRightIcon\"\n iconClass=\"cpk-dropdown-menu-sub-trigger-icon\"\n ></copilot-icon>\n </button>\n\n <!-- Submenu template -->\n <ng-template #submenu>\n <div\n data-copilotkit\n class=\"cpk-dropdown-menu-sub-content\"\n data-state=\"open\"\n cdkMenu\n >\n @for (subItem of item.items; track $index) {\n @if (subItem === \"-\") {\n <div class=\"cpk-dropdown-menu-separator\"></div>\n } @else if (isMenuItem(subItem)) {\n <button\n type=\"button\"\n class=\"cpk-dropdown-menu-item\"\n (click)=\"handleItemClick(subItem)\"\n cdkMenuItem\n >\n {{ subItem.label }}\n </button>\n }\n }\n </div>\n </ng-template>\n } @else {\n <!-- Regular menu item -->\n <button\n type=\"button\"\n class=\"cpk-dropdown-menu-item\"\n (click)=\"handleItemClick(item)\"\n cdkMenuItem\n >\n {{ item.label }}\n </button>\n }\n }\n }\n </div>\n </ng-template>\n `,\n styles: [\n `\n /* CDK Overlay styles for positioning */\n .cdk-overlay-pane {\n position: absolute;\n pointer-events: auto;\n z-index: 1000;\n }\n\n /* Ensure menu appears above other content */\n .cdk-overlay-container {\n position: fixed;\n z-index: 1000;\n }\n `,\n ],\n})\nexport class CopilotChatToolsMenu {\n readonly PlusIcon = Plus;\n readonly ChevronRightIcon = ChevronRight;\n inputToolsMenu = input<(ToolsMenuItem | \"-\")[] | undefined>();\n inputDisabled = input<boolean | undefined>();\n inputClass = input<string | undefined>();\n inputAddFile = input<(() => void) | undefined>();\n\n private labels = injectChatLabels();\n\n // Derive state from inputs\n toolsMenu = computed(() => this.inputToolsMenu() ?? []);\n disabled = computed(() => this.inputDisabled() ?? false);\n customClass = computed(() => this.inputClass());\n addFile = computed(() => this.inputAddFile());\n\n menuItems = computed<(ToolsMenuItem | \"-\")[]>(() => {\n const addFile = this.addFile();\n return ɵnormalizeToolsMenu<ToolsMenuItem>(\n this.toolsMenu(),\n addFile\n ? { label: this.labels.chatInputToolbarAddButtonLabel, action: addFile }\n : undefined,\n );\n });\n\n hasItems = computed(() => this.menuItems().length > 0);\n triggerDisabled = computed(() => this.disabled() || !this.hasItems());\n\n readonly label = this.labels.chatInputToolbarToolsButtonLabel;\n\n tooltipLabel = computed(() =>\n this.addFile()\n ? this.labels.chatInputToolbarAddButtonLabel\n : this.labels.chatInputToolbarToolsButtonLabel,\n );\n\n buttonClass = computed(() =>\n cn(\n \"cpk-button cpk-button-chat-input-toolbar-secondary cpk-button-size-chat-input-toolbar-icon cpk-chat-input-add-menu-button\",\n this.customClass(),\n ),\n );\n\n isMenuItem(item: any): item is ToolsMenuItem {\n return item && typeof item === \"object\" && \"label\" in item;\n }\n\n handleItemClick(item: ToolsMenuItem): void {\n if (item.action) {\n item.action();\n }\n }\n}\n","import { InjectionToken } from \"@angular/core\";\nimport type { Signal } from \"@angular/core\";\n\n/**\n * The run state the chat input needs for its stop button. `CopilotChat`\n * provides it. Without a provider, the input never shows stop.\n * @internal\n */\nexport interface ChatRunControl {\n /** `true` while the agent runs. */\n readonly isRunning: Signal<boolean>;\n /** `true` when `stop()` can stop the run: it runs and has messages. */\n readonly canStop: Signal<boolean>;\n /** Stop the agent's current run. */\n stop(): void;\n}\n\n/** @internal */\nexport const COPILOT_CHAT_RUN_CONTROL = new InjectionToken<ChatRunControl>(\n \"COPILOT_CHAT_RUN_CONTROL\",\n);\n","import type { OnDestroy, Type, ElementRef } from \"@angular/core\";\nimport {\n Component,\n TemplateRef,\n signal,\n computed,\n ChangeDetectionStrategy,\n ViewEncapsulation,\n contentChild,\n input,\n output,\n viewChild,\n afterNextRender,\n afterRenderEffect,\n inject,\n DestroyRef,\n PLATFORM_ID,\n} from \"@angular/core\";\nimport { CommonModule, isPlatformBrowser } from \"@angular/common\";\nimport {\n ɵCOMPOSER_DEFAULT_MAX_ROWS,\n ɵcomposerButtonState,\n ɵcreateComposerAutosize,\n ɵresolveComposerKey,\n ɵsyncRecorderToMode,\n} from \"@copilotkit/core\";\nimport type { ɵComposerInput } from \"@copilotkit/core\";\nimport { CopilotSlot } from \"../../slots/copilot-slot\";\nimport { injectChatLabels } from \"../../chat-config\";\nimport { ArrowUp, CopilotIcon, Loader2, Square } from \"../icons/copilot-icon\";\nimport { CopilotChatTextarea } from \"./copilot-chat-textarea\";\nimport { CopilotChatAudioRecorder } from \"./copilot-chat-audio-recorder\";\nimport {\n CopilotChatStartTranscribeButton,\n CopilotChatCancelTranscribeButton,\n CopilotChatFinishTranscribeButton,\n CopilotChatAddFileButton,\n} from \"./copilot-chat-buttons\";\nimport { CopilotChatToolbar } from \"./copilot-chat-toolbar\";\nimport { CopilotChatToolsMenu } from \"./copilot-chat-tools-menu\";\nimport type {\n CopilotChatInputMode,\n ToolsMenuItem,\n} from \"./copilot-chat-input.types\";\nimport { cn } from \"../../utils\";\nimport { hostStyles } from \"../host-styles\";\nimport { injectChatState } from \"../../chat-state\";\nimport { explicitEffect } from \"../../explicit-effect\";\nimport { CopilotKit } from \"../../copilotkit\";\nimport { COPILOT_CHAT_RUN_CONTROL } from \"./copilot-chat-run-control\";\n\n/**\n * Context provided to slot templates\n */\nexport interface SendButtonContext {\n /** Send the typed text. */\n send: () => void;\n /** Stop the agent's run. Does nothing when no run can stop. */\n stop: () => void;\n /** What a click on the button does: send the text or stop the run. */\n action: \"send\" | \"stop\";\n disabled: boolean;\n value: string;\n}\n\nexport interface ToolbarContext {\n mode: CopilotChatInputMode;\n value: string;\n}\n\n@Component({\n selector: \"copilot-chat-input\",\n host: { \"data-copilotkit\": \"\", class: \"cpk-chat-input\" },\n imports: [\n CommonModule,\n CopilotSlot,\n CopilotIcon,\n CopilotChatTextarea,\n CopilotChatAudioRecorder,\n CopilotChatStartTranscribeButton,\n CopilotChatCancelTranscribeButton,\n CopilotChatFinishTranscribeButton,\n CopilotChatAddFileButton,\n CopilotChatToolsMenu,\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `\n <ng-template #mainInputArea>\n @if (computedMode() === \"transcribe\") {\n @if (audioRecorderTemplate() || audioRecorderComponent()) {\n <copilot-slot\n [slot]=\"audioRecorderTemplate() || audioRecorderComponent()\"\n [context]=\"audioRecorderContext()\"\n [defaultComponent]=\"defaultAudioRecorder\"\n >\n </copilot-slot>\n } @else {\n <copilot-chat-audio-recorder [inputShowControls]=\"true\">\n </copilot-chat-audio-recorder>\n }\n } @else if (computedMode() === \"processing\") {\n <div class=\"cpk-chat-input-processing\">\n <copilot-icon\n [img]=\"Loader2Icon\"\n iconClass=\"cpk-chat-input-processing-spinner\"\n ></copilot-icon>\n </div>\n } @else {\n @if (textAreaTemplate() || textAreaComponent()) {\n <copilot-slot\n [slot]=\"textAreaTemplate() || textAreaComponent()\"\n [context]=\"textAreaContext()\"\n >\n </copilot-slot>\n } @else {\n <textarea\n copilotChatTextarea\n [inputValue]=\"computedValue()\"\n [inputAutoFocus]=\"computedAutoFocus()\"\n [inputClass]=\"defaultTextAreaClass()\"\n [inputMaxRows]=\"textAreaMaxRows()\"\n [inputPlaceholder]=\"textAreaPlaceholder()\"\n (keyDown)=\"handleKeyDown($event)\"\n (valueChange)=\"handleValueChange($event)\"\n ></textarea>\n }\n }\n </ng-template>\n\n <ng-template #leadingToolbarItems>\n @if (\n addFileButtonTemplate() ||\n addFileButtonComponent() ||\n toolsButtonTemplate() ||\n toolsButtonComponent()\n ) {\n @if (addFileButtonTemplate() || addFileButtonComponent()) {\n <copilot-slot\n [slot]=\"addFileButtonTemplate() || addFileButtonComponent()\"\n [context]=\"{\n inputDisabled: addFileButtonDisabled(),\n }\"\n [outputs]=\"addFileButtonOutputs\"\n [defaultComponent]=\"CopilotChatAddFileButton\"\n >\n </copilot-slot>\n } @else if (chatState.attachmentsEnabled()) {\n <copilot-chat-add-file-button\n [disabled]=\"addFileButtonDisabled()\"\n (clicked)=\"handleAddFile()\"\n >\n </copilot-chat-add-file-button>\n }\n @if (computedToolsMenu().length > 0) {\n @if (toolsButtonTemplate() || toolsButtonComponent()) {\n <copilot-slot\n [slot]=\"toolsButtonTemplate() || toolsButtonComponent()\"\n [context]=\"toolsContext()\"\n [defaultComponent]=\"CopilotChatToolsMenu\"\n >\n </copilot-slot>\n } @else {\n <copilot-chat-tools-menu\n [inputToolsMenu]=\"computedToolsMenu()\"\n [inputDisabled]=\"computedMode() === 'transcribe'\"\n >\n </copilot-chat-tools-menu>\n }\n }\n } @else {\n <copilot-chat-tools-menu\n [inputToolsMenu]=\"computedToolsMenu()\"\n [inputAddFile]=\"addFileMenuAction()\"\n [inputDisabled]=\"computedMode() === 'transcribe'\"\n >\n </copilot-chat-tools-menu>\n }\n @if (additionalToolbarItems()) {\n <ng-container\n [ngTemplateOutlet]=\"additionalToolbarItems() || null\"\n ></ng-container>\n }\n </ng-template>\n\n <ng-template #trailingToolbarItems>\n @if (computedMode() === \"transcribe\") {\n @if (\n cancelTranscribeButtonTemplate() || cancelTranscribeButtonComponent()\n ) {\n <copilot-slot\n [slot]=\"\n cancelTranscribeButtonTemplate() || cancelTranscribeButtonComponent()\n \"\n [context]=\"{}\"\n [outputs]=\"cancelTranscribeButtonOutputs\"\n [defaultComponent]=\"CopilotChatCancelTranscribeButton\"\n >\n </copilot-slot>\n } @else {\n <copilot-chat-cancel-transcribe-button\n (clicked)=\"handleCancelTranscribe()\"\n >\n </copilot-chat-cancel-transcribe-button>\n }\n @if (\n finishTranscribeButtonTemplate() || finishTranscribeButtonComponent()\n ) {\n <copilot-slot\n [slot]=\"\n finishTranscribeButtonTemplate() || finishTranscribeButtonComponent()\n \"\n [context]=\"{}\"\n [outputs]=\"finishTranscribeButtonOutputs\"\n [defaultComponent]=\"CopilotChatFinishTranscribeButton\"\n >\n </copilot-slot>\n } @else {\n <copilot-chat-finish-transcribe-button\n (clicked)=\"handleFinishTranscribe()\"\n >\n </copilot-chat-finish-transcribe-button>\n }\n } @else {\n @if (audioTranscriptionEnabled()) {\n @if (\n startTranscribeButtonTemplate() || startTranscribeButtonComponent()\n ) {\n <copilot-slot\n [slot]=\"\n startTranscribeButtonTemplate() || startTranscribeButtonComponent()\n \"\n [context]=\"{}\"\n [outputs]=\"startTranscribeButtonOutputs\"\n [defaultComponent]=\"CopilotChatStartTranscribeButton\"\n >\n </copilot-slot>\n } @else {\n <copilot-chat-start-transcribe-button\n (clicked)=\"handleStartTranscribe()\"\n >\n </copilot-chat-start-transcribe-button>\n }\n }\n <!-- Send button with slot -->\n @if (sendButtonTemplate() || sendButtonComponent()) {\n <copilot-slot\n [slot]=\"sendButtonTemplate() || sendButtonComponent()\"\n [context]=\"sendButtonContext()\"\n [outputs]=\"sendButtonOutputs\"\n >\n </copilot-slot>\n } @else {\n <div class=\"cpk-chat-input-send\">\n <button\n type=\"button\"\n [attr.aria-label]=\"\n showsStop()\n ? labels.chatInputToolbarStopButtonLabel\n : labels.chatInputToolbarSendButtonLabel\n \"\n [class]=\"sendButtonClass() || defaultButtonClass\"\n [disabled]=\"sendButtonDisabled()\"\n (click)=\"handleSendButtonClick()\"\n >\n @if (showsStop()) {\n <copilot-icon\n [img]=\"StopIcon\"\n iconClass=\"cpk-chat-input-stop-icon\"\n ></copilot-icon>\n } @else {\n <copilot-icon\n [img]=\"ArrowUpIcon\"\n iconClass=\"cpk-chat-input-send-icon\"\n ></copilot-icon>\n }\n </button>\n </div>\n }\n }\n </ng-template>\n\n <div class=\"cpk-chat-input-wrapper\">\n <div #pill [class]=\"computedClass()\" [attr.data-layout]=\"layoutValue()\">\n @if (toolbarTemplate() || toolbarComponent()) {\n <ng-container [ngTemplateOutlet]=\"mainInputArea\"></ng-container>\n <copilot-slot\n [slot]=\"toolbarTemplate() || toolbarComponent()\"\n [context]=\"toolbarContext()\"\n [defaultComponent]=\"CopilotChatToolbar\"\n >\n </copilot-slot>\n } @else {\n <div #grid class=\"cpk-chat-input-grid\" [attr.data-layout]=\"layoutValue()\">\n <div #start class=\"cpk-chat-input-start\">\n <ng-container [ngTemplateOutlet]=\"leadingToolbarItems\"></ng-container>\n </div>\n <div class=\"cpk-chat-input-field\">\n <ng-container [ngTemplateOutlet]=\"mainInputArea\"></ng-container>\n </div>\n <div #actions class=\"cpk-chat-input-actions\">\n <ng-container\n [ngTemplateOutlet]=\"trailingToolbarItems\"\n ></ng-container>\n </div>\n </div>\n }\n </div>\n </div>\n `,\n styles: [hostStyles],\n})\nexport class CopilotChatInput implements OnDestroy {\n readonly textAreaRef = viewChild(CopilotChatTextarea);\n\n readonly audioRecorderRef = viewChild(CopilotChatAudioRecorder);\n\n // Capture templates from content projection\n readonly sendButtonTemplate = contentChild<\n unknown,\n TemplateRef<SendButtonContext>\n >(\"sendButton\", { read: TemplateRef });\n readonly toolbarTemplate = contentChild<unknown, TemplateRef<ToolbarContext>>(\n \"toolbar\",\n { read: TemplateRef },\n );\n readonly textAreaTemplate = contentChild<unknown, TemplateRef<any>>(\n \"textArea\",\n { read: TemplateRef },\n );\n readonly audioRecorderTemplate = contentChild<unknown, TemplateRef<any>>(\n \"audioRecorder\",\n { read: TemplateRef },\n );\n readonly startTranscribeButtonTemplate = contentChild<\n unknown,\n TemplateRef<any>\n >(\"startTranscribeButton\", { read: TemplateRef });\n readonly cancelTranscribeButtonTemplate = contentChild<\n unknown,\n TemplateRef<any>\n >(\"cancelTranscribeButton\", { read: TemplateRef });\n readonly finishTranscribeButtonTemplate = contentChild<\n unknown,\n TemplateRef<any>\n >(\"finishTranscribeButton\", { read: TemplateRef });\n readonly addFileButtonTemplate = contentChild<unknown, TemplateRef<any>>(\n \"addFileButton\",\n { read: TemplateRef },\n );\n readonly toolsButtonTemplate = contentChild<unknown, TemplateRef<any>>(\n \"toolsButton\",\n { read: TemplateRef },\n );\n\n // Class inputs for styling default components\n sendButtonClass = input<string | undefined>(undefined);\n toolbarClass = input<string | undefined>(undefined);\n textAreaClass = input<string | undefined>(undefined);\n textAreaMaxRows = input<number | undefined>(undefined);\n textAreaPlaceholder = input<string | undefined>(undefined);\n audioRecorderClass = input<string | undefined>(undefined);\n startTranscribeButtonClass = input<string | undefined>(undefined);\n cancelTranscribeButtonClass = input<string | undefined>(undefined);\n finishTranscribeButtonClass = input<string | undefined>(undefined);\n addFileButtonClass = input<string | undefined>(undefined);\n toolsButtonClass = input<string | undefined>(undefined);\n\n // Component inputs for overrides\n sendButtonComponent = input<Type<any> | undefined>(undefined);\n toolbarComponent = input<Type<any> | undefined>(undefined);\n textAreaComponent = input<Type<any> | undefined>(undefined);\n audioRecorderComponent = input<Type<any> | undefined>(undefined);\n startTranscribeButtonComponent = input<Type<any> | undefined>(undefined);\n cancelTranscribeButtonComponent = input<Type<any> | undefined>(undefined);\n finishTranscribeButtonComponent = input<Type<any> | undefined>(undefined);\n addFileButtonComponent = input<Type<any> | undefined>(undefined);\n toolsButtonComponent = input<Type<any> | undefined>(undefined);\n\n // Regular inputs\n mode = input<CopilotChatInputMode | undefined>(undefined);\n toolsMenu = input<(ToolsMenuItem | \"-\")[] | undefined>(undefined);\n autoFocus = input<boolean | undefined>(undefined);\n value = input<string | undefined>(undefined);\n inputClass = input<string | undefined>(undefined);\n // Note: Prefer host `class` for styling this component;\n // keep only `inputClass` to style the internal wrapper if needed.\n additionalToolbarItems = input<TemplateRef<any> | undefined>(undefined);\n\n // Output events\n submitMessage = output<string>();\n startTranscribe = output();\n cancelTranscribe = output();\n finishTranscribe = output();\n finishTranscribeWithAudio = output<Blob>();\n addFile = output();\n valueChange = output<string>();\n\n // Icons and default classes\n readonly ArrowUpIcon = ArrowUp;\n /** Lucide's `square`, drawn filled on the button while the agent runs. */\n readonly StopIcon = Square;\n readonly Loader2Icon = Loader2;\n readonly defaultButtonClass =\n \"cpk-button cpk-button-chat-input-toolbar-primary cpk-button-size-chat-input-toolbar-icon\";\n\n // Services\n readonly labels = injectChatLabels();\n // readonly chatConfig = injectChatConfig();\n readonly chatState = injectChatState();\n readonly copilotKit = inject(CopilotKit);\n /** Run state from `CopilotChat`. Without it, the input never shows stop. */\n readonly #runControl = inject(COPILOT_CHAT_RUN_CONTROL, { optional: true });\n\n // Signals\n modeSignal = signal<CopilotChatInputMode>(\"input\");\n toolsMenuSignal = signal<(ToolsMenuItem | \"-\")[]>([]);\n autoFocusSignal = signal<boolean>(true);\n customClass = signal<string | undefined>(undefined);\n\n // Default components\n // Note: CopilotChatTextarea uses attribute selector but is a component\n defaultAudioRecorder = CopilotChatAudioRecorder;\n defaultSendButton: any = null; // Will be set to avoid circular dependency\n CopilotChatToolbar = CopilotChatToolbar;\n CopilotChatAddFileButton = CopilotChatAddFileButton;\n CopilotChatToolsMenu = CopilotChatToolsMenu;\n CopilotChatCancelTranscribeButton = CopilotChatCancelTranscribeButton;\n CopilotChatFinishTranscribeButton = CopilotChatFinishTranscribeButton;\n CopilotChatStartTranscribeButton = CopilotChatStartTranscribeButton;\n\n // Computed values\n // While CopilotChat transcribes a recording, the input shows a spinner.\n computedMode = computed<CopilotChatInputMode>(\n () =>\n this.mode() ??\n (this.chatState.isTranscribing?.() ? \"processing\" : this.modeSignal()),\n );\n /**\n * `\"expanded\"` puts the textarea on its own row above the buttons, as in\n * React: when the text breaks onto a second line, is too wide for the\n * single row, or the viewport is narrower than 768px.\n */\n readonly layout = signal<\"compact\" | \"expanded\">(\"compact\");\n readonly layoutValue = computed(() =>\n this.computedMode() === \"input\" ? this.layout() : \"compact\",\n );\n computedToolsMenu = computed(() => this.toolsMenu() ?? []);\n computedAutoFocus = computed(() => this.autoFocus() ?? true);\n audioTranscriptionEnabled = computed(\n () => this.copilotKit.audioFileTranscriptionEnabled() === true,\n );\n computedValue = computed(() => {\n const customValue = this.value();\n return customValue !== undefined\n ? customValue\n : (this.chatState.inputValue() ?? \"\");\n });\n addFileButtonDisabled = computed(\n () =>\n this.computedMode() === \"transcribe\" ||\n !this.chatState.attachmentsEnabled(),\n );\n addFileMenuAction = computed<(() => void) | undefined>(() =>\n this.chatState.attachmentsEnabled()\n ? () => this.handleAddFile()\n : undefined,\n );\n /** What the send/stop rules from `@copilotkit/core` read. */\n readonly composerInput = computed<ɵComposerInput>(() => ({\n mode: this.computedMode(),\n isRunning: this.#runControl?.isRunning() ?? false,\n value: this.computedValue(),\n canSubmit: true,\n canStop: this.#runControl?.canStop() ?? false,\n disabled: this.computedMode() === \"processing\",\n attachmentsUploading: this.chatState.attachmentsUploading(),\n }));\n readonly buttonState = computed(() =>\n ɵcomposerButtonState(this.composerInput()),\n );\n /** The button stops the run instead of sending. */\n readonly showsStop = computed(() => this.buttonState().action === \"stop\");\n sendButtonDisabled = computed(() => this.buttonState().disabled);\n\n computedClass = computed(() =>\n cn(\"copilotKitInput cpk-chat-input-pill\", this.customClass()),\n );\n\n defaultTextAreaClass = computed(() =>\n cn(\n this.layoutValue() === \"expanded\"\n ? \"cpk-chat-input-textarea-expanded\"\n : \"cpk-chat-input-textarea-compact\",\n this.textAreaClass(),\n ),\n );\n\n // Context for slots (reactive via signals)\n sendButtonContext = computed<SendButtonContext>(() => ({\n send: () => this.send(),\n stop: () => this.stopRun(),\n action: this.buttonState().action,\n disabled: this.sendButtonDisabled(),\n value: this.computedValue(),\n }));\n\n toolbarContext = computed<ToolbarContext>(() => ({\n mode: this.computedMode(),\n value: this.computedValue(),\n }));\n\n textAreaContext = computed(() => ({\n value: this.computedValue(),\n autoFocus: this.computedAutoFocus(),\n disabled: this.computedMode() === \"processing\",\n layout: this.layoutValue(),\n maxRows: this.textAreaMaxRows(),\n placeholder: this.textAreaPlaceholder(),\n inputClass: this.textAreaClass(),\n onKeyDown: (event: KeyboardEvent) => this.handleKeyDown(event),\n onChange: (value: string) => this.handleValueChange(value),\n }));\n\n audioRecorderContext = computed(() => ({\n inputShowControls: true,\n }));\n\n // Button contexts removed - now using outputs map for click handlers\n\n toolsContext = computed(() => ({\n inputToolsMenu: this.computedToolsMenu(),\n inputDisabled: this.computedMode() === \"transcribe\",\n }));\n\n constructor() {\n explicitEffect(\n () => ({\n recorder: this.audioRecorderRef(),\n mode: this.computedMode(),\n }),\n ({ recorder, mode }) => {\n if (!recorder) return;\n void ɵsyncRecorderToMode(\n {\n state: recorder.getState(),\n start: () => recorder.start(),\n stop: () => recorder.stop(),\n },\n mode,\n );\n },\n );\n\n afterNextRender(() => {\n if (this.computedAutoFocus()) {\n this.textAreaRef()?.focus();\n }\n });\n\n // Re-evaluate the layout after every render that changes the text or mode.\n afterRenderEffect(() => this.evaluateLayout());\n const unsubscribe = this.autosize.subscribe(() =>\n this.layout.set(this.autosize.getSnapshot()),\n );\n this.destroyRef.onDestroy(() => {\n unsubscribe();\n this.autosize.dispose();\n });\n }\n\n private readonly grid = viewChild<ElementRef<HTMLElement>>(\"grid\");\n private readonly start = viewChild<ElementRef<HTMLElement>>(\"start\");\n private readonly actions = viewChild<ElementRef<HTMLElement>>(\"actions\");\n private readonly destroyRef = inject(DestroyRef);\n private readonly isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n /** Sizes the text box and picks the layout, as in React and Vue. */\n private readonly autosize = ɵcreateComposerAutosize({\n getElements: () => ({\n textarea: this.textAreaRef()?.textareaRef.nativeElement,\n grid: this.grid()?.nativeElement,\n start: this.start()?.nativeElement,\n actions: this.actions()?.nativeElement,\n }),\n });\n\n /**\n * Picks the compact or expanded layout like React's input: expanded when\n * the text has a line break, wraps, or is wider than the compact row.\n */\n evaluateLayout(): void {\n if (!this.isBrowser) return;\n this.autosize.setMaxRows(\n this.textAreaMaxRows() ?? ɵCOMPOSER_DEFAULT_MAX_ROWS,\n );\n this.autosize.evaluate(this.computedValue(), this.computedMode());\n }\n\n // Output maps for slots\n addFileButtonOutputs = { clicked: () => this.handleAddFile() };\n cancelTranscribeButtonOutputs = {\n clicked: () => this.handleCancelTranscribe(),\n };\n finishTranscribeButtonOutputs = {\n clicked: () => this.handleFinishTranscribe(),\n };\n startTranscribeButtonOutputs = {\n clicked: () => this.handleStartTranscribe(),\n };\n // Support both `clicked` (idiomatic in our slots) and `click` (legacy)\n sendButtonOutputs = {\n clicked: () => this.handleSendButtonClick(),\n click: () => this.handleSendButtonClick(),\n };\n\n ngOnDestroy(): void {\n // Clean up any resources\n const recorder = this.audioRecorderRef();\n if (recorder?.getState() === \"recording\") {\n recorder.stop().catch(console.error);\n }\n }\n\n /**\n * Enter sends the text. Enter in an empty input while the agent runs stops\n * the run. Shift+Enter adds a line break, and Enter during IME composition\n * (for example CJK input) is left to the browser.\n */\n handleKeyDown(event: KeyboardEvent): void {\n // Enter never adds a line break, also when there is nothing to send.\n const { action, preventDefault } = ɵresolveComposerKey(\n event,\n this.composerInput(),\n );\n if (preventDefault) event.preventDefault();\n if (action === \"send\") this.send();\n if (action === \"stop\") this.stopRun();\n }\n\n /** While the agent runs, the button stops it. Otherwise it sends. */\n handleSendButtonClick(): void {\n if (this.buttonState().action === \"stop\") {\n this.stopRun();\n return;\n }\n this.send();\n }\n\n /** Stop the agent's run, when one can stop. */\n stopRun(): void {\n if (!this.composerInput().canStop) return;\n this.#runControl?.stop();\n }\n\n handleValueChange(value: string): void {\n this.valueChange.emit(value);\n if (this.chatState) this.chatState.changeInput(value);\n }\n\n send(): void {\n if (!this.buttonState().canSend) return;\n const trimmed = this.computedValue().trim();\n this.submitMessage.emit(trimmed);\n\n void this.chatState.submitInput(trimmed);\n\n if (this.chatState) this.chatState.changeInput(\"\");\n this.textAreaRef()?.setValue(\"\");\n\n // Refocus input\n if (this.textAreaRef()) {\n setTimeout(() => {\n this.textAreaRef()?.focus();\n });\n }\n }\n\n handleStartTranscribe(): void {\n if (!this.audioTranscriptionEnabled()) {\n return;\n }\n this.startTranscribe.emit();\n this.modeSignal.set(\"transcribe\");\n }\n\n handleCancelTranscribe(): void {\n this.cancelTranscribe.emit();\n this.modeSignal.set(\"input\");\n }\n\n async handleFinishTranscribe(): Promise<void> {\n const recorder = this.audioRecorderRef();\n let audioBlob: Blob | undefined;\n if (recorder?.getState() === \"recording\") {\n try {\n audioBlob = await recorder.stop();\n } catch (error) {\n console.error(\"Failed to stop recording:\", error);\n }\n }\n\n this.finishTranscribe.emit();\n this.modeSignal.set(\"input\");\n\n if (audioBlob) {\n this.finishTranscribeWithAudio.emit(audioBlob);\n await this.chatState.finishTranscription(audioBlob);\n }\n }\n\n handleAddFile(): void {\n if (this.addFileButtonDisabled()) {\n return;\n }\n this.addFile.emit();\n this.chatState.addFile();\n }\n}\n","import {\n Component,\n input,\n ChangeDetectionStrategy,\n ViewEncapsulation,\n} from \"@angular/core\";\n\nimport { cn } from \"../..//utils\";\nimport { injectChatLabels } from \"../../chat-config\";\n\n/**\n * Disclaimer component for CopilotChatView\n * Shows configurable disclaimer text below the input\n * Integrates with CopilotChatConfigurationService for labels\n */\n@Component({\n selector: \"copilot-chat-view-disclaimer\",\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `\n <div [class]=\"computedClass\">\n {{ disclaimerText }}\n </div>\n `,\n})\nexport class CopilotChatViewDisclaimer {\n inputClass = input<string | undefined>();\n text = input<string | undefined>();\n\n readonly labels = injectChatLabels();\n\n // Get disclaimer text from input or configuration\n get disclaimerText(): string {\n if (this.text()) {\n return this.text() as string;\n }\n\n return this.labels.chatDisclaimerText;\n }\n\n // Computed class matching React exactly\n get computedClass(): string {\n return cn(\"cpk-chat-input-disclaimer\", this.inputClass());\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n computed,\n input,\n output,\n ViewEncapsulation,\n} from \"@angular/core\";\nimport type { Attachment } from \"@copilotkit/shared\";\nimport {\n formatFileSize,\n getDocumentIcon,\n getSourceUrl,\n} from \"@copilotkit/shared\";\nimport { cn } from \"../../utils\";\nimport { injectChatLabels } from \"../../chat-config\";\nimport { hostStyles } from \"../host-styles\";\nimport { CopilotIcon, Play } from \"../icons/copilot-icon\";\nimport { injectLightbox } from \"./copilot-chat-lightbox\";\n\n@Component({\n selector: \"copilot-chat-attachment-queue\",\n imports: [CopilotIcon],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n styles: [hostStyles],\n host: { \"data-copilotkit\": \"\" },\n template: `\n @if (attachments().length > 0) {\n <div data-testid=\"copilot-attachment-queue\" [class]=\"computedClass()\">\n @for (attachment of attachments(); track attachment.id) {\n <div [class]=\"itemClass(attachment)\">\n @if (attachment.status === \"uploading\") {\n <div class=\"cpk-attachment-queue-uploading-overlay\">\n <div class=\"cpk-attachment-queue-uploading-spinner\"></div>\n </div>\n }\n\n @if (attachment.status === \"uploading\") {\n <div class=\"cpk-attachment-queue-placeholder\"></div>\n } @else {\n @switch (attachment.type) {\n @case (\"image\") {\n <button\n #thumbnail\n type=\"button\"\n class=\"cpk-attachment-lightbox-trigger\"\n (click)=\"\n lightbox.open(\n imagePreview,\n attachment.filename || 'Image attachment',\n thumbnail\n )\n \"\n >\n <img\n [src]=\"sourceUrl(attachment)\"\n [alt]=\"attachment.filename || 'Image attachment'\"\n class=\"cpk-attachment-queue-image\"\n />\n </button>\n <ng-template #imagePreview>\n <img\n [style.view-transition-name]=\"lightbox.transitionName\"\n [src]=\"sourceUrl(attachment)\"\n [alt]=\"attachment.filename || 'Image attachment'\"\n class=\"cpk-attachment-queue-lightbox-image\"\n />\n </ng-template>\n }\n @case (\"audio\") {\n <div class=\"cpk-attachment-queue-audio\">\n <audio\n [src]=\"sourceUrl(attachment)\"\n controls\n preload=\"metadata\"\n class=\"cpk-attachment-queue-audio-player\"\n ></audio>\n @if (attachment.filename) {\n <span class=\"cpk-attachment-queue-audio-filename\">\n {{ attachment.filename }}\n </span>\n }\n </div>\n }\n @case (\"video\") {\n <div #videoThumbnail class=\"cpk-attachment-queue-video\">\n @if (attachment.thumbnail) {\n <img\n [src]=\"attachment.thumbnail\"\n [alt]=\"attachment.filename || 'Video thumbnail'\"\n class=\"cpk-attachment-queue-video-thumbnail\"\n />\n } @else {\n <video\n [src]=\"sourceUrl(attachment)\"\n preload=\"metadata\"\n muted\n class=\"cpk-attachment-queue-video-thumbnail\"\n ></video>\n }\n </div>\n <button\n type=\"button\"\n class=\"cpk-attachment-queue-video-play-button\"\n [attr.aria-label]=\"labels.attachmentPlayVideoButtonLabel\"\n (click)=\"\n lightbox.open(\n videoPreview,\n attachment.filename || 'Video attachment',\n videoThumbnail\n )\n \"\n >\n <span class=\"cpk-attachment-queue-video-play-badge\">\n <copilot-icon\n [img]=\"PlayIcon\"\n iconClass=\"cpk-attachment-queue-video-play-icon\"\n ></copilot-icon>\n </span>\n </button>\n <ng-template #videoPreview>\n <video\n [style.view-transition-name]=\"lightbox.transitionName\"\n [src]=\"sourceUrl(attachment)\"\n controls\n autoplay\n class=\"cpk-attachment-queue-lightbox-video\"\n ></video>\n </ng-template>\n }\n @default {\n <div class=\"cpk-attachment-queue-document\">\n <div class=\"cpk-attachment-queue-document-icon\">\n {{ documentIcon(attachment) }}\n </div>\n <div class=\"cpk-attachment-queue-document-info\">\n <span class=\"cpk-attachment-queue-document-name\">\n {{ attachment.filename || labels.attachmentDocumentLabel }}\n </span>\n @if (attachment.size != null) {\n <span class=\"cpk-attachment-queue-document-size\">\n {{ fileSize(attachment) }}\n </span>\n }\n </div>\n </div>\n }\n }\n }\n\n <button\n type=\"button\"\n class=\"cpk-attachment-queue-remove-button\"\n [attr.aria-label]=\"labels.attachmentRemoveButtonLabel\"\n (click)=\"removeAttachment.emit(attachment.id)\"\n >\n ✕\n </button>\n </div>\n }\n </div>\n }\n `,\n})\nexport class CopilotChatAttachmentQueue {\n readonly attachments = input<Attachment[]>([]);\n readonly inputClass = input<string | undefined>();\n readonly removeAttachment = output<string>();\n readonly labels = injectChatLabels();\n /** Opens an image or video full screen. */\n readonly lightbox = injectLightbox();\n readonly PlayIcon = Play;\n\n readonly computedClass = computed(() =>\n cn(\"copilotKitAttachmentQueue cpk-attachment-queue\", this.inputClass()),\n );\n\n itemClass(attachment: Attachment): string {\n return cn(\n \"cpk-attachment-queue-item\",\n attachment.type === \"image\" || attachment.type === \"video\"\n ? \"cpk-attachment-queue-item-media\"\n : attachment.type === \"audio\"\n ? \"cpk-attachment-queue-item-audio\"\n : \"cpk-attachment-queue-item-document\",\n );\n }\n\n sourceUrl(attachment: Attachment): string {\n return getSourceUrl(attachment.source);\n }\n\n documentIcon(attachment: Attachment): string {\n return getDocumentIcon(attachment.source.mimeType ?? \"\");\n }\n\n fileSize(attachment: Attachment): string {\n return formatFileSize(attachment.size ?? 0);\n }\n}\n","import {\n Component,\n input,\n ChangeDetectionStrategy,\n ViewEncapsulation,\n forwardRef,\n ElementRef,\n inject,\n} from \"@angular/core\";\n\nimport { CopilotSlot } from \"../../slots/copilot-slot\";\nimport { CopilotChatInput } from \"./copilot-chat-input\";\nimport { CopilotChatViewDisclaimer } from \"./copilot-chat-view-disclaimer\";\nimport { cn } from \"../../utils\";\nimport { ChatState } from \"../../chat-state\";\nimport { CopilotChatAttachmentQueue } from \"./copilot-chat-attachment-queue\";\nimport { hostStyles } from \"../host-styles\";\n\n/**\n * InputContainer component for CopilotChatView\n * Container for input and disclaimer components\n * Uses ForwardRef for DOM access\n */\n@Component({\n selector: \"copilot-chat-view-input-container\",\n imports: [CopilotSlot, CopilotChatAttachmentQueue],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n styles: [hostStyles],\n providers: [\n {\n provide: ElementRef,\n useExisting: forwardRef(() => CopilotChatViewInputContainer),\n },\n ],\n template: `\n <div data-testid=\"copilot-input-overlay\" [class]=\"computedClass\">\n @if ((chatState?.attachments() ?? []).length > 0) {\n <div class=\"cpk-chat-view-attachments\">\n <copilot-chat-attachment-queue\n [attachments]=\"chatState?.attachments() ?? []\"\n inputClass=\"cpk-chat-view-attachment-queue\"\n (removeAttachment)=\"chatState?.removeAttachment($event)\"\n />\n </div>\n }\n\n <copilot-slot\n [slot]=\"input()\"\n [context]=\"{ inputClass: inputClass() }\"\n [defaultComponent]=\"defaultInputComponent\"\n >\n </copilot-slot>\n\n <!-- Disclaimer - always rendered like in React -->\n <copilot-slot\n [slot]=\"disclaimer()\"\n [context]=\"{ text: disclaimerText(), inputClass: disclaimerClass() }\"\n [defaultComponent]=\"defaultDisclaimerComponent\"\n >\n </copilot-slot>\n </div>\n `,\n})\nexport class CopilotChatViewInputContainer extends ElementRef {\n readonly chatState = inject(ChatState, { optional: true });\n\n inputContainerClass = input<string | undefined>();\n\n // Input slot configuration\n input = input<any | undefined>();\n inputClass = input<string | undefined>();\n\n // Disclaimer slot configuration\n disclaimer = input<any | undefined>();\n disclaimerText = input<string | undefined>();\n disclaimerClass = input<string | undefined>();\n\n // Default components\n protected readonly defaultInputComponent = CopilotChatInput;\n protected readonly defaultDisclaimerComponent = CopilotChatViewDisclaimer;\n\n constructor(elementRef: ElementRef) {\n super(elementRef.nativeElement);\n }\n\n get computedClass(): string {\n return cn(\"cpk-chat-view-input-overlay\", this.inputContainerClass());\n }\n}\n","import {\n DestroyRef,\n Directive,\n ElementRef,\n afterNextRender,\n inject,\n signal,\n} from \"@angular/core\";\nimport { ɵwatchElementHeight } from \"@copilotkit/core\";\n\n/**\n * Measures the chat view's floating input container and exposes its height\n * as a signal.\n *\n * Applied to the copilot-slot hosting the input container. Because the slot\n * only exists on the chat-view branch of the template (the welcome-screen\n * branch omits it), the directive's lifecycle mirrors the overlay's: it is\n * created when the overlay mounts — including after the user sends their\n * first message from the welcome screen — and torn down with it.\n *\n * Measurement is platform-driven: afterNextRender fires once the slot's\n * dynamically created content is in the DOM (and never during SSR), and\n * core's `ɵwatchElementHeight` keeps the height current from there,\n * including the initial 0 → laid-out transition.\n */\n@Directive({\n selector: \"[copilotChatViewInputMeasure]\",\n})\nexport class CopilotChatViewInputMeasure {\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly destroyRef = inject(DestroyRef);\n\n /** Measured height of the input container in px; 0 until first laid out. */\n readonly height = signal(0);\n\n /** True while the input container is resizing, false once it has settled. */\n readonly resizing = signal(false);\n\n constructor() {\n afterNextRender(() => {\n // Root element of the input container component (its absolutely\n // positioned overlay wrapper). Custom input containers without that\n // element are left unmeasured.\n const el = this.host.nativeElement.querySelector(\n \"copilot-chat-view-input-container\",\n )?.firstElementChild;\n if (!(el instanceof HTMLElement)) return;\n const stop = ɵwatchElementHeight(el, ({ height, isResizing }) => {\n this.height.set(height);\n this.resizing.set(isResizing);\n });\n this.destroyRef.onDestroy(stop);\n });\n }\n}\n","import { InjectionToken } from \"@angular/core\";\n\n/**\n * Which welcome screen `CopilotChatView` renders. `CopilotPopup` and\n * `CopilotSidebar` provide theirs, as React's popup and sidebar views do:\n * the message centered, the suggestions and input at the bottom.\n */\nexport const COPILOT_CHAT_WELCOME_LAYOUT = new InjectionToken<\n \"default\" | \"popup\" | \"sidebar\"\n>(\"COPILOT_CHAT_WELCOME_LAYOUT\");\n","import type { TemplateRef, Type, OnInit, OnChanges } from \"@angular/core\";\nimport {\n Component,\n ContentChild,\n ChangeDetectionStrategy,\n ViewEncapsulation,\n computed,\n input,\n output,\n inject,\n viewChild,\n} from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\nimport { CopilotSlot } from \"../../slots/copilot-slot\";\nimport { CopilotChatViewScrollView } from \"./copilot-chat-view-scroll-view\";\nimport { CopilotChatViewScrollToBottomButton } from \"./copilot-chat-view-scroll-to-bottom-button\";\nimport { CopilotChatViewFeather } from \"./copilot-chat-view-feather\";\nimport { CopilotChatViewInputContainer } from \"./copilot-chat-view-input-container\";\nimport { CopilotChatViewInputMeasure } from \"./copilot-chat-view-input-measure\";\nimport { CopilotChatViewDisclaimer } from \"./copilot-chat-view-disclaimer\";\nimport { CopilotChatInput } from \"./copilot-chat-input\";\nimport { CopilotChatAttachmentQueue } from \"./copilot-chat-attachment-queue\";\nimport { CopilotChatSuggestionView } from \"./copilot-chat-suggestion-view\";\nimport type { Message } from \"@ag-ui/client\";\nimport { hostStyles } from \"../host-styles\";\nimport { CopilotKitStyles } from \"../copilot-kit-styles\";\nimport { CopilotChatViewHandlers } from \"./copilot-chat-view-handlers\";\nimport { ChatState } from \"../../chat-state\";\nimport { CopilotIcon, Upload } from \"../icons/copilot-icon\";\nimport { injectChatLabels } from \"../../chat-config\";\nimport { COPILOT_CHAT_WELCOME_LAYOUT } from \"./copilot-chat-welcome-layout\";\nimport type { CopilotChatToolCallDisplay } from \"./tool-call-layout\";\nimport { ɵgetChatViewState, ɵnormalizeAutoScroll } from \"@copilotkit/core\";\n\n/**\n * CopilotChatView component - Angular port of the React component.\n * A complete chat interface with message feed and input components.\n *\n * @example\n * ```html\n * <copilot-chat-view\n * [messages]=\"messages\"\n * [autoScroll]=\"true\"\n * [messageViewProps]=\"{ assistantMessage: { onThumbsUp: handleThumbsUp } }\">\n * </copilot-chat-view>\n * ```\n */\n@Component({\n selector: \"copilot-chat-view\",\n imports: [\n CommonModule,\n CopilotSlot,\n CopilotChatViewScrollView,\n CopilotChatViewInputMeasure,\n CopilotChatAttachmentQueue,\n CopilotChatSuggestionView,\n CopilotIcon,\n CopilotKitStyles,\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [CopilotChatViewHandlers],\n styles: [hostStyles],\n template: `\n <copilot-kit-styles />\n <ng-template #dropOverlay>\n <div class=\"cpk-chat-view-drop-overlay\">\n <div class=\"cpk-chat-view-drop-overlay-content\">\n <copilot-icon\n [img]=\"UploadIcon\"\n class=\"cpk-chat-view-drop-overlay-icon\"\n ></copilot-icon>\n <span class=\"cpk-chat-view-drop-overlay-label\">\n {{ labels.chatDropFilesLabel }}\n </span>\n </div>\n </div>\n </ng-template>\n <ng-template #welcomeMessage>\n <h1 class=\"cpk-chat-view-welcome-message\">\n {{ labels.welcomeMessageText }}\n </h1>\n </ng-template>\n <ng-template #welcomeInput>\n <div class=\"cpk-chat-view-welcome-input-group\">\n @if ((chatState?.attachments?.() ?? []).length > 0) {\n <copilot-chat-attachment-queue\n [attachments]=\"chatState?.attachments?.() ?? []\"\n inputClass=\"cpk-chat-view-welcome-attachment-queue\"\n (removeAttachment)=\"chatState?.removeAttachment($event)\"\n />\n }\n\n <copilot-slot\n [slot]=\"inputSlot()\"\n [context]=\"{ inputClass: undefined }\"\n [defaultComponent]=\"defaultInputComponent\"\n >\n </copilot-slot>\n\n <copilot-slot\n [slot]=\"disclaimerSlot()\"\n [context]=\"{\n text: disclaimerTextSignal(),\n inputClass: disclaimerClassSignal(),\n }\"\n [defaultComponent]=\"defaultDisclaimerComponent\"\n >\n </copilot-slot>\n </div>\n </ng-template>\n <ng-template #welcomeSuggestions>\n @if ((chatState?.suggestions?.() ?? []).length > 0) {\n <copilot-chat-suggestion-view\n [suggestions]=\"chatState?.suggestions?.() ?? []\"\n inputClass=\"cpk-chat-view-suggestion-view\"\n (selectSuggestion)=\"\n chatState?.selectSuggestion($event.suggestion, $event.index)\n \"\n />\n }\n </ng-template>\n <!-- Custom layout template support (render prop pattern) -->\n @if (customLayoutTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"customLayoutTemplate\"\n [ngTemplateOutletContext]=\"layoutContext()\"\n ></ng-container>\n } @else if (shouldShowWelcomeScreen()) {\n <div\n data-copilotkit\n class=\"copilotKitChat cpk-chat-view\"\n (dragover)=\"chatState?.handleDragOver($event)\"\n (dragleave)=\"chatState?.handleDragLeave($event)\"\n (drop)=\"chatState?.handleDrop($event)\"\n >\n @if (chatState?.dragOver?.()) {\n <ng-container [ngTemplateOutlet]=\"dropOverlay\"></ng-container>\n }\n\n @switch (welcomeLayout) {\n @case (\"popup\") {\n <div\n data-testid=\"copilot-welcome-screen\"\n class=\"cpk-popup-view-welcome-screen\"\n >\n <div class=\"cpk-popup-view-welcome-screen-message\">\n <ng-container [ngTemplateOutlet]=\"welcomeMessage\" />\n </div>\n <div>\n <div class=\"cpk-popup-view-welcome-screen-suggestions\">\n <ng-container [ngTemplateOutlet]=\"welcomeSuggestions\" />\n </div>\n <ng-container [ngTemplateOutlet]=\"welcomeInput\" />\n </div>\n </div>\n }\n @case (\"sidebar\") {\n <div\n data-testid=\"copilot-welcome-screen\"\n class=\"cpk-sidebar-view-welcome-screen\"\n >\n <div class=\"cpk-sidebar-view-welcome-screen-message\">\n <ng-container [ngTemplateOutlet]=\"welcomeMessage\" />\n </div>\n <div class=\"cpk-sidebar-view-welcome-screen-footer\">\n <div class=\"cpk-sidebar-view-welcome-screen-content\">\n <div class=\"cpk-sidebar-view-welcome-screen-suggestions\">\n <ng-container [ngTemplateOutlet]=\"welcomeSuggestions\" />\n </div>\n <ng-container [ngTemplateOutlet]=\"welcomeInput\" />\n </div>\n </div>\n </div>\n }\n @default {\n <div\n data-testid=\"copilot-welcome-screen\"\n class=\"cpk-chat-view-welcome-screen\"\n >\n <div class=\"cpk-chat-view-welcome-screen-content\">\n <div class=\"cpk-chat-view-welcome-screen-message\">\n <ng-container [ngTemplateOutlet]=\"welcomeMessage\" />\n </div>\n <div class=\"cpk-chat-view-welcome-screen-input\">\n <ng-container [ngTemplateOutlet]=\"welcomeInput\" />\n </div>\n <div class=\"cpk-chat-view-welcome-screen-suggestions\">\n <ng-container [ngTemplateOutlet]=\"welcomeSuggestions\" />\n </div>\n </div>\n </div>\n }\n }\n </div>\n } @else {\n <!-- Default layout - exact React DOM structure -->\n <div\n data-copilotkit\n data-testid=\"copilot-chat\"\n class=\"copilotKitChat cpk-chat-view\"\n (dragover)=\"chatState?.handleDragOver($event)\"\n (dragleave)=\"chatState?.handleDragLeave($event)\"\n (drop)=\"chatState?.handleDrop($event)\"\n >\n @if (chatState?.dragOver?.()) {\n <ng-container [ngTemplateOutlet]=\"dropOverlay\"></ng-container>\n }\n\n <!-- ScrollView -->\n <copilot-chat-view-scroll-view\n [autoScroll]=\"autoScrollSignal()\"\n [inputContainerHeight]=\"inputContainerHeight()\"\n [isResizing]=\"isResizing()\"\n [messages]=\"messagesValue()\"\n [state]=\"state()\"\n [agentId]=\"agentId()\"\n [messageView]=\"messageViewSlot()\"\n [messageViewClass]=\"messageViewClass()\"\n [toolCallDisplay]=\"toolCallDisplay()\"\n [assistantMessageComponent]=\"assistantMessageComponent()\"\n [assistantMessageTemplate]=\"assistantMessageTemplate()\"\n [assistantMessageClass]=\"assistantMessageClass()\"\n [reasoningMessageComponent]=\"reasoningMessageComponent()\"\n [reasoningMessageTemplate]=\"reasoningMessageTemplate()\"\n [reasoningMessageClass]=\"reasoningMessageClass()\"\n [workSummaryComponent]=\"workSummaryComponent()\"\n [workSummaryTemplate]=\"workSummaryTemplate()\"\n [workSummaryClass]=\"workSummaryClass()\"\n [messageViewChildrenComponent]=\"messageViewChildrenComponent()\"\n [messageViewChildrenTemplate]=\"messageViewChildrenTemplate()\"\n [messageViewChildrenClass]=\"messageViewChildrenClass()\"\n [scrollToBottomButton]=\"scrollToBottomButtonSlot()\"\n [scrollToBottomButtonClass]=\"scrollToBottomButtonClass()\"\n [showCursor]=\"showCursorSignal()\"\n [isRunning]=\"isRunning()\"\n [isConnecting]=\"isConnecting()\"\n (assistantMessageThumbsUp)=\"assistantMessageThumbsUp.emit($event)\"\n (assistantMessageThumbsDown)=\"assistantMessageThumbsDown.emit($event)\"\n (assistantMessageReadAloud)=\"assistantMessageReadAloud.emit($event)\"\n (assistantMessageRegenerate)=\"assistantMessageRegenerate.emit($event)\"\n (userMessageCopy)=\"userMessageCopy.emit($event)\"\n (userMessageEdit)=\"userMessageEdit.emit($event)\"\n >\n </copilot-chat-view-scroll-view>\n\n <!-- Feather effect -->\n <copilot-slot\n [slot]=\"featherSlot()\"\n [context]=\"{ inputClass: featherClass() }\"\n [defaultComponent]=\"defaultFeatherComponent\"\n >\n </copilot-slot>\n\n <!-- Input container -->\n <copilot-slot\n copilotChatViewInputMeasure\n [slot]=\"inputContainerSlot()\"\n [context]=\"inputContainerContext()\"\n [defaultComponent]=\"defaultInputContainerComponent\"\n >\n </copilot-slot>\n </div>\n }\n `,\n})\nexport class CopilotChatView implements OnInit, OnChanges {\n // Core inputs matching React props\n protected readonly chatState = inject(ChatState, { optional: true });\n protected readonly UploadIcon = Upload;\n messages = input<Message[]>([]);\n /** Current agent state forwarded to message-view extension slots. */\n state = input<unknown>({});\n agentId = input<string | undefined>();\n autoScroll = input<boolean>(true);\n showCursor = input<boolean>(false);\n hasExplicitThreadId = input<boolean>(false);\n /** `true` while the agent runs. Suggestions hide meanwhile. */\n isRunning = input<boolean>(false);\n /**\n * `true` while the thread's connect is loading. The welcome screen and\n * suggestions wait for it, so a picked thread does not flash them.\n */\n isConnecting = input<boolean>(false);\n /** `false` turns the welcome screen off for an empty chat. */\n welcomeScreen = input<boolean>(true);\n\n // MessageView slot inputs\n messageViewComponent = input<Type<any> | undefined>(undefined);\n messageViewTemplate = input<TemplateRef<any> | undefined>(undefined);\n messageViewClass = input<string | undefined>(undefined);\n /**\n * How assistant messages show tool calls: `\"grouped\"` (default), `\"line\"`,\n * `\"stacked\"` or `\"separate\"`. Forwarded to the message view.\n */\n toolCallDisplay = input<CopilotChatToolCallDisplay>(\"grouped\");\n\n // AssistantMessage slot inputs\n assistantMessageComponent = input<Type<any> | undefined>(undefined);\n assistantMessageTemplate = input<TemplateRef<any> | undefined>(undefined);\n assistantMessageClass = input<string | undefined>(undefined);\n\n // ReasoningMessage slot inputs\n reasoningMessageComponent = input<Type<any> | undefined>(undefined);\n reasoningMessageTemplate = input<TemplateRef<any> | undefined>(undefined);\n reasoningMessageClass = input<string | undefined>(undefined);\n\n // `\"turn\"` display work summary slot inputs, forwarded to the message view.\n workSummaryComponent = input<Type<unknown> | undefined>(undefined);\n workSummaryTemplate = input<TemplateRef<unknown> | undefined>(undefined);\n workSummaryClass = input<string | undefined>(undefined);\n\n // Content rendered after the default message collection.\n messageViewChildrenComponent = input<Type<any> | undefined>(undefined);\n messageViewChildrenTemplate = input<TemplateRef<any> | undefined>(undefined);\n messageViewChildrenClass = input<string | undefined>(undefined);\n\n // ScrollView slot inputs\n scrollViewComponent = input<Type<any> | undefined>(undefined);\n scrollViewTemplate = input<TemplateRef<any> | undefined>(undefined);\n scrollViewClass = input<string | undefined>(undefined);\n\n // ScrollToBottomButton slot inputs\n scrollToBottomButtonComponent = input<Type<any> | undefined>(undefined);\n scrollToBottomButtonTemplate = input<TemplateRef<any> | undefined>(undefined);\n scrollToBottomButtonClass = input<string | undefined>(undefined);\n\n // Input slot inputs\n inputComponent = input<Type<any> | undefined>(undefined);\n inputTemplate = input<TemplateRef<any> | undefined>(undefined);\n\n // InputContainer slot inputs\n inputContainerComponent = input<Type<any> | undefined>(undefined);\n inputContainerTemplate = input<TemplateRef<any> | undefined>(undefined);\n inputContainerClass = input<string | undefined>(undefined);\n\n // Feather slot inputs\n featherComponent = input<Type<any> | undefined>(undefined);\n featherTemplate = input<TemplateRef<any> | undefined>(undefined);\n featherClass = input<string | undefined>(undefined);\n\n // Disclaimer slot inputs\n disclaimerComponent = input<Type<any> | undefined>(undefined);\n disclaimerTemplate = input<TemplateRef<any> | undefined>(undefined);\n disclaimerClass = input<string | undefined>(undefined);\n disclaimerText = input<string | undefined>(undefined);\n\n // Custom layout template (render prop pattern)\n @ContentChild(\"customLayout\") customLayoutTemplate?: TemplateRef<any>;\n\n // Named template slots for deep customization\n @ContentChild(\"sendButton\") sendButtonTemplate?: TemplateRef<any>;\n @ContentChild(\"toolbar\") toolbarTemplate?: TemplateRef<any>;\n @ContentChild(\"textArea\") textAreaTemplate?: TemplateRef<any>;\n @ContentChild(\"audioRecorder\") audioRecorderTemplate?: TemplateRef<any>;\n @ContentChild(\"assistantMessageMarkdownRenderer\")\n assistantMessageMarkdownRendererTemplate?: TemplateRef<any>;\n @ContentChild(\"thumbsUpButton\") thumbsUpButtonTemplate?: TemplateRef<any>;\n @ContentChild(\"thumbsDownButton\") thumbsDownButtonTemplate?: TemplateRef<any>;\n @ContentChild(\"readAloudButton\") readAloudButtonTemplate?: TemplateRef<any>;\n @ContentChild(\"regenerateButton\") regenerateButtonTemplate?: TemplateRef<any>;\n\n // Output events for assistant message actions (bubbled from child components)\n assistantMessageThumbsUp = output<{ message: Message }>();\n assistantMessageThumbsDown = output<{ message: Message }>();\n assistantMessageReadAloud = output<{ message: Message }>();\n assistantMessageRegenerate = output<{ message: Message }>();\n\n // Output events for user message actions (if applicable)\n userMessageCopy = output<{ message: Message }>();\n userMessageEdit = output<{ message: Message }>();\n\n // Default components for slots\n protected readonly defaultScrollViewComponent = CopilotChatViewScrollView;\n protected readonly defaultScrollToBottomButtonComponent =\n CopilotChatViewScrollToBottomButton;\n protected readonly defaultInputContainerComponent =\n CopilotChatViewInputContainer;\n protected readonly defaultInputComponent = CopilotChatInput;\n protected readonly defaultFeatherComponent = CopilotChatViewFeather;\n protected readonly defaultDisclaimerComponent = CopilotChatViewDisclaimer;\n protected readonly labels = injectChatLabels();\n protected readonly welcomeLayout =\n inject(COPILOT_CHAT_WELCOME_LAYOUT, { optional: true }) ?? \"default\";\n\n // Signals for reactive state\n protected messagesValue = computed(() => this.messages());\n // Core's rules for `autoScroll`; Angular has no pin-to-send mode yet.\n protected autoScrollSignal = computed(\n () => ɵnormalizeAutoScroll(this.autoScroll()) !== \"none\",\n );\n protected showCursorSignal = computed(() => this.showCursor());\n protected disclaimerTextSignal = computed(() => this.disclaimerText());\n protected disclaimerClassSignal = computed(() => this.disclaimerClass());\n private readonly inputMeasure = viewChild(CopilotChatViewInputMeasure);\n protected readonly inputContainerHeight = computed(\n () => this.inputMeasure()?.height() ?? 0,\n );\n protected readonly isResizing = computed(\n () => this.inputMeasure()?.resizing() ?? false,\n );\n protected shouldShowWelcomeScreen = computed(\n () =>\n ɵgetChatViewState({\n messageCount: this.messagesValue().length,\n suggestionCount: this.chatState?.suggestions?.().length ?? 0,\n isRunning: this.isRunning(),\n isConnecting: this.isConnecting(),\n hasExplicitThreadId: this.hasExplicitThreadId(),\n welcomeScreenEnabled: this.welcomeScreen(),\n inputContainerHeight: this.inputContainerHeight(),\n }).showWelcomeScreen,\n );\n\n // Slot resolution computed signals\n protected messageViewSlot = computed(\n () => this.messageViewTemplate() || this.messageViewComponent(),\n );\n\n protected scrollViewSlot = computed(\n () => this.scrollViewTemplate() || this.scrollViewComponent(),\n );\n\n protected scrollToBottomButtonSlot = computed(\n () =>\n this.scrollToBottomButtonTemplate() ||\n this.scrollToBottomButtonComponent(),\n );\n\n protected inputSlot = computed(\n () => this.inputTemplate() || this.inputComponent(),\n );\n\n protected inputContainerSlot = computed(\n () => this.inputContainerTemplate() || this.inputContainerComponent(),\n );\n\n protected featherSlot = computed(\n () => this.featherTemplate() || this.featherComponent(),\n );\n\n protected disclaimerSlot = computed(\n () => this.disclaimerTemplate() || this.disclaimerComponent(),\n );\n\n // Context objects for slots\n protected scrollViewContext = computed(() => ({\n autoScroll: this.autoScrollSignal(),\n scrollToBottomButton: this.scrollToBottomButtonSlot(),\n scrollToBottomButtonClass: this.scrollToBottomButtonClass(),\n inputContainerHeight: this.inputContainerHeight(),\n isResizing: this.isResizing(),\n messages: this.messagesValue(),\n state: this.state(),\n agentId: this.agentId(),\n messageView: this.messageViewSlot(),\n messageViewClass: this.messageViewClass(),\n toolCallDisplay: this.toolCallDisplay(),\n assistantMessageComponent: this.assistantMessageComponent(),\n assistantMessageTemplate: this.assistantMessageTemplate(),\n assistantMessageClass: this.assistantMessageClass(),\n reasoningMessageComponent: this.reasoningMessageComponent(),\n reasoningMessageTemplate: this.reasoningMessageTemplate(),\n reasoningMessageClass: this.reasoningMessageClass(),\n workSummaryComponent: this.workSummaryComponent(),\n workSummaryTemplate: this.workSummaryTemplate(),\n workSummaryClass: this.workSummaryClass(),\n messageViewChildrenComponent: this.messageViewChildrenComponent(),\n messageViewChildrenTemplate: this.messageViewChildrenTemplate(),\n messageViewChildrenClass: this.messageViewChildrenClass(),\n }));\n\n // Removed scrollViewPropsComputed - no longer needed\n\n protected inputContainerContext = computed(() => ({\n input: this.inputSlot(),\n disclaimer: this.disclaimerSlot(),\n disclaimerText: this.disclaimerTextSignal(),\n disclaimerClass: this.disclaimerClassSignal(),\n inputContainerClass: this.inputContainerClass(),\n }));\n\n // Removed inputContainerPropsComputed - no longer needed\n\n // Layout context for custom templates (render prop pattern)\n protected layoutContext = computed(() => ({\n messageView: this.messageViewSlot(),\n input: this.inputSlot(),\n scrollView: this.scrollViewSlot(),\n scrollToBottomButton: this.scrollToBottomButtonSlot(),\n feather: this.featherSlot(),\n inputContainer: this.inputContainerSlot(),\n disclaimer: this.disclaimerSlot(),\n }));\n\n constructor(private handlers: CopilotChatViewHandlers) {}\n\n ngOnInit(): void {\n // Initialize handler availability in the view-scoped service\n // OutputEmitterRef doesn't expose 'observed'; default to true to enable UI affordances\n this.handlers.hasAssistantThumbsUpHandler.set(true);\n this.handlers.hasAssistantThumbsDownHandler.set(true);\n this.handlers.hasAssistantReadAloudHandler.set(true);\n this.handlers.hasAssistantRegenerateHandler.set(true);\n this.handlers.hasUserCopyHandler.set(true);\n this.handlers.hasUserEditHandler.set(true);\n }\n\n ngOnChanges(): void {\n // Keep handler availability in sync (assume available)\n this.handlers.hasAssistantThumbsUpHandler.set(true);\n this.handlers.hasAssistantThumbsDownHandler.set(true);\n this.handlers.hasAssistantReadAloudHandler.set(true);\n this.handlers.hasAssistantRegenerateHandler.set(true);\n this.handlers.hasUserCopyHandler.set(true);\n this.handlers.hasUserEditHandler.set(true);\n }\n}\n","import {\n Directive,\n DestroyRef,\n ElementRef,\n HostListener,\n Renderer2,\n inject,\n input,\n} from \"@angular/core\";\nimport { ɵAttachmentQueue, ɵbuildUserMessageContent } from \"@copilotkit/core\";\nimport type {\n Attachment,\n AttachmentsConfig,\n InputContent,\n} from \"@copilotkit/shared\";\nimport { ChatState } from \"../../chat-state\";\n\n/**\n * Adds file attachments to the chat: drag-and-drop, paste and a hidden file\n * picker. The queue itself (validation, uploads, ready state) lives in\n * `@copilotkit/core`'s `ɵAttachmentQueue`; this directive mirrors it into\n * {@link ChatState.attachments}.\n */\n@Directive({\n selector: \"[copilotChatAttachments]\",\n})\nexport class CopilotChatAttachmentsDirective {\n readonly config = input<AttachmentsConfig | undefined>();\n\n private readonly chat = inject(ChatState);\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly renderer = inject(Renderer2);\n private readonly destroyRef = inject(DestroyRef);\n private readonly queue = new ɵAttachmentQueue(() => this.config());\n\n private fileInput?: HTMLInputElement;\n\n constructor() {\n const unsubscribe = this.queue.subscribe(() => {\n this.chat.attachments.set(this.queue.getSnapshot());\n });\n this.destroyRef.onDestroy(() => {\n unsubscribe();\n this.queue.dispose();\n });\n }\n\n private get enabled(): boolean {\n return this.config()?.enabled ?? false;\n }\n\n onDragOver(event: DragEvent): void {\n if (!this.enabled) return;\n event.preventDefault();\n event.stopPropagation();\n this.chat.dragOver.set(true);\n }\n\n onDragLeave(event: DragEvent): void {\n event.preventDefault();\n event.stopPropagation();\n this.chat.dragOver.set(false);\n }\n\n async onDrop(event: DragEvent): Promise<void> {\n event.preventDefault();\n event.stopPropagation();\n this.chat.dragOver.set(false);\n\n const files = Array.from(event.dataTransfer?.files ?? []);\n if (files.length > 0) {\n await this.processSafely(files, \"Drop error\");\n }\n }\n\n @HostListener(\"document:paste\", [\"$event\"])\n async onPaste(event: ClipboardEvent): Promise<void> {\n const target = event.target;\n if (!(target instanceof Node) || !this.host.nativeElement.contains(target))\n return;\n\n const files = this.queue.filterPastedFiles(\n Array.from(event.clipboardData?.items ?? []),\n );\n if (files.length === 0) return;\n\n event.preventDefault();\n await this.processSafely(files, \"Paste error\");\n }\n\n openFilePicker(): void {\n const input = this.ensureFileInput();\n input.accept = this.config()?.accept ?? \"*/*\";\n input.click();\n }\n\n removeAttachment(id: string): void {\n this.queue.remove(id);\n }\n\n /**\n * Takes the ready attachments for a message and resets the file picker.\n * Reads {@link ChatState.attachments}, which mirrors the queue, so\n * attachments an app wrote to that public signal are sent too.\n */\n consume(): Attachment[] {\n const ready = this.chat\n .attachments()\n .filter((attachment) => attachment.status === \"ready\");\n this.queue.consumeReady();\n if (ready.length > 0) {\n this.chat.attachments.update((attachments) =>\n attachments.filter((attachment) => attachment.status !== \"ready\"),\n );\n }\n if (this.fileInput) {\n this.fileInput.value = \"\";\n }\n return ready;\n }\n\n /**\n * The content parts of a user message with these attachments: the text\n * (as typed) and one part per attachment.\n */\n buildContent(value: string, attachments: Attachment[]): InputContent[] {\n const content = ɵbuildUserMessageContent(value, attachments);\n if (typeof content !== \"string\") return content;\n return content.trim() ? [{ type: \"text\", text: content }] : [];\n }\n\n private ensureFileInput(): HTMLInputElement {\n if (this.fileInput) return this.fileInput;\n\n const input: HTMLInputElement = this.renderer.createElement(\"input\");\n this.renderer.setAttribute(input, \"type\", \"file\");\n this.renderer.setProperty(input, \"multiple\", true);\n this.renderer.setStyle(input, \"display\", \"none\");\n const unlisten = this.renderer.listen(input, \"change\", () => {\n void this.handleFileInputChange(input);\n });\n this.renderer.appendChild(this.host.nativeElement, input);\n\n this.destroyRef.onDestroy(() => {\n unlisten();\n input.remove();\n });\n\n this.fileInput = input;\n return input;\n }\n\n private async handleFileInputChange(picker: HTMLInputElement): Promise<void> {\n const files = Array.from(picker.files ?? []);\n if (files.length === 0) return;\n await this.processSafely(files, \"Upload error\");\n // Clear the picker so choosing the same file again fires `change`.\n picker.value = \"\";\n }\n\n private async processSafely(files: File[], label: string): Promise<void> {\n try {\n await this.queue.processFiles(files);\n } catch (error) {\n console.error(`[CopilotKit] ${label}:`, error);\n }\n }\n}\n","import type { Signal } from \"@angular/core\";\nimport type { ɵChatConnection } from \"@copilotkit/core\";\nimport type { AgentStore } from \"./agent\";\nimport { explicitEffect } from \"./explicit-effect\";\n\n/** The thread a chat shows, as signals. */\nexport interface ActiveThreadSource {\n /** The thread id the chat renders. */\n threadId: Signal<string>;\n /** Whether a caller picked the thread, so it exists on the backend. */\n hasExplicitThreadId: Signal<boolean>;\n /** The Inspector override the thread comes from, if any. */\n inspectorRequestId?: Signal<string | null>;\n}\n\n/**\n * Wires the active chat thread to the live agent.\n *\n * Hands every change of the thread, its explicitness, the Inspector override\n * or the agent store to core's {@link ɵChatConnection.open}, which pins the\n * thread on the agent, empties the agent on a switch to a fresh thread, and\n * connects an explicit thread once earlier teardowns finish. The handle is\n * released on the next change and on destroy, so a rapid switch or a destroy\n * does not leak a connect.\n *\n * The tracked reads are exactly the `explicitEffect` dependency function; the\n * `open` call runs in its untracked body.\n *\n * @param source - The thread the chat shows.\n * @param agentStore - Signal yielding the current {@link AgentStore}.\n * @param connection - The chat's connection.\n */\nexport function connectActiveThread(\n source: ActiveThreadSource,\n agentStore: Signal<AgentStore>,\n connection: Pick<ɵChatConnection, \"open\">,\n): void {\n explicitEffect(\n () => ({\n threadId: source.threadId(),\n explicit: source.hasExplicitThreadId(),\n inspectorRequestId: source.inspectorRequestId?.() ?? null,\n store: agentStore(),\n }),\n ({ threadId, explicit, inspectorRequestId, store }, onCleanup) => {\n const handle = connection.open({\n agent: store.agent,\n threadId,\n explicit,\n inspectorRequestId,\n });\n onCleanup(() => handle.release());\n },\n );\n}\n","import type { TemplateRef, Type } from \"@angular/core\";\nimport {\n Component,\n input,\n ChangeDetectionStrategy,\n ViewEncapsulation,\n signal,\n ChangeDetectorRef,\n Injector,\n computed,\n inject,\n viewChild,\n DestroyRef,\n} from \"@angular/core\";\n\nimport { CopilotChatView } from \"./copilot-chat-view\";\nimport { hostStyles } from \"../host-styles\";\nimport { CopilotChatAttachmentsDirective } from \"./copilot-chat-attachments.directive\";\n\nimport type { AttachmentsConfig } from \"@copilotkit/shared\";\nimport {\n ɵChatConnection,\n ɵFreshThreadId,\n ɵInspectorThreadOverride,\n ɵcreateChatSubmitter,\n ɵresolveAgentId,\n ɵresolveChatNotice,\n ɵsubscribeToAgentSuggestions,\n} from \"@copilotkit/core\";\nimport type {\n CopilotKitCoreGetSuggestionsResult,\n Suggestion,\n} from \"@copilotkit/core\";\nimport { injectAgentStore } from \"../../agent\";\nimport { CopilotKit } from \"../../copilotkit\";\nimport { ChatState } from \"../../chat-state\";\nimport { COPILOT_CHAT_CONFIGURATION } from \"../../chat-configuration\";\nimport { injectChatLabels } from \"../../chat-config\";\nimport { connectActiveThread } from \"../../active-thread-connector\";\nimport { explicitEffect } from \"../../explicit-effect\";\nimport type { CopilotChatToolCallDisplay } from \"./tool-call-layout\";\nimport { COPILOT_CHAT_RUN_CONTROL } from \"./copilot-chat-run-control\";\nimport type { ChatRunControl } from \"./copilot-chat-run-control\";\n\n/**\n * CopilotChat component - Angular equivalent of React's <CopilotChat>\n * Provides a complete chat interface that wires an agent to the chat view\n *\n * @example\n * ```html\n * <copilot-chat [agentId]=\"'default'\" [threadId]=\"'abc123'\"></copilot-chat>\n * ```\n */\n@Component({\n selector: \"copilot-chat\",\n imports: [CopilotChatView, CopilotChatAttachmentsDirective],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: { \"data-copilotkit\": \"\" },\n styles: [hostStyles],\n template: `\n <div\n style=\"display: contents\"\n copilotChatAttachments\n [config]=\"attachmentsConfig()\"\n >\n @if (transcriptionError(); as error) {\n <div\n role=\"alert\"\n data-testid=\"copilot-transcription-error\"\n style=\"\n position: absolute;\n bottom: 100px;\n left: 50%;\n transform: translateX(-50%);\n background-color: #ef4444;\n color: white;\n padding: 8px 16px;\n border-radius: 8px;\n font-size: 14px;\n z-index: 50;\n \"\n >\n {{ error }}\n </div>\n }\n <copilot-chat-view\n [messages]=\"messages()\"\n [state]=\"agentState()\"\n [agentId]=\"resolvedAgentId()\"\n [autoScroll]=\"autoScroll()\"\n [showCursor]=\"showCursor()\"\n [isRunning]=\"isRunning()\"\n [isConnecting]=\"isConnecting()\"\n [welcomeScreen]=\"welcomeScreen()\"\n [toolCallDisplay]=\"toolCallDisplay()\"\n [inputComponent]=\"inputComponent()\"\n [assistantMessageComponent]=\"assistantMessageComponent()\"\n [assistantMessageTemplate]=\"assistantMessageTemplate()\"\n [assistantMessageClass]=\"assistantMessageClass()\"\n [reasoningMessageComponent]=\"reasoningMessageComponent()\"\n [reasoningMessageTemplate]=\"reasoningMessageTemplate()\"\n [reasoningMessageClass]=\"reasoningMessageClass()\"\n [workSummaryComponent]=\"workSummaryComponent()\"\n [workSummaryTemplate]=\"workSummaryTemplate()\"\n [workSummaryClass]=\"workSummaryClass()\"\n [messageViewChildrenComponent]=\"messageViewChildrenComponent()\"\n [messageViewChildrenTemplate]=\"messageViewChildrenTemplate()\"\n [messageViewChildrenClass]=\"messageViewChildrenClass()\"\n [hasExplicitThreadId]=\"hasExplicitThreadId()\"\n >\n </copilot-chat-view>\n </div>\n `,\n providers: [\n {\n provide: ChatState,\n useExisting: CopilotChat,\n },\n {\n provide: COPILOT_CHAT_RUN_CONTROL,\n useExisting: CopilotChat,\n },\n ],\n})\nexport class CopilotChat extends ChatState implements ChatRunControl {\n private readonly attachmentsDirective = viewChild(\n CopilotChatAttachmentsDirective,\n );\n\n readonly inputValue = signal<string>(\"\");\n readonly agentId = input<string | undefined>();\n readonly threadId = input<string | undefined>();\n readonly inputComponent = input<Type<any> | undefined>();\n /** Whether the message list follows new messages to the bottom. Default `true`. */\n readonly autoScroll = input<boolean>(true);\n /** `false` turns the welcome screen off for an empty chat. Default `true`. */\n readonly welcomeScreen = input<boolean>(true);\n /**\n * How assistant messages show tool calls: `\"grouped\"` (default), `\"line\"`,\n * `\"stacked\"`, `\"separate\"` or `\"turn\"`. Forwarded to the message view.\n */\n readonly toolCallDisplay = input<CopilotChatToolCallDisplay>(\"grouped\");\n /** Component used to render each assistant message in the prebuilt chat. */\n readonly assistantMessageComponent = input<Type<any> | undefined>();\n /** Template used to render each assistant message in the prebuilt chat. */\n readonly assistantMessageTemplate = input<TemplateRef<any> | undefined>();\n /** Class forwarded to the default or custom assistant-message renderer. */\n readonly assistantMessageClass = input<string | undefined>();\n /** Component used to render each reasoning message in the prebuilt chat. */\n readonly reasoningMessageComponent = input<Type<any> | undefined>();\n /** Template used to render each reasoning message in the prebuilt chat. */\n readonly reasoningMessageTemplate = input<TemplateRef<any> | undefined>();\n /** Class forwarded to the default or custom reasoning-message renderer. */\n readonly reasoningMessageClass = input<string | undefined>();\n /**\n * Component used to render the work summary row of the `\"turn\"` tool-call\n * display. It gets `isWorking`, `isOpen`, `calls`, `elapsedMs`,\n * `workingSince` and `onClick`.\n */\n readonly workSummaryComponent = input<Type<unknown> | undefined>();\n /** Template used to render the work summary row of the `\"turn\"` display. */\n readonly workSummaryTemplate = input<TemplateRef<unknown> | undefined>();\n /** Class forwarded to the default or custom work summary renderer. */\n readonly workSummaryClass = input<string | undefined>();\n /** Component rendered after the transcript messages and before the cursor. */\n readonly messageViewChildrenComponent = input<Type<any> | undefined>();\n /** Template rendered after the transcript messages and before the cursor. */\n readonly messageViewChildrenTemplate = input<TemplateRef<any> | undefined>();\n /** Class forwarded to custom transcript-children renderers. */\n readonly messageViewChildrenClass = input<string | undefined>();\n readonly attachmentsConfig = input<AttachmentsConfig | undefined>(undefined, {\n alias: \"attachments\",\n });\n /**\n * Ambient chat configuration, when a {@link provideCopilotChatConfiguration}\n * provider is in scope. Absent (`null`) for standalone\n * `<copilot-chat [threadId]>` usage, which has no provider — resolved via the\n * optional inject so the component does not throw without one.\n */\n private readonly config = inject(COPILOT_CHAT_CONFIGURATION, {\n optional: true,\n });\n protected readonly resolvedAgentId = computed(() =>\n ɵresolveAgentId({\n agentId: this.agentId(),\n chatAgentId: this.config?.agentId(),\n }),\n );\n readonly agentStore = injectAgentStore(this.resolvedAgentId);\n private readonly copilotKit = inject(CopilotKit);\n /**\n * Loads the thread this chat shows: keeps the agent on it, orders the\n * teardown of the previous thread, owns the connect's abort and detach, and\n * tracks connections a send must wait for. A failed connect of an Inspector\n * override ends the override.\n */\n private readonly connection = new ɵChatConnection({\n core: this.copilotKit.core,\n onInspectorOverrideFailed: (requestId) =>\n this.inspectorThreadOverride.fail(requestId),\n });\n private readonly connectionState = signal(this.connection.getSnapshot());\n readonly cdr = inject(ChangeDetectorRef);\n readonly injector = inject(Injector);\n private readonly destroyRef = inject(DestroyRef);\n private readonly labels = injectChatLabels();\n protected readonly showCursor = computed(\n () => this.isConnecting() || this.agentStore().isRunning(),\n );\n /** `true` while the thread's connect is loading. */\n protected readonly isConnecting = computed(() => {\n this.connectionState();\n return this.connection.isConnecting({\n threadId: this.activeThreadId(),\n explicit: this.activeHasExplicitThreadId(),\n });\n });\n /** `true` while the agent runs. The chat input shows stop. */\n readonly isRunning = computed(() => this.agentStore().isRunning());\n /** A run can stop when it runs and the chat has messages, as in React. */\n readonly canStop = computed(\n () =>\n this.agentStore().isRunning() && this.agentStore().messages().length > 0,\n );\n /**\n * The send side — queueing behind the run in flight and the thread's\n * connection, the upload guard, stop, and transcription — lives in core.\n */\n private readonly submitter = ɵcreateChatSubmitter({\n core: this.copilotKit.core,\n getAgent: () => this.agentStore().agent,\n input: {\n get: () => this.inputValue(),\n set: (value) => this.inputValue.set(value),\n },\n attachments: {\n isUploading: () => this.attachmentsUploading(),\n consumeReady: () => this.attachmentsDirective()?.consume() ?? [],\n },\n threads: this.connection.threads,\n });\n private readonly submitterState = signal(this.submitter.getSnapshot());\n /** The notice the chat shows (a failed transcription, a blocked send), or `null`. */\n protected readonly transcriptionError = computed(() => {\n const { notice } = this.submitterState();\n return notice ? ɵresolveChatNotice(notice, this.labels) : null;\n });\n\n protected messages = computed(() => this.agentStore().messages());\n protected agentState = computed(() => this.agentStore().state());\n protected readonly hasExplicitThreadId =\n this.config?.hasExplicitThreadId ??\n computed(() => Boolean(this.threadId()));\n protected readonly agentRef = computed(() => this.agentStore().agent);\n /** The locally minted thread, renewed each time a provided thread goes away. */\n private readonly freshThreadId = new ɵFreshThreadId();\n protected readonly resolvedThreadId = computed(() =>\n this.freshThreadId.resolve(this.threadId() || undefined),\n );\n /** The configuration's thread, or this chat's own. */\n private readonly baseThreadId =\n this.config?.threadId ?? this.resolvedThreadId;\n private readonly baseHasExplicitThreadId =\n this.config?.hasExplicitThreadId ?? this.hasExplicitThreadId;\n /** The thread the chat shows: the Inspector's \"view thread\" override, else its own. */\n private readonly activeThreadId = computed(\n () => this.inspectorOverride()?.threadId ?? this.baseThreadId(),\n );\n private readonly activeHasExplicitThreadId = computed(\n () => this.inspectorOverride() !== null || this.baseHasExplicitThreadId(),\n );\n override readonly attachmentsEnabled = computed(\n () => this.attachmentsConfig()?.enabled ?? false,\n );\n override readonly attachmentsUploading = computed(() =>\n this.attachments().some((attachment) => attachment.status === \"uploading\"),\n );\n\n constructor() {\n super();\n\n const unsubscribeSubmitter = this.submitter.subscribe(() => {\n const state = this.submitter.getSnapshot();\n this.submitterState.set(state);\n this.isTranscribing.set(state.isTranscribing);\n this.cdr.markForCheck();\n });\n const unsubscribeConnection = this.connection.subscribe(() => {\n this.connectionState.set(this.connection.getSnapshot());\n this.cdr.markForCheck();\n });\n this.destroyRef.onDestroy(() => {\n unsubscribeConnection();\n unsubscribeSubmitter();\n this.submitter.dispose();\n this.connection.dispose();\n });\n\n explicitEffect(this.resolvedAgentId, (agentId, onCleanup) => {\n onCleanup(this.bindSuggestions(agentId));\n });\n\n if (this.config) {\n // A set `[threadId]` input seeds the ambient config so the input\n // actually drives the active thread (not just the welcome flag). When\n // the config is controlled by a host-provided `threadId` option,\n // `setActiveThreadId` no-ops — so a controlled config wins over the\n // input, matching React's prop-precedence. When `[threadId]` is unset,\n // the effect does nothing and the config drives as before.\n explicitEffect(this.threadId, (inputThreadId) => {\n if (inputThreadId) {\n this.config!.setActiveThreadId(inputThreadId, { explicit: true });\n }\n });\n }\n // Both ambient and standalone threads share reset and connection cleanup.\n // The Inspector's \"view thread\" override takes the place of the chat's\n // own thread while it lasts, like React and Vue.\n this.bindInspectorThreadOverride(this.baseThreadId);\n connectActiveThread(\n {\n threadId: this.activeThreadId,\n hasExplicitThreadId: this.activeHasExplicitThreadId,\n inspectorRequestId: computed(\n () => this.inspectorOverride()?.requestId ?? null,\n ),\n },\n this.agentStore,\n this.connection,\n );\n }\n\n private readonly inspectorThreadOverride = new ɵInspectorThreadOverride({\n agentId: this.resolvedAgentId(),\n baseThreadId: this.config?.threadId() ?? this.resolvedThreadId(),\n });\n private readonly inspectorOverride = signal(\n this.inspectorThreadOverride.getSnapshot(),\n );\n\n private bindInspectorThreadOverride(baseThreadId: () => string) {\n const controller = this.inspectorThreadOverride;\n const unsubscribe = controller.subscribe(() => {\n this.inspectorOverride.set(controller.getSnapshot());\n });\n explicitEffect(\n () => ({ agentId: this.resolvedAgentId(), baseThreadId: baseThreadId() }),\n (input) => controller.update(input),\n );\n this.destroyRef.onDestroy(() => {\n unsubscribe();\n controller.dispose();\n });\n }\n\n /**\n * Shows `agentId`'s suggestions, and loads them when nothing else does:\n * once for the chat's agent, and again when that agent registers, so the\n * provider's `suggestionsConfig` reaches the welcome screen. A config bound\n * through `configureSuggestions` loads itself, so the chat skips an agent\n * whose suggestions are already loading or loaded. Returns the cleanup.\n */\n private bindSuggestions(agentId: string) {\n const core = this.copilotKit.core;\n this.publishSuggestions(core.getSuggestions(agentId));\n const unsubscribe = ɵsubscribeToAgentSuggestions(core, agentId, (result) =>\n this.publishSuggestions(result),\n );\n const current = core.getSuggestions(agentId);\n if (!current.isLoading && current.suggestions.length === 0) {\n this.copilotKit.reloadSuggestions(agentId);\n }\n let isRegistered = core.getAgent(agentId) !== undefined;\n const agents = core.subscribe({\n onAgentsChanged: () => {\n const wasRegistered = isRegistered;\n isRegistered = core.getAgent(agentId) !== undefined;\n const arrived = isRegistered && !wasRegistered;\n if (arrived && !core.getSuggestions(agentId).isLoading) {\n this.copilotKit.reloadSuggestions(agentId);\n }\n },\n });\n return () => {\n unsubscribe();\n agents.unsubscribe();\n };\n }\n\n private publishSuggestions(result: CopilotKitCoreGetSuggestionsResult) {\n this.suggestions.set(result.suggestions);\n this.suggestionsLoading.set(result.isLoading);\n this.cdr.markForCheck();\n }\n\n async submitInput(value: string): Promise<void> {\n if (this.destroyRef.destroyed) return;\n await this.submitter.submit(value);\n }\n\n async selectSuggestion(\n suggestion: Suggestion,\n _index: number,\n ): Promise<void> {\n if (this.destroyRef.destroyed) return;\n await this.submitter.selectSuggestion(suggestion);\n }\n\n changeInput(value: string): void {\n this.inputValue.set(value);\n }\n\n /**\n * Stop the agent's current run, as React's chat does: through\n * `copilotkit.core.stopAgent`, or `agent.abortRun()` when that throws.\n */\n stop(): void {\n this.submitter.stop();\n }\n\n override async finishTranscription(audioBlob: Blob): Promise<void> {\n await this.submitter.transcribe(audioBlob);\n }\n\n addFile(): void {\n this.attachmentsDirective()?.openFilePicker();\n }\n\n removeAttachment(id: string): void {\n this.attachmentsDirective()?.removeAttachment(id);\n }\n\n handleDragOver(event: DragEvent): void {\n this.attachmentsDirective()?.onDragOver(event);\n }\n\n handleDragLeave(event: DragEvent): void {\n this.attachmentsDirective()?.onDragLeave(event);\n }\n\n handleDrop(event: DragEvent): void {\n void this.attachmentsDirective()?.onDrop(event);\n }\n}\n","import { CopilotChatTextarea } from \"./copilot-chat-textarea\";\nimport { CopilotChatAudioRecorder } from \"./copilot-chat-audio-recorder\";\nimport {\n CopilotChatSendButton,\n CopilotChatStartTranscribeButton,\n CopilotChatCancelTranscribeButton,\n CopilotChatFinishTranscribeButton,\n CopilotChatAddFileButton,\n} from \"./copilot-chat-buttons\";\nimport { CopilotChatToolbar } from \"./copilot-chat-toolbar\";\nimport { CopilotChatToolsMenu } from \"./copilot-chat-tools-menu\";\n\n/**\n * Default components used by CopilotChatInput.\n * These can be imported and reused when creating custom slot implementations.\n *\n * @example\n * ```typescript\n * import { CopilotChatInputDefaults } from '@copilotkit/angular';\n *\n * @Component({\n * template: `\n * <copilot-chat-input [sendButtonSlot]=\"CustomSendButton\">\n * </copilot-chat-input>\n * `\n * })\n * export class MyComponent {\n * CustomSendButton = class extends CopilotChatInputDefaults.SendButton {\n * // Custom implementation\n * };\n * }\n * ```\n */\nexport class CopilotChatInputDefaults {\n static readonly TextArea = CopilotChatTextarea;\n static readonly AudioRecorder = CopilotChatAudioRecorder;\n static readonly SendButton = CopilotChatSendButton;\n static readonly StartTranscribeButton = CopilotChatStartTranscribeButton;\n static readonly CancelTranscribeButton = CopilotChatCancelTranscribeButton;\n static readonly FinishTranscribeButton = CopilotChatFinishTranscribeButton;\n static readonly AddFileButton = CopilotChatAddFileButton;\n static readonly Toolbar = CopilotChatToolbar;\n static readonly ToolsMenu = CopilotChatToolsMenu;\n}\n","import type { Type, TemplateRef } from \"@angular/core\";\nimport type { ɵAudioRecorderState } from \"@copilotkit/core\";\n\n/**\n * Mode of the chat input component\n */\nexport type CopilotChatInputMode = \"input\" | \"transcribe\" | \"processing\";\n\n/**\n * Represents a menu item in the tools menu\n */\nexport type ToolsMenuItem = {\n label: string;\n} & (\n | {\n action: () => void;\n items?: never;\n }\n | {\n action?: never;\n items: (ToolsMenuItem | \"-\")[];\n }\n);\n\n/**\n * Audio recorder state\n */\nexport type AudioRecorderState = ɵAudioRecorderState;\n\n/**\n * Error class for audio recorder failures\n */\nexport { ɵAudioRecorderError as AudioRecorderError } from \"@copilotkit/core\";\n\n/**\n * Props for textarea component\n */\nexport interface CopilotChatTextareaProps {\n value?: string;\n placeholder?: string;\n maxRows?: number;\n autoFocus?: boolean;\n disabled?: boolean;\n onChange?: (value: string) => void;\n onKeyDown?: (event: KeyboardEvent) => void;\n inputClass?: string;\n style?: any;\n rows?: number;\n cols?: number;\n readonly?: boolean;\n spellcheck?: boolean;\n wrap?: \"hard\" | \"soft\" | \"off\";\n}\n\n/**\n * Props for button components\n */\nexport interface CopilotChatButtonProps {\n disabled?: boolean;\n onClick?: () => void;\n inputClass?: string;\n style?: any;\n type?: \"button\" | \"submit\" | \"reset\";\n ariaLabel?: string;\n ariaPressed?: boolean;\n ariaExpanded?: boolean;\n title?: string;\n}\n\n/**\n * Props for toolbar button with tooltip\n */\nexport interface CopilotChatToolbarButtonProps extends CopilotChatButtonProps {\n icon?: TemplateRef<any>;\n tooltip?: string;\n variant?: \"primary\" | \"secondary\";\n}\n\n/**\n * Props for tools menu button\n */\nexport interface CopilotChatToolsButtonProps extends CopilotChatButtonProps {\n toolsMenu?: (ToolsMenuItem | \"-\")[];\n}\n\n/**\n * Props for audio recorder\n */\nexport interface CopilotChatAudioRecorderProps {\n inputClass?: string;\n style?: any;\n onStateChange?: (state: AudioRecorderState) => void;\n showControls?: boolean;\n maxDuration?: number;\n}\n\n/**\n * Props for toolbar\n */\nexport interface CopilotChatToolbarProps {\n inputClass?: string;\n style?: any;\n position?: \"top\" | \"bottom\";\n alignment?: \"left\" | \"center\" | \"right\" | \"space-between\";\n}\n\n/**\n * Slot configuration for chat input\n */\nexport interface CopilotChatInputSlots {\n textArea?: Type<any> | TemplateRef<any>;\n sendButton?: Type<any> | TemplateRef<any>;\n startTranscribeButton?: Type<any> | TemplateRef<any>;\n cancelTranscribeButton?: Type<any> | TemplateRef<any>;\n finishTranscribeButton?: Type<any> | TemplateRef<any>;\n addFileButton?: Type<any> | TemplateRef<any>;\n toolsButton?: Type<any> | TemplateRef<any>;\n toolbar?: Type<any> | TemplateRef<any>;\n audioRecorder?: Type<any> | TemplateRef<any>;\n}\n\n/**\n * Input configuration for the chat input component\n */\nexport interface CopilotChatInputConfig {\n mode?: CopilotChatInputMode;\n toolsMenu?: (ToolsMenuItem | \"-\")[];\n autoFocus?: boolean;\n additionalToolbarItems?: TemplateRef<any>;\n value?: string;\n class?: string;\n}\n\n/**\n * Output events for the chat input component\n */\nexport interface CopilotChatInputOutputs {\n submitMessage: (value: string) => void;\n startTranscribe: () => void;\n cancelTranscribe: () => void;\n finishTranscribe: () => void;\n addFile: () => void;\n changeValue: (value: string) => void;\n}\n","import {\n CUSTOM_ELEMENTS_SCHEMA,\n ChangeDetectionStrategy,\n Component,\n DestroyRef,\n Directive,\n ElementRef,\n EventEmitter,\n Output,\n TemplateRef,\n computed,\n contentChild,\n effect,\n inject,\n input,\n signal,\n viewChild,\n} from \"@angular/core\";\nimport { NgTemplateOutlet } from \"@angular/common\";\nimport { DEFAULT_AGENT_ID } from \"@copilotkit/shared\";\nimport {\n ɵcreateThreadsDrawerActions,\n ɵgetThreadsDrawerElementProps,\n ɵresolveLicenseState,\n ɵresolveThreadsLicense,\n ɵtoDrawerThread,\n} from \"@copilotkit/core\";\nimport { defineCopilotKitThreadsDrawer } from \"@copilotkit/web-components/threads-drawer\";\nimport type {\n ArchiveDetail,\n DeleteDetail,\n OpenChangeDetail,\n RetryDetail,\n ThreadSelectedDetail,\n UnarchiveDetail,\n CopilotKitThreadsDrawer as CopilotKitThreadsDrawerElement,\n} from \"@copilotkit/web-components/threads-drawer\";\n// TODO(ENT-1051): import `CollapseChangeDetail` from\n// \"@copilotkit/web-components/threads-drawer\" once the parallel element PR that\n// adds the collapse feature (property `collapsible` + event `collapse-change`)\n// lands and is published; declared locally here because the built element types\n// in this worktree predate it.\ntype CollapseChangeDetail = { collapsed: boolean };\nimport { COPILOT_CHAT_CONFIGURATION } from \"../../chat-configuration\";\nimport { CopilotKit } from \"../../copilotkit\";\nimport { injectThreads } from \"../../threads\";\n\n/**\n * Structural directive that captures a per-row template for projection into\n * the `<copilotkit-threads-drawer>` element as light-DOM children with\n * `slot=\"row:{id}\"`.\n *\n * Apply it to an `<ng-template>` that is a direct child of `<copilot-threads-drawer>`.\n * The implicit context variable (`let-t`) receives the full {@link Thread}\n * record for that row.\n *\n * @example\n * ```html\n * <copilot-threads-drawer>\n * <ng-template copilotThreadsDrawerRow let-t>\n * <span>{{ t.name }}</span>\n * </ng-template>\n * </copilot-threads-drawer>\n * ```\n */\n@Directive({ selector: \"[copilotThreadsDrawerRow]\", standalone: true })\nexport class CopilotThreadsDrawerRow {\n /** The captured template reference for the per-row content. */\n readonly template = inject(TemplateRef);\n}\n\n/**\n * Angular wrapper around the `<copilotkit-threads-drawer>` Lit web component.\n *\n * Registers the custom element on construction (idempotent; SSR-guarded\n * internally by {@link defineCopilotKitThreadsDrawer}) and projects it into the DOM\n * via the `CUSTOM_ELEMENTS_SCHEMA`-enabled template.\n *\n * Thread list state is fetched from CopilotKit Intelligence via\n * {@link injectThreads} and pushed onto the element's JS properties via an\n * `effect`, following the imperative property-assignment pattern used elsewhere\n * in this package.\n *\n * DOM events emitted by the element are routed back to the chat configuration\n * and thread mutation methods via declarative Angular event bindings.\n *\n * @example\n * ```html\n * <copilot-threads-drawer data-testid=\"my-drawer\" />\n * ```\n */\n@Component({\n selector: \"copilot-threads-drawer\",\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\n imports: [NgTemplateOutlet],\n template: `\n <copilotkit-threads-drawer\n #drawer\n [attr.data-testid]=\"dataTestId()\"\n [attr.recent-label]=\"recentLabel() ?? null\"\n (thread-selected)=\"onThreadSelected($event)\"\n (new-thread)=\"onNewThread()\"\n (archive)=\"onArchive($event)\"\n (unarchive)=\"onUnarchive($event)\"\n (delete)=\"onDelete($event)\"\n (filter-change)=\"onFilterChange()\"\n (collapse-change)=\"onCollapseChange($event)\"\n (retry)=\"onRetry($event)\"\n (load-more)=\"onLoadMore()\"\n (open-change)=\"onOpenChange($event)\"\n (licensed)=\"onLicensed()\"\n ><ng-content></ng-content>\n @if (rowDirective(); as row) {\n @for (t of threads.threads(); track t.id) {\n <div [attr.slot]=\"'row:' + t.id\">\n <ng-container\n [ngTemplateOutlet]=\"row.template\"\n [ngTemplateOutletContext]=\"{ $implicit: t }\"\n ></ng-container>\n </div>\n }\n }\n </copilotkit-threads-drawer>\n `,\n})\nexport class CopilotThreadsDrawer {\n /**\n * Optional agent id whose threads this drawer lists/manages. Scopes the\n * {@link injectThreads} store (via the resolved-agent precedence: this input\n * → ambient config's `agentId` → {@link DEFAULT_AGENT_ID}). NOT forwarded to\n * the element (the element has no `agentId` property).\n */\n readonly agentId = input<string | undefined>();\n\n /**\n * Value applied as the `data-testid` attribute on the inner\n * `<copilotkit-threads-drawer>` element. Defaults to `\"copilot-threads-drawer\"`.\n */\n readonly dataTestId = input<string>(\"copilot-threads-drawer\", {\n alias: \"data-testid\",\n });\n\n /**\n * Optional accessible/region + default-header label forwarded to the element's\n * `label` property; defaults to the element's own `\"Threads\"` when unset.\n */\n readonly label = input<string | undefined>();\n\n /**\n * Optional heading for the \"Recent Conversations\" section, forwarded to the\n * element's `recent-label` attribute; defaults to the element's own\n * `\"Recent Conversations\"` when unset.\n */\n readonly recentLabel = input<string | undefined>();\n\n /**\n * Whether the drawer offers a collapse toggle. Pushed onto the element's\n * `collapsible` PROPERTY (a default-true boolean, exactly like `licensed` — a\n * string attribute cannot represent it since any non-empty value is truthy).\n * When `false`, the drawer has no collapse toggle and is always expanded.\n * Defaults to the element's own `true` when unset.\n */\n readonly collapsible = input<boolean | undefined>();\n\n /**\n * Emits the new collapsed state whenever the drawer's collapsed state changes\n * (mirrors the element's `collapse-change` event).\n */\n @Output() readonly collapseChange = new EventEmitter<boolean>();\n\n /**\n * Optional host override for the thread-select action.\n *\n * When provided, this callback is invoked instead of driving\n * `config.setActiveThreadId`. Bound via `[onThreadSelect]=\"fn\"`.\n */\n readonly threadSelectHandler = input<\n ((threadId: string) => void) | undefined\n >(undefined, {\n alias: \"onThreadSelect\",\n });\n\n /**\n * Optional host override for the new-thread action.\n *\n * When provided, this callback is invoked instead of driving\n * `config.startNewThread`. The core `threads.startNewThread()` reset is\n * always called regardless. Bound via `[onNewThread]=\"fn\"`.\n */\n readonly newThreadHandler = input<(() => void) | undefined>(undefined, {\n alias: \"onNewThread\",\n });\n\n /**\n * Page size for thread pagination. When set, threads load in pages of this\n * size and the element shows a \"Load more\" control while more remain. When\n * unset, the full list loads at once and no pagination control shows.\n */\n readonly limit = input<number | undefined>();\n\n /**\n * Destination the locked view's Upgrade CTA opens in a new tab. Forwarded to\n * the element's `licenseUrl` property; defaults to the element's built-in\n * CopilotKit Intelligence docs URL when unset. Set to an empty string to\n * suppress the default navigation and handle the click via `onLicensed`.\n */\n readonly licenseUrl = input<string | undefined>();\n\n /**\n * Optional host hook fired when the locked view's Upgrade CTA is clicked. The\n * element still performs its default navigation unless `licenseUrl` is blank;\n * use this for telemetry or to drive your own upgrade flow. Bound via\n * `[onLicensed]=\"fn\"`.\n */\n readonly licensedHandler = input<(() => void) | undefined>(undefined, {\n alias: \"onLicensed\",\n });\n\n private readonly config = inject(COPILOT_CHAT_CONFIGURATION, {\n optional: true,\n });\n\n private readonly copilotkit = inject(CopilotKit);\n\n private readonly drawerRef = viewChild<\n unknown,\n ElementRef<CopilotKitThreadsDrawerElement>\n >(\"drawer\", {\n read: ElementRef,\n });\n\n /**\n * Optional per-row template directive projected as a direct child of this\n * component. When present, a `<div slot=\"row:{id}\">` is rendered inside the\n * `<copilotkit-threads-drawer>` element for each thread, allowing the host to inject\n * custom light-DOM content into each row slot.\n */\n protected readonly rowDirective = contentChild(CopilotThreadsDrawerRow);\n\n /**\n * The resolved agent id for the threads store. Precedence:\n * 1. `agentId` input prop.\n * 2. Ambient `CopilotChatConfiguration.agentId`.\n * 3. {@link DEFAULT_AGENT_ID}.\n */\n protected readonly resolvedAgentId = computed(\n () => this.agentId() ?? this.config?.agentId() ?? DEFAULT_AGENT_ID,\n );\n\n // Core resolves the license context (the same rules as the provider's\n // license banner) and whether the threads drawer may load its list:\n // `unknown` counts as licensed so the threads endpoint decides; `null` (not\n // reported yet) is pending, never the locked view, until a runtime\n // connects without reporting a license (no Intelligence).\n private readonly threadsLicense = computed(() => {\n const licenseStatus = this.copilotkit.licenseStatus();\n const runtimeEntitlements = this.copilotkit.runtimeEntitlements?.();\n return ɵresolveThreadsLicense(\n ɵresolveLicenseState({\n status: licenseStatus,\n entitlements: runtimeEntitlements,\n retryPending:\n this.copilotkit.runtimeEntitlementRetryPending?.() ?? false,\n }).context,\n {\n status: this.copilotkit.runtimeConnectionStatus(),\n licenseStatus,\n runtimeEntitlements,\n },\n );\n });\n\n protected readonly licensed = computed(() => this.threadsLicense().licensed);\n\n protected readonly licensePending = computed(\n () => this.threadsLicense().licensePending,\n );\n\n protected readonly threads = injectThreads({\n agentId: this.resolvedAgentId,\n includeArchived: true,\n limit: this.limit,\n // While unlicensed, skip the thread fetch entirely: the element shows only\n // its locked view and no `/threads` request is issued.\n enabled: this.licensed,\n });\n\n /** Thread records mapped to the element's {@link DrawerThread} shape. */\n protected readonly drawerThreads = computed(() =>\n this.threads.threads().map(ɵtoDrawerThread),\n );\n\n /**\n * User-facing error message from the filtered list error signal, or `null`\n * when there is no error. Uses `listError` (not `error`) so developer/config\n * errors (missing runtime URL, runtime without thread endpoints) are excluded\n * and never displayed to end users.\n */\n protected readonly errorMessage = computed(\n () => this.threads.listError()?.message ?? null,\n );\n\n /**\n * The currently-active thread id, sourced from the ambient chat\n * configuration, or `null` when no configuration is present.\n */\n protected readonly activeThreadId = computed(\n () => this.config?.threadId() ?? null,\n );\n\n /**\n * User-facing fetch-more error message from the dedicated fetch-more error\n * signal, or `null`. Drives the element's inline \"couldn't load more — retry\"\n * panel without disturbing the loaded list or the initial-list `error`.\n */\n protected readonly fetchMoreErrorMessage = computed(\n () => this.threads.fetchMoreError()?.message ?? null,\n );\n\n private readonly destroyRef = inject(DestroyRef);\n\n /**\n * Provider-less fallback open-state. Without a surrounding chat configuration\n * there is no shared open-state to bind to, so the wrapper keeps its own\n * local state. Starts CLOSED — matching the configuration's own default — so\n * the element does not spring open (and scroll-lock the page on mobile) on\n * load, and the element's `open-change` events still toggle it.\n */\n private readonly localDrawerOpen = signal(false);\n\n /**\n * The effective drawer open-state: the ambient chat configuration's\n * `drawerOpen` when present, else the provider-less {@link localDrawerOpen}.\n * Pushed onto the element's controlled `open` property in the effect below.\n */\n protected readonly drawerOpen = computed(() =>\n this.config ? this.config.drawerOpen() : this.localDrawerOpen(),\n );\n\n constructor() {\n defineCopilotKitThreadsDrawer();\n\n // Announce drawer presence to the surrounding chat configuration so a\n // future header launcher can render, and de-register on destroy. Mirrors\n // the React (`registerDrawer()` effect) and Vue (`onScopeDispose`) wrappers.\n const unregisterDrawer = this.config?.registerDrawer();\n if (unregisterDrawer) {\n this.destroyRef.onDestroy(unregisterDrawer);\n }\n\n // Push signal-derived values onto the element's JS properties every time\n // any reactive dependency changes. Using an effect (rather than template\n // bindings) is required because Lit elements accept object/boolean domains\n // only as JS properties, not as HTML attributes.\n effect(() => {\n const el = this.drawerRef()?.nativeElement;\n if (!el) return;\n el.threads = this.drawerThreads();\n // While the license is still resolving, force the loading state so the\n // element shows its spinner instead of an empty/locked body.\n const elementProps = ɵgetThreadsDrawerElementProps({\n loading: this.threads.isLoading(),\n licensed: this.licensed(),\n licensePending: this.licensePending(),\n });\n el.loading = elementProps.loading;\n el.error = this.errorMessage();\n el.fetchMoreError = this.fetchMoreErrorMessage();\n el.activeThreadId = this.activeThreadId();\n el.hasMore = this.threads.hasMoreThreads();\n el.fetchingMore = this.threads.isFetchingMoreThreads();\n // Drive the element's controlled `open` from the (config-backed or local)\n // open-state so the element does not default open=true on load.\n el.open = this.drawerOpen();\n // Pending counts as licensed for rendering: the element shows the locked\n // view only when `licensed` is false, so keeping it true until the status\n // resolves prevents the locked view from flashing mid-resolution.\n el.licensed = elementProps.licensed;\n if (this.label() !== undefined) el.label = this.label() as string;\n const licenseUrl = this.licenseUrl();\n if (licenseUrl !== undefined) el.licenseUrl = licenseUrl;\n // `collapsible` is a default-true boolean PROPERTY (like `licensed`);\n // leave the element's own default in place when the input is unset.\n const collapsible = this.collapsible();\n if (collapsible !== undefined) {\n // TODO(ENT-1051): drop the intersection cast once the published element\n // type declares `collapsible` (see the local CollapseChangeDetail note).\n (\n el as CopilotKitThreadsDrawerElement & { collapsible: boolean }\n ).collapsible = collapsible;\n }\n });\n }\n\n // Core owns the drawer actions; they read the latest values at call time.\n private readonly actions = ɵcreateThreadsDrawerActions({\n getThreads: () => this.threads,\n getConfig: () => {\n const config = this.config;\n if (!config) return null;\n return {\n threadId: config.threadId(),\n setActiveThreadId: (threadId, options) =>\n config.setActiveThreadId(threadId, options),\n startNewThread: () => config.startNewThread(),\n };\n },\n getCallbacks: () => ({\n onThreadSelect: this.threadSelectHandler(),\n onNewThread: this.newThreadHandler(),\n }),\n getElement: () => this.drawerRef()?.nativeElement ?? null,\n });\n\n protected onThreadSelected(event: Event): void {\n const { threadId } = (event as CustomEvent<ThreadSelectedDetail>).detail;\n this.actions.selectThread(threadId);\n }\n\n /**\n * Handles the `open-change` event from the drawer element.\n *\n * Drives the ambient chat configuration's `setDrawerOpen` when present, else\n * the provider-less {@link localDrawerOpen} fallback — mirroring the React\n * and Vue wrappers so the element's open-state stays coordinated.\n *\n * @param event - The raw DOM event; cast to `CustomEvent<OpenChangeDetail>` to extract `open`.\n */\n protected onOpenChange(event: Event): void {\n const { open } = (event as CustomEvent<OpenChangeDetail>).detail;\n if (this.config) {\n this.config.setDrawerOpen(open);\n } else {\n this.localDrawerOpen.set(open);\n }\n }\n\n protected onNewThread(): void {\n this.actions.newThread();\n }\n\n protected onArchive(event: Event): void {\n this.actions.archive((event as CustomEvent<ArchiveDetail>).detail.threadId);\n }\n\n protected onUnarchive(event: Event): void {\n const { threadId } = (event as CustomEvent<UnarchiveDetail>).detail;\n this.actions.unarchive(threadId);\n }\n\n protected onDelete(event: Event): void {\n this.actions.remove((event as CustomEvent<DeleteDetail>).detail.threadId);\n }\n\n protected onFilterChange(): void {\n this.actions.refetch();\n }\n\n /**\n * Handles the `collapse-change` event from the drawer element — re-emits the\n * new collapsed state through the component's `collapseChange` output so hosts\n * can observe (or persist) the drawer's collapsed state.\n *\n * @param event - The raw DOM event; cast to `CustomEvent<CollapseChangeDetail>` to extract `collapsed`.\n */\n protected onCollapseChange(event: Event): void {\n const { collapsed } = (event as CustomEvent<CollapseChangeDetail>).detail;\n this.collapseChange.emit(collapsed);\n }\n\n protected onRetry(event: Event): void {\n this.actions.retry((event as CustomEvent<RetryDetail>).detail.scope);\n }\n\n protected onLoadMore(): void {\n this.actions.loadMore();\n }\n\n /**\n * Handles the `licensed` event from the drawer element (Upgrade CTA click).\n *\n * The element performs its own default navigation to `licenseUrl`; this hook\n * lets the host observe the click (e.g. for telemetry) or drive a custom\n * upgrade flow when provided via `[onLicensed]`.\n */\n protected onLicensed(): void {\n this.licensedHandler()?.();\n }\n}\n","import { inject, PLATFORM_ID } from \"@angular/core\";\nimport type { ElementRef, Signal } from \"@angular/core\";\nimport { isPlatformBrowser } from \"@angular/common\";\nimport { ɵbindDialogFocus, ɵbindPopupDismiss } from \"@copilotkit/core\";\nimport { explicitEffect } from \"../../explicit-effect\";\n\n/** What {@link bindModalDialog} reads from the popup or overlay sidebar. */\nexport interface ModalDialogBinding {\n /** The dialog element. Undefined while it is closed. */\n dialog: Signal<ElementRef<HTMLElement> | undefined>;\n /** Where focus goes when the dialog opens: the close button. */\n initialFocus: Signal<ElementRef<HTMLElement> | undefined>;\n /** The toggle button. Focus goes back to it when the dialog closes. */\n launcher: Signal<ElementRef<HTMLElement>>;\n clickOutsideToClose: Signal<boolean>;\n close: () => void;\n}\n\n/**\n * While the dialog is in the DOM: keep keyboard focus inside it with core's\n * `ɵbindDialogFocus`, and close it on Escape and (when asked) on a pointer\n * down outside with core's `ɵbindPopupDismiss`.\n *\n * Does nothing on the server: focus and DOM listeners are browser-only.\n *\n * Call it in an injection context, such as a constructor.\n */\nexport function bindModalDialog(binding: ModalDialogBinding): void {\n if (!isPlatformBrowser(inject(PLATFORM_ID))) return;\n\n explicitEffect(\n () => binding.dialog()?.nativeElement,\n (dialog, onCleanup) => {\n if (!dialog) return;\n onCleanup(\n ɵbindDialogFocus(dialog, {\n initialFocus: binding.initialFocus()?.nativeElement,\n returnFocusTo: binding.launcher().nativeElement,\n }),\n );\n },\n );\n\n explicitEffect(\n () => ({\n dialog: binding.dialog()?.nativeElement,\n clickOutsideToClose: binding.clickOutsideToClose(),\n }),\n ({ dialog, clickOutsideToClose }, onCleanup) => {\n if (!dialog) return;\n onCleanup(\n ɵbindPopupDismiss({\n getContainer: () => dialog,\n onDismiss: binding.close,\n clickOutsideToClose,\n }),\n );\n },\n );\n}\n","import { NgComponentOutlet } from \"@angular/common\";\nimport type { ElementRef, Type } from \"@angular/core\";\nimport {\n ChangeDetectionStrategy,\n Component,\n computed,\n input,\n model,\n viewChild,\n} from \"@angular/core\";\nimport { randomUUID } from \"@copilotkit/shared\";\n\nimport { CopilotChat } from \"../chat/copilot-chat\";\nimport { COPILOT_CHAT_WELCOME_LAYOUT } from \"../chat/copilot-chat-welcome-layout\";\nimport { CopilotKitStyles } from \"../copilot-kit-styles\";\nimport { CopilotIcon, MessageCircle, X } from \"../icons/copilot-icon\";\nimport { injectChatLabels } from \"../../chat-config\";\nimport { bindModalDialog } from \"./modal-dialog\";\nimport {\n ɵPOPUP_DEFAULT_HEIGHT,\n ɵPOPUP_DEFAULT_WIDTH,\n ɵdimensionToCss,\n} from \"@copilotkit/core\";\n\n/** Accessible, responsive floating chat surface with an explicit open model. */\n@Component({\n selector: \"copilot-popup\",\n imports: [NgComponentOutlet, CopilotIcon, CopilotKitStyles],\n changeDetection: ChangeDetectionStrategy.OnPush,\n viewProviders: [{ provide: COPILOT_CHAT_WELCOME_LAYOUT, useValue: \"popup\" }],\n host: { class: \"copilot-popup-host\", \"data-copilotkit\": \"\" },\n template: `\n <copilot-kit-styles />\n <button\n #launcher\n type=\"button\"\n class=\"copilotKitButton cpk-chat-toggle-button\"\n data-slot=\"chat-toggle-button\"\n data-copilot-popup-toggle\n [attr.data-state]=\"open() ? 'open' : 'closed'\"\n [attr.aria-controls]=\"dialogId\"\n [attr.aria-expanded]=\"open()\"\n [attr.aria-label]=\"\n open() ? labels.chatToggleCloseLabel : labels.chatToggleOpenLabel\n \"\n [tabIndex]=\"open() ? -1 : 0\"\n (click)=\"toggle()\"\n >\n <span\n aria-hidden=\"true\"\n class=\"cpk-chat-toggle-button-icon-wrapper copilot-toggle-icon\"\n [class.copilot-toggle-icon-hidden]=\"open()\"\n >\n <copilot-icon\n [img]=\"MessageCircleIcon\"\n iconClass=\"cpk-chat-toggle-button-icon\"\n />\n </span>\n <span\n aria-hidden=\"true\"\n class=\"cpk-chat-toggle-button-icon-wrapper copilot-toggle-icon copilot-toggle-icon-close\"\n [class.copilot-toggle-icon-hidden]=\"!open()\"\n >\n <copilot-icon [img]=\"XIcon\" iconClass=\"cpk-chat-toggle-button-icon\" />\n </span>\n </button>\n\n @if (open()) {\n <div data-copilotkit class=\"cpk-popup-view\">\n <section\n #dialog\n tabindex=\"-1\"\n class=\"copilotKitPopup copilotKitWindow cpk-popup-view-window cpk-popup-view-window-open\"\n role=\"dialog\"\n [attr.id]=\"dialogId\"\n [attr.aria-labelledby]=\"headerComponent() ? null : titleId\"\n [attr.aria-label]=\"headerComponent() ? resolvedTitle() : null\"\n [style.--copilot-popup-width]=\"resolvedWidth()\"\n [style.--copilot-popup-height]=\"resolvedHeight()\"\n >\n <header class=\"copilotKitHeader cpk-modal-header\">\n <div class=\"cpk-modal-header-content\">\n <div class=\"cpk-modal-header-start\">\n <span aria-hidden=\"true\"></span>\n </div>\n <div class=\"cpk-modal-header-center\">\n @if (headerComponent(); as header) {\n <ng-container [ngComponentOutlet]=\"header\" />\n } @else {\n <h2 class=\"cpk-modal-header-title\" [attr.id]=\"titleId\">\n {{ resolvedTitle() }}\n </h2>\n }\n </div>\n <div class=\"cpk-modal-header-end\">\n <button\n #initialFocus\n type=\"button\"\n class=\"cpk-modal-header-close-button\"\n [attr.aria-label]=\"labels.modalHeaderCloseButtonLabel\"\n (click)=\"close()\"\n >\n <copilot-icon\n [img]=\"XIcon\"\n iconClass=\"cpk-modal-header-close-icon\"\n />\n </button>\n </div>\n </div>\n </header>\n <div class=\"cpk-popup-view-chat\" data-popup-chat>\n <ng-container [ngComponentOutlet]=\"chatComponent()\" />\n </div>\n </section>\n </div>\n }\n `,\n // The look comes from the shared CSS (cpk-* classes). These rules add what\n // the Angular popup does beyond React's: a toggle that stays on top of the\n // popup, and an enter animation.\n styles: `\n :host {\n display: contents;\n }\n .cpk-chat-toggle-button {\n z-index: 1202;\n }\n .copilot-toggle-icon {\n transition:\n opacity 200ms cubic-bezier(0, 0, 0.2, 1),\n transform 200ms cubic-bezier(0, 0, 0.2, 1);\n }\n .copilot-toggle-icon-hidden {\n opacity: 0;\n transform: scale(0.75) rotate(90deg);\n }\n .copilot-toggle-icon-close.copilot-toggle-icon-hidden {\n transform: scale(0.75) rotate(-90deg);\n }\n .cpk-popup-view {\n z-index: 1201;\n }\n .cpk-popup-view-window {\n --copilot-popup-max-width: calc(100vw - 3rem);\n --copilot-popup-max-height: calc(100dvh - 7.5rem);\n padding: env(safe-area-inset-top) env(safe-area-inset-right)\n env(safe-area-inset-bottom) env(safe-area-inset-left);\n }\n @media (prefers-reduced-motion: no-preference) {\n .cpk-popup-view-window {\n animation: copilot-popup-enter 200ms cubic-bezier(0, 0, 0.2, 1);\n }\n @keyframes copilot-popup-enter {\n from {\n translate: 0 1.25rem;\n scale: 0.95;\n }\n }\n }\n `,\n})\nexport class CopilotPopup {\n readonly open = model(true);\n /** The header title. Default: `labels.modalHeaderTitle`. */\n readonly title = input<string | undefined>();\n readonly width = input<number | string>(ɵPOPUP_DEFAULT_WIDTH);\n readonly height = input<number | string>(ɵPOPUP_DEFAULT_HEIGHT);\n readonly clickOutsideToClose = input(false);\n readonly chatComponent = input<Type<unknown>>(CopilotChat);\n readonly headerComponent = input<Type<unknown> | undefined>();\n\n protected readonly MessageCircleIcon = MessageCircle;\n protected readonly XIcon = X;\n protected readonly labels = injectChatLabels();\n protected readonly resolvedTitle = computed(\n () => this.title() ?? this.labels.modalHeaderTitle,\n );\n\n protected readonly dialogId = `copilot-popup-${randomUUID()}`;\n protected readonly titleId = `${this.dialogId}-title`;\n protected readonly resolvedWidth = computed(() =>\n ɵdimensionToCss(this.width(), ɵPOPUP_DEFAULT_WIDTH),\n );\n protected readonly resolvedHeight = computed(() =>\n ɵdimensionToCss(this.height(), ɵPOPUP_DEFAULT_HEIGHT),\n );\n private readonly launcher =\n viewChild.required<ElementRef<HTMLButtonElement>>(\"launcher\");\n private readonly initialFocus =\n viewChild<ElementRef<HTMLButtonElement>>(\"initialFocus\");\n\n private readonly dialog = viewChild<ElementRef<HTMLElement>>(\"dialog\");\n\n constructor() {\n // Core's dialog focus and popup dismissal, as in React and Vue.\n bindModalDialog({\n dialog: this.dialog,\n initialFocus: this.initialFocus,\n launcher: this.launcher,\n clickOutsideToClose: this.clickOutsideToClose,\n close: () => this.close(),\n });\n }\n\n protected toggle(): void {\n if (this.open()) this.close();\n else this.open.set(true);\n }\n\n protected close(): void {\n if (!this.open()) return;\n this.open.set(false);\n queueMicrotask(() =>\n this.launcher().nativeElement.focus({ preventScroll: true }),\n );\n }\n}\n","import { DOCUMENT, NgComponentOutlet, NgTemplateOutlet } from \"@angular/common\";\nimport type { ElementRef, Type } from \"@angular/core\";\nimport {\n ChangeDetectionStrategy,\n Component,\n DestroyRef,\n PLATFORM_ID,\n afterNextRender,\n computed,\n inject,\n input,\n model,\n signal,\n viewChild,\n} from \"@angular/core\";\nimport { isPlatformBrowser } from \"@angular/common\";\nimport { randomUUID } from \"@copilotkit/shared\";\n\nimport { CopilotChat } from \"../chat/copilot-chat\";\nimport { COPILOT_CHAT_WELCOME_LAYOUT } from \"../chat/copilot-chat-welcome-layout\";\nimport { CopilotKitStyles } from \"../copilot-kit-styles\";\nimport { CopilotIcon, MessageCircle, X } from \"../icons/copilot-icon\";\nimport { injectChatLabels } from \"../../chat-config\";\nimport { explicitEffect } from \"../../explicit-effect\";\nimport { bindModalDialog } from \"./modal-dialog\";\nimport {\n ɵSIDEBAR_DEFAULT_WIDTH,\n ɵSIDEBAR_TRANSITION_MS,\n ɵcreateDockedSidebar,\n ɵdimensionToCss,\n ɵwatchMobileViewport,\n} from \"@copilotkit/core\";\nimport type { ɵDockedSidebar } from \"@copilotkit/core\";\n\nexport type CopilotSidebarMode = \"docked\" | \"overlay\";\nexport type CopilotSidebarPosition = \"left\" | \"right\";\n\n/** Responsive chat sidebar with independent overlay and single-owner docked modes. */\n@Component({\n selector: \"copilot-sidebar\",\n imports: [NgComponentOutlet, NgTemplateOutlet, CopilotIcon, CopilotKitStyles],\n changeDetection: ChangeDetectionStrategy.OnPush,\n viewProviders: [\n { provide: COPILOT_CHAT_WELCOME_LAYOUT, useValue: \"sidebar\" },\n ],\n host: { class: \"copilot-sidebar-host\", \"data-copilotkit\": \"\" },\n template: `\n <copilot-kit-styles />\n <button\n #launcher\n type=\"button\"\n class=\"copilotKitButton cpk-chat-toggle-button\"\n data-slot=\"chat-toggle-button\"\n data-copilot-sidebar-toggle\n [class.cpk-sidebar-view-toggle-button-left]=\"position() === 'left'\"\n [attr.data-state]=\"open() ? 'open' : 'closed'\"\n [attr.aria-controls]=\"sidebarId\"\n [attr.aria-expanded]=\"open()\"\n [attr.aria-label]=\"\n open() ? labels.chatToggleCloseLabel : labels.chatToggleOpenLabel\n \"\n [tabIndex]=\"open() ? -1 : 0\"\n (click)=\"toggle()\"\n >\n <span\n aria-hidden=\"true\"\n class=\"cpk-chat-toggle-button-icon-wrapper copilot-toggle-icon\"\n [class.copilot-toggle-icon-hidden]=\"open()\"\n >\n <copilot-icon\n [img]=\"MessageCircleIcon\"\n iconClass=\"cpk-chat-toggle-button-icon\"\n />\n </span>\n <span\n aria-hidden=\"true\"\n class=\"cpk-chat-toggle-button-icon-wrapper copilot-toggle-icon copilot-toggle-icon-close\"\n [class.copilot-toggle-icon-hidden]=\"!open()\"\n >\n <copilot-icon [img]=\"XIcon\" iconClass=\"cpk-chat-toggle-button-icon\" />\n </span>\n </button>\n\n @if (open() && isModal()) {\n <section\n #dialog\n tabindex=\"-1\"\n data-copilotkit\n class=\"copilotKitSidebar copilotKitWindow cpk-sidebar-view modal\"\n data-copilot-sidebar\n role=\"dialog\"\n [attr.id]=\"sidebarId\"\n [attr.data-position]=\"position()\"\n [attr.aria-labelledby]=\"headerComponent() ? null : titleId\"\n [attr.aria-label]=\"headerComponent() ? resolvedTitle() : null\"\n [style.--sidebar-width]=\"resolvedWidth()\"\n >\n <ng-container [ngTemplateOutlet]=\"sidebarContents\" />\n </section>\n } @else if (open() && dockAccepted()) {\n <aside\n data-copilotkit\n class=\"copilotKitSidebar copilotKitWindow cpk-sidebar-view docked\"\n data-copilot-sidebar\n role=\"complementary\"\n [attr.id]=\"sidebarId\"\n [attr.data-position]=\"position()\"\n [attr.aria-labelledby]=\"headerComponent() ? null : titleId\"\n [attr.aria-label]=\"headerComponent() ? resolvedTitle() : null\"\n [style.--sidebar-width]=\"resolvedWidth()\"\n >\n <ng-container [ngTemplateOutlet]=\"sidebarContents\" />\n </aside>\n }\n\n <ng-template #sidebarContents>\n <div class=\"cpk-sidebar-view-panel\">\n <header class=\"copilotKitHeader cpk-modal-header\">\n <div class=\"cpk-modal-header-content\">\n <div class=\"cpk-modal-header-start\">\n <span aria-hidden=\"true\"></span>\n </div>\n <div class=\"cpk-modal-header-center\">\n @if (headerComponent(); as header) {\n <ng-container [ngComponentOutlet]=\"header\" />\n } @else {\n <h2 class=\"cpk-modal-header-title\" [attr.id]=\"titleId\">\n {{ resolvedTitle() }}\n </h2>\n }\n </div>\n <div class=\"cpk-modal-header-end\">\n <button\n #initialFocus\n type=\"button\"\n class=\"cpk-modal-header-close-button\"\n [attr.aria-label]=\"labels.modalHeaderCloseButtonLabel\"\n (click)=\"close()\"\n >\n <copilot-icon\n [img]=\"XIcon\"\n iconClass=\"cpk-modal-header-close-icon\"\n />\n </button>\n </div>\n </div>\n </header>\n <div class=\"cpk-sidebar-view-chat\" data-sidebar-chat>\n <ng-container [ngComponentOutlet]=\"chatComponent()\" />\n </div>\n </div>\n </ng-template>\n `,\n // The look comes from the shared CSS (cpk-* classes). These rules add what\n // the Angular sidebar does beyond React's: an enter animation. As in React,\n // the open sidebar covers the toggle.\n styles: `\n :host {\n display: contents;\n }\n .copilot-toggle-icon {\n transition:\n opacity 200ms cubic-bezier(0, 0, 0.2, 1),\n transform 200ms cubic-bezier(0, 0, 0.2, 1);\n }\n .copilot-toggle-icon-hidden {\n opacity: 0;\n transform: scale(0.75) rotate(90deg);\n }\n .copilot-toggle-icon-close.copilot-toggle-icon-hidden {\n transform: scale(0.75) rotate(-90deg);\n }\n .cpk-sidebar-view {\n z-index: 1201;\n padding-top: env(safe-area-inset-top);\n padding-bottom: env(safe-area-inset-bottom);\n }\n @media (prefers-reduced-motion: no-preference) {\n .cpk-sidebar-view {\n animation: copilot-sidebar-enter 300ms cubic-bezier(0, 0, 0.2, 1);\n }\n .cpk-sidebar-view[data-position=\"left\"] {\n animation-name: copilot-sidebar-enter-left;\n }\n @keyframes copilot-sidebar-enter {\n from {\n translate: 100% 0;\n }\n }\n @keyframes copilot-sidebar-enter-left {\n from {\n translate: -100% 0;\n }\n }\n }\n `,\n})\nexport class CopilotSidebar {\n readonly open = model(true);\n readonly mode = input<CopilotSidebarMode>(\"docked\");\n readonly position = input<CopilotSidebarPosition>(\"right\");\n readonly width = input<number | string>(ɵSIDEBAR_DEFAULT_WIDTH);\n /** The header title. Default: `labels.modalHeaderTitle`. */\n readonly title = input<string | undefined>();\n readonly clickOutsideToClose = input(false);\n readonly chatComponent = input<Type<unknown>>(CopilotChat);\n readonly headerComponent = input<Type<unknown> | undefined>();\n\n protected readonly MessageCircleIcon = MessageCircle;\n protected readonly XIcon = X;\n protected readonly labels = injectChatLabels();\n protected readonly resolvedTitle = computed(\n () => this.title() ?? this.labels.modalHeaderTitle,\n );\n\n protected readonly sidebarId = `copilot-sidebar-${randomUUID()}`;\n protected readonly titleId = `${this.sidebarId}-title`;\n protected readonly resolvedWidth = computed(() =>\n ɵdimensionToCss(this.width(), ɵSIDEBAR_DEFAULT_WIDTH),\n );\n protected readonly isCompact = signal(false);\n protected readonly isModal = computed(\n () => this.mode() === \"overlay\" || this.isCompact(),\n );\n protected readonly dockAccepted = signal(true);\n\n private readonly document = inject(DOCUMENT);\n private readonly isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n private readonly destroyRef = inject(DestroyRef);\n private readonly launcher =\n viewChild.required<ElementRef<HTMLButtonElement>>(\"launcher\");\n private readonly initialFocus =\n viewChild<ElementRef<HTMLButtonElement>>(\"initialFocus\");\n private readonly dialog = viewChild<ElementRef<HTMLElement>>(\"dialog\");\n /** Core's page-margin owner for the docked mode, as in React and Vue. */\n private readonly dock: ɵDockedSidebar | undefined = this.isBrowser\n ? ɵcreateDockedSidebar(this.document, {\n transitionMs: ɵSIDEBAR_TRANSITION_MS,\n })\n : undefined;\n\n constructor() {\n afterNextRender(() => {\n const stop = ɵwatchMobileViewport((isMobile) =>\n this.isCompact.set(isMobile),\n );\n this.destroyRef.onDestroy(stop);\n });\n\n // `position` and `resolvedWidth` are dependencies even though they are only\n // consumed on the docked path: a width or side change while docked must\n // move the page margin.\n explicitEffect(\n () => ({\n open: this.open() && !this.isModal(),\n position: this.position(),\n width: this.resolvedWidth(),\n }),\n (state) => {\n if (!this.dock) return;\n this.dock.set(state);\n // Core warns when another docked sidebar has the margin.\n this.dockAccepted.set(!state.open || this.dock.isDocked);\n },\n );\n\n // In overlay mode (and on mobile): core's dialog focus and dismissal.\n bindModalDialog({\n dialog: this.dialog,\n initialFocus: this.initialFocus,\n launcher: this.launcher,\n clickOutsideToClose: this.clickOutsideToClose,\n close: () => this.close(),\n });\n\n this.destroyRef.onDestroy(() => this.dock?.dispose());\n }\n\n protected toggle(): void {\n if (this.open()) this.close();\n else this.open.set(true);\n }\n\n protected close(): void {\n if (!this.open()) return;\n this.open.set(false);\n queueMicrotask(() =>\n this.launcher().nativeElement.focus({ preventScroll: true }),\n );\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["ɵOPEN_GENERATIVE_UI_CONTENT_SCHEMA","ɵGENERATE_SANDBOXED_UI_ARGS_SCHEMA","ɵloadWebsandbox","ɵOpenGenerativeUIController","ɵPlaceholderCycler","ɵmountInspector","ɵChatConfigurationStore","ɵresolveProviderConfig","ɵpublicKeyHeaderDefaults","ɵwithHeaderDefaults","ɵRendererRegistry","ɵreportProviderConfigDiagnostics","ɵassembleActivityRenderers","ɵisOpenGenerativeUIActive","ɵcreateOpenGenerativeUITool","ɵaddOpenGenerativeUIContexts","ɵbuildHumanInTheLoopTool","ɵLearningAutoStarter","ɵbindSuggestionsConfig","ɵcomponentToolDescription","ɵcopilotIcons","ɵcopilotIconSvgAttributes","cn","ɵTOOL_CALL_STATUS_ICONS","ɵTOOL_CALL_STATUS_LABEL_KEYS","ɵstringifyToolCallPayload","nextId","ɵstringifyToolCallAttr","ɵgetArgumentPreview","ɵnormalizeToolCallStatus","ɵgetToolCallBadge","ɵparseToolCallArguments","ɵresolveToolCallRenderer","ɵresolveToolCallAgentId","ɵbuildToolCallRenderProps","ɵfindToolMessage","ɵInterruptController","ɵsnapshotAgentState","ɵagentUpdateHandlers","ɵgetAgentResolver","ɵresolveAgentId","ɵgetAgentCapabilities","ɵThreadsController","ɵcreateThreadStore","ɵSCROLL_BOTTOM_THRESHOLD_PX","ɵisScrolledToBottom","ɵserializeContextValue","ɵselectMemories","ɵselectMemoriesIsLoading","ɵselectMemoriesError","ɵselectMemoriesAvailable","ɵselectMemoriesRealtimeStatus","ɵcreateStickToBottom","DOCUMENT","ɵgetToolCallGroupState","ɵformatLabel","ɵformatCountLabel","ɵformatToolNames","ɵgetToolCallRendererNames","ɵtoolCallAppearance","getToolCallLayouts","renderKatex","ɵCopyFeedback","i1.CopilotTooltip","ɵinspectorShortcuts","ɵinspectorKiteIcon","ɵinspectorKiteFill","ɵHoverMenuController","ɵhasAssistantMessageText","ɵshouldShowAssistantToolbar","i1","ɵgetBranchNavState","ɵmorphViewTransition","ɵflattenUserMessageContent","ɵgetUserMessageMediaParts","ɵgetUserMessageMediaFilename","ɵReasoningDisclosure","ɵgetReasoningHeaderLabel","ɵfindActivityRenderer","ɵdescribeActivityRendererFailure","ɵgetWorkSummaryText","ɵdeduplicateMessages","ɵshouldShowMessageCursor","ɵcreateMessageViewModel","ɵgetChatViewState","ɵCOMPOSER_DEFAULT_MAX_ROWS","ɵmeasureTextarea","ɵfitTextareaHeight","ɵAudioRecorder","ɵcreateWaveformRenderer","ɵnormalizeToolsMenu","ɵcomposerButtonState","ɵsyncRecorderToMode","ɵcreateComposerAutosize","ɵresolveComposerKey","ɵwatchElementHeight","ɵnormalizeAutoScroll","i1.CopilotChatViewHandlers","i2","ɵAttachmentQueue","ɵbuildUserMessageContent","ɵChatConnection","ɵcreateChatSubmitter","ɵresolveChatNotice","ɵFreshThreadId","ɵInspectorThreadOverride","ɵsubscribeToAgentSuggestions","ɵresolveThreadsLicense","ɵresolveLicenseState","ɵtoDrawerThread","ɵgetThreadsDrawerElementProps","ɵcreateThreadsDrawerActions","ɵbindDialogFocus","ɵbindPopupDismiss","ɵPOPUP_DEFAULT_WIDTH","ɵPOPUP_DEFAULT_HEIGHT","ɵdimensionToCss","ɵSIDEBAR_DEFAULT_WIDTH","ɵcreateDockedSidebar","ɵSIDEBAR_TRANSITION_MS","ɵwatchMobileViewport"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;MA4Fa,kBAAkB,GAAG,IAAI,cAAc,CAClD,oBAAoB;SAGN,sBAAsB,GAAA;AAC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