import * as _angular_core from '@angular/core'; import { Type, Signal, InjectionToken, Provider, Injector, DestroyRef, WritableSignal, OnDestroy, NgZone, ElementRef, TemplateRef, ViewContainerRef, ComponentRef, EmbeddedViewRef, OnInit, OnChanges, ChangeDetectorRef, SimpleChanges, AfterViewInit, EventEmitter } from '@angular/core'; import * as _ag_ui_client from '@ag-ui/client'; import { AbstractAgent, ActivityMessage, ToolCall, Message, Interrupt, ResumeEntry, RunAgentResult, Context, AssistantMessage } from '@ag-ui/client'; export { AssistantMessage, Message } from '@ag-ui/client'; import { FrontendTool, FrontendToolHandlerContext, SuggestionsConfig, CopilotKitCoreRuntimeConnectionStatus, CopilotRuntimeTransport, ThreadEndpointRuntimeInfo, IntelligenceRuntimeInfo, RuntimeLicenseStatus, CopilotKitCoreGetSuggestionsResult, CopilotKitCore, Suggestion, Memory, MemoryRealtimeStatus, NewMemory, MemoryChanges } from '@copilotkit/core'; export { DynamicSuggestionsConfig, Memory, MemoryChanges, MemoryKind, MemoryScope, NewMemory, StaticSuggestionsConfig, Suggestion, SuggestionsConfig } from '@copilotkit/core'; import { StandardSchemaV1, Attachment, TranscriptionErrorCode, AttachmentsConfig, AttachmentModality, InputContent, ImageInputPart, AudioInputPart, VideoInputPart, DocumentInputPart } from '@copilotkit/shared'; export { Attachment, AttachmentModality, AttachmentUploadError, AttachmentUploadResult, AttachmentsConfig, TranscriptionErrorCode } from '@copilotkit/shared'; import { z } from 'zod'; import { Theme, Catalog, LitComponentImplementation, LitRenderable } from '@copilotkit/a2ui-renderer/web-components'; import { ScrollDispatcher, ViewportRuler } from '@angular/cdk/scrolling'; import { Observable } from 'rxjs'; import { ClassValue } from 'clsx'; import * as _copilotkit_angular from '@copilotkit/angular'; import { UserMessage, Message as Message$1, ReasoningMessage, ActivityMessage as ActivityMessage$1 } from '@ag-ui/core'; import { DrawerThread } from '@copilotkit/web-components/threads-drawer'; import Websandbox from '@jetbrains/websandbox'; type AngularToolCall = Record> = { name?: string; args: Partial; status: "in-progress"; result: undefined; } | { name?: string; args: Args; status: "executing"; result: undefined; } | { name?: string; args: Args; status: "complete"; result: string; }; type HumanInTheLoopToolCall = Record> = { name?: string; args: Partial; status: "in-progress"; result: undefined; respond: (result: unknown) => void; } | { name?: string; args: Args; status: "executing"; result: undefined; respond: (result: unknown) => void; } | { name?: string; args: Args; status: "complete"; result: string; respond: (result: unknown) => void; }; interface ToolRenderer = Record> { toolCall: Signal>; agent?: Signal; } interface HumanInTheLoopToolRenderer = Record> { toolCall: Signal>; } type ClientTool = Record> = Omit, "handler"> & { renderer?: Type>; }; interface RenderToolCallConfig = Record> { name: string; args: StandardSchemaV1; component: Type>; agentId?: string; passAgent?: boolean; } interface FrontendToolConfig = Record> { name: string; description: string; parameters: StandardSchemaV1; component?: Type>; handler: (args: Args, context: FrontendToolHandlerContext) => Promise; followUp?: boolean; agentId?: string; } interface HumanInTheLoopConfig = Record> { name: string; description: string; parameters: StandardSchemaV1; component: Type>; agentId?: string; } declare function registerRenderToolCall = Record>(renderToolCall: RenderToolCallConfig): void; declare function registerFrontendTool = Record>(frontendTool: FrontendToolConfig): void; declare function registerHumanInTheLoop = Record>(humanInTheLoop: HumanInTheLoopConfig): void; type AngularActivityContentParseResult = { success: true; data: T; } | { success: false; error?: unknown; }; interface AngularActivityContentSchema { safeParse(content: unknown): AngularActivityContentParseResult; } interface ActivityRenderer { activityType: Signal; content: Signal; message: Signal; agent: Signal; } interface RenderActivityMessageConfig { activityType: string; agentId?: string; content: AngularActivityContentSchema; component: Type>; } /** * Extension point used by optional secondary entry points to contribute * lower-precedence built-in activity renderers. * * @internal */ declare const ɵCOPILOTKIT_BUILT_IN_ACTIVITY_RENDERERS: InjectionToken[]>; declare const anyActivityContentSchema: AngularActivityContentSchema; /** Register an activity renderer for the lifetime of the current injector. */ declare function registerRenderActivityMessage(config: RenderActivityMessageConfig): void; declare const OPEN_GENERATIVE_UI_ACTIVITY_TYPE = "open-generative-ui"; declare const GENERATE_SANDBOXED_UI_TOOL_NAME = "generateSandboxedUi"; declare const DEFAULT_OPEN_GENERATIVE_UI_DESIGN_SKILL = "When generating UI with generateSandboxedUi, follow these design principles inspired by shadcn/ui:\n\n- Use a minimal, flat aesthetic. Avoid drop shadows and gradients \u2014 rely on subtle borders (1px solid, light gray like #e5e7eb) to define surfaces.\n- Neutral base palette: white backgrounds, zinc/slate gray text (#09090b for headings, #71717a for secondary text). One accent color for interactive elements.\n- Use system font stacks (system-ui, -apple-system, sans-serif) at readable sizes (14px body, 600 weight for headings). Tight line-heights.\n- Small, consistent border-radius (6\u20138px). Cards and containers use border, not shadow, for separation.\n- Buttons: solid fill for primary (dark bg, white text), outline for secondary (border + transparent bg). Subtle hover state (slight opacity or background shift).\n- Use CSS Grid or Flexbox for layout. Ensure the UI looks good at any width.\n- Minimal transitions (150ms) for hover/focus states only. No decorative animations.\n- Keep the UI focused and dense \u2014 avoid excessive padding. Use compact spacing (8\u201312px gaps, 10\u201314px padding in controls)."; declare const GENERATE_SANDBOXED_UI_DESCRIPTION: string; declare const OpenGenerativeUIContentSchema: z.ZodObject<{ initialHeight: z.ZodOptional; generating: z.ZodOptional; css: z.ZodOptional; cssComplete: z.ZodOptional; html: z.ZodOptional>; htmlComplete: z.ZodOptional; jsFunctions: z.ZodOptional; jsFunctionsComplete: z.ZodOptional; jsExpressions: z.ZodOptional>; jsExpressionsComplete: z.ZodOptional; }, "strip", z.ZodTypeAny, { html?: string[]; initialHeight?: number; generating?: boolean; css?: string; cssComplete?: boolean; htmlComplete?: boolean; jsFunctions?: string; jsFunctionsComplete?: boolean; jsExpressions?: string[]; jsExpressionsComplete?: boolean; }, { html?: string[]; initialHeight?: number; generating?: boolean; css?: string; cssComplete?: boolean; htmlComplete?: boolean; jsFunctions?: string; jsFunctionsComplete?: boolean; jsExpressions?: string[]; jsExpressionsComplete?: boolean; }>; type OpenGenerativeUIContent = z.infer; declare const GenerateSandboxedUiArgsSchema: z.ZodObject<{ initialHeight: z.ZodOptional; placeholderMessages: z.ZodOptional>; css: z.ZodOptional; html: z.ZodOptional; jsFunctions: z.ZodOptional; jsExpressions: z.ZodOptional>; }, "strip", z.ZodTypeAny, { html?: string; initialHeight?: number; css?: string; jsFunctions?: string; jsExpressions?: string[]; placeholderMessages?: string[]; }, { html?: string; initialHeight?: number; css?: string; jsFunctions?: string; jsExpressions?: string[]; placeholderMessages?: string[]; }>; type GenerateSandboxedUiArgs = z.infer; type SandboxFunction = Record> = { name: string; description: string; parameters: StandardSchemaV1; handler: (args: Args, context?: FrontendToolHandlerContext) => Promise | unknown; }; interface OpenGenerativeUIConfig { sandboxFunctions?: SandboxFunction[]; designSkill?: string; } interface A2UIConfig { theme?: Theme; catalog?: Catalog; loadingComponent?: () => LitRenderable; includeSchema?: boolean; recovery?: A2UIRecoveryOptions; } interface A2UIRecoveryOptions { /** Delay before revealing a transient retry. Defaults to 2000ms. */ showAfterMs?: number; /** Attempt number that reveals retry state immediately. Defaults to 2. */ showAfterAttempts?: number; /** Client diagnostic visibility, overridden by server lifecycle content. */ debugExposure?: "hidden" | "collapsed" | "verbose"; } interface CopilotKitConfig { runtimeUrl?: string; headers?: Record; licenseKey?: string; properties?: Record; agents?: Record; selfManagedAgents?: Record; tools?: ClientTool[]; renderToolCalls?: RenderToolCallConfig[]; renderActivityMessages?: RenderActivityMessageConfig[]; suggestionsConfig?: SuggestionsConfig[]; frontendTools?: FrontendToolConfig[]; humanInTheLoop?: HumanInTheLoopConfig[]; /** Opt in to a text-only renderer for otherwise unknown tool calls. */ defaultToolRendering?: boolean; a2ui?: A2UIConfig; openGenerativeUI?: OpenGenerativeUIConfig; } declare const COPILOT_KIT_CONFIG: InjectionToken; declare function injectCopilotKitConfig(): CopilotKitConfig; declare function provideCopilotKit(config: CopilotKitConfig): Provider; declare class CopilotKit { #private; /** Whether unknown tools may use the built-in text-only fallback renderer. */ readonly defaultToolRenderingEnabled: boolean; readonly agents: Signal>; readonly runtimeConnectionStatus: Signal; readonly runtimeUrl: Signal; readonly runtimeTransport: Signal; readonly headers: Signal>; /** * Thread-endpoint capability advertised by the connected runtime's `/info` * response, or `undefined` before the runtime reports `Connected`. Exposed * as a signal (rather than a plain `core.threadEndpoints` read) so reactive * consumers re-run when `/info` lands. */ readonly threadEndpoints: Signal; /** * Intelligence runtime info advertised by the connected runtime's `/info` * response, or `undefined` before the runtime reports `Connected`. Carries * the realtime `wsUrl`. Exposed as a signal so reactive consumers re-run * when `/info` populates it — even if the connection status does not * transition in the same turn. */ readonly intelligence: Signal; /** * Server-reported license status from the connected runtime's `/info` * response, or `undefined` before the runtime reports it. Exposed as a signal * (rather than a plain `core.licenseStatus` read) so reactive consumers — e.g. * the threads drawer's license gate — re-run once the status resolves. */ readonly licenseStatus: Signal; readonly suggestionsByAgent: Signal>; readonly core: CopilotKitCore; readonly toolCallRenderConfigs: Signal; readonly clientToolCallRenderConfigs: Signal; readonly humanInTheLoopToolRenderConfigs: Signal; readonly activityMessageRenderConfigs: Signal; constructor(); addFrontendTool(clientToolWithInjector: FrontendToolConfig & { injector: Injector; }): void; addRenderToolCall(renderConfig: RenderToolCallConfig): void; addRenderActivityMessage(renderConfig: RenderActivityMessageConfig): void; /** Remove one dynamically registered activity renderer by identity. */ removeRenderActivityMessage(renderConfig: RenderActivityMessageConfig): void; addHumanInTheLoop(humanInTheLoopTool: HumanInTheLoopConfig): void; addSuggestionsConfig(config: SuggestionsConfig): string; removeSuggestionsConfig(id: string): void; reloadSuggestions(agentId: string): void; clearSuggestions(agentId: string): void; getSuggestions(agentId: string): CopilotKitCoreGetSuggestionsResult; removeTool(toolName: string, agentId?: string): void; getAgent(agentId: string): AbstractAgent | undefined; updateRuntime(options: { runtimeUrl?: string; runtimeTransport?: CopilotRuntimeTransport; headers?: Record; properties?: Record; agents?: Record; selfManagedAgents?: Record; }): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵprov: _angular_core.ɵɵInjectableDeclaration; } /** Serialize untrusted tool values defensively for text-only display. */ declare function safeToolValue(value: unknown): string; /** Opt-in text-only fallback for tool calls without an application renderer. */ declare class CopilotDefaultToolRenderer implements ToolRenderer { readonly toolCall: _angular_core.InputSignal; protected readonly expanded: _angular_core.WritableSignal; protected readonly argumentsText: _angular_core.Signal; protected readonly resultText: _angular_core.Signal; protected readonly statusValue: _angular_core.Signal; protected readonly statusLabel: _angular_core.Signal<"Preparing" | "Running" | "Complete" | "Unknown status">; protected toggleExpanded(): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } type RendererToolCallHandler = { type: "renderer"; config: RenderToolCallConfig; }; type ClientToolCallHandler = { type: "clientTool"; config: FrontendToolConfig; }; type HumanInTheLoopToolCallHandler = { type: "humanInTheLoopTool"; config: HumanInTheLoopConfig; }; type BuiltInToolCallHandler = { type: "builtIn"; config: { component: typeof CopilotDefaultToolRenderer; }; }; type ToolCallHandler = RendererToolCallHandler | ClientToolCallHandler | HumanInTheLoopToolCallHandler | BuiltInToolCallHandler; /** Parse tool-call arguments without allowing malformed payloads to escape. */ declare function parseToolCallArguments(rawArguments: string, allowPartial?: boolean): Record; interface PickToolCallHandlerOptions { name: string; agentId?: string; application: readonly RenderToolCallConfig[]; frontend: readonly FrontendToolConfig[]; humanInTheLoop: readonly HumanInTheLoopConfig[]; builtInFallback: boolean; } /** Resolve the documented application/frontend/wildcard/fallback precedence. */ declare function pickToolCallHandler(options: PickToolCallHandlerOptions): ToolCallHandler | undefined; declare class RenderToolCalls { #private; readonly message: _angular_core.InputSignal<{ role: "assistant"; id: string; name?: string | undefined; content?: string | undefined; encryptedValue?: string | undefined; toolCalls?: { function: { name: string; arguments: string; }; type: "function"; id: string; encryptedValue?: string | undefined; }[] | undefined; }>; readonly messages: _angular_core.InputSignal<({ role: "developer"; content: string; id: string; name?: string | undefined; encryptedValue?: string | undefined; } | { role: "system"; content: string; id: string; name?: string | undefined; encryptedValue?: string | undefined; } | { role: "assistant"; id: string; name?: string | undefined; content?: string | undefined; encryptedValue?: string | undefined; toolCalls?: { function: { name: string; arguments: string; }; type: "function"; id: string; encryptedValue?: string | undefined; }[] | undefined; } | { role: "user"; content: string | ({ type: "text"; text: string; } | { type: "image"; source: { type: "data"; value: string; mimeType: string; } | { type: "url"; value: string; mimeType?: string | undefined; }; metadata?: unknown; } | { type: "audio"; source: { type: "data"; value: string; mimeType: string; } | { type: "url"; value: string; mimeType?: string | undefined; }; metadata?: unknown; } | { type: "video"; source: { type: "data"; value: string; mimeType: string; } | { type: "url"; value: string; mimeType?: string | undefined; }; metadata?: unknown; } | { type: "document"; source: { type: "data"; value: string; mimeType: string; } | { type: "url"; value: string; mimeType?: string | undefined; }; metadata?: unknown; } | { type: "binary"; mimeType: string; id?: string | undefined; data?: string | undefined; url?: string | undefined; filename?: string | undefined; })[]; id: string; name?: string | undefined; encryptedValue?: string | undefined; } | { role: "tool"; toolCallId: string; content: string; id: string; encryptedValue?: string | undefined; error?: string | undefined; } | { role: "activity"; content: Record; id: string; activityType: string; } | { role: "reasoning"; content: string; id: string; encryptedValue?: string | undefined; })[]>; readonly isLoading: _angular_core.InputSignal; readonly agentId: _angular_core.InputSignal; protected pickRenderer(name: string): ToolCallHandler | undefined; protected buildToolCall>(toolCall: ToolCall): AngularToolCall; protected buildRendererInputs>(toolCall: ToolCall, handler: RendererToolCallHandler | ClientToolCallHandler | BuiltInToolCallHandler): { toolCall: AngularToolCall; agent?: AbstractAgent; }; protected buildHumanInTheLoopToolCall>(toolCall: ToolCall): HumanInTheLoopToolCall; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } /** Function signature for subscribing to an agent — derived from * CopilotKitCore so the types stay in sync automatically. Injected * by the factory so that AgentStore stays decoupled from the concrete class. */ type SubscribeToAgentFn = CopilotKitCore["subscribeToAgentWithOptions"]; declare class AgentStore { #private; readonly agent: AbstractAgent; readonly isRunning: Signal; readonly messages: Signal; readonly state: Signal; constructor(abstractAgent: AbstractAgent, destroyRef: DestroyRef, subscribeToAgent: SubscribeToAgentFn); teardown(): void; } declare class CopilotkitAgentFactory { #private; createAgentStoreSignal(agentId: Signal, destroyRef: DestroyRef): Signal; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵprov: _angular_core.ɵɵInjectableDeclaration; } declare function injectAgentStore(agentId: string | Signal): Signal; /** Legacy custom-event interrupt payload. */ interface InterruptEvent { name: string; value: TValue; } /** Options forwarded when resuming an interrupted agent. */ interface InterruptRunOptions { resume?: ResumeEntry[]; forwardedProps?: Record; } /** Injectable interrupt filtering and preprocessing options. */ interface InjectInterruptOptions { /** Agent id or signal. Defaults to the ambient chat agent. */ agentId?: string | Signal; /** Return false to leave this interrupt for a different controller. */ enabled?: (event: InterruptEvent) => boolean | PromiseLike; /** Optionally prepare data for the interrupt UI. */ handler?: (props: InterruptHandlerProps) => TResult | PromiseLike; } /** Actions and normalized protocol data passed to interrupt handlers. */ interface InterruptHandlerProps { event: InterruptEvent; interrupt: Interrupt | null; interrupts: readonly Interrupt[]; resolve: InterruptController["resolve"]; cancel: InterruptController["cancel"]; } /** Reactive data suitable for binding to an application interrupt component. */ interface InterruptView extends InterruptHandlerProps { result: TResult | null; } type InterruptRunner = (agent: AbstractAgent, options: InterruptRunOptions) => Promise; /** Error surfaced when an application attempts to resume an expired interrupt. */ declare class InterruptExpiredError extends Error { readonly interrupt: Interrupt; constructor(interrupt: Interrupt); } /** * Signal-based state machine for standard AG-UI and legacy interrupts. * * Prefer {@link injectInterrupt} in application components. The public class is * useful for framework adapters and deterministic lifecycle tests. */ declare class InterruptController { #private; readonly event: Signal>; readonly interrupt: Signal<{ id: string; reason: string; message?: string | undefined; toolCallId?: string | undefined; metadata?: Record | undefined; responseSchema?: Record | undefined; expiresAt?: string | undefined; }>; readonly interrupts: Signal | undefined; responseSchema?: Record | undefined; expiresAt?: string | undefined; }[]>; readonly result: Signal; readonly error: Signal; readonly hasInterrupt: Signal; readonly view: Signal>; constructor(runner: InterruptRunner, options?: InjectInterruptOptions); /** Subscribe to an agent, replacing any previous lifecycle subscription. */ connect(agent: AbstractAgent): void; /** Clear pending decisions when the host changes threads. */ setThreadId(threadId: string): void; /** Resolve one interrupt, resuming only after the complete set is addressed. */ readonly resolve: (payload?: unknown, interruptId?: string) => Promise; /** Cancel one standard interrupt; legacy interrupts are dismissed locally. */ readonly cancel: (interruptId?: string) => Promise; /** Alias retained for parity with other CopilotKit framework adapters. */ readonly resolveInterrupt: (payload?: unknown, interruptId?: string) => Promise; /** Alias retained for parity with other CopilotKit framework adapters. */ readonly cancelInterrupt: (interruptId?: string) => Promise; /** Release the agent subscription and clear sensitive pending state. */ destroy(): void; } /** * Create an interrupt controller in the current Angular injection context. * * The controller follows the ambient chat agent and thread unless an explicit * agent is supplied. Bind its signals in a template and call `resolve` or * `cancel` from user-driven event handlers. */ declare function injectInterrupt(options?: InjectInterruptOptions): InterruptController; /** * A conversation thread managed by the Intelligence platform. * * Each thread has a unique `id`, an optional human-readable `name`, and * timestamp fields tracking creation and update times. This mirrors the * `Thread` projection exposed by react-core's `useThreads` so framework * wrappers share an identical shape. */ interface Thread { /** Stable, server-assigned thread identifier. */ id: string; /** The agent this thread belongs to. */ agentId: string; /** Human-readable name, or `null` when the thread is unnamed. */ name: string | null; /** `true` when the thread has been archived. */ archived: boolean; /** ISO-8601 creation timestamp. */ createdAt: string; /** ISO-8601 timestamp of the most recent metadata update. */ updatedAt: string; /** * ISO-8601 timestamp of the most recent agent run on this thread. Absent * when the thread has never been run. Prefer this over `updatedAt` for * user-facing "last activity" displays — it is not bumped by metadata-only * actions like rename or archive. */ lastRunAt?: string; } /** * Configuration for {@link injectThreads}. * * Thread operations are scoped to the runtime-authenticated user and the * provided agent on the Intelligence platform. Each field may be supplied as * a plain value or a {@link Signal}; when a signal is used the underlying * runtime context is re-synced whenever its value changes. */ interface InjectThreadsInput { /** The ID of the agent whose threads to list and manage. */ agentId: string | Signal; /** When `true`, archived threads are included in the list. Defaults to `false`. */ includeArchived?: boolean | Signal; /** Maximum number of threads to fetch per page. When set, enables cursor-based pagination. */ limit?: number | Signal; /** * When `false`, the store stays inert: no runtime context is dispatched, so * NO thread-list fetch or realtime subscription is issued, and the * synthesized pre-connect loading state is suppressed. Used by gated * surfaces (e.g. an unlicensed ``) that must not touch * the network until the gate opens. Defaults to `true`. Mirrors react-core's * `UseThreadsInput.enabled`. */ enabled?: boolean | Signal; } /** * Signal-based threads-list API returned by {@link injectThreads}. * * The `threads` signal is kept in sync with the platform via a realtime * WebSocket subscription (when available) and is sorted most-recently-active * first. Mutation methods reject with an `Error` if the platform request * fails; `delete` additionally rolls back its optimistic removal. */ interface InjectThreadsResult { /** * Threads for the current user/agent pair, sorted most-recently-active * first. Updated in realtime when the platform pushes metadata events. * Includes archived threads only when `includeArchived` is set. */ threads: Signal; /** * `true` while the initial thread list is being fetched from the platform. * Subsequent realtime updates do not re-enter the loading state. */ isLoading: Signal; /** * The most recent error from fetching threads or executing a mutation, or * `null` when there is no error. Reset to `null` on the next successful * fetch. */ error: Signal; /** * List/mutation errors only — excludes developer/config errors (missing * runtime URL, runtime without thread endpoints) so consumer UIs do not * surface dev strings to end users. Prefer this over `error` for * user-facing error display. */ listError: Signal; /** * Error from the most recent FAILED next-page (fetch-more) load, or `null`. * Tracked separately from {@link InjectThreadsResult.listError} so a * paginated-load failure surfaces an inline "couldn't load more" affordance * while the loaded list stays visible. Cleared when a fetch-more is retried * or succeeds. */ fetchMoreError: Signal; /** * `true` when there are more threads available to fetch via * {@link InjectThreadsResult.fetchMoreThreads}. Only meaningful when `limit` * is set. */ hasMoreThreads: Signal; /** `true` while a subsequent page of threads is being fetched. */ isFetchingMoreThreads: Signal; /** * `true` while at least one thread mutation (rename, archive, unarchive, * delete) is awaiting a server response. Mutations apply optimistically, so * this is primarily useful for disabling controls or showing a subtle * in-flight indicator. */ isMutating: Signal; /** * Fetch the next page of threads. No-op when * {@link InjectThreadsResult.hasMoreThreads} is `false` or a fetch is * already in progress. */ fetchMoreThreads: () => void; /** * Re-fetch the thread list from the platform without clearing the current * list. Backs the drawer's error-state Retry and the Active/All filter * refetch. No-op until the runtime is connected. */ refetchThreads: () => void; /** * Reset to a fresh, non-explicit client-side thread so the welcome screen * shows. Lazy creation: no row appears in {@link InjectThreadsResult.threads} * until the new thread's first run persists server-side. */ startNewThread: () => void; /** * Rename a thread on the platform. Resolves when the server confirms the * update; rejects on failure. */ renameThread: (threadId: string, name: string) => Promise; /** * Archive a thread on the platform. Archived threads are excluded from * subsequent list results. Resolves when the server confirms the update; * rejects on failure. */ archiveThread: (threadId: string) => Promise; /** * Restore a previously archived thread on the platform. The thread * re-appears in default (non-archived) list results. Resolves when the * server confirms the update; rejects on failure. */ unarchiveThread: (threadId: string) => Promise; /** * Permanently delete a thread from the platform. This is irreversible. * Resolves when the server confirms deletion; rejects on failure (the * optimistic removal is rolled back). */ deleteThread: (threadId: string) => Promise; } /** * Owns a single core thread store, bridges its selector observables onto * Angular writable signals, keeps the store's runtime context in sync with the * ambient {@link CopilotKit} configuration, and registers/unregisters the * store with core for the active agent. * * One instance backs each {@link injectThreads} call. Tear-down (selector * unsubscribe, store stop, core unregister) runs on the host's * {@link DestroyRef}. */ declare class ThreadsStore implements InjectThreadsResult { #private; readonly threads: Signal; readonly error: Signal; readonly listError: Signal; readonly fetchMoreError: Signal; readonly isLoading: Signal; readonly hasMoreThreads: Signal; readonly isFetchingMoreThreads: Signal; readonly isMutating: Signal; constructor(input: InjectThreadsInput, destroyRef: DestroyRef); readonly renameThread: (threadId: string, name: string) => Promise; readonly archiveThread: (threadId: string) => Promise; readonly unarchiveThread: (threadId: string) => Promise; readonly deleteThread: (threadId: string) => Promise; readonly fetchMoreThreads: () => void; readonly refetchThreads: () => void; readonly startNewThread: () => void; /** Unsubscribes all selector bridges and stops the underlying core store. */ teardown(): void; } /** * Factory for {@link ThreadsStore} instances. Provided at the root so the * ambient {@link CopilotKit} configuration is resolved from the application's * injector. */ declare class CopilotkitThreadsFactory { /** * Creates a {@link ThreadsStore} bound to the given input and host * `DestroyRef`. * * @param input - Agent identifier and optional list controls. * @param destroyRef - Host lifetime; tears the store down on destroy. */ create(input: InjectThreadsInput, destroyRef: DestroyRef): ThreadsStore; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵprov: _angular_core.ɵɵInjectableDeclaration; } /** * Angular threads-list API over the platform-agnostic core thread store — * the signal-based counterpart to react-core's `useThreads`. * * On creation the store fetches the thread list for the runtime-authenticated * user and the given `agentId`. When the Intelligence platform exposes a * WebSocket URL it also opens a realtime subscription so the `threads` signal * stays current without polling. Mutation methods return promises that resolve * once the platform confirms the operation and reject with an `Error` on * failure. * * Must be called within an injection context (component/directive constructor * or field initializer). The underlying store is torn down on the host's * `DestroyRef`. * * @param input - Agent identifier and optional list controls. Each field * accepts a plain value or a `Signal`. * @returns Thread list state as signals plus stable mutation callbacks. * * @example * ```ts * @Component({ ... }) * class ThreadList { * readonly threads = injectThreads({ agentId: "agent-1" }); * } * ``` */ declare function injectThreads(input: InjectThreadsInput): InjectThreadsResult; interface CopilotChatLabels { chatInputPlaceholder: string; chatInputToolbarStartTranscribeButtonLabel: string; chatInputToolbarCancelTranscribeButtonLabel: string; chatInputToolbarFinishTranscribeButtonLabel: string; chatInputToolbarAddButtonLabel: string; chatInputToolbarToolsButtonLabel: string; assistantMessageToolbarCopyCodeLabel: string; assistantMessageToolbarCopyCodeCopiedLabel: string; assistantMessageToolbarCopyMessageLabel: string; assistantMessageToolbarThumbsUpLabel: string; assistantMessageToolbarThumbsDownLabel: string; assistantMessageToolbarReadAloudLabel: string; assistantMessageToolbarRegenerateLabel: string; userMessageToolbarCopyMessageLabel: string; userMessageToolbarEditMessageLabel: string; chatDisclaimerText: string; welcomeMessageText: string; } declare const COPILOT_CHAT_DEFAULT_LABELS: CopilotChatLabels; declare const COPILOT_CHAT_LABELS: InjectionToken; declare function injectChatLabels(): CopilotChatLabels; declare function provideCopilotChatLabels(config: Partial): Provider; /** * Options for configuring the CopilotChat session. * Mirrors the React CopilotChatConfigurationProvider props so behaviour * is consistent across frameworks. */ interface CopilotChatConfigurationOptions { /** * The agent id to connect to. * When omitted the runtime's default agent is used. */ agentId?: string; /** * An explicit thread id to resume. * When provided the session joins the existing thread instead of starting a * new one. */ threadId?: string; /** * Whether the thread id was supplied explicitly by the host application. * Defaults to `false`, which seeds a non-explicit thread id that the runtime * may override. */ hasExplicitThreadId?: boolean; } /** * Angular service that holds the runtime chat configuration state. * * Active-thread resolution mirrors the React * `CopilotChatConfigurationProvider` precedence (prop → override → minted) * without parent-provider branches (PR1 has no nested providers). */ declare class CopilotChatConfiguration { #private; /** * The resolved agent id for this chat session. * Falls back to {@link DEFAULT_AGENT_ID} when no agent id is provided. */ readonly agentId: Signal; /** * The resolved thread id for this chat session. * * Precedence (highest → lowest): * 1. Prop-driven `threadId` when `#propIsAuthoritative` is true. * 2. Imperative `#override` set by internal helpers. * 3. Non-authoritative seed `threadId` from options. * 4. Auto-minted UUID fallback. */ readonly threadId: Signal; /** * Whether the current thread id was supplied explicitly by the host * application (as opposed to being auto-minted or seeded without intent). */ readonly hasExplicitThreadId: Signal; /** Returns `true` when the host application controls the thread id via props. */ protected get isControlled(): boolean; /** * Sets an imperative thread override. No-ops when the session is * controlled by the host application via props. * * @param threadId - The thread id to activate. * @param explicit - Whether the override represents a deliberate user choice. */ protected _setOverride(threadId: string, explicit: boolean): void; /** * Switches the active thread to the given id. * * By default the switch is treated as an explicit user-driven choice * (`explicit` defaults to `true`). Pass `{ explicit: false }` to mark it as * a non-explicit seed that the runtime may replace. * * No-ops when the threadId is controlled by the host application via props. * * @param threadId - The thread id to activate. * @param options - Optional overrides; `explicit` defaults to `true`. */ setActiveThreadId(threadId: string, options?: { explicit?: boolean; }): void; /** * Abandons the current thread and starts a fresh one by minting a new UUID. * * The new thread is marked as non-explicit so the runtime may assign a * server-side thread id once the first message is sent. * * No-ops when the threadId is controlled by the host application via props. */ startNewThread(): void; /** * Read-only signal reflecting the current drawer open-state. * * @remarks * Consumed by {@link CopilotThreadsDrawer} to drive the element's controlled * `open` property; a future popup or sidebar component may also toggle it to * implement mobile mutual-exclusion between the drawer and other overlays. */ readonly drawerOpen: Signal; /** * Sets the drawer open-state imperatively. * * @remarks * Called by {@link CopilotThreadsDrawer} in response to the element's * `open-change` event to keep the shared open-state coordinated. * * @param open - `true` to mark the drawer as open, `false` to close it. */ setDrawerOpen(open: boolean): void; /** * Computed signal that is `true` when at least one drawer instance has * registered itself via {@link registerDrawer}. */ readonly drawerRegistered: Signal; /** * Registers a drawer instance and returns an idempotent unregister function. * * Increments the internal drawer count so that {@link drawerRegistered} * becomes `true`. The returned function decrements the count when called; * calling it more than once is safe — subsequent calls are no-ops (guarded * by an `active` flag, floor at 0). * * @remarks * Called by {@link CopilotThreadsDrawer} on construction with cleanup on * destroy. Intended for future popup/sidebar coordination as well. * * @returns An idempotent cleanup function that unregisters this drawer. */ registerDrawer(): () => void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵprov: _angular_core.ɵɵInjectableDeclaration; } /** * Injection token for the {@link CopilotChatConfiguration} service instance. * Use {@link injectChatConfiguration} to retrieve it from the injector. */ declare const COPILOT_CHAT_CONFIGURATION: InjectionToken; /** * Injection token for the raw {@link CopilotChatConfigurationOptions} value * supplied to {@link provideCopilotChatConfiguration}. */ declare const COPILOT_CHAT_CONFIGURATION_OPTIONS: InjectionToken; /** * Registers the {@link CopilotChatConfiguration} service and its options into * the current injector. * * `CopilotChatConfiguration` is registered as the canonical class provider. * `COPILOT_CHAT_CONFIGURATION` is aliased to the same instance via * `useExisting`, so both `inject(COPILOT_CHAT_CONFIGURATION)` (via * {@link injectChatConfiguration}) and a direct `inject(CopilotChatConfiguration)` * resolve to the **same object** with shared signal state. * * @param options - Optional chat configuration overrides. * @returns An array of Angular providers to pass to `providers` or * `TestBed.configureTestingModule`. */ declare function provideCopilotChatConfiguration(options?: CopilotChatConfigurationOptions): Provider[]; /** * Retrieves the {@link CopilotChatConfiguration} service from the current * injection context. * * Must be called inside an injection context (component constructor, factory * function, or `TestBed.runInInjectionContext`). */ declare function injectChatConfiguration(): CopilotChatConfiguration; declare abstract class ChatState { abstract readonly inputValue: WritableSignal; readonly attachments: WritableSignal; readonly attachmentsEnabled: Signal; readonly attachmentsUploading: Signal; readonly dragOver: WritableSignal; readonly suggestions: WritableSignal; readonly suggestionsLoading: WritableSignal; readonly isTranscribing: WritableSignal; abstract submitInput(value: string): void; abstract changeInput(value: string): void; selectSuggestion(_suggestion: Suggestion, _index: number): void; finishTranscription(_audioBlob: Blob): void | Promise; addFile(): void; removeAttachment(_id: string): void; handleDragOver(_event: DragEvent): void; handleDragLeave(_event: DragEvent): void; handleDrop(_event: DragEvent): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵprov: _angular_core.ɵɵInjectableDeclaration; } declare function injectChatState(): ChatState; interface TranscriptionResult { text: string; size: number; type: string; } interface TranscriptionErrorInfo { code: TranscriptionErrorCode; message: string; retryable: boolean; } declare class TranscriptionError extends Error { readonly info: TranscriptionErrorInfo; constructor(info: TranscriptionErrorInfo); } /** * Transcribe an audio blob via the CopilotKit runtime. Uses single-endpoint * (base64 JSON) or REST (multipart `/transcribe`) mode to match the transport * configured on the core. * * @throws {TranscriptionError} with typed error info on any failure. */ declare function transcribeAudio(core: CopilotKitCore, audioBlob: Blob, filename?: string): Promise; interface ScrollState { isAtBottom: boolean; scrollTop: number; scrollHeight: number; clientHeight: number; } declare class ScrollPosition implements OnDestroy { private scrollDispatcher; private viewportRuler; private ngZone; private destroy$; private scrollStateSubject; scrollState$: Observable; constructor(scrollDispatcher: ScrollDispatcher, viewportRuler: ViewportRuler, ngZone: NgZone); /** * Monitor scroll position of an element * @param element The element to monitor * @param threshold Pixels from bottom to consider "at bottom" (default 10) */ monitorScrollPosition(element: ElementRef | HTMLElement, threshold?: number): Observable; /** * Scroll element to bottom with smooth animation * @param element The element to scroll * @param smooth Whether to use smooth scrolling */ scrollToBottom(element: ElementRef | HTMLElement, smooth?: boolean): void; /** * Check if element is at bottom * @param element The element to check * @param threshold Pixels from bottom to consider "at bottom" */ isAtBottom(element: ElementRef | HTMLElement, threshold?: number): boolean; /** * Get current scroll state of element */ getScrollState(element: HTMLElement, threshold: number): ScrollState; /** * Create a ResizeObserver for element size changes * @param element The element to observe * @param debounceMs Debounce time in milliseconds */ observeResize(element: ElementRef | HTMLElement, debounceMs?: number): Observable; ngOnDestroy(): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵprov: _angular_core.ɵɵInjectableDeclaration; } interface ResizeState { width: number; height: number; isResizing: boolean; } declare class ResizeObserverService implements OnDestroy { private ngZone; private destroy$; private observers; private resizeStates; private resizeTimeouts; constructor(ngZone: NgZone); /** * Observe element resize with debouncing and resizing state * @param element Element to observe * @param debounceMs Debounce time (default 250ms) * @param resizingDurationMs How long to show "isResizing" state (default 250ms) */ observeElement(element: ElementRef | HTMLElement, debounceMs?: number, resizingDurationMs?: number): Observable; /** * Stop observing an element * @param element Element to stop observing */ unobserve(element: ElementRef | HTMLElement): void; /** * Get current size of element * @param element Element to measure */ getCurrentSize(element: ElementRef | HTMLElement): { width: number; height: number; }; /** * Get current resize state of element * @param element Element to check */ getCurrentState(element: ElementRef | HTMLElement): ResizeState | null; ngOnDestroy(): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵprov: _angular_core.ɵɵInjectableDeclaration; } /** * Utility function to merge Tailwind CSS classes * Combines clsx for conditional classes and tailwind-merge for proper Tailwind class merging */ declare function cn(...inputs: ClassValue[]): string; interface ConnectAgentContextConfig { injector?: Injector; } /** * Connects context to the agent. * * @param context - The context (or reactive zero-argument accessor) to connect. * @param config - Optional configuration for connecting the context. */ declare function connectAgentContext(context: Context | (() => Context), config?: ConnectAgentContextConfig): void; /** * Return value of {@link injectMemories}. * * The `memories` signal is the server-authoritative list for the current * runtime-authenticated user. It is hydrated from a REST snapshot and kept * current by realtime `memory_metadata` deltas pushed over the memory store's * own channel. Mutations resolve once the platform confirms the operation and * reject with an `Error` on failure. */ interface MemoriesController { /** * Memories for the current user, newest first. Updated in realtime when the * platform pushes `memory_metadata` events over the memory store's channel. */ memories: Signal; /** * `true` while the initial memory snapshot is being fetched. Subsequent * realtime updates do not re-enter the loading state. */ isLoading: Signal; /** * The most recent error from fetching memories or a mutation, or `null` * when there is no error. Cleared on the next fetch attempt, on a * successful fetch, when the runtime context changes, and on a successful * mutation (a failed mutation replaces it with that mutation's error). */ error: Signal; /** * `true` when the platform memory routes are available. Set to `false` * after a 404 or 501, indicating memory is not supported by the current * runtime configuration. */ isAvailable: Signal; /** * Health of the realtime connection that streams live `memory_metadata` * deltas. Distinct from `isAvailable`/`error` (which describe the REST list * route): `"connecting"` while the socket opens/joins, `"connected"` once * live deltas are flowing, and `"unavailable"` once the socket permanently * gives up — at which point the list is a frozen snapshot. Lets a template * drop a "live" indicator instead of showing it over stale data. */ realtimeStatus: Signal; /** * Re-fetch the memory snapshot from the platform. Resolves when the re-pull * succeeds; rejects if it fails or the store is torn down mid-flight. */ refresh: () => Promise; /** * Create a memory. Resolves to the stored memory (server-authoritative); * rejects on failure. */ addMemory: (input: NewMemory) => Promise; /** * Supersede a memory: the old memory is retired and a new one is created. * Resolves to the new memory (its `id` differs from the supplied `id`); * rejects on failure. * * Supersede is a FULL replacement, not a partial patch: `changes` is the * complete definition of the new memory. You must re-supply `content` and * `kind`, and an omitted `sourceThreadIds` resets the new memory's source * threads to empty — it does not preserve the prior memory's value. */ updateMemory: (id: string, changes: MemoryChanges) => Promise; /** * Retire a memory (non-lossy delete). Resolves when the server confirms; * rejects on failure. */ removeMemory: (id: string) => Promise; } /** * Angular injection function for listing and managing platform memories — the * signal-based counterpart to react-core's `useMemories`. * * Reads the user-scoped memory store owned and wired by `CopilotKitCore`. The * binding does not create, register, start, or stop the store: core owns its * lifecycle and opens its own `user_meta:memories:` channel, applying * `memory_metadata` deltas to the list. The binding only bridges the store's * selectors onto Angular signals and forwards the stable mutation callbacks. * * Mutations are server-authoritative: each resolves once the platform confirms * the operation and rejects with an `Error` on failure. You can still call * `refresh()` to re-pull the REST snapshot on demand. * * Must be called inside an injection context (component constructor, field * initializer, `inject` callback, or `TestBed.runInInjectionContext`) so the * selector→signal bridges (`toSignal`) tear down with the host. * * @returns Signals for memory state and stable mutation callbacks. * * @example * ```ts * import { injectMemories } from "@copilotkit/angular"; * * @Component({ ... }) * class MemoryList { * readonly #m = injectMemories(); * memories = this.#m.memories; * isLoading = this.#m.isLoading; * isAvailable = this.#m.isAvailable; * * remove(id: string) { this.#m.removeMemory(id); } * } * ``` */ declare function injectMemories(): MemoriesController; /** * Represents a value that can be used as a slot override. * Can be a component type or template reference only. * @internal - This type is for internal use only */ type SlotValue = Type | TemplateRef; /** * Configuration for a slot * @internal - This interface is for internal use only */ interface SlotConfig { value?: SlotValue; default?: Type; } /** * Context passed to slot templates */ interface SlotContext { $implicit: T; props?: Partial; [key: string]: any; } /** * Slot registry entry * @internal - This interface is for internal use only */ interface SlotRegistryEntry { component?: Type; template?: TemplateRef; } /** * Options for rendering a slot */ interface RenderSlotOptions { slot?: SlotValue; defaultComponent: Type; props?: Partial; injector?: any; outputs?: Record void>; } /** * Injection token for slot configuration */ declare const SLOT_CONFIG: InjectionToken>>; /** * Type for components with slots */ type WithSlots>, Rest = object> = { [K in keyof S as `${string & K}Component`]?: Type; } & { [K in keyof S as `${string & K}Template`]?: TemplateRef; } & { [K in keyof S as `${string & K}Class`]?: string; } & Rest; /** * Renders a slot value into a ViewContainerRef. * This is the core utility for slot rendering. * * @param viewContainer - The ViewContainerRef to render into * @param options - Options for rendering the slot * @returns The created component or embedded view reference * * @example * ```typescript * export class MyComponent { * @ViewChild('container', { read: ViewContainerRef }) container!: ViewContainerRef; * * renderButton() { * renderSlot(this.container, { * slot: this.buttonOverride, * defaultComponent: DefaultButton, * props: { text: 'Click me' }, * outputs: { click: (event) => this.handleClick(event) } * }); * } * } * ``` */ declare function renderSlot(viewContainer: ViewContainerRef, options: RenderSlotOptions): ComponentRef | EmbeddedViewRef | null; /** * Checks if a value is a component type. * Simplified check - rely on try/catch for actual validation. */ declare function isComponentType(value: any): boolean; /** * Checks if a value is a valid slot value. */ declare function isSlotValue(value: any): value is SlotValue; /** * Normalizes a slot value to a consistent format. */ declare function normalizeSlotValue(value: SlotValue | undefined, defaultComponent: Type | undefined): SlotRegistryEntry; /** * Creates a slot configuration map for a component. * * @example * ```typescript * const slots = createSlotConfig({ standalone: true, * sendButton: CustomSendButton, * toolbar: 'custom-toolbar-class', * footer: footerTemplate * }, { * sendButton: DefaultSendButton, * toolbar: DefaultToolbar, * footer: DefaultFooter * }); * ``` */ declare function createSlotConfig>>(overrides: Partial>, defaults: T): Map; /** * Provides slot configuration to child components via DI. * * @example * ```typescript * @Component({ standalone: true, * providers: [ * provideSlots({ * sendButton: CustomSendButton, * toolbar: CustomToolbar * }) * ] * }) * ``` */ declare function provideSlots(slots: Record>): { provide: _angular_core.InjectionToken>>; useValue: Map>; }; /** * Gets slot configuration from DI. * Must be called within an injection context. * * @example * ```typescript * export class MyComponent { * slots = getSlotConfig(); * * ngOnInit() { * const sendButton = this.slots?.get('sendButton'); * } * } * ``` */ declare function getSlotConfig(): ReadonlyMap | null; /** * Creates a render function for a specific slot. * Useful for creating reusable slot renderers. * * @example * ```typescript * const renderSendButton = createSlotRenderer( * DefaultSendButton, * 'sendButton' * ); * * // Later in template * renderSendButton(this.viewContainer, this.sendButtonOverride); * ``` */ declare function createSlotRenderer(defaultComponent: Type, slotName?: string): (viewContainer: ViewContainerRef, slot?: SlotValue, props?: Partial, outputs?: Record void>) => ComponentRef | EmbeddedViewRef; /** * @internal - This component is for internal use only. * Simple slot component for rendering custom content or defaults. * Supports templates and components only. * * @example * ```html * * * * * ``` */ declare class CopilotSlot implements OnInit, OnChanges { private viewContainer; private cdr; slot: _angular_core.InputSignal | TemplateRef>; context: _angular_core.InputSignal; defaultComponent: _angular_core.InputSignal>; outputs: _angular_core.InputSignal void>>; private slotContainer; private componentRef?; constructor(viewContainer: ViewContainerRef, cdr: ChangeDetectorRef); ngOnInit(): void; ngOnChanges(changes: SimpleChanges): void; isTemplate(value: any): value is TemplateRef; private renderSlot; private updateComponentProps; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } /** * Directive to manage agent context in CopilotKit. * Automatically adds context on init, updates on changes, and removes on destroy. * * @example * ```html * *
*
* * *
*
* * *
*
* ``` */ declare class CopilotKitAgentContext implements OnInit, OnChanges, OnDestroy { private readonly copilotkit; private contextId?; constructor(copilotkit: CopilotKit); /** * Context object containing both description and value. * If provided, this takes precedence over individual inputs. */ context?: Context; /** * Description of the context. * Used when context object is not provided. */ description?: string; /** * Value of the context. * Used when context object is not provided. */ value?: any; ngOnInit(): void; ngOnChanges(changes: SimpleChanges): void; ngOnDestroy(): void; /** * Adds the context to CopilotKit */ private addContext; /** * Updates the context by removing the old one and adding a new one */ private updateContext; /** * Removes the current context from CopilotKit */ private removeContext; /** * Gets the context object from inputs */ private getContext; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵdir: _angular_core.ɵɵDirectiveDeclaration; } type ScrollBehavior = "smooth" | "instant" | "auto"; /** * Directive for implementing stick-to-bottom scroll behavior * Similar to the React use-stick-to-bottom library * * @example * ```html *
* *
* ``` */ declare class StickToBottom implements AfterViewInit, OnDestroy { enabled: _angular_core.InputSignal; threshold: _angular_core.InputSignal; initialBehavior: _angular_core.InputSignal; resizeBehavior: _angular_core.InputSignal; debounceMs: _angular_core.InputSignal; isAtBottomChange: _angular_core.OutputEmitterRef; scrollToBottomRequested: _angular_core.OutputEmitterRef; private elementRef; private scrollService; private resizeService; private platformId; private destroy$; private contentElement?; private wasAtBottom; private hasInitialized; private userHasScrolled; private destroyed; constructor(); ngAfterViewInit(): void; private setupScrollMonitoring; private setupResizeMonitoring; private setupContentMutationObserver; /** * Public method to scroll to bottom * Can be called from parent component */ scrollToBottom(behavior?: ScrollBehavior): void; /** * Check if currently at bottom */ isAtBottom(): boolean; /** * Get current scroll state */ getScrollState(): { scrollTop: any; scrollHeight: any; clientHeight: any; isAtBottom: boolean; }; ngOnDestroy(): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵdir: _angular_core.ɵɵDirectiveDeclaration; } declare class TooltipContent { private cdr; text: string; private _position; get position(): "above" | "below" | "left" | "right"; set position(value: "above" | "below" | "left" | "right"); constructor(cdr: ChangeDetectorRef); static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } declare class CopilotTooltip implements OnDestroy { tooltipText: string; tooltipPosition: "above" | "below" | "left" | "right"; tooltipDelay: number; private overlay; private overlayPositionBuilder; private elementRef; private viewContainerRef; private overlayRef?; private tooltipTimeout?; private originalTitle?; onMouseEnter(): void; onMouseLeave(): void; private show; private hide; private getPositions; ngOnDestroy(): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵdir: _angular_core.ɵɵDirectiveDeclaration; } /** * CopilotChat component - Angular equivalent of React's * Provides a complete chat interface that wires an agent to the chat view * * @example * ```html * * ``` */ declare class CopilotChat extends ChatState { private readonly attachmentsDirective; readonly inputValue: _angular_core.WritableSignal; readonly agentId: _angular_core.InputSignal; readonly threadId: _angular_core.InputSignal; readonly inputComponent: _angular_core.InputSignal>; /** Component used to render each assistant message in the prebuilt chat. */ readonly assistantMessageComponent: _angular_core.InputSignal>; /** Template used to render each assistant message in the prebuilt chat. */ readonly assistantMessageTemplate: _angular_core.InputSignal>; /** Class forwarded to the default or custom assistant-message renderer. */ readonly assistantMessageClass: _angular_core.InputSignal; /** Component used to render each reasoning message in the prebuilt chat. */ readonly reasoningMessageComponent: _angular_core.InputSignal>; /** Template used to render each reasoning message in the prebuilt chat. */ readonly reasoningMessageTemplate: _angular_core.InputSignal>; /** Class forwarded to the default or custom reasoning-message renderer. */ readonly reasoningMessageClass: _angular_core.InputSignal; /** Component rendered after the transcript messages and before the cursor. */ readonly messageViewChildrenComponent: _angular_core.InputSignal>; /** Template rendered after the transcript messages and before the cursor. */ readonly messageViewChildrenTemplate: _angular_core.InputSignal>; /** Class forwarded to custom transcript-children renderers. */ readonly messageViewChildrenClass: _angular_core.InputSignal; readonly attachmentsConfig: _angular_core.InputSignal; /** * Ambient chat configuration, when a {@link provideCopilotChatConfiguration} * provider is in scope. Absent (`null`) for standalone * `` usage, which has no provider — resolved via the * optional inject so the component does not throw without one. */ private readonly config; protected readonly resolvedAgentId: _angular_core.Signal; readonly agentStore: _angular_core.Signal<_copilotkit_angular.AgentStore>; private readonly copilotKit; readonly cdr: ChangeDetectorRef; readonly injector: Injector; private readonly destroyRef; protected messages: _angular_core.Signal<({ role: "developer"; content: string; id: string; name?: string | undefined; encryptedValue?: string | undefined; } | { role: "system"; content: string; id: string; name?: string | undefined; encryptedValue?: string | undefined; } | { role: "assistant"; id: string; name?: string | undefined; content?: string | undefined; encryptedValue?: string | undefined; toolCalls?: { function: { name: string; arguments: string; }; type: "function"; id: string; encryptedValue?: string | undefined; }[] | undefined; } | { role: "user"; content: string | ({ type: "text"; text: string; } | { type: "image"; source: { type: "data"; value: string; mimeType: string; } | { type: "url"; value: string; mimeType?: string | undefined; }; metadata?: unknown; } | { type: "audio"; source: { type: "data"; value: string; mimeType: string; } | { type: "url"; value: string; mimeType?: string | undefined; }; metadata?: unknown; } | { type: "video"; source: { type: "data"; value: string; mimeType: string; } | { type: "url"; value: string; mimeType?: string | undefined; }; metadata?: unknown; } | { type: "document"; source: { type: "data"; value: string; mimeType: string; } | { type: "url"; value: string; mimeType?: string | undefined; }; metadata?: unknown; } | { type: "binary"; mimeType: string; id?: string | undefined; data?: string | undefined; url?: string | undefined; filename?: string | undefined; })[]; id: string; name?: string | undefined; encryptedValue?: string | undefined; } | { role: "tool"; toolCallId: string; content: string; id: string; encryptedValue?: string | undefined; error?: string | undefined; } | { role: "activity"; content: Record; id: string; activityType: string; } | { role: "reasoning"; content: string; id: string; encryptedValue?: string | undefined; })[]>; protected agentState: _angular_core.Signal; protected isRunning: _angular_core.Signal; protected readonly hasExplicitThreadId: _angular_core.Signal; protected readonly agentRef: _angular_core.Signal; protected readonly resolvedThreadId: _angular_core.Signal; readonly attachmentsEnabled: _angular_core.Signal; readonly attachmentsUploading: _angular_core.Signal; protected showCursor: _angular_core.WritableSignal; private generatedThreadId; constructor(); private connectToAgent; submitInput(value: string): Promise; selectSuggestion(suggestion: Suggestion, _index: number): Promise; changeInput(value: string): void; finishTranscription(audioBlob: Blob): Promise; private syncSuggestionsFromCore; addFile(): void; removeAttachment(id: string): void; handleDragOver(event: DragEvent): void; handleDragLeave(event: DragEvent): void; handleDrop(event: DragEvent): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } declare class CopilotChatToolCallsView { readonly message: _angular_core.InputSignal<{ role: "assistant"; id: string; name?: string | undefined; content?: string | undefined; encryptedValue?: string | undefined; toolCalls?: { function: { name: string; arguments: string; }; type: "function"; id: string; encryptedValue?: string | undefined; }[] | undefined; }>; readonly messages: _angular_core.InputSignal<({ role: "developer"; content: string; id: string; name?: string | undefined; encryptedValue?: string | undefined; } | { role: "system"; content: string; id: string; name?: string | undefined; encryptedValue?: string | undefined; } | { role: "assistant"; id: string; name?: string | undefined; content?: string | undefined; encryptedValue?: string | undefined; toolCalls?: { function: { name: string; arguments: string; }; type: "function"; id: string; encryptedValue?: string | undefined; }[] | undefined; } | { role: "user"; content: string | ({ type: "text"; text: string; } | { type: "image"; source: { type: "data"; value: string; mimeType: string; } | { type: "url"; value: string; mimeType?: string | undefined; }; metadata?: unknown; } | { type: "audio"; source: { type: "data"; value: string; mimeType: string; } | { type: "url"; value: string; mimeType?: string | undefined; }; metadata?: unknown; } | { type: "video"; source: { type: "data"; value: string; mimeType: string; } | { type: "url"; value: string; mimeType?: string | undefined; }; metadata?: unknown; } | { type: "document"; source: { type: "data"; value: string; mimeType: string; } | { type: "url"; value: string; mimeType?: string | undefined; }; metadata?: unknown; } | { type: "binary"; mimeType: string; id?: string | undefined; data?: string | undefined; url?: string | undefined; filename?: string | undefined; })[]; id: string; name?: string | undefined; encryptedValue?: string | undefined; } | { role: "tool"; toolCallId: string; content: string; id: string; encryptedValue?: string | undefined; error?: string | undefined; } | { role: "activity"; content: Record; id: string; activityType: string; } | { role: "reasoning"; content: string; id: string; encryptedValue?: string | undefined; })[]>; readonly agentId: _angular_core.InputSignal; readonly isLoading: _angular_core.InputSignal; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } interface AssistantMessageMarkdownRendererContext { content: string; } interface AssistantMessageToolbarContext { children?: any; } interface AssistantMessageCopyButtonContext { content?: string; } interface ThumbsUpButtonContext { } interface ThumbsDownButtonContext { } interface ReadAloudButtonContext { } interface RegenerateButtonContext { } interface CopilotChatAssistantMessageOnThumbsUpProps { message: AssistantMessage; } interface CopilotChatAssistantMessageOnThumbsDownProps { message: AssistantMessage; } interface CopilotChatAssistantMessageOnReadAloudProps { message: AssistantMessage; } interface CopilotChatAssistantMessageOnRegenerateProps { message: AssistantMessage; } declare class CopilotChatAssistantMessageRenderer implements AfterViewInit { readonly content: _angular_core.InputSignal; readonly inputClass: _angular_core.InputSignal; readonly labels: _copilotkit_angular.CopilotChatLabels; markdownContainer?: ElementRef; private elementRef; private copyStates; readonly renderedHtml: _angular_core.Signal; constructor(); ngAfterViewInit(): void; private updateContent; private codeBlocksMap; private markedInstance; private initializeMarked; private renderMarkdown; private renderMathEquations; handleClick(event: MouseEvent): void; private copyCodeBlock; private generateBlockId; private escapeHtml; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } interface CopilotIconNode { readonly tag: "path" | "rect"; readonly attributes: Readonly>; } type CopilotIconData = readonly CopilotIconNode[]; declare class CopilotChatAssistantMessageToolbarButton { title: _angular_core.InputSignal; disabled: _angular_core.InputSignal; inputClass: _angular_core.InputSignal; computedClass: _angular_core.Signal; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } declare class CopilotChatAssistantMessageCopyButton { readonly title: _angular_core.InputSignal; readonly disabled: _angular_core.InputSignal; readonly inputClass: _angular_core.InputSignal; readonly content: _angular_core.InputSignal; readonly clicked: _angular_core.OutputEmitterRef; readonly CopyIcon: CopilotIconData; readonly CheckIcon: CopilotIconData; readonly copied: _angular_core.WritableSignal; readonly labels: _copilotkit_angular.CopilotChatLabels; handleCopy(event?: Event): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } declare class CopilotChatAssistantMessageThumbsUpButton { readonly title: _angular_core.InputSignal; readonly disabled: _angular_core.InputSignal; readonly inputClass: _angular_core.InputSignal; readonly clicked: _angular_core.OutputEmitterRef; readonly ThumbsUpIcon: CopilotIconData; readonly labels: _copilotkit_angular.CopilotChatLabels; handleClick(event?: Event): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } declare class CopilotChatAssistantMessageThumbsDownButton { readonly title: _angular_core.InputSignal; readonly disabled: _angular_core.InputSignal; readonly inputClass: _angular_core.InputSignal; readonly clicked: _angular_core.OutputEmitterRef; readonly ThumbsDownIcon: CopilotIconData; readonly labels: _copilotkit_angular.CopilotChatLabels; handleClick(event?: Event): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } declare class CopilotChatAssistantMessageReadAloudButton { readonly title: _angular_core.InputSignal; readonly disabled: _angular_core.InputSignal; readonly inputClass: _angular_core.InputSignal; readonly clicked: _angular_core.OutputEmitterRef; readonly Volume2Icon: CopilotIconData; readonly labels: _copilotkit_angular.CopilotChatLabels; handleClick(event?: Event): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } declare class CopilotChatAssistantMessageRegenerateButton { readonly title: _angular_core.InputSignal; readonly disabled: _angular_core.InputSignal; readonly inputClass: _angular_core.InputSignal; readonly clicked: _angular_core.OutputEmitterRef; readonly RefreshCwIcon: CopilotIconData; readonly labels: _copilotkit_angular.CopilotChatLabels; handleClick(event?: Event): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } declare class CopilotChatAssistantMessageToolbar { readonly inputClass: _angular_core.InputSignal; readonly computedClass: _angular_core.Signal; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵdir: _angular_core.ɵɵDirectiveDeclaration; } declare class CopilotChatViewHandlers { hasAssistantThumbsUpHandler: _angular_core.WritableSignal; hasAssistantThumbsDownHandler: _angular_core.WritableSignal; hasAssistantReadAloudHandler: _angular_core.WritableSignal; hasAssistantRegenerateHandler: _angular_core.WritableSignal; hasUserCopyHandler: _angular_core.WritableSignal; hasUserEditHandler: _angular_core.WritableSignal; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵprov: _angular_core.ɵɵInjectableDeclaration; } declare class CopilotChatAssistantMessage { markdownRendererTemplate?: TemplateRef; toolbarTemplate?: TemplateRef; copyButtonTemplate?: TemplateRef; thumbsUpButtonTemplate?: TemplateRef; thumbsDownButtonTemplate?: TemplateRef; readAloudButtonTemplate?: TemplateRef; regenerateButtonTemplate?: TemplateRef; toolCallsViewTemplate?: TemplateRef; readonly markdownRendererClass: _angular_core.InputSignal; readonly toolbarClass: _angular_core.InputSignal; readonly copyButtonClass: _angular_core.InputSignal; readonly thumbsUpButtonClass: _angular_core.InputSignal; readonly thumbsDownButtonClass: _angular_core.InputSignal; readonly readAloudButtonClass: _angular_core.InputSignal; readonly regenerateButtonClass: _angular_core.InputSignal; readonly toolCallsViewClass: _angular_core.InputSignal; readonly markdownRendererComponent: _angular_core.InputSignal>; readonly toolbarComponent: _angular_core.InputSignal>; readonly copyButtonComponent: _angular_core.InputSignal>; readonly thumbsUpButtonComponent: _angular_core.InputSignal>; readonly thumbsDownButtonComponent: _angular_core.InputSignal>; readonly readAloudButtonComponent: _angular_core.InputSignal>; readonly regenerateButtonComponent: _angular_core.InputSignal>; readonly toolCallsViewComponent: _angular_core.InputSignal>; readonly message: _angular_core.InputSignal<{ role: "assistant"; id: string; name?: string | undefined; content?: string | undefined; encryptedValue?: string | undefined; toolCalls?: { function: { name: string; arguments: string; }; type: "function"; id: string; encryptedValue?: string | undefined; }[] | undefined; }>; readonly messages: _angular_core.InputSignal<({ role: "developer"; content: string; id: string; name?: string | undefined; encryptedValue?: string | undefined; } | { role: "system"; content: string; id: string; name?: string | undefined; encryptedValue?: string | undefined; } | { role: "assistant"; id: string; name?: string | undefined; content?: string | undefined; encryptedValue?: string | undefined; toolCalls?: { function: { name: string; arguments: string; }; type: "function"; id: string; encryptedValue?: string | undefined; }[] | undefined; } | { role: "user"; content: string | ({ type: "text"; text: string; } | { type: "image"; source: { type: "data"; value: string; mimeType: string; } | { type: "url"; value: string; mimeType?: string | undefined; }; metadata?: unknown; } | { type: "audio"; source: { type: "data"; value: string; mimeType: string; } | { type: "url"; value: string; mimeType?: string | undefined; }; metadata?: unknown; } | { type: "video"; source: { type: "data"; value: string; mimeType: string; } | { type: "url"; value: string; mimeType?: string | undefined; }; metadata?: unknown; } | { type: "document"; source: { type: "data"; value: string; mimeType: string; } | { type: "url"; value: string; mimeType?: string | undefined; }; metadata?: unknown; } | { type: "binary"; mimeType: string; id?: string | undefined; data?: string | undefined; url?: string | undefined; filename?: string | undefined; })[]; id: string; name?: string | undefined; encryptedValue?: string | undefined; } | { role: "tool"; toolCallId: string; content: string; id: string; encryptedValue?: string | undefined; error?: string | undefined; } | { role: "activity"; content: Record; id: string; activityType: string; } | { role: "reasoning"; content: string; id: string; encryptedValue?: string | undefined; })[]>; readonly agentId: _angular_core.InputSignal; readonly isLoading: _angular_core.InputSignal; readonly additionalToolbarItems: _angular_core.InputSignal>; readonly toolbarVisible: _angular_core.InputSignal; readonly inputClass: _angular_core.InputSignal; handlers: CopilotChatViewHandlers; constructor(handlers?: CopilotChatViewHandlers | null); thumbsUp: _angular_core.OutputEmitterRef; thumbsDown: _angular_core.OutputEmitterRef; readAloud: _angular_core.OutputEmitterRef; regenerate: _angular_core.OutputEmitterRef; customClass: _angular_core.WritableSignal; computedClass: _angular_core.Signal; protected readonly defaultThumbsUpButtonComponent: typeof CopilotChatAssistantMessageThumbsUpButton; protected readonly defaultThumbsDownButtonComponent: typeof CopilotChatAssistantMessageThumbsDownButton; protected readonly CopilotChatAssistantMessageRenderer: typeof CopilotChatAssistantMessageRenderer; protected readonly CopilotChatAssistantMessageToolbar: typeof CopilotChatAssistantMessageToolbar; protected readonly CopilotChatAssistantMessageCopyButton: typeof CopilotChatAssistantMessageCopyButton; protected readonly CopilotChatToolCallsView: typeof CopilotChatToolCallsView; markdownRendererContext: _angular_core.Signal; copyButtonOutputs: { clicked: () => void; }; thumbsUpButtonOutputs: { clicked: () => void; }; thumbsDownButtonOutputs: { clicked: () => void; }; readAloudButtonOutputs: { clicked: () => void; }; regenerateButtonOutputs: { clicked: () => void; }; toolbarContext: _angular_core.Signal; hasMessageContent(): boolean; toolCallsViewContext: _angular_core.Signal<{ message: { role: "assistant"; id: string; name?: string | undefined; content?: string | undefined; encryptedValue?: string | undefined; toolCalls?: { function: { name: string; arguments: string; }; type: "function"; id: string; encryptedValue?: string | undefined; }[] | undefined; }; messages: ({ role: "developer"; content: string; id: string; name?: string | undefined; encryptedValue?: string | undefined; } | { role: "system"; content: string; id: string; name?: string | undefined; encryptedValue?: string | undefined; } | { role: "assistant"; id: string; name?: string | undefined; content?: string | undefined; encryptedValue?: string | undefined; toolCalls?: { function: { name: string; arguments: string; }; type: "function"; id: string; encryptedValue?: string | undefined; }[] | undefined; } | { role: "user"; content: string | ({ type: "text"; text: string; } | { type: "image"; source: { type: "data"; value: string; mimeType: string; } | { type: "url"; value: string; mimeType?: string | undefined; }; metadata?: unknown; } | { type: "audio"; source: { type: "data"; value: string; mimeType: string; } | { type: "url"; value: string; mimeType?: string | undefined; }; metadata?: unknown; } | { type: "video"; source: { type: "data"; value: string; mimeType: string; } | { type: "url"; value: string; mimeType?: string | undefined; }; metadata?: unknown; } | { type: "document"; source: { type: "data"; value: string; mimeType: string; } | { type: "url"; value: string; mimeType?: string | undefined; }; metadata?: unknown; } | { type: "binary"; mimeType: string; id?: string | undefined; data?: string | undefined; url?: string | undefined; filename?: string | undefined; })[]; id: string; name?: string | undefined; encryptedValue?: string | undefined; } | { role: "tool"; toolCallId: string; content: string; id: string; encryptedValue?: string | undefined; error?: string | undefined; } | { role: "activity"; content: Record; id: string; activityType: string; } | { role: "reasoning"; content: string; id: string; encryptedValue?: string | undefined; })[]; isLoading: boolean; }>; handleCopy(): void; handleThumbsUp(): void; handleThumbsDown(): void; handleReadAloud(): void; handleRegenerate(): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } declare class CopilotChatAttachmentQueue { readonly attachments: _angular_core.InputSignal; readonly inputClass: _angular_core.InputSignal; readonly removeAttachment: _angular_core.OutputEmitterRef; readonly computedClass: _angular_core.Signal; itemClass(attachment: Attachment): string; sourceUrl(attachment: Attachment): string; documentIcon(attachment: Attachment): string; fileSize(attachment: Attachment): string; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } declare class CopilotChatAttachmentRenderer { readonly type: _angular_core.InputSignal; readonly source: _angular_core.InputSignal<{ type: "data"; value: string; mimeType: string; } | { type: "url"; value: string; mimeType?: string | undefined; }>; readonly filename: _angular_core.InputSignal; readonly inputClass: _angular_core.InputSignal; readonly imageFailed: _angular_core.WritableSignal; readonly sourceUrl: _angular_core.Signal; readonly documentIcon: _angular_core.Signal; readonly imageWrapperClass: _angular_core.Signal; readonly failedImageClass: _angular_core.Signal; readonly audioClass: _angular_core.Signal; readonly videoClass: _angular_core.Signal; readonly documentClass: _angular_core.Signal; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } declare class CopilotChatAttachmentsDirective { readonly config: _angular_core.InputSignal; private readonly chat; private readonly host; private readonly renderer; private readonly destroyRef; private fileInput?; private get enabled(); onDragOver(event: DragEvent): void; onDragLeave(event: DragEvent): void; onDrop(event: DragEvent): Promise; onPaste(event: ClipboardEvent): Promise; openFilePicker(): void; removeAttachment(id: string): void; consume(): Attachment[]; buildContent(value: string, attachments: Attachment[]): InputContent[]; private ensureFileInput; private handleFileInputChange; private processFiles; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵdir: _angular_core.ɵɵDirectiveDeclaration; } /** * Mode of the chat input component */ type CopilotChatInputMode = "input" | "transcribe" | "processing"; /** * Represents a menu item in the tools menu */ type ToolsMenuItem = { label: string; } & ({ action: () => void; items?: never; } | { action?: never; items: (ToolsMenuItem | "-")[]; }); /** * Audio recorder state */ type AudioRecorderState = "idle" | "recording" | "processing"; /** * Error class for audio recorder failures */ declare class AudioRecorderError extends Error { constructor(message: string); } /** * Props for textarea component */ interface CopilotChatTextareaProps { value?: string; placeholder?: string; maxRows?: number; autoFocus?: boolean; disabled?: boolean; onChange?: (value: string) => void; onKeyDown?: (event: KeyboardEvent) => void; inputClass?: string; style?: any; rows?: number; cols?: number; readonly?: boolean; spellcheck?: boolean; wrap?: "hard" | "soft" | "off"; } /** * Props for button components */ interface CopilotChatButtonProps { disabled?: boolean; onClick?: () => void; inputClass?: string; style?: any; type?: "button" | "submit" | "reset"; ariaLabel?: string; ariaPressed?: boolean; ariaExpanded?: boolean; title?: string; } /** * Props for toolbar button with tooltip */ interface CopilotChatToolbarButtonProps extends CopilotChatButtonProps { icon?: TemplateRef; tooltip?: string; variant?: "primary" | "secondary"; } /** * Props for tools menu button */ interface CopilotChatToolsButtonProps extends CopilotChatButtonProps { toolsMenu?: (ToolsMenuItem | "-")[]; } /** * Props for audio recorder */ interface CopilotChatAudioRecorderProps { inputClass?: string; style?: any; onStateChange?: (state: AudioRecorderState) => void; showControls?: boolean; maxDuration?: number; } /** * Props for toolbar */ interface CopilotChatToolbarProps { inputClass?: string; style?: any; position?: "top" | "bottom"; alignment?: "left" | "center" | "right" | "space-between"; } /** * Slot configuration for chat input */ interface CopilotChatInputSlots { textArea?: Type | TemplateRef; sendButton?: Type | TemplateRef; startTranscribeButton?: Type | TemplateRef; cancelTranscribeButton?: Type | TemplateRef; finishTranscribeButton?: Type | TemplateRef; addFileButton?: Type | TemplateRef; toolsButton?: Type | TemplateRef; toolbar?: Type | TemplateRef; audioRecorder?: Type | TemplateRef; } /** * Input configuration for the chat input component */ interface CopilotChatInputConfig { mode?: CopilotChatInputMode; toolsMenu?: (ToolsMenuItem | "-")[]; autoFocus?: boolean; additionalToolbarItems?: TemplateRef; value?: string; class?: string; } /** * Output events for the chat input component */ interface CopilotChatInputOutputs { submitMessage: (value: string) => void; startTranscribe: () => void; cancelTranscribe: () => void; finishTranscribe: () => void; addFile: () => void; changeValue: (value: string) => void; } declare class CopilotChatAudioRecorder implements AfterViewInit { private readonly canvasRef; inputClass: _angular_core.InputSignal; inputShowControls: _angular_core.InputSignal; stateChange: _angular_core.OutputEmitterRef; error: _angular_core.OutputEmitterRef; readonly state: _angular_core.WritableSignal; readonly computedClass: _angular_core.Signal; private mediaRecorder?; private stream?; private audioContext?; private analyser?; private audioChunks; private starting; private animationFrameId?; private amplitudeHistory; private scrollOffset; private smoothedAmplitude; private fadeOpacity; constructor(); ngAfterViewInit(): void; /** * Request microphone access and start recording. */ start(): Promise; /** * Stop recording and resolve with the captured audio. */ stop(): Promise; getState(): AudioRecorderState; /** * Release every capture/animation resource. Safe to call repeatedly. */ dispose(): void; private setState; private toRecorderError; private cleanup; /** RMS amplitude from time-domain samples (128 is silence). */ private calculateAmplitude; private startAnimation; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } declare class CopilotChatSendButton { disabled: _angular_core.InputSignal; clicked: _angular_core.OutputEmitterRef; readonly ArrowUpIcon: CopilotIconData; buttonClass: string; onClick(): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } declare class CopilotChatStartTranscribeButton { disabled: _angular_core.InputSignal; clicked: _angular_core.OutputEmitterRef; readonly labels: _copilotkit_angular.CopilotChatLabels; readonly MicIcon: CopilotIconData; buttonClass: string; get label(): string; onClick(): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } declare class CopilotChatCancelTranscribeButton { disabled: _angular_core.InputSignal; clicked: _angular_core.OutputEmitterRef; readonly labels: _copilotkit_angular.CopilotChatLabels; readonly XIcon: CopilotIconData; buttonClass: string; get label(): string; onClick(): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } declare class CopilotChatFinishTranscribeButton { disabled: _angular_core.InputSignal; clicked: _angular_core.OutputEmitterRef; readonly labels: _copilotkit_angular.CopilotChatLabels; readonly CheckIcon: CopilotIconData; buttonClass: string; get label(): string; onClick(): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } declare class CopilotChatAddFileButton { disabled: _angular_core.InputSignal; clicked: _angular_core.OutputEmitterRef; readonly labels: _copilotkit_angular.CopilotChatLabels; readonly PlusIcon: CopilotIconData; buttonClass: string; get label(): string; onClick(): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } declare class CopilotChatToolbarButton { disabled: _angular_core.InputSignal; variant: _angular_core.InputSignal<"primary" | "secondary">; customClass: _angular_core.InputSignal; title: _angular_core.InputSignal; clicked: _angular_core.OutputEmitterRef; computedClass: _angular_core.Signal; onClick(): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } declare class CopilotChatTextarea implements AfterViewInit { private elementRef; private platformId; get textareaRef(): ElementRef; inputValue: _angular_core.InputSignal; inputPlaceholder: _angular_core.InputSignal; inputMaxRows: _angular_core.InputSignal; inputAutoFocus: _angular_core.InputSignal; inputDisabled: _angular_core.InputSignal; inputClass: _angular_core.InputSignal; valueChange: _angular_core.OutputEmitterRef; keyDown: _angular_core.OutputEmitterRef; readonly chatLabels: _copilotkit_angular.CopilotChatLabels; readonly chatState: _copilotkit_angular.ChatState; maxHeight: _angular_core.WritableSignal; computedValue: _angular_core.Signal; placeholder: _angular_core.Signal; disabled: _angular_core.Signal; computedClass: _angular_core.Signal; constructor(); ngAfterViewInit(): void; onInput(event: Event): void; onKeyDown(event: KeyboardEvent): void; private calculateMaxHeight; private adjustHeight; /** * Public method to focus the textarea */ focus(): void; /** * Public method to get current value */ getValue(): string; /** * Public method to set value programmatically */ setValue(value: string): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } declare class CopilotChatToolbar { readonly inputClass: _angular_core.InputSignal; readonly computedClass: _angular_core.Signal; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } declare class CopilotChatToolsMenu { readonly PlusIcon: CopilotIconData; readonly ChevronRightIcon: CopilotIconData; inputToolsMenu: _angular_core.InputSignal<(ToolsMenuItem | "-")[]>; inputDisabled: _angular_core.InputSignal; inputClass: _angular_core.InputSignal; inputAddFile: _angular_core.InputSignal<() => void>; private labels; toolsMenu: _angular_core.Signal<(ToolsMenuItem | "-")[]>; disabled: _angular_core.Signal; customClass: _angular_core.Signal; addFile: _angular_core.Signal<() => void>; menuItems: _angular_core.Signal<(ToolsMenuItem | "-")[]>; hasItems: _angular_core.Signal; triggerDisabled: _angular_core.Signal; readonly label: string; tooltipLabel: _angular_core.Signal; buttonClass: _angular_core.Signal; isMenuItem(item: any): item is ToolsMenuItem; handleItemClick(item: ToolsMenuItem): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } /** * Context provided to slot templates */ interface SendButtonContext { send: () => void; disabled: boolean; value: string; } interface ToolbarContext { mode: CopilotChatInputMode; value: string; } declare class CopilotChatInput implements OnDestroy { readonly textAreaRef: _angular_core.Signal; readonly audioRecorderRef: _angular_core.Signal; readonly sendButtonTemplate: _angular_core.Signal>; readonly toolbarTemplate: _angular_core.Signal>; readonly textAreaTemplate: _angular_core.Signal>; readonly audioRecorderTemplate: _angular_core.Signal>; readonly startTranscribeButtonTemplate: _angular_core.Signal>; readonly cancelTranscribeButtonTemplate: _angular_core.Signal>; readonly finishTranscribeButtonTemplate: _angular_core.Signal>; readonly addFileButtonTemplate: _angular_core.Signal>; readonly toolsButtonTemplate: _angular_core.Signal>; sendButtonClass: _angular_core.InputSignal; toolbarClass: _angular_core.InputSignal; textAreaClass: _angular_core.InputSignal; textAreaMaxRows: _angular_core.InputSignal; textAreaPlaceholder: _angular_core.InputSignal; audioRecorderClass: _angular_core.InputSignal; startTranscribeButtonClass: _angular_core.InputSignal; cancelTranscribeButtonClass: _angular_core.InputSignal; finishTranscribeButtonClass: _angular_core.InputSignal; addFileButtonClass: _angular_core.InputSignal; toolsButtonClass: _angular_core.InputSignal; sendButtonComponent: _angular_core.InputSignal>; toolbarComponent: _angular_core.InputSignal>; textAreaComponent: _angular_core.InputSignal>; audioRecorderComponent: _angular_core.InputSignal>; startTranscribeButtonComponent: _angular_core.InputSignal>; cancelTranscribeButtonComponent: _angular_core.InputSignal>; finishTranscribeButtonComponent: _angular_core.InputSignal>; addFileButtonComponent: _angular_core.InputSignal>; toolsButtonComponent: _angular_core.InputSignal>; mode: _angular_core.InputSignal; toolsMenu: _angular_core.InputSignal<(ToolsMenuItem | "-")[]>; autoFocus: _angular_core.InputSignal; value: _angular_core.InputSignal; inputClass: _angular_core.InputSignal; additionalToolbarItems: _angular_core.InputSignal>; submitMessage: _angular_core.OutputEmitterRef; startTranscribe: _angular_core.OutputEmitterRef; cancelTranscribe: _angular_core.OutputEmitterRef; finishTranscribe: _angular_core.OutputEmitterRef; finishTranscribeWithAudio: _angular_core.OutputEmitterRef; addFile: _angular_core.OutputEmitterRef; valueChange: _angular_core.OutputEmitterRef; readonly ArrowUpIcon: CopilotIconData; readonly defaultButtonClass: string; readonly labels: _copilotkit_angular.CopilotChatLabels; readonly chatState: _copilotkit_angular.ChatState; modeSignal: _angular_core.WritableSignal; toolsMenuSignal: _angular_core.WritableSignal<(ToolsMenuItem | "-")[]>; autoFocusSignal: _angular_core.WritableSignal; customClass: _angular_core.WritableSignal; defaultAudioRecorder: typeof CopilotChatAudioRecorder; defaultSendButton: any; CopilotChatToolbar: typeof CopilotChatToolbar; CopilotChatAddFileButton: typeof CopilotChatAddFileButton; CopilotChatToolsMenu: typeof CopilotChatToolsMenu; CopilotChatCancelTranscribeButton: typeof CopilotChatCancelTranscribeButton; CopilotChatFinishTranscribeButton: typeof CopilotChatFinishTranscribeButton; CopilotChatStartTranscribeButton: typeof CopilotChatStartTranscribeButton; computedMode: _angular_core.Signal; computedToolsMenu: _angular_core.Signal<(ToolsMenuItem | "-")[]>; computedAutoFocus: _angular_core.Signal; computedValue: _angular_core.Signal; addFileButtonDisabled: _angular_core.Signal; addFileMenuAction: _angular_core.Signal<() => void>; sendButtonDisabled: _angular_core.Signal; computedClass: _angular_core.Signal; defaultTextAreaClass: _angular_core.Signal; sendButtonContext: _angular_core.Signal; toolbarContext: _angular_core.Signal; textAreaContext: _angular_core.Signal<{ value: string; autoFocus: boolean; disabled: boolean; maxRows: number; placeholder: string; inputClass: string; onKeyDown: (event: KeyboardEvent) => void; onChange: (value: string) => void; }>; audioRecorderContext: _angular_core.Signal<{ inputShowControls: boolean; }>; toolsContext: _angular_core.Signal<{ inputToolsMenu: (ToolsMenuItem | "-")[]; inputDisabled: boolean; }>; constructor(); addFileButtonOutputs: { clicked: () => void; }; cancelTranscribeButtonOutputs: { clicked: () => void; }; finishTranscribeButtonOutputs: { clicked: () => Promise; }; startTranscribeButtonOutputs: { clicked: () => void; }; sendButtonOutputs: { clicked: () => void; click: () => void; }; ngOnDestroy(): void; handleKeyDown(event: KeyboardEvent): void; handleValueChange(value: string): void; send(): void; handleStartTranscribe(): void; handleCancelTranscribe(): void; handleFinishTranscribe(): Promise; handleAddFile(): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } /** * Default components used by CopilotChatInput. * These can be imported and reused when creating custom slot implementations. * * @example * ```typescript * import { CopilotChatInputDefaults } from '@copilotkit/angular'; * * @Component({ * template: ` * * * ` * }) * export class MyComponent { * CustomSendButton = class extends CopilotChatInputDefaults.SendButton { * // Custom implementation * }; * } * ``` */ declare class CopilotChatInputDefaults { static readonly TextArea: typeof CopilotChatTextarea; static readonly AudioRecorder: typeof CopilotChatAudioRecorder; static readonly SendButton: typeof CopilotChatSendButton; static readonly StartTranscribeButton: typeof CopilotChatStartTranscribeButton; static readonly CancelTranscribeButton: typeof CopilotChatCancelTranscribeButton; static readonly FinishTranscribeButton: typeof CopilotChatFinishTranscribeButton; static readonly AddFileButton: typeof CopilotChatAddFileButton; static readonly Toolbar: typeof CopilotChatToolbar; static readonly ToolsMenu: typeof CopilotChatToolsMenu; } interface CopilotChatUserMessageOnEditMessageProps { message: UserMessage; } interface CopilotChatUserMessageOnSwitchToBranchProps { message: UserMessage; branchIndex: number; numberOfBranches: number; } interface MessageRendererContext { content: string; } interface CopyButtonContext { content?: string; copied?: boolean; } interface EditButtonContext { } interface BranchNavigationContext { currentBranch: number; numberOfBranches: number; onSwitchToBranch?: (props: CopilotChatUserMessageOnSwitchToBranchProps) => void; message: UserMessage; } interface UserMessageToolbarContext { children?: any; } declare class CopilotChatUserMessageRenderer { readonly content: _angular_core.InputSignal; readonly inputClass: _angular_core.InputSignal; readonly computedClass: _angular_core.Signal; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } declare class CopilotChatUserMessageToolbarButton { title: _angular_core.InputSignal; disabled: _angular_core.InputSignal; inputClass: _angular_core.InputSignal; computedClass: _angular_core.Signal; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } declare class CopilotChatUserMessageCopyButton { readonly title: _angular_core.InputSignal; readonly disabled: _angular_core.InputSignal; readonly inputClass: _angular_core.InputSignal; readonly content: _angular_core.InputSignal; readonly clicked: _angular_core.OutputEmitterRef; readonly CopyIcon: CopilotIconData; readonly CheckIcon: CopilotIconData; readonly copied: _angular_core.WritableSignal; readonly labels: _copilotkit_angular.CopilotChatLabels; handleCopy(): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } declare class CopilotChatUserMessageEditButton { title: _angular_core.InputSignal; disabled: _angular_core.InputSignal; inputClass: _angular_core.InputSignal; clicked: _angular_core.OutputEmitterRef; readonly EditIcon: CopilotIconData; readonly labels: _copilotkit_angular.CopilotChatLabels; handleEdit(): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } declare class CopilotChatUserMessageToolbar { readonly inputClass: _angular_core.InputSignal; readonly computedClass: _angular_core.Signal; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } declare class CopilotChatUserMessageBranchNavigation { currentBranch: _angular_core.InputSignal; numberOfBranches: _angular_core.InputSignal; message: _angular_core.InputSignal<{ role: "user"; content: string | ({ type: "text"; text: string; } | { type: "image"; source: { type: "data"; value: string; mimeType: string; } | { type: "url"; value: string; mimeType?: string | undefined; }; metadata?: unknown; } | { type: "audio"; source: { type: "data"; value: string; mimeType: string; } | { type: "url"; value: string; mimeType?: string | undefined; }; metadata?: unknown; } | { type: "video"; source: { type: "data"; value: string; mimeType: string; } | { type: "url"; value: string; mimeType?: string | undefined; }; metadata?: unknown; } | { type: "document"; source: { type: "data"; value: string; mimeType: string; } | { type: "url"; value: string; mimeType?: string | undefined; }; metadata?: unknown; } | { type: "binary"; mimeType: string; id?: string | undefined; data?: string | undefined; url?: string | undefined; filename?: string | undefined; })[]; id: string; name?: string | undefined; encryptedValue?: string | undefined; }>; inputClass: _angular_core.InputSignal; switchToBranch: _angular_core.OutputEmitterRef; readonly ChevronLeftIcon: CopilotIconData; readonly ChevronRightIcon: CopilotIconData; readonly buttonClass: string; showNavigation: _angular_core.Signal; canGoPrev: _angular_core.Signal; canGoNext: _angular_core.Signal; computedClass: _angular_core.Signal; handlePrevious(): void; handleNext(): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } type UserMessageMediaPart = ImageInputPart | AudioInputPart | VideoInputPart | DocumentInputPart; declare class CopilotChatUserMessage { messageRendererTemplate?: TemplateRef; toolbarTemplate?: TemplateRef; copyButtonTemplate?: TemplateRef; editButtonTemplate?: TemplateRef; branchNavigationTemplate?: TemplateRef; messageRendererClass: _angular_core.InputSignal; toolbarClass: _angular_core.InputSignal; copyButtonClass: _angular_core.InputSignal; editButtonClass: _angular_core.InputSignal; branchNavigationClass: _angular_core.InputSignal; messageRendererComponent: _angular_core.InputSignal>; toolbarComponent: _angular_core.InputSignal>; copyButtonComponent: _angular_core.InputSignal>; editButtonComponent: _angular_core.InputSignal>; branchNavigationComponent: _angular_core.InputSignal>; message: _angular_core.InputSignal<{ role: "user"; content: string | ({ type: "text"; text: string; } | { type: "image"; source: { type: "data"; value: string; mimeType: string; } | { type: "url"; value: string; mimeType?: string | undefined; }; metadata?: unknown; } | { type: "audio"; source: { type: "data"; value: string; mimeType: string; } | { type: "url"; value: string; mimeType?: string | undefined; }; metadata?: unknown; } | { type: "video"; source: { type: "data"; value: string; mimeType: string; } | { type: "url"; value: string; mimeType?: string | undefined; }; metadata?: unknown; } | { type: "document"; source: { type: "data"; value: string; mimeType: string; } | { type: "url"; value: string; mimeType?: string | undefined; }; metadata?: unknown; } | { type: "binary"; mimeType: string; id?: string | undefined; data?: string | undefined; url?: string | undefined; filename?: string | undefined; })[]; id: string; name?: string | undefined; encryptedValue?: string | undefined; }>; branchIndex: _angular_core.InputSignal; numberOfBranches: _angular_core.InputSignal; additionalToolbarItems: _angular_core.InputSignal>; inputClass: _angular_core.InputSignal; editMessage: _angular_core.OutputEmitterRef; switchToBranch: _angular_core.OutputEmitterRef; branchIndexValue: _angular_core.Signal; numberOfBranchesValue: _angular_core.Signal; CopilotChatUserMessageRenderer: typeof CopilotChatUserMessageRenderer; CopilotChatUserMessageToolbar: typeof CopilotChatUserMessageToolbar; CopilotChatUserMessageCopyButton: typeof CopilotChatUserMessageCopyButton; CopilotChatUserMessageEditButton: typeof CopilotChatUserMessageEditButton; CopilotChatUserMessageBranchNavigation: typeof CopilotChatUserMessageBranchNavigation; showBranchNavigation: _angular_core.Signal; computedClass: _angular_core.Signal; flattenedContent: _angular_core.Signal; mediaParts: _angular_core.Signal; messageRendererContext: _angular_core.Signal; copyButtonOutputs: { clicked: () => void; }; editButtonOutputs: { clicked: () => void; }; branchNavigationContext: _angular_core.Signal; toolbarContext: _angular_core.Signal; handleCopy(): void; handleEdit(): void; handleSwitchToBranch(props: CopilotChatUserMessageOnSwitchToBranchProps): void; filenameFor(part: UserMessageMediaPart): string | undefined; constructor(); static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } /** * Cursor component that matches the React implementation exactly. * Shows a pulsing dot animation to indicate activity. */ declare class CopilotChatMessageViewCursor { inputClass: _angular_core.InputSignal; computedClass: _angular_core.Signal; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } declare class CopilotChatReasoningMessage { readonly message: _angular_core.InputSignal<{ role: "reasoning"; content: string; id: string; encryptedValue?: string | undefined; }>; readonly messages: _angular_core.InputSignal<({ role: "developer"; content: string; id: string; name?: string | undefined; encryptedValue?: string | undefined; } | { role: "system"; content: string; id: string; name?: string | undefined; encryptedValue?: string | undefined; } | { role: "assistant"; id: string; name?: string | undefined; content?: string | undefined; encryptedValue?: string | undefined; toolCalls?: { function: { name: string; arguments: string; }; type: "function"; id: string; encryptedValue?: string | undefined; }[] | undefined; } | { role: "user"; content: string | ({ type: "text"; text: string; } | { type: "image"; source: { type: "data"; value: string; mimeType: string; } | { type: "url"; value: string; mimeType?: string | undefined; }; metadata?: unknown; } | { type: "audio"; source: { type: "data"; value: string; mimeType: string; } | { type: "url"; value: string; mimeType?: string | undefined; }; metadata?: unknown; } | { type: "video"; source: { type: "data"; value: string; mimeType: string; } | { type: "url"; value: string; mimeType?: string | undefined; }; metadata?: unknown; } | { type: "document"; source: { type: "data"; value: string; mimeType: string; } | { type: "url"; value: string; mimeType?: string | undefined; }; metadata?: unknown; } | { type: "binary"; mimeType: string; id?: string | undefined; data?: string | undefined; url?: string | undefined; filename?: string | undefined; })[]; id: string; name?: string | undefined; encryptedValue?: string | undefined; } | { role: "tool"; toolCallId: string; content: string; id: string; encryptedValue?: string | undefined; error?: string | undefined; } | { role: "activity"; content: Record; id: string; activityType: string; } | { role: "reasoning"; content: string; id: string; encryptedValue?: string | undefined; })[]>; readonly isRunning: _angular_core.InputSignal; readonly inputClass: _angular_core.InputSignal; private readonly userToggled; protected readonly isLatest: _angular_core.Signal; protected readonly isStreaming: _angular_core.Signal; private readonly startTime; protected readonly open: _angular_core.WritableSignal; protected readonly hasContent: _angular_core.Signal; protected readonly reasoningContent: _angular_core.Signal; protected readonly label: _angular_core.Signal; protected readonly computedClass: _angular_core.Signal; protected readonly headerClass: _angular_core.Signal; protected readonly chevronClass: _angular_core.Signal; protected toggle(): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } /** * CopilotChatMessageView component - Angular port of the React component. * Renders a list of chat messages with support for custom slots and layouts. * DOM structure and Tailwind classes match the React implementation exactly. */ declare class CopilotChatMessageView { messages: _angular_core.InputSignal<({ role: "developer"; content: string; id: string; name?: string | undefined; encryptedValue?: string | undefined; } | { role: "system"; content: string; id: string; name?: string | undefined; encryptedValue?: string | undefined; } | { role: "assistant"; id: string; name?: string | undefined; content?: string | undefined; encryptedValue?: string | undefined; toolCalls?: { function: { name: string; arguments: string; }; type: "function"; id: string; encryptedValue?: string | undefined; }[] | undefined; } | { role: "user"; content: string | ({ type: "text"; text: string; } | { type: "image"; source: { type: "data"; value: string; mimeType: string; } | { type: "url"; value: string; mimeType?: string | undefined; }; metadata?: unknown; } | { type: "audio"; source: { type: "data"; value: string; mimeType: string; } | { type: "url"; value: string; mimeType?: string | undefined; }; metadata?: unknown; } | { type: "video"; source: { type: "data"; value: string; mimeType: string; } | { type: "url"; value: string; mimeType?: string | undefined; }; metadata?: unknown; } | { type: "document"; source: { type: "data"; value: string; mimeType: string; } | { type: "url"; value: string; mimeType?: string | undefined; }; metadata?: unknown; } | { type: "binary"; mimeType: string; id?: string | undefined; data?: string | undefined; url?: string | undefined; filename?: string | undefined; })[]; id: string; name?: string | undefined; encryptedValue?: string | undefined; } | { role: "tool"; toolCallId: string; content: string; id: string; encryptedValue?: string | undefined; error?: string | undefined; } | { role: "activity"; content: Record; id: string; activityType: string; } | { role: "reasoning"; content: string; id: string; encryptedValue?: string | undefined; })[]>; /** Current agent state exposed to transcript-children slots. */ state: _angular_core.InputSignal; showCursor: _angular_core.InputSignal; isLoading: _angular_core.InputSignal; inputClass: _angular_core.InputSignal; agentId: _angular_core.InputSignal; assistantMessageComponent: _angular_core.InputSignal>; assistantMessageTemplate: _angular_core.InputSignal>; assistantMessageClass: _angular_core.InputSignal; reasoningMessageComponent: _angular_core.InputSignal>; reasoningMessageTemplate: _angular_core.InputSignal>; reasoningMessageClass: _angular_core.InputSignal; childrenComponent: _angular_core.InputSignal>; childrenTemplate: _angular_core.InputSignal>; childrenClass: _angular_core.InputSignal; userMessageComponent: _angular_core.InputSignal>; userMessageTemplate: _angular_core.InputSignal>; userMessageClass: _angular_core.InputSignal; cursorComponent: _angular_core.InputSignal>; cursorTemplate: _angular_core.InputSignal>; cursorClass: _angular_core.InputSignal; customLayoutTemplate?: TemplateRef; assistantMessageThumbsUp: _angular_core.OutputEmitterRef<{ message: Message$1; }>; assistantMessageThumbsDown: _angular_core.OutputEmitterRef<{ message: Message$1; }>; assistantMessageReadAloud: _angular_core.OutputEmitterRef<{ message: Message$1; }>; assistantMessageRegenerate: _angular_core.OutputEmitterRef<{ message: Message$1; }>; userMessageCopy: _angular_core.OutputEmitterRef<{ message: Message$1; }>; userMessageEdit: _angular_core.OutputEmitterRef<{ message: Message$1; }>; protected readonly defaultAssistantComponent: typeof CopilotChatAssistantMessage; protected readonly defaultUserComponent: typeof CopilotChatUserMessage; protected readonly defaultReasoningComponent: typeof CopilotChatReasoningMessage; protected readonly defaultCursorComponent: typeof CopilotChatMessageViewCursor; protected readonly copilotKit: CopilotKit; protected messagesValue: _angular_core.Signal<({ role: "developer"; content: string; id: string; name?: string | undefined; encryptedValue?: string | undefined; } | { role: "system"; content: string; id: string; name?: string | undefined; encryptedValue?: string | undefined; } | { role: "assistant"; id: string; name?: string | undefined; content?: string | undefined; encryptedValue?: string | undefined; toolCalls?: { function: { name: string; arguments: string; }; type: "function"; id: string; encryptedValue?: string | undefined; }[] | undefined; } | { role: "user"; content: string | ({ type: "text"; text: string; } | { type: "image"; source: { type: "data"; value: string; mimeType: string; } | { type: "url"; value: string; mimeType?: string | undefined; }; metadata?: unknown; } | { type: "audio"; source: { type: "data"; value: string; mimeType: string; } | { type: "url"; value: string; mimeType?: string | undefined; }; metadata?: unknown; } | { type: "video"; source: { type: "data"; value: string; mimeType: string; } | { type: "url"; value: string; mimeType?: string | undefined; }; metadata?: unknown; } | { type: "document"; source: { type: "data"; value: string; mimeType: string; } | { type: "url"; value: string; mimeType?: string | undefined; }; metadata?: unknown; } | { type: "binary"; mimeType: string; id?: string | undefined; data?: string | undefined; url?: string | undefined; filename?: string | undefined; })[]; id: string; name?: string | undefined; encryptedValue?: string | undefined; } | { role: "tool"; toolCallId: string; content: string; id: string; encryptedValue?: string | undefined; error?: string | undefined; } | { role: "activity"; content: Record; id: string; activityType: string; } | { role: "reasoning"; content: string; id: string; encryptedValue?: string | undefined; })[]>; protected showCursorValue: _angular_core.Signal; protected isLoadingValue: _angular_core.Signal; protected lastMessage: _angular_core.Signal<{ role: "developer"; content: string; id: string; name?: string | undefined; encryptedValue?: string | undefined; } | { role: "system"; content: string; id: string; name?: string | undefined; encryptedValue?: string | undefined; } | { role: "assistant"; id: string; name?: string | undefined; content?: string | undefined; encryptedValue?: string | undefined; toolCalls?: { function: { name: string; arguments: string; }; type: "function"; id: string; encryptedValue?: string | undefined; }[] | undefined; } | { role: "user"; content: string | ({ type: "text"; text: string; } | { type: "image"; source: { type: "data"; value: string; mimeType: string; } | { type: "url"; value: string; mimeType?: string | undefined; }; metadata?: unknown; } | { type: "audio"; source: { type: "data"; value: string; mimeType: string; } | { type: "url"; value: string; mimeType?: string | undefined; }; metadata?: unknown; } | { type: "video"; source: { type: "data"; value: string; mimeType: string; } | { type: "url"; value: string; mimeType?: string | undefined; }; metadata?: unknown; } | { type: "document"; source: { type: "data"; value: string; mimeType: string; } | { type: "url"; value: string; mimeType?: string | undefined; }; metadata?: unknown; } | { type: "binary"; mimeType: string; id?: string | undefined; data?: string | undefined; url?: string | undefined; filename?: string | undefined; })[]; id: string; name?: string | undefined; encryptedValue?: string | undefined; } | { role: "tool"; toolCallId: string; content: string; id: string; encryptedValue?: string | undefined; error?: string | undefined; } | { role: "activity"; content: Record; id: string; activityType: string; } | { role: "reasoning"; content: string; id: string; encryptedValue?: string | undefined; }>; computedClass: _angular_core.Signal; layoutContext: _angular_core.Signal<{ isLoading: boolean; messages: ({ role: "developer"; content: string; id: string; name?: string | undefined; encryptedValue?: string | undefined; } | { role: "system"; content: string; id: string; name?: string | undefined; encryptedValue?: string | undefined; } | { role: "assistant"; id: string; name?: string | undefined; content?: string | undefined; encryptedValue?: string | undefined; toolCalls?: { function: { name: string; arguments: string; }; type: "function"; id: string; encryptedValue?: string | undefined; }[] | undefined; } | { role: "user"; content: string | ({ type: "text"; text: string; } | { type: "image"; source: { type: "data"; value: string; mimeType: string; } | { type: "url"; value: string; mimeType?: string | undefined; }; metadata?: unknown; } | { type: "audio"; source: { type: "data"; value: string; mimeType: string; } | { type: "url"; value: string; mimeType?: string | undefined; }; metadata?: unknown; } | { type: "video"; source: { type: "data"; value: string; mimeType: string; } | { type: "url"; value: string; mimeType?: string | undefined; }; metadata?: unknown; } | { type: "document"; source: { type: "data"; value: string; mimeType: string; } | { type: "url"; value: string; mimeType?: string | undefined; }; metadata?: unknown; } | { type: "binary"; mimeType: string; id?: string | undefined; data?: string | undefined; url?: string | undefined; filename?: string | undefined; })[]; id: string; name?: string | undefined; encryptedValue?: string | undefined; } | { role: "tool"; toolCallId: string; content: string; id: string; encryptedValue?: string | undefined; error?: string | undefined; } | { role: "activity"; content: Record; id: string; activityType: string; } | { role: "reasoning"; content: string; id: string; encryptedValue?: string | undefined; })[]; showCursor: boolean; messageElements: ({ role: "developer"; content: string; id: string; name?: string | undefined; encryptedValue?: string | undefined; } | { role: "system"; content: string; id: string; name?: string | undefined; encryptedValue?: string | undefined; } | { role: "assistant"; id: string; name?: string | undefined; content?: string | undefined; encryptedValue?: string | undefined; toolCalls?: { function: { name: string; arguments: string; }; type: "function"; id: string; encryptedValue?: string | undefined; }[] | undefined; } | { role: "user"; content: string | ({ type: "text"; text: string; } | { type: "image"; source: { type: "data"; value: string; mimeType: string; } | { type: "url"; value: string; mimeType?: string | undefined; }; metadata?: unknown; } | { type: "audio"; source: { type: "data"; value: string; mimeType: string; } | { type: "url"; value: string; mimeType?: string | undefined; }; metadata?: unknown; } | { type: "video"; source: { type: "data"; value: string; mimeType: string; } | { type: "url"; value: string; mimeType?: string | undefined; }; metadata?: unknown; } | { type: "document"; source: { type: "data"; value: string; mimeType: string; } | { type: "url"; value: string; mimeType?: string | undefined; }; metadata?: unknown; } | { type: "binary"; mimeType: string; id?: string | undefined; data?: string | undefined; url?: string | undefined; filename?: string | undefined; })[]; id: string; name?: string | undefined; encryptedValue?: string | undefined; } | { role: "tool"; toolCallId: string; content: string; id: string; encryptedValue?: string | undefined; error?: string | undefined; } | { role: "activity"; content: Record; id: string; activityType: string; } | { role: "reasoning"; content: string; id: string; encryptedValue?: string | undefined; })[]; }>; assistantMessageSlot: _angular_core.Signal>; userMessageSlot: _angular_core.Signal>; cursorSlot: _angular_core.Signal>; mergeAssistantProps(message: Message$1): { message: { role: "developer"; content: string; id: string; name?: string | undefined; encryptedValue?: string | undefined; } | { role: "system"; content: string; id: string; name?: string | undefined; encryptedValue?: string | undefined; } | { role: "assistant"; id: string; name?: string | undefined; content?: string | undefined; encryptedValue?: string | undefined; toolCalls?: { function: { name: string; arguments: string; }; type: "function"; id: string; encryptedValue?: string | undefined; }[] | undefined; } | { role: "user"; content: string | ({ type: "text"; text: string; } | { type: "image"; source: { type: "data"; value: string; mimeType: string; } | { type: "url"; value: string; mimeType?: string | undefined; }; metadata?: unknown; } | { type: "audio"; source: { type: "data"; value: string; mimeType: string; } | { type: "url"; value: string; mimeType?: string | undefined; }; metadata?: unknown; } | { type: "video"; source: { type: "data"; value: string; mimeType: string; } | { type: "url"; value: string; mimeType?: string | undefined; }; metadata?: unknown; } | { type: "document"; source: { type: "data"; value: string; mimeType: string; } | { type: "url"; value: string; mimeType?: string | undefined; }; metadata?: unknown; } | { type: "binary"; mimeType: string; id?: string | undefined; data?: string | undefined; url?: string | undefined; filename?: string | undefined; })[]; id: string; name?: string | undefined; encryptedValue?: string | undefined; } | { role: "tool"; toolCallId: string; content: string; id: string; encryptedValue?: string | undefined; error?: string | undefined; } | { role: "activity"; content: Record; id: string; activityType: string; } | { role: "reasoning"; content: string; id: string; encryptedValue?: string | undefined; }; messages: ({ role: "developer"; content: string; id: string; name?: string | undefined; encryptedValue?: string | undefined; } | { role: "system"; content: string; id: string; name?: string | undefined; encryptedValue?: string | undefined; } | { role: "assistant"; id: string; name?: string | undefined; content?: string | undefined; encryptedValue?: string | undefined; toolCalls?: { function: { name: string; arguments: string; }; type: "function"; id: string; encryptedValue?: string | undefined; }[] | undefined; } | { role: "user"; content: string | ({ type: "text"; text: string; } | { type: "image"; source: { type: "data"; value: string; mimeType: string; } | { type: "url"; value: string; mimeType?: string | undefined; }; metadata?: unknown; } | { type: "audio"; source: { type: "data"; value: string; mimeType: string; } | { type: "url"; value: string; mimeType?: string | undefined; }; metadata?: unknown; } | { type: "video"; source: { type: "data"; value: string; mimeType: string; } | { type: "url"; value: string; mimeType?: string | undefined; }; metadata?: unknown; } | { type: "document"; source: { type: "data"; value: string; mimeType: string; } | { type: "url"; value: string; mimeType?: string | undefined; }; metadata?: unknown; } | { type: "binary"; mimeType: string; id?: string | undefined; data?: string | undefined; url?: string | undefined; filename?: string | undefined; })[]; id: string; name?: string | undefined; encryptedValue?: string | undefined; } | { role: "tool"; toolCallId: string; content: string; id: string; encryptedValue?: string | undefined; error?: string | undefined; } | { role: "activity"; content: Record; id: string; activityType: string; } | { role: "reasoning"; content: string; id: string; encryptedValue?: string | undefined; })[]; isLoading: boolean; inputClass: string; }; mergeReasoningProps(message: ReasoningMessage): { message: { role: "reasoning"; content: string; id: string; encryptedValue?: string | undefined; }; messages: ({ role: "developer"; content: string; id: string; name?: string | undefined; encryptedValue?: string | undefined; } | { role: "system"; content: string; id: string; name?: string | undefined; encryptedValue?: string | undefined; } | { role: "assistant"; id: string; name?: string | undefined; content?: string | undefined; encryptedValue?: string | undefined; toolCalls?: { function: { name: string; arguments: string; }; type: "function"; id: string; encryptedValue?: string | undefined; }[] | undefined; } | { role: "user"; content: string | ({ type: "text"; text: string; } | { type: "image"; source: { type: "data"; value: string; mimeType: string; } | { type: "url"; value: string; mimeType?: string | undefined; }; metadata?: unknown; } | { type: "audio"; source: { type: "data"; value: string; mimeType: string; } | { type: "url"; value: string; mimeType?: string | undefined; }; metadata?: unknown; } | { type: "video"; source: { type: "data"; value: string; mimeType: string; } | { type: "url"; value: string; mimeType?: string | undefined; }; metadata?: unknown; } | { type: "document"; source: { type: "data"; value: string; mimeType: string; } | { type: "url"; value: string; mimeType?: string | undefined; }; metadata?: unknown; } | { type: "binary"; mimeType: string; id?: string | undefined; data?: string | undefined; url?: string | undefined; filename?: string | undefined; })[]; id: string; name?: string | undefined; encryptedValue?: string | undefined; } | { role: "tool"; toolCallId: string; content: string; id: string; encryptedValue?: string | undefined; error?: string | undefined; } | { role: "activity"; content: Record; id: string; activityType: string; } | { role: "reasoning"; content: string; id: string; encryptedValue?: string | undefined; })[]; isRunning: boolean; inputClass: string; }; childrenContext(): { messages: ({ role: "developer"; content: string; id: string; name?: string | undefined; encryptedValue?: string | undefined; } | { role: "system"; content: string; id: string; name?: string | undefined; encryptedValue?: string | undefined; } | { role: "assistant"; id: string; name?: string | undefined; content?: string | undefined; encryptedValue?: string | undefined; toolCalls?: { function: { name: string; arguments: string; }; type: "function"; id: string; encryptedValue?: string | undefined; }[] | undefined; } | { role: "user"; content: string | ({ type: "text"; text: string; } | { type: "image"; source: { type: "data"; value: string; mimeType: string; } | { type: "url"; value: string; mimeType?: string | undefined; }; metadata?: unknown; } | { type: "audio"; source: { type: "data"; value: string; mimeType: string; } | { type: "url"; value: string; mimeType?: string | undefined; }; metadata?: unknown; } | { type: "video"; source: { type: "data"; value: string; mimeType: string; } | { type: "url"; value: string; mimeType?: string | undefined; }; metadata?: unknown; } | { type: "document"; source: { type: "data"; value: string; mimeType: string; } | { type: "url"; value: string; mimeType?: string | undefined; }; metadata?: unknown; } | { type: "binary"; mimeType: string; id?: string | undefined; data?: string | undefined; url?: string | undefined; filename?: string | undefined; })[]; id: string; name?: string | undefined; encryptedValue?: string | undefined; } | { role: "tool"; toolCallId: string; content: string; id: string; encryptedValue?: string | undefined; error?: string | undefined; } | { role: "activity"; content: Record; id: string; activityType: string; } | { role: "reasoning"; content: string; id: string; encryptedValue?: string | undefined; })[]; state: unknown; agentId: string; isRunning: boolean; inputClass: string; }; mergeUserProps(message: Message$1): { message: { role: "developer"; content: string; id: string; name?: string | undefined; encryptedValue?: string | undefined; } | { role: "system"; content: string; id: string; name?: string | undefined; encryptedValue?: string | undefined; } | { role: "assistant"; id: string; name?: string | undefined; content?: string | undefined; encryptedValue?: string | undefined; toolCalls?: { function: { name: string; arguments: string; }; type: "function"; id: string; encryptedValue?: string | undefined; }[] | undefined; } | { role: "user"; content: string | ({ type: "text"; text: string; } | { type: "image"; source: { type: "data"; value: string; mimeType: string; } | { type: "url"; value: string; mimeType?: string | undefined; }; metadata?: unknown; } | { type: "audio"; source: { type: "data"; value: string; mimeType: string; } | { type: "url"; value: string; mimeType?: string | undefined; }; metadata?: unknown; } | { type: "video"; source: { type: "data"; value: string; mimeType: string; } | { type: "url"; value: string; mimeType?: string | undefined; }; metadata?: unknown; } | { type: "document"; source: { type: "data"; value: string; mimeType: string; } | { type: "url"; value: string; mimeType?: string | undefined; }; metadata?: unknown; } | { type: "binary"; mimeType: string; id?: string | undefined; data?: string | undefined; url?: string | undefined; filename?: string | undefined; })[]; id: string; name?: string | undefined; encryptedValue?: string | undefined; } | { role: "tool"; toolCallId: string; content: string; id: string; encryptedValue?: string | undefined; error?: string | undefined; } | { role: "activity"; content: Record; id: string; activityType: string; } | { role: "reasoning"; content: string; id: string; encryptedValue?: string | undefined; }; inputClass: string; }; asReasoningMessage(message: Message$1): ReasoningMessage; trackByMessageId(index: number, message: Message$1): string; private pickActivityRenderer; protected resolveActivityRender(message: ActivityMessage$1): { component: Type<_copilotkit_angular.ActivityRenderer>; inputs: { activityType: string; content: unknown; message: { role: "activity"; content: Record; id: string; activityType: string; }; agent: _ag_ui_client.AbstractAgent; }; }; handleAssistantThumbsUp(event: { message: Message$1; }): void; handleAssistantThumbsDown(event: { message: Message$1; }): void; handleAssistantReadAloud(event: { message: Message$1; }): void; handleAssistantRegenerate(event: { message: Message$1; }): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } interface MessageViewContext { showCursor: boolean; messages: Message[]; state: unknown; messageElements: any[]; } interface CursorContext { } interface CopilotChatMessageViewProps { messages?: Message[]; state?: unknown; showCursor?: boolean; inputClass?: string; assistantMessageComponent?: Type; assistantMessageTemplate?: TemplateRef; assistantMessageClass?: string; childrenComponent?: Type; childrenTemplate?: TemplateRef; childrenClass?: string; userMessageComponent?: Type; userMessageTemplate?: TemplateRef; userMessageClass?: string; cursorComponent?: Type; cursorTemplate?: TemplateRef; cursorClass?: string; } declare class CopilotChatSuggestionPill { readonly title: _angular_core.InputSignal; readonly disabled: _angular_core.InputSignal; readonly isLoading: _angular_core.InputSignal; readonly inputClass: _angular_core.InputSignal; readonly clicked: _angular_core.OutputEmitterRef; protected readonly computedClass: _angular_core.Signal; handleClick(): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } declare class CopilotChatSuggestionView { readonly suggestions: _angular_core.InputSignal; readonly inputClass: _angular_core.InputSignal; readonly selectSuggestion: _angular_core.OutputEmitterRef<{ suggestion: Suggestion; index: number; }>; protected readonly computedClass: _angular_core.Signal; handleSelect(suggestion: Suggestion, index: number): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } /** * ScrollToBottomButton component for CopilotChatView * Matches React implementation exactly with same Tailwind classes */ declare class CopilotChatViewScrollToBottomButton { inputClass: _angular_core.InputSignal; disabled: _angular_core.InputSignal; onClick: _angular_core.InputSignal<() => void>; clicked: _angular_core.OutputEmitterRef; protected readonly ChevronDown: CopilotIconData; get computedClass(): string; handleClick(): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } /** * ScrollView component for CopilotChatView * Handles auto-scrolling and scroll position management */ declare class CopilotChatViewScrollView implements AfterViewInit, OnDestroy { private cdr; protected readonly chatState: ChatState; autoScroll: _angular_core.InputSignal; inputContainerHeight: _angular_core.InputSignal; isResizing: _angular_core.InputSignal; inputClass: _angular_core.InputSignal; messages: _angular_core.InputSignal<({ role: "developer"; content: string; id: string; name?: string | undefined; encryptedValue?: string | undefined; } | { role: "system"; content: string; id: string; name?: string | undefined; encryptedValue?: string | undefined; } | { role: "assistant"; id: string; name?: string | undefined; content?: string | undefined; encryptedValue?: string | undefined; toolCalls?: { function: { name: string; arguments: string; }; type: "function"; id: string; encryptedValue?: string | undefined; }[] | undefined; } | { role: "user"; content: string | ({ type: "text"; text: string; } | { type: "image"; source: { type: "data"; value: string; mimeType: string; } | { type: "url"; value: string; mimeType?: string | undefined; }; metadata?: unknown; } | { type: "audio"; source: { type: "data"; value: string; mimeType: string; } | { type: "url"; value: string; mimeType?: string | undefined; }; metadata?: unknown; } | { type: "video"; source: { type: "data"; value: string; mimeType: string; } | { type: "url"; value: string; mimeType?: string | undefined; }; metadata?: unknown; } | { type: "document"; source: { type: "data"; value: string; mimeType: string; } | { type: "url"; value: string; mimeType?: string | undefined; }; metadata?: unknown; } | { type: "binary"; mimeType: string; id?: string | undefined; data?: string | undefined; url?: string | undefined; filename?: string | undefined; })[]; id: string; name?: string | undefined; encryptedValue?: string | undefined; } | { role: "tool"; toolCallId: string; content: string; id: string; encryptedValue?: string | undefined; error?: string | undefined; } | { role: "activity"; content: Record; id: string; activityType: string; } | { role: "reasoning"; content: string; id: string; encryptedValue?: string | undefined; })[]>; /** Current agent state forwarded to message-view extension slots. */ state: _angular_core.InputSignal; agentId: _angular_core.InputSignal; messageView: _angular_core.InputSignal; messageViewClass: _angular_core.InputSignal; assistantMessageComponent: _angular_core.InputSignal>; assistantMessageTemplate: _angular_core.InputSignal>; assistantMessageClass: _angular_core.InputSignal; reasoningMessageComponent: _angular_core.InputSignal>; reasoningMessageTemplate: _angular_core.InputSignal>; reasoningMessageClass: _angular_core.InputSignal; messageViewChildrenComponent: _angular_core.InputSignal>; messageViewChildrenTemplate: _angular_core.InputSignal>; messageViewChildrenClass: _angular_core.InputSignal; showCursor: _angular_core.InputSignal; scrollToBottomButton: _angular_core.InputSignal; scrollToBottomButtonClass: _angular_core.InputSignal; assistantMessageThumbsUp: _angular_core.OutputEmitterRef<{ message: Message; }>; assistantMessageThumbsDown: _angular_core.OutputEmitterRef<{ message: Message; }>; assistantMessageReadAloud: _angular_core.OutputEmitterRef<{ message: Message; }>; assistantMessageRegenerate: _angular_core.OutputEmitterRef<{ message: Message; }>; userMessageCopy: _angular_core.OutputEmitterRef<{ message: Message; }>; userMessageEdit: _angular_core.OutputEmitterRef<{ message: Message; }>; scrollContainer?: ElementRef; contentContainer?: ElementRef; stickToBottomDirective?: StickToBottom; protected readonly defaultMessageViewComponent: typeof CopilotChatMessageView; protected readonly defaultScrollToBottomButtonComponent: typeof CopilotChatViewScrollToBottomButton; protected hasMounted: _angular_core.WritableSignal; protected showScrollButton: _angular_core.WritableSignal; protected isAtBottom: _angular_core.WritableSignal; protected hasSuggestions: _angular_core.Signal; protected paddingBottom: _angular_core.Signal; protected computedClass: _angular_core.Signal; private destroy$; private scrollPositionService; constructor(); ngAfterViewInit(): void; /** * Handle isAtBottom change from StickToBottom directive */ onIsAtBottomChange(isAtBottom: boolean): void; /** * Scroll to bottom for manual mode */ scrollToBottom(): void; /** * Scroll to bottom for stick-to-bottom mode */ scrollToBottomFromStick(): void; ngOnDestroy(): void; scrollToBottomOutputs: { clicked: () => void; }; scrollToBottomFromStickOutputs: { clicked: () => void; }; messageViewContext(): any; scrollToBottomContext(): any; scrollToBottomFromStickContext(): any; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } /** * Feather component for CopilotChatView * Creates a gradient overlay effect between messages and input * Matches React implementation exactly with same Tailwind classes */ declare class CopilotChatViewFeather { inputClass: _angular_core.InputSignal; style: _angular_core.InputSignal<{ [key: string]: any; }>; get computedClass(): string; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } /** * Disclaimer component for CopilotChatView * Shows configurable disclaimer text below the input * Integrates with CopilotChatConfigurationService for labels */ declare class CopilotChatViewDisclaimer { inputClass: _angular_core.InputSignal; text: _angular_core.InputSignal; readonly labels: _copilotkit_angular.CopilotChatLabels; get disclaimerText(): string; get computedClass(): string; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } /** * InputContainer component for CopilotChatView * Container for input and disclaimer components * Uses ForwardRef for DOM access */ declare class CopilotChatViewInputContainer extends ElementRef { readonly chatState: ChatState; inputContainerClass: _angular_core.InputSignal; input: _angular_core.InputSignal; inputClass: _angular_core.InputSignal; disclaimer: _angular_core.InputSignal; disclaimerText: _angular_core.InputSignal; disclaimerClass: _angular_core.InputSignal; protected readonly defaultInputComponent: typeof CopilotChatInput; protected readonly defaultDisclaimerComponent: typeof CopilotChatViewDisclaimer; constructor(elementRef: ElementRef); get computedClass(): string; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } /** * CopilotChatView component - Angular port of the React component. * A complete chat interface with message feed and input components. * * @example * ```html * * * ``` */ declare class CopilotChatView implements OnInit, OnChanges, AfterViewInit, OnDestroy { private resizeObserverService; private cdr; private handlers; protected readonly chatState: ChatState; protected readonly UploadIcon: CopilotIconData; messages: _angular_core.InputSignal<({ role: "developer"; content: string; id: string; name?: string | undefined; encryptedValue?: string | undefined; } | { role: "system"; content: string; id: string; name?: string | undefined; encryptedValue?: string | undefined; } | { role: "assistant"; id: string; name?: string | undefined; content?: string | undefined; encryptedValue?: string | undefined; toolCalls?: { function: { name: string; arguments: string; }; type: "function"; id: string; encryptedValue?: string | undefined; }[] | undefined; } | { role: "user"; content: string | ({ type: "text"; text: string; } | { type: "image"; source: { type: "data"; value: string; mimeType: string; } | { type: "url"; value: string; mimeType?: string | undefined; }; metadata?: unknown; } | { type: "audio"; source: { type: "data"; value: string; mimeType: string; } | { type: "url"; value: string; mimeType?: string | undefined; }; metadata?: unknown; } | { type: "video"; source: { type: "data"; value: string; mimeType: string; } | { type: "url"; value: string; mimeType?: string | undefined; }; metadata?: unknown; } | { type: "document"; source: { type: "data"; value: string; mimeType: string; } | { type: "url"; value: string; mimeType?: string | undefined; }; metadata?: unknown; } | { type: "binary"; mimeType: string; id?: string | undefined; data?: string | undefined; url?: string | undefined; filename?: string | undefined; })[]; id: string; name?: string | undefined; encryptedValue?: string | undefined; } | { role: "tool"; toolCallId: string; content: string; id: string; encryptedValue?: string | undefined; error?: string | undefined; } | { role: "activity"; content: Record; id: string; activityType: string; } | { role: "reasoning"; content: string; id: string; encryptedValue?: string | undefined; })[]>; /** Current agent state forwarded to message-view extension slots. */ state: _angular_core.InputSignal; agentId: _angular_core.InputSignal; autoScroll: _angular_core.InputSignal; showCursor: _angular_core.InputSignal; hasExplicitThreadId: _angular_core.InputSignal; messageViewComponent: _angular_core.InputSignal>; messageViewTemplate: _angular_core.InputSignal>; messageViewClass: _angular_core.InputSignal; assistantMessageComponent: _angular_core.InputSignal>; assistantMessageTemplate: _angular_core.InputSignal>; assistantMessageClass: _angular_core.InputSignal; reasoningMessageComponent: _angular_core.InputSignal>; reasoningMessageTemplate: _angular_core.InputSignal>; reasoningMessageClass: _angular_core.InputSignal; messageViewChildrenComponent: _angular_core.InputSignal>; messageViewChildrenTemplate: _angular_core.InputSignal>; messageViewChildrenClass: _angular_core.InputSignal; scrollViewComponent: _angular_core.InputSignal>; scrollViewTemplate: _angular_core.InputSignal>; scrollViewClass: _angular_core.InputSignal; scrollToBottomButtonComponent: _angular_core.InputSignal>; scrollToBottomButtonTemplate: _angular_core.InputSignal>; scrollToBottomButtonClass: _angular_core.InputSignal; inputComponent: _angular_core.InputSignal>; inputTemplate: _angular_core.InputSignal>; inputContainerComponent: _angular_core.InputSignal>; inputContainerTemplate: _angular_core.InputSignal>; inputContainerClass: _angular_core.InputSignal; featherComponent: _angular_core.InputSignal>; featherTemplate: _angular_core.InputSignal>; featherClass: _angular_core.InputSignal; disclaimerComponent: _angular_core.InputSignal>; disclaimerTemplate: _angular_core.InputSignal>; disclaimerClass: _angular_core.InputSignal; disclaimerText: _angular_core.InputSignal; customLayoutTemplate?: TemplateRef; sendButtonTemplate?: TemplateRef; toolbarTemplate?: TemplateRef; textAreaTemplate?: TemplateRef; audioRecorderTemplate?: TemplateRef; assistantMessageMarkdownRendererTemplate?: TemplateRef; thumbsUpButtonTemplate?: TemplateRef; thumbsDownButtonTemplate?: TemplateRef; readAloudButtonTemplate?: TemplateRef; regenerateButtonTemplate?: TemplateRef; assistantMessageThumbsUp: _angular_core.OutputEmitterRef<{ message: Message; }>; assistantMessageThumbsDown: _angular_core.OutputEmitterRef<{ message: Message; }>; assistantMessageReadAloud: _angular_core.OutputEmitterRef<{ message: Message; }>; assistantMessageRegenerate: _angular_core.OutputEmitterRef<{ message: Message; }>; userMessageCopy: _angular_core.OutputEmitterRef<{ message: Message; }>; userMessageEdit: _angular_core.OutputEmitterRef<{ message: Message; }>; inputContainerSlotRef?: ElementRef; protected readonly defaultScrollViewComponent: typeof CopilotChatViewScrollView; protected readonly defaultScrollToBottomButtonComponent: typeof CopilotChatViewScrollToBottomButton; protected readonly defaultInputContainerComponent: typeof CopilotChatViewInputContainer; protected readonly defaultInputComponent: typeof CopilotChatInput; protected readonly defaultFeatherComponent: typeof CopilotChatViewFeather; protected readonly defaultDisclaimerComponent: typeof CopilotChatViewDisclaimer; protected readonly labels: _copilotkit_angular.CopilotChatLabels; protected messagesValue: _angular_core.Signal<({ role: "developer"; content: string; id: string; name?: string | undefined; encryptedValue?: string | undefined; } | { role: "system"; content: string; id: string; name?: string | undefined; encryptedValue?: string | undefined; } | { role: "assistant"; id: string; name?: string | undefined; content?: string | undefined; encryptedValue?: string | undefined; toolCalls?: { function: { name: string; arguments: string; }; type: "function"; id: string; encryptedValue?: string | undefined; }[] | undefined; } | { role: "user"; content: string | ({ type: "text"; text: string; } | { type: "image"; source: { type: "data"; value: string; mimeType: string; } | { type: "url"; value: string; mimeType?: string | undefined; }; metadata?: unknown; } | { type: "audio"; source: { type: "data"; value: string; mimeType: string; } | { type: "url"; value: string; mimeType?: string | undefined; }; metadata?: unknown; } | { type: "video"; source: { type: "data"; value: string; mimeType: string; } | { type: "url"; value: string; mimeType?: string | undefined; }; metadata?: unknown; } | { type: "document"; source: { type: "data"; value: string; mimeType: string; } | { type: "url"; value: string; mimeType?: string | undefined; }; metadata?: unknown; } | { type: "binary"; mimeType: string; id?: string | undefined; data?: string | undefined; url?: string | undefined; filename?: string | undefined; })[]; id: string; name?: string | undefined; encryptedValue?: string | undefined; } | { role: "tool"; toolCallId: string; content: string; id: string; encryptedValue?: string | undefined; error?: string | undefined; } | { role: "activity"; content: Record; id: string; activityType: string; } | { role: "reasoning"; content: string; id: string; encryptedValue?: string | undefined; })[]>; protected autoScrollSignal: _angular_core.Signal; protected showCursorSignal: _angular_core.Signal; protected disclaimerTextSignal: _angular_core.Signal; protected disclaimerClassSignal: _angular_core.Signal; protected inputContainerHeight: _angular_core.WritableSignal; protected isResizing: _angular_core.WritableSignal; protected shouldShowWelcomeScreen: _angular_core.Signal; protected computedClass: _angular_core.Signal; protected dropOverlayClass: _angular_core.Signal; protected messageViewSlot: _angular_core.Signal | TemplateRef>; protected scrollViewSlot: _angular_core.Signal | TemplateRef>; protected scrollToBottomButtonSlot: _angular_core.Signal | TemplateRef>; protected inputSlot: _angular_core.Signal | TemplateRef>; protected inputContainerSlot: _angular_core.Signal | TemplateRef>; protected featherSlot: _angular_core.Signal | TemplateRef>; protected disclaimerSlot: _angular_core.Signal | TemplateRef>; protected scrollViewContext: _angular_core.Signal<{ autoScroll: boolean; scrollToBottomButton: Type | TemplateRef; scrollToBottomButtonClass: string; inputContainerHeight: number; isResizing: boolean; messages: ({ role: "developer"; content: string; id: string; name?: string | undefined; encryptedValue?: string | undefined; } | { role: "system"; content: string; id: string; name?: string | undefined; encryptedValue?: string | undefined; } | { role: "assistant"; id: string; name?: string | undefined; content?: string | undefined; encryptedValue?: string | undefined; toolCalls?: { function: { name: string; arguments: string; }; type: "function"; id: string; encryptedValue?: string | undefined; }[] | undefined; } | { role: "user"; content: string | ({ type: "text"; text: string; } | { type: "image"; source: { type: "data"; value: string; mimeType: string; } | { type: "url"; value: string; mimeType?: string | undefined; }; metadata?: unknown; } | { type: "audio"; source: { type: "data"; value: string; mimeType: string; } | { type: "url"; value: string; mimeType?: string | undefined; }; metadata?: unknown; } | { type: "video"; source: { type: "data"; value: string; mimeType: string; } | { type: "url"; value: string; mimeType?: string | undefined; }; metadata?: unknown; } | { type: "document"; source: { type: "data"; value: string; mimeType: string; } | { type: "url"; value: string; mimeType?: string | undefined; }; metadata?: unknown; } | { type: "binary"; mimeType: string; id?: string | undefined; data?: string | undefined; url?: string | undefined; filename?: string | undefined; })[]; id: string; name?: string | undefined; encryptedValue?: string | undefined; } | { role: "tool"; toolCallId: string; content: string; id: string; encryptedValue?: string | undefined; error?: string | undefined; } | { role: "activity"; content: Record; id: string; activityType: string; } | { role: "reasoning"; content: string; id: string; encryptedValue?: string | undefined; })[]; state: unknown; agentId: string; messageView: Type | TemplateRef; messageViewClass: string; assistantMessageComponent: Type; assistantMessageTemplate: TemplateRef; assistantMessageClass: string; reasoningMessageComponent: Type; reasoningMessageTemplate: TemplateRef; reasoningMessageClass: string; messageViewChildrenComponent: Type; messageViewChildrenTemplate: TemplateRef; messageViewChildrenClass: string; }>; protected inputContainerContext: _angular_core.Signal<{ input: Type | TemplateRef; disclaimer: Type | TemplateRef; disclaimerText: string; disclaimerClass: string; inputContainerClass: string; }>; protected layoutContext: _angular_core.Signal<{ messageView: Type | TemplateRef; input: Type | TemplateRef; scrollView: Type | TemplateRef; scrollToBottomButton: Type | TemplateRef; feather: Type | TemplateRef; inputContainer: Type | TemplateRef; disclaimer: Type | TemplateRef; }>; private destroy$; private resizeTimeoutRef?; private measurementRetryTimeoutRef?; private readonly ngZone; private destroyed; constructor(resizeObserverService: ResizeObserverService, cdr: ChangeDetectorRef, handlers: CopilotChatViewHandlers); ngOnInit(): void; ngOnChanges(): void; ngAfterViewInit(): void; /** Schedules a cancellable layout retry without triggering zone-wide ticks. */ private scheduleMeasurementRetry; ngOnDestroy(): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } /** * Props for CopilotChatView component */ interface CopilotChatViewProps { messages?: Message[]; autoScroll?: boolean; messageViewComponent?: Type; messageViewTemplate?: TemplateRef; messageViewClass?: string; messageViewChildrenComponent?: Type; messageViewChildrenTemplate?: TemplateRef; messageViewChildrenClass?: string; scrollViewComponent?: Type; scrollViewTemplate?: TemplateRef; scrollViewClass?: string; scrollToBottomButtonComponent?: Type; scrollToBottomButtonTemplate?: TemplateRef; scrollToBottomButtonClass?: string; inputComponent?: Type; inputTemplate?: TemplateRef; inputContainerComponent?: Type; inputContainerTemplate?: TemplateRef; inputContainerClass?: string; featherComponent?: Type; featherTemplate?: TemplateRef; featherClass?: string; disclaimerComponent?: Type; disclaimerTemplate?: TemplateRef; disclaimerClass?: string; disclaimerText?: string; } /** * Context for custom layout template */ interface CopilotChatViewLayoutContext { messageView: any; input: any; scrollView: any; scrollToBottomButton: any; feather: any; inputContainer: any; disclaimer: any; } /** * Structural directive that captures a per-row template for projection into * the `` element as light-DOM children with * `slot="row:{id}"`. * * Apply it to an `` that is a direct child of ``. * The implicit context variable (`let-t`) receives the full {@link Thread} * record for that row. * * @example * ```html * * * {{ t.name }} * * * ``` */ declare class CopilotThreadsDrawerRow { /** The captured template reference for the per-row content. */ readonly template: TemplateRef; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵdir: _angular_core.ɵɵDirectiveDeclaration; } /** * Angular wrapper around the `` Lit web component. * * Registers the custom element on construction (idempotent; SSR-guarded * internally by {@link defineCopilotKitThreadsDrawer}) and projects it into the DOM * via the `CUSTOM_ELEMENTS_SCHEMA`-enabled template. * * Thread list state is fetched from the Intelligence platform via * {@link injectThreads} and pushed onto the element's JS properties via an * `effect`, following the imperative property-assignment pattern used elsewhere * in this package (see `CopilotA2UIActivityRenderer`). * * DOM events emitted by the element are routed back to the chat configuration * and thread mutation methods via declarative Angular event bindings. * * @example * ```html * * ``` */ declare class CopilotThreadsDrawer { /** * Optional agent id whose threads this drawer lists/manages. Scopes the * {@link injectThreads} store (via the resolved-agent precedence: this input * → ambient config's `agentId` → {@link DEFAULT_AGENT_ID}). NOT forwarded to * the element (the element has no `agentId` property). */ readonly agentId: _angular_core.InputSignal; /** * Value applied as the `data-testid` attribute on the inner * `` element. Defaults to `"copilot-threads-drawer"`. */ readonly dataTestId: _angular_core.InputSignal; /** * Optional accessible/region + default-header label forwarded to the element's * `label` property; defaults to the element's own `"Threads"` when unset. */ readonly label: _angular_core.InputSignal; /** * Optional heading for the "Recent Conversations" section, forwarded to the * element's `recent-label` attribute; defaults to the element's own * `"Recent Conversations"` when unset. */ readonly recentLabel: _angular_core.InputSignal; /** * Whether the drawer offers a collapse toggle. Pushed onto the element's * `collapsible` PROPERTY (a default-true boolean, exactly like `licensed` — a * string attribute cannot represent it since any non-empty value is truthy). * When `false`, the drawer has no collapse toggle and is always expanded. * Defaults to the element's own `true` when unset. */ readonly collapsible: _angular_core.InputSignal; /** * Emits the new collapsed state whenever the drawer's collapsed state changes * (mirrors the element's `collapse-change` event). */ readonly collapseChange: EventEmitter; /** * Optional host override for the thread-select action. * * When provided, this callback is invoked instead of driving * `config.setActiveThreadId`. Bound via `[onThreadSelect]="fn"`. */ readonly threadSelectHandler: _angular_core.InputSignal<(threadId: string) => void>; /** * Optional host override for the new-thread action. * * When provided, this callback is invoked instead of driving * `config.startNewThread`. The core `threads.startNewThread()` reset is * always called regardless. Bound via `[onNewThread]="fn"`. */ readonly newThreadHandler: _angular_core.InputSignal<() => void>; /** * Page size for thread pagination. When set, threads load in pages of this * size and the element shows a "Load more" control while more remain. When * unset, the full list loads at once and no pagination control shows. */ readonly limit: _angular_core.InputSignal; /** * Destination the locked view's Upgrade CTA opens in a new tab. Forwarded to * the element's `licenseUrl` property; defaults to the element's built-in * CopilotKit Intelligence docs URL when unset. Set to an empty string to * suppress the default navigation and handle the click via `onLicensed`. */ readonly licenseUrl: _angular_core.InputSignal; /** * Optional host hook fired when the locked view's Upgrade CTA is clicked. The * element still performs its default navigation unless `licenseUrl` is blank; * use this for telemetry or to drive your own upgrade flow. Bound via * `[onLicensed]="fn"`. */ readonly licensedHandler: _angular_core.InputSignal<() => void>; private readonly config; private readonly copilotkit; private readonly drawerRef; /** * Optional per-row template directive projected as a direct child of this * component. When present, a `
` is rendered inside the * `` element for each thread, allowing the host to inject * custom light-DOM content into each row slot. */ protected readonly rowDirective: _angular_core.Signal; /** * The resolved agent id for the threads store. Precedence: * 1. `agentId` input prop. * 2. Ambient `CopilotChatConfiguration.agentId`. * 3. {@link DEFAULT_AGENT_ID}. */ protected readonly resolvedAgentId: _angular_core.Signal; /** * Normalized license context derived from the core's runtime-reported status, * via the same `@copilotkit/shared` helper the React provider uses. */ private readonly licenseContext; /** * Two-pronged license gate, mirroring the React wrapper. `checkFeature` fails * OPEN (returns true) when no license is configured, so it cannot by itself * detect the no-license case; we therefore also require a positive * license-present signal. Only a resolved `valid`/`expiring` status counts as * present — a resolved `none`/`expired`/`invalid` gates the drawer to the * locked view. */ protected readonly licensed: _angular_core.Signal; /** * Whether the runtime has not yet reported a license status. The status is * `null` until the first `/info` response lands; treat that window as * "not yet unlicensed" — show the loading state, never the locked view — so a * licensed drawer never flashes (or strands) the Upgrade CTA mid-resolution. */ protected readonly licensePending: _angular_core.Signal; /** Live thread list from the Intelligence platform for the resolved agent. */ protected readonly threads: _copilotkit_angular.InjectThreadsResult; /** Thread records mapped to the element's {@link DrawerThread} shape. */ protected readonly drawerThreads: _angular_core.Signal; /** * User-facing error message from the filtered list error signal, or `null` * when there is no error. Uses `listError` (not `error`) so developer/config * errors (missing runtime URL, runtime without thread endpoints) are excluded * and never displayed to end users. */ protected readonly errorMessage: _angular_core.Signal; /** * The currently-active thread id, sourced from the ambient chat * configuration, or `null` when no configuration is present. */ protected readonly activeThreadId: _angular_core.Signal; /** * User-facing fetch-more error message from the dedicated fetch-more error * signal, or `null`. Drives the element's inline "couldn't load more — retry" * panel without disturbing the loaded list or the initial-list `error`. */ protected readonly fetchMoreErrorMessage: _angular_core.Signal; private readonly destroyRef; /** * Provider-less fallback open-state. Without a surrounding chat configuration * there is no shared open-state to bind to, so the wrapper keeps its own * local state. Starts CLOSED — matching the configuration's own default — so * the element does not spring open (and scroll-lock the page on mobile) on * load, and the element's `open-change` events still toggle it. */ private readonly localDrawerOpen; /** * The effective drawer open-state: the ambient chat configuration's * `drawerOpen` when present, else the provider-less {@link localDrawerOpen}. * Pushed onto the element's controlled `open` property in the effect below. */ protected readonly drawerOpen: _angular_core.Signal; constructor(); /** * Handles the `thread-selected` event from the drawer element. * * When a `threadSelectHandler` override is provided by the host, it is called * exclusively. Otherwise, the ambient chat configuration is driven directly so * a bare `` works without any host wiring. * * @param event - The raw DOM event; cast to `CustomEvent` to extract `threadId`. */ protected onThreadSelected(event: Event): void; /** * Handles the `open-change` event from the drawer element. * * Drives the ambient chat configuration's `setDrawerOpen` when present, else * the provider-less {@link localDrawerOpen} fallback — mirroring the React * and Vue wrappers so the element's open-state stays coordinated. * * @param event - The raw DOM event; cast to `CustomEvent` to extract `open`. */ protected onOpenChange(event: Event): void; /** * Handles the `new-thread` event from the drawer element. * * Always resets the core thread store to a fresh, non-explicit client-side * thread first. When a `newThreadHandler` override is provided by the host, * it is called exclusively. Otherwise, the ambient chat configuration is * driven directly so a bare `` works without any host wiring. */ protected onNewThread(): void; /** * Handles the `archive` event from the drawer element. * * Delegates to the threads mutation and logs any failure to the console. * * @param event - The raw DOM event; cast to `CustomEvent` to extract `threadId`. */ protected onArchive(event: Event): void; /** * Handles the `unarchive` event from the drawer element. * * Delegates to the threads mutation and logs any failure to the console. * * @param event - The raw DOM event; cast to `CustomEvent` to extract `threadId`. */ protected onUnarchive(event: Event): void; /** * Handles the `delete` event from the drawer element. * * Deleting the active thread resets to a fresh, non-explicit thread so the * user is not stranded on a now-gone conversation. Archiving the active * thread keeps the user viewing it. * * The core `threads.startNewThread()` reset is always called when the deleted * thread was active. When a `newThreadHandler` override is provided by the * host, it is called exclusively; otherwise the ambient chat configuration is * driven directly. * * @param event - The raw DOM event; cast to `CustomEvent` to extract `threadId`. */ protected onDelete(event: Event): void; /** * Handles the `filter-change` event from the drawer element. * * The element owns the Active/All filter; on change we refetch so the list * reflects the server. */ protected onFilterChange(): void; /** * Handles the `collapse-change` event from the drawer element — re-emits the * new collapsed state through the component's `collapseChange` output so hosts * can observe (or persist) the drawer's collapsed state. * * @param event - The raw DOM event; cast to `CustomEvent` to extract `collapsed`. */ protected onCollapseChange(event: Event): void; /** * Handles the `retry` event from the drawer element. * * `scope` distinguishes an initial fetch retry from a fetch-more retry so * the correct pagination operation is invoked. * * @param event - The raw DOM event; cast to `CustomEvent` to extract `scope`. */ protected onRetry(event: Event): void; /** * Handles the `load-more` event from the drawer element — advances pagination * by fetching the next page. No-op when there is no next page (the element * only surfaces the "Load more" control while `hasMoreThreads` is true). */ protected onLoadMore(): void; /** * Handles the `licensed` event from the drawer element (Upgrade CTA click). * * The element performs its own default navigation to `licenseUrl`; this hook * lets the host observe the click (e.g. for telemetry) or drive a custom * upgrade flow when provided via `[onLicensed]`. */ protected onLicensed(): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } /** Accessible, responsive floating chat surface with an explicit open model. */ declare class CopilotPopup { readonly open: _angular_core.ModelSignal; readonly title: _angular_core.InputSignal; readonly width: _angular_core.InputSignal; readonly height: _angular_core.InputSignal; readonly clickOutsideToClose: _angular_core.InputSignal; readonly chatComponent: _angular_core.InputSignal>; readonly headerComponent: _angular_core.InputSignal>; protected readonly dialogId: string; protected readonly titleId: string; protected readonly resolvedWidth: _angular_core.Signal; protected readonly resolvedHeight: _angular_core.Signal; private readonly launcher; private readonly initialFocus; constructor(); protected toggle(): void; protected closeFromBackdrop(): void; protected close(): void; private focusModal; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } type CopilotSidebarMode = "docked" | "overlay"; type CopilotSidebarPosition = "left" | "right"; /** Responsive chat sidebar with independent overlay and single-owner docked modes. */ declare class CopilotSidebar { readonly open: _angular_core.ModelSignal; readonly mode: _angular_core.InputSignal; readonly position: _angular_core.InputSignal; readonly width: _angular_core.InputSignal; readonly title: _angular_core.InputSignal; readonly clickOutsideToClose: _angular_core.InputSignal; readonly chatComponent: _angular_core.InputSignal>; readonly headerComponent: _angular_core.InputSignal>; protected readonly sidebarId: string; protected readonly titleId: string; protected readonly resolvedWidth: _angular_core.Signal; protected readonly isCompact: _angular_core.WritableSignal; protected readonly isModal: _angular_core.Signal; protected readonly dockAccepted: _angular_core.WritableSignal; private readonly owner; private readonly registry; private readonly document; private readonly isBrowser; private readonly destroyRef; private readonly launcher; private readonly initialFocus; private ownsDock; constructor(); protected toggle(): void; protected closeFromBackdrop(): void; protected close(): void; private releaseDock; private focusModal; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } type A2UIOperation = Record; declare class CopilotA2UIActivityRenderer implements ActivityRenderer { readonly activityType: _angular_core.InputSignal; readonly content: _angular_core.InputSignal; readonly message: _angular_core.InputSignal<{ role: "activity"; content: Record; id: string; activityType: string; }>; readonly agent: _angular_core.InputSignal; private readonly surfaceRef; private readonly copilotKit; protected readonly config: _copilotkit_angular.CopilotKitConfig; private readonly platformId; private readonly zone; protected readonly operations: _angular_core.Signal; protected readonly hasOperations: _angular_core.Signal; protected readonly surfaceReady: _angular_core.WritableSignal; protected readonly loaderContent: _angular_core.WritableSignal; private readonly markSurfaceReady; constructor(); protected handleAction(event: Event): Promise; protected handleError(event: Event): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } /** * Presentational loading placeholder shown while an A2UI tool call is still * streaming. Renders an animated skeleton card whose rows reveal as the * estimated token count climbs through `phase`. */ declare class CopilotA2UIProgress { readonly phase: _angular_core.InputSignal; readonly tokens: _angular_core.InputSignal; readonly label: _angular_core.InputSignal; protected topbarBarClass(): string; protected rowClass(phase: number, delayClass: string): string; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } type A2UIDebugExposure = "hidden" | "collapsed" | "verbose"; type A2UILifecycleStatus = "building" | "retrying" | "failed"; interface A2UILifecycleContent { status: A2UILifecycleStatus; attempt?: number; maxAttempts?: number; progressTokens?: number; error?: string; errors?: unknown[]; attempts?: unknown[]; debugExposure?: A2UIDebugExposure; } /** Read only the server-owned A2UI lifecycle fields from activity content. */ declare function readA2UILifecycleContent(content: unknown): A2UILifecycleContent; /** Pre-paint building, retry, and failure UI for a stable A2UI activity. */ declare class CopilotA2UIRecovery { #private; readonly content: _angular_core.InputSignal; readonly options: _angular_core.InputSignal; readonly lifecycle: _angular_core.Signal; readonly retryRevealed: _angular_core.WritableSignal; readonly debugExposure: _angular_core.Signal; readonly label: _angular_core.Signal; readonly phase: _angular_core.Signal<0 | 1 | 2 | 3>; readonly failureDiagnostics: _angular_core.Signal; readonly retryDiagnostics: _angular_core.Signal; constructor(); static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } declare const RENDER_A2UI_TOOL_NAME = "render_a2ui"; declare const AGUI_SEND_STATE_SNAPSHOT_TOOL_NAME = "AGUISendStateSnapshot"; declare const RenderA2UIArgsSchema: z.ZodRecord; interface RenderA2UIArgs extends Record { items?: unknown[]; components?: unknown[]; snapshot?: unknown; } declare class CopilotA2UIToolRenderer implements ToolRenderer { readonly toolCall: _angular_core.InputSignal>; readonly agent: _angular_core.InputSignal; private readonly surfaceRef; private readonly config; private readonly copilotKit; protected readonly renderedOperations: _angular_core.Signal; protected readonly tokens: _angular_core.Signal; protected readonly phase: _angular_core.Signal<0 | 1 | 2 | 3>; protected readonly isHidden: _angular_core.Signal; constructor(); protected handleError(event: Event): void; protected handleAction(event: Event): Promise; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } type WebsandboxConstructor = typeof Websandbox; declare const OPEN_GENERATIVE_UI_WEBSANDBOX_LOADER: InjectionToken<() => Promise>; declare class CopilotOpenGenerativeUIRenderer implements OnChanges { readonly content: _angular_core.InputSignal<{ html?: string[]; initialHeight?: number; generating?: boolean; css?: string; cssComplete?: boolean; htmlComplete?: boolean; jsFunctions?: string; jsFunctionsComplete?: boolean; jsExpressions?: string[]; jsExpressionsComplete?: boolean; }>; private readonly containerRef; private readonly destroyRef; private readonly config; private readonly loadWebsandboxModule; private readonly throttledContent; private throttleTimer; private latestContent; private sandbox; private previewSandbox; private sandboxReady; private previewReady; private finalSandboxKey; private executedExpressionIndex; private pendingQueue; private jsFunctionsInjected; private heightMeasured; private autoHeight; private hasReceivedContent; protected readonly fullHtml: _angular_core.Signal; protected readonly css: _angular_core.Signal; protected readonly partialHtml: _angular_core.Signal; protected readonly previewBody: _angular_core.Signal; protected readonly previewStyles: _angular_core.Signal; protected readonly hasPreview: _angular_core.Signal; protected readonly hasVisibleSandbox: _angular_core.Signal; protected readonly height: _angular_core.Signal; protected readonly isGenerating: _angular_core.Signal; private readonly renderState; constructor(); /** Applies input updates synchronously before the matching render pass. */ ngOnChanges(): void; /** Commits content and synchronously removes stale sandbox DOM on restart. */ private commitContent; private clearThrottle; private loadWebsandbox; private createLocalApi; private createPreviewSandbox; private updatePreviewSandbox; private reconcileSandboxState; private getFinalSandboxKey; private createFinalSandbox; private resetFinalRuntimeState; private injectJsFunctions; private executeNewExpressions; private runOrQueue; private measureFinalHeight; private styleIframe; private destroyPreviewSandbox; private destroyFinalSandbox; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } declare class CopilotOpenGenerativeUIActivityRenderer implements ActivityRenderer { readonly activityType: _angular_core.InputSignal; readonly content: _angular_core.InputSignal<{ html?: string[]; initialHeight?: number; generating?: boolean; css?: string; cssComplete?: boolean; htmlComplete?: boolean; jsFunctions?: string; jsFunctionsComplete?: boolean; jsExpressions?: string[]; jsExpressionsComplete?: boolean; }>; readonly message: _angular_core.InputSignal<{ role: "activity"; content: Record; id: string; activityType: string; }>; readonly agent: _angular_core.InputSignal; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } declare class CopilotOpenGenerativeUIToolRenderer implements ToolRenderer { readonly toolCall: _angular_core.InputSignal>; private readonly visibleMessageIndex; private readonly destroyRef; private previousMessageCount; private interval; protected readonly visibleMessage: _angular_core.Signal; constructor(); private clearTimer; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } export { AGUI_SEND_STATE_SNAPSHOT_TOOL_NAME, AgentStore, AudioRecorderError, COPILOT_CHAT_CONFIGURATION, COPILOT_CHAT_CONFIGURATION_OPTIONS, COPILOT_CHAT_DEFAULT_LABELS, COPILOT_CHAT_LABELS, COPILOT_KIT_CONFIG, ChatState, CopilotA2UIActivityRenderer, CopilotA2UIProgress, CopilotA2UIRecovery, CopilotA2UIToolRenderer, CopilotChat, CopilotChatAddFileButton, CopilotChatAssistantMessage, CopilotChatAssistantMessageCopyButton, CopilotChatAssistantMessageReadAloudButton, CopilotChatAssistantMessageRegenerateButton, CopilotChatAssistantMessageRenderer, CopilotChatAssistantMessageThumbsDownButton, CopilotChatAssistantMessageThumbsUpButton, CopilotChatAssistantMessageToolbar, CopilotChatAssistantMessageToolbarButton, CopilotChatAttachmentQueue, CopilotChatAttachmentRenderer, CopilotChatAttachmentsDirective, CopilotChatAudioRecorder, CopilotChatCancelTranscribeButton, CopilotChatConfiguration, CopilotChatFinishTranscribeButton, CopilotChatInput, CopilotChatInputDefaults, CopilotChatMessageView, CopilotChatMessageViewCursor, CopilotChatReasoningMessage, CopilotChatSendButton, CopilotChatStartTranscribeButton, CopilotChatSuggestionPill, CopilotChatSuggestionView, CopilotChatTextarea, CopilotChatToolCallsView, CopilotChatToolbar, CopilotChatToolbarButton, CopilotChatToolsMenu, CopilotChatUserMessage, CopilotChatUserMessageBranchNavigation, CopilotChatUserMessageCopyButton, CopilotChatUserMessageEditButton, CopilotChatUserMessageRenderer, CopilotChatUserMessageToolbar, CopilotChatUserMessageToolbarButton, CopilotChatView, CopilotChatViewDisclaimer, CopilotChatViewFeather, CopilotChatViewHandlers, CopilotChatViewInputContainer, CopilotChatViewScrollToBottomButton, CopilotChatViewScrollView, CopilotDefaultToolRenderer, CopilotKit, CopilotKitAgentContext, CopilotOpenGenerativeUIActivityRenderer, CopilotOpenGenerativeUIRenderer, CopilotOpenGenerativeUIToolRenderer, CopilotPopup, CopilotSidebar, CopilotSlot, CopilotThreadsDrawer, CopilotThreadsDrawerRow, CopilotTooltip, CopilotkitAgentFactory, CopilotkitThreadsFactory, DEFAULT_OPEN_GENERATIVE_UI_DESIGN_SKILL, GENERATE_SANDBOXED_UI_DESCRIPTION, GENERATE_SANDBOXED_UI_TOOL_NAME, GenerateSandboxedUiArgsSchema, InterruptController, InterruptExpiredError, OPEN_GENERATIVE_UI_ACTIVITY_TYPE, OPEN_GENERATIVE_UI_WEBSANDBOX_LOADER, OpenGenerativeUIContentSchema, RENDER_A2UI_TOOL_NAME, RenderA2UIArgsSchema, RenderToolCalls, ResizeObserverService, SLOT_CONFIG, ScrollPosition, StickToBottom, ThreadsStore, TooltipContent, TranscriptionError, anyActivityContentSchema, cn, connectAgentContext, createSlotConfig, createSlotRenderer, getSlotConfig, injectAgentStore, injectChatConfiguration, injectChatLabels, injectChatState, injectCopilotKitConfig, injectInterrupt, injectMemories, injectThreads, isComponentType, isSlotValue, normalizeSlotValue, parseToolCallArguments, pickToolCallHandler, provideCopilotChatConfiguration, provideCopilotChatLabels, provideCopilotKit, provideSlots, readA2UILifecycleContent, registerFrontendTool, registerHumanInTheLoop, registerRenderActivityMessage, registerRenderToolCall, renderSlot, safeToolValue, transcribeAudio, ɵCOPILOTKIT_BUILT_IN_ACTIVITY_RENDERERS }; export type { A2UIConfig, A2UIDebugExposure, A2UILifecycleContent, A2UILifecycleStatus, A2UIRecoveryOptions, ActivityRenderer, AngularActivityContentParseResult, AngularActivityContentSchema, AngularToolCall, AssistantMessageCopyButtonContext, AssistantMessageMarkdownRendererContext, AssistantMessageToolbarContext, AudioRecorderState, BranchNavigationContext, ClientTool, ConnectAgentContextConfig, CopilotChatAssistantMessageOnReadAloudProps, CopilotChatAssistantMessageOnRegenerateProps, CopilotChatAssistantMessageOnThumbsDownProps, CopilotChatAssistantMessageOnThumbsUpProps, CopilotChatAudioRecorderProps, CopilotChatButtonProps, CopilotChatConfigurationOptions, CopilotChatInputConfig, CopilotChatInputMode, CopilotChatInputOutputs, CopilotChatInputSlots, CopilotChatLabels, CopilotChatMessageViewProps, CopilotChatTextareaProps, CopilotChatToolbarButtonProps, CopilotChatToolbarProps, CopilotChatToolsButtonProps, CopilotChatUserMessageOnEditMessageProps, CopilotChatUserMessageOnSwitchToBranchProps, CopilotChatViewLayoutContext, CopilotChatViewProps, CopilotKitConfig, CopilotSidebarMode, CopilotSidebarPosition, CopyButtonContext, CursorContext, EditButtonContext, FrontendToolConfig, GenerateSandboxedUiArgs, HumanInTheLoopConfig, HumanInTheLoopToolCall, HumanInTheLoopToolRenderer, InjectInterruptOptions, InjectThreadsInput, InjectThreadsResult, InterruptEvent, InterruptHandlerProps, InterruptRunOptions, InterruptRunner, InterruptView, MemoriesController, MessageRendererContext, MessageViewContext, OpenGenerativeUIConfig, OpenGenerativeUIContent, ReadAloudButtonContext, RegenerateButtonContext, RenderA2UIArgs, RenderActivityMessageConfig, RenderSlotOptions, RenderToolCallConfig, ResizeState, SandboxFunction, ScrollBehavior, ScrollState, SendButtonContext, SlotConfig, SlotContext, SlotRegistryEntry, SlotValue, Thread, ThumbsDownButtonContext, ThumbsUpButtonContext, ToolCallHandler, ToolRenderer, ToolbarContext, ToolsMenuItem, TranscriptionErrorInfo, TranscriptionResult, UserMessageToolbarContext, WithSlots };