@copilotkitnext/angular 0.0.8 → 0.0.9-alpha.0

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.
@@ -1 +1 @@
1
- {"version":3,"file":"copilotkitnext-angular.mjs","sources":["../../src/core/copilotkit.types.ts","../../src/core/copilotkit.service.ts","../../src/core/copilotkit.providers.ts","../../src/core/chat-configuration/chat-configuration.types.ts","../../src/core/chat-configuration/chat-configuration.service.ts","../../src/core/chat-configuration/chat-configuration.providers.ts","../../src/utils/copilotkit.utils.ts","../../src/utils/agent-context.utils.ts","../../src/utils/frontend-tool.utils.ts","../../src/utils/agent.utils.ts","../../src/utils/human-in-the-loop.utils.ts","../../src/utils/chat-config.utils.ts","../../src/lib/directives/tooltip.directive.ts","../../src/directives/copilotkit-config.directive.ts","../../src/directives/copilotkit-agent-context.directive.ts","../../src/directives/copilotkit-frontend-tool.directive.ts","../../src/directives/copilotkit-agent.directive.ts","../../src/directives/copilotkit-human-in-the-loop.directive.ts","../../src/directives/copilotkit-chat-config.directive.ts","../../src/components/copilotkit-tool-render.component.ts","../../src/components/chat/copilot-chat-input.types.ts","../../src/lib/slots/slot.types.ts","../../src/lib/slots/slot.utils.ts","../../src/lib/slots/copilot-slot.component.ts","../../src/lib/utils.ts","../../src/components/chat/copilot-chat-textarea.component.ts","../../src/components/chat/copilot-chat-audio-recorder.component.ts","../../src/components/chat/copilot-chat-buttons.component.ts","../../src/components/chat/copilot-chat-toolbar.component.ts","../../src/components/chat/copilot-chat-tools-menu.component.ts","../../src/components/chat/copilot-chat-input.component.ts","../../src/components/chat/copilot-chat-input-defaults.ts","../../src/components/chat/copilot-chat-user-message-renderer.component.ts","../../src/components/chat/copilot-chat-user-message-buttons.component.ts","../../src/components/chat/copilot-chat-user-message-toolbar.component.ts","../../src/components/chat/copilot-chat-user-message-branch-navigation.component.ts","../../src/components/chat/copilot-chat-user-message.component.ts","../../src/components/chat/copilot-chat-tool-calls-view.component.ts","../../src/components/chat/copilot-chat-assistant-message-renderer.component.ts","../../src/components/chat/copilot-chat-assistant-message-buttons.component.ts","../../src/components/chat/copilot-chat-assistant-message-toolbar.component.ts","../../src/components/chat/copilot-chat-view-handlers.service.ts","../../src/components/chat/copilot-chat-assistant-message.component.ts","../../src/components/chat/copilot-chat-message-view-cursor.component.ts","../../src/components/chat/copilot-chat-message-view.component.ts","../../src/components/chat/copilot-chat-view-scroll-to-bottom-button.component.ts","../../src/services/scroll-position.service.ts","../../src/services/resize-observer.service.ts","../../src/directives/stick-to-bottom.directive.ts","../../src/components/chat/copilot-chat-view-scroll-view.component.ts","../../src/components/chat/copilot-chat-view-feather.component.ts","../../src/components/chat/copilot-chat-view-disclaimer.component.ts","../../src/components/chat/copilot-chat-view-input-container.component.ts","../../src/components/chat/copilot-chat-view.component.ts","../../src/components/chat/copilot-chat.component.ts","../../src/index.ts","../../src/copilotkitnext-angular.ts"],"sourcesContent":["import { InjectionToken, TemplateRef, Type, Signal } from \"@angular/core\";\nimport { Observable } from \"rxjs\";\nimport { CopilotKitCore, ToolCallStatus } from \"@copilotkitnext/core\";\nimport { AbstractAgent } from \"@ag-ui/client\";\nimport type { AngularFrontendTool } from \"../types/frontend-tool\";\nimport type { AngularHumanInTheLoop } from \"../types/human-in-the-loop\";\n\n// Re-export commonly used types\nexport type { Context } from \"@ag-ui/client\";\n\n// Re-export tool types from their own files\nexport type { AngularFrontendTool } from \"../types/frontend-tool\";\nexport type {\n AngularHumanInTheLoop,\n HumanInTheLoopProps,\n} from \"../types/human-in-the-loop\";\n\n// Re-export ToolCallStatus from core\nexport { ToolCallStatus } from \"@copilotkitnext/core\";\n\n// Props passed to tool render components - discriminated union matching React\nexport type ToolCallProps<T = unknown> =\n | {\n name: string;\n description: string;\n args: Partial<T>;\n status: ToolCallStatus.InProgress;\n result: undefined;\n }\n | {\n name: string;\n description: string;\n args: T;\n status: ToolCallStatus.Executing;\n result: undefined;\n }\n | {\n name: string;\n description: string;\n args: T;\n status: ToolCallStatus.Complete;\n result: string;\n };\n1;\n\n// Angular-specific tool call render definition with proper typing\nexport interface AngularToolCallRender {\n name: string;\n /**\n * Optional agent ID to constrain this tool render to a specific agent.\n * If specified, this render will only be used for the specified agent.\n */\n agentId?: string;\n render: Type<any> | TemplateRef<ToolCallProps<any>>;\n}\n\n// Type alias for convenience\nexport type ToolCallRender = AngularToolCallRender;\n\nexport interface CopilotKitContextValue {\n copilotkit: CopilotKitCore;\n renderToolCalls: ToolCallRender[];\n currentRenderToolCalls: ToolCallRender[];\n setCurrentRenderToolCalls: (v: ToolCallRender[]) => void;\n}\n\nexport interface CopilotKitRuntimeInputs {\n runtimeUrl?: string;\n headers?: Record<string, string>;\n properties?: Record<string, unknown>;\n agents?: Record<string, AbstractAgent>;\n renderToolCalls?: ToolCallRender[];\n}\n\n// Injection tokens for dependency injection\nexport const COPILOTKIT_RUNTIME_URL = new InjectionToken<string | undefined>(\n \"COPILOTKIT_RUNTIME_URL\"\n);\n\nexport const COPILOTKIT_HEADERS = new InjectionToken<Record<string, string>>(\n \"COPILOTKIT_HEADERS\",\n { factory: () => ({}) }\n);\n\nexport const COPILOTKIT_PROPERTIES = new InjectionToken<\n Record<string, unknown>\n>(\"COPILOTKIT_PROPERTIES\", { factory: () => ({}) });\n\nexport const COPILOTKIT_AGENTS = new InjectionToken<\n Record<string, AbstractAgent>\n>(\"COPILOTKIT_AGENTS\", { factory: () => ({}) });\n\nexport const COPILOTKIT_RENDER_TOOL_CALLS = new InjectionToken<\n ToolCallRender[]\n>(\"COPILOTKIT_RENDER_TOOL_CALLS\", { factory: () => [] });\n\nexport const COPILOTKIT_FRONTEND_TOOLS = new InjectionToken<\n AngularFrontendTool<any>[]\n>(\"COPILOTKIT_FRONTEND_TOOLS\", { factory: () => [] });\n\nexport const COPILOTKIT_HUMAN_IN_THE_LOOP = new InjectionToken<\n AngularHumanInTheLoop<any>[]\n>(\"COPILOTKIT_HUMAN_IN_THE_LOOP\", { factory: () => [] });\n\n// Agent-related types\nimport type { Message } from \"@ag-ui/client\";\n\nexport interface AgentWatchResult {\n agent: Signal<AbstractAgent | undefined>;\n messages: Signal<Message[]>;\n isRunning: Signal<boolean>;\n agent$: Observable<AbstractAgent | undefined>;\n messages$: Observable<Message[]>;\n isRunning$: Observable<boolean>;\n unsubscribe: () => void;\n}\n\nexport interface AgentSubscriptionCallbacks {\n onMessagesChanged?: (params: any) => void;\n onStateChanged?: (params: any) => void;\n onRunInitialized?: (params: any) => void;\n onRunFinalized?: (params: any) => void;\n onRunFailed?: (params: any) => void;\n}\n\n// Human-in-the-loop state result\nexport interface HumanInTheLoopState {\n status: Signal<ToolCallStatus>;\n toolId: string;\n destroy: () => void;\n}\n","import {\n Injectable,\n Inject,\n signal,\n computed,\n effect,\n untracked,\n} from \"@angular/core\";\nimport { toObservable } from \"@angular/core/rxjs-interop\";\nimport {\n COPILOTKIT_RUNTIME_URL,\n COPILOTKIT_HEADERS,\n COPILOTKIT_PROPERTIES,\n COPILOTKIT_AGENTS,\n COPILOTKIT_RENDER_TOOL_CALLS,\n COPILOTKIT_FRONTEND_TOOLS,\n COPILOTKIT_HUMAN_IN_THE_LOOP,\n CopilotKitContextValue,\n ToolCallRender,\n AngularFrontendTool,\n AngularHumanInTheLoop,\n} from \"./copilotkit.types\";\nimport {\n CopilotKitCore,\n CopilotKitCoreConfig,\n FrontendTool,\n} from \"@copilotkitnext/core\";\nimport { AbstractAgent } from \"@ag-ui/client\";\n\n/**\n * Angular service for managing CopilotKit state and interactions.\n * Provides reactive state management using Angular signals and observables.\n */\n@Injectable({ providedIn: \"root\" })\nexport class CopilotKitService {\n // Initial values for stability tracking\n private readonly initialFrontendTools: AngularFrontendTool<any>[];\n private readonly initialHumanInTheLoop: AngularHumanInTheLoop<any>[];\n private readonly initialRenderToolCalls: ToolCallRender[];\n\n // Core instance - created once\n readonly copilotkit: CopilotKitCore;\n\n // State signals\n private readonly _renderToolCalls: ReturnType<\n typeof signal<ToolCallRender[]>\n >;\n private readonly _currentRenderToolCalls: ReturnType<\n typeof signal<ToolCallRender[]>\n >;\n private readonly _runtimeUrl: ReturnType<typeof signal<string | undefined>>;\n private readonly _headers: ReturnType<typeof signal<Record<string, string>>>;\n private readonly _properties: ReturnType<\n typeof signal<Record<string, unknown>>\n >;\n private readonly _agents: ReturnType<\n typeof signal<Record<string, AbstractAgent>>\n >;\n private readonly _frontendTools: ReturnType<\n typeof signal<AngularFrontendTool<any>[]>\n >;\n private readonly _humanInTheLoop: ReturnType<\n typeof signal<AngularHumanInTheLoop<any>[]>\n >;\n\n // Runtime state change notification signal\n private readonly _runtimeStateVersion: ReturnType<typeof signal<number>>;\n\n // Computed signals for processed values\n private readonly _allTools: ReturnType<\n typeof computed<Record<string, FrontendTool<any>>>\n >;\n private readonly _allRenderToolCalls: ReturnType<\n typeof computed<ToolCallRender[]>\n >;\n\n // Public readonly signals - will be initialized in constructor\n readonly renderToolCalls: any;\n readonly currentRenderToolCalls: any;\n readonly runtimeUrl: any;\n readonly headers: any;\n readonly properties: any;\n readonly agents: any;\n readonly frontendTools: any;\n readonly humanInTheLoop: any;\n readonly runtimeStateVersion: any;\n\n // Observable APIs for RxJS users - will be initialized in constructor\n readonly renderToolCalls$: any;\n readonly currentRenderToolCalls$: any;\n readonly runtimeUrl$: any;\n readonly headers$: any;\n readonly properties$: any;\n readonly agents$: any;\n readonly frontendTools$: any;\n readonly humanInTheLoop$: any;\n\n // Context value as computed signal - will be initialized in constructor\n readonly context: any;\n readonly context$: any;\n\n constructor(\n @Inject(COPILOTKIT_RUNTIME_URL) runtimeUrl: string | undefined,\n @Inject(COPILOTKIT_HEADERS) headers: Record<string, string>,\n @Inject(COPILOTKIT_PROPERTIES) properties: Record<string, unknown>,\n @Inject(COPILOTKIT_AGENTS) agents: Record<string, AbstractAgent>,\n @Inject(COPILOTKIT_RENDER_TOOL_CALLS)\n renderToolCalls: ToolCallRender[],\n @Inject(COPILOTKIT_FRONTEND_TOOLS)\n frontendTools: AngularFrontendTool<any>[],\n @Inject(COPILOTKIT_HUMAN_IN_THE_LOOP)\n humanInTheLoop: AngularHumanInTheLoop<any>[]\n ) {\n // Store initial values for stability checking\n this.initialFrontendTools = frontendTools;\n this.initialHumanInTheLoop = humanInTheLoop;\n this.initialRenderToolCalls = renderToolCalls;\n\n // Process tools and humanInTheLoop\n const { allTools, allRenderToolCalls } = this.processTools(\n frontendTools,\n humanInTheLoop,\n renderToolCalls\n );\n\n // Initialize core instance with processed tools\n this.copilotkit = new CopilotKitCore({\n runtimeUrl: undefined, // Prevent server-side fetching\n headers,\n properties,\n agents,\n tools: allTools,\n } as CopilotKitCoreConfig);\n\n // Initialize state signals\n this._renderToolCalls =\n signal<ToolCallRender[]>(allRenderToolCalls);\n this._currentRenderToolCalls =\n signal<ToolCallRender[]>(allRenderToolCalls);\n this._runtimeUrl = signal<string | undefined>(runtimeUrl);\n this._headers = signal<Record<string, string>>(headers);\n this._properties = signal<Record<string, unknown>>(properties);\n this._agents = signal<Record<string, AbstractAgent>>(agents);\n this._frontendTools = signal<AngularFrontendTool<any>[]>(frontendTools);\n this._humanInTheLoop = signal<AngularHumanInTheLoop<any>[]>(humanInTheLoop);\n this._runtimeStateVersion = signal<number>(0);\n\n // Initialize computed signals for processed values\n this._allTools = computed(() => {\n const tools: Record<string, FrontendTool<any>> = {};\n\n // Add frontend tools\n this._frontendTools().forEach((tool) => {\n tools[tool.name] = tool as FrontendTool<any>;\n });\n\n // Process human-in-the-loop tools\n this._humanInTheLoop().forEach((tool) => {\n const frontendTool: FrontendTool<any> = {\n name: tool.name,\n description: tool.description,\n parameters: tool.parameters,\n followUp: tool.followUp,\n handler: async (args: any) => {\n console.warn(\n `Human-in-the-loop tool '${tool.name}' called but no interactive handler is set up.`\n );\n return undefined;\n },\n };\n tools[tool.name] = frontendTool;\n });\n\n return tools;\n });\n\n this._allRenderToolCalls = computed(() => {\n const combined: ToolCallRender[] = [...this._renderToolCalls()];\n\n // Add render components from frontend tools\n this._frontendTools().forEach((tool) => {\n if (tool.render) {\n combined.push({\n name: tool.name,\n render: tool.render,\n ...(tool.agentId && { agentId: tool.agentId }),\n });\n }\n });\n\n // Add render components from human-in-the-loop tools\n this._humanInTheLoop().forEach((tool) => {\n if (tool.render) {\n combined.push({\n name: tool.name,\n render: tool.render,\n ...(tool.agentId && { agentId: tool.agentId }),\n });\n }\n });\n\n return combined;\n });\n\n // Initialize public readonly signals\n this.renderToolCalls = this._allRenderToolCalls;\n this.currentRenderToolCalls = this._currentRenderToolCalls.asReadonly();\n this.runtimeUrl = this._runtimeUrl.asReadonly();\n this.headers = this._headers.asReadonly();\n this.properties = this._properties.asReadonly();\n this.agents = this._agents.asReadonly();\n this.frontendTools = this._frontendTools.asReadonly();\n this.humanInTheLoop = this._humanInTheLoop.asReadonly();\n this.runtimeStateVersion = this._runtimeStateVersion.asReadonly();\n\n // Initialize Observable APIs\n this.renderToolCalls$ = toObservable(this.renderToolCalls);\n this.currentRenderToolCalls$ = toObservable(this.currentRenderToolCalls);\n this.runtimeUrl$ = toObservable(this.runtimeUrl);\n this.headers$ = toObservable(this.headers);\n this.properties$ = toObservable(this.properties);\n this.agents$ = toObservable(this.agents);\n this.frontendTools$ = toObservable(this.frontendTools);\n this.humanInTheLoop$ = toObservable(this.humanInTheLoop);\n\n // Initialize context value as computed signal\n this.context = computed<CopilotKitContextValue>(() => {\n // Touch the runtime state version to ensure this computed updates\n // when runtime events occur (loaded/error)\n this.runtimeStateVersion();\n\n return {\n copilotkit: this.copilotkit,\n renderToolCalls: this.renderToolCalls(),\n currentRenderToolCalls: this.currentRenderToolCalls(),\n setCurrentRenderToolCalls: (v) => this.setCurrentRenderToolCalls(v),\n };\n });\n\n this.context$ = toObservable(this.context);\n\n // Effects must be created in injection context (constructor)\n this.setupRuntimeSyncEffects();\n this.setupStabilityWarnings();\n this.setupEventSubscription();\n }\n\n /**\n * Process frontend tools and human-in-the-loop tools\n */\n private processTools(\n frontendTools: AngularFrontendTool<any>[],\n humanInTheLoop: AngularHumanInTheLoop<any>[],\n renderToolCalls: ToolCallRender[]\n ): {\n allTools: Record<string, FrontendTool<any>>;\n allRenderToolCalls: ToolCallRender[];\n } {\n const allTools: Record<string, FrontendTool<any>> = {};\n const allRenderToolCalls: ToolCallRender[] = [...renderToolCalls];\n\n // Add frontend tools\n frontendTools.forEach((tool) => {\n allTools[tool.name] = tool as FrontendTool<any>;\n\n // Add render component if provided\n if (tool.render) {\n allRenderToolCalls.push({\n name: tool.name,\n render: tool.render,\n ...(tool.agentId && { agentId: tool.agentId }),\n });\n }\n });\n\n // Process human-in-the-loop tools\n humanInTheLoop.forEach((tool) => {\n // Create a frontend tool with placeholder handler\n const frontendTool: FrontendTool<any> = {\n name: tool.name,\n description: tool.description,\n parameters: tool.parameters,\n followUp: tool.followUp,\n ...(tool.agentId && { agentId: tool.agentId }),\n handler: async (args: any) => {\n // Placeholder handler - actual implementation will be handled by the render component\n console.warn(\n `Human-in-the-loop tool '${tool.name}' called but no interactive handler is set up.`\n );\n return undefined;\n },\n };\n allTools[tool.name] = frontendTool;\n\n // Add the render component\n if (tool.render) {\n allRenderToolCalls.push({\n name: tool.name,\n render: tool.render,\n ...(tool.agentId && { agentId: tool.agentId }),\n });\n }\n });\n\n return { allTools, allRenderToolCalls };\n }\n\n /**\n * Setup stability warning effects\n */\n private setupStabilityWarnings(): void {\n // Warn if frontendTools changes\n effect(() => {\n const current = this._frontendTools();\n if (\n current !== this.initialFrontendTools &&\n this.initialFrontendTools.length > 0\n ) {\n untracked(() => {\n console.error(\n \"frontendTools must be a stable array. To add/remove tools dynamically, use dynamic tool registration.\"\n );\n });\n }\n });\n\n // Warn if humanInTheLoop changes\n effect(() => {\n const current = this._humanInTheLoop();\n if (\n current !== this.initialHumanInTheLoop &&\n this.initialHumanInTheLoop.length > 0\n ) {\n untracked(() => {\n console.error(\n \"humanInTheLoop must be a stable array. To add/remove human-in-the-loop tools dynamically, use dynamic tool registration.\"\n );\n });\n }\n });\n\n // Previously warned if renderToolCalls reference changed; removed per UX feedback\n }\n\n /**\n * Setup effects to sync runtime configuration with CopilotKitCore\n */\n private setupRuntimeSyncEffects(): void {\n // Sync runtime URL\n effect(() => {\n const url = this.runtimeUrl();\n untracked(() => this.copilotkit.setRuntimeUrl(url));\n });\n\n // Sync headers\n effect(() => {\n const headers = this.headers();\n untracked(() => this.copilotkit.setHeaders(headers));\n });\n\n // Sync properties\n effect(() => {\n const properties = this.properties();\n untracked(() => this.copilotkit.setProperties(properties));\n });\n\n // Sync agents\n effect(() => {\n const agents = this.agents();\n untracked(() => this.copilotkit.setAgents(agents));\n });\n\n // Sync tools - computed from frontend tools and human-in-the-loop\n effect(() => {\n const tools = this._allTools();\n // Update copilotkit.tools directly since there's no setTools method\n untracked(() => {\n this.copilotkit.tools = tools;\n });\n });\n }\n\n /**\n * Subscribe to CopilotKit runtime events\n */\n private setupEventSubscription(): void {\n const unsubscribe = this.copilotkit.subscribe({\n onRuntimeLoaded: () => {\n // Increment version to notify all consumers that runtime state has changed\n // This triggers re-evaluation of computed signals that depend on runtime state\n this.notifyRuntimeStateChange();\n },\n onRuntimeLoadError: () => {\n // Increment version to notify all consumers that runtime state has changed\n // This triggers re-evaluation of computed signals that depend on runtime state\n this.notifyRuntimeStateChange();\n },\n });\n\n // Root service lives for app lifetime; unsubscribe not needed.\n }\n\n /**\n * Notify consumers that the runtime state has changed.\n * This is similar to React's forceUpdate - it triggers change detection\n * for any computed signals or effects that depend on runtime state.\n */\n private notifyRuntimeStateChange(): void {\n this._runtimeStateVersion.update((version) => version + 1);\n }\n\n // Public mutation methods\n\n /**\n * Update the runtime URL\n */\n setRuntimeUrl(url?: string): void {\n this._runtimeUrl.set(url);\n }\n\n /**\n * Update request headers\n */\n setHeaders(headers: Record<string, string>): void {\n this._headers.set(headers);\n }\n\n /**\n * Update runtime properties\n */\n setProperties(properties: Record<string, unknown>): void {\n this._properties.set(properties);\n }\n\n /**\n * Update agents configuration\n */\n setAgents(agents: Record<string, AbstractAgent>): void {\n this._agents.set(agents);\n }\n\n /**\n * Get an agent by ID\n * @param agentId - The agent ID to retrieve\n * @returns The agent or undefined if not found\n */\n getAgent(agentId: string): AbstractAgent | undefined {\n return this.copilotkit.getAgent(agentId);\n }\n\n /**\n * Update render tool calls (warns if object reference changes)\n */\n setRenderToolCalls(renderToolCalls: ToolCallRender[]): void {\n this._renderToolCalls.set(renderToolCalls);\n }\n\n /**\n * Update frontend tools array\n */\n setFrontendTools(frontendTools: AngularFrontendTool<any>[]): void {\n if (frontendTools !== this.initialFrontendTools) {\n console.error(\n \"frontendTools must be a stable array. To add/remove tools dynamically, use dynamic tool registration.\"\n );\n }\n this._frontendTools.set(frontendTools);\n }\n\n /**\n * Update human-in-the-loop array\n */\n setHumanInTheLoop(humanInTheLoop: AngularHumanInTheLoop<any>[]): void {\n if (humanInTheLoop !== this.initialHumanInTheLoop) {\n console.error(\n \"humanInTheLoop must be a stable array. To add/remove human-in-the-loop tools dynamically, use dynamic tool registration.\"\n );\n }\n this._humanInTheLoop.set(humanInTheLoop);\n }\n\n /**\n * Update current render tool calls\n */\n setCurrentRenderToolCalls(renderToolCalls: ToolCallRender[]): void {\n this._currentRenderToolCalls.set(renderToolCalls);\n }\n\n /**\n * Register a tool render\n */\n registerToolRender(name: string, render: ToolCallRender): void {\n const current = this._currentRenderToolCalls();\n if (current.find((r) => r.name === name)) {\n console.warn(`Tool render for '${name}' is being overwritten`);\n }\n this._currentRenderToolCalls.set([\n ...current.filter((r) => r.name !== name),\n render,\n ]);\n }\n\n /**\n * Unregister a tool render\n */\n unregisterToolRender(name: string): void {\n const current = this._currentRenderToolCalls();\n const filtered = current.filter((r) => r.name !== name);\n if (filtered.length !== current.length) {\n this._currentRenderToolCalls.set(filtered);\n }\n }\n\n /**\n * Get a specific tool render\n */\n getToolRender(name: string): ToolCallRender | undefined {\n return this._currentRenderToolCalls().find((r) => r.name === name);\n }\n}\n","import { Provider } from \"@angular/core\";\nimport {\n COPILOTKIT_RUNTIME_URL,\n COPILOTKIT_HEADERS,\n COPILOTKIT_PROPERTIES,\n COPILOTKIT_AGENTS,\n COPILOTKIT_RENDER_TOOL_CALLS,\n COPILOTKIT_FRONTEND_TOOLS,\n COPILOTKIT_HUMAN_IN_THE_LOOP,\n ToolCallRender,\n AngularFrontendTool,\n AngularHumanInTheLoop,\n} from \"./copilotkit.types\";\nimport { AbstractAgent } from \"@ag-ui/client\";\n\nexport interface ProvideCopilotKitOptions {\n runtimeUrl?: string;\n headers?: Record<string, string>;\n properties?: Record<string, unknown>;\n agents?: Record<string, AbstractAgent>;\n renderToolCalls?: ToolCallRender[];\n frontendTools?: AngularFrontendTool<any>[];\n humanInTheLoop?: AngularHumanInTheLoop<any>[];\n}\n\nexport function provideCopilotKit(\n options: ProvideCopilotKitOptions = {}\n): Provider[] {\n return [\n {\n provide: COPILOTKIT_RUNTIME_URL,\n useValue: options.runtimeUrl,\n },\n {\n provide: COPILOTKIT_HEADERS,\n useValue: options.headers ?? {},\n },\n {\n provide: COPILOTKIT_PROPERTIES,\n useValue: options.properties ?? {},\n },\n {\n provide: COPILOTKIT_AGENTS,\n useValue: options.agents ?? {},\n },\n {\n provide: COPILOTKIT_RENDER_TOOL_CALLS,\n useValue: options.renderToolCalls ?? [],\n },\n {\n provide: COPILOTKIT_FRONTEND_TOOLS,\n useValue: options.frontendTools ?? [],\n },\n {\n provide: COPILOTKIT_HUMAN_IN_THE_LOOP,\n useValue: options.humanInTheLoop ?? [],\n },\n ];\n}\n","import { InjectionToken } 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}\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};\n\n// Configuration interface\nexport interface CopilotChatConfiguration {\n labels?: Partial<CopilotChatLabels>;\n inputValue?: string;\n onSubmitInput?: (value: string) => void;\n onChangeInput?: (value: string) => void;\n}\n\n// Injection token for initial configuration\nexport const COPILOT_CHAT_INITIAL_CONFIG =\n new InjectionToken<CopilotChatConfiguration>(\"COPILOT_CHAT_INITIAL_CONFIG\", {\n providedIn: \"root\",\n factory: () => ({}),\n });\n","import { Injectable, Inject, Optional, signal } from '@angular/core';\nimport { \n CopilotChatConfiguration, \n CopilotChatLabels,\n COPILOT_CHAT_DEFAULT_LABELS,\n COPILOT_CHAT_INITIAL_CONFIG\n} from './chat-configuration.types';\n\n/**\n * Service for managing CopilotKit chat configuration.\n * Can be provided at different component levels for scoped configuration.\n * \n * @example\n * ```typescript\n * // Global configuration\n * providers: [provideCopilotChatConfiguration({ labels: { ... } })]\n * \n * // Component-scoped configuration\n * @Component({\n * providers: [provideCopilotChatConfiguration()],\n * ...\n * })\n * ```\n */\n@Injectable()\nexport class CopilotChatConfigurationService {\n // State signals\n private readonly _labels: ReturnType<typeof signal<CopilotChatLabels>>;\n private readonly _inputValue: ReturnType<typeof signal<string | undefined>>;\n private readonly _onSubmitInput: ReturnType<typeof signal<((value: string) => void) | undefined>>;\n private readonly _onChangeInput: ReturnType<typeof signal<((value: string) => void) | undefined>>;\n \n // Public readonly signals\n readonly labels: ReturnType<typeof signal<CopilotChatLabels>>['asReadonly'] extends () => infer R ? R : never;\n readonly inputValue: ReturnType<typeof signal<string | undefined>>['asReadonly'] extends () => infer R ? R : never;\n \n constructor(\n @Optional() @Inject(COPILOT_CHAT_INITIAL_CONFIG) private readonly initialConfig: CopilotChatConfiguration | null\n ) {\n // Initialize state signals\n this._labels = signal<CopilotChatLabels>(\n this.mergeLabels(this.initialConfig?.labels)\n );\n this._inputValue = signal<string | undefined>(\n this.initialConfig?.inputValue\n );\n this._onSubmitInput = signal<((value: string) => void) | undefined>(\n this.initialConfig?.onSubmitInput\n );\n this._onChangeInput = signal<((value: string) => void) | undefined>(\n this.initialConfig?.onChangeInput\n );\n \n // Initialize public readonly signals\n this.labels = this._labels.asReadonly();\n this.inputValue = this._inputValue.asReadonly();\n }\n \n /**\n * Update chat labels (partial update, merged with defaults)\n */\n setLabels(labels: Partial<CopilotChatLabels>): void {\n this._labels.set(this.mergeLabels(labels));\n }\n \n /**\n * Update the current input value\n */\n setInputValue(value: string | undefined): void {\n this._inputValue.set(value);\n // Also trigger change handler if set\n if (value !== undefined) {\n this.changeInput(value);\n }\n }\n \n /**\n * Set the submit input handler\n */\n setSubmitHandler(handler: ((value: string) => void) | undefined): void {\n this._onSubmitInput.set(handler);\n }\n \n /**\n * Set the change input handler\n */\n setChangeHandler(handler: ((value: string) => void) | undefined): void {\n this._onChangeInput.set(handler);\n }\n \n /**\n * Submit the current input value\n */\n submitInput(value: string): void {\n const handler = this._onSubmitInput();\n if (handler) {\n handler(value);\n }\n }\n \n /**\n * Handle input value change\n */\n changeInput(value: string): void {\n const handler = this._onChangeInput();\n if (handler) {\n handler(value);\n }\n }\n \n /**\n * Update the entire configuration at once\n */\n updateConfiguration(config: CopilotChatConfiguration): void {\n if (config.labels) {\n this.setLabels(config.labels);\n }\n if (config.inputValue !== undefined) {\n this._inputValue.set(config.inputValue);\n }\n if (config.onSubmitInput) {\n this.setSubmitHandler(config.onSubmitInput);\n }\n if (config.onChangeInput) {\n this.setChangeHandler(config.onChangeInput);\n }\n }\n \n /**\n * Reset configuration to defaults\n */\n reset(): void {\n this._labels.set(COPILOT_CHAT_DEFAULT_LABELS);\n this._inputValue.set(undefined);\n this._onSubmitInput.set(undefined);\n this._onChangeInput.set(undefined);\n }\n \n /**\n * Get the current submit handler\n */\n getSubmitHandler(): ((value: string) => void) | undefined {\n return this._onSubmitInput();\n }\n \n /**\n * Get the current change handler\n */\n getChangeHandler(): ((value: string) => void) | undefined {\n return this._onChangeInput();\n }\n \n /**\n * Merge partial labels with defaults\n */\n private mergeLabels(partial?: Partial<CopilotChatLabels>): CopilotChatLabels {\n return {\n ...COPILOT_CHAT_DEFAULT_LABELS,\n ...partial\n };\n }\n}\n","import { Provider } from '@angular/core';\nimport { CopilotChatConfigurationService } from './chat-configuration.service';\nimport { \n CopilotChatConfiguration,\n COPILOT_CHAT_INITIAL_CONFIG \n} from './chat-configuration.types';\n\n/**\n * Provides CopilotKit chat configuration at a specific component level.\n * This allows for scoped configuration where different parts of the app\n * can have different chat configurations.\n * \n * @param config - Optional initial configuration\n * @returns Array of providers\n * \n * @example\n * ```typescript\n * // Global configuration in app.config.ts\n * export const appConfig: ApplicationConfig = {\n * providers: [\n * provideCopilotChatConfiguration({\n * labels: {\n * chatInputPlaceholder: \"How can I help you today?\"\n * }\n * })\n * ]\n * };\n * \n * // Component-scoped configuration\n * @Component({\n * selector: 'customer-support-chat',\n * providers: [\n * provideCopilotChatConfiguration({\n * labels: {\n * chatInputPlaceholder: \"Describe your issue...\"\n * },\n * onSubmitInput: (value) => console.log('Support message:', value)\n * })\n * ],\n * template: `...`\n * })\n * export class CustomerSupportChatComponent {}\n * \n * // Multiple independent chats\n * @Component({\n * selector: 'sales-chat',\n * providers: [\n * provideCopilotChatConfiguration({\n * labels: {\n * chatInputPlaceholder: \"Ask about our products...\"\n * }\n * })\n * ],\n * template: `...`\n * })\n * export class SalesChatComponent {}\n * ```\n */\nexport function provideCopilotChatConfiguration(\n config?: CopilotChatConfiguration\n): Provider[] {\n return [\n // Provide the service\n CopilotChatConfigurationService,\n // Provide the initial configuration\n {\n provide: COPILOT_CHAT_INITIAL_CONFIG,\n useValue: config || {}\n }\n ];\n}","import { inject } from \"@angular/core\";\nimport { CopilotKitService } from \"../core/copilotkit.service\";\n\n/**\n * Utility function to inject the CopilotKit service in a component or directive.\n * \n * @example\n * ```typescript\n * export class MyComponent {\n * private copilotkit = injectCopilotKit();\n * \n * sendMessage() {\n * this.copilotkit.copilotkit.sendMessage(...);\n * }\n * }\n * ```\n */\nexport function injectCopilotKit() {\n return inject(CopilotKitService);\n}","import { DestroyRef, inject } from '@angular/core';\nimport { CopilotKitService } from '../core/copilotkit.service';\nimport { Context } from '@ag-ui/client';\n\n/**\n * Programmatically adds an agent context to CopilotKit and returns a cleanup function.\n * \n * @param context - The context to add\n * @returns A cleanup function that removes the context\n * \n * @example\n * ```typescript\n * export class MyComponent implements OnInit {\n * private copilotkit = injectCopilotKit();\n * \n * ngOnInit() {\n * const cleanup = addAgentContext(this.copilotkit, {\n * description: 'User preferences',\n * value: this.userSettings\n * });\n * \n * // Store cleanup for later or register with DestroyRef\n * this.cleanupFns.push(cleanup);\n * }\n * }\n * ```\n */\nexport function addAgentContext(\n copilotkit: CopilotKitService,\n context: Context\n): () => void {\n const contextId = copilotkit.copilotkit.addContext(context);\n \n return () => {\n copilotkit.copilotkit.removeContext(contextId);\n };\n}\n\n/**\n * Registers an agent context with CopilotKit and automatically removes it when the component/service is destroyed.\n * Must be called within an injection context.\n * \n * @param context - The context to add\n * @returns The context ID\n * \n * @example\n * ```typescript\n * export class MyComponent implements OnInit {\n * ngOnInit() {\n * // Automatically cleaned up on component destroy\n * registerAgentContext({\n * description: 'Component state',\n * value: this.state\n * });\n * }\n * }\n * ```\n */\nexport function registerAgentContext(context: Context): string {\n const copilotkit = inject(CopilotKitService);\n const destroyRef = inject(DestroyRef);\n \n const contextId = copilotkit.copilotkit.addContext(context);\n \n // Register cleanup with Angular's DestroyRef\n destroyRef.onDestroy(() => {\n copilotkit.copilotkit.removeContext(contextId);\n });\n \n return contextId;\n}\n\n/**\n * Creates a reactive context that updates whenever the value changes.\n * Uses Angular signals for reactivity.\n * \n * @param description - Static or signal-based description\n * @param value - Signal that provides the context value\n * @returns Object with update and destroy methods\n * \n * @example\n * ```typescript\n * export class MyComponent {\n * private userSettings = signal({ theme: 'dark' });\n * \n * ngOnInit() {\n * const context = createReactiveContext(\n * 'User settings',\n * computed(() => this.userSettings())\n * );\n * \n * // Updates automatically when userSettings signal changes\n * }\n * }\n * ```\n */\nexport function createReactiveContext(\n description: string | (() => string),\n value: () => any\n): { update: () => void; destroy: () => void } {\n const copilotkit = inject(CopilotKitService);\n let currentContextId: string | undefined;\n \n const update = () => {\n // Remove old context if it exists\n if (currentContextId) {\n copilotkit.copilotkit.removeContext(currentContextId);\n }\n \n // Add new context\n const desc = typeof description === 'function' ? description() : description;\n currentContextId = copilotkit.copilotkit.addContext({\n description: desc,\n value: value()\n });\n };\n \n const destroy = () => {\n if (currentContextId) {\n copilotkit.copilotkit.removeContext(currentContextId);\n currentContextId = undefined;\n }\n };\n \n // Initial setup\n update();\n \n // Register cleanup\n const destroyRef = inject(DestroyRef);\n destroyRef.onDestroy(destroy);\n \n return { update, destroy };\n}","import { DestroyRef, inject } from '@angular/core';\nimport { CopilotKitService } from '../core/copilotkit.service';\nimport { AngularFrontendTool, AngularToolCallRender, ToolCallRender } from '../core/copilotkit.types';\nimport type { z } from 'zod';\n\n/**\n * Explicitly adds a frontend tool to CopilotKit.\n * Requires CopilotKitService to be passed as a parameter.\n * \n * @param service - The CopilotKitService instance\n * @param tool - The tool to add\n * @returns A cleanup function that removes the tool\n * \n * @example\n * ```typescript\n * export class MyComponent implements OnInit, OnDestroy {\n * private cleanupFns: Array<() => void> = [];\n * \n * constructor(private copilotkit: CopilotKitService) {}\n * \n * ngOnInit() {\n * const cleanup = addFrontendTool(this.copilotkit, {\n * name: 'calculator',\n * description: 'Performs calculations',\n * parameters: z.object({\n * expression: z.string()\n * }),\n * handler: async (args) => {\n * return eval(args.expression);\n * }\n * });\n * \n * this.cleanupFns.push(cleanup);\n * }\n * \n * ngOnDestroy() {\n * this.cleanupFns.forEach(fn => fn());\n * }\n * }\n * ```\n */\nexport function addFrontendTool<T extends Record<string, any> = Record<string, any>>(\n service: CopilotKitService,\n tool: AngularFrontendTool<T>\n): () => void {\n // Add the tool to CopilotKit\n service.copilotkit.addTool(tool);\n \n // Register the render if provided\n if (tool.render) {\n const currentRenders = service.currentRenderToolCalls();\n const existingIndex = currentRenders.findIndex((r: ToolCallRender) => r.name === tool.name);\n \n if (existingIndex !== -1) {\n console.error(`Tool with name '${tool.name}' already has a render. Skipping.`);\n } else {\n const renderEntry: AngularToolCallRender = {\n name: tool.name,\n render: tool.render\n };\n \n service.setCurrentRenderToolCalls([...currentRenders, renderEntry]);\n }\n }\n \n // Return cleanup function\n return () => {\n removeFrontendTool(service, tool.name);\n };\n}\n\n/**\n * Registers a frontend tool with CopilotKit and automatically removes it when the component/service is destroyed.\n * Must be called within an injection context.\n * \n * @param tool - The tool to register\n * @returns The tool name\n * \n * @example\n * ```typescript\n * export class MyComponent implements OnInit {\n * ngOnInit() {\n * // Automatically cleaned up on component destroy\n * registerFrontendTool({\n * name: 'search',\n * description: 'Search for items',\n * parameters: z.object({\n * query: z.string()\n * }),\n * handler: async (args) => {\n * return this.searchService.search(args.query);\n * },\n * render: SearchResultsComponent\n * });\n * }\n * }\n * ```\n */\nexport function registerFrontendTool<T extends Record<string, any> = Record<string, any>>(\n tool: AngularFrontendTool<T>\n): string {\n const service = inject(CopilotKitService);\n const destroyRef = inject(DestroyRef);\n \n // Add the tool\n service.copilotkit.addTool(tool);\n \n // Register the render if provided\n if (tool.render) {\n const currentRenders = service.currentRenderToolCalls();\n const existingIndex = currentRenders.findIndex((r: ToolCallRender) => r.name === tool.name);\n \n if (existingIndex !== -1) {\n console.error(`Tool with name '${tool.name}' already has a render. Skipping.`);\n } else {\n const renderEntry: AngularToolCallRender = {\n name: tool.name,\n render: tool.render\n };\n \n service.setCurrentRenderToolCalls([...currentRenders, renderEntry]);\n }\n }\n \n // Register cleanup with Angular's DestroyRef\n destroyRef.onDestroy(() => {\n removeFrontendTool(service, tool.name);\n });\n \n return tool.name;\n}\n\n/**\n * Explicitly removes a frontend tool from CopilotKit.\n * \n * @param service - The CopilotKitService instance\n * @param toolName - The name of the tool to remove\n * \n * @example\n * ```typescript\n * removeFrontendTool(this.copilotkit, 'calculator');\n * ```\n */\nexport function removeFrontendTool(\n service: CopilotKitService,\n toolName: string\n): void {\n // Remove the tool\n service.copilotkit.removeTool(toolName);\n \n // Remove the render if it exists\n const currentRenders = service.currentRenderToolCalls();\n const filtered = currentRenders.filter((r: ToolCallRender) => r.name !== toolName);\n if (filtered.length !== currentRenders.length) {\n service.setCurrentRenderToolCalls(filtered);\n }\n}\n\n/**\n * Creates a frontend tool with dynamic parameters that can change over time.\n * Uses Angular signals for reactivity.\n * \n * @param name - Tool name\n * @param description - Tool description\n * @param parameters - Zod schema for parameters\n * @param handler - Signal or function that provides the handler\n * @param render - Optional render component or template\n * @returns Object with update and destroy methods\n * \n * @example\n * ```typescript\n * export class MyComponent {\n * private toolConfig = signal({\n * handler: async (args: any) => this.processDefault(args)\n * });\n * \n * ngOnInit() {\n * const tool = createDynamicFrontendTool(\n * 'processor',\n * 'Processes data',\n * z.object({ data: z.string() }),\n * () => this.toolConfig().handler\n * );\n * \n * // Later, update the handler\n * this.toolConfig.set({\n * handler: async (args: any) => this.processAdvanced(args)\n * });\n * tool.update();\n * }\n * }\n * ```\n */\nexport function createDynamicFrontendTool<T extends Record<string, any> = Record<string, any>>(\n name: string,\n description: string | (() => string),\n parameters: z.ZodSchema<T>,\n handler: () => ((args: T) => Promise<any>),\n render?: () => any\n): { update: () => void; destroy: () => void } {\n const service = inject(CopilotKitService);\n const destroyRef = inject(DestroyRef);\n \n let isRegistered = false;\n \n const update = () => {\n // Remove old tool if registered\n if (isRegistered) {\n service.copilotkit.removeTool(name);\n }\n \n // Create new tool configuration\n const desc = typeof description === 'function' ? description() : description;\n const currentHandler = handler();\n const currentRender = render ? render() : undefined;\n \n const tool: AngularFrontendTool<T> = {\n name,\n description: desc,\n parameters,\n handler: currentHandler,\n render: currentRender\n };\n \n // Add the tool\n service.copilotkit.addTool(tool);\n \n // Update render if provided\n if (currentRender) {\n const currentRenders = service.currentRenderToolCalls();\n const renderEntry: AngularToolCallRender = {\n name: name,\n render: currentRender\n };\n \n const existingIndex = currentRenders.findIndex((r: ToolCallRender) => r.name === name);\n if (existingIndex !== -1) {\n const updated = [...currentRenders];\n updated[existingIndex] = renderEntry;\n service.setCurrentRenderToolCalls(updated);\n } else {\n service.setCurrentRenderToolCalls([...currentRenders, renderEntry]);\n }\n }\n \n isRegistered = true;\n };\n \n const destroy = () => {\n if (isRegistered) {\n removeFrontendTool(service, name);\n isRegistered = false;\n }\n };\n \n // Initial setup\n update();\n \n // Register cleanup\n destroyRef.onDestroy(destroy);\n \n return { update, destroy };\n}","import {\n DestroyRef,\n inject,\n signal,\n computed,\n Injector,\n runInInjectionContext,\n} from \"@angular/core\";\nimport { toObservable } from \"@angular/core/rxjs-interop\";\nimport { CopilotKitService } from \"../core/copilotkit.service\";\nimport {\n AgentSubscriptionCallbacks,\n AgentWatchResult,\n} from \"../core/copilotkit.types\";\nimport { AbstractAgent } from \"@ag-ui/client\";\nimport { DEFAULT_AGENT_ID } from \"@copilotkitnext/shared\";\n\n/**\n * Watches an agent and provides reactive signals for its state.\n * Must be called within an injection context.\n * Automatically cleans up when the component/service is destroyed.\n *\n * @param config - Optional configuration with agentId\n * @returns Object with agent, messages, and isRunning signals plus observables\n *\n * @example\n * ```typescript\n * export class MyComponent {\n * // Automatically tracks agent state\n * agentState = watchAgent({ agentId: 'my-agent' });\n *\n * constructor() {\n * effect(() => {\n * const messages = this.agentState.messages();\n * const isRunning = this.agentState.isRunning();\n * console.log('Messages:', messages.length, 'Running:', isRunning);\n * });\n * }\n * }\n * ```\n */\nexport function watchAgent(config?: { agentId?: string }): AgentWatchResult {\n // Use inject() internally to get required services\n const service = inject(CopilotKitService);\n const destroyRef = inject(DestroyRef);\n const effectiveAgentId = config?.agentId ?? DEFAULT_AGENT_ID;\n\n // Create reactive signals with tick mechanism for reliable updates\n const agentSignal = signal<AbstractAgent | undefined>(undefined);\n const tick = signal<number>(0);\n const isRunningSignal = signal<boolean>(false);\n\n // Create computed messages signal that reacts to tick changes\n const messages = computed(() => {\n // Access tick to ensure recomputation\n tick();\n const a = agentSignal();\n if (!a) return [];\n // Return a shallow clone to ensure change detection\n return a.messages.map((m) => ({ ...m }));\n });\n\n // Get initial agent\n const updateAgent = () => {\n const agent = service.copilotkit.getAgent(effectiveAgentId);\n agentSignal.set(agent);\n return agent;\n };\n\n // Initial update\n let currentAgent = updateAgent();\n\n // Subscribe to agent changes\n let agentSubscription: { unsubscribe: () => void } | undefined;\n\n const subscribeToAgent = () => {\n // Unsubscribe from previous agent if any\n agentSubscription?.unsubscribe();\n\n if (currentAgent) {\n agentSubscription = currentAgent.subscribe({\n onMessagesChanged() {\n // Increment tick to force recomputation of messages computed\n tick.update((v) => v + 1);\n },\n onStateChanged() {\n // Increment tick to force recomputation\n tick.update((v) => v + 1);\n },\n onRunInitialized() {\n isRunningSignal.set(true);\n },\n onRunFinalized() {\n isRunningSignal.set(false);\n },\n onRunFailed() {\n isRunningSignal.set(false);\n },\n });\n }\n };\n\n // Initial subscription\n subscribeToAgent();\n\n // Subscribe to CopilotKit changes to detect agent updates\n const coreUnsubscribe = service.copilotkit.subscribe({\n onRuntimeLoaded() {\n // Re-check agent when runtime loads\n currentAgent = updateAgent();\n subscribeToAgent();\n },\n onRuntimeLoadError() {\n // Also re-check agent on runtime load error to ensure consistency\n currentAgent = updateAgent();\n subscribeToAgent();\n },\n });\n\n // Register cleanup\n const unsubscribe = () => {\n agentSubscription?.unsubscribe();\n coreUnsubscribe(); // subscribe returns a function directly\n };\n\n destroyRef.onDestroy(unsubscribe);\n\n // Create observables from signals using toObservable\n const agent$ = toObservable(agentSignal);\n const isRunning$ = toObservable(isRunningSignal);\n const messages$ = toObservable(messages);\n\n return {\n agent: agentSignal.asReadonly(),\n messages: messages,\n isRunning: isRunningSignal.asReadonly(),\n agent$,\n messages$,\n isRunning$,\n unsubscribe,\n };\n}\n\n/**\n * Gets an agent by ID without subscribing to changes.\n *\n * @param service - The CopilotKitService instance\n * @param agentId - Optional agent ID (defaults to DEFAULT_AGENT_ID)\n * @returns The agent or undefined if not found\n *\n * @example\n * ```typescript\n * export class MyComponent {\n * constructor(private copilotkit: CopilotKitService) {}\n *\n * getCurrentAgent() {\n * return getAgent(this.copilotkit, 'my-agent');\n * }\n * }\n * ```\n */\nexport function getAgent(\n service: CopilotKitService,\n agentId?: string\n): AbstractAgent | undefined {\n const effectiveAgentId = agentId ?? DEFAULT_AGENT_ID;\n return service.copilotkit.getAgent(effectiveAgentId);\n}\n\n// Re-export the type for convenience (the actual type is in copilotkit.types)\nexport type { AgentWatchResult } from \"../core/copilotkit.types\";\n\n/**\n * Convenience wrapper for watchAgent that handles injection context.\n * Useful when you need to call watchAgent outside of a constructor or field initializer.\n *\n * @param injector - The Angular Injector to use for injection context\n * @param config - Optional configuration with agentId\n * @returns Object with agent, messages, and isRunning signals plus observables\n *\n * @example\n * ```typescript\n * export class MyComponent {\n * constructor(private injector: Injector) {}\n *\n * switchAgent(newAgentId: string) {\n * // Can call outside of constructor using watchAgentWith\n * const watcher = watchAgentWith(this.injector, { agentId: newAgentId });\n * this.agent = watcher.agent;\n * this.messages = watcher.messages;\n * this.isRunning = watcher.isRunning;\n * }\n * }\n * ```\n */\nexport function watchAgentWith(\n injector: Injector,\n config?: { agentId?: string }\n): AgentWatchResult {\n return runInInjectionContext(injector, () => watchAgent(config));\n}\n\n/**\n * Subscribes to an agent's events with custom callbacks.\n * Returns a cleanup function that should be called to unsubscribe.\n *\n * @param service - The CopilotKitService instance\n * @param agentId - Optional agent ID (defaults to DEFAULT_AGENT_ID)\n * @param callbacks - Event callbacks\n * @returns Cleanup function to unsubscribe\n *\n * @example\n * ```typescript\n * export class MyComponent implements OnInit, OnDestroy {\n * private unsubscribe?: () => void;\n *\n * constructor(private copilotkit: CopilotKitService) {}\n *\n * ngOnInit() {\n * this.unsubscribe = subscribeToAgent(this.copilotkit, 'my-agent', {\n * onRunInitialized: () => console.log('Run started'),\n * onRunFinalized: () => console.log('Run completed'),\n * onRunFailed: (error) => console.error('Run failed', error),\n * });\n * }\n *\n * ngOnDestroy() {\n * this.unsubscribe?.();\n * }\n * }\n * ```\n */\nexport function subscribeToAgent(\n service: CopilotKitService,\n agentId?: string,\n callbacks?: AgentSubscriptionCallbacks\n): () => void {\n const effectiveAgentId = agentId ?? DEFAULT_AGENT_ID;\n const agent = service.copilotkit.getAgent(effectiveAgentId);\n\n if (!agent) {\n // Return no-op cleanup if agent doesn't exist\n return () => {};\n }\n\n const subscription = agent.subscribe({\n onMessagesChanged: callbacks?.onMessagesChanged,\n onStateChanged: callbacks?.onStateChanged,\n onRunInitialized: callbacks?.onRunInitialized,\n onRunFinalized: callbacks?.onRunFinalized,\n onRunFailed: callbacks?.onRunFailed,\n });\n\n return () => subscription.unsubscribe();\n}\n","import { \n DestroyRef, \n inject, \n signal, \n Signal,\n Type,\n TemplateRef\n} from '@angular/core';\nimport { CopilotKitService } from '../core/copilotkit.service';\nimport { \n AngularHumanInTheLoop, \n ToolCallStatus,\n HumanInTheLoopState,\n HumanInTheLoopProps,\n AngularFrontendTool\n} from '../core/copilotkit.types';\n\n/**\n * Registers a human-in-the-loop tool that requires user interaction.\n * Must be called within an injection context.\n * Automatically cleans up when the component/service is destroyed.\n * \n * @param tool - The human-in-the-loop tool configuration\n * @returns The tool ID\n * \n * @example\n * ```typescript\n * export class ApprovalComponent {\n * toolId = registerHumanInTheLoop({\n * name: 'requireApproval',\n * description: 'Requires user approval',\n * args: z.object({ action: z.string() }),\n * render: ApprovalDialogComponent\n * });\n * }\n * ```\n */\nexport function registerHumanInTheLoop<T extends Record<string, any> = Record<string, any>>(\n tool: AngularHumanInTheLoop<T>\n): string {\n const service = inject(CopilotKitService);\n const destroyRef = inject(DestroyRef);\n \n // Create state management\n const statusSignal = signal<ToolCallStatus>(ToolCallStatus.InProgress);\n let resolvePromise: ((result: unknown) => void) | null = null;\n \n // Create respond function\n const respond = async (result: unknown): Promise<void> => {\n if (resolvePromise) {\n resolvePromise(result);\n statusSignal.set(ToolCallStatus.Complete);\n resolvePromise = null;\n }\n };\n \n // Create handler that returns a Promise\n const handler = async (_args: T): Promise<unknown> => {\n return new Promise((resolve) => {\n statusSignal.set(ToolCallStatus.Executing);\n resolvePromise = resolve;\n });\n };\n \n // Create enhanced render function\n const enhancedRender = createEnhancedRender(tool.render, statusSignal, respond);\n \n // Create the frontend tool\n const frontendTool: AngularFrontendTool<T> = {\n ...tool,\n handler,\n render: enhancedRender\n };\n \n // Add the tool (returns void, so we use the tool name as ID)\n service.copilotkit.addTool(frontendTool);\n const toolId = frontendTool.name;\n \n // Register tool render if provided\n if (frontendTool.render) {\n service.registerToolRender(frontendTool.name, {\n name: frontendTool.name,\n render: frontendTool.render\n });\n }\n \n // Cleanup on destroy\n destroyRef.onDestroy(() => {\n service.copilotkit.removeTool(toolId);\n if (frontendTool.render) {\n service.unregisterToolRender(frontendTool.name);\n }\n });\n \n return toolId;\n}\n\n/**\n * Adds a human-in-the-loop tool with explicit service parameter.\n * Returns a cleanup function.\n * \n * @param service - The CopilotKitService instance\n * @param tool - The human-in-the-loop tool configuration\n * @returns Cleanup function to remove the tool\n * \n * @example\n * ```typescript\n * export class MyComponent implements OnInit, OnDestroy {\n * private cleanup?: () => void;\n * \n * constructor(private copilotkit: CopilotKitService) {}\n * \n * ngOnInit() {\n * this.cleanup = addHumanInTheLoop(this.copilotkit, {\n * name: 'requireApproval',\n * description: 'Requires user approval',\n * args: z.object({ action: z.string() }),\n * render: ApprovalDialogComponent\n * });\n * }\n * \n * ngOnDestroy() {\n * this.cleanup?.();\n * }\n * }\n * ```\n */\nexport function addHumanInTheLoop<T extends Record<string, any> = Record<string, any>>(\n service: CopilotKitService,\n tool: AngularHumanInTheLoop<T>\n): () => void {\n // Create state management\n const statusSignal = signal<ToolCallStatus>(ToolCallStatus.InProgress);\n let resolvePromise: ((result: unknown) => void) | null = null;\n \n // Create respond function\n const respond = async (result: unknown): Promise<void> => {\n if (resolvePromise) {\n resolvePromise(result);\n statusSignal.set(ToolCallStatus.Complete);\n resolvePromise = null;\n }\n };\n \n // Create handler that returns a Promise\n const handler = async (_args: T): Promise<unknown> => {\n return new Promise((resolve) => {\n statusSignal.set(ToolCallStatus.Executing);\n resolvePromise = resolve;\n });\n };\n \n // Create enhanced render function\n const enhancedRender = createEnhancedRender(tool.render, statusSignal, respond);\n \n // Create the frontend tool\n const frontendTool: AngularFrontendTool<T> = {\n ...tool,\n handler,\n render: enhancedRender\n };\n \n // Add the tool (returns void, so we use the tool name as ID)\n service.copilotkit.addTool(frontendTool);\n const toolId = frontendTool.name;\n \n // Register tool render if provided\n if (frontendTool.render) {\n service.registerToolRender(frontendTool.name, {\n name: frontendTool.name,\n render: frontendTool.render\n });\n }\n \n // Return cleanup function\n return () => {\n service.copilotkit.removeTool(toolId);\n if (frontendTool.render) {\n service.unregisterToolRender(frontendTool.name);\n }\n };\n}\n\n/**\n * Creates a human-in-the-loop tool with dynamic update capabilities.\n * \n * @param service - The CopilotKitService instance\n * @param tool - The human-in-the-loop tool configuration\n * @returns Object with status signal, update and destroy methods\n * \n * @example\n * ```typescript\n * export class MyComponent {\n * humanInTheLoop = createHumanInTheLoop(this.copilotkit, {\n * name: 'requireApproval',\n * description: 'Requires user approval',\n * args: z.object({ action: z.string() }),\n * render: ApprovalDialogComponent\n * });\n * \n * updateDescription(newDesc: string) {\n * this.humanInTheLoop.update({ description: newDesc });\n * }\n * \n * ngOnDestroy() {\n * this.humanInTheLoop.destroy();\n * }\n * }\n * ```\n */\nexport function createHumanInTheLoop<T extends Record<string, any> = Record<string, any>>(\n service: CopilotKitService,\n tool: AngularHumanInTheLoop<T>\n): HumanInTheLoopState & { update: (updates: Partial<AngularHumanInTheLoop<T>>) => void } {\n // Create state management\n const statusSignal = signal<ToolCallStatus>(ToolCallStatus.InProgress);\n let currentTool = { ...tool };\n let toolId: string = '';\n let resolvePromise: ((result: unknown) => void) | null = null;\n \n // Create respond function\n const respond = async (result: unknown): Promise<void> => {\n if (resolvePromise) {\n resolvePromise(result);\n statusSignal.set(ToolCallStatus.Complete);\n resolvePromise = null;\n }\n };\n \n // Create handler that returns a Promise\n const handler = async (_args: T): Promise<unknown> => {\n return new Promise((resolve) => {\n statusSignal.set(ToolCallStatus.Executing);\n resolvePromise = resolve;\n });\n };\n \n // Function to add the tool\n const addTool = () => {\n // Create enhanced render function\n const enhancedRender = createEnhancedRender(currentTool.render, statusSignal, respond);\n \n // Create the frontend tool\n const frontendTool: AngularFrontendTool<T> = {\n ...currentTool,\n handler,\n render: enhancedRender\n };\n \n // Add tool (returns void, so we use the tool name as ID)\n service.copilotkit.addTool(frontendTool);\n toolId = frontendTool.name;\n \n // Register tool render if provided\n if (frontendTool.render) {\n service.registerToolRender(frontendTool.name, {\n name: frontendTool.name,\n render: frontendTool.render\n });\n }\n };\n \n // Initialize the tool\n addTool();\n \n return {\n status: statusSignal.asReadonly(),\n toolId,\n update: (updates: Partial<AngularHumanInTheLoop<T>>) => {\n // Remove old tool\n service.copilotkit.removeTool(toolId);\n if (currentTool.render) {\n service.unregisterToolRender(currentTool.name);\n }\n \n // Update tool configuration\n currentTool = { ...currentTool, ...updates };\n \n // Re-add with new configuration\n addTool();\n },\n destroy: () => {\n service.copilotkit.removeTool(toolId);\n if (currentTool.render) {\n service.unregisterToolRender(currentTool.name);\n }\n }\n };\n}\n\n/**\n * Creates an enhanced render function that injects the respond function\n * when the status is 'executing'.\n */\nfunction createEnhancedRender<T extends Record<string, any>>(\n originalRender: Type<any> | TemplateRef<HumanInTheLoopProps<T>>,\n _statusSignal: Signal<ToolCallStatus>,\n _respond: (result: unknown) => Promise<void>\n): Type<any> | TemplateRef<any> {\n // For component classes, we need to create a wrapper\n if (isComponentClass(originalRender)) {\n // Return a wrapper component factory\n // This is complex in Angular and would require dynamic component creation\n // For now, we'll return the original and rely on prop injection\n return originalRender;\n }\n \n // For templates, we can't easily wrap them\n // The template context will be enhanced in the render component\n return originalRender;\n}\n\n/**\n * Helper function to check if a value is a component class\n */\nfunction isComponentClass(value: any): value is Type<any> {\n return typeof value === 'function' && value.prototype;\n}\n\n/**\n * Enhanced component wrapper for human-in-the-loop.\n * This would be used internally by the tool render component to inject\n * the respond function based on status.\n * \n * @internal\n */\nexport function enhancePropsForHumanInTheLoop<T>(\n props: HumanInTheLoopProps<T>,\n status: ToolCallStatus,\n respond?: (result: unknown) => Promise<void>\n): HumanInTheLoopProps<T> {\n if (status === ToolCallStatus.Executing && respond) {\n return {\n ...props,\n status: ToolCallStatus.Executing,\n respond\n } as HumanInTheLoopProps<T>;\n }\n \n if (status === ToolCallStatus.Complete) {\n return {\n ...props,\n status: ToolCallStatus.Complete,\n result: typeof props.result === 'string' ? props.result : '',\n respond: undefined\n } as HumanInTheLoopProps<T>;\n }\n \n // InProgress\n return {\n ...props,\n status: ToolCallStatus.InProgress,\n result: undefined,\n respond: undefined\n } as HumanInTheLoopProps<T>;\n}","import { inject, Signal } from '@angular/core';\nimport { CopilotChatConfigurationService } from '../core/chat-configuration/chat-configuration.service';\nimport { \n CopilotChatConfiguration,\n CopilotChatLabels\n} from '../core/chat-configuration/chat-configuration.types';\n\n/**\n * Watches chat configuration and provides reactive access to all configuration values.\n * Must be called within an injection context.\n * \n * @returns Object with reactive signals and handler functions\n * \n * @example\n * ```typescript\n * export class ChatInputComponent {\n * config = watchChatConfig();\n * \n * constructor() {\n * effect(() => {\n * const placeholder = this.config.labels().chatInputPlaceholder;\n * console.log('Placeholder:', placeholder);\n * });\n * }\n * \n * handleSubmit(value: string) {\n * this.config.submitInput(value);\n * }\n * }\n * ```\n */\nexport function watchChatConfig(): {\n labels: Signal<CopilotChatLabels>;\n inputValue: Signal<string | undefined>;\n submitInput: (value: string) => void;\n changeInput: (value: string) => void;\n} {\n const service = inject(CopilotChatConfigurationService);\n \n return {\n labels: service.labels,\n inputValue: service.inputValue,\n submitInput: (value: string) => service.submitInput(value),\n changeInput: (value: string) => service.changeInput(value)\n };\n}\n\n/**\n * Registers chat configuration within an injection context.\n * Automatically updates the configuration when called.\n * \n * @param config - The configuration to register\n * \n * @example\n * ```typescript\n * export class ChatComponent {\n * constructor() {\n * registerChatConfig({\n * labels: {\n * chatInputPlaceholder: \"How can I help?\"\n * },\n * onSubmitInput: (value) => this.handleSubmit(value)\n * });\n * }\n * }\n * ```\n */\nexport function registerChatConfig(config: CopilotChatConfiguration): void {\n const service = inject(CopilotChatConfigurationService);\n service.updateConfiguration(config);\n}\n\n/**\n * Gets the current chat labels signal.\n * \n * @param service - The CopilotChatConfigurationService instance\n * @returns Signal containing the current labels\n * \n * @example\n * ```typescript\n * export class ChatComponent {\n * constructor(private chatConfig: CopilotChatConfigurationService) {\n * const labels = getChatLabels(this.chatConfig);\n * effect(() => {\n * console.log('Current labels:', labels());\n * });\n * }\n * }\n * ```\n */\nexport function getChatLabels(\n service: CopilotChatConfigurationService\n): Signal<CopilotChatLabels> {\n return service.labels;\n}\n\n/**\n * Updates chat labels.\n * \n * @param service - The CopilotChatConfigurationService instance\n * @param labels - Partial labels to merge with defaults\n * \n * @example\n * ```typescript\n * export class ChatComponent {\n * updatePlaceholder(text: string) {\n * setChatLabels(this.chatConfig, {\n * chatInputPlaceholder: text\n * });\n * }\n * }\n * ```\n */\nexport function setChatLabels(\n service: CopilotChatConfigurationService,\n labels: Partial<CopilotChatLabels>\n): void {\n service.setLabels(labels);\n}\n\n/**\n * Gets the current input value signal.\n * \n * @param service - The CopilotChatConfigurationService instance\n * @returns Signal containing the current input value\n * \n * @example\n * ```typescript\n * export class ChatInputComponent {\n * inputValue = getChatInputValue(this.chatConfig);\n * \n * constructor(private chatConfig: CopilotChatConfigurationService) {\n * effect(() => {\n * const value = this.inputValue();\n * if (value) {\n * this.updateTextarea(value);\n * }\n * });\n * }\n * }\n * ```\n */\nexport function getChatInputValue(\n service: CopilotChatConfigurationService\n): Signal<string | undefined> {\n return service.inputValue;\n}\n\n/**\n * Sets the current input value.\n * \n * @param service - The CopilotChatConfigurationService instance\n * @param value - The new input value\n * \n * @example\n * ```typescript\n * export class ChatInputComponent {\n * onInputChange(event: Event) {\n * const value = (event.target as HTMLInputElement).value;\n * setChatInputValue(this.chatConfig, value);\n * }\n * }\n * ```\n */\nexport function setChatInputValue(\n service: CopilotChatConfigurationService,\n value: string | undefined\n): void {\n service.setInputValue(value);\n}\n\n/**\n * Creates a chat configuration controller with dynamic update capabilities.\n * This is useful when you need to programmatically manage configuration.\n * \n * @param service - The CopilotChatConfigurationService instance\n * @param initialConfig - Optional initial configuration\n * @returns Controller object with update and reset methods\n * \n * @example\n * ```typescript\n * export class ChatManagerComponent {\n * chatController = createChatConfigController(this.chatConfig, {\n * labels: { chatInputPlaceholder: \"Ask me...\" }\n * });\n * \n * constructor(private chatConfig: CopilotChatConfigurationService) {}\n * \n * updateForSupportMode() {\n * this.chatController.update({\n * labels: { chatInputPlaceholder: \"Describe your issue...\" }\n * });\n * }\n * \n * resetToDefaults() {\n * this.chatController.reset();\n * }\n * }\n * ```\n */\nexport function createChatConfigController(\n service: CopilotChatConfigurationService,\n initialConfig?: CopilotChatConfiguration\n): {\n update: (config: CopilotChatConfiguration) => void;\n reset: () => void;\n getLabels: () => CopilotChatLabels;\n getInputValue: () => string | undefined;\n} {\n // Apply initial configuration if provided\n if (initialConfig) {\n service.updateConfiguration(initialConfig);\n }\n \n return {\n update: (config: CopilotChatConfiguration) => service.updateConfiguration(config),\n reset: () => service.reset(),\n getLabels: () => service.labels(),\n getInputValue: () => service.inputValue()\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 { Component, ChangeDetectionStrategy, ChangeDetectorRef } from '@angular/core';\n\n@Component({\n selector: 'copilot-tooltip-content',\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 .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 changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true\n})\nexport class TooltipContentComponent {\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 CopilotTooltipDirective 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(TooltipContentComponent, 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 = this.overlayRef.overlayElement.getBoundingClientRect();\n const elementRect = 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 = this.tooltipPosition === 'below' \n ? [...(positions.above || []), ...(positions.left || []), ...(positions.right || [])]\n : Object.values(positions).filter(p => p !== primary).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}","import { Directive, Input, OnChanges, SimpleChanges, Inject } from \"@angular/core\";\nimport { CopilotKitService } from \"../core/copilotkit.service\";\nimport { AbstractAgent } from \"@ag-ui/client\";\n\n/**\n * Directive to configure CopilotKit runtime settings declaratively in templates.\n * \n * @example\n * ```html\n * <div [copilotkitConfig]=\"{\n * runtimeUrl: 'https://api.example.com',\n * headers: { 'Authorization': 'Bearer token' }\n * }\">\n * <!-- Your app content -->\n * </div>\n * ```\n * \n * Or with individual inputs:\n * ```html\n * <div copilotkitConfig\n * [runtimeUrl]=\"apiUrl\"\n * [headers]=\"authHeaders\"\n * [agents]=\"myAgents\">\n * <!-- Your app content -->\n * </div>\n * ```\n */\n@Directive({\n selector: \"[copilotkitConfig]\",\n standalone: true,\n})\nexport class CopilotKitConfigDirective implements OnChanges {\n constructor(@Inject(CopilotKitService) private readonly copilotkit: CopilotKitService) {}\n\n @Input() copilotkitConfig?: {\n runtimeUrl?: string;\n headers?: Record<string, string>;\n properties?: Record<string, unknown>;\n agents?: Record<string, AbstractAgent>;\n };\n\n @Input() runtimeUrl?: string;\n @Input() headers?: Record<string, string>;\n @Input() properties?: Record<string, unknown>;\n @Input() agents?: Record<string, AbstractAgent>;\n\n ngOnChanges(changes: SimpleChanges): void {\n // Handle combined config object\n if (changes['copilotkitConfig']) {\n const config = this.copilotkitConfig;\n if (config) {\n if (config.runtimeUrl !== undefined) {\n this.copilotkit.setRuntimeUrl(config.runtimeUrl);\n }\n if (config.headers) {\n this.copilotkit.setHeaders(config.headers);\n }\n if (config.properties) {\n this.copilotkit.setProperties(config.properties);\n }\n if (config.agents) {\n this.copilotkit.setAgents(config.agents);\n }\n }\n }\n\n // Handle individual inputs\n if (changes['runtimeUrl'] && !this.copilotkitConfig) {\n this.copilotkit.setRuntimeUrl(this.runtimeUrl);\n }\n if (changes['headers'] && !this.copilotkitConfig) {\n this.copilotkit.setHeaders(this.headers || {});\n }\n if (changes['properties'] && !this.copilotkitConfig) {\n this.copilotkit.setProperties(this.properties || {});\n }\n if (changes['agents'] && !this.copilotkitConfig) {\n this.copilotkit.setAgents(this.agents || {});\n }\n }\n}","import {\n Directive,\n Input,\n OnInit,\n OnChanges,\n OnDestroy,\n SimpleChanges,\n Inject,\n} from \"@angular/core\";\nimport { CopilotKitService } from \"../core/copilotkit.service\";\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 CopilotKitAgentContextDirective\n implements OnInit, OnChanges, OnDestroy\n{\n private contextId?: string;\n\n constructor(\n @Inject(CopilotKitService) private readonly copilotkit: CopilotKitService\n ) {}\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.copilotkit.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.copilotkit.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 Input,\n OnInit,\n OnChanges,\n OnDestroy,\n SimpleChanges,\n TemplateRef,\n Type,\n isDevMode,\n Inject,\n} from \"@angular/core\";\nimport { CopilotKitService } from \"../core/copilotkit.service\";\nimport type {\n AngularFrontendTool,\n AngularToolCallRender,\n ToolCallRender,\n} from \"../core/copilotkit.types\";\nimport type { z } from \"zod\";\n\n@Directive({\n selector: \"[copilotkitFrontendTool]\",\n standalone: true,\n})\nexport class CopilotKitFrontendToolDirective<\n T extends Record<string, any> = Record<string, any>,\n >\n implements OnInit, OnChanges, OnDestroy\n{\n private isRegistered = false;\n\n constructor(\n @Inject(CopilotKitService) private readonly copilotkit: CopilotKitService\n ) {}\n\n @Input() name!: string;\n @Input() description?: string;\n @Input() parameters?: z.ZodSchema<T>;\n @Input() handler?: (args: T) => Promise<any>;\n @Input() render?: Type<any> | TemplateRef<any>;\n @Input() followUp?: boolean;\n\n // Alternative: Accept a full tool object\n @Input(\"copilotkitFrontendTool\") tool?: AngularFrontendTool<T>;\n\n ngOnInit(): void {\n this.registerTool();\n }\n\n ngOnChanges(_changes: SimpleChanges): void {\n if (this.isRegistered) {\n // Re-register the tool if any properties change\n this.unregisterTool();\n this.registerTool();\n }\n }\n\n ngOnDestroy(): void {\n this.unregisterTool();\n }\n\n private registerTool(): void {\n const tool = this.getTool();\n\n if (!tool.name) {\n if (isDevMode()) {\n console.warn(\n 'CopilotKitFrontendToolDirective: \"name\" is required. ' +\n 'Please provide a name via [name]=\"toolName\" or ' +\n \"[copilotkitFrontendTool]=\\\"{ name: 'toolName', ... }\\\"\"\n );\n }\n return; // Don't register if no name\n }\n\n // Register the tool with CopilotKit\n this.copilotkit.copilotkit.addTool(tool);\n\n // Register the render if provided\n if (tool.render) {\n const currentRenders = this.copilotkit.currentRenderToolCalls();\n const renderEntry: AngularToolCallRender = {\n name: tool.name,\n render: tool.render,\n };\n\n // Check for duplicate\n const existingIndex = currentRenders.findIndex((r: ToolCallRender) => r.name === tool.name);\n if (existingIndex !== -1) {\n if (isDevMode()) {\n console.warn(\n `[CopilotKit] Tool \"${tool.name}\" already has a render. ` +\n `The previous render will be replaced. ` +\n `This may indicate a duplicate tool registration.`\n );\n }\n const updated = [...currentRenders];\n updated[existingIndex] = renderEntry;\n this.copilotkit.setCurrentRenderToolCalls(updated);\n } else {\n this.copilotkit.setCurrentRenderToolCalls([...currentRenders, renderEntry]);\n }\n }\n\n this.isRegistered = true;\n }\n\n private unregisterTool(): void {\n if (!this.isRegistered) return;\n\n const tool = this.getTool();\n\n if (tool.name) {\n // Remove the tool\n this.copilotkit.copilotkit.removeTool(tool.name);\n\n // Remove the render if it exists\n const currentRenders = this.copilotkit.currentRenderToolCalls();\n const filtered = currentRenders.filter((r: ToolCallRender) => r.name !== tool.name);\n if (filtered.length !== currentRenders.length) {\n this.copilotkit.setCurrentRenderToolCalls(filtered);\n }\n }\n\n this.isRegistered = false;\n }\n\n private getTool(): AngularFrontendTool<T> {\n // If full tool object is provided, use it\n if (this.tool) {\n return this.tool;\n }\n\n // Otherwise, construct from individual inputs\n return {\n name: this.name,\n description: this.description,\n parameters: this.parameters,\n handler: this.handler,\n render: this.render,\n followUp: this.followUp,\n };\n }\n}\n","import {\n Directive,\n Input,\n Output,\n EventEmitter,\n OnInit,\n OnChanges,\n OnDestroy,\n SimpleChanges,\n signal,\n Inject,\n} from \"@angular/core\";\nimport { toObservable } from \"@angular/core/rxjs-interop\";\nimport { Observable } from \"rxjs\";\nimport { CopilotKitService } from \"../core/copilotkit.service\";\nimport { AbstractAgent } from \"@ag-ui/client\";\nimport { DEFAULT_AGENT_ID } from \"@copilotkitnext/shared\";\n\n/**\n * Directive to watch and interact with CopilotKit agents.\n * Provides reactive outputs for agent state changes.\n *\n * @example\n * ```html\n * <!-- Basic usage with default agent -->\n * <div copilotkitAgent\n * (agentChange)=\"onAgentChange($event)\"\n * (runningChange)=\"isProcessing = $event\">\n * Content here\n * </div>\n *\n * <!-- With specific agent ID -->\n * <div copilotkitAgent\n * [agentId]=\"'my-agent-id'\"\n * (agentChange)=\"currentAgent = $event\"\n * (runningChange)=\"onRunningStateChange($event)\"\n * (messagesChange)=\"onMessagesUpdate($event)\"\n * (stateChange)=\"onStateUpdate($event)\">\n * Content here\n * </div>\n *\n * <!-- Two-way binding for running state -->\n * <div copilotkitAgent\n * [(running)]=\"isAgentRunning\">\n * <span *ngIf=\"isAgentRunning\">Processing...</span>\n * </div>\n * ```\n */\n@Directive({\n selector: \"[copilotkitAgent]\",\n standalone: true,\n})\nexport class CopilotKitAgentDirective implements OnInit, OnChanges, OnDestroy {\n private agent?: AbstractAgent;\n private agentSubscription?: { unsubscribe: () => void };\n private coreUnsubscribe?: () => void; // subscribe returns function directly\n private _isRunning = false;\n private runningSignal = signal<boolean>(false);\n private agentSignal = signal<AbstractAgent | undefined>(undefined);\n\n constructor(\n @Inject(CopilotKitService) private readonly copilotkit: CopilotKitService\n ) {}\n\n /**\n * The ID of the agent to watch.\n * If not provided, uses the default agent ID.\n */\n @Input() agentId?: string;\n\n /**\n * Alternative input using the directive selector.\n * Allows: [copilotkitAgent]=\"'agent-id'\"\n */\n @Input(\"copilotkitAgent\")\n set directiveAgentId(value: string | undefined) {\n this.agentId = value || undefined;\n }\n\n /**\n * Emits when the agent instance changes.\n */\n @Output() agentChange = new EventEmitter<AbstractAgent | undefined>();\n\n /**\n * Emits when the running state changes.\n */\n @Output() runningChange = new EventEmitter<boolean>();\n\n /**\n * Observable of the running state.\n */\n get running$(): Observable<boolean> {\n return toObservable(this.runningSignal);\n }\n\n /**\n * Observable of the agent instance.\n */\n get agent$(): Observable<AbstractAgent | undefined> {\n return toObservable(this.agentSignal);\n }\n\n /**\n * Two-way binding for running state.\n */\n @Input()\n get running(): boolean {\n return this._isRunning;\n }\n set running(value: boolean) {\n // Input setter for two-way binding (though typically read-only from agent)\n this._isRunning = value;\n }\n\n /**\n * Emits when agent messages change.\n */\n @Output() messagesChange = new EventEmitter<any>();\n\n /**\n * Emits when agent state changes.\n */\n @Output() stateChange = new EventEmitter<any>();\n\n /**\n * Emits when a run is initialized.\n */\n @Output() runInitialized = new EventEmitter<any>();\n\n /**\n * Emits when a run is finalized.\n */\n @Output() runFinalized = new EventEmitter<any>();\n\n /**\n * Emits when a run fails.\n */\n @Output() runFailed = new EventEmitter<any>();\n\n ngOnInit(): void {\n this.setupAgent();\n this.subscribeToCore();\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes[\"agentId\"] && !changes[\"agentId\"].firstChange) {\n // Agent ID changed, re-setup\n this.cleanupAgentSubscription();\n this.setupAgent();\n }\n }\n\n ngOnDestroy(): void {\n this.cleanupAgentSubscription();\n this.cleanupCoreSubscription();\n }\n\n private setupAgent(): void {\n const effectiveAgentId = this.agentId ?? DEFAULT_AGENT_ID;\n this.agent = this.copilotkit.getAgent(effectiveAgentId);\n\n // Update signals\n this.agentSignal.set(this.agent);\n\n // Emit initial agent\n this.agentChange.emit(this.agent);\n\n // Subscribe to agent events\n this.subscribeToAgent();\n }\n\n private subscribeToAgent(): void {\n this.cleanupAgentSubscription();\n\n if (this.agent) {\n this.agentSubscription = this.agent.subscribe({\n onMessagesChanged: (params) => {\n this.messagesChange.emit(params);\n },\n onStateChanged: (params) => {\n this.stateChange.emit(params);\n },\n onRunInitialized: (params) => {\n this._isRunning = true;\n this.runningSignal.set(true);\n this.runningChange.emit(true);\n this.runInitialized.emit(params);\n },\n onRunFinalized: (params) => {\n this._isRunning = false;\n this.runningSignal.set(false);\n this.runningChange.emit(false);\n this.runFinalized.emit(params);\n },\n onRunFailed: (params) => {\n this._isRunning = false;\n this.runningSignal.set(false);\n this.runningChange.emit(false);\n this.runFailed.emit(params);\n },\n });\n }\n }\n\n private subscribeToCore(): void {\n // Subscribe to CopilotKit changes to detect agent updates\n this.coreUnsubscribe = this.copilotkit.copilotkit.subscribe({\n onRuntimeLoaded: () => {\n // Re-check agent when runtime loads\n this.setupAgent();\n },\n });\n }\n\n private cleanupAgentSubscription(): void {\n this.agentSubscription?.unsubscribe();\n this.agentSubscription = undefined;\n }\n\n private cleanupCoreSubscription(): void {\n this.coreUnsubscribe?.();\n this.coreUnsubscribe = undefined;\n }\n}\n","import {\n Directive,\n Input,\n Output,\n EventEmitter,\n OnInit,\n OnChanges,\n OnDestroy,\n SimpleChanges,\n TemplateRef,\n Type,\n signal,\n isDevMode,\n Inject,\n} from \"@angular/core\";\nimport { CopilotKitService } from \"../core/copilotkit.service\";\nimport type {\n AngularHumanInTheLoop,\n HumanInTheLoopProps,\n AngularFrontendTool,\n} from \"../core/copilotkit.types\";\nimport { ToolCallStatus } from \"../core/copilotkit.types\";\nimport * as z from \"zod\";\n\n/**\n * Directive for declaratively creating human-in-the-loop tools.\n * Provides reactive outputs for status changes and response events.\n *\n * @example\n * ```html\n * <!-- Basic usage -->\n * <div copilotkitHumanInTheLoop\n * [name]=\"'requireApproval'\"\n * [description]=\"'Requires user approval'\"\n * [args]=\"argsSchema\"\n * [render]=\"approvalComponent\"\n * (statusChange)=\"onStatusChange($event)\"\n * (responseProvided)=\"onResponse($event)\">\n * </div>\n *\n * <!-- With template -->\n * <div copilotkitHumanInTheLoop\n * [name]=\"'requireApproval'\"\n * [description]=\"'Requires user approval'\"\n * [args]=\"argsSchema\"\n * [render]=\"approvalTemplate\"\n * [(status)]=\"approvalStatus\">\n * </div>\n *\n * <ng-template #approvalTemplate let-props>\n * <div *ngIf=\"props.status === 'executing'\">\n * <p>{{ props.args.action }}</p>\n * <button (click)=\"props.respond('approved')\">Approve</button>\n * <button (click)=\"props.respond('rejected')\">Reject</button>\n * </div>\n * </ng-template>\n * ```\n */\n@Directive({\n selector: \"[copilotkitHumanInTheLoop]\",\n standalone: true,\n})\nexport class CopilotKitHumanInTheLoopDirective<\n T extends Record<string, any> = Record<string, any>,\n >\n implements OnInit, OnChanges, OnDestroy\n{\n private toolId?: string;\n private statusSignal = signal<ToolCallStatus>(ToolCallStatus.InProgress);\n private resolvePromise: ((result: unknown) => void) | null = null;\n private _status: ToolCallStatus = ToolCallStatus.InProgress;\n\n constructor(\n @Inject(CopilotKitService) private readonly copilotkit: CopilotKitService\n ) {}\n\n /**\n * The name of the human-in-the-loop tool.\n */\n @Input() name!: string;\n\n /**\n * Description of what the tool does.\n */\n @Input() description!: string;\n\n /**\n * Zod schema for the tool parameters.\n */\n @Input() parameters!: z.ZodSchema<T>;\n\n /**\n * Component class or template to render for user interaction.\n */\n @Input() render!: Type<any> | TemplateRef<HumanInTheLoopProps<T>>;\n\n /**\n * Whether the tool should be registered (default: true).\n */\n @Input() enabled = true;\n\n /**\n * Alternative input using the directive selector.\n * Allows: [copilotkitHumanInTheLoop]=\"config\"\n */\n @Input(\"copilotkitHumanInTheLoop\")\n set config(value: Partial<AngularHumanInTheLoop<T>> | undefined) {\n if (value) {\n if (value.name) this.name = value.name;\n if (value.description) this.description = value.description;\n if (\"parameters\" in value && value.parameters)\n this.parameters = value.parameters as z.ZodSchema<T>;\n if (\"render\" in value && value.render) this.render = value.render;\n }\n }\n\n /**\n * Emits when the status changes.\n */\n @Output() statusChange = new EventEmitter<ToolCallStatus>();\n\n /**\n * Two-way binding for status.\n */\n @Input()\n get status(): ToolCallStatus {\n return this._status;\n }\n set status(value: ToolCallStatus) {\n // Input setter for two-way binding (though typically read-only)\n this._status = value;\n }\n\n /**\n * Emits when a response is provided by the user.\n */\n @Output() responseProvided = new EventEmitter<unknown>();\n\n /**\n * Emits when the tool execution starts.\n */\n @Output() executionStarted = new EventEmitter<any>();\n\n /**\n * Emits when the tool execution completes.\n */\n @Output() executionCompleted = new EventEmitter<unknown>();\n\n ngOnInit(): void {\n if (this.enabled) {\n this.registerTool();\n }\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n const relevantChanges =\n changes[\"name\"] ||\n changes[\"description\"] ||\n changes[\"args\"] ||\n changes[\"render\"] ||\n changes[\"enabled\"];\n\n if (relevantChanges && !relevantChanges.firstChange) {\n // Re-register the tool with new configuration\n this.unregisterTool();\n if (this.enabled) {\n this.registerTool();\n }\n }\n }\n\n ngOnDestroy(): void {\n this.unregisterTool();\n }\n\n /**\n * Programmatically trigger a response.\n * Useful when the directive is used as a controller.\n */\n respond(result: unknown): void {\n this.handleResponse(result);\n }\n\n private registerTool(): void {\n if (!this.name || !this.description || !this.parameters || !this.render) {\n if (isDevMode()) {\n throw new Error(\n \"CopilotKitHumanInTheLoopDirective: Missing required inputs. \" +\n \"Required: name, description, parameters, and render.\"\n );\n }\n return;\n }\n\n // Create handler that returns a Promise\n const handler = async (args: T): Promise<unknown> => {\n return new Promise((resolve) => {\n this.updateStatus(ToolCallStatus.Executing);\n this.resolvePromise = resolve;\n this.executionStarted.emit(args);\n });\n };\n\n // Create the frontend tool with enhanced render\n const frontendTool: AngularFrontendTool<T> = {\n name: this.name,\n description: this.description,\n parameters: this.parameters,\n handler,\n render: this.render, // Will be enhanced by the render component\n };\n\n // Add the tool (returns void, so we use the tool name as ID)\n this.copilotkit.copilotkit.addTool(frontendTool);\n this.toolId = this.name;\n\n // Register the render with respond capability\n this.copilotkit.registerToolRender(this.name, {\n name: this.name,\n render: this.createEnhancedRender(),\n });\n }\n\n private unregisterTool(): void {\n if (this.toolId) {\n this.copilotkit.copilotkit.removeTool(this.toolId);\n this.copilotkit.unregisterToolRender(this.name);\n this.toolId = undefined;\n }\n }\n\n private createEnhancedRender(): Type<any> | TemplateRef<any> {\n // If it's a template, we need to wrap it with our respond function\n // This is handled by returning a special marker that the render component\n // will recognize and enhance with the respond function\n\n // Store reference to this directive instance for the render component\n (this.render as any).__humanInTheLoopDirective = this;\n (this.render as any).__humanInTheLoopStatus = this.statusSignal;\n\n return this.render;\n }\n\n private handleResponse(result: unknown): void {\n if (this.resolvePromise) {\n this.resolvePromise(result);\n this.updateStatus(ToolCallStatus.Complete);\n this.resolvePromise = null;\n this.responseProvided.emit(result);\n this.executionCompleted.emit(result);\n }\n }\n\n private updateStatus(status: ToolCallStatus): void {\n this._status = status;\n this.statusSignal.set(status);\n this.statusChange.emit(status);\n }\n}\n\n/**\n * Helper directive to provide respond function in templates.\n * This would be used internally by the tool render component.\n *\n * @internal\n */\n@Directive({\n selector: \"[copilotkitHumanInTheLoopRespond]\",\n standalone: true,\n})\nexport class CopilotKitHumanInTheLoopRespondDirective {\n @Input() copilotkitHumanInTheLoopRespond?: (result: unknown) => Promise<void>;\n\n /**\n * Convenience method for templates to call respond.\n */\n respond(result: unknown): void {\n this.copilotkitHumanInTheLoopRespond?.(result);\n }\n}\n","import {\n Directive,\n Input,\n Output,\n EventEmitter,\n OnInit,\n OnChanges,\n OnDestroy,\n SimpleChanges,\n Optional,\n isDevMode,\n Inject,\n} from \"@angular/core\";\nimport { CopilotChatConfigurationService } from \"../core/chat-configuration/chat-configuration.service\";\nimport {\n CopilotChatConfiguration,\n CopilotChatLabels,\n} from \"../core/chat-configuration/chat-configuration.types\";\n\n/**\n * Directive for configuring CopilotKit chat settings declaratively in templates.\n * Works with the CopilotChatConfigurationService to provide reactive chat configuration.\n *\n * @example\n * ```html\n * <!-- Basic usage with individual inputs -->\n * <div copilotkitChatConfig\n * [labels]=\"customLabels\"\n * [inputValue]=\"currentInput\"\n * (submitInput)=\"onSubmit($event)\"\n * (changeInput)=\"onChange($event)\">\n * <!-- Chat UI components -->\n * </div>\n *\n * <!-- Using configuration object -->\n * <div [copilotkitChatConfig]=\"chatConfig\">\n * <!-- Chat UI components -->\n * </div>\n *\n * <!-- Two-way binding for input value -->\n * <div copilotkitChatConfig\n * [(value)]=\"chatInput\"\n * (submitInput)=\"handleSubmit($event)\">\n * <!-- Chat UI components -->\n * </div>\n * ```\n */\n@Directive({\n selector: \"[copilotkitChatConfig]\",\n standalone: true,\n})\nexport class CopilotKitChatConfigDirective\n implements OnInit, OnChanges, OnDestroy\n{\n private _value?: string;\n private submitHandler?: (value: string) => void;\n private changeHandler?: (value: string) => void;\n\n constructor(\n @Optional()\n @Inject(CopilotChatConfigurationService)\n private readonly chatConfig: CopilotChatConfigurationService | null\n ) {}\n\n /**\n * Partial labels to override defaults\n */\n @Input() labels?: Partial<CopilotChatLabels>;\n\n /**\n * The current input value\n */\n @Input() inputValue?: string;\n\n /**\n * Event emitted when input is submitted\n */\n @Output() submitInput = new EventEmitter<string>();\n\n /**\n * Event emitted when input value changes\n */\n @Output() changeInput = new EventEmitter<string>();\n\n /**\n * Alternative: accept full configuration object\n */\n @Input(\"copilotkitChatConfig\")\n set config(value: CopilotChatConfiguration | undefined) {\n if (value) {\n if (value.labels) this.labels = value.labels;\n if (value.inputValue !== undefined) this.inputValue = value.inputValue;\n // Store handlers for later setup\n if (value.onSubmitInput) this.submitHandler = value.onSubmitInput;\n if (value.onChangeInput) this.changeHandler = value.onChangeInput;\n }\n }\n\n /**\n * Two-way binding for input value\n */\n @Input()\n get value(): string | undefined {\n return this._value;\n }\n set value(v: string | undefined) {\n this._value = v;\n this.valueChange.emit(v);\n if (v !== undefined) {\n this.updateInputValue(v);\n }\n }\n\n /**\n * Two-way binding output for value\n */\n @Output() valueChange = new EventEmitter<string | undefined>();\n\n ngOnInit(): void {\n if (!this.chatConfig) {\n if (isDevMode()) {\n console.warn(\n \"CopilotKitChatConfigDirective: No CopilotChatConfigurationService found. \" +\n \"Make sure to provide it using provideCopilotChatConfiguration().\"\n );\n }\n return;\n }\n\n this.updateConfiguration();\n this.setupHandlers();\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (!this.chatConfig) {\n return;\n }\n\n const relevantChanges =\n changes[\"labels\"] || changes[\"inputValue\"] || changes[\"value\"];\n\n if (relevantChanges && !relevantChanges.firstChange) {\n this.updateConfiguration();\n }\n }\n\n ngOnDestroy(): void {\n // Cleanup if needed\n }\n\n /**\n * Submit the current input value\n */\n submit(value: string): void {\n // Emit to template binding\n this.submitInput.emit(value);\n\n // Call service handler\n if (this.chatConfig) {\n this.chatConfig.submitInput(value);\n }\n\n // Call provided handler\n if (this.submitHandler) {\n this.submitHandler(value);\n }\n }\n\n /**\n * Handle input value change\n */\n change(value: string): void {\n // Update internal value\n this._value = value;\n\n // Emit to template bindings\n this.changeInput.emit(value);\n this.valueChange.emit(value);\n\n // Call service handler\n if (this.chatConfig) {\n this.chatConfig.changeInput(value);\n }\n\n // Call provided handler\n if (this.changeHandler) {\n this.changeHandler(value);\n }\n }\n\n private updateConfiguration(): void {\n if (!this.chatConfig) {\n return;\n }\n\n // Update labels if provided\n if (this.labels) {\n this.chatConfig.setLabels(this.labels);\n }\n\n // Update input value if provided\n const valueToSet =\n this._value !== undefined ? this._value : this.inputValue;\n if (valueToSet !== undefined) {\n this.chatConfig.setInputValue(valueToSet);\n }\n }\n\n private updateInputValue(value: string): void {\n if (this.chatConfig) {\n this.chatConfig.setInputValue(value);\n this.chatConfig.changeInput(value);\n }\n }\n\n private setupHandlers(): void {\n if (!this.chatConfig) {\n return;\n }\n\n // Create composite handlers that call both service and directive handlers\n const submitComposite = (value: string) => {\n this.submitInput.emit(value);\n if (this.submitHandler) {\n this.submitHandler(value);\n }\n };\n\n const changeComposite = (value: string) => {\n this.changeInput.emit(value);\n this.valueChange.emit(value);\n if (this.changeHandler) {\n this.changeHandler(value);\n }\n };\n\n // Set handlers on the service\n this.chatConfig.setSubmitHandler(submitComposite);\n this.chatConfig.setChangeHandler(changeComposite);\n }\n}\n","import {\n Component,\n Input,\n ViewContainerRef,\n TemplateRef,\n Type,\n OnChanges,\n SimpleChanges,\n ComponentRef,\n inject,\n ViewChild,\n AfterViewInit,\n} from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\nimport { CopilotKitService } from \"../core/copilotkit.service\";\nimport type {\n ToolCallProps,\n AngularToolCallRender,\n} from \"../core/copilotkit.types\";\nimport { ToolCallStatus } from \"../core/copilotkit.types\";\n\n@Component({\n selector: \"copilotkit-tool-render\",\n standalone: true,\n imports: [CommonModule],\n template: `\n <ng-container #dynamicContainer></ng-container>\n <ng-container *ngIf=\"templateRef && templateContext\">\n <ng-container\n *ngTemplateOutlet=\"templateRef; context: templateContext\"\n ></ng-container>\n </ng-container>\n `,\n})\nexport class CopilotKitToolRenderComponent implements OnChanges, AfterViewInit {\n @Input() toolName!: string;\n @Input() args: any;\n @Input() status: ToolCallStatus = ToolCallStatus.InProgress;\n @Input() result?: any;\n @Input() description?: string;\n\n @ViewChild(\"dynamicContainer\", { read: ViewContainerRef, static: true })\n private container!: ViewContainerRef;\n\n private copilotkit = inject(CopilotKitService);\n private componentRef?: ComponentRef<any>;\n\n templateRef?: TemplateRef<any>;\n templateContext?: any;\n\n ngAfterViewInit(): void {\n this.renderTool();\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (\n changes[\"toolName\"] ||\n changes[\"args\"] ||\n changes[\"status\"] ||\n changes[\"result\"]\n ) {\n this.renderTool();\n }\n }\n\n private renderTool(): void {\n // Clear existing component\n if (this.componentRef) {\n this.componentRef.destroy();\n this.componentRef = undefined;\n }\n\n // Clear template\n this.templateRef = undefined;\n this.templateContext = undefined;\n\n if (!this.toolName) {\n return;\n }\n\n // Get the tool render configuration\n const toolRender = this.copilotkit.getToolRender(this.toolName) as\n | AngularToolCallRender\n | undefined;\n\n if (!toolRender) {\n console.warn(`No render found for tool: ${this.toolName}`);\n return;\n }\n\n // Prepare props to pass to the component\n const props: ToolCallProps<any> = {\n name: this.toolName,\n description: this.description || \"\",\n args: this.args,\n status: this.status,\n result: this.result,\n };\n\n // Check if render is a Component class or TemplateRef\n if (this.isComponentClass(toolRender.render)) {\n // Create component dynamically\n this.renderComponent(toolRender.render, props);\n } else if (this.isTemplateRef(toolRender.render)) {\n // Use template\n this.renderTemplate(toolRender.render, props);\n } else {\n console.error(`Invalid render type for tool: ${this.toolName}`);\n }\n }\n\n private renderComponent(\n componentClass: Type<any>,\n props: ToolCallProps\n ): void {\n // Clear the container\n this.container.clear();\n\n // Create the component\n this.componentRef = this.container.createComponent(componentClass);\n\n // Determine declared inputs to avoid NG0303 logs\n const cmpDef: any = (componentClass as any).ɵcmp;\n const declaredInputs = new Set<string>(Object.keys(cmpDef?.inputs ?? {}));\n\n if (declaredInputs.has('props')) {\n this.componentRef.setInput('props', props);\n } else {\n for (const [key, value] of Object.entries(props)) {\n if (declaredInputs.has(key)) {\n this.componentRef.setInput(key, value);\n }\n }\n }\n\n // Trigger change detection\n this.componentRef.changeDetectorRef.detectChanges();\n }\n\n private renderTemplate(\n template: TemplateRef<any>,\n props: ToolCallProps\n ): void {\n this.templateRef = template;\n this.templateContext = {\n $implicit: props,\n name: props.name,\n description: props.description,\n args: props.args,\n status: props.status,\n result: props.result,\n };\n }\n\n private isComponentClass(value: any): value is Type<any> {\n return typeof value === \"function\" && value.prototype;\n }\n\n private isTemplateRef(value: any): value is TemplateRef<any> {\n return value instanceof TemplateRef;\n }\n\n ngOnDestroy(): void {\n if (this.componentRef) {\n this.componentRef.destroy();\n }\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 { Type, TemplateRef, 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> = \n | Type<T>\n | TemplateRef<T>;\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?: any;\n outputs?: Record<string, (event: any) => void>;\n}\n\n/**\n * Injection token for slot configuration\n */\nexport const SLOT_CONFIG = new InjectionToken<ReadonlyMap<string, SlotRegistryEntry>>('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;","import { \n Type, \n TemplateRef, \n ViewContainerRef,\n ComponentRef,\n EmbeddedViewRef,\n Injector,\n inject\n} from '@angular/core';\nimport { SlotValue, RenderSlotOptions, SlotRegistryEntry, SLOT_CONFIG } from './slot.types';\n\n/**\n * Renders a slot value into a ViewContainerRef.\n * This is the core utility for slot rendering.\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> | null {\n const { slot, defaultComponent, props, injector, outputs } = options;\n \n viewContainer.clear();\n \n const effectiveSlot = slot ?? defaultComponent;\n const effectiveInjector = injector ?? viewContainer.injector;\n \n if (effectiveSlot instanceof TemplateRef) {\n // TemplateRef: render template\n return viewContainer.createEmbeddedView(effectiveSlot, {\n $implicit: props ?? {},\n props: props ?? {}\n } as any);\n } else if (isComponentType(effectiveSlot)) {\n // Component type - wrap in try/catch for safety\n try {\n return createComponent(\n viewContainer,\n effectiveSlot as Type<T>,\n props,\n effectiveInjector,\n outputs\n );\n } catch (error) {\n console.warn('Failed to create component:', effectiveSlot, error);\n // Fall through to default component\n }\n }\n \n // Default: render default component if provided\n return defaultComponent ? createComponent(\n viewContainer,\n defaultComponent,\n props,\n effectiveInjector,\n outputs\n ) : null;\n}\n\n/**\n * Creates a component and applies properties.\n */\nfunction createComponent<T>(\n viewContainer: ViewContainerRef,\n component: Type<T>,\n props?: Partial<T>,\n injector?: Injector,\n outputs?: Record<string, (event: any) => void>\n): ComponentRef<T> {\n const componentRef = viewContainer.createComponent(component, {\n injector\n });\n \n if (props) {\n // Apply props using setInput, but only for declared inputs\n const cmpDef: any = (component as any).ɵcmp;\n const declaredInputs = new Set<string>(Object.keys(cmpDef?.inputs ?? {}));\n\n if (declaredInputs.has('props')) {\n componentRef.setInput('props', props as any);\n } else {\n for (const key in props) {\n if (declaredInputs.has(key)) {\n const value = (props as any)[key];\n componentRef.setInput(key, value);\n }\n }\n }\n }\n \n if (outputs) {\n // Wire up output event handlers with proper cleanup\n const instance = componentRef.instance as any;\n const subscriptions: any[] = [];\n \n for (const [eventName, handler] of Object.entries(outputs)) {\n if (instance[eventName]?.subscribe) {\n const subscription = instance[eventName].subscribe(handler);\n subscriptions.push(subscription);\n }\n }\n \n // Register cleanup on component destroy\n componentRef.onDestroy(() => {\n subscriptions.forEach(sub => sub.unsubscribe());\n });\n }\n \n // Trigger change detection\n componentRef.changeDetectorRef.detectChanges();\n \n return componentRef;\n}\n\n\n/**\n * Checks if a value is a component type.\n * Simplified check - rely on try/catch for actual validation.\n */\nexport function isComponentType(value: any): boolean {\n // Arrow functions and regular functions without a prototype are not components\n return typeof value === 'function' && !!value.prototype;\n}\n\n/**\n * Checks if a value is a valid slot value.\n */\nexport function isSlotValue(value: any): 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?: Record<string, (event: any) => void>\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 {\n Component,\n Input,\n TemplateRef,\n ViewContainerRef,\n OnInit,\n OnChanges,\n SimpleChanges,\n Inject,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n ViewChild\n} from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { renderSlot } from './slot.utils';\nimport { Type } from '@angular/core';\n\n/**\n * @internal - This component is for internal use only.\n * Simple slot component for rendering custom content or defaults.\n * Supports templates and components only.\n * \n * @example\n * ```html\n * <!-- With template -->\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 standalone: true,\n imports: [CommonModule],\n template: `\n <!-- If slot template provided, render it -->\n <ng-container *ngIf=\"slot && isTemplate(slot)\"\n [ngTemplateOutlet]=\"slot\"\n [ngTemplateOutletContext]=\"context || {}\">\n </ng-container>\n \n <!-- If not a template, we'll handle in code -->\n <ng-container #slotContainer></ng-container>\n \n <!-- Default content (only shown if no slot) -->\n <ng-content *ngIf=\"!slot && !defaultComponent\"></ng-content>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class CopilotSlotComponent implements OnInit, OnChanges {\n @Input() slot?: TemplateRef<any> | Type<any>;\n @Input() context?: any;\n @Input() defaultComponent?: Type<any>;\n @Input() outputs?: Record<string, (event: any) => void>;\n \n @ViewChild('slotContainer', { read: ViewContainerRef, static: true }) \n private slotContainer!: ViewContainerRef;\n \n private componentRef?: any;\n \n constructor(\n @Inject(ViewContainerRef) private viewContainer: ViewContainerRef,\n private cdr: ChangeDetectorRef\n ) {}\n \n ngOnInit(): void {\n this.renderSlot();\n }\n \n ngOnChanges(changes: SimpleChanges): void {\n if (changes['slot']) {\n // Slot changed, need to re-render completely\n this.renderSlot();\n } else if (changes['context'] && this.componentRef) {\n // Just context changed, update existing component\n this.updateComponentProps();\n this.cdr.detectChanges();\n } else if (changes['context']) {\n // No component ref yet, render the slot\n this.renderSlot();\n }\n }\n \n isTemplate(value: any): value is TemplateRef<any> {\n return value instanceof TemplateRef;\n }\n \n private renderSlot(): void {\n // Skip if it's a template (handled by ngTemplateOutlet)\n if (this.slot && this.isTemplate(this.slot)) {\n this.componentRef = null;\n return;\n }\n \n // Clear previous content\n this.slotContainer.clear();\n this.componentRef = null;\n \n // Skip if no slot and no default component\n if (!this.slot && !this.defaultComponent) {\n return;\n }\n \n // Use the utility to render other slot types\n if (this.slot || this.defaultComponent) {\n this.componentRef = renderSlot(this.slotContainer, {\n slot: this.slot,\n defaultComponent: this.defaultComponent!,\n props: this.context,\n outputs: this.outputs\n });\n }\n }\n \n private updateComponentProps(): void {\n if (!this.componentRef || !this.componentRef.instance) {\n return;\n }\n \n const props = this.context;\n \n // Update props using setInput, only for declared inputs\n if (props) {\n const ctor = this.componentRef.instance.constructor as any;\n const cmpDef: any = ctor?.ɵcmp;\n const declaredInputs = new Set<string>(Object.keys(cmpDef?.inputs ?? {}));\n\n if (declaredInputs.has('props')) {\n this.componentRef.setInput('props', props);\n } else {\n for (const key in props) {\n if (declaredInputs.has(key)) {\n const value = props[key];\n this.componentRef.setInput(key, value);\n }\n }\n }\n }\n \n // Trigger change detection\n if (this.componentRef.changeDetectorRef) {\n this.componentRef.changeDetectorRef.detectChanges();\n }\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}","import {\n Component,\n Input,\n Output,\n EventEmitter,\n ElementRef,\n AfterViewInit,\n OnChanges,\n SimpleChanges,\n signal,\n computed,\n effect,\n inject,\n ChangeDetectionStrategy,\n ViewEncapsulation\n} from '@angular/core';\nimport { CopilotChatConfigurationService } from '../../core/chat-configuration/chat-configuration.service';\nimport { cn } from '../../lib/utils';\n\n@Component({\n selector: 'textarea[copilotChatTextarea]',\n standalone: true,\n imports: [],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n '[value]': 'value()',\n '[placeholder]': 'placeholder()',\n '[disabled]': 'disabled()',\n '[class]': 'computedClass()',\n '[style.max-height.px]': 'maxHeight()',\n '[style.overflow]': \"'auto'\",\n '[style.resize]': \"'none'\",\n '(input)': 'onInput($event)',\n '(keydown)': 'onKeyDown($event)',\n '[attr.rows]': '1'\n },\n template: '',\n styles: []\n})\nexport class CopilotChatTextareaComponent implements AfterViewInit, OnChanges {\n private elementRef = inject(ElementRef<HTMLTextAreaElement>);\n get textareaRef() { return this.elementRef; }\n \n @Input() set inputValue(val: string | undefined) {\n this.value.set(val || '');\n }\n @Input() set inputPlaceholder(val: string | undefined) {\n this.customPlaceholder.set(val);\n }\n @Input() set inputMaxRows(val: number | undefined) {\n this.maxRows.set(val || 5);\n }\n @Input() set inputAutoFocus(val: boolean | undefined) {\n this.autoFocus.set(val ?? true);\n }\n @Input() set inputDisabled(val: boolean | undefined) {\n this.disabled.set(val || false);\n }\n @Input() set inputClass(val: string | undefined) {\n this.customClass.set(val);\n }\n \n @Output() valueChange = new EventEmitter<string>();\n @Output() keyDown = new EventEmitter<KeyboardEvent>();\n \n private chatConfig = inject(CopilotChatConfigurationService);\n \n // Signals for reactive state\n value = signal<string>('');\n customPlaceholder = signal<string | undefined>(undefined);\n maxRows = signal<number>(5);\n autoFocus = signal<boolean>(true);\n disabled = signal<boolean>(false);\n customClass = signal<string | undefined>(undefined);\n maxHeight = signal<number>(0);\n \n // Computed values\n placeholder = computed(() => {\n return this.customPlaceholder() || this.chatConfig.labels().chatInputPlaceholder;\n });\n \n computedClass = computed(() => {\n const baseClasses = cn(\n // Layout and sizing\n 'w-full p-5 pb-0',\n // Behavior\n 'outline-none resize-none',\n // Background\n 'bg-transparent',\n // Typography\n 'antialiased font-regular leading-relaxed text-[16px]',\n // Placeholder styles\n 'placeholder:text-[#00000077] dark:placeholder:text-[#fffc]'\n );\n return cn(baseClasses, this.customClass());\n });\n \n constructor() {\n // Effect to sync value with chat configuration if available\n effect(\n () => {\n const configValue = this.chatConfig.inputValue();\n if (configValue !== undefined && !this.customPlaceholder()) {\n this.value.set(configValue);\n }\n },\n { allowSignalWrites: true }\n );\n }\n \n ngAfterViewInit(): void {\n this.calculateMaxHeight();\n this.adjustHeight();\n \n if (this.autoFocus()) {\n setTimeout(() => {\n this.elementRef.nativeElement.focus();\n });\n }\n }\n \n ngOnChanges(changes: SimpleChanges): void {\n if (changes['inputMaxRows']) {\n this.calculateMaxHeight();\n }\n }\n \n onInput(event: Event): void {\n const textarea = event.target as HTMLTextAreaElement;\n const newValue = textarea.value;\n \n this.value.set(newValue);\n this.valueChange.emit(newValue);\n \n // Update chat configuration if available\n if (this.chatConfig) {\n this.chatConfig.setInputValue(newValue);\n }\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.maxRows();\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 = 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.value();\n }\n \n /**\n * Public method to set value programmatically\n */\n setValue(value: string): void {\n this.value.set(value);\n this.valueChange.emit(value);\n \n if (this.chatConfig) {\n this.chatConfig.setInputValue(value);\n }\n \n setTimeout(() => this.adjustHeight());\n }\n}\n","import {\n Component,\n Input,\n Output,\n EventEmitter,\n ViewChild,\n ElementRef,\n AfterViewInit,\n OnDestroy,\n signal,\n computed,\n ChangeDetectionStrategy,\n ViewEncapsulation\n} from '@angular/core';\nimport { AudioRecorderState, AudioRecorderError } from './copilot-chat-input.types';\n\n@Component({\n selector: 'copilot-chat-audio-recorder',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `\n <div [class]=\"computedClass()\">\n <canvas\n #canvasRef\n class=\"w-full h-full\"\n [style.imageRendering]=\"'pixelated'\"\n ></canvas>\n </div>\n `,\n styles: [],\n host: {\n '[class.copilot-chat-audio-recorder]': 'true'\n }\n})\nexport class CopilotChatAudioRecorderComponent implements AfterViewInit, OnDestroy {\n @ViewChild('canvasRef', { static: true }) canvasRef!: ElementRef<HTMLCanvasElement>;\n \n @Input() set inputClass(val: string | undefined) {\n this.customClass.set(val);\n }\n \n @Input() set inputShowControls(val: boolean | undefined) {\n this.showControls.set(val ?? false);\n }\n \n @Output() stateChange = new EventEmitter<AudioRecorderState>();\n @Output() error = new EventEmitter<AudioRecorderError>();\n \n // Signals for state management\n state = signal<AudioRecorderState>('idle');\n customClass = signal<string | undefined>(undefined);\n showControls = signal<boolean>(false);\n \n // Computed values\n computedClass = computed(() => {\n const baseClasses = 'h-11 w-full px-5';\n return `${baseClasses} ${this.customClass() || ''}`;\n });\n \n statusText = computed(() => {\n switch (this.state()) {\n case 'recording':\n return 'Recording...';\n case 'processing':\n return 'Processing...';\n default:\n return 'Ready';\n }\n });\n \n // Animation and canvas properties\n private animationFrameId?: number;\n \n ngAfterViewInit(): void {\n this.startAnimation();\n }\n \n ngOnDestroy(): void {\n this.dispose();\n }\n \n /**\n * Start recording audio\n */\n async start(): Promise<void> {\n try {\n if (this.state() === 'recording') {\n return;\n }\n \n this.setState('recording');\n this.startAnimation();\n \n // In a real implementation, this would start actual audio recording\n // For now, we just simulate the recording state\n \n } catch (err) {\n const error = new AudioRecorderError(\n err instanceof Error ? err.message : 'Failed to start recording'\n );\n this.error.emit(error);\n this.setState('idle');\n throw error;\n }\n }\n \n /**\n * Stop recording audio and return blob\n */\n async stop(): Promise<Blob> {\n try {\n this.setState('idle');\n // Return empty blob - stub implementation\n const emptyBlob = new Blob([], { type: 'audio/webm' });\n return emptyBlob;\n } catch (err) {\n const error = new AudioRecorderError(\n err instanceof Error ? err.message : 'Failed to stop recording'\n );\n this.error.emit(error);\n this.setState('idle');\n throw error;\n }\n }\n \n /**\n * Get current recorder state\n */\n getState(): AudioRecorderState {\n return this.state();\n }\n \n /**\n * Dispose of resources\n */\n dispose(): void {\n this.stopAnimation();\n }\n\n private setState(state: AudioRecorderState): void {\n this.state.set(state);\n this.stateChange.emit(state);\n }\n \n private startAnimation(): void {\n const canvas = this.canvasRef.nativeElement;\n if (!canvas) return;\n\n const ctx = canvas.getContext('2d');\n if (!ctx) return;\n\n const draw = () => {\n const rect = canvas.getBoundingClientRect();\n const dpr = window.devicePixelRatio || 1;\n\n // Update canvas dimensions if container resized\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 ctx.imageSmoothingEnabled = false;\n }\n\n // Configuration\n const barWidth = 2;\n const minHeight = 2;\n const maxHeight = 20;\n const gap = 2;\n const numSamples = Math.ceil(rect.width / (barWidth + gap));\n\n // Get loudness data\n const loudnessData = this.getLoudness(numSamples);\n\n // Clear canvas\n ctx.clearRect(0, 0, rect.width, rect.height);\n\n // Get current foreground color\n const computedStyle = getComputedStyle(canvas);\n const currentForeground = computedStyle.color;\n\n // Draw bars\n ctx.fillStyle = currentForeground;\n const centerY = rect.height / 2;\n\n for (let i = 0; i < loudnessData.length; i++) {\n const sample = loudnessData[i] ?? 0;\n const barHeight = Math.round(\n sample * (maxHeight - minHeight) + minHeight\n );\n const x = Math.round(i * (barWidth + gap));\n const y = Math.round(centerY - barHeight / 2);\n\n ctx.fillRect(x, y, barWidth, barHeight);\n }\n\n this.animationFrameId = requestAnimationFrame(draw);\n };\n\n draw();\n }\n \n private stopAnimation(): void {\n if (this.animationFrameId) {\n cancelAnimationFrame(this.animationFrameId);\n this.animationFrameId = undefined;\n }\n }\n\n private getLoudness(n: number): number[] {\n const elapsed = Date.now() / 1000; // Use current timestamp directly\n const samples: number[] = [];\n\n for (let i = 0; i < n; i++) {\n // Create a position that moves from left to right over time\n const position = (i / n) * 10 + elapsed * 0.5; // Scroll speed (slower)\n\n // Generate waveform using multiple sine waves for realism\n const wave1 = Math.sin(position * 2) * 0.3;\n const wave2 = Math.sin(position * 5 + elapsed) * 0.2;\n const wave3 = Math.sin(position * 0.5 + elapsed * 0.3) * 0.4;\n\n // Add some randomness for natural variation\n const noise = (Math.random() - 0.5) * 0.1;\n\n // Combine waves and add envelope for realistic amplitude variation\n const envelope = Math.sin(elapsed * 0.7) * 0.5 + 0.5; // Slow amplitude modulation\n let amplitude = (wave1 + wave2 + wave3 + noise) * envelope;\n\n // Clamp to 0-1 range\n amplitude = Math.max(0, Math.min(1, amplitude * 0.5 + 0.3));\n\n samples.push(amplitude);\n }\n\n return samples;\n }\n}","import {\n Component,\n Input,\n Output,\n EventEmitter,\n ChangeDetectionStrategy,\n inject,\n signal,\n computed,\n ViewEncapsulation\n} from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { \n LucideAngularModule,\n ArrowUp,\n Mic,\n X,\n Check,\n Plus\n} from 'lucide-angular';\nimport { CopilotChatConfigurationService } from '../../core/chat-configuration/chat-configuration.service';\nimport { CopilotTooltipDirective } from '../../lib/directives/tooltip.directive';\nimport { cn } from '../../lib/utils';\n\n// Base button classes matching React's button variants\nconst buttonBase = cn(\n 'inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium',\n 'transition-all disabled:pointer-events-none disabled:opacity-50',\n 'shrink-0 outline-none',\n 'focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]'\n);\n\nconst chatInputToolbarPrimary = cn(\n 'cursor-pointer',\n // Background and text\n 'bg-black text-white',\n // Dark mode\n 'dark:bg-white dark:text-black dark:focus-visible:outline-white',\n // Shape and sizing\n 'rounded-full h-9 w-9',\n // Interactions\n 'transition-colors',\n // Focus states\n 'focus:outline-none',\n // Hover states\n 'hover:opacity-70 disabled:hover:opacity-100',\n // Disabled states\n 'disabled:cursor-not-allowed disabled:bg-[#00000014] disabled:text-[rgb(13,13,13)]',\n 'dark:disabled:bg-[#454545] dark:disabled:text-white'\n);\n\nconst chatInputToolbarSecondary = cn(\n 'cursor-pointer',\n // Background and text\n 'bg-transparent text-[#444444]',\n // Dark mode\n 'dark:text-white dark:border-[#404040]',\n // Shape and sizing\n 'rounded-full h-9 w-9',\n // Interactions\n 'transition-colors',\n // Focus states\n 'focus:outline-none',\n // Hover states\n 'hover:bg-[#f8f8f8] hover:text-[#333333]',\n 'dark:hover:bg-[#404040] dark:hover:text-[#FFFFFF]',\n // Disabled states\n 'disabled:cursor-not-allowed disabled:opacity-50',\n 'disabled:hover:bg-transparent disabled:hover:text-[#444444]',\n 'dark:disabled:hover:bg-transparent dark:disabled:hover:text-[#CCCCCC]'\n);\n\n@Component({\n selector: 'copilot-chat-send-button',\n standalone: true,\n imports: [CommonModule, LucideAngularModule],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `\n <div class=\"mr-[10px]\">\n <button\n type=\"button\"\n [disabled]=\"disabled\"\n [class]=\"buttonClass\"\n (click)=\"onClick()\"\n >\n <lucide-angular [img]=\"ArrowUpIcon\" [size]=\"18\"></lucide-angular>\n </button>\n </div>\n `,\n styles: [``]\n})\nexport class CopilotChatSendButtonComponent {\n @Input() disabled = false;\n @Output() clicked = new EventEmitter<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 standalone: true,\n imports: [CommonModule, LucideAngularModule, CopilotTooltipDirective],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `\n <button\n type=\"button\"\n [disabled]=\"disabled\"\n [class]=\"buttonClass\"\n [copilotTooltip]=\"label\"\n tooltipPosition=\"below\"\n (click)=\"onClick()\"\n >\n <lucide-angular [img]=\"MicIcon\" [size]=\"18\"></lucide-angular>\n </button>\n `,\n styles: [``]\n})\nexport class CopilotChatStartTranscribeButtonComponent {\n @Input() disabled = false;\n @Output() clicked = new EventEmitter<void>();\n \n private chatConfig = inject(CopilotChatConfigurationService);\n \n readonly MicIcon = Mic;\n buttonClass = cn(buttonBase, chatInputToolbarSecondary, 'mr-2');\n \n get label(): string {\n return this.chatConfig.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 standalone: true,\n imports: [CommonModule, LucideAngularModule, CopilotTooltipDirective],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `\n <button\n type=\"button\"\n [disabled]=\"disabled\"\n [class]=\"buttonClass\"\n [copilotTooltip]=\"label\"\n tooltipPosition=\"below\"\n (click)=\"onClick()\"\n >\n <lucide-angular [img]=\"XIcon\" [size]=\"18\"></lucide-angular>\n </button>\n `,\n styles: [``]\n})\nexport class CopilotChatCancelTranscribeButtonComponent {\n @Input() disabled = false;\n @Output() clicked = new EventEmitter<void>();\n \n private chatConfig = inject(CopilotChatConfigurationService);\n \n readonly XIcon = X;\n buttonClass = cn(buttonBase, chatInputToolbarSecondary, 'mr-2');\n \n get label(): string {\n return this.chatConfig.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 standalone: true,\n imports: [CommonModule, LucideAngularModule, CopilotTooltipDirective],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `\n <button\n type=\"button\"\n [disabled]=\"disabled\"\n [class]=\"buttonClass\"\n [copilotTooltip]=\"label\"\n tooltipPosition=\"below\"\n (click)=\"onClick()\"\n >\n <lucide-angular [img]=\"CheckIcon\" [size]=\"18\"></lucide-angular>\n </button>\n `,\n styles: [``]\n})\nexport class CopilotChatFinishTranscribeButtonComponent {\n @Input() disabled = false;\n @Output() clicked = new EventEmitter<void>();\n \n private chatConfig = inject(CopilotChatConfigurationService);\n \n readonly CheckIcon = Check;\n buttonClass = cn(buttonBase, chatInputToolbarSecondary, 'mr-[10px]');\n \n get label(): string {\n return this.chatConfig.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 standalone: true,\n imports: [CommonModule, LucideAngularModule, CopilotTooltipDirective],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `\n <button\n type=\"button\"\n [disabled]=\"disabled\"\n [class]=\"buttonClass\"\n [copilotTooltip]=\"label\"\n tooltipPosition=\"below\"\n (click)=\"onClick()\"\n >\n <lucide-angular [img]=\"PlusIcon\" [size]=\"20\"></lucide-angular>\n </button>\n `,\n styles: [``]\n})\nexport class CopilotChatAddFileButtonComponent {\n @Input() disabled = false;\n @Output() clicked = new EventEmitter<void>();\n \n private chatConfig = inject(CopilotChatConfigurationService);\n \n readonly PlusIcon = Plus;\n buttonClass = cn(buttonBase, chatInputToolbarSecondary, 'ml-2');\n \n get label(): string {\n return this.chatConfig.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 standalone: true,\n imports: [CommonModule, CopilotTooltipDirective],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `\n <button\n type=\"button\"\n [disabled]=\"disabled()\"\n [class]=\"computedClass()\"\n [copilotTooltip]=\"title()\"\n tooltipPosition=\"below\"\n (click)=\"onClick()\"\n >\n <ng-content></ng-content>\n </button>\n `,\n styles: [``]\n})\nexport class CopilotChatToolbarButtonComponent {\n disabled = signal(false);\n variant = signal<'primary' | 'secondary'>('secondary');\n customClass = signal('');\n title = signal('');\n \n @Output() clicked = new EventEmitter<void>();\n \n computedClass = computed(() => {\n const variantClass = 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 signal,\n computed,\n ChangeDetectionStrategy,\n ViewEncapsulation\n} from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { cn } from '../../lib/utils';\n\n@Component({\n selector: 'div[copilotChatToolbar]',\n standalone: true,\n imports: [CommonModule],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n '[class]': 'computedClass()'\n },\n template: `<ng-content></ng-content>`,\n styles: []\n})\nexport class CopilotChatToolbarComponent {\n @Input() set inputClass(val: string | undefined) {\n this.customClass.set(val);\n }\n \n customClass = signal<string | undefined>(undefined);\n \n computedClass = computed(() => {\n const baseClasses = 'w-full h-[60px] bg-transparent flex items-center justify-between';\n return cn(baseClasses, this.customClass());\n });\n}","import {\n Component,\n Input,\n signal,\n computed,\n inject,\n ChangeDetectionStrategy,\n ViewEncapsulation\n} from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { CdkMenuModule } from '@angular/cdk/menu';\nimport { OverlayModule } from '@angular/cdk/overlay';\nimport { LucideAngularModule, Settings2, ChevronRight } from 'lucide-angular';\nimport { CopilotChatConfigurationService } from '../../core/chat-configuration/chat-configuration.service';\nimport type { ToolsMenuItem } from './copilot-chat-input.types';\nimport { cn } from '../../lib/utils';\n\n@Component({\n selector: 'copilot-chat-tools-menu',\n standalone: true,\n imports: [\n CommonModule,\n CdkMenuModule,\n OverlayModule,\n LucideAngularModule\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `\n @if (hasItems()) {\n <button\n type=\"button\"\n [disabled]=\"disabled()\"\n [class]=\"buttonClass()\"\n [cdkMenuTriggerFor]=\"menu\"\n >\n <lucide-angular [img]=\"Settings2Icon\" [size]=\"18\"></lucide-angular>\n <span class=\"text-sm font-normal\">{{ label() }}</span>\n </button>\n \n <ng-template #menu>\n <div class=\"min-w-[200px] bg-white dark:bg-[#1F1F1F] border border-gray-200 dark:border-gray-700 rounded-lg shadow-lg p-1\"\n cdkMenu>\n @for (item of toolsMenu(); track $index) {\n @if (item === '-') {\n <div class=\"h-px bg-gray-200 dark:bg-gray-700 my-1\"></div>\n } @else if (isMenuItem(item)) {\n @if (item.items && item.items.length > 0) {\n <!-- Submenu trigger -->\n <button\n type=\"button\"\n class=\"w-full px-3 py-2 text-left bg-transparent border-none rounded hover:bg-gray-100 dark:hover:bg-gray-800 cursor-pointer text-sm flex items-center justify-between\"\n [cdkMenuTriggerFor]=\"submenu\"\n cdkMenuItem\n >\n {{ item.label }}\n <lucide-angular [img]=\"ChevronRightIcon\" [size]=\"12\" class=\"ml-auto\"></lucide-angular>\n </button>\n \n <!-- Submenu template -->\n <ng-template #submenu>\n <div class=\"min-w-[200px] bg-white dark:bg-[#1F1F1F] border border-gray-200 dark:border-gray-700 rounded-lg shadow-lg p-1\"\n cdkMenu>\n @for (subItem of item.items; track $index) {\n @if (subItem === '-') {\n <div class=\"h-px bg-gray-200 dark:bg-gray-700 my-1\"></div>\n } @else if (isMenuItem(subItem)) {\n <button\n type=\"button\"\n class=\"w-full px-3 py-2 text-left bg-transparent border-none rounded hover:bg-gray-100 dark:hover:bg-gray-800 cursor-pointer text-sm\"\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=\"w-full px-3 py-2 text-left bg-transparent border-none rounded hover:bg-gray-100 dark:hover:bg-gray-800 cursor-pointer text-sm\"\n (click)=\"handleItemClick(item)\"\n cdkMenuItem\n >\n {{ item.label }}\n </button>\n }\n }\n }\n </div>\n </ng-template>\n }\n `,\n styles: [`\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})\nexport class CopilotChatToolsMenuComponent {\n readonly Settings2Icon = Settings2;\n readonly ChevronRightIcon = ChevronRight;\n \n @Input() set inputToolsMenu(val: (ToolsMenuItem | '-')[] | undefined) {\n this.toolsMenu.set(val || []);\n }\n @Input() set inputDisabled(val: boolean | undefined) {\n this.disabled.set(val || false);\n }\n @Input() set inputClass(val: string | undefined) {\n this.customClass.set(val);\n }\n \n private chatConfig = inject(CopilotChatConfigurationService);\n \n toolsMenu = signal<(ToolsMenuItem | '-')[]>([]);\n disabled = signal<boolean>(false);\n customClass = signal<string | undefined>(undefined);\n \n hasItems = computed(() => this.toolsMenu().length > 0);\n \n label = computed(() => this.chatConfig.labels().chatInputToolbarToolsButtonLabel);\n \n buttonClass = computed(() => {\n const baseClasses = cn(\n // Base button styles\n 'inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-full text-sm font-medium',\n 'transition-all disabled:pointer-events-none disabled:opacity-50',\n 'shrink-0 outline-none',\n 'focus-visible:ring-[3px]',\n // chatInputToolbarSecondary variant\n 'cursor-pointer',\n 'bg-transparent text-[#444444]',\n 'dark:text-white dark:border-[#404040]',\n 'transition-colors',\n 'focus:outline-none',\n 'hover:bg-[#f8f8f8] hover:text-[#333333]',\n 'dark:hover:bg-[#404040] dark:hover:text-[#FFFFFF]',\n 'disabled:cursor-not-allowed disabled:opacity-50',\n 'disabled:hover:bg-transparent disabled:hover:text-[#444444]',\n 'dark:disabled:hover:bg-transparent dark:disabled:hover:text-[#CCCCCC]',\n // Size\n 'h-9 px-3 gap-2 font-normal'\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 Input,\n Output,\n EventEmitter,\n ViewChild,\n TemplateRef,\n signal,\n computed,\n effect,\n inject,\n ChangeDetectionStrategy,\n AfterViewInit,\n OnDestroy,\n Type,\n ViewEncapsulation,\n ContentChild\n} from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { CopilotSlotComponent } from '../../lib/slots/copilot-slot.component';\nimport { CopilotChatConfigurationService } from '../../core/chat-configuration/chat-configuration.service';\nimport { LucideAngularModule, ArrowUp } from 'lucide-angular';\nimport { CopilotChatTextareaComponent } from './copilot-chat-textarea.component';\nimport { CopilotChatAudioRecorderComponent } from './copilot-chat-audio-recorder.component';\nimport {\n CopilotChatSendButtonComponent,\n CopilotChatStartTranscribeButtonComponent,\n CopilotChatCancelTranscribeButtonComponent,\n CopilotChatFinishTranscribeButtonComponent,\n CopilotChatAddFileButtonComponent\n} from './copilot-chat-buttons.component';\nimport { CopilotChatToolbarComponent } from './copilot-chat-toolbar.component';\nimport { CopilotChatToolsMenuComponent } from './copilot-chat-tools-menu.component';\nimport type {\n CopilotChatInputMode,\n ToolsMenuItem\n} from './copilot-chat-input.types';\nimport { cn } from '../../lib/utils';\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 standalone: true,\n imports: [\n CommonModule,\n CopilotSlotComponent,\n LucideAngularModule,\n CopilotChatTextareaComponent,\n CopilotChatAudioRecorderComponent,\n CopilotChatSendButtonComponent,\n CopilotChatStartTranscribeButtonComponent,\n CopilotChatCancelTranscribeButtonComponent,\n CopilotChatFinishTranscribeButtonComponent,\n CopilotChatAddFileButtonComponent,\n CopilotChatToolbarComponent,\n CopilotChatToolsMenuComponent\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `\n <div [class]=\"computedClass()\">\n <!-- Main input area: either textarea or audio recorder -->\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\n [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 copilotChatTextarea\n [inputValue]=\"computedValue()\"\n [inputAutoFocus]=\"computedAutoFocus()\"\n [inputDisabled]=\"computedMode() === 'processing'\"\n [inputClass]=\"textAreaClass\"\n [inputMaxRows]=\"textAreaMaxRows\"\n [inputPlaceholder]=\"textAreaPlaceholder\"\n (keyDown)=\"handleKeyDown($event)\"\n (valueChange)=\"handleValueChange($event)\"></textarea>\n }\n }\n \n <!-- Toolbar -->\n @if (toolbarTemplate || toolbarComponent) {\n <copilot-slot\n [slot]=\"toolbarTemplate || toolbarComponent\"\n [context]=\"toolbarContext()\"\n [defaultComponent]=\"CopilotChatToolbarComponent\"\n >\n </copilot-slot>\n } @else {\n <div copilotChatToolbar>\n <div class=\"flex items-center\">\n @if (addFile.observed) {\n @if (addFileButtonTemplate || addFileButtonComponent) {\n <copilot-slot\n [slot]=\"addFileButtonTemplate || addFileButtonComponent\"\n [context]=\"{ inputDisabled: computedMode() === 'transcribe' }\"\n [outputs]=\"addFileButtonOutputs\"\n [defaultComponent]=\"CopilotChatAddFileButtonComponent\"\n >\n </copilot-slot>\n } @else {\n <copilot-chat-add-file-button\n [disabled]=\"computedMode() === 'transcribe'\"\n (clicked)=\"handleAddFile()\">\n </copilot-chat-add-file-button>\n }\n }\n @if (computedToolsMenu().length > 0) {\n @if (toolsButtonTemplate || toolsButtonComponent) {\n <copilot-slot\n [slot]=\"toolsButtonTemplate || toolsButtonComponent\"\n [context]=\"toolsContext()\"\n [defaultComponent]=\"CopilotChatToolsMenuComponent\"\n >\n </copilot-slot>\n } @else {\n <copilot-chat-tools-menu\n [inputToolsMenu]=\"computedToolsMenu()\"\n [inputDisabled]=\"computedMode() === 'transcribe'\">\n </copilot-chat-tools-menu>\n }\n }\n @if (additionalToolbarItems) {\n <ng-container *ngTemplateOutlet=\"additionalToolbarItems\"></ng-container>\n }\n </div>\n <div class=\"flex items-center\">\n @if (computedMode() === 'transcribe') {\n @if (cancelTranscribe.observed) {\n @if (cancelTranscribeButtonTemplate || cancelTranscribeButtonComponent) {\n <copilot-slot\n [slot]=\"cancelTranscribeButtonTemplate || cancelTranscribeButtonComponent\"\n [context]=\"{}\"\n [outputs]=\"cancelTranscribeButtonOutputs\"\n [defaultComponent]=\"CopilotChatCancelTranscribeButtonComponent\"\n >\n </copilot-slot>\n } @else {\n <copilot-chat-cancel-transcribe-button\n (clicked)=\"handleCancelTranscribe()\">\n </copilot-chat-cancel-transcribe-button>\n }\n }\n @if (finishTranscribe.observed) {\n @if (finishTranscribeButtonTemplate || finishTranscribeButtonComponent) {\n <copilot-slot\n [slot]=\"finishTranscribeButtonTemplate || finishTranscribeButtonComponent\"\n [context]=\"{}\"\n [outputs]=\"finishTranscribeButtonOutputs\"\n [defaultComponent]=\"CopilotChatFinishTranscribeButtonComponent\"\n >\n </copilot-slot>\n } @else {\n <copilot-chat-finish-transcribe-button\n (clicked)=\"handleFinishTranscribe()\">\n </copilot-chat-finish-transcribe-button>\n }\n }\n } @else {\n @if (startTranscribe.observed) {\n @if (startTranscribeButtonTemplate || startTranscribeButtonComponent) {\n <copilot-slot\n [slot]=\"startTranscribeButtonTemplate || startTranscribeButtonComponent\"\n [context]=\"{}\"\n [outputs]=\"startTranscribeButtonOutputs\"\n [defaultComponent]=\"CopilotChatStartTranscribeButtonComponent\"\n >\n </copilot-slot>\n } @else {\n <copilot-chat-start-transcribe-button\n (clicked)=\"handleStartTranscribe()\">\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=\"mr-[10px]\">\n <button \n type=\"button\"\n [class]=\"sendButtonClass || defaultButtonClass\"\n [disabled]=\"!computedValue().trim() || computedMode() === 'processing'\"\n (click)=\"send()\">\n <lucide-angular [img]=\"ArrowUpIcon\" [size]=\"18\"></lucide-angular>\n </button>\n </div>\n }\n }\n </div>\n </div>\n }\n </div>\n `,\n styles: [`\n :host {\n display: block;\n width: 100%;\n }\n .shadow-\\\\[0_4px_4px_0_\\\\#0000000a\\\\2c_0_0_1px_0_\\\\#0000009e\\\\] {\n box-shadow: 0 4px 4px 0 #0000000a, 0 0 1px 0 #0000009e !important;\n }\n `]\n})\nexport class CopilotChatInputComponent implements AfterViewInit, OnDestroy {\n @ViewChild(CopilotChatTextareaComponent, { read: CopilotChatTextareaComponent }) \n textAreaRef?: CopilotChatTextareaComponent;\n \n @ViewChild(CopilotChatAudioRecorderComponent) \n audioRecorderRef?: CopilotChatAudioRecorderComponent;\n \n // Capture templates from content projection\n @ContentChild('sendButton', { read: TemplateRef }) sendButtonTemplate?: TemplateRef<SendButtonContext>;\n @ContentChild('toolbar', { read: TemplateRef }) toolbarTemplate?: TemplateRef<ToolbarContext>;\n @ContentChild('textArea', { read: TemplateRef }) textAreaTemplate?: TemplateRef<any>;\n @ContentChild('audioRecorder', { read: TemplateRef }) audioRecorderTemplate?: TemplateRef<any>;\n @ContentChild('startTranscribeButton', { read: TemplateRef }) startTranscribeButtonTemplate?: TemplateRef<any>;\n @ContentChild('cancelTranscribeButton', { read: TemplateRef }) cancelTranscribeButtonTemplate?: TemplateRef<any>;\n @ContentChild('finishTranscribeButton', { read: TemplateRef }) finishTranscribeButtonTemplate?: TemplateRef<any>;\n @ContentChild('addFileButton', { read: TemplateRef }) addFileButtonTemplate?: TemplateRef<any>;\n @ContentChild('toolsButton', { read: TemplateRef }) toolsButtonTemplate?: TemplateRef<any>;\n \n // Class inputs for styling default components\n @Input() sendButtonClass?: string;\n @Input() toolbarClass?: string;\n @Input() textAreaClass?: string;\n @Input() textAreaMaxRows?: number;\n @Input() textAreaPlaceholder?: string;\n @Input() audioRecorderClass?: string;\n @Input() startTranscribeButtonClass?: string;\n @Input() cancelTranscribeButtonClass?: string;\n @Input() finishTranscribeButtonClass?: string;\n @Input() addFileButtonClass?: string;\n @Input() toolsButtonClass?: string;\n \n // Component inputs for overrides\n @Input() sendButtonComponent?: Type<any>;\n @Input() toolbarComponent?: Type<any>;\n @Input() textAreaComponent?: Type<any>;\n @Input() audioRecorderComponent?: Type<any>;\n @Input() startTranscribeButtonComponent?: Type<any>;\n @Input() cancelTranscribeButtonComponent?: Type<any>;\n @Input() finishTranscribeButtonComponent?: Type<any>;\n @Input() addFileButtonComponent?: Type<any>;\n @Input() toolsButtonComponent?: Type<any>;\n \n // Regular inputs\n @Input() set mode(val: CopilotChatInputMode | undefined) {\n this.modeSignal.set(val || 'input');\n }\n @Input() set toolsMenu(val: (ToolsMenuItem | '-')[] | undefined) {\n this.toolsMenuSignal.set(val || []);\n }\n @Input() set autoFocus(val: boolean | undefined) {\n this.autoFocusSignal.set(val ?? true);\n }\n @Input() set value(val: string | undefined) {\n this.valueSignal.set(val || '');\n }\n @Input() set inputClass(val: string | undefined) {\n this.customClass.set(val);\n }\n // Note: Prefer host `class` for styling this component;\n // keep only `inputClass` to style the internal wrapper if needed.\n @Input() additionalToolbarItems?: TemplateRef<any>;\n \n // Output events\n @Output() submitMessage = new EventEmitter<string>();\n @Output() startTranscribe = new EventEmitter<void>();\n @Output() cancelTranscribe = new EventEmitter<void>();\n @Output() finishTranscribe = new EventEmitter<void>();\n @Output() addFile = new EventEmitter<void>();\n @Output() valueChange = new EventEmitter<string>();\n \n // Icons and default classes\n readonly ArrowUpIcon = ArrowUp;\n readonly defaultButtonClass = cn(\n // Base button styles\n 'inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium',\n 'transition-all disabled:pointer-events-none disabled:opacity-50',\n 'shrink-0 outline-none',\n 'focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]',\n // chatInputToolbarPrimary variant\n 'cursor-pointer',\n 'bg-black text-white',\n 'dark:bg-white dark:text-black dark:focus-visible:outline-white',\n 'rounded-full h-9 w-9',\n 'transition-colors',\n 'focus:outline-none',\n 'hover:opacity-70 disabled:hover:opacity-100',\n 'disabled:cursor-not-allowed disabled:bg-[#00000014] disabled:text-[rgb(13,13,13)]',\n 'dark:disabled:bg-[#454545] dark:disabled:text-white'\n );\n \n // Services\n private chatConfig = inject(CopilotChatConfigurationService, { optional: true });\n \n // Signals\n modeSignal = signal<CopilotChatInputMode>('input');\n toolsMenuSignal = signal<(ToolsMenuItem | '-')[]>([]);\n autoFocusSignal = signal<boolean>(true);\n valueSignal = signal<string>('');\n customClass = signal<string | undefined>(undefined);\n \n // Default components\n // Note: CopilotChatTextareaComponent uses attribute selector but is a component\n defaultAudioRecorder = CopilotChatAudioRecorderComponent;\n defaultSendButton: any = null; // Will be set to avoid circular dependency\n CopilotChatToolbarComponent = CopilotChatToolbarComponent;\n CopilotChatAddFileButtonComponent = CopilotChatAddFileButtonComponent;\n CopilotChatToolsMenuComponent = CopilotChatToolsMenuComponent;\n CopilotChatCancelTranscribeButtonComponent = CopilotChatCancelTranscribeButtonComponent;\n CopilotChatFinishTranscribeButtonComponent = CopilotChatFinishTranscribeButtonComponent;\n CopilotChatStartTranscribeButtonComponent = CopilotChatStartTranscribeButtonComponent;\n \n // Computed values\n computedMode = computed(() => this.modeSignal());\n computedToolsMenu = computed(() => this.toolsMenuSignal());\n computedAutoFocus = computed(() => this.autoFocusSignal());\n computedValue = computed(() => {\n const customValue = this.valueSignal();\n const configValue = this.chatConfig?.inputValue();\n return customValue || configValue || '';\n });\n \n computedClass = computed(() => {\n const baseClasses = cn(\n // Layout\n 'flex w-full flex-col items-center justify-center',\n // Interaction\n 'cursor-text',\n // Overflow and clipping\n 'overflow-visible bg-clip-padding contain-inline-size',\n // Background\n 'bg-white dark:bg-[#303030]',\n // Visual effects\n 'shadow-[0_4px_4px_0_#0000000a,0_0_1px_0_#0000009e] rounded-[28px]'\n );\n return cn(baseClasses, this.customClass());\n });\n \n // Context for slots (reactive via signals)\n sendButtonContext = computed<SendButtonContext>(() => ({\n send: () => this.send(),\n disabled: !this.computedValue().trim() || this.computedMode() === 'processing',\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 // Effect to handle mode changes\n effect(\n () => {\n const currentMode = this.computedMode();\n if (currentMode === 'transcribe' && this.audioRecorderRef) {\n this.audioRecorderRef.start().catch(console.error);\n } else if (this.audioRecorderRef?.getState() === 'recording') {\n this.audioRecorderRef.stop().catch(console.error);\n }\n },\n { allowSignalWrites: true }\n );\n \n // Sync with chat configuration\n effect(\n () => {\n const configValue = this.chatConfig?.inputValue();\n if (configValue !== undefined && !this.valueSignal()) {\n this.valueSignal.set(configValue);\n }\n },\n { allowSignalWrites: true }\n );\n }\n \n // Output maps for slots\n addFileButtonOutputs = { clicked: () => this.handleAddFile() };\n cancelTranscribeButtonOutputs = { clicked: () => this.handleCancelTranscribe() };\n finishTranscribeButtonOutputs = { clicked: () => this.handleFinishTranscribe() };\n startTranscribeButtonOutputs = { clicked: () => this.handleStartTranscribe() };\n // Support both `clicked` (idiomatic in our slots) and `click` (legacy)\n sendButtonOutputs = { clicked: () => this.send(), click: () => this.send() };\n \n ngAfterViewInit(): void {\n // Auto-focus if needed\n if (this.computedAutoFocus() && this.textAreaRef) {\n setTimeout(() => {\n this.textAreaRef?.focus();\n });\n }\n }\n \n ngOnDestroy(): void {\n // Clean up any resources\n if (this.audioRecorderRef?.getState() === 'recording') {\n this.audioRecorderRef.stop().catch(console.error);\n }\n }\n \n handleKeyDown(event: KeyboardEvent): void {\n if (event.key === 'Enter' && !event.shiftKey) {\n event.preventDefault();\n this.send();\n }\n }\n \n handleValueChange(value: string): void {\n this.valueSignal.set(value);\n this.valueChange.emit(value);\n \n if (this.chatConfig) {\n this.chatConfig.setInputValue(value);\n }\n }\n \n send(): void {\n const trimmed = this.computedValue().trim();\n if (trimmed) {\n this.submitMessage.emit(trimmed);\n \n // Use chat config handler if available\n if (this.chatConfig) {\n this.chatConfig.submitInput(trimmed);\n }\n \n // Clear input\n this.valueSignal.set('');\n if (this.textAreaRef) {\n this.textAreaRef.setValue('');\n }\n \n // Refocus input\n if (this.textAreaRef) {\n setTimeout(() => {\n this.textAreaRef?.focus();\n });\n }\n }\n }\n \n handleStartTranscribe(): void {\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 handleFinishTranscribe(): void {\n this.finishTranscribe.emit();\n this.modeSignal.set('input');\n }\n \n handleAddFile(): void {\n this.addFile.emit();\n }\n}\n","import { CopilotChatTextareaComponent } from \"./copilot-chat-textarea.component\";\nimport { CopilotChatAudioRecorderComponent } from \"./copilot-chat-audio-recorder.component\";\nimport {\n CopilotChatSendButtonComponent,\n CopilotChatStartTranscribeButtonComponent,\n CopilotChatCancelTranscribeButtonComponent,\n CopilotChatFinishTranscribeButtonComponent,\n CopilotChatAddFileButtonComponent,\n} from \"./copilot-chat-buttons.component\";\nimport { CopilotChatToolbarComponent } from \"./copilot-chat-toolbar.component\";\nimport { CopilotChatToolsMenuComponent } from \"./copilot-chat-tools-menu.component\";\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 '@copilotkitnext/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 = CopilotChatTextareaComponent;\n static readonly AudioRecorder = CopilotChatAudioRecorderComponent;\n static readonly SendButton = CopilotChatSendButtonComponent;\n static readonly StartTranscribeButton =\n CopilotChatStartTranscribeButtonComponent;\n static readonly CancelTranscribeButton =\n CopilotChatCancelTranscribeButtonComponent;\n static readonly FinishTranscribeButton =\n CopilotChatFinishTranscribeButtonComponent;\n static readonly AddFileButton = CopilotChatAddFileButtonComponent;\n static readonly Toolbar = CopilotChatToolbarComponent;\n static readonly ToolsMenu = CopilotChatToolsMenuComponent;\n}\n","import {\n Component,\n Input,\n ChangeDetectionStrategy,\n ViewEncapsulation,\n computed,\n signal\n} from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { cn } from '../../lib/utils';\n\n@Component({\n selector: 'copilot-chat-user-message-renderer',\n standalone: true,\n imports: [CommonModule],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n '[class]': 'computedClass()'\n },\n template: `{{ content }}`\n})\nexport class CopilotChatUserMessageRendererComponent {\n @Input() content = '';\n @Input() set inputClass(value: string | undefined) {\n this.customClass.set(value);\n }\n \n private customClass = signal<string | undefined>(undefined);\n \n computedClass = computed(() => {\n return cn(\n \"prose dark:prose-invert bg-muted relative max-w-[80%] rounded-[18px] px-4 py-1.5 data-[multiline]:py-3 inline-block whitespace-pre-wrap\",\n this.customClass()\n );\n });\n}","import {\n Component,\n Input,\n Output,\n EventEmitter,\n signal,\n computed,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n ViewEncapsulation,\n inject\n} from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { LucideAngularModule, Copy, Check, Edit } from 'lucide-angular';\nimport { CopilotTooltipDirective } from '../../lib/directives/tooltip.directive';\nimport { CopilotChatConfigurationService } from '../../core/chat-configuration/chat-configuration.service';\nimport { cn } from '../../lib/utils';\n\n// Base toolbar button component\n@Component({\n selector: 'button[copilotChatUserMessageToolbarButton]',\n standalone: true,\n imports: [CommonModule],\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: CopilotTooltipDirective,\n inputs: ['copilotTooltip: title', 'tooltipPosition', 'tooltipDelay']\n }\n ]\n})\nexport class CopilotChatUserMessageToolbarButtonComponent {\n @Input() title = '';\n @Input() disabled = false;\n @Input() set inputClass(value: string | undefined) {\n this.customClass.set(value);\n }\n \n private customClass = signal<string | undefined>(undefined);\n \n computedClass = computed(() => {\n return cn(\n // Flex centering\n 'inline-flex items-center justify-center',\n // Cursor\n 'cursor-pointer',\n // Background and text\n 'p-0 text-[rgb(93,93,93)] hover:bg-[#E8E8E8]',\n // Dark mode\n 'dark:text-[rgb(243,243,243)] dark:hover:bg-[#303030]',\n // Shape and sizing\n 'h-8 w-8 rounded-md',\n // Interactions\n 'transition-colors',\n // Hover states\n 'hover:text-[rgb(93,93,93)]',\n 'dark:hover:text-[rgb(243,243,243)]',\n // Focus states\n 'focus:outline-none focus:ring-2 focus:ring-offset-2',\n // Disabled state\n 'disabled:opacity-50 disabled:cursor-not-allowed',\n this.customClass()\n );\n });\n}\n\n// Copy button component\n@Component({\n selector: 'copilot-chat-user-message-copy-button',\n standalone: true,\n imports: [CommonModule, LucideAngularModule, CopilotChatUserMessageToolbarButtonComponent],\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 @if (copied()) {\n <lucide-angular [img]=\"CheckIcon\" [size]=\"18\"></lucide-angular>\n } @else {\n <lucide-angular [img]=\"CopyIcon\" [size]=\"18\"></lucide-angular>\n }\n </button>\n `\n})\nexport class CopilotChatUserMessageCopyButtonComponent {\n @Input() title?: string;\n @Input() disabled = false;\n @Input() inputClass?: string;\n @Input() content?: string;\n @Output() clicked = new EventEmitter<void>();\n \n readonly CopyIcon = Copy;\n readonly CheckIcon = Check;\n \n copied = signal(false);\n private chatConfig = inject(CopilotChatConfigurationService);\n \n get labels() {\n return this.chatConfig.labels();\n }\n \n handleCopy(): void {\n if (!this.content) return;\n \n // Set copied immediately for instant feedback\n this.copied.set(true);\n setTimeout(() => this.copied.set(false), 2000);\n \n // Copy to clipboard (fire and forget)\n navigator.clipboard.writeText(this.content).then(\n () => this.clicked.emit(),\n (err) => {\n console.error('Failed to copy message:', err);\n this.copied.set(false);\n }\n );\n }\n}\n\n// Edit button component\n@Component({\n selector: 'copilot-chat-user-message-edit-button',\n standalone: true,\n imports: [CommonModule, LucideAngularModule, CopilotChatUserMessageToolbarButtonComponent],\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 <lucide-angular [img]=\"EditIcon\" [size]=\"18\"></lucide-angular>\n </button>\n `\n})\nexport class CopilotChatUserMessageEditButtonComponent {\n @Input() title?: string;\n @Input() disabled = false;\n @Input() inputClass?: string;\n @Output() clicked = new EventEmitter<void>();\n \n readonly EditIcon = Edit;\n private chatConfig = inject(CopilotChatConfigurationService);\n \n get labels() {\n return this.chatConfig.labels();\n }\n \n handleEdit(): void {\n if (!this.disabled) {\n this.clicked.emit();\n }\n }\n}\n","import {\n Component,\n Input,\n ChangeDetectionStrategy,\n ViewEncapsulation,\n signal\n} from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { cn } from '../../lib/utils';\n\n@Component({\n selector: 'div[copilotChatUserMessageToolbar]',\n standalone: true,\n imports: [CommonModule],\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 CopilotChatUserMessageToolbarComponent {\n @Input() inputClass?: string;\n \n computedClass = signal<string>('');\n \n ngOnInit() {\n this.computedClass.set(\n cn(\n \"w-full bg-transparent flex items-center justify-end mt-[4px] invisible group-hover:visible\",\n this.inputClass\n )\n );\n }\n}","import {\n Component,\n Input,\n Output,\n EventEmitter,\n ChangeDetectionStrategy,\n ViewEncapsulation,\n computed,\n signal\n} from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { LucideAngularModule, ChevronLeft, ChevronRight } from 'lucide-angular';\nimport { \n type UserMessage,\n type CopilotChatUserMessageOnSwitchToBranchProps \n} from './copilot-chat-user-message.types';\nimport { cn } from '../../lib/utils';\n\n@Component({\n selector: 'copilot-chat-user-message-branch-navigation',\n standalone: true,\n imports: [CommonModule, LucideAngularModule],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `\n @if (showNavigation()) {\n <div [class]=\"computedClass()\">\n <button\n type=\"button\"\n [class]=\"buttonClass\"\n [disabled]=\"!canGoPrev()\"\n (click)=\"handlePrevious()\">\n <lucide-angular [img]=\"ChevronLeftIcon\" [size]=\"20\"></lucide-angular>\n </button>\n <span class=\"text-sm text-muted-foreground px-0 font-medium\">\n {{ currentBranchSignal() + 1 }}/{{ numberOfBranchesSignal() }}\n </span>\n <button\n type=\"button\"\n [class]=\"buttonClass\"\n [disabled]=\"!canGoNext()\"\n (click)=\"handleNext()\">\n <lucide-angular [img]=\"ChevronRightIcon\" [size]=\"20\"></lucide-angular>\n </button>\n </div>\n }\n `\n})\nexport class CopilotChatUserMessageBranchNavigationComponent {\n @Input() set currentBranch(val: number) {\n this.currentBranchSignal.set(val);\n }\n @Input() set numberOfBranches(val: number) {\n this.numberOfBranchesSignal.set(val);\n }\n @Input() message!: UserMessage;\n @Input() inputClass?: string;\n @Output() switchToBranch = new EventEmitter<CopilotChatUserMessageOnSwitchToBranchProps>();\n \n readonly ChevronLeftIcon = ChevronLeft;\n readonly ChevronRightIcon = ChevronRight;\n \n currentBranchSignal = signal(0);\n numberOfBranchesSignal = signal(1);\n \n readonly buttonClass = cn(\n // Flex centering\n 'inline-flex items-center justify-center',\n // Cursor\n 'cursor-pointer',\n // Background and text\n 'p-0 text-[rgb(93,93,93)] hover:bg-[#E8E8E8]',\n // Dark mode\n 'dark:text-[rgb(243,243,243)] dark:hover:bg-[#303030]',\n // Shape and sizing\n 'h-6 w-6 rounded-md',\n // Interactions\n 'transition-colors',\n // Disabled state\n 'disabled:opacity-50 disabled:cursor-not-allowed'\n );\n \n showNavigation = computed(() => {\n const branches = this.numberOfBranchesSignal();\n return branches > 1;\n });\n \n canGoPrev = computed(() => {\n return this.currentBranchSignal() > 0;\n });\n \n canGoNext = computed(() => {\n return this.currentBranchSignal() < this.numberOfBranchesSignal() - 1;\n });\n \n computedClass = computed(() => {\n return cn('flex items-center gap-1', this.inputClass);\n });\n \n handlePrevious(): void {\n if (this.canGoPrev()) {\n const newIndex = this.currentBranchSignal() - 1;\n this.switchToBranch.emit({\n branchIndex: newIndex,\n numberOfBranches: this.numberOfBranchesSignal(),\n message: this.message\n });\n }\n }\n \n handleNext(): void {\n if (this.canGoNext()) {\n const newIndex = this.currentBranchSignal() + 1;\n this.switchToBranch.emit({\n branchIndex: newIndex,\n numberOfBranches: this.numberOfBranchesSignal(),\n message: this.message\n });\n }\n }\n}","import {\n Component,\n Input,\n Output,\n EventEmitter,\n TemplateRef,\n ContentChild,\n signal,\n computed,\n Type,\n ChangeDetectionStrategy,\n ViewEncapsulation\n} from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { CopilotSlotComponent } from '../../lib/slots/copilot-slot.component';\nimport {\n type UserMessage,\n type CopilotChatUserMessageOnEditMessageProps,\n type CopilotChatUserMessageOnSwitchToBranchProps,\n type MessageRendererContext,\n type CopyButtonContext,\n type EditButtonContext,\n type BranchNavigationContext,\n type ToolbarContext\n} from './copilot-chat-user-message.types';\nimport { CopilotChatUserMessageRendererComponent } from './copilot-chat-user-message-renderer.component';\nimport {\n CopilotChatUserMessageCopyButtonComponent,\n CopilotChatUserMessageEditButtonComponent\n} from './copilot-chat-user-message-buttons.component';\nimport { CopilotChatUserMessageToolbarComponent } from './copilot-chat-user-message-toolbar.component';\nimport { CopilotChatUserMessageBranchNavigationComponent } from './copilot-chat-user-message-branch-navigation.component';\nimport { cn } from '../../lib/utils';\n\n@Component({\n selector: 'copilot-chat-user-message',\n standalone: true,\n imports: [\n CommonModule,\n CopilotSlotComponent,\n CopilotChatUserMessageRendererComponent,\n CopilotChatUserMessageCopyButtonComponent,\n CopilotChatUserMessageEditButtonComponent,\n CopilotChatUserMessageToolbarComponent,\n CopilotChatUserMessageBranchNavigationComponent\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `\n <div \n [class]=\"computedClass()\"\n [attr.data-message-id]=\"message.id\">\n \n <!-- Message Renderer -->\n @if (messageRendererTemplate || messageRendererComponent) {\n <copilot-slot\n [slot]=\"messageRendererTemplate || messageRendererComponent\"\n [context]=\"messageRendererContext()\"\n [defaultComponent]=\"CopilotChatUserMessageRendererComponent\"\n >\n </copilot-slot>\n } @else {\n <copilot-chat-user-message-renderer\n [content]=\"message.content || ''\"\n [inputClass]=\"messageRendererClass\">\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]=\"CopilotChatUserMessageToolbarComponent\"\n >\n </copilot-slot>\n } @else {\n <div copilotChatUserMessageToolbar [inputClass]=\"toolbarClass\">\n <div class=\"flex items-center gap-1 justify-end\">\n <!-- Additional toolbar items -->\n @if (additionalToolbarItems) {\n <ng-container *ngTemplateOutlet=\"additionalToolbarItems\"></ng-container>\n }\n \n <!-- Copy button -->\n @if (copyButtonTemplate || copyButtonComponent) {\n <copilot-slot\n [slot]=\"copyButtonTemplate || copyButtonComponent\"\n [context]=\"{ content: message?.content || '' }\"\n [outputs]=\"copyButtonOutputs\"\n [defaultComponent]=\"CopilotChatUserMessageCopyButtonComponent\"\n >\n </copilot-slot>\n } @else {\n <copilot-chat-user-message-copy-button\n [content]=\"message.content\"\n [inputClass]=\"copyButtonClass\"\n (clicked)=\"handleCopy()\">\n </copilot-chat-user-message-copy-button>\n }\n \n <!-- Edit button -->\n @if (editMessage.observed) {\n @if (editButtonTemplate || editButtonComponent) {\n <copilot-slot\n [slot]=\"editButtonTemplate || editButtonComponent\"\n [context]=\"{}\"\n [outputs]=\"editButtonOutputs\"\n [defaultComponent]=\"CopilotChatUserMessageEditButtonComponent\"\n >\n </copilot-slot>\n } @else {\n <copilot-chat-user-message-edit-button\n [inputClass]=\"editButtonClass\"\n (clicked)=\"handleEdit()\">\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]=\"CopilotChatUserMessageBranchNavigationComponent\"\n >\n </copilot-slot>\n } @else {\n <copilot-chat-user-message-branch-navigation\n [currentBranch]=\"branchIndexSignal()\"\n [numberOfBranches]=\"numberOfBranchesSignal()\"\n [message]=\"message\"\n [inputClass]=\"branchNavigationClass\"\n (switchToBranch)=\"handleSwitchToBranch($event)\">\n </copilot-chat-user-message-branch-navigation>\n }\n }\n </div>\n </div>\n }\n </div>\n `,\n styles: [`\n :host {\n display: block;\n width: 100%;\n }\n `]\n})\nexport class CopilotChatUserMessageComponent {\n // Capture templates from content projection\n @ContentChild('messageRenderer', { read: TemplateRef }) messageRendererTemplate?: TemplateRef<MessageRendererContext>;\n @ContentChild('toolbar', { read: TemplateRef }) toolbarTemplate?: TemplateRef<ToolbarContext>;\n @ContentChild('copyButton', { read: TemplateRef }) copyButtonTemplate?: TemplateRef<CopyButtonContext>;\n @ContentChild('editButton', { read: TemplateRef }) editButtonTemplate?: TemplateRef<EditButtonContext>;\n @ContentChild('branchNavigation', { read: TemplateRef }) branchNavigationTemplate?: TemplateRef<BranchNavigationContext>;\n \n // Props for tweaking default components\n @Input() messageRendererClass?: string;\n @Input() toolbarClass?: string;\n @Input() copyButtonClass?: string;\n @Input() editButtonClass?: string;\n @Input() branchNavigationClass?: string;\n \n // Component inputs for overrides\n @Input() messageRendererComponent?: Type<any>;\n @Input() toolbarComponent?: Type<any>;\n @Input() copyButtonComponent?: Type<any>;\n @Input() editButtonComponent?: Type<any>;\n @Input() branchNavigationComponent?: Type<any>;\n \n // Regular inputs\n @Input() message!: UserMessage;\n @Input() set branchIndex(val: number | undefined) {\n this.branchIndexSignal.set(val ?? 0);\n }\n @Input() set numberOfBranches(val: number | undefined) {\n this.numberOfBranchesSignal.set(val ?? 1);\n }\n @Input() additionalToolbarItems?: TemplateRef<any>;\n @Input() set inputClass(val: string | undefined) {\n this.customClass.set(val);\n }\n \n // Output events\n @Output() editMessage = new EventEmitter<CopilotChatUserMessageOnEditMessageProps>();\n @Output() switchToBranch = new EventEmitter<CopilotChatUserMessageOnSwitchToBranchProps>();\n \n // Signals\n branchIndexSignal = signal(0);\n numberOfBranchesSignal = signal(1);\n customClass = signal<string | undefined>(undefined);\n \n // Default components\n CopilotChatUserMessageRendererComponent = CopilotChatUserMessageRendererComponent;\n CopilotChatUserMessageToolbarComponent = CopilotChatUserMessageToolbarComponent;\n CopilotChatUserMessageCopyButtonComponent = CopilotChatUserMessageCopyButtonComponent;\n CopilotChatUserMessageEditButtonComponent = CopilotChatUserMessageEditButtonComponent;\n CopilotChatUserMessageBranchNavigationComponent = CopilotChatUserMessageBranchNavigationComponent;\n \n // Computed values\n showBranchNavigation = computed(() => {\n const branches = this.numberOfBranchesSignal();\n return branches > 1 && this.switchToBranch.observed;\n });\n \n computedClass = computed(() => {\n return cn(\n \"flex flex-col items-end group pt-10\",\n this.customClass()\n );\n });\n \n // Context for slots (reactive via signals)\n messageRendererContext = computed<MessageRendererContext>(() => ({\n content: this.message?.content || ''\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.branchIndexSignal(),\n numberOfBranches: this.numberOfBranchesSignal(),\n onSwitchToBranch: (props) => this.handleSwitchToBranch(props),\n message: this.message\n }));\n \n toolbarContext = computed<ToolbarContext>(() => ({\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(props: CopilotChatUserMessageOnSwitchToBranchProps): void {\n this.switchToBranch.emit(props);\n }\n}\n","import {\n Component,\n Input,\n ViewContainerRef,\n ComponentRef,\n inject,\n ViewChild,\n AfterViewInit,\n OnChanges,\n SimpleChanges,\n TemplateRef,\n Type,\n ChangeDetectionStrategy,\n signal,\n computed,\n OnDestroy,\n} from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\nimport type {\n AssistantMessage,\n Message,\n ToolCall,\n ToolMessage,\n} from \"@ag-ui/core\";\nimport { ToolCallStatus } from \"@copilotkitnext/core\";\nimport { CopilotKitService } from \"../../core/copilotkit.service\";\nimport { partialJSONParse } from \"@copilotkitnext/shared\";\nimport type {\n ToolCallProps,\n ToolCallRender,\n} from \"../../core/copilotkit.types\";\n\n/**\n * Component for rendering all tool calls for an assistant message.\n * This component iterates through the message's tool calls and renders each one\n * using the registered render functions in CopilotKitService.\n */\n@Component({\n selector: \"copilot-chat-tool-calls-view\",\n standalone: true,\n imports: [CommonModule],\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n @for (toolCall of message?.toolCalls ?? []; track toolCall.id) {\n <ng-container>\n <ng-container #dynamicContainer></ng-container>\n <ng-container *ngIf=\"getTemplateForToolCall(toolCall) as templateData\">\n <ng-container\n *ngTemplateOutlet=\"\n templateData.template;\n context: templateData.context\n \"\n ></ng-container>\n </ng-container>\n </ng-container>\n }\n `,\n})\nexport class CopilotChatToolCallsViewComponent\n implements AfterViewInit, OnChanges, OnDestroy\n{\n @Input({ required: true }) message!: AssistantMessage;\n @Input() messages: Message[] = [];\n @Input() isLoading = false;\n\n @ViewChild(\"dynamicContainer\", { read: ViewContainerRef })\n private container?: ViewContainerRef;\n\n private copilotkit: CopilotKitService | null = inject(CopilotKitService, {\n optional: true,\n });\n private componentRefs: Map<string, ComponentRef<any>> = new Map();\n private templateCache: Map<\n string,\n { template: TemplateRef<any>; context: any }\n > = new Map();\n\n // Signals for reactive state\n private messageSignal = signal<AssistantMessage | null>(null);\n private messagesSignal = signal<Message[]>([]);\n private isLoadingSignal = signal(false);\n\n ngAfterViewInit(): void {\n this.renderAllToolCalls();\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes[\"message\"]) {\n this.messageSignal.set(this.message);\n }\n if (changes[\"messages\"]) {\n this.messagesSignal.set(this.messages);\n }\n if (changes[\"isLoading\"]) {\n this.isLoadingSignal.set(this.isLoading);\n }\n\n this.renderAllToolCalls();\n }\n\n ngOnDestroy(): void {\n // Clean up all component refs\n this.componentRefs.forEach((ref) => ref.destroy());\n this.componentRefs.clear();\n this.templateCache.clear();\n }\n\n getTemplateForToolCall(\n toolCall: ToolCall\n ): { template: TemplateRef<any>; context: any } | null {\n return this.templateCache.get(toolCall.id) || null;\n }\n\n private renderAllToolCalls(): void {\n const message = this.messageSignal();\n if (!message || !message.toolCalls || message.toolCalls.length === 0) {\n return;\n }\n\n // Clear existing renders\n this.componentRefs.forEach((ref) => ref.destroy());\n this.componentRefs.clear();\n this.templateCache.clear();\n\n if (!this.copilotkit || !this.container) {\n return;\n }\n\n const messages = this.messagesSignal();\n const isLoading = this.isLoadingSignal();\n\n // Render each tool call\n message.toolCalls.forEach((toolCall) => {\n const toolMessage = messages.find(\n (m) =>\n m.role === \"tool\" && (m as ToolMessage).toolCallId === toolCall.id\n ) as ToolMessage | undefined;\n\n this.renderSingleToolCall(toolCall, toolMessage, isLoading);\n });\n }\n\n private renderSingleToolCall(\n toolCall: ToolCall,\n toolMessage: ToolMessage | undefined,\n isLoading: boolean\n ): void {\n if (!this.copilotkit) {\n return;\n }\n\n // Get current render tool calls\n const currentRenderToolCalls = this.copilotkit.currentRenderToolCalls();\n\n // Find the render config for this tool call by name\n // Also check for wildcard (*) renders if no exact match\n const renderConfig =\n currentRenderToolCalls.find(\n (rc: ToolCallRender) => rc.name === toolCall.function.name\n ) || currentRenderToolCalls.find((rc: ToolCallRender) => rc.name === \"*\");\n\n if (!renderConfig) {\n return;\n }\n\n // Parse the arguments if they're a string\n const args = partialJSONParse(toolCall.function.arguments);\n\n // Determine status\n let status: ToolCallStatus;\n if (toolMessage) {\n status = ToolCallStatus.Complete;\n } else if (isLoading) {\n status = ToolCallStatus.InProgress;\n } else {\n status = ToolCallStatus.Complete;\n }\n\n // Create props based on status - use discriminated union properly\n let props: ToolCallProps;\n if (status === ToolCallStatus.InProgress) {\n props = {\n name: toolCall.function.name,\n description: \"\",\n args: args, // Partial args for InProgress\n status: ToolCallStatus.InProgress,\n result: undefined,\n };\n } else {\n // Complete status\n props = {\n name: toolCall.function.name,\n description: \"\",\n args: args, // Full args for Complete\n status: ToolCallStatus.Complete,\n result: toolMessage?.content || \"\",\n };\n }\n\n // Check if render is a Component class or TemplateRef\n if (this.isComponentClass(renderConfig.render)) {\n // Create component dynamically\n this.renderComponent(toolCall.id, renderConfig.render, props);\n } else if (this.isTemplateRef(renderConfig.render)) {\n // Use template\n this.renderTemplate(toolCall.id, renderConfig.render, props);\n }\n }\n\n private renderComponent(\n toolCallId: string,\n componentClass: Type<any>,\n props: ToolCallProps\n ): void {\n if (!this.container) {\n return;\n }\n\n // Create the component\n const componentRef = this.container.createComponent(componentClass);\n this.componentRefs.set(toolCallId, componentRef);\n\n // Determine declared inputs to avoid Angular NG0303 console errors\n const cmpDef: any = (componentClass as any).ɵcmp;\n const declaredInputs = new Set<string>(\n Object.keys(cmpDef?.inputs ?? {})\n );\n\n // Prefer a single 'props' input if declared\n if (declaredInputs.has('props')) {\n componentRef.setInput('props', props);\n } else {\n // Otherwise, set only inputs that the component actually declares\n for (const [key, value] of Object.entries(props)) {\n if (declaredInputs.has(key)) {\n componentRef.setInput(key, value);\n }\n }\n }\n\n // Trigger change detection\n componentRef.changeDetectorRef.detectChanges();\n }\n\n private renderTemplate(\n toolCallId: string,\n template: TemplateRef<any>,\n props: ToolCallProps\n ): void {\n this.templateCache.set(toolCallId, {\n template,\n context: {\n $implicit: props,\n name: props.name,\n description: props.description,\n args: props.args,\n status: props.status,\n result: props.result,\n },\n });\n }\n\n private isComponentClass(value: any): value is Type<any> {\n return typeof value === \"function\" && value.prototype;\n }\n\n private isTemplateRef(value: any): value is TemplateRef<any> {\n return value instanceof TemplateRef;\n }\n}\n","import {\n Component,\n Input,\n ChangeDetectionStrategy,\n ViewEncapsulation,\n OnChanges,\n SimpleChanges,\n signal,\n computed,\n inject,\n ElementRef,\n AfterViewInit,\n ViewChild,\n} from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\nimport { Marked } from \"marked\";\nimport hljs from \"highlight.js\";\nimport * as katex from \"katex\";\nimport { completePartialMarkdown } from \"@copilotkitnext/core\";\nimport { LucideAngularModule, Copy, Check } from \"lucide-angular\";\nimport { CopilotChatConfigurationService } from \"../../core/chat-configuration/chat-configuration.service\";\n\n@Component({\n selector: \"copilot-chat-assistant-message-renderer\",\n standalone: true,\n imports: [CommonModule, LucideAngularModule],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `\n <div\n #markdownContainer\n [class]=\"inputClass\"\n (click)=\"handleClick($event)\"\n ></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\",\n Menlo, 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\",\n Menlo, 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 CopilotChatAssistantMessageRendererComponent\n implements OnChanges, AfterViewInit\n{\n private _content = \"\";\n @Input()\n set content(value: string) {\n this._content = value;\n this.contentSignal.set(value);\n }\n get content(): string {\n return this._content;\n }\n\n @Input() inputClass?: string;\n\n private contentSignal = signal<string>(\"\");\n\n @ViewChild(\"markdownContainer\", { static: false })\n markdownContainer?: ElementRef<HTMLDivElement>;\n\n private chatConfig = inject(CopilotChatConfigurationService);\n private elementRef = inject(ElementRef);\n\n // Track copy states for code blocks\n private copyStates = new Map<string, boolean>();\n private copyStateSignal = signal(new Map<string, boolean>());\n\n renderedHtml = computed(() => {\n const currentContent = this.contentSignal();\n const completedMarkdown = completePartialMarkdown(currentContent);\n return this.renderMarkdown(completedMarkdown);\n });\n\n get labels() {\n return this.chatConfig.labels();\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes[\"content\"]) {\n // Reset copy states when content changes\n this.copyStates.clear();\n this.copyStateSignal.set(new Map());\n // Update content if container exists\n if (this.markdownContainer) {\n this.updateContent();\n this.renderMathEquations();\n }\n }\n }\n\n ngAfterViewInit(): void {\n this.updateContent();\n this.renderMathEquations();\n }\n\n private updateContent(): void {\n if (!this.markdownContainer) return;\n const container = this.markdownContainer.nativeElement;\n const html = this.renderedHtml();\n container.innerHTML = html;\n }\n\n private codeBlocksMap = new Map<string, string>();\n private markedInstance: Marked | null = null;\n\n private initializeMarked(): void {\n if (this.markedInstance) return;\n\n // Store highlighted code blocks temporarily\n const highlightedBlocks = new Map<string, string>();\n\n // Create a new Marked instance\n this.markedInstance = new Marked();\n\n // Configure marked options\n this.markedInstance.setOptions({\n gfm: true,\n breaks: true,\n });\n\n // Add a walkTokens function to process code tokens before rendering\n this.markedInstance.use({\n walkTokens: (token: any) => {\n if (token.type === \"code\") {\n const rawCode = token.text;\n const lang = token.lang || \"\";\n\n const blockId = this.generateBlockId(rawCode);\n // Store the raw code in our map for copying\n this.codeBlocksMap.set(blockId, rawCode);\n\n const copied = this.copyStateSignal().get(blockId) || false;\n const copyLabel = copied\n ? this.labels.assistantMessageToolbarCopyCodeCopiedLabel\n : this.labels.assistantMessageToolbarCopyCodeLabel;\n\n // Manually highlight the code\n const language = hljs.getLanguage(lang) ? lang : \"plaintext\";\n const highlighted = hljs.highlight(rawCode, { language }).value;\n const codeClass = lang ? `hljs language-${lang}` : \"hljs\";\n\n // Create the full HTML with header and highlighted code\n const fullHtml = `\n <div class=\"code-block-container\">\n <div class=\"code-block-header\">\n ${lang ? `<span class=\"code-block-language\">${lang}</span>` : \"<span></span>\"}\n <button \n class=\"code-block-copy-button\" \n data-code-block-id=\"${blockId}\"\n aria-label=\"${copyLabel} code\">\n ${\n copied\n ? '<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"10\" height=\"10\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M20 6 9 17l-5-5\"/></svg>'\n : '<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"10\" height=\"10\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><rect width=\"14\" height=\"14\" x=\"8\" y=\"8\" rx=\"2\" ry=\"2\"/><path d=\"M4 16c-1.11 0-2-.9-2-2V4c0-1.11.89-2 2-2h10c1.11 0 2 .89 2 2\"/></svg>'\n }\n <span>${copyLabel}</span>\n </button>\n </div>\n <pre><code class=\"${codeClass}\">${highlighted}</code></pre>\n </div>\n `;\n\n // Store the highlighted HTML\n highlightedBlocks.set(blockId, fullHtml);\n\n // Change the token to an html token to bypass marked's escaping\n token.type = \"html\";\n token.text = fullHtml;\n }\n },\n });\n }\n\n private renderMarkdown(content: string): string {\n // Initialize marked if not already done\n this.initializeMarked();\n\n // Clear the code blocks map for new render\n this.codeBlocksMap.clear();\n\n // Parse markdown\n let html = this.markedInstance!.parse(content) as string;\n\n // Process math equations\n html = this.processMathEquations(html);\n\n return html;\n }\n\n private processMathEquations(html: string): string {\n // First, temporarily replace code blocks with placeholders to protect them from math processing\n const codeBlocks: string[] = [];\n const placeholder = \"___CODE_BLOCK_PLACEHOLDER_\";\n\n // Store code blocks and replace with placeholders\n html = html.replace(/<pre><code[\\s\\S]*?<\\/code><\\/pre>/g, (match) => {\n const index = codeBlocks.length;\n codeBlocks.push(match);\n return `${placeholder}${index}___`;\n });\n\n // Also protect inline code\n const inlineCode: string[] = [];\n const inlinePlaceholder = \"___INLINE_CODE_PLACEHOLDER_\";\n html = html.replace(/<code>[\\s\\S]*?<\\/code>/g, (match) => {\n const index = inlineCode.length;\n inlineCode.push(match);\n return `${inlinePlaceholder}${index}___`;\n });\n\n // Process display math $$ ... $$\n html = html.replace(/\\$\\$([\\s\\S]*?)\\$\\$/g, (match, equation) => {\n try {\n return katex.renderToString(equation, {\n displayMode: true,\n throwOnError: false,\n });\n } catch {\n return match;\n }\n });\n\n // Process inline math $ ... $\n html = html.replace(/\\$([^\\$]+)\\$/g, (match, equation) => {\n try {\n return katex.renderToString(equation, {\n displayMode: false,\n throwOnError: false,\n });\n } catch {\n return match;\n }\n });\n\n // Restore code blocks\n codeBlocks.forEach((block, index) => {\n html = html.replace(`${placeholder}${index}___`, block);\n });\n\n // Restore inline code\n inlineCode.forEach((code, index) => {\n html = html.replace(`${inlinePlaceholder}${index}___`, code);\n });\n\n return html;\n }\n\n private renderMathEquations(): void {\n if (!this.markdownContainer) return;\n\n const container = this.markdownContainer.nativeElement;\n\n // Find all math placeholders and render them\n const mathElements = container.querySelectorAll(\".math-placeholder\");\n mathElements.forEach((element) => {\n const equation = element.getAttribute(\"data-equation\");\n const displayMode = element.getAttribute(\"data-display\") === \"true\";\n\n if (equation) {\n try {\n katex.render(equation, element as HTMLElement, {\n displayMode,\n throwOnError: false,\n });\n } catch (error) {\n console.error(\"Failed to render math equation:\", error);\n }\n }\n });\n }\n\n handleClick(event: MouseEvent): void {\n const target = event.target as HTMLElement;\n\n // Check if clicked on copy button or its children\n const copyButton = target.closest(\n \".code-block-copy-button\"\n ) as HTMLButtonElement;\n if (copyButton) {\n event.preventDefault();\n const blockId = copyButton.getAttribute(\"data-code-block-id\");\n\n if (blockId) {\n // Get the raw code from our map instead of from DOM\n const code = this.codeBlocksMap.get(blockId);\n if (code) {\n this.copyCodeBlock(blockId, code);\n }\n }\n }\n }\n\n private copyCodeBlock(blockId: string, code: string): void {\n navigator.clipboard.writeText(code).then(\n () => {\n // Update copy state\n const newStates = new Map(this.copyStateSignal());\n newStates.set(blockId, true);\n this.copyStateSignal.set(newStates);\n\n // Update the button in the DOM\n const button = this.elementRef.nativeElement.querySelector(\n `[data-code-block-id=\"${blockId}\"]`\n );\n if (button) {\n const originalHTML = button.innerHTML;\n button.innerHTML = `\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"10\" height=\"10\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M20 6 9 17l-5-5\"/></svg>\n <span>${this.labels.assistantMessageToolbarCopyCodeCopiedLabel}</span>\n `;\n button.setAttribute(\n \"aria-label\",\n `${this.labels.assistantMessageToolbarCopyCodeCopiedLabel} code`\n );\n\n // Reset after 2 seconds\n setTimeout(() => {\n const states = new Map(this.copyStateSignal());\n states.set(blockId, false);\n this.copyStateSignal.set(states);\n button.innerHTML = originalHTML;\n button.setAttribute(\n \"aria-label\",\n `${this.labels.assistantMessageToolbarCopyCodeLabel} code`\n );\n }, 2000);\n }\n },\n (err) => {\n console.error(\"Failed to copy code:\", err);\n }\n );\n }\n\n private generateBlockId(code: string): string {\n // Simple hash function for generating unique IDs\n let hash = 0;\n for (let i = 0; i < code.length; i++) {\n const char = code.charCodeAt(i);\n hash = (hash << 5) - hash + char;\n hash = hash & hash; // Convert to 32-bit integer\n }\n return `code-block-${hash}`;\n }\n\n private escapeHtml(text: string): string {\n const div = document.createElement(\"div\");\n div.textContent = text;\n return div.innerHTML;\n }\n}\n","import {\n Component,\n Input,\n Output,\n EventEmitter,\n signal,\n computed,\n ChangeDetectionStrategy,\n ViewEncapsulation,\n inject\n} from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { LucideAngularModule, Copy, Check, ThumbsUp, ThumbsDown, Volume2, RefreshCw } from 'lucide-angular';\nimport { CopilotTooltipDirective } from '../../lib/directives/tooltip.directive';\nimport { CopilotChatConfigurationService } from '../../core/chat-configuration/chat-configuration.service';\nimport { cn } from '../../lib/utils';\n\n// Base toolbar button component\n@Component({\n selector: 'button[copilotChatAssistantMessageToolbarButton]',\n standalone: true,\n imports: [CommonModule],\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: CopilotTooltipDirective,\n inputs: ['copilotTooltip: title', 'tooltipPosition', 'tooltipDelay']\n }\n ]\n})\nexport class CopilotChatAssistantMessageToolbarButtonComponent {\n @Input() title = '';\n @Input() disabled = false;\n @Input() set inputClass(value: string | undefined) {\n this.customClass.set(value);\n }\n \n private customClass = signal<string | undefined>(undefined);\n \n computedClass = computed(() => {\n return cn(\n // Flex centering with gap (from React button base styles)\n 'inline-flex items-center justify-center gap-2',\n // Cursor\n 'cursor-pointer',\n // Background and text\n 'p-0 text-[rgb(93,93,93)] hover:bg-[#E8E8E8]',\n // Dark mode\n 'dark:text-[rgb(243,243,243)] dark:hover:bg-[#303030]',\n // Shape and sizing\n 'h-8 w-8 rounded-md',\n // Interactions\n 'transition-colors',\n // Hover states\n 'hover:text-[rgb(93,93,93)]',\n 'dark:hover:text-[rgb(243,243,243)]',\n // Focus states\n 'focus:outline-none focus:ring-2 focus:ring-offset-2',\n // Disabled state\n 'disabled:opacity-50 disabled:cursor-not-allowed',\n // SVG styling from React Button component\n '[&_svg]:pointer-events-none [&_svg]:shrink-0',\n // Ensure proper sizing\n 'shrink-0',\n this.customClass()\n );\n });\n}\n\n// Copy button component\n@Component({\n selector: 'copilot-chat-assistant-message-copy-button',\n standalone: true,\n imports: [CommonModule, LucideAngularModule, CopilotChatAssistantMessageToolbarButtonComponent],\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 @if (copied()) {\n <lucide-angular [img]=\"CheckIcon\" [size]=\"18\"></lucide-angular>\n } @else {\n <lucide-angular [img]=\"CopyIcon\" [size]=\"18\"></lucide-angular>\n }\n </button>\n `\n})\nexport class CopilotChatAssistantMessageCopyButtonComponent {\n @Input() title?: string;\n @Input() disabled = false;\n @Input() inputClass?: string;\n @Input() content?: string;\n @Output() clicked = new EventEmitter<void>();\n \n readonly CopyIcon = Copy;\n readonly CheckIcon = Check;\n \n copied = signal(false);\n private chatConfig = inject(CopilotChatConfigurationService);\n \n get labels() {\n return this.chatConfig.labels();\n }\n \n handleCopy(event?: Event): void {\n event?.stopPropagation();\n if (!this.content) return;\n \n // Set copied immediately for instant feedback\n this.copied.set(true);\n setTimeout(() => this.copied.set(false), 2000);\n \n // Copy to clipboard (fire and forget)\n navigator.clipboard.writeText(this.content).then(\n () => this.clicked.emit(),\n (err) => {\n console.error('Failed to copy message:', err);\n this.copied.set(false);\n }\n );\n }\n}\n\n// Thumbs up button component\n@Component({\n selector: 'copilot-chat-assistant-message-thumbs-up-button',\n standalone: true,\n imports: [CommonModule, LucideAngularModule, CopilotChatAssistantMessageToolbarButtonComponent],\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 <lucide-angular [img]=\"ThumbsUpIcon\" [size]=\"18\"></lucide-angular>\n </button>\n `\n})\nexport class CopilotChatAssistantMessageThumbsUpButtonComponent {\n @Input() title?: string;\n @Input() disabled = false;\n @Input() inputClass?: string;\n @Output() clicked = new EventEmitter<void>();\n \n readonly ThumbsUpIcon = ThumbsUp;\n private chatConfig = inject(CopilotChatConfigurationService);\n \n get labels() {\n return this.chatConfig.labels();\n }\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 standalone: true,\n imports: [CommonModule, LucideAngularModule, CopilotChatAssistantMessageToolbarButtonComponent],\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 <lucide-angular [img]=\"ThumbsDownIcon\" [size]=\"18\"></lucide-angular>\n </button>\n `\n})\nexport class CopilotChatAssistantMessageThumbsDownButtonComponent {\n @Input() title?: string;\n @Input() disabled = false;\n @Input() inputClass?: string;\n @Output() clicked = new EventEmitter<void>();\n \n readonly ThumbsDownIcon = ThumbsDown;\n private chatConfig = inject(CopilotChatConfigurationService);\n \n get labels() {\n return this.chatConfig.labels();\n }\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 standalone: true,\n imports: [CommonModule, LucideAngularModule, CopilotChatAssistantMessageToolbarButtonComponent],\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 <lucide-angular [img]=\"Volume2Icon\" [size]=\"20\"></lucide-angular>\n </button>\n `\n})\nexport class CopilotChatAssistantMessageReadAloudButtonComponent {\n @Input() title?: string;\n @Input() disabled = false;\n @Input() inputClass?: string;\n @Output() clicked = new EventEmitter<void>();\n \n readonly Volume2Icon = Volume2;\n private chatConfig = inject(CopilotChatConfigurationService);\n \n get labels() {\n return this.chatConfig.labels();\n }\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 standalone: true,\n imports: [CommonModule, LucideAngularModule, CopilotChatAssistantMessageToolbarButtonComponent],\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 <lucide-angular [img]=\"RefreshCwIcon\" [size]=\"18\"></lucide-angular>\n </button>\n `\n})\nexport class CopilotChatAssistantMessageRegenerateButtonComponent {\n @Input() title?: string;\n @Input() disabled = false;\n @Input() inputClass?: string;\n @Output() clicked = new EventEmitter<void>();\n \n readonly RefreshCwIcon = RefreshCw;\n private chatConfig = inject(CopilotChatConfigurationService);\n \n get labels() {\n return this.chatConfig.labels();\n }\n \n handleClick(event?: Event): void {\n event?.stopPropagation();\n if (!this.disabled) {\n this.clicked.emit();\n }\n }\n}\n","import {\n Directive,\n Input,\n signal,\n computed\n} from '@angular/core';\nimport { cn } from '../../lib/utils';\n\n@Directive({\n selector: '[copilotChatAssistantMessageToolbar]',\n standalone: true,\n host: {\n '[class]': 'computedClass()'\n }\n})\nexport class CopilotChatAssistantMessageToolbarComponent {\n @Input() set inputClass(value: string | undefined) {\n this.customClass.set(value);\n }\n \n private customClass = signal<string | undefined>(undefined);\n \n computedClass = computed(() => {\n return cn(\n 'w-full bg-transparent flex items-center -ml-[5px] -mt-[0px]',\n this.customClass()\n );\n });\n}","import { Injectable, signal } from '@angular/core';\n\n@Injectable({ providedIn: 'root' })\nexport class CopilotChatViewHandlersService {\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 Input,\n Output,\n EventEmitter,\n TemplateRef,\n ContentChild,\n signal,\n computed,\n Type,\n ChangeDetectionStrategy,\n ViewEncapsulation,\n Optional,\n Inject\n} from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { CopilotSlotComponent } from '../../lib/slots/copilot-slot.component';\nimport { CopilotChatToolCallsViewComponent } from './copilot-chat-tool-calls-view.component';\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 { CopilotChatAssistantMessageRendererComponent } from './copilot-chat-assistant-message-renderer.component';\nimport {\n CopilotChatAssistantMessageCopyButtonComponent,\n CopilotChatAssistantMessageThumbsUpButtonComponent,\n CopilotChatAssistantMessageThumbsDownButtonComponent,\n CopilotChatAssistantMessageReadAloudButtonComponent,\n CopilotChatAssistantMessageRegenerateButtonComponent\n} from './copilot-chat-assistant-message-buttons.component';\nimport { CopilotChatAssistantMessageToolbarComponent } from './copilot-chat-assistant-message-toolbar.component';\nimport { cn } from '../../lib/utils';\nimport { CopilotChatViewHandlersService } from './copilot-chat-view-handlers.service';\n\n@Component({\n selector: 'copilot-chat-assistant-message',\n standalone: true,\n imports: [\n CommonModule,\n CopilotSlotComponent,\n CopilotChatAssistantMessageRendererComponent,\n CopilotChatAssistantMessageCopyButtonComponent,\n CopilotChatAssistantMessageThumbsUpButtonComponent,\n CopilotChatAssistantMessageThumbsDownButtonComponent,\n CopilotChatAssistantMessageReadAloudButtonComponent,\n CopilotChatAssistantMessageRegenerateButtonComponent,\n CopilotChatAssistantMessageToolbarComponent,\n CopilotChatToolCallsViewComponent\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `\n <div \n [class]=\"computedClass()\"\n [attr.data-message-id]=\"message?.id\">\n \n <!-- Markdown Renderer -->\n @if (markdownRendererTemplate || markdownRendererComponent) {\n <copilot-slot\n [slot]=\"markdownRendererTemplate || markdownRendererComponent\"\n [context]=\"markdownRendererContext()\"\n [defaultComponent]=\"CopilotChatAssistantMessageRendererComponent\"\n >\n </copilot-slot>\n } @else {\n <copilot-chat-assistant-message-renderer\n [content]=\"message?.content || ''\"\n [inputClass]=\"markdownRendererClass\">\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]=\"CopilotChatToolCallsViewComponent\">\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 [isLoading]=\"isLoading\">\n </copilot-chat-tool-calls-view>\n }\n \n <!-- Toolbar: show only when there is assistant text content -->\n <ng-container *ngIf=\"toolbarVisible && hasMessageContent()\">\n @if (toolbarTemplate || toolbarComponent) {\n <copilot-slot\n [slot]=\"toolbarTemplate || toolbarComponent\"\n [context]=\"toolbarContext()\"\n [defaultComponent]=\"CopilotChatAssistantMessageToolbarComponent\"\n >\n </copilot-slot>\n } @else {\n <div copilotChatAssistantMessageToolbar [inputClass]=\"toolbarClass\">\n <div class=\"flex items-center gap-1\">\n <!-- Copy button -->\n @if (copyButtonTemplate || copyButtonComponent) {\n <copilot-slot\n [slot]=\"copyButtonTemplate || copyButtonComponent\"\n [context]=\"{ content: message?.content || '' }\"\n [defaultComponent]=\"CopilotChatAssistantMessageCopyButtonComponent\"\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 </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 (thumbsUpButtonComponent || thumbsUpButtonTemplate || handlers.hasAssistantThumbsUpHandler()) {\n <copilot-slot\n [slot]=\"thumbsUpButtonTemplate || thumbsUpButtonComponent\"\n [context]=\"{}\"\n [defaultComponent]=\"defaultThumbsUpButtonComponent\"\n [outputs]=\"thumbsUpButtonOutputs\">\n </copilot-slot>\n }\n \n <!-- Thumbs down button - show if custom slot provided OR if handler available at top level -->\n @if (thumbsDownButtonComponent || thumbsDownButtonTemplate || handlers.hasAssistantThumbsDownHandler()) {\n <copilot-slot\n [slot]=\"thumbsDownButtonTemplate || thumbsDownButtonComponent\"\n [context]=\"{}\"\n [defaultComponent]=\"defaultThumbsDownButtonComponent\"\n [outputs]=\"thumbsDownButtonOutputs\">\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 *ngTemplateOutlet=\"additionalToolbarItems\"></ng-container>\n }\n </div>\n </div>\n }\n </ng-container>\n </div>\n `,\n styles: [`\n /* Import KaTeX styles */\n @import 'katex/dist/katex.min.css';\n\n :host {\n display: block;\n width: 100%;\n }\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})\nexport class CopilotChatAssistantMessageComponent {\n // Capture templates from content projection\n @ContentChild('markdownRenderer', { read: TemplateRef }) markdownRendererTemplate?: TemplateRef<AssistantMessageMarkdownRendererContext>;\n @ContentChild('toolbar', { read: TemplateRef }) toolbarTemplate?: TemplateRef<AssistantMessageToolbarContext>;\n @ContentChild('copyButton', { read: TemplateRef }) copyButtonTemplate?: TemplateRef<AssistantMessageCopyButtonContext>;\n @ContentChild('thumbsUpButton', { read: TemplateRef }) thumbsUpButtonTemplate?: TemplateRef<ThumbsUpButtonContext>;\n @ContentChild('thumbsDownButton', { read: TemplateRef }) thumbsDownButtonTemplate?: TemplateRef<ThumbsDownButtonContext>;\n @ContentChild('readAloudButton', { read: TemplateRef }) readAloudButtonTemplate?: TemplateRef<ReadAloudButtonContext>;\n @ContentChild('regenerateButton', { read: TemplateRef }) regenerateButtonTemplate?: TemplateRef<RegenerateButtonContext>;\n @ContentChild('toolCallsView', { read: TemplateRef }) toolCallsViewTemplate?: TemplateRef<any>;\n \n // Class inputs for styling default components\n @Input() markdownRendererClass?: string;\n @Input() toolbarClass?: string;\n @Input() copyButtonClass?: string;\n @Input() thumbsUpButtonClass?: string;\n @Input() thumbsDownButtonClass?: string;\n @Input() readAloudButtonClass?: string;\n @Input() regenerateButtonClass?: string;\n @Input() toolCallsViewClass?: string;\n \n // Component inputs for overrides\n @Input() markdownRendererComponent?: Type<any>;\n @Input() toolbarComponent?: Type<any>;\n @Input() copyButtonComponent?: Type<any>;\n @Input() thumbsUpButtonComponent?: Type<any>;\n @Input() thumbsDownButtonComponent?: Type<any>;\n @Input() readAloudButtonComponent?: Type<any>;\n @Input() regenerateButtonComponent?: Type<any>;\n @Input() toolCallsViewComponent?: Type<any>;\n \n // Regular inputs\n @Input() message!: AssistantMessage;\n @Input() messages: Message[] = [];\n @Input() isLoading = false;\n @Input() additionalToolbarItems?: TemplateRef<any>;\n @Input() toolbarVisible = true;\n @Input() set inputClass(val: string | undefined) {\n this.customClass.set(val);\n }\n \n // DI service exposes handler availability scoped to CopilotChatView\n // Make it optional with a default fallback for testing\n handlers: CopilotChatViewHandlersService;\n \n constructor(@Optional() @Inject(CopilotChatViewHandlersService) handlers?: CopilotChatViewHandlersService | null) {\n this.handlers = handlers || new CopilotChatViewHandlersService();\n }\n \n // Output events\n @Output() thumbsUp = new EventEmitter<CopilotChatAssistantMessageOnThumbsUpProps>();\n @Output() thumbsDown = new EventEmitter<CopilotChatAssistantMessageOnThumbsDownProps>();\n @Output() readAloud = new EventEmitter<CopilotChatAssistantMessageOnReadAloudProps>();\n @Output() regenerate = new EventEmitter<CopilotChatAssistantMessageOnRegenerateProps>();\n \n // Signals\n customClass = signal<string | undefined>(undefined);\n \n // Computed values\n computedClass = computed(() => {\n return cn(\n \"prose max-w-full break-words dark:prose-invert\",\n this.customClass()\n );\n });\n \n // Default components\n protected readonly defaultThumbsUpButtonComponent = CopilotChatAssistantMessageThumbsUpButtonComponent;\n protected readonly defaultThumbsDownButtonComponent = CopilotChatAssistantMessageThumbsDownButtonComponent;\n protected readonly CopilotChatAssistantMessageRendererComponent = CopilotChatAssistantMessageRendererComponent;\n protected readonly CopilotChatAssistantMessageToolbarComponent = CopilotChatAssistantMessageToolbarComponent;\n protected readonly CopilotChatAssistantMessageCopyButtonComponent = CopilotChatAssistantMessageCopyButtonComponent;\n protected readonly CopilotChatToolCallsViewComponent = CopilotChatToolCallsViewComponent;\n \n // Context for slots (reactive via signals)\n markdownRendererContext = computed<AssistantMessageMarkdownRendererContext>(() => ({\n content: this.message?.content || ''\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 const raw = (this.message?.content ?? '') as any;\n const content = typeof raw === 'string' ? raw : String(raw ?? '');\n return 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 signal,\n OnInit,\n OnChanges\n} from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { cn } from '../../lib/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 standalone: true,\n imports: [CommonModule],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `\n <div\n [class]=\"computedClass()\"\n ></div>\n `\n})\nexport class CopilotChatMessageViewCursorComponent implements OnInit, OnChanges {\n @Input() inputClass?: string;\n \n // Signal for reactive class updates\n private inputClassSignal = signal<string | undefined>(undefined);\n \n // Computed class that matches React exactly: w-[11px] h-[11px] rounded-full bg-foreground animate-pulse-cursor ml-1\n computedClass = computed(() => \n cn(\n 'w-[11px] h-[11px] rounded-full bg-foreground animate-pulse-cursor ml-1',\n this.inputClassSignal()\n )\n );\n \n ngOnInit() {\n this.inputClassSignal.set(this.inputClass);\n }\n \n ngOnChanges() {\n this.inputClassSignal.set(this.inputClass);\n }\n}","import {\n Component,\n Input,\n Output,\n EventEmitter,\n ContentChild,\n TemplateRef,\n Type,\n ChangeDetectionStrategy,\n ViewEncapsulation,\n signal,\n computed,\n OnInit,\n OnChanges\n} from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { CopilotSlotComponent } from '../../lib/slots/copilot-slot.component';\nimport type { Message } from '@ag-ui/core';\nimport { CopilotChatAssistantMessageComponent } from './copilot-chat-assistant-message.component';\nimport { CopilotChatUserMessageComponent } from './copilot-chat-user-message.component';\nimport { CopilotChatMessageViewCursorComponent } from './copilot-chat-message-view-cursor.component';\nimport { cn } from '../../lib/utils';\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 standalone: true,\n imports: [\n CommonModule,\n CopilotSlotComponent,\n CopilotChatAssistantMessageComponent,\n CopilotChatUserMessageComponent,\n CopilotChatMessageViewCursorComponent\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 *ngTemplateOutlet=\"customLayoutTemplate; context: layoutContext()\"></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 messagesSignal(); track trackByMessageId($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 </copilot-slot>\n } @else {\n <copilot-chat-assistant-message \n [message]=\"message\"\n [messages]=\"messagesSignal()\"\n [isLoading]=\"isLoadingSignal()\"\n [inputClass]=\"assistantMessageClass\"\n (thumbsUp)=\"handleAssistantThumbsUp($event)\"\n (thumbsDown)=\"handleAssistantThumbsDown($event)\"\n (readAloud)=\"handleAssistantReadAloud($event)\"\n (regenerate)=\"handleAssistantRegenerate($event)\">\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 </copilot-slot>\n } @else {\n <copilot-chat-user-message \n [message]=\"message\"\n [inputClass]=\"userMessageClass\">\n </copilot-chat-user-message>\n }\n }\n }\n \n <!-- Cursor - exactly like React's conditional rendering -->\n @if (showCursor) {\n @if (cursorComponent || cursorTemplate) {\n <copilot-slot\n [slot]=\"cursorTemplate || cursorComponent\"\n [context]=\"{ inputClass: cursorClass }\"\n [defaultComponent]=\"defaultCursorComponent\">\n </copilot-slot>\n } @else {\n <copilot-chat-message-view-cursor \n [inputClass]=\"cursorClass\">\n </copilot-chat-message-view-cursor>\n }\n }\n </div>\n }\n `\n})\nexport class CopilotChatMessageViewComponent implements OnInit, OnChanges {\n // Core inputs matching React props\n @Input() messages: Message[] = [];\n @Input() showCursor = false;\n @Input() isLoading = false;\n @Input() inputClass?: string;\n \n // Handler availability handled via DI service\n \n // Assistant message slot inputs\n @Input() assistantMessageComponent?: Type<any>;\n @Input() assistantMessageTemplate?: TemplateRef<any>;\n @Input() assistantMessageClass?: string;\n \n // User message slot inputs\n @Input() userMessageComponent?: Type<any>;\n @Input() userMessageTemplate?: TemplateRef<any>;\n @Input() userMessageClass?: string;\n \n \n // Cursor slot inputs\n @Input() cursorComponent?: Type<any>;\n @Input() cursorTemplate?: TemplateRef<any>;\n @Input() cursorClass?: string;\n \n // Custom layout template (render prop pattern)\n @ContentChild('customLayout') customLayoutTemplate?: TemplateRef<any>;\n \n // Output events (bubbled from child components)\n @Output() assistantMessageThumbsUp = new EventEmitter<{ message: Message }>();\n @Output() assistantMessageThumbsDown = new EventEmitter<{ message: Message }>();\n @Output() assistantMessageReadAloud = new EventEmitter<{ message: Message }>();\n @Output() assistantMessageRegenerate = new EventEmitter<{ message: Message }>();\n @Output() userMessageCopy = new EventEmitter<{ message: Message }>();\n @Output() userMessageEdit = new EventEmitter<{ message: Message }>();\n \n // Default components for slots\n protected readonly defaultAssistantComponent = CopilotChatAssistantMessageComponent;\n protected readonly defaultUserComponent = CopilotChatUserMessageComponent;\n protected readonly defaultCursorComponent = CopilotChatMessageViewCursorComponent;\n \n // Signals for reactive updates\n protected messagesSignal = signal<Message[]>([]);\n protected showCursorSignal = signal(false);\n protected isLoadingSignal = signal(false);\n protected inputClassSignal = signal<string | undefined>(undefined);\n \n // Computed class matching React: twMerge(\"flex flex-col\", className)\n computedClass = computed(() => \n cn('flex flex-col', this.inputClassSignal())\n );\n \n \n // Layout context for custom templates (render prop pattern)\n layoutContext = computed(() => ({\n isLoading: this.isLoadingSignal(),\n messages: this.messagesSignal(),\n showCursor: this.showCursorSignal(),\n messageElements: this.messagesSignal().filter(m => m && (m.role === 'assistant' || m.role === 'user'))\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(() => \n this.cursorComponent || this.cursorClass\n );\n \n // Props merging helpers\n mergeAssistantProps(message: Message) {\n return {\n message,\n messages: this.messagesSignal(),\n isLoading: this.isLoadingSignal(),\n inputClass: this.assistantMessageClass\n };\n }\n \n mergeUserProps(message: Message) {\n return {\n message,\n inputClass: this.userMessageClass\n };\n }\n \n // TrackBy function for performance optimization\n trackByMessageId(index: number, message: Message): string {\n return message?.id || `index-${index}`;\n }\n \n // Lifecycle hooks\n ngOnInit() {\n // Initialize signals with input values\n this.messagesSignal.set(this.messages);\n this.showCursorSignal.set(this.showCursor);\n this.isLoadingSignal.set(this.isLoading);\n this.inputClassSignal.set(this.inputClass);\n }\n \n ngOnChanges() {\n this.messagesSignal.set(this.messages);\n this.showCursorSignal.set(this.showCursor);\n this.isLoadingSignal.set(this.isLoading);\n this.inputClassSignal.set(this.inputClass);\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 EventEmitter,\n ChangeDetectionStrategy,\n ViewEncapsulation\n} from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { LucideAngularModule, ChevronDown } from 'lucide-angular';\nimport { cn } from '../../lib/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 standalone: true,\n imports: [CommonModule, LucideAngularModule],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `\n <button\n type=\"button\"\n [class]=\"computedClass\"\n [disabled]=\"disabled\"\n (click)=\"handleClick()\">\n <lucide-angular\n [img]=\"ChevronDown\"\n class=\"w-4 h-4 text-gray-600 dark:text-white\">\n </lucide-angular>\n </button>\n `\n})\nexport class CopilotChatViewScrollToBottomButtonComponent {\n @Input() inputClass?: string;\n @Input() disabled: boolean = false;\n // Support function-style click handler via slot context\n @Input() onClick?: () => void;\n \n // Simple, idiomatic Angular output\n @Output() clicked = new EventEmitter<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 'rounded-full w-10 h-10 p-0',\n // Background colors\n 'bg-white dark:bg-gray-900',\n // Border and shadow\n 'shadow-lg border border-gray-200 dark:border-gray-700',\n // Hover states\n 'hover:bg-gray-50 dark:hover:bg-gray-800',\n // Layout\n 'flex items-center justify-center cursor-pointer',\n // Transition\n 'transition-colors',\n // Focus states\n 'focus:outline-none focus-visible:ring-2 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 { Injectable, ElementRef, NgZone, OnDestroy } from '@angular/core';\nimport { ScrollDispatcher, ViewportRuler } from '@angular/cdk/scrolling';\nimport { Observable, Subject, BehaviorSubject, fromEvent, merge, animationFrameScheduler } from 'rxjs';\nimport { \n takeUntil, \n debounceTime, \n throttleTime, \n distinctUntilChanged,\n map,\n observeOn,\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 ScrollPositionService 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((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(\n debounceTime(debounceMs),\n takeUntil(this.destroy$)\n );\n }\n \n ngOnDestroy(): void {\n this.destroy$.next();\n this.destroy$.complete();\n this.scrollStateSubject.complete();\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((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): { width: number; height: number } {\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(element: ElementRef<HTMLElement> | HTMLElement): 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}","import {\n Directive,\n Input,\n Output,\n EventEmitter,\n ElementRef,\n OnInit,\n OnDestroy,\n AfterViewInit,\n inject\n} from '@angular/core';\nimport { ScrollPositionService } from '../services/scroll-position.service';\nimport { ResizeObserverService } from '../services/resize-observer.service';\nimport { Subject, combineLatest, merge } from 'rxjs';\nimport { takeUntil, debounceTime, filter, distinctUntilChanged } 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 selector: '[copilotStickToBottom]',\n standalone: true,\n providers: [ScrollPositionService, ResizeObserverService]\n})\nexport class StickToBottomDirective implements OnInit, AfterViewInit, OnDestroy {\n @Input() enabled: boolean = true;\n @Input() threshold: number = 10;\n @Input() initialBehavior: ScrollBehavior = 'smooth';\n @Input() resizeBehavior: ScrollBehavior = 'smooth';\n @Input() debounceMs: number = 100;\n \n @Output() isAtBottomChange = new EventEmitter<boolean>();\n @Output() scrollToBottomRequested = new EventEmitter<void>();\n \n private elementRef = inject(ElementRef);\n private scrollService = inject(ScrollPositionService);\n private resizeService = inject(ResizeObserverService);\n \n private destroy$ = new Subject<void>();\n private contentElement?: HTMLElement;\n private wasAtBottom = true;\n private hasInitialized = false;\n private userHasScrolled = false;\n \n ngOnInit(): void {\n // Setup will happen in ngAfterViewInit\n }\n \n ngAfterViewInit(): void {\n const element = this.elementRef.nativeElement as HTMLElement;\n \n // Find or create content wrapper\n this.contentElement = element.querySelector('[data-stick-to-bottom-content]') as HTMLElement;\n if (!this.contentElement) {\n this.contentElement = element;\n }\n \n this.setupScrollMonitoring();\n this.setupResizeMonitoring();\n this.setupContentMutationObserver();\n \n // Initial scroll to bottom if enabled\n setTimeout(() => {\n this.hasInitialized = true;\n if (this.enabled) {\n this.scrollToBottom(this.initialBehavior);\n }\n }, 0);\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.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.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.observeElement(element, 0, 250)\n .pipe(\n takeUntil(this.destroy$),\n filter(() => this.enabled && !this.userHasScrolled && this.wasAtBottom)\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(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.destroy$.next();\n this.destroy$.complete();\n }\n}","import {\n Component,\n Input,\n Output,\n EventEmitter,\n ViewChild,\n ElementRef,\n ChangeDetectionStrategy,\n ViewEncapsulation,\n signal,\n computed,\n OnInit,\n OnChanges,\n AfterViewInit,\n OnDestroy,\n inject,\n PLATFORM_ID,\n ChangeDetectorRef\n} from '@angular/core';\nimport { CommonModule, isPlatformBrowser } from '@angular/common';\nimport { CdkScrollable, ScrollingModule } from '@angular/cdk/scrolling';\nimport { CopilotSlotComponent } from '../../lib/slots/copilot-slot.component';\nimport { CopilotChatMessageViewComponent } from './copilot-chat-message-view.component';\nimport { CopilotChatViewScrollToBottomButtonComponent } from './copilot-chat-view-scroll-to-bottom-button.component';\nimport { StickToBottomDirective } from '../../directives/stick-to-bottom.directive';\nimport { ScrollPositionService } from '../../services/scroll-position.service';\nimport { Message } from '@ag-ui/client';\nimport { cn } from '../../lib/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 standalone: true,\n imports: [\n CommonModule,\n ScrollingModule,\n CopilotSlotComponent,\n CopilotChatMessageViewComponent,\n CopilotChatViewScrollToBottomButtonComponent,\n StickToBottomDirective\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [ScrollPositionService],\n template: `\n @if (!hasMounted()) {\n <!-- SSR/Initial render without stick-to-bottom -->\n <div class=\"h-full max-h-full flex flex-col min-h-0 overflow-y-scroll overflow-x-hidden\">\n <div class=\"px-4 sm:px-0\">\n <ng-content></ng-content>\n </div>\n </div>\n } @else if (!autoScroll) {\n <!-- Manual scroll mode -->\n <div class=\"h-full max-h-full flex flex-col min-h-0 relative\">\n <div \n #scrollContainer\n cdkScrollable\n [class]=\"computedClass()\"\n class=\"overflow-y-scroll overflow-x-hidden\">\n <div #contentContainer class=\"px-4 sm:px-0\">\n <!-- Content with padding-bottom matching React -->\n <div [style.padding-bottom.px]=\"paddingBottom()\">\n <div class=\"max-w-3xl mx-auto\">\n @if (messageView) {\n <copilot-slot\n [slot]=\"messageView\"\n [context]=\"messageViewContext()\"\n [defaultComponent]=\"defaultMessageViewComponent\">\n </copilot-slot>\n } @else {\n <copilot-chat-message-view\n [messages]=\"messages\"\n [inputClass]=\"messageViewClass\"\n [showCursor]=\"showCursor\"\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 </copilot-chat-message-view>\n }\n </div>\n </div>\n </div>\n </div>\n \n <!-- Scroll to bottom button for manual mode, OUTSIDE scrollable content -->\n @if (showScrollButton() && !isResizing) {\n <div\n class=\"absolute inset-x-0 flex justify-center z-30\"\n [style.bottom.px]=\"inputContainerHeightSignal() + 16\">\n <copilot-slot\n [slot]=\"scrollToBottomButton\"\n [context]=\"scrollToBottomContext()\"\n [defaultComponent]=\"defaultScrollToBottomButtonComponent\"\n [outputs]=\"scrollToBottomOutputs\">\n </copilot-slot>\n </div>\n }\n </div>\n } @else {\n <!-- Auto-scroll mode with StickToBottom directive -->\n <div class=\"h-full max-h-full flex flex-col min-h-0 relative\">\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=\"overflow-y-scroll overflow-x-hidden\">\n \n <!-- Scrollable content wrapper -->\n <div class=\"px-4 sm:px-0\">\n <!-- Content with padding-bottom matching React -->\n <div [style.padding-bottom.px]=\"paddingBottom()\">\n <div class=\"max-w-3xl mx-auto\">\n @if (messageView) {\n <copilot-slot\n [slot]=\"messageView\"\n [context]=\"messageViewContext()\"\n [defaultComponent]=\"defaultMessageViewComponent\">\n </copilot-slot>\n } @else {\n <copilot-chat-message-view\n [messages]=\"messages\"\n [inputClass]=\"messageViewClass\"\n [showCursor]=\"showCursor\"\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 </copilot-chat-message-view>\n }\n </div>\n </div>\n </div>\n </div>\n \n <!-- Scroll to bottom button - hidden during resize, OUTSIDE scrollable content -->\n @if (!isAtBottom() && !isResizing) {\n <div\n class=\"absolute inset-x-0 flex justify-center z-30\"\n [style.bottom.px]=\"inputContainerHeightSignal() + 16\">\n <copilot-slot\n [slot]=\"scrollToBottomButton\"\n [context]=\"scrollToBottomFromStickContext()\"\n [defaultComponent]=\"defaultScrollToBottomButtonComponent\"\n [outputs]=\"scrollToBottomFromStickOutputs\">\n </copilot-slot>\n </div>\n }\n </div>\n }\n `\n})\nexport class CopilotChatViewScrollViewComponent implements OnInit, OnChanges, AfterViewInit, OnDestroy {\n private cdr = inject(ChangeDetectorRef);\n \n @Input() autoScroll: boolean = true;\n \n private _inputContainerHeight: number = 0;\n @Input() \n set inputContainerHeight(value: number) {\n this._inputContainerHeight = value;\n this.inputContainerHeightSignal.set(value);\n this.cdr.markForCheck();\n }\n get inputContainerHeight(): number {\n return this._inputContainerHeight;\n }\n \n @Input() isResizing: boolean = false;\n @Input() inputClass?: string;\n @Input() messages: Message[] = [];\n @Input() messageView?: any;\n @Input() messageViewClass?: string;\n @Input() showCursor: boolean = false;\n \n // Handler availability flags removed in favor of DI service\n \n // Slot inputs\n @Input() scrollToBottomButton?: any;\n @Input() scrollToBottomButtonClass?: string;\n \n // Output events (bubbled from message view)\n @Output() assistantMessageThumbsUp = new EventEmitter<{ message: Message }>();\n @Output() assistantMessageThumbsDown = new EventEmitter<{ message: Message }>();\n @Output() assistantMessageReadAloud = new EventEmitter<{ message: Message }>();\n @Output() assistantMessageRegenerate = new EventEmitter<{ message: Message }>();\n @Output() userMessageCopy = new EventEmitter<{ message: Message }>();\n @Output() userMessageEdit = new EventEmitter<{ message: Message }>();\n \n // ViewChild references\n @ViewChild('scrollContainer', { read: ElementRef }) scrollContainer?: ElementRef<HTMLElement>;\n @ViewChild('contentContainer', { read: ElementRef }) contentContainer?: ElementRef<HTMLElement>;\n @ViewChild(StickToBottomDirective) stickToBottomDirective?: StickToBottomDirective;\n \n // Default components\n protected readonly defaultMessageViewComponent = CopilotChatMessageViewComponent;\n protected readonly defaultScrollToBottomButtonComponent = CopilotChatViewScrollToBottomButtonComponent;\n \n // Signals\n protected hasMounted = signal(false);\n protected showScrollButton = signal(false);\n protected isAtBottom = signal(true);\n protected inputContainerHeightSignal = signal(0);\n protected paddingBottom = computed(() => this.inputContainerHeightSignal() + 32);\n \n // Computed class\n protected computedClass = computed(() => \n cn(this.inputClass)\n );\n \n private destroy$ = new Subject<void>();\n private platformId = inject(PLATFORM_ID);\n private scrollPositionService = inject(ScrollPositionService);\n \n ngOnInit(): void {\n // Check if we're in the browser\n if (isPlatformBrowser(this.platformId)) {\n // Set mounted after a tick to allow for hydration\n setTimeout(() => {\n this.hasMounted.set(true);\n }, 0);\n }\n }\n \n ngOnChanges(): void {\n // Update signals when inputs change\n // Force change detection when inputContainerHeight changes\n if (this.inputContainerHeight !== undefined) {\n this.cdr.detectChanges();\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(this.scrollContainer.nativeElement, 10);\n this.showScrollButton.set(!initialState.isAtBottom);\n \n // Monitor scroll position for manual mode\n this.scrollPositionService.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 = { clicked: () => this.scrollToBottomFromStick() };\n \n // Context methods for templates\n messageViewContext(): any {\n return { messages: this.messages, inputClass: this.messageViewClass, showCursor: this.showCursor };\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","import {\n Component,\n Input,\n ChangeDetectionStrategy,\n ViewEncapsulation\n} from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { cn } from '../../lib/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 standalone: true,\n imports: [CommonModule],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `\n <div \n [class]=\"computedClass\"\n [style]=\"style\">\n </div>\n `\n})\nexport class CopilotChatViewFeatherComponent {\n @Input() inputClass?: string;\n @Input() style?: { [key: string]: any };\n \n // Computed class matching React exactly\n get computedClass(): string {\n return cn(\n // Positioning\n 'absolute bottom-0 left-0 right-4 h-24 pointer-events-none z-10',\n // Gradient\n 'bg-gradient-to-t',\n // Light mode colors\n 'from-white via-white to-transparent',\n // Dark mode colors\n 'dark:from-[rgb(33,33,33)] dark:via-[rgb(33,33,33)]',\n // Custom classes\n this.inputClass\n );\n }\n}\n","import {\n Component,\n Input,\n ChangeDetectionStrategy,\n ViewEncapsulation,\n inject,\n} from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\nimport { CopilotChatConfigurationService } from \"../../core/chat-configuration/chat-configuration.service\";\nimport { cn } from \"../../lib/utils\";\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 standalone: true,\n imports: [CommonModule],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `\n <div [class]=\"computedClass\">\n {{ disclaimerText }}\n </div>\n `,\n})\nexport class CopilotChatViewDisclaimerComponent {\n @Input() inputClass?: string;\n @Input() text?: string;\n\n private configService = inject(CopilotChatConfigurationService);\n\n // Get disclaimer text from input or configuration\n get disclaimerText(): string {\n if (this.text) {\n return this.text;\n }\n\n return this.configService.labels().chatDisclaimerText;\n }\n\n // Computed class matching React exactly\n get computedClass(): string {\n return cn(\n \"text-center text-xs text-muted-foreground py-3 px-4 max-w-3xl mx-auto\",\n this.inputClass\n );\n }\n}\n","import {\n Component,\n Input,\n ChangeDetectionStrategy,\n ViewEncapsulation,\n forwardRef,\n ElementRef\n} from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { CopilotSlotComponent } from '../../lib/slots/copilot-slot.component';\nimport { CopilotChatInputComponent } from './copilot-chat-input.component';\nimport { CopilotChatViewDisclaimerComponent } from './copilot-chat-view-disclaimer.component';\nimport { cn } from '../../lib/utils';\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 standalone: true,\n imports: [\n CommonModule,\n CopilotSlotComponent,\n CopilotChatInputComponent,\n CopilotChatViewDisclaimerComponent\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [\n {\n provide: ElementRef,\n useExisting: forwardRef(() => CopilotChatViewInputContainerComponent)\n }\n ],\n template: `\n <div [class]=\"computedClass\">\n <!-- Input component -->\n <div class=\"max-w-3xl mx-auto py-0 px-4 sm:px-0\">\n <copilot-slot\n [slot]=\"input\"\n [context]=\"{ inputClass: inputClass }\"\n [defaultComponent]=\"defaultInputComponent\">\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 </copilot-slot>\n </div>\n `\n})\nexport class CopilotChatViewInputContainerComponent extends ElementRef {\n @Input() inputContainerClass?: string;\n \n // Input slot configuration\n @Input() input?: any;\n @Input() inputClass?: string;\n \n // Disclaimer slot configuration\n @Input() disclaimer?: any;\n @Input() disclaimerText?: string;\n @Input() disclaimerClass?: string;\n \n // Default components\n protected readonly defaultInputComponent = CopilotChatInputComponent;\n protected readonly defaultDisclaimerComponent = CopilotChatViewDisclaimerComponent;\n \n constructor(elementRef: ElementRef) {\n super(elementRef.nativeElement);\n }\n \n \n // Computed class matching React exactly\n get computedClass(): string {\n return cn(\n 'absolute bottom-0 left-0 right-0 z-20',\n this.inputContainerClass\n );\n }\n \n // Removed mergedInputContext - no longer needed\n}\n","import {\n Component,\n Input,\n Output,\n EventEmitter,\n ContentChild,\n TemplateRef,\n Type,\n ViewChild,\n ElementRef,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n ViewEncapsulation,\n signal,\n computed,\n OnInit,\n OnChanges,\n OnDestroy,\n AfterViewInit,\n ViewContainerRef,\n effect\n} from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { CopilotSlotComponent } from '../../lib/slots/copilot-slot.component';\nimport { CopilotChatMessageViewComponent } from './copilot-chat-message-view.component';\nimport { CopilotChatInputComponent } from './copilot-chat-input.component';\nimport { CopilotChatViewScrollViewComponent } from './copilot-chat-view-scroll-view.component';\nimport { CopilotChatViewScrollToBottomButtonComponent } from './copilot-chat-view-scroll-to-bottom-button.component';\nimport { CopilotChatViewFeatherComponent } from './copilot-chat-view-feather.component';\nimport { CopilotChatViewInputContainerComponent } from './copilot-chat-view-input-container.component';\nimport { CopilotChatViewDisclaimerComponent } from './copilot-chat-view-disclaimer.component';\nimport { Message } from '@ag-ui/client';\nimport { cn } from '../../lib/utils';\nimport { ResizeObserverService } from '../../services/resize-observer.service';\nimport { CopilotChatViewHandlersService } from './copilot-chat-view-handlers.service';\nimport { Subject } from 'rxjs';\nimport { takeUntil } from 'rxjs/operators';\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 standalone: true,\n imports: [\n CommonModule,\n CopilotSlotComponent,\n CopilotChatMessageViewComponent,\n CopilotChatInputComponent,\n CopilotChatViewScrollViewComponent,\n CopilotChatViewScrollToBottomButtonComponent,\n CopilotChatViewFeatherComponent,\n CopilotChatViewInputContainerComponent,\n CopilotChatViewDisclaimerComponent\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [ResizeObserverService, CopilotChatViewHandlersService],\n template: `\n <!-- Custom layout template support (render prop pattern) -->\n @if (customLayoutTemplate) {\n <ng-container *ngTemplateOutlet=\"customLayoutTemplate; context: layoutContext()\"></ng-container>\n } @else {\n <!-- Default layout - exact React DOM structure -->\n <div [class]=\"computedClass()\">\n <!-- ScrollView -->\n <copilot-chat-view-scroll-view\n [autoScroll]=\"autoScrollSignal()\"\n [inputContainerHeight]=\"inputContainerHeight()\"\n [isResizing]=\"isResizing()\"\n [messages]=\"messagesSignal()\"\n [messageView]=\"messageViewSlot()\"\n [messageViewClass]=\"messageViewClass\"\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 </copilot-chat-view-scroll-view>\n\n <!-- Feather effect -->\n <copilot-slot\n [slot]=\"featherSlot()\"\n [context]=\"{ inputClass: featherClass }\"\n [defaultComponent]=\"defaultFeatherComponent\">\n </copilot-slot>\n\n <!-- Input container -->\n <copilot-slot\n #inputContainerSlotRef\n [slot]=\"inputContainerSlot()\"\n [context]=\"inputContainerContext()\"\n [defaultComponent]=\"defaultInputContainerComponent\">\n </copilot-slot>\n </div>\n }\n `\n})\nexport class CopilotChatViewComponent implements OnInit, OnChanges, AfterViewInit, OnDestroy {\n // Core inputs matching React props\n @Input() messages: Message[] = [];\n @Input() autoScroll: boolean = true;\n @Input() showCursor: boolean = false;\n \n // MessageView slot inputs\n @Input() messageViewComponent?: Type<any>;\n @Input() messageViewTemplate?: TemplateRef<any>;\n @Input() messageViewClass?: string;\n \n // ScrollView slot inputs\n @Input() scrollViewComponent?: Type<any>;\n @Input() scrollViewTemplate?: TemplateRef<any>;\n @Input() scrollViewClass?: string;\n \n // ScrollToBottomButton slot inputs\n @Input() scrollToBottomButtonComponent?: Type<any>;\n @Input() scrollToBottomButtonTemplate?: TemplateRef<any>;\n @Input() scrollToBottomButtonClass?: string;\n \n // Input slot inputs\n @Input() inputComponent?: Type<any>;\n @Input() inputTemplate?: TemplateRef<any>;\n \n // InputContainer slot inputs\n @Input() inputContainerComponent?: Type<any>;\n @Input() inputContainerTemplate?: TemplateRef<any>;\n @Input() inputContainerClass?: string;\n \n // Feather slot inputs\n @Input() featherComponent?: Type<any>;\n @Input() featherTemplate?: TemplateRef<any>;\n @Input() featherClass?: string;\n \n // Disclaimer slot inputs\n @Input() disclaimerComponent?: Type<any>;\n @Input() disclaimerTemplate?: TemplateRef<any>;\n @Input() disclaimerClass?: string;\n @Input() disclaimerText?: string;\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') 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 @Output() assistantMessageThumbsUp = new EventEmitter<{ message: Message }>();\n @Output() assistantMessageThumbsDown = new EventEmitter<{ message: Message }>();\n @Output() assistantMessageReadAloud = new EventEmitter<{ message: Message }>();\n @Output() assistantMessageRegenerate = new EventEmitter<{ message: Message }>();\n \n // Output events for user message actions (if applicable)\n @Output() userMessageCopy = new EventEmitter<{ message: Message }>();\n @Output() userMessageEdit = new EventEmitter<{ message: Message }>();\n \n // ViewChild references\n @ViewChild('inputContainerSlotRef', { read: ElementRef }) inputContainerSlotRef?: ElementRef;\n \n // Default components for slots\n protected readonly defaultScrollViewComponent = CopilotChatViewScrollViewComponent;\n protected readonly defaultScrollToBottomButtonComponent = CopilotChatViewScrollToBottomButtonComponent;\n protected readonly defaultInputContainerComponent = CopilotChatViewInputContainerComponent;\n protected readonly defaultFeatherComponent = CopilotChatViewFeatherComponent;\n protected readonly defaultDisclaimerComponent = CopilotChatViewDisclaimerComponent;\n \n // Signals for reactive state\n protected messagesSignal = signal<Message[]>([]);\n protected autoScrollSignal = signal(true);\n protected showCursorSignal = signal(false);\n protected disclaimerTextSignal = signal<string | undefined>(undefined);\n protected disclaimerClassSignal = signal<string | undefined>(undefined);\n protected inputContainerHeight = signal<number>(0);\n protected isResizing = signal<boolean>(false);\n protected contentPaddingBottom = computed(() => this.inputContainerHeight() + 32);\n \n // Computed signals\n protected computedClass = computed(() => cn('relative h-full'));\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 this.scrollToBottomButtonTemplate || 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.messagesSignal(),\n messageView: this.messageViewSlot(),\n messageViewClass: this.messageViewClass\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 private destroy$ = new Subject<void>();\n private resizeTimeoutRef?: number;\n \n constructor(\n private resizeObserverService: ResizeObserverService,\n private cdr: ChangeDetectorRef,\n private handlers: CopilotChatViewHandlersService\n ) {\n // Set up effect to handle resize state timeout\n effect(() => {\n const resizing = this.isResizing();\n if (resizing && this.resizeTimeoutRef) {\n clearTimeout(this.resizeTimeoutRef);\n this.resizeTimeoutRef = undefined;\n }\n });\n }\n \n ngOnInit(): void {\n // Initialize signals with input values\n this.messagesSignal.set(this.messages);\n this.autoScrollSignal.set(this.autoScroll);\n this.showCursorSignal.set(this.showCursor);\n this.disclaimerTextSignal.set(this.disclaimerText);\n this.disclaimerClassSignal.set(this.disclaimerClass);\n\n // Initialize handler availability in the view-scoped service\n this.handlers.hasAssistantThumbsUpHandler.set(this.assistantMessageThumbsUp.observed);\n this.handlers.hasAssistantThumbsDownHandler.set(this.assistantMessageThumbsDown.observed);\n this.handlers.hasAssistantReadAloudHandler.set(this.assistantMessageReadAloud.observed);\n this.handlers.hasAssistantRegenerateHandler.set(this.assistantMessageRegenerate.observed);\n this.handlers.hasUserCopyHandler.set(this.userMessageCopy.observed);\n this.handlers.hasUserEditHandler.set(this.userMessageEdit.observed);\n }\n \n ngOnChanges(): void {\n // Update signals when inputs change\n this.messagesSignal.set(this.messages);\n this.autoScrollSignal.set(this.autoScroll);\n this.showCursorSignal.set(this.showCursor);\n this.disclaimerTextSignal.set(this.disclaimerText);\n this.disclaimerClassSignal.set(this.disclaimerClass);\n\n // Keep handler availability in sync\n this.handlers.hasAssistantThumbsUpHandler.set(this.assistantMessageThumbsUp.observed);\n this.handlers.hasAssistantThumbsDownHandler.set(this.assistantMessageThumbsDown.observed);\n this.handlers.hasAssistantReadAloudHandler.set(this.assistantMessageReadAloud.observed);\n this.handlers.hasAssistantRegenerateHandler.set(this.assistantMessageRegenerate.observed);\n this.handlers.hasUserCopyHandler.set(this.userMessageCopy.observed);\n this.handlers.hasUserEditHandler.set(this.userMessageEdit.observed);\n }\n \n ngAfterViewInit(): void {\n // Don't set a default height - measure it dynamically\n \n // Set up input container height monitoring\n const measureAndObserve = () => {\n if (!this.inputContainerSlotRef || !this.inputContainerSlotRef.nativeElement) {\n return false;\n }\n \n // The slot ref points to the copilot-slot element\n // We need to find the actual input container component inside it\n const slotElement = this.inputContainerSlotRef.nativeElement;\n const componentElement = slotElement.querySelector('copilot-chat-view-input-container');\n \n if (!componentElement) {\n return false;\n }\n \n // Look for the absolute positioned div that contains the input\n let innerDiv = componentElement.querySelector('div.absolute') as HTMLElement;\n \n // If not found by class, try first child\n if (!innerDiv) {\n innerDiv = componentElement.firstElementChild as HTMLElement;\n }\n \n if (!innerDiv) {\n return false;\n }\n \n // Measure the actual height\n const measuredHeight = innerDiv.offsetHeight;\n \n if (measuredHeight === 0) {\n return false;\n }\n \n // Success! Set the initial height\n this.inputContainerHeight.set(measuredHeight);\n this.cdr.detectChanges();\n \n // Create an ElementRef wrapper for ResizeObserver\n const innerDivRef = new ElementRef(innerDiv);\n \n // Set up ResizeObserver to track changes\n this.resizeObserverService.observeElement(innerDivRef, 0, 250)\n .pipe(takeUntil(this.destroy$))\n .subscribe(state => {\n const newHeight = state.height;\n \n if (newHeight !== this.inputContainerHeight() && newHeight > 0) {\n this.inputContainerHeight.set(newHeight);\n this.isResizing.set(true);\n this.cdr.detectChanges();\n \n // Clear existing timeout\n if (this.resizeTimeoutRef) {\n clearTimeout(this.resizeTimeoutRef);\n }\n \n // Set isResizing to false after a short delay\n this.resizeTimeoutRef = window.setTimeout(() => {\n this.isResizing.set(false);\n this.resizeTimeoutRef = undefined;\n this.cdr.detectChanges();\n }, 250);\n }\n });\n \n return true;\n };\n \n // Try to measure immediately\n if (!measureAndObserve()) {\n // If failed, retry with increasing delays\n let attempts = 0;\n const maxAttempts = 10;\n \n const retry = () => {\n attempts++;\n if (measureAndObserve()) {\n // Successfully measured\n } else if (attempts < maxAttempts) {\n // Exponential backoff: 50ms, 100ms, 200ms, 400ms, etc.\n const delay = 50 * Math.pow(2, Math.min(attempts - 1, 4));\n setTimeout(retry, delay);\n } else {\n // Failed to measure after max attempts\n }\n };\n \n // Start retry with first delay\n setTimeout(retry, 50);\n }\n }\n \n ngOnDestroy(): void {\n if (this.resizeTimeoutRef) {\n clearTimeout(this.resizeTimeoutRef);\n }\n this.destroy$.next();\n this.destroy$.complete();\n }\n}\n","import {\n Component,\n Input,\n OnInit,\n OnChanges,\n SimpleChanges,\n ChangeDetectionStrategy,\n ViewEncapsulation,\n signal,\n effect,\n ChangeDetectorRef,\n Signal,\n Injector,\n Optional,\n SkipSelf,\n Type,\n} from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\nimport { CopilotChatViewComponent } from \"./copilot-chat-view.component\";\nimport { CopilotChatConfigurationService } from \"../../core/chat-configuration/chat-configuration.service\";\nimport {\n COPILOT_CHAT_INITIAL_CONFIG,\n CopilotChatConfiguration,\n} from \"../../core/chat-configuration/chat-configuration.types\";\nimport { watchAgent, watchAgentWith } from \"../../utils/agent.utils\";\nimport { DEFAULT_AGENT_ID, randomUUID } from \"@copilotkitnext/shared\";\nimport { Message, AbstractAgent } from \"@ag-ui/client\";\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 standalone: true,\n imports: [CommonModule, CopilotChatViewComponent],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [\n {\n provide: CopilotChatConfigurationService,\n deps: [\n [new Optional(), new SkipSelf(), CopilotChatConfigurationService],\n [new Optional(), COPILOT_CHAT_INITIAL_CONFIG],\n ],\n useFactory: (\n parent: CopilotChatConfigurationService | null,\n initial: CopilotChatConfiguration | null\n ) => parent ?? new CopilotChatConfigurationService(initial ?? null),\n },\n ],\n template: `\n <copilot-chat-view\n [messages]=\"messages()\"\n [autoScroll]=\"true\"\n [messageViewClass]=\"'w-full'\"\n [showCursor]=\"showCursor()\"\n [inputComponent]=\"inputComponent\"\n >\n </copilot-chat-view>\n `,\n})\nexport class CopilotChatComponent implements OnInit, OnChanges {\n @Input() agentId?: string;\n @Input() threadId?: string;\n @Input() inputComponent?: Type<any>;\n\n constructor(\n @Optional() private chatConfig: CopilotChatConfigurationService | null,\n private cdr: ChangeDetectorRef,\n private injector: Injector\n ) {\n // Create initial watcher once (constructor is a safe injection context)\n const initialId = this.agentId ?? DEFAULT_AGENT_ID;\n this.createWatcher(initialId);\n\n // Connect once when agent becomes available\n effect(\n () => {\n const a = this.agent();\n if (!a) return;\n // Apply thread id when agent is available\n a.threadId = this.threadId || this.generatedThreadId;\n if (!this.hasConnectedOnce) {\n this.hasConnectedOnce = true;\n if ('isCopilotKitAgent' in (a as any)) {\n this.connectToAgent(a);\n } else {\n // Not a CopilotKit agent: ensure UI not showing loading cursor\n this.showCursor.set(false);\n this.cdr.markForCheck();\n }\n }\n },\n { allowSignalWrites: true }\n );\n }\n\n // Signals from watchAgent - destructured from watcher\n protected agent!: Signal<AbstractAgent | undefined>;\n protected messages!: Signal<Message[]>;\n protected isRunning!: Signal<boolean>;\n protected showCursor = signal<boolean>(false);\n\n private generatedThreadId: string = randomUUID();\n private watcher?: ReturnType<typeof watchAgent>;\n private hasConnectedOnce = false;\n\n ngOnInit(): void {\n this.setupChatHandlers();\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes[\"agentId\"] && !changes[\"agentId\"].firstChange) {\n const newId = this.agentId ?? DEFAULT_AGENT_ID;\n this.createWatcher(newId);\n }\n if (changes[\"threadId\"] && !changes[\"threadId\"].firstChange) {\n const a = this.agent();\n if (a) {\n a.threadId = this.threadId || this.generatedThreadId;\n }\n }\n }\n\n private async connectToAgent(agent: AbstractAgent): Promise<void> {\n if (!agent) return;\n\n this.showCursor.set(true);\n this.cdr.markForCheck();\n\n try {\n await agent.runAgent(\n { forwardedProps: { __copilotkitConnect: true } },\n {\n onTextMessageStartEvent: () => {\n this.showCursor.set(false);\n this.cdr.detectChanges();\n },\n onToolCallStartEvent: () => {\n this.showCursor.set(false);\n this.cdr.detectChanges();\n },\n }\n );\n this.showCursor.set(false);\n this.cdr.markForCheck();\n } catch (error) {\n console.error(\"Failed to connect to agent:\", error);\n this.showCursor.set(false);\n this.cdr.markForCheck();\n }\n }\n\n private setupChatHandlers(): void {\n if (!this.chatConfig) return;\n\n // Handle input submission\n this.chatConfig.setSubmitHandler(async (value: string) => {\n const agent = this.agent();\n if (!agent || !value.trim()) return;\n\n // Add user message\n const userMessage: Message = {\n id: randomUUID(),\n role: \"user\",\n content: value,\n };\n agent.addMessage(userMessage);\n\n // Clear the input\n this.chatConfig!.setInputValue(\"\");\n\n // Show cursor while processing\n this.showCursor.set(true);\n this.cdr.markForCheck();\n\n // Run the agent with named subscriber callbacks\n try {\n await agent.runAgent(\n {},\n {\n onTextMessageStartEvent: () => {\n this.showCursor.set(false);\n this.cdr.detectChanges();\n },\n onToolCallStartEvent: () => {\n this.showCursor.set(false);\n this.cdr.detectChanges();\n },\n }\n );\n } catch (error) {\n console.error(\"Agent run error:\", error);\n } finally {\n this.showCursor.set(false);\n this.cdr.markForCheck();\n }\n });\n\n // Handle input value changes (optional)\n this.chatConfig.setChangeHandler(() => {\n // Keep input state if needed\n });\n }\n\n\n private createWatcher(desiredAgentId: string) {\n // Tear down previous watcher if it exists to prevent parallel subscriptions\n this.watcher?.unsubscribe();\n \n // Create new watcher using the ergonomic helper\n const w = watchAgentWith(this.injector, { agentId: desiredAgentId });\n \n // Destructure signals directly to class fields\n this.agent = w.agent;\n this.messages = w.messages;\n this.isRunning = w.isRunning;\n this.watcher = w;\n \n // Reset connection state for new agent\n this.hasConnectedOnce = false;\n }\n}\n","export * from \"./core/copilotkit.service\";\nexport * from \"./core/copilotkit.types\";\nexport * from \"./core/copilotkit.providers\";\n// Re-export types from @ag-ui/core for convenience\nexport type { Message, ToolCall, ToolMessage } from \"@ag-ui/core\";\nexport * from \"./core/chat-configuration/chat-configuration.types\";\nexport * from \"./core/chat-configuration/chat-configuration.service\";\nexport * from \"./core/chat-configuration/chat-configuration.providers\";\nexport * from \"./utils/copilotkit.utils\";\nexport * from \"./utils/agent-context.utils\";\nexport * from \"./utils/frontend-tool.utils\";\n// Note: tool-render.utils removed in favor of direct ToolCallRender<T> usage\n// Export all except AgentWatchResult which is already exported from copilotkit.types\nexport {\n watchAgent,\n watchAgentWith,\n getAgent,\n subscribeToAgent,\n} from \"./utils/agent.utils\";\nexport * from \"./utils/human-in-the-loop.utils\";\nexport * from \"./utils/chat-config.utils\";\n// Slot utilities are internal only, not exported\n// export * from \"./lib/slots/slot.types\";\n// export * from \"./lib/slots/slot.utils\";\n// export { CopilotSlotComponent } from \"./lib/slots/copilot-slot.component\";\nexport { CopilotTooltipDirective } from \"./lib/directives/tooltip.directive\";\nexport { CopilotKitConfigDirective } from \"./directives/copilotkit-config.directive\";\nexport { CopilotKitAgentContextDirective } from \"./directives/copilotkit-agent-context.directive\";\nexport { CopilotKitFrontendToolDirective } from \"./directives/copilotkit-frontend-tool.directive\";\nexport { CopilotKitAgentDirective } from \"./directives/copilotkit-agent.directive\";\nexport {\n CopilotKitHumanInTheLoopDirective,\n CopilotKitHumanInTheLoopRespondDirective,\n} from \"./directives/copilotkit-human-in-the-loop.directive\";\nexport { CopilotKitChatConfigDirective } from \"./directives/copilotkit-chat-config.directive\";\nexport { CopilotKitToolRenderComponent } from \"./components/copilotkit-tool-render.component\";\n\n// Chat Input Components\nexport * from \"./components/chat/copilot-chat-input.types\";\nexport { CopilotChatInputComponent } from \"./components/chat/copilot-chat-input.component\";\nexport { CopilotChatInputDefaults } from \"./components/chat/copilot-chat-input-defaults\";\nexport { CopilotChatTextareaComponent } from \"./components/chat/copilot-chat-textarea.component\";\nexport { CopilotChatAudioRecorderComponent } from \"./components/chat/copilot-chat-audio-recorder.component\";\nexport {\n CopilotChatSendButtonComponent,\n CopilotChatToolbarButtonComponent,\n CopilotChatStartTranscribeButtonComponent,\n CopilotChatCancelTranscribeButtonComponent,\n CopilotChatFinishTranscribeButtonComponent,\n CopilotChatAddFileButtonComponent,\n} from \"./components/chat/copilot-chat-buttons.component\";\nexport { CopilotChatToolbarComponent } from \"./components/chat/copilot-chat-toolbar.component\";\nexport { CopilotChatToolsMenuComponent } from \"./components/chat/copilot-chat-tools-menu.component\";\n\n// Chat User Message Components\nexport * from \"./components/chat/copilot-chat-user-message.types\";\nexport { CopilotChatUserMessageComponent } from \"./components/chat/copilot-chat-user-message.component\";\nexport { CopilotChatUserMessageRendererComponent } from \"./components/chat/copilot-chat-user-message-renderer.component\";\nexport {\n CopilotChatUserMessageToolbarButtonComponent,\n CopilotChatUserMessageCopyButtonComponent,\n CopilotChatUserMessageEditButtonComponent,\n} from \"./components/chat/copilot-chat-user-message-buttons.component\";\nexport { CopilotChatUserMessageToolbarComponent } from \"./components/chat/copilot-chat-user-message-toolbar.component\";\nexport { CopilotChatUserMessageBranchNavigationComponent } from \"./components/chat/copilot-chat-user-message-branch-navigation.component\";\n\n// Chat Assistant Message Components\nexport * from \"./components/chat/copilot-chat-assistant-message.types\";\nexport { CopilotChatAssistantMessageComponent } from \"./components/chat/copilot-chat-assistant-message.component\";\nexport { CopilotChatAssistantMessageRendererComponent } from \"./components/chat/copilot-chat-assistant-message-renderer.component\";\nexport {\n CopilotChatAssistantMessageToolbarButtonComponent,\n CopilotChatAssistantMessageCopyButtonComponent,\n CopilotChatAssistantMessageThumbsUpButtonComponent,\n CopilotChatAssistantMessageThumbsDownButtonComponent,\n CopilotChatAssistantMessageReadAloudButtonComponent,\n CopilotChatAssistantMessageRegenerateButtonComponent,\n} from \"./components/chat/copilot-chat-assistant-message-buttons.component\";\nexport { CopilotChatAssistantMessageToolbarComponent } from \"./components/chat/copilot-chat-assistant-message-toolbar.component\";\n\n// Chat Message View Components\nexport * from \"./components/chat/copilot-chat-message-view.types\";\nexport { CopilotChatMessageViewComponent } from \"./components/chat/copilot-chat-message-view.component\";\nexport { CopilotChatMessageViewCursorComponent } from \"./components/chat/copilot-chat-message-view-cursor.component\";\nexport { CopilotChatToolCallsViewComponent } from \"./components/chat/copilot-chat-tool-calls-view.component\";\n\n// Chat View Components\nexport * from \"./components/chat/copilot-chat-view.types\";\nexport { CopilotChatViewComponent } from \"./components/chat/copilot-chat-view.component\";\nexport { CopilotChatViewScrollViewComponent } from \"./components/chat/copilot-chat-view-scroll-view.component\";\nexport { CopilotChatViewScrollToBottomButtonComponent } from \"./components/chat/copilot-chat-view-scroll-to-bottom-button.component\";\nexport { CopilotChatViewFeatherComponent } from \"./components/chat/copilot-chat-view-feather.component\";\nexport { CopilotChatViewInputContainerComponent } from \"./components/chat/copilot-chat-view-input-container.component\";\nexport { CopilotChatViewDisclaimerComponent } from \"./components/chat/copilot-chat-view-disclaimer.component\";\n\n// Main Chat Component\nexport { CopilotChatComponent } from \"./components/chat/copilot-chat.component\";\n\n// Services and Directives for Chat View\nexport { ScrollPositionService } from \"./services/scroll-position.service\";\nexport { ResizeObserverService } from \"./services/resize-observer.service\";\nexport { StickToBottomDirective } from \"./directives/stick-to-bottom.directive\";\n\n// Testing utilities are not exported from the main entry point\n// They should be imported directly from '@copilotkitnext/angular/testing' if needed\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1","i1.CopilotTooltipDirective","i1.ResizeObserverService","i2.CopilotChatViewHandlersService","i3","i1.CopilotChatConfigurationService"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AA2CA,CAAC;AA+BD;MACa,sBAAsB,GAAG,IAAI,cAAc,CACtD,wBAAwB;MAGb,kBAAkB,GAAG,IAAI,cAAc,CAClD,oBAAoB,EACpB,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE;M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;AACD,oBAAA,QAAQ,EAAE;;;;;;;;;AAST,EAAA,CAAA;AACF,iBAAA;;0BAOI;gGALM,OAAO,EAAA,CAAA;sBAAf;gBACQ,QAAQ,EAAA,CAAA;sBAAhB;gBACQ,cAAc,EAAA,CAAA;sBAAtB;;;ACiCH;AACA;;ACxGA;;AAEG;;;;"}
1
+ {"version":3,"file":"copilotkitnext-angular.mjs","sources":["../../src/core/copilotkit.types.ts","../../src/core/copilotkit.service.ts","../../src/core/copilotkit.providers.ts","../../src/core/chat-configuration/chat-configuration.types.ts","../../src/core/chat-configuration/chat-configuration.service.ts","../../src/core/chat-configuration/chat-configuration.providers.ts","../../src/utils/copilotkit.utils.ts","../../src/utils/agent-context.utils.ts","../../src/utils/frontend-tool.utils.ts","../../src/utils/agent.utils.ts","../../src/utils/human-in-the-loop.utils.ts","../../src/utils/chat-config.utils.ts","../../src/lib/directives/tooltip.directive.ts","../../src/directives/copilotkit-config.directive.ts","../../src/directives/copilotkit-agent-context.directive.ts","../../src/directives/copilotkit-frontend-tool.directive.ts","../../src/directives/copilotkit-agent.directive.ts","../../src/directives/copilotkit-human-in-the-loop.directive.ts","../../src/directives/copilotkit-chat-config.directive.ts","../../src/components/copilotkit-tool-render.component.ts","../../src/components/chat/copilot-chat-input.types.ts","../../src/lib/slots/slot.types.ts","../../src/lib/slots/slot.utils.ts","../../src/lib/slots/copilot-slot.component.ts","../../src/lib/utils.ts","../../src/components/chat/copilot-chat-textarea.component.ts","../../src/components/chat/copilot-chat-audio-recorder.component.ts","../../src/components/chat/copilot-chat-buttons.component.ts","../../src/components/chat/copilot-chat-toolbar.component.ts","../../src/components/chat/copilot-chat-tools-menu.component.ts","../../src/components/chat/copilot-chat-input.component.ts","../../src/components/chat/copilot-chat-input-defaults.ts","../../src/components/chat/copilot-chat-user-message-renderer.component.ts","../../src/components/chat/copilot-chat-user-message-buttons.component.ts","../../src/components/chat/copilot-chat-user-message-toolbar.component.ts","../../src/components/chat/copilot-chat-user-message-branch-navigation.component.ts","../../src/components/chat/copilot-chat-user-message.component.ts","../../src/components/chat/copilot-chat-tool-calls-view.component.ts","../../src/components/chat/copilot-chat-assistant-message-renderer.component.ts","../../src/components/chat/copilot-chat-assistant-message-buttons.component.ts","../../src/components/chat/copilot-chat-assistant-message-toolbar.component.ts","../../src/components/chat/copilot-chat-view-handlers.service.ts","../../src/components/chat/copilot-chat-assistant-message.component.ts","../../src/components/chat/copilot-chat-message-view-cursor.component.ts","../../src/components/chat/copilot-chat-message-view.component.ts","../../src/components/chat/copilot-chat-view-scroll-to-bottom-button.component.ts","../../src/services/scroll-position.service.ts","../../src/services/resize-observer.service.ts","../../src/directives/stick-to-bottom.directive.ts","../../src/components/chat/copilot-chat-view-scroll-view.component.ts","../../src/components/chat/copilot-chat-view-feather.component.ts","../../src/components/chat/copilot-chat-view-disclaimer.component.ts","../../src/components/chat/copilot-chat-view-input-container.component.ts","../../src/components/chat/copilot-chat-view.component.ts","../../src/components/chat/copilot-chat.component.ts","../../src/index.ts","../../src/copilotkitnext-angular.ts"],"sourcesContent":["import { InjectionToken, TemplateRef, Type, Signal } from \"@angular/core\";\nimport { Observable } from \"rxjs\";\nimport { CopilotKitCore, ToolCallStatus } from \"@copilotkitnext/core\";\nimport { AbstractAgent } from \"@ag-ui/client\";\nimport type { AngularFrontendTool } from \"../types/frontend-tool\";\nimport type { AngularHumanInTheLoop } from \"../types/human-in-the-loop\";\n\n// Re-export commonly used types\nexport type { Context } from \"@ag-ui/client\";\n\n// Re-export tool types from their own files\nexport type { AngularFrontendTool } from \"../types/frontend-tool\";\nexport type {\n AngularHumanInTheLoop,\n HumanInTheLoopProps,\n} from \"../types/human-in-the-loop\";\n\n// Re-export ToolCallStatus from core\nexport { ToolCallStatus } from \"@copilotkitnext/core\";\n\n// Props passed to tool render components - discriminated union matching React\nexport type ToolCallProps<T = unknown> =\n | {\n name: string;\n description: string;\n args: Partial<T>;\n status: ToolCallStatus.InProgress;\n result: undefined;\n }\n | {\n name: string;\n description: string;\n args: T;\n status: ToolCallStatus.Executing;\n result: undefined;\n }\n | {\n name: string;\n description: string;\n args: T;\n status: ToolCallStatus.Complete;\n result: string;\n };\n1;\n\n// Angular-specific tool call render definition with proper typing\nexport interface AngularToolCallRender {\n name: string;\n /**\n * Optional agent ID to constrain this tool render to a specific agent.\n * If specified, this render will only be used for the specified agent.\n */\n agentId?: string;\n render: Type<any> | TemplateRef<ToolCallProps<any>>;\n}\n\n// Type alias for convenience\nexport type ToolCallRender = AngularToolCallRender;\n\nexport interface CopilotKitContextValue {\n copilotkit: CopilotKitCore;\n renderToolCalls: ToolCallRender[];\n currentRenderToolCalls: ToolCallRender[];\n setCurrentRenderToolCalls: (v: ToolCallRender[]) => void;\n}\n\nexport interface CopilotKitRuntimeInputs {\n runtimeUrl?: string;\n headers?: Record<string, string>;\n properties?: Record<string, unknown>;\n agents?: Record<string, AbstractAgent>;\n renderToolCalls?: ToolCallRender[];\n}\n\n// Injection tokens for dependency injection\nexport const COPILOTKIT_RUNTIME_URL = new InjectionToken<string | undefined>(\n \"COPILOTKIT_RUNTIME_URL\"\n);\n\nexport const COPILOTKIT_HEADERS = new InjectionToken<Record<string, string>>(\n \"COPILOTKIT_HEADERS\",\n { factory: () => ({}) }\n);\n\nexport const COPILOTKIT_PROPERTIES = new InjectionToken<\n Record<string, unknown>\n>(\"COPILOTKIT_PROPERTIES\", { factory: () => ({}) });\n\nexport const COPILOTKIT_AGENTS = new InjectionToken<\n Record<string, AbstractAgent>\n>(\"COPILOTKIT_AGENTS\", { factory: () => ({}) });\n\nexport const COPILOTKIT_RENDER_TOOL_CALLS = new InjectionToken<\n ToolCallRender[]\n>(\"COPILOTKIT_RENDER_TOOL_CALLS\", { factory: () => [] });\n\nexport const COPILOTKIT_FRONTEND_TOOLS = new InjectionToken<\n AngularFrontendTool<any>[]\n>(\"COPILOTKIT_FRONTEND_TOOLS\", { factory: () => [] });\n\nexport const COPILOTKIT_HUMAN_IN_THE_LOOP = new InjectionToken<\n AngularHumanInTheLoop<any>[]\n>(\"COPILOTKIT_HUMAN_IN_THE_LOOP\", { factory: () => [] });\n\n// Agent-related types\nimport type { Message } from \"@ag-ui/client\";\n\nexport interface AgentWatchResult {\n agent: Signal<AbstractAgent | undefined>;\n messages: Signal<Message[]>;\n isRunning: Signal<boolean>;\n agent$: Observable<AbstractAgent | undefined>;\n messages$: Observable<Message[]>;\n isRunning$: Observable<boolean>;\n unsubscribe: () => void;\n}\n\nexport interface AgentSubscriptionCallbacks {\n onMessagesChanged?: (params: any) => void;\n onStateChanged?: (params: any) => void;\n onRunInitialized?: (params: any) => void;\n onRunFinalized?: (params: any) => void;\n onRunFailed?: (params: any) => void;\n}\n\n// Human-in-the-loop state result\nexport interface HumanInTheLoopState {\n status: Signal<ToolCallStatus>;\n toolId: string;\n destroy: () => void;\n}\n","import {\n Injectable,\n Inject,\n signal,\n computed,\n effect,\n untracked,\n} from \"@angular/core\";\nimport { toObservable } from \"@angular/core/rxjs-interop\";\nimport {\n COPILOTKIT_RUNTIME_URL,\n COPILOTKIT_HEADERS,\n COPILOTKIT_PROPERTIES,\n COPILOTKIT_AGENTS,\n COPILOTKIT_RENDER_TOOL_CALLS,\n COPILOTKIT_FRONTEND_TOOLS,\n COPILOTKIT_HUMAN_IN_THE_LOOP,\n CopilotKitContextValue,\n ToolCallRender,\n AngularFrontendTool,\n AngularHumanInTheLoop,\n} from \"./copilotkit.types\";\nimport {\n CopilotKitCore,\n CopilotKitCoreConfig,\n FrontendTool,\n} from \"@copilotkitnext/core\";\nimport { AbstractAgent } from \"@ag-ui/client\";\n\n/**\n * Angular service for managing CopilotKit state and interactions.\n * Provides reactive state management using Angular signals and observables.\n */\n@Injectable({ providedIn: \"root\" })\nexport class CopilotKitService {\n // Initial values for stability tracking\n private readonly initialFrontendTools: AngularFrontendTool<any>[];\n private readonly initialHumanInTheLoop: AngularHumanInTheLoop<any>[];\n private readonly initialRenderToolCalls: ToolCallRender[];\n\n // Core instance - created once\n readonly copilotkit: CopilotKitCore;\n\n // State signals\n private readonly _renderToolCalls: ReturnType<\n typeof signal<ToolCallRender[]>\n >;\n private readonly _currentRenderToolCalls: ReturnType<\n typeof signal<ToolCallRender[]>\n >;\n private readonly _runtimeUrl: ReturnType<typeof signal<string | undefined>>;\n private readonly _headers: ReturnType<typeof signal<Record<string, string>>>;\n private readonly _properties: ReturnType<\n typeof signal<Record<string, unknown>>\n >;\n private readonly _agents: ReturnType<\n typeof signal<Record<string, AbstractAgent>>\n >;\n private readonly _frontendTools: ReturnType<\n typeof signal<AngularFrontendTool<any>[]>\n >;\n private readonly _humanInTheLoop: ReturnType<\n typeof signal<AngularHumanInTheLoop<any>[]>\n >;\n\n // Runtime state change notification signal\n private readonly _runtimeStateVersion: ReturnType<typeof signal<number>>;\n\n // Computed signals for processed values\n private readonly _allTools: ReturnType<\n typeof computed<FrontendTool<any>[]>\n >;\n private readonly _allRenderToolCalls: ReturnType<\n typeof computed<ToolCallRender[]>\n >;\n\n // Public readonly signals - will be initialized in constructor\n readonly renderToolCalls: any;\n readonly currentRenderToolCalls: any;\n readonly runtimeUrl: any;\n readonly headers: any;\n readonly properties: any;\n readonly agents: any;\n readonly frontendTools: any;\n readonly humanInTheLoop: any;\n readonly runtimeStateVersion: any;\n\n // Observable APIs for RxJS users - will be initialized in constructor\n readonly renderToolCalls$: any;\n readonly currentRenderToolCalls$: any;\n readonly runtimeUrl$: any;\n readonly headers$: any;\n readonly properties$: any;\n readonly agents$: any;\n readonly frontendTools$: any;\n readonly humanInTheLoop$: any;\n\n // Context value as computed signal - will be initialized in constructor\n readonly context: any;\n readonly context$: any;\n\n constructor(\n @Inject(COPILOTKIT_RUNTIME_URL) runtimeUrl: string | undefined,\n @Inject(COPILOTKIT_HEADERS) headers: Record<string, string>,\n @Inject(COPILOTKIT_PROPERTIES) properties: Record<string, unknown>,\n @Inject(COPILOTKIT_AGENTS) agents: Record<string, AbstractAgent>,\n @Inject(COPILOTKIT_RENDER_TOOL_CALLS)\n renderToolCalls: ToolCallRender[],\n @Inject(COPILOTKIT_FRONTEND_TOOLS)\n frontendTools: AngularFrontendTool<any>[],\n @Inject(COPILOTKIT_HUMAN_IN_THE_LOOP)\n humanInTheLoop: AngularHumanInTheLoop<any>[]\n ) {\n // Store initial values for stability checking\n this.initialFrontendTools = frontendTools;\n this.initialHumanInTheLoop = humanInTheLoop;\n this.initialRenderToolCalls = renderToolCalls;\n\n // Process tools and humanInTheLoop\n const { allTools, allRenderToolCalls } = this.processTools(\n frontendTools,\n humanInTheLoop,\n renderToolCalls\n );\n\n // Initialize core instance with processed tools\n this.copilotkit = new CopilotKitCore({\n runtimeUrl: undefined, // Prevent server-side fetching\n headers,\n properties,\n agents,\n tools: allTools,\n } as CopilotKitCoreConfig);\n\n // Initialize state signals\n this._renderToolCalls =\n signal<ToolCallRender[]>(allRenderToolCalls);\n this._currentRenderToolCalls =\n signal<ToolCallRender[]>(allRenderToolCalls);\n this._runtimeUrl = signal<string | undefined>(runtimeUrl);\n this._headers = signal<Record<string, string>>(headers);\n this._properties = signal<Record<string, unknown>>(properties);\n this._agents = signal<Record<string, AbstractAgent>>(agents);\n this._frontendTools = signal<AngularFrontendTool<any>[]>(frontendTools);\n this._humanInTheLoop = signal<AngularHumanInTheLoop<any>[]>(humanInTheLoop);\n this._runtimeStateVersion = signal<number>(0);\n\n // Initialize computed signals for processed values\n this._allTools = computed(() => {\n const toolMap = new Map<string, FrontendTool<any>>();\n\n this._frontendTools().forEach((tool) => {\n toolMap.set(tool.name, tool as FrontendTool<any>);\n });\n\n this._humanInTheLoop().forEach((tool) => {\n const frontendTool: FrontendTool<any> = {\n name: tool.name,\n description: tool.description,\n parameters: tool.parameters,\n followUp: tool.followUp,\n handler: async () => {\n console.warn(\n `Human-in-the-loop tool '${tool.name}' called but no interactive handler is set up.`\n );\n return undefined;\n },\n };\n toolMap.set(tool.name, frontendTool);\n });\n\n return Array.from(toolMap.values());\n });\n\n this._allRenderToolCalls = computed(() => {\n const combined: ToolCallRender[] = [...this._renderToolCalls()];\n\n // Add render components from frontend tools\n this._frontendTools().forEach((tool) => {\n if (tool.render) {\n combined.push({\n name: tool.name,\n render: tool.render,\n ...(tool.agentId && { agentId: tool.agentId }),\n });\n }\n });\n\n // Add render components from human-in-the-loop tools\n this._humanInTheLoop().forEach((tool) => {\n if (tool.render) {\n combined.push({\n name: tool.name,\n render: tool.render,\n ...(tool.agentId && { agentId: tool.agentId }),\n });\n }\n });\n\n return combined;\n });\n\n // Initialize public readonly signals\n this.renderToolCalls = this._allRenderToolCalls;\n this.currentRenderToolCalls = this._currentRenderToolCalls.asReadonly();\n this.runtimeUrl = this._runtimeUrl.asReadonly();\n this.headers = this._headers.asReadonly();\n this.properties = this._properties.asReadonly();\n this.agents = this._agents.asReadonly();\n this.frontendTools = this._frontendTools.asReadonly();\n this.humanInTheLoop = this._humanInTheLoop.asReadonly();\n this.runtimeStateVersion = this._runtimeStateVersion.asReadonly();\n\n // Initialize Observable APIs\n this.renderToolCalls$ = toObservable(this.renderToolCalls);\n this.currentRenderToolCalls$ = toObservable(this.currentRenderToolCalls);\n this.runtimeUrl$ = toObservable(this.runtimeUrl);\n this.headers$ = toObservable(this.headers);\n this.properties$ = toObservable(this.properties);\n this.agents$ = toObservable(this.agents);\n this.frontendTools$ = toObservable(this.frontendTools);\n this.humanInTheLoop$ = toObservable(this.humanInTheLoop);\n\n // Initialize context value as computed signal\n this.context = computed<CopilotKitContextValue>(() => {\n // Touch the runtime state version to ensure this computed updates\n // when runtime events occur (loaded/error)\n this.runtimeStateVersion();\n\n return {\n copilotkit: this.copilotkit,\n renderToolCalls: this.renderToolCalls(),\n currentRenderToolCalls: this.currentRenderToolCalls(),\n setCurrentRenderToolCalls: (v) => this.setCurrentRenderToolCalls(v),\n };\n });\n\n this.context$ = toObservable(this.context);\n\n // Effects must be created in injection context (constructor)\n this.setupRuntimeSyncEffects();\n this.setupStabilityWarnings();\n this.setupEventSubscription();\n }\n\n /**\n * Process frontend tools and human-in-the-loop tools\n */\n private processTools(\n frontendTools: AngularFrontendTool<any>[],\n humanInTheLoop: AngularHumanInTheLoop<any>[],\n renderToolCalls: ToolCallRender[]\n ): {\n allTools: FrontendTool<any>[];\n allRenderToolCalls: ToolCallRender[];\n } {\n const toolMap = new Map<string, FrontendTool<any>>();\n const allRenderToolCalls: ToolCallRender[] = [...renderToolCalls];\n\n // Add frontend tools\n frontendTools.forEach((tool) => {\n toolMap.set(tool.name, tool as FrontendTool<any>);\n\n // Add render component if provided\n if (tool.render) {\n allRenderToolCalls.push({\n name: tool.name,\n render: tool.render,\n ...(tool.agentId && { agentId: tool.agentId }),\n });\n }\n });\n\n // Process human-in-the-loop tools\n humanInTheLoop.forEach((tool) => {\n // Create a frontend tool with placeholder handler\n const frontendTool: FrontendTool<any> = {\n name: tool.name,\n description: tool.description,\n parameters: tool.parameters,\n followUp: tool.followUp,\n ...(tool.agentId && { agentId: tool.agentId }),\n handler: async (args: any) => {\n // Placeholder handler - actual implementation will be handled by the render component\n console.warn(\n `Human-in-the-loop tool '${tool.name}' called but no interactive handler is set up.`\n );\n return undefined;\n },\n };\n toolMap.set(tool.name, frontendTool);\n\n // Add the render component\n if (tool.render) {\n allRenderToolCalls.push({\n name: tool.name,\n render: tool.render,\n ...(tool.agentId && { agentId: tool.agentId }),\n });\n }\n });\n\n return { allTools: Array.from(toolMap.values()), allRenderToolCalls };\n }\n\n /**\n * Setup stability warning effects\n */\n private setupStabilityWarnings(): void {\n // Warn if frontendTools changes\n effect(() => {\n const current = this._frontendTools();\n if (\n current !== this.initialFrontendTools &&\n this.initialFrontendTools.length > 0\n ) {\n untracked(() => {\n console.error(\n \"frontendTools must be a stable array. To add/remove tools dynamically, use dynamic tool registration.\"\n );\n });\n }\n });\n\n // Warn if humanInTheLoop changes\n effect(() => {\n const current = this._humanInTheLoop();\n if (\n current !== this.initialHumanInTheLoop &&\n this.initialHumanInTheLoop.length > 0\n ) {\n untracked(() => {\n console.error(\n \"humanInTheLoop must be a stable array. To add/remove human-in-the-loop tools dynamically, use dynamic tool registration.\"\n );\n });\n }\n });\n\n // Previously warned if renderToolCalls reference changed; removed per UX feedback\n }\n\n /**\n * Setup effects to sync runtime configuration with CopilotKitCore\n */\n private setupRuntimeSyncEffects(): void {\n // Sync runtime URL\n effect(() => {\n const url = this.runtimeUrl();\n untracked(() => {\n this.copilotkit.setRuntimeUrl(url);\n });\n });\n\n // Sync headers\n effect(() => {\n const headers = this.headers();\n untracked(() => this.copilotkit.setHeaders(headers));\n });\n\n // Sync properties\n effect(() => {\n const properties = this.properties();\n untracked(() => this.copilotkit.setProperties(properties));\n });\n\n // Sync agents\n effect(() => {\n const agents = this.agents();\n untracked(() => this.copilotkit.setAgents(agents));\n });\n\n // Sync tools - computed from frontend tools and human-in-the-loop\n effect(() => {\n const tools = this._allTools();\n untracked(() => {\n const setTools = (this.copilotkit as any)?.setTools;\n if (typeof setTools === \"function\") {\n setTools.call(this.copilotkit, tools);\n }\n });\n });\n }\n\n /**\n * Subscribe to CopilotKit runtime events\n */\n private setupEventSubscription(): void {\n const unsubscribe = this.copilotkit.subscribe({\n onRuntimeConnectionStatusChanged: () => {\n // Increment version to notify all consumers that runtime state has changed\n // This triggers re-evaluation of computed signals that depend on runtime state\n this.notifyRuntimeStateChange();\n },\n });\n\n // Root service lives for app lifetime; unsubscribe not needed.\n }\n\n /**\n * Notify consumers that the runtime state has changed.\n * This is similar to React's forceUpdate - it triggers change detection\n * for any computed signals or effects that depend on runtime state.\n */\n private notifyRuntimeStateChange(): void {\n this._runtimeStateVersion.update((version) => version + 1);\n }\n\n // Public mutation methods\n\n /**\n * Update the runtime URL\n */\n setRuntimeUrl(url?: string): void {\n this._runtimeUrl.set(url);\n }\n\n /**\n * Update request headers\n */\n setHeaders(headers: Record<string, string>): void {\n this._headers.set(headers);\n }\n\n /**\n * Update runtime properties\n */\n setProperties(properties: Record<string, unknown>): void {\n this._properties.set(properties);\n }\n\n /**\n * Update agents configuration\n */\n setAgents(agents: Record<string, AbstractAgent>): void {\n this._agents.set(agents);\n }\n\n /**\n * Get an agent by ID\n * @param agentId - The agent ID to retrieve\n * @returns The agent or undefined if not found\n */\n getAgent(agentId: string): AbstractAgent | undefined {\n return this.copilotkit.getAgent(agentId);\n }\n\n /**\n * Update render tool calls (warns if object reference changes)\n */\n setRenderToolCalls(renderToolCalls: ToolCallRender[]): void {\n this._renderToolCalls.set(renderToolCalls);\n }\n\n /**\n * Update frontend tools array\n */\n setFrontendTools(frontendTools: AngularFrontendTool<any>[]): void {\n if (frontendTools !== this.initialFrontendTools) {\n console.error(\n \"frontendTools must be a stable array. To add/remove tools dynamically, use dynamic tool registration.\"\n );\n }\n this._frontendTools.set(frontendTools);\n }\n\n /**\n * Update human-in-the-loop array\n */\n setHumanInTheLoop(humanInTheLoop: AngularHumanInTheLoop<any>[]): void {\n if (humanInTheLoop !== this.initialHumanInTheLoop) {\n console.error(\n \"humanInTheLoop must be a stable array. To add/remove human-in-the-loop tools dynamically, use dynamic tool registration.\"\n );\n }\n this._humanInTheLoop.set(humanInTheLoop);\n }\n\n /**\n * Update current render tool calls\n */\n setCurrentRenderToolCalls(renderToolCalls: ToolCallRender[]): void {\n this._currentRenderToolCalls.set(renderToolCalls);\n }\n\n /**\n * Register a tool render\n */\n registerToolRender(name: string, render: ToolCallRender): void {\n const current = this._currentRenderToolCalls();\n if (current.find((r) => r.name === name)) {\n console.warn(`Tool render for '${name}' is being overwritten`);\n }\n this._currentRenderToolCalls.set([\n ...current.filter((r) => r.name !== name),\n render,\n ]);\n }\n\n /**\n * Unregister a tool render\n */\n unregisterToolRender(name: string): void {\n const current = this._currentRenderToolCalls();\n const filtered = current.filter((r) => r.name !== name);\n if (filtered.length !== current.length) {\n this._currentRenderToolCalls.set(filtered);\n }\n }\n\n /**\n * Get a specific tool render\n */\n getToolRender(name: string): ToolCallRender | undefined {\n return this._currentRenderToolCalls().find((r) => r.name === name);\n }\n}\n","import { Provider } from \"@angular/core\";\nimport {\n COPILOTKIT_RUNTIME_URL,\n COPILOTKIT_HEADERS,\n COPILOTKIT_PROPERTIES,\n COPILOTKIT_AGENTS,\n COPILOTKIT_RENDER_TOOL_CALLS,\n COPILOTKIT_FRONTEND_TOOLS,\n COPILOTKIT_HUMAN_IN_THE_LOOP,\n ToolCallRender,\n AngularFrontendTool,\n AngularHumanInTheLoop,\n} from \"./copilotkit.types\";\nimport { AbstractAgent } from \"@ag-ui/client\";\n\nexport interface ProvideCopilotKitOptions {\n runtimeUrl?: string;\n headers?: Record<string, string>;\n properties?: Record<string, unknown>;\n agents?: Record<string, AbstractAgent>;\n renderToolCalls?: ToolCallRender[];\n frontendTools?: AngularFrontendTool<any>[];\n humanInTheLoop?: AngularHumanInTheLoop<any>[];\n}\n\nexport function provideCopilotKit(\n options: ProvideCopilotKitOptions = {}\n): Provider[] {\n return [\n {\n provide: COPILOTKIT_RUNTIME_URL,\n useValue: options.runtimeUrl,\n },\n {\n provide: COPILOTKIT_HEADERS,\n useValue: options.headers ?? {},\n },\n {\n provide: COPILOTKIT_PROPERTIES,\n useValue: options.properties ?? {},\n },\n {\n provide: COPILOTKIT_AGENTS,\n useValue: options.agents ?? {},\n },\n {\n provide: COPILOTKIT_RENDER_TOOL_CALLS,\n useValue: options.renderToolCalls ?? [],\n },\n {\n provide: COPILOTKIT_FRONTEND_TOOLS,\n useValue: options.frontendTools ?? [],\n },\n {\n provide: COPILOTKIT_HUMAN_IN_THE_LOOP,\n useValue: options.humanInTheLoop ?? [],\n },\n ];\n}\n","import { InjectionToken } 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}\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};\n\n// Configuration interface\nexport interface CopilotChatConfiguration {\n labels?: Partial<CopilotChatLabels>;\n inputValue?: string;\n onSubmitInput?: (value: string) => void;\n onChangeInput?: (value: string) => void;\n}\n\n// Injection token for initial configuration\nexport const COPILOT_CHAT_INITIAL_CONFIG =\n new InjectionToken<CopilotChatConfiguration>(\"COPILOT_CHAT_INITIAL_CONFIG\", {\n providedIn: \"root\",\n factory: () => ({}),\n });\n","import { Injectable, Inject, Optional, signal } from '@angular/core';\nimport { \n CopilotChatConfiguration, \n CopilotChatLabels,\n COPILOT_CHAT_DEFAULT_LABELS,\n COPILOT_CHAT_INITIAL_CONFIG\n} from './chat-configuration.types';\n\n/**\n * Service for managing CopilotKit chat configuration.\n * Can be provided at different component levels for scoped configuration.\n * \n * @example\n * ```typescript\n * // Global configuration\n * providers: [provideCopilotChatConfiguration({ labels: { ... } })]\n * \n * // Component-scoped configuration\n * @Component({\n * providers: [provideCopilotChatConfiguration()],\n * ...\n * })\n * ```\n */\n@Injectable()\nexport class CopilotChatConfigurationService {\n // State signals\n private readonly _labels: ReturnType<typeof signal<CopilotChatLabels>>;\n private readonly _inputValue: ReturnType<typeof signal<string | undefined>>;\n private readonly _onSubmitInput: ReturnType<typeof signal<((value: string) => void) | undefined>>;\n private readonly _onChangeInput: ReturnType<typeof signal<((value: string) => void) | undefined>>;\n \n // Public readonly signals\n readonly labels: ReturnType<typeof signal<CopilotChatLabels>>['asReadonly'] extends () => infer R ? R : never;\n readonly inputValue: ReturnType<typeof signal<string | undefined>>['asReadonly'] extends () => infer R ? R : never;\n \n constructor(\n @Optional() @Inject(COPILOT_CHAT_INITIAL_CONFIG) private readonly initialConfig: CopilotChatConfiguration | null\n ) {\n // Initialize state signals\n this._labels = signal<CopilotChatLabels>(\n this.mergeLabels(this.initialConfig?.labels)\n );\n this._inputValue = signal<string | undefined>(\n this.initialConfig?.inputValue\n );\n this._onSubmitInput = signal<((value: string) => void) | undefined>(\n this.initialConfig?.onSubmitInput\n );\n this._onChangeInput = signal<((value: string) => void) | undefined>(\n this.initialConfig?.onChangeInput\n );\n \n // Initialize public readonly signals\n this.labels = this._labels.asReadonly();\n this.inputValue = this._inputValue.asReadonly();\n }\n \n /**\n * Update chat labels (partial update, merged with defaults)\n */\n setLabels(labels: Partial<CopilotChatLabels>): void {\n this._labels.set(this.mergeLabels(labels));\n }\n \n /**\n * Update the current input value\n */\n setInputValue(value: string | undefined): void {\n this._inputValue.set(value);\n // Also trigger change handler if set\n if (value !== undefined) {\n this.changeInput(value);\n }\n }\n \n /**\n * Set the submit input handler\n */\n setSubmitHandler(handler: ((value: string) => void) | undefined): void {\n this._onSubmitInput.set(handler);\n }\n \n /**\n * Set the change input handler\n */\n setChangeHandler(handler: ((value: string) => void) | undefined): void {\n this._onChangeInput.set(handler);\n }\n \n /**\n * Submit the current input value\n */\n submitInput(value: string): void {\n const handler = this._onSubmitInput();\n if (handler) {\n handler(value);\n }\n }\n \n /**\n * Handle input value change\n */\n changeInput(value: string): void {\n const handler = this._onChangeInput();\n if (handler) {\n handler(value);\n }\n }\n \n /**\n * Update the entire configuration at once\n */\n updateConfiguration(config: CopilotChatConfiguration): void {\n if (config.labels) {\n this.setLabels(config.labels);\n }\n if (config.inputValue !== undefined) {\n this._inputValue.set(config.inputValue);\n }\n if (config.onSubmitInput) {\n this.setSubmitHandler(config.onSubmitInput);\n }\n if (config.onChangeInput) {\n this.setChangeHandler(config.onChangeInput);\n }\n }\n \n /**\n * Reset configuration to defaults\n */\n reset(): void {\n this._labels.set(COPILOT_CHAT_DEFAULT_LABELS);\n this._inputValue.set(undefined);\n this._onSubmitInput.set(undefined);\n this._onChangeInput.set(undefined);\n }\n \n /**\n * Get the current submit handler\n */\n getSubmitHandler(): ((value: string) => void) | undefined {\n return this._onSubmitInput();\n }\n \n /**\n * Get the current change handler\n */\n getChangeHandler(): ((value: string) => void) | undefined {\n return this._onChangeInput();\n }\n \n /**\n * Merge partial labels with defaults\n */\n private mergeLabels(partial?: Partial<CopilotChatLabels>): CopilotChatLabels {\n return {\n ...COPILOT_CHAT_DEFAULT_LABELS,\n ...partial\n };\n }\n}\n","import { Provider } from '@angular/core';\nimport { CopilotChatConfigurationService } from './chat-configuration.service';\nimport { \n CopilotChatConfiguration,\n COPILOT_CHAT_INITIAL_CONFIG \n} from './chat-configuration.types';\n\n/**\n * Provides CopilotKit chat configuration at a specific component level.\n * This allows for scoped configuration where different parts of the app\n * can have different chat configurations.\n * \n * @param config - Optional initial configuration\n * @returns Array of providers\n * \n * @example\n * ```typescript\n * // Global configuration in app.config.ts\n * export const appConfig: ApplicationConfig = {\n * providers: [\n * provideCopilotChatConfiguration({\n * labels: {\n * chatInputPlaceholder: \"How can I help you today?\"\n * }\n * })\n * ]\n * };\n * \n * // Component-scoped configuration\n * @Component({\n * selector: 'customer-support-chat',\n * providers: [\n * provideCopilotChatConfiguration({\n * labels: {\n * chatInputPlaceholder: \"Describe your issue...\"\n * },\n * onSubmitInput: (value) => console.log('Support message:', value)\n * })\n * ],\n * template: `...`\n * })\n * export class CustomerSupportChatComponent {}\n * \n * // Multiple independent chats\n * @Component({\n * selector: 'sales-chat',\n * providers: [\n * provideCopilotChatConfiguration({\n * labels: {\n * chatInputPlaceholder: \"Ask about our products...\"\n * }\n * })\n * ],\n * template: `...`\n * })\n * export class SalesChatComponent {}\n * ```\n */\nexport function provideCopilotChatConfiguration(\n config?: CopilotChatConfiguration\n): Provider[] {\n return [\n // Provide the service\n CopilotChatConfigurationService,\n // Provide the initial configuration\n {\n provide: COPILOT_CHAT_INITIAL_CONFIG,\n useValue: config || {}\n }\n ];\n}","import { inject } from \"@angular/core\";\nimport { CopilotKitService } from \"../core/copilotkit.service\";\n\n/**\n * Utility function to inject the CopilotKit service in a component or directive.\n * \n * @example\n * ```typescript\n * export class MyComponent {\n * private copilotkit = injectCopilotKit();\n * \n * sendMessage() {\n * this.copilotkit.copilotkit.sendMessage(...);\n * }\n * }\n * ```\n */\nexport function injectCopilotKit() {\n return inject(CopilotKitService);\n}","import { DestroyRef, inject } from '@angular/core';\nimport { CopilotKitService } from '../core/copilotkit.service';\nimport { Context } from '@ag-ui/client';\n\n/**\n * Programmatically adds an agent context to CopilotKit and returns a cleanup function.\n * \n * @param context - The context to add\n * @returns A cleanup function that removes the context\n * \n * @example\n * ```typescript\n * export class MyComponent implements OnInit {\n * private copilotkit = injectCopilotKit();\n * \n * ngOnInit() {\n * const cleanup = addAgentContext(this.copilotkit, {\n * description: 'User preferences',\n * value: this.userSettings\n * });\n * \n * // Store cleanup for later or register with DestroyRef\n * this.cleanupFns.push(cleanup);\n * }\n * }\n * ```\n */\nexport function addAgentContext(\n copilotkit: CopilotKitService,\n context: Context\n): () => void {\n const contextId = copilotkit.copilotkit.addContext(context);\n \n return () => {\n copilotkit.copilotkit.removeContext(contextId);\n };\n}\n\n/**\n * Registers an agent context with CopilotKit and automatically removes it when the component/service is destroyed.\n * Must be called within an injection context.\n * \n * @param context - The context to add\n * @returns The context ID\n * \n * @example\n * ```typescript\n * export class MyComponent implements OnInit {\n * ngOnInit() {\n * // Automatically cleaned up on component destroy\n * registerAgentContext({\n * description: 'Component state',\n * value: this.state\n * });\n * }\n * }\n * ```\n */\nexport function registerAgentContext(context: Context): string {\n const copilotkit = inject(CopilotKitService);\n const destroyRef = inject(DestroyRef);\n \n const contextId = copilotkit.copilotkit.addContext(context);\n \n // Register cleanup with Angular's DestroyRef\n destroyRef.onDestroy(() => {\n copilotkit.copilotkit.removeContext(contextId);\n });\n \n return contextId;\n}\n\n/**\n * Creates a reactive context that updates whenever the value changes.\n * Uses Angular signals for reactivity.\n * \n * @param description - Static or signal-based description\n * @param value - Signal that provides the context value\n * @returns Object with update and destroy methods\n * \n * @example\n * ```typescript\n * export class MyComponent {\n * private userSettings = signal({ theme: 'dark' });\n * \n * ngOnInit() {\n * const context = createReactiveContext(\n * 'User settings',\n * computed(() => this.userSettings())\n * );\n * \n * // Updates automatically when userSettings signal changes\n * }\n * }\n * ```\n */\nexport function createReactiveContext(\n description: string | (() => string),\n value: () => any\n): { update: () => void; destroy: () => void } {\n const copilotkit = inject(CopilotKitService);\n let currentContextId: string | undefined;\n \n const update = () => {\n // Remove old context if it exists\n if (currentContextId) {\n copilotkit.copilotkit.removeContext(currentContextId);\n }\n \n // Add new context\n const desc = typeof description === 'function' ? description() : description;\n currentContextId = copilotkit.copilotkit.addContext({\n description: desc,\n value: value()\n });\n };\n \n const destroy = () => {\n if (currentContextId) {\n copilotkit.copilotkit.removeContext(currentContextId);\n currentContextId = undefined;\n }\n };\n \n // Initial setup\n update();\n \n // Register cleanup\n const destroyRef = inject(DestroyRef);\n destroyRef.onDestroy(destroy);\n \n return { update, destroy };\n}","import { DestroyRef, inject } from '@angular/core';\nimport { CopilotKitService } from '../core/copilotkit.service';\nimport { AngularFrontendTool, AngularToolCallRender, ToolCallRender } from '../core/copilotkit.types';\nimport type { z } from 'zod';\n\n/**\n * Explicitly adds a frontend tool to CopilotKit.\n * Requires CopilotKitService to be passed as a parameter.\n * \n * @param service - The CopilotKitService instance\n * @param tool - The tool to add\n * @returns A cleanup function that removes the tool\n * \n * @example\n * ```typescript\n * export class MyComponent implements OnInit, OnDestroy {\n * private cleanupFns: Array<() => void> = [];\n * \n * constructor(private copilotkit: CopilotKitService) {}\n * \n * ngOnInit() {\n * const cleanup = addFrontendTool(this.copilotkit, {\n * name: 'calculator',\n * description: 'Performs calculations',\n * parameters: z.object({\n * expression: z.string()\n * }),\n * handler: async (args) => {\n * return eval(args.expression);\n * }\n * });\n * \n * this.cleanupFns.push(cleanup);\n * }\n * \n * ngOnDestroy() {\n * this.cleanupFns.forEach(fn => fn());\n * }\n * }\n * ```\n */\nexport function addFrontendTool<T extends Record<string, any> = Record<string, any>>(\n service: CopilotKitService,\n tool: AngularFrontendTool<T>\n): () => void {\n // Add the tool to CopilotKit\n service.copilotkit.addTool(tool);\n \n // Register the render if provided\n if (tool.render) {\n const currentRenders = service.currentRenderToolCalls();\n const existingIndex = currentRenders.findIndex((r: ToolCallRender) => r.name === tool.name);\n \n if (existingIndex !== -1) {\n console.error(`Tool with name '${tool.name}' already has a render. Skipping.`);\n } else {\n const renderEntry: AngularToolCallRender = {\n name: tool.name,\n render: tool.render\n };\n \n service.setCurrentRenderToolCalls([...currentRenders, renderEntry]);\n }\n }\n \n // Return cleanup function\n return () => {\n removeFrontendTool(service, tool.name);\n };\n}\n\n/**\n * Registers a frontend tool with CopilotKit and automatically removes it when the component/service is destroyed.\n * Must be called within an injection context.\n * \n * @param tool - The tool to register\n * @returns The tool name\n * \n * @example\n * ```typescript\n * export class MyComponent implements OnInit {\n * ngOnInit() {\n * // Automatically cleaned up on component destroy\n * registerFrontendTool({\n * name: 'search',\n * description: 'Search for items',\n * parameters: z.object({\n * query: z.string()\n * }),\n * handler: async (args) => {\n * return this.searchService.search(args.query);\n * },\n * render: SearchResultsComponent\n * });\n * }\n * }\n * ```\n */\nexport function registerFrontendTool<T extends Record<string, any> = Record<string, any>>(\n tool: AngularFrontendTool<T>\n): string {\n const service = inject(CopilotKitService);\n const destroyRef = inject(DestroyRef);\n \n // Add the tool\n service.copilotkit.addTool(tool);\n \n // Register the render if provided\n if (tool.render) {\n const currentRenders = service.currentRenderToolCalls();\n const existingIndex = currentRenders.findIndex((r: ToolCallRender) => r.name === tool.name);\n \n if (existingIndex !== -1) {\n console.error(`Tool with name '${tool.name}' already has a render. Skipping.`);\n } else {\n const renderEntry: AngularToolCallRender = {\n name: tool.name,\n render: tool.render\n };\n \n service.setCurrentRenderToolCalls([...currentRenders, renderEntry]);\n }\n }\n \n // Register cleanup with Angular's DestroyRef\n destroyRef.onDestroy(() => {\n removeFrontendTool(service, tool.name);\n });\n \n return tool.name;\n}\n\n/**\n * Explicitly removes a frontend tool from CopilotKit.\n * \n * @param service - The CopilotKitService instance\n * @param toolName - The name of the tool to remove\n * \n * @example\n * ```typescript\n * removeFrontendTool(this.copilotkit, 'calculator');\n * ```\n */\nexport function removeFrontendTool(\n service: CopilotKitService,\n toolName: string\n): void {\n // Remove the tool\n service.copilotkit.removeTool(toolName);\n \n // Remove the render if it exists\n const currentRenders = service.currentRenderToolCalls();\n const filtered = currentRenders.filter((r: ToolCallRender) => r.name !== toolName);\n if (filtered.length !== currentRenders.length) {\n service.setCurrentRenderToolCalls(filtered);\n }\n}\n\n/**\n * Creates a frontend tool with dynamic parameters that can change over time.\n * Uses Angular signals for reactivity.\n * \n * @param name - Tool name\n * @param description - Tool description\n * @param parameters - Zod schema for parameters\n * @param handler - Signal or function that provides the handler\n * @param render - Optional render component or template\n * @returns Object with update and destroy methods\n * \n * @example\n * ```typescript\n * export class MyComponent {\n * private toolConfig = signal({\n * handler: async (args: any) => this.processDefault(args)\n * });\n * \n * ngOnInit() {\n * const tool = createDynamicFrontendTool(\n * 'processor',\n * 'Processes data',\n * z.object({ data: z.string() }),\n * () => this.toolConfig().handler\n * );\n * \n * // Later, update the handler\n * this.toolConfig.set({\n * handler: async (args: any) => this.processAdvanced(args)\n * });\n * tool.update();\n * }\n * }\n * ```\n */\nexport function createDynamicFrontendTool<T extends Record<string, any> = Record<string, any>>(\n name: string,\n description: string | (() => string),\n parameters: z.ZodSchema<T>,\n handler: () => ((args: T) => Promise<any>),\n render?: () => any\n): { update: () => void; destroy: () => void } {\n const service = inject(CopilotKitService);\n const destroyRef = inject(DestroyRef);\n \n let isRegistered = false;\n \n const update = () => {\n // Remove old tool if registered\n if (isRegistered) {\n service.copilotkit.removeTool(name);\n }\n \n // Create new tool configuration\n const desc = typeof description === 'function' ? description() : description;\n const currentHandler = handler();\n const currentRender = render ? render() : undefined;\n \n const tool: AngularFrontendTool<T> = {\n name,\n description: desc,\n parameters,\n handler: currentHandler,\n render: currentRender\n };\n \n // Add the tool\n service.copilotkit.addTool(tool);\n \n // Update render if provided\n if (currentRender) {\n const currentRenders = service.currentRenderToolCalls();\n const renderEntry: AngularToolCallRender = {\n name: name,\n render: currentRender\n };\n \n const existingIndex = currentRenders.findIndex((r: ToolCallRender) => r.name === name);\n if (existingIndex !== -1) {\n const updated = [...currentRenders];\n updated[existingIndex] = renderEntry;\n service.setCurrentRenderToolCalls(updated);\n } else {\n service.setCurrentRenderToolCalls([...currentRenders, renderEntry]);\n }\n }\n \n isRegistered = true;\n };\n \n const destroy = () => {\n if (isRegistered) {\n removeFrontendTool(service, name);\n isRegistered = false;\n }\n };\n \n // Initial setup\n update();\n \n // Register cleanup\n destroyRef.onDestroy(destroy);\n \n return { update, destroy };\n}","import {\n DestroyRef,\n inject,\n signal,\n computed,\n Injector,\n runInInjectionContext,\n} from \"@angular/core\";\nimport { toObservable } from \"@angular/core/rxjs-interop\";\nimport { CopilotKitService } from \"../core/copilotkit.service\";\nimport {\n AgentSubscriptionCallbacks,\n AgentWatchResult,\n} from \"../core/copilotkit.types\";\nimport { AbstractAgent } from \"@ag-ui/client\";\nimport { DEFAULT_AGENT_ID } from \"@copilotkitnext/shared\";\nimport { CopilotKitCoreRuntimeConnectionStatus } from \"@copilotkitnext/core\";\n\n/**\n * Watches an agent and provides reactive signals for its state.\n * Must be called within an injection context.\n * Automatically cleans up when the component/service is destroyed.\n *\n * @param config - Optional configuration with agentId\n * @returns Object with agent, messages, and isRunning signals plus observables\n *\n * @example\n * ```typescript\n * export class MyComponent {\n * // Automatically tracks agent state\n * agentState = watchAgent({ agentId: 'my-agent' });\n *\n * constructor() {\n * effect(() => {\n * const messages = this.agentState.messages();\n * const isRunning = this.agentState.isRunning();\n * console.log('Messages:', messages.length, 'Running:', isRunning);\n * });\n * }\n * }\n * ```\n */\nexport function watchAgent(config?: { agentId?: string }): AgentWatchResult {\n // Use inject() internally to get required services\n const service = inject(CopilotKitService);\n const destroyRef = inject(DestroyRef);\n const effectiveAgentId = config?.agentId ?? DEFAULT_AGENT_ID;\n\n // Create reactive signals with tick mechanism for reliable updates\n const agentSignal = signal<AbstractAgent | undefined>(undefined);\n const tick = signal<number>(0);\n const isRunningSignal = signal<boolean>(false);\n\n // Create computed messages signal that reacts to tick changes\n const messages = computed(() => {\n // Access tick to ensure recomputation\n tick();\n const a = agentSignal();\n if (!a) return [];\n // Return a shallow clone to ensure change detection\n return a.messages.map((m) => ({ ...m }));\n });\n\n // Get initial agent\n const updateAgent = () => {\n const agent = service.copilotkit.getAgent(effectiveAgentId);\n agentSignal.set(agent);\n return agent;\n };\n\n // Initial update\n let currentAgent = updateAgent();\n\n // Subscribe to agent changes\n let agentSubscription: { unsubscribe: () => void } | undefined;\n\n const subscribeToAgent = () => {\n // Unsubscribe from previous agent if any\n agentSubscription?.unsubscribe();\n\n if (currentAgent) {\n agentSubscription = currentAgent.subscribe({\n onMessagesChanged() {\n // Increment tick to force recomputation of messages computed\n tick.update((v) => v + 1);\n },\n onStateChanged() {\n // Increment tick to force recomputation\n tick.update((v) => v + 1);\n },\n onRunInitialized() {\n isRunningSignal.set(true);\n },\n onRunFinalized() {\n isRunningSignal.set(false);\n },\n onRunFailed() {\n isRunningSignal.set(false);\n },\n });\n }\n };\n\n // Initial subscription\n subscribeToAgent();\n\n // Subscribe to CopilotKit changes to detect agent updates\n const coreUnsubscribe = service.copilotkit.subscribe({\n onRuntimeConnectionStatusChanged({ status }) {\n if (\n status === CopilotKitCoreRuntimeConnectionStatus.Connected ||\n status === CopilotKitCoreRuntimeConnectionStatus.Disconnected ||\n status === CopilotKitCoreRuntimeConnectionStatus.Error\n ) {\n // Re-check agent when runtime connection state changes\n currentAgent = updateAgent();\n subscribeToAgent();\n }\n },\n });\n\n // Register cleanup\n const unsubscribe = () => {\n agentSubscription?.unsubscribe();\n coreUnsubscribe(); // subscribe returns a function directly\n };\n\n destroyRef.onDestroy(unsubscribe);\n\n // Create observables from signals using toObservable\n const agent$ = toObservable(agentSignal);\n const isRunning$ = toObservable(isRunningSignal);\n const messages$ = toObservable(messages);\n\n return {\n agent: agentSignal.asReadonly(),\n messages: messages,\n isRunning: isRunningSignal.asReadonly(),\n agent$,\n messages$,\n isRunning$,\n unsubscribe,\n };\n}\n\n/**\n * Gets an agent by ID without subscribing to changes.\n *\n * @param service - The CopilotKitService instance\n * @param agentId - Optional agent ID (defaults to DEFAULT_AGENT_ID)\n * @returns The agent or undefined if not found\n *\n * @example\n * ```typescript\n * export class MyComponent {\n * constructor(private copilotkit: CopilotKitService) {}\n *\n * getCurrentAgent() {\n * return getAgent(this.copilotkit, 'my-agent');\n * }\n * }\n * ```\n */\nexport function getAgent(\n service: CopilotKitService,\n agentId?: string\n): AbstractAgent | undefined {\n const effectiveAgentId = agentId ?? DEFAULT_AGENT_ID;\n return service.copilotkit.getAgent(effectiveAgentId);\n}\n\n// Re-export the type for convenience (the actual type is in copilotkit.types)\nexport type { AgentWatchResult } from \"../core/copilotkit.types\";\n\n/**\n * Convenience wrapper for watchAgent that handles injection context.\n * Useful when you need to call watchAgent outside of a constructor or field initializer.\n *\n * @param injector - The Angular Injector to use for injection context\n * @param config - Optional configuration with agentId\n * @returns Object with agent, messages, and isRunning signals plus observables\n *\n * @example\n * ```typescript\n * export class MyComponent {\n * constructor(private injector: Injector) {}\n *\n * switchAgent(newAgentId: string) {\n * // Can call outside of constructor using watchAgentWith\n * const watcher = watchAgentWith(this.injector, { agentId: newAgentId });\n * this.agent = watcher.agent;\n * this.messages = watcher.messages;\n * this.isRunning = watcher.isRunning;\n * }\n * }\n * ```\n */\nexport function watchAgentWith(\n injector: Injector,\n config?: { agentId?: string }\n): AgentWatchResult {\n return runInInjectionContext(injector, () => watchAgent(config));\n}\n\n/**\n * Subscribes to an agent's events with custom callbacks.\n * Returns a cleanup function that should be called to unsubscribe.\n *\n * @param service - The CopilotKitService instance\n * @param agentId - Optional agent ID (defaults to DEFAULT_AGENT_ID)\n * @param callbacks - Event callbacks\n * @returns Cleanup function to unsubscribe\n *\n * @example\n * ```typescript\n * export class MyComponent implements OnInit, OnDestroy {\n * private unsubscribe?: () => void;\n *\n * constructor(private copilotkit: CopilotKitService) {}\n *\n * ngOnInit() {\n * this.unsubscribe = subscribeToAgent(this.copilotkit, 'my-agent', {\n * onRunInitialized: () => console.log('Run started'),\n * onRunFinalized: () => console.log('Run completed'),\n * onRunFailed: (error) => console.error('Run failed', error),\n * });\n * }\n *\n * ngOnDestroy() {\n * this.unsubscribe?.();\n * }\n * }\n * ```\n */\nexport function subscribeToAgent(\n service: CopilotKitService,\n agentId?: string,\n callbacks?: AgentSubscriptionCallbacks\n): () => void {\n const effectiveAgentId = agentId ?? DEFAULT_AGENT_ID;\n const agent = service.copilotkit.getAgent(effectiveAgentId);\n\n if (!agent) {\n // Return no-op cleanup if agent doesn't exist\n return () => {};\n }\n\n const subscription = agent.subscribe({\n onMessagesChanged: callbacks?.onMessagesChanged,\n onStateChanged: callbacks?.onStateChanged,\n onRunInitialized: callbacks?.onRunInitialized,\n onRunFinalized: callbacks?.onRunFinalized,\n onRunFailed: callbacks?.onRunFailed,\n });\n\n return () => subscription.unsubscribe();\n}\n","import { \n DestroyRef, \n inject, \n signal, \n Signal,\n Type,\n TemplateRef\n} from '@angular/core';\nimport { CopilotKitService } from '../core/copilotkit.service';\nimport { \n AngularHumanInTheLoop, \n ToolCallStatus,\n HumanInTheLoopState,\n HumanInTheLoopProps,\n AngularFrontendTool\n} from '../core/copilotkit.types';\n\n/**\n * Registers a human-in-the-loop tool that requires user interaction.\n * Must be called within an injection context.\n * Automatically cleans up when the component/service is destroyed.\n * \n * @param tool - The human-in-the-loop tool configuration\n * @returns The tool ID\n * \n * @example\n * ```typescript\n * export class ApprovalComponent {\n * toolId = registerHumanInTheLoop({\n * name: 'requireApproval',\n * description: 'Requires user approval',\n * args: z.object({ action: z.string() }),\n * render: ApprovalDialogComponent\n * });\n * }\n * ```\n */\nexport function registerHumanInTheLoop<T extends Record<string, any> = Record<string, any>>(\n tool: AngularHumanInTheLoop<T>\n): string {\n const service = inject(CopilotKitService);\n const destroyRef = inject(DestroyRef);\n \n // Create state management\n const statusSignal = signal<ToolCallStatus>(ToolCallStatus.InProgress);\n let resolvePromise: ((result: unknown) => void) | null = null;\n \n // Create respond function\n const respond = async (result: unknown): Promise<void> => {\n if (resolvePromise) {\n resolvePromise(result);\n statusSignal.set(ToolCallStatus.Complete);\n resolvePromise = null;\n }\n };\n \n // Create handler that returns a Promise\n const handler = async (_args: T): Promise<unknown> => {\n return new Promise((resolve) => {\n statusSignal.set(ToolCallStatus.Executing);\n resolvePromise = resolve;\n });\n };\n \n // Create enhanced render function\n const enhancedRender = createEnhancedRender(tool.render, statusSignal, respond);\n \n // Create the frontend tool\n const frontendTool: AngularFrontendTool<T> = {\n ...tool,\n handler,\n render: enhancedRender\n };\n \n // Add the tool (returns void, so we use the tool name as ID)\n service.copilotkit.addTool(frontendTool);\n const toolId = frontendTool.name;\n \n // Register tool render if provided\n if (frontendTool.render) {\n service.registerToolRender(frontendTool.name, {\n name: frontendTool.name,\n render: frontendTool.render\n });\n }\n \n // Cleanup on destroy\n destroyRef.onDestroy(() => {\n service.copilotkit.removeTool(toolId);\n if (frontendTool.render) {\n service.unregisterToolRender(frontendTool.name);\n }\n });\n \n return toolId;\n}\n\n/**\n * Adds a human-in-the-loop tool with explicit service parameter.\n * Returns a cleanup function.\n * \n * @param service - The CopilotKitService instance\n * @param tool - The human-in-the-loop tool configuration\n * @returns Cleanup function to remove the tool\n * \n * @example\n * ```typescript\n * export class MyComponent implements OnInit, OnDestroy {\n * private cleanup?: () => void;\n * \n * constructor(private copilotkit: CopilotKitService) {}\n * \n * ngOnInit() {\n * this.cleanup = addHumanInTheLoop(this.copilotkit, {\n * name: 'requireApproval',\n * description: 'Requires user approval',\n * args: z.object({ action: z.string() }),\n * render: ApprovalDialogComponent\n * });\n * }\n * \n * ngOnDestroy() {\n * this.cleanup?.();\n * }\n * }\n * ```\n */\nexport function addHumanInTheLoop<T extends Record<string, any> = Record<string, any>>(\n service: CopilotKitService,\n tool: AngularHumanInTheLoop<T>\n): () => void {\n // Create state management\n const statusSignal = signal<ToolCallStatus>(ToolCallStatus.InProgress);\n let resolvePromise: ((result: unknown) => void) | null = null;\n \n // Create respond function\n const respond = async (result: unknown): Promise<void> => {\n if (resolvePromise) {\n resolvePromise(result);\n statusSignal.set(ToolCallStatus.Complete);\n resolvePromise = null;\n }\n };\n \n // Create handler that returns a Promise\n const handler = async (_args: T): Promise<unknown> => {\n return new Promise((resolve) => {\n statusSignal.set(ToolCallStatus.Executing);\n resolvePromise = resolve;\n });\n };\n \n // Create enhanced render function\n const enhancedRender = createEnhancedRender(tool.render, statusSignal, respond);\n \n // Create the frontend tool\n const frontendTool: AngularFrontendTool<T> = {\n ...tool,\n handler,\n render: enhancedRender\n };\n \n // Add the tool (returns void, so we use the tool name as ID)\n service.copilotkit.addTool(frontendTool);\n const toolId = frontendTool.name;\n \n // Register tool render if provided\n if (frontendTool.render) {\n service.registerToolRender(frontendTool.name, {\n name: frontendTool.name,\n render: frontendTool.render\n });\n }\n \n // Return cleanup function\n return () => {\n service.copilotkit.removeTool(toolId);\n if (frontendTool.render) {\n service.unregisterToolRender(frontendTool.name);\n }\n };\n}\n\n/**\n * Creates a human-in-the-loop tool with dynamic update capabilities.\n * \n * @param service - The CopilotKitService instance\n * @param tool - The human-in-the-loop tool configuration\n * @returns Object with status signal, update and destroy methods\n * \n * @example\n * ```typescript\n * export class MyComponent {\n * humanInTheLoop = createHumanInTheLoop(this.copilotkit, {\n * name: 'requireApproval',\n * description: 'Requires user approval',\n * args: z.object({ action: z.string() }),\n * render: ApprovalDialogComponent\n * });\n * \n * updateDescription(newDesc: string) {\n * this.humanInTheLoop.update({ description: newDesc });\n * }\n * \n * ngOnDestroy() {\n * this.humanInTheLoop.destroy();\n * }\n * }\n * ```\n */\nexport function createHumanInTheLoop<T extends Record<string, any> = Record<string, any>>(\n service: CopilotKitService,\n tool: AngularHumanInTheLoop<T>\n): HumanInTheLoopState & { update: (updates: Partial<AngularHumanInTheLoop<T>>) => void } {\n // Create state management\n const statusSignal = signal<ToolCallStatus>(ToolCallStatus.InProgress);\n let currentTool = { ...tool };\n let toolId: string = '';\n let resolvePromise: ((result: unknown) => void) | null = null;\n \n // Create respond function\n const respond = async (result: unknown): Promise<void> => {\n if (resolvePromise) {\n resolvePromise(result);\n statusSignal.set(ToolCallStatus.Complete);\n resolvePromise = null;\n }\n };\n \n // Create handler that returns a Promise\n const handler = async (_args: T): Promise<unknown> => {\n return new Promise((resolve) => {\n statusSignal.set(ToolCallStatus.Executing);\n resolvePromise = resolve;\n });\n };\n \n // Function to add the tool\n const addTool = () => {\n // Create enhanced render function\n const enhancedRender = createEnhancedRender(currentTool.render, statusSignal, respond);\n \n // Create the frontend tool\n const frontendTool: AngularFrontendTool<T> = {\n ...currentTool,\n handler,\n render: enhancedRender\n };\n \n // Add tool (returns void, so we use the tool name as ID)\n service.copilotkit.addTool(frontendTool);\n toolId = frontendTool.name;\n \n // Register tool render if provided\n if (frontendTool.render) {\n service.registerToolRender(frontendTool.name, {\n name: frontendTool.name,\n render: frontendTool.render\n });\n }\n };\n \n // Initialize the tool\n addTool();\n \n return {\n status: statusSignal.asReadonly(),\n toolId,\n update: (updates: Partial<AngularHumanInTheLoop<T>>) => {\n // Remove old tool\n service.copilotkit.removeTool(toolId);\n if (currentTool.render) {\n service.unregisterToolRender(currentTool.name);\n }\n \n // Update tool configuration\n currentTool = { ...currentTool, ...updates };\n \n // Re-add with new configuration\n addTool();\n },\n destroy: () => {\n service.copilotkit.removeTool(toolId);\n if (currentTool.render) {\n service.unregisterToolRender(currentTool.name);\n }\n }\n };\n}\n\n/**\n * Creates an enhanced render function that injects the respond function\n * when the status is 'executing'.\n */\nfunction createEnhancedRender<T extends Record<string, any>>(\n originalRender: Type<any> | TemplateRef<HumanInTheLoopProps<T>>,\n _statusSignal: Signal<ToolCallStatus>,\n _respond: (result: unknown) => Promise<void>\n): Type<any> | TemplateRef<any> {\n // For component classes, we need to create a wrapper\n if (isComponentClass(originalRender)) {\n // Return a wrapper component factory\n // This is complex in Angular and would require dynamic component creation\n // For now, we'll return the original and rely on prop injection\n return originalRender;\n }\n \n // For templates, we can't easily wrap them\n // The template context will be enhanced in the render component\n return originalRender;\n}\n\n/**\n * Helper function to check if a value is a component class\n */\nfunction isComponentClass(value: any): value is Type<any> {\n return typeof value === 'function' && value.prototype;\n}\n\n/**\n * Enhanced component wrapper for human-in-the-loop.\n * This would be used internally by the tool render component to inject\n * the respond function based on status.\n * \n * @internal\n */\nexport function enhancePropsForHumanInTheLoop<T>(\n props: HumanInTheLoopProps<T>,\n status: ToolCallStatus,\n respond?: (result: unknown) => Promise<void>\n): HumanInTheLoopProps<T> {\n if (status === ToolCallStatus.Executing && respond) {\n return {\n ...props,\n status: ToolCallStatus.Executing,\n respond\n } as HumanInTheLoopProps<T>;\n }\n \n if (status === ToolCallStatus.Complete) {\n return {\n ...props,\n status: ToolCallStatus.Complete,\n result: typeof props.result === 'string' ? props.result : '',\n respond: undefined\n } as HumanInTheLoopProps<T>;\n }\n \n // InProgress\n return {\n ...props,\n status: ToolCallStatus.InProgress,\n result: undefined,\n respond: undefined\n } as HumanInTheLoopProps<T>;\n}","import { inject, Signal } from '@angular/core';\nimport { CopilotChatConfigurationService } from '../core/chat-configuration/chat-configuration.service';\nimport { \n CopilotChatConfiguration,\n CopilotChatLabels\n} from '../core/chat-configuration/chat-configuration.types';\n\n/**\n * Watches chat configuration and provides reactive access to all configuration values.\n * Must be called within an injection context.\n * \n * @returns Object with reactive signals and handler functions\n * \n * @example\n * ```typescript\n * export class ChatInputComponent {\n * config = watchChatConfig();\n * \n * constructor() {\n * effect(() => {\n * const placeholder = this.config.labels().chatInputPlaceholder;\n * console.log('Placeholder:', placeholder);\n * });\n * }\n * \n * handleSubmit(value: string) {\n * this.config.submitInput(value);\n * }\n * }\n * ```\n */\nexport function watchChatConfig(): {\n labels: Signal<CopilotChatLabels>;\n inputValue: Signal<string | undefined>;\n submitInput: (value: string) => void;\n changeInput: (value: string) => void;\n} {\n const service = inject(CopilotChatConfigurationService);\n \n return {\n labels: service.labels,\n inputValue: service.inputValue,\n submitInput: (value: string) => service.submitInput(value),\n changeInput: (value: string) => service.changeInput(value)\n };\n}\n\n/**\n * Registers chat configuration within an injection context.\n * Automatically updates the configuration when called.\n * \n * @param config - The configuration to register\n * \n * @example\n * ```typescript\n * export class ChatComponent {\n * constructor() {\n * registerChatConfig({\n * labels: {\n * chatInputPlaceholder: \"How can I help?\"\n * },\n * onSubmitInput: (value) => this.handleSubmit(value)\n * });\n * }\n * }\n * ```\n */\nexport function registerChatConfig(config: CopilotChatConfiguration): void {\n const service = inject(CopilotChatConfigurationService);\n service.updateConfiguration(config);\n}\n\n/**\n * Gets the current chat labels signal.\n * \n * @param service - The CopilotChatConfigurationService instance\n * @returns Signal containing the current labels\n * \n * @example\n * ```typescript\n * export class ChatComponent {\n * constructor(private chatConfig: CopilotChatConfigurationService) {\n * const labels = getChatLabels(this.chatConfig);\n * effect(() => {\n * console.log('Current labels:', labels());\n * });\n * }\n * }\n * ```\n */\nexport function getChatLabels(\n service: CopilotChatConfigurationService\n): Signal<CopilotChatLabels> {\n return service.labels;\n}\n\n/**\n * Updates chat labels.\n * \n * @param service - The CopilotChatConfigurationService instance\n * @param labels - Partial labels to merge with defaults\n * \n * @example\n * ```typescript\n * export class ChatComponent {\n * updatePlaceholder(text: string) {\n * setChatLabels(this.chatConfig, {\n * chatInputPlaceholder: text\n * });\n * }\n * }\n * ```\n */\nexport function setChatLabels(\n service: CopilotChatConfigurationService,\n labels: Partial<CopilotChatLabels>\n): void {\n service.setLabels(labels);\n}\n\n/**\n * Gets the current input value signal.\n * \n * @param service - The CopilotChatConfigurationService instance\n * @returns Signal containing the current input value\n * \n * @example\n * ```typescript\n * export class ChatInputComponent {\n * inputValue = getChatInputValue(this.chatConfig);\n * \n * constructor(private chatConfig: CopilotChatConfigurationService) {\n * effect(() => {\n * const value = this.inputValue();\n * if (value) {\n * this.updateTextarea(value);\n * }\n * });\n * }\n * }\n * ```\n */\nexport function getChatInputValue(\n service: CopilotChatConfigurationService\n): Signal<string | undefined> {\n return service.inputValue;\n}\n\n/**\n * Sets the current input value.\n * \n * @param service - The CopilotChatConfigurationService instance\n * @param value - The new input value\n * \n * @example\n * ```typescript\n * export class ChatInputComponent {\n * onInputChange(event: Event) {\n * const value = (event.target as HTMLInputElement).value;\n * setChatInputValue(this.chatConfig, value);\n * }\n * }\n * ```\n */\nexport function setChatInputValue(\n service: CopilotChatConfigurationService,\n value: string | undefined\n): void {\n service.setInputValue(value);\n}\n\n/**\n * Creates a chat configuration controller with dynamic update capabilities.\n * This is useful when you need to programmatically manage configuration.\n * \n * @param service - The CopilotChatConfigurationService instance\n * @param initialConfig - Optional initial configuration\n * @returns Controller object with update and reset methods\n * \n * @example\n * ```typescript\n * export class ChatManagerComponent {\n * chatController = createChatConfigController(this.chatConfig, {\n * labels: { chatInputPlaceholder: \"Ask me...\" }\n * });\n * \n * constructor(private chatConfig: CopilotChatConfigurationService) {}\n * \n * updateForSupportMode() {\n * this.chatController.update({\n * labels: { chatInputPlaceholder: \"Describe your issue...\" }\n * });\n * }\n * \n * resetToDefaults() {\n * this.chatController.reset();\n * }\n * }\n * ```\n */\nexport function createChatConfigController(\n service: CopilotChatConfigurationService,\n initialConfig?: CopilotChatConfiguration\n): {\n update: (config: CopilotChatConfiguration) => void;\n reset: () => void;\n getLabels: () => CopilotChatLabels;\n getInputValue: () => string | undefined;\n} {\n // Apply initial configuration if provided\n if (initialConfig) {\n service.updateConfiguration(initialConfig);\n }\n \n return {\n update: (config: CopilotChatConfiguration) => service.updateConfiguration(config),\n reset: () => service.reset(),\n getLabels: () => service.labels(),\n getInputValue: () => service.inputValue()\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 { Component, ChangeDetectionStrategy, ChangeDetectorRef } from '@angular/core';\n\n@Component({\n selector: 'copilot-tooltip-content',\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 .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 changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true\n})\nexport class TooltipContentComponent {\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 CopilotTooltipDirective 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(TooltipContentComponent, 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 = this.overlayRef.overlayElement.getBoundingClientRect();\n const elementRect = 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 = this.tooltipPosition === 'below' \n ? [...(positions.above || []), ...(positions.left || []), ...(positions.right || [])]\n : Object.values(positions).filter(p => p !== primary).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}","import { Directive, Input, OnChanges, SimpleChanges, Inject } from \"@angular/core\";\nimport { CopilotKitService } from \"../core/copilotkit.service\";\nimport { AbstractAgent } from \"@ag-ui/client\";\n\n/**\n * Directive to configure CopilotKit runtime settings declaratively in templates.\n * \n * @example\n * ```html\n * <div [copilotkitConfig]=\"{\n * runtimeUrl: 'https://api.example.com',\n * headers: { 'Authorization': 'Bearer token' }\n * }\">\n * <!-- Your app content -->\n * </div>\n * ```\n * \n * Or with individual inputs:\n * ```html\n * <div copilotkitConfig\n * [runtimeUrl]=\"apiUrl\"\n * [headers]=\"authHeaders\"\n * [agents]=\"myAgents\">\n * <!-- Your app content -->\n * </div>\n * ```\n */\n@Directive({\n selector: \"[copilotkitConfig]\",\n standalone: true,\n})\nexport class CopilotKitConfigDirective implements OnChanges {\n constructor(@Inject(CopilotKitService) private readonly copilotkit: CopilotKitService) {}\n\n @Input() copilotkitConfig?: {\n runtimeUrl?: string;\n headers?: Record<string, string>;\n properties?: Record<string, unknown>;\n agents?: Record<string, AbstractAgent>;\n };\n\n @Input() runtimeUrl?: string;\n @Input() headers?: Record<string, string>;\n @Input() properties?: Record<string, unknown>;\n @Input() agents?: Record<string, AbstractAgent>;\n\n ngOnChanges(changes: SimpleChanges): void {\n // Handle combined config object\n if (changes['copilotkitConfig']) {\n const config = this.copilotkitConfig;\n if (config) {\n if (config.runtimeUrl !== undefined) {\n this.copilotkit.setRuntimeUrl(config.runtimeUrl);\n }\n if (config.headers) {\n this.copilotkit.setHeaders(config.headers);\n }\n if (config.properties) {\n this.copilotkit.setProperties(config.properties);\n }\n if (config.agents) {\n this.copilotkit.setAgents(config.agents);\n }\n }\n }\n\n // Handle individual inputs\n if (changes['runtimeUrl'] && !this.copilotkitConfig) {\n this.copilotkit.setRuntimeUrl(this.runtimeUrl);\n }\n if (changes['headers'] && !this.copilotkitConfig) {\n this.copilotkit.setHeaders(this.headers || {});\n }\n if (changes['properties'] && !this.copilotkitConfig) {\n this.copilotkit.setProperties(this.properties || {});\n }\n if (changes['agents'] && !this.copilotkitConfig) {\n this.copilotkit.setAgents(this.agents || {});\n }\n }\n}\n","import {\n Directive,\n Input,\n OnInit,\n OnChanges,\n OnDestroy,\n SimpleChanges,\n Inject,\n} from \"@angular/core\";\nimport { CopilotKitService } from \"../core/copilotkit.service\";\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 CopilotKitAgentContextDirective\n implements OnInit, OnChanges, OnDestroy\n{\n private contextId?: string;\n\n constructor(\n @Inject(CopilotKitService) private readonly copilotkit: CopilotKitService\n ) {}\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.copilotkit.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.copilotkit.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 Input,\n OnInit,\n OnChanges,\n OnDestroy,\n SimpleChanges,\n TemplateRef,\n Type,\n isDevMode,\n Inject,\n} from \"@angular/core\";\nimport { CopilotKitService } from \"../core/copilotkit.service\";\nimport type {\n AngularFrontendTool,\n AngularToolCallRender,\n ToolCallRender,\n} from \"../core/copilotkit.types\";\nimport type { z } from \"zod\";\n\n@Directive({\n selector: \"[copilotkitFrontendTool]\",\n standalone: true,\n})\nexport class CopilotKitFrontendToolDirective<\n T extends Record<string, any> = Record<string, any>,\n >\n implements OnInit, OnChanges, OnDestroy\n{\n private isRegistered = false;\n\n constructor(\n @Inject(CopilotKitService) private readonly copilotkit: CopilotKitService\n ) {}\n\n @Input() name!: string;\n @Input() description?: string;\n @Input() parameters?: z.ZodSchema<T>;\n @Input() handler?: (args: T) => Promise<any>;\n @Input() render?: Type<any> | TemplateRef<any>;\n @Input() followUp?: boolean;\n\n // Alternative: Accept a full tool object\n @Input(\"copilotkitFrontendTool\") tool?: AngularFrontendTool<T>;\n\n ngOnInit(): void {\n this.registerTool();\n }\n\n ngOnChanges(_changes: SimpleChanges): void {\n if (this.isRegistered) {\n // Re-register the tool if any properties change\n this.unregisterTool();\n this.registerTool();\n }\n }\n\n ngOnDestroy(): void {\n this.unregisterTool();\n }\n\n private registerTool(): void {\n const tool = this.getTool();\n\n if (!tool.name) {\n if (isDevMode()) {\n console.warn(\n 'CopilotKitFrontendToolDirective: \"name\" is required. ' +\n 'Please provide a name via [name]=\"toolName\" or ' +\n \"[copilotkitFrontendTool]=\\\"{ name: 'toolName', ... }\\\"\"\n );\n }\n return; // Don't register if no name\n }\n\n // Register the tool with CopilotKit\n this.copilotkit.copilotkit.addTool(tool);\n\n // Register the render if provided\n if (tool.render) {\n const currentRenders = this.copilotkit.currentRenderToolCalls();\n const renderEntry: AngularToolCallRender = {\n name: tool.name,\n render: tool.render,\n };\n\n // Check for duplicate\n const existingIndex = currentRenders.findIndex((r: ToolCallRender) => r.name === tool.name);\n if (existingIndex !== -1) {\n if (isDevMode()) {\n console.warn(\n `[CopilotKit] Tool \"${tool.name}\" already has a render. ` +\n `The previous render will be replaced. ` +\n `This may indicate a duplicate tool registration.`\n );\n }\n const updated = [...currentRenders];\n updated[existingIndex] = renderEntry;\n this.copilotkit.setCurrentRenderToolCalls(updated);\n } else {\n this.copilotkit.setCurrentRenderToolCalls([...currentRenders, renderEntry]);\n }\n }\n\n this.isRegistered = true;\n }\n\n private unregisterTool(): void {\n if (!this.isRegistered) return;\n\n const tool = this.getTool();\n\n if (tool.name) {\n // Remove the tool\n this.copilotkit.copilotkit.removeTool(tool.name);\n\n // Remove the render if it exists\n const currentRenders = this.copilotkit.currentRenderToolCalls();\n const filtered = currentRenders.filter((r: ToolCallRender) => r.name !== tool.name);\n if (filtered.length !== currentRenders.length) {\n this.copilotkit.setCurrentRenderToolCalls(filtered);\n }\n }\n\n this.isRegistered = false;\n }\n\n private getTool(): AngularFrontendTool<T> {\n // If full tool object is provided, use it\n if (this.tool) {\n return this.tool;\n }\n\n // Otherwise, construct from individual inputs\n return {\n name: this.name,\n description: this.description,\n parameters: this.parameters,\n handler: this.handler,\n render: this.render,\n followUp: this.followUp,\n };\n }\n}\n","import {\n Directive,\n Input,\n Output,\n EventEmitter,\n OnInit,\n OnChanges,\n OnDestroy,\n SimpleChanges,\n signal,\n Inject,\n} from \"@angular/core\";\nimport { toObservable } from \"@angular/core/rxjs-interop\";\nimport { Observable } from \"rxjs\";\nimport { CopilotKitService } from \"../core/copilotkit.service\";\nimport { AbstractAgent } from \"@ag-ui/client\";\nimport { DEFAULT_AGENT_ID } from \"@copilotkitnext/shared\";\nimport { CopilotKitCoreRuntimeConnectionStatus } from \"@copilotkitnext/core\";\n\n/**\n * Directive to watch and interact with CopilotKit agents.\n * Provides reactive outputs for agent state changes.\n *\n * @example\n * ```html\n * <!-- Basic usage with default agent -->\n * <div copilotkitAgent\n * (agentChange)=\"onAgentChange($event)\"\n * (runningChange)=\"isProcessing = $event\">\n * Content here\n * </div>\n *\n * <!-- With specific agent ID -->\n * <div copilotkitAgent\n * [agentId]=\"'my-agent-id'\"\n * (agentChange)=\"currentAgent = $event\"\n * (runningChange)=\"onRunningStateChange($event)\"\n * (messagesChange)=\"onMessagesUpdate($event)\"\n * (stateChange)=\"onStateUpdate($event)\">\n * Content here\n * </div>\n *\n * <!-- Two-way binding for running state -->\n * <div copilotkitAgent\n * [(running)]=\"isAgentRunning\">\n * <span *ngIf=\"isAgentRunning\">Processing...</span>\n * </div>\n * ```\n */\n@Directive({\n selector: \"[copilotkitAgent]\",\n standalone: true,\n})\nexport class CopilotKitAgentDirective implements OnInit, OnChanges, OnDestroy {\n private agent?: AbstractAgent;\n private agentSubscription?: { unsubscribe: () => void };\n private coreUnsubscribe?: () => void; // subscribe returns function directly\n private _isRunning = false;\n private runningSignal = signal<boolean>(false);\n private agentSignal = signal<AbstractAgent | undefined>(undefined);\n\n constructor(\n @Inject(CopilotKitService) private readonly copilotkit: CopilotKitService\n ) {}\n\n /**\n * The ID of the agent to watch.\n * If not provided, uses the default agent ID.\n */\n @Input() agentId?: string;\n\n /**\n * Alternative input using the directive selector.\n * Allows: [copilotkitAgent]=\"'agent-id'\"\n */\n @Input(\"copilotkitAgent\")\n set directiveAgentId(value: string | undefined) {\n this.agentId = value || undefined;\n }\n\n /**\n * Emits when the agent instance changes.\n */\n @Output() agentChange = new EventEmitter<AbstractAgent | undefined>();\n\n /**\n * Emits when the running state changes.\n */\n @Output() runningChange = new EventEmitter<boolean>();\n\n /**\n * Observable of the running state.\n */\n get running$(): Observable<boolean> {\n return toObservable(this.runningSignal);\n }\n\n /**\n * Observable of the agent instance.\n */\n get agent$(): Observable<AbstractAgent | undefined> {\n return toObservable(this.agentSignal);\n }\n\n /**\n * Two-way binding for running state.\n */\n @Input()\n get running(): boolean {\n return this._isRunning;\n }\n set running(value: boolean) {\n // Input setter for two-way binding (though typically read-only from agent)\n this._isRunning = value;\n }\n\n /**\n * Emits when agent messages change.\n */\n @Output() messagesChange = new EventEmitter<any>();\n\n /**\n * Emits when agent state changes.\n */\n @Output() stateChange = new EventEmitter<any>();\n\n /**\n * Emits when a run is initialized.\n */\n @Output() runInitialized = new EventEmitter<any>();\n\n /**\n * Emits when a run is finalized.\n */\n @Output() runFinalized = new EventEmitter<any>();\n\n /**\n * Emits when a run fails.\n */\n @Output() runFailed = new EventEmitter<any>();\n\n ngOnInit(): void {\n this.setupAgent();\n this.subscribeToCore();\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes[\"agentId\"] && !changes[\"agentId\"].firstChange) {\n // Agent ID changed, re-setup\n this.cleanupAgentSubscription();\n this.setupAgent();\n }\n }\n\n ngOnDestroy(): void {\n this.cleanupAgentSubscription();\n this.cleanupCoreSubscription();\n }\n\n private setupAgent(): void {\n const effectiveAgentId = this.agentId ?? DEFAULT_AGENT_ID;\n this.agent = this.copilotkit.getAgent(effectiveAgentId);\n\n // Update signals\n this.agentSignal.set(this.agent);\n\n // Emit initial agent\n this.agentChange.emit(this.agent);\n\n // Subscribe to agent events\n this.subscribeToAgent();\n }\n\n private subscribeToAgent(): void {\n this.cleanupAgentSubscription();\n\n if (this.agent) {\n this.agentSubscription = this.agent.subscribe({\n onMessagesChanged: (params) => {\n this.messagesChange.emit(params);\n },\n onStateChanged: (params) => {\n this.stateChange.emit(params);\n },\n onRunInitialized: (params) => {\n this._isRunning = true;\n this.runningSignal.set(true);\n this.runningChange.emit(true);\n this.runInitialized.emit(params);\n },\n onRunFinalized: (params) => {\n this._isRunning = false;\n this.runningSignal.set(false);\n this.runningChange.emit(false);\n this.runFinalized.emit(params);\n },\n onRunFailed: (params) => {\n this._isRunning = false;\n this.runningSignal.set(false);\n this.runningChange.emit(false);\n this.runFailed.emit(params);\n },\n });\n }\n }\n\n private subscribeToCore(): void {\n // Subscribe to CopilotKit changes to detect agent updates\n this.coreUnsubscribe = this.copilotkit.copilotkit.subscribe({\n onRuntimeConnectionStatusChanged: ({ status }) => {\n if (\n status === CopilotKitCoreRuntimeConnectionStatus.Connected ||\n status === CopilotKitCoreRuntimeConnectionStatus.Disconnected\n ) {\n // Re-check agent when runtime connection changes state\n this.setupAgent();\n }\n },\n });\n }\n\n private cleanupAgentSubscription(): void {\n this.agentSubscription?.unsubscribe();\n this.agentSubscription = undefined;\n }\n\n private cleanupCoreSubscription(): void {\n this.coreUnsubscribe?.();\n this.coreUnsubscribe = undefined;\n }\n}\n","import {\n Directive,\n Input,\n Output,\n EventEmitter,\n OnInit,\n OnChanges,\n OnDestroy,\n SimpleChanges,\n TemplateRef,\n Type,\n signal,\n isDevMode,\n Inject,\n} from \"@angular/core\";\nimport { CopilotKitService } from \"../core/copilotkit.service\";\nimport type {\n AngularHumanInTheLoop,\n HumanInTheLoopProps,\n AngularFrontendTool,\n} from \"../core/copilotkit.types\";\nimport { ToolCallStatus } from \"../core/copilotkit.types\";\nimport * as z from \"zod\";\n\n/**\n * Directive for declaratively creating human-in-the-loop tools.\n * Provides reactive outputs for status changes and response events.\n *\n * @example\n * ```html\n * <!-- Basic usage -->\n * <div copilotkitHumanInTheLoop\n * [name]=\"'requireApproval'\"\n * [description]=\"'Requires user approval'\"\n * [args]=\"argsSchema\"\n * [render]=\"approvalComponent\"\n * (statusChange)=\"onStatusChange($event)\"\n * (responseProvided)=\"onResponse($event)\">\n * </div>\n *\n * <!-- With template -->\n * <div copilotkitHumanInTheLoop\n * [name]=\"'requireApproval'\"\n * [description]=\"'Requires user approval'\"\n * [args]=\"argsSchema\"\n * [render]=\"approvalTemplate\"\n * [(status)]=\"approvalStatus\">\n * </div>\n *\n * <ng-template #approvalTemplate let-props>\n * <div *ngIf=\"props.status === 'executing'\">\n * <p>{{ props.args.action }}</p>\n * <button (click)=\"props.respond('approved')\">Approve</button>\n * <button (click)=\"props.respond('rejected')\">Reject</button>\n * </div>\n * </ng-template>\n * ```\n */\n@Directive({\n selector: \"[copilotkitHumanInTheLoop]\",\n standalone: true,\n})\nexport class CopilotKitHumanInTheLoopDirective<\n T extends Record<string, any> = Record<string, any>,\n >\n implements OnInit, OnChanges, OnDestroy\n{\n private toolId?: string;\n private statusSignal = signal<ToolCallStatus>(ToolCallStatus.InProgress);\n private resolvePromise: ((result: unknown) => void) | null = null;\n private _status: ToolCallStatus = ToolCallStatus.InProgress;\n\n constructor(\n @Inject(CopilotKitService) private readonly copilotkit: CopilotKitService\n ) {}\n\n /**\n * The name of the human-in-the-loop tool.\n */\n @Input() name!: string;\n\n /**\n * Description of what the tool does.\n */\n @Input() description!: string;\n\n /**\n * Zod schema for the tool parameters.\n */\n @Input() parameters!: z.ZodSchema<T>;\n\n /**\n * Component class or template to render for user interaction.\n */\n @Input() render!: Type<any> | TemplateRef<HumanInTheLoopProps<T>>;\n\n /**\n * Whether the tool should be registered (default: true).\n */\n @Input() enabled = true;\n\n /**\n * Alternative input using the directive selector.\n * Allows: [copilotkitHumanInTheLoop]=\"config\"\n */\n @Input(\"copilotkitHumanInTheLoop\")\n set config(value: Partial<AngularHumanInTheLoop<T>> | undefined) {\n if (value) {\n if (value.name) this.name = value.name;\n if (value.description) this.description = value.description;\n if (\"parameters\" in value && value.parameters)\n this.parameters = value.parameters as z.ZodSchema<T>;\n if (\"render\" in value && value.render) this.render = value.render;\n }\n }\n\n /**\n * Emits when the status changes.\n */\n @Output() statusChange = new EventEmitter<ToolCallStatus>();\n\n /**\n * Two-way binding for status.\n */\n @Input()\n get status(): ToolCallStatus {\n return this._status;\n }\n set status(value: ToolCallStatus) {\n // Input setter for two-way binding (though typically read-only)\n this._status = value;\n }\n\n /**\n * Emits when a response is provided by the user.\n */\n @Output() responseProvided = new EventEmitter<unknown>();\n\n /**\n * Emits when the tool execution starts.\n */\n @Output() executionStarted = new EventEmitter<any>();\n\n /**\n * Emits when the tool execution completes.\n */\n @Output() executionCompleted = new EventEmitter<unknown>();\n\n ngOnInit(): void {\n if (this.enabled) {\n this.registerTool();\n }\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n const relevantChanges =\n changes[\"name\"] ||\n changes[\"description\"] ||\n changes[\"args\"] ||\n changes[\"render\"] ||\n changes[\"enabled\"];\n\n if (relevantChanges && !relevantChanges.firstChange) {\n // Re-register the tool with new configuration\n this.unregisterTool();\n if (this.enabled) {\n this.registerTool();\n }\n }\n }\n\n ngOnDestroy(): void {\n this.unregisterTool();\n }\n\n /**\n * Programmatically trigger a response.\n * Useful when the directive is used as a controller.\n */\n respond(result: unknown): void {\n this.handleResponse(result);\n }\n\n private registerTool(): void {\n if (!this.name || !this.description || !this.parameters || !this.render) {\n if (isDevMode()) {\n throw new Error(\n \"CopilotKitHumanInTheLoopDirective: Missing required inputs. \" +\n \"Required: name, description, parameters, and render.\"\n );\n }\n return;\n }\n\n // Create handler that returns a Promise\n const handler = async (args: T): Promise<unknown> => {\n return new Promise((resolve) => {\n this.updateStatus(ToolCallStatus.Executing);\n this.resolvePromise = resolve;\n this.executionStarted.emit(args);\n });\n };\n\n // Create the frontend tool with enhanced render\n const frontendTool: AngularFrontendTool<T> = {\n name: this.name,\n description: this.description,\n parameters: this.parameters,\n handler,\n render: this.render, // Will be enhanced by the render component\n };\n\n // Add the tool (returns void, so we use the tool name as ID)\n this.copilotkit.copilotkit.addTool(frontendTool);\n this.toolId = this.name;\n\n // Register the render with respond capability\n this.copilotkit.registerToolRender(this.name, {\n name: this.name,\n render: this.createEnhancedRender(),\n });\n }\n\n private unregisterTool(): void {\n if (this.toolId) {\n this.copilotkit.copilotkit.removeTool(this.toolId);\n this.copilotkit.unregisterToolRender(this.name);\n this.toolId = undefined;\n }\n }\n\n private createEnhancedRender(): Type<any> | TemplateRef<any> {\n // If it's a template, we need to wrap it with our respond function\n // This is handled by returning a special marker that the render component\n // will recognize and enhance with the respond function\n\n // Store reference to this directive instance for the render component\n (this.render as any).__humanInTheLoopDirective = this;\n (this.render as any).__humanInTheLoopStatus = this.statusSignal;\n\n return this.render;\n }\n\n private handleResponse(result: unknown): void {\n if (this.resolvePromise) {\n this.resolvePromise(result);\n this.updateStatus(ToolCallStatus.Complete);\n this.resolvePromise = null;\n this.responseProvided.emit(result);\n this.executionCompleted.emit(result);\n }\n }\n\n private updateStatus(status: ToolCallStatus): void {\n this._status = status;\n this.statusSignal.set(status);\n this.statusChange.emit(status);\n }\n}\n\n/**\n * Helper directive to provide respond function in templates.\n * This would be used internally by the tool render component.\n *\n * @internal\n */\n@Directive({\n selector: \"[copilotkitHumanInTheLoopRespond]\",\n standalone: true,\n})\nexport class CopilotKitHumanInTheLoopRespondDirective {\n @Input() copilotkitHumanInTheLoopRespond?: (result: unknown) => Promise<void>;\n\n /**\n * Convenience method for templates to call respond.\n */\n respond(result: unknown): void {\n this.copilotkitHumanInTheLoopRespond?.(result);\n }\n}\n","import {\n Directive,\n Input,\n Output,\n EventEmitter,\n OnInit,\n OnChanges,\n OnDestroy,\n SimpleChanges,\n Optional,\n isDevMode,\n Inject,\n} from \"@angular/core\";\nimport { CopilotChatConfigurationService } from \"../core/chat-configuration/chat-configuration.service\";\nimport {\n CopilotChatConfiguration,\n CopilotChatLabels,\n} from \"../core/chat-configuration/chat-configuration.types\";\n\n/**\n * Directive for configuring CopilotKit chat settings declaratively in templates.\n * Works with the CopilotChatConfigurationService to provide reactive chat configuration.\n *\n * @example\n * ```html\n * <!-- Basic usage with individual inputs -->\n * <div copilotkitChatConfig\n * [labels]=\"customLabels\"\n * [inputValue]=\"currentInput\"\n * (submitInput)=\"onSubmit($event)\"\n * (changeInput)=\"onChange($event)\">\n * <!-- Chat UI components -->\n * </div>\n *\n * <!-- Using configuration object -->\n * <div [copilotkitChatConfig]=\"chatConfig\">\n * <!-- Chat UI components -->\n * </div>\n *\n * <!-- Two-way binding for input value -->\n * <div copilotkitChatConfig\n * [(value)]=\"chatInput\"\n * (submitInput)=\"handleSubmit($event)\">\n * <!-- Chat UI components -->\n * </div>\n * ```\n */\n@Directive({\n selector: \"[copilotkitChatConfig]\",\n standalone: true,\n})\nexport class CopilotKitChatConfigDirective\n implements OnInit, OnChanges, OnDestroy\n{\n private _value?: string;\n private submitHandler?: (value: string) => void;\n private changeHandler?: (value: string) => void;\n\n constructor(\n @Optional()\n @Inject(CopilotChatConfigurationService)\n private readonly chatConfig: CopilotChatConfigurationService | null\n ) {}\n\n /**\n * Partial labels to override defaults\n */\n @Input() labels?: Partial<CopilotChatLabels>;\n\n /**\n * The current input value\n */\n @Input() inputValue?: string;\n\n /**\n * Event emitted when input is submitted\n */\n @Output() submitInput = new EventEmitter<string>();\n\n /**\n * Event emitted when input value changes\n */\n @Output() changeInput = new EventEmitter<string>();\n\n /**\n * Alternative: accept full configuration object\n */\n @Input(\"copilotkitChatConfig\")\n set config(value: CopilotChatConfiguration | undefined) {\n if (value) {\n if (value.labels) this.labels = value.labels;\n if (value.inputValue !== undefined) this.inputValue = value.inputValue;\n // Store handlers for later setup\n if (value.onSubmitInput) this.submitHandler = value.onSubmitInput;\n if (value.onChangeInput) this.changeHandler = value.onChangeInput;\n }\n }\n\n /**\n * Two-way binding for input value\n */\n @Input()\n get value(): string | undefined {\n return this._value;\n }\n set value(v: string | undefined) {\n this._value = v;\n this.valueChange.emit(v);\n if (v !== undefined) {\n this.updateInputValue(v);\n }\n }\n\n /**\n * Two-way binding output for value\n */\n @Output() valueChange = new EventEmitter<string | undefined>();\n\n ngOnInit(): void {\n if (!this.chatConfig) {\n if (isDevMode()) {\n console.warn(\n \"CopilotKitChatConfigDirective: No CopilotChatConfigurationService found. \" +\n \"Make sure to provide it using provideCopilotChatConfiguration().\"\n );\n }\n return;\n }\n\n this.updateConfiguration();\n this.setupHandlers();\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (!this.chatConfig) {\n return;\n }\n\n const relevantChanges =\n changes[\"labels\"] || changes[\"inputValue\"] || changes[\"value\"];\n\n if (relevantChanges && !relevantChanges.firstChange) {\n this.updateConfiguration();\n }\n }\n\n ngOnDestroy(): void {\n // Cleanup if needed\n }\n\n /**\n * Submit the current input value\n */\n submit(value: string): void {\n // Emit to template binding\n this.submitInput.emit(value);\n\n // Call service handler\n if (this.chatConfig) {\n this.chatConfig.submitInput(value);\n }\n\n // Call provided handler\n if (this.submitHandler) {\n this.submitHandler(value);\n }\n }\n\n /**\n * Handle input value change\n */\n change(value: string): void {\n // Update internal value\n this._value = value;\n\n // Emit to template bindings\n this.changeInput.emit(value);\n this.valueChange.emit(value);\n\n // Call service handler\n if (this.chatConfig) {\n this.chatConfig.changeInput(value);\n }\n\n // Call provided handler\n if (this.changeHandler) {\n this.changeHandler(value);\n }\n }\n\n private updateConfiguration(): void {\n if (!this.chatConfig) {\n return;\n }\n\n // Update labels if provided\n if (this.labels) {\n this.chatConfig.setLabels(this.labels);\n }\n\n // Update input value if provided\n const valueToSet =\n this._value !== undefined ? this._value : this.inputValue;\n if (valueToSet !== undefined) {\n this.chatConfig.setInputValue(valueToSet);\n }\n }\n\n private updateInputValue(value: string): void {\n if (this.chatConfig) {\n this.chatConfig.setInputValue(value);\n this.chatConfig.changeInput(value);\n }\n }\n\n private setupHandlers(): void {\n if (!this.chatConfig) {\n return;\n }\n\n // Create composite handlers that call both service and directive handlers\n const submitComposite = (value: string) => {\n this.submitInput.emit(value);\n if (this.submitHandler) {\n this.submitHandler(value);\n }\n };\n\n const changeComposite = (value: string) => {\n this.changeInput.emit(value);\n this.valueChange.emit(value);\n if (this.changeHandler) {\n this.changeHandler(value);\n }\n };\n\n // Set handlers on the service\n this.chatConfig.setSubmitHandler(submitComposite);\n this.chatConfig.setChangeHandler(changeComposite);\n }\n}\n","import {\n Component,\n Input,\n ViewContainerRef,\n TemplateRef,\n Type,\n OnChanges,\n SimpleChanges,\n ComponentRef,\n inject,\n ViewChild,\n AfterViewInit,\n} from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\nimport { CopilotKitService } from \"../core/copilotkit.service\";\nimport type {\n ToolCallProps,\n AngularToolCallRender,\n} from \"../core/copilotkit.types\";\nimport { ToolCallStatus } from \"../core/copilotkit.types\";\n\n@Component({\n selector: \"copilotkit-tool-render\",\n standalone: true,\n imports: [CommonModule],\n template: `\n <ng-container #dynamicContainer></ng-container>\n <ng-container *ngIf=\"templateRef && templateContext\">\n <ng-container\n *ngTemplateOutlet=\"templateRef; context: templateContext\"\n ></ng-container>\n </ng-container>\n `,\n})\nexport class CopilotKitToolRenderComponent implements OnChanges, AfterViewInit {\n @Input() toolName!: string;\n @Input() args: any;\n @Input() status: ToolCallStatus = ToolCallStatus.InProgress;\n @Input() result?: any;\n @Input() description?: string;\n\n @ViewChild(\"dynamicContainer\", { read: ViewContainerRef, static: true })\n private container!: ViewContainerRef;\n\n private copilotkit = inject(CopilotKitService);\n private componentRef?: ComponentRef<any>;\n\n templateRef?: TemplateRef<any>;\n templateContext?: any;\n\n ngAfterViewInit(): void {\n this.renderTool();\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (\n changes[\"toolName\"] ||\n changes[\"args\"] ||\n changes[\"status\"] ||\n changes[\"result\"]\n ) {\n this.renderTool();\n }\n }\n\n private renderTool(): void {\n // Clear existing component\n if (this.componentRef) {\n this.componentRef.destroy();\n this.componentRef = undefined;\n }\n\n // Clear template\n this.templateRef = undefined;\n this.templateContext = undefined;\n\n if (!this.toolName) {\n return;\n }\n\n // Get the tool render configuration\n const toolRender = this.copilotkit.getToolRender(this.toolName) as\n | AngularToolCallRender\n | undefined;\n\n if (!toolRender) {\n console.warn(`No render found for tool: ${this.toolName}`);\n return;\n }\n\n // Prepare props to pass to the component\n const props: ToolCallProps<any> = {\n name: this.toolName,\n description: this.description || \"\",\n args: this.args,\n status: this.status,\n result: this.result,\n };\n\n // Check if render is a Component class or TemplateRef\n if (this.isComponentClass(toolRender.render)) {\n // Create component dynamically\n this.renderComponent(toolRender.render, props);\n } else if (this.isTemplateRef(toolRender.render)) {\n // Use template\n this.renderTemplate(toolRender.render, props);\n } else {\n console.error(`Invalid render type for tool: ${this.toolName}`);\n }\n }\n\n private renderComponent(\n componentClass: Type<any>,\n props: ToolCallProps\n ): void {\n // Clear the container\n this.container.clear();\n\n // Create the component\n this.componentRef = this.container.createComponent(componentClass);\n\n // Determine declared inputs to avoid NG0303 logs\n const cmpDef: any = (componentClass as any).ɵcmp;\n const declaredInputs = new Set<string>(Object.keys(cmpDef?.inputs ?? {}));\n\n if (declaredInputs.has('props')) {\n this.componentRef.setInput('props', props);\n } else {\n for (const [key, value] of Object.entries(props)) {\n if (declaredInputs.has(key)) {\n this.componentRef.setInput(key, value);\n }\n }\n }\n\n // Trigger change detection\n this.componentRef.changeDetectorRef.detectChanges();\n }\n\n private renderTemplate(\n template: TemplateRef<any>,\n props: ToolCallProps\n ): void {\n this.templateRef = template;\n this.templateContext = {\n $implicit: props,\n name: props.name,\n description: props.description,\n args: props.args,\n status: props.status,\n result: props.result,\n };\n }\n\n private isComponentClass(value: any): value is Type<any> {\n return typeof value === \"function\" && value.prototype;\n }\n\n private isTemplateRef(value: any): value is TemplateRef<any> {\n return value instanceof TemplateRef;\n }\n\n ngOnDestroy(): void {\n if (this.componentRef) {\n this.componentRef.destroy();\n }\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 { Type, TemplateRef, 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> = \n | Type<T>\n | TemplateRef<T>;\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?: any;\n outputs?: Record<string, (event: any) => void>;\n}\n\n/**\n * Injection token for slot configuration\n */\nexport const SLOT_CONFIG = new InjectionToken<ReadonlyMap<string, SlotRegistryEntry>>('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;","import { \n Type, \n TemplateRef, \n ViewContainerRef,\n ComponentRef,\n EmbeddedViewRef,\n Injector,\n inject\n} from '@angular/core';\nimport { SlotValue, RenderSlotOptions, SlotRegistryEntry, SLOT_CONFIG } from './slot.types';\n\n/**\n * Renders a slot value into a ViewContainerRef.\n * This is the core utility for slot rendering.\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> | null {\n const { slot, defaultComponent, props, injector, outputs } = options;\n \n viewContainer.clear();\n \n const effectiveSlot = slot ?? defaultComponent;\n const effectiveInjector = injector ?? viewContainer.injector;\n \n if (effectiveSlot instanceof TemplateRef) {\n // TemplateRef: render template\n return viewContainer.createEmbeddedView(effectiveSlot, {\n $implicit: props ?? {},\n props: props ?? {}\n } as any);\n } else if (isComponentType(effectiveSlot)) {\n // Component type - wrap in try/catch for safety\n try {\n return createComponent(\n viewContainer,\n effectiveSlot as Type<T>,\n props,\n effectiveInjector,\n outputs\n );\n } catch (error) {\n console.warn('Failed to create component:', effectiveSlot, error);\n // Fall through to default component\n }\n }\n \n // Default: render default component if provided\n return defaultComponent ? createComponent(\n viewContainer,\n defaultComponent,\n props,\n effectiveInjector,\n outputs\n ) : null;\n}\n\n/**\n * Creates a component and applies properties.\n */\nfunction createComponent<T>(\n viewContainer: ViewContainerRef,\n component: Type<T>,\n props?: Partial<T>,\n injector?: Injector,\n outputs?: Record<string, (event: any) => void>\n): ComponentRef<T> {\n const componentRef = viewContainer.createComponent(component, {\n injector\n });\n \n if (props) {\n // Apply props using setInput, but only for declared inputs\n const cmpDef: any = (component as any).ɵcmp;\n const declaredInputs = new Set<string>(Object.keys(cmpDef?.inputs ?? {}));\n\n if (declaredInputs.has('props')) {\n componentRef.setInput('props', props as any);\n } else {\n for (const key in props) {\n if (declaredInputs.has(key)) {\n const value = (props as any)[key];\n componentRef.setInput(key, value);\n }\n }\n }\n }\n \n if (outputs) {\n // Wire up output event handlers with proper cleanup\n const instance = componentRef.instance as any;\n const subscriptions: any[] = [];\n \n for (const [eventName, handler] of Object.entries(outputs)) {\n if (instance[eventName]?.subscribe) {\n const subscription = instance[eventName].subscribe(handler);\n subscriptions.push(subscription);\n }\n }\n \n // Register cleanup on component destroy\n componentRef.onDestroy(() => {\n subscriptions.forEach(sub => sub.unsubscribe());\n });\n }\n \n // Trigger change detection\n componentRef.changeDetectorRef.detectChanges();\n \n return componentRef;\n}\n\n\n/**\n * Checks if a value is a component type.\n * Simplified check - rely on try/catch for actual validation.\n */\nexport function isComponentType(value: any): boolean {\n // Arrow functions and regular functions without a prototype are not components\n return typeof value === 'function' && !!value.prototype;\n}\n\n/**\n * Checks if a value is a valid slot value.\n */\nexport function isSlotValue(value: any): 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?: Record<string, (event: any) => void>\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 {\n Component,\n Input,\n TemplateRef,\n ViewContainerRef,\n OnInit,\n OnChanges,\n SimpleChanges,\n Inject,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n ViewChild\n} from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { renderSlot } from './slot.utils';\nimport { Type } from '@angular/core';\n\n/**\n * @internal - This component is for internal use only.\n * Simple slot component for rendering custom content or defaults.\n * Supports templates and components only.\n * \n * @example\n * ```html\n * <!-- With template -->\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 standalone: true,\n imports: [CommonModule],\n template: `\n <!-- If slot template provided, render it -->\n <ng-container *ngIf=\"slot && isTemplate(slot)\"\n [ngTemplateOutlet]=\"slot\"\n [ngTemplateOutletContext]=\"context || {}\">\n </ng-container>\n \n <!-- If not a template, we'll handle in code -->\n <ng-container #slotContainer></ng-container>\n \n <!-- Default content (only shown if no slot) -->\n <ng-content *ngIf=\"!slot && !defaultComponent\"></ng-content>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class CopilotSlotComponent implements OnInit, OnChanges {\n @Input() slot?: TemplateRef<any> | Type<any>;\n @Input() context?: any;\n @Input() defaultComponent?: Type<any>;\n @Input() outputs?: Record<string, (event: any) => void>;\n \n @ViewChild('slotContainer', { read: ViewContainerRef, static: true }) \n private slotContainer!: ViewContainerRef;\n \n private componentRef?: any;\n \n constructor(\n @Inject(ViewContainerRef) private viewContainer: ViewContainerRef,\n private cdr: ChangeDetectorRef\n ) {}\n \n ngOnInit(): void {\n this.renderSlot();\n }\n \n ngOnChanges(changes: SimpleChanges): void {\n if (changes['slot']) {\n // Slot changed, need to re-render completely\n this.renderSlot();\n } else if (changes['context'] && this.componentRef) {\n // Just context changed, update existing component\n this.updateComponentProps();\n this.cdr.detectChanges();\n } else if (changes['context']) {\n // No component ref yet, render the slot\n this.renderSlot();\n }\n }\n \n isTemplate(value: any): value is TemplateRef<any> {\n return value instanceof TemplateRef;\n }\n \n private renderSlot(): void {\n // Skip if it's a template (handled by ngTemplateOutlet)\n if (this.slot && this.isTemplate(this.slot)) {\n this.componentRef = null;\n return;\n }\n \n // Clear previous content\n this.slotContainer.clear();\n this.componentRef = null;\n \n // Skip if no slot and no default component\n if (!this.slot && !this.defaultComponent) {\n return;\n }\n \n // Use the utility to render other slot types\n if (this.slot || this.defaultComponent) {\n this.componentRef = renderSlot(this.slotContainer, {\n slot: this.slot,\n defaultComponent: this.defaultComponent!,\n props: this.context,\n outputs: this.outputs\n });\n }\n }\n \n private updateComponentProps(): void {\n if (!this.componentRef || !this.componentRef.instance) {\n return;\n }\n \n const props = this.context;\n \n // Update props using setInput, only for declared inputs\n if (props) {\n const ctor = this.componentRef.instance.constructor as any;\n const cmpDef: any = ctor?.ɵcmp;\n const declaredInputs = new Set<string>(Object.keys(cmpDef?.inputs ?? {}));\n\n if (declaredInputs.has('props')) {\n this.componentRef.setInput('props', props);\n } else {\n for (const key in props) {\n if (declaredInputs.has(key)) {\n const value = props[key];\n this.componentRef.setInput(key, value);\n }\n }\n }\n }\n \n // Trigger change detection\n if (this.componentRef.changeDetectorRef) {\n this.componentRef.changeDetectorRef.detectChanges();\n }\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}","import {\n Component,\n Input,\n Output,\n EventEmitter,\n ElementRef,\n AfterViewInit,\n OnChanges,\n SimpleChanges,\n signal,\n computed,\n effect,\n inject,\n ChangeDetectionStrategy,\n ViewEncapsulation\n} from '@angular/core';\nimport { CopilotChatConfigurationService } from '../../core/chat-configuration/chat-configuration.service';\nimport { cn } from '../../lib/utils';\n\n@Component({\n selector: 'textarea[copilotChatTextarea]',\n standalone: true,\n imports: [],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n '[value]': 'value()',\n '[placeholder]': 'placeholder()',\n '[disabled]': 'disabled()',\n '[class]': 'computedClass()',\n '[style.max-height.px]': 'maxHeight()',\n '[style.overflow]': \"'auto'\",\n '[style.resize]': \"'none'\",\n '(input)': 'onInput($event)',\n '(keydown)': 'onKeyDown($event)',\n '[attr.rows]': '1'\n },\n template: '',\n styles: []\n})\nexport class CopilotChatTextareaComponent implements AfterViewInit, OnChanges {\n private elementRef = inject(ElementRef<HTMLTextAreaElement>);\n get textareaRef() { return this.elementRef; }\n \n @Input() set inputValue(val: string | undefined) {\n this.value.set(val || '');\n }\n @Input() set inputPlaceholder(val: string | undefined) {\n this.customPlaceholder.set(val);\n }\n @Input() set inputMaxRows(val: number | undefined) {\n this.maxRows.set(val || 5);\n }\n @Input() set inputAutoFocus(val: boolean | undefined) {\n this.autoFocus.set(val ?? true);\n }\n @Input() set inputDisabled(val: boolean | undefined) {\n this.disabled.set(val || false);\n }\n @Input() set inputClass(val: string | undefined) {\n this.customClass.set(val);\n }\n \n @Output() valueChange = new EventEmitter<string>();\n @Output() keyDown = new EventEmitter<KeyboardEvent>();\n \n private chatConfig = inject(CopilotChatConfigurationService);\n \n // Signals for reactive state\n value = signal<string>('');\n customPlaceholder = signal<string | undefined>(undefined);\n maxRows = signal<number>(5);\n autoFocus = signal<boolean>(true);\n disabled = signal<boolean>(false);\n customClass = signal<string | undefined>(undefined);\n maxHeight = signal<number>(0);\n \n // Computed values\n placeholder = computed(() => {\n return this.customPlaceholder() || this.chatConfig.labels().chatInputPlaceholder;\n });\n \n computedClass = computed(() => {\n const baseClasses = cn(\n // Layout and sizing\n 'w-full p-5 pb-0',\n // Behavior\n 'outline-none resize-none',\n // Background\n 'bg-transparent',\n // Typography\n 'antialiased font-regular leading-relaxed text-[16px]',\n // Placeholder styles\n 'placeholder:text-[#00000077] dark:placeholder:text-[#fffc]'\n );\n return cn(baseClasses, this.customClass());\n });\n \n constructor() {\n // Effect to sync value with chat configuration if available\n effect(\n () => {\n const configValue = this.chatConfig.inputValue();\n if (configValue !== undefined && !this.customPlaceholder()) {\n this.value.set(configValue);\n }\n },\n { allowSignalWrites: true }\n );\n }\n \n ngAfterViewInit(): void {\n this.calculateMaxHeight();\n this.adjustHeight();\n \n if (this.autoFocus()) {\n setTimeout(() => {\n this.elementRef.nativeElement.focus();\n });\n }\n }\n \n ngOnChanges(changes: SimpleChanges): void {\n if (changes['inputMaxRows']) {\n this.calculateMaxHeight();\n }\n }\n \n onInput(event: Event): void {\n const textarea = event.target as HTMLTextAreaElement;\n const newValue = textarea.value;\n \n this.value.set(newValue);\n this.valueChange.emit(newValue);\n \n // Update chat configuration if available\n if (this.chatConfig) {\n this.chatConfig.setInputValue(newValue);\n }\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.maxRows();\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 = 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.value();\n }\n \n /**\n * Public method to set value programmatically\n */\n setValue(value: string): void {\n this.value.set(value);\n this.valueChange.emit(value);\n \n if (this.chatConfig) {\n this.chatConfig.setInputValue(value);\n }\n \n setTimeout(() => this.adjustHeight());\n }\n}\n","import {\n Component,\n Input,\n Output,\n EventEmitter,\n ViewChild,\n ElementRef,\n AfterViewInit,\n OnDestroy,\n signal,\n computed,\n ChangeDetectionStrategy,\n ViewEncapsulation\n} from '@angular/core';\nimport { AudioRecorderState, AudioRecorderError } from './copilot-chat-input.types';\n\n@Component({\n selector: 'copilot-chat-audio-recorder',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `\n <div [class]=\"computedClass()\">\n <canvas\n #canvasRef\n class=\"w-full h-full\"\n [style.imageRendering]=\"'pixelated'\"\n ></canvas>\n </div>\n `,\n styles: [],\n host: {\n '[class.copilot-chat-audio-recorder]': 'true'\n }\n})\nexport class CopilotChatAudioRecorderComponent implements AfterViewInit, OnDestroy {\n @ViewChild('canvasRef', { static: true }) canvasRef!: ElementRef<HTMLCanvasElement>;\n \n @Input() set inputClass(val: string | undefined) {\n this.customClass.set(val);\n }\n \n @Input() set inputShowControls(val: boolean | undefined) {\n this.showControls.set(val ?? false);\n }\n \n @Output() stateChange = new EventEmitter<AudioRecorderState>();\n @Output() error = new EventEmitter<AudioRecorderError>();\n \n // Signals for state management\n state = signal<AudioRecorderState>('idle');\n customClass = signal<string | undefined>(undefined);\n showControls = signal<boolean>(false);\n \n // Computed values\n computedClass = computed(() => {\n const baseClasses = 'h-11 w-full px-5';\n return `${baseClasses} ${this.customClass() || ''}`;\n });\n \n statusText = computed(() => {\n switch (this.state()) {\n case 'recording':\n return 'Recording...';\n case 'processing':\n return 'Processing...';\n default:\n return 'Ready';\n }\n });\n \n // Animation and canvas properties\n private animationFrameId?: number;\n \n ngAfterViewInit(): void {\n this.startAnimation();\n }\n \n ngOnDestroy(): void {\n this.dispose();\n }\n \n /**\n * Start recording audio\n */\n async start(): Promise<void> {\n try {\n if (this.state() === 'recording') {\n return;\n }\n \n this.setState('recording');\n this.startAnimation();\n \n // In a real implementation, this would start actual audio recording\n // For now, we just simulate the recording state\n \n } catch (err) {\n const error = new AudioRecorderError(\n err instanceof Error ? err.message : 'Failed to start recording'\n );\n this.error.emit(error);\n this.setState('idle');\n throw error;\n }\n }\n \n /**\n * Stop recording audio and return blob\n */\n async stop(): Promise<Blob> {\n try {\n this.setState('idle');\n // Return empty blob - stub implementation\n const emptyBlob = new Blob([], { type: 'audio/webm' });\n return emptyBlob;\n } catch (err) {\n const error = new AudioRecorderError(\n err instanceof Error ? err.message : 'Failed to stop recording'\n );\n this.error.emit(error);\n this.setState('idle');\n throw error;\n }\n }\n \n /**\n * Get current recorder state\n */\n getState(): AudioRecorderState {\n return this.state();\n }\n \n /**\n * Dispose of resources\n */\n dispose(): void {\n this.stopAnimation();\n }\n\n private setState(state: AudioRecorderState): void {\n this.state.set(state);\n this.stateChange.emit(state);\n }\n \n private startAnimation(): void {\n const canvas = this.canvasRef.nativeElement;\n if (!canvas) return;\n\n const ctx = canvas.getContext('2d');\n if (!ctx) return;\n\n const draw = () => {\n const rect = canvas.getBoundingClientRect();\n const dpr = window.devicePixelRatio || 1;\n\n // Update canvas dimensions if container resized\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 ctx.imageSmoothingEnabled = false;\n }\n\n // Configuration\n const barWidth = 2;\n const minHeight = 2;\n const maxHeight = 20;\n const gap = 2;\n const numSamples = Math.ceil(rect.width / (barWidth + gap));\n\n // Get loudness data\n const loudnessData = this.getLoudness(numSamples);\n\n // Clear canvas\n ctx.clearRect(0, 0, rect.width, rect.height);\n\n // Get current foreground color\n const computedStyle = getComputedStyle(canvas);\n const currentForeground = computedStyle.color;\n\n // Draw bars\n ctx.fillStyle = currentForeground;\n const centerY = rect.height / 2;\n\n for (let i = 0; i < loudnessData.length; i++) {\n const sample = loudnessData[i] ?? 0;\n const barHeight = Math.round(\n sample * (maxHeight - minHeight) + minHeight\n );\n const x = Math.round(i * (barWidth + gap));\n const y = Math.round(centerY - barHeight / 2);\n\n ctx.fillRect(x, y, barWidth, barHeight);\n }\n\n this.animationFrameId = requestAnimationFrame(draw);\n };\n\n draw();\n }\n \n private stopAnimation(): void {\n if (this.animationFrameId) {\n cancelAnimationFrame(this.animationFrameId);\n this.animationFrameId = undefined;\n }\n }\n\n private getLoudness(n: number): number[] {\n const elapsed = Date.now() / 1000; // Use current timestamp directly\n const samples: number[] = [];\n\n for (let i = 0; i < n; i++) {\n // Create a position that moves from left to right over time\n const position = (i / n) * 10 + elapsed * 0.5; // Scroll speed (slower)\n\n // Generate waveform using multiple sine waves for realism\n const wave1 = Math.sin(position * 2) * 0.3;\n const wave2 = Math.sin(position * 5 + elapsed) * 0.2;\n const wave3 = Math.sin(position * 0.5 + elapsed * 0.3) * 0.4;\n\n // Add some randomness for natural variation\n const noise = (Math.random() - 0.5) * 0.1;\n\n // Combine waves and add envelope for realistic amplitude variation\n const envelope = Math.sin(elapsed * 0.7) * 0.5 + 0.5; // Slow amplitude modulation\n let amplitude = (wave1 + wave2 + wave3 + noise) * envelope;\n\n // Clamp to 0-1 range\n amplitude = Math.max(0, Math.min(1, amplitude * 0.5 + 0.3));\n\n samples.push(amplitude);\n }\n\n return samples;\n }\n}","import {\n Component,\n Input,\n Output,\n EventEmitter,\n ChangeDetectionStrategy,\n inject,\n signal,\n computed,\n ViewEncapsulation\n} from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { \n LucideAngularModule,\n ArrowUp,\n Mic,\n X,\n Check,\n Plus\n} from 'lucide-angular';\nimport { CopilotChatConfigurationService } from '../../core/chat-configuration/chat-configuration.service';\nimport { CopilotTooltipDirective } from '../../lib/directives/tooltip.directive';\nimport { cn } from '../../lib/utils';\n\n// Base button classes matching React's button variants\nconst buttonBase = cn(\n 'inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium',\n 'transition-all disabled:pointer-events-none disabled:opacity-50',\n 'shrink-0 outline-none',\n 'focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]'\n);\n\nconst chatInputToolbarPrimary = cn(\n 'cursor-pointer',\n // Background and text\n 'bg-black text-white',\n // Dark mode\n 'dark:bg-white dark:text-black dark:focus-visible:outline-white',\n // Shape and sizing\n 'rounded-full h-9 w-9',\n // Interactions\n 'transition-colors',\n // Focus states\n 'focus:outline-none',\n // Hover states\n 'hover:opacity-70 disabled:hover:opacity-100',\n // Disabled states\n 'disabled:cursor-not-allowed disabled:bg-[#00000014] disabled:text-[rgb(13,13,13)]',\n 'dark:disabled:bg-[#454545] dark:disabled:text-white'\n);\n\nconst chatInputToolbarSecondary = cn(\n 'cursor-pointer',\n // Background and text\n 'bg-transparent text-[#444444]',\n // Dark mode\n 'dark:text-white dark:border-[#404040]',\n // Shape and sizing\n 'rounded-full h-9 w-9',\n // Interactions\n 'transition-colors',\n // Focus states\n 'focus:outline-none',\n // Hover states\n 'hover:bg-[#f8f8f8] hover:text-[#333333]',\n 'dark:hover:bg-[#404040] dark:hover:text-[#FFFFFF]',\n // Disabled states\n 'disabled:cursor-not-allowed disabled:opacity-50',\n 'disabled:hover:bg-transparent disabled:hover:text-[#444444]',\n 'dark:disabled:hover:bg-transparent dark:disabled:hover:text-[#CCCCCC]'\n);\n\n@Component({\n selector: 'copilot-chat-send-button',\n standalone: true,\n imports: [CommonModule, LucideAngularModule],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `\n <div class=\"mr-[10px]\">\n <button\n type=\"button\"\n [disabled]=\"disabled\"\n [class]=\"buttonClass\"\n (click)=\"onClick()\"\n >\n <lucide-angular [img]=\"ArrowUpIcon\" [size]=\"18\"></lucide-angular>\n </button>\n </div>\n `,\n styles: [``]\n})\nexport class CopilotChatSendButtonComponent {\n @Input() disabled = false;\n @Output() clicked = new EventEmitter<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 standalone: true,\n imports: [CommonModule, LucideAngularModule, CopilotTooltipDirective],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `\n <button\n type=\"button\"\n [disabled]=\"disabled\"\n [class]=\"buttonClass\"\n [copilotTooltip]=\"label\"\n tooltipPosition=\"below\"\n (click)=\"onClick()\"\n >\n <lucide-angular [img]=\"MicIcon\" [size]=\"18\"></lucide-angular>\n </button>\n `,\n styles: [``]\n})\nexport class CopilotChatStartTranscribeButtonComponent {\n @Input() disabled = false;\n @Output() clicked = new EventEmitter<void>();\n \n private chatConfig = inject(CopilotChatConfigurationService);\n \n readonly MicIcon = Mic;\n buttonClass = cn(buttonBase, chatInputToolbarSecondary, 'mr-2');\n \n get label(): string {\n return this.chatConfig.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 standalone: true,\n imports: [CommonModule, LucideAngularModule, CopilotTooltipDirective],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `\n <button\n type=\"button\"\n [disabled]=\"disabled\"\n [class]=\"buttonClass\"\n [copilotTooltip]=\"label\"\n tooltipPosition=\"below\"\n (click)=\"onClick()\"\n >\n <lucide-angular [img]=\"XIcon\" [size]=\"18\"></lucide-angular>\n </button>\n `,\n styles: [``]\n})\nexport class CopilotChatCancelTranscribeButtonComponent {\n @Input() disabled = false;\n @Output() clicked = new EventEmitter<void>();\n \n private chatConfig = inject(CopilotChatConfigurationService);\n \n readonly XIcon = X;\n buttonClass = cn(buttonBase, chatInputToolbarSecondary, 'mr-2');\n \n get label(): string {\n return this.chatConfig.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 standalone: true,\n imports: [CommonModule, LucideAngularModule, CopilotTooltipDirective],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `\n <button\n type=\"button\"\n [disabled]=\"disabled\"\n [class]=\"buttonClass\"\n [copilotTooltip]=\"label\"\n tooltipPosition=\"below\"\n (click)=\"onClick()\"\n >\n <lucide-angular [img]=\"CheckIcon\" [size]=\"18\"></lucide-angular>\n </button>\n `,\n styles: [``]\n})\nexport class CopilotChatFinishTranscribeButtonComponent {\n @Input() disabled = false;\n @Output() clicked = new EventEmitter<void>();\n \n private chatConfig = inject(CopilotChatConfigurationService);\n \n readonly CheckIcon = Check;\n buttonClass = cn(buttonBase, chatInputToolbarSecondary, 'mr-[10px]');\n \n get label(): string {\n return this.chatConfig.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 standalone: true,\n imports: [CommonModule, LucideAngularModule, CopilotTooltipDirective],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `\n <button\n type=\"button\"\n [disabled]=\"disabled\"\n [class]=\"buttonClass\"\n [copilotTooltip]=\"label\"\n tooltipPosition=\"below\"\n (click)=\"onClick()\"\n >\n <lucide-angular [img]=\"PlusIcon\" [size]=\"20\"></lucide-angular>\n </button>\n `,\n styles: [``]\n})\nexport class CopilotChatAddFileButtonComponent {\n @Input() disabled = false;\n @Output() clicked = new EventEmitter<void>();\n \n private chatConfig = inject(CopilotChatConfigurationService);\n \n readonly PlusIcon = Plus;\n buttonClass = cn(buttonBase, chatInputToolbarSecondary, 'ml-2');\n \n get label(): string {\n return this.chatConfig.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 standalone: true,\n imports: [CommonModule, CopilotTooltipDirective],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `\n <button\n type=\"button\"\n [disabled]=\"disabled()\"\n [class]=\"computedClass()\"\n [copilotTooltip]=\"title()\"\n tooltipPosition=\"below\"\n (click)=\"onClick()\"\n >\n <ng-content></ng-content>\n </button>\n `,\n styles: [``]\n})\nexport class CopilotChatToolbarButtonComponent {\n disabled = signal(false);\n variant = signal<'primary' | 'secondary'>('secondary');\n customClass = signal('');\n title = signal('');\n \n @Output() clicked = new EventEmitter<void>();\n \n computedClass = computed(() => {\n const variantClass = 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 signal,\n computed,\n ChangeDetectionStrategy,\n ViewEncapsulation\n} from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { cn } from '../../lib/utils';\n\n@Component({\n selector: 'div[copilotChatToolbar]',\n standalone: true,\n imports: [CommonModule],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n '[class]': 'computedClass()'\n },\n template: `<ng-content></ng-content>`,\n styles: []\n})\nexport class CopilotChatToolbarComponent {\n @Input() set inputClass(val: string | undefined) {\n this.customClass.set(val);\n }\n \n customClass = signal<string | undefined>(undefined);\n \n computedClass = computed(() => {\n const baseClasses = 'w-full h-[60px] bg-transparent flex items-center justify-between';\n return cn(baseClasses, this.customClass());\n });\n}","import {\n Component,\n Input,\n signal,\n computed,\n inject,\n ChangeDetectionStrategy,\n ViewEncapsulation\n} from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { CdkMenuModule } from '@angular/cdk/menu';\nimport { OverlayModule } from '@angular/cdk/overlay';\nimport { LucideAngularModule, Settings2, ChevronRight } from 'lucide-angular';\nimport { CopilotChatConfigurationService } from '../../core/chat-configuration/chat-configuration.service';\nimport type { ToolsMenuItem } from './copilot-chat-input.types';\nimport { cn } from '../../lib/utils';\n\n@Component({\n selector: 'copilot-chat-tools-menu',\n standalone: true,\n imports: [\n CommonModule,\n CdkMenuModule,\n OverlayModule,\n LucideAngularModule\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `\n @if (hasItems()) {\n <button\n type=\"button\"\n [disabled]=\"disabled()\"\n [class]=\"buttonClass()\"\n [cdkMenuTriggerFor]=\"menu\"\n >\n <lucide-angular [img]=\"Settings2Icon\" [size]=\"18\"></lucide-angular>\n <span class=\"text-sm font-normal\">{{ label() }}</span>\n </button>\n \n <ng-template #menu>\n <div class=\"min-w-[200px] bg-white dark:bg-[#1F1F1F] border border-gray-200 dark:border-gray-700 rounded-lg shadow-lg p-1\"\n cdkMenu>\n @for (item of toolsMenu(); track $index) {\n @if (item === '-') {\n <div class=\"h-px bg-gray-200 dark:bg-gray-700 my-1\"></div>\n } @else if (isMenuItem(item)) {\n @if (item.items && item.items.length > 0) {\n <!-- Submenu trigger -->\n <button\n type=\"button\"\n class=\"w-full px-3 py-2 text-left bg-transparent border-none rounded hover:bg-gray-100 dark:hover:bg-gray-800 cursor-pointer text-sm flex items-center justify-between\"\n [cdkMenuTriggerFor]=\"submenu\"\n cdkMenuItem\n >\n {{ item.label }}\n <lucide-angular [img]=\"ChevronRightIcon\" [size]=\"12\" class=\"ml-auto\"></lucide-angular>\n </button>\n \n <!-- Submenu template -->\n <ng-template #submenu>\n <div class=\"min-w-[200px] bg-white dark:bg-[#1F1F1F] border border-gray-200 dark:border-gray-700 rounded-lg shadow-lg p-1\"\n cdkMenu>\n @for (subItem of item.items; track $index) {\n @if (subItem === '-') {\n <div class=\"h-px bg-gray-200 dark:bg-gray-700 my-1\"></div>\n } @else if (isMenuItem(subItem)) {\n <button\n type=\"button\"\n class=\"w-full px-3 py-2 text-left bg-transparent border-none rounded hover:bg-gray-100 dark:hover:bg-gray-800 cursor-pointer text-sm\"\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=\"w-full px-3 py-2 text-left bg-transparent border-none rounded hover:bg-gray-100 dark:hover:bg-gray-800 cursor-pointer text-sm\"\n (click)=\"handleItemClick(item)\"\n cdkMenuItem\n >\n {{ item.label }}\n </button>\n }\n }\n }\n </div>\n </ng-template>\n }\n `,\n styles: [`\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})\nexport class CopilotChatToolsMenuComponent {\n readonly Settings2Icon = Settings2;\n readonly ChevronRightIcon = ChevronRight;\n \n @Input() set inputToolsMenu(val: (ToolsMenuItem | '-')[] | undefined) {\n this.toolsMenu.set(val || []);\n }\n @Input() set inputDisabled(val: boolean | undefined) {\n this.disabled.set(val || false);\n }\n @Input() set inputClass(val: string | undefined) {\n this.customClass.set(val);\n }\n \n private chatConfig = inject(CopilotChatConfigurationService);\n \n toolsMenu = signal<(ToolsMenuItem | '-')[]>([]);\n disabled = signal<boolean>(false);\n customClass = signal<string | undefined>(undefined);\n \n hasItems = computed(() => this.toolsMenu().length > 0);\n \n label = computed(() => this.chatConfig.labels().chatInputToolbarToolsButtonLabel);\n \n buttonClass = computed(() => {\n const baseClasses = cn(\n // Base button styles\n 'inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-full text-sm font-medium',\n 'transition-all disabled:pointer-events-none disabled:opacity-50',\n 'shrink-0 outline-none',\n 'focus-visible:ring-[3px]',\n // chatInputToolbarSecondary variant\n 'cursor-pointer',\n 'bg-transparent text-[#444444]',\n 'dark:text-white dark:border-[#404040]',\n 'transition-colors',\n 'focus:outline-none',\n 'hover:bg-[#f8f8f8] hover:text-[#333333]',\n 'dark:hover:bg-[#404040] dark:hover:text-[#FFFFFF]',\n 'disabled:cursor-not-allowed disabled:opacity-50',\n 'disabled:hover:bg-transparent disabled:hover:text-[#444444]',\n 'dark:disabled:hover:bg-transparent dark:disabled:hover:text-[#CCCCCC]',\n // Size\n 'h-9 px-3 gap-2 font-normal'\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 Input,\n Output,\n EventEmitter,\n ViewChild,\n TemplateRef,\n signal,\n computed,\n effect,\n inject,\n ChangeDetectionStrategy,\n AfterViewInit,\n OnDestroy,\n Type,\n ViewEncapsulation,\n ContentChild\n} from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { CopilotSlotComponent } from '../../lib/slots/copilot-slot.component';\nimport { CopilotChatConfigurationService } from '../../core/chat-configuration/chat-configuration.service';\nimport { LucideAngularModule, ArrowUp } from 'lucide-angular';\nimport { CopilotChatTextareaComponent } from './copilot-chat-textarea.component';\nimport { CopilotChatAudioRecorderComponent } from './copilot-chat-audio-recorder.component';\nimport {\n CopilotChatSendButtonComponent,\n CopilotChatStartTranscribeButtonComponent,\n CopilotChatCancelTranscribeButtonComponent,\n CopilotChatFinishTranscribeButtonComponent,\n CopilotChatAddFileButtonComponent\n} from './copilot-chat-buttons.component';\nimport { CopilotChatToolbarComponent } from './copilot-chat-toolbar.component';\nimport { CopilotChatToolsMenuComponent } from './copilot-chat-tools-menu.component';\nimport type {\n CopilotChatInputMode,\n ToolsMenuItem\n} from './copilot-chat-input.types';\nimport { cn } from '../../lib/utils';\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 standalone: true,\n imports: [\n CommonModule,\n CopilotSlotComponent,\n LucideAngularModule,\n CopilotChatTextareaComponent,\n CopilotChatAudioRecorderComponent,\n CopilotChatSendButtonComponent,\n CopilotChatStartTranscribeButtonComponent,\n CopilotChatCancelTranscribeButtonComponent,\n CopilotChatFinishTranscribeButtonComponent,\n CopilotChatAddFileButtonComponent,\n CopilotChatToolbarComponent,\n CopilotChatToolsMenuComponent\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `\n <div [class]=\"computedClass()\">\n <!-- Main input area: either textarea or audio recorder -->\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\n [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 copilotChatTextarea\n [inputValue]=\"computedValue()\"\n [inputAutoFocus]=\"computedAutoFocus()\"\n [inputDisabled]=\"computedMode() === 'processing'\"\n [inputClass]=\"textAreaClass\"\n [inputMaxRows]=\"textAreaMaxRows\"\n [inputPlaceholder]=\"textAreaPlaceholder\"\n (keyDown)=\"handleKeyDown($event)\"\n (valueChange)=\"handleValueChange($event)\"></textarea>\n }\n }\n \n <!-- Toolbar -->\n @if (toolbarTemplate || toolbarComponent) {\n <copilot-slot\n [slot]=\"toolbarTemplate || toolbarComponent\"\n [context]=\"toolbarContext()\"\n [defaultComponent]=\"CopilotChatToolbarComponent\"\n >\n </copilot-slot>\n } @else {\n <div copilotChatToolbar>\n <div class=\"flex items-center\">\n @if (addFile.observed) {\n @if (addFileButtonTemplate || addFileButtonComponent) {\n <copilot-slot\n [slot]=\"addFileButtonTemplate || addFileButtonComponent\"\n [context]=\"{ inputDisabled: computedMode() === 'transcribe' }\"\n [outputs]=\"addFileButtonOutputs\"\n [defaultComponent]=\"CopilotChatAddFileButtonComponent\"\n >\n </copilot-slot>\n } @else {\n <copilot-chat-add-file-button\n [disabled]=\"computedMode() === 'transcribe'\"\n (clicked)=\"handleAddFile()\">\n </copilot-chat-add-file-button>\n }\n }\n @if (computedToolsMenu().length > 0) {\n @if (toolsButtonTemplate || toolsButtonComponent) {\n <copilot-slot\n [slot]=\"toolsButtonTemplate || toolsButtonComponent\"\n [context]=\"toolsContext()\"\n [defaultComponent]=\"CopilotChatToolsMenuComponent\"\n >\n </copilot-slot>\n } @else {\n <copilot-chat-tools-menu\n [inputToolsMenu]=\"computedToolsMenu()\"\n [inputDisabled]=\"computedMode() === 'transcribe'\">\n </copilot-chat-tools-menu>\n }\n }\n @if (additionalToolbarItems) {\n <ng-container *ngTemplateOutlet=\"additionalToolbarItems\"></ng-container>\n }\n </div>\n <div class=\"flex items-center\">\n @if (computedMode() === 'transcribe') {\n @if (cancelTranscribe.observed) {\n @if (cancelTranscribeButtonTemplate || cancelTranscribeButtonComponent) {\n <copilot-slot\n [slot]=\"cancelTranscribeButtonTemplate || cancelTranscribeButtonComponent\"\n [context]=\"{}\"\n [outputs]=\"cancelTranscribeButtonOutputs\"\n [defaultComponent]=\"CopilotChatCancelTranscribeButtonComponent\"\n >\n </copilot-slot>\n } @else {\n <copilot-chat-cancel-transcribe-button\n (clicked)=\"handleCancelTranscribe()\">\n </copilot-chat-cancel-transcribe-button>\n }\n }\n @if (finishTranscribe.observed) {\n @if (finishTranscribeButtonTemplate || finishTranscribeButtonComponent) {\n <copilot-slot\n [slot]=\"finishTranscribeButtonTemplate || finishTranscribeButtonComponent\"\n [context]=\"{}\"\n [outputs]=\"finishTranscribeButtonOutputs\"\n [defaultComponent]=\"CopilotChatFinishTranscribeButtonComponent\"\n >\n </copilot-slot>\n } @else {\n <copilot-chat-finish-transcribe-button\n (clicked)=\"handleFinishTranscribe()\">\n </copilot-chat-finish-transcribe-button>\n }\n }\n } @else {\n @if (startTranscribe.observed) {\n @if (startTranscribeButtonTemplate || startTranscribeButtonComponent) {\n <copilot-slot\n [slot]=\"startTranscribeButtonTemplate || startTranscribeButtonComponent\"\n [context]=\"{}\"\n [outputs]=\"startTranscribeButtonOutputs\"\n [defaultComponent]=\"CopilotChatStartTranscribeButtonComponent\"\n >\n </copilot-slot>\n } @else {\n <copilot-chat-start-transcribe-button\n (clicked)=\"handleStartTranscribe()\">\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=\"mr-[10px]\">\n <button \n type=\"button\"\n [class]=\"sendButtonClass || defaultButtonClass\"\n [disabled]=\"!computedValue().trim() || computedMode() === 'processing'\"\n (click)=\"send()\">\n <lucide-angular [img]=\"ArrowUpIcon\" [size]=\"18\"></lucide-angular>\n </button>\n </div>\n }\n }\n </div>\n </div>\n }\n </div>\n `,\n styles: [`\n :host {\n display: block;\n width: 100%;\n }\n .shadow-\\\\[0_4px_4px_0_\\\\#0000000a\\\\2c_0_0_1px_0_\\\\#0000009e\\\\] {\n box-shadow: 0 4px 4px 0 #0000000a, 0 0 1px 0 #0000009e !important;\n }\n `]\n})\nexport class CopilotChatInputComponent implements AfterViewInit, OnDestroy {\n @ViewChild(CopilotChatTextareaComponent, { read: CopilotChatTextareaComponent }) \n textAreaRef?: CopilotChatTextareaComponent;\n \n @ViewChild(CopilotChatAudioRecorderComponent) \n audioRecorderRef?: CopilotChatAudioRecorderComponent;\n \n // Capture templates from content projection\n @ContentChild('sendButton', { read: TemplateRef }) sendButtonTemplate?: TemplateRef<SendButtonContext>;\n @ContentChild('toolbar', { read: TemplateRef }) toolbarTemplate?: TemplateRef<ToolbarContext>;\n @ContentChild('textArea', { read: TemplateRef }) textAreaTemplate?: TemplateRef<any>;\n @ContentChild('audioRecorder', { read: TemplateRef }) audioRecorderTemplate?: TemplateRef<any>;\n @ContentChild('startTranscribeButton', { read: TemplateRef }) startTranscribeButtonTemplate?: TemplateRef<any>;\n @ContentChild('cancelTranscribeButton', { read: TemplateRef }) cancelTranscribeButtonTemplate?: TemplateRef<any>;\n @ContentChild('finishTranscribeButton', { read: TemplateRef }) finishTranscribeButtonTemplate?: TemplateRef<any>;\n @ContentChild('addFileButton', { read: TemplateRef }) addFileButtonTemplate?: TemplateRef<any>;\n @ContentChild('toolsButton', { read: TemplateRef }) toolsButtonTemplate?: TemplateRef<any>;\n \n // Class inputs for styling default components\n @Input() sendButtonClass?: string;\n @Input() toolbarClass?: string;\n @Input() textAreaClass?: string;\n @Input() textAreaMaxRows?: number;\n @Input() textAreaPlaceholder?: string;\n @Input() audioRecorderClass?: string;\n @Input() startTranscribeButtonClass?: string;\n @Input() cancelTranscribeButtonClass?: string;\n @Input() finishTranscribeButtonClass?: string;\n @Input() addFileButtonClass?: string;\n @Input() toolsButtonClass?: string;\n \n // Component inputs for overrides\n @Input() sendButtonComponent?: Type<any>;\n @Input() toolbarComponent?: Type<any>;\n @Input() textAreaComponent?: Type<any>;\n @Input() audioRecorderComponent?: Type<any>;\n @Input() startTranscribeButtonComponent?: Type<any>;\n @Input() cancelTranscribeButtonComponent?: Type<any>;\n @Input() finishTranscribeButtonComponent?: Type<any>;\n @Input() addFileButtonComponent?: Type<any>;\n @Input() toolsButtonComponent?: Type<any>;\n \n // Regular inputs\n @Input() set mode(val: CopilotChatInputMode | undefined) {\n this.modeSignal.set(val || 'input');\n }\n @Input() set toolsMenu(val: (ToolsMenuItem | '-')[] | undefined) {\n this.toolsMenuSignal.set(val || []);\n }\n @Input() set autoFocus(val: boolean | undefined) {\n this.autoFocusSignal.set(val ?? true);\n }\n @Input() set value(val: string | undefined) {\n this.valueSignal.set(val || '');\n }\n @Input() set inputClass(val: string | undefined) {\n this.customClass.set(val);\n }\n // Note: Prefer host `class` for styling this component;\n // keep only `inputClass` to style the internal wrapper if needed.\n @Input() additionalToolbarItems?: TemplateRef<any>;\n \n // Output events\n @Output() submitMessage = new EventEmitter<string>();\n @Output() startTranscribe = new EventEmitter<void>();\n @Output() cancelTranscribe = new EventEmitter<void>();\n @Output() finishTranscribe = new EventEmitter<void>();\n @Output() addFile = new EventEmitter<void>();\n @Output() valueChange = new EventEmitter<string>();\n \n // Icons and default classes\n readonly ArrowUpIcon = ArrowUp;\n readonly defaultButtonClass = cn(\n // Base button styles\n 'inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium',\n 'transition-all disabled:pointer-events-none disabled:opacity-50',\n 'shrink-0 outline-none',\n 'focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]',\n // chatInputToolbarPrimary variant\n 'cursor-pointer',\n 'bg-black text-white',\n 'dark:bg-white dark:text-black dark:focus-visible:outline-white',\n 'rounded-full h-9 w-9',\n 'transition-colors',\n 'focus:outline-none',\n 'hover:opacity-70 disabled:hover:opacity-100',\n 'disabled:cursor-not-allowed disabled:bg-[#00000014] disabled:text-[rgb(13,13,13)]',\n 'dark:disabled:bg-[#454545] dark:disabled:text-white'\n );\n \n // Services\n private chatConfig = inject(CopilotChatConfigurationService, { optional: true });\n \n // Signals\n modeSignal = signal<CopilotChatInputMode>('input');\n toolsMenuSignal = signal<(ToolsMenuItem | '-')[]>([]);\n autoFocusSignal = signal<boolean>(true);\n valueSignal = signal<string>('');\n customClass = signal<string | undefined>(undefined);\n \n // Default components\n // Note: CopilotChatTextareaComponent uses attribute selector but is a component\n defaultAudioRecorder = CopilotChatAudioRecorderComponent;\n defaultSendButton: any = null; // Will be set to avoid circular dependency\n CopilotChatToolbarComponent = CopilotChatToolbarComponent;\n CopilotChatAddFileButtonComponent = CopilotChatAddFileButtonComponent;\n CopilotChatToolsMenuComponent = CopilotChatToolsMenuComponent;\n CopilotChatCancelTranscribeButtonComponent = CopilotChatCancelTranscribeButtonComponent;\n CopilotChatFinishTranscribeButtonComponent = CopilotChatFinishTranscribeButtonComponent;\n CopilotChatStartTranscribeButtonComponent = CopilotChatStartTranscribeButtonComponent;\n \n // Computed values\n computedMode = computed(() => this.modeSignal());\n computedToolsMenu = computed(() => this.toolsMenuSignal());\n computedAutoFocus = computed(() => this.autoFocusSignal());\n computedValue = computed(() => {\n const customValue = this.valueSignal();\n const configValue = this.chatConfig?.inputValue();\n return customValue || configValue || '';\n });\n \n computedClass = computed(() => {\n const baseClasses = cn(\n // Layout\n 'flex w-full flex-col items-center justify-center',\n // Interaction\n 'cursor-text',\n // Overflow and clipping\n 'overflow-visible bg-clip-padding contain-inline-size',\n // Background\n 'bg-white dark:bg-[#303030]',\n // Visual effects\n 'shadow-[0_4px_4px_0_#0000000a,0_0_1px_0_#0000009e] rounded-[28px]'\n );\n return cn(baseClasses, this.customClass());\n });\n \n // Context for slots (reactive via signals)\n sendButtonContext = computed<SendButtonContext>(() => ({\n send: () => this.send(),\n disabled: !this.computedValue().trim() || this.computedMode() === 'processing',\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 // Effect to handle mode changes\n effect(\n () => {\n const currentMode = this.computedMode();\n if (currentMode === 'transcribe' && this.audioRecorderRef) {\n this.audioRecorderRef.start().catch(console.error);\n } else if (this.audioRecorderRef?.getState() === 'recording') {\n this.audioRecorderRef.stop().catch(console.error);\n }\n },\n { allowSignalWrites: true }\n );\n \n // Sync with chat configuration\n effect(\n () => {\n const configValue = this.chatConfig?.inputValue();\n if (configValue !== undefined && !this.valueSignal()) {\n this.valueSignal.set(configValue);\n }\n },\n { allowSignalWrites: true }\n );\n }\n \n // Output maps for slots\n addFileButtonOutputs = { clicked: () => this.handleAddFile() };\n cancelTranscribeButtonOutputs = { clicked: () => this.handleCancelTranscribe() };\n finishTranscribeButtonOutputs = { clicked: () => this.handleFinishTranscribe() };\n startTranscribeButtonOutputs = { clicked: () => this.handleStartTranscribe() };\n // Support both `clicked` (idiomatic in our slots) and `click` (legacy)\n sendButtonOutputs = { clicked: () => this.send(), click: () => this.send() };\n \n ngAfterViewInit(): void {\n // Auto-focus if needed\n if (this.computedAutoFocus() && this.textAreaRef) {\n setTimeout(() => {\n this.textAreaRef?.focus();\n });\n }\n }\n \n ngOnDestroy(): void {\n // Clean up any resources\n if (this.audioRecorderRef?.getState() === 'recording') {\n this.audioRecorderRef.stop().catch(console.error);\n }\n }\n \n handleKeyDown(event: KeyboardEvent): void {\n if (event.key === 'Enter' && !event.shiftKey) {\n event.preventDefault();\n this.send();\n }\n }\n \n handleValueChange(value: string): void {\n this.valueSignal.set(value);\n this.valueChange.emit(value);\n \n if (this.chatConfig) {\n this.chatConfig.setInputValue(value);\n }\n }\n \n send(): void {\n const trimmed = this.computedValue().trim();\n if (trimmed) {\n this.submitMessage.emit(trimmed);\n \n // Use chat config handler if available\n if (this.chatConfig) {\n this.chatConfig.submitInput(trimmed);\n }\n \n // Clear input\n this.valueSignal.set('');\n if (this.textAreaRef) {\n this.textAreaRef.setValue('');\n }\n \n // Refocus input\n if (this.textAreaRef) {\n setTimeout(() => {\n this.textAreaRef?.focus();\n });\n }\n }\n }\n \n handleStartTranscribe(): void {\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 handleFinishTranscribe(): void {\n this.finishTranscribe.emit();\n this.modeSignal.set('input');\n }\n \n handleAddFile(): void {\n this.addFile.emit();\n }\n}\n","import { CopilotChatTextareaComponent } from \"./copilot-chat-textarea.component\";\nimport { CopilotChatAudioRecorderComponent } from \"./copilot-chat-audio-recorder.component\";\nimport {\n CopilotChatSendButtonComponent,\n CopilotChatStartTranscribeButtonComponent,\n CopilotChatCancelTranscribeButtonComponent,\n CopilotChatFinishTranscribeButtonComponent,\n CopilotChatAddFileButtonComponent,\n} from \"./copilot-chat-buttons.component\";\nimport { CopilotChatToolbarComponent } from \"./copilot-chat-toolbar.component\";\nimport { CopilotChatToolsMenuComponent } from \"./copilot-chat-tools-menu.component\";\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 '@copilotkitnext/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 = CopilotChatTextareaComponent;\n static readonly AudioRecorder = CopilotChatAudioRecorderComponent;\n static readonly SendButton = CopilotChatSendButtonComponent;\n static readonly StartTranscribeButton =\n CopilotChatStartTranscribeButtonComponent;\n static readonly CancelTranscribeButton =\n CopilotChatCancelTranscribeButtonComponent;\n static readonly FinishTranscribeButton =\n CopilotChatFinishTranscribeButtonComponent;\n static readonly AddFileButton = CopilotChatAddFileButtonComponent;\n static readonly Toolbar = CopilotChatToolbarComponent;\n static readonly ToolsMenu = CopilotChatToolsMenuComponent;\n}\n","import {\n Component,\n Input,\n ChangeDetectionStrategy,\n ViewEncapsulation,\n computed,\n signal\n} from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { cn } from '../../lib/utils';\n\n@Component({\n selector: 'copilot-chat-user-message-renderer',\n standalone: true,\n imports: [CommonModule],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n '[class]': 'computedClass()'\n },\n template: `{{ content }}`\n})\nexport class CopilotChatUserMessageRendererComponent {\n @Input() content = '';\n @Input() set inputClass(value: string | undefined) {\n this.customClass.set(value);\n }\n \n private customClass = signal<string | undefined>(undefined);\n \n computedClass = computed(() => {\n return cn(\n \"prose dark:prose-invert bg-muted relative max-w-[80%] rounded-[18px] px-4 py-1.5 data-[multiline]:py-3 inline-block whitespace-pre-wrap\",\n this.customClass()\n );\n });\n}","import {\n Component,\n Input,\n Output,\n EventEmitter,\n signal,\n computed,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n ViewEncapsulation,\n inject\n} from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { LucideAngularModule, Copy, Check, Edit } from 'lucide-angular';\nimport { CopilotTooltipDirective } from '../../lib/directives/tooltip.directive';\nimport { CopilotChatConfigurationService } from '../../core/chat-configuration/chat-configuration.service';\nimport { cn } from '../../lib/utils';\n\n// Base toolbar button component\n@Component({\n selector: 'button[copilotChatUserMessageToolbarButton]',\n standalone: true,\n imports: [CommonModule],\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: CopilotTooltipDirective,\n inputs: ['copilotTooltip: title', 'tooltipPosition', 'tooltipDelay']\n }\n ]\n})\nexport class CopilotChatUserMessageToolbarButtonComponent {\n @Input() title = '';\n @Input() disabled = false;\n @Input() set inputClass(value: string | undefined) {\n this.customClass.set(value);\n }\n \n private customClass = signal<string | undefined>(undefined);\n \n computedClass = computed(() => {\n return cn(\n // Flex centering\n 'inline-flex items-center justify-center',\n // Cursor\n 'cursor-pointer',\n // Background and text\n 'p-0 text-[rgb(93,93,93)] hover:bg-[#E8E8E8]',\n // Dark mode\n 'dark:text-[rgb(243,243,243)] dark:hover:bg-[#303030]',\n // Shape and sizing\n 'h-8 w-8 rounded-md',\n // Interactions\n 'transition-colors',\n // Hover states\n 'hover:text-[rgb(93,93,93)]',\n 'dark:hover:text-[rgb(243,243,243)]',\n // Focus states\n 'focus:outline-none focus:ring-2 focus:ring-offset-2',\n // Disabled state\n 'disabled:opacity-50 disabled:cursor-not-allowed',\n this.customClass()\n );\n });\n}\n\n// Copy button component\n@Component({\n selector: 'copilot-chat-user-message-copy-button',\n standalone: true,\n imports: [CommonModule, LucideAngularModule, CopilotChatUserMessageToolbarButtonComponent],\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 @if (copied()) {\n <lucide-angular [img]=\"CheckIcon\" [size]=\"18\"></lucide-angular>\n } @else {\n <lucide-angular [img]=\"CopyIcon\" [size]=\"18\"></lucide-angular>\n }\n </button>\n `\n})\nexport class CopilotChatUserMessageCopyButtonComponent {\n @Input() title?: string;\n @Input() disabled = false;\n @Input() inputClass?: string;\n @Input() content?: string;\n @Output() clicked = new EventEmitter<void>();\n \n readonly CopyIcon = Copy;\n readonly CheckIcon = Check;\n \n copied = signal(false);\n private chatConfig = inject(CopilotChatConfigurationService);\n \n get labels() {\n return this.chatConfig.labels();\n }\n \n handleCopy(): void {\n if (!this.content) return;\n \n // Set copied immediately for instant feedback\n this.copied.set(true);\n setTimeout(() => this.copied.set(false), 2000);\n \n // Copy to clipboard (fire and forget)\n navigator.clipboard.writeText(this.content).then(\n () => this.clicked.emit(),\n (err) => {\n console.error('Failed to copy message:', err);\n this.copied.set(false);\n }\n );\n }\n}\n\n// Edit button component\n@Component({\n selector: 'copilot-chat-user-message-edit-button',\n standalone: true,\n imports: [CommonModule, LucideAngularModule, CopilotChatUserMessageToolbarButtonComponent],\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 <lucide-angular [img]=\"EditIcon\" [size]=\"18\"></lucide-angular>\n </button>\n `\n})\nexport class CopilotChatUserMessageEditButtonComponent {\n @Input() title?: string;\n @Input() disabled = false;\n @Input() inputClass?: string;\n @Output() clicked = new EventEmitter<void>();\n \n readonly EditIcon = Edit;\n private chatConfig = inject(CopilotChatConfigurationService);\n \n get labels() {\n return this.chatConfig.labels();\n }\n \n handleEdit(): void {\n if (!this.disabled) {\n this.clicked.emit();\n }\n }\n}\n","import {\n Component,\n Input,\n ChangeDetectionStrategy,\n ViewEncapsulation,\n signal\n} from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { cn } from '../../lib/utils';\n\n@Component({\n selector: 'div[copilotChatUserMessageToolbar]',\n standalone: true,\n imports: [CommonModule],\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 CopilotChatUserMessageToolbarComponent {\n @Input() inputClass?: string;\n \n computedClass = signal<string>('');\n \n ngOnInit() {\n this.computedClass.set(\n cn(\n \"w-full bg-transparent flex items-center justify-end mt-[4px] invisible group-hover:visible\",\n this.inputClass\n )\n );\n }\n}","import {\n Component,\n Input,\n Output,\n EventEmitter,\n ChangeDetectionStrategy,\n ViewEncapsulation,\n computed,\n signal\n} from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { LucideAngularModule, ChevronLeft, ChevronRight } from 'lucide-angular';\nimport { \n type UserMessage,\n type CopilotChatUserMessageOnSwitchToBranchProps \n} from './copilot-chat-user-message.types';\nimport { cn } from '../../lib/utils';\n\n@Component({\n selector: 'copilot-chat-user-message-branch-navigation',\n standalone: true,\n imports: [CommonModule, LucideAngularModule],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `\n @if (showNavigation()) {\n <div [class]=\"computedClass()\">\n <button\n type=\"button\"\n [class]=\"buttonClass\"\n [disabled]=\"!canGoPrev()\"\n (click)=\"handlePrevious()\">\n <lucide-angular [img]=\"ChevronLeftIcon\" [size]=\"20\"></lucide-angular>\n </button>\n <span class=\"text-sm text-muted-foreground px-0 font-medium\">\n {{ currentBranchSignal() + 1 }}/{{ numberOfBranchesSignal() }}\n </span>\n <button\n type=\"button\"\n [class]=\"buttonClass\"\n [disabled]=\"!canGoNext()\"\n (click)=\"handleNext()\">\n <lucide-angular [img]=\"ChevronRightIcon\" [size]=\"20\"></lucide-angular>\n </button>\n </div>\n }\n `\n})\nexport class CopilotChatUserMessageBranchNavigationComponent {\n @Input() set currentBranch(val: number) {\n this.currentBranchSignal.set(val);\n }\n @Input() set numberOfBranches(val: number) {\n this.numberOfBranchesSignal.set(val);\n }\n @Input() message!: UserMessage;\n @Input() inputClass?: string;\n @Output() switchToBranch = new EventEmitter<CopilotChatUserMessageOnSwitchToBranchProps>();\n \n readonly ChevronLeftIcon = ChevronLeft;\n readonly ChevronRightIcon = ChevronRight;\n \n currentBranchSignal = signal(0);\n numberOfBranchesSignal = signal(1);\n \n readonly buttonClass = cn(\n // Flex centering\n 'inline-flex items-center justify-center',\n // Cursor\n 'cursor-pointer',\n // Background and text\n 'p-0 text-[rgb(93,93,93)] hover:bg-[#E8E8E8]',\n // Dark mode\n 'dark:text-[rgb(243,243,243)] dark:hover:bg-[#303030]',\n // Shape and sizing\n 'h-6 w-6 rounded-md',\n // Interactions\n 'transition-colors',\n // Disabled state\n 'disabled:opacity-50 disabled:cursor-not-allowed'\n );\n \n showNavigation = computed(() => {\n const branches = this.numberOfBranchesSignal();\n return branches > 1;\n });\n \n canGoPrev = computed(() => {\n return this.currentBranchSignal() > 0;\n });\n \n canGoNext = computed(() => {\n return this.currentBranchSignal() < this.numberOfBranchesSignal() - 1;\n });\n \n computedClass = computed(() => {\n return cn('flex items-center gap-1', this.inputClass);\n });\n \n handlePrevious(): void {\n if (this.canGoPrev()) {\n const newIndex = this.currentBranchSignal() - 1;\n this.switchToBranch.emit({\n branchIndex: newIndex,\n numberOfBranches: this.numberOfBranchesSignal(),\n message: this.message\n });\n }\n }\n \n handleNext(): void {\n if (this.canGoNext()) {\n const newIndex = this.currentBranchSignal() + 1;\n this.switchToBranch.emit({\n branchIndex: newIndex,\n numberOfBranches: this.numberOfBranchesSignal(),\n message: this.message\n });\n }\n }\n}","import {\n Component,\n Input,\n Output,\n EventEmitter,\n TemplateRef,\n ContentChild,\n signal,\n computed,\n Type,\n ChangeDetectionStrategy,\n ViewEncapsulation\n} from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { CopilotSlotComponent } from '../../lib/slots/copilot-slot.component';\nimport {\n type UserMessage,\n type CopilotChatUserMessageOnEditMessageProps,\n type CopilotChatUserMessageOnSwitchToBranchProps,\n type MessageRendererContext,\n type CopyButtonContext,\n type EditButtonContext,\n type BranchNavigationContext,\n type ToolbarContext\n} from './copilot-chat-user-message.types';\nimport { CopilotChatUserMessageRendererComponent } from './copilot-chat-user-message-renderer.component';\nimport {\n CopilotChatUserMessageCopyButtonComponent,\n CopilotChatUserMessageEditButtonComponent\n} from './copilot-chat-user-message-buttons.component';\nimport { CopilotChatUserMessageToolbarComponent } from './copilot-chat-user-message-toolbar.component';\nimport { CopilotChatUserMessageBranchNavigationComponent } from './copilot-chat-user-message-branch-navigation.component';\nimport { cn } from '../../lib/utils';\n\n@Component({\n selector: 'copilot-chat-user-message',\n standalone: true,\n imports: [\n CommonModule,\n CopilotSlotComponent,\n CopilotChatUserMessageRendererComponent,\n CopilotChatUserMessageCopyButtonComponent,\n CopilotChatUserMessageEditButtonComponent,\n CopilotChatUserMessageToolbarComponent,\n CopilotChatUserMessageBranchNavigationComponent\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `\n <div \n [class]=\"computedClass()\"\n [attr.data-message-id]=\"message.id\">\n \n <!-- Message Renderer -->\n @if (messageRendererTemplate || messageRendererComponent) {\n <copilot-slot\n [slot]=\"messageRendererTemplate || messageRendererComponent\"\n [context]=\"messageRendererContext()\"\n [defaultComponent]=\"CopilotChatUserMessageRendererComponent\"\n >\n </copilot-slot>\n } @else {\n <copilot-chat-user-message-renderer\n [content]=\"message.content || ''\"\n [inputClass]=\"messageRendererClass\">\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]=\"CopilotChatUserMessageToolbarComponent\"\n >\n </copilot-slot>\n } @else {\n <div copilotChatUserMessageToolbar [inputClass]=\"toolbarClass\">\n <div class=\"flex items-center gap-1 justify-end\">\n <!-- Additional toolbar items -->\n @if (additionalToolbarItems) {\n <ng-container *ngTemplateOutlet=\"additionalToolbarItems\"></ng-container>\n }\n \n <!-- Copy button -->\n @if (copyButtonTemplate || copyButtonComponent) {\n <copilot-slot\n [slot]=\"copyButtonTemplate || copyButtonComponent\"\n [context]=\"{ content: message?.content || '' }\"\n [outputs]=\"copyButtonOutputs\"\n [defaultComponent]=\"CopilotChatUserMessageCopyButtonComponent\"\n >\n </copilot-slot>\n } @else {\n <copilot-chat-user-message-copy-button\n [content]=\"message.content\"\n [inputClass]=\"copyButtonClass\"\n (clicked)=\"handleCopy()\">\n </copilot-chat-user-message-copy-button>\n }\n \n <!-- Edit button -->\n @if (editMessage.observed) {\n @if (editButtonTemplate || editButtonComponent) {\n <copilot-slot\n [slot]=\"editButtonTemplate || editButtonComponent\"\n [context]=\"{}\"\n [outputs]=\"editButtonOutputs\"\n [defaultComponent]=\"CopilotChatUserMessageEditButtonComponent\"\n >\n </copilot-slot>\n } @else {\n <copilot-chat-user-message-edit-button\n [inputClass]=\"editButtonClass\"\n (clicked)=\"handleEdit()\">\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]=\"CopilotChatUserMessageBranchNavigationComponent\"\n >\n </copilot-slot>\n } @else {\n <copilot-chat-user-message-branch-navigation\n [currentBranch]=\"branchIndexSignal()\"\n [numberOfBranches]=\"numberOfBranchesSignal()\"\n [message]=\"message\"\n [inputClass]=\"branchNavigationClass\"\n (switchToBranch)=\"handleSwitchToBranch($event)\">\n </copilot-chat-user-message-branch-navigation>\n }\n }\n </div>\n </div>\n }\n </div>\n `,\n styles: [`\n :host {\n display: block;\n width: 100%;\n }\n `]\n})\nexport class CopilotChatUserMessageComponent {\n // Capture templates from content projection\n @ContentChild('messageRenderer', { read: TemplateRef }) messageRendererTemplate?: TemplateRef<MessageRendererContext>;\n @ContentChild('toolbar', { read: TemplateRef }) toolbarTemplate?: TemplateRef<ToolbarContext>;\n @ContentChild('copyButton', { read: TemplateRef }) copyButtonTemplate?: TemplateRef<CopyButtonContext>;\n @ContentChild('editButton', { read: TemplateRef }) editButtonTemplate?: TemplateRef<EditButtonContext>;\n @ContentChild('branchNavigation', { read: TemplateRef }) branchNavigationTemplate?: TemplateRef<BranchNavigationContext>;\n \n // Props for tweaking default components\n @Input() messageRendererClass?: string;\n @Input() toolbarClass?: string;\n @Input() copyButtonClass?: string;\n @Input() editButtonClass?: string;\n @Input() branchNavigationClass?: string;\n \n // Component inputs for overrides\n @Input() messageRendererComponent?: Type<any>;\n @Input() toolbarComponent?: Type<any>;\n @Input() copyButtonComponent?: Type<any>;\n @Input() editButtonComponent?: Type<any>;\n @Input() branchNavigationComponent?: Type<any>;\n \n // Regular inputs\n @Input() message!: UserMessage;\n @Input() set branchIndex(val: number | undefined) {\n this.branchIndexSignal.set(val ?? 0);\n }\n @Input() set numberOfBranches(val: number | undefined) {\n this.numberOfBranchesSignal.set(val ?? 1);\n }\n @Input() additionalToolbarItems?: TemplateRef<any>;\n @Input() set inputClass(val: string | undefined) {\n this.customClass.set(val);\n }\n \n // Output events\n @Output() editMessage = new EventEmitter<CopilotChatUserMessageOnEditMessageProps>();\n @Output() switchToBranch = new EventEmitter<CopilotChatUserMessageOnSwitchToBranchProps>();\n \n // Signals\n branchIndexSignal = signal(0);\n numberOfBranchesSignal = signal(1);\n customClass = signal<string | undefined>(undefined);\n \n // Default components\n CopilotChatUserMessageRendererComponent = CopilotChatUserMessageRendererComponent;\n CopilotChatUserMessageToolbarComponent = CopilotChatUserMessageToolbarComponent;\n CopilotChatUserMessageCopyButtonComponent = CopilotChatUserMessageCopyButtonComponent;\n CopilotChatUserMessageEditButtonComponent = CopilotChatUserMessageEditButtonComponent;\n CopilotChatUserMessageBranchNavigationComponent = CopilotChatUserMessageBranchNavigationComponent;\n \n // Computed values\n showBranchNavigation = computed(() => {\n const branches = this.numberOfBranchesSignal();\n return branches > 1 && this.switchToBranch.observed;\n });\n \n computedClass = computed(() => {\n return cn(\n \"flex flex-col items-end group pt-10\",\n this.customClass()\n );\n });\n \n // Context for slots (reactive via signals)\n messageRendererContext = computed<MessageRendererContext>(() => ({\n content: this.message?.content || ''\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.branchIndexSignal(),\n numberOfBranches: this.numberOfBranchesSignal(),\n onSwitchToBranch: (props) => this.handleSwitchToBranch(props),\n message: this.message\n }));\n \n toolbarContext = computed<ToolbarContext>(() => ({\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(props: CopilotChatUserMessageOnSwitchToBranchProps): void {\n this.switchToBranch.emit(props);\n }\n}\n","import {\n Component,\n Input,\n ViewContainerRef,\n ComponentRef,\n inject,\n ViewChild,\n AfterViewInit,\n OnChanges,\n SimpleChanges,\n TemplateRef,\n Type,\n ChangeDetectionStrategy,\n signal,\n computed,\n OnDestroy,\n} from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\nimport type {\n AssistantMessage,\n Message,\n ToolCall,\n ToolMessage,\n} from \"@ag-ui/core\";\nimport { ToolCallStatus } from \"@copilotkitnext/core\";\nimport { CopilotKitService } from \"../../core/copilotkit.service\";\nimport { partialJSONParse } from \"@copilotkitnext/shared\";\nimport type {\n ToolCallProps,\n ToolCallRender,\n} from \"../../core/copilotkit.types\";\n\n/**\n * Component for rendering all tool calls for an assistant message.\n * This component iterates through the message's tool calls and renders each one\n * using the registered render functions in CopilotKitService.\n */\n@Component({\n selector: \"copilot-chat-tool-calls-view\",\n standalone: true,\n imports: [CommonModule],\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n @for (toolCall of message?.toolCalls ?? []; track toolCall.id) {\n <ng-container>\n <ng-container #dynamicContainer></ng-container>\n <ng-container *ngIf=\"getTemplateForToolCall(toolCall) as templateData\">\n <ng-container\n *ngTemplateOutlet=\"\n templateData.template;\n context: templateData.context\n \"\n ></ng-container>\n </ng-container>\n </ng-container>\n }\n `,\n})\nexport class CopilotChatToolCallsViewComponent\n implements AfterViewInit, OnChanges, OnDestroy\n{\n @Input({ required: true }) message!: AssistantMessage;\n @Input() messages: Message[] = [];\n @Input() isLoading = false;\n\n @ViewChild(\"dynamicContainer\", { read: ViewContainerRef })\n private container?: ViewContainerRef;\n\n private copilotkit: CopilotKitService | null = inject(CopilotKitService, {\n optional: true,\n });\n private componentRefs: Map<string, ComponentRef<any>> = new Map();\n private templateCache: Map<\n string,\n { template: TemplateRef<any>; context: any }\n > = new Map();\n\n // Signals for reactive state\n private messageSignal = signal<AssistantMessage | null>(null);\n private messagesSignal = signal<Message[]>([]);\n private isLoadingSignal = signal(false);\n\n ngAfterViewInit(): void {\n this.renderAllToolCalls();\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes[\"message\"]) {\n this.messageSignal.set(this.message);\n }\n if (changes[\"messages\"]) {\n this.messagesSignal.set(this.messages);\n }\n if (changes[\"isLoading\"]) {\n this.isLoadingSignal.set(this.isLoading);\n }\n\n this.renderAllToolCalls();\n }\n\n ngOnDestroy(): void {\n // Clean up all component refs\n this.componentRefs.forEach((ref) => ref.destroy());\n this.componentRefs.clear();\n this.templateCache.clear();\n }\n\n getTemplateForToolCall(\n toolCall: ToolCall\n ): { template: TemplateRef<any>; context: any } | null {\n return this.templateCache.get(toolCall.id) || null;\n }\n\n private renderAllToolCalls(): void {\n const message = this.messageSignal();\n if (!message || !message.toolCalls || message.toolCalls.length === 0) {\n return;\n }\n\n // Clear existing renders\n this.componentRefs.forEach((ref) => ref.destroy());\n this.componentRefs.clear();\n this.templateCache.clear();\n\n if (!this.copilotkit || !this.container) {\n return;\n }\n\n const messages = this.messagesSignal();\n const isLoading = this.isLoadingSignal();\n\n // Render each tool call\n message.toolCalls.forEach((toolCall) => {\n const toolMessage = messages.find(\n (m) =>\n m.role === \"tool\" && (m as ToolMessage).toolCallId === toolCall.id\n ) as ToolMessage | undefined;\n\n this.renderSingleToolCall(toolCall, toolMessage, isLoading);\n });\n }\n\n private renderSingleToolCall(\n toolCall: ToolCall,\n toolMessage: ToolMessage | undefined,\n isLoading: boolean\n ): void {\n if (!this.copilotkit) {\n return;\n }\n\n // Get current render tool calls\n const currentRenderToolCalls = this.copilotkit.currentRenderToolCalls();\n\n // Find the render config for this tool call by name\n // Also check for wildcard (*) renders if no exact match\n const renderConfig =\n currentRenderToolCalls.find(\n (rc: ToolCallRender) => rc.name === toolCall.function.name\n ) || currentRenderToolCalls.find((rc: ToolCallRender) => rc.name === \"*\");\n\n if (!renderConfig) {\n return;\n }\n\n // Parse the arguments if they're a string\n const args = partialJSONParse(toolCall.function.arguments);\n\n // Determine status\n let status: ToolCallStatus;\n if (toolMessage) {\n status = ToolCallStatus.Complete;\n } else if (isLoading) {\n status = ToolCallStatus.InProgress;\n } else {\n status = ToolCallStatus.Complete;\n }\n\n // Create props based on status - use discriminated union properly\n let props: ToolCallProps;\n if (status === ToolCallStatus.InProgress) {\n props = {\n name: toolCall.function.name,\n description: \"\",\n args: args, // Partial args for InProgress\n status: ToolCallStatus.InProgress,\n result: undefined,\n };\n } else {\n // Complete status\n props = {\n name: toolCall.function.name,\n description: \"\",\n args: args, // Full args for Complete\n status: ToolCallStatus.Complete,\n result: toolMessage?.content || \"\",\n };\n }\n\n // Check if render is a Component class or TemplateRef\n if (this.isComponentClass(renderConfig.render)) {\n // Create component dynamically\n this.renderComponent(toolCall.id, renderConfig.render, props);\n } else if (this.isTemplateRef(renderConfig.render)) {\n // Use template\n this.renderTemplate(toolCall.id, renderConfig.render, props);\n }\n }\n\n private renderComponent(\n toolCallId: string,\n componentClass: Type<any>,\n props: ToolCallProps\n ): void {\n if (!this.container) {\n return;\n }\n\n // Create the component\n const componentRef = this.container.createComponent(componentClass);\n this.componentRefs.set(toolCallId, componentRef);\n\n // Determine declared inputs to avoid Angular NG0303 console errors\n const cmpDef: any = (componentClass as any).ɵcmp;\n const declaredInputs = new Set<string>(\n Object.keys(cmpDef?.inputs ?? {})\n );\n\n // Prefer a single 'props' input if declared\n if (declaredInputs.has('props')) {\n componentRef.setInput('props', props);\n } else {\n // Otherwise, set only inputs that the component actually declares\n for (const [key, value] of Object.entries(props)) {\n if (declaredInputs.has(key)) {\n componentRef.setInput(key, value);\n }\n }\n }\n\n // Trigger change detection\n componentRef.changeDetectorRef.detectChanges();\n }\n\n private renderTemplate(\n toolCallId: string,\n template: TemplateRef<any>,\n props: ToolCallProps\n ): void {\n this.templateCache.set(toolCallId, {\n template,\n context: {\n $implicit: props,\n name: props.name,\n description: props.description,\n args: props.args,\n status: props.status,\n result: props.result,\n },\n });\n }\n\n private isComponentClass(value: any): value is Type<any> {\n return typeof value === \"function\" && value.prototype;\n }\n\n private isTemplateRef(value: any): value is TemplateRef<any> {\n return value instanceof TemplateRef;\n }\n}\n","import {\n Component,\n Input,\n ChangeDetectionStrategy,\n ViewEncapsulation,\n OnChanges,\n SimpleChanges,\n signal,\n computed,\n inject,\n ElementRef,\n AfterViewInit,\n ViewChild,\n} from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\nimport { Marked } from \"marked\";\nimport hljs from \"highlight.js\";\nimport * as katex from \"katex\";\nimport { completePartialMarkdown } from \"@copilotkitnext/core\";\nimport { LucideAngularModule, Copy, Check } from \"lucide-angular\";\nimport { CopilotChatConfigurationService } from \"../../core/chat-configuration/chat-configuration.service\";\n\n@Component({\n selector: \"copilot-chat-assistant-message-renderer\",\n standalone: true,\n imports: [CommonModule, LucideAngularModule],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `\n <div\n #markdownContainer\n [class]=\"inputClass\"\n (click)=\"handleClick($event)\"\n ></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\",\n Menlo, 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\",\n Menlo, 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 CopilotChatAssistantMessageRendererComponent\n implements OnChanges, AfterViewInit\n{\n private _content = \"\";\n @Input()\n set content(value: string) {\n this._content = value;\n this.contentSignal.set(value);\n }\n get content(): string {\n return this._content;\n }\n\n @Input() inputClass?: string;\n\n private contentSignal = signal<string>(\"\");\n\n @ViewChild(\"markdownContainer\", { static: false })\n markdownContainer?: ElementRef<HTMLDivElement>;\n\n private chatConfig = inject(CopilotChatConfigurationService);\n private elementRef = inject(ElementRef);\n\n // Track copy states for code blocks\n private copyStates = new Map<string, boolean>();\n private copyStateSignal = signal(new Map<string, boolean>());\n\n renderedHtml = computed(() => {\n const currentContent = this.contentSignal();\n const completedMarkdown = completePartialMarkdown(currentContent);\n return this.renderMarkdown(completedMarkdown);\n });\n\n get labels() {\n return this.chatConfig.labels();\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes[\"content\"]) {\n // Reset copy states when content changes\n this.copyStates.clear();\n this.copyStateSignal.set(new Map());\n // Update content if container exists\n if (this.markdownContainer) {\n this.updateContent();\n this.renderMathEquations();\n }\n }\n }\n\n ngAfterViewInit(): void {\n this.updateContent();\n this.renderMathEquations();\n }\n\n private updateContent(): void {\n if (!this.markdownContainer) return;\n const container = this.markdownContainer.nativeElement;\n const html = this.renderedHtml();\n container.innerHTML = html;\n }\n\n private codeBlocksMap = new Map<string, string>();\n private markedInstance: Marked | null = null;\n\n private initializeMarked(): void {\n if (this.markedInstance) return;\n\n // Store highlighted code blocks temporarily\n const highlightedBlocks = new Map<string, string>();\n\n // Create a new Marked instance\n this.markedInstance = new Marked();\n\n // Configure marked options\n this.markedInstance.setOptions({\n gfm: true,\n breaks: true,\n });\n\n // Add a walkTokens function to process code tokens before rendering\n this.markedInstance.use({\n walkTokens: (token: any) => {\n if (token.type === \"code\") {\n const rawCode = token.text;\n const lang = token.lang || \"\";\n\n const blockId = this.generateBlockId(rawCode);\n // Store the raw code in our map for copying\n this.codeBlocksMap.set(blockId, rawCode);\n\n const copied = this.copyStateSignal().get(blockId) || false;\n const copyLabel = copied\n ? this.labels.assistantMessageToolbarCopyCodeCopiedLabel\n : this.labels.assistantMessageToolbarCopyCodeLabel;\n\n // Manually highlight the code\n const language = hljs.getLanguage(lang) ? lang : \"plaintext\";\n const highlighted = hljs.highlight(rawCode, { language }).value;\n const codeClass = lang ? `hljs language-${lang}` : \"hljs\";\n\n // Create the full HTML with header and highlighted code\n const fullHtml = `\n <div class=\"code-block-container\">\n <div class=\"code-block-header\">\n ${lang ? `<span class=\"code-block-language\">${lang}</span>` : \"<span></span>\"}\n <button \n class=\"code-block-copy-button\" \n data-code-block-id=\"${blockId}\"\n aria-label=\"${copyLabel} code\">\n ${\n copied\n ? '<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"10\" height=\"10\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M20 6 9 17l-5-5\"/></svg>'\n : '<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"10\" height=\"10\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><rect width=\"14\" height=\"14\" x=\"8\" y=\"8\" rx=\"2\" ry=\"2\"/><path d=\"M4 16c-1.11 0-2-.9-2-2V4c0-1.11.89-2 2-2h10c1.11 0 2 .89 2 2\"/></svg>'\n }\n <span>${copyLabel}</span>\n </button>\n </div>\n <pre><code class=\"${codeClass}\">${highlighted}</code></pre>\n </div>\n `;\n\n // Store the highlighted HTML\n highlightedBlocks.set(blockId, fullHtml);\n\n // Change the token to an html token to bypass marked's escaping\n token.type = \"html\";\n token.text = fullHtml;\n }\n },\n });\n }\n\n private renderMarkdown(content: string): string {\n // Initialize marked if not already done\n this.initializeMarked();\n\n // Clear the code blocks map for new render\n this.codeBlocksMap.clear();\n\n // Parse markdown\n let html = this.markedInstance!.parse(content) as string;\n\n // Process math equations\n html = this.processMathEquations(html);\n\n return html;\n }\n\n private processMathEquations(html: string): string {\n // First, temporarily replace code blocks with placeholders to protect them from math processing\n const codeBlocks: string[] = [];\n const placeholder = \"___CODE_BLOCK_PLACEHOLDER_\";\n\n // Store code blocks and replace with placeholders\n html = html.replace(/<pre><code[\\s\\S]*?<\\/code><\\/pre>/g, (match) => {\n const index = codeBlocks.length;\n codeBlocks.push(match);\n return `${placeholder}${index}___`;\n });\n\n // Also protect inline code\n const inlineCode: string[] = [];\n const inlinePlaceholder = \"___INLINE_CODE_PLACEHOLDER_\";\n html = html.replace(/<code>[\\s\\S]*?<\\/code>/g, (match) => {\n const index = inlineCode.length;\n inlineCode.push(match);\n return `${inlinePlaceholder}${index}___`;\n });\n\n // Process display math $$ ... $$\n html = html.replace(/\\$\\$([\\s\\S]*?)\\$\\$/g, (match, equation) => {\n try {\n return katex.renderToString(equation, {\n displayMode: true,\n throwOnError: false,\n });\n } catch {\n return match;\n }\n });\n\n // Process inline math $ ... $\n html = html.replace(/\\$([^\\$]+)\\$/g, (match, equation) => {\n try {\n return katex.renderToString(equation, {\n displayMode: false,\n throwOnError: false,\n });\n } catch {\n return match;\n }\n });\n\n // Restore code blocks\n codeBlocks.forEach((block, index) => {\n html = html.replace(`${placeholder}${index}___`, block);\n });\n\n // Restore inline code\n inlineCode.forEach((code, index) => {\n html = html.replace(`${inlinePlaceholder}${index}___`, code);\n });\n\n return html;\n }\n\n private renderMathEquations(): void {\n if (!this.markdownContainer) return;\n\n const container = this.markdownContainer.nativeElement;\n\n // Find all math placeholders and render them\n const mathElements = container.querySelectorAll(\".math-placeholder\");\n mathElements.forEach((element) => {\n const equation = element.getAttribute(\"data-equation\");\n const displayMode = element.getAttribute(\"data-display\") === \"true\";\n\n if (equation) {\n try {\n katex.render(equation, element as HTMLElement, {\n displayMode,\n throwOnError: false,\n });\n } catch (error) {\n console.error(\"Failed to render math equation:\", error);\n }\n }\n });\n }\n\n handleClick(event: MouseEvent): void {\n const target = event.target as HTMLElement;\n\n // Check if clicked on copy button or its children\n const copyButton = target.closest(\n \".code-block-copy-button\"\n ) as HTMLButtonElement;\n if (copyButton) {\n event.preventDefault();\n const blockId = copyButton.getAttribute(\"data-code-block-id\");\n\n if (blockId) {\n // Get the raw code from our map instead of from DOM\n const code = this.codeBlocksMap.get(blockId);\n if (code) {\n this.copyCodeBlock(blockId, code);\n }\n }\n }\n }\n\n private copyCodeBlock(blockId: string, code: string): void {\n navigator.clipboard.writeText(code).then(\n () => {\n // Update copy state\n const newStates = new Map(this.copyStateSignal());\n newStates.set(blockId, true);\n this.copyStateSignal.set(newStates);\n\n // Update the button in the DOM\n const button = this.elementRef.nativeElement.querySelector(\n `[data-code-block-id=\"${blockId}\"]`\n );\n if (button) {\n const originalHTML = button.innerHTML;\n button.innerHTML = `\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"10\" height=\"10\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M20 6 9 17l-5-5\"/></svg>\n <span>${this.labels.assistantMessageToolbarCopyCodeCopiedLabel}</span>\n `;\n button.setAttribute(\n \"aria-label\",\n `${this.labels.assistantMessageToolbarCopyCodeCopiedLabel} code`\n );\n\n // Reset after 2 seconds\n setTimeout(() => {\n const states = new Map(this.copyStateSignal());\n states.set(blockId, false);\n this.copyStateSignal.set(states);\n button.innerHTML = originalHTML;\n button.setAttribute(\n \"aria-label\",\n `${this.labels.assistantMessageToolbarCopyCodeLabel} code`\n );\n }, 2000);\n }\n },\n (err) => {\n console.error(\"Failed to copy code:\", err);\n }\n );\n }\n\n private generateBlockId(code: string): string {\n // Simple hash function for generating unique IDs\n let hash = 0;\n for (let i = 0; i < code.length; i++) {\n const char = code.charCodeAt(i);\n hash = (hash << 5) - hash + char;\n hash = hash & hash; // Convert to 32-bit integer\n }\n return `code-block-${hash}`;\n }\n\n private escapeHtml(text: string): string {\n const div = document.createElement(\"div\");\n div.textContent = text;\n return div.innerHTML;\n }\n}\n","import {\n Component,\n Input,\n Output,\n EventEmitter,\n signal,\n computed,\n ChangeDetectionStrategy,\n ViewEncapsulation,\n inject\n} from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { LucideAngularModule, Copy, Check, ThumbsUp, ThumbsDown, Volume2, RefreshCw } from 'lucide-angular';\nimport { CopilotTooltipDirective } from '../../lib/directives/tooltip.directive';\nimport { CopilotChatConfigurationService } from '../../core/chat-configuration/chat-configuration.service';\nimport { cn } from '../../lib/utils';\n\n// Base toolbar button component\n@Component({\n selector: 'button[copilotChatAssistantMessageToolbarButton]',\n standalone: true,\n imports: [CommonModule],\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: CopilotTooltipDirective,\n inputs: ['copilotTooltip: title', 'tooltipPosition', 'tooltipDelay']\n }\n ]\n})\nexport class CopilotChatAssistantMessageToolbarButtonComponent {\n @Input() title = '';\n @Input() disabled = false;\n @Input() set inputClass(value: string | undefined) {\n this.customClass.set(value);\n }\n \n private customClass = signal<string | undefined>(undefined);\n \n computedClass = computed(() => {\n return cn(\n // Flex centering with gap (from React button base styles)\n 'inline-flex items-center justify-center gap-2',\n // Cursor\n 'cursor-pointer',\n // Background and text\n 'p-0 text-[rgb(93,93,93)] hover:bg-[#E8E8E8]',\n // Dark mode\n 'dark:text-[rgb(243,243,243)] dark:hover:bg-[#303030]',\n // Shape and sizing\n 'h-8 w-8 rounded-md',\n // Interactions\n 'transition-colors',\n // Hover states\n 'hover:text-[rgb(93,93,93)]',\n 'dark:hover:text-[rgb(243,243,243)]',\n // Focus states\n 'focus:outline-none focus:ring-2 focus:ring-offset-2',\n // Disabled state\n 'disabled:opacity-50 disabled:cursor-not-allowed',\n // SVG styling from React Button component\n '[&_svg]:pointer-events-none [&_svg]:shrink-0',\n // Ensure proper sizing\n 'shrink-0',\n this.customClass()\n );\n });\n}\n\n// Copy button component\n@Component({\n selector: 'copilot-chat-assistant-message-copy-button',\n standalone: true,\n imports: [CommonModule, LucideAngularModule, CopilotChatAssistantMessageToolbarButtonComponent],\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 @if (copied()) {\n <lucide-angular [img]=\"CheckIcon\" [size]=\"18\"></lucide-angular>\n } @else {\n <lucide-angular [img]=\"CopyIcon\" [size]=\"18\"></lucide-angular>\n }\n </button>\n `\n})\nexport class CopilotChatAssistantMessageCopyButtonComponent {\n @Input() title?: string;\n @Input() disabled = false;\n @Input() inputClass?: string;\n @Input() content?: string;\n @Output() clicked = new EventEmitter<void>();\n \n readonly CopyIcon = Copy;\n readonly CheckIcon = Check;\n \n copied = signal(false);\n private chatConfig = inject(CopilotChatConfigurationService);\n \n get labels() {\n return this.chatConfig.labels();\n }\n \n handleCopy(event?: Event): void {\n event?.stopPropagation();\n if (!this.content) return;\n \n // Set copied immediately for instant feedback\n this.copied.set(true);\n setTimeout(() => this.copied.set(false), 2000);\n \n // Copy to clipboard (fire and forget)\n navigator.clipboard.writeText(this.content).then(\n () => this.clicked.emit(),\n (err) => {\n console.error('Failed to copy message:', err);\n this.copied.set(false);\n }\n );\n }\n}\n\n// Thumbs up button component\n@Component({\n selector: 'copilot-chat-assistant-message-thumbs-up-button',\n standalone: true,\n imports: [CommonModule, LucideAngularModule, CopilotChatAssistantMessageToolbarButtonComponent],\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 <lucide-angular [img]=\"ThumbsUpIcon\" [size]=\"18\"></lucide-angular>\n </button>\n `\n})\nexport class CopilotChatAssistantMessageThumbsUpButtonComponent {\n @Input() title?: string;\n @Input() disabled = false;\n @Input() inputClass?: string;\n @Output() clicked = new EventEmitter<void>();\n \n readonly ThumbsUpIcon = ThumbsUp;\n private chatConfig = inject(CopilotChatConfigurationService);\n \n get labels() {\n return this.chatConfig.labels();\n }\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 standalone: true,\n imports: [CommonModule, LucideAngularModule, CopilotChatAssistantMessageToolbarButtonComponent],\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 <lucide-angular [img]=\"ThumbsDownIcon\" [size]=\"18\"></lucide-angular>\n </button>\n `\n})\nexport class CopilotChatAssistantMessageThumbsDownButtonComponent {\n @Input() title?: string;\n @Input() disabled = false;\n @Input() inputClass?: string;\n @Output() clicked = new EventEmitter<void>();\n \n readonly ThumbsDownIcon = ThumbsDown;\n private chatConfig = inject(CopilotChatConfigurationService);\n \n get labels() {\n return this.chatConfig.labels();\n }\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 standalone: true,\n imports: [CommonModule, LucideAngularModule, CopilotChatAssistantMessageToolbarButtonComponent],\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 <lucide-angular [img]=\"Volume2Icon\" [size]=\"20\"></lucide-angular>\n </button>\n `\n})\nexport class CopilotChatAssistantMessageReadAloudButtonComponent {\n @Input() title?: string;\n @Input() disabled = false;\n @Input() inputClass?: string;\n @Output() clicked = new EventEmitter<void>();\n \n readonly Volume2Icon = Volume2;\n private chatConfig = inject(CopilotChatConfigurationService);\n \n get labels() {\n return this.chatConfig.labels();\n }\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 standalone: true,\n imports: [CommonModule, LucideAngularModule, CopilotChatAssistantMessageToolbarButtonComponent],\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 <lucide-angular [img]=\"RefreshCwIcon\" [size]=\"18\"></lucide-angular>\n </button>\n `\n})\nexport class CopilotChatAssistantMessageRegenerateButtonComponent {\n @Input() title?: string;\n @Input() disabled = false;\n @Input() inputClass?: string;\n @Output() clicked = new EventEmitter<void>();\n \n readonly RefreshCwIcon = RefreshCw;\n private chatConfig = inject(CopilotChatConfigurationService);\n \n get labels() {\n return this.chatConfig.labels();\n }\n \n handleClick(event?: Event): void {\n event?.stopPropagation();\n if (!this.disabled) {\n this.clicked.emit();\n }\n }\n}\n","import {\n Directive,\n Input,\n signal,\n computed\n} from '@angular/core';\nimport { cn } from '../../lib/utils';\n\n@Directive({\n selector: '[copilotChatAssistantMessageToolbar]',\n standalone: true,\n host: {\n '[class]': 'computedClass()'\n }\n})\nexport class CopilotChatAssistantMessageToolbarComponent {\n @Input() set inputClass(value: string | undefined) {\n this.customClass.set(value);\n }\n \n private customClass = signal<string | undefined>(undefined);\n \n computedClass = computed(() => {\n return cn(\n 'w-full bg-transparent flex items-center -ml-[5px] -mt-[0px]',\n this.customClass()\n );\n });\n}","import { Injectable, signal } from '@angular/core';\n\n@Injectable({ providedIn: 'root' })\nexport class CopilotChatViewHandlersService {\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 Input,\n Output,\n EventEmitter,\n TemplateRef,\n ContentChild,\n signal,\n computed,\n Type,\n ChangeDetectionStrategy,\n ViewEncapsulation,\n Optional,\n Inject\n} from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { CopilotSlotComponent } from '../../lib/slots/copilot-slot.component';\nimport { CopilotChatToolCallsViewComponent } from './copilot-chat-tool-calls-view.component';\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 { CopilotChatAssistantMessageRendererComponent } from './copilot-chat-assistant-message-renderer.component';\nimport {\n CopilotChatAssistantMessageCopyButtonComponent,\n CopilotChatAssistantMessageThumbsUpButtonComponent,\n CopilotChatAssistantMessageThumbsDownButtonComponent,\n CopilotChatAssistantMessageReadAloudButtonComponent,\n CopilotChatAssistantMessageRegenerateButtonComponent\n} from './copilot-chat-assistant-message-buttons.component';\nimport { CopilotChatAssistantMessageToolbarComponent } from './copilot-chat-assistant-message-toolbar.component';\nimport { cn } from '../../lib/utils';\nimport { CopilotChatViewHandlersService } from './copilot-chat-view-handlers.service';\n\n@Component({\n selector: 'copilot-chat-assistant-message',\n standalone: true,\n imports: [\n CommonModule,\n CopilotSlotComponent,\n CopilotChatAssistantMessageRendererComponent,\n CopilotChatAssistantMessageCopyButtonComponent,\n CopilotChatAssistantMessageThumbsUpButtonComponent,\n CopilotChatAssistantMessageThumbsDownButtonComponent,\n CopilotChatAssistantMessageReadAloudButtonComponent,\n CopilotChatAssistantMessageRegenerateButtonComponent,\n CopilotChatAssistantMessageToolbarComponent,\n CopilotChatToolCallsViewComponent\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `\n <div \n [class]=\"computedClass()\"\n [attr.data-message-id]=\"message?.id\">\n \n <!-- Markdown Renderer -->\n @if (markdownRendererTemplate || markdownRendererComponent) {\n <copilot-slot\n [slot]=\"markdownRendererTemplate || markdownRendererComponent\"\n [context]=\"markdownRendererContext()\"\n [defaultComponent]=\"CopilotChatAssistantMessageRendererComponent\"\n >\n </copilot-slot>\n } @else {\n <copilot-chat-assistant-message-renderer\n [content]=\"message?.content || ''\"\n [inputClass]=\"markdownRendererClass\">\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]=\"CopilotChatToolCallsViewComponent\">\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 [isLoading]=\"isLoading\">\n </copilot-chat-tool-calls-view>\n }\n \n <!-- Toolbar: show only when there is assistant text content -->\n <ng-container *ngIf=\"toolbarVisible && hasMessageContent()\">\n @if (toolbarTemplate || toolbarComponent) {\n <copilot-slot\n [slot]=\"toolbarTemplate || toolbarComponent\"\n [context]=\"toolbarContext()\"\n [defaultComponent]=\"CopilotChatAssistantMessageToolbarComponent\"\n >\n </copilot-slot>\n } @else {\n <div copilotChatAssistantMessageToolbar [inputClass]=\"toolbarClass\">\n <div class=\"flex items-center gap-1\">\n <!-- Copy button -->\n @if (copyButtonTemplate || copyButtonComponent) {\n <copilot-slot\n [slot]=\"copyButtonTemplate || copyButtonComponent\"\n [context]=\"{ content: message?.content || '' }\"\n [defaultComponent]=\"CopilotChatAssistantMessageCopyButtonComponent\"\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 </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 (thumbsUpButtonComponent || thumbsUpButtonTemplate || handlers.hasAssistantThumbsUpHandler()) {\n <copilot-slot\n [slot]=\"thumbsUpButtonTemplate || thumbsUpButtonComponent\"\n [context]=\"{}\"\n [defaultComponent]=\"defaultThumbsUpButtonComponent\"\n [outputs]=\"thumbsUpButtonOutputs\">\n </copilot-slot>\n }\n \n <!-- Thumbs down button - show if custom slot provided OR if handler available at top level -->\n @if (thumbsDownButtonComponent || thumbsDownButtonTemplate || handlers.hasAssistantThumbsDownHandler()) {\n <copilot-slot\n [slot]=\"thumbsDownButtonTemplate || thumbsDownButtonComponent\"\n [context]=\"{}\"\n [defaultComponent]=\"defaultThumbsDownButtonComponent\"\n [outputs]=\"thumbsDownButtonOutputs\">\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 *ngTemplateOutlet=\"additionalToolbarItems\"></ng-container>\n }\n </div>\n </div>\n }\n </ng-container>\n </div>\n `,\n styles: [`\n /* Import KaTeX styles */\n @import 'katex/dist/katex.min.css';\n\n :host {\n display: block;\n width: 100%;\n }\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})\nexport class CopilotChatAssistantMessageComponent {\n // Capture templates from content projection\n @ContentChild('markdownRenderer', { read: TemplateRef }) markdownRendererTemplate?: TemplateRef<AssistantMessageMarkdownRendererContext>;\n @ContentChild('toolbar', { read: TemplateRef }) toolbarTemplate?: TemplateRef<AssistantMessageToolbarContext>;\n @ContentChild('copyButton', { read: TemplateRef }) copyButtonTemplate?: TemplateRef<AssistantMessageCopyButtonContext>;\n @ContentChild('thumbsUpButton', { read: TemplateRef }) thumbsUpButtonTemplate?: TemplateRef<ThumbsUpButtonContext>;\n @ContentChild('thumbsDownButton', { read: TemplateRef }) thumbsDownButtonTemplate?: TemplateRef<ThumbsDownButtonContext>;\n @ContentChild('readAloudButton', { read: TemplateRef }) readAloudButtonTemplate?: TemplateRef<ReadAloudButtonContext>;\n @ContentChild('regenerateButton', { read: TemplateRef }) regenerateButtonTemplate?: TemplateRef<RegenerateButtonContext>;\n @ContentChild('toolCallsView', { read: TemplateRef }) toolCallsViewTemplate?: TemplateRef<any>;\n \n // Class inputs for styling default components\n @Input() markdownRendererClass?: string;\n @Input() toolbarClass?: string;\n @Input() copyButtonClass?: string;\n @Input() thumbsUpButtonClass?: string;\n @Input() thumbsDownButtonClass?: string;\n @Input() readAloudButtonClass?: string;\n @Input() regenerateButtonClass?: string;\n @Input() toolCallsViewClass?: string;\n \n // Component inputs for overrides\n @Input() markdownRendererComponent?: Type<any>;\n @Input() toolbarComponent?: Type<any>;\n @Input() copyButtonComponent?: Type<any>;\n @Input() thumbsUpButtonComponent?: Type<any>;\n @Input() thumbsDownButtonComponent?: Type<any>;\n @Input() readAloudButtonComponent?: Type<any>;\n @Input() regenerateButtonComponent?: Type<any>;\n @Input() toolCallsViewComponent?: Type<any>;\n \n // Regular inputs\n @Input() message!: AssistantMessage;\n @Input() messages: Message[] = [];\n @Input() isLoading = false;\n @Input() additionalToolbarItems?: TemplateRef<any>;\n @Input() toolbarVisible = true;\n @Input() set inputClass(val: string | undefined) {\n this.customClass.set(val);\n }\n \n // DI service exposes handler availability scoped to CopilotChatView\n // Make it optional with a default fallback for testing\n handlers: CopilotChatViewHandlersService;\n \n constructor(@Optional() @Inject(CopilotChatViewHandlersService) handlers?: CopilotChatViewHandlersService | null) {\n this.handlers = handlers || new CopilotChatViewHandlersService();\n }\n \n // Output events\n @Output() thumbsUp = new EventEmitter<CopilotChatAssistantMessageOnThumbsUpProps>();\n @Output() thumbsDown = new EventEmitter<CopilotChatAssistantMessageOnThumbsDownProps>();\n @Output() readAloud = new EventEmitter<CopilotChatAssistantMessageOnReadAloudProps>();\n @Output() regenerate = new EventEmitter<CopilotChatAssistantMessageOnRegenerateProps>();\n \n // Signals\n customClass = signal<string | undefined>(undefined);\n \n // Computed values\n computedClass = computed(() => {\n return cn(\n \"prose max-w-full break-words dark:prose-invert\",\n this.customClass()\n );\n });\n \n // Default components\n protected readonly defaultThumbsUpButtonComponent = CopilotChatAssistantMessageThumbsUpButtonComponent;\n protected readonly defaultThumbsDownButtonComponent = CopilotChatAssistantMessageThumbsDownButtonComponent;\n protected readonly CopilotChatAssistantMessageRendererComponent = CopilotChatAssistantMessageRendererComponent;\n protected readonly CopilotChatAssistantMessageToolbarComponent = CopilotChatAssistantMessageToolbarComponent;\n protected readonly CopilotChatAssistantMessageCopyButtonComponent = CopilotChatAssistantMessageCopyButtonComponent;\n protected readonly CopilotChatToolCallsViewComponent = CopilotChatToolCallsViewComponent;\n \n // Context for slots (reactive via signals)\n markdownRendererContext = computed<AssistantMessageMarkdownRendererContext>(() => ({\n content: this.message?.content || ''\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 const raw = (this.message?.content ?? '') as any;\n const content = typeof raw === 'string' ? raw : String(raw ?? '');\n return 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 signal,\n OnInit,\n OnChanges\n} from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { cn } from '../../lib/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 standalone: true,\n imports: [CommonModule],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `\n <div\n [class]=\"computedClass()\"\n ></div>\n `\n})\nexport class CopilotChatMessageViewCursorComponent implements OnInit, OnChanges {\n @Input() inputClass?: string;\n \n // Signal for reactive class updates\n private inputClassSignal = signal<string | undefined>(undefined);\n \n // Computed class that matches React exactly: w-[11px] h-[11px] rounded-full bg-foreground animate-pulse-cursor ml-1\n computedClass = computed(() => \n cn(\n 'w-[11px] h-[11px] rounded-full bg-foreground animate-pulse-cursor ml-1',\n this.inputClassSignal()\n )\n );\n \n ngOnInit() {\n this.inputClassSignal.set(this.inputClass);\n }\n \n ngOnChanges() {\n this.inputClassSignal.set(this.inputClass);\n }\n}","import {\n Component,\n Input,\n Output,\n EventEmitter,\n ContentChild,\n TemplateRef,\n Type,\n ChangeDetectionStrategy,\n ViewEncapsulation,\n signal,\n computed,\n OnInit,\n OnChanges\n} from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { CopilotSlotComponent } from '../../lib/slots/copilot-slot.component';\nimport type { Message } from '@ag-ui/core';\nimport { CopilotChatAssistantMessageComponent } from './copilot-chat-assistant-message.component';\nimport { CopilotChatUserMessageComponent } from './copilot-chat-user-message.component';\nimport { CopilotChatMessageViewCursorComponent } from './copilot-chat-message-view-cursor.component';\nimport { cn } from '../../lib/utils';\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 standalone: true,\n imports: [\n CommonModule,\n CopilotSlotComponent,\n CopilotChatAssistantMessageComponent,\n CopilotChatUserMessageComponent,\n CopilotChatMessageViewCursorComponent\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 *ngTemplateOutlet=\"customLayoutTemplate; context: layoutContext()\"></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 messagesSignal(); track trackByMessageId($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 </copilot-slot>\n } @else {\n <copilot-chat-assistant-message \n [message]=\"message\"\n [messages]=\"messagesSignal()\"\n [isLoading]=\"isLoadingSignal()\"\n [inputClass]=\"assistantMessageClass\"\n (thumbsUp)=\"handleAssistantThumbsUp($event)\"\n (thumbsDown)=\"handleAssistantThumbsDown($event)\"\n (readAloud)=\"handleAssistantReadAloud($event)\"\n (regenerate)=\"handleAssistantRegenerate($event)\">\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 </copilot-slot>\n } @else {\n <copilot-chat-user-message \n [message]=\"message\"\n [inputClass]=\"userMessageClass\">\n </copilot-chat-user-message>\n }\n }\n }\n \n <!-- Cursor - exactly like React's conditional rendering -->\n @if (showCursor) {\n @if (cursorComponent || cursorTemplate) {\n <copilot-slot\n [slot]=\"cursorTemplate || cursorComponent\"\n [context]=\"{ inputClass: cursorClass }\"\n [defaultComponent]=\"defaultCursorComponent\">\n </copilot-slot>\n } @else {\n <copilot-chat-message-view-cursor \n [inputClass]=\"cursorClass\">\n </copilot-chat-message-view-cursor>\n }\n }\n </div>\n }\n `\n})\nexport class CopilotChatMessageViewComponent implements OnInit, OnChanges {\n // Core inputs matching React props\n @Input() messages: Message[] = [];\n @Input() showCursor = false;\n @Input() isLoading = false;\n @Input() inputClass?: string;\n \n // Handler availability handled via DI service\n \n // Assistant message slot inputs\n @Input() assistantMessageComponent?: Type<any>;\n @Input() assistantMessageTemplate?: TemplateRef<any>;\n @Input() assistantMessageClass?: string;\n \n // User message slot inputs\n @Input() userMessageComponent?: Type<any>;\n @Input() userMessageTemplate?: TemplateRef<any>;\n @Input() userMessageClass?: string;\n \n \n // Cursor slot inputs\n @Input() cursorComponent?: Type<any>;\n @Input() cursorTemplate?: TemplateRef<any>;\n @Input() cursorClass?: string;\n \n // Custom layout template (render prop pattern)\n @ContentChild('customLayout') customLayoutTemplate?: TemplateRef<any>;\n \n // Output events (bubbled from child components)\n @Output() assistantMessageThumbsUp = new EventEmitter<{ message: Message }>();\n @Output() assistantMessageThumbsDown = new EventEmitter<{ message: Message }>();\n @Output() assistantMessageReadAloud = new EventEmitter<{ message: Message }>();\n @Output() assistantMessageRegenerate = new EventEmitter<{ message: Message }>();\n @Output() userMessageCopy = new EventEmitter<{ message: Message }>();\n @Output() userMessageEdit = new EventEmitter<{ message: Message }>();\n \n // Default components for slots\n protected readonly defaultAssistantComponent = CopilotChatAssistantMessageComponent;\n protected readonly defaultUserComponent = CopilotChatUserMessageComponent;\n protected readonly defaultCursorComponent = CopilotChatMessageViewCursorComponent;\n \n // Signals for reactive updates\n protected messagesSignal = signal<Message[]>([]);\n protected showCursorSignal = signal(false);\n protected isLoadingSignal = signal(false);\n protected inputClassSignal = signal<string | undefined>(undefined);\n \n // Computed class matching React: twMerge(\"flex flex-col\", className)\n computedClass = computed(() => \n cn('flex flex-col', this.inputClassSignal())\n );\n \n \n // Layout context for custom templates (render prop pattern)\n layoutContext = computed(() => ({\n isLoading: this.isLoadingSignal(),\n messages: this.messagesSignal(),\n showCursor: this.showCursorSignal(),\n messageElements: this.messagesSignal().filter(m => m && (m.role === 'assistant' || m.role === 'user'))\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(() => \n this.cursorComponent || this.cursorClass\n );\n \n // Props merging helpers\n mergeAssistantProps(message: Message) {\n return {\n message,\n messages: this.messagesSignal(),\n isLoading: this.isLoadingSignal(),\n inputClass: this.assistantMessageClass\n };\n }\n \n mergeUserProps(message: Message) {\n return {\n message,\n inputClass: this.userMessageClass\n };\n }\n \n // TrackBy function for performance optimization\n trackByMessageId(index: number, message: Message): string {\n return message?.id || `index-${index}`;\n }\n \n // Lifecycle hooks\n ngOnInit() {\n // Initialize signals with input values\n this.messagesSignal.set(this.messages);\n this.showCursorSignal.set(this.showCursor);\n this.isLoadingSignal.set(this.isLoading);\n this.inputClassSignal.set(this.inputClass);\n }\n \n ngOnChanges() {\n this.messagesSignal.set(this.messages);\n this.showCursorSignal.set(this.showCursor);\n this.isLoadingSignal.set(this.isLoading);\n this.inputClassSignal.set(this.inputClass);\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 EventEmitter,\n ChangeDetectionStrategy,\n ViewEncapsulation\n} from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { LucideAngularModule, ChevronDown } from 'lucide-angular';\nimport { cn } from '../../lib/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 standalone: true,\n imports: [CommonModule, LucideAngularModule],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `\n <button\n type=\"button\"\n [class]=\"computedClass\"\n [disabled]=\"disabled\"\n (click)=\"handleClick()\">\n <lucide-angular\n [img]=\"ChevronDown\"\n class=\"w-4 h-4 text-gray-600 dark:text-white\">\n </lucide-angular>\n </button>\n `\n})\nexport class CopilotChatViewScrollToBottomButtonComponent {\n @Input() inputClass?: string;\n @Input() disabled: boolean = false;\n // Support function-style click handler via slot context\n @Input() onClick?: () => void;\n \n // Simple, idiomatic Angular output\n @Output() clicked = new EventEmitter<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 'rounded-full w-10 h-10 p-0',\n // Background colors\n 'bg-white dark:bg-gray-900',\n // Border and shadow\n 'shadow-lg border border-gray-200 dark:border-gray-700',\n // Hover states\n 'hover:bg-gray-50 dark:hover:bg-gray-800',\n // Layout\n 'flex items-center justify-center cursor-pointer',\n // Transition\n 'transition-colors',\n // Focus states\n 'focus:outline-none focus-visible:ring-2 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 { Injectable, ElementRef, NgZone, OnDestroy } from '@angular/core';\nimport { ScrollDispatcher, ViewportRuler } from '@angular/cdk/scrolling';\nimport { Observable, Subject, BehaviorSubject, fromEvent, merge, animationFrameScheduler } from 'rxjs';\nimport { \n takeUntil, \n debounceTime, \n throttleTime, \n distinctUntilChanged,\n map,\n observeOn,\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 ScrollPositionService 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((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(\n debounceTime(debounceMs),\n takeUntil(this.destroy$)\n );\n }\n \n ngOnDestroy(): void {\n this.destroy$.next();\n this.destroy$.complete();\n this.scrollStateSubject.complete();\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((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): { width: number; height: number } {\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(element: ElementRef<HTMLElement> | HTMLElement): 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}","import {\n Directive,\n Input,\n Output,\n EventEmitter,\n ElementRef,\n OnInit,\n OnDestroy,\n AfterViewInit,\n inject\n} from '@angular/core';\nimport { ScrollPositionService } from '../services/scroll-position.service';\nimport { ResizeObserverService } from '../services/resize-observer.service';\nimport { Subject, combineLatest, merge } from 'rxjs';\nimport { takeUntil, debounceTime, filter, distinctUntilChanged } 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 selector: '[copilotStickToBottom]',\n standalone: true,\n providers: [ScrollPositionService, ResizeObserverService]\n})\nexport class StickToBottomDirective implements OnInit, AfterViewInit, OnDestroy {\n @Input() enabled: boolean = true;\n @Input() threshold: number = 10;\n @Input() initialBehavior: ScrollBehavior = 'smooth';\n @Input() resizeBehavior: ScrollBehavior = 'smooth';\n @Input() debounceMs: number = 100;\n \n @Output() isAtBottomChange = new EventEmitter<boolean>();\n @Output() scrollToBottomRequested = new EventEmitter<void>();\n \n private elementRef = inject(ElementRef);\n private scrollService = inject(ScrollPositionService);\n private resizeService = inject(ResizeObserverService);\n \n private destroy$ = new Subject<void>();\n private contentElement?: HTMLElement;\n private wasAtBottom = true;\n private hasInitialized = false;\n private userHasScrolled = false;\n \n ngOnInit(): void {\n // Setup will happen in ngAfterViewInit\n }\n \n ngAfterViewInit(): void {\n const element = this.elementRef.nativeElement as HTMLElement;\n \n // Find or create content wrapper\n this.contentElement = element.querySelector('[data-stick-to-bottom-content]') as HTMLElement;\n if (!this.contentElement) {\n this.contentElement = element;\n }\n \n this.setupScrollMonitoring();\n this.setupResizeMonitoring();\n this.setupContentMutationObserver();\n \n // Initial scroll to bottom if enabled\n setTimeout(() => {\n this.hasInitialized = true;\n if (this.enabled) {\n this.scrollToBottom(this.initialBehavior);\n }\n }, 0);\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.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.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.observeElement(element, 0, 250)\n .pipe(\n takeUntil(this.destroy$),\n filter(() => this.enabled && !this.userHasScrolled && this.wasAtBottom)\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(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.destroy$.next();\n this.destroy$.complete();\n }\n}","import {\n Component,\n Input,\n Output,\n EventEmitter,\n ViewChild,\n ElementRef,\n ChangeDetectionStrategy,\n ViewEncapsulation,\n signal,\n computed,\n OnInit,\n OnChanges,\n AfterViewInit,\n OnDestroy,\n inject,\n PLATFORM_ID,\n ChangeDetectorRef\n} from '@angular/core';\nimport { CommonModule, isPlatformBrowser } from '@angular/common';\nimport { CdkScrollable, ScrollingModule } from '@angular/cdk/scrolling';\nimport { CopilotSlotComponent } from '../../lib/slots/copilot-slot.component';\nimport { CopilotChatMessageViewComponent } from './copilot-chat-message-view.component';\nimport { CopilotChatViewScrollToBottomButtonComponent } from './copilot-chat-view-scroll-to-bottom-button.component';\nimport { StickToBottomDirective } from '../../directives/stick-to-bottom.directive';\nimport { ScrollPositionService } from '../../services/scroll-position.service';\nimport { Message } from '@ag-ui/client';\nimport { cn } from '../../lib/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 standalone: true,\n imports: [\n CommonModule,\n ScrollingModule,\n CopilotSlotComponent,\n CopilotChatMessageViewComponent,\n CopilotChatViewScrollToBottomButtonComponent,\n StickToBottomDirective\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [ScrollPositionService],\n template: `\n @if (!hasMounted()) {\n <!-- SSR/Initial render without stick-to-bottom -->\n <div class=\"h-full max-h-full flex flex-col min-h-0 overflow-y-scroll overflow-x-hidden\">\n <div class=\"px-4 sm:px-0\">\n <ng-content></ng-content>\n </div>\n </div>\n } @else if (!autoScroll) {\n <!-- Manual scroll mode -->\n <div class=\"h-full max-h-full flex flex-col min-h-0 relative\">\n <div \n #scrollContainer\n cdkScrollable\n [class]=\"computedClass()\"\n class=\"overflow-y-scroll overflow-x-hidden\">\n <div #contentContainer class=\"px-4 sm:px-0\">\n <!-- Content with padding-bottom matching React -->\n <div [style.padding-bottom.px]=\"paddingBottom()\">\n <div class=\"max-w-3xl mx-auto\">\n @if (messageView) {\n <copilot-slot\n [slot]=\"messageView\"\n [context]=\"messageViewContext()\"\n [defaultComponent]=\"defaultMessageViewComponent\">\n </copilot-slot>\n } @else {\n <copilot-chat-message-view\n [messages]=\"messages\"\n [inputClass]=\"messageViewClass\"\n [showCursor]=\"showCursor\"\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 </copilot-chat-message-view>\n }\n </div>\n </div>\n </div>\n </div>\n \n <!-- Scroll to bottom button for manual mode, OUTSIDE scrollable content -->\n @if (showScrollButton() && !isResizing) {\n <div\n class=\"absolute inset-x-0 flex justify-center z-30\"\n [style.bottom.px]=\"inputContainerHeightSignal() + 16\">\n <copilot-slot\n [slot]=\"scrollToBottomButton\"\n [context]=\"scrollToBottomContext()\"\n [defaultComponent]=\"defaultScrollToBottomButtonComponent\"\n [outputs]=\"scrollToBottomOutputs\">\n </copilot-slot>\n </div>\n }\n </div>\n } @else {\n <!-- Auto-scroll mode with StickToBottom directive -->\n <div class=\"h-full max-h-full flex flex-col min-h-0 relative\">\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=\"overflow-y-scroll overflow-x-hidden\">\n \n <!-- Scrollable content wrapper -->\n <div class=\"px-4 sm:px-0\">\n <!-- Content with padding-bottom matching React -->\n <div [style.padding-bottom.px]=\"paddingBottom()\">\n <div class=\"max-w-3xl mx-auto\">\n @if (messageView) {\n <copilot-slot\n [slot]=\"messageView\"\n [context]=\"messageViewContext()\"\n [defaultComponent]=\"defaultMessageViewComponent\">\n </copilot-slot>\n } @else {\n <copilot-chat-message-view\n [messages]=\"messages\"\n [inputClass]=\"messageViewClass\"\n [showCursor]=\"showCursor\"\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 </copilot-chat-message-view>\n }\n </div>\n </div>\n </div>\n </div>\n \n <!-- Scroll to bottom button - hidden during resize, OUTSIDE scrollable content -->\n @if (!isAtBottom() && !isResizing) {\n <div\n class=\"absolute inset-x-0 flex justify-center z-30\"\n [style.bottom.px]=\"inputContainerHeightSignal() + 16\">\n <copilot-slot\n [slot]=\"scrollToBottomButton\"\n [context]=\"scrollToBottomFromStickContext()\"\n [defaultComponent]=\"defaultScrollToBottomButtonComponent\"\n [outputs]=\"scrollToBottomFromStickOutputs\">\n </copilot-slot>\n </div>\n }\n </div>\n }\n `\n})\nexport class CopilotChatViewScrollViewComponent implements OnInit, OnChanges, AfterViewInit, OnDestroy {\n private cdr = inject(ChangeDetectorRef);\n \n @Input() autoScroll: boolean = true;\n \n private _inputContainerHeight: number = 0;\n @Input() \n set inputContainerHeight(value: number) {\n this._inputContainerHeight = value;\n this.inputContainerHeightSignal.set(value);\n this.cdr.markForCheck();\n }\n get inputContainerHeight(): number {\n return this._inputContainerHeight;\n }\n \n @Input() isResizing: boolean = false;\n @Input() inputClass?: string;\n @Input() messages: Message[] = [];\n @Input() messageView?: any;\n @Input() messageViewClass?: string;\n @Input() showCursor: boolean = false;\n \n // Handler availability flags removed in favor of DI service\n \n // Slot inputs\n @Input() scrollToBottomButton?: any;\n @Input() scrollToBottomButtonClass?: string;\n \n // Output events (bubbled from message view)\n @Output() assistantMessageThumbsUp = new EventEmitter<{ message: Message }>();\n @Output() assistantMessageThumbsDown = new EventEmitter<{ message: Message }>();\n @Output() assistantMessageReadAloud = new EventEmitter<{ message: Message }>();\n @Output() assistantMessageRegenerate = new EventEmitter<{ message: Message }>();\n @Output() userMessageCopy = new EventEmitter<{ message: Message }>();\n @Output() userMessageEdit = new EventEmitter<{ message: Message }>();\n \n // ViewChild references\n @ViewChild('scrollContainer', { read: ElementRef }) scrollContainer?: ElementRef<HTMLElement>;\n @ViewChild('contentContainer', { read: ElementRef }) contentContainer?: ElementRef<HTMLElement>;\n @ViewChild(StickToBottomDirective) stickToBottomDirective?: StickToBottomDirective;\n \n // Default components\n protected readonly defaultMessageViewComponent = CopilotChatMessageViewComponent;\n protected readonly defaultScrollToBottomButtonComponent = CopilotChatViewScrollToBottomButtonComponent;\n \n // Signals\n protected hasMounted = signal(false);\n protected showScrollButton = signal(false);\n protected isAtBottom = signal(true);\n protected inputContainerHeightSignal = signal(0);\n protected paddingBottom = computed(() => this.inputContainerHeightSignal() + 32);\n \n // Computed class\n protected computedClass = computed(() => \n cn(this.inputClass)\n );\n \n private destroy$ = new Subject<void>();\n private platformId = inject(PLATFORM_ID);\n private scrollPositionService = inject(ScrollPositionService);\n \n ngOnInit(): void {\n // Check if we're in the browser\n if (isPlatformBrowser(this.platformId)) {\n // Set mounted after a tick to allow for hydration\n setTimeout(() => {\n this.hasMounted.set(true);\n }, 0);\n }\n }\n \n ngOnChanges(): void {\n // Update signals when inputs change\n // Force change detection when inputContainerHeight changes\n if (this.inputContainerHeight !== undefined) {\n this.cdr.detectChanges();\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(this.scrollContainer.nativeElement, 10);\n this.showScrollButton.set(!initialState.isAtBottom);\n \n // Monitor scroll position for manual mode\n this.scrollPositionService.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 = { clicked: () => this.scrollToBottomFromStick() };\n \n // Context methods for templates\n messageViewContext(): any {\n return { messages: this.messages, inputClass: this.messageViewClass, showCursor: this.showCursor };\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","import {\n Component,\n Input,\n ChangeDetectionStrategy,\n ViewEncapsulation\n} from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { cn } from '../../lib/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 standalone: true,\n imports: [CommonModule],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `\n <div \n [class]=\"computedClass\"\n [style]=\"style\">\n </div>\n `\n})\nexport class CopilotChatViewFeatherComponent {\n @Input() inputClass?: string;\n @Input() style?: { [key: string]: any };\n \n // Computed class matching React exactly\n get computedClass(): string {\n return cn(\n // Positioning\n 'absolute bottom-0 left-0 right-4 h-24 pointer-events-none z-10',\n // Gradient\n 'bg-gradient-to-t',\n // Light mode colors\n 'from-white via-white to-transparent',\n // Dark mode colors\n 'dark:from-[rgb(33,33,33)] dark:via-[rgb(33,33,33)]',\n // Custom classes\n this.inputClass\n );\n }\n}\n","import {\n Component,\n Input,\n ChangeDetectionStrategy,\n ViewEncapsulation,\n inject,\n} from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\nimport { CopilotChatConfigurationService } from \"../../core/chat-configuration/chat-configuration.service\";\nimport { cn } from \"../../lib/utils\";\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 standalone: true,\n imports: [CommonModule],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `\n <div [class]=\"computedClass\">\n {{ disclaimerText }}\n </div>\n `,\n})\nexport class CopilotChatViewDisclaimerComponent {\n @Input() inputClass?: string;\n @Input() text?: string;\n\n private configService = inject(CopilotChatConfigurationService);\n\n // Get disclaimer text from input or configuration\n get disclaimerText(): string {\n if (this.text) {\n return this.text;\n }\n\n return this.configService.labels().chatDisclaimerText;\n }\n\n // Computed class matching React exactly\n get computedClass(): string {\n return cn(\n \"text-center text-xs text-muted-foreground py-3 px-4 max-w-3xl mx-auto\",\n this.inputClass\n );\n }\n}\n","import {\n Component,\n Input,\n ChangeDetectionStrategy,\n ViewEncapsulation,\n forwardRef,\n ElementRef\n} from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { CopilotSlotComponent } from '../../lib/slots/copilot-slot.component';\nimport { CopilotChatInputComponent } from './copilot-chat-input.component';\nimport { CopilotChatViewDisclaimerComponent } from './copilot-chat-view-disclaimer.component';\nimport { cn } from '../../lib/utils';\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 standalone: true,\n imports: [\n CommonModule,\n CopilotSlotComponent,\n CopilotChatInputComponent,\n CopilotChatViewDisclaimerComponent\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [\n {\n provide: ElementRef,\n useExisting: forwardRef(() => CopilotChatViewInputContainerComponent)\n }\n ],\n template: `\n <div [class]=\"computedClass\">\n <!-- Input component -->\n <div class=\"max-w-3xl mx-auto py-0 px-4 sm:px-0\">\n <copilot-slot\n [slot]=\"input\"\n [context]=\"{ inputClass: inputClass }\"\n [defaultComponent]=\"defaultInputComponent\">\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 </copilot-slot>\n </div>\n `\n})\nexport class CopilotChatViewInputContainerComponent extends ElementRef {\n @Input() inputContainerClass?: string;\n \n // Input slot configuration\n @Input() input?: any;\n @Input() inputClass?: string;\n \n // Disclaimer slot configuration\n @Input() disclaimer?: any;\n @Input() disclaimerText?: string;\n @Input() disclaimerClass?: string;\n \n // Default components\n protected readonly defaultInputComponent = CopilotChatInputComponent;\n protected readonly defaultDisclaimerComponent = CopilotChatViewDisclaimerComponent;\n \n constructor(elementRef: ElementRef) {\n super(elementRef.nativeElement);\n }\n \n \n // Computed class matching React exactly\n get computedClass(): string {\n return cn(\n 'absolute bottom-0 left-0 right-0 z-20',\n this.inputContainerClass\n );\n }\n \n // Removed mergedInputContext - no longer needed\n}\n","import {\n Component,\n Input,\n Output,\n EventEmitter,\n ContentChild,\n TemplateRef,\n Type,\n ViewChild,\n ElementRef,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n ViewEncapsulation,\n signal,\n computed,\n OnInit,\n OnChanges,\n OnDestroy,\n AfterViewInit,\n ViewContainerRef,\n effect\n} from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { CopilotSlotComponent } from '../../lib/slots/copilot-slot.component';\nimport { CopilotChatMessageViewComponent } from './copilot-chat-message-view.component';\nimport { CopilotChatInputComponent } from './copilot-chat-input.component';\nimport { CopilotChatViewScrollViewComponent } from './copilot-chat-view-scroll-view.component';\nimport { CopilotChatViewScrollToBottomButtonComponent } from './copilot-chat-view-scroll-to-bottom-button.component';\nimport { CopilotChatViewFeatherComponent } from './copilot-chat-view-feather.component';\nimport { CopilotChatViewInputContainerComponent } from './copilot-chat-view-input-container.component';\nimport { CopilotChatViewDisclaimerComponent } from './copilot-chat-view-disclaimer.component';\nimport { Message } from '@ag-ui/client';\nimport { cn } from '../../lib/utils';\nimport { ResizeObserverService } from '../../services/resize-observer.service';\nimport { CopilotChatViewHandlersService } from './copilot-chat-view-handlers.service';\nimport { Subject } from 'rxjs';\nimport { takeUntil } from 'rxjs/operators';\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 standalone: true,\n imports: [\n CommonModule,\n CopilotSlotComponent,\n CopilotChatMessageViewComponent,\n CopilotChatInputComponent,\n CopilotChatViewScrollViewComponent,\n CopilotChatViewScrollToBottomButtonComponent,\n CopilotChatViewFeatherComponent,\n CopilotChatViewInputContainerComponent,\n CopilotChatViewDisclaimerComponent\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [ResizeObserverService, CopilotChatViewHandlersService],\n template: `\n <!-- Custom layout template support (render prop pattern) -->\n @if (customLayoutTemplate) {\n <ng-container *ngTemplateOutlet=\"customLayoutTemplate; context: layoutContext()\"></ng-container>\n } @else {\n <!-- Default layout - exact React DOM structure -->\n <div [class]=\"computedClass()\">\n <!-- ScrollView -->\n <copilot-chat-view-scroll-view\n [autoScroll]=\"autoScrollSignal()\"\n [inputContainerHeight]=\"inputContainerHeight()\"\n [isResizing]=\"isResizing()\"\n [messages]=\"messagesSignal()\"\n [messageView]=\"messageViewSlot()\"\n [messageViewClass]=\"messageViewClass\"\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 </copilot-chat-view-scroll-view>\n\n <!-- Feather effect -->\n <copilot-slot\n [slot]=\"featherSlot()\"\n [context]=\"{ inputClass: featherClass }\"\n [defaultComponent]=\"defaultFeatherComponent\">\n </copilot-slot>\n\n <!-- Input container -->\n <copilot-slot\n #inputContainerSlotRef\n [slot]=\"inputContainerSlot()\"\n [context]=\"inputContainerContext()\"\n [defaultComponent]=\"defaultInputContainerComponent\">\n </copilot-slot>\n </div>\n }\n `\n})\nexport class CopilotChatViewComponent implements OnInit, OnChanges, AfterViewInit, OnDestroy {\n // Core inputs matching React props\n @Input() messages: Message[] = [];\n @Input() autoScroll: boolean = true;\n @Input() showCursor: boolean = false;\n \n // MessageView slot inputs\n @Input() messageViewComponent?: Type<any>;\n @Input() messageViewTemplate?: TemplateRef<any>;\n @Input() messageViewClass?: string;\n \n // ScrollView slot inputs\n @Input() scrollViewComponent?: Type<any>;\n @Input() scrollViewTemplate?: TemplateRef<any>;\n @Input() scrollViewClass?: string;\n \n // ScrollToBottomButton slot inputs\n @Input() scrollToBottomButtonComponent?: Type<any>;\n @Input() scrollToBottomButtonTemplate?: TemplateRef<any>;\n @Input() scrollToBottomButtonClass?: string;\n \n // Input slot inputs\n @Input() inputComponent?: Type<any>;\n @Input() inputTemplate?: TemplateRef<any>;\n \n // InputContainer slot inputs\n @Input() inputContainerComponent?: Type<any>;\n @Input() inputContainerTemplate?: TemplateRef<any>;\n @Input() inputContainerClass?: string;\n \n // Feather slot inputs\n @Input() featherComponent?: Type<any>;\n @Input() featherTemplate?: TemplateRef<any>;\n @Input() featherClass?: string;\n \n // Disclaimer slot inputs\n @Input() disclaimerComponent?: Type<any>;\n @Input() disclaimerTemplate?: TemplateRef<any>;\n @Input() disclaimerClass?: string;\n @Input() disclaimerText?: string;\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') 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 @Output() assistantMessageThumbsUp = new EventEmitter<{ message: Message }>();\n @Output() assistantMessageThumbsDown = new EventEmitter<{ message: Message }>();\n @Output() assistantMessageReadAloud = new EventEmitter<{ message: Message }>();\n @Output() assistantMessageRegenerate = new EventEmitter<{ message: Message }>();\n \n // Output events for user message actions (if applicable)\n @Output() userMessageCopy = new EventEmitter<{ message: Message }>();\n @Output() userMessageEdit = new EventEmitter<{ message: Message }>();\n \n // ViewChild references\n @ViewChild('inputContainerSlotRef', { read: ElementRef }) inputContainerSlotRef?: ElementRef;\n \n // Default components for slots\n protected readonly defaultScrollViewComponent = CopilotChatViewScrollViewComponent;\n protected readonly defaultScrollToBottomButtonComponent = CopilotChatViewScrollToBottomButtonComponent;\n protected readonly defaultInputContainerComponent = CopilotChatViewInputContainerComponent;\n protected readonly defaultFeatherComponent = CopilotChatViewFeatherComponent;\n protected readonly defaultDisclaimerComponent = CopilotChatViewDisclaimerComponent;\n \n // Signals for reactive state\n protected messagesSignal = signal<Message[]>([]);\n protected autoScrollSignal = signal(true);\n protected showCursorSignal = signal(false);\n protected disclaimerTextSignal = signal<string | undefined>(undefined);\n protected disclaimerClassSignal = signal<string | undefined>(undefined);\n protected inputContainerHeight = signal<number>(0);\n protected isResizing = signal<boolean>(false);\n protected contentPaddingBottom = computed(() => this.inputContainerHeight() + 32);\n \n // Computed signals\n protected computedClass = computed(() => cn('relative h-full'));\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 this.scrollToBottomButtonTemplate || 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.messagesSignal(),\n messageView: this.messageViewSlot(),\n messageViewClass: this.messageViewClass\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 private destroy$ = new Subject<void>();\n private resizeTimeoutRef?: number;\n \n constructor(\n private resizeObserverService: ResizeObserverService,\n private cdr: ChangeDetectorRef,\n private handlers: CopilotChatViewHandlersService\n ) {\n // Set up effect to handle resize state timeout\n effect(() => {\n const resizing = this.isResizing();\n if (resizing && this.resizeTimeoutRef) {\n clearTimeout(this.resizeTimeoutRef);\n this.resizeTimeoutRef = undefined;\n }\n });\n }\n \n ngOnInit(): void {\n // Initialize signals with input values\n this.messagesSignal.set(this.messages);\n this.autoScrollSignal.set(this.autoScroll);\n this.showCursorSignal.set(this.showCursor);\n this.disclaimerTextSignal.set(this.disclaimerText);\n this.disclaimerClassSignal.set(this.disclaimerClass);\n\n // Initialize handler availability in the view-scoped service\n this.handlers.hasAssistantThumbsUpHandler.set(this.assistantMessageThumbsUp.observed);\n this.handlers.hasAssistantThumbsDownHandler.set(this.assistantMessageThumbsDown.observed);\n this.handlers.hasAssistantReadAloudHandler.set(this.assistantMessageReadAloud.observed);\n this.handlers.hasAssistantRegenerateHandler.set(this.assistantMessageRegenerate.observed);\n this.handlers.hasUserCopyHandler.set(this.userMessageCopy.observed);\n this.handlers.hasUserEditHandler.set(this.userMessageEdit.observed);\n }\n \n ngOnChanges(): void {\n // Update signals when inputs change\n this.messagesSignal.set(this.messages);\n this.autoScrollSignal.set(this.autoScroll);\n this.showCursorSignal.set(this.showCursor);\n this.disclaimerTextSignal.set(this.disclaimerText);\n this.disclaimerClassSignal.set(this.disclaimerClass);\n\n // Keep handler availability in sync\n this.handlers.hasAssistantThumbsUpHandler.set(this.assistantMessageThumbsUp.observed);\n this.handlers.hasAssistantThumbsDownHandler.set(this.assistantMessageThumbsDown.observed);\n this.handlers.hasAssistantReadAloudHandler.set(this.assistantMessageReadAloud.observed);\n this.handlers.hasAssistantRegenerateHandler.set(this.assistantMessageRegenerate.observed);\n this.handlers.hasUserCopyHandler.set(this.userMessageCopy.observed);\n this.handlers.hasUserEditHandler.set(this.userMessageEdit.observed);\n }\n \n ngAfterViewInit(): void {\n // Don't set a default height - measure it dynamically\n \n // Set up input container height monitoring\n const measureAndObserve = () => {\n if (!this.inputContainerSlotRef || !this.inputContainerSlotRef.nativeElement) {\n return false;\n }\n \n // The slot ref points to the copilot-slot element\n // We need to find the actual input container component inside it\n const slotElement = this.inputContainerSlotRef.nativeElement;\n const componentElement = slotElement.querySelector('copilot-chat-view-input-container');\n \n if (!componentElement) {\n return false;\n }\n \n // Look for the absolute positioned div that contains the input\n let innerDiv = componentElement.querySelector('div.absolute') as HTMLElement;\n \n // If not found by class, try first child\n if (!innerDiv) {\n innerDiv = componentElement.firstElementChild as HTMLElement;\n }\n \n if (!innerDiv) {\n return false;\n }\n \n // Measure the actual height\n const measuredHeight = innerDiv.offsetHeight;\n \n if (measuredHeight === 0) {\n return false;\n }\n \n // Success! Set the initial height\n this.inputContainerHeight.set(measuredHeight);\n this.cdr.detectChanges();\n \n // Create an ElementRef wrapper for ResizeObserver\n const innerDivRef = new ElementRef(innerDiv);\n \n // Set up ResizeObserver to track changes\n this.resizeObserverService.observeElement(innerDivRef, 0, 250)\n .pipe(takeUntil(this.destroy$))\n .subscribe(state => {\n const newHeight = state.height;\n \n if (newHeight !== this.inputContainerHeight() && newHeight > 0) {\n this.inputContainerHeight.set(newHeight);\n this.isResizing.set(true);\n this.cdr.detectChanges();\n \n // Clear existing timeout\n if (this.resizeTimeoutRef) {\n clearTimeout(this.resizeTimeoutRef);\n }\n \n // Set isResizing to false after a short delay\n this.resizeTimeoutRef = window.setTimeout(() => {\n this.isResizing.set(false);\n this.resizeTimeoutRef = undefined;\n this.cdr.detectChanges();\n }, 250);\n }\n });\n \n return true;\n };\n \n // Try to measure immediately\n if (!measureAndObserve()) {\n // If failed, retry with increasing delays\n let attempts = 0;\n const maxAttempts = 10;\n \n const retry = () => {\n attempts++;\n if (measureAndObserve()) {\n // Successfully measured\n } else if (attempts < maxAttempts) {\n // Exponential backoff: 50ms, 100ms, 200ms, 400ms, etc.\n const delay = 50 * Math.pow(2, Math.min(attempts - 1, 4));\n setTimeout(retry, delay);\n } else {\n // Failed to measure after max attempts\n }\n };\n \n // Start retry with first delay\n setTimeout(retry, 50);\n }\n }\n \n ngOnDestroy(): void {\n if (this.resizeTimeoutRef) {\n clearTimeout(this.resizeTimeoutRef);\n }\n this.destroy$.next();\n this.destroy$.complete();\n }\n}\n","import {\n Component,\n Input,\n OnInit,\n OnChanges,\n SimpleChanges,\n ChangeDetectionStrategy,\n ViewEncapsulation,\n signal,\n effect,\n ChangeDetectorRef,\n Signal,\n Injector,\n Optional,\n SkipSelf,\n Type,\n} from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\nimport { CopilotChatViewComponent } from \"./copilot-chat-view.component\";\nimport { CopilotChatConfigurationService } from \"../../core/chat-configuration/chat-configuration.service\";\nimport {\n COPILOT_CHAT_INITIAL_CONFIG,\n CopilotChatConfiguration,\n} from \"../../core/chat-configuration/chat-configuration.types\";\nimport { watchAgent, watchAgentWith } from \"../../utils/agent.utils\";\nimport { DEFAULT_AGENT_ID, randomUUID } from \"@copilotkitnext/shared\";\nimport { Message, AbstractAgent } from \"@ag-ui/client\";\nimport { ProxiedCopilotRuntimeAgent } from \"@copilotkitnext/core\";\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 standalone: true,\n imports: [CommonModule, CopilotChatViewComponent],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [\n {\n provide: CopilotChatConfigurationService,\n deps: [\n [new Optional(), new SkipSelf(), CopilotChatConfigurationService],\n [new Optional(), COPILOT_CHAT_INITIAL_CONFIG],\n ],\n useFactory: (\n parent: CopilotChatConfigurationService | null,\n initial: CopilotChatConfiguration | null\n ) => parent ?? new CopilotChatConfigurationService(initial ?? null),\n },\n ],\n template: `\n <copilot-chat-view\n [messages]=\"messages()\"\n [autoScroll]=\"true\"\n [messageViewClass]=\"'w-full'\"\n [showCursor]=\"showCursor()\"\n [inputComponent]=\"inputComponent\"\n >\n </copilot-chat-view>\n `,\n})\nexport class CopilotChatComponent implements OnInit, OnChanges {\n @Input() agentId?: string;\n @Input() threadId?: string;\n @Input() inputComponent?: Type<any>;\n\n constructor(\n @Optional() private chatConfig: CopilotChatConfigurationService | null,\n private cdr: ChangeDetectorRef,\n private injector: Injector\n ) {\n // Create initial watcher once (constructor is a safe injection context)\n const initialId = this.agentId ?? DEFAULT_AGENT_ID;\n this.createWatcher(initialId);\n\n // Connect once when agent becomes available\n effect(\n () => {\n const a = this.agent();\n if (!a) return;\n // Apply thread id when agent is available\n a.threadId = this.threadId || this.generatedThreadId;\n if (!this.hasConnectedOnce) {\n this.hasConnectedOnce = true;\n if (a instanceof ProxiedCopilotRuntimeAgent) {\n this.connectToAgent(a);\n } else {\n // Not a CopilotKit agent: ensure UI not showing loading cursor\n this.showCursor.set(false);\n this.cdr.markForCheck();\n }\n }\n },\n { allowSignalWrites: true }\n );\n }\n\n // Signals from watchAgent - destructured from watcher\n protected agent!: Signal<AbstractAgent | undefined>;\n protected messages!: Signal<Message[]>;\n protected isRunning!: Signal<boolean>;\n protected showCursor = signal<boolean>(false);\n\n private generatedThreadId: string = randomUUID();\n private watcher?: ReturnType<typeof watchAgent>;\n private hasConnectedOnce = false;\n\n ngOnInit(): void {\n this.setupChatHandlers();\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes[\"agentId\"] && !changes[\"agentId\"].firstChange) {\n const newId = this.agentId ?? DEFAULT_AGENT_ID;\n this.createWatcher(newId);\n }\n if (changes[\"threadId\"] && !changes[\"threadId\"].firstChange) {\n const a = this.agent();\n if (a) {\n a.threadId = this.threadId || this.generatedThreadId;\n }\n }\n }\n\n private async connectToAgent(agent: AbstractAgent): Promise<void> {\n if (!agent) return;\n\n this.showCursor.set(true);\n this.cdr.markForCheck();\n\n try {\n await agent.runAgent(\n { forwardedProps: { __copilotkitConnect: true } },\n {\n onTextMessageStartEvent: () => {\n this.showCursor.set(false);\n this.cdr.detectChanges();\n },\n onToolCallStartEvent: () => {\n this.showCursor.set(false);\n this.cdr.detectChanges();\n },\n }\n );\n this.showCursor.set(false);\n this.cdr.markForCheck();\n } catch (error) {\n console.error(\"Failed to connect to agent:\", error);\n this.showCursor.set(false);\n this.cdr.markForCheck();\n }\n }\n\n private setupChatHandlers(): void {\n if (!this.chatConfig) return;\n\n // Handle input submission\n this.chatConfig.setSubmitHandler(async (value: string) => {\n const agent = this.agent();\n if (!agent || !value.trim()) return;\n\n // Add user message\n const userMessage: Message = {\n id: randomUUID(),\n role: \"user\",\n content: value,\n };\n agent.addMessage(userMessage);\n\n // Clear the input\n this.chatConfig!.setInputValue(\"\");\n\n // Show cursor while processing\n this.showCursor.set(true);\n this.cdr.markForCheck();\n\n // Run the agent with named subscriber callbacks\n try {\n await agent.runAgent(\n {},\n {\n onTextMessageStartEvent: () => {\n this.showCursor.set(false);\n this.cdr.detectChanges();\n },\n onToolCallStartEvent: () => {\n this.showCursor.set(false);\n this.cdr.detectChanges();\n },\n }\n );\n } catch (error) {\n console.error(\"Agent run error:\", error);\n } finally {\n this.showCursor.set(false);\n this.cdr.markForCheck();\n }\n });\n\n // Handle input value changes (optional)\n this.chatConfig.setChangeHandler(() => {\n // Keep input state if needed\n });\n }\n\n private createWatcher(desiredAgentId: string) {\n // Tear down previous watcher if it exists to prevent parallel subscriptions\n this.watcher?.unsubscribe();\n\n // Create new watcher using the ergonomic helper\n const w = watchAgentWith(this.injector, { agentId: desiredAgentId });\n\n // Destructure signals directly to class fields\n this.agent = w.agent;\n this.messages = w.messages;\n this.isRunning = w.isRunning;\n this.watcher = w;\n\n // Reset connection state for new agent\n this.hasConnectedOnce = false;\n }\n}\n","export * from \"./core/copilotkit.service\";\nexport * from \"./core/copilotkit.types\";\nexport * from \"./core/copilotkit.providers\";\n// Re-export types from @ag-ui/core for convenience\nexport type { Message, ToolCall, ToolMessage } from \"@ag-ui/core\";\nexport * from \"./core/chat-configuration/chat-configuration.types\";\nexport * from \"./core/chat-configuration/chat-configuration.service\";\nexport * from \"./core/chat-configuration/chat-configuration.providers\";\nexport * from \"./utils/copilotkit.utils\";\nexport * from \"./utils/agent-context.utils\";\nexport * from \"./utils/frontend-tool.utils\";\n// Note: tool-render.utils removed in favor of direct ToolCallRender<T> usage\n// Export all except AgentWatchResult which is already exported from copilotkit.types\nexport {\n watchAgent,\n watchAgentWith,\n getAgent,\n subscribeToAgent,\n} from \"./utils/agent.utils\";\nexport * from \"./utils/human-in-the-loop.utils\";\nexport * from \"./utils/chat-config.utils\";\n// Slot utilities are internal only, not exported\n// export * from \"./lib/slots/slot.types\";\n// export * from \"./lib/slots/slot.utils\";\n// export { CopilotSlotComponent } from \"./lib/slots/copilot-slot.component\";\nexport { CopilotTooltipDirective } from \"./lib/directives/tooltip.directive\";\nexport { CopilotKitConfigDirective } from \"./directives/copilotkit-config.directive\";\nexport { CopilotKitAgentContextDirective } from \"./directives/copilotkit-agent-context.directive\";\nexport { CopilotKitFrontendToolDirective } from \"./directives/copilotkit-frontend-tool.directive\";\nexport { CopilotKitAgentDirective } from \"./directives/copilotkit-agent.directive\";\nexport {\n CopilotKitHumanInTheLoopDirective,\n CopilotKitHumanInTheLoopRespondDirective,\n} from \"./directives/copilotkit-human-in-the-loop.directive\";\nexport { CopilotKitChatConfigDirective } from \"./directives/copilotkit-chat-config.directive\";\nexport { CopilotKitToolRenderComponent } from \"./components/copilotkit-tool-render.component\";\n\n// Chat Input Components\nexport * from \"./components/chat/copilot-chat-input.types\";\nexport { CopilotChatInputComponent } from \"./components/chat/copilot-chat-input.component\";\nexport { CopilotChatInputDefaults } from \"./components/chat/copilot-chat-input-defaults\";\nexport { CopilotChatTextareaComponent } from \"./components/chat/copilot-chat-textarea.component\";\nexport { CopilotChatAudioRecorderComponent } from \"./components/chat/copilot-chat-audio-recorder.component\";\nexport {\n CopilotChatSendButtonComponent,\n CopilotChatToolbarButtonComponent,\n CopilotChatStartTranscribeButtonComponent,\n CopilotChatCancelTranscribeButtonComponent,\n CopilotChatFinishTranscribeButtonComponent,\n CopilotChatAddFileButtonComponent,\n} from \"./components/chat/copilot-chat-buttons.component\";\nexport { CopilotChatToolbarComponent } from \"./components/chat/copilot-chat-toolbar.component\";\nexport { CopilotChatToolsMenuComponent } from \"./components/chat/copilot-chat-tools-menu.component\";\n\n// Chat User Message Components\nexport * from \"./components/chat/copilot-chat-user-message.types\";\nexport { CopilotChatUserMessageComponent } from \"./components/chat/copilot-chat-user-message.component\";\nexport { CopilotChatUserMessageRendererComponent } from \"./components/chat/copilot-chat-user-message-renderer.component\";\nexport {\n CopilotChatUserMessageToolbarButtonComponent,\n CopilotChatUserMessageCopyButtonComponent,\n CopilotChatUserMessageEditButtonComponent,\n} from \"./components/chat/copilot-chat-user-message-buttons.component\";\nexport { CopilotChatUserMessageToolbarComponent } from \"./components/chat/copilot-chat-user-message-toolbar.component\";\nexport { CopilotChatUserMessageBranchNavigationComponent } from \"./components/chat/copilot-chat-user-message-branch-navigation.component\";\n\n// Chat Assistant Message Components\nexport * from \"./components/chat/copilot-chat-assistant-message.types\";\nexport { CopilotChatAssistantMessageComponent } from \"./components/chat/copilot-chat-assistant-message.component\";\nexport { CopilotChatAssistantMessageRendererComponent } from \"./components/chat/copilot-chat-assistant-message-renderer.component\";\nexport {\n CopilotChatAssistantMessageToolbarButtonComponent,\n CopilotChatAssistantMessageCopyButtonComponent,\n CopilotChatAssistantMessageThumbsUpButtonComponent,\n CopilotChatAssistantMessageThumbsDownButtonComponent,\n CopilotChatAssistantMessageReadAloudButtonComponent,\n CopilotChatAssistantMessageRegenerateButtonComponent,\n} from \"./components/chat/copilot-chat-assistant-message-buttons.component\";\nexport { CopilotChatAssistantMessageToolbarComponent } from \"./components/chat/copilot-chat-assistant-message-toolbar.component\";\n\n// Chat Message View Components\nexport * from \"./components/chat/copilot-chat-message-view.types\";\nexport { CopilotChatMessageViewComponent } from \"./components/chat/copilot-chat-message-view.component\";\nexport { CopilotChatMessageViewCursorComponent } from \"./components/chat/copilot-chat-message-view-cursor.component\";\nexport { CopilotChatToolCallsViewComponent } from \"./components/chat/copilot-chat-tool-calls-view.component\";\n\n// Chat View Components\nexport * from \"./components/chat/copilot-chat-view.types\";\nexport { CopilotChatViewComponent } from \"./components/chat/copilot-chat-view.component\";\nexport { CopilotChatViewScrollViewComponent } from \"./components/chat/copilot-chat-view-scroll-view.component\";\nexport { CopilotChatViewScrollToBottomButtonComponent } from \"./components/chat/copilot-chat-view-scroll-to-bottom-button.component\";\nexport { CopilotChatViewFeatherComponent } from \"./components/chat/copilot-chat-view-feather.component\";\nexport { CopilotChatViewInputContainerComponent } from \"./components/chat/copilot-chat-view-input-container.component\";\nexport { CopilotChatViewDisclaimerComponent } from \"./components/chat/copilot-chat-view-disclaimer.component\";\n\n// Main Chat Component\nexport { CopilotChatComponent } from \"./components/chat/copilot-chat.component\";\n\n// Services and Directives for Chat View\nexport { ScrollPositionService } from \"./services/scroll-position.service\";\nexport { ResizeObserverService } from \"./services/resize-observer.service\";\nexport { StickToBottomDirective } from \"./directives/stick-to-bottom.directive\";\n\n// Testing utilities are not exported from the main entry point\n// They should be imported directly from '@copilotkitnext/angular/testing' if needed\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1","i1.CopilotTooltipDirective","i1.ResizeObserverService","i2.CopilotChatViewHandlersService","i3","i1.CopilotChatConfigurationService"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AA2CA,CAAC;AA+BD;MACa,sBAAsB,GAAG,IAAI,cAAc,CACtD,wBAAwB;MAGb,kBAAkB,GAAG,IAAI,cAAc,CAClD,oBAAoB,EACpB,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE;MAGZ,qBAAqB,GAAG,IAAI,cAAc,CAErD,uBAAuB,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE;MAErC,iBAAiB,GAAG,IAAI,cAAc,CAEjD,mBAAmB,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE;AAEvC,MAAM,4BAA4B,GAAG,IAAI,cAAc,CAE5D,8BAA8B,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE;AAEhD,MAAM,yBAAyB,GAAG,IAAI,cAAc,CAEzD,2BAA2B,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE;AAE7C,MAAM,4BAA4B,GAAG,IAAI,cAAc,CAE5D,8BAA8B,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE;;ACzEvD;;;AAGG;MAEU,iBAAiB,CAAA;;AAEX,IAAA,oBAAoB;AACpB,IAAA,qBAAqB;AACrB,IAAA,sBAAsB;;AAG9B,IAAA,UAAU;;AAGF,IAAA,gBAAgB;AAGhB,IAAA,uBAAuB;AAGvB,IAAA,WAAW;AACX,IAAA,QAAQ;AACR,IAAA,WAAW;AAGX,IAAA,OAAO;AAGP,IAAA,cAAc;AAGd,IAAA,eAAe;;AAKf,IAAA,oBAAoB;;AAGpB,IAAA,SAAS;AAGT,IAAA,mBAAmB;;AAK3B,IAAA,eAAe;AACf,IAAA,sBAAsB;AACtB,IAAA,UAAU;AACV,IAAA,OAAO;AACP,I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