@copilotkit/angular 0.1.2 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +146 -6
- package/dist/README.md +146 -6
- package/dist/fesm2022/copilotkit-angular-mcp-apps.mjs +821 -0
- package/dist/fesm2022/copilotkit-angular-mcp-apps.mjs.map +1 -0
- package/dist/fesm2022/copilotkit-angular.mjs +4317 -1070
- package/dist/fesm2022/copilotkit-angular.mjs.map +1 -1
- package/dist/{types/copilotkit-angular.d.ts → index.d.ts} +1653 -374
- package/dist/mcp-apps/index.d.ts +343 -0
- package/dist/styles.css +8 -5
- package/package.json +71 -34
- package/scripts/normalize-package-exports.mjs +17 -0
- package/tsconfig.json +1 -0
- package/vitest.config.mts +3 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
-
import { Type, Signal, InjectionToken, Provider, Injector, DestroyRef, WritableSignal, OnDestroy, NgZone, ElementRef, TemplateRef, ViewContainerRef, ComponentRef, EmbeddedViewRef, OnInit, OnChanges, ChangeDetectorRef, SimpleChanges, AfterViewInit } from '@angular/core';
|
|
2
|
+
import { Type, Signal, InjectionToken, Provider, Injector, DestroyRef, WritableSignal, OnDestroy, NgZone, ElementRef, TemplateRef, ViewContainerRef, ComponentRef, EmbeddedViewRef, OnInit, OnChanges, ChangeDetectorRef, SimpleChanges, AfterViewInit, EventEmitter } from '@angular/core';
|
|
3
3
|
import * as _ag_ui_client from '@ag-ui/client';
|
|
4
|
-
import { AbstractAgent, ActivityMessage, ToolCall,
|
|
4
|
+
import { AbstractAgent, ActivityMessage, ToolCall, Message, Interrupt, ResumeEntry, RunAgentResult, Context, AssistantMessage } from '@ag-ui/client';
|
|
5
5
|
export { AssistantMessage, Message } from '@ag-ui/client';
|
|
6
|
-
import { FrontendTool, FrontendToolHandlerContext, SuggestionsConfig, CopilotKitCoreRuntimeConnectionStatus, CopilotRuntimeTransport, CopilotKitCoreGetSuggestionsResult, CopilotKitCore, Suggestion } from '@copilotkit/core';
|
|
7
|
-
export { DynamicSuggestionsConfig, StaticSuggestionsConfig, Suggestion, SuggestionsConfig } from '@copilotkit/core';
|
|
6
|
+
import { FrontendTool, FrontendToolHandlerContext, SuggestionsConfig, CopilotKitCoreRuntimeConnectionStatus, CopilotRuntimeTransport, ThreadEndpointRuntimeInfo, IntelligenceRuntimeInfo, RuntimeLicenseStatus, CopilotKitCoreGetSuggestionsResult, CopilotKitCore, Suggestion, Memory, MemoryRealtimeStatus, NewMemory, MemoryChanges } from '@copilotkit/core';
|
|
7
|
+
export { DynamicSuggestionsConfig, Memory, MemoryChanges, MemoryKind, MemoryScope, NewMemory, StaticSuggestionsConfig, Suggestion, SuggestionsConfig } from '@copilotkit/core';
|
|
8
8
|
import { StandardSchemaV1, Attachment, TranscriptionErrorCode, AttachmentsConfig, AttachmentModality, InputContent, ImageInputPart, AudioInputPart, VideoInputPart, DocumentInputPart } from '@copilotkit/shared';
|
|
9
9
|
export { Attachment, AttachmentModality, AttachmentUploadError, AttachmentUploadResult, AttachmentsConfig, TranscriptionErrorCode } from '@copilotkit/shared';
|
|
10
10
|
import { z } from 'zod';
|
|
@@ -13,8 +13,8 @@ import { ScrollDispatcher, ViewportRuler } from '@angular/cdk/scrolling';
|
|
|
13
13
|
import { Observable } from 'rxjs';
|
|
14
14
|
import { ClassValue } from 'clsx';
|
|
15
15
|
import * as _copilotkit_angular from '@copilotkit/angular';
|
|
16
|
-
import
|
|
17
|
-
import {
|
|
16
|
+
import { UserMessage, Message as Message$1, ReasoningMessage, ActivityMessage as ActivityMessage$1 } from '@ag-ui/core';
|
|
17
|
+
import { DrawerThread } from '@copilotkit/web-components/threads-drawer';
|
|
18
18
|
import Websandbox from '@jetbrains/websandbox';
|
|
19
19
|
|
|
20
20
|
type AngularToolCall<Args extends Record<string, unknown> = Record<string, unknown>> = {
|
|
@@ -111,7 +111,16 @@ interface RenderActivityMessageConfig<TActivityContent = unknown> {
|
|
|
111
111
|
content: AngularActivityContentSchema<TActivityContent>;
|
|
112
112
|
component: Type<ActivityRenderer<TActivityContent>>;
|
|
113
113
|
}
|
|
114
|
+
/**
|
|
115
|
+
* Extension point used by optional secondary entry points to contribute
|
|
116
|
+
* lower-precedence built-in activity renderers.
|
|
117
|
+
*
|
|
118
|
+
* @internal
|
|
119
|
+
*/
|
|
120
|
+
declare const ɵCOPILOTKIT_BUILT_IN_ACTIVITY_RENDERERS: InjectionToken<RenderActivityMessageConfig<unknown>[]>;
|
|
114
121
|
declare const anyActivityContentSchema: AngularActivityContentSchema<unknown>;
|
|
122
|
+
/** Register an activity renderer for the lifetime of the current injector. */
|
|
123
|
+
declare function registerRenderActivityMessage(config: RenderActivityMessageConfig): void;
|
|
115
124
|
|
|
116
125
|
declare const OPEN_GENERATIVE_UI_ACTIVITY_TYPE = "open-generative-ui";
|
|
117
126
|
declare const GENERATE_SANDBOXED_UI_TOOL_NAME = "generateSandboxedUi";
|
|
@@ -191,6 +200,15 @@ interface A2UIConfig {
|
|
|
191
200
|
catalog?: Catalog<LitComponentImplementation>;
|
|
192
201
|
loadingComponent?: () => LitRenderable;
|
|
193
202
|
includeSchema?: boolean;
|
|
203
|
+
recovery?: A2UIRecoveryOptions;
|
|
204
|
+
}
|
|
205
|
+
interface A2UIRecoveryOptions {
|
|
206
|
+
/** Delay before revealing a transient retry. Defaults to 2000ms. */
|
|
207
|
+
showAfterMs?: number;
|
|
208
|
+
/** Attempt number that reveals retry state immediately. Defaults to 2. */
|
|
209
|
+
showAfterAttempts?: number;
|
|
210
|
+
/** Client diagnostic visibility, overridden by server lifecycle content. */
|
|
211
|
+
debugExposure?: "hidden" | "collapsed" | "verbose";
|
|
194
212
|
}
|
|
195
213
|
interface CopilotKitConfig {
|
|
196
214
|
runtimeUrl?: string;
|
|
@@ -205,6 +223,8 @@ interface CopilotKitConfig {
|
|
|
205
223
|
suggestionsConfig?: SuggestionsConfig[];
|
|
206
224
|
frontendTools?: FrontendToolConfig[];
|
|
207
225
|
humanInTheLoop?: HumanInTheLoopConfig[];
|
|
226
|
+
/** Opt in to a text-only renderer for otherwise unknown tool calls. */
|
|
227
|
+
defaultToolRendering?: boolean;
|
|
208
228
|
a2ui?: A2UIConfig;
|
|
209
229
|
openGenerativeUI?: OpenGenerativeUIConfig;
|
|
210
230
|
}
|
|
@@ -214,11 +234,35 @@ declare function provideCopilotKit(config: CopilotKitConfig): Provider;
|
|
|
214
234
|
|
|
215
235
|
declare class CopilotKit {
|
|
216
236
|
#private;
|
|
237
|
+
/** Whether unknown tools may use the built-in text-only fallback renderer. */
|
|
238
|
+
readonly defaultToolRenderingEnabled: boolean;
|
|
217
239
|
readonly agents: Signal<Record<string, AbstractAgent>>;
|
|
218
240
|
readonly runtimeConnectionStatus: Signal<CopilotKitCoreRuntimeConnectionStatus>;
|
|
219
241
|
readonly runtimeUrl: Signal<string>;
|
|
220
242
|
readonly runtimeTransport: Signal<CopilotRuntimeTransport>;
|
|
221
243
|
readonly headers: Signal<Record<string, string>>;
|
|
244
|
+
/**
|
|
245
|
+
* Thread-endpoint capability advertised by the connected runtime's `/info`
|
|
246
|
+
* response, or `undefined` before the runtime reports `Connected`. Exposed
|
|
247
|
+
* as a signal (rather than a plain `core.threadEndpoints` read) so reactive
|
|
248
|
+
* consumers re-run when `/info` lands.
|
|
249
|
+
*/
|
|
250
|
+
readonly threadEndpoints: Signal<ThreadEndpointRuntimeInfo>;
|
|
251
|
+
/**
|
|
252
|
+
* Intelligence runtime info advertised by the connected runtime's `/info`
|
|
253
|
+
* response, or `undefined` before the runtime reports `Connected`. Carries
|
|
254
|
+
* the realtime `wsUrl`. Exposed as a signal so reactive consumers re-run
|
|
255
|
+
* when `/info` populates it — even if the connection status does not
|
|
256
|
+
* transition in the same turn.
|
|
257
|
+
*/
|
|
258
|
+
readonly intelligence: Signal<IntelligenceRuntimeInfo>;
|
|
259
|
+
/**
|
|
260
|
+
* Server-reported license status from the connected runtime's `/info`
|
|
261
|
+
* response, or `undefined` before the runtime reports it. Exposed as a signal
|
|
262
|
+
* (rather than a plain `core.licenseStatus` read) so reactive consumers — e.g.
|
|
263
|
+
* the threads drawer's license gate — re-run once the status resolves.
|
|
264
|
+
*/
|
|
265
|
+
readonly licenseStatus: Signal<RuntimeLicenseStatus>;
|
|
222
266
|
readonly suggestionsByAgent: Signal<Record<string, CopilotKitCoreGetSuggestionsResult>>;
|
|
223
267
|
readonly core: CopilotKitCore;
|
|
224
268
|
readonly toolCallRenderConfigs: Signal<RenderToolCallConfig[]>;
|
|
@@ -231,6 +275,8 @@ declare class CopilotKit {
|
|
|
231
275
|
}): void;
|
|
232
276
|
addRenderToolCall(renderConfig: RenderToolCallConfig): void;
|
|
233
277
|
addRenderActivityMessage(renderConfig: RenderActivityMessageConfig): void;
|
|
278
|
+
/** Remove one dynamically registered activity renderer by identity. */
|
|
279
|
+
removeRenderActivityMessage(renderConfig: RenderActivityMessageConfig): void;
|
|
234
280
|
addHumanInTheLoop(humanInTheLoopTool: HumanInTheLoopConfig): void;
|
|
235
281
|
addSuggestionsConfig(config: SuggestionsConfig): string;
|
|
236
282
|
removeSuggestionsConfig(id: string): void;
|
|
@@ -251,6 +297,21 @@ declare class CopilotKit {
|
|
|
251
297
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<CopilotKit>;
|
|
252
298
|
}
|
|
253
299
|
|
|
300
|
+
/** Serialize untrusted tool values defensively for text-only display. */
|
|
301
|
+
declare function safeToolValue(value: unknown): string;
|
|
302
|
+
/** Opt-in text-only fallback for tool calls without an application renderer. */
|
|
303
|
+
declare class CopilotDefaultToolRenderer implements ToolRenderer {
|
|
304
|
+
readonly toolCall: _angular_core.InputSignal<AngularToolCall>;
|
|
305
|
+
protected readonly expanded: _angular_core.WritableSignal<boolean>;
|
|
306
|
+
protected readonly argumentsText: _angular_core.Signal<string>;
|
|
307
|
+
protected readonly resultText: _angular_core.Signal<string>;
|
|
308
|
+
protected readonly statusValue: _angular_core.Signal<string>;
|
|
309
|
+
protected readonly statusLabel: _angular_core.Signal<"Preparing" | "Running" | "Complete" | "Unknown status">;
|
|
310
|
+
protected toggleExpanded(): void;
|
|
311
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CopilotDefaultToolRenderer, never>;
|
|
312
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CopilotDefaultToolRenderer, "copilot-default-tool-renderer", never, { "toolCall": { "alias": "toolCall"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
313
|
+
}
|
|
314
|
+
|
|
254
315
|
type RendererToolCallHandler = {
|
|
255
316
|
type: "renderer";
|
|
256
317
|
config: RenderToolCallConfig;
|
|
@@ -263,7 +324,25 @@ type HumanInTheLoopToolCallHandler = {
|
|
|
263
324
|
type: "humanInTheLoopTool";
|
|
264
325
|
config: HumanInTheLoopConfig;
|
|
265
326
|
};
|
|
266
|
-
type
|
|
327
|
+
type BuiltInToolCallHandler = {
|
|
328
|
+
type: "builtIn";
|
|
329
|
+
config: {
|
|
330
|
+
component: typeof CopilotDefaultToolRenderer;
|
|
331
|
+
};
|
|
332
|
+
};
|
|
333
|
+
type ToolCallHandler = RendererToolCallHandler | ClientToolCallHandler | HumanInTheLoopToolCallHandler | BuiltInToolCallHandler;
|
|
334
|
+
/** Parse tool-call arguments without allowing malformed payloads to escape. */
|
|
335
|
+
declare function parseToolCallArguments(rawArguments: string, allowPartial?: boolean): Record<string, unknown>;
|
|
336
|
+
interface PickToolCallHandlerOptions {
|
|
337
|
+
name: string;
|
|
338
|
+
agentId?: string;
|
|
339
|
+
application: readonly RenderToolCallConfig[];
|
|
340
|
+
frontend: readonly FrontendToolConfig[];
|
|
341
|
+
humanInTheLoop: readonly HumanInTheLoopConfig[];
|
|
342
|
+
builtInFallback: boolean;
|
|
343
|
+
}
|
|
344
|
+
/** Resolve the documented application/frontend/wildcard/fallback precedence. */
|
|
345
|
+
declare function pickToolCallHandler(options: PickToolCallHandlerOptions): ToolCallHandler | undefined;
|
|
267
346
|
declare class RenderToolCalls {
|
|
268
347
|
#private;
|
|
269
348
|
readonly message: _angular_core.InputSignal<{
|
|
@@ -395,7 +474,7 @@ declare class RenderToolCalls {
|
|
|
395
474
|
readonly agentId: _angular_core.InputSignal<string>;
|
|
396
475
|
protected pickRenderer(name: string): ToolCallHandler | undefined;
|
|
397
476
|
protected buildToolCall<Args extends Record<string, unknown>>(toolCall: ToolCall): AngularToolCall<Args>;
|
|
398
|
-
protected buildRendererInputs<Args extends Record<string, unknown>>(toolCall: ToolCall, handler: RendererToolCallHandler | ClientToolCallHandler): {
|
|
477
|
+
protected buildRendererInputs<Args extends Record<string, unknown>>(toolCall: ToolCall, handler: RendererToolCallHandler | ClientToolCallHandler | BuiltInToolCallHandler): {
|
|
399
478
|
toolCall: AngularToolCall<Args>;
|
|
400
479
|
agent?: AbstractAgent;
|
|
401
480
|
};
|
|
@@ -412,115 +491,7 @@ declare class AgentStore {
|
|
|
412
491
|
#private;
|
|
413
492
|
readonly agent: AbstractAgent;
|
|
414
493
|
readonly isRunning: Signal<boolean>;
|
|
415
|
-
readonly messages: Signal<
|
|
416
|
-
role: "developer";
|
|
417
|
-
content: string;
|
|
418
|
-
id: string;
|
|
419
|
-
name?: string | undefined;
|
|
420
|
-
encryptedValue?: string | undefined;
|
|
421
|
-
} | {
|
|
422
|
-
role: "system";
|
|
423
|
-
content: string;
|
|
424
|
-
id: string;
|
|
425
|
-
name?: string | undefined;
|
|
426
|
-
encryptedValue?: string | undefined;
|
|
427
|
-
} | {
|
|
428
|
-
role: "assistant";
|
|
429
|
-
id: string;
|
|
430
|
-
name?: string | undefined;
|
|
431
|
-
content?: string | undefined;
|
|
432
|
-
encryptedValue?: string | undefined;
|
|
433
|
-
toolCalls?: {
|
|
434
|
-
function: {
|
|
435
|
-
name: string;
|
|
436
|
-
arguments: string;
|
|
437
|
-
};
|
|
438
|
-
type: "function";
|
|
439
|
-
id: string;
|
|
440
|
-
encryptedValue?: string | undefined;
|
|
441
|
-
}[] | undefined;
|
|
442
|
-
} | {
|
|
443
|
-
role: "user";
|
|
444
|
-
content: string | ({
|
|
445
|
-
type: "text";
|
|
446
|
-
text: string;
|
|
447
|
-
} | {
|
|
448
|
-
type: "image";
|
|
449
|
-
source: {
|
|
450
|
-
type: "data";
|
|
451
|
-
value: string;
|
|
452
|
-
mimeType: string;
|
|
453
|
-
} | {
|
|
454
|
-
type: "url";
|
|
455
|
-
value: string;
|
|
456
|
-
mimeType?: string | undefined;
|
|
457
|
-
};
|
|
458
|
-
metadata?: unknown;
|
|
459
|
-
} | {
|
|
460
|
-
type: "audio";
|
|
461
|
-
source: {
|
|
462
|
-
type: "data";
|
|
463
|
-
value: string;
|
|
464
|
-
mimeType: string;
|
|
465
|
-
} | {
|
|
466
|
-
type: "url";
|
|
467
|
-
value: string;
|
|
468
|
-
mimeType?: string | undefined;
|
|
469
|
-
};
|
|
470
|
-
metadata?: unknown;
|
|
471
|
-
} | {
|
|
472
|
-
type: "video";
|
|
473
|
-
source: {
|
|
474
|
-
type: "data";
|
|
475
|
-
value: string;
|
|
476
|
-
mimeType: string;
|
|
477
|
-
} | {
|
|
478
|
-
type: "url";
|
|
479
|
-
value: string;
|
|
480
|
-
mimeType?: string | undefined;
|
|
481
|
-
};
|
|
482
|
-
metadata?: unknown;
|
|
483
|
-
} | {
|
|
484
|
-
type: "document";
|
|
485
|
-
source: {
|
|
486
|
-
type: "data";
|
|
487
|
-
value: string;
|
|
488
|
-
mimeType: string;
|
|
489
|
-
} | {
|
|
490
|
-
type: "url";
|
|
491
|
-
value: string;
|
|
492
|
-
mimeType?: string | undefined;
|
|
493
|
-
};
|
|
494
|
-
metadata?: unknown;
|
|
495
|
-
} | {
|
|
496
|
-
type: "binary";
|
|
497
|
-
mimeType: string;
|
|
498
|
-
id?: string | undefined;
|
|
499
|
-
data?: string | undefined;
|
|
500
|
-
url?: string | undefined;
|
|
501
|
-
filename?: string | undefined;
|
|
502
|
-
})[];
|
|
503
|
-
id: string;
|
|
504
|
-
name?: string | undefined;
|
|
505
|
-
encryptedValue?: string | undefined;
|
|
506
|
-
} | {
|
|
507
|
-
role: "tool";
|
|
508
|
-
toolCallId: string;
|
|
509
|
-
content: string;
|
|
510
|
-
id: string;
|
|
511
|
-
encryptedValue?: string | undefined;
|
|
512
|
-
error?: string | undefined;
|
|
513
|
-
} | {
|
|
514
|
-
role: "activity";
|
|
515
|
-
content: Record<string, any>;
|
|
516
|
-
id: string;
|
|
517
|
-
activityType: string;
|
|
518
|
-
} | {
|
|
519
|
-
role: "reasoning";
|
|
520
|
-
content: string;
|
|
521
|
-
id: string;
|
|
522
|
-
encryptedValue?: string | undefined;
|
|
523
|
-
})[]>;
|
|
494
|
+
readonly messages: Signal<Message[]>;
|
|
524
495
|
readonly state: Signal<unknown>;
|
|
525
496
|
constructor(abstractAgent: AbstractAgent, destroyRef: DestroyRef, subscribeToAgent: SubscribeToAgentFn);
|
|
526
497
|
teardown(): void;
|
|
@@ -533,6 +504,328 @@ declare class CopilotkitAgentFactory {
|
|
|
533
504
|
}
|
|
534
505
|
declare function injectAgentStore(agentId: string | Signal<string | undefined>): Signal<AgentStore>;
|
|
535
506
|
|
|
507
|
+
/** Legacy custom-event interrupt payload. */
|
|
508
|
+
interface InterruptEvent<TValue = unknown> {
|
|
509
|
+
name: string;
|
|
510
|
+
value: TValue;
|
|
511
|
+
}
|
|
512
|
+
/** Options forwarded when resuming an interrupted agent. */
|
|
513
|
+
interface InterruptRunOptions {
|
|
514
|
+
resume?: ResumeEntry[];
|
|
515
|
+
forwardedProps?: Record<string, unknown>;
|
|
516
|
+
}
|
|
517
|
+
/** Injectable interrupt filtering and preprocessing options. */
|
|
518
|
+
interface InjectInterruptOptions<TValue = unknown, TResult = never> {
|
|
519
|
+
/** Agent id or signal. Defaults to the ambient chat agent. */
|
|
520
|
+
agentId?: string | Signal<string | undefined>;
|
|
521
|
+
/** Return false to leave this interrupt for a different controller. */
|
|
522
|
+
enabled?: (event: InterruptEvent<TValue>) => boolean | PromiseLike<boolean>;
|
|
523
|
+
/** Optionally prepare data for the interrupt UI. */
|
|
524
|
+
handler?: (props: InterruptHandlerProps<TValue>) => TResult | PromiseLike<TResult>;
|
|
525
|
+
}
|
|
526
|
+
/** Actions and normalized protocol data passed to interrupt handlers. */
|
|
527
|
+
interface InterruptHandlerProps<TValue = unknown> {
|
|
528
|
+
event: InterruptEvent<TValue>;
|
|
529
|
+
interrupt: Interrupt | null;
|
|
530
|
+
interrupts: readonly Interrupt[];
|
|
531
|
+
resolve: InterruptController<TValue>["resolve"];
|
|
532
|
+
cancel: InterruptController<TValue>["cancel"];
|
|
533
|
+
}
|
|
534
|
+
/** Reactive data suitable for binding to an application interrupt component. */
|
|
535
|
+
interface InterruptView<TValue = unknown, TResult = unknown> extends InterruptHandlerProps<TValue> {
|
|
536
|
+
result: TResult | null;
|
|
537
|
+
}
|
|
538
|
+
type InterruptRunner = (agent: AbstractAgent, options: InterruptRunOptions) => Promise<RunAgentResult>;
|
|
539
|
+
/** Error surfaced when an application attempts to resume an expired interrupt. */
|
|
540
|
+
declare class InterruptExpiredError extends Error {
|
|
541
|
+
readonly interrupt: Interrupt;
|
|
542
|
+
constructor(interrupt: Interrupt);
|
|
543
|
+
}
|
|
544
|
+
/**
|
|
545
|
+
* Signal-based state machine for standard AG-UI and legacy interrupts.
|
|
546
|
+
*
|
|
547
|
+
* Prefer {@link injectInterrupt} in application components. The public class is
|
|
548
|
+
* useful for framework adapters and deterministic lifecycle tests.
|
|
549
|
+
*/
|
|
550
|
+
declare class InterruptController<TValue = unknown, TResult = never> {
|
|
551
|
+
#private;
|
|
552
|
+
readonly event: Signal<InterruptEvent<TValue>>;
|
|
553
|
+
readonly interrupt: Signal<{
|
|
554
|
+
id: string;
|
|
555
|
+
reason: string;
|
|
556
|
+
message?: string | undefined;
|
|
557
|
+
toolCallId?: string | undefined;
|
|
558
|
+
metadata?: Record<string, any> | undefined;
|
|
559
|
+
responseSchema?: Record<string, any> | undefined;
|
|
560
|
+
expiresAt?: string | undefined;
|
|
561
|
+
}>;
|
|
562
|
+
readonly interrupts: Signal<readonly {
|
|
563
|
+
id: string;
|
|
564
|
+
reason: string;
|
|
565
|
+
message?: string | undefined;
|
|
566
|
+
toolCallId?: string | undefined;
|
|
567
|
+
metadata?: Record<string, any> | undefined;
|
|
568
|
+
responseSchema?: Record<string, any> | undefined;
|
|
569
|
+
expiresAt?: string | undefined;
|
|
570
|
+
}[]>;
|
|
571
|
+
readonly result: Signal<TResult>;
|
|
572
|
+
readonly error: Signal<unknown>;
|
|
573
|
+
readonly hasInterrupt: Signal<boolean>;
|
|
574
|
+
readonly view: Signal<InterruptView<TValue, TResult>>;
|
|
575
|
+
constructor(runner: InterruptRunner, options?: InjectInterruptOptions<TValue, TResult>);
|
|
576
|
+
/** Subscribe to an agent, replacing any previous lifecycle subscription. */
|
|
577
|
+
connect(agent: AbstractAgent): void;
|
|
578
|
+
/** Clear pending decisions when the host changes threads. */
|
|
579
|
+
setThreadId(threadId: string): void;
|
|
580
|
+
/** Resolve one interrupt, resuming only after the complete set is addressed. */
|
|
581
|
+
readonly resolve: (payload?: unknown, interruptId?: string) => Promise<RunAgentResult | void>;
|
|
582
|
+
/** Cancel one standard interrupt; legacy interrupts are dismissed locally. */
|
|
583
|
+
readonly cancel: (interruptId?: string) => Promise<RunAgentResult | void>;
|
|
584
|
+
/** Alias retained for parity with other CopilotKit framework adapters. */
|
|
585
|
+
readonly resolveInterrupt: (payload?: unknown, interruptId?: string) => Promise<RunAgentResult | void>;
|
|
586
|
+
/** Alias retained for parity with other CopilotKit framework adapters. */
|
|
587
|
+
readonly cancelInterrupt: (interruptId?: string) => Promise<RunAgentResult | void>;
|
|
588
|
+
/** Release the agent subscription and clear sensitive pending state. */
|
|
589
|
+
destroy(): void;
|
|
590
|
+
}
|
|
591
|
+
/**
|
|
592
|
+
* Create an interrupt controller in the current Angular injection context.
|
|
593
|
+
*
|
|
594
|
+
* The controller follows the ambient chat agent and thread unless an explicit
|
|
595
|
+
* agent is supplied. Bind its signals in a template and call `resolve` or
|
|
596
|
+
* `cancel` from user-driven event handlers.
|
|
597
|
+
*/
|
|
598
|
+
declare function injectInterrupt<TValue = unknown, TResult = never>(options?: InjectInterruptOptions<TValue, TResult>): InterruptController<TValue, TResult>;
|
|
599
|
+
|
|
600
|
+
/**
|
|
601
|
+
* A conversation thread managed by the Intelligence platform.
|
|
602
|
+
*
|
|
603
|
+
* Each thread has a unique `id`, an optional human-readable `name`, and
|
|
604
|
+
* timestamp fields tracking creation and update times. This mirrors the
|
|
605
|
+
* `Thread` projection exposed by react-core's `useThreads` so framework
|
|
606
|
+
* wrappers share an identical shape.
|
|
607
|
+
*/
|
|
608
|
+
interface Thread {
|
|
609
|
+
/** Stable, server-assigned thread identifier. */
|
|
610
|
+
id: string;
|
|
611
|
+
/** The agent this thread belongs to. */
|
|
612
|
+
agentId: string;
|
|
613
|
+
/** Human-readable name, or `null` when the thread is unnamed. */
|
|
614
|
+
name: string | null;
|
|
615
|
+
/** `true` when the thread has been archived. */
|
|
616
|
+
archived: boolean;
|
|
617
|
+
/** ISO-8601 creation timestamp. */
|
|
618
|
+
createdAt: string;
|
|
619
|
+
/** ISO-8601 timestamp of the most recent metadata update. */
|
|
620
|
+
updatedAt: string;
|
|
621
|
+
/**
|
|
622
|
+
* ISO-8601 timestamp of the most recent agent run on this thread. Absent
|
|
623
|
+
* when the thread has never been run. Prefer this over `updatedAt` for
|
|
624
|
+
* user-facing "last activity" displays — it is not bumped by metadata-only
|
|
625
|
+
* actions like rename or archive.
|
|
626
|
+
*/
|
|
627
|
+
lastRunAt?: string;
|
|
628
|
+
}
|
|
629
|
+
/**
|
|
630
|
+
* Configuration for {@link injectThreads}.
|
|
631
|
+
*
|
|
632
|
+
* Thread operations are scoped to the runtime-authenticated user and the
|
|
633
|
+
* provided agent on the Intelligence platform. Each field may be supplied as
|
|
634
|
+
* a plain value or a {@link Signal}; when a signal is used the underlying
|
|
635
|
+
* runtime context is re-synced whenever its value changes.
|
|
636
|
+
*/
|
|
637
|
+
interface InjectThreadsInput {
|
|
638
|
+
/** The ID of the agent whose threads to list and manage. */
|
|
639
|
+
agentId: string | Signal<string>;
|
|
640
|
+
/** When `true`, archived threads are included in the list. Defaults to `false`. */
|
|
641
|
+
includeArchived?: boolean | Signal<boolean | undefined>;
|
|
642
|
+
/** Maximum number of threads to fetch per page. When set, enables cursor-based pagination. */
|
|
643
|
+
limit?: number | Signal<number | undefined>;
|
|
644
|
+
/**
|
|
645
|
+
* When `false`, the store stays inert: no runtime context is dispatched, so
|
|
646
|
+
* NO thread-list fetch or realtime subscription is issued, and the
|
|
647
|
+
* synthesized pre-connect loading state is suppressed. Used by gated
|
|
648
|
+
* surfaces (e.g. an unlicensed `<copilotkit-threads-drawer>`) that must not touch
|
|
649
|
+
* the network until the gate opens. Defaults to `true`. Mirrors react-core's
|
|
650
|
+
* `UseThreadsInput.enabled`.
|
|
651
|
+
*/
|
|
652
|
+
enabled?: boolean | Signal<boolean | undefined>;
|
|
653
|
+
}
|
|
654
|
+
/**
|
|
655
|
+
* Signal-based threads-list API returned by {@link injectThreads}.
|
|
656
|
+
*
|
|
657
|
+
* The `threads` signal is kept in sync with the platform via a realtime
|
|
658
|
+
* WebSocket subscription (when available) and is sorted most-recently-active
|
|
659
|
+
* first. Mutation methods reject with an `Error` if the platform request
|
|
660
|
+
* fails; `delete` additionally rolls back its optimistic removal.
|
|
661
|
+
*/
|
|
662
|
+
interface InjectThreadsResult {
|
|
663
|
+
/**
|
|
664
|
+
* Threads for the current user/agent pair, sorted most-recently-active
|
|
665
|
+
* first. Updated in realtime when the platform pushes metadata events.
|
|
666
|
+
* Includes archived threads only when `includeArchived` is set.
|
|
667
|
+
*/
|
|
668
|
+
threads: Signal<Thread[]>;
|
|
669
|
+
/**
|
|
670
|
+
* `true` while the initial thread list is being fetched from the platform.
|
|
671
|
+
* Subsequent realtime updates do not re-enter the loading state.
|
|
672
|
+
*/
|
|
673
|
+
isLoading: Signal<boolean>;
|
|
674
|
+
/**
|
|
675
|
+
* The most recent error from fetching threads or executing a mutation, or
|
|
676
|
+
* `null` when there is no error. Reset to `null` on the next successful
|
|
677
|
+
* fetch.
|
|
678
|
+
*/
|
|
679
|
+
error: Signal<Error | null>;
|
|
680
|
+
/**
|
|
681
|
+
* List/mutation errors only — excludes developer/config errors (missing
|
|
682
|
+
* runtime URL, runtime without thread endpoints) so consumer UIs do not
|
|
683
|
+
* surface dev strings to end users. Prefer this over `error` for
|
|
684
|
+
* user-facing error display.
|
|
685
|
+
*/
|
|
686
|
+
listError: Signal<Error | null>;
|
|
687
|
+
/**
|
|
688
|
+
* Error from the most recent FAILED next-page (fetch-more) load, or `null`.
|
|
689
|
+
* Tracked separately from {@link InjectThreadsResult.listError} so a
|
|
690
|
+
* paginated-load failure surfaces an inline "couldn't load more" affordance
|
|
691
|
+
* while the loaded list stays visible. Cleared when a fetch-more is retried
|
|
692
|
+
* or succeeds.
|
|
693
|
+
*/
|
|
694
|
+
fetchMoreError: Signal<Error | null>;
|
|
695
|
+
/**
|
|
696
|
+
* `true` when there are more threads available to fetch via
|
|
697
|
+
* {@link InjectThreadsResult.fetchMoreThreads}. Only meaningful when `limit`
|
|
698
|
+
* is set.
|
|
699
|
+
*/
|
|
700
|
+
hasMoreThreads: Signal<boolean>;
|
|
701
|
+
/** `true` while a subsequent page of threads is being fetched. */
|
|
702
|
+
isFetchingMoreThreads: Signal<boolean>;
|
|
703
|
+
/**
|
|
704
|
+
* `true` while at least one thread mutation (rename, archive, unarchive,
|
|
705
|
+
* delete) is awaiting a server response. Mutations apply optimistically, so
|
|
706
|
+
* this is primarily useful for disabling controls or showing a subtle
|
|
707
|
+
* in-flight indicator.
|
|
708
|
+
*/
|
|
709
|
+
isMutating: Signal<boolean>;
|
|
710
|
+
/**
|
|
711
|
+
* Fetch the next page of threads. No-op when
|
|
712
|
+
* {@link InjectThreadsResult.hasMoreThreads} is `false` or a fetch is
|
|
713
|
+
* already in progress.
|
|
714
|
+
*/
|
|
715
|
+
fetchMoreThreads: () => void;
|
|
716
|
+
/**
|
|
717
|
+
* Re-fetch the thread list from the platform without clearing the current
|
|
718
|
+
* list. Backs the drawer's error-state Retry and the Active/All filter
|
|
719
|
+
* refetch. No-op until the runtime is connected.
|
|
720
|
+
*/
|
|
721
|
+
refetchThreads: () => void;
|
|
722
|
+
/**
|
|
723
|
+
* Reset to a fresh, non-explicit client-side thread so the welcome screen
|
|
724
|
+
* shows. Lazy creation: no row appears in {@link InjectThreadsResult.threads}
|
|
725
|
+
* until the new thread's first run persists server-side.
|
|
726
|
+
*/
|
|
727
|
+
startNewThread: () => void;
|
|
728
|
+
/**
|
|
729
|
+
* Rename a thread on the platform. Resolves when the server confirms the
|
|
730
|
+
* update; rejects on failure.
|
|
731
|
+
*/
|
|
732
|
+
renameThread: (threadId: string, name: string) => Promise<void>;
|
|
733
|
+
/**
|
|
734
|
+
* Archive a thread on the platform. Archived threads are excluded from
|
|
735
|
+
* subsequent list results. Resolves when the server confirms the update;
|
|
736
|
+
* rejects on failure.
|
|
737
|
+
*/
|
|
738
|
+
archiveThread: (threadId: string) => Promise<void>;
|
|
739
|
+
/**
|
|
740
|
+
* Restore a previously archived thread on the platform. The thread
|
|
741
|
+
* re-appears in default (non-archived) list results. Resolves when the
|
|
742
|
+
* server confirms the update; rejects on failure.
|
|
743
|
+
*/
|
|
744
|
+
unarchiveThread: (threadId: string) => Promise<void>;
|
|
745
|
+
/**
|
|
746
|
+
* Permanently delete a thread from the platform. This is irreversible.
|
|
747
|
+
* Resolves when the server confirms deletion; rejects on failure (the
|
|
748
|
+
* optimistic removal is rolled back).
|
|
749
|
+
*/
|
|
750
|
+
deleteThread: (threadId: string) => Promise<void>;
|
|
751
|
+
}
|
|
752
|
+
/**
|
|
753
|
+
* Owns a single core thread store, bridges its selector observables onto
|
|
754
|
+
* Angular writable signals, keeps the store's runtime context in sync with the
|
|
755
|
+
* ambient {@link CopilotKit} configuration, and registers/unregisters the
|
|
756
|
+
* store with core for the active agent.
|
|
757
|
+
*
|
|
758
|
+
* One instance backs each {@link injectThreads} call. Tear-down (selector
|
|
759
|
+
* unsubscribe, store stop, core unregister) runs on the host's
|
|
760
|
+
* {@link DestroyRef}.
|
|
761
|
+
*/
|
|
762
|
+
declare class ThreadsStore implements InjectThreadsResult {
|
|
763
|
+
#private;
|
|
764
|
+
readonly threads: Signal<Thread[]>;
|
|
765
|
+
readonly error: Signal<Error | null>;
|
|
766
|
+
readonly listError: Signal<Error | null>;
|
|
767
|
+
readonly fetchMoreError: Signal<Error>;
|
|
768
|
+
readonly isLoading: Signal<boolean>;
|
|
769
|
+
readonly hasMoreThreads: Signal<boolean>;
|
|
770
|
+
readonly isFetchingMoreThreads: Signal<boolean>;
|
|
771
|
+
readonly isMutating: Signal<boolean>;
|
|
772
|
+
constructor(input: InjectThreadsInput, destroyRef: DestroyRef);
|
|
773
|
+
readonly renameThread: (threadId: string, name: string) => Promise<void>;
|
|
774
|
+
readonly archiveThread: (threadId: string) => Promise<void>;
|
|
775
|
+
readonly unarchiveThread: (threadId: string) => Promise<void>;
|
|
776
|
+
readonly deleteThread: (threadId: string) => Promise<void>;
|
|
777
|
+
readonly fetchMoreThreads: () => void;
|
|
778
|
+
readonly refetchThreads: () => void;
|
|
779
|
+
readonly startNewThread: () => void;
|
|
780
|
+
/** Unsubscribes all selector bridges and stops the underlying core store. */
|
|
781
|
+
teardown(): void;
|
|
782
|
+
}
|
|
783
|
+
/**
|
|
784
|
+
* Factory for {@link ThreadsStore} instances. Provided at the root so the
|
|
785
|
+
* ambient {@link CopilotKit} configuration is resolved from the application's
|
|
786
|
+
* injector.
|
|
787
|
+
*/
|
|
788
|
+
declare class CopilotkitThreadsFactory {
|
|
789
|
+
/**
|
|
790
|
+
* Creates a {@link ThreadsStore} bound to the given input and host
|
|
791
|
+
* `DestroyRef`.
|
|
792
|
+
*
|
|
793
|
+
* @param input - Agent identifier and optional list controls.
|
|
794
|
+
* @param destroyRef - Host lifetime; tears the store down on destroy.
|
|
795
|
+
*/
|
|
796
|
+
create(input: InjectThreadsInput, destroyRef: DestroyRef): ThreadsStore;
|
|
797
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CopilotkitThreadsFactory, never>;
|
|
798
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<CopilotkitThreadsFactory>;
|
|
799
|
+
}
|
|
800
|
+
/**
|
|
801
|
+
* Angular threads-list API over the platform-agnostic core thread store —
|
|
802
|
+
* the signal-based counterpart to react-core's `useThreads`.
|
|
803
|
+
*
|
|
804
|
+
* On creation the store fetches the thread list for the runtime-authenticated
|
|
805
|
+
* user and the given `agentId`. When the Intelligence platform exposes a
|
|
806
|
+
* WebSocket URL it also opens a realtime subscription so the `threads` signal
|
|
807
|
+
* stays current without polling. Mutation methods return promises that resolve
|
|
808
|
+
* once the platform confirms the operation and reject with an `Error` on
|
|
809
|
+
* failure.
|
|
810
|
+
*
|
|
811
|
+
* Must be called within an injection context (component/directive constructor
|
|
812
|
+
* or field initializer). The underlying store is torn down on the host's
|
|
813
|
+
* `DestroyRef`.
|
|
814
|
+
*
|
|
815
|
+
* @param input - Agent identifier and optional list controls. Each field
|
|
816
|
+
* accepts a plain value or a `Signal`.
|
|
817
|
+
* @returns Thread list state as signals plus stable mutation callbacks.
|
|
818
|
+
*
|
|
819
|
+
* @example
|
|
820
|
+
* ```ts
|
|
821
|
+
* @Component({ ... })
|
|
822
|
+
* class ThreadList {
|
|
823
|
+
* readonly threads = injectThreads({ agentId: "agent-1" });
|
|
824
|
+
* }
|
|
825
|
+
* ```
|
|
826
|
+
*/
|
|
827
|
+
declare function injectThreads(input: InjectThreadsInput): InjectThreadsResult;
|
|
828
|
+
|
|
536
829
|
interface CopilotChatLabels {
|
|
537
830
|
chatInputPlaceholder: string;
|
|
538
831
|
chatInputToolbarStartTranscribeButtonLabel: string;
|
|
@@ -557,6 +850,169 @@ declare const COPILOT_CHAT_LABELS: InjectionToken<CopilotChatLabels>;
|
|
|
557
850
|
declare function injectChatLabels(): CopilotChatLabels;
|
|
558
851
|
declare function provideCopilotChatLabels(config: Partial<CopilotChatLabels>): Provider;
|
|
559
852
|
|
|
853
|
+
/**
|
|
854
|
+
* Options for configuring the CopilotChat session.
|
|
855
|
+
* Mirrors the React CopilotChatConfigurationProvider props so behaviour
|
|
856
|
+
* is consistent across frameworks.
|
|
857
|
+
*/
|
|
858
|
+
interface CopilotChatConfigurationOptions {
|
|
859
|
+
/**
|
|
860
|
+
* The agent id to connect to.
|
|
861
|
+
* When omitted the runtime's default agent is used.
|
|
862
|
+
*/
|
|
863
|
+
agentId?: string;
|
|
864
|
+
/**
|
|
865
|
+
* An explicit thread id to resume.
|
|
866
|
+
* When provided the session joins the existing thread instead of starting a
|
|
867
|
+
* new one.
|
|
868
|
+
*/
|
|
869
|
+
threadId?: string;
|
|
870
|
+
/**
|
|
871
|
+
* Whether the thread id was supplied explicitly by the host application.
|
|
872
|
+
* Defaults to `false`, which seeds a non-explicit thread id that the runtime
|
|
873
|
+
* may override.
|
|
874
|
+
*/
|
|
875
|
+
hasExplicitThreadId?: boolean;
|
|
876
|
+
}
|
|
877
|
+
/**
|
|
878
|
+
* Angular service that holds the runtime chat configuration state.
|
|
879
|
+
*
|
|
880
|
+
* Active-thread resolution mirrors the React
|
|
881
|
+
* `CopilotChatConfigurationProvider` precedence (prop → override → minted)
|
|
882
|
+
* without parent-provider branches (PR1 has no nested providers).
|
|
883
|
+
*/
|
|
884
|
+
declare class CopilotChatConfiguration {
|
|
885
|
+
#private;
|
|
886
|
+
/**
|
|
887
|
+
* The resolved agent id for this chat session.
|
|
888
|
+
* Falls back to {@link DEFAULT_AGENT_ID} when no agent id is provided.
|
|
889
|
+
*/
|
|
890
|
+
readonly agentId: Signal<string>;
|
|
891
|
+
/**
|
|
892
|
+
* The resolved thread id for this chat session.
|
|
893
|
+
*
|
|
894
|
+
* Precedence (highest → lowest):
|
|
895
|
+
* 1. Prop-driven `threadId` when `#propIsAuthoritative` is true.
|
|
896
|
+
* 2. Imperative `#override` set by internal helpers.
|
|
897
|
+
* 3. Non-authoritative seed `threadId` from options.
|
|
898
|
+
* 4. Auto-minted UUID fallback.
|
|
899
|
+
*/
|
|
900
|
+
readonly threadId: Signal<string>;
|
|
901
|
+
/**
|
|
902
|
+
* Whether the current thread id was supplied explicitly by the host
|
|
903
|
+
* application (as opposed to being auto-minted or seeded without intent).
|
|
904
|
+
*/
|
|
905
|
+
readonly hasExplicitThreadId: Signal<boolean>;
|
|
906
|
+
/** Returns `true` when the host application controls the thread id via props. */
|
|
907
|
+
protected get isControlled(): boolean;
|
|
908
|
+
/**
|
|
909
|
+
* Sets an imperative thread override. No-ops when the session is
|
|
910
|
+
* controlled by the host application via props.
|
|
911
|
+
*
|
|
912
|
+
* @param threadId - The thread id to activate.
|
|
913
|
+
* @param explicit - Whether the override represents a deliberate user choice.
|
|
914
|
+
*/
|
|
915
|
+
protected _setOverride(threadId: string, explicit: boolean): void;
|
|
916
|
+
/**
|
|
917
|
+
* Switches the active thread to the given id.
|
|
918
|
+
*
|
|
919
|
+
* By default the switch is treated as an explicit user-driven choice
|
|
920
|
+
* (`explicit` defaults to `true`). Pass `{ explicit: false }` to mark it as
|
|
921
|
+
* a non-explicit seed that the runtime may replace.
|
|
922
|
+
*
|
|
923
|
+
* No-ops when the threadId is controlled by the host application via props.
|
|
924
|
+
*
|
|
925
|
+
* @param threadId - The thread id to activate.
|
|
926
|
+
* @param options - Optional overrides; `explicit` defaults to `true`.
|
|
927
|
+
*/
|
|
928
|
+
setActiveThreadId(threadId: string, options?: {
|
|
929
|
+
explicit?: boolean;
|
|
930
|
+
}): void;
|
|
931
|
+
/**
|
|
932
|
+
* Abandons the current thread and starts a fresh one by minting a new UUID.
|
|
933
|
+
*
|
|
934
|
+
* The new thread is marked as non-explicit so the runtime may assign a
|
|
935
|
+
* server-side thread id once the first message is sent.
|
|
936
|
+
*
|
|
937
|
+
* No-ops when the threadId is controlled by the host application via props.
|
|
938
|
+
*/
|
|
939
|
+
startNewThread(): void;
|
|
940
|
+
/**
|
|
941
|
+
* Read-only signal reflecting the current drawer open-state.
|
|
942
|
+
*
|
|
943
|
+
* @remarks
|
|
944
|
+
* Consumed by {@link CopilotThreadsDrawer} to drive the element's controlled
|
|
945
|
+
* `open` property; a future popup or sidebar component may also toggle it to
|
|
946
|
+
* implement mobile mutual-exclusion between the drawer and other overlays.
|
|
947
|
+
*/
|
|
948
|
+
readonly drawerOpen: Signal<boolean>;
|
|
949
|
+
/**
|
|
950
|
+
* Sets the drawer open-state imperatively.
|
|
951
|
+
*
|
|
952
|
+
* @remarks
|
|
953
|
+
* Called by {@link CopilotThreadsDrawer} in response to the element's
|
|
954
|
+
* `open-change` event to keep the shared open-state coordinated.
|
|
955
|
+
*
|
|
956
|
+
* @param open - `true` to mark the drawer as open, `false` to close it.
|
|
957
|
+
*/
|
|
958
|
+
setDrawerOpen(open: boolean): void;
|
|
959
|
+
/**
|
|
960
|
+
* Computed signal that is `true` when at least one drawer instance has
|
|
961
|
+
* registered itself via {@link registerDrawer}.
|
|
962
|
+
*/
|
|
963
|
+
readonly drawerRegistered: Signal<boolean>;
|
|
964
|
+
/**
|
|
965
|
+
* Registers a drawer instance and returns an idempotent unregister function.
|
|
966
|
+
*
|
|
967
|
+
* Increments the internal drawer count so that {@link drawerRegistered}
|
|
968
|
+
* becomes `true`. The returned function decrements the count when called;
|
|
969
|
+
* calling it more than once is safe — subsequent calls are no-ops (guarded
|
|
970
|
+
* by an `active` flag, floor at 0).
|
|
971
|
+
*
|
|
972
|
+
* @remarks
|
|
973
|
+
* Called by {@link CopilotThreadsDrawer} on construction with cleanup on
|
|
974
|
+
* destroy. Intended for future popup/sidebar coordination as well.
|
|
975
|
+
*
|
|
976
|
+
* @returns An idempotent cleanup function that unregisters this drawer.
|
|
977
|
+
*/
|
|
978
|
+
registerDrawer(): () => void;
|
|
979
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CopilotChatConfiguration, never>;
|
|
980
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<CopilotChatConfiguration>;
|
|
981
|
+
}
|
|
982
|
+
/**
|
|
983
|
+
* Injection token for the {@link CopilotChatConfiguration} service instance.
|
|
984
|
+
* Use {@link injectChatConfiguration} to retrieve it from the injector.
|
|
985
|
+
*/
|
|
986
|
+
declare const COPILOT_CHAT_CONFIGURATION: InjectionToken<CopilotChatConfiguration>;
|
|
987
|
+
/**
|
|
988
|
+
* Injection token for the raw {@link CopilotChatConfigurationOptions} value
|
|
989
|
+
* supplied to {@link provideCopilotChatConfiguration}.
|
|
990
|
+
*/
|
|
991
|
+
declare const COPILOT_CHAT_CONFIGURATION_OPTIONS: InjectionToken<CopilotChatConfigurationOptions>;
|
|
992
|
+
/**
|
|
993
|
+
* Registers the {@link CopilotChatConfiguration} service and its options into
|
|
994
|
+
* the current injector.
|
|
995
|
+
*
|
|
996
|
+
* `CopilotChatConfiguration` is registered as the canonical class provider.
|
|
997
|
+
* `COPILOT_CHAT_CONFIGURATION` is aliased to the same instance via
|
|
998
|
+
* `useExisting`, so both `inject(COPILOT_CHAT_CONFIGURATION)` (via
|
|
999
|
+
* {@link injectChatConfiguration}) and a direct `inject(CopilotChatConfiguration)`
|
|
1000
|
+
* resolve to the **same object** with shared signal state.
|
|
1001
|
+
*
|
|
1002
|
+
* @param options - Optional chat configuration overrides.
|
|
1003
|
+
* @returns An array of Angular providers to pass to `providers` or
|
|
1004
|
+
* `TestBed.configureTestingModule`.
|
|
1005
|
+
*/
|
|
1006
|
+
declare function provideCopilotChatConfiguration(options?: CopilotChatConfigurationOptions): Provider[];
|
|
1007
|
+
/**
|
|
1008
|
+
* Retrieves the {@link CopilotChatConfiguration} service from the current
|
|
1009
|
+
* injection context.
|
|
1010
|
+
*
|
|
1011
|
+
* Must be called inside an injection context (component constructor, factory
|
|
1012
|
+
* function, or `TestBed.runInInjectionContext`).
|
|
1013
|
+
*/
|
|
1014
|
+
declare function injectChatConfiguration(): CopilotChatConfiguration;
|
|
1015
|
+
|
|
560
1016
|
declare abstract class ChatState {
|
|
561
1017
|
abstract readonly inputValue: WritableSignal<string>;
|
|
562
1018
|
readonly attachments: WritableSignal<Attachment[]>;
|
|
@@ -704,10 +1160,116 @@ interface ConnectAgentContextConfig {
|
|
|
704
1160
|
/**
|
|
705
1161
|
* Connects context to the agent.
|
|
706
1162
|
*
|
|
707
|
-
* @param context - The context (or
|
|
1163
|
+
* @param context - The context (or reactive zero-argument accessor) to connect.
|
|
708
1164
|
* @param config - Optional configuration for connecting the context.
|
|
709
1165
|
*/
|
|
710
|
-
declare function connectAgentContext(context: Context |
|
|
1166
|
+
declare function connectAgentContext(context: Context | (() => Context), config?: ConnectAgentContextConfig): void;
|
|
1167
|
+
|
|
1168
|
+
/**
|
|
1169
|
+
* Return value of {@link injectMemories}.
|
|
1170
|
+
*
|
|
1171
|
+
* The `memories` signal is the server-authoritative list for the current
|
|
1172
|
+
* runtime-authenticated user. It is hydrated from a REST snapshot and kept
|
|
1173
|
+
* current by realtime `memory_metadata` deltas pushed over the memory store's
|
|
1174
|
+
* own channel. Mutations resolve once the platform confirms the operation and
|
|
1175
|
+
* reject with an `Error` on failure.
|
|
1176
|
+
*/
|
|
1177
|
+
interface MemoriesController {
|
|
1178
|
+
/**
|
|
1179
|
+
* Memories for the current user, newest first. Updated in realtime when the
|
|
1180
|
+
* platform pushes `memory_metadata` events over the memory store's channel.
|
|
1181
|
+
*/
|
|
1182
|
+
memories: Signal<Memory[]>;
|
|
1183
|
+
/**
|
|
1184
|
+
* `true` while the initial memory snapshot is being fetched. Subsequent
|
|
1185
|
+
* realtime updates do not re-enter the loading state.
|
|
1186
|
+
*/
|
|
1187
|
+
isLoading: Signal<boolean>;
|
|
1188
|
+
/**
|
|
1189
|
+
* The most recent error from fetching memories or a mutation, or `null`
|
|
1190
|
+
* when there is no error. Cleared on the next fetch attempt, on a
|
|
1191
|
+
* successful fetch, when the runtime context changes, and on a successful
|
|
1192
|
+
* mutation (a failed mutation replaces it with that mutation's error).
|
|
1193
|
+
*/
|
|
1194
|
+
error: Signal<Error | null>;
|
|
1195
|
+
/**
|
|
1196
|
+
* `true` when the platform memory routes are available. Set to `false`
|
|
1197
|
+
* after a 404 or 501, indicating memory is not supported by the current
|
|
1198
|
+
* runtime configuration.
|
|
1199
|
+
*/
|
|
1200
|
+
isAvailable: Signal<boolean>;
|
|
1201
|
+
/**
|
|
1202
|
+
* Health of the realtime connection that streams live `memory_metadata`
|
|
1203
|
+
* deltas. Distinct from `isAvailable`/`error` (which describe the REST list
|
|
1204
|
+
* route): `"connecting"` while the socket opens/joins, `"connected"` once
|
|
1205
|
+
* live deltas are flowing, and `"unavailable"` once the socket permanently
|
|
1206
|
+
* gives up — at which point the list is a frozen snapshot. Lets a template
|
|
1207
|
+
* drop a "live" indicator instead of showing it over stale data.
|
|
1208
|
+
*/
|
|
1209
|
+
realtimeStatus: Signal<MemoryRealtimeStatus>;
|
|
1210
|
+
/**
|
|
1211
|
+
* Re-fetch the memory snapshot from the platform. Resolves when the re-pull
|
|
1212
|
+
* succeeds; rejects if it fails or the store is torn down mid-flight.
|
|
1213
|
+
*/
|
|
1214
|
+
refresh: () => Promise<void>;
|
|
1215
|
+
/**
|
|
1216
|
+
* Create a memory. Resolves to the stored memory (server-authoritative);
|
|
1217
|
+
* rejects on failure.
|
|
1218
|
+
*/
|
|
1219
|
+
addMemory: (input: NewMemory) => Promise<Memory>;
|
|
1220
|
+
/**
|
|
1221
|
+
* Supersede a memory: the old memory is retired and a new one is created.
|
|
1222
|
+
* Resolves to the new memory (its `id` differs from the supplied `id`);
|
|
1223
|
+
* rejects on failure.
|
|
1224
|
+
*
|
|
1225
|
+
* Supersede is a FULL replacement, not a partial patch: `changes` is the
|
|
1226
|
+
* complete definition of the new memory. You must re-supply `content` and
|
|
1227
|
+
* `kind`, and an omitted `sourceThreadIds` resets the new memory's source
|
|
1228
|
+
* threads to empty — it does not preserve the prior memory's value.
|
|
1229
|
+
*/
|
|
1230
|
+
updateMemory: (id: string, changes: MemoryChanges) => Promise<Memory>;
|
|
1231
|
+
/**
|
|
1232
|
+
* Retire a memory (non-lossy delete). Resolves when the server confirms;
|
|
1233
|
+
* rejects on failure.
|
|
1234
|
+
*/
|
|
1235
|
+
removeMemory: (id: string) => Promise<void>;
|
|
1236
|
+
}
|
|
1237
|
+
/**
|
|
1238
|
+
* Angular injection function for listing and managing platform memories — the
|
|
1239
|
+
* signal-based counterpart to react-core's `useMemories`.
|
|
1240
|
+
*
|
|
1241
|
+
* Reads the user-scoped memory store owned and wired by `CopilotKitCore`. The
|
|
1242
|
+
* binding does not create, register, start, or stop the store: core owns its
|
|
1243
|
+
* lifecycle and opens its own `user_meta:memories:<joinCode>` channel, applying
|
|
1244
|
+
* `memory_metadata` deltas to the list. The binding only bridges the store's
|
|
1245
|
+
* selectors onto Angular signals and forwards the stable mutation callbacks.
|
|
1246
|
+
*
|
|
1247
|
+
* Mutations are server-authoritative: each resolves once the platform confirms
|
|
1248
|
+
* the operation and rejects with an `Error` on failure. You can still call
|
|
1249
|
+
* `refresh()` to re-pull the REST snapshot on demand.
|
|
1250
|
+
*
|
|
1251
|
+
* Must be called inside an injection context (component constructor, field
|
|
1252
|
+
* initializer, `inject` callback, or `TestBed.runInInjectionContext`) so the
|
|
1253
|
+
* selector→signal bridges (`toSignal`) tear down with the host.
|
|
1254
|
+
*
|
|
1255
|
+
* @returns Signals for memory state and stable mutation callbacks.
|
|
1256
|
+
*
|
|
1257
|
+
* @example
|
|
1258
|
+
* ```ts
|
|
1259
|
+
* import { injectMemories } from "@copilotkit/angular";
|
|
1260
|
+
*
|
|
1261
|
+
* @Component({ ... })
|
|
1262
|
+
* class MemoryList {
|
|
1263
|
+
* readonly #m = injectMemories();
|
|
1264
|
+
* memories = this.#m.memories;
|
|
1265
|
+
* isLoading = this.#m.isLoading;
|
|
1266
|
+
* isAvailable = this.#m.isAvailable;
|
|
1267
|
+
*
|
|
1268
|
+
* remove(id: string) { this.#m.removeMemory(id); }
|
|
1269
|
+
* }
|
|
1270
|
+
* ```
|
|
1271
|
+
*/
|
|
1272
|
+
declare function injectMemories(): MemoriesController;
|
|
711
1273
|
|
|
712
1274
|
/**
|
|
713
1275
|
* Represents a value that can be used as a slot override.
|
|
@@ -987,7 +1549,7 @@ type ScrollBehavior = "smooth" | "instant" | "auto";
|
|
|
987
1549
|
* </div>
|
|
988
1550
|
* ```
|
|
989
1551
|
*/
|
|
990
|
-
declare class StickToBottom implements
|
|
1552
|
+
declare class StickToBottom implements AfterViewInit, OnDestroy {
|
|
991
1553
|
enabled: _angular_core.InputSignal<boolean>;
|
|
992
1554
|
threshold: _angular_core.InputSignal<number>;
|
|
993
1555
|
initialBehavior: _angular_core.InputSignal<ScrollBehavior>;
|
|
@@ -998,12 +1560,14 @@ declare class StickToBottom implements OnInit, AfterViewInit, OnDestroy {
|
|
|
998
1560
|
private elementRef;
|
|
999
1561
|
private scrollService;
|
|
1000
1562
|
private resizeService;
|
|
1563
|
+
private platformId;
|
|
1001
1564
|
private destroy$;
|
|
1002
1565
|
private contentElement?;
|
|
1003
1566
|
private wasAtBottom;
|
|
1004
1567
|
private hasInitialized;
|
|
1005
1568
|
private userHasScrolled;
|
|
1006
|
-
|
|
1569
|
+
private destroyed;
|
|
1570
|
+
constructor();
|
|
1007
1571
|
ngAfterViewInit(): void;
|
|
1008
1572
|
private setupScrollMonitoring;
|
|
1009
1573
|
private setupResizeMonitoring;
|
|
@@ -1077,7 +1641,32 @@ declare class CopilotChat extends ChatState {
|
|
|
1077
1641
|
readonly agentId: _angular_core.InputSignal<string>;
|
|
1078
1642
|
readonly threadId: _angular_core.InputSignal<string>;
|
|
1079
1643
|
readonly inputComponent: _angular_core.InputSignal<Type<any>>;
|
|
1644
|
+
/** Component used to render each assistant message in the prebuilt chat. */
|
|
1645
|
+
readonly assistantMessageComponent: _angular_core.InputSignal<Type<any>>;
|
|
1646
|
+
/** Template used to render each assistant message in the prebuilt chat. */
|
|
1647
|
+
readonly assistantMessageTemplate: _angular_core.InputSignal<TemplateRef<any>>;
|
|
1648
|
+
/** Class forwarded to the default or custom assistant-message renderer. */
|
|
1649
|
+
readonly assistantMessageClass: _angular_core.InputSignal<string>;
|
|
1650
|
+
/** Component used to render each reasoning message in the prebuilt chat. */
|
|
1651
|
+
readonly reasoningMessageComponent: _angular_core.InputSignal<Type<any>>;
|
|
1652
|
+
/** Template used to render each reasoning message in the prebuilt chat. */
|
|
1653
|
+
readonly reasoningMessageTemplate: _angular_core.InputSignal<TemplateRef<any>>;
|
|
1654
|
+
/** Class forwarded to the default or custom reasoning-message renderer. */
|
|
1655
|
+
readonly reasoningMessageClass: _angular_core.InputSignal<string>;
|
|
1656
|
+
/** Component rendered after the transcript messages and before the cursor. */
|
|
1657
|
+
readonly messageViewChildrenComponent: _angular_core.InputSignal<Type<any>>;
|
|
1658
|
+
/** Template rendered after the transcript messages and before the cursor. */
|
|
1659
|
+
readonly messageViewChildrenTemplate: _angular_core.InputSignal<TemplateRef<any>>;
|
|
1660
|
+
/** Class forwarded to custom transcript-children renderers. */
|
|
1661
|
+
readonly messageViewChildrenClass: _angular_core.InputSignal<string>;
|
|
1080
1662
|
readonly attachmentsConfig: _angular_core.InputSignal<AttachmentsConfig>;
|
|
1663
|
+
/**
|
|
1664
|
+
* Ambient chat configuration, when a {@link provideCopilotChatConfiguration}
|
|
1665
|
+
* provider is in scope. Absent (`null`) for standalone
|
|
1666
|
+
* `<copilot-chat [threadId]>` usage, which has no provider — resolved via the
|
|
1667
|
+
* optional inject so the component does not throw without one.
|
|
1668
|
+
*/
|
|
1669
|
+
private readonly config;
|
|
1081
1670
|
protected readonly resolvedAgentId: _angular_core.Signal<string>;
|
|
1082
1671
|
readonly agentStore: _angular_core.Signal<_copilotkit_angular.AgentStore>;
|
|
1083
1672
|
private readonly copilotKit;
|
|
@@ -1193,8 +1782,9 @@ declare class CopilotChat extends ChatState {
|
|
|
1193
1782
|
id: string;
|
|
1194
1783
|
encryptedValue?: string | undefined;
|
|
1195
1784
|
})[]>;
|
|
1785
|
+
protected agentState: _angular_core.Signal<unknown>;
|
|
1196
1786
|
protected isRunning: _angular_core.Signal<boolean>;
|
|
1197
|
-
protected hasExplicitThreadId: _angular_core.Signal<boolean>;
|
|
1787
|
+
protected readonly hasExplicitThreadId: _angular_core.Signal<boolean>;
|
|
1198
1788
|
protected readonly agentRef: _angular_core.Signal<AbstractAgent>;
|
|
1199
1789
|
protected readonly resolvedThreadId: _angular_core.Signal<string>;
|
|
1200
1790
|
readonly attachmentsEnabled: _angular_core.Signal<boolean>;
|
|
@@ -1214,7 +1804,7 @@ declare class CopilotChat extends ChatState {
|
|
|
1214
1804
|
handleDragLeave(event: DragEvent): void;
|
|
1215
1805
|
handleDrop(event: DragEvent): void;
|
|
1216
1806
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CopilotChat, never>;
|
|
1217
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CopilotChat, "copilot-chat", never, { "agentId": { "alias": "agentId"; "required": false; "isSignal": true; }; "threadId": { "alias": "threadId"; "required": false; "isSignal": true; }; "inputComponent": { "alias": "inputComponent"; "required": false; "isSignal": true; }; "attachmentsConfig": { "alias": "attachments"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1807
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CopilotChat, "copilot-chat", never, { "agentId": { "alias": "agentId"; "required": false; "isSignal": true; }; "threadId": { "alias": "threadId"; "required": false; "isSignal": true; }; "inputComponent": { "alias": "inputComponent"; "required": false; "isSignal": true; }; "assistantMessageComponent": { "alias": "assistantMessageComponent"; "required": false; "isSignal": true; }; "assistantMessageTemplate": { "alias": "assistantMessageTemplate"; "required": false; "isSignal": true; }; "assistantMessageClass": { "alias": "assistantMessageClass"; "required": false; "isSignal": true; }; "reasoningMessageComponent": { "alias": "reasoningMessageComponent"; "required": false; "isSignal": true; }; "reasoningMessageTemplate": { "alias": "reasoningMessageTemplate"; "required": false; "isSignal": true; }; "reasoningMessageClass": { "alias": "reasoningMessageClass"; "required": false; "isSignal": true; }; "messageViewChildrenComponent": { "alias": "messageViewChildrenComponent"; "required": false; "isSignal": true; }; "messageViewChildrenTemplate": { "alias": "messageViewChildrenTemplate"; "required": false; "isSignal": true; }; "messageViewChildrenClass": { "alias": "messageViewChildrenClass"; "required": false; "isSignal": true; }; "attachmentsConfig": { "alias": "attachments"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1218
1808
|
}
|
|
1219
1809
|
|
|
1220
1810
|
declare class CopilotChatToolCallsView {
|
|
@@ -1404,6 +1994,12 @@ declare class CopilotChatAssistantMessageRenderer implements AfterViewInit {
|
|
|
1404
1994
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CopilotChatAssistantMessageRenderer, "copilot-chat-assistant-message-renderer", never, { "content": { "alias": "content"; "required": false; "isSignal": true; }; "inputClass": { "alias": "inputClass"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1405
1995
|
}
|
|
1406
1996
|
|
|
1997
|
+
interface CopilotIconNode {
|
|
1998
|
+
readonly tag: "path" | "rect";
|
|
1999
|
+
readonly attributes: Readonly<Record<string, string>>;
|
|
2000
|
+
}
|
|
2001
|
+
type CopilotIconData = readonly CopilotIconNode[];
|
|
2002
|
+
|
|
1407
2003
|
declare class CopilotChatAssistantMessageToolbarButton {
|
|
1408
2004
|
title: _angular_core.InputSignal<string>;
|
|
1409
2005
|
disabled: _angular_core.InputSignal<boolean>;
|
|
@@ -1418,8 +2014,8 @@ declare class CopilotChatAssistantMessageCopyButton {
|
|
|
1418
2014
|
readonly inputClass: _angular_core.InputSignal<string>;
|
|
1419
2015
|
readonly content: _angular_core.InputSignal<string>;
|
|
1420
2016
|
readonly clicked: _angular_core.OutputEmitterRef<void>;
|
|
1421
|
-
readonly CopyIcon:
|
|
1422
|
-
readonly CheckIcon:
|
|
2017
|
+
readonly CopyIcon: CopilotIconData;
|
|
2018
|
+
readonly CheckIcon: CopilotIconData;
|
|
1423
2019
|
readonly copied: _angular_core.WritableSignal<boolean>;
|
|
1424
2020
|
readonly labels: _copilotkit_angular.CopilotChatLabels;
|
|
1425
2021
|
handleCopy(event?: Event): void;
|
|
@@ -1431,7 +2027,7 @@ declare class CopilotChatAssistantMessageThumbsUpButton {
|
|
|
1431
2027
|
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
1432
2028
|
readonly inputClass: _angular_core.InputSignal<string>;
|
|
1433
2029
|
readonly clicked: _angular_core.OutputEmitterRef<void>;
|
|
1434
|
-
readonly ThumbsUpIcon:
|
|
2030
|
+
readonly ThumbsUpIcon: CopilotIconData;
|
|
1435
2031
|
readonly labels: _copilotkit_angular.CopilotChatLabels;
|
|
1436
2032
|
handleClick(event?: Event): void;
|
|
1437
2033
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CopilotChatAssistantMessageThumbsUpButton, never>;
|
|
@@ -1442,7 +2038,7 @@ declare class CopilotChatAssistantMessageThumbsDownButton {
|
|
|
1442
2038
|
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
1443
2039
|
readonly inputClass: _angular_core.InputSignal<string>;
|
|
1444
2040
|
readonly clicked: _angular_core.OutputEmitterRef<void>;
|
|
1445
|
-
readonly ThumbsDownIcon:
|
|
2041
|
+
readonly ThumbsDownIcon: CopilotIconData;
|
|
1446
2042
|
readonly labels: _copilotkit_angular.CopilotChatLabels;
|
|
1447
2043
|
handleClick(event?: Event): void;
|
|
1448
2044
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CopilotChatAssistantMessageThumbsDownButton, never>;
|
|
@@ -1453,7 +2049,7 @@ declare class CopilotChatAssistantMessageReadAloudButton {
|
|
|
1453
2049
|
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
1454
2050
|
readonly inputClass: _angular_core.InputSignal<string>;
|
|
1455
2051
|
readonly clicked: _angular_core.OutputEmitterRef<void>;
|
|
1456
|
-
readonly Volume2Icon:
|
|
2052
|
+
readonly Volume2Icon: CopilotIconData;
|
|
1457
2053
|
readonly labels: _copilotkit_angular.CopilotChatLabels;
|
|
1458
2054
|
handleClick(event?: Event): void;
|
|
1459
2055
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CopilotChatAssistantMessageReadAloudButton, never>;
|
|
@@ -1464,7 +2060,7 @@ declare class CopilotChatAssistantMessageRegenerateButton {
|
|
|
1464
2060
|
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
1465
2061
|
readonly inputClass: _angular_core.InputSignal<string>;
|
|
1466
2062
|
readonly clicked: _angular_core.OutputEmitterRef<void>;
|
|
1467
|
-
readonly RefreshCwIcon:
|
|
2063
|
+
readonly RefreshCwIcon: CopilotIconData;
|
|
1468
2064
|
readonly labels: _copilotkit_angular.CopilotChatLabels;
|
|
1469
2065
|
handleClick(event?: Event): void;
|
|
1470
2066
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CopilotChatAssistantMessageRegenerateButton, never>;
|
|
@@ -2050,7 +2646,7 @@ declare class CopilotChatAudioRecorder implements AfterViewInit {
|
|
|
2050
2646
|
declare class CopilotChatSendButton {
|
|
2051
2647
|
disabled: _angular_core.InputSignal<boolean>;
|
|
2052
2648
|
clicked: _angular_core.OutputEmitterRef<void>;
|
|
2053
|
-
readonly ArrowUpIcon:
|
|
2649
|
+
readonly ArrowUpIcon: CopilotIconData;
|
|
2054
2650
|
buttonClass: string;
|
|
2055
2651
|
onClick(): void;
|
|
2056
2652
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CopilotChatSendButton, never>;
|
|
@@ -2060,7 +2656,7 @@ declare class CopilotChatStartTranscribeButton {
|
|
|
2060
2656
|
disabled: _angular_core.InputSignal<boolean>;
|
|
2061
2657
|
clicked: _angular_core.OutputEmitterRef<void>;
|
|
2062
2658
|
readonly labels: _copilotkit_angular.CopilotChatLabels;
|
|
2063
|
-
readonly MicIcon:
|
|
2659
|
+
readonly MicIcon: CopilotIconData;
|
|
2064
2660
|
buttonClass: string;
|
|
2065
2661
|
get label(): string;
|
|
2066
2662
|
onClick(): void;
|
|
@@ -2071,7 +2667,7 @@ declare class CopilotChatCancelTranscribeButton {
|
|
|
2071
2667
|
disabled: _angular_core.InputSignal<boolean>;
|
|
2072
2668
|
clicked: _angular_core.OutputEmitterRef<void>;
|
|
2073
2669
|
readonly labels: _copilotkit_angular.CopilotChatLabels;
|
|
2074
|
-
readonly XIcon:
|
|
2670
|
+
readonly XIcon: CopilotIconData;
|
|
2075
2671
|
buttonClass: string;
|
|
2076
2672
|
get label(): string;
|
|
2077
2673
|
onClick(): void;
|
|
@@ -2082,7 +2678,7 @@ declare class CopilotChatFinishTranscribeButton {
|
|
|
2082
2678
|
disabled: _angular_core.InputSignal<boolean>;
|
|
2083
2679
|
clicked: _angular_core.OutputEmitterRef<void>;
|
|
2084
2680
|
readonly labels: _copilotkit_angular.CopilotChatLabels;
|
|
2085
|
-
readonly CheckIcon:
|
|
2681
|
+
readonly CheckIcon: CopilotIconData;
|
|
2086
2682
|
buttonClass: string;
|
|
2087
2683
|
get label(): string;
|
|
2088
2684
|
onClick(): void;
|
|
@@ -2093,7 +2689,7 @@ declare class CopilotChatAddFileButton {
|
|
|
2093
2689
|
disabled: _angular_core.InputSignal<boolean>;
|
|
2094
2690
|
clicked: _angular_core.OutputEmitterRef<void>;
|
|
2095
2691
|
readonly labels: _copilotkit_angular.CopilotChatLabels;
|
|
2096
|
-
readonly PlusIcon:
|
|
2692
|
+
readonly PlusIcon: CopilotIconData;
|
|
2097
2693
|
buttonClass: string;
|
|
2098
2694
|
get label(): string;
|
|
2099
2695
|
onClick(): void;
|
|
@@ -2101,19 +2697,20 @@ declare class CopilotChatAddFileButton {
|
|
|
2101
2697
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CopilotChatAddFileButton, "copilot-chat-add-file-button", never, { "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, { "clicked": "clicked"; }, never, never, true, never>;
|
|
2102
2698
|
}
|
|
2103
2699
|
declare class CopilotChatToolbarButton {
|
|
2104
|
-
disabled: _angular_core.
|
|
2105
|
-
variant: _angular_core.
|
|
2106
|
-
customClass: _angular_core.
|
|
2107
|
-
title: _angular_core.
|
|
2700
|
+
disabled: _angular_core.InputSignal<boolean>;
|
|
2701
|
+
variant: _angular_core.InputSignal<"primary" | "secondary">;
|
|
2702
|
+
customClass: _angular_core.InputSignal<string>;
|
|
2703
|
+
title: _angular_core.InputSignal<string>;
|
|
2108
2704
|
clicked: _angular_core.OutputEmitterRef<void>;
|
|
2109
2705
|
computedClass: _angular_core.Signal<string>;
|
|
2110
2706
|
onClick(): void;
|
|
2111
2707
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CopilotChatToolbarButton, never>;
|
|
2112
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CopilotChatToolbarButton, "copilot-chat-toolbar-button", never, {}, { "clicked": "clicked"; }, never, ["*"], true, never>;
|
|
2708
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CopilotChatToolbarButton, "copilot-chat-toolbar-button", never, { "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "customClass": { "alias": "customClass"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; }, { "clicked": "clicked"; }, never, ["*"], true, never>;
|
|
2113
2709
|
}
|
|
2114
2710
|
|
|
2115
2711
|
declare class CopilotChatTextarea implements AfterViewInit {
|
|
2116
2712
|
private elementRef;
|
|
2713
|
+
private platformId;
|
|
2117
2714
|
get textareaRef(): ElementRef<any>;
|
|
2118
2715
|
inputValue: _angular_core.InputSignal<string>;
|
|
2119
2716
|
inputPlaceholder: _angular_core.InputSignal<string>;
|
|
@@ -2160,8 +2757,8 @@ declare class CopilotChatToolbar {
|
|
|
2160
2757
|
}
|
|
2161
2758
|
|
|
2162
2759
|
declare class CopilotChatToolsMenu {
|
|
2163
|
-
readonly PlusIcon:
|
|
2164
|
-
readonly ChevronRightIcon:
|
|
2760
|
+
readonly PlusIcon: CopilotIconData;
|
|
2761
|
+
readonly ChevronRightIcon: CopilotIconData;
|
|
2165
2762
|
inputToolsMenu: _angular_core.InputSignal<(ToolsMenuItem | "-")[]>;
|
|
2166
2763
|
inputDisabled: _angular_core.InputSignal<boolean>;
|
|
2167
2764
|
inputClass: _angular_core.InputSignal<string>;
|
|
@@ -2195,7 +2792,7 @@ interface ToolbarContext {
|
|
|
2195
2792
|
mode: CopilotChatInputMode;
|
|
2196
2793
|
value: string;
|
|
2197
2794
|
}
|
|
2198
|
-
declare class CopilotChatInput implements
|
|
2795
|
+
declare class CopilotChatInput implements OnDestroy {
|
|
2199
2796
|
readonly textAreaRef: _angular_core.Signal<CopilotChatTextarea>;
|
|
2200
2797
|
readonly audioRecorderRef: _angular_core.Signal<CopilotChatAudioRecorder>;
|
|
2201
2798
|
readonly sendButtonTemplate: _angular_core.Signal<TemplateRef<SendButtonContext>>;
|
|
@@ -2240,7 +2837,7 @@ declare class CopilotChatInput implements AfterViewInit, OnDestroy {
|
|
|
2240
2837
|
finishTranscribeWithAudio: _angular_core.OutputEmitterRef<Blob>;
|
|
2241
2838
|
addFile: _angular_core.OutputEmitterRef<void>;
|
|
2242
2839
|
valueChange: _angular_core.OutputEmitterRef<string>;
|
|
2243
|
-
readonly ArrowUpIcon:
|
|
2840
|
+
readonly ArrowUpIcon: CopilotIconData;
|
|
2244
2841
|
readonly defaultButtonClass: string;
|
|
2245
2842
|
readonly labels: _copilotkit_angular.CopilotChatLabels;
|
|
2246
2843
|
readonly chatState: _copilotkit_angular.ChatState;
|
|
@@ -2301,7 +2898,6 @@ declare class CopilotChatInput implements AfterViewInit, OnDestroy {
|
|
|
2301
2898
|
clicked: () => void;
|
|
2302
2899
|
click: () => void;
|
|
2303
2900
|
};
|
|
2304
|
-
ngAfterViewInit(): void;
|
|
2305
2901
|
ngOnDestroy(): void;
|
|
2306
2902
|
handleKeyDown(event: KeyboardEvent): void;
|
|
2307
2903
|
handleValueChange(value: string): void;
|
|
@@ -2396,8 +2992,8 @@ declare class CopilotChatUserMessageCopyButton {
|
|
|
2396
2992
|
readonly inputClass: _angular_core.InputSignal<string>;
|
|
2397
2993
|
readonly content: _angular_core.InputSignal<string>;
|
|
2398
2994
|
readonly clicked: _angular_core.OutputEmitterRef<void>;
|
|
2399
|
-
readonly CopyIcon:
|
|
2400
|
-
readonly CheckIcon:
|
|
2995
|
+
readonly CopyIcon: CopilotIconData;
|
|
2996
|
+
readonly CheckIcon: CopilotIconData;
|
|
2401
2997
|
readonly copied: _angular_core.WritableSignal<boolean>;
|
|
2402
2998
|
readonly labels: _copilotkit_angular.CopilotChatLabels;
|
|
2403
2999
|
handleCopy(): void;
|
|
@@ -2409,7 +3005,7 @@ declare class CopilotChatUserMessageEditButton {
|
|
|
2409
3005
|
disabled: _angular_core.InputSignal<boolean>;
|
|
2410
3006
|
inputClass: _angular_core.InputSignal<string>;
|
|
2411
3007
|
clicked: _angular_core.OutputEmitterRef<void>;
|
|
2412
|
-
readonly EditIcon:
|
|
3008
|
+
readonly EditIcon: CopilotIconData;
|
|
2413
3009
|
readonly labels: _copilotkit_angular.CopilotChatLabels;
|
|
2414
3010
|
handleEdit(): void;
|
|
2415
3011
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CopilotChatUserMessageEditButton, never>;
|
|
@@ -2493,8 +3089,8 @@ declare class CopilotChatUserMessageBranchNavigation {
|
|
|
2493
3089
|
}>;
|
|
2494
3090
|
inputClass: _angular_core.InputSignal<string>;
|
|
2495
3091
|
switchToBranch: _angular_core.OutputEmitterRef<CopilotChatUserMessageOnSwitchToBranchProps>;
|
|
2496
|
-
readonly ChevronLeftIcon:
|
|
2497
|
-
readonly ChevronRightIcon:
|
|
3092
|
+
readonly ChevronLeftIcon: CopilotIconData;
|
|
3093
|
+
readonly ChevronRightIcon: CopilotIconData;
|
|
2498
3094
|
readonly buttonClass: string;
|
|
2499
3095
|
showNavigation: _angular_core.Signal<boolean>;
|
|
2500
3096
|
canGoPrev: _angular_core.Signal<boolean>;
|
|
@@ -2635,6 +3231,140 @@ declare class CopilotChatMessageViewCursor {
|
|
|
2635
3231
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CopilotChatMessageViewCursor, "copilot-chat-message-view-cursor", never, { "inputClass": { "alias": "inputClass"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
2636
3232
|
}
|
|
2637
3233
|
|
|
3234
|
+
declare class CopilotChatReasoningMessage {
|
|
3235
|
+
readonly message: _angular_core.InputSignal<{
|
|
3236
|
+
role: "reasoning";
|
|
3237
|
+
content: string;
|
|
3238
|
+
id: string;
|
|
3239
|
+
encryptedValue?: string | undefined;
|
|
3240
|
+
}>;
|
|
3241
|
+
readonly messages: _angular_core.InputSignal<({
|
|
3242
|
+
role: "developer";
|
|
3243
|
+
content: string;
|
|
3244
|
+
id: string;
|
|
3245
|
+
name?: string | undefined;
|
|
3246
|
+
encryptedValue?: string | undefined;
|
|
3247
|
+
} | {
|
|
3248
|
+
role: "system";
|
|
3249
|
+
content: string;
|
|
3250
|
+
id: string;
|
|
3251
|
+
name?: string | undefined;
|
|
3252
|
+
encryptedValue?: string | undefined;
|
|
3253
|
+
} | {
|
|
3254
|
+
role: "assistant";
|
|
3255
|
+
id: string;
|
|
3256
|
+
name?: string | undefined;
|
|
3257
|
+
content?: string | undefined;
|
|
3258
|
+
encryptedValue?: string | undefined;
|
|
3259
|
+
toolCalls?: {
|
|
3260
|
+
function: {
|
|
3261
|
+
name: string;
|
|
3262
|
+
arguments: string;
|
|
3263
|
+
};
|
|
3264
|
+
type: "function";
|
|
3265
|
+
id: string;
|
|
3266
|
+
encryptedValue?: string | undefined;
|
|
3267
|
+
}[] | undefined;
|
|
3268
|
+
} | {
|
|
3269
|
+
role: "user";
|
|
3270
|
+
content: string | ({
|
|
3271
|
+
type: "text";
|
|
3272
|
+
text: string;
|
|
3273
|
+
} | {
|
|
3274
|
+
type: "image";
|
|
3275
|
+
source: {
|
|
3276
|
+
type: "data";
|
|
3277
|
+
value: string;
|
|
3278
|
+
mimeType: string;
|
|
3279
|
+
} | {
|
|
3280
|
+
type: "url";
|
|
3281
|
+
value: string;
|
|
3282
|
+
mimeType?: string | undefined;
|
|
3283
|
+
};
|
|
3284
|
+
metadata?: unknown;
|
|
3285
|
+
} | {
|
|
3286
|
+
type: "audio";
|
|
3287
|
+
source: {
|
|
3288
|
+
type: "data";
|
|
3289
|
+
value: string;
|
|
3290
|
+
mimeType: string;
|
|
3291
|
+
} | {
|
|
3292
|
+
type: "url";
|
|
3293
|
+
value: string;
|
|
3294
|
+
mimeType?: string | undefined;
|
|
3295
|
+
};
|
|
3296
|
+
metadata?: unknown;
|
|
3297
|
+
} | {
|
|
3298
|
+
type: "video";
|
|
3299
|
+
source: {
|
|
3300
|
+
type: "data";
|
|
3301
|
+
value: string;
|
|
3302
|
+
mimeType: string;
|
|
3303
|
+
} | {
|
|
3304
|
+
type: "url";
|
|
3305
|
+
value: string;
|
|
3306
|
+
mimeType?: string | undefined;
|
|
3307
|
+
};
|
|
3308
|
+
metadata?: unknown;
|
|
3309
|
+
} | {
|
|
3310
|
+
type: "document";
|
|
3311
|
+
source: {
|
|
3312
|
+
type: "data";
|
|
3313
|
+
value: string;
|
|
3314
|
+
mimeType: string;
|
|
3315
|
+
} | {
|
|
3316
|
+
type: "url";
|
|
3317
|
+
value: string;
|
|
3318
|
+
mimeType?: string | undefined;
|
|
3319
|
+
};
|
|
3320
|
+
metadata?: unknown;
|
|
3321
|
+
} | {
|
|
3322
|
+
type: "binary";
|
|
3323
|
+
mimeType: string;
|
|
3324
|
+
id?: string | undefined;
|
|
3325
|
+
data?: string | undefined;
|
|
3326
|
+
url?: string | undefined;
|
|
3327
|
+
filename?: string | undefined;
|
|
3328
|
+
})[];
|
|
3329
|
+
id: string;
|
|
3330
|
+
name?: string | undefined;
|
|
3331
|
+
encryptedValue?: string | undefined;
|
|
3332
|
+
} | {
|
|
3333
|
+
role: "tool";
|
|
3334
|
+
toolCallId: string;
|
|
3335
|
+
content: string;
|
|
3336
|
+
id: string;
|
|
3337
|
+
encryptedValue?: string | undefined;
|
|
3338
|
+
error?: string | undefined;
|
|
3339
|
+
} | {
|
|
3340
|
+
role: "activity";
|
|
3341
|
+
content: Record<string, any>;
|
|
3342
|
+
id: string;
|
|
3343
|
+
activityType: string;
|
|
3344
|
+
} | {
|
|
3345
|
+
role: "reasoning";
|
|
3346
|
+
content: string;
|
|
3347
|
+
id: string;
|
|
3348
|
+
encryptedValue?: string | undefined;
|
|
3349
|
+
})[]>;
|
|
3350
|
+
readonly isRunning: _angular_core.InputSignal<boolean>;
|
|
3351
|
+
readonly inputClass: _angular_core.InputSignal<string>;
|
|
3352
|
+
private readonly userToggled;
|
|
3353
|
+
protected readonly isLatest: _angular_core.Signal<boolean>;
|
|
3354
|
+
protected readonly isStreaming: _angular_core.Signal<boolean>;
|
|
3355
|
+
private readonly startTime;
|
|
3356
|
+
protected readonly open: _angular_core.WritableSignal<boolean>;
|
|
3357
|
+
protected readonly hasContent: _angular_core.Signal<boolean>;
|
|
3358
|
+
protected readonly reasoningContent: _angular_core.Signal<string>;
|
|
3359
|
+
protected readonly label: _angular_core.Signal<string>;
|
|
3360
|
+
protected readonly computedClass: _angular_core.Signal<string>;
|
|
3361
|
+
protected readonly headerClass: _angular_core.Signal<string>;
|
|
3362
|
+
protected readonly chevronClass: _angular_core.Signal<string>;
|
|
3363
|
+
protected toggle(): void;
|
|
3364
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CopilotChatReasoningMessage, never>;
|
|
3365
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CopilotChatReasoningMessage, "copilot-chat-reasoning-message", never, { "message": { "alias": "message"; "required": true; "isSignal": true; }; "messages": { "alias": "messages"; "required": false; "isSignal": true; }; "isRunning": { "alias": "isRunning"; "required": false; "isSignal": true; }; "inputClass": { "alias": "inputClass"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
3366
|
+
}
|
|
3367
|
+
|
|
2638
3368
|
/**
|
|
2639
3369
|
* CopilotChatMessageView component - Angular port of the React component.
|
|
2640
3370
|
* Renders a list of chat messages with support for custom slots and layouts.
|
|
@@ -2750,6 +3480,8 @@ declare class CopilotChatMessageView {
|
|
|
2750
3480
|
id: string;
|
|
2751
3481
|
encryptedValue?: string | undefined;
|
|
2752
3482
|
})[]>;
|
|
3483
|
+
/** Current agent state exposed to transcript-children slots. */
|
|
3484
|
+
state: _angular_core.InputSignal<unknown>;
|
|
2753
3485
|
showCursor: _angular_core.InputSignal<boolean>;
|
|
2754
3486
|
isLoading: _angular_core.InputSignal<boolean>;
|
|
2755
3487
|
inputClass: _angular_core.InputSignal<string>;
|
|
@@ -2757,6 +3489,12 @@ declare class CopilotChatMessageView {
|
|
|
2757
3489
|
assistantMessageComponent: _angular_core.InputSignal<Type<any>>;
|
|
2758
3490
|
assistantMessageTemplate: _angular_core.InputSignal<TemplateRef<any>>;
|
|
2759
3491
|
assistantMessageClass: _angular_core.InputSignal<string>;
|
|
3492
|
+
reasoningMessageComponent: _angular_core.InputSignal<Type<any>>;
|
|
3493
|
+
reasoningMessageTemplate: _angular_core.InputSignal<TemplateRef<any>>;
|
|
3494
|
+
reasoningMessageClass: _angular_core.InputSignal<string>;
|
|
3495
|
+
childrenComponent: _angular_core.InputSignal<Type<any>>;
|
|
3496
|
+
childrenTemplate: _angular_core.InputSignal<TemplateRef<any>>;
|
|
3497
|
+
childrenClass: _angular_core.InputSignal<string>;
|
|
2760
3498
|
userMessageComponent: _angular_core.InputSignal<Type<any>>;
|
|
2761
3499
|
userMessageTemplate: _angular_core.InputSignal<TemplateRef<any>>;
|
|
2762
3500
|
userMessageClass: _angular_core.InputSignal<string>;
|
|
@@ -2765,25 +3503,26 @@ declare class CopilotChatMessageView {
|
|
|
2765
3503
|
cursorClass: _angular_core.InputSignal<string>;
|
|
2766
3504
|
customLayoutTemplate?: TemplateRef<any>;
|
|
2767
3505
|
assistantMessageThumbsUp: _angular_core.OutputEmitterRef<{
|
|
2768
|
-
message: Message;
|
|
3506
|
+
message: Message$1;
|
|
2769
3507
|
}>;
|
|
2770
3508
|
assistantMessageThumbsDown: _angular_core.OutputEmitterRef<{
|
|
2771
|
-
message: Message;
|
|
3509
|
+
message: Message$1;
|
|
2772
3510
|
}>;
|
|
2773
3511
|
assistantMessageReadAloud: _angular_core.OutputEmitterRef<{
|
|
2774
|
-
message: Message;
|
|
3512
|
+
message: Message$1;
|
|
2775
3513
|
}>;
|
|
2776
3514
|
assistantMessageRegenerate: _angular_core.OutputEmitterRef<{
|
|
2777
|
-
message: Message;
|
|
3515
|
+
message: Message$1;
|
|
2778
3516
|
}>;
|
|
2779
3517
|
userMessageCopy: _angular_core.OutputEmitterRef<{
|
|
2780
|
-
message: Message;
|
|
3518
|
+
message: Message$1;
|
|
2781
3519
|
}>;
|
|
2782
3520
|
userMessageEdit: _angular_core.OutputEmitterRef<{
|
|
2783
|
-
message: Message;
|
|
3521
|
+
message: Message$1;
|
|
2784
3522
|
}>;
|
|
2785
3523
|
protected readonly defaultAssistantComponent: typeof CopilotChatAssistantMessage;
|
|
2786
3524
|
protected readonly defaultUserComponent: typeof CopilotChatUserMessage;
|
|
3525
|
+
protected readonly defaultReasoningComponent: typeof CopilotChatReasoningMessage;
|
|
2787
3526
|
protected readonly defaultCursorComponent: typeof CopilotChatMessageViewCursor;
|
|
2788
3527
|
protected readonly copilotKit: CopilotKit;
|
|
2789
3528
|
protected messagesValue: _angular_core.Signal<({
|
|
@@ -3118,8 +3857,122 @@ declare class CopilotChatMessageView {
|
|
|
3118
3857
|
id: string;
|
|
3119
3858
|
encryptedValue?: string | undefined;
|
|
3120
3859
|
})[];
|
|
3121
|
-
showCursor: boolean;
|
|
3122
|
-
messageElements: ({
|
|
3860
|
+
showCursor: boolean;
|
|
3861
|
+
messageElements: ({
|
|
3862
|
+
role: "developer";
|
|
3863
|
+
content: string;
|
|
3864
|
+
id: string;
|
|
3865
|
+
name?: string | undefined;
|
|
3866
|
+
encryptedValue?: string | undefined;
|
|
3867
|
+
} | {
|
|
3868
|
+
role: "system";
|
|
3869
|
+
content: string;
|
|
3870
|
+
id: string;
|
|
3871
|
+
name?: string | undefined;
|
|
3872
|
+
encryptedValue?: string | undefined;
|
|
3873
|
+
} | {
|
|
3874
|
+
role: "assistant";
|
|
3875
|
+
id: string;
|
|
3876
|
+
name?: string | undefined;
|
|
3877
|
+
content?: string | undefined;
|
|
3878
|
+
encryptedValue?: string | undefined;
|
|
3879
|
+
toolCalls?: {
|
|
3880
|
+
function: {
|
|
3881
|
+
name: string;
|
|
3882
|
+
arguments: string;
|
|
3883
|
+
};
|
|
3884
|
+
type: "function";
|
|
3885
|
+
id: string;
|
|
3886
|
+
encryptedValue?: string | undefined;
|
|
3887
|
+
}[] | undefined;
|
|
3888
|
+
} | {
|
|
3889
|
+
role: "user";
|
|
3890
|
+
content: string | ({
|
|
3891
|
+
type: "text";
|
|
3892
|
+
text: string;
|
|
3893
|
+
} | {
|
|
3894
|
+
type: "image";
|
|
3895
|
+
source: {
|
|
3896
|
+
type: "data";
|
|
3897
|
+
value: string;
|
|
3898
|
+
mimeType: string;
|
|
3899
|
+
} | {
|
|
3900
|
+
type: "url";
|
|
3901
|
+
value: string;
|
|
3902
|
+
mimeType?: string | undefined;
|
|
3903
|
+
};
|
|
3904
|
+
metadata?: unknown;
|
|
3905
|
+
} | {
|
|
3906
|
+
type: "audio";
|
|
3907
|
+
source: {
|
|
3908
|
+
type: "data";
|
|
3909
|
+
value: string;
|
|
3910
|
+
mimeType: string;
|
|
3911
|
+
} | {
|
|
3912
|
+
type: "url";
|
|
3913
|
+
value: string;
|
|
3914
|
+
mimeType?: string | undefined;
|
|
3915
|
+
};
|
|
3916
|
+
metadata?: unknown;
|
|
3917
|
+
} | {
|
|
3918
|
+
type: "video";
|
|
3919
|
+
source: {
|
|
3920
|
+
type: "data";
|
|
3921
|
+
value: string;
|
|
3922
|
+
mimeType: string;
|
|
3923
|
+
} | {
|
|
3924
|
+
type: "url";
|
|
3925
|
+
value: string;
|
|
3926
|
+
mimeType?: string | undefined;
|
|
3927
|
+
};
|
|
3928
|
+
metadata?: unknown;
|
|
3929
|
+
} | {
|
|
3930
|
+
type: "document";
|
|
3931
|
+
source: {
|
|
3932
|
+
type: "data";
|
|
3933
|
+
value: string;
|
|
3934
|
+
mimeType: string;
|
|
3935
|
+
} | {
|
|
3936
|
+
type: "url";
|
|
3937
|
+
value: string;
|
|
3938
|
+
mimeType?: string | undefined;
|
|
3939
|
+
};
|
|
3940
|
+
metadata?: unknown;
|
|
3941
|
+
} | {
|
|
3942
|
+
type: "binary";
|
|
3943
|
+
mimeType: string;
|
|
3944
|
+
id?: string | undefined;
|
|
3945
|
+
data?: string | undefined;
|
|
3946
|
+
url?: string | undefined;
|
|
3947
|
+
filename?: string | undefined;
|
|
3948
|
+
})[];
|
|
3949
|
+
id: string;
|
|
3950
|
+
name?: string | undefined;
|
|
3951
|
+
encryptedValue?: string | undefined;
|
|
3952
|
+
} | {
|
|
3953
|
+
role: "tool";
|
|
3954
|
+
toolCallId: string;
|
|
3955
|
+
content: string;
|
|
3956
|
+
id: string;
|
|
3957
|
+
encryptedValue?: string | undefined;
|
|
3958
|
+
error?: string | undefined;
|
|
3959
|
+
} | {
|
|
3960
|
+
role: "activity";
|
|
3961
|
+
content: Record<string, any>;
|
|
3962
|
+
id: string;
|
|
3963
|
+
activityType: string;
|
|
3964
|
+
} | {
|
|
3965
|
+
role: "reasoning";
|
|
3966
|
+
content: string;
|
|
3967
|
+
id: string;
|
|
3968
|
+
encryptedValue?: string | undefined;
|
|
3969
|
+
})[];
|
|
3970
|
+
}>;
|
|
3971
|
+
assistantMessageSlot: _angular_core.Signal<string | Type<any>>;
|
|
3972
|
+
userMessageSlot: _angular_core.Signal<string | Type<any>>;
|
|
3973
|
+
cursorSlot: _angular_core.Signal<string | Type<any>>;
|
|
3974
|
+
mergeAssistantProps(message: Message$1): {
|
|
3975
|
+
message: {
|
|
3123
3976
|
role: "developer";
|
|
3124
3977
|
content: string;
|
|
3125
3978
|
id: string;
|
|
@@ -3227,13 +4080,8 @@ declare class CopilotChatMessageView {
|
|
|
3227
4080
|
content: string;
|
|
3228
4081
|
id: string;
|
|
3229
4082
|
encryptedValue?: string | undefined;
|
|
3230
|
-
}
|
|
3231
|
-
|
|
3232
|
-
assistantMessageSlot: _angular_core.Signal<string | Type<any>>;
|
|
3233
|
-
userMessageSlot: _angular_core.Signal<string | Type<any>>;
|
|
3234
|
-
cursorSlot: _angular_core.Signal<string | Type<any>>;
|
|
3235
|
-
mergeAssistantProps(message: Message): {
|
|
3236
|
-
message: {
|
|
4083
|
+
};
|
|
4084
|
+
messages: ({
|
|
3237
4085
|
role: "developer";
|
|
3238
4086
|
content: string;
|
|
3239
4087
|
id: string;
|
|
@@ -3341,6 +4189,16 @@ declare class CopilotChatMessageView {
|
|
|
3341
4189
|
content: string;
|
|
3342
4190
|
id: string;
|
|
3343
4191
|
encryptedValue?: string | undefined;
|
|
4192
|
+
})[];
|
|
4193
|
+
isLoading: boolean;
|
|
4194
|
+
inputClass: string;
|
|
4195
|
+
};
|
|
4196
|
+
mergeReasoningProps(message: ReasoningMessage): {
|
|
4197
|
+
message: {
|
|
4198
|
+
role: "reasoning";
|
|
4199
|
+
content: string;
|
|
4200
|
+
id: string;
|
|
4201
|
+
encryptedValue?: string | undefined;
|
|
3344
4202
|
};
|
|
3345
4203
|
messages: ({
|
|
3346
4204
|
role: "developer";
|
|
@@ -3451,11 +4309,11 @@ declare class CopilotChatMessageView {
|
|
|
3451
4309
|
id: string;
|
|
3452
4310
|
encryptedValue?: string | undefined;
|
|
3453
4311
|
})[];
|
|
3454
|
-
|
|
4312
|
+
isRunning: boolean;
|
|
3455
4313
|
inputClass: string;
|
|
3456
4314
|
};
|
|
3457
|
-
|
|
3458
|
-
|
|
4315
|
+
childrenContext(): {
|
|
4316
|
+
messages: ({
|
|
3459
4317
|
role: "developer";
|
|
3460
4318
|
content: string;
|
|
3461
4319
|
id: string;
|
|
@@ -3563,197 +4421,182 @@ declare class CopilotChatMessageView {
|
|
|
3563
4421
|
content: string;
|
|
3564
4422
|
id: string;
|
|
3565
4423
|
encryptedValue?: string | undefined;
|
|
3566
|
-
};
|
|
4424
|
+
})[];
|
|
4425
|
+
state: unknown;
|
|
4426
|
+
agentId: string;
|
|
4427
|
+
isRunning: boolean;
|
|
3567
4428
|
inputClass: string;
|
|
3568
4429
|
};
|
|
3569
|
-
|
|
3570
|
-
|
|
3571
|
-
|
|
3572
|
-
|
|
3573
|
-
component: Type<_copilotkit_angular.ActivityRenderer<unknown>>;
|
|
3574
|
-
inputs: {
|
|
3575
|
-
activityType: string;
|
|
3576
|
-
content: unknown;
|
|
3577
|
-
message: {
|
|
3578
|
-
role: "activity";
|
|
3579
|
-
content: Record<string, any>;
|
|
3580
|
-
id: string;
|
|
3581
|
-
activityType: string;
|
|
3582
|
-
};
|
|
3583
|
-
agent: _ag_ui_client.AbstractAgent;
|
|
3584
|
-
};
|
|
3585
|
-
};
|
|
3586
|
-
constructor();
|
|
3587
|
-
handleAssistantThumbsUp(event: {
|
|
3588
|
-
message: Message;
|
|
3589
|
-
}): void;
|
|
3590
|
-
handleAssistantThumbsDown(event: {
|
|
3591
|
-
message: Message;
|
|
3592
|
-
}): void;
|
|
3593
|
-
handleAssistantReadAloud(event: {
|
|
3594
|
-
message: Message;
|
|
3595
|
-
}): void;
|
|
3596
|
-
handleAssistantRegenerate(event: {
|
|
3597
|
-
message: Message;
|
|
3598
|
-
}): void;
|
|
3599
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CopilotChatMessageView, never>;
|
|
3600
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CopilotChatMessageView, "copilot-chat-message-view", never, { "messages": { "alias": "messages"; "required": false; "isSignal": true; }; "showCursor": { "alias": "showCursor"; "required": false; "isSignal": true; }; "isLoading": { "alias": "isLoading"; "required": false; "isSignal": true; }; "inputClass": { "alias": "inputClass"; "required": false; "isSignal": true; }; "agentId": { "alias": "agentId"; "required": false; "isSignal": true; }; "assistantMessageComponent": { "alias": "assistantMessageComponent"; "required": false; "isSignal": true; }; "assistantMessageTemplate": { "alias": "assistantMessageTemplate"; "required": false; "isSignal": true; }; "assistantMessageClass": { "alias": "assistantMessageClass"; "required": false; "isSignal": true; }; "userMessageComponent": { "alias": "userMessageComponent"; "required": false; "isSignal": true; }; "userMessageTemplate": { "alias": "userMessageTemplate"; "required": false; "isSignal": true; }; "userMessageClass": { "alias": "userMessageClass"; "required": false; "isSignal": true; }; "cursorComponent": { "alias": "cursorComponent"; "required": false; "isSignal": true; }; "cursorTemplate": { "alias": "cursorTemplate"; "required": false; "isSignal": true; }; "cursorClass": { "alias": "cursorClass"; "required": false; "isSignal": true; }; }, { "assistantMessageThumbsUp": "assistantMessageThumbsUp"; "assistantMessageThumbsDown": "assistantMessageThumbsDown"; "assistantMessageReadAloud": "assistantMessageReadAloud"; "assistantMessageRegenerate": "assistantMessageRegenerate"; "userMessageCopy": "userMessageCopy"; "userMessageEdit": "userMessageEdit"; }, ["customLayoutTemplate"], never, true, never>;
|
|
3601
|
-
}
|
|
3602
|
-
|
|
3603
|
-
interface MessageViewContext {
|
|
3604
|
-
showCursor: boolean;
|
|
3605
|
-
messages: Message$1[];
|
|
3606
|
-
messageElements: any[];
|
|
3607
|
-
}
|
|
3608
|
-
interface CursorContext {
|
|
3609
|
-
}
|
|
3610
|
-
interface CopilotChatMessageViewProps {
|
|
3611
|
-
messages?: Message$1[];
|
|
3612
|
-
showCursor?: boolean;
|
|
3613
|
-
inputClass?: string;
|
|
3614
|
-
assistantMessageComponent?: Type<any>;
|
|
3615
|
-
assistantMessageTemplate?: TemplateRef<any>;
|
|
3616
|
-
assistantMessageClass?: string;
|
|
3617
|
-
userMessageComponent?: Type<any>;
|
|
3618
|
-
userMessageTemplate?: TemplateRef<any>;
|
|
3619
|
-
userMessageClass?: string;
|
|
3620
|
-
cursorComponent?: Type<any>;
|
|
3621
|
-
cursorTemplate?: TemplateRef<any>;
|
|
3622
|
-
cursorClass?: string;
|
|
3623
|
-
}
|
|
3624
|
-
|
|
3625
|
-
declare class CopilotChatReasoningMessage {
|
|
3626
|
-
readonly message: _angular_core.InputSignal<{
|
|
3627
|
-
role: "reasoning";
|
|
3628
|
-
content: string;
|
|
3629
|
-
id: string;
|
|
3630
|
-
encryptedValue?: string | undefined;
|
|
3631
|
-
}>;
|
|
3632
|
-
readonly messages: _angular_core.InputSignal<({
|
|
3633
|
-
role: "developer";
|
|
3634
|
-
content: string;
|
|
3635
|
-
id: string;
|
|
3636
|
-
name?: string | undefined;
|
|
3637
|
-
encryptedValue?: string | undefined;
|
|
3638
|
-
} | {
|
|
3639
|
-
role: "system";
|
|
3640
|
-
content: string;
|
|
3641
|
-
id: string;
|
|
3642
|
-
name?: string | undefined;
|
|
3643
|
-
encryptedValue?: string | undefined;
|
|
3644
|
-
} | {
|
|
3645
|
-
role: "assistant";
|
|
3646
|
-
id: string;
|
|
3647
|
-
name?: string | undefined;
|
|
3648
|
-
content?: string | undefined;
|
|
3649
|
-
encryptedValue?: string | undefined;
|
|
3650
|
-
toolCalls?: {
|
|
3651
|
-
function: {
|
|
3652
|
-
name: string;
|
|
3653
|
-
arguments: string;
|
|
3654
|
-
};
|
|
3655
|
-
type: "function";
|
|
4430
|
+
mergeUserProps(message: Message$1): {
|
|
4431
|
+
message: {
|
|
4432
|
+
role: "developer";
|
|
4433
|
+
content: string;
|
|
3656
4434
|
id: string;
|
|
4435
|
+
name?: string | undefined;
|
|
3657
4436
|
encryptedValue?: string | undefined;
|
|
3658
|
-
}[] | undefined;
|
|
3659
|
-
} | {
|
|
3660
|
-
role: "user";
|
|
3661
|
-
content: string | ({
|
|
3662
|
-
type: "text";
|
|
3663
|
-
text: string;
|
|
3664
4437
|
} | {
|
|
3665
|
-
|
|
3666
|
-
|
|
3667
|
-
|
|
3668
|
-
|
|
3669
|
-
|
|
3670
|
-
} | {
|
|
3671
|
-
type: "url";
|
|
3672
|
-
value: string;
|
|
3673
|
-
mimeType?: string | undefined;
|
|
3674
|
-
};
|
|
3675
|
-
metadata?: unknown;
|
|
4438
|
+
role: "system";
|
|
4439
|
+
content: string;
|
|
4440
|
+
id: string;
|
|
4441
|
+
name?: string | undefined;
|
|
4442
|
+
encryptedValue?: string | undefined;
|
|
3676
4443
|
} | {
|
|
3677
|
-
|
|
3678
|
-
|
|
3679
|
-
|
|
3680
|
-
|
|
3681
|
-
|
|
3682
|
-
|
|
3683
|
-
|
|
3684
|
-
|
|
3685
|
-
|
|
3686
|
-
|
|
3687
|
-
|
|
4444
|
+
role: "assistant";
|
|
4445
|
+
id: string;
|
|
4446
|
+
name?: string | undefined;
|
|
4447
|
+
content?: string | undefined;
|
|
4448
|
+
encryptedValue?: string | undefined;
|
|
4449
|
+
toolCalls?: {
|
|
4450
|
+
function: {
|
|
4451
|
+
name: string;
|
|
4452
|
+
arguments: string;
|
|
4453
|
+
};
|
|
4454
|
+
type: "function";
|
|
4455
|
+
id: string;
|
|
4456
|
+
encryptedValue?: string | undefined;
|
|
4457
|
+
}[] | undefined;
|
|
3688
4458
|
} | {
|
|
3689
|
-
|
|
3690
|
-
|
|
3691
|
-
type: "
|
|
3692
|
-
|
|
3693
|
-
mimeType: string;
|
|
4459
|
+
role: "user";
|
|
4460
|
+
content: string | ({
|
|
4461
|
+
type: "text";
|
|
4462
|
+
text: string;
|
|
3694
4463
|
} | {
|
|
3695
|
-
type: "
|
|
3696
|
-
|
|
3697
|
-
|
|
3698
|
-
|
|
3699
|
-
|
|
4464
|
+
type: "image";
|
|
4465
|
+
source: {
|
|
4466
|
+
type: "data";
|
|
4467
|
+
value: string;
|
|
4468
|
+
mimeType: string;
|
|
4469
|
+
} | {
|
|
4470
|
+
type: "url";
|
|
4471
|
+
value: string;
|
|
4472
|
+
mimeType?: string | undefined;
|
|
4473
|
+
};
|
|
4474
|
+
metadata?: unknown;
|
|
4475
|
+
} | {
|
|
4476
|
+
type: "audio";
|
|
4477
|
+
source: {
|
|
4478
|
+
type: "data";
|
|
4479
|
+
value: string;
|
|
4480
|
+
mimeType: string;
|
|
4481
|
+
} | {
|
|
4482
|
+
type: "url";
|
|
4483
|
+
value: string;
|
|
4484
|
+
mimeType?: string | undefined;
|
|
4485
|
+
};
|
|
4486
|
+
metadata?: unknown;
|
|
4487
|
+
} | {
|
|
4488
|
+
type: "video";
|
|
4489
|
+
source: {
|
|
4490
|
+
type: "data";
|
|
4491
|
+
value: string;
|
|
4492
|
+
mimeType: string;
|
|
4493
|
+
} | {
|
|
4494
|
+
type: "url";
|
|
4495
|
+
value: string;
|
|
4496
|
+
mimeType?: string | undefined;
|
|
4497
|
+
};
|
|
4498
|
+
metadata?: unknown;
|
|
4499
|
+
} | {
|
|
4500
|
+
type: "document";
|
|
4501
|
+
source: {
|
|
4502
|
+
type: "data";
|
|
4503
|
+
value: string;
|
|
4504
|
+
mimeType: string;
|
|
4505
|
+
} | {
|
|
4506
|
+
type: "url";
|
|
4507
|
+
value: string;
|
|
4508
|
+
mimeType?: string | undefined;
|
|
4509
|
+
};
|
|
4510
|
+
metadata?: unknown;
|
|
4511
|
+
} | {
|
|
4512
|
+
type: "binary";
|
|
4513
|
+
mimeType: string;
|
|
4514
|
+
id?: string | undefined;
|
|
4515
|
+
data?: string | undefined;
|
|
4516
|
+
url?: string | undefined;
|
|
4517
|
+
filename?: string | undefined;
|
|
4518
|
+
})[];
|
|
4519
|
+
id: string;
|
|
4520
|
+
name?: string | undefined;
|
|
4521
|
+
encryptedValue?: string | undefined;
|
|
4522
|
+
} | {
|
|
4523
|
+
role: "tool";
|
|
4524
|
+
toolCallId: string;
|
|
4525
|
+
content: string;
|
|
4526
|
+
id: string;
|
|
4527
|
+
encryptedValue?: string | undefined;
|
|
4528
|
+
error?: string | undefined;
|
|
4529
|
+
} | {
|
|
4530
|
+
role: "activity";
|
|
4531
|
+
content: Record<string, any>;
|
|
4532
|
+
id: string;
|
|
4533
|
+
activityType: string;
|
|
3700
4534
|
} | {
|
|
3701
|
-
|
|
3702
|
-
|
|
3703
|
-
|
|
3704
|
-
|
|
3705
|
-
|
|
3706
|
-
|
|
3707
|
-
|
|
3708
|
-
|
|
3709
|
-
|
|
4535
|
+
role: "reasoning";
|
|
4536
|
+
content: string;
|
|
4537
|
+
id: string;
|
|
4538
|
+
encryptedValue?: string | undefined;
|
|
4539
|
+
};
|
|
4540
|
+
inputClass: string;
|
|
4541
|
+
};
|
|
4542
|
+
asReasoningMessage(message: Message$1): ReasoningMessage;
|
|
4543
|
+
trackByMessageId(index: number, message: Message$1): string;
|
|
4544
|
+
private pickActivityRenderer;
|
|
4545
|
+
protected resolveActivityRender(message: ActivityMessage$1): {
|
|
4546
|
+
component: Type<_copilotkit_angular.ActivityRenderer<unknown>>;
|
|
4547
|
+
inputs: {
|
|
4548
|
+
activityType: string;
|
|
4549
|
+
content: unknown;
|
|
4550
|
+
message: {
|
|
4551
|
+
role: "activity";
|
|
4552
|
+
content: Record<string, any>;
|
|
4553
|
+
id: string;
|
|
4554
|
+
activityType: string;
|
|
3710
4555
|
};
|
|
3711
|
-
|
|
3712
|
-
}
|
|
3713
|
-
|
|
3714
|
-
|
|
3715
|
-
|
|
3716
|
-
|
|
3717
|
-
|
|
3718
|
-
|
|
3719
|
-
|
|
3720
|
-
|
|
3721
|
-
|
|
3722
|
-
|
|
3723
|
-
|
|
3724
|
-
|
|
3725
|
-
|
|
3726
|
-
|
|
3727
|
-
|
|
3728
|
-
|
|
3729
|
-
|
|
3730
|
-
|
|
3731
|
-
|
|
3732
|
-
|
|
3733
|
-
|
|
3734
|
-
|
|
3735
|
-
|
|
3736
|
-
|
|
3737
|
-
|
|
3738
|
-
|
|
3739
|
-
|
|
3740
|
-
|
|
3741
|
-
|
|
3742
|
-
|
|
3743
|
-
|
|
3744
|
-
|
|
3745
|
-
|
|
3746
|
-
|
|
3747
|
-
|
|
3748
|
-
|
|
3749
|
-
|
|
3750
|
-
|
|
3751
|
-
|
|
3752
|
-
|
|
3753
|
-
|
|
3754
|
-
|
|
3755
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CopilotChatReasoningMessage, never>;
|
|
3756
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CopilotChatReasoningMessage, "copilot-chat-reasoning-message", never, { "message": { "alias": "message"; "required": true; "isSignal": true; }; "messages": { "alias": "messages"; "required": false; "isSignal": true; }; "isRunning": { "alias": "isRunning"; "required": false; "isSignal": true; }; "inputClass": { "alias": "inputClass"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
4556
|
+
agent: _ag_ui_client.AbstractAgent;
|
|
4557
|
+
};
|
|
4558
|
+
};
|
|
4559
|
+
handleAssistantThumbsUp(event: {
|
|
4560
|
+
message: Message$1;
|
|
4561
|
+
}): void;
|
|
4562
|
+
handleAssistantThumbsDown(event: {
|
|
4563
|
+
message: Message$1;
|
|
4564
|
+
}): void;
|
|
4565
|
+
handleAssistantReadAloud(event: {
|
|
4566
|
+
message: Message$1;
|
|
4567
|
+
}): void;
|
|
4568
|
+
handleAssistantRegenerate(event: {
|
|
4569
|
+
message: Message$1;
|
|
4570
|
+
}): void;
|
|
4571
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CopilotChatMessageView, never>;
|
|
4572
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CopilotChatMessageView, "copilot-chat-message-view", never, { "messages": { "alias": "messages"; "required": false; "isSignal": true; }; "state": { "alias": "state"; "required": false; "isSignal": true; }; "showCursor": { "alias": "showCursor"; "required": false; "isSignal": true; }; "isLoading": { "alias": "isLoading"; "required": false; "isSignal": true; }; "inputClass": { "alias": "inputClass"; "required": false; "isSignal": true; }; "agentId": { "alias": "agentId"; "required": false; "isSignal": true; }; "assistantMessageComponent": { "alias": "assistantMessageComponent"; "required": false; "isSignal": true; }; "assistantMessageTemplate": { "alias": "assistantMessageTemplate"; "required": false; "isSignal": true; }; "assistantMessageClass": { "alias": "assistantMessageClass"; "required": false; "isSignal": true; }; "reasoningMessageComponent": { "alias": "reasoningMessageComponent"; "required": false; "isSignal": true; }; "reasoningMessageTemplate": { "alias": "reasoningMessageTemplate"; "required": false; "isSignal": true; }; "reasoningMessageClass": { "alias": "reasoningMessageClass"; "required": false; "isSignal": true; }; "childrenComponent": { "alias": "childrenComponent"; "required": false; "isSignal": true; }; "childrenTemplate": { "alias": "childrenTemplate"; "required": false; "isSignal": true; }; "childrenClass": { "alias": "childrenClass"; "required": false; "isSignal": true; }; "userMessageComponent": { "alias": "userMessageComponent"; "required": false; "isSignal": true; }; "userMessageTemplate": { "alias": "userMessageTemplate"; "required": false; "isSignal": true; }; "userMessageClass": { "alias": "userMessageClass"; "required": false; "isSignal": true; }; "cursorComponent": { "alias": "cursorComponent"; "required": false; "isSignal": true; }; "cursorTemplate": { "alias": "cursorTemplate"; "required": false; "isSignal": true; }; "cursorClass": { "alias": "cursorClass"; "required": false; "isSignal": true; }; }, { "assistantMessageThumbsUp": "assistantMessageThumbsUp"; "assistantMessageThumbsDown": "assistantMessageThumbsDown"; "assistantMessageReadAloud": "assistantMessageReadAloud"; "assistantMessageRegenerate": "assistantMessageRegenerate"; "userMessageCopy": "userMessageCopy"; "userMessageEdit": "userMessageEdit"; }, ["customLayoutTemplate"], never, true, never>;
|
|
4573
|
+
}
|
|
4574
|
+
|
|
4575
|
+
interface MessageViewContext {
|
|
4576
|
+
showCursor: boolean;
|
|
4577
|
+
messages: Message[];
|
|
4578
|
+
state: unknown;
|
|
4579
|
+
messageElements: any[];
|
|
4580
|
+
}
|
|
4581
|
+
interface CursorContext {
|
|
4582
|
+
}
|
|
4583
|
+
interface CopilotChatMessageViewProps {
|
|
4584
|
+
messages?: Message[];
|
|
4585
|
+
state?: unknown;
|
|
4586
|
+
showCursor?: boolean;
|
|
4587
|
+
inputClass?: string;
|
|
4588
|
+
assistantMessageComponent?: Type<any>;
|
|
4589
|
+
assistantMessageTemplate?: TemplateRef<any>;
|
|
4590
|
+
assistantMessageClass?: string;
|
|
4591
|
+
childrenComponent?: Type<any>;
|
|
4592
|
+
childrenTemplate?: TemplateRef<any>;
|
|
4593
|
+
childrenClass?: string;
|
|
4594
|
+
userMessageComponent?: Type<any>;
|
|
4595
|
+
userMessageTemplate?: TemplateRef<any>;
|
|
4596
|
+
userMessageClass?: string;
|
|
4597
|
+
cursorComponent?: Type<any>;
|
|
4598
|
+
cursorTemplate?: TemplateRef<any>;
|
|
4599
|
+
cursorClass?: string;
|
|
3757
4600
|
}
|
|
3758
4601
|
|
|
3759
4602
|
declare class CopilotChatSuggestionPill {
|
|
@@ -3790,7 +4633,7 @@ declare class CopilotChatViewScrollToBottomButton {
|
|
|
3790
4633
|
disabled: _angular_core.InputSignal<boolean>;
|
|
3791
4634
|
onClick: _angular_core.InputSignal<() => void>;
|
|
3792
4635
|
clicked: _angular_core.OutputEmitterRef<void>;
|
|
3793
|
-
protected readonly ChevronDown:
|
|
4636
|
+
protected readonly ChevronDown: CopilotIconData;
|
|
3794
4637
|
get computedClass(): string;
|
|
3795
4638
|
handleClick(): void;
|
|
3796
4639
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CopilotChatViewScrollToBottomButton, never>;
|
|
@@ -3801,7 +4644,7 @@ declare class CopilotChatViewScrollToBottomButton {
|
|
|
3801
4644
|
* ScrollView component for CopilotChatView
|
|
3802
4645
|
* Handles auto-scrolling and scroll position management
|
|
3803
4646
|
*/
|
|
3804
|
-
declare class CopilotChatViewScrollView implements
|
|
4647
|
+
declare class CopilotChatViewScrollView implements AfterViewInit, OnDestroy {
|
|
3805
4648
|
private cdr;
|
|
3806
4649
|
protected readonly chatState: ChatState;
|
|
3807
4650
|
autoScroll: _angular_core.InputSignal<boolean>;
|
|
@@ -3917,29 +4760,40 @@ declare class CopilotChatViewScrollView implements OnInit, AfterViewInit, OnDest
|
|
|
3917
4760
|
id: string;
|
|
3918
4761
|
encryptedValue?: string | undefined;
|
|
3919
4762
|
})[]>;
|
|
4763
|
+
/** Current agent state forwarded to message-view extension slots. */
|
|
4764
|
+
state: _angular_core.InputSignal<unknown>;
|
|
3920
4765
|
agentId: _angular_core.InputSignal<string>;
|
|
3921
4766
|
messageView: _angular_core.InputSignal<any>;
|
|
3922
4767
|
messageViewClass: _angular_core.InputSignal<string>;
|
|
4768
|
+
assistantMessageComponent: _angular_core.InputSignal<Type<any>>;
|
|
4769
|
+
assistantMessageTemplate: _angular_core.InputSignal<TemplateRef<any>>;
|
|
4770
|
+
assistantMessageClass: _angular_core.InputSignal<string>;
|
|
4771
|
+
reasoningMessageComponent: _angular_core.InputSignal<Type<any>>;
|
|
4772
|
+
reasoningMessageTemplate: _angular_core.InputSignal<TemplateRef<any>>;
|
|
4773
|
+
reasoningMessageClass: _angular_core.InputSignal<string>;
|
|
4774
|
+
messageViewChildrenComponent: _angular_core.InputSignal<Type<any>>;
|
|
4775
|
+
messageViewChildrenTemplate: _angular_core.InputSignal<TemplateRef<any>>;
|
|
4776
|
+
messageViewChildrenClass: _angular_core.InputSignal<string>;
|
|
3923
4777
|
showCursor: _angular_core.InputSignal<boolean>;
|
|
3924
4778
|
scrollToBottomButton: _angular_core.InputSignal<any>;
|
|
3925
4779
|
scrollToBottomButtonClass: _angular_core.InputSignal<string>;
|
|
3926
4780
|
assistantMessageThumbsUp: _angular_core.OutputEmitterRef<{
|
|
3927
|
-
message: Message
|
|
4781
|
+
message: Message;
|
|
3928
4782
|
}>;
|
|
3929
4783
|
assistantMessageThumbsDown: _angular_core.OutputEmitterRef<{
|
|
3930
|
-
message: Message
|
|
4784
|
+
message: Message;
|
|
3931
4785
|
}>;
|
|
3932
4786
|
assistantMessageReadAloud: _angular_core.OutputEmitterRef<{
|
|
3933
|
-
message: Message
|
|
4787
|
+
message: Message;
|
|
3934
4788
|
}>;
|
|
3935
4789
|
assistantMessageRegenerate: _angular_core.OutputEmitterRef<{
|
|
3936
|
-
message: Message
|
|
4790
|
+
message: Message;
|
|
3937
4791
|
}>;
|
|
3938
4792
|
userMessageCopy: _angular_core.OutputEmitterRef<{
|
|
3939
|
-
message: Message
|
|
4793
|
+
message: Message;
|
|
3940
4794
|
}>;
|
|
3941
4795
|
userMessageEdit: _angular_core.OutputEmitterRef<{
|
|
3942
|
-
message: Message
|
|
4796
|
+
message: Message;
|
|
3943
4797
|
}>;
|
|
3944
4798
|
scrollContainer?: ElementRef<HTMLElement>;
|
|
3945
4799
|
contentContainer?: ElementRef<HTMLElement>;
|
|
@@ -3953,9 +4807,8 @@ declare class CopilotChatViewScrollView implements OnInit, AfterViewInit, OnDest
|
|
|
3953
4807
|
protected paddingBottom: _angular_core.Signal<number>;
|
|
3954
4808
|
protected computedClass: _angular_core.Signal<string>;
|
|
3955
4809
|
private destroy$;
|
|
3956
|
-
private platformId;
|
|
3957
4810
|
private scrollPositionService;
|
|
3958
|
-
|
|
4811
|
+
constructor();
|
|
3959
4812
|
ngAfterViewInit(): void;
|
|
3960
4813
|
/**
|
|
3961
4814
|
* Handle isAtBottom change from StickToBottom directive
|
|
@@ -3980,7 +4833,7 @@ declare class CopilotChatViewScrollView implements OnInit, AfterViewInit, OnDest
|
|
|
3980
4833
|
scrollToBottomContext(): any;
|
|
3981
4834
|
scrollToBottomFromStickContext(): any;
|
|
3982
4835
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CopilotChatViewScrollView, never>;
|
|
3983
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CopilotChatViewScrollView, "copilot-chat-view-scroll-view", never, { "autoScroll": { "alias": "autoScroll"; "required": false; "isSignal": true; }; "inputContainerHeight": { "alias": "inputContainerHeight"; "required": false; "isSignal": true; }; "isResizing": { "alias": "isResizing"; "required": false; "isSignal": true; }; "inputClass": { "alias": "inputClass"; "required": false; "isSignal": true; }; "messages": { "alias": "messages"; "required": false; "isSignal": true; }; "agentId": { "alias": "agentId"; "required": false; "isSignal": true; }; "messageView": { "alias": "messageView"; "required": false; "isSignal": true; }; "messageViewClass": { "alias": "messageViewClass"; "required": false; "isSignal": true; }; "showCursor": { "alias": "showCursor"; "required": false; "isSignal": true; }; "scrollToBottomButton": { "alias": "scrollToBottomButton"; "required": false; "isSignal": true; }; "scrollToBottomButtonClass": { "alias": "scrollToBottomButtonClass"; "required": false; "isSignal": true; }; }, { "assistantMessageThumbsUp": "assistantMessageThumbsUp"; "assistantMessageThumbsDown": "assistantMessageThumbsDown"; "assistantMessageReadAloud": "assistantMessageReadAloud"; "assistantMessageRegenerate": "assistantMessageRegenerate"; "userMessageCopy": "userMessageCopy"; "userMessageEdit": "userMessageEdit"; }, never, ["*"], true, never>;
|
|
4836
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CopilotChatViewScrollView, "copilot-chat-view-scroll-view", never, { "autoScroll": { "alias": "autoScroll"; "required": false; "isSignal": true; }; "inputContainerHeight": { "alias": "inputContainerHeight"; "required": false; "isSignal": true; }; "isResizing": { "alias": "isResizing"; "required": false; "isSignal": true; }; "inputClass": { "alias": "inputClass"; "required": false; "isSignal": true; }; "messages": { "alias": "messages"; "required": false; "isSignal": true; }; "state": { "alias": "state"; "required": false; "isSignal": true; }; "agentId": { "alias": "agentId"; "required": false; "isSignal": true; }; "messageView": { "alias": "messageView"; "required": false; "isSignal": true; }; "messageViewClass": { "alias": "messageViewClass"; "required": false; "isSignal": true; }; "assistantMessageComponent": { "alias": "assistantMessageComponent"; "required": false; "isSignal": true; }; "assistantMessageTemplate": { "alias": "assistantMessageTemplate"; "required": false; "isSignal": true; }; "assistantMessageClass": { "alias": "assistantMessageClass"; "required": false; "isSignal": true; }; "reasoningMessageComponent": { "alias": "reasoningMessageComponent"; "required": false; "isSignal": true; }; "reasoningMessageTemplate": { "alias": "reasoningMessageTemplate"; "required": false; "isSignal": true; }; "reasoningMessageClass": { "alias": "reasoningMessageClass"; "required": false; "isSignal": true; }; "messageViewChildrenComponent": { "alias": "messageViewChildrenComponent"; "required": false; "isSignal": true; }; "messageViewChildrenTemplate": { "alias": "messageViewChildrenTemplate"; "required": false; "isSignal": true; }; "messageViewChildrenClass": { "alias": "messageViewChildrenClass"; "required": false; "isSignal": true; }; "showCursor": { "alias": "showCursor"; "required": false; "isSignal": true; }; "scrollToBottomButton": { "alias": "scrollToBottomButton"; "required": false; "isSignal": true; }; "scrollToBottomButtonClass": { "alias": "scrollToBottomButtonClass"; "required": false; "isSignal": true; }; }, { "assistantMessageThumbsUp": "assistantMessageThumbsUp"; "assistantMessageThumbsDown": "assistantMessageThumbsDown"; "assistantMessageReadAloud": "assistantMessageReadAloud"; "assistantMessageRegenerate": "assistantMessageRegenerate"; "userMessageCopy": "userMessageCopy"; "userMessageEdit": "userMessageEdit"; }, never, ["*"], true, never>;
|
|
3984
4837
|
}
|
|
3985
4838
|
|
|
3986
4839
|
/**
|
|
@@ -4052,7 +4905,7 @@ declare class CopilotChatView implements OnInit, OnChanges, AfterViewInit, OnDes
|
|
|
4052
4905
|
private cdr;
|
|
4053
4906
|
private handlers;
|
|
4054
4907
|
protected readonly chatState: ChatState;
|
|
4055
|
-
protected readonly UploadIcon:
|
|
4908
|
+
protected readonly UploadIcon: CopilotIconData;
|
|
4056
4909
|
messages: _angular_core.InputSignal<({
|
|
4057
4910
|
role: "developer";
|
|
4058
4911
|
content: string;
|
|
@@ -4162,6 +5015,8 @@ declare class CopilotChatView implements OnInit, OnChanges, AfterViewInit, OnDes
|
|
|
4162
5015
|
id: string;
|
|
4163
5016
|
encryptedValue?: string | undefined;
|
|
4164
5017
|
})[]>;
|
|
5018
|
+
/** Current agent state forwarded to message-view extension slots. */
|
|
5019
|
+
state: _angular_core.InputSignal<unknown>;
|
|
4165
5020
|
agentId: _angular_core.InputSignal<string>;
|
|
4166
5021
|
autoScroll: _angular_core.InputSignal<boolean>;
|
|
4167
5022
|
showCursor: _angular_core.InputSignal<boolean>;
|
|
@@ -4169,6 +5024,15 @@ declare class CopilotChatView implements OnInit, OnChanges, AfterViewInit, OnDes
|
|
|
4169
5024
|
messageViewComponent: _angular_core.InputSignal<Type<any>>;
|
|
4170
5025
|
messageViewTemplate: _angular_core.InputSignal<TemplateRef<any>>;
|
|
4171
5026
|
messageViewClass: _angular_core.InputSignal<string>;
|
|
5027
|
+
assistantMessageComponent: _angular_core.InputSignal<Type<any>>;
|
|
5028
|
+
assistantMessageTemplate: _angular_core.InputSignal<TemplateRef<any>>;
|
|
5029
|
+
assistantMessageClass: _angular_core.InputSignal<string>;
|
|
5030
|
+
reasoningMessageComponent: _angular_core.InputSignal<Type<any>>;
|
|
5031
|
+
reasoningMessageTemplate: _angular_core.InputSignal<TemplateRef<any>>;
|
|
5032
|
+
reasoningMessageClass: _angular_core.InputSignal<string>;
|
|
5033
|
+
messageViewChildrenComponent: _angular_core.InputSignal<Type<any>>;
|
|
5034
|
+
messageViewChildrenTemplate: _angular_core.InputSignal<TemplateRef<any>>;
|
|
5035
|
+
messageViewChildrenClass: _angular_core.InputSignal<string>;
|
|
4172
5036
|
scrollViewComponent: _angular_core.InputSignal<Type<any>>;
|
|
4173
5037
|
scrollViewTemplate: _angular_core.InputSignal<TemplateRef<any>>;
|
|
4174
5038
|
scrollViewClass: _angular_core.InputSignal<string>;
|
|
@@ -4198,22 +5062,22 @@ declare class CopilotChatView implements OnInit, OnChanges, AfterViewInit, OnDes
|
|
|
4198
5062
|
readAloudButtonTemplate?: TemplateRef<any>;
|
|
4199
5063
|
regenerateButtonTemplate?: TemplateRef<any>;
|
|
4200
5064
|
assistantMessageThumbsUp: _angular_core.OutputEmitterRef<{
|
|
4201
|
-
message: Message
|
|
5065
|
+
message: Message;
|
|
4202
5066
|
}>;
|
|
4203
5067
|
assistantMessageThumbsDown: _angular_core.OutputEmitterRef<{
|
|
4204
|
-
message: Message
|
|
5068
|
+
message: Message;
|
|
4205
5069
|
}>;
|
|
4206
5070
|
assistantMessageReadAloud: _angular_core.OutputEmitterRef<{
|
|
4207
|
-
message: Message
|
|
5071
|
+
message: Message;
|
|
4208
5072
|
}>;
|
|
4209
5073
|
assistantMessageRegenerate: _angular_core.OutputEmitterRef<{
|
|
4210
|
-
message: Message
|
|
5074
|
+
message: Message;
|
|
4211
5075
|
}>;
|
|
4212
5076
|
userMessageCopy: _angular_core.OutputEmitterRef<{
|
|
4213
|
-
message: Message
|
|
5077
|
+
message: Message;
|
|
4214
5078
|
}>;
|
|
4215
5079
|
userMessageEdit: _angular_core.OutputEmitterRef<{
|
|
4216
|
-
message: Message
|
|
5080
|
+
message: Message;
|
|
4217
5081
|
}>;
|
|
4218
5082
|
inputContainerSlotRef?: ElementRef;
|
|
4219
5083
|
protected readonly defaultScrollViewComponent: typeof CopilotChatViewScrollView;
|
|
@@ -4463,9 +5327,19 @@ declare class CopilotChatView implements OnInit, OnChanges, AfterViewInit, OnDes
|
|
|
4463
5327
|
id: string;
|
|
4464
5328
|
encryptedValue?: string | undefined;
|
|
4465
5329
|
})[];
|
|
5330
|
+
state: unknown;
|
|
4466
5331
|
agentId: string;
|
|
4467
5332
|
messageView: Type<any> | TemplateRef<any>;
|
|
4468
5333
|
messageViewClass: string;
|
|
5334
|
+
assistantMessageComponent: Type<any>;
|
|
5335
|
+
assistantMessageTemplate: TemplateRef<any>;
|
|
5336
|
+
assistantMessageClass: string;
|
|
5337
|
+
reasoningMessageComponent: Type<any>;
|
|
5338
|
+
reasoningMessageTemplate: TemplateRef<any>;
|
|
5339
|
+
reasoningMessageClass: string;
|
|
5340
|
+
messageViewChildrenComponent: Type<any>;
|
|
5341
|
+
messageViewChildrenTemplate: TemplateRef<any>;
|
|
5342
|
+
messageViewChildrenClass: string;
|
|
4469
5343
|
}>;
|
|
4470
5344
|
protected inputContainerContext: _angular_core.Signal<{
|
|
4471
5345
|
input: Type<any> | TemplateRef<any>;
|
|
@@ -4485,24 +5359,32 @@ declare class CopilotChatView implements OnInit, OnChanges, AfterViewInit, OnDes
|
|
|
4485
5359
|
}>;
|
|
4486
5360
|
private destroy$;
|
|
4487
5361
|
private resizeTimeoutRef?;
|
|
5362
|
+
private measurementRetryTimeoutRef?;
|
|
5363
|
+
private readonly ngZone;
|
|
5364
|
+
private destroyed;
|
|
4488
5365
|
constructor(resizeObserverService: ResizeObserverService, cdr: ChangeDetectorRef, handlers: CopilotChatViewHandlers);
|
|
4489
5366
|
ngOnInit(): void;
|
|
4490
5367
|
ngOnChanges(): void;
|
|
4491
5368
|
ngAfterViewInit(): void;
|
|
5369
|
+
/** Schedules a cancellable layout retry without triggering zone-wide ticks. */
|
|
5370
|
+
private scheduleMeasurementRetry;
|
|
4492
5371
|
ngOnDestroy(): void;
|
|
4493
5372
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CopilotChatView, never>;
|
|
4494
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CopilotChatView, "copilot-chat-view", never, { "messages": { "alias": "messages"; "required": false; "isSignal": true; }; "agentId": { "alias": "agentId"; "required": false; "isSignal": true; }; "autoScroll": { "alias": "autoScroll"; "required": false; "isSignal": true; }; "showCursor": { "alias": "showCursor"; "required": false; "isSignal": true; }; "hasExplicitThreadId": { "alias": "hasExplicitThreadId"; "required": false; "isSignal": true; }; "messageViewComponent": { "alias": "messageViewComponent"; "required": false; "isSignal": true; }; "messageViewTemplate": { "alias": "messageViewTemplate"; "required": false; "isSignal": true; }; "messageViewClass": { "alias": "messageViewClass"; "required": false; "isSignal": true; }; "scrollViewComponent": { "alias": "scrollViewComponent"; "required": false; "isSignal": true; }; "scrollViewTemplate": { "alias": "scrollViewTemplate"; "required": false; "isSignal": true; }; "scrollViewClass": { "alias": "scrollViewClass"; "required": false; "isSignal": true; }; "scrollToBottomButtonComponent": { "alias": "scrollToBottomButtonComponent"; "required": false; "isSignal": true; }; "scrollToBottomButtonTemplate": { "alias": "scrollToBottomButtonTemplate"; "required": false; "isSignal": true; }; "scrollToBottomButtonClass": { "alias": "scrollToBottomButtonClass"; "required": false; "isSignal": true; }; "inputComponent": { "alias": "inputComponent"; "required": false; "isSignal": true; }; "inputTemplate": { "alias": "inputTemplate"; "required": false; "isSignal": true; }; "inputContainerComponent": { "alias": "inputContainerComponent"; "required": false; "isSignal": true; }; "inputContainerTemplate": { "alias": "inputContainerTemplate"; "required": false; "isSignal": true; }; "inputContainerClass": { "alias": "inputContainerClass"; "required": false; "isSignal": true; }; "featherComponent": { "alias": "featherComponent"; "required": false; "isSignal": true; }; "featherTemplate": { "alias": "featherTemplate"; "required": false; "isSignal": true; }; "featherClass": { "alias": "featherClass"; "required": false; "isSignal": true; }; "disclaimerComponent": { "alias": "disclaimerComponent"; "required": false; "isSignal": true; }; "disclaimerTemplate": { "alias": "disclaimerTemplate"; "required": false; "isSignal": true; }; "disclaimerClass": { "alias": "disclaimerClass"; "required": false; "isSignal": true; }; "disclaimerText": { "alias": "disclaimerText"; "required": false; "isSignal": true; }; }, { "assistantMessageThumbsUp": "assistantMessageThumbsUp"; "assistantMessageThumbsDown": "assistantMessageThumbsDown"; "assistantMessageReadAloud": "assistantMessageReadAloud"; "assistantMessageRegenerate": "assistantMessageRegenerate"; "userMessageCopy": "userMessageCopy"; "userMessageEdit": "userMessageEdit"; }, ["customLayoutTemplate", "sendButtonTemplate", "toolbarTemplate", "textAreaTemplate", "audioRecorderTemplate", "assistantMessageMarkdownRendererTemplate", "thumbsUpButtonTemplate", "thumbsDownButtonTemplate", "readAloudButtonTemplate", "regenerateButtonTemplate"], never, true, never>;
|
|
5373
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CopilotChatView, "copilot-chat-view", never, { "messages": { "alias": "messages"; "required": false; "isSignal": true; }; "state": { "alias": "state"; "required": false; "isSignal": true; }; "agentId": { "alias": "agentId"; "required": false; "isSignal": true; }; "autoScroll": { "alias": "autoScroll"; "required": false; "isSignal": true; }; "showCursor": { "alias": "showCursor"; "required": false; "isSignal": true; }; "hasExplicitThreadId": { "alias": "hasExplicitThreadId"; "required": false; "isSignal": true; }; "messageViewComponent": { "alias": "messageViewComponent"; "required": false; "isSignal": true; }; "messageViewTemplate": { "alias": "messageViewTemplate"; "required": false; "isSignal": true; }; "messageViewClass": { "alias": "messageViewClass"; "required": false; "isSignal": true; }; "assistantMessageComponent": { "alias": "assistantMessageComponent"; "required": false; "isSignal": true; }; "assistantMessageTemplate": { "alias": "assistantMessageTemplate"; "required": false; "isSignal": true; }; "assistantMessageClass": { "alias": "assistantMessageClass"; "required": false; "isSignal": true; }; "reasoningMessageComponent": { "alias": "reasoningMessageComponent"; "required": false; "isSignal": true; }; "reasoningMessageTemplate": { "alias": "reasoningMessageTemplate"; "required": false; "isSignal": true; }; "reasoningMessageClass": { "alias": "reasoningMessageClass"; "required": false; "isSignal": true; }; "messageViewChildrenComponent": { "alias": "messageViewChildrenComponent"; "required": false; "isSignal": true; }; "messageViewChildrenTemplate": { "alias": "messageViewChildrenTemplate"; "required": false; "isSignal": true; }; "messageViewChildrenClass": { "alias": "messageViewChildrenClass"; "required": false; "isSignal": true; }; "scrollViewComponent": { "alias": "scrollViewComponent"; "required": false; "isSignal": true; }; "scrollViewTemplate": { "alias": "scrollViewTemplate"; "required": false; "isSignal": true; }; "scrollViewClass": { "alias": "scrollViewClass"; "required": false; "isSignal": true; }; "scrollToBottomButtonComponent": { "alias": "scrollToBottomButtonComponent"; "required": false; "isSignal": true; }; "scrollToBottomButtonTemplate": { "alias": "scrollToBottomButtonTemplate"; "required": false; "isSignal": true; }; "scrollToBottomButtonClass": { "alias": "scrollToBottomButtonClass"; "required": false; "isSignal": true; }; "inputComponent": { "alias": "inputComponent"; "required": false; "isSignal": true; }; "inputTemplate": { "alias": "inputTemplate"; "required": false; "isSignal": true; }; "inputContainerComponent": { "alias": "inputContainerComponent"; "required": false; "isSignal": true; }; "inputContainerTemplate": { "alias": "inputContainerTemplate"; "required": false; "isSignal": true; }; "inputContainerClass": { "alias": "inputContainerClass"; "required": false; "isSignal": true; }; "featherComponent": { "alias": "featherComponent"; "required": false; "isSignal": true; }; "featherTemplate": { "alias": "featherTemplate"; "required": false; "isSignal": true; }; "featherClass": { "alias": "featherClass"; "required": false; "isSignal": true; }; "disclaimerComponent": { "alias": "disclaimerComponent"; "required": false; "isSignal": true; }; "disclaimerTemplate": { "alias": "disclaimerTemplate"; "required": false; "isSignal": true; }; "disclaimerClass": { "alias": "disclaimerClass"; "required": false; "isSignal": true; }; "disclaimerText": { "alias": "disclaimerText"; "required": false; "isSignal": true; }; }, { "assistantMessageThumbsUp": "assistantMessageThumbsUp"; "assistantMessageThumbsDown": "assistantMessageThumbsDown"; "assistantMessageReadAloud": "assistantMessageReadAloud"; "assistantMessageRegenerate": "assistantMessageRegenerate"; "userMessageCopy": "userMessageCopy"; "userMessageEdit": "userMessageEdit"; }, ["customLayoutTemplate", "sendButtonTemplate", "toolbarTemplate", "textAreaTemplate", "audioRecorderTemplate", "assistantMessageMarkdownRendererTemplate", "thumbsUpButtonTemplate", "thumbsDownButtonTemplate", "readAloudButtonTemplate", "regenerateButtonTemplate"], never, true, never>;
|
|
4495
5374
|
}
|
|
4496
5375
|
|
|
4497
5376
|
/**
|
|
4498
5377
|
* Props for CopilotChatView component
|
|
4499
5378
|
*/
|
|
4500
5379
|
interface CopilotChatViewProps {
|
|
4501
|
-
messages?: Message
|
|
5380
|
+
messages?: Message[];
|
|
4502
5381
|
autoScroll?: boolean;
|
|
4503
5382
|
messageViewComponent?: Type<any>;
|
|
4504
5383
|
messageViewTemplate?: TemplateRef<any>;
|
|
4505
5384
|
messageViewClass?: string;
|
|
5385
|
+
messageViewChildrenComponent?: Type<any>;
|
|
5386
|
+
messageViewChildrenTemplate?: TemplateRef<any>;
|
|
5387
|
+
messageViewChildrenClass?: string;
|
|
4506
5388
|
scrollViewComponent?: Type<any>;
|
|
4507
5389
|
scrollViewTemplate?: TemplateRef<any>;
|
|
4508
5390
|
scrollViewClass?: string;
|
|
@@ -4535,6 +5417,362 @@ interface CopilotChatViewLayoutContext {
|
|
|
4535
5417
|
disclaimer: any;
|
|
4536
5418
|
}
|
|
4537
5419
|
|
|
5420
|
+
/**
|
|
5421
|
+
* Structural directive that captures a per-row template for projection into
|
|
5422
|
+
* the `<copilotkit-threads-drawer>` element as light-DOM children with
|
|
5423
|
+
* `slot="row:{id}"`.
|
|
5424
|
+
*
|
|
5425
|
+
* Apply it to an `<ng-template>` that is a direct child of `<copilot-threads-drawer>`.
|
|
5426
|
+
* The implicit context variable (`let-t`) receives the full {@link Thread}
|
|
5427
|
+
* record for that row.
|
|
5428
|
+
*
|
|
5429
|
+
* @example
|
|
5430
|
+
* ```html
|
|
5431
|
+
* <copilot-threads-drawer>
|
|
5432
|
+
* <ng-template copilotThreadsDrawerRow let-t>
|
|
5433
|
+
* <span>{{ t.name }}</span>
|
|
5434
|
+
* </ng-template>
|
|
5435
|
+
* </copilot-threads-drawer>
|
|
5436
|
+
* ```
|
|
5437
|
+
*/
|
|
5438
|
+
declare class CopilotThreadsDrawerRow {
|
|
5439
|
+
/** The captured template reference for the per-row content. */
|
|
5440
|
+
readonly template: TemplateRef<any>;
|
|
5441
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CopilotThreadsDrawerRow, never>;
|
|
5442
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<CopilotThreadsDrawerRow, "[copilotThreadsDrawerRow]", never, {}, {}, never, never, true, never>;
|
|
5443
|
+
}
|
|
5444
|
+
/**
|
|
5445
|
+
* Angular wrapper around the `<copilotkit-threads-drawer>` Lit web component.
|
|
5446
|
+
*
|
|
5447
|
+
* Registers the custom element on construction (idempotent; SSR-guarded
|
|
5448
|
+
* internally by {@link defineCopilotKitThreadsDrawer}) and projects it into the DOM
|
|
5449
|
+
* via the `CUSTOM_ELEMENTS_SCHEMA`-enabled template.
|
|
5450
|
+
*
|
|
5451
|
+
* Thread list state is fetched from the Intelligence platform via
|
|
5452
|
+
* {@link injectThreads} and pushed onto the element's JS properties via an
|
|
5453
|
+
* `effect`, following the imperative property-assignment pattern used elsewhere
|
|
5454
|
+
* in this package (see `CopilotA2UIActivityRenderer`).
|
|
5455
|
+
*
|
|
5456
|
+
* DOM events emitted by the element are routed back to the chat configuration
|
|
5457
|
+
* and thread mutation methods via declarative Angular event bindings.
|
|
5458
|
+
*
|
|
5459
|
+
* @example
|
|
5460
|
+
* ```html
|
|
5461
|
+
* <copilot-threads-drawer data-testid="my-drawer" />
|
|
5462
|
+
* ```
|
|
5463
|
+
*/
|
|
5464
|
+
declare class CopilotThreadsDrawer {
|
|
5465
|
+
/**
|
|
5466
|
+
* Optional agent id whose threads this drawer lists/manages. Scopes the
|
|
5467
|
+
* {@link injectThreads} store (via the resolved-agent precedence: this input
|
|
5468
|
+
* → ambient config's `agentId` → {@link DEFAULT_AGENT_ID}). NOT forwarded to
|
|
5469
|
+
* the element (the element has no `agentId` property).
|
|
5470
|
+
*/
|
|
5471
|
+
readonly agentId: _angular_core.InputSignal<string>;
|
|
5472
|
+
/**
|
|
5473
|
+
* Value applied as the `data-testid` attribute on the inner
|
|
5474
|
+
* `<copilotkit-threads-drawer>` element. Defaults to `"copilot-threads-drawer"`.
|
|
5475
|
+
*/
|
|
5476
|
+
readonly dataTestId: _angular_core.InputSignal<string>;
|
|
5477
|
+
/**
|
|
5478
|
+
* Optional accessible/region + default-header label forwarded to the element's
|
|
5479
|
+
* `label` property; defaults to the element's own `"Threads"` when unset.
|
|
5480
|
+
*/
|
|
5481
|
+
readonly label: _angular_core.InputSignal<string>;
|
|
5482
|
+
/**
|
|
5483
|
+
* Optional heading for the "Recent Conversations" section, forwarded to the
|
|
5484
|
+
* element's `recent-label` attribute; defaults to the element's own
|
|
5485
|
+
* `"Recent Conversations"` when unset.
|
|
5486
|
+
*/
|
|
5487
|
+
readonly recentLabel: _angular_core.InputSignal<string>;
|
|
5488
|
+
/**
|
|
5489
|
+
* Whether the drawer offers a collapse toggle. Pushed onto the element's
|
|
5490
|
+
* `collapsible` PROPERTY (a default-true boolean, exactly like `licensed` — a
|
|
5491
|
+
* string attribute cannot represent it since any non-empty value is truthy).
|
|
5492
|
+
* When `false`, the drawer has no collapse toggle and is always expanded.
|
|
5493
|
+
* Defaults to the element's own `true` when unset.
|
|
5494
|
+
*/
|
|
5495
|
+
readonly collapsible: _angular_core.InputSignal<boolean>;
|
|
5496
|
+
/**
|
|
5497
|
+
* Emits the new collapsed state whenever the drawer's collapsed state changes
|
|
5498
|
+
* (mirrors the element's `collapse-change` event).
|
|
5499
|
+
*/
|
|
5500
|
+
readonly collapseChange: EventEmitter<boolean>;
|
|
5501
|
+
/**
|
|
5502
|
+
* Optional host override for the thread-select action.
|
|
5503
|
+
*
|
|
5504
|
+
* When provided, this callback is invoked instead of driving
|
|
5505
|
+
* `config.setActiveThreadId`. Bound via `[onThreadSelect]="fn"`.
|
|
5506
|
+
*/
|
|
5507
|
+
readonly threadSelectHandler: _angular_core.InputSignal<(threadId: string) => void>;
|
|
5508
|
+
/**
|
|
5509
|
+
* Optional host override for the new-thread action.
|
|
5510
|
+
*
|
|
5511
|
+
* When provided, this callback is invoked instead of driving
|
|
5512
|
+
* `config.startNewThread`. The core `threads.startNewThread()` reset is
|
|
5513
|
+
* always called regardless. Bound via `[onNewThread]="fn"`.
|
|
5514
|
+
*/
|
|
5515
|
+
readonly newThreadHandler: _angular_core.InputSignal<() => void>;
|
|
5516
|
+
/**
|
|
5517
|
+
* Page size for thread pagination. When set, threads load in pages of this
|
|
5518
|
+
* size and the element shows a "Load more" control while more remain. When
|
|
5519
|
+
* unset, the full list loads at once and no pagination control shows.
|
|
5520
|
+
*/
|
|
5521
|
+
readonly limit: _angular_core.InputSignal<number>;
|
|
5522
|
+
/**
|
|
5523
|
+
* Destination the locked view's Upgrade CTA opens in a new tab. Forwarded to
|
|
5524
|
+
* the element's `licenseUrl` property; defaults to the element's built-in
|
|
5525
|
+
* CopilotKit Intelligence docs URL when unset. Set to an empty string to
|
|
5526
|
+
* suppress the default navigation and handle the click via `onLicensed`.
|
|
5527
|
+
*/
|
|
5528
|
+
readonly licenseUrl: _angular_core.InputSignal<string>;
|
|
5529
|
+
/**
|
|
5530
|
+
* Optional host hook fired when the locked view's Upgrade CTA is clicked. The
|
|
5531
|
+
* element still performs its default navigation unless `licenseUrl` is blank;
|
|
5532
|
+
* use this for telemetry or to drive your own upgrade flow. Bound via
|
|
5533
|
+
* `[onLicensed]="fn"`.
|
|
5534
|
+
*/
|
|
5535
|
+
readonly licensedHandler: _angular_core.InputSignal<() => void>;
|
|
5536
|
+
private readonly config;
|
|
5537
|
+
private readonly copilotkit;
|
|
5538
|
+
private readonly drawerRef;
|
|
5539
|
+
/**
|
|
5540
|
+
* Optional per-row template directive projected as a direct child of this
|
|
5541
|
+
* component. When present, a `<div slot="row:{id}">` is rendered inside the
|
|
5542
|
+
* `<copilotkit-threads-drawer>` element for each thread, allowing the host to inject
|
|
5543
|
+
* custom light-DOM content into each row slot.
|
|
5544
|
+
*/
|
|
5545
|
+
protected readonly rowDirective: _angular_core.Signal<CopilotThreadsDrawerRow>;
|
|
5546
|
+
/**
|
|
5547
|
+
* The resolved agent id for the threads store. Precedence:
|
|
5548
|
+
* 1. `agentId` input prop.
|
|
5549
|
+
* 2. Ambient `CopilotChatConfiguration.agentId`.
|
|
5550
|
+
* 3. {@link DEFAULT_AGENT_ID}.
|
|
5551
|
+
*/
|
|
5552
|
+
protected readonly resolvedAgentId: _angular_core.Signal<string>;
|
|
5553
|
+
/**
|
|
5554
|
+
* Normalized license context derived from the core's runtime-reported status,
|
|
5555
|
+
* via the same `@copilotkit/shared` helper the React provider uses.
|
|
5556
|
+
*/
|
|
5557
|
+
private readonly licenseContext;
|
|
5558
|
+
/**
|
|
5559
|
+
* Two-pronged license gate, mirroring the React wrapper. `checkFeature` fails
|
|
5560
|
+
* OPEN (returns true) when no license is configured, so it cannot by itself
|
|
5561
|
+
* detect the no-license case; we therefore also require a positive
|
|
5562
|
+
* license-present signal. Only a resolved `valid`/`expiring` status counts as
|
|
5563
|
+
* present — a resolved `none`/`expired`/`invalid` gates the drawer to the
|
|
5564
|
+
* locked view.
|
|
5565
|
+
*/
|
|
5566
|
+
protected readonly licensed: _angular_core.Signal<boolean>;
|
|
5567
|
+
/**
|
|
5568
|
+
* Whether the runtime has not yet reported a license status. The status is
|
|
5569
|
+
* `null` until the first `/info` response lands; treat that window as
|
|
5570
|
+
* "not yet unlicensed" — show the loading state, never the locked view — so a
|
|
5571
|
+
* licensed drawer never flashes (or strands) the Upgrade CTA mid-resolution.
|
|
5572
|
+
*/
|
|
5573
|
+
protected readonly licensePending: _angular_core.Signal<boolean>;
|
|
5574
|
+
/** Live thread list from the Intelligence platform for the resolved agent. */
|
|
5575
|
+
protected readonly threads: _copilotkit_angular.InjectThreadsResult;
|
|
5576
|
+
/** Thread records mapped to the element's {@link DrawerThread} shape. */
|
|
5577
|
+
protected readonly drawerThreads: _angular_core.Signal<DrawerThread[]>;
|
|
5578
|
+
/**
|
|
5579
|
+
* User-facing error message from the filtered list error signal, or `null`
|
|
5580
|
+
* when there is no error. Uses `listError` (not `error`) so developer/config
|
|
5581
|
+
* errors (missing runtime URL, runtime without thread endpoints) are excluded
|
|
5582
|
+
* and never displayed to end users.
|
|
5583
|
+
*/
|
|
5584
|
+
protected readonly errorMessage: _angular_core.Signal<string>;
|
|
5585
|
+
/**
|
|
5586
|
+
* The currently-active thread id, sourced from the ambient chat
|
|
5587
|
+
* configuration, or `null` when no configuration is present.
|
|
5588
|
+
*/
|
|
5589
|
+
protected readonly activeThreadId: _angular_core.Signal<string>;
|
|
5590
|
+
/**
|
|
5591
|
+
* User-facing fetch-more error message from the dedicated fetch-more error
|
|
5592
|
+
* signal, or `null`. Drives the element's inline "couldn't load more — retry"
|
|
5593
|
+
* panel without disturbing the loaded list or the initial-list `error`.
|
|
5594
|
+
*/
|
|
5595
|
+
protected readonly fetchMoreErrorMessage: _angular_core.Signal<string>;
|
|
5596
|
+
private readonly destroyRef;
|
|
5597
|
+
/**
|
|
5598
|
+
* Provider-less fallback open-state. Without a surrounding chat configuration
|
|
5599
|
+
* there is no shared open-state to bind to, so the wrapper keeps its own
|
|
5600
|
+
* local state. Starts CLOSED — matching the configuration's own default — so
|
|
5601
|
+
* the element does not spring open (and scroll-lock the page on mobile) on
|
|
5602
|
+
* load, and the element's `open-change` events still toggle it.
|
|
5603
|
+
*/
|
|
5604
|
+
private readonly localDrawerOpen;
|
|
5605
|
+
/**
|
|
5606
|
+
* The effective drawer open-state: the ambient chat configuration's
|
|
5607
|
+
* `drawerOpen` when present, else the provider-less {@link localDrawerOpen}.
|
|
5608
|
+
* Pushed onto the element's controlled `open` property in the effect below.
|
|
5609
|
+
*/
|
|
5610
|
+
protected readonly drawerOpen: _angular_core.Signal<boolean>;
|
|
5611
|
+
constructor();
|
|
5612
|
+
/**
|
|
5613
|
+
* Handles the `thread-selected` event from the drawer element.
|
|
5614
|
+
*
|
|
5615
|
+
* When a `threadSelectHandler` override is provided by the host, it is called
|
|
5616
|
+
* exclusively. Otherwise, the ambient chat configuration is driven directly so
|
|
5617
|
+
* a bare `<copilot-threads-drawer>` works without any host wiring.
|
|
5618
|
+
*
|
|
5619
|
+
* @param event - The raw DOM event; cast to `CustomEvent<ThreadSelectedDetail>` to extract `threadId`.
|
|
5620
|
+
*/
|
|
5621
|
+
protected onThreadSelected(event: Event): void;
|
|
5622
|
+
/**
|
|
5623
|
+
* Handles the `open-change` event from the drawer element.
|
|
5624
|
+
*
|
|
5625
|
+
* Drives the ambient chat configuration's `setDrawerOpen` when present, else
|
|
5626
|
+
* the provider-less {@link localDrawerOpen} fallback — mirroring the React
|
|
5627
|
+
* and Vue wrappers so the element's open-state stays coordinated.
|
|
5628
|
+
*
|
|
5629
|
+
* @param event - The raw DOM event; cast to `CustomEvent<OpenChangeDetail>` to extract `open`.
|
|
5630
|
+
*/
|
|
5631
|
+
protected onOpenChange(event: Event): void;
|
|
5632
|
+
/**
|
|
5633
|
+
* Handles the `new-thread` event from the drawer element.
|
|
5634
|
+
*
|
|
5635
|
+
* Always resets the core thread store to a fresh, non-explicit client-side
|
|
5636
|
+
* thread first. When a `newThreadHandler` override is provided by the host,
|
|
5637
|
+
* it is called exclusively. Otherwise, the ambient chat configuration is
|
|
5638
|
+
* driven directly so a bare `<copilot-threads-drawer>` works without any host wiring.
|
|
5639
|
+
*/
|
|
5640
|
+
protected onNewThread(): void;
|
|
5641
|
+
/**
|
|
5642
|
+
* Handles the `archive` event from the drawer element.
|
|
5643
|
+
*
|
|
5644
|
+
* Delegates to the threads mutation and logs any failure to the console.
|
|
5645
|
+
*
|
|
5646
|
+
* @param event - The raw DOM event; cast to `CustomEvent<ArchiveDetail>` to extract `threadId`.
|
|
5647
|
+
*/
|
|
5648
|
+
protected onArchive(event: Event): void;
|
|
5649
|
+
/**
|
|
5650
|
+
* Handles the `unarchive` event from the drawer element.
|
|
5651
|
+
*
|
|
5652
|
+
* Delegates to the threads mutation and logs any failure to the console.
|
|
5653
|
+
*
|
|
5654
|
+
* @param event - The raw DOM event; cast to `CustomEvent<UnarchiveDetail>` to extract `threadId`.
|
|
5655
|
+
*/
|
|
5656
|
+
protected onUnarchive(event: Event): void;
|
|
5657
|
+
/**
|
|
5658
|
+
* Handles the `delete` event from the drawer element.
|
|
5659
|
+
*
|
|
5660
|
+
* Deleting the active thread resets to a fresh, non-explicit thread so the
|
|
5661
|
+
* user is not stranded on a now-gone conversation. Archiving the active
|
|
5662
|
+
* thread keeps the user viewing it.
|
|
5663
|
+
*
|
|
5664
|
+
* The core `threads.startNewThread()` reset is always called when the deleted
|
|
5665
|
+
* thread was active. When a `newThreadHandler` override is provided by the
|
|
5666
|
+
* host, it is called exclusively; otherwise the ambient chat configuration is
|
|
5667
|
+
* driven directly.
|
|
5668
|
+
*
|
|
5669
|
+
* @param event - The raw DOM event; cast to `CustomEvent<DeleteDetail>` to extract `threadId`.
|
|
5670
|
+
*/
|
|
5671
|
+
protected onDelete(event: Event): void;
|
|
5672
|
+
/**
|
|
5673
|
+
* Handles the `filter-change` event from the drawer element.
|
|
5674
|
+
*
|
|
5675
|
+
* The element owns the Active/All filter; on change we refetch so the list
|
|
5676
|
+
* reflects the server.
|
|
5677
|
+
*/
|
|
5678
|
+
protected onFilterChange(): void;
|
|
5679
|
+
/**
|
|
5680
|
+
* Handles the `collapse-change` event from the drawer element — re-emits the
|
|
5681
|
+
* new collapsed state through the component's `collapseChange` output so hosts
|
|
5682
|
+
* can observe (or persist) the drawer's collapsed state.
|
|
5683
|
+
*
|
|
5684
|
+
* @param event - The raw DOM event; cast to `CustomEvent<CollapseChangeDetail>` to extract `collapsed`.
|
|
5685
|
+
*/
|
|
5686
|
+
protected onCollapseChange(event: Event): void;
|
|
5687
|
+
/**
|
|
5688
|
+
* Handles the `retry` event from the drawer element.
|
|
5689
|
+
*
|
|
5690
|
+
* `scope` distinguishes an initial fetch retry from a fetch-more retry so
|
|
5691
|
+
* the correct pagination operation is invoked.
|
|
5692
|
+
*
|
|
5693
|
+
* @param event - The raw DOM event; cast to `CustomEvent<RetryDetail>` to extract `scope`.
|
|
5694
|
+
*/
|
|
5695
|
+
protected onRetry(event: Event): void;
|
|
5696
|
+
/**
|
|
5697
|
+
* Handles the `load-more` event from the drawer element — advances pagination
|
|
5698
|
+
* by fetching the next page. No-op when there is no next page (the element
|
|
5699
|
+
* only surfaces the "Load more" control while `hasMoreThreads` is true).
|
|
5700
|
+
*/
|
|
5701
|
+
protected onLoadMore(): void;
|
|
5702
|
+
/**
|
|
5703
|
+
* Handles the `licensed` event from the drawer element (Upgrade CTA click).
|
|
5704
|
+
*
|
|
5705
|
+
* The element performs its own default navigation to `licenseUrl`; this hook
|
|
5706
|
+
* lets the host observe the click (e.g. for telemetry) or drive a custom
|
|
5707
|
+
* upgrade flow when provided via `[onLicensed]`.
|
|
5708
|
+
*/
|
|
5709
|
+
protected onLicensed(): void;
|
|
5710
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CopilotThreadsDrawer, never>;
|
|
5711
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CopilotThreadsDrawer, "copilot-threads-drawer", never, { "agentId": { "alias": "agentId"; "required": false; "isSignal": true; }; "dataTestId": { "alias": "data-testid"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "recentLabel": { "alias": "recentLabel"; "required": false; "isSignal": true; }; "collapsible": { "alias": "collapsible"; "required": false; "isSignal": true; }; "threadSelectHandler": { "alias": "onThreadSelect"; "required": false; "isSignal": true; }; "newThreadHandler": { "alias": "onNewThread"; "required": false; "isSignal": true; }; "limit": { "alias": "limit"; "required": false; "isSignal": true; }; "licenseUrl": { "alias": "licenseUrl"; "required": false; "isSignal": true; }; "licensedHandler": { "alias": "onLicensed"; "required": false; "isSignal": true; }; }, { "collapseChange": "collapseChange"; }, ["rowDirective"], ["*"], true, never>;
|
|
5712
|
+
}
|
|
5713
|
+
|
|
5714
|
+
/** Accessible, responsive floating chat surface with an explicit open model. */
|
|
5715
|
+
declare class CopilotPopup {
|
|
5716
|
+
readonly open: _angular_core.ModelSignal<boolean>;
|
|
5717
|
+
readonly title: _angular_core.InputSignal<string>;
|
|
5718
|
+
readonly width: _angular_core.InputSignal<string | number>;
|
|
5719
|
+
readonly height: _angular_core.InputSignal<string | number>;
|
|
5720
|
+
readonly clickOutsideToClose: _angular_core.InputSignal<boolean>;
|
|
5721
|
+
readonly chatComponent: _angular_core.InputSignal<Type<unknown>>;
|
|
5722
|
+
readonly headerComponent: _angular_core.InputSignal<Type<unknown>>;
|
|
5723
|
+
protected readonly dialogId: string;
|
|
5724
|
+
protected readonly titleId: string;
|
|
5725
|
+
protected readonly resolvedWidth: _angular_core.Signal<string>;
|
|
5726
|
+
protected readonly resolvedHeight: _angular_core.Signal<string>;
|
|
5727
|
+
private readonly launcher;
|
|
5728
|
+
private readonly initialFocus;
|
|
5729
|
+
constructor();
|
|
5730
|
+
protected toggle(): void;
|
|
5731
|
+
protected closeFromBackdrop(): void;
|
|
5732
|
+
protected close(): void;
|
|
5733
|
+
private focusModal;
|
|
5734
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CopilotPopup, never>;
|
|
5735
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CopilotPopup, "copilot-popup", never, { "open": { "alias": "open"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; "width": { "alias": "width"; "required": false; "isSignal": true; }; "height": { "alias": "height"; "required": false; "isSignal": true; }; "clickOutsideToClose": { "alias": "clickOutsideToClose"; "required": false; "isSignal": true; }; "chatComponent": { "alias": "chatComponent"; "required": false; "isSignal": true; }; "headerComponent": { "alias": "headerComponent"; "required": false; "isSignal": true; }; }, { "open": "openChange"; }, never, never, true, never>;
|
|
5736
|
+
}
|
|
5737
|
+
|
|
5738
|
+
type CopilotSidebarMode = "docked" | "overlay";
|
|
5739
|
+
type CopilotSidebarPosition = "left" | "right";
|
|
5740
|
+
/** Responsive chat sidebar with independent overlay and single-owner docked modes. */
|
|
5741
|
+
declare class CopilotSidebar {
|
|
5742
|
+
readonly open: _angular_core.ModelSignal<boolean>;
|
|
5743
|
+
readonly mode: _angular_core.InputSignal<CopilotSidebarMode>;
|
|
5744
|
+
readonly position: _angular_core.InputSignal<CopilotSidebarPosition>;
|
|
5745
|
+
readonly width: _angular_core.InputSignal<string | number>;
|
|
5746
|
+
readonly title: _angular_core.InputSignal<string>;
|
|
5747
|
+
readonly clickOutsideToClose: _angular_core.InputSignal<boolean>;
|
|
5748
|
+
readonly chatComponent: _angular_core.InputSignal<Type<unknown>>;
|
|
5749
|
+
readonly headerComponent: _angular_core.InputSignal<Type<unknown>>;
|
|
5750
|
+
protected readonly sidebarId: string;
|
|
5751
|
+
protected readonly titleId: string;
|
|
5752
|
+
protected readonly resolvedWidth: _angular_core.Signal<string>;
|
|
5753
|
+
protected readonly isCompact: _angular_core.WritableSignal<boolean>;
|
|
5754
|
+
protected readonly isModal: _angular_core.Signal<boolean>;
|
|
5755
|
+
protected readonly dockAccepted: _angular_core.WritableSignal<boolean>;
|
|
5756
|
+
private readonly owner;
|
|
5757
|
+
private readonly registry;
|
|
5758
|
+
private readonly document;
|
|
5759
|
+
private readonly isBrowser;
|
|
5760
|
+
private readonly destroyRef;
|
|
5761
|
+
private readonly launcher;
|
|
5762
|
+
private readonly initialFocus;
|
|
5763
|
+
private ownsDock;
|
|
5764
|
+
constructor();
|
|
5765
|
+
protected toggle(): void;
|
|
5766
|
+
protected closeFromBackdrop(): void;
|
|
5767
|
+
protected close(): void;
|
|
5768
|
+
private releaseDock;
|
|
5769
|
+
private focusModal;
|
|
5770
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CopilotSidebar, never>;
|
|
5771
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CopilotSidebar, "copilot-sidebar", never, { "open": { "alias": "open"; "required": false; "isSignal": true; }; "mode": { "alias": "mode"; "required": false; "isSignal": true; }; "position": { "alias": "position"; "required": false; "isSignal": true; }; "width": { "alias": "width"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; "clickOutsideToClose": { "alias": "clickOutsideToClose"; "required": false; "isSignal": true; }; "chatComponent": { "alias": "chatComponent"; "required": false; "isSignal": true; }; "headerComponent": { "alias": "headerComponent"; "required": false; "isSignal": true; }; }, { "open": "openChange"; }, never, never, true, never>;
|
|
5772
|
+
}
|
|
5773
|
+
|
|
5774
|
+
type A2UIOperation = Record<string, unknown>;
|
|
5775
|
+
|
|
4538
5776
|
declare class CopilotA2UIActivityRenderer implements ActivityRenderer<unknown> {
|
|
4539
5777
|
readonly activityType: _angular_core.InputSignal<string>;
|
|
4540
5778
|
readonly content: _angular_core.InputSignal<unknown>;
|
|
@@ -4547,7 +5785,14 @@ declare class CopilotA2UIActivityRenderer implements ActivityRenderer<unknown> {
|
|
|
4547
5785
|
readonly agent: _angular_core.InputSignal<AbstractAgent>;
|
|
4548
5786
|
private readonly surfaceRef;
|
|
4549
5787
|
private readonly copilotKit;
|
|
4550
|
-
|
|
5788
|
+
protected readonly config: _copilotkit_angular.CopilotKitConfig;
|
|
5789
|
+
private readonly platformId;
|
|
5790
|
+
private readonly zone;
|
|
5791
|
+
protected readonly operations: _angular_core.Signal<A2UIOperation[]>;
|
|
5792
|
+
protected readonly hasOperations: _angular_core.Signal<boolean>;
|
|
5793
|
+
protected readonly surfaceReady: _angular_core.WritableSignal<boolean>;
|
|
5794
|
+
protected readonly loaderContent: _angular_core.WritableSignal<unknown>;
|
|
5795
|
+
private readonly markSurfaceReady;
|
|
4551
5796
|
constructor();
|
|
4552
5797
|
protected handleAction(event: Event): Promise<void>;
|
|
4553
5798
|
protected handleError(event: Event): void;
|
|
@@ -4563,13 +5808,43 @@ declare class CopilotA2UIActivityRenderer implements ActivityRenderer<unknown> {
|
|
|
4563
5808
|
declare class CopilotA2UIProgress {
|
|
4564
5809
|
readonly phase: _angular_core.InputSignal<number>;
|
|
4565
5810
|
readonly tokens: _angular_core.InputSignal<number>;
|
|
5811
|
+
readonly label: _angular_core.InputSignal<string>;
|
|
4566
5812
|
protected topbarBarClass(): string;
|
|
4567
5813
|
protected rowClass(phase: number, delayClass: string): string;
|
|
4568
5814
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CopilotA2UIProgress, never>;
|
|
4569
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CopilotA2UIProgress, "copilot-a2ui-progress", never, { "phase": { "alias": "phase"; "required": true; "isSignal": true; }; "tokens": { "alias": "tokens"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
5815
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CopilotA2UIProgress, "copilot-a2ui-progress", never, { "phase": { "alias": "phase"; "required": true; "isSignal": true; }; "tokens": { "alias": "tokens"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
4570
5816
|
}
|
|
4571
5817
|
|
|
4572
|
-
type
|
|
5818
|
+
type A2UIDebugExposure = "hidden" | "collapsed" | "verbose";
|
|
5819
|
+
type A2UILifecycleStatus = "building" | "retrying" | "failed";
|
|
5820
|
+
interface A2UILifecycleContent {
|
|
5821
|
+
status: A2UILifecycleStatus;
|
|
5822
|
+
attempt?: number;
|
|
5823
|
+
maxAttempts?: number;
|
|
5824
|
+
progressTokens?: number;
|
|
5825
|
+
error?: string;
|
|
5826
|
+
errors?: unknown[];
|
|
5827
|
+
attempts?: unknown[];
|
|
5828
|
+
debugExposure?: A2UIDebugExposure;
|
|
5829
|
+
}
|
|
5830
|
+
/** Read only the server-owned A2UI lifecycle fields from activity content. */
|
|
5831
|
+
declare function readA2UILifecycleContent(content: unknown): A2UILifecycleContent;
|
|
5832
|
+
/** Pre-paint building, retry, and failure UI for a stable A2UI activity. */
|
|
5833
|
+
declare class CopilotA2UIRecovery {
|
|
5834
|
+
#private;
|
|
5835
|
+
readonly content: _angular_core.InputSignal<unknown>;
|
|
5836
|
+
readonly options: _angular_core.InputSignal<A2UIRecoveryOptions>;
|
|
5837
|
+
readonly lifecycle: _angular_core.Signal<A2UILifecycleContent>;
|
|
5838
|
+
readonly retryRevealed: _angular_core.WritableSignal<boolean>;
|
|
5839
|
+
readonly debugExposure: _angular_core.Signal<A2UIDebugExposure>;
|
|
5840
|
+
readonly label: _angular_core.Signal<string>;
|
|
5841
|
+
readonly phase: _angular_core.Signal<0 | 1 | 2 | 3>;
|
|
5842
|
+
readonly failureDiagnostics: _angular_core.Signal<string>;
|
|
5843
|
+
readonly retryDiagnostics: _angular_core.Signal<string>;
|
|
5844
|
+
constructor();
|
|
5845
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CopilotA2UIRecovery, never>;
|
|
5846
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CopilotA2UIRecovery, "copilot-a2ui-recovery", never, { "content": { "alias": "content"; "required": true; "isSignal": true; }; "options": { "alias": "options"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
5847
|
+
}
|
|
4573
5848
|
|
|
4574
5849
|
declare const RENDER_A2UI_TOOL_NAME = "render_a2ui";
|
|
4575
5850
|
declare const AGUI_SEND_STATE_SNAPSHOT_TOOL_NAME = "AGUISendStateSnapshot";
|
|
@@ -4600,7 +5875,7 @@ declare class CopilotA2UIToolRenderer implements ToolRenderer<RenderA2UIArgs> {
|
|
|
4600
5875
|
type WebsandboxConstructor = typeof Websandbox;
|
|
4601
5876
|
|
|
4602
5877
|
declare const OPEN_GENERATIVE_UI_WEBSANDBOX_LOADER: InjectionToken<() => Promise<WebsandboxConstructor>>;
|
|
4603
|
-
declare class CopilotOpenGenerativeUIRenderer {
|
|
5878
|
+
declare class CopilotOpenGenerativeUIRenderer implements OnChanges {
|
|
4604
5879
|
readonly content: _angular_core.InputSignal<{
|
|
4605
5880
|
html?: string[];
|
|
4606
5881
|
initialHeight?: number;
|
|
@@ -4642,6 +5917,10 @@ declare class CopilotOpenGenerativeUIRenderer {
|
|
|
4642
5917
|
protected readonly isGenerating: _angular_core.Signal<boolean>;
|
|
4643
5918
|
private readonly renderState;
|
|
4644
5919
|
constructor();
|
|
5920
|
+
/** Applies input updates synchronously before the matching render pass. */
|
|
5921
|
+
ngOnChanges(): void;
|
|
5922
|
+
/** Commits content and synchronously removes stale sandbox DOM on restart. */
|
|
5923
|
+
private commitContent;
|
|
4645
5924
|
private clearThrottle;
|
|
4646
5925
|
private loadWebsandbox;
|
|
4647
5926
|
private createLocalApi;
|
|
@@ -4706,5 +5985,5 @@ declare class CopilotOpenGenerativeUIToolRenderer implements ToolRenderer<Genera
|
|
|
4706
5985
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CopilotOpenGenerativeUIToolRenderer, "copilot-open-generative-ui-tool-renderer", never, { "toolCall": { "alias": "toolCall"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
4707
5986
|
}
|
|
4708
5987
|
|
|
4709
|
-
export { AGUI_SEND_STATE_SNAPSHOT_TOOL_NAME, AgentStore, AudioRecorderError, COPILOT_CHAT_DEFAULT_LABELS, COPILOT_CHAT_LABELS, COPILOT_KIT_CONFIG, ChatState, CopilotA2UIActivityRenderer, CopilotA2UIProgress, CopilotA2UIToolRenderer, CopilotChat, CopilotChatAddFileButton, CopilotChatAssistantMessage, CopilotChatAssistantMessageCopyButton, CopilotChatAssistantMessageReadAloudButton, CopilotChatAssistantMessageRegenerateButton, CopilotChatAssistantMessageRenderer, CopilotChatAssistantMessageThumbsDownButton, CopilotChatAssistantMessageThumbsUpButton, CopilotChatAssistantMessageToolbar, CopilotChatAssistantMessageToolbarButton, CopilotChatAttachmentQueue, CopilotChatAttachmentRenderer, CopilotChatAttachmentsDirective, CopilotChatAudioRecorder, CopilotChatCancelTranscribeButton, 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, CopilotKit, CopilotKitAgentContext, CopilotOpenGenerativeUIActivityRenderer, CopilotOpenGenerativeUIRenderer, CopilotOpenGenerativeUIToolRenderer, CopilotSlot, CopilotTooltip, CopilotkitAgentFactory, DEFAULT_OPEN_GENERATIVE_UI_DESIGN_SKILL, GENERATE_SANDBOXED_UI_DESCRIPTION, GENERATE_SANDBOXED_UI_TOOL_NAME, GenerateSandboxedUiArgsSchema, OPEN_GENERATIVE_UI_ACTIVITY_TYPE, OPEN_GENERATIVE_UI_WEBSANDBOX_LOADER, OpenGenerativeUIContentSchema, RENDER_A2UI_TOOL_NAME, RenderA2UIArgsSchema, RenderToolCalls, ResizeObserverService, SLOT_CONFIG, ScrollPosition, StickToBottom, TooltipContent, TranscriptionError, anyActivityContentSchema, cn, connectAgentContext, createSlotConfig, createSlotRenderer, getSlotConfig, injectAgentStore, injectChatLabels, injectChatState, injectCopilotKitConfig, isComponentType, isSlotValue, normalizeSlotValue, provideCopilotChatLabels, provideCopilotKit, provideSlots, registerFrontendTool, registerHumanInTheLoop, registerRenderToolCall, renderSlot, transcribeAudio };
|
|
4710
|
-
export type { A2UIConfig, ActivityRenderer, AngularActivityContentParseResult, AngularActivityContentSchema, AngularToolCall, AssistantMessageCopyButtonContext, AssistantMessageMarkdownRendererContext, AssistantMessageToolbarContext, AudioRecorderState, BranchNavigationContext, ClientTool, ConnectAgentContextConfig, CopilotChatAssistantMessageOnReadAloudProps, CopilotChatAssistantMessageOnRegenerateProps, CopilotChatAssistantMessageOnThumbsDownProps, CopilotChatAssistantMessageOnThumbsUpProps, CopilotChatAudioRecorderProps, CopilotChatButtonProps, CopilotChatInputConfig, CopilotChatInputMode, CopilotChatInputOutputs, CopilotChatInputSlots, CopilotChatLabels, CopilotChatMessageViewProps, CopilotChatTextareaProps, CopilotChatToolbarButtonProps, CopilotChatToolbarProps, CopilotChatToolsButtonProps, CopilotChatUserMessageOnEditMessageProps, CopilotChatUserMessageOnSwitchToBranchProps, CopilotChatViewLayoutContext, CopilotChatViewProps, CopilotKitConfig, CopyButtonContext, CursorContext, EditButtonContext, FrontendToolConfig, GenerateSandboxedUiArgs, HumanInTheLoopConfig, HumanInTheLoopToolCall, HumanInTheLoopToolRenderer, MessageRendererContext, MessageViewContext, OpenGenerativeUIConfig, OpenGenerativeUIContent, ReadAloudButtonContext, RegenerateButtonContext, RenderA2UIArgs, RenderActivityMessageConfig, RenderSlotOptions, RenderToolCallConfig, ResizeState, SandboxFunction, ScrollBehavior, ScrollState, SendButtonContext, SlotConfig, SlotContext, SlotRegistryEntry, SlotValue, ThumbsDownButtonContext, ThumbsUpButtonContext, ToolRenderer, ToolbarContext, ToolsMenuItem, TranscriptionErrorInfo, TranscriptionResult, UserMessageToolbarContext, WithSlots };
|
|
5988
|
+
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 };
|
|
5989
|
+
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 };
|