@copilotkit/angular 0.5.3 → 2.0.0-rc.52
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/.attw.json +1 -2
- package/README.md +31 -133
- package/dist/README.md +31 -133
- package/dist/fesm2022/copilotkit-angular-generative-ui-chart.mjs +28 -0
- package/dist/fesm2022/copilotkit-angular-generative-ui-chart.mjs.map +1 -0
- package/dist/fesm2022/copilotkit-angular-generative-ui-icons.mjs +30 -0
- package/dist/fesm2022/copilotkit-angular-generative-ui-icons.mjs.map +1 -0
- package/dist/fesm2022/copilotkit-angular-generative-ui-map.mjs +28 -0
- package/dist/fesm2022/copilotkit-angular-generative-ui-map.mjs.map +1 -0
- package/dist/fesm2022/copilotkit-angular-generative-ui.mjs +11975 -0
- package/dist/fesm2022/copilotkit-angular-generative-ui.mjs.map +1 -0
- package/dist/fesm2022/copilotkit-angular-mcp-apps.mjs +43 -142
- package/dist/fesm2022/copilotkit-angular-mcp-apps.mjs.map +1 -1
- package/dist/fesm2022/copilotkit-angular.mjs +7436 -7448
- package/dist/fesm2022/copilotkit-angular.mjs.map +1 -1
- package/dist/types/copilotkit-angular-generative-ui-chart.d.ts +16 -0
- package/dist/types/copilotkit-angular-generative-ui-chart.d.ts.map +1 -0
- package/dist/types/copilotkit-angular-generative-ui-icons.d.ts +18 -0
- package/dist/types/copilotkit-angular-generative-ui-icons.d.ts.map +1 -0
- package/dist/types/copilotkit-angular-generative-ui-map.d.ts +16 -0
- package/dist/types/copilotkit-angular-generative-ui-map.d.ts.map +1 -0
- package/dist/types/copilotkit-angular-generative-ui.d.ts +8011 -0
- package/dist/types/copilotkit-angular-generative-ui.d.ts.map +1 -0
- package/dist/types/copilotkit-angular-mcp-apps.d.ts +234 -5560
- package/dist/types/copilotkit-angular-mcp-apps.d.ts.map +1 -1
- package/dist/types/copilotkit-angular.d.ts +1217 -812
- package/dist/types/copilotkit-angular.d.ts.map +1 -1
- package/package.json +54 -39
- package/scripts/generate-stylesheet.mjs +63 -0
- package/tsconfig.json +11 -1
- package/vitest.config.mts +6 -0
- package/dist/fesm2022/copilotkit-angular-a2ui.mjs +0 -1492
- package/dist/fesm2022/copilotkit-angular-a2ui.mjs.map +0 -1
- package/dist/styles.css +0 -2679
- package/dist/types/copilotkit-angular-a2ui.d.ts +0 -178
- package/dist/types/copilotkit-angular-a2ui.d.ts.map +0 -1
- package/scripts/scope-preflight.mjs +0 -100
|
@@ -1,21 +1,19 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
2
|
import { Type, Signal, InjectionToken, Provider, Injector, DestroyRef, WritableSignal, OnDestroy, NgZone, ElementRef, TemplateRef, ViewContainerRef, ComponentRef, EmbeddedViewRef, OnInit, OnChanges, SimpleChanges, AfterViewInit, ChangeDetectorRef, EventEmitter } from '@angular/core';
|
|
3
|
-
import
|
|
3
|
+
import * as _ag_ui_client from '@ag-ui/client';
|
|
4
|
+
import { AbstractAgent, ActivityMessage, ToolCall, AssistantMessage, Message, Interrupt, RunAgentResult, ResumeEntry } from '@ag-ui/client';
|
|
4
5
|
export { AssistantMessage, Message } from '@ag-ui/client';
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
import {
|
|
10
|
-
|
|
6
|
+
import * as _copilotkit_core from '@copilotkit/core';
|
|
7
|
+
import { FrontendTool, FrontendToolHandlerContext, FrontendToolReconnectBehavior, WebMCPToolConfig, GenerateSandboxedUiArgs, OpenGenerativeUIContent, ɵCopilotKitProviderBaseOptions as _CopilotKitProviderBaseOptions, CopilotRuntimeTransport, SuggestionsConfig, ɵCopilotKitLearningOptions as _CopilotKitLearningOptions, CopilotKitCoreRuntimeConnectionStatus, CopilotKitCoreGetSuggestionsResult, CopilotKitCore, ɵSuggestionsConfigInput as _SuggestionsConfigInput, CopilotKitHeadersSource, CopilotKitMessageFilter, ɵToolCallGroupAppearance as _ToolCallGroupAppearance, ɵToolCallRowStatus as _ToolCallRowStatus, InterruptRenderProps, InterruptEvent, InterruptHandlerProps, ɵThreadSummary as _ThreadSummary, CopilotChatLabels, Suggestion, ɵAgentContextInput as _AgentContextInput, Memory, MemoryRealtimeStatus, NewMemory, MemoryChanges, CopilotChatToolCallDisplay, ɵAudioRecorderState as _AudioRecorderState, ɵAudioRecorderError as _AudioRecorderError, ɵComposerInput as _ComposerInput, ɵinspectorKiteFill as _inspectorKiteFill, ɵUserMessageMediaPart as _UserMessageMediaPart, ɵToolCallLayout as _ToolCallLayout, ToolCallEntry, ɵWebsandboxLoader as _WebsandboxLoader } from '@copilotkit/core';
|
|
8
|
+
export { ɵAudioRecorderError as AudioRecorderError, CopilotChatLabels, CopilotChatToolCallDisplay, DEFAULT_OPEN_GENERATIVE_UI_DESIGN_SKILL, DynamicSuggestionsConfig, GENERATE_SANDBOXED_UI_TOOL_NAME, GenerateSandboxedUiArgs, InterruptEvent, ɵInterruptExpiredError as InterruptExpiredError, InterruptHandlerProps, Memory, MemoryChanges, MemoryKind, MemoryScope, NewMemory, OPEN_GENERATIVE_UI_ACTIVITY_TYPE, OpenGenerativeUIContent, StaticSuggestionsConfig, Suggestion, SuggestionsConfig, ToolCallEntry, TranscriptionError, TranscriptionErrorCode, TranscriptionErrorInfo, TranscriptionResult, ɵcn as cn, ɵtranscribeAudio as transcribeAudio } from '@copilotkit/core';
|
|
9
|
+
import * as _copilotkit_shared from '@copilotkit/shared';
|
|
10
|
+
import { StandardSchemaV1, DebugConfig, Attachment, AttachmentsConfig, AttachmentModality, InputContent } from '@copilotkit/shared';
|
|
11
|
+
export { Attachment, AttachmentModality, AttachmentUploadError, AttachmentUploadResult, AttachmentsConfig, GENERATE_SANDBOXED_UI_DESCRIPTION } from '@copilotkit/shared';
|
|
12
|
+
import * as _copilotkit_angular from '@copilotkit/angular';
|
|
11
13
|
import * as _ag_ui_core from '@ag-ui/core';
|
|
12
14
|
import { AgentCapabilities, AssistantMessage as AssistantMessage$1, Message as Message$1, UserMessage, ReasoningMessage, ActivityMessage as ActivityMessage$1 } from '@ag-ui/core';
|
|
13
15
|
import { ScrollDispatcher, ViewportRuler } from '@angular/cdk/scrolling';
|
|
14
16
|
import { Observable } from 'rxjs';
|
|
15
|
-
import { ClassValue } from 'clsx';
|
|
16
|
-
import * as _copilotkit_angular from '@copilotkit/angular';
|
|
17
|
-
import { DrawerThread } from '@copilotkit/web-components/threads-drawer';
|
|
18
|
-
import Websandbox from '@jetbrains/websandbox';
|
|
19
17
|
|
|
20
18
|
type AngularToolCall<Args extends Record<string, unknown> = Record<string, unknown>> = {
|
|
21
19
|
name?: string;
|
|
@@ -68,6 +66,12 @@ interface RenderToolCallConfig<Args extends Record<string, unknown> = Record<str
|
|
|
68
66
|
component: Type<ToolRenderer<Args>>;
|
|
69
67
|
agentId?: string;
|
|
70
68
|
passAgent?: boolean;
|
|
69
|
+
/**
|
|
70
|
+
* Let the chat group this renderer's calls with other calls made in a row,
|
|
71
|
+
* like the built-in card (see `toolCallDisplay`). Off by default, since a
|
|
72
|
+
* custom renderer may draw anything.
|
|
73
|
+
*/
|
|
74
|
+
group?: boolean;
|
|
71
75
|
}
|
|
72
76
|
interface FrontendToolConfig<Args extends Record<string, unknown> = Record<string, unknown>> {
|
|
73
77
|
name: string;
|
|
@@ -84,7 +88,7 @@ interface FrontendToolConfig<Args extends Record<string, unknown> = Record<strin
|
|
|
84
88
|
* `registerComponent` for that case -- it is this shape with the model-facing
|
|
85
89
|
* description built for you.
|
|
86
90
|
*/
|
|
87
|
-
handler?: (args: Args, context: FrontendToolHandlerContext) =>
|
|
91
|
+
handler?: (args: Args, context: FrontendToolHandlerContext) => unknown;
|
|
88
92
|
followUp?: boolean;
|
|
89
93
|
/**
|
|
90
94
|
* Whether to run the handler again for a call that is still unanswered when
|
|
@@ -128,10 +132,9 @@ declare function registerFrontendTool<Args extends Record<string, unknown> = Rec
|
|
|
128
132
|
/**
|
|
129
133
|
* Registers an Angular component as a tool the agent can call to display it.
|
|
130
134
|
*
|
|
131
|
-
*
|
|
132
|
-
*
|
|
133
|
-
*
|
|
134
|
-
* one. Contrast `registerRenderToolCall`, which draws a tool the agent already
|
|
135
|
+
* It needs nothing on the agent side: the tool is declared by the frontend and
|
|
136
|
+
* forwarded to the agent over AG-UI, so it works the same behind a Python agent as
|
|
137
|
+
* a TypeScript one. Contrast `registerRenderToolCall`, which draws a tool the agent already
|
|
135
138
|
* has and therefore requires that tool to exist in the agent.
|
|
136
139
|
*
|
|
137
140
|
* The component is an ordinary `ToolRenderer`: it takes the required `toolCall`
|
|
@@ -188,68 +191,13 @@ declare const anyActivityContentSchema: AngularActivityContentSchema<unknown>;
|
|
|
188
191
|
/** Register an activity renderer for the lifetime of the current injector. */
|
|
189
192
|
declare function registerRenderActivityMessage(config: RenderActivityMessageConfig): void;
|
|
190
193
|
|
|
191
|
-
|
|
192
|
-
declare const
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
css: z.ZodOptional<z.ZodString>;
|
|
199
|
-
cssComplete: z.ZodOptional<z.ZodBoolean>;
|
|
200
|
-
html: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
201
|
-
htmlComplete: z.ZodOptional<z.ZodBoolean>;
|
|
202
|
-
jsFunctions: z.ZodOptional<z.ZodString>;
|
|
203
|
-
jsFunctionsComplete: z.ZodOptional<z.ZodBoolean>;
|
|
204
|
-
jsExpressions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
205
|
-
jsExpressionsComplete: z.ZodOptional<z.ZodBoolean>;
|
|
206
|
-
}, "strip", z.ZodTypeAny, {
|
|
207
|
-
html?: string[] | undefined;
|
|
208
|
-
initialHeight?: number | undefined;
|
|
209
|
-
generating?: boolean | undefined;
|
|
210
|
-
css?: string | undefined;
|
|
211
|
-
cssComplete?: boolean | undefined;
|
|
212
|
-
htmlComplete?: boolean | undefined;
|
|
213
|
-
jsFunctions?: string | undefined;
|
|
214
|
-
jsFunctionsComplete?: boolean | undefined;
|
|
215
|
-
jsExpressions?: string[] | undefined;
|
|
216
|
-
jsExpressionsComplete?: boolean | undefined;
|
|
217
|
-
}, {
|
|
218
|
-
html?: string[] | undefined;
|
|
219
|
-
initialHeight?: number | undefined;
|
|
220
|
-
generating?: boolean | undefined;
|
|
221
|
-
css?: string | undefined;
|
|
222
|
-
cssComplete?: boolean | undefined;
|
|
223
|
-
htmlComplete?: boolean | undefined;
|
|
224
|
-
jsFunctions?: string | undefined;
|
|
225
|
-
jsFunctionsComplete?: boolean | undefined;
|
|
226
|
-
jsExpressions?: string[] | undefined;
|
|
227
|
-
jsExpressionsComplete?: boolean | undefined;
|
|
228
|
-
}>;
|
|
229
|
-
type OpenGenerativeUIContent = z.infer<typeof OpenGenerativeUIContentSchema>;
|
|
230
|
-
declare const GenerateSandboxedUiArgsSchema: z.ZodObject<{
|
|
231
|
-
initialHeight: z.ZodOptional<z.ZodNumber>;
|
|
232
|
-
placeholderMessages: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
233
|
-
css: z.ZodOptional<z.ZodString>;
|
|
234
|
-
html: z.ZodOptional<z.ZodString>;
|
|
235
|
-
jsFunctions: z.ZodOptional<z.ZodString>;
|
|
236
|
-
jsExpressions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
237
|
-
}, "strip", z.ZodTypeAny, {
|
|
238
|
-
html?: string | undefined;
|
|
239
|
-
initialHeight?: number | undefined;
|
|
240
|
-
css?: string | undefined;
|
|
241
|
-
jsFunctions?: string | undefined;
|
|
242
|
-
jsExpressions?: string[] | undefined;
|
|
243
|
-
placeholderMessages?: string[] | undefined;
|
|
244
|
-
}, {
|
|
245
|
-
html?: string | undefined;
|
|
246
|
-
initialHeight?: number | undefined;
|
|
247
|
-
css?: string | undefined;
|
|
248
|
-
jsFunctions?: string | undefined;
|
|
249
|
-
jsExpressions?: string[] | undefined;
|
|
250
|
-
placeholderMessages?: string[] | undefined;
|
|
251
|
-
}>;
|
|
252
|
-
type GenerateSandboxedUiArgs = z.infer<typeof GenerateSandboxedUiArgsSchema>;
|
|
194
|
+
/** Validates Open Generative UI activity content (shared with React and Vue). */
|
|
195
|
+
declare const OpenGenerativeUIContentSchema: _copilotkit_core.ɵOpenGenerativeUISchema<OpenGenerativeUIContent>;
|
|
196
|
+
/**
|
|
197
|
+
* Schema for the generateSandboxedUi tool call arguments (shared with React
|
|
198
|
+
* and Vue). It also describes the arguments to the model as JSON Schema.
|
|
199
|
+
*/
|
|
200
|
+
declare const GenerateSandboxedUiArgsSchema: _copilotkit_core.ɵOpenGenerativeUISchema<GenerateSandboxedUiArgs>;
|
|
253
201
|
type SandboxFunction<Args extends Record<string, unknown> = Record<string, unknown>> = {
|
|
254
202
|
name: string;
|
|
255
203
|
description: string;
|
|
@@ -262,79 +210,23 @@ interface OpenGenerativeUIConfig {
|
|
|
262
210
|
}
|
|
263
211
|
|
|
264
212
|
/**
|
|
265
|
-
*
|
|
266
|
-
*
|
|
213
|
+
* The options of `provideCopilotKit`. The options shared with the React and
|
|
214
|
+
* Vue providers (same names) are documented on
|
|
215
|
+
* `ɵCopilotKitProviderBaseOptions` in `@copilotkit/core`.
|
|
267
216
|
*/
|
|
268
|
-
interface
|
|
269
|
-
userAction: A2uiClientAction;
|
|
270
|
-
}
|
|
271
|
-
interface A2UISurfaceError {
|
|
272
|
-
error: unknown;
|
|
273
|
-
message: string;
|
|
274
|
-
}
|
|
275
|
-
/**
|
|
276
|
-
* What surfaces render with: `basicCatalog`, or one from `createAngularCatalog`,
|
|
277
|
-
* both in `@copilotkit/angular/a2ui`. The main entry point mounts its
|
|
278
|
-
* `surfaceComponent`, so it never imports the `/a2ui` entry point.
|
|
279
|
-
*/
|
|
280
|
-
interface A2UICatalog extends CatalogInterface<ComponentApi> {
|
|
281
|
-
readonly surfaceComponent: Type<unknown>;
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
interface A2UIConfig {
|
|
285
|
-
theme?: Record<string, unknown>;
|
|
217
|
+
interface CopilotKitConfig extends Pick<_CopilotKitProviderBaseOptions, "runtimeUrl" | "headers" | "credentials" | "messageFilter" | "properties" | "selfManagedAgents" | "debug" | "defaultThrottleMs" | "onError"> {
|
|
286
218
|
/**
|
|
287
|
-
*
|
|
288
|
-
* `
|
|
289
|
-
* A2UI stays off, even when the runtime enables it.
|
|
219
|
+
* Transport style for CopilotKitRuntime endpoints: `"single"`, `"rest"`, or
|
|
220
|
+
* `"auto"` (the default) to detect it from the runtime.
|
|
290
221
|
*/
|
|
291
|
-
|
|
292
|
-
/** Shown until the first surface renders. */
|
|
293
|
-
loadingComponent?: Type<unknown>;
|
|
294
|
-
includeSchema?: boolean;
|
|
295
|
-
recovery?: A2UIRecoveryOptions;
|
|
296
|
-
}
|
|
297
|
-
interface A2UIRecoveryOptions {
|
|
298
|
-
/** Delay before revealing a transient retry. Defaults to 2000ms. */
|
|
299
|
-
showAfterMs?: number;
|
|
300
|
-
/** Attempt number that reveals retry state immediately. Defaults to 2. */
|
|
301
|
-
showAfterAttempts?: number;
|
|
302
|
-
/** Client diagnostic visibility, overridden by server lifecycle content. */
|
|
303
|
-
debugExposure?: "hidden" | "collapsed" | "verbose";
|
|
304
|
-
}
|
|
305
|
-
interface CopilotKitConfig {
|
|
306
|
-
runtimeUrl?: string;
|
|
307
|
-
headers?: Record<string, string>;
|
|
308
|
-
/** Fetch credentials mode used for CopilotKit runtime requests. */
|
|
309
|
-
credentials?: RequestCredentials;
|
|
222
|
+
runtimeTransport?: CopilotRuntimeTransport;
|
|
310
223
|
/**
|
|
311
|
-
*
|
|
312
|
-
*
|
|
313
|
-
* CopilotKit sends the whole thread each time. When your agent already
|
|
314
|
-
* stores the conversation, most of that payload is waste, and an agent that
|
|
315
|
-
* merges the inbound list with its own store can show the model every turn
|
|
316
|
-
* twice. Return the messages to send:
|
|
317
|
-
*
|
|
318
|
-
* ```ts
|
|
319
|
-
* provideCopilotKit({
|
|
320
|
-
* runtimeUrl: "/api/copilotkit",
|
|
321
|
-
* messageFilter: (messages) => messages.slice(-1),
|
|
322
|
-
* });
|
|
323
|
-
* ```
|
|
324
|
-
*
|
|
325
|
-
* The filter changes the request body only. The transcript the UI renders is
|
|
326
|
-
* untouched. Broken tool-call pairs are repaired before the request is sent,
|
|
327
|
-
* so a filter this blunt cannot strand a tool result mid-HITL.
|
|
328
|
-
*
|
|
329
|
-
* Agents reached through your CopilotRuntime honor this. An agent your app
|
|
330
|
-
* passes in directly does not, and neither Intelligence runs nor suggestion
|
|
331
|
-
* runs are ever filtered.
|
|
224
|
+
* Your CopilotKit public license key (`publicApiKey` in React and Vue).
|
|
225
|
+
* With no `runtimeUrl`, CopilotKit uses Copilot Cloud.
|
|
332
226
|
*/
|
|
333
|
-
messageFilter?: CopilotKitMessageFilter;
|
|
334
227
|
licenseKey?: string;
|
|
335
|
-
|
|
228
|
+
/** Local agents, keyed by id (`agents__unsafe_dev_only` in React and Vue). */
|
|
336
229
|
agents?: Record<string, AbstractAgent>;
|
|
337
|
-
selfManagedAgents?: Record<string, AbstractAgent>;
|
|
338
230
|
tools?: ClientTool[];
|
|
339
231
|
renderToolCalls?: RenderToolCallConfig[];
|
|
340
232
|
renderActivityMessages?: RenderActivityMessageConfig[];
|
|
@@ -343,7 +235,6 @@ interface CopilotKitConfig {
|
|
|
343
235
|
humanInTheLoop?: HumanInTheLoopConfig[];
|
|
344
236
|
/** Opt in to a text-only renderer for otherwise unknown tool calls. */
|
|
345
237
|
defaultToolRendering?: boolean;
|
|
346
|
-
a2ui?: A2UIConfig;
|
|
347
238
|
openGenerativeUI?: OpenGenerativeUIConfig;
|
|
348
239
|
/**
|
|
349
240
|
* Disable the CopilotKit Inspector in development.
|
|
@@ -351,6 +242,30 @@ interface CopilotKitConfig {
|
|
|
351
242
|
* always disabled in production and during server rendering.
|
|
352
243
|
*/
|
|
353
244
|
enableInspector?: boolean;
|
|
245
|
+
/**
|
|
246
|
+
* Turns on interaction capture (`@copilotkit/learning`). `true` records with
|
|
247
|
+
* the default options; pass an object for options. Without a sink, Core
|
|
248
|
+
* authenticates with the runtime and sends browser events to Intelligence;
|
|
249
|
+
* a custom sink keeps the standalone collector behavior.
|
|
250
|
+
*
|
|
251
|
+
* Capture starts in the browser once `CopilotKit` is created. Set
|
|
252
|
+
* `trajectoryId` to use your own ID; otherwise one is generated. Set
|
|
253
|
+
* `autoStart: false` to start capture yourself with
|
|
254
|
+
* `copilotKit.core.startTrajectory()`. Capture stops when the application
|
|
255
|
+
* is destroyed, including manually started Trajectories. Read the active ID
|
|
256
|
+
* from `copilotKit.core.trajectoryId`.
|
|
257
|
+
*
|
|
258
|
+
* @example
|
|
259
|
+
* provideCopilotKit({ runtimeUrl: "/api/copilotkit", learning: true })
|
|
260
|
+
*/
|
|
261
|
+
learning?: boolean | _CopilotKitLearningOptions;
|
|
262
|
+
/**
|
|
263
|
+
* Set to `false` when you list `@copilotkit/core/styles.css` in your
|
|
264
|
+
* `angular.json` styles, so browsers cache the CSS as a file. CopilotKit then
|
|
265
|
+
* adds no `<style>` tag. For a CSP nonce, provide Angular's `CSP_NONCE`.
|
|
266
|
+
* @default true
|
|
267
|
+
*/
|
|
268
|
+
injectStyles?: boolean;
|
|
354
269
|
}
|
|
355
270
|
declare const COPILOT_KIT_CONFIG: InjectionToken<CopilotKitConfig>;
|
|
356
271
|
declare function injectCopilotKitConfig(): CopilotKitConfig;
|
|
@@ -364,7 +279,26 @@ declare class CopilotKit {
|
|
|
364
279
|
readonly runtimeConnectionStatus: Signal<CopilotKitCoreRuntimeConnectionStatus>;
|
|
365
280
|
readonly runtimeUrl: Signal<string | undefined>;
|
|
366
281
|
readonly runtimeTransport: Signal<CopilotRuntimeTransport>;
|
|
282
|
+
/**
|
|
283
|
+
* Snapshot as of the last header SOURCE change (a `setHeaders()`/
|
|
284
|
+
* `updateRuntime({ headers })` call) — not necessarily current for a
|
|
285
|
+
* builder. It updates from `onHeadersChanged`, which fires only on a real
|
|
286
|
+
* source change, never on a builder merely resolving a fresh token during a
|
|
287
|
+
* run. With a builder this can read `{}` (or a stale record) between
|
|
288
|
+
* source changes even though requests are already carrying the current
|
|
289
|
+
* token (#1937). For the value a builder would resolve right now, call
|
|
290
|
+
* `copilotkit.core.resolveHeaders()` instead.
|
|
291
|
+
*/
|
|
367
292
|
readonly headers: Signal<Record<string, string>>;
|
|
293
|
+
/**
|
|
294
|
+
* Bumped only when `setHeaders` accepts a real source change (a new
|
|
295
|
+
* builder identity, or a record whose normalized values actually differ) —
|
|
296
|
+
* never when a builder merely resolves a new token. Set from
|
|
297
|
+
* `onHeadersChanged`, which fires only from a real `setHeaders()` call, so
|
|
298
|
+
* subscribers can key thread-context dispatch and agent header refresh on
|
|
299
|
+
* this signal instead of on header VALUES (see #1937).
|
|
300
|
+
*/
|
|
301
|
+
readonly ɵheadersGeneration: Signal<number>;
|
|
368
302
|
readonly credentials: Signal<RequestCredentials | undefined>;
|
|
369
303
|
/**
|
|
370
304
|
* Thread-endpoint capability advertised by the connected runtime's `/info`
|
|
@@ -372,7 +306,7 @@ declare class CopilotKit {
|
|
|
372
306
|
* as a signal (rather than a plain `core.threadEndpoints` read) so reactive
|
|
373
307
|
* consumers re-run when `/info` lands.
|
|
374
308
|
*/
|
|
375
|
-
readonly threadEndpoints: Signal<ThreadEndpointRuntimeInfo | undefined>;
|
|
309
|
+
readonly threadEndpoints: Signal<_copilotkit_shared.ThreadEndpointRuntimeInfo | undefined>;
|
|
376
310
|
/**
|
|
377
311
|
* Voice transcription capability advertised by the connected runtime's
|
|
378
312
|
* `/info` response. The value remains false until the runtime explicitly
|
|
@@ -386,19 +320,19 @@ declare class CopilotKit {
|
|
|
386
320
|
* when `/info` populates it — even if the connection status does not
|
|
387
321
|
* transition in the same turn.
|
|
388
322
|
*/
|
|
389
|
-
readonly intelligence: Signal<IntelligenceRuntimeInfo | undefined>;
|
|
323
|
+
readonly intelligence: Signal<_copilotkit_shared.IntelligenceRuntimeInfo | undefined>;
|
|
390
324
|
/**
|
|
391
325
|
* Server-reported license status from the connected runtime's `/info`
|
|
392
326
|
* response, or `undefined` before the runtime reports it. Exposed as a signal
|
|
393
327
|
* (rather than a plain `core.licenseStatus` read) so reactive consumers — e.g.
|
|
394
328
|
* the threads drawer's license gate — re-run once the status resolves.
|
|
395
329
|
*/
|
|
396
|
-
readonly licenseStatus: Signal<RuntimeLicenseStatus | undefined>;
|
|
330
|
+
readonly licenseStatus: Signal<_copilotkit_shared.RuntimeLicenseStatus | undefined>;
|
|
397
331
|
/**
|
|
398
332
|
* Structured entitlement authority from the connected runtime's `/info`
|
|
399
333
|
* response. Ready managed entitlements override legacy license status.
|
|
400
334
|
*/
|
|
401
|
-
readonly runtimeEntitlements: Signal<RuntimeEntitlementResponse | undefined>;
|
|
335
|
+
readonly runtimeEntitlements: Signal<_copilotkit_shared.RuntimeEntitlementResponse | undefined>;
|
|
402
336
|
/**
|
|
403
337
|
* Whether Core still owes the one bounded retry for a retryable entitlement
|
|
404
338
|
* lookup. Gated UI stays pending until that retry settles.
|
|
@@ -410,46 +344,196 @@ declare class CopilotKit {
|
|
|
410
344
|
readonly clientToolCallRenderConfigs: Signal<FrontendToolConfig[]>;
|
|
411
345
|
readonly humanInTheLoopToolRenderConfigs: Signal<HumanInTheLoopConfig[]>;
|
|
412
346
|
readonly activityMessageRenderConfigs: Signal<RenderActivityMessageConfig[]>;
|
|
347
|
+
/**
|
|
348
|
+
* Ids of the tool calls whose frontend handler runs now. Mirrors
|
|
349
|
+
* `core.executingToolCallIds`: a call stays in it until its result is in
|
|
350
|
+
* the agent's messages.
|
|
351
|
+
*/
|
|
352
|
+
readonly executingToolCallIds: Signal<ReadonlySet<string>>;
|
|
413
353
|
constructor();
|
|
354
|
+
/**
|
|
355
|
+
* Register a frontend tool, and the component that draws its calls when it
|
|
356
|
+
* has one.
|
|
357
|
+
*
|
|
358
|
+
* A tool with the same name and `agentId` as an existing tool (from the
|
|
359
|
+
* `tools` config or an earlier registration) hides that tool. The latest
|
|
360
|
+
* registration runs. Among frontend tools with that name, its component
|
|
361
|
+
* draws the calls.
|
|
362
|
+
*
|
|
363
|
+
* @param clientToolWithInjector - The tool, plus the injector its handler
|
|
364
|
+
* runs in.
|
|
365
|
+
* @returns A function that removes only this registration. The tool it hid
|
|
366
|
+
* becomes active again. Calling it more than once does nothing.
|
|
367
|
+
*
|
|
368
|
+
* @example
|
|
369
|
+
* ```ts
|
|
370
|
+
* const unregister = copilotKit.addFrontendTool({ ...tool, injector });
|
|
371
|
+
* // later
|
|
372
|
+
* unregister();
|
|
373
|
+
* ```
|
|
374
|
+
*/
|
|
414
375
|
addFrontendTool(clientToolWithInjector: FrontendToolConfig & {
|
|
415
376
|
injector: Injector;
|
|
416
|
-
}): void;
|
|
417
|
-
|
|
377
|
+
}): () => void;
|
|
378
|
+
/**
|
|
379
|
+
* Register a component that draws calls of a tool the agent already has.
|
|
380
|
+
*
|
|
381
|
+
* It replaces a renderer with the same `name` and `agentId`, so the latest
|
|
382
|
+
* registration wins, as in React and Vue.
|
|
383
|
+
*
|
|
384
|
+
* @param renderConfig - The tool name, its argument schema, and the
|
|
385
|
+
* component.
|
|
386
|
+
* @returns A function that removes this renderer while it is still the one
|
|
387
|
+
* registered for its name and agent. A `renderToolCalls` config entry it
|
|
388
|
+
* replaced shows again. Calling it more than once does nothing.
|
|
389
|
+
*/
|
|
390
|
+
addRenderToolCall(renderConfig: RenderToolCallConfig): () => void;
|
|
418
391
|
addRenderActivityMessage(renderConfig: RenderActivityMessageConfig): void;
|
|
419
392
|
/** Remove one dynamically registered activity renderer by identity. */
|
|
420
393
|
removeRenderActivityMessage(renderConfig: RenderActivityMessageConfig): void;
|
|
421
|
-
|
|
394
|
+
/**
|
|
395
|
+
* Register a human-in-the-loop tool and the component that asks the user.
|
|
396
|
+
*
|
|
397
|
+
* A tool with the same name and `agentId` as an existing tool hides that
|
|
398
|
+
* tool. The latest registration runs. Among human-in-the-loop tools with
|
|
399
|
+
* that name, its component draws the calls.
|
|
400
|
+
*
|
|
401
|
+
* @param humanInTheLoopTool - The tool and its component.
|
|
402
|
+
* @returns A function that removes only this registration. The tool it hid
|
|
403
|
+
* becomes active again. Calling it more than once does nothing.
|
|
404
|
+
*/
|
|
405
|
+
addHumanInTheLoop(humanInTheLoopTool: HumanInTheLoopConfig): () => void;
|
|
422
406
|
addSuggestionsConfig(config: SuggestionsConfig): string;
|
|
407
|
+
/**
|
|
408
|
+
* Registers a suggestions config for as long as the calling context lives:
|
|
409
|
+
* the Angular counterpart of `useConfigureSuggestions` in React and Vue.
|
|
410
|
+
*
|
|
411
|
+
* Call it in an injection context (a constructor or field initializer), or
|
|
412
|
+
* pass `injector`. A global config (no `consumerAgentId`, or `"*"`) loads
|
|
413
|
+
* for the surrounding chat configuration's agent and every idle agent. The
|
|
414
|
+
* config is removed when that context is destroyed or `dispose()` is called.
|
|
415
|
+
* Pass a function to re-apply the config when signals it reads change;
|
|
416
|
+
* configs with equal content are no-ops.
|
|
417
|
+
*
|
|
418
|
+
* @example
|
|
419
|
+
* readonly suggestions = inject(CopilotKit).configureSuggestions(() => ({
|
|
420
|
+
* instructions: `Suggest next steps about ${this.topic()}`,
|
|
421
|
+
* available: "always",
|
|
422
|
+
* }));
|
|
423
|
+
*/
|
|
424
|
+
configureSuggestions(config: _SuggestionsConfigInput | null | undefined | (() => _SuggestionsConfigInput | null | undefined), options?: {
|
|
425
|
+
injector?: Injector;
|
|
426
|
+
}): {
|
|
427
|
+
reload: () => void;
|
|
428
|
+
dispose: () => void;
|
|
429
|
+
};
|
|
423
430
|
removeSuggestionsConfig(id: string): void;
|
|
424
431
|
reloadSuggestions(agentId: string): void;
|
|
425
432
|
clearSuggestions(agentId: string): void;
|
|
426
433
|
getSuggestions(agentId: string): CopilotKitCoreGetSuggestionsResult;
|
|
434
|
+
/**
|
|
435
|
+
* Remove every tool and renderer with this name.
|
|
436
|
+
*
|
|
437
|
+
* With an `agentId`, only entries for that agent go. Without one, only
|
|
438
|
+
* global entries go. This also removes a tool from the `tools` config with
|
|
439
|
+
* that name. To remove one registration and bring back the tool it hid,
|
|
440
|
+
* call the function that `addFrontendTool`, `addHumanInTheLoop`, or
|
|
441
|
+
* `addRenderToolCall` returned.
|
|
442
|
+
*
|
|
443
|
+
* @param toolName - The tool name.
|
|
444
|
+
* @param agentId - The agent the entries belong to. Omit it for global
|
|
445
|
+
* entries.
|
|
446
|
+
*/
|
|
427
447
|
removeTool(toolName: string, agentId?: string): void;
|
|
428
448
|
getAgent(agentId: string): AbstractAgent | undefined;
|
|
449
|
+
/**
|
|
450
|
+
* Change the runtime config after startup.
|
|
451
|
+
*
|
|
452
|
+
* A key that is present is applied. `runtimeUrl`, `credentials`,
|
|
453
|
+
* `messageFilter`, `debug` and `defaultThrottleMs` can be cleared by
|
|
454
|
+
* passing `undefined`; the other keys are ignored when `undefined`.
|
|
455
|
+
* `agents` and `selfManagedAgents` replace the last value of that key.
|
|
456
|
+
*/
|
|
429
457
|
updateRuntime(options: {
|
|
430
458
|
runtimeUrl?: string;
|
|
431
459
|
runtimeTransport?: CopilotRuntimeTransport;
|
|
432
|
-
headers?:
|
|
460
|
+
headers?: CopilotKitHeadersSource;
|
|
433
461
|
credentials?: RequestCredentials;
|
|
434
462
|
messageFilter?: CopilotKitMessageFilter;
|
|
435
463
|
properties?: Record<string, unknown>;
|
|
436
464
|
agents?: Record<string, AbstractAgent>;
|
|
437
465
|
selfManagedAgents?: Record<string, AbstractAgent>;
|
|
466
|
+
debug?: DebugConfig;
|
|
467
|
+
defaultThrottleMs?: number;
|
|
438
468
|
}): void;
|
|
439
469
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CopilotKit, never>;
|
|
440
470
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<CopilotKit>;
|
|
441
471
|
}
|
|
442
472
|
|
|
443
|
-
/**
|
|
473
|
+
/** A grouped call that never got a result after the run ended is "stopped". */
|
|
474
|
+
type ToolCallRowStatus = _ToolCallRowStatus;
|
|
475
|
+
type CopilotChatToolCallGroupAppearance = _ToolCallGroupAppearance;
|
|
476
|
+
/**
|
|
477
|
+
* Handed to each tool-call renderer through its injector, like React's
|
|
478
|
+
* `ToolCallGroupContext`. Inside a group, `row` is set, so CopilotKit's
|
|
479
|
+
* built-in card draws itself as a compact row that fits the group.
|
|
480
|
+
* @internal
|
|
481
|
+
*/
|
|
482
|
+
interface ToolCallRenderContext {
|
|
483
|
+
toolCallId: string;
|
|
484
|
+
row?: {
|
|
485
|
+
appearance: CopilotChatToolCallGroupAppearance;
|
|
486
|
+
status: Signal<ToolCallRowStatus>;
|
|
487
|
+
};
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
/**
|
|
491
|
+
* Serialize untrusted tool values defensively for text-only display.
|
|
492
|
+
*
|
|
493
|
+
* Unlike a plain `JSON.stringify`, a value that cannot be encoded does not
|
|
494
|
+
* fail the whole payload: a circular reference reads `"[Circular]"`, a
|
|
495
|
+
* `bigint` reads `"12n"`, and `undefined`, functions and symbols get a
|
|
496
|
+
* placeholder. Strings pass through. Core's `ɵstringifyToolCallPayload`.
|
|
497
|
+
*
|
|
498
|
+
* @param value - A tool call's arguments or result.
|
|
499
|
+
*/
|
|
444
500
|
declare function safeToolValue(value: unknown): string;
|
|
445
|
-
/**
|
|
501
|
+
/**
|
|
502
|
+
* CopilotKit's built-in tool-call card, the same as React's
|
|
503
|
+
* `DefaultToolCallRenderer`. Turn it on with `defaultToolRendering: true`.
|
|
504
|
+
* Inside a group of calls (see `toolCallDisplay`) it draws a compact row that
|
|
505
|
+
* fits the group instead of a card.
|
|
506
|
+
*/
|
|
446
507
|
declare class CopilotDefaultToolRenderer implements ToolRenderer {
|
|
508
|
+
#private;
|
|
447
509
|
readonly toolCall: _angular_core.InputSignal<AngularToolCall>;
|
|
510
|
+
protected readonly toolCallId: string | null;
|
|
511
|
+
protected readonly row: _angular_core.WritableSignal<{
|
|
512
|
+
appearance: _copilotkit_angular.CopilotChatToolCallGroupAppearance;
|
|
513
|
+
status: _angular_core.Signal<ToolCallRowStatus>;
|
|
514
|
+
} | undefined>;
|
|
515
|
+
protected readonly detailsId: string;
|
|
516
|
+
protected readonly labels: _copilotkit_core.CopilotChatLabels;
|
|
517
|
+
protected readonly rowStatusLabelKeys: {
|
|
518
|
+
readonly running: "toolCallStatusRunningLabel";
|
|
519
|
+
readonly done: "toolCallStatusDoneLabel";
|
|
520
|
+
readonly failed: "toolCallStatusFailedLabel";
|
|
521
|
+
readonly stopped: "toolCallStatusStoppedLabel";
|
|
522
|
+
};
|
|
523
|
+
protected readonly ChevronRightIcon: _copilotkit_core.CopilotIconData;
|
|
448
524
|
protected readonly expanded: _angular_core.WritableSignal<boolean>;
|
|
525
|
+
protected readonly name: _angular_core.Signal<string>;
|
|
449
526
|
protected readonly argumentsText: _angular_core.Signal<string>;
|
|
450
527
|
protected readonly resultText: _angular_core.Signal<string>;
|
|
451
|
-
protected readonly
|
|
452
|
-
protected readonly
|
|
528
|
+
protected readonly argsAttr: _angular_core.Signal<string>;
|
|
529
|
+
protected readonly resultAttr: _angular_core.Signal<string>;
|
|
530
|
+
protected readonly preview: _angular_core.Signal<string | undefined>;
|
|
531
|
+
protected readonly statusValue: _angular_core.Signal<"executing" | "complete" | "unknown" | "inProgress">;
|
|
532
|
+
/** Colors the status dot and badge: running, done, or anything else. */
|
|
533
|
+
protected readonly tone: _angular_core.Signal<"running" | "done" | "other">;
|
|
534
|
+
protected readonly statusLabel: _angular_core.Signal<string>;
|
|
535
|
+
protected readonly chevronClass: _angular_core.Signal<string>;
|
|
536
|
+
protected readonly rowChevronClass: _angular_core.Signal<string>;
|
|
453
537
|
protected toggleExpanded(): void;
|
|
454
538
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CopilotDefaultToolRenderer, never>;
|
|
455
539
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CopilotDefaultToolRenderer, "copilot-default-tool-renderer", never, { "toolCall": { "alias": "toolCall"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
@@ -474,7 +558,10 @@ type BuiltInToolCallHandler = {
|
|
|
474
558
|
};
|
|
475
559
|
};
|
|
476
560
|
type ToolCallHandler = RendererToolCallHandler | ClientToolCallHandler | HumanInTheLoopToolCallHandler | BuiltInToolCallHandler;
|
|
477
|
-
/**
|
|
561
|
+
/**
|
|
562
|
+
* Parse tool-call arguments without allowing malformed payloads to escape.
|
|
563
|
+
* See `ɵparseToolCallArguments` in `@copilotkit/core` for the rules.
|
|
564
|
+
*/
|
|
478
565
|
declare function parseToolCallArguments(rawArguments: string, allowPartial?: boolean): Record<string, unknown>;
|
|
479
566
|
interface PickToolCallHandlerOptions {
|
|
480
567
|
name: string;
|
|
@@ -484,14 +571,57 @@ interface PickToolCallHandlerOptions {
|
|
|
484
571
|
humanInTheLoop: readonly HumanInTheLoopConfig[];
|
|
485
572
|
builtInFallback: boolean;
|
|
486
573
|
}
|
|
487
|
-
/**
|
|
574
|
+
/**
|
|
575
|
+
* Pick what draws a tool call. This follows the same rules as React and Vue.
|
|
576
|
+
*
|
|
577
|
+
* The first rule that matches wins:
|
|
578
|
+
*
|
|
579
|
+
* 1. A renderer for `name` with `agentId` equal to the current agent.
|
|
580
|
+
* 2. A renderer for `name` with no `agentId`.
|
|
581
|
+
* 3. The first renderer for `name` from any other agent.
|
|
582
|
+
* 4. The first `"*"` renderer, from any agent.
|
|
583
|
+
* 5. The built-in card, when `builtInFallback` is `true`.
|
|
584
|
+
*
|
|
585
|
+
* Inside rules 1 to 4, `application` renderers come first, then `frontend`
|
|
586
|
+
* tools that have a `component`, then `humanInTheLoop` tools. Inside each
|
|
587
|
+
* group, the earlier entry in its list wins.
|
|
588
|
+
*
|
|
589
|
+
* @param options - The tool name, the current agent, the three renderer
|
|
590
|
+
* lists, and whether the built-in card may draw unknown tools.
|
|
591
|
+
* @returns The handler to draw with, or `undefined` to draw nothing.
|
|
592
|
+
*
|
|
593
|
+
* @example
|
|
594
|
+
* ```ts
|
|
595
|
+
* const handler = pickToolCallHandler({
|
|
596
|
+
* name: toolCall.function.name,
|
|
597
|
+
* agentId: "weather-agent",
|
|
598
|
+
* application: copilotKit.toolCallRenderConfigs(),
|
|
599
|
+
* frontend: copilotKit.clientToolCallRenderConfigs(),
|
|
600
|
+
* humanInTheLoop: copilotKit.humanInTheLoopToolRenderConfigs(),
|
|
601
|
+
* builtInFallback: copilotKit.defaultToolRenderingEnabled,
|
|
602
|
+
* });
|
|
603
|
+
* ```
|
|
604
|
+
*/
|
|
488
605
|
declare function pickToolCallHandler(options: PickToolCallHandlerOptions): ToolCallHandler | undefined;
|
|
489
|
-
|
|
606
|
+
/**
|
|
607
|
+
* Renders one tool call through the registered renderers. The renderer can
|
|
608
|
+
* inject `TOOL_CALL_RENDER_CONTEXT` for the call's id and, inside a group,
|
|
609
|
+
* the row it is drawn as.
|
|
610
|
+
*/
|
|
611
|
+
declare class RenderToolCall {
|
|
490
612
|
#private;
|
|
613
|
+
readonly toolCall: _angular_core.InputSignal<ToolCall>;
|
|
614
|
+
/** The assistant message the call belongs to (or whose group it joined). */
|
|
491
615
|
readonly message: _angular_core.InputSignal<AssistantMessage>;
|
|
492
616
|
readonly messages: _angular_core.InputSignal<Message[]>;
|
|
493
617
|
readonly isLoading: _angular_core.InputSignal<boolean>;
|
|
494
618
|
readonly agentId: _angular_core.InputSignal<string | undefined>;
|
|
619
|
+
/** Set by a tool-call group: how the call's row looks. */
|
|
620
|
+
readonly row: _angular_core.InputSignal<{
|
|
621
|
+
appearance: _copilotkit_angular.CopilotChatToolCallGroupAppearance;
|
|
622
|
+
status: _angular_core.Signal<ToolCallRowStatus>;
|
|
623
|
+
} | undefined>;
|
|
624
|
+
protected readonly renderInjector: _angular_core.Signal<_angular_core.DestroyableInjector>;
|
|
495
625
|
protected pickRenderer(name: string): ToolCallHandler | undefined;
|
|
496
626
|
protected buildToolCall<Args extends Record<string, unknown>>(toolCall: ToolCall): AngularToolCall<Args>;
|
|
497
627
|
protected buildRendererInputs<Args extends Record<string, unknown>>(toolCall: ToolCall, handler: RendererToolCallHandler | ClientToolCallHandler | BuiltInToolCallHandler): {
|
|
@@ -499,6 +629,15 @@ declare class RenderToolCalls {
|
|
|
499
629
|
agent?: AbstractAgent;
|
|
500
630
|
};
|
|
501
631
|
protected buildHumanInTheLoopToolCall<Args extends Record<string, unknown>>(toolCall: ToolCall): HumanInTheLoopToolCall<Args>;
|
|
632
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<RenderToolCall, never>;
|
|
633
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<RenderToolCall, "copilot-render-tool-call", never, { "toolCall": { "alias": "toolCall"; "required": true; "isSignal": true; }; "message": { "alias": "message"; "required": true; "isSignal": true; }; "messages": { "alias": "messages"; "required": true; "isSignal": true; }; "isLoading": { "alias": "isLoading"; "required": false; "isSignal": true; }; "agentId": { "alias": "agentId"; "required": false; "isSignal": true; }; "row": { "alias": "row"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
634
|
+
}
|
|
635
|
+
/** Renders every tool call of an assistant message, each on its own. */
|
|
636
|
+
declare class RenderToolCalls {
|
|
637
|
+
readonly message: _angular_core.InputSignal<AssistantMessage>;
|
|
638
|
+
readonly messages: _angular_core.InputSignal<Message[]>;
|
|
639
|
+
readonly isLoading: _angular_core.InputSignal<boolean>;
|
|
640
|
+
readonly agentId: _angular_core.InputSignal<string | undefined>;
|
|
502
641
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<RenderToolCalls, never>;
|
|
503
642
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<RenderToolCalls, "copilot-render-tool-calls", never, { "message": { "alias": "message"; "required": true; "isSignal": true; }; "messages": { "alias": "messages"; "required": true; "isSignal": true; }; "isLoading": { "alias": "isLoading"; "required": false; "isSignal": true; }; "agentId": { "alias": "agentId"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
504
643
|
}
|
|
@@ -511,11 +650,6 @@ declare class RenderToolCalls {
|
|
|
511
650
|
*/
|
|
512
651
|
declare const ɵCOPILOTKIT_INSPECTOR_DEVELOPMENT_MODE: InjectionToken<boolean>;
|
|
513
652
|
|
|
514
|
-
/** Legacy custom-event interrupt payload. */
|
|
515
|
-
interface InterruptEvent<TValue = unknown> {
|
|
516
|
-
name: string;
|
|
517
|
-
value: TValue;
|
|
518
|
-
}
|
|
519
653
|
/** Options forwarded when resuming an interrupted agent. */
|
|
520
654
|
interface InterruptRunOptions {
|
|
521
655
|
runId?: string;
|
|
@@ -531,52 +665,43 @@ interface InjectInterruptOptions<TValue = unknown, TResult = never> {
|
|
|
531
665
|
/** Optionally prepare data for the interrupt UI. */
|
|
532
666
|
handler?: (props: InterruptHandlerProps<TValue>) => TResult | PromiseLike<TResult>;
|
|
533
667
|
}
|
|
534
|
-
/**
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
resolve: InterruptController<TValue>["resolve"];
|
|
540
|
-
cancel: InterruptController<TValue>["cancel"];
|
|
541
|
-
}
|
|
542
|
-
/** Reactive data suitable for binding to an application interrupt component. */
|
|
543
|
-
interface InterruptView<TValue = unknown, TResult = unknown> extends InterruptHandlerProps<TValue> {
|
|
544
|
-
result: TResult | null;
|
|
545
|
-
}
|
|
668
|
+
/**
|
|
669
|
+
* Reactive data suitable for binding to an application interrupt component:
|
|
670
|
+
* the handler props plus the handler's `result` (`null` until it settles).
|
|
671
|
+
*/
|
|
672
|
+
type InterruptView<TValue = unknown, TResult = unknown> = InterruptRenderProps<TValue, TResult | null>;
|
|
546
673
|
type InterruptRunner = (agent: AbstractAgent, options: InterruptRunOptions) => Promise<RunAgentResult>;
|
|
547
|
-
|
|
548
|
-
declare class InterruptExpiredError extends Error {
|
|
549
|
-
readonly interrupt: Interrupt;
|
|
550
|
-
constructor(interrupt: Interrupt);
|
|
551
|
-
}
|
|
674
|
+
|
|
552
675
|
/**
|
|
553
|
-
* Signal-based state machine for standard AG-UI and legacy interrupts.
|
|
676
|
+
* Signal-based state machine for standard AG-UI and legacy interrupts. It
|
|
677
|
+
* projects core's `ɵInterruptController` into Angular signals.
|
|
554
678
|
*
|
|
555
679
|
* Prefer {@link injectInterrupt} in application components. The public class is
|
|
556
680
|
* useful for framework adapters and deterministic lifecycle tests.
|
|
557
681
|
*/
|
|
558
682
|
declare class InterruptController<TValue = unknown, TResult = never> {
|
|
559
683
|
#private;
|
|
684
|
+
readonly view: Signal<InterruptView<TValue, TResult> | null>;
|
|
560
685
|
readonly event: Signal<InterruptEvent<TValue> | null>;
|
|
561
686
|
readonly interrupt: Signal<Interrupt | null>;
|
|
562
687
|
readonly interrupts: Signal<readonly Interrupt[]>;
|
|
563
688
|
readonly result: Signal<TResult | null>;
|
|
564
689
|
readonly error: Signal<unknown>;
|
|
565
690
|
readonly hasInterrupt: Signal<boolean>;
|
|
566
|
-
readonly view: Signal<InterruptView<TValue, TResult> | null>;
|
|
567
|
-
constructor(runner: InterruptRunner, options?: InjectInterruptOptions<TValue, TResult>);
|
|
568
|
-
/** Subscribe to an agent, replacing any previous lifecycle subscription. */
|
|
569
|
-
connect(agent: AbstractAgent): void;
|
|
570
|
-
/** Clear pending decisions when the host changes threads. */
|
|
571
|
-
setThreadId(threadId: string): void;
|
|
572
691
|
/** Resolve one interrupt, resuming only after the complete set is addressed. */
|
|
573
692
|
readonly resolve: (payload?: unknown, interruptId?: string) => Promise<RunAgentResult | void>;
|
|
574
693
|
/** Cancel one standard interrupt; legacy interrupts are dismissed locally. */
|
|
575
694
|
readonly cancel: (interruptId?: string) => Promise<RunAgentResult | void>;
|
|
576
695
|
/** Alias retained for parity with other CopilotKit framework adapters. */
|
|
577
|
-
readonly resolveInterrupt:
|
|
696
|
+
readonly resolveInterrupt: InterruptController<TValue, TResult>["resolve"];
|
|
578
697
|
/** Alias retained for parity with other CopilotKit framework adapters. */
|
|
579
|
-
readonly cancelInterrupt:
|
|
698
|
+
readonly cancelInterrupt: InterruptController<TValue, TResult>["cancel"];
|
|
699
|
+
/** Configure the runner and optional interrupt filtering and preprocessing. */
|
|
700
|
+
constructor(runner: InterruptRunner, options?: InjectInterruptOptions<TValue, TResult>);
|
|
701
|
+
/** Subscribe to an agent, replacing any previous lifecycle subscription. */
|
|
702
|
+
connect(agent: AbstractAgent): void;
|
|
703
|
+
/** Clear pending decisions when the host changes threads. */
|
|
704
|
+
setThreadId(threadId: string): void;
|
|
580
705
|
/** Release the agent subscription and clear sensitive pending state. */
|
|
581
706
|
destroy(): void;
|
|
582
707
|
}
|
|
@@ -627,32 +752,14 @@ declare function injectInterrupt<TValue = unknown, TResult = never>(options?: In
|
|
|
627
752
|
/**
|
|
628
753
|
* A conversation thread managed by CopilotKit Intelligence.
|
|
629
754
|
*
|
|
630
|
-
* Each thread has a unique `id`,
|
|
631
|
-
*
|
|
632
|
-
* `
|
|
633
|
-
*
|
|
755
|
+
* Each thread has a unique `id`, the `agentId` it belongs to, an optional
|
|
756
|
+
* human-readable `name` (`null` when unnamed), an `archived` flag, and the
|
|
757
|
+
* ISO-8601 `createdAt` and `updatedAt` timestamps. `lastRunAt` is the time of
|
|
758
|
+
* the most recent agent run, absent when the thread has never run; prefer it
|
|
759
|
+
* over `updatedAt` for "last activity", since rename and archive do not bump
|
|
760
|
+
* it. The shape is core's, shared with React and Vue.
|
|
634
761
|
*/
|
|
635
|
-
|
|
636
|
-
/** Stable, server-assigned thread identifier. */
|
|
637
|
-
id: string;
|
|
638
|
-
/** The agent this thread belongs to. */
|
|
639
|
-
agentId: string;
|
|
640
|
-
/** Human-readable name, or `null` when the thread is unnamed. */
|
|
641
|
-
name: string | null;
|
|
642
|
-
/** `true` when the thread has been archived. */
|
|
643
|
-
archived: boolean;
|
|
644
|
-
/** ISO-8601 creation timestamp. */
|
|
645
|
-
createdAt: string;
|
|
646
|
-
/** ISO-8601 timestamp of the most recent metadata update. */
|
|
647
|
-
updatedAt: string;
|
|
648
|
-
/**
|
|
649
|
-
* ISO-8601 timestamp of the most recent agent run on this thread. Absent
|
|
650
|
-
* when the thread has never been run. Prefer this over `updatedAt` for
|
|
651
|
-
* user-facing "last activity" displays — it is not bumped by metadata-only
|
|
652
|
-
* actions like rename or archive.
|
|
653
|
-
*/
|
|
654
|
-
lastRunAt?: string;
|
|
655
|
-
}
|
|
762
|
+
type Thread = _ThreadSummary;
|
|
656
763
|
/**
|
|
657
764
|
* Configuration for {@link injectThreads}.
|
|
658
765
|
*
|
|
@@ -708,7 +815,8 @@ interface InjectThreadsResult {
|
|
|
708
815
|
* List/mutation errors only — excludes developer/config errors (missing
|
|
709
816
|
* runtime URL, runtime without thread endpoints) so consumer UIs do not
|
|
710
817
|
* surface dev strings to end users. Prefer this over `error` for
|
|
711
|
-
* user-facing error display.
|
|
818
|
+
* user-facing error display. Also reports a runtime that refuses to list
|
|
819
|
+
* threads for a caller without identity (no `identifyUser`).
|
|
712
820
|
*/
|
|
713
821
|
listError: Signal<Error | null>;
|
|
714
822
|
/**
|
|
@@ -777,14 +885,9 @@ interface InjectThreadsResult {
|
|
|
777
885
|
deleteThread: (threadId: string) => Promise<void>;
|
|
778
886
|
}
|
|
779
887
|
/**
|
|
780
|
-
*
|
|
781
|
-
*
|
|
782
|
-
*
|
|
783
|
-
* store with core for the active agent.
|
|
784
|
-
*
|
|
785
|
-
* One instance backs each {@link injectThreads} call. Tear-down (selector
|
|
786
|
-
* unsubscribe, store stop, core unregister) runs on the host's
|
|
787
|
-
* {@link DestroyRef}.
|
|
888
|
+
* Projects a core {@link ɵThread} record down to the public {@link Thread}
|
|
889
|
+
* shape, omitting `lastRunAt` entirely when the source value is absent so the
|
|
890
|
+
* field stays optional rather than `undefined`.
|
|
788
891
|
*/
|
|
789
892
|
declare class ThreadsStore implements InjectThreadsResult {
|
|
790
893
|
#private;
|
|
@@ -804,14 +907,9 @@ declare class ThreadsStore implements InjectThreadsResult {
|
|
|
804
907
|
readonly fetchMoreThreads: () => void;
|
|
805
908
|
readonly refetchThreads: () => void;
|
|
806
909
|
readonly startNewThread: () => void;
|
|
807
|
-
/**
|
|
910
|
+
/** Stop the store and release its registry claim. Safe to call twice. */
|
|
808
911
|
teardown(): void;
|
|
809
912
|
}
|
|
810
|
-
/**
|
|
811
|
-
* Factory for {@link ThreadsStore} instances. Provided at the root so the
|
|
812
|
-
* ambient {@link CopilotKit} configuration is resolved from the application's
|
|
813
|
-
* injector.
|
|
814
|
-
*/
|
|
815
913
|
declare class CopilotkitThreadsFactory {
|
|
816
914
|
/**
|
|
817
915
|
* Creates a {@link ThreadsStore} bound to the given input and host
|
|
@@ -853,28 +951,151 @@ declare class CopilotkitThreadsFactory {
|
|
|
853
951
|
*/
|
|
854
952
|
declare function injectThreads(input: InjectThreadsInput): InjectThreadsResult;
|
|
855
953
|
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
954
|
+
/**
|
|
955
|
+
* The default English chat text. The same object as `CopilotChatDefaultLabels`
|
|
956
|
+
* from `@copilotkit/core`, so React, Vue and Angular show the same text.
|
|
957
|
+
*/
|
|
958
|
+
declare const COPILOT_CHAT_DEFAULT_LABELS: Readonly<{
|
|
959
|
+
chatInputPlaceholder: "Type a message...";
|
|
960
|
+
chatInputToolbarStartTranscribeButtonLabel: "Transcribe";
|
|
961
|
+
chatInputToolbarCancelTranscribeButtonLabel: "Cancel";
|
|
962
|
+
chatInputToolbarFinishTranscribeButtonLabel: "Finish";
|
|
963
|
+
chatInputToolbarAddButtonLabel: "Add attachments";
|
|
964
|
+
chatInputToolbarToolsButtonLabel: "Tools";
|
|
965
|
+
chatInputToolbarSendButtonLabel: "Send message";
|
|
966
|
+
chatInputToolbarStopButtonLabel: "Stop";
|
|
967
|
+
assistantMessageToolbarCopyCodeLabel: "Copy";
|
|
968
|
+
assistantMessageToolbarCopyCodeCopiedLabel: "Copied";
|
|
969
|
+
assistantMessageToolbarCopyMessageLabel: "Copy";
|
|
970
|
+
assistantMessageToolbarInspectorLabel: "View in Inspector";
|
|
971
|
+
assistantMessageToolbarInspectorDescription: "Open this message in the Inspector";
|
|
972
|
+
assistantMessageToolbarInspectorLocalOnlyLabel: "Local only";
|
|
973
|
+
assistantMessageToolbarInspectorLocalOnlyDescription: "Only visible on localhost or loopback hosts in development. Never shown in production.";
|
|
974
|
+
assistantMessageToolbarInspectorTitle: "CopilotKit Inspector";
|
|
975
|
+
assistantMessageToolbarInspectorHideLabel: "Hide this icon";
|
|
976
|
+
assistantMessageToolbarInspectorHideDescription: "Until you reload this page";
|
|
977
|
+
assistantMessageToolbarThumbsUpLabel: "Good response";
|
|
978
|
+
assistantMessageToolbarThumbsDownLabel: "Bad response";
|
|
979
|
+
assistantMessageFeedbackCommentPlaceholder: "Add a comment (optional)";
|
|
980
|
+
assistantMessageFeedbackCommentSubmitLabel: "Send comment";
|
|
981
|
+
assistantMessageToolbarReadAloudLabel: "Read aloud";
|
|
982
|
+
assistantMessageToolbarRegenerateLabel: "Regenerate";
|
|
983
|
+
userMessageToolbarCopyMessageLabel: "Copy";
|
|
984
|
+
userMessageToolbarEditMessageLabel: "Edit";
|
|
985
|
+
userMessageToolbarPreviousBranchLabel: "Previous branch";
|
|
986
|
+
userMessageToolbarNextBranchLabel: "Next branch";
|
|
987
|
+
chatDisclaimerText: "AI can make mistakes. Please verify important information.";
|
|
988
|
+
chatToggleOpenLabel: "Open chat";
|
|
989
|
+
chatToggleCloseLabel: "Close chat";
|
|
990
|
+
chatScrollToBottomLabel: "Scroll to bottom";
|
|
991
|
+
chatConnectingLabel: "Loading conversation";
|
|
992
|
+
modalHeaderTitle: "CopilotKit Chat";
|
|
993
|
+
welcomeMessageText: "How can I help you today?";
|
|
994
|
+
reasoningMessageThinkingLabel: "Thinking\u2026";
|
|
995
|
+
chatInputSlashMenuLabel: "Slash commands";
|
|
996
|
+
chatInputSlashMenuEmptyText: "No commands found";
|
|
997
|
+
attachmentRemoveButtonLabel: "Remove attachment";
|
|
998
|
+
attachmentPlayVideoButtonLabel: "Play video";
|
|
999
|
+
attachmentPreviewCloseButtonLabel: "Close preview";
|
|
1000
|
+
modalHeaderCloseButtonLabel: "Close";
|
|
1001
|
+
modalHeaderThreadsButtonLabel: "Open threads";
|
|
1002
|
+
sidebarLabel: "Copilot chat sidebar";
|
|
1003
|
+
chatDropFilesLabel: "Drop files here";
|
|
1004
|
+
threadLoadErrorText: "Could not load saved conversation. Reopen the thread and try again.";
|
|
1005
|
+
reasoningMessageThoughtForLabel: "Thought for {duration}";
|
|
1006
|
+
reasoningMessageDurationFewSeconds: "a few seconds";
|
|
1007
|
+
reasoningMessageDurationSeconds: "{count} seconds";
|
|
1008
|
+
reasoningMessageDurationMinutesOne: "{count} minute";
|
|
1009
|
+
reasoningMessageDurationMinutesOther: "{count} minutes";
|
|
1010
|
+
reasoningMessageDurationMinutesSeconds: "{minutes}m {seconds}s";
|
|
1011
|
+
toolCallStatusRunningLabel: "Running";
|
|
1012
|
+
toolCallStatusDoneLabel: "Done";
|
|
1013
|
+
toolCallStatusFailedLabel: "Failed";
|
|
1014
|
+
toolCallStatusStoppedLabel: "Stopped";
|
|
1015
|
+
toolCallStatusUnknownLabel: "Unknown status";
|
|
1016
|
+
toolCallRunningLabel: "Running {name}";
|
|
1017
|
+
toolCallFailedCountLabel: "{count} failed";
|
|
1018
|
+
toolCallDoneCountLabel: "{count} done";
|
|
1019
|
+
toolCallArgumentsLabel: "Arguments";
|
|
1020
|
+
toolCallResultLabel: "Result";
|
|
1021
|
+
toolCallCollapseLabel: "Collapse";
|
|
1022
|
+
toolCallUsedToolsOne: "Used {count} tool";
|
|
1023
|
+
toolCallUsedToolsOther: "Used {count} tools";
|
|
1024
|
+
toolCallToolCountOne: "{count} tool";
|
|
1025
|
+
toolCallToolCountOther: "{count} tools";
|
|
1026
|
+
toolCallToolCallCountOne: "{count} tool call";
|
|
1027
|
+
toolCallToolCallCountOther: "{count} tool calls";
|
|
1028
|
+
toolCallCallCountOne: "{count} call";
|
|
1029
|
+
toolCallCallCountOther: "{count} calls";
|
|
1030
|
+
workSummaryWorkingLabel: "Working";
|
|
1031
|
+
workSummaryWorkedForLabel: "Worked for {duration}";
|
|
1032
|
+
attachmentImageLoadErrorText: "Failed to load image";
|
|
1033
|
+
attachmentImageAltText: "Image attachment";
|
|
1034
|
+
attachmentUnknownTypeText: "Unknown type";
|
|
1035
|
+
attachmentDocumentLabel: "Document";
|
|
1036
|
+
attachmentDocumentAltText: "Document attachment";
|
|
1037
|
+
attachmentNoPreviewText: "No preview available for this file type";
|
|
1038
|
+
chatAttachmentsUploadingText: "Cannot send while attachments are uploading.";
|
|
1039
|
+
transcriptionErrorRateLimitedText: "Too many requests. Please wait a moment.";
|
|
1040
|
+
transcriptionErrorAuthFailedText: "Authentication error. Please check your configuration.";
|
|
1041
|
+
transcriptionErrorAudioTooLongText: "Recording is too long. Please try a shorter recording.";
|
|
1042
|
+
transcriptionErrorAudioTooShortText: "Recording is too short. Please try again.";
|
|
1043
|
+
transcriptionErrorInvalidAudioFormatText: "Audio format not supported.";
|
|
1044
|
+
transcriptionErrorServiceNotConfiguredText: "Transcription service is not available.";
|
|
1045
|
+
transcriptionErrorNetworkText: "Network error. Please check your connection.";
|
|
1046
|
+
transcriptionErrorGenericText: "Transcription failed. Please try again.";
|
|
1047
|
+
licensePoweredByText: "Powered by CopilotKit";
|
|
1048
|
+
licenseGetLicenseLabel: "Get a license";
|
|
1049
|
+
licenseFeatureUnlicensedText: "\u26A0 The \"{feature}\" feature requires a CopilotKit license.";
|
|
1050
|
+
licenseExpiringText: "Your CopilotKit license expires soon. Please renew.";
|
|
1051
|
+
licenseExpiringInDaysOne: "Your CopilotKit license expires in {days} day. Please renew.";
|
|
1052
|
+
licenseExpiringInDaysOther: "Your CopilotKit license expires in {days} days. Please renew.";
|
|
1053
|
+
licenseExpiredText: "Your CopilotKit license expired. Please renew at copilotkit.ai/pricing";
|
|
1054
|
+
licenseExpiredOnDateText: "Your CopilotKit license expired on {date}. Please renew at copilotkit.ai/pricing";
|
|
1055
|
+
licenseInvalidText: "Invalid CopilotKit license token. Please check your configuration.";
|
|
1056
|
+
licenseRenewLabel: "Renew";
|
|
1057
|
+
licenseRenewNowLabel: "Renew now";
|
|
1058
|
+
}>;
|
|
1059
|
+
/**
|
|
1060
|
+
* The chat text in scope. Set it with {@link provideCopilotChatLabels}, and
|
|
1061
|
+
* read it with {@link injectChatLabels}.
|
|
1062
|
+
*/
|
|
876
1063
|
declare const COPILOT_CHAT_LABELS: InjectionToken<CopilotChatLabels>;
|
|
1064
|
+
/**
|
|
1065
|
+
* Get the chat text in scope: the labels from the nearest
|
|
1066
|
+
* {@link provideCopilotChatLabels}, or the default English text when no
|
|
1067
|
+
* provider is in scope.
|
|
1068
|
+
*
|
|
1069
|
+
* Call it in an injection context, such as a component field initializer.
|
|
1070
|
+
*
|
|
1071
|
+
* @example
|
|
1072
|
+
* ```ts
|
|
1073
|
+
* readonly labels = injectChatLabels();
|
|
1074
|
+
* // labels.chatInputPlaceholder
|
|
1075
|
+
* ```
|
|
1076
|
+
*/
|
|
877
1077
|
declare function injectChatLabels(): CopilotChatLabels;
|
|
1078
|
+
/**
|
|
1079
|
+
* Change or translate the chat text. Keys you leave out keep their default
|
|
1080
|
+
* English text.
|
|
1081
|
+
*
|
|
1082
|
+
* Some values are templates with `{name}` placeholders, such as
|
|
1083
|
+
* `"Thought for {duration}"`. Keep the placeholders when you translate them.
|
|
1084
|
+
*
|
|
1085
|
+
* @param config - The labels to change, by key.
|
|
1086
|
+
*
|
|
1087
|
+
* @example
|
|
1088
|
+
* ```ts
|
|
1089
|
+
* bootstrapApplication(App, {
|
|
1090
|
+
* providers: [
|
|
1091
|
+
* provideCopilotChatLabels({
|
|
1092
|
+
* chatInputPlaceholder: "Frag mich etwas...",
|
|
1093
|
+
* toolCallUsedToolsOther: "{count} Tools benutzt",
|
|
1094
|
+
* }),
|
|
1095
|
+
* ],
|
|
1096
|
+
* });
|
|
1097
|
+
* ```
|
|
1098
|
+
*/
|
|
878
1099
|
declare function provideCopilotChatLabels(config: Partial<CopilotChatLabels>): Provider;
|
|
879
1100
|
|
|
880
1101
|
/**
|
|
@@ -910,106 +1131,41 @@ interface CopilotChatConfigurationOptions {
|
|
|
910
1131
|
*/
|
|
911
1132
|
declare class CopilotChatConfiguration {
|
|
912
1133
|
#private;
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
* Falls back to {@link DEFAULT_AGENT_ID} when no agent id is provided.
|
|
916
|
-
*/
|
|
1134
|
+
constructor();
|
|
1135
|
+
/** The agent this chat renders. */
|
|
917
1136
|
readonly agentId: Signal<string>;
|
|
918
1137
|
/**
|
|
919
|
-
* The
|
|
920
|
-
*
|
|
921
|
-
* Precedence (highest → lowest):
|
|
922
|
-
* 1. Prop-driven `threadId` when `#propIsAuthoritative` is true.
|
|
923
|
-
* 2. Imperative `#override` set by internal helpers.
|
|
924
|
-
* 3. Non-authoritative seed `threadId` from options.
|
|
925
|
-
* 4. Auto-minted UUID fallback.
|
|
1138
|
+
* The active thread: a controlled `threadId` option, else a picked or new
|
|
1139
|
+
* thread, else a seed `threadId`, else a UUID minted once.
|
|
926
1140
|
*/
|
|
927
1141
|
readonly threadId: Signal<string>;
|
|
928
|
-
/**
|
|
929
|
-
* Whether the current thread id was supplied explicitly by the host
|
|
930
|
-
* application (as opposed to being auto-minted or seeded without intent).
|
|
931
|
-
*/
|
|
1142
|
+
/** `true` when a caller chose the thread (not a minted placeholder). */
|
|
932
1143
|
readonly hasExplicitThreadId: Signal<boolean>;
|
|
933
|
-
/**
|
|
1144
|
+
/** `true` when the `threadId` option controls the thread. */
|
|
934
1145
|
protected get isControlled(): boolean;
|
|
935
1146
|
/**
|
|
936
|
-
*
|
|
937
|
-
*
|
|
938
|
-
*
|
|
939
|
-
* @param threadId - The thread id to activate.
|
|
940
|
-
* @param explicit - Whether the override represents a deliberate user choice.
|
|
941
|
-
*/
|
|
942
|
-
protected _setOverride(threadId: string, explicit: boolean): void;
|
|
943
|
-
/**
|
|
944
|
-
* Switches the active thread to the given id.
|
|
945
|
-
*
|
|
946
|
-
* By default the switch is treated as an explicit user-driven choice
|
|
947
|
-
* (`explicit` defaults to `true`). Pass `{ explicit: false }` to mark it as
|
|
948
|
-
* a non-explicit seed that the runtime may replace.
|
|
949
|
-
*
|
|
950
|
-
* No-ops when the threadId is controlled by the host application via props.
|
|
951
|
-
*
|
|
952
|
-
* @param threadId - The thread id to activate.
|
|
953
|
-
* @param options - Optional overrides; `explicit` defaults to `true`.
|
|
1147
|
+
* Show `threadId`. `explicit` (default `true`) marks it as a caller choice.
|
|
1148
|
+
* Ignored with a warning when the `threadId` option controls the thread.
|
|
954
1149
|
*/
|
|
955
1150
|
setActiveThreadId(threadId: string, options?: {
|
|
956
1151
|
explicit?: boolean;
|
|
957
1152
|
}): void;
|
|
958
1153
|
/**
|
|
959
|
-
*
|
|
960
|
-
*
|
|
961
|
-
* The new thread is marked as non-explicit so the runtime may assign a
|
|
962
|
-
* server-side thread id once the first message is sent.
|
|
963
|
-
*
|
|
964
|
-
* No-ops when the threadId is controlled by the host application via props.
|
|
1154
|
+
* Show a fresh client-side thread so the welcome screen shows. Ignored with
|
|
1155
|
+
* a warning when the `threadId` option controls the thread.
|
|
965
1156
|
*/
|
|
966
1157
|
startNewThread(): void;
|
|
967
|
-
/**
|
|
968
|
-
* Read-only signal reflecting the current drawer open-state.
|
|
969
|
-
*
|
|
970
|
-
* @remarks
|
|
971
|
-
* Consumed by {@link CopilotThreadsDrawer} to drive the element's controlled
|
|
972
|
-
* `open` property; a future popup or sidebar component may also toggle it to
|
|
973
|
-
* implement mobile mutual-exclusion between the drawer and other overlays.
|
|
974
|
-
*/
|
|
1158
|
+
/** Whether the thread-list drawer is open. */
|
|
975
1159
|
readonly drawerOpen: Signal<boolean>;
|
|
976
|
-
/**
|
|
977
|
-
* Sets the drawer open-state imperatively.
|
|
978
|
-
*
|
|
979
|
-
* @remarks
|
|
980
|
-
* Called by {@link CopilotThreadsDrawer} in response to the element's
|
|
981
|
-
* `open-change` event to keep the shared open-state coordinated.
|
|
982
|
-
*
|
|
983
|
-
* @param open - `true` to mark the drawer as open, `false` to close it.
|
|
984
|
-
*/
|
|
1160
|
+
/** Open or close the drawer. */
|
|
985
1161
|
setDrawerOpen(open: boolean): void;
|
|
986
|
-
/**
|
|
987
|
-
* Computed signal that is `true` when at least one drawer instance has
|
|
988
|
-
* registered itself via {@link registerDrawer}.
|
|
989
|
-
*/
|
|
1162
|
+
/** `true` while at least one threads drawer is mounted. */
|
|
990
1163
|
readonly drawerRegistered: Signal<boolean>;
|
|
991
|
-
/**
|
|
992
|
-
* Registers a drawer instance and returns an idempotent unregister function.
|
|
993
|
-
*
|
|
994
|
-
* Increments the internal drawer count so that {@link drawerRegistered}
|
|
995
|
-
* becomes `true`. The returned function decrements the count when called;
|
|
996
|
-
* calling it more than once is safe — subsequent calls are no-ops (guarded
|
|
997
|
-
* by an `active` flag, floor at 0).
|
|
998
|
-
*
|
|
999
|
-
* @remarks
|
|
1000
|
-
* Called by {@link CopilotThreadsDrawer} on construction with cleanup on
|
|
1001
|
-
* destroy. Intended for future popup/sidebar coordination as well.
|
|
1002
|
-
*
|
|
1003
|
-
* @returns An idempotent cleanup function that unregisters this drawer.
|
|
1004
|
-
*/
|
|
1164
|
+
/** Announce a mounted drawer. The returned cleanup runs once. */
|
|
1005
1165
|
registerDrawer(): () => void;
|
|
1006
1166
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CopilotChatConfiguration, never>;
|
|
1007
1167
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<CopilotChatConfiguration>;
|
|
1008
1168
|
}
|
|
1009
|
-
/**
|
|
1010
|
-
* Injection token for the {@link CopilotChatConfiguration} service instance.
|
|
1011
|
-
* Use {@link injectChatConfiguration} to retrieve it from the injector.
|
|
1012
|
-
*/
|
|
1013
1169
|
declare const COPILOT_CHAT_CONFIGURATION: InjectionToken<CopilotChatConfiguration>;
|
|
1014
1170
|
/**
|
|
1015
1171
|
* Injection token for the raw {@link CopilotChatConfigurationOptions} value
|
|
@@ -1049,9 +1205,9 @@ declare abstract class ChatState {
|
|
|
1049
1205
|
readonly suggestions: WritableSignal<Suggestion[]>;
|
|
1050
1206
|
readonly suggestionsLoading: WritableSignal<boolean>;
|
|
1051
1207
|
readonly isTranscribing: WritableSignal<boolean>;
|
|
1052
|
-
abstract submitInput(value: string): void
|
|
1208
|
+
abstract submitInput(value: string): void | Promise<void>;
|
|
1053
1209
|
abstract changeInput(value: string): void;
|
|
1054
|
-
selectSuggestion(_suggestion: Suggestion, _index: number): void
|
|
1210
|
+
selectSuggestion(_suggestion: Suggestion, _index: number): void | Promise<void>;
|
|
1055
1211
|
finishTranscription(_audioBlob: Blob): void | Promise<void>;
|
|
1056
1212
|
addFile(): void;
|
|
1057
1213
|
removeAttachment(_id: string): void;
|
|
@@ -1063,29 +1219,6 @@ declare abstract class ChatState {
|
|
|
1063
1219
|
}
|
|
1064
1220
|
declare function injectChatState(): ChatState;
|
|
1065
1221
|
|
|
1066
|
-
interface TranscriptionResult {
|
|
1067
|
-
text: string;
|
|
1068
|
-
size: number;
|
|
1069
|
-
type: string;
|
|
1070
|
-
}
|
|
1071
|
-
interface TranscriptionErrorInfo {
|
|
1072
|
-
code: TranscriptionErrorCode;
|
|
1073
|
-
message: string;
|
|
1074
|
-
retryable: boolean;
|
|
1075
|
-
}
|
|
1076
|
-
declare class TranscriptionError extends Error {
|
|
1077
|
-
readonly info: TranscriptionErrorInfo;
|
|
1078
|
-
constructor(info: TranscriptionErrorInfo);
|
|
1079
|
-
}
|
|
1080
|
-
/**
|
|
1081
|
-
* Transcribe an audio blob via the CopilotKit runtime. Uses single-endpoint
|
|
1082
|
-
* (base64 JSON) or REST (multipart `/transcribe`) mode to match the transport
|
|
1083
|
-
* configured on the core.
|
|
1084
|
-
*
|
|
1085
|
-
* @throws {TranscriptionError} with typed error info on any failure.
|
|
1086
|
-
*/
|
|
1087
|
-
declare function transcribeAudio(core: CopilotKitCore, audioBlob: Blob, filename?: string): Promise<TranscriptionResult>;
|
|
1088
|
-
|
|
1089
1222
|
interface ScrollState {
|
|
1090
1223
|
isAtBottom: boolean;
|
|
1091
1224
|
scrollTop: number;
|
|
@@ -1103,7 +1236,7 @@ declare class ScrollPosition implements OnDestroy {
|
|
|
1103
1236
|
/**
|
|
1104
1237
|
* Monitor scroll position of an element
|
|
1105
1238
|
* @param element The element to monitor
|
|
1106
|
-
* @param threshold Pixels from bottom to consider "at bottom" (default
|
|
1239
|
+
* @param threshold Pixels from bottom to consider "at bottom" (default `ɵSCROLL_BOTTOM_THRESHOLD_PX`, 12)
|
|
1107
1240
|
*/
|
|
1108
1241
|
monitorScrollPosition(element: ElementRef<HTMLElement> | HTMLElement, threshold?: number): Observable<ScrollState>;
|
|
1109
1242
|
/**
|
|
@@ -1175,22 +1308,17 @@ declare class ResizeObserverService implements OnDestroy {
|
|
|
1175
1308
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<ResizeObserverService>;
|
|
1176
1309
|
}
|
|
1177
1310
|
|
|
1178
|
-
/**
|
|
1179
|
-
* Utility function to merge Tailwind CSS classes
|
|
1180
|
-
* Combines clsx for conditional classes and tailwind-merge for proper Tailwind class merging
|
|
1181
|
-
*/
|
|
1182
|
-
declare function cn(...inputs: ClassValue[]): string;
|
|
1183
|
-
|
|
1184
1311
|
interface ConnectAgentContextConfig {
|
|
1185
1312
|
injector?: Injector;
|
|
1186
1313
|
}
|
|
1187
1314
|
/**
|
|
1188
|
-
* Connects context to the agent.
|
|
1315
|
+
* Connects context to the agent. A non-string `value` is sent as its JSON
|
|
1316
|
+
* text, as in React and Vue.
|
|
1189
1317
|
*
|
|
1190
1318
|
* @param context - The context (or reactive zero-argument accessor) to connect.
|
|
1191
1319
|
* @param config - Optional configuration for connecting the context.
|
|
1192
1320
|
*/
|
|
1193
|
-
declare function connectAgentContext(context:
|
|
1321
|
+
declare function connectAgentContext(context: _AgentContextInput | (() => _AgentContextInput), config?: ConnectAgentContextConfig): void;
|
|
1194
1322
|
|
|
1195
1323
|
/**
|
|
1196
1324
|
* Return value of {@link injectMemories}.
|
|
@@ -1535,7 +1663,7 @@ declare class CopilotKitAgentContext implements OnInit, OnChanges, OnDestroy {
|
|
|
1535
1663
|
* Context object containing both description and value.
|
|
1536
1664
|
* If provided, this takes precedence over individual inputs.
|
|
1537
1665
|
*/
|
|
1538
|
-
context?:
|
|
1666
|
+
context?: _AgentContextInput;
|
|
1539
1667
|
/**
|
|
1540
1668
|
* Description of the context.
|
|
1541
1669
|
* Used when context object is not provided.
|
|
@@ -1571,14 +1699,18 @@ declare class CopilotKitAgentContext implements OnInit, OnChanges, OnDestroy {
|
|
|
1571
1699
|
|
|
1572
1700
|
type ScrollBehavior = "smooth" | "instant" | "auto";
|
|
1573
1701
|
/**
|
|
1574
|
-
*
|
|
1575
|
-
*
|
|
1702
|
+
* Keeps a scroll container at its bottom while content arrives, and stops
|
|
1703
|
+
* when the reader scrolls up. Scrolling back to the bottom, or a call to
|
|
1704
|
+
* `scrollToBottom()`, starts it again. Core's `ɵStickToBottom` does the work.
|
|
1705
|
+
*
|
|
1706
|
+
* The content is the descendant with `data-stick-to-bottom-content`, or the
|
|
1707
|
+
* first child element.
|
|
1576
1708
|
*
|
|
1577
1709
|
* @example
|
|
1578
1710
|
* ```html
|
|
1579
1711
|
* <div copilotStickToBottom
|
|
1580
1712
|
* [enabled]="true"
|
|
1581
|
-
* [threshold]="
|
|
1713
|
+
* [threshold]="12"
|
|
1582
1714
|
* [initialBehavior]="'smooth'"
|
|
1583
1715
|
* [resizeBehavior]="'smooth'"
|
|
1584
1716
|
* (isAtBottomChange)="onBottomChange($event)">
|
|
@@ -1587,28 +1719,22 @@ type ScrollBehavior = "smooth" | "instant" | "auto";
|
|
|
1587
1719
|
* ```
|
|
1588
1720
|
*/
|
|
1589
1721
|
declare class StickToBottom implements AfterViewInit, OnDestroy {
|
|
1722
|
+
/** `false` only tracks the position and does not follow new content. */
|
|
1590
1723
|
enabled: _angular_core.InputSignal<boolean>;
|
|
1724
|
+
/** Pixels from the end that still count as the bottom. Default: 12. */
|
|
1591
1725
|
threshold: _angular_core.InputSignal<number>;
|
|
1592
1726
|
initialBehavior: _angular_core.InputSignal<ScrollBehavior>;
|
|
1593
1727
|
resizeBehavior: _angular_core.InputSignal<ScrollBehavior>;
|
|
1728
|
+
/** Wait this many ms before `isAtBottomChange` reports a change. */
|
|
1594
1729
|
debounceMs: _angular_core.InputSignal<number>;
|
|
1595
1730
|
isAtBottomChange: _angular_core.OutputEmitterRef<boolean>;
|
|
1596
1731
|
scrollToBottomRequested: _angular_core.OutputEmitterRef<void>;
|
|
1597
1732
|
private elementRef;
|
|
1598
|
-
private scrollService;
|
|
1599
|
-
private resizeService;
|
|
1600
1733
|
private platformId;
|
|
1601
|
-
private
|
|
1602
|
-
private
|
|
1603
|
-
private wasAtBottom;
|
|
1604
|
-
private hasInitialized;
|
|
1605
|
-
private userHasScrolled;
|
|
1606
|
-
private destroyed;
|
|
1734
|
+
private controller?;
|
|
1735
|
+
private emitTimer?;
|
|
1607
1736
|
constructor();
|
|
1608
1737
|
ngAfterViewInit(): void;
|
|
1609
|
-
private setupScrollMonitoring;
|
|
1610
|
-
private setupResizeMonitoring;
|
|
1611
|
-
private setupContentMutationObserver;
|
|
1612
1738
|
/**
|
|
1613
1739
|
* Public method to scroll to bottom
|
|
1614
1740
|
* Can be called from parent component
|
|
@@ -1622,45 +1748,105 @@ declare class StickToBottom implements AfterViewInit, OnDestroy {
|
|
|
1622
1748
|
* Get current scroll state
|
|
1623
1749
|
*/
|
|
1624
1750
|
getScrollState(): {
|
|
1625
|
-
scrollTop:
|
|
1626
|
-
scrollHeight:
|
|
1627
|
-
clientHeight:
|
|
1751
|
+
scrollTop: number;
|
|
1752
|
+
scrollHeight: number;
|
|
1753
|
+
clientHeight: number;
|
|
1628
1754
|
isAtBottom: boolean;
|
|
1629
1755
|
};
|
|
1630
1756
|
ngOnDestroy(): void;
|
|
1757
|
+
private emitIsAtBottom;
|
|
1631
1758
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<StickToBottom, never>;
|
|
1632
1759
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<StickToBottom, "[copilotStickToBottom]", never, { "enabled": { "alias": "enabled"; "required": false; "isSignal": true; }; "threshold": { "alias": "threshold"; "required": false; "isSignal": true; }; "initialBehavior": { "alias": "initialBehavior"; "required": false; "isSignal": true; }; "resizeBehavior": { "alias": "resizeBehavior"; "required": false; "isSignal": true; }; "debounceMs": { "alias": "debounceMs"; "required": false; "isSignal": true; }; }, { "isAtBottomChange": "isAtBottomChange"; "scrollToBottomRequested": "scrollToBottomRequested"; }, never, never, true, never>;
|
|
1633
1760
|
}
|
|
1634
1761
|
|
|
1762
|
+
type TooltipPosition = "above" | "below" | "left" | "right";
|
|
1763
|
+
type TooltipSide = "top" | "bottom" | "left" | "right";
|
|
1764
|
+
/**
|
|
1765
|
+
* The tooltip that `copilotTooltip` shows. Same markup and classes as React's
|
|
1766
|
+
* `<TooltipContent>` (`ui/tooltip.css` in `@copilotkit/core`).
|
|
1767
|
+
*/
|
|
1635
1768
|
declare class TooltipContent {
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1769
|
+
id: string;
|
|
1770
|
+
readonly textValue: _angular_core.WritableSignal<string>;
|
|
1771
|
+
/** Classes added to `.cpk-tooltip`. */
|
|
1772
|
+
readonly extraClass: _angular_core.WritableSignal<string>;
|
|
1773
|
+
readonly side: _angular_core.WritableSignal<TooltipSide>;
|
|
1774
|
+
readonly arrowStyle: _angular_core.Signal<Record<string, string>>;
|
|
1775
|
+
readonly transformOrigin: _angular_core.Signal<string>;
|
|
1776
|
+
get text(): string;
|
|
1777
|
+
set text(value: string);
|
|
1778
|
+
get position(): TooltipPosition;
|
|
1779
|
+
set position(value: TooltipPosition);
|
|
1642
1780
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TooltipContent, never>;
|
|
1643
1781
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TooltipContent, "copilot-tooltip-content", never, {}, {}, never, never, true, never>;
|
|
1644
1782
|
}
|
|
1645
|
-
|
|
1783
|
+
/**
|
|
1784
|
+
* Shows a tooltip like React's Radix tooltip: on hover and on keyboard focus,
|
|
1785
|
+
* hidden on pointer down, click, blur, scroll, and Escape. Only one tooltip
|
|
1786
|
+
* is open at a time.
|
|
1787
|
+
*/
|
|
1788
|
+
declare class CopilotTooltip implements OnChanges, OnDestroy {
|
|
1646
1789
|
tooltipText: string;
|
|
1647
|
-
tooltipPosition:
|
|
1790
|
+
tooltipPosition: TooltipPosition;
|
|
1791
|
+
/** Milliseconds to wait on hover. React shows its tooltips at once. */
|
|
1648
1792
|
tooltipDelay: number;
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
private
|
|
1652
|
-
private
|
|
1793
|
+
/** Classes added to the tooltip, like React's `TooltipContent` `className`. */
|
|
1794
|
+
tooltipClass: string;
|
|
1795
|
+
private readonly overlay;
|
|
1796
|
+
private readonly overlayPositionBuilder;
|
|
1797
|
+
private readonly elementRef;
|
|
1798
|
+
private readonly viewContainerRef;
|
|
1799
|
+
private readonly document;
|
|
1800
|
+
readonly contentId: string;
|
|
1801
|
+
readonly isOpen: _angular_core.WritableSignal<boolean>;
|
|
1653
1802
|
private overlayRef?;
|
|
1803
|
+
private contentRef?;
|
|
1804
|
+
private positionSubscription?;
|
|
1654
1805
|
private tooltipTimeout?;
|
|
1655
1806
|
private originalTitle?;
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
private
|
|
1659
|
-
|
|
1660
|
-
|
|
1807
|
+
private pointerDown;
|
|
1808
|
+
private readonly onDocumentKeydown;
|
|
1809
|
+
private readonly onPointerUp;
|
|
1810
|
+
ngOnChanges(): void;
|
|
1811
|
+
onPointerEnter(event: PointerEvent): void;
|
|
1812
|
+
onPointerDown(): void;
|
|
1813
|
+
onFocus(): void;
|
|
1814
|
+
/** Opens the tooltip now, without the hover delay. */
|
|
1815
|
+
show(): void;
|
|
1816
|
+
hide(): void;
|
|
1661
1817
|
ngOnDestroy(): void;
|
|
1818
|
+
private clearTimeout;
|
|
1819
|
+
private getPositions;
|
|
1662
1820
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CopilotTooltip, never>;
|
|
1663
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<CopilotTooltip, "[copilotTooltip]", never, { "tooltipText": { "alias": "copilotTooltip"; "required": false; }; "tooltipPosition": { "alias": "tooltipPosition"; "required": false; }; "tooltipDelay": { "alias": "tooltipDelay"; "required": false; }; }, {}, never, never, true, never>;
|
|
1821
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<CopilotTooltip, "[copilotTooltip]", never, { "tooltipText": { "alias": "copilotTooltip"; "required": false; }; "tooltipPosition": { "alias": "tooltipPosition"; "required": false; }; "tooltipDelay": { "alias": "tooltipDelay"; "required": false; }; "tooltipClass": { "alias": "tooltipClass"; "required": false; }; }, {}, never, never, true, never>;
|
|
1822
|
+
}
|
|
1823
|
+
|
|
1824
|
+
/**
|
|
1825
|
+
* Adds the CSS for CopilotKit's UI to the page, so apps never import a
|
|
1826
|
+
* stylesheet. `<copilot-chat>`, `<copilot-chat-view>`, `<copilot-popup>` and
|
|
1827
|
+
* `<copilot-sidebar>` render it for you. Render `<copilot-kit-styles />`
|
|
1828
|
+
* yourself only when you build a layout from the chat parts without them.
|
|
1829
|
+
*
|
|
1830
|
+
* Adds nothing when `provideCopilotKit` has `injectStyles: false`.
|
|
1831
|
+
*/
|
|
1832
|
+
declare class CopilotKitStyles {
|
|
1833
|
+
protected readonly enabled: boolean;
|
|
1834
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CopilotKitStyles, never>;
|
|
1835
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CopilotKitStyles, "copilot-kit-styles", never, {}, {}, never, never, true, never>;
|
|
1836
|
+
}
|
|
1837
|
+
|
|
1838
|
+
/**
|
|
1839
|
+
* The run state the chat input needs for its stop button. `CopilotChat`
|
|
1840
|
+
* provides it. Without a provider, the input never shows stop.
|
|
1841
|
+
* @internal
|
|
1842
|
+
*/
|
|
1843
|
+
interface ChatRunControl {
|
|
1844
|
+
/** `true` while the agent runs. */
|
|
1845
|
+
readonly isRunning: Signal<boolean>;
|
|
1846
|
+
/** `true` when `stop()` can stop the run: it runs and has messages. */
|
|
1847
|
+
readonly canStop: Signal<boolean>;
|
|
1848
|
+
/** Stop the agent's current run. */
|
|
1849
|
+
stop(): void;
|
|
1664
1850
|
}
|
|
1665
1851
|
|
|
1666
1852
|
/**
|
|
@@ -1672,12 +1858,21 @@ declare class CopilotTooltip implements OnDestroy {
|
|
|
1672
1858
|
* <copilot-chat [agentId]="'default'" [threadId]="'abc123'"></copilot-chat>
|
|
1673
1859
|
* ```
|
|
1674
1860
|
*/
|
|
1675
|
-
declare class CopilotChat extends ChatState {
|
|
1861
|
+
declare class CopilotChat extends ChatState implements ChatRunControl {
|
|
1676
1862
|
private readonly attachmentsDirective;
|
|
1677
1863
|
readonly inputValue: _angular_core.WritableSignal<string>;
|
|
1678
1864
|
readonly agentId: _angular_core.InputSignal<string | undefined>;
|
|
1679
1865
|
readonly threadId: _angular_core.InputSignal<string | undefined>;
|
|
1680
1866
|
readonly inputComponent: _angular_core.InputSignal<Type<any> | undefined>;
|
|
1867
|
+
/** Whether the message list follows new messages to the bottom. Default `true`. */
|
|
1868
|
+
readonly autoScroll: _angular_core.InputSignal<boolean>;
|
|
1869
|
+
/** `false` turns the welcome screen off for an empty chat. Default `true`. */
|
|
1870
|
+
readonly welcomeScreen: _angular_core.InputSignal<boolean>;
|
|
1871
|
+
/**
|
|
1872
|
+
* How assistant messages show tool calls: `"grouped"` (default), `"line"`,
|
|
1873
|
+
* `"stacked"`, `"separate"` or `"turn"`. Forwarded to the message view.
|
|
1874
|
+
*/
|
|
1875
|
+
readonly toolCallDisplay: _angular_core.InputSignal<CopilotChatToolCallDisplay>;
|
|
1681
1876
|
/** Component used to render each assistant message in the prebuilt chat. */
|
|
1682
1877
|
readonly assistantMessageComponent: _angular_core.InputSignal<Type<any> | undefined>;
|
|
1683
1878
|
/** Template used to render each assistant message in the prebuilt chat. */
|
|
@@ -1690,6 +1885,16 @@ declare class CopilotChat extends ChatState {
|
|
|
1690
1885
|
readonly reasoningMessageTemplate: _angular_core.InputSignal<TemplateRef<any> | undefined>;
|
|
1691
1886
|
/** Class forwarded to the default or custom reasoning-message renderer. */
|
|
1692
1887
|
readonly reasoningMessageClass: _angular_core.InputSignal<string | undefined>;
|
|
1888
|
+
/**
|
|
1889
|
+
* Component used to render the work summary row of the `"turn"` tool-call
|
|
1890
|
+
* display. It gets `isWorking`, `isOpen`, `calls`, `elapsedMs`,
|
|
1891
|
+
* `workingSince` and `onClick`.
|
|
1892
|
+
*/
|
|
1893
|
+
readonly workSummaryComponent: _angular_core.InputSignal<Type<unknown> | undefined>;
|
|
1894
|
+
/** Template used to render the work summary row of the `"turn"` display. */
|
|
1895
|
+
readonly workSummaryTemplate: _angular_core.InputSignal<TemplateRef<unknown> | undefined>;
|
|
1896
|
+
/** Class forwarded to the default or custom work summary renderer. */
|
|
1897
|
+
readonly workSummaryClass: _angular_core.InputSignal<string | undefined>;
|
|
1693
1898
|
/** Component rendered after the transcript messages and before the cursor. */
|
|
1694
1899
|
readonly messageViewChildrenComponent: _angular_core.InputSignal<Type<any> | undefined>;
|
|
1695
1900
|
/** Template rendered after the transcript messages and before the cursor. */
|
|
@@ -1707,48 +1912,118 @@ declare class CopilotChat extends ChatState {
|
|
|
1707
1912
|
protected readonly resolvedAgentId: _angular_core.Signal<string>;
|
|
1708
1913
|
readonly agentStore: _angular_core.Signal<_copilotkit_angular.AgentStore>;
|
|
1709
1914
|
private readonly copilotKit;
|
|
1915
|
+
/**
|
|
1916
|
+
* Loads the thread this chat shows: keeps the agent on it, orders the
|
|
1917
|
+
* teardown of the previous thread, owns the connect's abort and detach, and
|
|
1918
|
+
* tracks connections a send must wait for. A failed connect of an Inspector
|
|
1919
|
+
* override ends the override.
|
|
1920
|
+
*/
|
|
1921
|
+
private readonly connection;
|
|
1922
|
+
private readonly connectionState;
|
|
1710
1923
|
readonly cdr: ChangeDetectorRef;
|
|
1711
1924
|
readonly injector: Injector;
|
|
1712
1925
|
private readonly destroyRef;
|
|
1713
|
-
private readonly
|
|
1714
|
-
private activeConnection?;
|
|
1926
|
+
private readonly labels;
|
|
1715
1927
|
protected readonly showCursor: _angular_core.Signal<boolean>;
|
|
1716
|
-
|
|
1928
|
+
/** `true` while the thread's connect is loading. */
|
|
1929
|
+
protected readonly isConnecting: _angular_core.Signal<boolean>;
|
|
1930
|
+
/** `true` while the agent runs. The chat input shows stop. */
|
|
1931
|
+
readonly isRunning: _angular_core.Signal<boolean>;
|
|
1932
|
+
/** A run can stop when it runs and the chat has messages, as in React. */
|
|
1933
|
+
readonly canStop: _angular_core.Signal<boolean>;
|
|
1934
|
+
/**
|
|
1935
|
+
* The send side — queueing behind the run in flight and the thread's
|
|
1936
|
+
* connection, the upload guard, stop, and transcription — lives in core.
|
|
1937
|
+
*/
|
|
1938
|
+
private readonly submitter;
|
|
1939
|
+
private readonly submitterState;
|
|
1940
|
+
/** The notice the chat shows (a failed transcription, a blocked send), or `null`. */
|
|
1941
|
+
protected readonly transcriptionError: _angular_core.Signal<string | null>;
|
|
1942
|
+
protected messages: _angular_core.Signal<_ag_ui_core.Message[]>;
|
|
1717
1943
|
protected agentState: _angular_core.Signal<unknown>;
|
|
1718
1944
|
protected readonly hasExplicitThreadId: _angular_core.Signal<boolean>;
|
|
1719
|
-
protected readonly agentRef: _angular_core.Signal<AbstractAgent>;
|
|
1945
|
+
protected readonly agentRef: _angular_core.Signal<_ag_ui_client.AbstractAgent>;
|
|
1946
|
+
/** The locally minted thread, renewed each time a provided thread goes away. */
|
|
1947
|
+
private readonly freshThreadId;
|
|
1720
1948
|
protected readonly resolvedThreadId: _angular_core.Signal<string>;
|
|
1949
|
+
/** The configuration's thread, or this chat's own. */
|
|
1950
|
+
private readonly baseThreadId;
|
|
1951
|
+
private readonly baseHasExplicitThreadId;
|
|
1952
|
+
/** The thread the chat shows: the Inspector's "view thread" override, else its own. */
|
|
1953
|
+
private readonly activeThreadId;
|
|
1954
|
+
private readonly activeHasExplicitThreadId;
|
|
1721
1955
|
readonly attachmentsEnabled: _angular_core.Signal<boolean>;
|
|
1722
1956
|
readonly attachmentsUploading: _angular_core.Signal<boolean>;
|
|
1723
|
-
private generatedThreadId;
|
|
1724
1957
|
constructor();
|
|
1725
|
-
private
|
|
1726
|
-
private
|
|
1958
|
+
private readonly inspectorThreadOverride;
|
|
1959
|
+
private readonly inspectorOverride;
|
|
1960
|
+
private bindInspectorThreadOverride;
|
|
1961
|
+
/**
|
|
1962
|
+
* Shows `agentId`'s suggestions, and loads them when nothing else does:
|
|
1963
|
+
* once for the chat's agent, and again when that agent registers, so the
|
|
1964
|
+
* provider's `suggestionsConfig` reaches the welcome screen. A config bound
|
|
1965
|
+
* through `configureSuggestions` loads itself, so the chat skips an agent
|
|
1966
|
+
* whose suggestions are already loading or loaded. Returns the cleanup.
|
|
1967
|
+
*/
|
|
1968
|
+
private bindSuggestions;
|
|
1969
|
+
private publishSuggestions;
|
|
1727
1970
|
submitInput(value: string): Promise<void>;
|
|
1728
1971
|
selectSuggestion(suggestion: Suggestion, _index: number): Promise<void>;
|
|
1729
1972
|
changeInput(value: string): void;
|
|
1973
|
+
/**
|
|
1974
|
+
* Stop the agent's current run, as React's chat does: through
|
|
1975
|
+
* `copilotkit.core.stopAgent`, or `agent.abortRun()` when that throws.
|
|
1976
|
+
*/
|
|
1977
|
+
stop(): void;
|
|
1730
1978
|
finishTranscription(audioBlob: Blob): Promise<void>;
|
|
1731
|
-
private syncSuggestionsFromCore;
|
|
1732
1979
|
addFile(): void;
|
|
1733
1980
|
removeAttachment(id: string): void;
|
|
1734
1981
|
handleDragOver(event: DragEvent): void;
|
|
1735
1982
|
handleDragLeave(event: DragEvent): void;
|
|
1736
1983
|
handleDrop(event: DragEvent): void;
|
|
1737
1984
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CopilotChat, never>;
|
|
1738
|
-
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>;
|
|
1985
|
+
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; }; "autoScroll": { "alias": "autoScroll"; "required": false; "isSignal": true; }; "welcomeScreen": { "alias": "welcomeScreen"; "required": false; "isSignal": true; }; "toolCallDisplay": { "alias": "toolCallDisplay"; "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; }; "workSummaryComponent": { "alias": "workSummaryComponent"; "required": false; "isSignal": true; }; "workSummaryTemplate": { "alias": "workSummaryTemplate"; "required": false; "isSignal": true; }; "workSummaryClass": { "alias": "workSummaryClass"; "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>;
|
|
1739
1986
|
}
|
|
1740
1987
|
|
|
1988
|
+
/**
|
|
1989
|
+
* An assistant message's tool calls, each drawn by its registered renderer.
|
|
1990
|
+
* Calls made in a row by renderers that opt into grouping share one
|
|
1991
|
+
* `copilot-chat-tool-call-group`, as in React.
|
|
1992
|
+
*/
|
|
1741
1993
|
declare class CopilotChatToolCallsView {
|
|
1994
|
+
#private;
|
|
1742
1995
|
readonly message: _angular_core.InputSignal<AssistantMessage$1>;
|
|
1743
1996
|
readonly messages: _angular_core.InputSignal<Message$1[]>;
|
|
1744
1997
|
readonly agentId: _angular_core.InputSignal<string | undefined>;
|
|
1745
1998
|
readonly isLoading: _angular_core.InputSignal<boolean>;
|
|
1999
|
+
/**
|
|
2000
|
+
* How to show the calls (see `CopilotChatToolCallDisplay`). Inside a
|
|
2001
|
+
* message view it follows the view's `toolCallDisplay`; on its own it
|
|
2002
|
+
* defaults to `"grouped"`.
|
|
2003
|
+
*/
|
|
2004
|
+
readonly display: _angular_core.InputSignal<CopilotChatToolCallDisplay | undefined>;
|
|
2005
|
+
protected readonly resolvedDisplay: Signal<CopilotChatToolCallDisplay>;
|
|
2006
|
+
protected readonly appearance: Signal<"card" | "line" | "stack">;
|
|
2007
|
+
/**
|
|
2008
|
+
* Whether the agent may still finish a trailing group's calls. Without a
|
|
2009
|
+
* message view there's no run state, so a call with no result is assumed
|
|
2010
|
+
* to be running.
|
|
2011
|
+
*/
|
|
2012
|
+
protected readonly isRunning: Signal<boolean>;
|
|
2013
|
+
protected readonly layout: Signal<_copilotkit_core.ɵToolCallLayout | undefined>;
|
|
2014
|
+
/** `"turn"` display: whether this message's work is showing. */
|
|
2015
|
+
protected readonly workOpen: Signal<boolean | undefined>;
|
|
2016
|
+
protected turnRowFor(toolCallId: string): ToolCallRenderContext["row"];
|
|
1746
2017
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CopilotChatToolCallsView, never>;
|
|
1747
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CopilotChatToolCallsView, "copilot-chat-tool-calls-view", never, { "message": { "alias": "message"; "required": true; "isSignal": true; }; "messages": { "alias": "messages"; "required": true; "isSignal": true; }; "agentId": { "alias": "agentId"; "required": false; "isSignal": true; }; "isLoading": { "alias": "isLoading"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
2018
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CopilotChatToolCallsView, "copilot-chat-tool-calls-view", never, { "message": { "alias": "message"; "required": true; "isSignal": true; }; "messages": { "alias": "messages"; "required": true; "isSignal": true; }; "agentId": { "alias": "agentId"; "required": false; "isSignal": true; }; "isLoading": { "alias": "isLoading"; "required": false; "isSignal": true; }; "display": { "alias": "display"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1748
2019
|
}
|
|
1749
2020
|
|
|
1750
2021
|
interface AssistantMessageMarkdownRendererContext {
|
|
1751
2022
|
content: string;
|
|
2023
|
+
/** The id of the message, for renderers that keep state per message. */
|
|
2024
|
+
messageId?: string;
|
|
2025
|
+
/** True while the message streams. */
|
|
2026
|
+
isStreaming?: boolean;
|
|
1752
2027
|
}
|
|
1753
2028
|
interface AssistantMessageToolbarContext {
|
|
1754
2029
|
children?: any;
|
|
@@ -1777,33 +2052,17 @@ interface CopilotChatAssistantMessageOnRegenerateProps {
|
|
|
1777
2052
|
message: AssistantMessage;
|
|
1778
2053
|
}
|
|
1779
2054
|
|
|
1780
|
-
declare class CopilotChatAssistantMessageRenderer
|
|
2055
|
+
declare class CopilotChatAssistantMessageRenderer {
|
|
1781
2056
|
readonly content: _angular_core.InputSignal<string>;
|
|
2057
|
+
/** True while this message is still streaming: shows the caret. */
|
|
2058
|
+
readonly isStreaming: _angular_core.InputSignal<boolean>;
|
|
1782
2059
|
readonly inputClass: _angular_core.InputSignal<string | undefined>;
|
|
1783
|
-
readonly labels:
|
|
1784
|
-
markdownContainer
|
|
1785
|
-
private elementRef;
|
|
1786
|
-
private copyStates;
|
|
1787
|
-
readonly renderedHtml: _angular_core.Signal<string>;
|
|
2060
|
+
readonly labels: _copilotkit_core.CopilotChatLabels;
|
|
2061
|
+
private readonly markdownContainer;
|
|
1788
2062
|
constructor();
|
|
1789
|
-
ngAfterViewInit(): void;
|
|
1790
|
-
private updateContent;
|
|
1791
|
-
private codeBlocksMap;
|
|
1792
|
-
private markedInstance;
|
|
1793
|
-
private initializeMarked;
|
|
1794
|
-
private renderMarkdown;
|
|
1795
|
-
handleClick(event: MouseEvent): void;
|
|
1796
|
-
private copyCodeBlock;
|
|
1797
|
-
private generateBlockId;
|
|
1798
2063
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CopilotChatAssistantMessageRenderer, never>;
|
|
1799
|
-
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>;
|
|
1800
|
-
}
|
|
1801
|
-
|
|
1802
|
-
interface CopilotIconNode {
|
|
1803
|
-
readonly tag: "path" | "rect";
|
|
1804
|
-
readonly attributes: Readonly<Record<string, string>>;
|
|
2064
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CopilotChatAssistantMessageRenderer, "copilot-chat-assistant-message-renderer", never, { "content": { "alias": "content"; "required": false; "isSignal": true; }; "isStreaming": { "alias": "isStreaming"; "required": false; "isSignal": true; }; "inputClass": { "alias": "inputClass"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1805
2065
|
}
|
|
1806
|
-
type CopilotIconData = readonly CopilotIconNode[];
|
|
1807
2066
|
|
|
1808
2067
|
declare class CopilotChatAssistantMessageToolbarButton {
|
|
1809
2068
|
title: _angular_core.InputSignal<string>;
|
|
@@ -1814,15 +2073,16 @@ declare class CopilotChatAssistantMessageToolbarButton {
|
|
|
1814
2073
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CopilotChatAssistantMessageToolbarButton, "button[copilotChatAssistantMessageToolbarButton]", never, { "title": { "alias": "title"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "inputClass": { "alias": "inputClass"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, [{ directive: typeof CopilotTooltip; inputs: { "copilotTooltip": "title"; "tooltipPosition": "tooltipPosition"; "tooltipDelay": "tooltipDelay"; }; outputs: {}; }]>;
|
|
1815
2074
|
}
|
|
1816
2075
|
declare class CopilotChatAssistantMessageCopyButton {
|
|
2076
|
+
#private;
|
|
1817
2077
|
readonly title: _angular_core.InputSignal<string | undefined>;
|
|
1818
2078
|
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
1819
2079
|
readonly inputClass: _angular_core.InputSignal<string | undefined>;
|
|
1820
2080
|
readonly content: _angular_core.InputSignal<string | undefined>;
|
|
1821
2081
|
readonly clicked: _angular_core.OutputEmitterRef<void>;
|
|
1822
|
-
readonly CopyIcon: CopilotIconData;
|
|
1823
|
-
readonly CheckIcon: CopilotIconData;
|
|
1824
|
-
readonly copied: _angular_core.
|
|
1825
|
-
readonly labels:
|
|
2082
|
+
readonly CopyIcon: _copilotkit_core.CopilotIconData;
|
|
2083
|
+
readonly CheckIcon: _copilotkit_core.CopilotIconData;
|
|
2084
|
+
readonly copied: _angular_core.Signal<boolean>;
|
|
2085
|
+
readonly labels: _copilotkit_core.CopilotChatLabels;
|
|
1826
2086
|
handleCopy(event?: Event): void;
|
|
1827
2087
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CopilotChatAssistantMessageCopyButton, never>;
|
|
1828
2088
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CopilotChatAssistantMessageCopyButton, "copilot-chat-assistant-message-copy-button", never, { "title": { "alias": "title"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "inputClass": { "alias": "inputClass"; "required": false; "isSignal": true; }; "content": { "alias": "content"; "required": false; "isSignal": true; }; }, { "clicked": "clicked"; }, never, never, true, never>;
|
|
@@ -1832,8 +2092,8 @@ declare class CopilotChatAssistantMessageThumbsUpButton {
|
|
|
1832
2092
|
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
1833
2093
|
readonly inputClass: _angular_core.InputSignal<string | undefined>;
|
|
1834
2094
|
readonly clicked: _angular_core.OutputEmitterRef<void>;
|
|
1835
|
-
readonly ThumbsUpIcon: CopilotIconData;
|
|
1836
|
-
readonly labels:
|
|
2095
|
+
readonly ThumbsUpIcon: _copilotkit_core.CopilotIconData;
|
|
2096
|
+
readonly labels: _copilotkit_core.CopilotChatLabels;
|
|
1837
2097
|
handleClick(event?: Event): void;
|
|
1838
2098
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CopilotChatAssistantMessageThumbsUpButton, never>;
|
|
1839
2099
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CopilotChatAssistantMessageThumbsUpButton, "copilot-chat-assistant-message-thumbs-up-button", never, { "title": { "alias": "title"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "inputClass": { "alias": "inputClass"; "required": false; "isSignal": true; }; }, { "clicked": "clicked"; }, never, never, true, never>;
|
|
@@ -1843,8 +2103,8 @@ declare class CopilotChatAssistantMessageThumbsDownButton {
|
|
|
1843
2103
|
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
1844
2104
|
readonly inputClass: _angular_core.InputSignal<string | undefined>;
|
|
1845
2105
|
readonly clicked: _angular_core.OutputEmitterRef<void>;
|
|
1846
|
-
readonly ThumbsDownIcon: CopilotIconData;
|
|
1847
|
-
readonly labels:
|
|
2106
|
+
readonly ThumbsDownIcon: _copilotkit_core.CopilotIconData;
|
|
2107
|
+
readonly labels: _copilotkit_core.CopilotChatLabels;
|
|
1848
2108
|
handleClick(event?: Event): void;
|
|
1849
2109
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CopilotChatAssistantMessageThumbsDownButton, never>;
|
|
1850
2110
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CopilotChatAssistantMessageThumbsDownButton, "copilot-chat-assistant-message-thumbs-down-button", never, { "title": { "alias": "title"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "inputClass": { "alias": "inputClass"; "required": false; "isSignal": true; }; }, { "clicked": "clicked"; }, never, never, true, never>;
|
|
@@ -1854,8 +2114,8 @@ declare class CopilotChatAssistantMessageReadAloudButton {
|
|
|
1854
2114
|
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
1855
2115
|
readonly inputClass: _angular_core.InputSignal<string | undefined>;
|
|
1856
2116
|
readonly clicked: _angular_core.OutputEmitterRef<void>;
|
|
1857
|
-
readonly Volume2Icon: CopilotIconData;
|
|
1858
|
-
readonly labels:
|
|
2117
|
+
readonly Volume2Icon: _copilotkit_core.CopilotIconData;
|
|
2118
|
+
readonly labels: _copilotkit_core.CopilotChatLabels;
|
|
1859
2119
|
handleClick(event?: Event): void;
|
|
1860
2120
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CopilotChatAssistantMessageReadAloudButton, never>;
|
|
1861
2121
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CopilotChatAssistantMessageReadAloudButton, "copilot-chat-assistant-message-read-aloud-button", never, { "title": { "alias": "title"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "inputClass": { "alias": "inputClass"; "required": false; "isSignal": true; }; }, { "clicked": "clicked"; }, never, never, true, never>;
|
|
@@ -1865,8 +2125,8 @@ declare class CopilotChatAssistantMessageRegenerateButton {
|
|
|
1865
2125
|
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
1866
2126
|
readonly inputClass: _angular_core.InputSignal<string | undefined>;
|
|
1867
2127
|
readonly clicked: _angular_core.OutputEmitterRef<void>;
|
|
1868
|
-
readonly RefreshCwIcon: CopilotIconData;
|
|
1869
|
-
readonly labels:
|
|
2128
|
+
readonly RefreshCwIcon: _copilotkit_core.CopilotIconData;
|
|
2129
|
+
readonly labels: _copilotkit_core.CopilotChatLabels;
|
|
1870
2130
|
handleClick(event?: Event): void;
|
|
1871
2131
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CopilotChatAssistantMessageRegenerateButton, never>;
|
|
1872
2132
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CopilotChatAssistantMessageRegenerateButton, "copilot-chat-assistant-message-regenerate-button", never, { "title": { "alias": "title"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "inputClass": { "alias": "inputClass"; "required": false; "isSignal": true; }; }, { "clicked": "clicked"; }, never, never, true, never>;
|
|
@@ -1890,7 +2150,17 @@ declare class CopilotChatViewHandlers {
|
|
|
1890
2150
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<CopilotChatViewHandlers>;
|
|
1891
2151
|
}
|
|
1892
2152
|
|
|
2153
|
+
/**
|
|
2154
|
+
* @internal
|
|
2155
|
+
* The markdown renderer of an assistant message when the app gives none:
|
|
2156
|
+
* a secondary entry point (`@copilotkit/angular/generative-ui` with the
|
|
2157
|
+
* markdown transport) provides a component that renders the fences of the
|
|
2158
|
+
* message as surfaces. The component gets the
|
|
2159
|
+
* {@link AssistantMessageMarkdownRendererContext} as inputs.
|
|
2160
|
+
*/
|
|
2161
|
+
declare const ɵCOPILOTKIT_ASSISTANT_MARKDOWN_RENDERER: InjectionToken<Type<unknown> | null>;
|
|
1893
2162
|
declare class CopilotChatAssistantMessage {
|
|
2163
|
+
#private;
|
|
1894
2164
|
markdownRendererTemplate?: TemplateRef<AssistantMessageMarkdownRendererContext>;
|
|
1895
2165
|
toolbarTemplate?: TemplateRef<AssistantMessageToolbarContext>;
|
|
1896
2166
|
copyButtonTemplate?: TemplateRef<AssistantMessageCopyButtonContext>;
|
|
@@ -1923,6 +2193,7 @@ declare class CopilotChatAssistantMessage {
|
|
|
1923
2193
|
readonly toolbarVisible: _angular_core.InputSignal<boolean>;
|
|
1924
2194
|
readonly inputClass: _angular_core.InputSignal<string | undefined>;
|
|
1925
2195
|
handlers: CopilotChatViewHandlers;
|
|
2196
|
+
protected readonly chatConfiguration: _copilotkit_angular.CopilotChatConfiguration | null;
|
|
1926
2197
|
constructor(handlers?: CopilotChatViewHandlers | null);
|
|
1927
2198
|
thumbsUp: _angular_core.OutputEmitterRef<CopilotChatAssistantMessageOnThumbsUpProps>;
|
|
1928
2199
|
thumbsDown: _angular_core.OutputEmitterRef<CopilotChatAssistantMessageOnThumbsDownProps>;
|
|
@@ -1936,7 +2207,10 @@ declare class CopilotChatAssistantMessage {
|
|
|
1936
2207
|
protected readonly CopilotChatAssistantMessageToolbar: typeof CopilotChatAssistantMessageToolbar;
|
|
1937
2208
|
protected readonly CopilotChatAssistantMessageCopyButton: typeof CopilotChatAssistantMessageCopyButton;
|
|
1938
2209
|
protected readonly CopilotChatToolCallsView: typeof CopilotChatToolCallsView;
|
|
2210
|
+
readonly isStreaming: _angular_core.Signal<boolean>;
|
|
1939
2211
|
markdownRendererContext: _angular_core.Signal<AssistantMessageMarkdownRendererContext>;
|
|
2212
|
+
/** The renderer a secondary entry point provides, or null. */
|
|
2213
|
+
protected readonly defaultMarkdownRenderer: Type<unknown> | undefined;
|
|
1940
2214
|
copyButtonOutputs: {
|
|
1941
2215
|
clicked: () => void;
|
|
1942
2216
|
};
|
|
@@ -1954,6 +2228,12 @@ declare class CopilotChatAssistantMessage {
|
|
|
1954
2228
|
};
|
|
1955
2229
|
toolbarContext: _angular_core.Signal<AssistantMessageToolbarContext>;
|
|
1956
2230
|
hasMessageContent(): boolean;
|
|
2231
|
+
/** Inside a message view with the `"turn"` tool-call display. */
|
|
2232
|
+
protected readonly workTextDisplay: _angular_core.Signal<boolean>;
|
|
2233
|
+
/** `"turn"` display: whether this message's narration shows, or `undefined` for the reply. */
|
|
2234
|
+
protected readonly workTextOpen: _angular_core.Signal<boolean | undefined>;
|
|
2235
|
+
/** Core's toolbar rule: also hides it while the latest message streams. */
|
|
2236
|
+
readonly shouldShowToolbar: _angular_core.Signal<boolean>;
|
|
1957
2237
|
toolCallsViewContext: _angular_core.Signal<{
|
|
1958
2238
|
message: AssistantMessage;
|
|
1959
2239
|
messages: Message$1[];
|
|
@@ -1972,6 +2252,15 @@ declare class CopilotChatAttachmentQueue {
|
|
|
1972
2252
|
readonly attachments: _angular_core.InputSignal<Attachment[]>;
|
|
1973
2253
|
readonly inputClass: _angular_core.InputSignal<string | undefined>;
|
|
1974
2254
|
readonly removeAttachment: _angular_core.OutputEmitterRef<string>;
|
|
2255
|
+
readonly labels: _copilotkit_core.CopilotChatLabels;
|
|
2256
|
+
/** Opens an image or video full screen. */
|
|
2257
|
+
readonly lightbox: {
|
|
2258
|
+
isOpen: _angular_core.Signal<boolean>;
|
|
2259
|
+
transitionName: string;
|
|
2260
|
+
open: (content: _angular_core.TemplateRef<unknown>, label: string, opener?: HTMLElement) => void;
|
|
2261
|
+
close: () => void;
|
|
2262
|
+
};
|
|
2263
|
+
readonly PlayIcon: _copilotkit_core.CopilotIconData;
|
|
1975
2264
|
readonly computedClass: _angular_core.Signal<string>;
|
|
1976
2265
|
itemClass(attachment: Attachment): string;
|
|
1977
2266
|
sourceUrl(attachment: Attachment): string;
|
|
@@ -1987,9 +2276,17 @@ declare class CopilotChatAttachmentRenderer {
|
|
|
1987
2276
|
readonly filename: _angular_core.InputSignal<string | undefined>;
|
|
1988
2277
|
readonly inputClass: _angular_core.InputSignal<string | undefined>;
|
|
1989
2278
|
readonly imageFailed: _angular_core.WritableSignal<boolean>;
|
|
2279
|
+
readonly labels: _copilotkit_core.CopilotChatLabels;
|
|
2280
|
+
/** Opens the image full screen. */
|
|
2281
|
+
readonly lightbox: {
|
|
2282
|
+
isOpen: _angular_core.Signal<boolean>;
|
|
2283
|
+
transitionName: string;
|
|
2284
|
+
open: (content: _angular_core.TemplateRef<unknown>, label: string, opener?: HTMLElement) => void;
|
|
2285
|
+
close: () => void;
|
|
2286
|
+
};
|
|
1990
2287
|
readonly sourceUrl: _angular_core.Signal<string>;
|
|
1991
2288
|
readonly documentIcon: _angular_core.Signal<string>;
|
|
1992
|
-
readonly
|
|
2289
|
+
readonly imageClass: _angular_core.Signal<string>;
|
|
1993
2290
|
readonly failedImageClass: _angular_core.Signal<string>;
|
|
1994
2291
|
readonly audioClass: _angular_core.Signal<string>;
|
|
1995
2292
|
readonly videoClass: _angular_core.Signal<string>;
|
|
@@ -1998,13 +2295,21 @@ declare class CopilotChatAttachmentRenderer {
|
|
|
1998
2295
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CopilotChatAttachmentRenderer, "copilot-chat-attachment-renderer", never, { "type": { "alias": "type"; "required": true; "isSignal": true; }; "source": { "alias": "source"; "required": true; "isSignal": true; }; "filename": { "alias": "filename"; "required": false; "isSignal": true; }; "inputClass": { "alias": "inputClass"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1999
2296
|
}
|
|
2000
2297
|
|
|
2298
|
+
/**
|
|
2299
|
+
* Adds file attachments to the chat: drag-and-drop, paste and a hidden file
|
|
2300
|
+
* picker. The queue itself (validation, uploads, ready state) lives in
|
|
2301
|
+
* `@copilotkit/core`'s `ɵAttachmentQueue`; this directive mirrors it into
|
|
2302
|
+
* {@link ChatState.attachments}.
|
|
2303
|
+
*/
|
|
2001
2304
|
declare class CopilotChatAttachmentsDirective {
|
|
2002
2305
|
readonly config: _angular_core.InputSignal<AttachmentsConfig | undefined>;
|
|
2003
2306
|
private readonly chat;
|
|
2004
2307
|
private readonly host;
|
|
2005
2308
|
private readonly renderer;
|
|
2006
2309
|
private readonly destroyRef;
|
|
2310
|
+
private readonly queue;
|
|
2007
2311
|
private fileInput?;
|
|
2312
|
+
constructor();
|
|
2008
2313
|
private get enabled();
|
|
2009
2314
|
onDragOver(event: DragEvent): void;
|
|
2010
2315
|
onDragLeave(event: DragEvent): void;
|
|
@@ -2012,11 +2317,20 @@ declare class CopilotChatAttachmentsDirective {
|
|
|
2012
2317
|
onPaste(event: ClipboardEvent): Promise<void>;
|
|
2013
2318
|
openFilePicker(): void;
|
|
2014
2319
|
removeAttachment(id: string): void;
|
|
2320
|
+
/**
|
|
2321
|
+
* Takes the ready attachments for a message and resets the file picker.
|
|
2322
|
+
* Reads {@link ChatState.attachments}, which mirrors the queue, so
|
|
2323
|
+
* attachments an app wrote to that public signal are sent too.
|
|
2324
|
+
*/
|
|
2015
2325
|
consume(): Attachment[];
|
|
2326
|
+
/**
|
|
2327
|
+
* The content parts of a user message with these attachments: the text
|
|
2328
|
+
* (as typed) and one part per attachment.
|
|
2329
|
+
*/
|
|
2016
2330
|
buildContent(value: string, attachments: Attachment[]): InputContent[];
|
|
2017
2331
|
private ensureFileInput;
|
|
2018
2332
|
private handleFileInputChange;
|
|
2019
|
-
private
|
|
2333
|
+
private processSafely;
|
|
2020
2334
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CopilotChatAttachmentsDirective, never>;
|
|
2021
2335
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<CopilotChatAttachmentsDirective, "[copilotChatAttachments]", never, { "config": { "alias": "config"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
2022
2336
|
}
|
|
@@ -2040,13 +2354,8 @@ type ToolsMenuItem = {
|
|
|
2040
2354
|
/**
|
|
2041
2355
|
* Audio recorder state
|
|
2042
2356
|
*/
|
|
2043
|
-
type AudioRecorderState =
|
|
2044
|
-
|
|
2045
|
-
* Error class for audio recorder failures
|
|
2046
|
-
*/
|
|
2047
|
-
declare class AudioRecorderError extends Error {
|
|
2048
|
-
constructor(message: string);
|
|
2049
|
-
}
|
|
2357
|
+
type AudioRecorderState = _AudioRecorderState;
|
|
2358
|
+
|
|
2050
2359
|
/**
|
|
2051
2360
|
* Props for textarea component
|
|
2052
2361
|
*/
|
|
@@ -2154,42 +2463,33 @@ declare class CopilotChatAudioRecorder implements AfterViewInit {
|
|
|
2154
2463
|
private readonly canvasRef;
|
|
2155
2464
|
inputClass: _angular_core.InputSignal<string | undefined>;
|
|
2156
2465
|
inputShowControls: _angular_core.InputSignal<boolean>;
|
|
2157
|
-
stateChange: _angular_core.OutputEmitterRef<AudioRecorderState>;
|
|
2158
|
-
error: _angular_core.OutputEmitterRef<
|
|
2159
|
-
readonly
|
|
2466
|
+
stateChange: _angular_core.OutputEmitterRef<_copilotkit_core.ɵAudioRecorderState>;
|
|
2467
|
+
error: _angular_core.OutputEmitterRef<_AudioRecorderError>;
|
|
2468
|
+
private readonly recorder;
|
|
2469
|
+
readonly state: _angular_core.WritableSignal<_copilotkit_core.ɵAudioRecorderState>;
|
|
2160
2470
|
readonly computedClass: _angular_core.Signal<string>;
|
|
2161
|
-
private
|
|
2162
|
-
private stream?;
|
|
2163
|
-
private audioContext?;
|
|
2164
|
-
private analyser?;
|
|
2165
|
-
private audioChunks;
|
|
2166
|
-
private starting;
|
|
2167
|
-
private animationFrameId?;
|
|
2168
|
-
private amplitudeHistory;
|
|
2169
|
-
private scrollOffset;
|
|
2170
|
-
private smoothedAmplitude;
|
|
2171
|
-
private fadeOpacity;
|
|
2471
|
+
private waveform?;
|
|
2172
2472
|
constructor();
|
|
2173
2473
|
ngAfterViewInit(): void;
|
|
2174
2474
|
/**
|
|
2175
2475
|
* Request microphone access and start recording.
|
|
2476
|
+
*
|
|
2477
|
+
* @throws {AudioRecorderError} When the recorder is already starting or
|
|
2478
|
+
* recording, or the microphone cannot be used. `error` emits it too.
|
|
2176
2479
|
*/
|
|
2177
2480
|
start(): Promise<void>;
|
|
2178
2481
|
/**
|
|
2179
2482
|
* Stop recording and resolve with the captured audio.
|
|
2483
|
+
*
|
|
2484
|
+
* @throws {AudioRecorderError} When nothing records or the recording
|
|
2485
|
+
* fails. `error` emits it too.
|
|
2180
2486
|
*/
|
|
2181
2487
|
stop(): Promise<Blob>;
|
|
2182
2488
|
getState(): AudioRecorderState;
|
|
2183
2489
|
/**
|
|
2184
|
-
* Release every capture
|
|
2490
|
+
* Release every capture resource. Safe to call repeatedly.
|
|
2185
2491
|
*/
|
|
2186
2492
|
dispose(): void;
|
|
2187
|
-
private setState;
|
|
2188
|
-
private toRecorderError;
|
|
2189
|
-
private cleanup;
|
|
2190
|
-
/** RMS amplitude from time-domain samples (128 is silence). */
|
|
2191
|
-
private calculateAmplitude;
|
|
2192
|
-
private startAnimation;
|
|
2193
2493
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CopilotChatAudioRecorder, never>;
|
|
2194
2494
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CopilotChatAudioRecorder, "copilot-chat-audio-recorder", never, { "inputClass": { "alias": "inputClass"; "required": false; "isSignal": true; }; "inputShowControls": { "alias": "inputShowControls"; "required": false; "isSignal": true; }; }, { "stateChange": "stateChange"; "error": "error"; }, never, never, true, never>;
|
|
2195
2495
|
}
|
|
@@ -2197,7 +2497,8 @@ declare class CopilotChatAudioRecorder implements AfterViewInit {
|
|
|
2197
2497
|
declare class CopilotChatSendButton {
|
|
2198
2498
|
disabled: _angular_core.InputSignal<boolean>;
|
|
2199
2499
|
clicked: _angular_core.OutputEmitterRef<void>;
|
|
2200
|
-
readonly
|
|
2500
|
+
readonly labels: _copilotkit_core.CopilotChatLabels;
|
|
2501
|
+
readonly ArrowUpIcon: _copilotkit_core.CopilotIconData;
|
|
2201
2502
|
buttonClass: string;
|
|
2202
2503
|
onClick(): void;
|
|
2203
2504
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CopilotChatSendButton, never>;
|
|
@@ -2206,8 +2507,8 @@ declare class CopilotChatSendButton {
|
|
|
2206
2507
|
declare class CopilotChatStartTranscribeButton {
|
|
2207
2508
|
disabled: _angular_core.InputSignal<boolean>;
|
|
2208
2509
|
clicked: _angular_core.OutputEmitterRef<void>;
|
|
2209
|
-
readonly labels:
|
|
2210
|
-
readonly MicIcon: CopilotIconData;
|
|
2510
|
+
readonly labels: _copilotkit_core.CopilotChatLabels;
|
|
2511
|
+
readonly MicIcon: _copilotkit_core.CopilotIconData;
|
|
2211
2512
|
buttonClass: string;
|
|
2212
2513
|
get label(): string;
|
|
2213
2514
|
onClick(): void;
|
|
@@ -2217,8 +2518,8 @@ declare class CopilotChatStartTranscribeButton {
|
|
|
2217
2518
|
declare class CopilotChatCancelTranscribeButton {
|
|
2218
2519
|
disabled: _angular_core.InputSignal<boolean>;
|
|
2219
2520
|
clicked: _angular_core.OutputEmitterRef<void>;
|
|
2220
|
-
readonly labels:
|
|
2221
|
-
readonly XIcon: CopilotIconData;
|
|
2521
|
+
readonly labels: _copilotkit_core.CopilotChatLabels;
|
|
2522
|
+
readonly XIcon: _copilotkit_core.CopilotIconData;
|
|
2222
2523
|
buttonClass: string;
|
|
2223
2524
|
get label(): string;
|
|
2224
2525
|
onClick(): void;
|
|
@@ -2228,8 +2529,8 @@ declare class CopilotChatCancelTranscribeButton {
|
|
|
2228
2529
|
declare class CopilotChatFinishTranscribeButton {
|
|
2229
2530
|
disabled: _angular_core.InputSignal<boolean>;
|
|
2230
2531
|
clicked: _angular_core.OutputEmitterRef<void>;
|
|
2231
|
-
readonly labels:
|
|
2232
|
-
readonly CheckIcon: CopilotIconData;
|
|
2532
|
+
readonly labels: _copilotkit_core.CopilotChatLabels;
|
|
2533
|
+
readonly CheckIcon: _copilotkit_core.CopilotIconData;
|
|
2233
2534
|
buttonClass: string;
|
|
2234
2535
|
get label(): string;
|
|
2235
2536
|
onClick(): void;
|
|
@@ -2239,8 +2540,8 @@ declare class CopilotChatFinishTranscribeButton {
|
|
|
2239
2540
|
declare class CopilotChatAddFileButton {
|
|
2240
2541
|
disabled: _angular_core.InputSignal<boolean>;
|
|
2241
2542
|
clicked: _angular_core.OutputEmitterRef<void>;
|
|
2242
|
-
readonly labels:
|
|
2243
|
-
readonly PlusIcon: CopilotIconData;
|
|
2543
|
+
readonly labels: _copilotkit_core.CopilotChatLabels;
|
|
2544
|
+
readonly PlusIcon: _copilotkit_core.CopilotIconData;
|
|
2244
2545
|
buttonClass: string;
|
|
2245
2546
|
get label(): string;
|
|
2246
2547
|
onClick(): void;
|
|
@@ -2259,7 +2560,7 @@ declare class CopilotChatToolbarButton {
|
|
|
2259
2560
|
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>;
|
|
2260
2561
|
}
|
|
2261
2562
|
|
|
2262
|
-
declare class CopilotChatTextarea
|
|
2563
|
+
declare class CopilotChatTextarea {
|
|
2263
2564
|
private elementRef;
|
|
2264
2565
|
private platformId;
|
|
2265
2566
|
get textareaRef(): ElementRef<any>;
|
|
@@ -2271,7 +2572,7 @@ declare class CopilotChatTextarea implements AfterViewInit {
|
|
|
2271
2572
|
inputClass: _angular_core.InputSignal<string | undefined>;
|
|
2272
2573
|
valueChange: _angular_core.OutputEmitterRef<string>;
|
|
2273
2574
|
keyDown: _angular_core.OutputEmitterRef<KeyboardEvent>;
|
|
2274
|
-
readonly chatLabels:
|
|
2575
|
+
readonly chatLabels: _copilotkit_core.CopilotChatLabels;
|
|
2275
2576
|
readonly chatState: _copilotkit_angular.ChatState;
|
|
2276
2577
|
maxHeight: _angular_core.WritableSignal<number>;
|
|
2277
2578
|
computedValue: _angular_core.Signal<string>;
|
|
@@ -2279,11 +2580,25 @@ declare class CopilotChatTextarea implements AfterViewInit {
|
|
|
2279
2580
|
disabled: _angular_core.Signal<boolean>;
|
|
2280
2581
|
computedClass: _angular_core.Signal<string>;
|
|
2281
2582
|
constructor();
|
|
2282
|
-
ngAfterViewInit(): void;
|
|
2283
2583
|
onInput(event: Event): void;
|
|
2584
|
+
/**
|
|
2585
|
+
* Passes every key press to `keyDown`. The chat input decides what Enter
|
|
2586
|
+
* does (send, stop, or nothing during IME composition) and prevents the
|
|
2587
|
+
* line break itself.
|
|
2588
|
+
*/
|
|
2284
2589
|
onKeyDown(event: KeyboardEvent): void;
|
|
2590
|
+
private metrics;
|
|
2591
|
+
/** Measures one row and the height of `inputMaxRows` rows. */
|
|
2285
2592
|
private calculateMaxHeight;
|
|
2286
2593
|
private adjustHeight;
|
|
2594
|
+
/**
|
|
2595
|
+
* Fits the height to the text and returns the text's height and the height
|
|
2596
|
+
* of one line, for the input to choose its layout.
|
|
2597
|
+
*/
|
|
2598
|
+
measure(): {
|
|
2599
|
+
scrollHeight: number;
|
|
2600
|
+
singleLineHeight: number;
|
|
2601
|
+
};
|
|
2287
2602
|
/**
|
|
2288
2603
|
* Public method to focus the textarea
|
|
2289
2604
|
*/
|
|
@@ -2308,8 +2623,8 @@ declare class CopilotChatToolbar {
|
|
|
2308
2623
|
}
|
|
2309
2624
|
|
|
2310
2625
|
declare class CopilotChatToolsMenu {
|
|
2311
|
-
readonly PlusIcon: CopilotIconData;
|
|
2312
|
-
readonly ChevronRightIcon: CopilotIconData;
|
|
2626
|
+
readonly PlusIcon: _copilotkit_core.CopilotIconData;
|
|
2627
|
+
readonly ChevronRightIcon: _copilotkit_core.CopilotIconData;
|
|
2313
2628
|
inputToolsMenu: _angular_core.InputSignal<(ToolsMenuItem | "-")[] | undefined>;
|
|
2314
2629
|
inputDisabled: _angular_core.InputSignal<boolean | undefined>;
|
|
2315
2630
|
inputClass: _angular_core.InputSignal<string | undefined>;
|
|
@@ -2335,7 +2650,12 @@ declare class CopilotChatToolsMenu {
|
|
|
2335
2650
|
* Context provided to slot templates
|
|
2336
2651
|
*/
|
|
2337
2652
|
interface SendButtonContext {
|
|
2653
|
+
/** Send the typed text. */
|
|
2338
2654
|
send: () => void;
|
|
2655
|
+
/** Stop the agent's run. Does nothing when no run can stop. */
|
|
2656
|
+
stop: () => void;
|
|
2657
|
+
/** What a click on the button does: send the text or stop the run. */
|
|
2658
|
+
action: "send" | "stop";
|
|
2339
2659
|
disabled: boolean;
|
|
2340
2660
|
value: string;
|
|
2341
2661
|
}
|
|
@@ -2344,6 +2664,7 @@ interface ToolbarContext {
|
|
|
2344
2664
|
value: string;
|
|
2345
2665
|
}
|
|
2346
2666
|
declare class CopilotChatInput implements OnDestroy {
|
|
2667
|
+
#private;
|
|
2347
2668
|
readonly textAreaRef: _angular_core.Signal<CopilotChatTextarea | undefined>;
|
|
2348
2669
|
readonly audioRecorderRef: _angular_core.Signal<CopilotChatAudioRecorder | undefined>;
|
|
2349
2670
|
readonly sendButtonTemplate: _angular_core.Signal<TemplateRef<SendButtonContext> | undefined>;
|
|
@@ -2388,9 +2709,12 @@ declare class CopilotChatInput implements OnDestroy {
|
|
|
2388
2709
|
finishTranscribeWithAudio: _angular_core.OutputEmitterRef<Blob>;
|
|
2389
2710
|
addFile: _angular_core.OutputEmitterRef<void>;
|
|
2390
2711
|
valueChange: _angular_core.OutputEmitterRef<string>;
|
|
2391
|
-
readonly ArrowUpIcon: CopilotIconData;
|
|
2392
|
-
|
|
2393
|
-
readonly
|
|
2712
|
+
readonly ArrowUpIcon: _copilotkit_core.CopilotIconData;
|
|
2713
|
+
/** Lucide's `square`, drawn filled on the button while the agent runs. */
|
|
2714
|
+
readonly StopIcon: _copilotkit_core.CopilotIconData;
|
|
2715
|
+
readonly Loader2Icon: _copilotkit_core.CopilotIconData;
|
|
2716
|
+
readonly defaultButtonClass = "cpk-button cpk-button-chat-input-toolbar-primary cpk-button-size-chat-input-toolbar-icon";
|
|
2717
|
+
readonly labels: _copilotkit_core.CopilotChatLabels;
|
|
2394
2718
|
readonly chatState: _copilotkit_angular.ChatState;
|
|
2395
2719
|
readonly copilotKit: CopilotKit;
|
|
2396
2720
|
modeSignal: _angular_core.WritableSignal<CopilotChatInputMode>;
|
|
@@ -2406,12 +2730,29 @@ declare class CopilotChatInput implements OnDestroy {
|
|
|
2406
2730
|
CopilotChatFinishTranscribeButton: typeof CopilotChatFinishTranscribeButton;
|
|
2407
2731
|
CopilotChatStartTranscribeButton: typeof CopilotChatStartTranscribeButton;
|
|
2408
2732
|
computedMode: _angular_core.Signal<CopilotChatInputMode>;
|
|
2733
|
+
/**
|
|
2734
|
+
* `"expanded"` puts the textarea on its own row above the buttons, as in
|
|
2735
|
+
* React: when the text breaks onto a second line, is too wide for the
|
|
2736
|
+
* single row, or the viewport is narrower than 768px.
|
|
2737
|
+
*/
|
|
2738
|
+
readonly layout: _angular_core.WritableSignal<"compact" | "expanded">;
|
|
2739
|
+
readonly layoutValue: _angular_core.Signal<"compact" | "expanded">;
|
|
2409
2740
|
computedToolsMenu: _angular_core.Signal<(ToolsMenuItem | "-")[]>;
|
|
2410
2741
|
computedAutoFocus: _angular_core.Signal<boolean>;
|
|
2411
2742
|
audioTranscriptionEnabled: _angular_core.Signal<boolean>;
|
|
2412
2743
|
computedValue: _angular_core.Signal<string>;
|
|
2413
2744
|
addFileButtonDisabled: _angular_core.Signal<boolean>;
|
|
2414
2745
|
addFileMenuAction: _angular_core.Signal<(() => void) | undefined>;
|
|
2746
|
+
/** What the send/stop rules from `@copilotkit/core` read. */
|
|
2747
|
+
readonly composerInput: _angular_core.Signal<_ComposerInput>;
|
|
2748
|
+
readonly buttonState: _angular_core.Signal<{
|
|
2749
|
+
isProcessing: boolean;
|
|
2750
|
+
canSend: boolean;
|
|
2751
|
+
action: "send" | "stop";
|
|
2752
|
+
disabled: boolean;
|
|
2753
|
+
}>;
|
|
2754
|
+
/** The button stops the run instead of sending. */
|
|
2755
|
+
readonly showsStop: _angular_core.Signal<boolean>;
|
|
2415
2756
|
sendButtonDisabled: _angular_core.Signal<boolean>;
|
|
2416
2757
|
computedClass: _angular_core.Signal<string>;
|
|
2417
2758
|
defaultTextAreaClass: _angular_core.Signal<string>;
|
|
@@ -2421,6 +2762,7 @@ declare class CopilotChatInput implements OnDestroy {
|
|
|
2421
2762
|
value: string;
|
|
2422
2763
|
autoFocus: boolean;
|
|
2423
2764
|
disabled: boolean;
|
|
2765
|
+
layout: "compact" | "expanded";
|
|
2424
2766
|
maxRows: number | undefined;
|
|
2425
2767
|
placeholder: string | undefined;
|
|
2426
2768
|
inputClass: string | undefined;
|
|
@@ -2435,6 +2777,18 @@ declare class CopilotChatInput implements OnDestroy {
|
|
|
2435
2777
|
inputDisabled: boolean;
|
|
2436
2778
|
}>;
|
|
2437
2779
|
constructor();
|
|
2780
|
+
private readonly grid;
|
|
2781
|
+
private readonly start;
|
|
2782
|
+
private readonly actions;
|
|
2783
|
+
private readonly destroyRef;
|
|
2784
|
+
private readonly isBrowser;
|
|
2785
|
+
/** Sizes the text box and picks the layout, as in React and Vue. */
|
|
2786
|
+
private readonly autosize;
|
|
2787
|
+
/**
|
|
2788
|
+
* Picks the compact or expanded layout like React's input: expanded when
|
|
2789
|
+
* the text has a line break, wraps, or is wider than the compact row.
|
|
2790
|
+
*/
|
|
2791
|
+
evaluateLayout(): void;
|
|
2438
2792
|
addFileButtonOutputs: {
|
|
2439
2793
|
clicked: () => void;
|
|
2440
2794
|
};
|
|
@@ -2452,7 +2806,16 @@ declare class CopilotChatInput implements OnDestroy {
|
|
|
2452
2806
|
click: () => void;
|
|
2453
2807
|
};
|
|
2454
2808
|
ngOnDestroy(): void;
|
|
2809
|
+
/**
|
|
2810
|
+
* Enter sends the text. Enter in an empty input while the agent runs stops
|
|
2811
|
+
* the run. Shift+Enter adds a line break, and Enter during IME composition
|
|
2812
|
+
* (for example CJK input) is left to the browser.
|
|
2813
|
+
*/
|
|
2455
2814
|
handleKeyDown(event: KeyboardEvent): void;
|
|
2815
|
+
/** While the agent runs, the button stops it. Otherwise it sends. */
|
|
2816
|
+
handleSendButtonClick(): void;
|
|
2817
|
+
/** Stop the agent's run, when one can stop. */
|
|
2818
|
+
stopRun(): void;
|
|
2456
2819
|
handleValueChange(value: string): void;
|
|
2457
2820
|
send(): void;
|
|
2458
2821
|
handleStartTranscribe(): void;
|
|
@@ -2463,6 +2826,59 @@ declare class CopilotChatInput implements OnDestroy {
|
|
|
2463
2826
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CopilotChatInput, "copilot-chat-input", never, { "sendButtonClass": { "alias": "sendButtonClass"; "required": false; "isSignal": true; }; "toolbarClass": { "alias": "toolbarClass"; "required": false; "isSignal": true; }; "textAreaClass": { "alias": "textAreaClass"; "required": false; "isSignal": true; }; "textAreaMaxRows": { "alias": "textAreaMaxRows"; "required": false; "isSignal": true; }; "textAreaPlaceholder": { "alias": "textAreaPlaceholder"; "required": false; "isSignal": true; }; "audioRecorderClass": { "alias": "audioRecorderClass"; "required": false; "isSignal": true; }; "startTranscribeButtonClass": { "alias": "startTranscribeButtonClass"; "required": false; "isSignal": true; }; "cancelTranscribeButtonClass": { "alias": "cancelTranscribeButtonClass"; "required": false; "isSignal": true; }; "finishTranscribeButtonClass": { "alias": "finishTranscribeButtonClass"; "required": false; "isSignal": true; }; "addFileButtonClass": { "alias": "addFileButtonClass"; "required": false; "isSignal": true; }; "toolsButtonClass": { "alias": "toolsButtonClass"; "required": false; "isSignal": true; }; "sendButtonComponent": { "alias": "sendButtonComponent"; "required": false; "isSignal": true; }; "toolbarComponent": { "alias": "toolbarComponent"; "required": false; "isSignal": true; }; "textAreaComponent": { "alias": "textAreaComponent"; "required": false; "isSignal": true; }; "audioRecorderComponent": { "alias": "audioRecorderComponent"; "required": false; "isSignal": true; }; "startTranscribeButtonComponent": { "alias": "startTranscribeButtonComponent"; "required": false; "isSignal": true; }; "cancelTranscribeButtonComponent": { "alias": "cancelTranscribeButtonComponent"; "required": false; "isSignal": true; }; "finishTranscribeButtonComponent": { "alias": "finishTranscribeButtonComponent"; "required": false; "isSignal": true; }; "addFileButtonComponent": { "alias": "addFileButtonComponent"; "required": false; "isSignal": true; }; "toolsButtonComponent": { "alias": "toolsButtonComponent"; "required": false; "isSignal": true; }; "mode": { "alias": "mode"; "required": false; "isSignal": true; }; "toolsMenu": { "alias": "toolsMenu"; "required": false; "isSignal": true; }; "autoFocus": { "alias": "autoFocus"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "inputClass": { "alias": "inputClass"; "required": false; "isSignal": true; }; "additionalToolbarItems": { "alias": "additionalToolbarItems"; "required": false; "isSignal": true; }; }, { "submitMessage": "submitMessage"; "startTranscribe": "startTranscribe"; "cancelTranscribe": "cancelTranscribe"; "finishTranscribe": "finishTranscribe"; "finishTranscribeWithAudio": "finishTranscribeWithAudio"; "addFile": "addFile"; "valueChange": "valueChange"; }, ["sendButtonTemplate", "toolbarTemplate", "textAreaTemplate", "audioRecorderTemplate", "startTranscribeButtonTemplate", "cancelTranscribeButtonTemplate", "finishTranscribeButtonTemplate", "addFileButtonTemplate", "toolsButtonTemplate"], never, true, never>;
|
|
2464
2827
|
}
|
|
2465
2828
|
|
|
2829
|
+
/**
|
|
2830
|
+
* The Inspector shortcut in an assistant message's toolbar, like React's
|
|
2831
|
+
* `CopilotChatInspectorButton`. Shown only while the Inspector is enabled
|
|
2832
|
+
* (in development). A click opens the message in the Inspector; hovering, or
|
|
2833
|
+
* ArrowDown on the button, opens a menu that explains it and can hide it until
|
|
2834
|
+
* the page reloads.
|
|
2835
|
+
*/
|
|
2836
|
+
declare class CopilotChatInspectorButton {
|
|
2837
|
+
#private;
|
|
2838
|
+
/** The message to open in the Inspector. */
|
|
2839
|
+
readonly messageId: _angular_core.InputSignal<string>;
|
|
2840
|
+
readonly threadId: _angular_core.InputSignal<string | undefined>;
|
|
2841
|
+
readonly agentId: _angular_core.InputSignal<string | undefined>;
|
|
2842
|
+
/** Replaces the "View in Inspector" label of the menu item. */
|
|
2843
|
+
readonly title: _angular_core.InputSignal<string | undefined>;
|
|
2844
|
+
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
2845
|
+
readonly inputClass: _angular_core.InputSignal<string | undefined>;
|
|
2846
|
+
/** Emits after the message opens in the Inspector. */
|
|
2847
|
+
readonly clicked: _angular_core.OutputEmitterRef<void>;
|
|
2848
|
+
protected readonly labels: _copilotkit_core.CopilotChatLabels;
|
|
2849
|
+
protected readonly WrenchIcon: _copilotkit_core.CopilotIconData;
|
|
2850
|
+
protected readonly EyeOffIcon: _copilotkit_core.CopilotIconData;
|
|
2851
|
+
protected readonly menuId: string;
|
|
2852
|
+
protected readonly svgId: string;
|
|
2853
|
+
protected readonly kite: _copilotkit_core.ɵInspectorKiteArtwork;
|
|
2854
|
+
protected readonly kiteFill: typeof _inspectorKiteFill;
|
|
2855
|
+
protected readonly open: _angular_core.Signal<boolean>;
|
|
2856
|
+
protected readonly dark: _angular_core.Signal<boolean>;
|
|
2857
|
+
private readonly _trigger;
|
|
2858
|
+
private readonly _menuTemplate;
|
|
2859
|
+
private readonly _menu;
|
|
2860
|
+
protected readonly visible: _angular_core.Signal<boolean>;
|
|
2861
|
+
protected readonly primaryLabel: _angular_core.Signal<string>;
|
|
2862
|
+
protected readonly buttonClass: _angular_core.Signal<string>;
|
|
2863
|
+
protected readonly menuClass: _angular_core.Signal<string>;
|
|
2864
|
+
protected readonly localTooltipClass: _angular_core.Signal<string>;
|
|
2865
|
+
constructor();
|
|
2866
|
+
protected onPointerEnter(event: PointerEvent): void;
|
|
2867
|
+
protected keyboardUsed(): void;
|
|
2868
|
+
protected onKeydown(event: KeyboardEvent): void;
|
|
2869
|
+
protected inspect(): void;
|
|
2870
|
+
protected hideShortcuts(): void;
|
|
2871
|
+
protected cancelClose(): void;
|
|
2872
|
+
protected scheduleClose(): void;
|
|
2873
|
+
protected onMenuFocusOut(event: FocusEvent): void;
|
|
2874
|
+
private openMenu;
|
|
2875
|
+
private closeMenu;
|
|
2876
|
+
private attachOverlay;
|
|
2877
|
+
private detachOverlay;
|
|
2878
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CopilotChatInspectorButton, never>;
|
|
2879
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CopilotChatInspectorButton, "copilot-chat-inspector-button", never, { "messageId": { "alias": "messageId"; "required": true; "isSignal": true; }; "threadId": { "alias": "threadId"; "required": false; "isSignal": true; }; "agentId": { "alias": "agentId"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "inputClass": { "alias": "inputClass"; "required": false; "isSignal": true; }; }, { "clicked": "clicked"; }, never, never, true, never>;
|
|
2880
|
+
}
|
|
2881
|
+
|
|
2466
2882
|
/**
|
|
2467
2883
|
* Default components used by CopilotChatInput.
|
|
2468
2884
|
* These can be imported and reused when creating custom slot implementations.
|
|
@@ -2540,15 +2956,16 @@ declare class CopilotChatUserMessageToolbarButton {
|
|
|
2540
2956
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CopilotChatUserMessageToolbarButton, "button[copilotChatUserMessageToolbarButton]", never, { "title": { "alias": "title"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "inputClass": { "alias": "inputClass"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, [{ directive: typeof CopilotTooltip; inputs: { "copilotTooltip": "title"; "tooltipPosition": "tooltipPosition"; "tooltipDelay": "tooltipDelay"; }; outputs: {}; }]>;
|
|
2541
2957
|
}
|
|
2542
2958
|
declare class CopilotChatUserMessageCopyButton {
|
|
2959
|
+
#private;
|
|
2543
2960
|
readonly title: _angular_core.InputSignal<string | undefined>;
|
|
2544
2961
|
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
2545
2962
|
readonly inputClass: _angular_core.InputSignal<string | undefined>;
|
|
2546
2963
|
readonly content: _angular_core.InputSignal<string | undefined>;
|
|
2547
2964
|
readonly clicked: _angular_core.OutputEmitterRef<void>;
|
|
2548
|
-
readonly CopyIcon: CopilotIconData;
|
|
2549
|
-
readonly CheckIcon: CopilotIconData;
|
|
2550
|
-
readonly copied: _angular_core.
|
|
2551
|
-
readonly labels:
|
|
2965
|
+
readonly CopyIcon: _copilotkit_core.CopilotIconData;
|
|
2966
|
+
readonly CheckIcon: _copilotkit_core.CopilotIconData;
|
|
2967
|
+
readonly copied: _angular_core.Signal<boolean>;
|
|
2968
|
+
readonly labels: _copilotkit_core.CopilotChatLabels;
|
|
2552
2969
|
handleCopy(): void;
|
|
2553
2970
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CopilotChatUserMessageCopyButton, never>;
|
|
2554
2971
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CopilotChatUserMessageCopyButton, "copilot-chat-user-message-copy-button", never, { "title": { "alias": "title"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "inputClass": { "alias": "inputClass"; "required": false; "isSignal": true; }; "content": { "alias": "content"; "required": false; "isSignal": true; }; }, { "clicked": "clicked"; }, never, never, true, never>;
|
|
@@ -2558,8 +2975,8 @@ declare class CopilotChatUserMessageEditButton {
|
|
|
2558
2975
|
disabled: _angular_core.InputSignal<boolean>;
|
|
2559
2976
|
inputClass: _angular_core.InputSignal<string | undefined>;
|
|
2560
2977
|
clicked: _angular_core.OutputEmitterRef<void>;
|
|
2561
|
-
readonly EditIcon: CopilotIconData;
|
|
2562
|
-
readonly labels:
|
|
2978
|
+
readonly EditIcon: _copilotkit_core.CopilotIconData;
|
|
2979
|
+
readonly labels: _copilotkit_core.CopilotChatLabels;
|
|
2563
2980
|
handleEdit(): void;
|
|
2564
2981
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CopilotChatUserMessageEditButton, never>;
|
|
2565
2982
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CopilotChatUserMessageEditButton, "copilot-chat-user-message-edit-button", never, { "title": { "alias": "title"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "inputClass": { "alias": "inputClass"; "required": false; "isSignal": true; }; }, { "clicked": "clicked"; }, never, never, true, never>;
|
|
@@ -2573,14 +2990,24 @@ declare class CopilotChatUserMessageToolbar {
|
|
|
2573
2990
|
}
|
|
2574
2991
|
|
|
2575
2992
|
declare class CopilotChatUserMessageBranchNavigation {
|
|
2993
|
+
#private;
|
|
2576
2994
|
currentBranch: _angular_core.InputSignal<number>;
|
|
2577
2995
|
numberOfBranches: _angular_core.InputSignal<number>;
|
|
2996
|
+
/**
|
|
2997
|
+
* Whether something handles `switchToBranch`, so the branch arrows can work.
|
|
2998
|
+
* With `false` the branch navigation stays hidden, as React and Vue hide it
|
|
2999
|
+
* without an `onSwitchToBranch` handler. An Angular `output()` cannot tell
|
|
3000
|
+
* whether a listener is bound, so this defaults to `true`: navigation shows
|
|
3001
|
+
* whenever there is more than one branch.
|
|
3002
|
+
*/
|
|
3003
|
+
branchSwitchEnabled: _angular_core.InputSignal<boolean>;
|
|
2578
3004
|
message: _angular_core.InputSignal<UserMessage | undefined>;
|
|
2579
3005
|
inputClass: _angular_core.InputSignal<string | undefined>;
|
|
2580
3006
|
switchToBranch: _angular_core.OutputEmitterRef<CopilotChatUserMessageOnSwitchToBranchProps>;
|
|
2581
|
-
readonly ChevronLeftIcon: CopilotIconData;
|
|
2582
|
-
readonly ChevronRightIcon: CopilotIconData;
|
|
2583
|
-
readonly
|
|
3007
|
+
readonly ChevronLeftIcon: _copilotkit_core.CopilotIconData;
|
|
3008
|
+
readonly ChevronRightIcon: _copilotkit_core.CopilotIconData;
|
|
3009
|
+
readonly labels: _copilotkit_core.CopilotChatLabels;
|
|
3010
|
+
readonly buttonClass = "cpk-button cpk-button-assistant-message-toolbar cpk-button-size-default cpk-user-message-branch-button";
|
|
2584
3011
|
showNavigation: _angular_core.Signal<boolean>;
|
|
2585
3012
|
canGoPrev: _angular_core.Signal<boolean>;
|
|
2586
3013
|
canGoNext: _angular_core.Signal<boolean>;
|
|
@@ -2588,11 +3015,9 @@ declare class CopilotChatUserMessageBranchNavigation {
|
|
|
2588
3015
|
handlePrevious(): void;
|
|
2589
3016
|
handleNext(): void;
|
|
2590
3017
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CopilotChatUserMessageBranchNavigation, never>;
|
|
2591
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CopilotChatUserMessageBranchNavigation, "copilot-chat-user-message-branch-navigation", never, { "currentBranch": { "alias": "currentBranch"; "required": false; "isSignal": true; }; "numberOfBranches": { "alias": "numberOfBranches"; "required": false; "isSignal": true; }; "message": { "alias": "message"; "required": false; "isSignal": true; }; "inputClass": { "alias": "inputClass"; "required": false; "isSignal": true; }; }, { "switchToBranch": "switchToBranch"; }, never, never, true, never>;
|
|
3018
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CopilotChatUserMessageBranchNavigation, "copilot-chat-user-message-branch-navigation", never, { "currentBranch": { "alias": "currentBranch"; "required": false; "isSignal": true; }; "numberOfBranches": { "alias": "numberOfBranches"; "required": false; "isSignal": true; }; "branchSwitchEnabled": { "alias": "branchSwitchEnabled"; "required": false; "isSignal": true; }; "message": { "alias": "message"; "required": false; "isSignal": true; }; "inputClass": { "alias": "inputClass"; "required": false; "isSignal": true; }; }, { "switchToBranch": "switchToBranch"; }, never, never, true, never>;
|
|
2592
3019
|
}
|
|
2593
3020
|
|
|
2594
|
-
type UserMessageMediaPart = ImageInputPart | AudioInputPart | VideoInputPart | DocumentInputPart;
|
|
2595
|
-
|
|
2596
3021
|
declare class CopilotChatUserMessage {
|
|
2597
3022
|
messageRendererTemplate?: TemplateRef<MessageRendererContext>;
|
|
2598
3023
|
toolbarTemplate?: TemplateRef<UserMessageToolbarContext>;
|
|
@@ -2612,6 +3037,14 @@ declare class CopilotChatUserMessage {
|
|
|
2612
3037
|
message: _angular_core.InputSignal<UserMessage | undefined>;
|
|
2613
3038
|
branchIndex: _angular_core.InputSignal<number | undefined>;
|
|
2614
3039
|
numberOfBranches: _angular_core.InputSignal<number | undefined>;
|
|
3040
|
+
/**
|
|
3041
|
+
* Whether something handles `switchToBranch`, so the branch arrows can work.
|
|
3042
|
+
* With `false` the branch navigation stays hidden, as React and Vue hide it
|
|
3043
|
+
* without an `onSwitchToBranch` handler. An Angular `output()` cannot tell
|
|
3044
|
+
* whether a listener is bound, so this defaults to `true`: navigation shows
|
|
3045
|
+
* whenever there is more than one branch.
|
|
3046
|
+
*/
|
|
3047
|
+
branchSwitchEnabled: _angular_core.InputSignal<boolean>;
|
|
2615
3048
|
additionalToolbarItems: _angular_core.InputSignal<TemplateRef<any> | undefined>;
|
|
2616
3049
|
inputClass: _angular_core.InputSignal<string | undefined>;
|
|
2617
3050
|
editMessage: _angular_core.OutputEmitterRef<CopilotChatUserMessageOnEditMessageProps>;
|
|
@@ -2626,7 +3059,7 @@ declare class CopilotChatUserMessage {
|
|
|
2626
3059
|
showBranchNavigation: _angular_core.Signal<boolean>;
|
|
2627
3060
|
computedClass: _angular_core.Signal<string>;
|
|
2628
3061
|
flattenedContent: _angular_core.Signal<string>;
|
|
2629
|
-
mediaParts: _angular_core.Signal<
|
|
3062
|
+
mediaParts: _angular_core.Signal<_UserMessageMediaPart[]>;
|
|
2630
3063
|
messageRendererContext: _angular_core.Signal<MessageRendererContext>;
|
|
2631
3064
|
copyButtonOutputs: {
|
|
2632
3065
|
clicked: () => void;
|
|
@@ -2639,10 +3072,9 @@ declare class CopilotChatUserMessage {
|
|
|
2639
3072
|
handleCopy(): void;
|
|
2640
3073
|
handleEdit(): void;
|
|
2641
3074
|
handleSwitchToBranch(props: CopilotChatUserMessageOnSwitchToBranchProps): void;
|
|
2642
|
-
filenameFor(part:
|
|
2643
|
-
constructor();
|
|
3075
|
+
filenameFor(part: _UserMessageMediaPart): any;
|
|
2644
3076
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CopilotChatUserMessage, never>;
|
|
2645
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CopilotChatUserMessage, "copilot-chat-user-message", never, { "messageRendererClass": { "alias": "messageRendererClass"; "required": false; "isSignal": true; }; "toolbarClass": { "alias": "toolbarClass"; "required": false; "isSignal": true; }; "copyButtonClass": { "alias": "copyButtonClass"; "required": false; "isSignal": true; }; "editButtonClass": { "alias": "editButtonClass"; "required": false; "isSignal": true; }; "branchNavigationClass": { "alias": "branchNavigationClass"; "required": false; "isSignal": true; }; "messageRendererComponent": { "alias": "messageRendererComponent"; "required": false; "isSignal": true; }; "toolbarComponent": { "alias": "toolbarComponent"; "required": false; "isSignal": true; }; "copyButtonComponent": { "alias": "copyButtonComponent"; "required": false; "isSignal": true; }; "editButtonComponent": { "alias": "editButtonComponent"; "required": false; "isSignal": true; }; "branchNavigationComponent": { "alias": "branchNavigationComponent"; "required": false; "isSignal": true; }; "message": { "alias": "message"; "required": false; "isSignal": true; }; "branchIndex": { "alias": "branchIndex"; "required": false; "isSignal": true; }; "numberOfBranches": { "alias": "numberOfBranches"; "required": false; "isSignal": true; }; "additionalToolbarItems": { "alias": "additionalToolbarItems"; "required": false; "isSignal": true; }; "inputClass": { "alias": "inputClass"; "required": false; "isSignal": true; }; }, { "editMessage": "editMessage"; "switchToBranch": "switchToBranch"; }, ["messageRendererTemplate", "toolbarTemplate", "copyButtonTemplate", "editButtonTemplate", "branchNavigationTemplate"], never, true, never>;
|
|
3077
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CopilotChatUserMessage, "copilot-chat-user-message", never, { "messageRendererClass": { "alias": "messageRendererClass"; "required": false; "isSignal": true; }; "toolbarClass": { "alias": "toolbarClass"; "required": false; "isSignal": true; }; "copyButtonClass": { "alias": "copyButtonClass"; "required": false; "isSignal": true; }; "editButtonClass": { "alias": "editButtonClass"; "required": false; "isSignal": true; }; "branchNavigationClass": { "alias": "branchNavigationClass"; "required": false; "isSignal": true; }; "messageRendererComponent": { "alias": "messageRendererComponent"; "required": false; "isSignal": true; }; "toolbarComponent": { "alias": "toolbarComponent"; "required": false; "isSignal": true; }; "copyButtonComponent": { "alias": "copyButtonComponent"; "required": false; "isSignal": true; }; "editButtonComponent": { "alias": "editButtonComponent"; "required": false; "isSignal": true; }; "branchNavigationComponent": { "alias": "branchNavigationComponent"; "required": false; "isSignal": true; }; "message": { "alias": "message"; "required": false; "isSignal": true; }; "branchIndex": { "alias": "branchIndex"; "required": false; "isSignal": true; }; "numberOfBranches": { "alias": "numberOfBranches"; "required": false; "isSignal": true; }; "branchSwitchEnabled": { "alias": "branchSwitchEnabled"; "required": false; "isSignal": true; }; "additionalToolbarItems": { "alias": "additionalToolbarItems"; "required": false; "isSignal": true; }; "inputClass": { "alias": "inputClass"; "required": false; "isSignal": true; }; }, { "editMessage": "editMessage"; "switchToBranch": "switchToBranch"; }, ["messageRendererTemplate", "toolbarTemplate", "copyButtonTemplate", "editButtonTemplate", "branchNavigationTemplate"], never, true, never>;
|
|
2646
3078
|
}
|
|
2647
3079
|
|
|
2648
3080
|
/**
|
|
@@ -2657,18 +3089,24 @@ declare class CopilotChatMessageViewCursor {
|
|
|
2657
3089
|
}
|
|
2658
3090
|
|
|
2659
3091
|
declare class CopilotChatReasoningMessage {
|
|
3092
|
+
#private;
|
|
2660
3093
|
readonly message: _angular_core.InputSignal<ReasoningMessage>;
|
|
2661
3094
|
readonly messages: _angular_core.InputSignal<Message$1[]>;
|
|
2662
3095
|
readonly isRunning: _angular_core.InputSignal<boolean>;
|
|
2663
3096
|
readonly inputClass: _angular_core.InputSignal<string | undefined>;
|
|
2664
|
-
private readonly
|
|
3097
|
+
private readonly labels;
|
|
3098
|
+
protected readonly ChevronRightIcon: _copilotkit_core.CopilotIconData;
|
|
2665
3099
|
protected readonly isLatest: _angular_core.Signal<boolean>;
|
|
2666
3100
|
protected readonly isStreaming: _angular_core.Signal<boolean>;
|
|
2667
|
-
|
|
2668
|
-
protected readonly open: _angular_core.WritableSignal<boolean>;
|
|
3101
|
+
protected readonly open: _angular_core.Signal<boolean>;
|
|
2669
3102
|
protected readonly hasContent: _angular_core.Signal<boolean>;
|
|
2670
3103
|
protected readonly reasoningContent: _angular_core.Signal<string>;
|
|
3104
|
+
/**
|
|
3105
|
+
* `labels.reasoningMessageThinkingLabel` while streaming, then
|
|
3106
|
+
* `labels.reasoningMessageThoughtForLabel` ("Thought for 4 seconds").
|
|
3107
|
+
*/
|
|
2671
3108
|
protected readonly label: _angular_core.Signal<string>;
|
|
3109
|
+
constructor();
|
|
2672
3110
|
protected readonly computedClass: _angular_core.Signal<string>;
|
|
2673
3111
|
protected readonly headerClass: _angular_core.Signal<string>;
|
|
2674
3112
|
protected readonly chevronClass: _angular_core.Signal<string>;
|
|
@@ -2677,12 +3115,35 @@ declare class CopilotChatReasoningMessage {
|
|
|
2677
3115
|
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>;
|
|
2678
3116
|
}
|
|
2679
3117
|
|
|
3118
|
+
/**
|
|
3119
|
+
* Provided by the message view so each message's tool calls follow the
|
|
3120
|
+
* view's `toolCallDisplay`, like React's `ToolCallDisplayContext`.
|
|
3121
|
+
* @internal
|
|
3122
|
+
*/
|
|
3123
|
+
interface ToolCallDisplayContext {
|
|
3124
|
+
display: Signal<CopilotChatToolCallDisplay>;
|
|
3125
|
+
isRunning: Signal<boolean>;
|
|
3126
|
+
/** Each assistant message's tool calls, laid out across the whole list. */
|
|
3127
|
+
layouts: Signal<ReadonlyMap<string, _ToolCallLayout>>;
|
|
3128
|
+
/**
|
|
3129
|
+
* `"turn"` display: for each message in a reply's working phase, whether
|
|
3130
|
+
* that work is showing. Messages not in here are the reply itself.
|
|
3131
|
+
*/
|
|
3132
|
+
workOpen: Signal<ReadonlyMap<string, boolean>>;
|
|
3133
|
+
/**
|
|
3134
|
+
* Like `workOpen`, for the messages' text: text that ends the reply stays
|
|
3135
|
+
* out of it even when its message also calls a tool.
|
|
3136
|
+
*/
|
|
3137
|
+
workTextOpen: Signal<ReadonlyMap<string, boolean>>;
|
|
3138
|
+
}
|
|
3139
|
+
|
|
2680
3140
|
/**
|
|
2681
3141
|
* CopilotChatMessageView component - Angular port of the React component.
|
|
2682
3142
|
* Renders a list of chat messages with support for custom slots and layouts.
|
|
2683
3143
|
* DOM structure and Tailwind classes match the React implementation exactly.
|
|
2684
3144
|
*/
|
|
2685
3145
|
declare class CopilotChatMessageView {
|
|
3146
|
+
#private;
|
|
2686
3147
|
messages: _angular_core.InputSignal<Message$1[]>;
|
|
2687
3148
|
/** Current agent state exposed to transcript-children slots. */
|
|
2688
3149
|
state: _angular_core.InputSignal<unknown>;
|
|
@@ -2690,6 +3151,11 @@ declare class CopilotChatMessageView {
|
|
|
2690
3151
|
isLoading: _angular_core.InputSignal<boolean>;
|
|
2691
3152
|
inputClass: _angular_core.InputSignal<string | undefined>;
|
|
2692
3153
|
agentId: _angular_core.InputSignal<string | undefined>;
|
|
3154
|
+
/**
|
|
3155
|
+
* How assistant messages show tool calls: `"grouped"` (default), `"line"`,
|
|
3156
|
+
* `"stacked"` or `"separate"`. See `CopilotChatToolCallDisplay`.
|
|
3157
|
+
*/
|
|
3158
|
+
toolCallDisplay: _angular_core.InputSignal<CopilotChatToolCallDisplay>;
|
|
2693
3159
|
assistantMessageComponent: _angular_core.InputSignal<Type<any> | undefined>;
|
|
2694
3160
|
assistantMessageTemplate: _angular_core.InputSignal<TemplateRef<any> | undefined>;
|
|
2695
3161
|
assistantMessageClass: _angular_core.InputSignal<string | undefined>;
|
|
@@ -2705,6 +3171,9 @@ declare class CopilotChatMessageView {
|
|
|
2705
3171
|
cursorComponent: _angular_core.InputSignal<Type<any> | undefined>;
|
|
2706
3172
|
cursorTemplate: _angular_core.InputSignal<TemplateRef<any> | undefined>;
|
|
2707
3173
|
cursorClass: _angular_core.InputSignal<string | undefined>;
|
|
3174
|
+
workSummaryComponent: _angular_core.InputSignal<Type<unknown> | undefined>;
|
|
3175
|
+
workSummaryTemplate: _angular_core.InputSignal<TemplateRef<unknown> | undefined>;
|
|
3176
|
+
workSummaryClass: _angular_core.InputSignal<string | undefined>;
|
|
2708
3177
|
customLayoutTemplate?: TemplateRef<any>;
|
|
2709
3178
|
assistantMessageThumbsUp: _angular_core.OutputEmitterRef<{
|
|
2710
3179
|
message: Message$1;
|
|
@@ -2729,6 +3198,11 @@ declare class CopilotChatMessageView {
|
|
|
2729
3198
|
protected readonly defaultReasoningComponent: typeof CopilotChatReasoningMessage;
|
|
2730
3199
|
protected readonly defaultCursorComponent: typeof CopilotChatMessageViewCursor;
|
|
2731
3200
|
protected messagesValue: _angular_core.Signal<Message$1[]>;
|
|
3201
|
+
/**
|
|
3202
|
+
* The rows the list draws: one per message id. A streaming agent can list
|
|
3203
|
+
* the same message, or the same tool call, more than once.
|
|
3204
|
+
*/
|
|
3205
|
+
protected readonly renderedMessages: _angular_core.Signal<Message$1[]>;
|
|
2732
3206
|
/**
|
|
2733
3207
|
* Override table backing `rowRenderKey`. Per component instance, so its
|
|
2734
3208
|
* lifetime matches the rendered list.
|
|
@@ -2736,8 +3210,22 @@ declare class CopilotChatMessageView {
|
|
|
2736
3210
|
private readonly rowKeyStore;
|
|
2737
3211
|
protected rowRenderKeys: _angular_core.Signal<string[]>;
|
|
2738
3212
|
private readonly rowKeyStoreCommit;
|
|
2739
|
-
protected showCursorValue: _angular_core.Signal<boolean>;
|
|
2740
3213
|
protected isLoadingValue: _angular_core.Signal<boolean>;
|
|
3214
|
+
protected showCursorValue: _angular_core.Signal<boolean>;
|
|
3215
|
+
protected readonly isRunningValue: _angular_core.Signal<boolean>;
|
|
3216
|
+
/** Groups can span messages, so the view lays out every message's calls. */
|
|
3217
|
+
protected readonly viewState: _angular_core.Signal<{
|
|
3218
|
+
layouts: ReadonlyMap<string, _copilotkit_core.ɵToolCallLayout>;
|
|
3219
|
+
turnByFirstMessage: ReadonlyMap<string, _copilotkit_core.ɵTurnWork>;
|
|
3220
|
+
latestTurnKey: string;
|
|
3221
|
+
workOpen: Map<string, boolean>;
|
|
3222
|
+
workTextOpen: Map<string, boolean>;
|
|
3223
|
+
showCursor: boolean;
|
|
3224
|
+
pendingWorkSummary: boolean;
|
|
3225
|
+
}>;
|
|
3226
|
+
constructor();
|
|
3227
|
+
/** @internal Read by each message's tool-calls view. */
|
|
3228
|
+
readonly toolCallDisplayContext: ToolCallDisplayContext;
|
|
2741
3229
|
protected lastMessage: _angular_core.Signal<Message$1 | undefined>;
|
|
2742
3230
|
computedClass: _angular_core.Signal<string>;
|
|
2743
3231
|
layoutContext: _angular_core.Signal<{
|
|
@@ -2768,6 +3256,19 @@ declare class CopilotChatMessageView {
|
|
|
2768
3256
|
isRunning: boolean;
|
|
2769
3257
|
inputClass: string | undefined;
|
|
2770
3258
|
};
|
|
3259
|
+
protected isTurnWorking(turnKey: string): boolean;
|
|
3260
|
+
protected isTurnOpen(turnKey: string): boolean;
|
|
3261
|
+
protected workTime(turnKey: string): _copilotkit_core.ɵWorkTime | undefined;
|
|
3262
|
+
protected toggleTurn(turnKey: string): void;
|
|
3263
|
+
workSummaryContext(turnKey: string, calls: ToolCallEntry[]): {
|
|
3264
|
+
isWorking: boolean;
|
|
3265
|
+
isOpen: boolean;
|
|
3266
|
+
calls: ToolCallEntry[];
|
|
3267
|
+
elapsedMs: number | undefined;
|
|
3268
|
+
workingSince: number | undefined;
|
|
3269
|
+
inputClass: string | undefined;
|
|
3270
|
+
onClick: () => void;
|
|
3271
|
+
};
|
|
2771
3272
|
mergeUserProps(message: Message$1): {
|
|
2772
3273
|
message: Message$1;
|
|
2773
3274
|
inputClass: string | undefined;
|
|
@@ -2792,7 +3293,7 @@ declare class CopilotChatMessageView {
|
|
|
2792
3293
|
message: Message$1;
|
|
2793
3294
|
}): void;
|
|
2794
3295
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CopilotChatMessageView, never>;
|
|
2795
|
-
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>;
|
|
3296
|
+
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; }; "toolCallDisplay": { "alias": "toolCallDisplay"; "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; }; "workSummaryComponent": { "alias": "workSummaryComponent"; "required": false; "isSignal": true; }; "workSummaryTemplate": { "alias": "workSummaryTemplate"; "required": false; "isSignal": true; }; "workSummaryClass": { "alias": "workSummaryClass"; "required": false; "isSignal": true; }; }, { "assistantMessageThumbsUp": "assistantMessageThumbsUp"; "assistantMessageThumbsDown": "assistantMessageThumbsDown"; "assistantMessageReadAloud": "assistantMessageReadAloud"; "assistantMessageRegenerate": "assistantMessageRegenerate"; "userMessageCopy": "userMessageCopy"; "userMessageEdit": "userMessageEdit"; }, ["customLayoutTemplate"], never, true, never>;
|
|
2796
3297
|
}
|
|
2797
3298
|
|
|
2798
3299
|
interface MessageViewContext {
|
|
@@ -2828,6 +3329,7 @@ declare class CopilotChatSuggestionPill {
|
|
|
2828
3329
|
readonly isLoading: _angular_core.InputSignal<boolean>;
|
|
2829
3330
|
readonly inputClass: _angular_core.InputSignal<string | undefined>;
|
|
2830
3331
|
readonly clicked: _angular_core.OutputEmitterRef<void>;
|
|
3332
|
+
protected readonly Loader2Icon: _copilotkit_core.CopilotIconData;
|
|
2831
3333
|
protected readonly computedClass: _angular_core.Signal<string>;
|
|
2832
3334
|
handleClick(): void;
|
|
2833
3335
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CopilotChatSuggestionPill, never>;
|
|
@@ -2847,6 +3349,66 @@ declare class CopilotChatSuggestionView {
|
|
|
2847
3349
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CopilotChatSuggestionView, "copilot-chat-suggestion-view", never, { "suggestions": { "alias": "suggestions"; "required": false; "isSignal": true; }; "inputClass": { "alias": "inputClass"; "required": false; "isSignal": true; }; }, { "selectSuggestion": "selectSuggestion"; }, never, never, true, never>;
|
|
2848
3350
|
}
|
|
2849
3351
|
|
|
3352
|
+
/**
|
|
3353
|
+
* Tool calls made in a row, collapsed into one summary, like React's
|
|
3354
|
+
* `CopilotChatToolCallGroup`. While a call runs the summary names it
|
|
3355
|
+
* ("Running read_file src/app.ts"); once they're all done it reads
|
|
3356
|
+
* "Used 3 tools" and opens to the calls.
|
|
3357
|
+
*
|
|
3358
|
+
* Each call is drawn by its registered renderer. CopilotKit's built-in card
|
|
3359
|
+
* draws a compact row inside the card and line appearances and an open stack.
|
|
3360
|
+
*/
|
|
3361
|
+
declare class CopilotChatToolCallGroup {
|
|
3362
|
+
#private;
|
|
3363
|
+
/** The calls in the group, in order. */
|
|
3364
|
+
readonly calls: _angular_core.InputSignal<ToolCallEntry[]>;
|
|
3365
|
+
/**
|
|
3366
|
+
* - `"card"` (default): one card with a summary header and a row per call.
|
|
3367
|
+
* - `"line"`: a quiet line of text that opens to a list of rows.
|
|
3368
|
+
* - `"stack"`: the latest call on a stack of the earlier ones.
|
|
3369
|
+
*/
|
|
3370
|
+
readonly appearance: _angular_core.InputSignal<_copilotkit_core.ɵToolCallGroupAppearance>;
|
|
3371
|
+
/** The agent is running and nothing follows the group, so more calls may join it. */
|
|
3372
|
+
readonly isActive: _angular_core.InputSignal<boolean>;
|
|
3373
|
+
/** The message the group starts in. */
|
|
3374
|
+
readonly message: _angular_core.InputSignal<AssistantMessage$1>;
|
|
3375
|
+
readonly messages: _angular_core.InputSignal<Message$1[]>;
|
|
3376
|
+
readonly agentId: _angular_core.InputSignal<string | undefined>;
|
|
3377
|
+
readonly isLoading: _angular_core.InputSignal<boolean>;
|
|
3378
|
+
protected readonly open: _angular_core.WritableSignal<boolean>;
|
|
3379
|
+
protected readonly bodyId: string;
|
|
3380
|
+
protected readonly labels: _copilotkit_core.CopilotChatLabels;
|
|
3381
|
+
protected readonly ChevronRightIcon: _copilotkit_core.CopilotIconData;
|
|
3382
|
+
protected readonly latest: Signal<ToolCallEntry | undefined>;
|
|
3383
|
+
/**
|
|
3384
|
+
* Only an active group has a call in progress. Between calls nothing is
|
|
3385
|
+
* running, so the latest call stays the subject (or the label flickers).
|
|
3386
|
+
*/
|
|
3387
|
+
protected readonly current: Signal<ToolCallEntry | undefined>;
|
|
3388
|
+
protected readonly preview: Signal<string | undefined>;
|
|
3389
|
+
protected readonly statuses: Signal<Map<string, _copilotkit_core.ɵToolCallRowStatus>>;
|
|
3390
|
+
protected readonly failedCount: Signal<number>;
|
|
3391
|
+
protected readonly failedCountText: Signal<string>;
|
|
3392
|
+
protected readonly usedToolsText: Signal<string>;
|
|
3393
|
+
protected readonly toolCallCountText: Signal<string>;
|
|
3394
|
+
protected readonly callCountText: Signal<string>;
|
|
3395
|
+
protected readonly doneCount: Signal<number>;
|
|
3396
|
+
protected readonly doneCountText: Signal<string>;
|
|
3397
|
+
protected readonly status: Signal<_copilotkit_core.ɵToolCallRowStatus>;
|
|
3398
|
+
protected readonly names: Signal<string>;
|
|
3399
|
+
protected readonly latestStatus: Signal<_copilotkit_core.ɵToolCallRowStatus>;
|
|
3400
|
+
protected readonly latestPreview: Signal<string | undefined>;
|
|
3401
|
+
/** A lone call is the top card of a stack with nothing behind it yet. */
|
|
3402
|
+
protected readonly behind: Signal<number[]>;
|
|
3403
|
+
protected readonly chevronClass: Signal<string>;
|
|
3404
|
+
protected rowFor(toolCallId: string): ToolCallRenderContext["row"];
|
|
3405
|
+
protected statusText(status: ToolCallRowStatus): string;
|
|
3406
|
+
protected runningText(entry: ToolCallEntry): string;
|
|
3407
|
+
protected toggle(): void;
|
|
3408
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CopilotChatToolCallGroup, never>;
|
|
3409
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CopilotChatToolCallGroup, "copilot-chat-tool-call-group", never, { "calls": { "alias": "calls"; "required": true; "isSignal": true; }; "appearance": { "alias": "appearance"; "required": false; "isSignal": true; }; "isActive": { "alias": "isActive"; "required": false; "isSignal": true; }; "message": { "alias": "message"; "required": true; "isSignal": true; }; "messages": { "alias": "messages"; "required": false; "isSignal": true; }; "agentId": { "alias": "agentId"; "required": false; "isSignal": true; }; "isLoading": { "alias": "isLoading"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
3410
|
+
}
|
|
3411
|
+
|
|
2850
3412
|
/**
|
|
2851
3413
|
* ScrollToBottomButton component for CopilotChatView
|
|
2852
3414
|
* Matches React implementation exactly with same Tailwind classes
|
|
@@ -2856,7 +3418,8 @@ declare class CopilotChatViewScrollToBottomButton {
|
|
|
2856
3418
|
disabled: _angular_core.InputSignal<boolean>;
|
|
2857
3419
|
onClick: _angular_core.InputSignal<(() => void) | undefined>;
|
|
2858
3420
|
clicked: _angular_core.OutputEmitterRef<void>;
|
|
2859
|
-
|
|
3421
|
+
readonly labels: _copilotkit_core.CopilotChatLabels;
|
|
3422
|
+
protected readonly ChevronDown: _copilotkit_core.CopilotIconData;
|
|
2860
3423
|
get computedClass(): string;
|
|
2861
3424
|
handleClick(): void;
|
|
2862
3425
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CopilotChatViewScrollToBottomButton, never>;
|
|
@@ -2867,8 +3430,7 @@ declare class CopilotChatViewScrollToBottomButton {
|
|
|
2867
3430
|
* ScrollView component for CopilotChatView
|
|
2868
3431
|
* Handles auto-scrolling and scroll position management
|
|
2869
3432
|
*/
|
|
2870
|
-
declare class CopilotChatViewScrollView
|
|
2871
|
-
private cdr;
|
|
3433
|
+
declare class CopilotChatViewScrollView {
|
|
2872
3434
|
protected readonly chatState: ChatState | null;
|
|
2873
3435
|
autoScroll: _angular_core.InputSignal<boolean>;
|
|
2874
3436
|
inputContainerHeight: _angular_core.InputSignal<number>;
|
|
@@ -2886,10 +3448,22 @@ declare class CopilotChatViewScrollView implements AfterViewInit, OnDestroy {
|
|
|
2886
3448
|
reasoningMessageComponent: _angular_core.InputSignal<Type<any> | undefined>;
|
|
2887
3449
|
reasoningMessageTemplate: _angular_core.InputSignal<TemplateRef<any> | undefined>;
|
|
2888
3450
|
reasoningMessageClass: _angular_core.InputSignal<string | undefined>;
|
|
3451
|
+
workSummaryComponent: _angular_core.InputSignal<Type<unknown> | undefined>;
|
|
3452
|
+
workSummaryTemplate: _angular_core.InputSignal<TemplateRef<unknown> | undefined>;
|
|
3453
|
+
workSummaryClass: _angular_core.InputSignal<string | undefined>;
|
|
2889
3454
|
messageViewChildrenComponent: _angular_core.InputSignal<Type<any> | undefined>;
|
|
2890
3455
|
messageViewChildrenTemplate: _angular_core.InputSignal<TemplateRef<any> | undefined>;
|
|
2891
3456
|
messageViewChildrenClass: _angular_core.InputSignal<string | undefined>;
|
|
2892
3457
|
showCursor: _angular_core.InputSignal<boolean>;
|
|
3458
|
+
/** `true` while the agent runs. Suggestions hide meanwhile. */
|
|
3459
|
+
isRunning: _angular_core.InputSignal<boolean>;
|
|
3460
|
+
/** `true` while the thread's connect is loading. Suggestions hide meanwhile. */
|
|
3461
|
+
isConnecting: _angular_core.InputSignal<boolean>;
|
|
3462
|
+
/**
|
|
3463
|
+
* How assistant messages show tool calls: `"grouped"` (default), `"line"`,
|
|
3464
|
+
* `"stacked"` or `"separate"`. Forwarded to the message view.
|
|
3465
|
+
*/
|
|
3466
|
+
toolCallDisplay: _angular_core.InputSignal<CopilotChatToolCallDisplay>;
|
|
2893
3467
|
scrollToBottomButton: _angular_core.InputSignal<any>;
|
|
2894
3468
|
scrollToBottomButtonClass: _angular_core.InputSignal<string | undefined>;
|
|
2895
3469
|
assistantMessageThumbsUp: _angular_core.OutputEmitterRef<{
|
|
@@ -2913,18 +3487,19 @@ declare class CopilotChatViewScrollView implements AfterViewInit, OnDestroy {
|
|
|
2913
3487
|
scrollContainer?: ElementRef<HTMLElement>;
|
|
2914
3488
|
contentContainer?: ElementRef<HTMLElement>;
|
|
2915
3489
|
stickToBottomDirective?: StickToBottom;
|
|
3490
|
+
private readonly scrollElement;
|
|
3491
|
+
/** Tracks the position for the button when `autoScroll` is off. */
|
|
3492
|
+
private manualScroll?;
|
|
2916
3493
|
protected readonly defaultMessageViewComponent: typeof CopilotChatMessageView;
|
|
2917
3494
|
protected readonly defaultScrollToBottomButtonComponent: typeof CopilotChatViewScrollToBottomButton;
|
|
2918
3495
|
protected hasMounted: _angular_core.WritableSignal<boolean>;
|
|
2919
3496
|
protected showScrollButton: _angular_core.WritableSignal<boolean>;
|
|
2920
3497
|
protected isAtBottom: _angular_core.WritableSignal<boolean>;
|
|
3498
|
+
private readonly viewState;
|
|
2921
3499
|
protected hasSuggestions: _angular_core.Signal<boolean>;
|
|
2922
3500
|
protected paddingBottom: _angular_core.Signal<number>;
|
|
2923
3501
|
protected computedClass: _angular_core.Signal<string>;
|
|
2924
|
-
private destroy$;
|
|
2925
|
-
private scrollPositionService;
|
|
2926
3502
|
constructor();
|
|
2927
|
-
ngAfterViewInit(): void;
|
|
2928
3503
|
/**
|
|
2929
3504
|
* Handle isAtBottom change from StickToBottom directive
|
|
2930
3505
|
*/
|
|
@@ -2937,7 +3512,6 @@ declare class CopilotChatViewScrollView implements AfterViewInit, OnDestroy {
|
|
|
2937
3512
|
* Scroll to bottom for stick-to-bottom mode
|
|
2938
3513
|
*/
|
|
2939
3514
|
scrollToBottomFromStick(): void;
|
|
2940
|
-
ngOnDestroy(): void;
|
|
2941
3515
|
scrollToBottomOutputs: {
|
|
2942
3516
|
clicked: () => void;
|
|
2943
3517
|
};
|
|
@@ -2948,20 +3522,19 @@ declare class CopilotChatViewScrollView implements AfterViewInit, OnDestroy {
|
|
|
2948
3522
|
scrollToBottomContext(): any;
|
|
2949
3523
|
scrollToBottomFromStickContext(): any;
|
|
2950
3524
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CopilotChatViewScrollView, never>;
|
|
2951
|
-
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>;
|
|
3525
|
+
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; }; "workSummaryComponent": { "alias": "workSummaryComponent"; "required": false; "isSignal": true; }; "workSummaryTemplate": { "alias": "workSummaryTemplate"; "required": false; "isSignal": true; }; "workSummaryClass": { "alias": "workSummaryClass"; "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; }; "isRunning": { "alias": "isRunning"; "required": false; "isSignal": true; }; "isConnecting": { "alias": "isConnecting"; "required": false; "isSignal": true; }; "toolCallDisplay": { "alias": "toolCallDisplay"; "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>;
|
|
2952
3526
|
}
|
|
2953
3527
|
|
|
2954
3528
|
/**
|
|
2955
|
-
* Feather
|
|
2956
|
-
*
|
|
2957
|
-
*
|
|
3529
|
+
* Feather slot for CopilotChatView, between the messages and the input. Like
|
|
3530
|
+
* React's, the default renders an empty element: pass a class or a component
|
|
3531
|
+
* to draw a fade.
|
|
2958
3532
|
*/
|
|
2959
3533
|
declare class CopilotChatViewFeather {
|
|
2960
3534
|
inputClass: _angular_core.InputSignal<string | undefined>;
|
|
2961
3535
|
style: _angular_core.InputSignal<{
|
|
2962
3536
|
[key: string]: any;
|
|
2963
3537
|
} | undefined>;
|
|
2964
|
-
get computedClass(): string;
|
|
2965
3538
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CopilotChatViewFeather, never>;
|
|
2966
3539
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CopilotChatViewFeather, "copilot-chat-view-feather", never, { "inputClass": { "alias": "inputClass"; "required": false; "isSignal": true; }; "style": { "alias": "style"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
2967
3540
|
}
|
|
@@ -2974,7 +3547,7 @@ declare class CopilotChatViewFeather {
|
|
|
2974
3547
|
declare class CopilotChatViewDisclaimer {
|
|
2975
3548
|
inputClass: _angular_core.InputSignal<string | undefined>;
|
|
2976
3549
|
text: _angular_core.InputSignal<string | undefined>;
|
|
2977
|
-
readonly labels:
|
|
3550
|
+
readonly labels: _copilotkit_core.CopilotChatLabels;
|
|
2978
3551
|
get disclaimerText(): string;
|
|
2979
3552
|
get computedClass(): string;
|
|
2980
3553
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CopilotChatViewDisclaimer, never>;
|
|
@@ -3018,7 +3591,7 @@ declare class CopilotChatViewInputContainer extends ElementRef {
|
|
|
3018
3591
|
declare class CopilotChatView implements OnInit, OnChanges {
|
|
3019
3592
|
private handlers;
|
|
3020
3593
|
protected readonly chatState: ChatState | null;
|
|
3021
|
-
protected readonly UploadIcon: CopilotIconData;
|
|
3594
|
+
protected readonly UploadIcon: _copilotkit_core.CopilotIconData;
|
|
3022
3595
|
messages: _angular_core.InputSignal<Message[]>;
|
|
3023
3596
|
/** Current agent state forwarded to message-view extension slots. */
|
|
3024
3597
|
state: _angular_core.InputSignal<unknown>;
|
|
@@ -3026,15 +3599,32 @@ declare class CopilotChatView implements OnInit, OnChanges {
|
|
|
3026
3599
|
autoScroll: _angular_core.InputSignal<boolean>;
|
|
3027
3600
|
showCursor: _angular_core.InputSignal<boolean>;
|
|
3028
3601
|
hasExplicitThreadId: _angular_core.InputSignal<boolean>;
|
|
3602
|
+
/** `true` while the agent runs. Suggestions hide meanwhile. */
|
|
3603
|
+
isRunning: _angular_core.InputSignal<boolean>;
|
|
3604
|
+
/**
|
|
3605
|
+
* `true` while the thread's connect is loading. The welcome screen and
|
|
3606
|
+
* suggestions wait for it, so a picked thread does not flash them.
|
|
3607
|
+
*/
|
|
3608
|
+
isConnecting: _angular_core.InputSignal<boolean>;
|
|
3609
|
+
/** `false` turns the welcome screen off for an empty chat. */
|
|
3610
|
+
welcomeScreen: _angular_core.InputSignal<boolean>;
|
|
3029
3611
|
messageViewComponent: _angular_core.InputSignal<Type<any> | undefined>;
|
|
3030
3612
|
messageViewTemplate: _angular_core.InputSignal<TemplateRef<any> | undefined>;
|
|
3031
3613
|
messageViewClass: _angular_core.InputSignal<string | undefined>;
|
|
3614
|
+
/**
|
|
3615
|
+
* How assistant messages show tool calls: `"grouped"` (default), `"line"`,
|
|
3616
|
+
* `"stacked"` or `"separate"`. Forwarded to the message view.
|
|
3617
|
+
*/
|
|
3618
|
+
toolCallDisplay: _angular_core.InputSignal<CopilotChatToolCallDisplay>;
|
|
3032
3619
|
assistantMessageComponent: _angular_core.InputSignal<Type<any> | undefined>;
|
|
3033
3620
|
assistantMessageTemplate: _angular_core.InputSignal<TemplateRef<any> | undefined>;
|
|
3034
3621
|
assistantMessageClass: _angular_core.InputSignal<string | undefined>;
|
|
3035
3622
|
reasoningMessageComponent: _angular_core.InputSignal<Type<any> | undefined>;
|
|
3036
3623
|
reasoningMessageTemplate: _angular_core.InputSignal<TemplateRef<any> | undefined>;
|
|
3037
3624
|
reasoningMessageClass: _angular_core.InputSignal<string | undefined>;
|
|
3625
|
+
workSummaryComponent: _angular_core.InputSignal<Type<unknown> | undefined>;
|
|
3626
|
+
workSummaryTemplate: _angular_core.InputSignal<TemplateRef<unknown> | undefined>;
|
|
3627
|
+
workSummaryClass: _angular_core.InputSignal<string | undefined>;
|
|
3038
3628
|
messageViewChildrenComponent: _angular_core.InputSignal<Type<any> | undefined>;
|
|
3039
3629
|
messageViewChildrenTemplate: _angular_core.InputSignal<TemplateRef<any> | undefined>;
|
|
3040
3630
|
messageViewChildrenClass: _angular_core.InputSignal<string | undefined>;
|
|
@@ -3090,7 +3680,8 @@ declare class CopilotChatView implements OnInit, OnChanges {
|
|
|
3090
3680
|
protected readonly defaultInputComponent: typeof CopilotChatInput;
|
|
3091
3681
|
protected readonly defaultFeatherComponent: typeof CopilotChatViewFeather;
|
|
3092
3682
|
protected readonly defaultDisclaimerComponent: typeof CopilotChatViewDisclaimer;
|
|
3093
|
-
protected readonly labels:
|
|
3683
|
+
protected readonly labels: _copilotkit_core.CopilotChatLabels;
|
|
3684
|
+
protected readonly welcomeLayout: "default" | "popup" | "sidebar";
|
|
3094
3685
|
protected messagesValue: _angular_core.Signal<Message[]>;
|
|
3095
3686
|
protected autoScrollSignal: _angular_core.Signal<boolean>;
|
|
3096
3687
|
protected showCursorSignal: _angular_core.Signal<boolean>;
|
|
@@ -3100,8 +3691,6 @@ declare class CopilotChatView implements OnInit, OnChanges {
|
|
|
3100
3691
|
protected readonly inputContainerHeight: _angular_core.Signal<number>;
|
|
3101
3692
|
protected readonly isResizing: _angular_core.Signal<boolean>;
|
|
3102
3693
|
protected shouldShowWelcomeScreen: _angular_core.Signal<boolean>;
|
|
3103
|
-
protected computedClass: _angular_core.Signal<string>;
|
|
3104
|
-
protected dropOverlayClass: _angular_core.Signal<string>;
|
|
3105
3694
|
protected messageViewSlot: _angular_core.Signal<Type<any> | TemplateRef<any> | undefined>;
|
|
3106
3695
|
protected scrollViewSlot: _angular_core.Signal<Type<any> | TemplateRef<any> | undefined>;
|
|
3107
3696
|
protected scrollToBottomButtonSlot: _angular_core.Signal<Type<any> | TemplateRef<any> | undefined>;
|
|
@@ -3120,12 +3709,16 @@ declare class CopilotChatView implements OnInit, OnChanges {
|
|
|
3120
3709
|
agentId: string | undefined;
|
|
3121
3710
|
messageView: Type<any> | TemplateRef<any> | undefined;
|
|
3122
3711
|
messageViewClass: string | undefined;
|
|
3712
|
+
toolCallDisplay: CopilotChatToolCallDisplay;
|
|
3123
3713
|
assistantMessageComponent: Type<any> | undefined;
|
|
3124
3714
|
assistantMessageTemplate: TemplateRef<any> | undefined;
|
|
3125
3715
|
assistantMessageClass: string | undefined;
|
|
3126
3716
|
reasoningMessageComponent: Type<any> | undefined;
|
|
3127
3717
|
reasoningMessageTemplate: TemplateRef<any> | undefined;
|
|
3128
3718
|
reasoningMessageClass: string | undefined;
|
|
3719
|
+
workSummaryComponent: Type<unknown> | undefined;
|
|
3720
|
+
workSummaryTemplate: TemplateRef<unknown> | undefined;
|
|
3721
|
+
workSummaryClass: string | undefined;
|
|
3129
3722
|
messageViewChildrenComponent: Type<any> | undefined;
|
|
3130
3723
|
messageViewChildrenTemplate: TemplateRef<any> | undefined;
|
|
3131
3724
|
messageViewChildrenClass: string | undefined;
|
|
@@ -3150,7 +3743,7 @@ declare class CopilotChatView implements OnInit, OnChanges {
|
|
|
3150
3743
|
ngOnInit(): void;
|
|
3151
3744
|
ngOnChanges(): void;
|
|
3152
3745
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CopilotChatView, never>;
|
|
3153
|
-
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>;
|
|
3746
|
+
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; }; "isRunning": { "alias": "isRunning"; "required": false; "isSignal": true; }; "isConnecting": { "alias": "isConnecting"; "required": false; "isSignal": true; }; "welcomeScreen": { "alias": "welcomeScreen"; "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; }; "toolCallDisplay": { "alias": "toolCallDisplay"; "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; }; "workSummaryComponent": { "alias": "workSummaryComponent"; "required": false; "isSignal": true; }; "workSummaryTemplate": { "alias": "workSummaryTemplate"; "required": false; "isSignal": true; }; "workSummaryClass": { "alias": "workSummaryClass"; "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>;
|
|
3154
3747
|
}
|
|
3155
3748
|
|
|
3156
3749
|
/**
|
|
@@ -3164,25 +3757,17 @@ declare class CopilotChatView implements OnInit, OnChanges {
|
|
|
3164
3757
|
* first message from the welcome screen — and torn down with it.
|
|
3165
3758
|
*
|
|
3166
3759
|
* Measurement is platform-driven: afterNextRender fires once the slot's
|
|
3167
|
-
* dynamically created content is in the DOM (and never during SSR), and
|
|
3168
|
-
*
|
|
3169
|
-
* 0 → laid-out transition.
|
|
3760
|
+
* dynamically created content is in the DOM (and never during SSR), and
|
|
3761
|
+
* core's `ɵwatchElementHeight` keeps the height current from there,
|
|
3762
|
+
* including the initial 0 → laid-out transition.
|
|
3170
3763
|
*/
|
|
3171
3764
|
declare class CopilotChatViewInputMeasure {
|
|
3172
3765
|
private readonly host;
|
|
3173
|
-
private readonly resizeObserverService;
|
|
3174
3766
|
private readonly destroyRef;
|
|
3175
|
-
/**
|
|
3176
|
-
* Root element of the input container component — its absolutely
|
|
3177
|
-
* positioned overlay wrapper — once it has been rendered into the slot.
|
|
3178
|
-
* Custom input containers without that element are left unmeasured.
|
|
3179
|
-
*/
|
|
3180
|
-
private readonly target;
|
|
3181
|
-
private readonly state;
|
|
3182
3767
|
/** Measured height of the input container in px; 0 until first laid out. */
|
|
3183
|
-
readonly height: _angular_core.
|
|
3768
|
+
readonly height: _angular_core.WritableSignal<number>;
|
|
3184
3769
|
/** True while the input container is resizing, false once it has settled. */
|
|
3185
|
-
readonly resizing: _angular_core.
|
|
3770
|
+
readonly resizing: _angular_core.WritableSignal<boolean>;
|
|
3186
3771
|
constructor();
|
|
3187
3772
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CopilotChatViewInputMeasure, never>;
|
|
3188
3773
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<CopilotChatViewInputMeasure, "[copilotChatViewInputMeasure]", never, {}, {}, never, never, true, never>;
|
|
@@ -3194,6 +3779,12 @@ declare class CopilotChatViewInputMeasure {
|
|
|
3194
3779
|
interface CopilotChatViewProps {
|
|
3195
3780
|
messages?: Message[];
|
|
3196
3781
|
autoScroll?: boolean;
|
|
3782
|
+
/** `true` while the agent runs. Suggestions hide meanwhile. */
|
|
3783
|
+
isRunning?: boolean;
|
|
3784
|
+
/** `true` while the thread's connect is loading. */
|
|
3785
|
+
isConnecting?: boolean;
|
|
3786
|
+
/** `false` turns the welcome screen off for an empty chat. */
|
|
3787
|
+
welcomeScreen?: boolean;
|
|
3197
3788
|
messageViewComponent?: Type<any>;
|
|
3198
3789
|
messageViewTemplate?: TemplateRef<any>;
|
|
3199
3790
|
messageViewClass?: string;
|
|
@@ -3232,6 +3823,53 @@ interface CopilotChatViewLayoutContext {
|
|
|
3232
3823
|
disclaimer: any;
|
|
3233
3824
|
}
|
|
3234
3825
|
|
|
3826
|
+
/**
|
|
3827
|
+
* The line at the top of a reply in the `"turn"` tool-call display, like
|
|
3828
|
+
* React's `CopilotChatWorkSummary`. While the agent works it reads "Working
|
|
3829
|
+
* 4s". Once the reply is done it reads "Worked for 9s" and "7 tools". The
|
|
3830
|
+
* message view toggles the work it folded away when the button is clicked.
|
|
3831
|
+
* The text comes from the `workSummary...` and `toolCall...` chat labels.
|
|
3832
|
+
*/
|
|
3833
|
+
declare class CopilotChatWorkSummary {
|
|
3834
|
+
#private;
|
|
3835
|
+
/** The agent is still working on this reply. */
|
|
3836
|
+
readonly isWorking: _angular_core.InputSignal<boolean>;
|
|
3837
|
+
/** Whether the work (narration and tool calls) is showing. */
|
|
3838
|
+
readonly isOpen: _angular_core.InputSignal<boolean>;
|
|
3839
|
+
/** The tool calls the reply made. */
|
|
3840
|
+
readonly calls: _angular_core.InputSignal<ToolCallEntry[]>;
|
|
3841
|
+
/**
|
|
3842
|
+
* How long the agent has worked on the reply, in ms, summed over its runs.
|
|
3843
|
+
* Only known for replies this client watched start; without it the summary
|
|
3844
|
+
* shows the tool count.
|
|
3845
|
+
*/
|
|
3846
|
+
readonly elapsedMs: _angular_core.InputSignal<number | undefined>;
|
|
3847
|
+
/** When the current run started (epoch ms), while the agent is working. */
|
|
3848
|
+
readonly workingSince: _angular_core.InputSignal<number | undefined>;
|
|
3849
|
+
readonly inputClass: _angular_core.InputSignal<string | undefined>;
|
|
3850
|
+
protected readonly ChevronRightIcon: _copilotkit_core.CopilotIconData;
|
|
3851
|
+
constructor();
|
|
3852
|
+
protected readonly text: _angular_core.Signal<{
|
|
3853
|
+
label: string;
|
|
3854
|
+
detail: string | null;
|
|
3855
|
+
failed: null;
|
|
3856
|
+
} | {
|
|
3857
|
+
label: string;
|
|
3858
|
+
detail: null;
|
|
3859
|
+
failed: string | null;
|
|
3860
|
+
} | {
|
|
3861
|
+
label: string;
|
|
3862
|
+
detail: string;
|
|
3863
|
+
failed: string | null;
|
|
3864
|
+
}>;
|
|
3865
|
+
protected readonly buttonClass: _angular_core.Signal<string>;
|
|
3866
|
+
protected readonly labelClass: _angular_core.Signal<string>;
|
|
3867
|
+
protected readonly detailClass: _angular_core.Signal<string>;
|
|
3868
|
+
protected readonly chevronClass: _angular_core.Signal<string>;
|
|
3869
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CopilotChatWorkSummary, never>;
|
|
3870
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CopilotChatWorkSummary, "copilot-chat-work-summary", never, { "isWorking": { "alias": "isWorking"; "required": false; "isSignal": true; }; "isOpen": { "alias": "isOpen"; "required": false; "isSignal": true; }; "calls": { "alias": "calls"; "required": false; "isSignal": true; }; "elapsedMs": { "alias": "elapsedMs"; "required": false; "isSignal": true; }; "workingSince": { "alias": "workingSince"; "required": false; "isSignal": true; }; "inputClass": { "alias": "inputClass"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
3871
|
+
}
|
|
3872
|
+
|
|
3235
3873
|
/**
|
|
3236
3874
|
* Structural directive that captures a per-row template for projection into
|
|
3237
3875
|
* the `<copilotkit-threads-drawer>` element as light-DOM children with
|
|
@@ -3266,7 +3904,7 @@ declare class CopilotThreadsDrawerRow {
|
|
|
3266
3904
|
* Thread list state is fetched from CopilotKit Intelligence via
|
|
3267
3905
|
* {@link injectThreads} and pushed onto the element's JS properties via an
|
|
3268
3906
|
* `effect`, following the imperative property-assignment pattern used elsewhere
|
|
3269
|
-
* in this package
|
|
3907
|
+
* in this package.
|
|
3270
3908
|
*
|
|
3271
3909
|
* DOM events emitted by the element are routed back to the chat configuration
|
|
3272
3910
|
* and thread mutation methods via declarative Angular event bindings.
|
|
@@ -3365,32 +4003,12 @@ declare class CopilotThreadsDrawer {
|
|
|
3365
4003
|
* 3. {@link DEFAULT_AGENT_ID}.
|
|
3366
4004
|
*/
|
|
3367
4005
|
protected readonly resolvedAgentId: _angular_core.Signal<string>;
|
|
3368
|
-
|
|
3369
|
-
* Normalized license context derived from Core's structured and legacy
|
|
3370
|
-
* Runtime authority, with the same precedence as the React provider.
|
|
3371
|
-
*/
|
|
3372
|
-
private readonly licenseContext;
|
|
3373
|
-
/**
|
|
3374
|
-
* Two-pronged license gate, mirroring the React wrapper. `checkFeature` fails
|
|
3375
|
-
* OPEN (returns true) when no license is configured, so it cannot by itself
|
|
3376
|
-
* detect the no-license case; we therefore also require a positive
|
|
3377
|
-
* license-present signal. Only a resolved `valid`/`expiring` status counts as
|
|
3378
|
-
* present — a resolved `none`/`expired`/`invalid` gates the drawer to the
|
|
3379
|
-
* locked view. `unknown` is an unrecovered retryable entitlement lookup, not
|
|
3380
|
-
* a settled negative: fetch the list and let the threads endpoint decide.
|
|
3381
|
-
*/
|
|
4006
|
+
private readonly threadsLicense;
|
|
3382
4007
|
protected readonly licensed: _angular_core.Signal<boolean>;
|
|
3383
|
-
/**
|
|
3384
|
-
* Whether the runtime has not yet reported a license status. The status is
|
|
3385
|
-
* `null` until the first `/info` response lands; treat that window as
|
|
3386
|
-
* "not yet unlicensed" — show the loading state, never the locked view — so a
|
|
3387
|
-
* licensed drawer never flashes (or strands) the Upgrade CTA mid-resolution.
|
|
3388
|
-
*/
|
|
3389
4008
|
protected readonly licensePending: _angular_core.Signal<boolean>;
|
|
3390
|
-
/** Live thread list from CopilotKit Intelligence for the resolved agent. */
|
|
3391
4009
|
protected readonly threads: _copilotkit_angular.InjectThreadsResult;
|
|
3392
4010
|
/** Thread records mapped to the element's {@link DrawerThread} shape. */
|
|
3393
|
-
protected readonly drawerThreads: _angular_core.Signal<DrawerThread[]>;
|
|
4011
|
+
protected readonly drawerThreads: _angular_core.Signal<_copilotkit_core.ɵDrawerThread[]>;
|
|
3394
4012
|
/**
|
|
3395
4013
|
* User-facing error message from the filtered list error signal, or `null`
|
|
3396
4014
|
* when there is no error. Uses `listError` (not `error`) so developer/config
|
|
@@ -3425,15 +4043,7 @@ declare class CopilotThreadsDrawer {
|
|
|
3425
4043
|
*/
|
|
3426
4044
|
protected readonly drawerOpen: _angular_core.Signal<boolean>;
|
|
3427
4045
|
constructor();
|
|
3428
|
-
|
|
3429
|
-
* Handles the `thread-selected` event from the drawer element.
|
|
3430
|
-
*
|
|
3431
|
-
* When a `threadSelectHandler` override is provided by the host, it is called
|
|
3432
|
-
* exclusively. Otherwise, the ambient chat configuration is driven directly so
|
|
3433
|
-
* a bare `<copilot-threads-drawer>` works without any host wiring.
|
|
3434
|
-
*
|
|
3435
|
-
* @param event - The raw DOM event; cast to `CustomEvent<ThreadSelectedDetail>` to extract `threadId`.
|
|
3436
|
-
*/
|
|
4046
|
+
private readonly actions;
|
|
3437
4047
|
protected onThreadSelected(event: Event): void;
|
|
3438
4048
|
/**
|
|
3439
4049
|
* Handles the `open-change` event from the drawer element.
|
|
@@ -3445,52 +4055,10 @@ declare class CopilotThreadsDrawer {
|
|
|
3445
4055
|
* @param event - The raw DOM event; cast to `CustomEvent<OpenChangeDetail>` to extract `open`.
|
|
3446
4056
|
*/
|
|
3447
4057
|
protected onOpenChange(event: Event): void;
|
|
3448
|
-
/**
|
|
3449
|
-
* Handles the `new-thread` event from the drawer element.
|
|
3450
|
-
*
|
|
3451
|
-
* Always resets the core thread store to a fresh, non-explicit client-side
|
|
3452
|
-
* thread first. When a `newThreadHandler` override is provided by the host,
|
|
3453
|
-
* it is called exclusively. Otherwise, the ambient chat configuration is
|
|
3454
|
-
* driven directly so a bare `<copilot-threads-drawer>` works without any host wiring.
|
|
3455
|
-
*/
|
|
3456
4058
|
protected onNewThread(): void;
|
|
3457
|
-
/**
|
|
3458
|
-
* Handles the `archive` event from the drawer element.
|
|
3459
|
-
*
|
|
3460
|
-
* Delegates to the threads mutation and logs any failure to the console.
|
|
3461
|
-
*
|
|
3462
|
-
* @param event - The raw DOM event; cast to `CustomEvent<ArchiveDetail>` to extract `threadId`.
|
|
3463
|
-
*/
|
|
3464
4059
|
protected onArchive(event: Event): void;
|
|
3465
|
-
/**
|
|
3466
|
-
* Handles the `unarchive` event from the drawer element.
|
|
3467
|
-
*
|
|
3468
|
-
* Delegates to the threads mutation and logs any failure to the console.
|
|
3469
|
-
*
|
|
3470
|
-
* @param event - The raw DOM event; cast to `CustomEvent<UnarchiveDetail>` to extract `threadId`.
|
|
3471
|
-
*/
|
|
3472
4060
|
protected onUnarchive(event: Event): void;
|
|
3473
|
-
/**
|
|
3474
|
-
* Handles the `delete` event from the drawer element.
|
|
3475
|
-
*
|
|
3476
|
-
* Deleting the active thread resets to a fresh, non-explicit thread so the
|
|
3477
|
-
* user is not stranded on a now-gone conversation. Archiving the active
|
|
3478
|
-
* thread keeps the user viewing it.
|
|
3479
|
-
*
|
|
3480
|
-
* The core `threads.startNewThread()` reset is always called when the deleted
|
|
3481
|
-
* thread was active. When a `newThreadHandler` override is provided by the
|
|
3482
|
-
* host, it is called exclusively; otherwise the ambient chat configuration is
|
|
3483
|
-
* driven directly.
|
|
3484
|
-
*
|
|
3485
|
-
* @param event - The raw DOM event; cast to `CustomEvent<DeleteDetail>` to extract `threadId`.
|
|
3486
|
-
*/
|
|
3487
4061
|
protected onDelete(event: Event): void;
|
|
3488
|
-
/**
|
|
3489
|
-
* Handles the `filter-change` event from the drawer element.
|
|
3490
|
-
*
|
|
3491
|
-
* The element owns the Active/All filter; on change we refetch so the list
|
|
3492
|
-
* reflects the server.
|
|
3493
|
-
*/
|
|
3494
4062
|
protected onFilterChange(): void;
|
|
3495
4063
|
/**
|
|
3496
4064
|
* Handles the `collapse-change` event from the drawer element — re-emits the
|
|
@@ -3500,20 +4068,7 @@ declare class CopilotThreadsDrawer {
|
|
|
3500
4068
|
* @param event - The raw DOM event; cast to `CustomEvent<CollapseChangeDetail>` to extract `collapsed`.
|
|
3501
4069
|
*/
|
|
3502
4070
|
protected onCollapseChange(event: Event): void;
|
|
3503
|
-
/**
|
|
3504
|
-
* Handles the `retry` event from the drawer element.
|
|
3505
|
-
*
|
|
3506
|
-
* `scope` distinguishes an initial fetch retry from a fetch-more retry so
|
|
3507
|
-
* the correct pagination operation is invoked.
|
|
3508
|
-
*
|
|
3509
|
-
* @param event - The raw DOM event; cast to `CustomEvent<RetryDetail>` to extract `scope`.
|
|
3510
|
-
*/
|
|
3511
4071
|
protected onRetry(event: Event): void;
|
|
3512
|
-
/**
|
|
3513
|
-
* Handles the `load-more` event from the drawer element — advances pagination
|
|
3514
|
-
* by fetching the next page. No-op when there is no next page (the element
|
|
3515
|
-
* only surfaces the "Load more" control while `hasMoreThreads` is true).
|
|
3516
|
-
*/
|
|
3517
4072
|
protected onLoadMore(): void;
|
|
3518
4073
|
/**
|
|
3519
4074
|
* Handles the `licensed` event from the drawer element (Upgrade CTA click).
|
|
@@ -3530,23 +4085,27 @@ declare class CopilotThreadsDrawer {
|
|
|
3530
4085
|
/** Accessible, responsive floating chat surface with an explicit open model. */
|
|
3531
4086
|
declare class CopilotPopup {
|
|
3532
4087
|
readonly open: _angular_core.ModelSignal<boolean>;
|
|
3533
|
-
|
|
4088
|
+
/** The header title. Default: `labels.modalHeaderTitle`. */
|
|
4089
|
+
readonly title: _angular_core.InputSignal<string | undefined>;
|
|
3534
4090
|
readonly width: _angular_core.InputSignal<string | number>;
|
|
3535
4091
|
readonly height: _angular_core.InputSignal<string | number>;
|
|
3536
4092
|
readonly clickOutsideToClose: _angular_core.InputSignal<boolean>;
|
|
3537
4093
|
readonly chatComponent: _angular_core.InputSignal<Type<unknown>>;
|
|
3538
4094
|
readonly headerComponent: _angular_core.InputSignal<Type<unknown> | undefined>;
|
|
4095
|
+
protected readonly MessageCircleIcon: _copilotkit_core.CopilotIconData;
|
|
4096
|
+
protected readonly XIcon: _copilotkit_core.CopilotIconData;
|
|
4097
|
+
protected readonly labels: _copilotkit_core.CopilotChatLabels;
|
|
4098
|
+
protected readonly resolvedTitle: _angular_core.Signal<string>;
|
|
3539
4099
|
protected readonly dialogId: string;
|
|
3540
4100
|
protected readonly titleId: string;
|
|
3541
4101
|
protected readonly resolvedWidth: _angular_core.Signal<string>;
|
|
3542
4102
|
protected readonly resolvedHeight: _angular_core.Signal<string>;
|
|
3543
4103
|
private readonly launcher;
|
|
3544
4104
|
private readonly initialFocus;
|
|
4105
|
+
private readonly dialog;
|
|
3545
4106
|
constructor();
|
|
3546
4107
|
protected toggle(): void;
|
|
3547
|
-
protected closeFromBackdrop(): void;
|
|
3548
4108
|
protected close(): void;
|
|
3549
|
-
private focusModal;
|
|
3550
4109
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CopilotPopup, never>;
|
|
3551
4110
|
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>;
|
|
3552
4111
|
}
|
|
@@ -3559,30 +4118,32 @@ declare class CopilotSidebar {
|
|
|
3559
4118
|
readonly mode: _angular_core.InputSignal<CopilotSidebarMode>;
|
|
3560
4119
|
readonly position: _angular_core.InputSignal<CopilotSidebarPosition>;
|
|
3561
4120
|
readonly width: _angular_core.InputSignal<string | number>;
|
|
3562
|
-
|
|
4121
|
+
/** The header title. Default: `labels.modalHeaderTitle`. */
|
|
4122
|
+
readonly title: _angular_core.InputSignal<string | undefined>;
|
|
3563
4123
|
readonly clickOutsideToClose: _angular_core.InputSignal<boolean>;
|
|
3564
4124
|
readonly chatComponent: _angular_core.InputSignal<Type<unknown>>;
|
|
3565
4125
|
readonly headerComponent: _angular_core.InputSignal<Type<unknown> | undefined>;
|
|
4126
|
+
protected readonly MessageCircleIcon: _copilotkit_core.CopilotIconData;
|
|
4127
|
+
protected readonly XIcon: _copilotkit_core.CopilotIconData;
|
|
4128
|
+
protected readonly labels: _copilotkit_core.CopilotChatLabels;
|
|
4129
|
+
protected readonly resolvedTitle: _angular_core.Signal<string>;
|
|
3566
4130
|
protected readonly sidebarId: string;
|
|
3567
4131
|
protected readonly titleId: string;
|
|
3568
4132
|
protected readonly resolvedWidth: _angular_core.Signal<string>;
|
|
3569
4133
|
protected readonly isCompact: _angular_core.WritableSignal<boolean>;
|
|
3570
4134
|
protected readonly isModal: _angular_core.Signal<boolean>;
|
|
3571
4135
|
protected readonly dockAccepted: _angular_core.WritableSignal<boolean>;
|
|
3572
|
-
private readonly owner;
|
|
3573
|
-
private readonly registry;
|
|
3574
4136
|
private readonly document;
|
|
3575
4137
|
private readonly isBrowser;
|
|
3576
4138
|
private readonly destroyRef;
|
|
3577
4139
|
private readonly launcher;
|
|
3578
4140
|
private readonly initialFocus;
|
|
3579
|
-
private
|
|
4141
|
+
private readonly dialog;
|
|
4142
|
+
/** Core's page-margin owner for the docked mode, as in React and Vue. */
|
|
4143
|
+
private readonly dock;
|
|
3580
4144
|
constructor();
|
|
3581
4145
|
protected toggle(): void;
|
|
3582
|
-
protected closeFromBackdrop(): void;
|
|
3583
4146
|
protected close(): void;
|
|
3584
|
-
private releaseDock;
|
|
3585
|
-
private focusModal;
|
|
3586
4147
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CopilotSidebar, never>;
|
|
3587
4148
|
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>;
|
|
3588
4149
|
}
|
|
@@ -3618,179 +4179,34 @@ declare class CopilotActivity {
|
|
|
3618
4179
|
#private;
|
|
3619
4180
|
/** The activity message to render. */
|
|
3620
4181
|
readonly message: _angular_core.InputSignal<ActivityMessage$1>;
|
|
3621
|
-
/**
|
|
4182
|
+
/**
|
|
4183
|
+
* Agent scope used for renderer resolution and passed to the renderer.
|
|
4184
|
+
* Without one, the default agent's, as in React and Vue.
|
|
4185
|
+
*/
|
|
3622
4186
|
readonly agentId: _angular_core.InputSignal<string | undefined>;
|
|
3623
4187
|
protected resolveRender(message: ActivityMessage$1): ActivityRender | undefined;
|
|
3624
4188
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CopilotActivity, never>;
|
|
3625
4189
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CopilotActivity, "copilot-activity", never, { "message": { "alias": "message"; "required": true; "isSignal": true; }; "agentId": { "alias": "agentId"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
3626
4190
|
}
|
|
3627
4191
|
|
|
3628
|
-
|
|
3629
|
-
|
|
3630
|
-
declare class CopilotA2UIActivityRenderer implements ActivityRenderer<unknown> {
|
|
3631
|
-
readonly activityType: _angular_core.InputSignal<string>;
|
|
3632
|
-
readonly content: _angular_core.InputSignal<unknown>;
|
|
3633
|
-
readonly message: _angular_core.InputSignal<ActivityMessage>;
|
|
3634
|
-
readonly agent: _angular_core.InputSignal<AbstractAgent | undefined>;
|
|
3635
|
-
protected readonly config: _copilotkit_angular.CopilotKitConfig;
|
|
3636
|
-
private readonly platformId;
|
|
3637
|
-
private readonly zone;
|
|
3638
|
-
protected readonly operations: _angular_core.Signal<A2UIOperation[]>;
|
|
3639
|
-
protected readonly hasOperations: _angular_core.Signal<boolean>;
|
|
3640
|
-
protected readonly surfaceReady: _angular_core.WritableSignal<boolean>;
|
|
3641
|
-
protected readonly loaderContent: _angular_core.WritableSignal<unknown>;
|
|
3642
|
-
constructor();
|
|
3643
|
-
protected handleRendered(): void;
|
|
3644
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CopilotA2UIActivityRenderer, never>;
|
|
3645
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CopilotA2UIActivityRenderer, "copilot-a2ui-activity-renderer", never, { "activityType": { "alias": "activityType"; "required": true; "isSignal": true; }; "content": { "alias": "content"; "required": true; "isSignal": true; }; "message": { "alias": "message"; "required": true; "isSignal": true; }; "agent": { "alias": "agent"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
3646
|
-
}
|
|
3647
|
-
|
|
3648
|
-
/**
|
|
3649
|
-
* Presentational loading placeholder shown while an A2UI tool call is still
|
|
3650
|
-
* streaming. Renders an animated skeleton card whose rows reveal as the
|
|
3651
|
-
* estimated token count climbs through `phase`.
|
|
3652
|
-
*/
|
|
3653
|
-
declare class CopilotA2UIProgress {
|
|
3654
|
-
readonly phase: _angular_core.InputSignal<number>;
|
|
3655
|
-
readonly tokens: _angular_core.InputSignal<number>;
|
|
3656
|
-
readonly label: _angular_core.InputSignal<string>;
|
|
3657
|
-
protected topbarBarClass(): string;
|
|
3658
|
-
protected rowClass(phase: number, delayClass: string): string;
|
|
3659
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CopilotA2UIProgress, never>;
|
|
3660
|
-
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>;
|
|
3661
|
-
}
|
|
3662
|
-
|
|
3663
|
-
type A2UIDebugExposure = "hidden" | "collapsed" | "verbose";
|
|
3664
|
-
type A2UILifecycleStatus = "building" | "retrying" | "failed";
|
|
3665
|
-
interface A2UILifecycleContent {
|
|
3666
|
-
status: A2UILifecycleStatus;
|
|
3667
|
-
attempt?: number;
|
|
3668
|
-
maxAttempts?: number;
|
|
3669
|
-
progressTokens?: number;
|
|
3670
|
-
error?: string;
|
|
3671
|
-
errors?: unknown[];
|
|
3672
|
-
attempts?: unknown[];
|
|
3673
|
-
debugExposure?: A2UIDebugExposure;
|
|
3674
|
-
}
|
|
3675
|
-
/** Read only the server-owned A2UI lifecycle fields from activity content. */
|
|
3676
|
-
declare function readA2UILifecycleContent(content: unknown): A2UILifecycleContent;
|
|
3677
|
-
/** Pre-paint building, retry, and failure UI for a stable A2UI activity. */
|
|
3678
|
-
declare class CopilotA2UIRecovery {
|
|
3679
|
-
#private;
|
|
3680
|
-
readonly content: _angular_core.InputSignal<unknown>;
|
|
3681
|
-
readonly options: _angular_core.InputSignal<A2UIRecoveryOptions | undefined>;
|
|
3682
|
-
readonly lifecycle: _angular_core.Signal<A2UILifecycleContent>;
|
|
3683
|
-
readonly retryRevealed: _angular_core.WritableSignal<boolean>;
|
|
3684
|
-
readonly debugExposure: _angular_core.Signal<A2UIDebugExposure>;
|
|
3685
|
-
readonly label: _angular_core.Signal<string>;
|
|
3686
|
-
readonly phase: _angular_core.Signal<0 | 1 | 2 | 3>;
|
|
3687
|
-
readonly failureDiagnostics: _angular_core.Signal<string>;
|
|
3688
|
-
readonly retryDiagnostics: _angular_core.Signal<string>;
|
|
3689
|
-
constructor();
|
|
3690
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CopilotA2UIRecovery, never>;
|
|
3691
|
-
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>;
|
|
3692
|
-
}
|
|
3693
|
-
|
|
3694
|
-
declare const RENDER_A2UI_TOOL_NAME = "render_a2ui";
|
|
3695
|
-
declare const AGUI_SEND_STATE_SNAPSHOT_TOOL_NAME = "AGUISendStateSnapshot";
|
|
3696
|
-
declare const RenderA2UIArgsSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
3697
|
-
interface RenderA2UIArgs extends Record<string, unknown> {
|
|
3698
|
-
items?: unknown[];
|
|
3699
|
-
components?: unknown[];
|
|
3700
|
-
snapshot?: unknown;
|
|
3701
|
-
}
|
|
3702
|
-
|
|
3703
|
-
declare class CopilotA2UIToolRenderer implements ToolRenderer<RenderA2UIArgs> {
|
|
3704
|
-
readonly toolCall: _angular_core.InputSignal<AngularToolCall<RenderA2UIArgs>>;
|
|
3705
|
-
readonly agent: _angular_core.InputSignal<AbstractAgent | undefined>;
|
|
3706
|
-
protected readonly renderedOperations: _angular_core.Signal<A2UIOperation[]>;
|
|
3707
|
-
protected readonly tokens: _angular_core.Signal<number>;
|
|
3708
|
-
protected readonly phase: _angular_core.Signal<0 | 1 | 2 | 3>;
|
|
3709
|
-
protected readonly isHidden: _angular_core.Signal<boolean>;
|
|
3710
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CopilotA2UIToolRenderer, never>;
|
|
3711
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CopilotA2UIToolRenderer, "copilot-a2ui-tool-renderer", never, { "toolCall": { "alias": "toolCall"; "required": true; "isSignal": true; }; "agent": { "alias": "agent"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
3712
|
-
}
|
|
3713
|
-
|
|
3714
|
-
type WebsandboxConstructor = typeof Websandbox;
|
|
3715
|
-
|
|
3716
|
-
declare const OPEN_GENERATIVE_UI_WEBSANDBOX_LOADER: InjectionToken<() => Promise<WebsandboxConstructor>>;
|
|
4192
|
+
/** Loads the websandbox class. Provide a fake in tests. */
|
|
4193
|
+
declare const OPEN_GENERATIVE_UI_WEBSANDBOX_LOADER: InjectionToken<_WebsandboxLoader>;
|
|
3717
4194
|
declare class CopilotOpenGenerativeUIRenderer implements OnChanges {
|
|
3718
|
-
readonly content: _angular_core.InputSignal<
|
|
3719
|
-
html?: string[] | undefined;
|
|
3720
|
-
initialHeight?: number | undefined;
|
|
3721
|
-
generating?: boolean | undefined;
|
|
3722
|
-
css?: string | undefined;
|
|
3723
|
-
cssComplete?: boolean | undefined;
|
|
3724
|
-
htmlComplete?: boolean | undefined;
|
|
3725
|
-
jsFunctions?: string | undefined;
|
|
3726
|
-
jsFunctionsComplete?: boolean | undefined;
|
|
3727
|
-
jsExpressions?: string[] | undefined;
|
|
3728
|
-
jsExpressionsComplete?: boolean | undefined;
|
|
3729
|
-
}>;
|
|
4195
|
+
readonly content: _angular_core.InputSignal<OpenGenerativeUIContent>;
|
|
3730
4196
|
private readonly containerRef;
|
|
3731
|
-
private readonly
|
|
3732
|
-
|
|
3733
|
-
private readonly loadWebsandboxModule;
|
|
3734
|
-
private readonly throttledContent;
|
|
3735
|
-
private throttleTimer;
|
|
3736
|
-
private latestContent;
|
|
3737
|
-
private sandbox;
|
|
3738
|
-
private previewSandbox;
|
|
3739
|
-
private sandboxReady;
|
|
3740
|
-
private previewReady;
|
|
3741
|
-
private executedExpressionIndex;
|
|
3742
|
-
private pendingQueue;
|
|
3743
|
-
private jsFunctionsInjected;
|
|
3744
|
-
private heightMeasured;
|
|
3745
|
-
private autoHeight;
|
|
3746
|
-
private hasReceivedContent;
|
|
3747
|
-
protected readonly fullHtml: _angular_core.Signal<string | undefined>;
|
|
3748
|
-
protected readonly css: _angular_core.Signal<string | undefined>;
|
|
3749
|
-
protected readonly partialHtml: _angular_core.Signal<string | undefined>;
|
|
3750
|
-
protected readonly previewBody: _angular_core.Signal<string | undefined>;
|
|
3751
|
-
protected readonly previewStyles: _angular_core.Signal<string>;
|
|
3752
|
-
protected readonly hasPreview: _angular_core.Signal<boolean>;
|
|
4197
|
+
private readonly controller;
|
|
4198
|
+
protected readonly state: _angular_core.WritableSignal<_copilotkit_core.ɵOpenGenerativeUIState>;
|
|
3753
4199
|
protected readonly hasVisibleSandbox: _angular_core.Signal<boolean>;
|
|
3754
4200
|
protected readonly height: _angular_core.Signal<number>;
|
|
3755
|
-
protected readonly isGenerating: _angular_core.Signal<boolean>;
|
|
3756
|
-
private readonly renderState;
|
|
3757
4201
|
constructor();
|
|
3758
4202
|
/** Applies input updates synchronously before the matching render pass. */
|
|
3759
4203
|
ngOnChanges(): void;
|
|
3760
|
-
/** Commits content and synchronously removes stale sandbox DOM on restart. */
|
|
3761
|
-
private commitContent;
|
|
3762
|
-
private clearThrottle;
|
|
3763
|
-
private loadWebsandbox;
|
|
3764
|
-
private createLocalApi;
|
|
3765
|
-
private createPreviewSandbox;
|
|
3766
|
-
private updatePreviewSandbox;
|
|
3767
|
-
private reconcileSandboxState;
|
|
3768
|
-
private createFinalSandbox;
|
|
3769
|
-
private resetFinalRuntimeState;
|
|
3770
|
-
private injectJsFunctions;
|
|
3771
|
-
private executeNewExpressions;
|
|
3772
|
-
private runOrQueue;
|
|
3773
|
-
private measureFinalHeight;
|
|
3774
|
-
private styleIframe;
|
|
3775
|
-
private destroyPreviewSandbox;
|
|
3776
|
-
private destroyFinalSandbox;
|
|
3777
4204
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CopilotOpenGenerativeUIRenderer, never>;
|
|
3778
4205
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CopilotOpenGenerativeUIRenderer, "copilot-open-generative-ui-renderer", never, { "content": { "alias": "content"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
3779
4206
|
}
|
|
3780
4207
|
declare class CopilotOpenGenerativeUIActivityRenderer implements ActivityRenderer<OpenGenerativeUIContent> {
|
|
3781
4208
|
readonly activityType: _angular_core.InputSignal<string>;
|
|
3782
|
-
readonly content: _angular_core.InputSignal<
|
|
3783
|
-
html?: string[] | undefined;
|
|
3784
|
-
initialHeight?: number | undefined;
|
|
3785
|
-
generating?: boolean | undefined;
|
|
3786
|
-
css?: string | undefined;
|
|
3787
|
-
cssComplete?: boolean | undefined;
|
|
3788
|
-
htmlComplete?: boolean | undefined;
|
|
3789
|
-
jsFunctions?: string | undefined;
|
|
3790
|
-
jsFunctionsComplete?: boolean | undefined;
|
|
3791
|
-
jsExpressions?: string[] | undefined;
|
|
3792
|
-
jsExpressionsComplete?: boolean | undefined;
|
|
3793
|
-
}>;
|
|
4209
|
+
readonly content: _angular_core.InputSignal<OpenGenerativeUIContent>;
|
|
3794
4210
|
readonly message: _angular_core.InputSignal<ActivityMessage>;
|
|
3795
4211
|
readonly agent: _angular_core.InputSignal<AbstractAgent | undefined>;
|
|
3796
4212
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CopilotOpenGenerativeUIActivityRenderer, never>;
|
|
@@ -3798,25 +4214,14 @@ declare class CopilotOpenGenerativeUIActivityRenderer implements ActivityRendere
|
|
|
3798
4214
|
}
|
|
3799
4215
|
|
|
3800
4216
|
declare class CopilotOpenGenerativeUIToolRenderer implements ToolRenderer<GenerateSandboxedUiArgs> {
|
|
3801
|
-
|
|
3802
|
-
|
|
3803
|
-
|
|
3804
|
-
css?: string | undefined;
|
|
3805
|
-
jsFunctions?: string | undefined;
|
|
3806
|
-
jsExpressions?: string[] | undefined;
|
|
3807
|
-
placeholderMessages?: string[] | undefined;
|
|
3808
|
-
}>>;
|
|
3809
|
-
private readonly visibleMessageIndex;
|
|
3810
|
-
private readonly destroyRef;
|
|
3811
|
-
private previousMessageCount;
|
|
3812
|
-
private interval;
|
|
3813
|
-
protected readonly visibleMessage: _angular_core.Signal<string | undefined>;
|
|
4217
|
+
#private;
|
|
4218
|
+
readonly toolCall: _angular_core.InputSignal<AngularToolCall<GenerateSandboxedUiArgs>>;
|
|
4219
|
+
protected readonly visibleMessage: _angular_core.WritableSignal<string | undefined>;
|
|
3814
4220
|
constructor();
|
|
3815
|
-
private clearTimer;
|
|
3816
4221
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CopilotOpenGenerativeUIToolRenderer, never>;
|
|
3817
4222
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CopilotOpenGenerativeUIToolRenderer, "copilot-open-generative-ui-tool-renderer", never, { "toolCall": { "alias": "toolCall"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
3818
4223
|
}
|
|
3819
4224
|
|
|
3820
|
-
export {
|
|
3821
|
-
export type {
|
|
4225
|
+
export { AgentStore, COPILOT_CHAT_CONFIGURATION, COPILOT_CHAT_CONFIGURATION_OPTIONS, COPILOT_CHAT_DEFAULT_LABELS, COPILOT_CHAT_LABELS, COPILOT_KIT_CONFIG, ChatState, CopilotActivity, CopilotChat, CopilotChatAddFileButton, CopilotChatAssistantMessage, CopilotChatAssistantMessageCopyButton, CopilotChatAssistantMessageReadAloudButton, CopilotChatAssistantMessageRegenerateButton, CopilotChatAssistantMessageRenderer, CopilotChatAssistantMessageThumbsDownButton, CopilotChatAssistantMessageThumbsUpButton, CopilotChatAssistantMessageToolbar, CopilotChatAssistantMessageToolbarButton, CopilotChatAttachmentQueue, CopilotChatAttachmentRenderer, CopilotChatAttachmentsDirective, CopilotChatAudioRecorder, CopilotChatCancelTranscribeButton, CopilotChatConfiguration, CopilotChatFinishTranscribeButton, CopilotChatInput, CopilotChatInputDefaults, CopilotChatInspectorButton, CopilotChatMessageView, CopilotChatMessageViewCursor, CopilotChatReasoningMessage, CopilotChatSendButton, CopilotChatStartTranscribeButton, CopilotChatSuggestionPill, CopilotChatSuggestionView, CopilotChatTextarea, CopilotChatToolCallGroup, CopilotChatToolCallsView, CopilotChatToolbar, CopilotChatToolbarButton, CopilotChatToolsMenu, CopilotChatUserMessage, CopilotChatUserMessageBranchNavigation, CopilotChatUserMessageCopyButton, CopilotChatUserMessageEditButton, CopilotChatUserMessageRenderer, CopilotChatUserMessageToolbar, CopilotChatUserMessageToolbarButton, CopilotChatView, CopilotChatViewDisclaimer, CopilotChatViewFeather, CopilotChatViewHandlers, CopilotChatViewInputContainer, CopilotChatViewInputMeasure, CopilotChatViewScrollToBottomButton, CopilotChatViewScrollView, CopilotChatWorkSummary, CopilotDefaultToolRenderer, CopilotKit, CopilotKitAgentContext, CopilotKitStyles, CopilotOpenGenerativeUIActivityRenderer, CopilotOpenGenerativeUIRenderer, CopilotOpenGenerativeUIToolRenderer, CopilotPopup, CopilotSidebar, CopilotSlot, CopilotThreadsDrawer, CopilotThreadsDrawerRow, CopilotTooltip, CopilotkitAgentFactory, CopilotkitThreadsFactory, GenerateSandboxedUiArgsSchema, InterruptController, OPEN_GENERATIVE_UI_WEBSANDBOX_LOADER, OpenGenerativeUIContentSchema, RenderToolCall, RenderToolCalls, ResizeObserverService, SLOT_CONFIG, ScrollPosition, StickToBottom, ThreadsStore, TooltipContent, anyActivityContentSchema, connectAgentContext, createSlotConfig, createSlotRenderer, getSlotConfig, injectAgentStore, injectCapabilities, injectChatConfiguration, injectChatLabels, injectChatState, injectCopilotKitConfig, injectInterrupt, injectMemories, injectThreads, isComponentType, isSlotValue, normalizeSlotValue, parseToolCallArguments, pickToolCallHandler, provideCopilotChatConfiguration, provideCopilotChatLabels, provideCopilotKit, provideSlots, registerComponent, registerFrontendTool, registerHumanInTheLoop, registerRenderActivityMessage, registerRenderToolCall, renderSlot, safeToolValue, ɵCOPILOTKIT_ASSISTANT_MARKDOWN_RENDERER, ɵCOPILOTKIT_BUILT_IN_ACTIVITY_RENDERERS, ɵCOPILOTKIT_INSPECTOR_DEVELOPMENT_MODE };
|
|
4226
|
+
export type { ActivityRenderer, AngularActivityContentParseResult, AngularActivityContentSchema, AngularToolCall, AssistantMessageCopyButtonContext, AssistantMessageMarkdownRendererContext, AssistantMessageToolbarContext, AudioRecorderState, BranchNavigationContext, ClientTool, ConnectAgentContextConfig, CopilotChatAssistantMessageOnReadAloudProps, CopilotChatAssistantMessageOnRegenerateProps, CopilotChatAssistantMessageOnThumbsDownProps, CopilotChatAssistantMessageOnThumbsUpProps, CopilotChatAudioRecorderProps, CopilotChatButtonProps, CopilotChatConfigurationOptions, CopilotChatInputConfig, CopilotChatInputMode, CopilotChatInputOutputs, CopilotChatInputSlots, CopilotChatMessageViewProps, CopilotChatTextareaProps, CopilotChatToolCallGroupAppearance, CopilotChatToolbarButtonProps, CopilotChatToolbarProps, CopilotChatToolsButtonProps, CopilotChatUserMessageOnEditMessageProps, CopilotChatUserMessageOnSwitchToBranchProps, CopilotChatViewLayoutContext, CopilotChatViewProps, CopilotKitConfig, CopilotSidebarMode, CopilotSidebarPosition, CopyButtonContext, CursorContext, EditButtonContext, FrontendToolConfig, HumanInTheLoopConfig, HumanInTheLoopToolCall, HumanInTheLoopToolRenderer, InjectInterruptOptions, InjectThreadsInput, InjectThreadsResult, InterruptRunOptions, InterruptRunner, InterruptView, MemoriesController, MessageRendererContext, MessageViewContext, OpenGenerativeUIConfig, ReadAloudButtonContext, RegenerateButtonContext, RegisterComponentConfig, RenderActivityMessageConfig, RenderSlotOptions, RenderToolCallConfig, ResizeState, SandboxFunction, ScrollBehavior, ScrollState, SendButtonContext, SlotConfig, SlotContext, SlotOutputs, SlotRegistryEntry, SlotValue, Thread, ThumbsDownButtonContext, ThumbsUpButtonContext, ToolCallHandler, ToolRenderer, ToolbarContext, ToolsMenuItem, UserMessageToolbarContext, WithSlots };
|
|
3822
4227
|
//# sourceMappingURL=copilotkit-angular.d.ts.map
|