@copilotkit/angular 0.6.0 → 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 +7422 -7467
- 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 +1195 -820
- 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,83 +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;
|
|
222
|
+
runtimeTransport?: CopilotRuntimeTransport;
|
|
307
223
|
/**
|
|
308
|
-
*
|
|
309
|
-
*
|
|
224
|
+
* Your CopilotKit public license key (`publicApiKey` in React and Vue).
|
|
225
|
+
* With no `runtimeUrl`, CopilotKit uses Copilot Cloud.
|
|
310
226
|
*/
|
|
311
|
-
headers?: CopilotKitHeadersSource;
|
|
312
|
-
/** Fetch credentials mode used for CopilotKit runtime requests. */
|
|
313
|
-
credentials?: RequestCredentials;
|
|
314
|
-
/**
|
|
315
|
-
* Rewrites the message list sent to runtime agents on every run.
|
|
316
|
-
*
|
|
317
|
-
* CopilotKit sends the whole thread each time. When your agent already
|
|
318
|
-
* stores the conversation, most of that payload is waste, and an agent that
|
|
319
|
-
* merges the inbound list with its own store can show the model every turn
|
|
320
|
-
* twice. Return the messages to send:
|
|
321
|
-
*
|
|
322
|
-
* ```ts
|
|
323
|
-
* provideCopilotKit({
|
|
324
|
-
* runtimeUrl: "/api/copilotkit",
|
|
325
|
-
* messageFilter: (messages) => messages.slice(-1),
|
|
326
|
-
* });
|
|
327
|
-
* ```
|
|
328
|
-
*
|
|
329
|
-
* The filter changes the request body only. The transcript the UI renders is
|
|
330
|
-
* untouched. Broken tool-call pairs are repaired before the request is sent,
|
|
331
|
-
* so a filter this blunt cannot strand a tool result mid-HITL.
|
|
332
|
-
*
|
|
333
|
-
* Agents reached through your CopilotRuntime honor this. An agent your app
|
|
334
|
-
* passes in directly does not, and neither Intelligence runs nor suggestion
|
|
335
|
-
* runs are ever filtered.
|
|
336
|
-
*/
|
|
337
|
-
messageFilter?: CopilotKitMessageFilter;
|
|
338
227
|
licenseKey?: string;
|
|
339
|
-
|
|
228
|
+
/** Local agents, keyed by id (`agents__unsafe_dev_only` in React and Vue). */
|
|
340
229
|
agents?: Record<string, AbstractAgent>;
|
|
341
|
-
selfManagedAgents?: Record<string, AbstractAgent>;
|
|
342
230
|
tools?: ClientTool[];
|
|
343
231
|
renderToolCalls?: RenderToolCallConfig[];
|
|
344
232
|
renderActivityMessages?: RenderActivityMessageConfig[];
|
|
@@ -347,7 +235,6 @@ interface CopilotKitConfig {
|
|
|
347
235
|
humanInTheLoop?: HumanInTheLoopConfig[];
|
|
348
236
|
/** Opt in to a text-only renderer for otherwise unknown tool calls. */
|
|
349
237
|
defaultToolRendering?: boolean;
|
|
350
|
-
a2ui?: A2UIConfig;
|
|
351
238
|
openGenerativeUI?: OpenGenerativeUIConfig;
|
|
352
239
|
/**
|
|
353
240
|
* Disable the CopilotKit Inspector in development.
|
|
@@ -355,21 +242,33 @@ interface CopilotKitConfig {
|
|
|
355
242
|
* always disabled in production and during server rendering.
|
|
356
243
|
*/
|
|
357
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;
|
|
358
269
|
}
|
|
359
270
|
declare const COPILOT_KIT_CONFIG: InjectionToken<CopilotKitConfig>;
|
|
360
271
|
declare function injectCopilotKitConfig(): CopilotKitConfig;
|
|
361
|
-
/**
|
|
362
|
-
* The public-key header default `provideCopilotKit` used to merge directly
|
|
363
|
-
* into `config.headers` (main's behavior, record-only). Now that `headers`
|
|
364
|
-
* can be a builder (#1937), the merge can't happen here — a builder is only
|
|
365
|
-
* evaluated at send time — so `copilotkit.ts` applies these defaults itself,
|
|
366
|
-
* via `ɵwithHeaderDefaults`, where `CopilotKitCore` is constructed and
|
|
367
|
-
* wherever `setHeaders` is called. Kept in this file (rather than
|
|
368
|
-
* `copilotkit.ts`) so the license-key condition has one definition, shared
|
|
369
|
-
* with `resolveLicense`'s watermark check below; this function itself stays
|
|
370
|
-
* a plain computation with no `@copilotkit/core` value import.
|
|
371
|
-
*/
|
|
372
|
-
declare function ɵresolvePublicKeyHeaderDefaults(config: CopilotKitConfig): Record<string, string>;
|
|
373
272
|
declare function provideCopilotKit(config?: CopilotKitConfig): Provider;
|
|
374
273
|
|
|
375
274
|
declare class CopilotKit {
|
|
@@ -407,7 +306,7 @@ declare class CopilotKit {
|
|
|
407
306
|
* as a signal (rather than a plain `core.threadEndpoints` read) so reactive
|
|
408
307
|
* consumers re-run when `/info` lands.
|
|
409
308
|
*/
|
|
410
|
-
readonly threadEndpoints: Signal<ThreadEndpointRuntimeInfo | undefined>;
|
|
309
|
+
readonly threadEndpoints: Signal<_copilotkit_shared.ThreadEndpointRuntimeInfo | undefined>;
|
|
411
310
|
/**
|
|
412
311
|
* Voice transcription capability advertised by the connected runtime's
|
|
413
312
|
* `/info` response. The value remains false until the runtime explicitly
|
|
@@ -421,19 +320,19 @@ declare class CopilotKit {
|
|
|
421
320
|
* when `/info` populates it — even if the connection status does not
|
|
422
321
|
* transition in the same turn.
|
|
423
322
|
*/
|
|
424
|
-
readonly intelligence: Signal<IntelligenceRuntimeInfo | undefined>;
|
|
323
|
+
readonly intelligence: Signal<_copilotkit_shared.IntelligenceRuntimeInfo | undefined>;
|
|
425
324
|
/**
|
|
426
325
|
* Server-reported license status from the connected runtime's `/info`
|
|
427
326
|
* response, or `undefined` before the runtime reports it. Exposed as a signal
|
|
428
327
|
* (rather than a plain `core.licenseStatus` read) so reactive consumers — e.g.
|
|
429
328
|
* the threads drawer's license gate — re-run once the status resolves.
|
|
430
329
|
*/
|
|
431
|
-
readonly licenseStatus: Signal<RuntimeLicenseStatus | undefined>;
|
|
330
|
+
readonly licenseStatus: Signal<_copilotkit_shared.RuntimeLicenseStatus | undefined>;
|
|
432
331
|
/**
|
|
433
332
|
* Structured entitlement authority from the connected runtime's `/info`
|
|
434
333
|
* response. Ready managed entitlements override legacy license status.
|
|
435
334
|
*/
|
|
436
|
-
readonly runtimeEntitlements: Signal<RuntimeEntitlementResponse | undefined>;
|
|
335
|
+
readonly runtimeEntitlements: Signal<_copilotkit_shared.RuntimeEntitlementResponse | undefined>;
|
|
437
336
|
/**
|
|
438
337
|
* Whether Core still owes the one bounded retry for a retryable entitlement
|
|
439
338
|
* lookup. Gated UI stays pending until that retry settles.
|
|
@@ -445,22 +344,116 @@ declare class CopilotKit {
|
|
|
445
344
|
readonly clientToolCallRenderConfigs: Signal<FrontendToolConfig[]>;
|
|
446
345
|
readonly humanInTheLoopToolRenderConfigs: Signal<HumanInTheLoopConfig[]>;
|
|
447
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>>;
|
|
448
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
|
+
*/
|
|
449
375
|
addFrontendTool(clientToolWithInjector: FrontendToolConfig & {
|
|
450
376
|
injector: Injector;
|
|
451
|
-
}): void;
|
|
452
|
-
|
|
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;
|
|
453
391
|
addRenderActivityMessage(renderConfig: RenderActivityMessageConfig): void;
|
|
454
392
|
/** Remove one dynamically registered activity renderer by identity. */
|
|
455
393
|
removeRenderActivityMessage(renderConfig: RenderActivityMessageConfig): void;
|
|
456
|
-
|
|
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;
|
|
457
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
|
+
};
|
|
458
430
|
removeSuggestionsConfig(id: string): void;
|
|
459
431
|
reloadSuggestions(agentId: string): void;
|
|
460
432
|
clearSuggestions(agentId: string): void;
|
|
461
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
|
+
*/
|
|
462
447
|
removeTool(toolName: string, agentId?: string): void;
|
|
463
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
|
+
*/
|
|
464
457
|
updateRuntime(options: {
|
|
465
458
|
runtimeUrl?: string;
|
|
466
459
|
runtimeTransport?: CopilotRuntimeTransport;
|
|
@@ -470,21 +463,77 @@ declare class CopilotKit {
|
|
|
470
463
|
properties?: Record<string, unknown>;
|
|
471
464
|
agents?: Record<string, AbstractAgent>;
|
|
472
465
|
selfManagedAgents?: Record<string, AbstractAgent>;
|
|
466
|
+
debug?: DebugConfig;
|
|
467
|
+
defaultThrottleMs?: number;
|
|
473
468
|
}): void;
|
|
474
469
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CopilotKit, never>;
|
|
475
470
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<CopilotKit>;
|
|
476
471
|
}
|
|
477
472
|
|
|
478
|
-
/**
|
|
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
|
+
*/
|
|
479
500
|
declare function safeToolValue(value: unknown): string;
|
|
480
|
-
/**
|
|
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
|
+
*/
|
|
481
507
|
declare class CopilotDefaultToolRenderer implements ToolRenderer {
|
|
508
|
+
#private;
|
|
482
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;
|
|
483
524
|
protected readonly expanded: _angular_core.WritableSignal<boolean>;
|
|
525
|
+
protected readonly name: _angular_core.Signal<string>;
|
|
484
526
|
protected readonly argumentsText: _angular_core.Signal<string>;
|
|
485
527
|
protected readonly resultText: _angular_core.Signal<string>;
|
|
486
|
-
protected readonly
|
|
487
|
-
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>;
|
|
488
537
|
protected toggleExpanded(): void;
|
|
489
538
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CopilotDefaultToolRenderer, never>;
|
|
490
539
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CopilotDefaultToolRenderer, "copilot-default-tool-renderer", never, { "toolCall": { "alias": "toolCall"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
@@ -509,7 +558,10 @@ type BuiltInToolCallHandler = {
|
|
|
509
558
|
};
|
|
510
559
|
};
|
|
511
560
|
type ToolCallHandler = RendererToolCallHandler | ClientToolCallHandler | HumanInTheLoopToolCallHandler | BuiltInToolCallHandler;
|
|
512
|
-
/**
|
|
561
|
+
/**
|
|
562
|
+
* Parse tool-call arguments without allowing malformed payloads to escape.
|
|
563
|
+
* See `ɵparseToolCallArguments` in `@copilotkit/core` for the rules.
|
|
564
|
+
*/
|
|
513
565
|
declare function parseToolCallArguments(rawArguments: string, allowPartial?: boolean): Record<string, unknown>;
|
|
514
566
|
interface PickToolCallHandlerOptions {
|
|
515
567
|
name: string;
|
|
@@ -519,14 +571,57 @@ interface PickToolCallHandlerOptions {
|
|
|
519
571
|
humanInTheLoop: readonly HumanInTheLoopConfig[];
|
|
520
572
|
builtInFallback: boolean;
|
|
521
573
|
}
|
|
522
|
-
/**
|
|
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
|
+
*/
|
|
523
605
|
declare function pickToolCallHandler(options: PickToolCallHandlerOptions): ToolCallHandler | undefined;
|
|
524
|
-
|
|
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 {
|
|
525
612
|
#private;
|
|
613
|
+
readonly toolCall: _angular_core.InputSignal<ToolCall>;
|
|
614
|
+
/** The assistant message the call belongs to (or whose group it joined). */
|
|
526
615
|
readonly message: _angular_core.InputSignal<AssistantMessage>;
|
|
527
616
|
readonly messages: _angular_core.InputSignal<Message[]>;
|
|
528
617
|
readonly isLoading: _angular_core.InputSignal<boolean>;
|
|
529
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>;
|
|
530
625
|
protected pickRenderer(name: string): ToolCallHandler | undefined;
|
|
531
626
|
protected buildToolCall<Args extends Record<string, unknown>>(toolCall: ToolCall): AngularToolCall<Args>;
|
|
532
627
|
protected buildRendererInputs<Args extends Record<string, unknown>>(toolCall: ToolCall, handler: RendererToolCallHandler | ClientToolCallHandler | BuiltInToolCallHandler): {
|
|
@@ -534,6 +629,15 @@ declare class RenderToolCalls {
|
|
|
534
629
|
agent?: AbstractAgent;
|
|
535
630
|
};
|
|
536
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>;
|
|
537
641
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<RenderToolCalls, never>;
|
|
538
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>;
|
|
539
643
|
}
|
|
@@ -546,11 +650,6 @@ declare class RenderToolCalls {
|
|
|
546
650
|
*/
|
|
547
651
|
declare const ɵCOPILOTKIT_INSPECTOR_DEVELOPMENT_MODE: InjectionToken<boolean>;
|
|
548
652
|
|
|
549
|
-
/** Legacy custom-event interrupt payload. */
|
|
550
|
-
interface InterruptEvent<TValue = unknown> {
|
|
551
|
-
name: string;
|
|
552
|
-
value: TValue;
|
|
553
|
-
}
|
|
554
653
|
/** Options forwarded when resuming an interrupted agent. */
|
|
555
654
|
interface InterruptRunOptions {
|
|
556
655
|
runId?: string;
|
|
@@ -566,52 +665,43 @@ interface InjectInterruptOptions<TValue = unknown, TResult = never> {
|
|
|
566
665
|
/** Optionally prepare data for the interrupt UI. */
|
|
567
666
|
handler?: (props: InterruptHandlerProps<TValue>) => TResult | PromiseLike<TResult>;
|
|
568
667
|
}
|
|
569
|
-
/**
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
resolve: InterruptController<TValue>["resolve"];
|
|
575
|
-
cancel: InterruptController<TValue>["cancel"];
|
|
576
|
-
}
|
|
577
|
-
/** Reactive data suitable for binding to an application interrupt component. */
|
|
578
|
-
interface InterruptView<TValue = unknown, TResult = unknown> extends InterruptHandlerProps<TValue> {
|
|
579
|
-
result: TResult | null;
|
|
580
|
-
}
|
|
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>;
|
|
581
673
|
type InterruptRunner = (agent: AbstractAgent, options: InterruptRunOptions) => Promise<RunAgentResult>;
|
|
582
|
-
|
|
583
|
-
declare class InterruptExpiredError extends Error {
|
|
584
|
-
readonly interrupt: Interrupt;
|
|
585
|
-
constructor(interrupt: Interrupt);
|
|
586
|
-
}
|
|
674
|
+
|
|
587
675
|
/**
|
|
588
|
-
* 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.
|
|
589
678
|
*
|
|
590
679
|
* Prefer {@link injectInterrupt} in application components. The public class is
|
|
591
680
|
* useful for framework adapters and deterministic lifecycle tests.
|
|
592
681
|
*/
|
|
593
682
|
declare class InterruptController<TValue = unknown, TResult = never> {
|
|
594
683
|
#private;
|
|
684
|
+
readonly view: Signal<InterruptView<TValue, TResult> | null>;
|
|
595
685
|
readonly event: Signal<InterruptEvent<TValue> | null>;
|
|
596
686
|
readonly interrupt: Signal<Interrupt | null>;
|
|
597
687
|
readonly interrupts: Signal<readonly Interrupt[]>;
|
|
598
688
|
readonly result: Signal<TResult | null>;
|
|
599
689
|
readonly error: Signal<unknown>;
|
|
600
690
|
readonly hasInterrupt: Signal<boolean>;
|
|
601
|
-
readonly view: Signal<InterruptView<TValue, TResult> | null>;
|
|
602
|
-
constructor(runner: InterruptRunner, options?: InjectInterruptOptions<TValue, TResult>);
|
|
603
|
-
/** Subscribe to an agent, replacing any previous lifecycle subscription. */
|
|
604
|
-
connect(agent: AbstractAgent): void;
|
|
605
|
-
/** Clear pending decisions when the host changes threads. */
|
|
606
|
-
setThreadId(threadId: string): void;
|
|
607
691
|
/** Resolve one interrupt, resuming only after the complete set is addressed. */
|
|
608
692
|
readonly resolve: (payload?: unknown, interruptId?: string) => Promise<RunAgentResult | void>;
|
|
609
693
|
/** Cancel one standard interrupt; legacy interrupts are dismissed locally. */
|
|
610
694
|
readonly cancel: (interruptId?: string) => Promise<RunAgentResult | void>;
|
|
611
695
|
/** Alias retained for parity with other CopilotKit framework adapters. */
|
|
612
|
-
readonly resolveInterrupt:
|
|
696
|
+
readonly resolveInterrupt: InterruptController<TValue, TResult>["resolve"];
|
|
613
697
|
/** Alias retained for parity with other CopilotKit framework adapters. */
|
|
614
|
-
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;
|
|
615
705
|
/** Release the agent subscription and clear sensitive pending state. */
|
|
616
706
|
destroy(): void;
|
|
617
707
|
}
|
|
@@ -662,32 +752,14 @@ declare function injectInterrupt<TValue = unknown, TResult = never>(options?: In
|
|
|
662
752
|
/**
|
|
663
753
|
* A conversation thread managed by CopilotKit Intelligence.
|
|
664
754
|
*
|
|
665
|
-
* Each thread has a unique `id`,
|
|
666
|
-
*
|
|
667
|
-
* `
|
|
668
|
-
*
|
|
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.
|
|
669
761
|
*/
|
|
670
|
-
|
|
671
|
-
/** Stable, server-assigned thread identifier. */
|
|
672
|
-
id: string;
|
|
673
|
-
/** The agent this thread belongs to. */
|
|
674
|
-
agentId: string;
|
|
675
|
-
/** Human-readable name, or `null` when the thread is unnamed. */
|
|
676
|
-
name: string | null;
|
|
677
|
-
/** `true` when the thread has been archived. */
|
|
678
|
-
archived: boolean;
|
|
679
|
-
/** ISO-8601 creation timestamp. */
|
|
680
|
-
createdAt: string;
|
|
681
|
-
/** ISO-8601 timestamp of the most recent metadata update. */
|
|
682
|
-
updatedAt: string;
|
|
683
|
-
/**
|
|
684
|
-
* ISO-8601 timestamp of the most recent agent run on this thread. Absent
|
|
685
|
-
* when the thread has never been run. Prefer this over `updatedAt` for
|
|
686
|
-
* user-facing "last activity" displays — it is not bumped by metadata-only
|
|
687
|
-
* actions like rename or archive.
|
|
688
|
-
*/
|
|
689
|
-
lastRunAt?: string;
|
|
690
|
-
}
|
|
762
|
+
type Thread = _ThreadSummary;
|
|
691
763
|
/**
|
|
692
764
|
* Configuration for {@link injectThreads}.
|
|
693
765
|
*
|
|
@@ -743,7 +815,8 @@ interface InjectThreadsResult {
|
|
|
743
815
|
* List/mutation errors only — excludes developer/config errors (missing
|
|
744
816
|
* runtime URL, runtime without thread endpoints) so consumer UIs do not
|
|
745
817
|
* surface dev strings to end users. Prefer this over `error` for
|
|
746
|
-
* 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`).
|
|
747
820
|
*/
|
|
748
821
|
listError: Signal<Error | null>;
|
|
749
822
|
/**
|
|
@@ -812,14 +885,9 @@ interface InjectThreadsResult {
|
|
|
812
885
|
deleteThread: (threadId: string) => Promise<void>;
|
|
813
886
|
}
|
|
814
887
|
/**
|
|
815
|
-
*
|
|
816
|
-
*
|
|
817
|
-
*
|
|
818
|
-
* store with core for the active agent.
|
|
819
|
-
*
|
|
820
|
-
* One instance backs each {@link injectThreads} call. Tear-down (selector
|
|
821
|
-
* unsubscribe, store stop, core unregister) runs on the host's
|
|
822
|
-
* {@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`.
|
|
823
891
|
*/
|
|
824
892
|
declare class ThreadsStore implements InjectThreadsResult {
|
|
825
893
|
#private;
|
|
@@ -839,14 +907,9 @@ declare class ThreadsStore implements InjectThreadsResult {
|
|
|
839
907
|
readonly fetchMoreThreads: () => void;
|
|
840
908
|
readonly refetchThreads: () => void;
|
|
841
909
|
readonly startNewThread: () => void;
|
|
842
|
-
/**
|
|
910
|
+
/** Stop the store and release its registry claim. Safe to call twice. */
|
|
843
911
|
teardown(): void;
|
|
844
912
|
}
|
|
845
|
-
/**
|
|
846
|
-
* Factory for {@link ThreadsStore} instances. Provided at the root so the
|
|
847
|
-
* ambient {@link CopilotKit} configuration is resolved from the application's
|
|
848
|
-
* injector.
|
|
849
|
-
*/
|
|
850
913
|
declare class CopilotkitThreadsFactory {
|
|
851
914
|
/**
|
|
852
915
|
* Creates a {@link ThreadsStore} bound to the given input and host
|
|
@@ -888,28 +951,151 @@ declare class CopilotkitThreadsFactory {
|
|
|
888
951
|
*/
|
|
889
952
|
declare function injectThreads(input: InjectThreadsInput): InjectThreadsResult;
|
|
890
953
|
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
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
|
+
*/
|
|
911
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
|
+
*/
|
|
912
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
|
+
*/
|
|
913
1099
|
declare function provideCopilotChatLabels(config: Partial<CopilotChatLabels>): Provider;
|
|
914
1100
|
|
|
915
1101
|
/**
|
|
@@ -945,106 +1131,41 @@ interface CopilotChatConfigurationOptions {
|
|
|
945
1131
|
*/
|
|
946
1132
|
declare class CopilotChatConfiguration {
|
|
947
1133
|
#private;
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
* Falls back to {@link DEFAULT_AGENT_ID} when no agent id is provided.
|
|
951
|
-
*/
|
|
1134
|
+
constructor();
|
|
1135
|
+
/** The agent this chat renders. */
|
|
952
1136
|
readonly agentId: Signal<string>;
|
|
953
1137
|
/**
|
|
954
|
-
* The
|
|
955
|
-
*
|
|
956
|
-
* Precedence (highest → lowest):
|
|
957
|
-
* 1. Prop-driven `threadId` when `#propIsAuthoritative` is true.
|
|
958
|
-
* 2. Imperative `#override` set by internal helpers.
|
|
959
|
-
* 3. Non-authoritative seed `threadId` from options.
|
|
960
|
-
* 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.
|
|
961
1140
|
*/
|
|
962
1141
|
readonly threadId: Signal<string>;
|
|
963
|
-
/**
|
|
964
|
-
* Whether the current thread id was supplied explicitly by the host
|
|
965
|
-
* application (as opposed to being auto-minted or seeded without intent).
|
|
966
|
-
*/
|
|
1142
|
+
/** `true` when a caller chose the thread (not a minted placeholder). */
|
|
967
1143
|
readonly hasExplicitThreadId: Signal<boolean>;
|
|
968
|
-
/**
|
|
1144
|
+
/** `true` when the `threadId` option controls the thread. */
|
|
969
1145
|
protected get isControlled(): boolean;
|
|
970
1146
|
/**
|
|
971
|
-
*
|
|
972
|
-
*
|
|
973
|
-
*
|
|
974
|
-
* @param threadId - The thread id to activate.
|
|
975
|
-
* @param explicit - Whether the override represents a deliberate user choice.
|
|
976
|
-
*/
|
|
977
|
-
protected _setOverride(threadId: string, explicit: boolean): void;
|
|
978
|
-
/**
|
|
979
|
-
* Switches the active thread to the given id.
|
|
980
|
-
*
|
|
981
|
-
* By default the switch is treated as an explicit user-driven choice
|
|
982
|
-
* (`explicit` defaults to `true`). Pass `{ explicit: false }` to mark it as
|
|
983
|
-
* a non-explicit seed that the runtime may replace.
|
|
984
|
-
*
|
|
985
|
-
* No-ops when the threadId is controlled by the host application via props.
|
|
986
|
-
*
|
|
987
|
-
* @param threadId - The thread id to activate.
|
|
988
|
-
* @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.
|
|
989
1149
|
*/
|
|
990
1150
|
setActiveThreadId(threadId: string, options?: {
|
|
991
1151
|
explicit?: boolean;
|
|
992
1152
|
}): void;
|
|
993
1153
|
/**
|
|
994
|
-
*
|
|
995
|
-
*
|
|
996
|
-
* The new thread is marked as non-explicit so the runtime may assign a
|
|
997
|
-
* server-side thread id once the first message is sent.
|
|
998
|
-
*
|
|
999
|
-
* 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.
|
|
1000
1156
|
*/
|
|
1001
1157
|
startNewThread(): void;
|
|
1002
|
-
/**
|
|
1003
|
-
* Read-only signal reflecting the current drawer open-state.
|
|
1004
|
-
*
|
|
1005
|
-
* @remarks
|
|
1006
|
-
* Consumed by {@link CopilotThreadsDrawer} to drive the element's controlled
|
|
1007
|
-
* `open` property; a future popup or sidebar component may also toggle it to
|
|
1008
|
-
* implement mobile mutual-exclusion between the drawer and other overlays.
|
|
1009
|
-
*/
|
|
1158
|
+
/** Whether the thread-list drawer is open. */
|
|
1010
1159
|
readonly drawerOpen: Signal<boolean>;
|
|
1011
|
-
/**
|
|
1012
|
-
* Sets the drawer open-state imperatively.
|
|
1013
|
-
*
|
|
1014
|
-
* @remarks
|
|
1015
|
-
* Called by {@link CopilotThreadsDrawer} in response to the element's
|
|
1016
|
-
* `open-change` event to keep the shared open-state coordinated.
|
|
1017
|
-
*
|
|
1018
|
-
* @param open - `true` to mark the drawer as open, `false` to close it.
|
|
1019
|
-
*/
|
|
1160
|
+
/** Open or close the drawer. */
|
|
1020
1161
|
setDrawerOpen(open: boolean): void;
|
|
1021
|
-
/**
|
|
1022
|
-
* Computed signal that is `true` when at least one drawer instance has
|
|
1023
|
-
* registered itself via {@link registerDrawer}.
|
|
1024
|
-
*/
|
|
1162
|
+
/** `true` while at least one threads drawer is mounted. */
|
|
1025
1163
|
readonly drawerRegistered: Signal<boolean>;
|
|
1026
|
-
/**
|
|
1027
|
-
* Registers a drawer instance and returns an idempotent unregister function.
|
|
1028
|
-
*
|
|
1029
|
-
* Increments the internal drawer count so that {@link drawerRegistered}
|
|
1030
|
-
* becomes `true`. The returned function decrements the count when called;
|
|
1031
|
-
* calling it more than once is safe — subsequent calls are no-ops (guarded
|
|
1032
|
-
* by an `active` flag, floor at 0).
|
|
1033
|
-
*
|
|
1034
|
-
* @remarks
|
|
1035
|
-
* Called by {@link CopilotThreadsDrawer} on construction with cleanup on
|
|
1036
|
-
* destroy. Intended for future popup/sidebar coordination as well.
|
|
1037
|
-
*
|
|
1038
|
-
* @returns An idempotent cleanup function that unregisters this drawer.
|
|
1039
|
-
*/
|
|
1164
|
+
/** Announce a mounted drawer. The returned cleanup runs once. */
|
|
1040
1165
|
registerDrawer(): () => void;
|
|
1041
1166
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CopilotChatConfiguration, never>;
|
|
1042
1167
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<CopilotChatConfiguration>;
|
|
1043
1168
|
}
|
|
1044
|
-
/**
|
|
1045
|
-
* Injection token for the {@link CopilotChatConfiguration} service instance.
|
|
1046
|
-
* Use {@link injectChatConfiguration} to retrieve it from the injector.
|
|
1047
|
-
*/
|
|
1048
1169
|
declare const COPILOT_CHAT_CONFIGURATION: InjectionToken<CopilotChatConfiguration>;
|
|
1049
1170
|
/**
|
|
1050
1171
|
* Injection token for the raw {@link CopilotChatConfigurationOptions} value
|
|
@@ -1084,9 +1205,9 @@ declare abstract class ChatState {
|
|
|
1084
1205
|
readonly suggestions: WritableSignal<Suggestion[]>;
|
|
1085
1206
|
readonly suggestionsLoading: WritableSignal<boolean>;
|
|
1086
1207
|
readonly isTranscribing: WritableSignal<boolean>;
|
|
1087
|
-
abstract submitInput(value: string): void
|
|
1208
|
+
abstract submitInput(value: string): void | Promise<void>;
|
|
1088
1209
|
abstract changeInput(value: string): void;
|
|
1089
|
-
selectSuggestion(_suggestion: Suggestion, _index: number): void
|
|
1210
|
+
selectSuggestion(_suggestion: Suggestion, _index: number): void | Promise<void>;
|
|
1090
1211
|
finishTranscription(_audioBlob: Blob): void | Promise<void>;
|
|
1091
1212
|
addFile(): void;
|
|
1092
1213
|
removeAttachment(_id: string): void;
|
|
@@ -1098,29 +1219,6 @@ declare abstract class ChatState {
|
|
|
1098
1219
|
}
|
|
1099
1220
|
declare function injectChatState(): ChatState;
|
|
1100
1221
|
|
|
1101
|
-
interface TranscriptionResult {
|
|
1102
|
-
text: string;
|
|
1103
|
-
size: number;
|
|
1104
|
-
type: string;
|
|
1105
|
-
}
|
|
1106
|
-
interface TranscriptionErrorInfo {
|
|
1107
|
-
code: TranscriptionErrorCode;
|
|
1108
|
-
message: string;
|
|
1109
|
-
retryable: boolean;
|
|
1110
|
-
}
|
|
1111
|
-
declare class TranscriptionError extends Error {
|
|
1112
|
-
readonly info: TranscriptionErrorInfo;
|
|
1113
|
-
constructor(info: TranscriptionErrorInfo);
|
|
1114
|
-
}
|
|
1115
|
-
/**
|
|
1116
|
-
* Transcribe an audio blob via the CopilotKit runtime. Uses single-endpoint
|
|
1117
|
-
* (base64 JSON) or REST (multipart `/transcribe`) mode to match the transport
|
|
1118
|
-
* configured on the core.
|
|
1119
|
-
*
|
|
1120
|
-
* @throws {TranscriptionError} with typed error info on any failure.
|
|
1121
|
-
*/
|
|
1122
|
-
declare function transcribeAudio(core: CopilotKitCore, audioBlob: Blob, filename?: string): Promise<TranscriptionResult>;
|
|
1123
|
-
|
|
1124
1222
|
interface ScrollState {
|
|
1125
1223
|
isAtBottom: boolean;
|
|
1126
1224
|
scrollTop: number;
|
|
@@ -1138,7 +1236,7 @@ declare class ScrollPosition implements OnDestroy {
|
|
|
1138
1236
|
/**
|
|
1139
1237
|
* Monitor scroll position of an element
|
|
1140
1238
|
* @param element The element to monitor
|
|
1141
|
-
* @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)
|
|
1142
1240
|
*/
|
|
1143
1241
|
monitorScrollPosition(element: ElementRef<HTMLElement> | HTMLElement, threshold?: number): Observable<ScrollState>;
|
|
1144
1242
|
/**
|
|
@@ -1210,22 +1308,17 @@ declare class ResizeObserverService implements OnDestroy {
|
|
|
1210
1308
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<ResizeObserverService>;
|
|
1211
1309
|
}
|
|
1212
1310
|
|
|
1213
|
-
/**
|
|
1214
|
-
* Utility function to merge Tailwind CSS classes
|
|
1215
|
-
* Combines clsx for conditional classes and tailwind-merge for proper Tailwind class merging
|
|
1216
|
-
*/
|
|
1217
|
-
declare function cn(...inputs: ClassValue[]): string;
|
|
1218
|
-
|
|
1219
1311
|
interface ConnectAgentContextConfig {
|
|
1220
1312
|
injector?: Injector;
|
|
1221
1313
|
}
|
|
1222
1314
|
/**
|
|
1223
|
-
* 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.
|
|
1224
1317
|
*
|
|
1225
1318
|
* @param context - The context (or reactive zero-argument accessor) to connect.
|
|
1226
1319
|
* @param config - Optional configuration for connecting the context.
|
|
1227
1320
|
*/
|
|
1228
|
-
declare function connectAgentContext(context:
|
|
1321
|
+
declare function connectAgentContext(context: _AgentContextInput | (() => _AgentContextInput), config?: ConnectAgentContextConfig): void;
|
|
1229
1322
|
|
|
1230
1323
|
/**
|
|
1231
1324
|
* Return value of {@link injectMemories}.
|
|
@@ -1570,7 +1663,7 @@ declare class CopilotKitAgentContext implements OnInit, OnChanges, OnDestroy {
|
|
|
1570
1663
|
* Context object containing both description and value.
|
|
1571
1664
|
* If provided, this takes precedence over individual inputs.
|
|
1572
1665
|
*/
|
|
1573
|
-
context?:
|
|
1666
|
+
context?: _AgentContextInput;
|
|
1574
1667
|
/**
|
|
1575
1668
|
* Description of the context.
|
|
1576
1669
|
* Used when context object is not provided.
|
|
@@ -1606,14 +1699,18 @@ declare class CopilotKitAgentContext implements OnInit, OnChanges, OnDestroy {
|
|
|
1606
1699
|
|
|
1607
1700
|
type ScrollBehavior = "smooth" | "instant" | "auto";
|
|
1608
1701
|
/**
|
|
1609
|
-
*
|
|
1610
|
-
*
|
|
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.
|
|
1611
1708
|
*
|
|
1612
1709
|
* @example
|
|
1613
1710
|
* ```html
|
|
1614
1711
|
* <div copilotStickToBottom
|
|
1615
1712
|
* [enabled]="true"
|
|
1616
|
-
* [threshold]="
|
|
1713
|
+
* [threshold]="12"
|
|
1617
1714
|
* [initialBehavior]="'smooth'"
|
|
1618
1715
|
* [resizeBehavior]="'smooth'"
|
|
1619
1716
|
* (isAtBottomChange)="onBottomChange($event)">
|
|
@@ -1622,28 +1719,22 @@ type ScrollBehavior = "smooth" | "instant" | "auto";
|
|
|
1622
1719
|
* ```
|
|
1623
1720
|
*/
|
|
1624
1721
|
declare class StickToBottom implements AfterViewInit, OnDestroy {
|
|
1722
|
+
/** `false` only tracks the position and does not follow new content. */
|
|
1625
1723
|
enabled: _angular_core.InputSignal<boolean>;
|
|
1724
|
+
/** Pixels from the end that still count as the bottom. Default: 12. */
|
|
1626
1725
|
threshold: _angular_core.InputSignal<number>;
|
|
1627
1726
|
initialBehavior: _angular_core.InputSignal<ScrollBehavior>;
|
|
1628
1727
|
resizeBehavior: _angular_core.InputSignal<ScrollBehavior>;
|
|
1728
|
+
/** Wait this many ms before `isAtBottomChange` reports a change. */
|
|
1629
1729
|
debounceMs: _angular_core.InputSignal<number>;
|
|
1630
1730
|
isAtBottomChange: _angular_core.OutputEmitterRef<boolean>;
|
|
1631
1731
|
scrollToBottomRequested: _angular_core.OutputEmitterRef<void>;
|
|
1632
1732
|
private elementRef;
|
|
1633
|
-
private scrollService;
|
|
1634
|
-
private resizeService;
|
|
1635
1733
|
private platformId;
|
|
1636
|
-
private
|
|
1637
|
-
private
|
|
1638
|
-
private wasAtBottom;
|
|
1639
|
-
private hasInitialized;
|
|
1640
|
-
private userHasScrolled;
|
|
1641
|
-
private destroyed;
|
|
1734
|
+
private controller?;
|
|
1735
|
+
private emitTimer?;
|
|
1642
1736
|
constructor();
|
|
1643
1737
|
ngAfterViewInit(): void;
|
|
1644
|
-
private setupScrollMonitoring;
|
|
1645
|
-
private setupResizeMonitoring;
|
|
1646
|
-
private setupContentMutationObserver;
|
|
1647
1738
|
/**
|
|
1648
1739
|
* Public method to scroll to bottom
|
|
1649
1740
|
* Can be called from parent component
|
|
@@ -1657,45 +1748,105 @@ declare class StickToBottom implements AfterViewInit, OnDestroy {
|
|
|
1657
1748
|
* Get current scroll state
|
|
1658
1749
|
*/
|
|
1659
1750
|
getScrollState(): {
|
|
1660
|
-
scrollTop:
|
|
1661
|
-
scrollHeight:
|
|
1662
|
-
clientHeight:
|
|
1751
|
+
scrollTop: number;
|
|
1752
|
+
scrollHeight: number;
|
|
1753
|
+
clientHeight: number;
|
|
1663
1754
|
isAtBottom: boolean;
|
|
1664
1755
|
};
|
|
1665
1756
|
ngOnDestroy(): void;
|
|
1757
|
+
private emitIsAtBottom;
|
|
1666
1758
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<StickToBottom, never>;
|
|
1667
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>;
|
|
1668
1760
|
}
|
|
1669
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
|
+
*/
|
|
1670
1768
|
declare class TooltipContent {
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
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);
|
|
1677
1780
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TooltipContent, never>;
|
|
1678
1781
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TooltipContent, "copilot-tooltip-content", never, {}, {}, never, never, true, never>;
|
|
1679
1782
|
}
|
|
1680
|
-
|
|
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 {
|
|
1681
1789
|
tooltipText: string;
|
|
1682
|
-
tooltipPosition:
|
|
1790
|
+
tooltipPosition: TooltipPosition;
|
|
1791
|
+
/** Milliseconds to wait on hover. React shows its tooltips at once. */
|
|
1683
1792
|
tooltipDelay: number;
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
private
|
|
1687
|
-
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>;
|
|
1688
1802
|
private overlayRef?;
|
|
1803
|
+
private contentRef?;
|
|
1804
|
+
private positionSubscription?;
|
|
1689
1805
|
private tooltipTimeout?;
|
|
1690
1806
|
private originalTitle?;
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
private
|
|
1694
|
-
|
|
1695
|
-
|
|
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;
|
|
1696
1817
|
ngOnDestroy(): void;
|
|
1818
|
+
private clearTimeout;
|
|
1819
|
+
private getPositions;
|
|
1697
1820
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CopilotTooltip, never>;
|
|
1698
|
-
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;
|
|
1699
1850
|
}
|
|
1700
1851
|
|
|
1701
1852
|
/**
|
|
@@ -1707,12 +1858,21 @@ declare class CopilotTooltip implements OnDestroy {
|
|
|
1707
1858
|
* <copilot-chat [agentId]="'default'" [threadId]="'abc123'"></copilot-chat>
|
|
1708
1859
|
* ```
|
|
1709
1860
|
*/
|
|
1710
|
-
declare class CopilotChat extends ChatState {
|
|
1861
|
+
declare class CopilotChat extends ChatState implements ChatRunControl {
|
|
1711
1862
|
private readonly attachmentsDirective;
|
|
1712
1863
|
readonly inputValue: _angular_core.WritableSignal<string>;
|
|
1713
1864
|
readonly agentId: _angular_core.InputSignal<string | undefined>;
|
|
1714
1865
|
readonly threadId: _angular_core.InputSignal<string | undefined>;
|
|
1715
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>;
|
|
1716
1876
|
/** Component used to render each assistant message in the prebuilt chat. */
|
|
1717
1877
|
readonly assistantMessageComponent: _angular_core.InputSignal<Type<any> | undefined>;
|
|
1718
1878
|
/** Template used to render each assistant message in the prebuilt chat. */
|
|
@@ -1725,6 +1885,16 @@ declare class CopilotChat extends ChatState {
|
|
|
1725
1885
|
readonly reasoningMessageTemplate: _angular_core.InputSignal<TemplateRef<any> | undefined>;
|
|
1726
1886
|
/** Class forwarded to the default or custom reasoning-message renderer. */
|
|
1727
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>;
|
|
1728
1898
|
/** Component rendered after the transcript messages and before the cursor. */
|
|
1729
1899
|
readonly messageViewChildrenComponent: _angular_core.InputSignal<Type<any> | undefined>;
|
|
1730
1900
|
/** Template rendered after the transcript messages and before the cursor. */
|
|
@@ -1742,48 +1912,118 @@ declare class CopilotChat extends ChatState {
|
|
|
1742
1912
|
protected readonly resolvedAgentId: _angular_core.Signal<string>;
|
|
1743
1913
|
readonly agentStore: _angular_core.Signal<_copilotkit_angular.AgentStore>;
|
|
1744
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;
|
|
1745
1923
|
readonly cdr: ChangeDetectorRef;
|
|
1746
1924
|
readonly injector: Injector;
|
|
1747
1925
|
private readonly destroyRef;
|
|
1748
|
-
private readonly
|
|
1749
|
-
private activeConnection?;
|
|
1926
|
+
private readonly labels;
|
|
1750
1927
|
protected readonly showCursor: _angular_core.Signal<boolean>;
|
|
1751
|
-
|
|
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[]>;
|
|
1752
1943
|
protected agentState: _angular_core.Signal<unknown>;
|
|
1753
1944
|
protected readonly hasExplicitThreadId: _angular_core.Signal<boolean>;
|
|
1754
|
-
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;
|
|
1755
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;
|
|
1756
1955
|
readonly attachmentsEnabled: _angular_core.Signal<boolean>;
|
|
1757
1956
|
readonly attachmentsUploading: _angular_core.Signal<boolean>;
|
|
1758
|
-
private generatedThreadId;
|
|
1759
1957
|
constructor();
|
|
1760
|
-
private
|
|
1761
|
-
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;
|
|
1762
1970
|
submitInput(value: string): Promise<void>;
|
|
1763
1971
|
selectSuggestion(suggestion: Suggestion, _index: number): Promise<void>;
|
|
1764
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;
|
|
1765
1978
|
finishTranscription(audioBlob: Blob): Promise<void>;
|
|
1766
|
-
private syncSuggestionsFromCore;
|
|
1767
1979
|
addFile(): void;
|
|
1768
1980
|
removeAttachment(id: string): void;
|
|
1769
1981
|
handleDragOver(event: DragEvent): void;
|
|
1770
1982
|
handleDragLeave(event: DragEvent): void;
|
|
1771
1983
|
handleDrop(event: DragEvent): void;
|
|
1772
1984
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CopilotChat, never>;
|
|
1773
|
-
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>;
|
|
1774
1986
|
}
|
|
1775
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
|
+
*/
|
|
1776
1993
|
declare class CopilotChatToolCallsView {
|
|
1994
|
+
#private;
|
|
1777
1995
|
readonly message: _angular_core.InputSignal<AssistantMessage$1>;
|
|
1778
1996
|
readonly messages: _angular_core.InputSignal<Message$1[]>;
|
|
1779
1997
|
readonly agentId: _angular_core.InputSignal<string | undefined>;
|
|
1780
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"];
|
|
1781
2017
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CopilotChatToolCallsView, never>;
|
|
1782
|
-
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>;
|
|
1783
2019
|
}
|
|
1784
2020
|
|
|
1785
2021
|
interface AssistantMessageMarkdownRendererContext {
|
|
1786
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;
|
|
1787
2027
|
}
|
|
1788
2028
|
interface AssistantMessageToolbarContext {
|
|
1789
2029
|
children?: any;
|
|
@@ -1814,27 +2054,16 @@ interface CopilotChatAssistantMessageOnRegenerateProps {
|
|
|
1814
2054
|
|
|
1815
2055
|
declare class CopilotChatAssistantMessageRenderer {
|
|
1816
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>;
|
|
1817
2059
|
readonly inputClass: _angular_core.InputSignal<string | undefined>;
|
|
1818
|
-
readonly labels:
|
|
2060
|
+
readonly labels: _copilotkit_core.CopilotChatLabels;
|
|
1819
2061
|
private readonly markdownContainer;
|
|
1820
|
-
private readonly appRef;
|
|
1821
|
-
private readonly environmentInjector;
|
|
1822
|
-
private readonly injector;
|
|
1823
|
-
private codeBlockHeaders;
|
|
1824
2062
|
constructor();
|
|
1825
|
-
/** Wraps a rendered code block and mounts its header component above it. */
|
|
1826
|
-
private addCodeBlockHeader;
|
|
1827
|
-
private destroyCodeBlockHeaders;
|
|
1828
2063
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CopilotChatAssistantMessageRenderer, never>;
|
|
1829
|
-
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>;
|
|
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>;
|
|
1830
2065
|
}
|
|
1831
2066
|
|
|
1832
|
-
interface CopilotIconNode {
|
|
1833
|
-
readonly tag: "path" | "rect";
|
|
1834
|
-
readonly attributes: Readonly<Record<string, string>>;
|
|
1835
|
-
}
|
|
1836
|
-
type CopilotIconData = readonly CopilotIconNode[];
|
|
1837
|
-
|
|
1838
2067
|
declare class CopilotChatAssistantMessageToolbarButton {
|
|
1839
2068
|
title: _angular_core.InputSignal<string>;
|
|
1840
2069
|
disabled: _angular_core.InputSignal<boolean>;
|
|
@@ -1844,15 +2073,16 @@ declare class CopilotChatAssistantMessageToolbarButton {
|
|
|
1844
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: {}; }]>;
|
|
1845
2074
|
}
|
|
1846
2075
|
declare class CopilotChatAssistantMessageCopyButton {
|
|
2076
|
+
#private;
|
|
1847
2077
|
readonly title: _angular_core.InputSignal<string | undefined>;
|
|
1848
2078
|
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
1849
2079
|
readonly inputClass: _angular_core.InputSignal<string | undefined>;
|
|
1850
2080
|
readonly content: _angular_core.InputSignal<string | undefined>;
|
|
1851
2081
|
readonly clicked: _angular_core.OutputEmitterRef<void>;
|
|
1852
|
-
readonly CopyIcon: CopilotIconData;
|
|
1853
|
-
readonly CheckIcon: CopilotIconData;
|
|
1854
|
-
readonly copied: _angular_core.
|
|
1855
|
-
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;
|
|
1856
2086
|
handleCopy(event?: Event): void;
|
|
1857
2087
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CopilotChatAssistantMessageCopyButton, never>;
|
|
1858
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>;
|
|
@@ -1862,8 +2092,8 @@ declare class CopilotChatAssistantMessageThumbsUpButton {
|
|
|
1862
2092
|
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
1863
2093
|
readonly inputClass: _angular_core.InputSignal<string | undefined>;
|
|
1864
2094
|
readonly clicked: _angular_core.OutputEmitterRef<void>;
|
|
1865
|
-
readonly ThumbsUpIcon: CopilotIconData;
|
|
1866
|
-
readonly labels:
|
|
2095
|
+
readonly ThumbsUpIcon: _copilotkit_core.CopilotIconData;
|
|
2096
|
+
readonly labels: _copilotkit_core.CopilotChatLabels;
|
|
1867
2097
|
handleClick(event?: Event): void;
|
|
1868
2098
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CopilotChatAssistantMessageThumbsUpButton, never>;
|
|
1869
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>;
|
|
@@ -1873,8 +2103,8 @@ declare class CopilotChatAssistantMessageThumbsDownButton {
|
|
|
1873
2103
|
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
1874
2104
|
readonly inputClass: _angular_core.InputSignal<string | undefined>;
|
|
1875
2105
|
readonly clicked: _angular_core.OutputEmitterRef<void>;
|
|
1876
|
-
readonly ThumbsDownIcon: CopilotIconData;
|
|
1877
|
-
readonly labels:
|
|
2106
|
+
readonly ThumbsDownIcon: _copilotkit_core.CopilotIconData;
|
|
2107
|
+
readonly labels: _copilotkit_core.CopilotChatLabels;
|
|
1878
2108
|
handleClick(event?: Event): void;
|
|
1879
2109
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CopilotChatAssistantMessageThumbsDownButton, never>;
|
|
1880
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>;
|
|
@@ -1884,8 +2114,8 @@ declare class CopilotChatAssistantMessageReadAloudButton {
|
|
|
1884
2114
|
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
1885
2115
|
readonly inputClass: _angular_core.InputSignal<string | undefined>;
|
|
1886
2116
|
readonly clicked: _angular_core.OutputEmitterRef<void>;
|
|
1887
|
-
readonly Volume2Icon: CopilotIconData;
|
|
1888
|
-
readonly labels:
|
|
2117
|
+
readonly Volume2Icon: _copilotkit_core.CopilotIconData;
|
|
2118
|
+
readonly labels: _copilotkit_core.CopilotChatLabels;
|
|
1889
2119
|
handleClick(event?: Event): void;
|
|
1890
2120
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CopilotChatAssistantMessageReadAloudButton, never>;
|
|
1891
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>;
|
|
@@ -1895,8 +2125,8 @@ declare class CopilotChatAssistantMessageRegenerateButton {
|
|
|
1895
2125
|
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
1896
2126
|
readonly inputClass: _angular_core.InputSignal<string | undefined>;
|
|
1897
2127
|
readonly clicked: _angular_core.OutputEmitterRef<void>;
|
|
1898
|
-
readonly RefreshCwIcon: CopilotIconData;
|
|
1899
|
-
readonly labels:
|
|
2128
|
+
readonly RefreshCwIcon: _copilotkit_core.CopilotIconData;
|
|
2129
|
+
readonly labels: _copilotkit_core.CopilotChatLabels;
|
|
1900
2130
|
handleClick(event?: Event): void;
|
|
1901
2131
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CopilotChatAssistantMessageRegenerateButton, never>;
|
|
1902
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>;
|
|
@@ -1920,7 +2150,17 @@ declare class CopilotChatViewHandlers {
|
|
|
1920
2150
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<CopilotChatViewHandlers>;
|
|
1921
2151
|
}
|
|
1922
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>;
|
|
1923
2162
|
declare class CopilotChatAssistantMessage {
|
|
2163
|
+
#private;
|
|
1924
2164
|
markdownRendererTemplate?: TemplateRef<AssistantMessageMarkdownRendererContext>;
|
|
1925
2165
|
toolbarTemplate?: TemplateRef<AssistantMessageToolbarContext>;
|
|
1926
2166
|
copyButtonTemplate?: TemplateRef<AssistantMessageCopyButtonContext>;
|
|
@@ -1953,6 +2193,7 @@ declare class CopilotChatAssistantMessage {
|
|
|
1953
2193
|
readonly toolbarVisible: _angular_core.InputSignal<boolean>;
|
|
1954
2194
|
readonly inputClass: _angular_core.InputSignal<string | undefined>;
|
|
1955
2195
|
handlers: CopilotChatViewHandlers;
|
|
2196
|
+
protected readonly chatConfiguration: _copilotkit_angular.CopilotChatConfiguration | null;
|
|
1956
2197
|
constructor(handlers?: CopilotChatViewHandlers | null);
|
|
1957
2198
|
thumbsUp: _angular_core.OutputEmitterRef<CopilotChatAssistantMessageOnThumbsUpProps>;
|
|
1958
2199
|
thumbsDown: _angular_core.OutputEmitterRef<CopilotChatAssistantMessageOnThumbsDownProps>;
|
|
@@ -1966,7 +2207,10 @@ declare class CopilotChatAssistantMessage {
|
|
|
1966
2207
|
protected readonly CopilotChatAssistantMessageToolbar: typeof CopilotChatAssistantMessageToolbar;
|
|
1967
2208
|
protected readonly CopilotChatAssistantMessageCopyButton: typeof CopilotChatAssistantMessageCopyButton;
|
|
1968
2209
|
protected readonly CopilotChatToolCallsView: typeof CopilotChatToolCallsView;
|
|
2210
|
+
readonly isStreaming: _angular_core.Signal<boolean>;
|
|
1969
2211
|
markdownRendererContext: _angular_core.Signal<AssistantMessageMarkdownRendererContext>;
|
|
2212
|
+
/** The renderer a secondary entry point provides, or null. */
|
|
2213
|
+
protected readonly defaultMarkdownRenderer: Type<unknown> | undefined;
|
|
1970
2214
|
copyButtonOutputs: {
|
|
1971
2215
|
clicked: () => void;
|
|
1972
2216
|
};
|
|
@@ -1984,6 +2228,12 @@ declare class CopilotChatAssistantMessage {
|
|
|
1984
2228
|
};
|
|
1985
2229
|
toolbarContext: _angular_core.Signal<AssistantMessageToolbarContext>;
|
|
1986
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>;
|
|
1987
2237
|
toolCallsViewContext: _angular_core.Signal<{
|
|
1988
2238
|
message: AssistantMessage;
|
|
1989
2239
|
messages: Message$1[];
|
|
@@ -2002,6 +2252,15 @@ declare class CopilotChatAttachmentQueue {
|
|
|
2002
2252
|
readonly attachments: _angular_core.InputSignal<Attachment[]>;
|
|
2003
2253
|
readonly inputClass: _angular_core.InputSignal<string | undefined>;
|
|
2004
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;
|
|
2005
2264
|
readonly computedClass: _angular_core.Signal<string>;
|
|
2006
2265
|
itemClass(attachment: Attachment): string;
|
|
2007
2266
|
sourceUrl(attachment: Attachment): string;
|
|
@@ -2017,9 +2276,17 @@ declare class CopilotChatAttachmentRenderer {
|
|
|
2017
2276
|
readonly filename: _angular_core.InputSignal<string | undefined>;
|
|
2018
2277
|
readonly inputClass: _angular_core.InputSignal<string | undefined>;
|
|
2019
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
|
+
};
|
|
2020
2287
|
readonly sourceUrl: _angular_core.Signal<string>;
|
|
2021
2288
|
readonly documentIcon: _angular_core.Signal<string>;
|
|
2022
|
-
readonly
|
|
2289
|
+
readonly imageClass: _angular_core.Signal<string>;
|
|
2023
2290
|
readonly failedImageClass: _angular_core.Signal<string>;
|
|
2024
2291
|
readonly audioClass: _angular_core.Signal<string>;
|
|
2025
2292
|
readonly videoClass: _angular_core.Signal<string>;
|
|
@@ -2028,13 +2295,21 @@ declare class CopilotChatAttachmentRenderer {
|
|
|
2028
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>;
|
|
2029
2296
|
}
|
|
2030
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
|
+
*/
|
|
2031
2304
|
declare class CopilotChatAttachmentsDirective {
|
|
2032
2305
|
readonly config: _angular_core.InputSignal<AttachmentsConfig | undefined>;
|
|
2033
2306
|
private readonly chat;
|
|
2034
2307
|
private readonly host;
|
|
2035
2308
|
private readonly renderer;
|
|
2036
2309
|
private readonly destroyRef;
|
|
2310
|
+
private readonly queue;
|
|
2037
2311
|
private fileInput?;
|
|
2312
|
+
constructor();
|
|
2038
2313
|
private get enabled();
|
|
2039
2314
|
onDragOver(event: DragEvent): void;
|
|
2040
2315
|
onDragLeave(event: DragEvent): void;
|
|
@@ -2042,11 +2317,20 @@ declare class CopilotChatAttachmentsDirective {
|
|
|
2042
2317
|
onPaste(event: ClipboardEvent): Promise<void>;
|
|
2043
2318
|
openFilePicker(): void;
|
|
2044
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
|
+
*/
|
|
2045
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
|
+
*/
|
|
2046
2330
|
buildContent(value: string, attachments: Attachment[]): InputContent[];
|
|
2047
2331
|
private ensureFileInput;
|
|
2048
2332
|
private handleFileInputChange;
|
|
2049
|
-
private
|
|
2333
|
+
private processSafely;
|
|
2050
2334
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CopilotChatAttachmentsDirective, never>;
|
|
2051
2335
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<CopilotChatAttachmentsDirective, "[copilotChatAttachments]", never, { "config": { "alias": "config"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
2052
2336
|
}
|
|
@@ -2070,13 +2354,8 @@ type ToolsMenuItem = {
|
|
|
2070
2354
|
/**
|
|
2071
2355
|
* Audio recorder state
|
|
2072
2356
|
*/
|
|
2073
|
-
type AudioRecorderState =
|
|
2074
|
-
|
|
2075
|
-
* Error class for audio recorder failures
|
|
2076
|
-
*/
|
|
2077
|
-
declare class AudioRecorderError extends Error {
|
|
2078
|
-
constructor(message: string);
|
|
2079
|
-
}
|
|
2357
|
+
type AudioRecorderState = _AudioRecorderState;
|
|
2358
|
+
|
|
2080
2359
|
/**
|
|
2081
2360
|
* Props for textarea component
|
|
2082
2361
|
*/
|
|
@@ -2184,42 +2463,33 @@ declare class CopilotChatAudioRecorder implements AfterViewInit {
|
|
|
2184
2463
|
private readonly canvasRef;
|
|
2185
2464
|
inputClass: _angular_core.InputSignal<string | undefined>;
|
|
2186
2465
|
inputShowControls: _angular_core.InputSignal<boolean>;
|
|
2187
|
-
stateChange: _angular_core.OutputEmitterRef<AudioRecorderState>;
|
|
2188
|
-
error: _angular_core.OutputEmitterRef<
|
|
2189
|
-
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>;
|
|
2190
2470
|
readonly computedClass: _angular_core.Signal<string>;
|
|
2191
|
-
private
|
|
2192
|
-
private stream?;
|
|
2193
|
-
private audioContext?;
|
|
2194
|
-
private analyser?;
|
|
2195
|
-
private audioChunks;
|
|
2196
|
-
private starting;
|
|
2197
|
-
private animationFrameId?;
|
|
2198
|
-
private amplitudeHistory;
|
|
2199
|
-
private scrollOffset;
|
|
2200
|
-
private smoothedAmplitude;
|
|
2201
|
-
private fadeOpacity;
|
|
2471
|
+
private waveform?;
|
|
2202
2472
|
constructor();
|
|
2203
2473
|
ngAfterViewInit(): void;
|
|
2204
2474
|
/**
|
|
2205
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.
|
|
2206
2479
|
*/
|
|
2207
2480
|
start(): Promise<void>;
|
|
2208
2481
|
/**
|
|
2209
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.
|
|
2210
2486
|
*/
|
|
2211
2487
|
stop(): Promise<Blob>;
|
|
2212
2488
|
getState(): AudioRecorderState;
|
|
2213
2489
|
/**
|
|
2214
|
-
* Release every capture
|
|
2490
|
+
* Release every capture resource. Safe to call repeatedly.
|
|
2215
2491
|
*/
|
|
2216
2492
|
dispose(): void;
|
|
2217
|
-
private setState;
|
|
2218
|
-
private toRecorderError;
|
|
2219
|
-
private cleanup;
|
|
2220
|
-
/** RMS amplitude from time-domain samples (128 is silence). */
|
|
2221
|
-
private calculateAmplitude;
|
|
2222
|
-
private startAnimation;
|
|
2223
2493
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CopilotChatAudioRecorder, never>;
|
|
2224
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>;
|
|
2225
2495
|
}
|
|
@@ -2227,7 +2497,8 @@ declare class CopilotChatAudioRecorder implements AfterViewInit {
|
|
|
2227
2497
|
declare class CopilotChatSendButton {
|
|
2228
2498
|
disabled: _angular_core.InputSignal<boolean>;
|
|
2229
2499
|
clicked: _angular_core.OutputEmitterRef<void>;
|
|
2230
|
-
readonly
|
|
2500
|
+
readonly labels: _copilotkit_core.CopilotChatLabels;
|
|
2501
|
+
readonly ArrowUpIcon: _copilotkit_core.CopilotIconData;
|
|
2231
2502
|
buttonClass: string;
|
|
2232
2503
|
onClick(): void;
|
|
2233
2504
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CopilotChatSendButton, never>;
|
|
@@ -2236,8 +2507,8 @@ declare class CopilotChatSendButton {
|
|
|
2236
2507
|
declare class CopilotChatStartTranscribeButton {
|
|
2237
2508
|
disabled: _angular_core.InputSignal<boolean>;
|
|
2238
2509
|
clicked: _angular_core.OutputEmitterRef<void>;
|
|
2239
|
-
readonly labels:
|
|
2240
|
-
readonly MicIcon: CopilotIconData;
|
|
2510
|
+
readonly labels: _copilotkit_core.CopilotChatLabels;
|
|
2511
|
+
readonly MicIcon: _copilotkit_core.CopilotIconData;
|
|
2241
2512
|
buttonClass: string;
|
|
2242
2513
|
get label(): string;
|
|
2243
2514
|
onClick(): void;
|
|
@@ -2247,8 +2518,8 @@ declare class CopilotChatStartTranscribeButton {
|
|
|
2247
2518
|
declare class CopilotChatCancelTranscribeButton {
|
|
2248
2519
|
disabled: _angular_core.InputSignal<boolean>;
|
|
2249
2520
|
clicked: _angular_core.OutputEmitterRef<void>;
|
|
2250
|
-
readonly labels:
|
|
2251
|
-
readonly XIcon: CopilotIconData;
|
|
2521
|
+
readonly labels: _copilotkit_core.CopilotChatLabels;
|
|
2522
|
+
readonly XIcon: _copilotkit_core.CopilotIconData;
|
|
2252
2523
|
buttonClass: string;
|
|
2253
2524
|
get label(): string;
|
|
2254
2525
|
onClick(): void;
|
|
@@ -2258,8 +2529,8 @@ declare class CopilotChatCancelTranscribeButton {
|
|
|
2258
2529
|
declare class CopilotChatFinishTranscribeButton {
|
|
2259
2530
|
disabled: _angular_core.InputSignal<boolean>;
|
|
2260
2531
|
clicked: _angular_core.OutputEmitterRef<void>;
|
|
2261
|
-
readonly labels:
|
|
2262
|
-
readonly CheckIcon: CopilotIconData;
|
|
2532
|
+
readonly labels: _copilotkit_core.CopilotChatLabels;
|
|
2533
|
+
readonly CheckIcon: _copilotkit_core.CopilotIconData;
|
|
2263
2534
|
buttonClass: string;
|
|
2264
2535
|
get label(): string;
|
|
2265
2536
|
onClick(): void;
|
|
@@ -2269,8 +2540,8 @@ declare class CopilotChatFinishTranscribeButton {
|
|
|
2269
2540
|
declare class CopilotChatAddFileButton {
|
|
2270
2541
|
disabled: _angular_core.InputSignal<boolean>;
|
|
2271
2542
|
clicked: _angular_core.OutputEmitterRef<void>;
|
|
2272
|
-
readonly labels:
|
|
2273
|
-
readonly PlusIcon: CopilotIconData;
|
|
2543
|
+
readonly labels: _copilotkit_core.CopilotChatLabels;
|
|
2544
|
+
readonly PlusIcon: _copilotkit_core.CopilotIconData;
|
|
2274
2545
|
buttonClass: string;
|
|
2275
2546
|
get label(): string;
|
|
2276
2547
|
onClick(): void;
|
|
@@ -2289,7 +2560,7 @@ declare class CopilotChatToolbarButton {
|
|
|
2289
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>;
|
|
2290
2561
|
}
|
|
2291
2562
|
|
|
2292
|
-
declare class CopilotChatTextarea
|
|
2563
|
+
declare class CopilotChatTextarea {
|
|
2293
2564
|
private elementRef;
|
|
2294
2565
|
private platformId;
|
|
2295
2566
|
get textareaRef(): ElementRef<any>;
|
|
@@ -2301,7 +2572,7 @@ declare class CopilotChatTextarea implements AfterViewInit {
|
|
|
2301
2572
|
inputClass: _angular_core.InputSignal<string | undefined>;
|
|
2302
2573
|
valueChange: _angular_core.OutputEmitterRef<string>;
|
|
2303
2574
|
keyDown: _angular_core.OutputEmitterRef<KeyboardEvent>;
|
|
2304
|
-
readonly chatLabels:
|
|
2575
|
+
readonly chatLabels: _copilotkit_core.CopilotChatLabels;
|
|
2305
2576
|
readonly chatState: _copilotkit_angular.ChatState;
|
|
2306
2577
|
maxHeight: _angular_core.WritableSignal<number>;
|
|
2307
2578
|
computedValue: _angular_core.Signal<string>;
|
|
@@ -2309,11 +2580,25 @@ declare class CopilotChatTextarea implements AfterViewInit {
|
|
|
2309
2580
|
disabled: _angular_core.Signal<boolean>;
|
|
2310
2581
|
computedClass: _angular_core.Signal<string>;
|
|
2311
2582
|
constructor();
|
|
2312
|
-
ngAfterViewInit(): void;
|
|
2313
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
|
+
*/
|
|
2314
2589
|
onKeyDown(event: KeyboardEvent): void;
|
|
2590
|
+
private metrics;
|
|
2591
|
+
/** Measures one row and the height of `inputMaxRows` rows. */
|
|
2315
2592
|
private calculateMaxHeight;
|
|
2316
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
|
+
};
|
|
2317
2602
|
/**
|
|
2318
2603
|
* Public method to focus the textarea
|
|
2319
2604
|
*/
|
|
@@ -2338,8 +2623,8 @@ declare class CopilotChatToolbar {
|
|
|
2338
2623
|
}
|
|
2339
2624
|
|
|
2340
2625
|
declare class CopilotChatToolsMenu {
|
|
2341
|
-
readonly PlusIcon: CopilotIconData;
|
|
2342
|
-
readonly ChevronRightIcon: CopilotIconData;
|
|
2626
|
+
readonly PlusIcon: _copilotkit_core.CopilotIconData;
|
|
2627
|
+
readonly ChevronRightIcon: _copilotkit_core.CopilotIconData;
|
|
2343
2628
|
inputToolsMenu: _angular_core.InputSignal<(ToolsMenuItem | "-")[] | undefined>;
|
|
2344
2629
|
inputDisabled: _angular_core.InputSignal<boolean | undefined>;
|
|
2345
2630
|
inputClass: _angular_core.InputSignal<string | undefined>;
|
|
@@ -2365,7 +2650,12 @@ declare class CopilotChatToolsMenu {
|
|
|
2365
2650
|
* Context provided to slot templates
|
|
2366
2651
|
*/
|
|
2367
2652
|
interface SendButtonContext {
|
|
2653
|
+
/** Send the typed text. */
|
|
2368
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";
|
|
2369
2659
|
disabled: boolean;
|
|
2370
2660
|
value: string;
|
|
2371
2661
|
}
|
|
@@ -2374,6 +2664,7 @@ interface ToolbarContext {
|
|
|
2374
2664
|
value: string;
|
|
2375
2665
|
}
|
|
2376
2666
|
declare class CopilotChatInput implements OnDestroy {
|
|
2667
|
+
#private;
|
|
2377
2668
|
readonly textAreaRef: _angular_core.Signal<CopilotChatTextarea | undefined>;
|
|
2378
2669
|
readonly audioRecorderRef: _angular_core.Signal<CopilotChatAudioRecorder | undefined>;
|
|
2379
2670
|
readonly sendButtonTemplate: _angular_core.Signal<TemplateRef<SendButtonContext> | undefined>;
|
|
@@ -2418,9 +2709,12 @@ declare class CopilotChatInput implements OnDestroy {
|
|
|
2418
2709
|
finishTranscribeWithAudio: _angular_core.OutputEmitterRef<Blob>;
|
|
2419
2710
|
addFile: _angular_core.OutputEmitterRef<void>;
|
|
2420
2711
|
valueChange: _angular_core.OutputEmitterRef<string>;
|
|
2421
|
-
readonly ArrowUpIcon: CopilotIconData;
|
|
2422
|
-
|
|
2423
|
-
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;
|
|
2424
2718
|
readonly chatState: _copilotkit_angular.ChatState;
|
|
2425
2719
|
readonly copilotKit: CopilotKit;
|
|
2426
2720
|
modeSignal: _angular_core.WritableSignal<CopilotChatInputMode>;
|
|
@@ -2436,12 +2730,29 @@ declare class CopilotChatInput implements OnDestroy {
|
|
|
2436
2730
|
CopilotChatFinishTranscribeButton: typeof CopilotChatFinishTranscribeButton;
|
|
2437
2731
|
CopilotChatStartTranscribeButton: typeof CopilotChatStartTranscribeButton;
|
|
2438
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">;
|
|
2439
2740
|
computedToolsMenu: _angular_core.Signal<(ToolsMenuItem | "-")[]>;
|
|
2440
2741
|
computedAutoFocus: _angular_core.Signal<boolean>;
|
|
2441
2742
|
audioTranscriptionEnabled: _angular_core.Signal<boolean>;
|
|
2442
2743
|
computedValue: _angular_core.Signal<string>;
|
|
2443
2744
|
addFileButtonDisabled: _angular_core.Signal<boolean>;
|
|
2444
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>;
|
|
2445
2756
|
sendButtonDisabled: _angular_core.Signal<boolean>;
|
|
2446
2757
|
computedClass: _angular_core.Signal<string>;
|
|
2447
2758
|
defaultTextAreaClass: _angular_core.Signal<string>;
|
|
@@ -2451,6 +2762,7 @@ declare class CopilotChatInput implements OnDestroy {
|
|
|
2451
2762
|
value: string;
|
|
2452
2763
|
autoFocus: boolean;
|
|
2453
2764
|
disabled: boolean;
|
|
2765
|
+
layout: "compact" | "expanded";
|
|
2454
2766
|
maxRows: number | undefined;
|
|
2455
2767
|
placeholder: string | undefined;
|
|
2456
2768
|
inputClass: string | undefined;
|
|
@@ -2465,6 +2777,18 @@ declare class CopilotChatInput implements OnDestroy {
|
|
|
2465
2777
|
inputDisabled: boolean;
|
|
2466
2778
|
}>;
|
|
2467
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;
|
|
2468
2792
|
addFileButtonOutputs: {
|
|
2469
2793
|
clicked: () => void;
|
|
2470
2794
|
};
|
|
@@ -2482,7 +2806,16 @@ declare class CopilotChatInput implements OnDestroy {
|
|
|
2482
2806
|
click: () => void;
|
|
2483
2807
|
};
|
|
2484
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
|
+
*/
|
|
2485
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;
|
|
2486
2819
|
handleValueChange(value: string): void;
|
|
2487
2820
|
send(): void;
|
|
2488
2821
|
handleStartTranscribe(): void;
|
|
@@ -2493,6 +2826,59 @@ declare class CopilotChatInput implements OnDestroy {
|
|
|
2493
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>;
|
|
2494
2827
|
}
|
|
2495
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
|
+
|
|
2496
2882
|
/**
|
|
2497
2883
|
* Default components used by CopilotChatInput.
|
|
2498
2884
|
* These can be imported and reused when creating custom slot implementations.
|
|
@@ -2570,15 +2956,16 @@ declare class CopilotChatUserMessageToolbarButton {
|
|
|
2570
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: {}; }]>;
|
|
2571
2957
|
}
|
|
2572
2958
|
declare class CopilotChatUserMessageCopyButton {
|
|
2959
|
+
#private;
|
|
2573
2960
|
readonly title: _angular_core.InputSignal<string | undefined>;
|
|
2574
2961
|
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
2575
2962
|
readonly inputClass: _angular_core.InputSignal<string | undefined>;
|
|
2576
2963
|
readonly content: _angular_core.InputSignal<string | undefined>;
|
|
2577
2964
|
readonly clicked: _angular_core.OutputEmitterRef<void>;
|
|
2578
|
-
readonly CopyIcon: CopilotIconData;
|
|
2579
|
-
readonly CheckIcon: CopilotIconData;
|
|
2580
|
-
readonly copied: _angular_core.
|
|
2581
|
-
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;
|
|
2582
2969
|
handleCopy(): void;
|
|
2583
2970
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CopilotChatUserMessageCopyButton, never>;
|
|
2584
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>;
|
|
@@ -2588,8 +2975,8 @@ declare class CopilotChatUserMessageEditButton {
|
|
|
2588
2975
|
disabled: _angular_core.InputSignal<boolean>;
|
|
2589
2976
|
inputClass: _angular_core.InputSignal<string | undefined>;
|
|
2590
2977
|
clicked: _angular_core.OutputEmitterRef<void>;
|
|
2591
|
-
readonly EditIcon: CopilotIconData;
|
|
2592
|
-
readonly labels:
|
|
2978
|
+
readonly EditIcon: _copilotkit_core.CopilotIconData;
|
|
2979
|
+
readonly labels: _copilotkit_core.CopilotChatLabels;
|
|
2593
2980
|
handleEdit(): void;
|
|
2594
2981
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CopilotChatUserMessageEditButton, never>;
|
|
2595
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>;
|
|
@@ -2603,14 +2990,24 @@ declare class CopilotChatUserMessageToolbar {
|
|
|
2603
2990
|
}
|
|
2604
2991
|
|
|
2605
2992
|
declare class CopilotChatUserMessageBranchNavigation {
|
|
2993
|
+
#private;
|
|
2606
2994
|
currentBranch: _angular_core.InputSignal<number>;
|
|
2607
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>;
|
|
2608
3004
|
message: _angular_core.InputSignal<UserMessage | undefined>;
|
|
2609
3005
|
inputClass: _angular_core.InputSignal<string | undefined>;
|
|
2610
3006
|
switchToBranch: _angular_core.OutputEmitterRef<CopilotChatUserMessageOnSwitchToBranchProps>;
|
|
2611
|
-
readonly ChevronLeftIcon: CopilotIconData;
|
|
2612
|
-
readonly ChevronRightIcon: CopilotIconData;
|
|
2613
|
-
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";
|
|
2614
3011
|
showNavigation: _angular_core.Signal<boolean>;
|
|
2615
3012
|
canGoPrev: _angular_core.Signal<boolean>;
|
|
2616
3013
|
canGoNext: _angular_core.Signal<boolean>;
|
|
@@ -2618,11 +3015,9 @@ declare class CopilotChatUserMessageBranchNavigation {
|
|
|
2618
3015
|
handlePrevious(): void;
|
|
2619
3016
|
handleNext(): void;
|
|
2620
3017
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CopilotChatUserMessageBranchNavigation, never>;
|
|
2621
|
-
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>;
|
|
2622
3019
|
}
|
|
2623
3020
|
|
|
2624
|
-
type UserMessageMediaPart = ImageInputPart | AudioInputPart | VideoInputPart | DocumentInputPart;
|
|
2625
|
-
|
|
2626
3021
|
declare class CopilotChatUserMessage {
|
|
2627
3022
|
messageRendererTemplate?: TemplateRef<MessageRendererContext>;
|
|
2628
3023
|
toolbarTemplate?: TemplateRef<UserMessageToolbarContext>;
|
|
@@ -2642,6 +3037,14 @@ declare class CopilotChatUserMessage {
|
|
|
2642
3037
|
message: _angular_core.InputSignal<UserMessage | undefined>;
|
|
2643
3038
|
branchIndex: _angular_core.InputSignal<number | undefined>;
|
|
2644
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>;
|
|
2645
3048
|
additionalToolbarItems: _angular_core.InputSignal<TemplateRef<any> | undefined>;
|
|
2646
3049
|
inputClass: _angular_core.InputSignal<string | undefined>;
|
|
2647
3050
|
editMessage: _angular_core.OutputEmitterRef<CopilotChatUserMessageOnEditMessageProps>;
|
|
@@ -2656,7 +3059,7 @@ declare class CopilotChatUserMessage {
|
|
|
2656
3059
|
showBranchNavigation: _angular_core.Signal<boolean>;
|
|
2657
3060
|
computedClass: _angular_core.Signal<string>;
|
|
2658
3061
|
flattenedContent: _angular_core.Signal<string>;
|
|
2659
|
-
mediaParts: _angular_core.Signal<
|
|
3062
|
+
mediaParts: _angular_core.Signal<_UserMessageMediaPart[]>;
|
|
2660
3063
|
messageRendererContext: _angular_core.Signal<MessageRendererContext>;
|
|
2661
3064
|
copyButtonOutputs: {
|
|
2662
3065
|
clicked: () => void;
|
|
@@ -2669,10 +3072,9 @@ declare class CopilotChatUserMessage {
|
|
|
2669
3072
|
handleCopy(): void;
|
|
2670
3073
|
handleEdit(): void;
|
|
2671
3074
|
handleSwitchToBranch(props: CopilotChatUserMessageOnSwitchToBranchProps): void;
|
|
2672
|
-
filenameFor(part:
|
|
2673
|
-
constructor();
|
|
3075
|
+
filenameFor(part: _UserMessageMediaPart): any;
|
|
2674
3076
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CopilotChatUserMessage, never>;
|
|
2675
|
-
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>;
|
|
2676
3078
|
}
|
|
2677
3079
|
|
|
2678
3080
|
/**
|
|
@@ -2687,18 +3089,24 @@ declare class CopilotChatMessageViewCursor {
|
|
|
2687
3089
|
}
|
|
2688
3090
|
|
|
2689
3091
|
declare class CopilotChatReasoningMessage {
|
|
3092
|
+
#private;
|
|
2690
3093
|
readonly message: _angular_core.InputSignal<ReasoningMessage>;
|
|
2691
3094
|
readonly messages: _angular_core.InputSignal<Message$1[]>;
|
|
2692
3095
|
readonly isRunning: _angular_core.InputSignal<boolean>;
|
|
2693
3096
|
readonly inputClass: _angular_core.InputSignal<string | undefined>;
|
|
2694
|
-
private readonly
|
|
3097
|
+
private readonly labels;
|
|
3098
|
+
protected readonly ChevronRightIcon: _copilotkit_core.CopilotIconData;
|
|
2695
3099
|
protected readonly isLatest: _angular_core.Signal<boolean>;
|
|
2696
3100
|
protected readonly isStreaming: _angular_core.Signal<boolean>;
|
|
2697
|
-
|
|
2698
|
-
protected readonly open: _angular_core.WritableSignal<boolean>;
|
|
3101
|
+
protected readonly open: _angular_core.Signal<boolean>;
|
|
2699
3102
|
protected readonly hasContent: _angular_core.Signal<boolean>;
|
|
2700
3103
|
protected readonly reasoningContent: _angular_core.Signal<string>;
|
|
3104
|
+
/**
|
|
3105
|
+
* `labels.reasoningMessageThinkingLabel` while streaming, then
|
|
3106
|
+
* `labels.reasoningMessageThoughtForLabel` ("Thought for 4 seconds").
|
|
3107
|
+
*/
|
|
2701
3108
|
protected readonly label: _angular_core.Signal<string>;
|
|
3109
|
+
constructor();
|
|
2702
3110
|
protected readonly computedClass: _angular_core.Signal<string>;
|
|
2703
3111
|
protected readonly headerClass: _angular_core.Signal<string>;
|
|
2704
3112
|
protected readonly chevronClass: _angular_core.Signal<string>;
|
|
@@ -2707,12 +3115,35 @@ declare class CopilotChatReasoningMessage {
|
|
|
2707
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>;
|
|
2708
3116
|
}
|
|
2709
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
|
+
|
|
2710
3140
|
/**
|
|
2711
3141
|
* CopilotChatMessageView component - Angular port of the React component.
|
|
2712
3142
|
* Renders a list of chat messages with support for custom slots and layouts.
|
|
2713
3143
|
* DOM structure and Tailwind classes match the React implementation exactly.
|
|
2714
3144
|
*/
|
|
2715
3145
|
declare class CopilotChatMessageView {
|
|
3146
|
+
#private;
|
|
2716
3147
|
messages: _angular_core.InputSignal<Message$1[]>;
|
|
2717
3148
|
/** Current agent state exposed to transcript-children slots. */
|
|
2718
3149
|
state: _angular_core.InputSignal<unknown>;
|
|
@@ -2720,6 +3151,11 @@ declare class CopilotChatMessageView {
|
|
|
2720
3151
|
isLoading: _angular_core.InputSignal<boolean>;
|
|
2721
3152
|
inputClass: _angular_core.InputSignal<string | undefined>;
|
|
2722
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>;
|
|
2723
3159
|
assistantMessageComponent: _angular_core.InputSignal<Type<any> | undefined>;
|
|
2724
3160
|
assistantMessageTemplate: _angular_core.InputSignal<TemplateRef<any> | undefined>;
|
|
2725
3161
|
assistantMessageClass: _angular_core.InputSignal<string | undefined>;
|
|
@@ -2735,6 +3171,9 @@ declare class CopilotChatMessageView {
|
|
|
2735
3171
|
cursorComponent: _angular_core.InputSignal<Type<any> | undefined>;
|
|
2736
3172
|
cursorTemplate: _angular_core.InputSignal<TemplateRef<any> | undefined>;
|
|
2737
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>;
|
|
2738
3177
|
customLayoutTemplate?: TemplateRef<any>;
|
|
2739
3178
|
assistantMessageThumbsUp: _angular_core.OutputEmitterRef<{
|
|
2740
3179
|
message: Message$1;
|
|
@@ -2759,6 +3198,11 @@ declare class CopilotChatMessageView {
|
|
|
2759
3198
|
protected readonly defaultReasoningComponent: typeof CopilotChatReasoningMessage;
|
|
2760
3199
|
protected readonly defaultCursorComponent: typeof CopilotChatMessageViewCursor;
|
|
2761
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[]>;
|
|
2762
3206
|
/**
|
|
2763
3207
|
* Override table backing `rowRenderKey`. Per component instance, so its
|
|
2764
3208
|
* lifetime matches the rendered list.
|
|
@@ -2766,8 +3210,22 @@ declare class CopilotChatMessageView {
|
|
|
2766
3210
|
private readonly rowKeyStore;
|
|
2767
3211
|
protected rowRenderKeys: _angular_core.Signal<string[]>;
|
|
2768
3212
|
private readonly rowKeyStoreCommit;
|
|
2769
|
-
protected showCursorValue: _angular_core.Signal<boolean>;
|
|
2770
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;
|
|
2771
3229
|
protected lastMessage: _angular_core.Signal<Message$1 | undefined>;
|
|
2772
3230
|
computedClass: _angular_core.Signal<string>;
|
|
2773
3231
|
layoutContext: _angular_core.Signal<{
|
|
@@ -2798,6 +3256,19 @@ declare class CopilotChatMessageView {
|
|
|
2798
3256
|
isRunning: boolean;
|
|
2799
3257
|
inputClass: string | undefined;
|
|
2800
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
|
+
};
|
|
2801
3272
|
mergeUserProps(message: Message$1): {
|
|
2802
3273
|
message: Message$1;
|
|
2803
3274
|
inputClass: string | undefined;
|
|
@@ -2822,7 +3293,7 @@ declare class CopilotChatMessageView {
|
|
|
2822
3293
|
message: Message$1;
|
|
2823
3294
|
}): void;
|
|
2824
3295
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CopilotChatMessageView, never>;
|
|
2825
|
-
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>;
|
|
2826
3297
|
}
|
|
2827
3298
|
|
|
2828
3299
|
interface MessageViewContext {
|
|
@@ -2858,6 +3329,7 @@ declare class CopilotChatSuggestionPill {
|
|
|
2858
3329
|
readonly isLoading: _angular_core.InputSignal<boolean>;
|
|
2859
3330
|
readonly inputClass: _angular_core.InputSignal<string | undefined>;
|
|
2860
3331
|
readonly clicked: _angular_core.OutputEmitterRef<void>;
|
|
3332
|
+
protected readonly Loader2Icon: _copilotkit_core.CopilotIconData;
|
|
2861
3333
|
protected readonly computedClass: _angular_core.Signal<string>;
|
|
2862
3334
|
handleClick(): void;
|
|
2863
3335
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CopilotChatSuggestionPill, never>;
|
|
@@ -2877,6 +3349,66 @@ declare class CopilotChatSuggestionView {
|
|
|
2877
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>;
|
|
2878
3350
|
}
|
|
2879
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
|
+
|
|
2880
3412
|
/**
|
|
2881
3413
|
* ScrollToBottomButton component for CopilotChatView
|
|
2882
3414
|
* Matches React implementation exactly with same Tailwind classes
|
|
@@ -2886,7 +3418,8 @@ declare class CopilotChatViewScrollToBottomButton {
|
|
|
2886
3418
|
disabled: _angular_core.InputSignal<boolean>;
|
|
2887
3419
|
onClick: _angular_core.InputSignal<(() => void) | undefined>;
|
|
2888
3420
|
clicked: _angular_core.OutputEmitterRef<void>;
|
|
2889
|
-
|
|
3421
|
+
readonly labels: _copilotkit_core.CopilotChatLabels;
|
|
3422
|
+
protected readonly ChevronDown: _copilotkit_core.CopilotIconData;
|
|
2890
3423
|
get computedClass(): string;
|
|
2891
3424
|
handleClick(): void;
|
|
2892
3425
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CopilotChatViewScrollToBottomButton, never>;
|
|
@@ -2897,8 +3430,7 @@ declare class CopilotChatViewScrollToBottomButton {
|
|
|
2897
3430
|
* ScrollView component for CopilotChatView
|
|
2898
3431
|
* Handles auto-scrolling and scroll position management
|
|
2899
3432
|
*/
|
|
2900
|
-
declare class CopilotChatViewScrollView
|
|
2901
|
-
private cdr;
|
|
3433
|
+
declare class CopilotChatViewScrollView {
|
|
2902
3434
|
protected readonly chatState: ChatState | null;
|
|
2903
3435
|
autoScroll: _angular_core.InputSignal<boolean>;
|
|
2904
3436
|
inputContainerHeight: _angular_core.InputSignal<number>;
|
|
@@ -2916,10 +3448,22 @@ declare class CopilotChatViewScrollView implements AfterViewInit, OnDestroy {
|
|
|
2916
3448
|
reasoningMessageComponent: _angular_core.InputSignal<Type<any> | undefined>;
|
|
2917
3449
|
reasoningMessageTemplate: _angular_core.InputSignal<TemplateRef<any> | undefined>;
|
|
2918
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>;
|
|
2919
3454
|
messageViewChildrenComponent: _angular_core.InputSignal<Type<any> | undefined>;
|
|
2920
3455
|
messageViewChildrenTemplate: _angular_core.InputSignal<TemplateRef<any> | undefined>;
|
|
2921
3456
|
messageViewChildrenClass: _angular_core.InputSignal<string | undefined>;
|
|
2922
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>;
|
|
2923
3467
|
scrollToBottomButton: _angular_core.InputSignal<any>;
|
|
2924
3468
|
scrollToBottomButtonClass: _angular_core.InputSignal<string | undefined>;
|
|
2925
3469
|
assistantMessageThumbsUp: _angular_core.OutputEmitterRef<{
|
|
@@ -2943,18 +3487,19 @@ declare class CopilotChatViewScrollView implements AfterViewInit, OnDestroy {
|
|
|
2943
3487
|
scrollContainer?: ElementRef<HTMLElement>;
|
|
2944
3488
|
contentContainer?: ElementRef<HTMLElement>;
|
|
2945
3489
|
stickToBottomDirective?: StickToBottom;
|
|
3490
|
+
private readonly scrollElement;
|
|
3491
|
+
/** Tracks the position for the button when `autoScroll` is off. */
|
|
3492
|
+
private manualScroll?;
|
|
2946
3493
|
protected readonly defaultMessageViewComponent: typeof CopilotChatMessageView;
|
|
2947
3494
|
protected readonly defaultScrollToBottomButtonComponent: typeof CopilotChatViewScrollToBottomButton;
|
|
2948
3495
|
protected hasMounted: _angular_core.WritableSignal<boolean>;
|
|
2949
3496
|
protected showScrollButton: _angular_core.WritableSignal<boolean>;
|
|
2950
3497
|
protected isAtBottom: _angular_core.WritableSignal<boolean>;
|
|
3498
|
+
private readonly viewState;
|
|
2951
3499
|
protected hasSuggestions: _angular_core.Signal<boolean>;
|
|
2952
3500
|
protected paddingBottom: _angular_core.Signal<number>;
|
|
2953
3501
|
protected computedClass: _angular_core.Signal<string>;
|
|
2954
|
-
private destroy$;
|
|
2955
|
-
private scrollPositionService;
|
|
2956
3502
|
constructor();
|
|
2957
|
-
ngAfterViewInit(): void;
|
|
2958
3503
|
/**
|
|
2959
3504
|
* Handle isAtBottom change from StickToBottom directive
|
|
2960
3505
|
*/
|
|
@@ -2967,7 +3512,6 @@ declare class CopilotChatViewScrollView implements AfterViewInit, OnDestroy {
|
|
|
2967
3512
|
* Scroll to bottom for stick-to-bottom mode
|
|
2968
3513
|
*/
|
|
2969
3514
|
scrollToBottomFromStick(): void;
|
|
2970
|
-
ngOnDestroy(): void;
|
|
2971
3515
|
scrollToBottomOutputs: {
|
|
2972
3516
|
clicked: () => void;
|
|
2973
3517
|
};
|
|
@@ -2978,20 +3522,19 @@ declare class CopilotChatViewScrollView implements AfterViewInit, OnDestroy {
|
|
|
2978
3522
|
scrollToBottomContext(): any;
|
|
2979
3523
|
scrollToBottomFromStickContext(): any;
|
|
2980
3524
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CopilotChatViewScrollView, never>;
|
|
2981
|
-
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>;
|
|
2982
3526
|
}
|
|
2983
3527
|
|
|
2984
3528
|
/**
|
|
2985
|
-
* Feather
|
|
2986
|
-
*
|
|
2987
|
-
*
|
|
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.
|
|
2988
3532
|
*/
|
|
2989
3533
|
declare class CopilotChatViewFeather {
|
|
2990
3534
|
inputClass: _angular_core.InputSignal<string | undefined>;
|
|
2991
3535
|
style: _angular_core.InputSignal<{
|
|
2992
3536
|
[key: string]: any;
|
|
2993
3537
|
} | undefined>;
|
|
2994
|
-
get computedClass(): string;
|
|
2995
3538
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CopilotChatViewFeather, never>;
|
|
2996
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>;
|
|
2997
3540
|
}
|
|
@@ -3004,7 +3547,7 @@ declare class CopilotChatViewFeather {
|
|
|
3004
3547
|
declare class CopilotChatViewDisclaimer {
|
|
3005
3548
|
inputClass: _angular_core.InputSignal<string | undefined>;
|
|
3006
3549
|
text: _angular_core.InputSignal<string | undefined>;
|
|
3007
|
-
readonly labels:
|
|
3550
|
+
readonly labels: _copilotkit_core.CopilotChatLabels;
|
|
3008
3551
|
get disclaimerText(): string;
|
|
3009
3552
|
get computedClass(): string;
|
|
3010
3553
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CopilotChatViewDisclaimer, never>;
|
|
@@ -3048,7 +3591,7 @@ declare class CopilotChatViewInputContainer extends ElementRef {
|
|
|
3048
3591
|
declare class CopilotChatView implements OnInit, OnChanges {
|
|
3049
3592
|
private handlers;
|
|
3050
3593
|
protected readonly chatState: ChatState | null;
|
|
3051
|
-
protected readonly UploadIcon: CopilotIconData;
|
|
3594
|
+
protected readonly UploadIcon: _copilotkit_core.CopilotIconData;
|
|
3052
3595
|
messages: _angular_core.InputSignal<Message[]>;
|
|
3053
3596
|
/** Current agent state forwarded to message-view extension slots. */
|
|
3054
3597
|
state: _angular_core.InputSignal<unknown>;
|
|
@@ -3056,15 +3599,32 @@ declare class CopilotChatView implements OnInit, OnChanges {
|
|
|
3056
3599
|
autoScroll: _angular_core.InputSignal<boolean>;
|
|
3057
3600
|
showCursor: _angular_core.InputSignal<boolean>;
|
|
3058
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>;
|
|
3059
3611
|
messageViewComponent: _angular_core.InputSignal<Type<any> | undefined>;
|
|
3060
3612
|
messageViewTemplate: _angular_core.InputSignal<TemplateRef<any> | undefined>;
|
|
3061
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>;
|
|
3062
3619
|
assistantMessageComponent: _angular_core.InputSignal<Type<any> | undefined>;
|
|
3063
3620
|
assistantMessageTemplate: _angular_core.InputSignal<TemplateRef<any> | undefined>;
|
|
3064
3621
|
assistantMessageClass: _angular_core.InputSignal<string | undefined>;
|
|
3065
3622
|
reasoningMessageComponent: _angular_core.InputSignal<Type<any> | undefined>;
|
|
3066
3623
|
reasoningMessageTemplate: _angular_core.InputSignal<TemplateRef<any> | undefined>;
|
|
3067
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>;
|
|
3068
3628
|
messageViewChildrenComponent: _angular_core.InputSignal<Type<any> | undefined>;
|
|
3069
3629
|
messageViewChildrenTemplate: _angular_core.InputSignal<TemplateRef<any> | undefined>;
|
|
3070
3630
|
messageViewChildrenClass: _angular_core.InputSignal<string | undefined>;
|
|
@@ -3120,7 +3680,8 @@ declare class CopilotChatView implements OnInit, OnChanges {
|
|
|
3120
3680
|
protected readonly defaultInputComponent: typeof CopilotChatInput;
|
|
3121
3681
|
protected readonly defaultFeatherComponent: typeof CopilotChatViewFeather;
|
|
3122
3682
|
protected readonly defaultDisclaimerComponent: typeof CopilotChatViewDisclaimer;
|
|
3123
|
-
protected readonly labels:
|
|
3683
|
+
protected readonly labels: _copilotkit_core.CopilotChatLabels;
|
|
3684
|
+
protected readonly welcomeLayout: "default" | "popup" | "sidebar";
|
|
3124
3685
|
protected messagesValue: _angular_core.Signal<Message[]>;
|
|
3125
3686
|
protected autoScrollSignal: _angular_core.Signal<boolean>;
|
|
3126
3687
|
protected showCursorSignal: _angular_core.Signal<boolean>;
|
|
@@ -3130,8 +3691,6 @@ declare class CopilotChatView implements OnInit, OnChanges {
|
|
|
3130
3691
|
protected readonly inputContainerHeight: _angular_core.Signal<number>;
|
|
3131
3692
|
protected readonly isResizing: _angular_core.Signal<boolean>;
|
|
3132
3693
|
protected shouldShowWelcomeScreen: _angular_core.Signal<boolean>;
|
|
3133
|
-
protected computedClass: _angular_core.Signal<string>;
|
|
3134
|
-
protected dropOverlayClass: _angular_core.Signal<string>;
|
|
3135
3694
|
protected messageViewSlot: _angular_core.Signal<Type<any> | TemplateRef<any> | undefined>;
|
|
3136
3695
|
protected scrollViewSlot: _angular_core.Signal<Type<any> | TemplateRef<any> | undefined>;
|
|
3137
3696
|
protected scrollToBottomButtonSlot: _angular_core.Signal<Type<any> | TemplateRef<any> | undefined>;
|
|
@@ -3150,12 +3709,16 @@ declare class CopilotChatView implements OnInit, OnChanges {
|
|
|
3150
3709
|
agentId: string | undefined;
|
|
3151
3710
|
messageView: Type<any> | TemplateRef<any> | undefined;
|
|
3152
3711
|
messageViewClass: string | undefined;
|
|
3712
|
+
toolCallDisplay: CopilotChatToolCallDisplay;
|
|
3153
3713
|
assistantMessageComponent: Type<any> | undefined;
|
|
3154
3714
|
assistantMessageTemplate: TemplateRef<any> | undefined;
|
|
3155
3715
|
assistantMessageClass: string | undefined;
|
|
3156
3716
|
reasoningMessageComponent: Type<any> | undefined;
|
|
3157
3717
|
reasoningMessageTemplate: TemplateRef<any> | undefined;
|
|
3158
3718
|
reasoningMessageClass: string | undefined;
|
|
3719
|
+
workSummaryComponent: Type<unknown> | undefined;
|
|
3720
|
+
workSummaryTemplate: TemplateRef<unknown> | undefined;
|
|
3721
|
+
workSummaryClass: string | undefined;
|
|
3159
3722
|
messageViewChildrenComponent: Type<any> | undefined;
|
|
3160
3723
|
messageViewChildrenTemplate: TemplateRef<any> | undefined;
|
|
3161
3724
|
messageViewChildrenClass: string | undefined;
|
|
@@ -3180,7 +3743,7 @@ declare class CopilotChatView implements OnInit, OnChanges {
|
|
|
3180
3743
|
ngOnInit(): void;
|
|
3181
3744
|
ngOnChanges(): void;
|
|
3182
3745
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CopilotChatView, never>;
|
|
3183
|
-
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>;
|
|
3184
3747
|
}
|
|
3185
3748
|
|
|
3186
3749
|
/**
|
|
@@ -3194,25 +3757,17 @@ declare class CopilotChatView implements OnInit, OnChanges {
|
|
|
3194
3757
|
* first message from the welcome screen — and torn down with it.
|
|
3195
3758
|
*
|
|
3196
3759
|
* Measurement is platform-driven: afterNextRender fires once the slot's
|
|
3197
|
-
* dynamically created content is in the DOM (and never during SSR), and
|
|
3198
|
-
*
|
|
3199
|
-
* 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.
|
|
3200
3763
|
*/
|
|
3201
3764
|
declare class CopilotChatViewInputMeasure {
|
|
3202
3765
|
private readonly host;
|
|
3203
|
-
private readonly resizeObserverService;
|
|
3204
3766
|
private readonly destroyRef;
|
|
3205
|
-
/**
|
|
3206
|
-
* Root element of the input container component — its absolutely
|
|
3207
|
-
* positioned overlay wrapper — once it has been rendered into the slot.
|
|
3208
|
-
* Custom input containers without that element are left unmeasured.
|
|
3209
|
-
*/
|
|
3210
|
-
private readonly target;
|
|
3211
|
-
private readonly state;
|
|
3212
3767
|
/** Measured height of the input container in px; 0 until first laid out. */
|
|
3213
|
-
readonly height: _angular_core.
|
|
3768
|
+
readonly height: _angular_core.WritableSignal<number>;
|
|
3214
3769
|
/** True while the input container is resizing, false once it has settled. */
|
|
3215
|
-
readonly resizing: _angular_core.
|
|
3770
|
+
readonly resizing: _angular_core.WritableSignal<boolean>;
|
|
3216
3771
|
constructor();
|
|
3217
3772
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CopilotChatViewInputMeasure, never>;
|
|
3218
3773
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<CopilotChatViewInputMeasure, "[copilotChatViewInputMeasure]", never, {}, {}, never, never, true, never>;
|
|
@@ -3224,6 +3779,12 @@ declare class CopilotChatViewInputMeasure {
|
|
|
3224
3779
|
interface CopilotChatViewProps {
|
|
3225
3780
|
messages?: Message[];
|
|
3226
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;
|
|
3227
3788
|
messageViewComponent?: Type<any>;
|
|
3228
3789
|
messageViewTemplate?: TemplateRef<any>;
|
|
3229
3790
|
messageViewClass?: string;
|
|
@@ -3262,6 +3823,53 @@ interface CopilotChatViewLayoutContext {
|
|
|
3262
3823
|
disclaimer: any;
|
|
3263
3824
|
}
|
|
3264
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
|
+
|
|
3265
3873
|
/**
|
|
3266
3874
|
* Structural directive that captures a per-row template for projection into
|
|
3267
3875
|
* the `<copilotkit-threads-drawer>` element as light-DOM children with
|
|
@@ -3296,7 +3904,7 @@ declare class CopilotThreadsDrawerRow {
|
|
|
3296
3904
|
* Thread list state is fetched from CopilotKit Intelligence via
|
|
3297
3905
|
* {@link injectThreads} and pushed onto the element's JS properties via an
|
|
3298
3906
|
* `effect`, following the imperative property-assignment pattern used elsewhere
|
|
3299
|
-
* in this package
|
|
3907
|
+
* in this package.
|
|
3300
3908
|
*
|
|
3301
3909
|
* DOM events emitted by the element are routed back to the chat configuration
|
|
3302
3910
|
* and thread mutation methods via declarative Angular event bindings.
|
|
@@ -3395,32 +4003,12 @@ declare class CopilotThreadsDrawer {
|
|
|
3395
4003
|
* 3. {@link DEFAULT_AGENT_ID}.
|
|
3396
4004
|
*/
|
|
3397
4005
|
protected readonly resolvedAgentId: _angular_core.Signal<string>;
|
|
3398
|
-
|
|
3399
|
-
* Normalized license context derived from Core's structured and legacy
|
|
3400
|
-
* Runtime authority, with the same precedence as the React provider.
|
|
3401
|
-
*/
|
|
3402
|
-
private readonly licenseContext;
|
|
3403
|
-
/**
|
|
3404
|
-
* Two-pronged license gate, mirroring the React wrapper. `checkFeature` fails
|
|
3405
|
-
* OPEN (returns true) when no license is configured, so it cannot by itself
|
|
3406
|
-
* detect the no-license case; we therefore also require a positive
|
|
3407
|
-
* license-present signal. Only a resolved `valid`/`expiring` status counts as
|
|
3408
|
-
* present — a resolved `none`/`expired`/`invalid` gates the drawer to the
|
|
3409
|
-
* locked view. `unknown` is an unrecovered retryable entitlement lookup, not
|
|
3410
|
-
* a settled negative: fetch the list and let the threads endpoint decide.
|
|
3411
|
-
*/
|
|
4006
|
+
private readonly threadsLicense;
|
|
3412
4007
|
protected readonly licensed: _angular_core.Signal<boolean>;
|
|
3413
|
-
/**
|
|
3414
|
-
* Whether the runtime has not yet reported a license status. The status is
|
|
3415
|
-
* `null` until the first `/info` response lands; treat that window as
|
|
3416
|
-
* "not yet unlicensed" — show the loading state, never the locked view — so a
|
|
3417
|
-
* licensed drawer never flashes (or strands) the Upgrade CTA mid-resolution.
|
|
3418
|
-
*/
|
|
3419
4008
|
protected readonly licensePending: _angular_core.Signal<boolean>;
|
|
3420
|
-
/** Live thread list from CopilotKit Intelligence for the resolved agent. */
|
|
3421
4009
|
protected readonly threads: _copilotkit_angular.InjectThreadsResult;
|
|
3422
4010
|
/** Thread records mapped to the element's {@link DrawerThread} shape. */
|
|
3423
|
-
protected readonly drawerThreads: _angular_core.Signal<DrawerThread[]>;
|
|
4011
|
+
protected readonly drawerThreads: _angular_core.Signal<_copilotkit_core.ɵDrawerThread[]>;
|
|
3424
4012
|
/**
|
|
3425
4013
|
* User-facing error message from the filtered list error signal, or `null`
|
|
3426
4014
|
* when there is no error. Uses `listError` (not `error`) so developer/config
|
|
@@ -3455,15 +4043,7 @@ declare class CopilotThreadsDrawer {
|
|
|
3455
4043
|
*/
|
|
3456
4044
|
protected readonly drawerOpen: _angular_core.Signal<boolean>;
|
|
3457
4045
|
constructor();
|
|
3458
|
-
|
|
3459
|
-
* Handles the `thread-selected` event from the drawer element.
|
|
3460
|
-
*
|
|
3461
|
-
* When a `threadSelectHandler` override is provided by the host, it is called
|
|
3462
|
-
* exclusively. Otherwise, the ambient chat configuration is driven directly so
|
|
3463
|
-
* a bare `<copilot-threads-drawer>` works without any host wiring.
|
|
3464
|
-
*
|
|
3465
|
-
* @param event - The raw DOM event; cast to `CustomEvent<ThreadSelectedDetail>` to extract `threadId`.
|
|
3466
|
-
*/
|
|
4046
|
+
private readonly actions;
|
|
3467
4047
|
protected onThreadSelected(event: Event): void;
|
|
3468
4048
|
/**
|
|
3469
4049
|
* Handles the `open-change` event from the drawer element.
|
|
@@ -3475,52 +4055,10 @@ declare class CopilotThreadsDrawer {
|
|
|
3475
4055
|
* @param event - The raw DOM event; cast to `CustomEvent<OpenChangeDetail>` to extract `open`.
|
|
3476
4056
|
*/
|
|
3477
4057
|
protected onOpenChange(event: Event): void;
|
|
3478
|
-
/**
|
|
3479
|
-
* Handles the `new-thread` event from the drawer element.
|
|
3480
|
-
*
|
|
3481
|
-
* Always resets the core thread store to a fresh, non-explicit client-side
|
|
3482
|
-
* thread first. When a `newThreadHandler` override is provided by the host,
|
|
3483
|
-
* it is called exclusively. Otherwise, the ambient chat configuration is
|
|
3484
|
-
* driven directly so a bare `<copilot-threads-drawer>` works without any host wiring.
|
|
3485
|
-
*/
|
|
3486
4058
|
protected onNewThread(): void;
|
|
3487
|
-
/**
|
|
3488
|
-
* Handles the `archive` event from the drawer element.
|
|
3489
|
-
*
|
|
3490
|
-
* Delegates to the threads mutation and logs any failure to the console.
|
|
3491
|
-
*
|
|
3492
|
-
* @param event - The raw DOM event; cast to `CustomEvent<ArchiveDetail>` to extract `threadId`.
|
|
3493
|
-
*/
|
|
3494
4059
|
protected onArchive(event: Event): void;
|
|
3495
|
-
/**
|
|
3496
|
-
* Handles the `unarchive` event from the drawer element.
|
|
3497
|
-
*
|
|
3498
|
-
* Delegates to the threads mutation and logs any failure to the console.
|
|
3499
|
-
*
|
|
3500
|
-
* @param event - The raw DOM event; cast to `CustomEvent<UnarchiveDetail>` to extract `threadId`.
|
|
3501
|
-
*/
|
|
3502
4060
|
protected onUnarchive(event: Event): void;
|
|
3503
|
-
/**
|
|
3504
|
-
* Handles the `delete` event from the drawer element.
|
|
3505
|
-
*
|
|
3506
|
-
* Deleting the active thread resets to a fresh, non-explicit thread so the
|
|
3507
|
-
* user is not stranded on a now-gone conversation. Archiving the active
|
|
3508
|
-
* thread keeps the user viewing it.
|
|
3509
|
-
*
|
|
3510
|
-
* The core `threads.startNewThread()` reset is always called when the deleted
|
|
3511
|
-
* thread was active. When a `newThreadHandler` override is provided by the
|
|
3512
|
-
* host, it is called exclusively; otherwise the ambient chat configuration is
|
|
3513
|
-
* driven directly.
|
|
3514
|
-
*
|
|
3515
|
-
* @param event - The raw DOM event; cast to `CustomEvent<DeleteDetail>` to extract `threadId`.
|
|
3516
|
-
*/
|
|
3517
4061
|
protected onDelete(event: Event): void;
|
|
3518
|
-
/**
|
|
3519
|
-
* Handles the `filter-change` event from the drawer element.
|
|
3520
|
-
*
|
|
3521
|
-
* The element owns the Active/All filter; on change we refetch so the list
|
|
3522
|
-
* reflects the server.
|
|
3523
|
-
*/
|
|
3524
4062
|
protected onFilterChange(): void;
|
|
3525
4063
|
/**
|
|
3526
4064
|
* Handles the `collapse-change` event from the drawer element — re-emits the
|
|
@@ -3530,20 +4068,7 @@ declare class CopilotThreadsDrawer {
|
|
|
3530
4068
|
* @param event - The raw DOM event; cast to `CustomEvent<CollapseChangeDetail>` to extract `collapsed`.
|
|
3531
4069
|
*/
|
|
3532
4070
|
protected onCollapseChange(event: Event): void;
|
|
3533
|
-
/**
|
|
3534
|
-
* Handles the `retry` event from the drawer element.
|
|
3535
|
-
*
|
|
3536
|
-
* `scope` distinguishes an initial fetch retry from a fetch-more retry so
|
|
3537
|
-
* the correct pagination operation is invoked.
|
|
3538
|
-
*
|
|
3539
|
-
* @param event - The raw DOM event; cast to `CustomEvent<RetryDetail>` to extract `scope`.
|
|
3540
|
-
*/
|
|
3541
4071
|
protected onRetry(event: Event): void;
|
|
3542
|
-
/**
|
|
3543
|
-
* Handles the `load-more` event from the drawer element — advances pagination
|
|
3544
|
-
* by fetching the next page. No-op when there is no next page (the element
|
|
3545
|
-
* only surfaces the "Load more" control while `hasMoreThreads` is true).
|
|
3546
|
-
*/
|
|
3547
4072
|
protected onLoadMore(): void;
|
|
3548
4073
|
/**
|
|
3549
4074
|
* Handles the `licensed` event from the drawer element (Upgrade CTA click).
|
|
@@ -3560,23 +4085,27 @@ declare class CopilotThreadsDrawer {
|
|
|
3560
4085
|
/** Accessible, responsive floating chat surface with an explicit open model. */
|
|
3561
4086
|
declare class CopilotPopup {
|
|
3562
4087
|
readonly open: _angular_core.ModelSignal<boolean>;
|
|
3563
|
-
|
|
4088
|
+
/** The header title. Default: `labels.modalHeaderTitle`. */
|
|
4089
|
+
readonly title: _angular_core.InputSignal<string | undefined>;
|
|
3564
4090
|
readonly width: _angular_core.InputSignal<string | number>;
|
|
3565
4091
|
readonly height: _angular_core.InputSignal<string | number>;
|
|
3566
4092
|
readonly clickOutsideToClose: _angular_core.InputSignal<boolean>;
|
|
3567
4093
|
readonly chatComponent: _angular_core.InputSignal<Type<unknown>>;
|
|
3568
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>;
|
|
3569
4099
|
protected readonly dialogId: string;
|
|
3570
4100
|
protected readonly titleId: string;
|
|
3571
4101
|
protected readonly resolvedWidth: _angular_core.Signal<string>;
|
|
3572
4102
|
protected readonly resolvedHeight: _angular_core.Signal<string>;
|
|
3573
4103
|
private readonly launcher;
|
|
3574
4104
|
private readonly initialFocus;
|
|
4105
|
+
private readonly dialog;
|
|
3575
4106
|
constructor();
|
|
3576
4107
|
protected toggle(): void;
|
|
3577
|
-
protected closeFromBackdrop(): void;
|
|
3578
4108
|
protected close(): void;
|
|
3579
|
-
private focusModal;
|
|
3580
4109
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CopilotPopup, never>;
|
|
3581
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>;
|
|
3582
4111
|
}
|
|
@@ -3589,30 +4118,32 @@ declare class CopilotSidebar {
|
|
|
3589
4118
|
readonly mode: _angular_core.InputSignal<CopilotSidebarMode>;
|
|
3590
4119
|
readonly position: _angular_core.InputSignal<CopilotSidebarPosition>;
|
|
3591
4120
|
readonly width: _angular_core.InputSignal<string | number>;
|
|
3592
|
-
|
|
4121
|
+
/** The header title. Default: `labels.modalHeaderTitle`. */
|
|
4122
|
+
readonly title: _angular_core.InputSignal<string | undefined>;
|
|
3593
4123
|
readonly clickOutsideToClose: _angular_core.InputSignal<boolean>;
|
|
3594
4124
|
readonly chatComponent: _angular_core.InputSignal<Type<unknown>>;
|
|
3595
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>;
|
|
3596
4130
|
protected readonly sidebarId: string;
|
|
3597
4131
|
protected readonly titleId: string;
|
|
3598
4132
|
protected readonly resolvedWidth: _angular_core.Signal<string>;
|
|
3599
4133
|
protected readonly isCompact: _angular_core.WritableSignal<boolean>;
|
|
3600
4134
|
protected readonly isModal: _angular_core.Signal<boolean>;
|
|
3601
4135
|
protected readonly dockAccepted: _angular_core.WritableSignal<boolean>;
|
|
3602
|
-
private readonly owner;
|
|
3603
|
-
private readonly registry;
|
|
3604
4136
|
private readonly document;
|
|
3605
4137
|
private readonly isBrowser;
|
|
3606
4138
|
private readonly destroyRef;
|
|
3607
4139
|
private readonly launcher;
|
|
3608
4140
|
private readonly initialFocus;
|
|
3609
|
-
private
|
|
4141
|
+
private readonly dialog;
|
|
4142
|
+
/** Core's page-margin owner for the docked mode, as in React and Vue. */
|
|
4143
|
+
private readonly dock;
|
|
3610
4144
|
constructor();
|
|
3611
4145
|
protected toggle(): void;
|
|
3612
|
-
protected closeFromBackdrop(): void;
|
|
3613
4146
|
protected close(): void;
|
|
3614
|
-
private releaseDock;
|
|
3615
|
-
private focusModal;
|
|
3616
4147
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CopilotSidebar, never>;
|
|
3617
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>;
|
|
3618
4149
|
}
|
|
@@ -3648,179 +4179,34 @@ declare class CopilotActivity {
|
|
|
3648
4179
|
#private;
|
|
3649
4180
|
/** The activity message to render. */
|
|
3650
4181
|
readonly message: _angular_core.InputSignal<ActivityMessage$1>;
|
|
3651
|
-
/**
|
|
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
|
+
*/
|
|
3652
4186
|
readonly agentId: _angular_core.InputSignal<string | undefined>;
|
|
3653
4187
|
protected resolveRender(message: ActivityMessage$1): ActivityRender | undefined;
|
|
3654
4188
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CopilotActivity, never>;
|
|
3655
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>;
|
|
3656
4190
|
}
|
|
3657
4191
|
|
|
3658
|
-
|
|
3659
|
-
|
|
3660
|
-
declare class CopilotA2UIActivityRenderer implements ActivityRenderer<unknown> {
|
|
3661
|
-
readonly activityType: _angular_core.InputSignal<string>;
|
|
3662
|
-
readonly content: _angular_core.InputSignal<unknown>;
|
|
3663
|
-
readonly message: _angular_core.InputSignal<ActivityMessage>;
|
|
3664
|
-
readonly agent: _angular_core.InputSignal<AbstractAgent | undefined>;
|
|
3665
|
-
protected readonly config: _copilotkit_angular.CopilotKitConfig;
|
|
3666
|
-
private readonly platformId;
|
|
3667
|
-
private readonly zone;
|
|
3668
|
-
protected readonly operations: _angular_core.Signal<A2UIOperation[]>;
|
|
3669
|
-
protected readonly hasOperations: _angular_core.Signal<boolean>;
|
|
3670
|
-
protected readonly surfaceReady: _angular_core.WritableSignal<boolean>;
|
|
3671
|
-
protected readonly loaderContent: _angular_core.WritableSignal<unknown>;
|
|
3672
|
-
constructor();
|
|
3673
|
-
protected handleRendered(): void;
|
|
3674
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CopilotA2UIActivityRenderer, never>;
|
|
3675
|
-
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>;
|
|
3676
|
-
}
|
|
3677
|
-
|
|
3678
|
-
/**
|
|
3679
|
-
* Presentational loading placeholder shown while an A2UI tool call is still
|
|
3680
|
-
* streaming. Renders an animated skeleton card whose rows reveal as the
|
|
3681
|
-
* estimated token count climbs through `phase`.
|
|
3682
|
-
*/
|
|
3683
|
-
declare class CopilotA2UIProgress {
|
|
3684
|
-
readonly phase: _angular_core.InputSignal<number>;
|
|
3685
|
-
readonly tokens: _angular_core.InputSignal<number>;
|
|
3686
|
-
readonly label: _angular_core.InputSignal<string>;
|
|
3687
|
-
protected topbarBarClass(): string;
|
|
3688
|
-
protected rowClass(phase: number, delayClass: string): string;
|
|
3689
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CopilotA2UIProgress, never>;
|
|
3690
|
-
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>;
|
|
3691
|
-
}
|
|
3692
|
-
|
|
3693
|
-
type A2UIDebugExposure = "hidden" | "collapsed" | "verbose";
|
|
3694
|
-
type A2UILifecycleStatus = "building" | "retrying" | "failed";
|
|
3695
|
-
interface A2UILifecycleContent {
|
|
3696
|
-
status: A2UILifecycleStatus;
|
|
3697
|
-
attempt?: number;
|
|
3698
|
-
maxAttempts?: number;
|
|
3699
|
-
progressTokens?: number;
|
|
3700
|
-
error?: string;
|
|
3701
|
-
errors?: unknown[];
|
|
3702
|
-
attempts?: unknown[];
|
|
3703
|
-
debugExposure?: A2UIDebugExposure;
|
|
3704
|
-
}
|
|
3705
|
-
/** Read only the server-owned A2UI lifecycle fields from activity content. */
|
|
3706
|
-
declare function readA2UILifecycleContent(content: unknown): A2UILifecycleContent;
|
|
3707
|
-
/** Pre-paint building, retry, and failure UI for a stable A2UI activity. */
|
|
3708
|
-
declare class CopilotA2UIRecovery {
|
|
3709
|
-
#private;
|
|
3710
|
-
readonly content: _angular_core.InputSignal<unknown>;
|
|
3711
|
-
readonly options: _angular_core.InputSignal<A2UIRecoveryOptions | undefined>;
|
|
3712
|
-
readonly lifecycle: _angular_core.Signal<A2UILifecycleContent>;
|
|
3713
|
-
readonly retryRevealed: _angular_core.WritableSignal<boolean>;
|
|
3714
|
-
readonly debugExposure: _angular_core.Signal<A2UIDebugExposure>;
|
|
3715
|
-
readonly label: _angular_core.Signal<string>;
|
|
3716
|
-
readonly phase: _angular_core.Signal<0 | 1 | 2 | 3>;
|
|
3717
|
-
readonly failureDiagnostics: _angular_core.Signal<string>;
|
|
3718
|
-
readonly retryDiagnostics: _angular_core.Signal<string>;
|
|
3719
|
-
constructor();
|
|
3720
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CopilotA2UIRecovery, never>;
|
|
3721
|
-
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>;
|
|
3722
|
-
}
|
|
3723
|
-
|
|
3724
|
-
declare const RENDER_A2UI_TOOL_NAME = "render_a2ui";
|
|
3725
|
-
declare const AGUI_SEND_STATE_SNAPSHOT_TOOL_NAME = "AGUISendStateSnapshot";
|
|
3726
|
-
declare const RenderA2UIArgsSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
3727
|
-
interface RenderA2UIArgs extends Record<string, unknown> {
|
|
3728
|
-
items?: unknown[];
|
|
3729
|
-
components?: unknown[];
|
|
3730
|
-
snapshot?: unknown;
|
|
3731
|
-
}
|
|
3732
|
-
|
|
3733
|
-
declare class CopilotA2UIToolRenderer implements ToolRenderer<RenderA2UIArgs> {
|
|
3734
|
-
readonly toolCall: _angular_core.InputSignal<AngularToolCall<RenderA2UIArgs>>;
|
|
3735
|
-
readonly agent: _angular_core.InputSignal<AbstractAgent | undefined>;
|
|
3736
|
-
protected readonly renderedOperations: _angular_core.Signal<A2UIOperation[]>;
|
|
3737
|
-
protected readonly tokens: _angular_core.Signal<number>;
|
|
3738
|
-
protected readonly phase: _angular_core.Signal<0 | 1 | 2 | 3>;
|
|
3739
|
-
protected readonly isHidden: _angular_core.Signal<boolean>;
|
|
3740
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CopilotA2UIToolRenderer, never>;
|
|
3741
|
-
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>;
|
|
3742
|
-
}
|
|
3743
|
-
|
|
3744
|
-
type WebsandboxConstructor = typeof Websandbox;
|
|
3745
|
-
|
|
3746
|
-
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>;
|
|
3747
4194
|
declare class CopilotOpenGenerativeUIRenderer implements OnChanges {
|
|
3748
|
-
readonly content: _angular_core.InputSignal<
|
|
3749
|
-
html?: string[] | undefined;
|
|
3750
|
-
initialHeight?: number | undefined;
|
|
3751
|
-
generating?: boolean | undefined;
|
|
3752
|
-
css?: string | undefined;
|
|
3753
|
-
cssComplete?: boolean | undefined;
|
|
3754
|
-
htmlComplete?: boolean | undefined;
|
|
3755
|
-
jsFunctions?: string | undefined;
|
|
3756
|
-
jsFunctionsComplete?: boolean | undefined;
|
|
3757
|
-
jsExpressions?: string[] | undefined;
|
|
3758
|
-
jsExpressionsComplete?: boolean | undefined;
|
|
3759
|
-
}>;
|
|
4195
|
+
readonly content: _angular_core.InputSignal<OpenGenerativeUIContent>;
|
|
3760
4196
|
private readonly containerRef;
|
|
3761
|
-
private readonly
|
|
3762
|
-
|
|
3763
|
-
private readonly loadWebsandboxModule;
|
|
3764
|
-
private readonly throttledContent;
|
|
3765
|
-
private throttleTimer;
|
|
3766
|
-
private latestContent;
|
|
3767
|
-
private sandbox;
|
|
3768
|
-
private previewSandbox;
|
|
3769
|
-
private sandboxReady;
|
|
3770
|
-
private previewReady;
|
|
3771
|
-
private executedExpressionIndex;
|
|
3772
|
-
private pendingQueue;
|
|
3773
|
-
private jsFunctionsInjected;
|
|
3774
|
-
private heightMeasured;
|
|
3775
|
-
private autoHeight;
|
|
3776
|
-
private hasReceivedContent;
|
|
3777
|
-
protected readonly fullHtml: _angular_core.Signal<string | undefined>;
|
|
3778
|
-
protected readonly css: _angular_core.Signal<string | undefined>;
|
|
3779
|
-
protected readonly partialHtml: _angular_core.Signal<string | undefined>;
|
|
3780
|
-
protected readonly previewBody: _angular_core.Signal<string | undefined>;
|
|
3781
|
-
protected readonly previewStyles: _angular_core.Signal<string>;
|
|
3782
|
-
protected readonly hasPreview: _angular_core.Signal<boolean>;
|
|
4197
|
+
private readonly controller;
|
|
4198
|
+
protected readonly state: _angular_core.WritableSignal<_copilotkit_core.ɵOpenGenerativeUIState>;
|
|
3783
4199
|
protected readonly hasVisibleSandbox: _angular_core.Signal<boolean>;
|
|
3784
4200
|
protected readonly height: _angular_core.Signal<number>;
|
|
3785
|
-
protected readonly isGenerating: _angular_core.Signal<boolean>;
|
|
3786
|
-
private readonly renderState;
|
|
3787
4201
|
constructor();
|
|
3788
4202
|
/** Applies input updates synchronously before the matching render pass. */
|
|
3789
4203
|
ngOnChanges(): void;
|
|
3790
|
-
/** Commits content and synchronously removes stale sandbox DOM on restart. */
|
|
3791
|
-
private commitContent;
|
|
3792
|
-
private clearThrottle;
|
|
3793
|
-
private loadWebsandbox;
|
|
3794
|
-
private createLocalApi;
|
|
3795
|
-
private createPreviewSandbox;
|
|
3796
|
-
private updatePreviewSandbox;
|
|
3797
|
-
private reconcileSandboxState;
|
|
3798
|
-
private createFinalSandbox;
|
|
3799
|
-
private resetFinalRuntimeState;
|
|
3800
|
-
private injectJsFunctions;
|
|
3801
|
-
private executeNewExpressions;
|
|
3802
|
-
private runOrQueue;
|
|
3803
|
-
private measureFinalHeight;
|
|
3804
|
-
private styleIframe;
|
|
3805
|
-
private destroyPreviewSandbox;
|
|
3806
|
-
private destroyFinalSandbox;
|
|
3807
4204
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CopilotOpenGenerativeUIRenderer, never>;
|
|
3808
4205
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CopilotOpenGenerativeUIRenderer, "copilot-open-generative-ui-renderer", never, { "content": { "alias": "content"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
3809
4206
|
}
|
|
3810
4207
|
declare class CopilotOpenGenerativeUIActivityRenderer implements ActivityRenderer<OpenGenerativeUIContent> {
|
|
3811
4208
|
readonly activityType: _angular_core.InputSignal<string>;
|
|
3812
|
-
readonly content: _angular_core.InputSignal<
|
|
3813
|
-
html?: string[] | undefined;
|
|
3814
|
-
initialHeight?: number | undefined;
|
|
3815
|
-
generating?: boolean | undefined;
|
|
3816
|
-
css?: string | undefined;
|
|
3817
|
-
cssComplete?: boolean | undefined;
|
|
3818
|
-
htmlComplete?: boolean | undefined;
|
|
3819
|
-
jsFunctions?: string | undefined;
|
|
3820
|
-
jsFunctionsComplete?: boolean | undefined;
|
|
3821
|
-
jsExpressions?: string[] | undefined;
|
|
3822
|
-
jsExpressionsComplete?: boolean | undefined;
|
|
3823
|
-
}>;
|
|
4209
|
+
readonly content: _angular_core.InputSignal<OpenGenerativeUIContent>;
|
|
3824
4210
|
readonly message: _angular_core.InputSignal<ActivityMessage>;
|
|
3825
4211
|
readonly agent: _angular_core.InputSignal<AbstractAgent | undefined>;
|
|
3826
4212
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CopilotOpenGenerativeUIActivityRenderer, never>;
|
|
@@ -3828,25 +4214,14 @@ declare class CopilotOpenGenerativeUIActivityRenderer implements ActivityRendere
|
|
|
3828
4214
|
}
|
|
3829
4215
|
|
|
3830
4216
|
declare class CopilotOpenGenerativeUIToolRenderer implements ToolRenderer<GenerateSandboxedUiArgs> {
|
|
3831
|
-
|
|
3832
|
-
|
|
3833
|
-
|
|
3834
|
-
css?: string | undefined;
|
|
3835
|
-
jsFunctions?: string | undefined;
|
|
3836
|
-
jsExpressions?: string[] | undefined;
|
|
3837
|
-
placeholderMessages?: string[] | undefined;
|
|
3838
|
-
}>>;
|
|
3839
|
-
private readonly visibleMessageIndex;
|
|
3840
|
-
private readonly destroyRef;
|
|
3841
|
-
private previousMessageCount;
|
|
3842
|
-
private interval;
|
|
3843
|
-
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>;
|
|
3844
4220
|
constructor();
|
|
3845
|
-
private clearTimer;
|
|
3846
4221
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CopilotOpenGenerativeUIToolRenderer, never>;
|
|
3847
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>;
|
|
3848
4223
|
}
|
|
3849
4224
|
|
|
3850
|
-
export {
|
|
3851
|
-
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 };
|
|
3852
4227
|
//# sourceMappingURL=copilotkit-angular.d.ts.map
|