@threadplane/chat 0.0.46
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/CHANGELOG.md +11 -0
- package/COMMERCIAL-USE.md +26 -0
- package/LICENSE-COMMERCIAL.md +25 -0
- package/LICENSE.md +84 -0
- package/NOTICE.md +7 -0
- package/README.md +163 -0
- package/fesm2022/threadplane-chat-debug.mjs +1002 -0
- package/fesm2022/threadplane-chat-debug.mjs.map +1 -0
- package/fesm2022/threadplane-chat-testing.mjs +150 -0
- package/fesm2022/threadplane-chat-testing.mjs.map +1 -0
- package/fesm2022/threadplane-chat.mjs +11366 -0
- package/fesm2022/threadplane-chat.mjs.map +1 -0
- package/package.json +65 -0
- package/themes/default-dark.css +32 -0
- package/themes/default-light.css +36 -0
- package/themes/material-dark.css +38 -0
- package/themes/material-light.css +45 -0
- package/types/threadplane-chat-debug.d.ts +66 -0
- package/types/threadplane-chat-testing.d.ts +39 -0
- package/types/threadplane-chat.d.ts +2255 -0
|
@@ -0,0 +1,2255 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { InjectionToken, Signal, TemplateRef, Type, WritableSignal } from '@angular/core';
|
|
3
|
+
import * as _threadplane_render from '@threadplane/render';
|
|
4
|
+
import { AngularRegistry, RenderEvent, ViewRegistry, RenderViewEntry } from '@threadplane/render';
|
|
5
|
+
export { VIEW_REGISTRY, ViewRegistry, provideViews, toRenderRegistry, views, withViews, withoutViews } from '@threadplane/render';
|
|
6
|
+
import { Observable } from 'rxjs';
|
|
7
|
+
import * as _json_render_core from '@json-render/core';
|
|
8
|
+
import { Spec, StateStore } from '@json-render/core';
|
|
9
|
+
import { A2uiComponentDef, A2uiSurface, A2uiMessage, A2uiActionMessage } from '@threadplane/a2ui';
|
|
10
|
+
export { A2uiAction, A2uiActionContextEntry, A2uiActionMessage, A2uiChildren, A2uiClientDataModel, A2uiComponent, A2uiComponentDef, A2uiSurface, A2uiTheme, DynamicBoolean, DynamicNumber, DynamicString, isLiteralBoolean, isLiteralNumber, isLiteralString, isPathRef } from '@threadplane/a2ui';
|
|
11
|
+
import { PartialJsonParser } from '@cacheplane/partial-json';
|
|
12
|
+
import { BaseMessage } from '@langchain/core/messages';
|
|
13
|
+
import * as _cacheplane_partial_markdown from '@cacheplane/partial-markdown';
|
|
14
|
+
import { CitationDefinition, MarkdownDocumentNode, MarkdownNode, MarkdownParagraphNode, MarkdownHeadingNode, MarkdownBlockquoteNode, MarkdownListNode, MarkdownListItemNode, MarkdownCodeBlockNode, MarkdownThematicBreakNode, MarkdownTextNode, MarkdownEmphasisNode, MarkdownStrongNode, MarkdownStrikethroughNode, MarkdownInlineCodeNode, MarkdownLinkNode, MarkdownAutolinkNode, MarkdownImageNode, MarkdownSoftBreakNode, MarkdownHardBreakNode, MarkdownCitationReferenceNode, MarkdownTableNode, MarkdownTableRowNode, MarkdownTableCellNode } from '@cacheplane/partial-markdown';
|
|
15
|
+
import * as _threadplane_chat from '@threadplane/chat';
|
|
16
|
+
import { DomSanitizer, SafeHtml } from '@angular/platform-browser';
|
|
17
|
+
|
|
18
|
+
interface ChatConfig {
|
|
19
|
+
/** Shared render registry for consumers that read CHAT_CONFIG. */
|
|
20
|
+
renderRegistry?: AngularRegistry;
|
|
21
|
+
/** Shared AI avatar label for consumers that read CHAT_CONFIG (default: "A"). */
|
|
22
|
+
avatarLabel?: string;
|
|
23
|
+
/** Shared assistant display name for consumers that read CHAT_CONFIG (default: "Assistant"). */
|
|
24
|
+
assistantName?: string;
|
|
25
|
+
/** Signed license token from threadplane.ai. Optional; omitted in dev. */
|
|
26
|
+
license?: string;
|
|
27
|
+
/**
|
|
28
|
+
* @internal
|
|
29
|
+
* Test-only env hint override. Not part of the stable API.
|
|
30
|
+
*/
|
|
31
|
+
__licenseEnvHint?: {
|
|
32
|
+
isNoncommercial: boolean;
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* @internal
|
|
36
|
+
* Test-only public-key override. Defaults to the compile-time embedded
|
|
37
|
+
* `LICENSE_PUBLIC_KEY`. Not part of the stable API.
|
|
38
|
+
*/
|
|
39
|
+
__licensePublicKey?: Uint8Array;
|
|
40
|
+
}
|
|
41
|
+
declare const CHAT_CONFIG: InjectionToken<ChatConfig>;
|
|
42
|
+
declare function provideChat(config: ChatConfig): _angular_core.EnvironmentProviders;
|
|
43
|
+
|
|
44
|
+
type MessageTemplateType = 'human' | 'ai' | 'tool' | 'system' | 'function';
|
|
45
|
+
|
|
46
|
+
type ContentBlock = {
|
|
47
|
+
type: 'text';
|
|
48
|
+
text: string;
|
|
49
|
+
} | {
|
|
50
|
+
type: 'image';
|
|
51
|
+
url: string;
|
|
52
|
+
alt?: string;
|
|
53
|
+
} | {
|
|
54
|
+
type: 'tool_use';
|
|
55
|
+
id: string;
|
|
56
|
+
name: string;
|
|
57
|
+
args: unknown;
|
|
58
|
+
} | {
|
|
59
|
+
type: 'tool_result';
|
|
60
|
+
toolCallId: string;
|
|
61
|
+
result: unknown;
|
|
62
|
+
isError?: boolean;
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Provider-agnostic citation entry. Populated by adapters from message
|
|
67
|
+
* metadata (LangGraph additional_kwargs.citations, ag-ui STATE_DELTA at
|
|
68
|
+
* /citations/{messageId}). Pandoc-formatted [^id]: ... defs in message
|
|
69
|
+
* content remain in the markdown AST sidecar and are merged via
|
|
70
|
+
* CitationsResolverService at render time.
|
|
71
|
+
*/
|
|
72
|
+
interface Citation {
|
|
73
|
+
/** Stable id used to match `[^id]` markers in Pandoc-formatted content. */
|
|
74
|
+
id: string;
|
|
75
|
+
/** 1-based display order. Stable per-message. */
|
|
76
|
+
index: number;
|
|
77
|
+
title?: string;
|
|
78
|
+
url?: string;
|
|
79
|
+
snippet?: string;
|
|
80
|
+
/** Provider-specific extras (retrieval score, source type, etc.). */
|
|
81
|
+
extra?: Record<string, unknown>;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
type Role = 'user' | 'assistant' | 'system' | 'tool';
|
|
85
|
+
interface Message {
|
|
86
|
+
id: string;
|
|
87
|
+
role: Role;
|
|
88
|
+
/** Plain text, or a list of structured content blocks. */
|
|
89
|
+
content: string | ContentBlock[];
|
|
90
|
+
/** Present when role === 'tool'. */
|
|
91
|
+
toolCallId?: string;
|
|
92
|
+
/** Optional display/author name. */
|
|
93
|
+
name?: string;
|
|
94
|
+
/**
|
|
95
|
+
* Reasoning text emitted by the model before/alongside the visible
|
|
96
|
+
* response. Populated by adapters from {type:'reasoning'} or
|
|
97
|
+
* {type:'thinking'} content blocks (LangGraph) or REASONING_MESSAGE_*
|
|
98
|
+
* events (AG-UI). Always a plain string — provider-specific shape
|
|
99
|
+
* (encrypted blocks, multi-step summaries) is absorbed by the adapter
|
|
100
|
+
* and not surfaced here.
|
|
101
|
+
*/
|
|
102
|
+
reasoning?: string;
|
|
103
|
+
/**
|
|
104
|
+
* Wall-clock duration of the reasoning phase in milliseconds.
|
|
105
|
+
* Populated by the adapter when both start (first reasoning chunk) and
|
|
106
|
+
* end (first response-text chunk, or final canonical message) are
|
|
107
|
+
* known. Undefined when reasoning timing isn't available.
|
|
108
|
+
*/
|
|
109
|
+
reasoningDurationMs?: number;
|
|
110
|
+
/** Runtime-specific extras; do not rely on shape in portable code. */
|
|
111
|
+
extra?: Record<string, unknown>;
|
|
112
|
+
/** Provider-agnostic citation list. Populated by adapters. */
|
|
113
|
+
citations?: Citation[];
|
|
114
|
+
/**
|
|
115
|
+
* IDs of tool calls emitted BY this assistant message. Populated by
|
|
116
|
+
* adapters from provider-native fields (LangGraph: `tool_calls[].id`;
|
|
117
|
+
* Anthropic: `tool_use` content blocks). Used by `<chat-tool-calls>` to
|
|
118
|
+
* scope its rendering to a single message — otherwise it falls back to
|
|
119
|
+
* the agent's global toolCalls list, which renders duplicates across
|
|
120
|
+
* every AI message in a thread.
|
|
121
|
+
*/
|
|
122
|
+
toolCallIds?: string[];
|
|
123
|
+
}
|
|
124
|
+
declare function isUserMessage(m: Message): m is Message & {
|
|
125
|
+
role: 'user';
|
|
126
|
+
};
|
|
127
|
+
declare function isAssistantMessage(m: Message): m is Message & {
|
|
128
|
+
role: 'assistant';
|
|
129
|
+
};
|
|
130
|
+
declare function isToolMessage(m: Message): m is Message & {
|
|
131
|
+
role: 'tool';
|
|
132
|
+
};
|
|
133
|
+
declare function isSystemMessage(m: Message): m is Message & {
|
|
134
|
+
role: 'system';
|
|
135
|
+
};
|
|
136
|
+
|
|
137
|
+
type ToolCallStatus = 'pending' | 'running' | 'complete' | 'error';
|
|
138
|
+
interface ToolCall {
|
|
139
|
+
id: string;
|
|
140
|
+
name: string;
|
|
141
|
+
/** Arguments. May be partial while streaming (`status !== 'complete'`). */
|
|
142
|
+
args: unknown;
|
|
143
|
+
status: ToolCallStatus;
|
|
144
|
+
/** Present when status === 'complete' or 'error'. */
|
|
145
|
+
result?: unknown;
|
|
146
|
+
/** Optional error payload when status === 'error'. */
|
|
147
|
+
error?: unknown;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
type AgentStatus = 'idle' | 'running' | 'error';
|
|
151
|
+
|
|
152
|
+
interface AgentInterrupt {
|
|
153
|
+
/** Stable identifier for this interrupt instance. */
|
|
154
|
+
id: string;
|
|
155
|
+
/** Opaque payload the app renders. Runtime-specific shape. */
|
|
156
|
+
value: unknown;
|
|
157
|
+
/** True when the runtime supports resuming via `submit({ resume })`. */
|
|
158
|
+
resumable: boolean;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
type SubagentStatus = 'pending' | 'running' | 'complete' | 'error';
|
|
162
|
+
interface Subagent {
|
|
163
|
+
/** Tool call ID that spawned this subagent. */
|
|
164
|
+
toolCallId: string;
|
|
165
|
+
/** Optional human-readable name. */
|
|
166
|
+
name?: string;
|
|
167
|
+
status: Signal<SubagentStatus>;
|
|
168
|
+
messages: Signal<Message[]>;
|
|
169
|
+
state: Signal<Record<string, unknown>>;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* Render-state-store sync event. Adapters emit this when the runtime
|
|
174
|
+
* publishes a state-snapshot intended for the chat library's render store
|
|
175
|
+
* (used by generative UI and a2ui surfaces).
|
|
176
|
+
*/
|
|
177
|
+
interface AgentStateUpdateEvent {
|
|
178
|
+
readonly type: 'state_update';
|
|
179
|
+
readonly data: Record<string, unknown>;
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* Escape hatch for runtime-specific or user-defined events that do not
|
|
183
|
+
* (yet) have a well-known structured variant. `name` carries the runtime
|
|
184
|
+
* event name; `data` carries the payload verbatim.
|
|
185
|
+
*/
|
|
186
|
+
interface AgentCustomEvent {
|
|
187
|
+
readonly type: 'custom';
|
|
188
|
+
readonly name: string;
|
|
189
|
+
readonly data: unknown;
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* Discriminated union of events flowing on `Agent.events$`.
|
|
193
|
+
*
|
|
194
|
+
* Invariant: state lives on signals (`messages`, `status`, `toolCalls`,
|
|
195
|
+
* `state`, `interrupt`, `subagents`, `history`); events on `events$`
|
|
196
|
+
* carry only things that are not derivable from signals. New variants
|
|
197
|
+
* are added purely additively when patterns prove necessary.
|
|
198
|
+
*/
|
|
199
|
+
type AgentEvent = AgentStateUpdateEvent | AgentCustomEvent;
|
|
200
|
+
|
|
201
|
+
interface AgentSubmitInput {
|
|
202
|
+
/** New user message to append. May be combined with `resume` and/or `state` in the same submit call. */
|
|
203
|
+
message?: string | ContentBlock[];
|
|
204
|
+
/** Resume payload for an active interrupt. */
|
|
205
|
+
resume?: unknown;
|
|
206
|
+
/** State patch to merge before submitting (runtime-interpreted). */
|
|
207
|
+
state?: Record<string, unknown>;
|
|
208
|
+
}
|
|
209
|
+
interface AgentSubmitOptions {
|
|
210
|
+
signal?: AbortSignal;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* Runtime-neutral contract chat primitives consume.
|
|
215
|
+
*
|
|
216
|
+
* Implementations are produced by runtime adapters (e.g. a LangGraph or
|
|
217
|
+
* AG-UI adapter) or by user code for custom backends.
|
|
218
|
+
*
|
|
219
|
+
* `interrupt` and `subagents` are optional: runtimes that do not support these
|
|
220
|
+
* concepts should leave them undefined, and primitives that need them check
|
|
221
|
+
* presence and render a neutral fallback when absent.
|
|
222
|
+
*
|
|
223
|
+
* Invariant: state lives on signals; `events$` carries only things that are
|
|
224
|
+
* not derivable from signals.
|
|
225
|
+
*/
|
|
226
|
+
interface Agent {
|
|
227
|
+
messages: Signal<Message[]>;
|
|
228
|
+
status: Signal<AgentStatus>;
|
|
229
|
+
isLoading: Signal<boolean>;
|
|
230
|
+
error: Signal<unknown>;
|
|
231
|
+
toolCalls: Signal<ToolCall[]>;
|
|
232
|
+
state: Signal<Record<string, unknown>>;
|
|
233
|
+
submit: (input: AgentSubmitInput, opts?: AgentSubmitOptions) => Promise<void>;
|
|
234
|
+
stop: () => Promise<void>;
|
|
235
|
+
/**
|
|
236
|
+
* Discards the assistant message at the given index AND all messages after
|
|
237
|
+
* it, then re-runs the agent against the trimmed conversation tail. The
|
|
238
|
+
* preceding user message (at index - 1) is preserved and re-submitted as
|
|
239
|
+
* the agent's input. No new user message is added to the history.
|
|
240
|
+
*
|
|
241
|
+
* Throws if the message at `index` is not 'assistant' role, or if the
|
|
242
|
+
* agent is currently loading another response.
|
|
243
|
+
*/
|
|
244
|
+
regenerate: (assistantMessageIndex: number) => Promise<void>;
|
|
245
|
+
interrupt?: Signal<AgentInterrupt | undefined>;
|
|
246
|
+
subagents?: Signal<Map<string, Subagent>>;
|
|
247
|
+
events$: Observable<AgentEvent>;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
/**
|
|
251
|
+
* Runtime-neutral snapshot of a point in an agent's execution history.
|
|
252
|
+
*
|
|
253
|
+
* Consumed by time-travel / debug UIs. `id` is adapter-opaque — UIs emit
|
|
254
|
+
* it back to the parent app on replay/fork, and the parent app dispatches
|
|
255
|
+
* to the underlying runtime.
|
|
256
|
+
*/
|
|
257
|
+
interface AgentCheckpoint {
|
|
258
|
+
/** Adapter-opaque checkpoint identifier (e.g. LangGraph checkpoint_id). */
|
|
259
|
+
id?: string;
|
|
260
|
+
/** Human-friendly label for the checkpoint (e.g. next node name). */
|
|
261
|
+
label?: string;
|
|
262
|
+
/** State snapshot at this checkpoint. */
|
|
263
|
+
values: Record<string, unknown>;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
/**
|
|
267
|
+
* Extension of Agent that exposes checkpoint history for time-travel UIs.
|
|
268
|
+
*
|
|
269
|
+
* Concrete adapters that record per-node checkpoints (e.g. LangGraph) should
|
|
270
|
+
* implement this. Pure request/response runtimes that don't have checkpoints
|
|
271
|
+
* should implement plain Agent.
|
|
272
|
+
*/
|
|
273
|
+
interface AgentWithHistory extends Agent {
|
|
274
|
+
history: Signal<AgentCheckpoint[]>;
|
|
275
|
+
/**
|
|
276
|
+
* Optional reactive map of `messageId → checkpointId`, computed by
|
|
277
|
+
* walking history once: for each checkpoint, find the most recent
|
|
278
|
+
* assistant message present in its `values.messages` and pair them.
|
|
279
|
+
* UIs use this to anchor inline checkpoint markers on each assistant
|
|
280
|
+
* turn. Missing on adapters that don't compute it.
|
|
281
|
+
*/
|
|
282
|
+
messageCheckpoints?: Signal<ReadonlyMap<string, string>>;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
type AgentRuntimeTelemetryEvent = 'ngaf:runtime_instance_created' | 'ngaf:runtime_request_created' | 'ngaf:stream_started' | 'ngaf:stream_ended' | 'ngaf:stream_errored';
|
|
286
|
+
interface AgentRuntimeTelemetryProperties {
|
|
287
|
+
transport: 'langgraph' | 'ag-ui' | 'custom' | string;
|
|
288
|
+
surface?: string;
|
|
289
|
+
requestType?: string;
|
|
290
|
+
provider?: string;
|
|
291
|
+
model?: string;
|
|
292
|
+
durationMs?: number;
|
|
293
|
+
errorClass?: string;
|
|
294
|
+
}
|
|
295
|
+
interface AgentRuntimeTelemetryPayload {
|
|
296
|
+
event: AgentRuntimeTelemetryEvent;
|
|
297
|
+
properties: AgentRuntimeTelemetryProperties;
|
|
298
|
+
}
|
|
299
|
+
type AgentRuntimeTelemetrySink = (payload: AgentRuntimeTelemetryPayload) => void | Promise<void>;
|
|
300
|
+
|
|
301
|
+
declare class MessageTemplateDirective {
|
|
302
|
+
readonly chatMessageTemplate: _angular_core.InputSignal<MessageTemplateType>;
|
|
303
|
+
readonly templateRef: TemplateRef<any>;
|
|
304
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MessageTemplateDirective, never>;
|
|
305
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<MessageTemplateDirective, "ng-template[chatMessageTemplate]", never, { "chatMessageTemplate": { "alias": "chatMessageTemplate"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
/**
|
|
309
|
+
* Maps a {@link Message} to a {@link MessageTemplateType}.
|
|
310
|
+
* Exported as a standalone function so it can be unit-tested without DOM rendering.
|
|
311
|
+
*/
|
|
312
|
+
declare function getMessageType(message: Message): MessageTemplateType;
|
|
313
|
+
declare class ChatMessageListComponent {
|
|
314
|
+
readonly agent: _angular_core.InputSignal<Agent>;
|
|
315
|
+
readonly messageTemplates: _angular_core.Signal<readonly MessageTemplateDirective[]>;
|
|
316
|
+
readonly messages: _angular_core.Signal<Message[]>;
|
|
317
|
+
readonly getMessageType: typeof getMessageType;
|
|
318
|
+
findTemplate(type: MessageTemplateType): MessageTemplateDirective | undefined;
|
|
319
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ChatMessageListComponent, never>;
|
|
320
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ChatMessageListComponent, "chat-message-list", never, { "agent": { "alias": "agent"; "required": true; "isSignal": true; }; }, {}, ["messageTemplates"], never, true, never>;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
type ChatMessageRole = 'user' | 'assistant' | 'system' | 'tool';
|
|
324
|
+
declare class ChatMessageComponent {
|
|
325
|
+
readonly role: _angular_core.InputSignal<ChatMessageRole>;
|
|
326
|
+
readonly current: _angular_core.InputSignal<boolean>;
|
|
327
|
+
readonly streaming: _angular_core.InputSignal<boolean>;
|
|
328
|
+
readonly prevRole: _angular_core.InputSignal<ChatMessageRole | undefined>;
|
|
329
|
+
readonly message: _angular_core.InputSignal<Message | undefined>;
|
|
330
|
+
private readonly resolver;
|
|
331
|
+
constructor();
|
|
332
|
+
readonly currentStr: _angular_core.Signal<string>;
|
|
333
|
+
readonly streamingStr: _angular_core.Signal<string>;
|
|
334
|
+
readonly bodyClass: _angular_core.Signal<"chat-message__bubble" | "chat-message__assistant-body" | "chat-message__plain">;
|
|
335
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ChatMessageComponent, never>;
|
|
336
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ChatMessageComponent, "chat-message", never, { "role": { "alias": "role"; "required": true; "isSignal": true; }; "current": { "alias": "current"; "required": false; "isSignal": true; }; "streaming": { "alias": "streaming"; "required": false; "isSignal": true; }; "prevRole": { "alias": "prevRole"; "required": false; "isSignal": true; }; "message": { "alias": "message"; "required": false; "isSignal": true; }; }, {}, never, ["*", "[chatMessageControls]"], true, never>;
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
/**
|
|
340
|
+
* Default action buttons that appear under each assistant message:
|
|
341
|
+
* regenerate, copy-to-clipboard, thumbs up, thumbs down.
|
|
342
|
+
*
|
|
343
|
+
* Hidden by default, fades in on `:hover`/`:focus-within` of the parent
|
|
344
|
+
* `chat-message`, and stays visible on the current/last assistant message
|
|
345
|
+
* and on mobile.
|
|
346
|
+
*/
|
|
347
|
+
declare class ChatMessageActionsComponent {
|
|
348
|
+
/** Plain text content to copy. Required for the copy button to function. */
|
|
349
|
+
readonly content: _angular_core.InputSignal<string>;
|
|
350
|
+
/** When true, the regenerate button is disabled (e.g. while the agent is streaming). */
|
|
351
|
+
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
352
|
+
/** Emitted when the user clicks regenerate. Wire this to `agent.regenerate(index)`. */
|
|
353
|
+
readonly regenerate: _angular_core.OutputEmitterRef<void>;
|
|
354
|
+
/** Emitted with 'up' or 'down' when the user rates the response. */
|
|
355
|
+
readonly rate: _angular_core.OutputEmitterRef<"up" | "down">;
|
|
356
|
+
/** Emitted with the copied content after a successful clipboard write. */
|
|
357
|
+
readonly contentCopied: _angular_core.OutputEmitterRef<string>;
|
|
358
|
+
protected readonly copied: _angular_core.WritableSignal<boolean>;
|
|
359
|
+
protected readonly rating: _angular_core.WritableSignal<"up" | "down" | null>;
|
|
360
|
+
private readonly document;
|
|
361
|
+
protected onCopy(): Promise<void>;
|
|
362
|
+
protected onRate(value: 'up' | 'down'): void;
|
|
363
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ChatMessageActionsComponent, never>;
|
|
364
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ChatMessageActionsComponent, "chat-message-actions", never, { "content": { "alias": "content"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, { "regenerate": "regenerate"; "rate": "rate"; "contentCopied": "contentCopied"; }, never, never, true, never>;
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
declare class ChatWindowComponent {
|
|
368
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ChatWindowComponent, never>;
|
|
369
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ChatWindowComponent, "chat-window", never, {}, {}, never, ["[chatHeader]", "[chatBody]", "[chatFooter]"], true, never>;
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
type TraceState = 'pending' | 'running' | 'done' | 'error';
|
|
373
|
+
declare class ChatTraceComponent {
|
|
374
|
+
readonly state: _angular_core.InputSignal<TraceState>;
|
|
375
|
+
/** When state is not 'running' or 'error', honors this input as the default expansion. */
|
|
376
|
+
readonly defaultExpanded: _angular_core.InputSignal<boolean>;
|
|
377
|
+
/** null = follow auto state-driven logic; non-null = manual override (user click). */
|
|
378
|
+
private readonly _expandedOverride;
|
|
379
|
+
readonly expanded: _angular_core.Signal<boolean>;
|
|
380
|
+
readonly expandedStr: _angular_core.Signal<string>;
|
|
381
|
+
constructor();
|
|
382
|
+
toggle(): void;
|
|
383
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ChatTraceComponent, never>;
|
|
384
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ChatTraceComponent, "chat-trace", never, { "state": { "alias": "state"; "required": false; "isSignal": true; }; "defaultExpanded": { "alias": "defaultExpanded"; "required": false; "isSignal": true; }; }, {}, never, ["[traceIcon]", "[traceLabel]", "[traceMeta]", "*"], true, never>;
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
/**
|
|
388
|
+
* Renders an assistant's reasoning content as a compact pill that
|
|
389
|
+
* expands to reveal the underlying text. Three visual states:
|
|
390
|
+
*
|
|
391
|
+
* - Streaming: pill shows "Thinking…" with a pulsing dot; auto-expanded
|
|
392
|
+
* so the user sees reasoning stream in real time.
|
|
393
|
+
* - Idle, with durationMs known: pill shows "Thought for {duration}";
|
|
394
|
+
* collapsed by default, expand on click.
|
|
395
|
+
* - Idle, no duration: pill shows "Show reasoning"; collapsed by default.
|
|
396
|
+
*
|
|
397
|
+
* The body re-uses chat-streaming-md so reasoning content gets the same
|
|
398
|
+
* markdown rendering pipeline as the visible response (lists, code,
|
|
399
|
+
* step labels often appear in reasoning output).
|
|
400
|
+
*
|
|
401
|
+
* Internal state: a tristate "expanded" — null means follow auto state-
|
|
402
|
+
* driven logic (force-expand on isStreaming, otherwise honor
|
|
403
|
+
* defaultExpanded), boolean is a manual user choice that wins for the
|
|
404
|
+
* lifetime of the instance.
|
|
405
|
+
*/
|
|
406
|
+
declare class ChatReasoningComponent {
|
|
407
|
+
readonly content: _angular_core.InputSignal<string>;
|
|
408
|
+
readonly isStreaming: _angular_core.InputSignal<boolean>;
|
|
409
|
+
readonly durationMs: _angular_core.InputSignal<number | undefined>;
|
|
410
|
+
readonly label: _angular_core.InputSignal<string | undefined>;
|
|
411
|
+
readonly defaultExpanded: _angular_core.InputSignal<boolean>;
|
|
412
|
+
readonly hasContent: _angular_core.Signal<boolean>;
|
|
413
|
+
/** null = follow auto logic (streaming → expanded, else defaultExpanded). */
|
|
414
|
+
private readonly _expandedOverride;
|
|
415
|
+
readonly expanded: _angular_core.Signal<boolean>;
|
|
416
|
+
readonly expandedStr: _angular_core.Signal<string>;
|
|
417
|
+
readonly resolvedLabel: _angular_core.Signal<string>;
|
|
418
|
+
constructor();
|
|
419
|
+
toggle(): void;
|
|
420
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ChatReasoningComponent, never>;
|
|
421
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ChatReasoningComponent, "chat-reasoning", never, { "content": { "alias": "content"; "required": false; "isSignal": true; }; "isStreaming": { "alias": "isStreaming"; "required": false; "isSignal": true; }; "durationMs": { "alias": "durationMs"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "defaultExpanded": { "alias": "defaultExpanded"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
declare class ChatLauncherButtonComponent {
|
|
425
|
+
/** Fires when the inner <button> receives a click. Prefer this over
|
|
426
|
+
* binding `(click)` on the host element — explicit output gives
|
|
427
|
+
* consumers (and Playwright) an unambiguous click target that won't
|
|
428
|
+
* be intercepted by sibling overlays in higher stacking contexts.
|
|
429
|
+
* Native `(click)` on the host still works for back-compat: the
|
|
430
|
+
* click event bubbles through unchanged. */
|
|
431
|
+
readonly clicked: _angular_core.OutputEmitterRef<void>;
|
|
432
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ChatLauncherButtonComponent, never>;
|
|
433
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ChatLauncherButtonComponent, "chat-launcher-button", never, {}, { "clicked": "clicked"; }, never, never, true, never>;
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
declare class ChatSuggestionsComponent {
|
|
437
|
+
readonly suggestions: _angular_core.InputSignal<string[]>;
|
|
438
|
+
readonly selected: _angular_core.OutputEmitterRef<string>;
|
|
439
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ChatSuggestionsComponent, never>;
|
|
440
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ChatSuggestionsComponent, "chat-suggestions", never, { "suggestions": { "alias": "suggestions"; "required": false; "isSignal": true; }; }, { "selected": "selected"; }, never, never, true, never>;
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
/**
|
|
444
|
+
* Submits a trimmed message to the agent.
|
|
445
|
+
* Returns the trimmed string on success, or `null` if the input was empty.
|
|
446
|
+
*/
|
|
447
|
+
declare function submitMessage(agent: Agent, text: string): string | null;
|
|
448
|
+
declare class ChatInputComponent {
|
|
449
|
+
readonly agent: _angular_core.InputSignal<Agent>;
|
|
450
|
+
readonly submitOnEnter: _angular_core.InputSignal<boolean>;
|
|
451
|
+
readonly placeholder: _angular_core.InputSignal<string>;
|
|
452
|
+
/** When true (default), shows a stop button while the agent is streaming. */
|
|
453
|
+
readonly showStopButton: _angular_core.InputSignal<boolean>;
|
|
454
|
+
readonly submitted: _angular_core.OutputEmitterRef<string>;
|
|
455
|
+
readonly stopped: _angular_core.OutputEmitterRef<void>;
|
|
456
|
+
readonly messageText: _angular_core.WritableSignal<string>;
|
|
457
|
+
readonly isLoading: _angular_core.Signal<boolean>;
|
|
458
|
+
/** True while an IME composition (CJK input, accent, autocorrect) is active. */
|
|
459
|
+
protected readonly composing: _angular_core.WritableSignal<boolean>;
|
|
460
|
+
readonly focused: _angular_core.WritableSignal<boolean>;
|
|
461
|
+
/** Submit is allowed only when not loading and there's non-whitespace text. */
|
|
462
|
+
readonly canSubmit: _angular_core.Signal<boolean>;
|
|
463
|
+
/** The stop button only appears when the consumer opted in AND we're loading. */
|
|
464
|
+
readonly canStop: _angular_core.Signal<boolean>;
|
|
465
|
+
private readonly textareaEl;
|
|
466
|
+
/**
|
|
467
|
+
* Auto-resize the textarea to fit its content as the user types or pastes
|
|
468
|
+
* multi-line text. Caps at min(40vh, 320px); beyond that the textarea
|
|
469
|
+
* scrolls. Without this, multi-line input is hidden behind the rows="1"
|
|
470
|
+
* fixed height (caught by live browser smoke).
|
|
471
|
+
*/
|
|
472
|
+
constructor();
|
|
473
|
+
focusTextarea(): void;
|
|
474
|
+
onSubmit(): void;
|
|
475
|
+
/** Abort the current streaming response (if the adapter supports it). */
|
|
476
|
+
onStop(): void;
|
|
477
|
+
onKeydown(event: KeyboardEvent): void;
|
|
478
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ChatInputComponent, never>;
|
|
479
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ChatInputComponent, "chat-input", never, { "agent": { "alias": "agent"; "required": true; "isSignal": true; }; "submitOnEnter": { "alias": "submitOnEnter"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "showStopButton": { "alias": "showStopButton"; "required": false; "isSignal": true; }; }, { "submitted": "submitted"; "stopped": "stopped"; }, never, ["[chatInputBanner]", "[chatInputAttachments]", "[chatInputLeading]", "[chatInputModelSelect]", "[chatInputTrailing]", "[chatInputFooter]"], true, never>;
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
declare function isTyping(agent: Agent): boolean;
|
|
483
|
+
declare class ChatTypingIndicatorComponent {
|
|
484
|
+
readonly agent: _angular_core.InputSignal<Agent>;
|
|
485
|
+
readonly visible: _angular_core.Signal<boolean>;
|
|
486
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ChatTypingIndicatorComponent, never>;
|
|
487
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ChatTypingIndicatorComponent, "chat-typing-indicator", never, { "agent": { "alias": "agent"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
interface ThreadMatch {
|
|
491
|
+
id: string;
|
|
492
|
+
title: string;
|
|
493
|
+
/** Optional secondary line, rendered muted under the title. */
|
|
494
|
+
subtitle?: string;
|
|
495
|
+
}
|
|
496
|
+
declare class ChatHistorySearchPaletteComponent {
|
|
497
|
+
readonly open: _angular_core.ModelSignal<boolean>;
|
|
498
|
+
readonly query: _angular_core.ModelSignal<string>;
|
|
499
|
+
readonly results: _angular_core.InputSignal<ThreadMatch[]>;
|
|
500
|
+
readonly loading: _angular_core.InputSignal<boolean>;
|
|
501
|
+
readonly placeholder: _angular_core.InputSignal<string>;
|
|
502
|
+
readonly threadSelected: _angular_core.OutputEmitterRef<string>;
|
|
503
|
+
readonly closed: _angular_core.OutputEmitterRef<void>;
|
|
504
|
+
protected readonly activeIndex: _angular_core.WritableSignal<number>;
|
|
505
|
+
protected readonly listId: string;
|
|
506
|
+
private readonly inputEl;
|
|
507
|
+
constructor();
|
|
508
|
+
protected rowId(index: number): string;
|
|
509
|
+
protected activeRowId(): string | null;
|
|
510
|
+
protected onInput(e: Event): void;
|
|
511
|
+
protected onInputKeydown(e: KeyboardEvent): void;
|
|
512
|
+
protected onRowClick(id: string): void;
|
|
513
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ChatHistorySearchPaletteComponent, never>;
|
|
514
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ChatHistorySearchPaletteComponent, "chat-history-search-palette", never, { "open": { "alias": "open"; "required": false; "isSignal": true; }; "query": { "alias": "query"; "required": false; "isSignal": true; }; "results": { "alias": "results"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; }, { "open": "openChange"; "query": "queryChange"; "threadSelected": "threadSelected"; "closed": "closed"; }, never, never, true, never>;
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
interface OverflowMenuItem {
|
|
518
|
+
/** Stable id emitted via (itemSelected). */
|
|
519
|
+
id: string;
|
|
520
|
+
label: string;
|
|
521
|
+
/** 'destructive' renders the label in red. Default 'normal'. */
|
|
522
|
+
tone?: 'normal' | 'destructive';
|
|
523
|
+
/** Disabled items render muted and ignore clicks/keypresses. */
|
|
524
|
+
disabled?: boolean;
|
|
525
|
+
}
|
|
526
|
+
declare class ChatOverflowMenuComponent {
|
|
527
|
+
readonly open: _angular_core.InputSignal<boolean>;
|
|
528
|
+
readonly items: _angular_core.InputSignal<OverflowMenuItem[]>;
|
|
529
|
+
/** Element the menu anchors against (positions just below its bottom-right corner). */
|
|
530
|
+
readonly anchor: _angular_core.InputSignal<HTMLElement | null>;
|
|
531
|
+
/** Alternative anchor: explicit viewport coordinates (e.g. cursor position
|
|
532
|
+
* from a right-click). Takes precedence over `anchor` when set. */
|
|
533
|
+
readonly anchorPos: _angular_core.InputSignal<{
|
|
534
|
+
x: number;
|
|
535
|
+
y: number;
|
|
536
|
+
} | null>;
|
|
537
|
+
readonly itemSelected: _angular_core.OutputEmitterRef<string>;
|
|
538
|
+
readonly closed: _angular_core.OutputEmitterRef<void>;
|
|
539
|
+
protected readonly position: _angular_core.Signal<{
|
|
540
|
+
top: number;
|
|
541
|
+
left: number;
|
|
542
|
+
}>;
|
|
543
|
+
constructor();
|
|
544
|
+
protected onItemClick(item: OverflowMenuItem): void;
|
|
545
|
+
protected onMenuKeydown(e: KeyboardEvent): void;
|
|
546
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ChatOverflowMenuComponent, never>;
|
|
547
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ChatOverflowMenuComponent, "chat-overflow-menu", never, { "open": { "alias": "open"; "required": false; "isSignal": true; }; "items": { "alias": "items"; "required": false; "isSignal": true; }; "anchor": { "alias": "anchor"; "required": false; "isSignal": true; }; "anchorPos": { "alias": "anchorPos"; "required": false; "isSignal": true; }; }, { "itemSelected": "itemSelected"; "closed": "closed"; }, never, never, true, never>;
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
declare class ChatConfirmDialogComponent {
|
|
551
|
+
readonly open: _angular_core.InputSignal<boolean>;
|
|
552
|
+
readonly title: _angular_core.InputSignal<string>;
|
|
553
|
+
readonly body: _angular_core.InputSignal<string>;
|
|
554
|
+
readonly confirmLabel: _angular_core.InputSignal<string>;
|
|
555
|
+
readonly cancelLabel: _angular_core.InputSignal<string>;
|
|
556
|
+
readonly tone: _angular_core.InputSignal<"normal" | "destructive">;
|
|
557
|
+
readonly confirmed: _angular_core.OutputEmitterRef<void>;
|
|
558
|
+
readonly cancelled: _angular_core.OutputEmitterRef<void>;
|
|
559
|
+
private readonly instanceId;
|
|
560
|
+
protected readonly titleId: string;
|
|
561
|
+
protected readonly bodyId: string;
|
|
562
|
+
private readonly cancelBtn;
|
|
563
|
+
constructor();
|
|
564
|
+
protected onDialogKeydown(e: KeyboardEvent): void;
|
|
565
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ChatConfirmDialogComponent, never>;
|
|
566
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ChatConfirmDialogComponent, "chat-confirm-dialog", never, { "open": { "alias": "open"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; "body": { "alias": "body"; "required": false; "isSignal": true; }; "confirmLabel": { "alias": "confirmLabel"; "required": false; "isSignal": true; }; "cancelLabel": { "alias": "cancelLabel"; "required": false; "isSignal": true; }; "tone": { "alias": "tone"; "required": false; "isSignal": true; }; }, { "confirmed": "confirmed"; "cancelled": "cancelled"; }, never, never, true, never>;
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
type ChatScrollBubbleMode = 'streaming' | 'idle';
|
|
570
|
+
declare class ChatScrollBubbleComponent {
|
|
571
|
+
readonly mode: _angular_core.InputSignal<ChatScrollBubbleMode>;
|
|
572
|
+
readonly clicked: _angular_core.OutputEmitterRef<void>;
|
|
573
|
+
protected readonly ariaLabel: _angular_core.Signal<"Latest activity" | "Scroll to latest">;
|
|
574
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ChatScrollBubbleComponent, never>;
|
|
575
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ChatScrollBubbleComponent, "chat-scroll-bubble", never, { "mode": { "alias": "mode"; "required": true; "isSignal": true; }; }, { "clicked": "clicked"; }, never, never, true, never>;
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
declare function extractErrorMessage(error: unknown): string | null;
|
|
579
|
+
declare class ChatErrorComponent {
|
|
580
|
+
readonly agent: _angular_core.InputSignal<Agent>;
|
|
581
|
+
readonly errorMessage: _angular_core.Signal<string | null>;
|
|
582
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ChatErrorComponent, never>;
|
|
583
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ChatErrorComponent, "chat-error", never, { "agent": { "alias": "agent"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
584
|
+
}
|
|
585
|
+
|
|
586
|
+
declare function getInterrupt(agent: Agent): AgentInterrupt | undefined;
|
|
587
|
+
declare class ChatInterruptComponent {
|
|
588
|
+
readonly agent: _angular_core.InputSignal<Agent>;
|
|
589
|
+
readonly templateRef: _angular_core.Signal<TemplateRef<any> | undefined>;
|
|
590
|
+
readonly interrupt: _angular_core.Signal<AgentInterrupt | undefined>;
|
|
591
|
+
defaultText(i: AgentInterrupt): string;
|
|
592
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ChatInterruptComponent, never>;
|
|
593
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ChatInterruptComponent, "chat-interrupt", never, { "agent": { "alias": "agent"; "required": true; "isSignal": true; }; }, {}, ["templateRef"], never, true, never>;
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
interface ToolCallInfo {
|
|
597
|
+
id: string;
|
|
598
|
+
name: string;
|
|
599
|
+
args: unknown;
|
|
600
|
+
result?: unknown;
|
|
601
|
+
/** Optional — present when the parent provides it. Drives the pill + default-collapsed logic. */
|
|
602
|
+
status?: ToolCallStatus;
|
|
603
|
+
}
|
|
604
|
+
declare class ChatToolCallCardComponent {
|
|
605
|
+
readonly toolCall: _angular_core.InputSignal<ToolCallInfo>;
|
|
606
|
+
readonly defaultCollapsed: _angular_core.InputSignal<boolean>;
|
|
607
|
+
readonly status: _angular_core.Signal<ToolCallStatus>;
|
|
608
|
+
readonly state: _angular_core.Signal<TraceState>;
|
|
609
|
+
readonly autoExpanded: _angular_core.Signal<boolean>;
|
|
610
|
+
readonly ariaLabel: _angular_core.Signal<string>;
|
|
611
|
+
formatJson(value: unknown): string;
|
|
612
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ChatToolCallCardComponent, never>;
|
|
613
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ChatToolCallCardComponent, "chat-tool-call-card", never, { "toolCall": { "alias": "toolCall"; "required": true; "isSignal": true; }; "defaultCollapsed": { "alias": "defaultCollapsed"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
/**
|
|
617
|
+
* Template-context surface available to a per-tool template. The first
|
|
618
|
+
* argument is the ToolCall itself (let-call); status is exposed as a
|
|
619
|
+
* named context property (let-status="status").
|
|
620
|
+
*/
|
|
621
|
+
interface ChatToolCallTemplateContext {
|
|
622
|
+
$implicit: ToolCall;
|
|
623
|
+
status: ToolCallStatus;
|
|
624
|
+
}
|
|
625
|
+
/**
|
|
626
|
+
* Registers a per-tool-name template inside <chat-tool-calls>. The
|
|
627
|
+
* primitive collects all directive instances via contentChildren() and
|
|
628
|
+
* dispatches incoming calls by their `name` field. A literal "*" name
|
|
629
|
+
* registers a wildcard catch-all that handles any tool name without a
|
|
630
|
+
* specific template registered.
|
|
631
|
+
*
|
|
632
|
+
* Usage:
|
|
633
|
+
*
|
|
634
|
+
* <chat-tool-calls [agent]="agent" [message]="msg">
|
|
635
|
+
* <ng-template chatToolCallTemplate="search_web" let-call let-status="status">
|
|
636
|
+
* <my-search-result-card [query]="call.args.query" [status]="status"/>
|
|
637
|
+
* </ng-template>
|
|
638
|
+
* <ng-template chatToolCallTemplate="*" let-call>
|
|
639
|
+
* <chat-tool-call-card [toolCall]="call"/>
|
|
640
|
+
* </ng-template>
|
|
641
|
+
* </chat-tool-calls>
|
|
642
|
+
*/
|
|
643
|
+
declare class ChatToolCallTemplateDirective {
|
|
644
|
+
/** The tool name this template handles, or "*" for the wildcard catch-all. */
|
|
645
|
+
readonly name: _angular_core.InputSignal<string>;
|
|
646
|
+
readonly templateRef: TemplateRef<any>;
|
|
647
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ChatToolCallTemplateDirective, never>;
|
|
648
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ChatToolCallTemplateDirective, "[chatToolCallTemplate]", never, { "name": { "alias": "chatToolCallTemplate"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
649
|
+
}
|
|
650
|
+
|
|
651
|
+
interface Group {
|
|
652
|
+
name: string;
|
|
653
|
+
calls: ToolCall[];
|
|
654
|
+
templateRef?: ChatToolCallTemplateDirective;
|
|
655
|
+
}
|
|
656
|
+
declare class ChatToolCallsComponent {
|
|
657
|
+
readonly agent: _angular_core.InputSignal<Agent>;
|
|
658
|
+
readonly message: _angular_core.InputSignal<Message | undefined>;
|
|
659
|
+
readonly grouping: _angular_core.InputSignal<"auto" | "none">;
|
|
660
|
+
readonly groupSummary: _angular_core.InputSignal<((name: string, count: number) => string) | undefined>;
|
|
661
|
+
/**
|
|
662
|
+
* Tool names whose groups should be hidden. Used by chat compositions
|
|
663
|
+
* to filter out internal/orchestration tools (e.g. GenUI dispatchers)
|
|
664
|
+
* whose args streaming is not meaningful to surface in the chat.
|
|
665
|
+
* Default empty — preserves prior behavior for non-filtering consumers.
|
|
666
|
+
*/
|
|
667
|
+
readonly excludeToolNames: _angular_core.InputSignal<readonly string[]>;
|
|
668
|
+
/** Per-tool-name + wildcard templates registered as content children. */
|
|
669
|
+
readonly templates: _angular_core.Signal<readonly ChatToolCallTemplateDirective[]>;
|
|
670
|
+
private readonly templateRegistry;
|
|
671
|
+
readonly toolCalls: _angular_core.Signal<ToolCall[]>;
|
|
672
|
+
readonly groups: _angular_core.Signal<Group[]>;
|
|
673
|
+
private readonly _expandedGroups;
|
|
674
|
+
readonly expandedGroups: _angular_core.Signal<Set<number>>;
|
|
675
|
+
toggleGroup(index: number): void;
|
|
676
|
+
protected summarize(name: string, count: number): string;
|
|
677
|
+
protected toToolCallInfo(tc: ToolCall): ToolCallInfo;
|
|
678
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ChatToolCallsComponent, never>;
|
|
679
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ChatToolCallsComponent, "chat-tool-calls", never, { "agent": { "alias": "agent"; "required": true; "isSignal": true; }; "message": { "alias": "message"; "required": false; "isSignal": true; }; "grouping": { "alias": "grouping"; "required": false; "isSignal": true; }; "groupSummary": { "alias": "groupSummary"; "required": false; "isSignal": true; }; "excludeToolNames": { "alias": "excludeToolNames"; "required": false; "isSignal": true; }; }, {}, ["templates"], never, true, never>;
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
declare class ChatSubagentsComponent {
|
|
683
|
+
readonly agent: _angular_core.InputSignal<Agent>;
|
|
684
|
+
readonly templateRef: _angular_core.Signal<TemplateRef<any> | undefined>;
|
|
685
|
+
readonly activeSubagents: _angular_core.Signal<Subagent[]>;
|
|
686
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ChatSubagentsComponent, never>;
|
|
687
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ChatSubagentsComponent, "chat-subagents", never, { "agent": { "alias": "agent"; "required": true; "isSignal": true; }; }, {}, ["templateRef"], never, true, never>;
|
|
688
|
+
}
|
|
689
|
+
|
|
690
|
+
type Project = {
|
|
691
|
+
id: string;
|
|
692
|
+
name: string;
|
|
693
|
+
/** Open shape — consumers may add icon, color, createdAt, etc. */
|
|
694
|
+
[key: string]: unknown;
|
|
695
|
+
};
|
|
696
|
+
/**
|
|
697
|
+
* Consumer-provided adapter for project lifecycle actions. The framework calls
|
|
698
|
+
* these methods after user confirmation (delete) or commit (create/rename) and
|
|
699
|
+
* manages optimistic UI + rollback on rejection.
|
|
700
|
+
*/
|
|
701
|
+
interface ProjectActionAdapter {
|
|
702
|
+
/** Create a new project. Returns the new project id; consumer is expected
|
|
703
|
+
* to also refresh its projects signal. */
|
|
704
|
+
create?(name: string): Promise<{
|
|
705
|
+
id: string;
|
|
706
|
+
}>;
|
|
707
|
+
rename?(projectId: string, newName: string): Promise<void>;
|
|
708
|
+
/** Permanently delete the project. The framework calls this AFTER user
|
|
709
|
+
* confirms via the confirm dialog. */
|
|
710
|
+
delete?(projectId: string): Promise<void>;
|
|
711
|
+
}
|
|
712
|
+
declare class ChatProjectListComponent {
|
|
713
|
+
readonly projects: _angular_core.InputSignal<Project[]>;
|
|
714
|
+
readonly activeProjectId: _angular_core.InputSignal<string | null>;
|
|
715
|
+
readonly showNewProjectButton: _angular_core.InputSignal<boolean>;
|
|
716
|
+
readonly actions: _angular_core.InputSignal<ProjectActionAdapter | null>;
|
|
717
|
+
readonly projectSelected: _angular_core.OutputEmitterRef<string>;
|
|
718
|
+
readonly newProjectRequested: _angular_core.OutputEmitterRef<void>;
|
|
719
|
+
protected readonly creatingProject: _angular_core.WritableSignal<boolean>;
|
|
720
|
+
protected readonly creatingValue: _angular_core.WritableSignal<string>;
|
|
721
|
+
protected readonly editingProjectId: _angular_core.WritableSignal<string | null>;
|
|
722
|
+
protected readonly editingValue: _angular_core.WritableSignal<string>;
|
|
723
|
+
protected readonly menuOpenForId: _angular_core.WritableSignal<string | null>;
|
|
724
|
+
protected readonly menuAnchor: _angular_core.WritableSignal<HTMLElement | null>;
|
|
725
|
+
protected readonly confirmDeleteId: _angular_core.WritableSignal<string | null>;
|
|
726
|
+
private readonly pendingHidden;
|
|
727
|
+
private readonly pendingRenames;
|
|
728
|
+
protected readonly visibleProjects: _angular_core.Signal<Project[]>;
|
|
729
|
+
protected readonly currentMenuItems: _angular_core.Signal<OverflowMenuItem[]>;
|
|
730
|
+
private readonly createInput;
|
|
731
|
+
private readonly editInput;
|
|
732
|
+
constructor();
|
|
733
|
+
protected selectProject(projectId: string): void;
|
|
734
|
+
protected showKebab(): boolean;
|
|
735
|
+
protected openMenu(projectId: string, anchor: HTMLElement): void;
|
|
736
|
+
protected onMenuAction(id: string): void;
|
|
737
|
+
protected onNewProjectClicked(): void;
|
|
738
|
+
protected onCreateInput(e: Event): void;
|
|
739
|
+
protected cancelCreate(): void;
|
|
740
|
+
protected commitCreate(): Promise<void>;
|
|
741
|
+
protected onEditInput(e: Event): void;
|
|
742
|
+
protected cancelRename(): void;
|
|
743
|
+
protected commitRename(projectId: string): Promise<void>;
|
|
744
|
+
protected performDelete(): Promise<void>;
|
|
745
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ChatProjectListComponent, never>;
|
|
746
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ChatProjectListComponent, "chat-project-list", never, { "projects": { "alias": "projects"; "required": true; "isSignal": true; }; "activeProjectId": { "alias": "activeProjectId"; "required": false; "isSignal": true; }; "showNewProjectButton": { "alias": "showNewProjectButton"; "required": false; "isSignal": true; }; "actions": { "alias": "actions"; "required": false; "isSignal": true; }; }, { "projectSelected": "projectSelected"; "newProjectRequested": "newProjectRequested"; }, never, never, true, never>;
|
|
747
|
+
}
|
|
748
|
+
|
|
749
|
+
type Thread = {
|
|
750
|
+
id: string;
|
|
751
|
+
/** Optional human-friendly label. Falls back to a slice of the id. */
|
|
752
|
+
title?: string;
|
|
753
|
+
/** Optional epoch-ms timestamp used by the default item template to
|
|
754
|
+
* render a relative-time line ("just now" / "5 min ago"). When absent
|
|
755
|
+
* the default template omits the second line. */
|
|
756
|
+
updatedAt?: number;
|
|
757
|
+
/** Optional lifecycle status. Undefined treated as 'active'. The framework
|
|
758
|
+
* does NOT auto-filter by this field — consumers pre-filter into separate
|
|
759
|
+
* `threads` and `archivedThreads` inputs on chat-sidenav. The field is
|
|
760
|
+
* typed documentation of intent. */
|
|
761
|
+
status?: 'active' | 'archived';
|
|
762
|
+
/** Optional flag indicating the thread is pinned (sticky-top). The framework
|
|
763
|
+
* renders a pin icon when true but does NOT sort — the consumer pre-sorts
|
|
764
|
+
* pinned threads to the top of the `threads` input. */
|
|
765
|
+
pinned?: boolean;
|
|
766
|
+
/** Optional project association. Consumers pre-filter threads by project
|
|
767
|
+
* before passing to the sidenav. Null/undefined means no project. */
|
|
768
|
+
projectId?: string | null;
|
|
769
|
+
[key: string]: unknown;
|
|
770
|
+
};
|
|
771
|
+
/**
|
|
772
|
+
* Per-thread row-action adapter. Consumer-provided. The framework calls
|
|
773
|
+
* these methods after user confirmation (delete) or commit (rename) and
|
|
774
|
+
* manages optimistic UI + rollback on rejection.
|
|
775
|
+
*
|
|
776
|
+
* Consumers MUST refresh their `threads` signal on success — the framework
|
|
777
|
+
* clears optimistic overrides in a `finally` block, so a successful adapter
|
|
778
|
+
* call that leaves the input list unchanged would re-render the row.
|
|
779
|
+
*/
|
|
780
|
+
interface ThreadActionAdapter {
|
|
781
|
+
delete?(threadId: string): Promise<void>;
|
|
782
|
+
rename?(threadId: string, newTitle: string): Promise<void>;
|
|
783
|
+
/** Archive a thread (reversible). No confirmation dialog — framework calls
|
|
784
|
+
* this immediately on click. */
|
|
785
|
+
archive?(threadId: string): Promise<void>;
|
|
786
|
+
/** Restore an archived thread to the active list. */
|
|
787
|
+
unarchive?(threadId: string): Promise<void>;
|
|
788
|
+
/** Mark the thread as pinned. */
|
|
789
|
+
pin?(threadId: string): Promise<void>;
|
|
790
|
+
/** Unpin a previously pinned thread. */
|
|
791
|
+
unpin?(threadId: string): Promise<void>;
|
|
792
|
+
/** Move thread to a project (or pass null to remove from any project).
|
|
793
|
+
* Optimistically hides the row from the current project's visible list;
|
|
794
|
+
* consumer is expected to refresh the threads input. */
|
|
795
|
+
moveToProject?(threadId: string, projectId: string | null): Promise<void>;
|
|
796
|
+
/** Reorder a pinned thread. `beforeId` is the id of the pinned thread it
|
|
797
|
+
* should be placed before, or null to move to the end of the pinned list.
|
|
798
|
+
* Framework optimistically reorders the visible list and awaits this
|
|
799
|
+
* method; rejection rolls back. */
|
|
800
|
+
reorderPinned?(threadId: string, beforeId: string | null): Promise<void>;
|
|
801
|
+
}
|
|
802
|
+
declare class ChatThreadListComponent {
|
|
803
|
+
readonly threads: _angular_core.InputSignal<Thread[]>;
|
|
804
|
+
readonly activeThreadId: _angular_core.InputSignal<string>;
|
|
805
|
+
readonly showNewThreadButton: _angular_core.InputSignal<boolean>;
|
|
806
|
+
readonly actions: _angular_core.InputSignal<ThreadActionAdapter | null>;
|
|
807
|
+
readonly mode: _angular_core.InputSignal<"active" | "archived">;
|
|
808
|
+
readonly projects: _angular_core.InputSignal<Project[] | null>;
|
|
809
|
+
readonly threadSelected: _angular_core.OutputEmitterRef<string>;
|
|
810
|
+
readonly newThreadRequested: _angular_core.OutputEmitterRef<void>;
|
|
811
|
+
readonly templateRef: _angular_core.Signal<TemplateRef<any> | undefined>;
|
|
812
|
+
protected readonly editingThreadId: _angular_core.WritableSignal<string | null>;
|
|
813
|
+
protected readonly editingValue: _angular_core.WritableSignal<string>;
|
|
814
|
+
protected readonly menuOpenForId: _angular_core.WritableSignal<string | null>;
|
|
815
|
+
protected readonly menuAnchor: _angular_core.WritableSignal<HTMLElement | null>;
|
|
816
|
+
/** Cursor-anchored position when the menu was opened via right-click.
|
|
817
|
+
* Mutually exclusive with `menuAnchor` — set one, null the other. */
|
|
818
|
+
protected readonly menuAnchorPos: _angular_core.WritableSignal<{
|
|
819
|
+
x: number;
|
|
820
|
+
y: number;
|
|
821
|
+
} | null>;
|
|
822
|
+
protected readonly confirmDeleteId: _angular_core.WritableSignal<string | null>;
|
|
823
|
+
protected readonly moveMenuOpenForId: _angular_core.WritableSignal<string | null>;
|
|
824
|
+
protected readonly moveMenuItems: _angular_core.Signal<OverflowMenuItem[]>;
|
|
825
|
+
/** Ids hidden from the rendered list during pending delete, archive, or
|
|
826
|
+
* unarchive. The framework doesn't distinguish — all three actions hide
|
|
827
|
+
* the row from the current list until the adapter promise settles. */
|
|
828
|
+
private readonly pendingHidden;
|
|
829
|
+
private readonly pendingRenames;
|
|
830
|
+
/** Pending reorder overrides for pinned threads. Each entry: "move this id
|
|
831
|
+
* to before that id (or to end if null)". Cleared in `finally` after the
|
|
832
|
+
* adapter call settles. */
|
|
833
|
+
private readonly pendingOrder;
|
|
834
|
+
/** Id of the thread currently being dragged via HTML5 drag-and-drop. */
|
|
835
|
+
protected readonly draggingThreadId: _angular_core.WritableSignal<string | null>;
|
|
836
|
+
/** Drop target during a drag: which row, and whether the indicator shows
|
|
837
|
+
* on the top edge ('before') or bottom edge ('after'). */
|
|
838
|
+
protected readonly dropTarget: _angular_core.WritableSignal<{
|
|
839
|
+
threadId: string;
|
|
840
|
+
position: "before" | "after";
|
|
841
|
+
} | null>;
|
|
842
|
+
protected readonly visibleThreads: _angular_core.Signal<Thread[]>;
|
|
843
|
+
protected readonly currentMenuItems: _angular_core.Signal<OverflowMenuItem[]>;
|
|
844
|
+
private readonly editInput;
|
|
845
|
+
selectThread(threadId: string): void;
|
|
846
|
+
protected threadLabel(thread: Thread): string;
|
|
847
|
+
protected relativeTime(epochMs: number): string;
|
|
848
|
+
protected showKebab(): boolean;
|
|
849
|
+
protected openMenu(threadId: string, anchor: HTMLElement): void;
|
|
850
|
+
/** Right-click on a row opens the same overflow menu anchored at the
|
|
851
|
+
* cursor. Always prevents the native context menu — including when the
|
|
852
|
+
* adapter exposes no row actions (in which case we open nothing rather
|
|
853
|
+
* than confusing the user with the OS menu on what looks like a custom
|
|
854
|
+
* list). */
|
|
855
|
+
protected onRowContextMenu(threadId: string, event: MouseEvent): void;
|
|
856
|
+
/** First grapheme of a title rendered as an uppercase initial for the
|
|
857
|
+
* collapsed sidenav. Falls back to "?" for empty/whitespace titles. */
|
|
858
|
+
protected initialOf(title: string): string;
|
|
859
|
+
protected onMenuAction(id: string): void;
|
|
860
|
+
protected performPin(threadId: string): Promise<void>;
|
|
861
|
+
protected performUnpin(threadId: string): Promise<void>;
|
|
862
|
+
protected onEditInput(e: Event): void;
|
|
863
|
+
protected cancelRename(): void;
|
|
864
|
+
protected commitRename(threadId: string): Promise<void>;
|
|
865
|
+
protected performDelete(): Promise<void>;
|
|
866
|
+
protected performArchive(threadId: string): Promise<void>;
|
|
867
|
+
protected onMoveMenuAction(itemId: string): void;
|
|
868
|
+
protected performMoveToProject(threadId: string, projectId: string | null): Promise<void>;
|
|
869
|
+
protected performReorderPinned(threadId: string, beforeId: string | null): Promise<void>;
|
|
870
|
+
protected performMoveUp(threadId: string): Promise<void>;
|
|
871
|
+
protected performMoveDown(threadId: string): Promise<void>;
|
|
872
|
+
protected onDragStart(e: DragEvent, threadId: string): void;
|
|
873
|
+
protected onDragOver(e: DragEvent, threadId: string): void;
|
|
874
|
+
protected onDragLeave(_e: DragEvent, threadId: string): void;
|
|
875
|
+
protected onDrop(e: DragEvent, targetThreadId: string): void;
|
|
876
|
+
protected onDragEnd(): void;
|
|
877
|
+
protected dropPositionFor(threadId: string): 'before' | 'after' | null;
|
|
878
|
+
protected performUnarchive(threadId: string): Promise<void>;
|
|
879
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ChatThreadListComponent, never>;
|
|
880
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ChatThreadListComponent, "chat-thread-list", never, { "threads": { "alias": "threads"; "required": true; "isSignal": true; }; "activeThreadId": { "alias": "activeThreadId"; "required": false; "isSignal": true; }; "showNewThreadButton": { "alias": "showNewThreadButton"; "required": false; "isSignal": true; }; "actions": { "alias": "actions"; "required": false; "isSignal": true; }; "mode": { "alias": "mode"; "required": false; "isSignal": true; }; "projects": { "alias": "projects"; "required": false; "isSignal": true; }; }, { "threadSelected": "threadSelected"; "newThreadRequested": "newThreadRequested"; }, ["templateRef"], never, true, never>;
|
|
881
|
+
}
|
|
882
|
+
|
|
883
|
+
declare class ChatGenuiSkeletonComponent {
|
|
884
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ChatGenuiSkeletonComponent, never>;
|
|
885
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ChatGenuiSkeletonComponent, "chat-genui-skeleton", never, {}, {}, never, never, true, never>;
|
|
886
|
+
}
|
|
887
|
+
|
|
888
|
+
declare class ChatTimelineComponent {
|
|
889
|
+
readonly agent: _angular_core.InputSignal<AgentWithHistory>;
|
|
890
|
+
readonly checkpointSelected: _angular_core.OutputEmitterRef<AgentCheckpoint>;
|
|
891
|
+
readonly templateRef: _angular_core.Signal<TemplateRef<any> | undefined>;
|
|
892
|
+
readonly history: _angular_core.Signal<AgentCheckpoint[]>;
|
|
893
|
+
selectCheckpoint(cp: AgentCheckpoint): void;
|
|
894
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ChatTimelineComponent, never>;
|
|
895
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ChatTimelineComponent, "chat-timeline", never, { "agent": { "alias": "agent"; "required": true; "isSignal": true; }; }, { "checkpointSelected": "checkpointSelected"; }, ["templateRef"], never, true, never>;
|
|
896
|
+
}
|
|
897
|
+
|
|
898
|
+
declare class ChatGenerativeUiComponent {
|
|
899
|
+
readonly spec: _angular_core.InputSignal<Spec | null>;
|
|
900
|
+
readonly registry: _angular_core.InputSignal<AngularRegistry | undefined>;
|
|
901
|
+
readonly store: _angular_core.InputSignal<StateStore | undefined>;
|
|
902
|
+
readonly handlers: _angular_core.InputSignal<Record<string, (params: Record<string, unknown>) => unknown | Promise<unknown>> | undefined>;
|
|
903
|
+
readonly loading: _angular_core.InputSignal<boolean>;
|
|
904
|
+
readonly events: _angular_core.OutputEmitterRef<RenderEvent>;
|
|
905
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ChatGenerativeUiComponent, never>;
|
|
906
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ChatGenerativeUiComponent, "chat-generative-ui", never, { "spec": { "alias": "spec"; "required": false; "isSignal": true; }; "registry": { "alias": "registry"; "required": false; "isSignal": true; }; "store": { "alias": "store"; "required": false; "isSignal": true; }; "handlers": { "alias": "handlers"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; }, { "events": "events"; }, never, never, true, never>;
|
|
907
|
+
}
|
|
908
|
+
|
|
909
|
+
/**
|
|
910
|
+
* Empty-state owner. Renders a centered greeting + slot-projected input +
|
|
911
|
+
* optional vertical suggestion rows. Mounted only when the parent chat has
|
|
912
|
+
* no messages and welcome is not disabled.
|
|
913
|
+
*
|
|
914
|
+
* Slots:
|
|
915
|
+
* [chatWelcomeTitle] — replaces the default <h1> "How can I help?"
|
|
916
|
+
* [chatWelcomeInput] — projects the chat input into the center column
|
|
917
|
+
* [chatWelcomeSuggestions] — projects suggestion rows below the input
|
|
918
|
+
*
|
|
919
|
+
* Host CSS variables (override on :host or any ancestor):
|
|
920
|
+
* --ngaf-chat-welcome-max-width default 36rem
|
|
921
|
+
* --ngaf-chat-welcome-gap default 1.25rem
|
|
922
|
+
* --ngaf-chat-welcome-padding default 24px
|
|
923
|
+
*/
|
|
924
|
+
declare class ChatWelcomeComponent {
|
|
925
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ChatWelcomeComponent, never>;
|
|
926
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ChatWelcomeComponent, "chat-welcome", never, {}, {}, never, ["[chatWelcomeTitle]", "[chatWelcomeInput]", "[chatWelcomeSuggestions]"], true, never>;
|
|
927
|
+
}
|
|
928
|
+
|
|
929
|
+
declare class ChatWelcomeSuggestionComponent {
|
|
930
|
+
readonly label: _angular_core.InputSignal<string>;
|
|
931
|
+
readonly value: _angular_core.InputSignal<string>;
|
|
932
|
+
readonly selected: _angular_core.OutputEmitterRef<string>;
|
|
933
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ChatWelcomeSuggestionComponent, never>;
|
|
934
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ChatWelcomeSuggestionComponent, "chat-welcome-suggestion", never, { "label": { "alias": "label"; "required": true; "isSignal": true; }; "value": { "alias": "value"; "required": true; "isSignal": true; }; }, { "selected": "selected"; }, never, ["[chatWelcomeSuggestionIcon]"], true, never>;
|
|
935
|
+
}
|
|
936
|
+
|
|
937
|
+
interface ChatSelectOption {
|
|
938
|
+
value: string;
|
|
939
|
+
label: string;
|
|
940
|
+
disabled?: boolean;
|
|
941
|
+
}
|
|
942
|
+
/**
|
|
943
|
+
* Generic single-select dropdown. Designed to slot into the chat input pill
|
|
944
|
+
* (via [chatInputModelSelect]) but usable anywhere.
|
|
945
|
+
*
|
|
946
|
+
* Inputs:
|
|
947
|
+
* options — array of { value, label, disabled? }; required
|
|
948
|
+
* value — currently selected value (two-way via model())
|
|
949
|
+
* placeholder — trigger label when no option matches; default 'Select'
|
|
950
|
+
* disabled — disables the trigger; default false
|
|
951
|
+
* menuLabel — aria-label for the popover; defaults to placeholder
|
|
952
|
+
*/
|
|
953
|
+
declare class ChatSelectComponent {
|
|
954
|
+
readonly options: _angular_core.InputSignal<readonly ChatSelectOption[]>;
|
|
955
|
+
readonly value: _angular_core.ModelSignal<string>;
|
|
956
|
+
readonly placeholder: _angular_core.InputSignal<string>;
|
|
957
|
+
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
958
|
+
readonly menuLabel: _angular_core.InputSignal<string | undefined>;
|
|
959
|
+
protected readonly open: _angular_core.WritableSignal<boolean>;
|
|
960
|
+
protected readonly currentLabel: _angular_core.Signal<string>;
|
|
961
|
+
private readonly hostEl;
|
|
962
|
+
private readonly document;
|
|
963
|
+
private readonly destroyRef;
|
|
964
|
+
constructor();
|
|
965
|
+
protected toggle(): void;
|
|
966
|
+
protected selectOption(opt: ChatSelectOption): void;
|
|
967
|
+
protected onTriggerKeydown(e: KeyboardEvent): void;
|
|
968
|
+
protected onMenuKeydown(e: KeyboardEvent): void;
|
|
969
|
+
private focusOption;
|
|
970
|
+
private focusTrigger;
|
|
971
|
+
private moveFocus;
|
|
972
|
+
private queryOptions;
|
|
973
|
+
private queryTrigger;
|
|
974
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ChatSelectComponent, never>;
|
|
975
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ChatSelectComponent, "chat-select", never, { "options": { "alias": "options"; "required": true; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "menuLabel": { "alias": "menuLabel"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; }, never, never, true, never>;
|
|
976
|
+
}
|
|
977
|
+
|
|
978
|
+
/**
|
|
979
|
+
* ContentChild template directive for custom citation card rendering.
|
|
980
|
+
* Usage: <ng-template chatCitationCard let-citation>...</ng-template>
|
|
981
|
+
*/
|
|
982
|
+
declare class ChatCitationCardTemplateDirective {
|
|
983
|
+
readonly tpl: TemplateRef<{
|
|
984
|
+
$implicit: Citation;
|
|
985
|
+
}>;
|
|
986
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ChatCitationCardTemplateDirective, never>;
|
|
987
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ChatCitationCardTemplateDirective, "ng-template[chatCitationCard]", never, {}, {}, never, never, true, never>;
|
|
988
|
+
}
|
|
989
|
+
declare class ChatCitationsComponent {
|
|
990
|
+
readonly message: _angular_core.InputSignal<Message>;
|
|
991
|
+
readonly heading: _angular_core.InputSignal<string>;
|
|
992
|
+
cardTpl: ChatCitationCardTemplateDirective | null;
|
|
993
|
+
/**
|
|
994
|
+
* Optional resolver — present when chat-citations is rendered inside a
|
|
995
|
+
* chat-message that provides CitationsResolverService (the standard
|
|
996
|
+
* placement). When absent, the panel reads only Message.citations.
|
|
997
|
+
*/
|
|
998
|
+
private readonly resolver;
|
|
999
|
+
/**
|
|
1000
|
+
* Combined citation list:
|
|
1001
|
+
* 1. Message.citations (provider-populated, takes precedence by id)
|
|
1002
|
+
* 2. Markdown sidecar defs (Pandoc-formatted [^id]: lines), merged in
|
|
1003
|
+
* for any id not already present.
|
|
1004
|
+
*
|
|
1005
|
+
* Sorted by index ascending. This guarantees the sources panel surfaces
|
|
1006
|
+
* citations whether they come from message metadata, content syntax, or
|
|
1007
|
+
* both — matching the same precedence as inline-marker resolution.
|
|
1008
|
+
*/
|
|
1009
|
+
protected readonly citations: _angular_core.Signal<Citation[]>;
|
|
1010
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ChatCitationsComponent, never>;
|
|
1011
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ChatCitationsComponent, "chat-citations", never, { "message": { "alias": "message"; "required": true; "isSignal": true; }; "heading": { "alias": "heading"; "required": false; "isSignal": true; }; }, {}, ["cardTpl"], never, true, never>;
|
|
1012
|
+
}
|
|
1013
|
+
|
|
1014
|
+
declare class ChatCitationsCardComponent {
|
|
1015
|
+
readonly citation: _angular_core.InputSignal<Citation>;
|
|
1016
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ChatCitationsCardComponent, never>;
|
|
1017
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ChatCitationsCardComponent, "chat-citations-card", never, { "citation": { "alias": "citation"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1018
|
+
}
|
|
1019
|
+
|
|
1020
|
+
interface ChatLifecycle {
|
|
1021
|
+
/** True after `<chat>` initializes with a non-null agent binding. */
|
|
1022
|
+
readonly componentReady: Signal<boolean>;
|
|
1023
|
+
/** True after the first user submit. Sticky for the life of the chat instance — does NOT reset on clearThread. */
|
|
1024
|
+
readonly firstMessageSent: Signal<boolean>;
|
|
1025
|
+
/** Count of user submits. Resets on clearThread. */
|
|
1026
|
+
readonly messageCount: Signal<number>;
|
|
1027
|
+
/** Epoch ms of the most recent user submit. Resets on clearThread. */
|
|
1028
|
+
readonly inputSubmittedAt: Signal<number | null>;
|
|
1029
|
+
}
|
|
1030
|
+
declare const CHAT_LIFECYCLE: InjectionToken<ChatLifecycle>;
|
|
1031
|
+
|
|
1032
|
+
interface ElementAccumulationState {
|
|
1033
|
+
hasType: boolean;
|
|
1034
|
+
hasProps: boolean;
|
|
1035
|
+
hasChildren: boolean;
|
|
1036
|
+
streaming: boolean;
|
|
1037
|
+
}
|
|
1038
|
+
interface ParseTreeStore {
|
|
1039
|
+
push(chunk: string): void;
|
|
1040
|
+
readonly spec: Signal<Spec | null>;
|
|
1041
|
+
readonly elementStates: Signal<Map<string, ElementAccumulationState>>;
|
|
1042
|
+
}
|
|
1043
|
+
declare function createParseTreeStore(parser: PartialJsonParser): ParseTreeStore;
|
|
1044
|
+
|
|
1045
|
+
/** Chat-internal projection of an A2UI component, materialized by the
|
|
1046
|
+
* surface store. Distinct from the wire-format `A2uiComponent` in
|
|
1047
|
+
* `@threadplane/a2ui` (which carries the raw `component: A2uiComponentDef`
|
|
1048
|
+
* payload) — this type adds the per-component readiness fields the
|
|
1049
|
+
* progressive renderer consumes. */
|
|
1050
|
+
interface A2uiComponentView {
|
|
1051
|
+
/** The component's id (same as the wire-format `A2uiComponent.id`). */
|
|
1052
|
+
readonly id: string;
|
|
1053
|
+
/** The component type key — e.g. `'Button'`, `'TextField'` — matched
|
|
1054
|
+
* against catalog `views` entries. */
|
|
1055
|
+
readonly type: string;
|
|
1056
|
+
/** Data model paths this component references via its `{$.path}` prop
|
|
1057
|
+
* expressions. Extracted once on `surfaceUpdate` apply; immutable. */
|
|
1058
|
+
readonly bindings: readonly string[];
|
|
1059
|
+
/** Monotonic: `false` until every binding has resolved at least once
|
|
1060
|
+
* in the accumulated data model, then `true` forever. Once `true`,
|
|
1061
|
+
* subsequent `dataModelUpdate` envelopes push new prop values but do
|
|
1062
|
+
* NOT flip this back to `false`. */
|
|
1063
|
+
readonly ready: boolean;
|
|
1064
|
+
/** Resolved property bag. Meaningful only when `ready === true`. */
|
|
1065
|
+
readonly props: Readonly<Record<string, unknown>>;
|
|
1066
|
+
/** The raw wire-format component def, retained so the slot directive
|
|
1067
|
+
* can look up the catalog entry by type and resolve nested children
|
|
1068
|
+
* on re-renders. */
|
|
1069
|
+
readonly def: A2uiComponentDef;
|
|
1070
|
+
}
|
|
1071
|
+
|
|
1072
|
+
/** Chat-side state for a surface — wraps the wire-format `A2uiSurface`
|
|
1073
|
+
* with the per-component projection the progressive renderer consumes.
|
|
1074
|
+
* Both maps are kept in sync; the wire shape preserves existing
|
|
1075
|
+
* `surfaceToSpec` semantics, the view shape carries readiness. */
|
|
1076
|
+
interface A2uiSurfaceState {
|
|
1077
|
+
readonly surface: A2uiSurface;
|
|
1078
|
+
readonly componentViews: ReadonlyMap<string, A2uiComponentView>;
|
|
1079
|
+
}
|
|
1080
|
+
interface A2uiSurfaceStore {
|
|
1081
|
+
apply(message: A2uiMessage): void;
|
|
1082
|
+
/**
|
|
1083
|
+
* Live-stream entry point. Iterates envelopes and feeds each through
|
|
1084
|
+
* `apply()`. Records the tool_call_id so the wrapped-content classifier
|
|
1085
|
+
* can short-circuit duplicate dispatch when the final AIMessage arrives.
|
|
1086
|
+
*/
|
|
1087
|
+
applyPartialArgs(toolCallId: string, envelopes: readonly A2uiMessage[]): void;
|
|
1088
|
+
/** True if a tool_call_id has produced live envelopes via applyPartialArgs. */
|
|
1089
|
+
isPartialLive(toolCallId: string): boolean;
|
|
1090
|
+
/** Wire-format surfaces, for downstream consumers (e.g. surfaceToSpec). */
|
|
1091
|
+
readonly surfaces: Signal<Map<string, A2uiSurface>>;
|
|
1092
|
+
surface(surfaceId: string): Signal<A2uiSurface | undefined>;
|
|
1093
|
+
/** Chat-side projections with per-component readiness. */
|
|
1094
|
+
readonly surfaceStates: Signal<Map<string, A2uiSurfaceState>>;
|
|
1095
|
+
surfaceState(surfaceId: string): Signal<A2uiSurfaceState | undefined>;
|
|
1096
|
+
}
|
|
1097
|
+
declare function createA2uiSurfaceStore(): A2uiSurfaceStore;
|
|
1098
|
+
|
|
1099
|
+
type ContentType = 'pending' | 'markdown' | 'json-render' | 'a2ui' | 'mixed';
|
|
1100
|
+
interface ContentClassifier {
|
|
1101
|
+
update(content: string): void;
|
|
1102
|
+
readonly type: Signal<ContentType>;
|
|
1103
|
+
readonly markdown: Signal<string>;
|
|
1104
|
+
readonly spec: Signal<Spec | null>;
|
|
1105
|
+
readonly elementStates: Signal<Map<string, ElementAccumulationState>>;
|
|
1106
|
+
readonly a2uiSurfaces: Signal<Map<string, A2uiSurface>>;
|
|
1107
|
+
readonly a2uiSurfaceStates: Signal<Map<string, A2uiSurfaceState>>;
|
|
1108
|
+
readonly streaming: Signal<boolean>;
|
|
1109
|
+
readonly errors: Signal<string[]>;
|
|
1110
|
+
dispose(): void;
|
|
1111
|
+
}
|
|
1112
|
+
declare function createContentClassifier(): ContentClassifier;
|
|
1113
|
+
|
|
1114
|
+
/**
|
|
1115
|
+
* Extracts a human-readable string from a message's content.
|
|
1116
|
+
*
|
|
1117
|
+
* `BaseMessage.content` is `string | MessageContentComplex[]`. Reasoning-
|
|
1118
|
+
* capable models (OpenAI gpt-5/o-series, Anthropic) emit complex arrays of
|
|
1119
|
+
* typed blocks: `{type:'text',text}`, `{type:'reasoning',...}`, tool-use
|
|
1120
|
+
* blocks, etc. We render only the visible text portions and skip anything
|
|
1121
|
+
* else. Stringifying the whole array would dump raw JSON like
|
|
1122
|
+
* `[{"type":"text",...}]` into the chat bubble.
|
|
1123
|
+
*/
|
|
1124
|
+
declare function messageContent(message: BaseMessage): string;
|
|
1125
|
+
|
|
1126
|
+
interface ChatRenderEvent {
|
|
1127
|
+
readonly messageIndex: number;
|
|
1128
|
+
readonly surfaceId?: string;
|
|
1129
|
+
readonly event: RenderEvent;
|
|
1130
|
+
}
|
|
1131
|
+
|
|
1132
|
+
declare class ChatComponent {
|
|
1133
|
+
readonly agent: _angular_core.InputSignal<Agent>;
|
|
1134
|
+
readonly views: _angular_core.InputSignal<Readonly<Record<string, _angular_core.Type<unknown> | _threadplane_render.RenderViewEntry>> | undefined>;
|
|
1135
|
+
readonly store: _angular_core.InputSignal<StateStore | undefined>;
|
|
1136
|
+
readonly handlers: _angular_core.InputSignal<Record<string, (params: Record<string, unknown>) => unknown | Promise<unknown>>>;
|
|
1137
|
+
readonly threads: _angular_core.InputSignal<Thread[]>;
|
|
1138
|
+
readonly activeThreadId: _angular_core.InputSignal<string>;
|
|
1139
|
+
readonly welcomeDisabled: _angular_core.InputSignal<boolean>;
|
|
1140
|
+
/**
|
|
1141
|
+
* High-level model-picker API. When `modelOptions` is non-empty, the chat
|
|
1142
|
+
* composition renders a `<chat-select>` inside the input pill (in BOTH
|
|
1143
|
+
* welcome and conversation modes), wired to the two-way `selectedModel`
|
|
1144
|
+
* model. Consumers who want full control should leave `modelOptions`
|
|
1145
|
+
* empty and project a `<chat-select chatInputModelSelect>` themselves.
|
|
1146
|
+
*/
|
|
1147
|
+
readonly modelOptions: _angular_core.InputSignal<readonly ChatSelectOption[]>;
|
|
1148
|
+
/**
|
|
1149
|
+
* When `false`, hide the auto-rendered model picker even when
|
|
1150
|
+
* `modelOptions` is non-empty. Useful in cramped surfaces (popup,
|
|
1151
|
+
* sidebar) where the picker crowds the input. Defaults to `true`.
|
|
1152
|
+
* Has no effect when consumers project their own
|
|
1153
|
+
* `<chat-select chatInputModelSelect>` via content projection.
|
|
1154
|
+
*/
|
|
1155
|
+
readonly showModelPicker: _angular_core.InputSignal<boolean>;
|
|
1156
|
+
readonly selectedModel: _angular_core.ModelSignal<string>;
|
|
1157
|
+
readonly modelPickerPlaceholder: _angular_core.InputSignal<string>;
|
|
1158
|
+
/**
|
|
1159
|
+
* Tool names whose calls produce a rendered GenUI surface rather than
|
|
1160
|
+
* visible text. Used to (a) filter <chat-tool-calls> so internal
|
|
1161
|
+
* dispatchers don't render args JSON as cards, and (b) detect
|
|
1162
|
+
* "this is a GenUI turn" for the building-UI skeleton.
|
|
1163
|
+
* Default covers the canonical A2UI + json-render schema tools.
|
|
1164
|
+
*/
|
|
1165
|
+
readonly genuiToolNames: _angular_core.InputSignal<readonly string[]>;
|
|
1166
|
+
readonly showWelcome: _angular_core.Signal<boolean>;
|
|
1167
|
+
readonly threadSelected: _angular_core.OutputEmitterRef<string>;
|
|
1168
|
+
readonly renderEvent: _angular_core.OutputEmitterRef<ChatRenderEvent>;
|
|
1169
|
+
/** Emitted when the user clicks the regenerate button on an assistant message. */
|
|
1170
|
+
readonly regenerate: _angular_core.OutputEmitterRef<void>;
|
|
1171
|
+
/** Emitted when the user rates an assistant message. */
|
|
1172
|
+
readonly rate: _angular_core.OutputEmitterRef<{
|
|
1173
|
+
messageIndex: number;
|
|
1174
|
+
rating: "up" | "down";
|
|
1175
|
+
}>;
|
|
1176
|
+
/** Emitted when the user copies an assistant message. */
|
|
1177
|
+
readonly messageCopy: _angular_core.OutputEmitterRef<{
|
|
1178
|
+
messageIndex: number;
|
|
1179
|
+
content: string;
|
|
1180
|
+
}>;
|
|
1181
|
+
private readonly _internalStore;
|
|
1182
|
+
readonly resolvedStore: _angular_core.Signal<StateStore | undefined>;
|
|
1183
|
+
readonly renderRegistry: _angular_core.Signal<_threadplane_render.AngularRegistry | undefined>;
|
|
1184
|
+
readonly messageContent: typeof messageContent;
|
|
1185
|
+
/**
|
|
1186
|
+
* Renderable content for a human-role message bubble. Most human
|
|
1187
|
+
* messages are typed prompts and pass through `messageContent`
|
|
1188
|
+
* unchanged. A2UI action messages (e.g. form submits, button clicks
|
|
1189
|
+
* on a rendered surface) flow through the same submit channel and
|
|
1190
|
+
* land in the message stream as a HumanMessage whose content is a
|
|
1191
|
+
* JSON-serialized `A2uiActionMessage`. Showing the raw JSON as if
|
|
1192
|
+
* the user typed it leaks the protocol; per the A2UI v0.9 spec
|
|
1193
|
+
* those events resemble tool calls more than user utterances.
|
|
1194
|
+
*
|
|
1195
|
+
* `a2uiActionLabel` returns a short human-readable label for
|
|
1196
|
+
* recognized action shapes ("Search flights", "Selected flight UA123",
|
|
1197
|
+
* etc.) — or null for any non-action content, in which case we fall
|
|
1198
|
+
* back to the original text.
|
|
1199
|
+
*/
|
|
1200
|
+
protected humanContent(message: unknown): string;
|
|
1201
|
+
/**
|
|
1202
|
+
* True while a message's reasoning is mid-stream — i.e. it's the latest
|
|
1203
|
+
* message, the agent is loading, the message has reasoning content, and
|
|
1204
|
+
* no response text has arrived yet. Once the response text begins, the
|
|
1205
|
+
* reasoning pill collapses (per its internal logic).
|
|
1206
|
+
*/
|
|
1207
|
+
protected isReasoningStreaming(message: Message, index: number): boolean;
|
|
1208
|
+
private readonly classifiers;
|
|
1209
|
+
private readonly destroyRef;
|
|
1210
|
+
private readonly lifecycle;
|
|
1211
|
+
private eventsSubscribed;
|
|
1212
|
+
/**
|
|
1213
|
+
* Shared A2UI surface store fed by the live partial-args bridge. The
|
|
1214
|
+
* content-classifier path will share this store via tool_call_id
|
|
1215
|
+
* short-circuit (skipping re-dispatch for live tool_call_ids).
|
|
1216
|
+
*/
|
|
1217
|
+
protected readonly liveSurfaceStore: A2uiSurfaceStore;
|
|
1218
|
+
private readonly partialBridge;
|
|
1219
|
+
private partialEventsLastIndex;
|
|
1220
|
+
private readonly scrollContainer;
|
|
1221
|
+
private readonly messageCount;
|
|
1222
|
+
private prevMessageCount;
|
|
1223
|
+
private wasLoading;
|
|
1224
|
+
protected readonly pinned: _angular_core.WritableSignal<boolean>;
|
|
1225
|
+
private programmaticScrollCount;
|
|
1226
|
+
private static readonly PIN_TOLERANCE_PX;
|
|
1227
|
+
/**
|
|
1228
|
+
* True iff there's a current (last-index) assistant message that's
|
|
1229
|
+
* still streaming. The bubble's own caret already signals loading;
|
|
1230
|
+
* we suppress the floor typing-indicator in that case so the user
|
|
1231
|
+
* doesn't see two loading affordances at once.
|
|
1232
|
+
*
|
|
1233
|
+
* Matches the same `streaming + current` condition the bubble uses
|
|
1234
|
+
* to enable `.chat-message__caret`:
|
|
1235
|
+
* `agent().isLoading() && i === agent().messages().length - 1`
|
|
1236
|
+
* `i === agent().messages().length - 1`
|
|
1237
|
+
*
|
|
1238
|
+
* Restricted to assistant role because the caret only renders on
|
|
1239
|
+
* assistant bubbles (`:host([data-role="assistant"][data-current=...
|
|
1240
|
+
* ][data-streaming=...])`).
|
|
1241
|
+
*/
|
|
1242
|
+
protected readonly currentAssistantStreaming: _angular_core.Signal<boolean>;
|
|
1243
|
+
constructor();
|
|
1244
|
+
prevRole(index: number): ChatMessageRole | undefined;
|
|
1245
|
+
protected onScroll(): void;
|
|
1246
|
+
protected onScrollBubbleClick(): void;
|
|
1247
|
+
protected onUserSubmitted(): void;
|
|
1248
|
+
/**
|
|
1249
|
+
* Programmatic submit. Calls `agent.submit({ message: text })` and updates
|
|
1250
|
+
* the CHAT_LIFECYCLE signals. Trimmed-empty text is a no-op.
|
|
1251
|
+
*/
|
|
1252
|
+
submitMessage(text: string): void;
|
|
1253
|
+
/**
|
|
1254
|
+
* Clears local view state (classifiers, surface store, lifecycle counters)
|
|
1255
|
+
* for a new thread.
|
|
1256
|
+
*
|
|
1257
|
+
* Resets messageCount to 0 and inputSubmittedAt to null. componentReady and
|
|
1258
|
+
* firstMessageSent are NOT reset (sticky for the chat instance lifetime).
|
|
1259
|
+
*/
|
|
1260
|
+
clearThread(): void;
|
|
1261
|
+
private recordSubmit;
|
|
1262
|
+
/**
|
|
1263
|
+
* Look up the previous message in the agent's messages list.
|
|
1264
|
+
* Returns undefined for the first message.
|
|
1265
|
+
*/
|
|
1266
|
+
protected prevMessage(index: number): unknown;
|
|
1267
|
+
/**
|
|
1268
|
+
* True when this assistant message is part of a GenUI render turn.
|
|
1269
|
+
* Walks backward through messages from `index` until it finds either
|
|
1270
|
+
* an assistant message with `tool_calls` referencing a GenUI tool
|
|
1271
|
+
* (→ this turn produces a surface) or a human message (→ the
|
|
1272
|
+
* preceding turn ended; this assistant message stands on its own).
|
|
1273
|
+
*
|
|
1274
|
+
* Also checks the message itself for:
|
|
1275
|
+
* - `extra.tool_calls[].name` matching a GenUI tool (post-streaming
|
|
1276
|
+
* state of the tool-call AI message), OR
|
|
1277
|
+
* - `extra.content[].type === 'function_call' && .name` matching
|
|
1278
|
+
* (live during the OpenAI Responses-API streaming chunks before
|
|
1279
|
+
* `tool_calls` populates).
|
|
1280
|
+
*
|
|
1281
|
+
* The walk-back approach is robust to LangGraph's in-place
|
|
1282
|
+
* replacement of the ToolMessage (which strips the `name` field),
|
|
1283
|
+
* unlike a single prev-message check.
|
|
1284
|
+
*/
|
|
1285
|
+
protected isGenuiTurn(message: unknown, _prevMsg: unknown, index?: number): boolean;
|
|
1286
|
+
classifyMessage(content: string, message: {
|
|
1287
|
+
id?: string;
|
|
1288
|
+
}): ContentClassifier;
|
|
1289
|
+
clearClassifiers(): void;
|
|
1290
|
+
onSpecEvent(event: RenderEvent, messageIndex: number): void;
|
|
1291
|
+
onA2uiAction(message: A2uiActionMessage): void;
|
|
1292
|
+
onA2uiEvent(event: RenderEvent, messageIndex: number, surfaceId: string): void;
|
|
1293
|
+
/** Regenerate the assistant response at the given message index. */
|
|
1294
|
+
onRegenerate(messageIndex: number): void;
|
|
1295
|
+
onRate(message: unknown, value: 'up' | 'down'): void;
|
|
1296
|
+
onCopy(message: unknown, content: string): void;
|
|
1297
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ChatComponent, never>;
|
|
1298
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ChatComponent, "chat", never, { "agent": { "alias": "agent"; "required": true; "isSignal": true; }; "views": { "alias": "views"; "required": false; "isSignal": true; }; "store": { "alias": "store"; "required": false; "isSignal": true; }; "handlers": { "alias": "handlers"; "required": false; "isSignal": true; }; "threads": { "alias": "threads"; "required": false; "isSignal": true; }; "activeThreadId": { "alias": "activeThreadId"; "required": false; "isSignal": true; }; "welcomeDisabled": { "alias": "welcomeDisabled"; "required": false; "isSignal": true; }; "modelOptions": { "alias": "modelOptions"; "required": false; "isSignal": true; }; "showModelPicker": { "alias": "showModelPicker"; "required": false; "isSignal": true; }; "selectedModel": { "alias": "selectedModel"; "required": false; "isSignal": true; }; "modelPickerPlaceholder": { "alias": "modelPickerPlaceholder"; "required": false; "isSignal": true; }; "genuiToolNames": { "alias": "genuiToolNames"; "required": false; "isSignal": true; }; }, { "selectedModel": "selectedModelChange"; "threadSelected": "threadSelected"; "renderEvent": "renderEvent"; "regenerate": "regenerate"; "rate": "rate"; "messageCopy": "messageCopy"; }, never, ["[chatWelcomeSuggestions]", "[chatHeader]", "[chatToolCallTemplate]", "[chatInputModelSelect]"], true, never>;
|
|
1299
|
+
}
|
|
1300
|
+
|
|
1301
|
+
declare class ChatPopupComponent {
|
|
1302
|
+
readonly agent: _angular_core.InputSignal<Agent>;
|
|
1303
|
+
/** A2UI component catalog forwarded to the inner <chat>. Without it,
|
|
1304
|
+
* messages classified as A2UI parse correctly but never mount a
|
|
1305
|
+
* surface. Pass `a2uiBasicCatalog()` from `@threadplane/chat`. */
|
|
1306
|
+
readonly views: _angular_core.InputSignal<Readonly<Record<string, _angular_core.Type<unknown> | _threadplane_render.RenderViewEntry>> | undefined>;
|
|
1307
|
+
/** Forwarded to the inner <chat>. When non-empty, a model picker pill
|
|
1308
|
+
* renders in the chat-input chrome. */
|
|
1309
|
+
readonly modelOptions: _angular_core.InputSignal<readonly ChatSelectOption[]>;
|
|
1310
|
+
/**
|
|
1311
|
+
* Forwarded to the inner `<chat>`. When `false`, hides the
|
|
1312
|
+
* auto-rendered model picker even with non-empty `modelOptions`.
|
|
1313
|
+
* Use this in narrow surfaces (the chat-sidebar panel is 28rem
|
|
1314
|
+
* wide; chat-popup is 24rem) where the picker crowds the input.
|
|
1315
|
+
* Defaults to `true`.
|
|
1316
|
+
*/
|
|
1317
|
+
readonly showModelPicker: _angular_core.InputSignal<boolean>;
|
|
1318
|
+
/** Two-way bound current model value. */
|
|
1319
|
+
readonly selectedModel: _angular_core.ModelSignal<string>;
|
|
1320
|
+
readonly open: _angular_core.ModelSignal<boolean>;
|
|
1321
|
+
/**
|
|
1322
|
+
* Keyboard shortcut (single key) that toggles the popup with cmd (mac)
|
|
1323
|
+
* or ctrl (other). Set to `null` to disable. Default: 'k' — matches the
|
|
1324
|
+
* widely-used cmd/ctrl+K convention.
|
|
1325
|
+
*/
|
|
1326
|
+
readonly shortcut: _angular_core.InputSignal<string | null>;
|
|
1327
|
+
/** Close the popup on Escape (default true). */
|
|
1328
|
+
readonly closeOnEscape: _angular_core.InputSignal<boolean>;
|
|
1329
|
+
private readonly destroyRef;
|
|
1330
|
+
private readonly document;
|
|
1331
|
+
constructor();
|
|
1332
|
+
toggle(): void;
|
|
1333
|
+
openWindow(): void;
|
|
1334
|
+
closeWindow(): void;
|
|
1335
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ChatPopupComponent, never>;
|
|
1336
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ChatPopupComponent, "chat-popup", never, { "agent": { "alias": "agent"; "required": true; "isSignal": true; }; "views": { "alias": "views"; "required": false; "isSignal": true; }; "modelOptions": { "alias": "modelOptions"; "required": false; "isSignal": true; }; "showModelPicker": { "alias": "showModelPicker"; "required": false; "isSignal": true; }; "selectedModel": { "alias": "selectedModel"; "required": false; "isSignal": true; }; "open": { "alias": "open"; "required": false; "isSignal": true; }; "shortcut": { "alias": "shortcut"; "required": false; "isSignal": true; }; "closeOnEscape": { "alias": "closeOnEscape"; "required": false; "isSignal": true; }; }, { "selectedModel": "selectedModelChange"; "open": "openChange"; }, never, ["[chatHeader]", "[chatWelcomeSuggestions]"], true, never>;
|
|
1337
|
+
}
|
|
1338
|
+
|
|
1339
|
+
declare class ChatSidebarComponent {
|
|
1340
|
+
readonly agent: _angular_core.InputSignal<Agent>;
|
|
1341
|
+
/** A2UI component catalog forwarded to the inner <chat>. Without it,
|
|
1342
|
+
* messages classified as A2UI parse correctly but never mount a
|
|
1343
|
+
* surface. Pass `a2uiBasicCatalog()` from `@threadplane/chat`. */
|
|
1344
|
+
readonly views: _angular_core.InputSignal<Readonly<Record<string, _angular_core.Type<unknown> | _threadplane_render.RenderViewEntry>> | undefined>;
|
|
1345
|
+
/** Forwarded to the inner <chat>. When non-empty, a model picker pill
|
|
1346
|
+
* renders in the chat-input chrome. */
|
|
1347
|
+
readonly modelOptions: _angular_core.InputSignal<readonly ChatSelectOption[]>;
|
|
1348
|
+
/**
|
|
1349
|
+
* Forwarded to the inner `<chat>`. When `false`, hides the
|
|
1350
|
+
* auto-rendered model picker even with non-empty `modelOptions`.
|
|
1351
|
+
* Use this in narrow surfaces (the chat-sidebar panel is 28rem
|
|
1352
|
+
* wide; chat-popup is 24rem) where the picker crowds the input.
|
|
1353
|
+
* Defaults to `true`.
|
|
1354
|
+
*/
|
|
1355
|
+
readonly showModelPicker: _angular_core.InputSignal<boolean>;
|
|
1356
|
+
/** Two-way bound current model value. */
|
|
1357
|
+
readonly selectedModel: _angular_core.ModelSignal<string>;
|
|
1358
|
+
readonly open: _angular_core.ModelSignal<boolean>;
|
|
1359
|
+
/** Close the sidebar on Escape (default true). */
|
|
1360
|
+
readonly closeOnEscape: _angular_core.InputSignal<boolean>;
|
|
1361
|
+
readonly pushContent: _angular_core.InputSignal<boolean>;
|
|
1362
|
+
private readonly document;
|
|
1363
|
+
constructor();
|
|
1364
|
+
toggle(): void;
|
|
1365
|
+
openWindow(): void;
|
|
1366
|
+
closeWindow(): void;
|
|
1367
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ChatSidebarComponent, never>;
|
|
1368
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ChatSidebarComponent, "chat-sidebar", never, { "agent": { "alias": "agent"; "required": true; "isSignal": true; }; "views": { "alias": "views"; "required": false; "isSignal": true; }; "modelOptions": { "alias": "modelOptions"; "required": false; "isSignal": true; }; "showModelPicker": { "alias": "showModelPicker"; "required": false; "isSignal": true; }; "selectedModel": { "alias": "selectedModel"; "required": false; "isSignal": true; }; "open": { "alias": "open"; "required": false; "isSignal": true; }; "closeOnEscape": { "alias": "closeOnEscape"; "required": false; "isSignal": true; }; "pushContent": { "alias": "pushContent"; "required": false; "isSignal": true; }; }, { "selectedModel": "selectedModelChange"; "open": "openChange"; }, never, ["*", "[chatSidebarPanelTitle]", "[chatHeader]", "[chatWelcomeSuggestions]"], true, never>;
|
|
1369
|
+
}
|
|
1370
|
+
|
|
1371
|
+
declare class ChatTimelineSliderComponent {
|
|
1372
|
+
readonly agent: _angular_core.InputSignal<AgentWithHistory>;
|
|
1373
|
+
readonly selectedIndex: _angular_core.WritableSignal<number>;
|
|
1374
|
+
readonly history: _angular_core.Signal<AgentCheckpoint[]>;
|
|
1375
|
+
readonly replayRequested: _angular_core.OutputEmitterRef<string>;
|
|
1376
|
+
readonly forkRequested: _angular_core.OutputEmitterRef<string>;
|
|
1377
|
+
replay(cp: AgentCheckpoint): void;
|
|
1378
|
+
fork(cp: AgentCheckpoint, index: number): void;
|
|
1379
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ChatTimelineSliderComponent, never>;
|
|
1380
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ChatTimelineSliderComponent, "chat-timeline-slider", never, { "agent": { "alias": "agent"; "required": true; "isSignal": true; }; }, { "replayRequested": "replayRequested"; "forkRequested": "forkRequested"; }, never, never, true, never>;
|
|
1381
|
+
}
|
|
1382
|
+
|
|
1383
|
+
type ChatSidenavMode = 'expanded' | 'collapsed' | 'drawer';
|
|
1384
|
+
declare class ChatSidenavComponent {
|
|
1385
|
+
readonly mode: _angular_core.InputSignal<ChatSidenavMode>;
|
|
1386
|
+
readonly open: _angular_core.InputSignal<boolean>;
|
|
1387
|
+
readonly threads: _angular_core.InputSignal<Thread[] | null>;
|
|
1388
|
+
readonly activeThreadId: _angular_core.InputSignal<string | null>;
|
|
1389
|
+
readonly actions: _angular_core.InputSignal<ThreadActionAdapter | null>;
|
|
1390
|
+
readonly archivedThreads: _angular_core.InputSignal<Thread[] | null>;
|
|
1391
|
+
readonly projects: _angular_core.InputSignal<Project[] | null>;
|
|
1392
|
+
readonly selectedProjectId: _angular_core.InputSignal<string | null>;
|
|
1393
|
+
readonly projectActions: _angular_core.InputSignal<ProjectActionAdapter | null>;
|
|
1394
|
+
readonly agent: _angular_core.InputSignal<Agent | AgentWithHistory | null>;
|
|
1395
|
+
readonly debug: _angular_core.InputSignal<boolean>;
|
|
1396
|
+
readonly newChat: _angular_core.OutputEmitterRef<void>;
|
|
1397
|
+
readonly threadSelected: _angular_core.OutputEmitterRef<string>;
|
|
1398
|
+
readonly searchOpened: _angular_core.OutputEmitterRef<void>;
|
|
1399
|
+
readonly openChange: _angular_core.OutputEmitterRef<boolean>;
|
|
1400
|
+
readonly modeChange: _angular_core.OutputEmitterRef<ChatSidenavMode>;
|
|
1401
|
+
readonly projectSelected: _angular_core.OutputEmitterRef<string>;
|
|
1402
|
+
readonly newProjectRequested: _angular_core.OutputEmitterRef<void>;
|
|
1403
|
+
protected readonly archivedOpen: _angular_core.WritableSignal<boolean>;
|
|
1404
|
+
protected readonly showDebugButton: _angular_core.Signal<boolean>;
|
|
1405
|
+
protected readonly isDebugStreaming: _angular_core.Signal<boolean>;
|
|
1406
|
+
private readonly destroyRef;
|
|
1407
|
+
private readonly injector;
|
|
1408
|
+
private readonly debugHost;
|
|
1409
|
+
private debugRef;
|
|
1410
|
+
private debugOutputSubscriptions;
|
|
1411
|
+
private currentDebugDock;
|
|
1412
|
+
constructor();
|
|
1413
|
+
protected openDebug(event: MouseEvent): void;
|
|
1414
|
+
protected onEscape(): void;
|
|
1415
|
+
protected onCollapseToggle(): void;
|
|
1416
|
+
private ensureDebugPanel;
|
|
1417
|
+
private destroyDebug;
|
|
1418
|
+
private defaultDebugDock;
|
|
1419
|
+
private setDebugEdgeClaim;
|
|
1420
|
+
private clearDebugEdgeClaim;
|
|
1421
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ChatSidenavComponent, never>;
|
|
1422
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ChatSidenavComponent, "chat-sidenav", never, { "mode": { "alias": "mode"; "required": false; "isSignal": true; }; "open": { "alias": "open"; "required": false; "isSignal": true; }; "threads": { "alias": "threads"; "required": false; "isSignal": true; }; "activeThreadId": { "alias": "activeThreadId"; "required": false; "isSignal": true; }; "actions": { "alias": "actions"; "required": false; "isSignal": true; }; "archivedThreads": { "alias": "archivedThreads"; "required": false; "isSignal": true; }; "projects": { "alias": "projects"; "required": false; "isSignal": true; }; "selectedProjectId": { "alias": "selectedProjectId"; "required": false; "isSignal": true; }; "projectActions": { "alias": "projectActions"; "required": false; "isSignal": true; }; "agent": { "alias": "agent"; "required": false; "isSignal": true; }; "debug": { "alias": "debug"; "required": false; "isSignal": true; }; }, { "newChat": "newChat"; "threadSelected": "threadSelected"; "searchOpened": "searchOpened"; "openChange": "openChange"; "modeChange": "modeChange"; "projectSelected": "projectSelected"; "newProjectRequested": "newProjectRequested"; }, never, ["[sidenavHeader]", "[sidenavPrimary]", "[sidenavSections]", "[sidenavFooterLeft]", "[sidenavFooterRight]", "[sidenavAccount]"], true, never>;
|
|
1423
|
+
}
|
|
1424
|
+
|
|
1425
|
+
/**
|
|
1426
|
+
* Backdrop scrim for chat-sidenav's drawer mode, rendered as a sibling of
|
|
1427
|
+
* <chat-sidenav> so its z-index sits cleanly between the page content
|
|
1428
|
+
* and the drawer host (escapes the drawer host's stacking context).
|
|
1429
|
+
*
|
|
1430
|
+
* Usage:
|
|
1431
|
+
* <chat-sidenav-scrim [open]="drawerOpen()" (dismiss)="drawerOpen.set(false)" />
|
|
1432
|
+
* <chat-sidenav [(open)]="drawerOpen" ...></chat-sidenav>
|
|
1433
|
+
*/
|
|
1434
|
+
declare class ChatSidenavScrimComponent {
|
|
1435
|
+
/** When true, render the backdrop button covering the viewport. */
|
|
1436
|
+
readonly open: _angular_core.InputSignal<boolean>;
|
|
1437
|
+
/** Fires when the user clicks the backdrop. */
|
|
1438
|
+
readonly dismiss: _angular_core.OutputEmitterRef<void>;
|
|
1439
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ChatSidenavScrimComponent, never>;
|
|
1440
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ChatSidenavScrimComponent, "chat-sidenav-scrim", never, { "open": { "alias": "open"; "required": false; "isSignal": true; }; }, { "dismiss": "dismiss"; }, never, never, true, never>;
|
|
1441
|
+
}
|
|
1442
|
+
|
|
1443
|
+
type InterruptAction = 'accept' | 'edit' | 'respond' | 'ignore';
|
|
1444
|
+
declare class ChatInterruptPanelComponent {
|
|
1445
|
+
readonly agent: _angular_core.InputSignal<Agent>;
|
|
1446
|
+
readonly action: _angular_core.OutputEmitterRef<InterruptAction>;
|
|
1447
|
+
readonly interrupt: _angular_core.Signal<AgentInterrupt | undefined>;
|
|
1448
|
+
readonly interruptReason: _angular_core.Signal<string>;
|
|
1449
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ChatInterruptPanelComponent, never>;
|
|
1450
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ChatInterruptPanelComponent, "chat-interrupt-panel", never, { "agent": { "alias": "agent"; "required": true; "isSignal": true; }; }, { "action": "action"; }, never, never, true, never>;
|
|
1451
|
+
}
|
|
1452
|
+
|
|
1453
|
+
/**
|
|
1454
|
+
* Returns a CSS style string for a subagent's status badge.
|
|
1455
|
+
* Kept exported for backward compatibility with existing consumers; the
|
|
1456
|
+
* preferred way to style status visually is via the `data-status` attribute
|
|
1457
|
+
* + CSS selectors (see component styles below).
|
|
1458
|
+
*/
|
|
1459
|
+
declare function statusColor(status: SubagentStatus): string;
|
|
1460
|
+
declare class ChatSubagentCardComponent {
|
|
1461
|
+
readonly subagent: _angular_core.InputSignal<Subagent>;
|
|
1462
|
+
readonly state: _angular_core.Signal<TraceState>;
|
|
1463
|
+
readonly latestMessageContent: _angular_core.Signal<string>;
|
|
1464
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ChatSubagentCardComponent, never>;
|
|
1465
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ChatSubagentCardComponent, "chat-subagent-card", never, { "subagent": { "alias": "subagent"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1466
|
+
}
|
|
1467
|
+
|
|
1468
|
+
interface ResolvedCitation {
|
|
1469
|
+
source: 'message' | 'markdown';
|
|
1470
|
+
citation: Citation;
|
|
1471
|
+
}
|
|
1472
|
+
declare class CitationsResolverService {
|
|
1473
|
+
readonly message: _angular_core.WritableSignal<Message | null>;
|
|
1474
|
+
readonly markdownDefs: _angular_core.WritableSignal<Map<string, CitationDefinition>>;
|
|
1475
|
+
lookup(refId: string): Signal<ResolvedCitation | null>;
|
|
1476
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CitationsResolverService, never>;
|
|
1477
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<CitationsResolverService>;
|
|
1478
|
+
}
|
|
1479
|
+
|
|
1480
|
+
/**
|
|
1481
|
+
* Renders streaming markdown by walking a @cacheplane/partial-markdown AST
|
|
1482
|
+
* through @threadplane/render's view registry.
|
|
1483
|
+
*
|
|
1484
|
+
* Reactivity model: the live `parser.root` keeps a stable JS reference
|
|
1485
|
+
* across pushes (partial-markdown's identity guarantee). To make Angular
|
|
1486
|
+
* signals propagate downstream when the underlying tree changes, we surface
|
|
1487
|
+
* a materialized snapshot via `materialize()`. The snapshot shares
|
|
1488
|
+
* structurally — unchanged subtrees keep the SAME reference, and any
|
|
1489
|
+
* descendant change yields a NEW root reference. This lets Angular's
|
|
1490
|
+
* `Object.is` equality check both detect changes (root reference differs)
|
|
1491
|
+
* and short-circuit unchanged subtrees (per-node references stable).
|
|
1492
|
+
*
|
|
1493
|
+
* Override per-node-type renderers via the `[viewRegistry]` input or by
|
|
1494
|
+
* supplying a different `MARKDOWN_VIEW_REGISTRY` provider in the injector
|
|
1495
|
+
* tree.
|
|
1496
|
+
*/
|
|
1497
|
+
declare class ChatStreamingMdComponent {
|
|
1498
|
+
readonly content: _angular_core.InputSignal<string>;
|
|
1499
|
+
readonly streaming: _angular_core.InputSignal<boolean>;
|
|
1500
|
+
readonly viewRegistry: _angular_core.InputSignal<Readonly<Record<string, _angular_core.Type<unknown> | _threadplane_render.RenderViewEntry>> | undefined>;
|
|
1501
|
+
readonly resolvedRegistry: _angular_core.Signal<Readonly<Record<string, _angular_core.Type<unknown> | _threadplane_render.RenderViewEntry>>>;
|
|
1502
|
+
private readonly resolver;
|
|
1503
|
+
constructor();
|
|
1504
|
+
private parser;
|
|
1505
|
+
private prior;
|
|
1506
|
+
private finished;
|
|
1507
|
+
readonly root: _angular_core.Signal<MarkdownDocumentNode | null>;
|
|
1508
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ChatStreamingMdComponent, never>;
|
|
1509
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ChatStreamingMdComponent, "chat-streaming-md", never, { "content": { "alias": "content"; "required": false; "isSignal": true; }; "streaming": { "alias": "streaming"; "required": false; "isSignal": true; }; "viewRegistry": { "alias": "viewRegistry"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1510
|
+
}
|
|
1511
|
+
|
|
1512
|
+
/**
|
|
1513
|
+
* DI token for the markdown view registry consumed by <chat-streaming-md>
|
|
1514
|
+
* and <md-children>. Maps MarkdownNode.type strings (e.g. "paragraph",
|
|
1515
|
+
* "heading") to Angular components that render that node type.
|
|
1516
|
+
*
|
|
1517
|
+
* `<chat-streaming-md>` provides the runtime registry on its component-level
|
|
1518
|
+
* injector — either the consumer-supplied [viewRegistry] input, or
|
|
1519
|
+
* `cacheplaneMarkdownViews` (the default) — so descendant <md-children>
|
|
1520
|
+
* components resolve the right components for each node.
|
|
1521
|
+
*/
|
|
1522
|
+
declare const MARKDOWN_VIEW_REGISTRY: InjectionToken<Readonly<Record<string, _angular_core.Type<unknown> | _threadplane_render.RenderViewEntry>>>;
|
|
1523
|
+
|
|
1524
|
+
/**
|
|
1525
|
+
* Recursively dispatches a parent node's children through the markdown view
|
|
1526
|
+
* registry. Each child's `type` is looked up in the registry; the resolved
|
|
1527
|
+
* component is rendered with `[node]` bound to that child.
|
|
1528
|
+
*
|
|
1529
|
+
* Identity-preserving: `track $any(child)` keys on the JS reference of the
|
|
1530
|
+
* child node. Because @cacheplane/partial-markdown preserves node identity
|
|
1531
|
+
* across pushes, unchanged subtrees never re-render.
|
|
1532
|
+
*/
|
|
1533
|
+
declare class MarkdownChildrenComponent {
|
|
1534
|
+
readonly parent: _angular_core.InputSignal<MarkdownNode>;
|
|
1535
|
+
private readonly registry;
|
|
1536
|
+
protected readonly children: _angular_core.Signal<readonly MarkdownNode[]>;
|
|
1537
|
+
protected resolve(child: MarkdownNode): Type<unknown> | null;
|
|
1538
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MarkdownChildrenComponent, never>;
|
|
1539
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MarkdownChildrenComponent, "chat-md-children", never, { "parent": { "alias": "parent"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1540
|
+
}
|
|
1541
|
+
|
|
1542
|
+
/**
|
|
1543
|
+
* Default view registry consumed by <chat-streaming-md>. Maps every
|
|
1544
|
+
* MarkdownNode.type emitted by @cacheplane/partial-markdown@0.2 to its
|
|
1545
|
+
* corresponding Angular component.
|
|
1546
|
+
*
|
|
1547
|
+
* Override per-node-type via `withViews(cacheplaneMarkdownViews, { … })`.
|
|
1548
|
+
*/
|
|
1549
|
+
declare const cacheplaneMarkdownViews: ViewRegistry;
|
|
1550
|
+
|
|
1551
|
+
declare class MarkdownDocumentComponent {
|
|
1552
|
+
readonly node: _angular_core.InputSignal<MarkdownDocumentNode>;
|
|
1553
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MarkdownDocumentComponent, never>;
|
|
1554
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MarkdownDocumentComponent, "chat-md-document", never, { "node": { "alias": "node"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1555
|
+
}
|
|
1556
|
+
|
|
1557
|
+
declare class MarkdownParagraphComponent {
|
|
1558
|
+
readonly node: _angular_core.InputSignal<MarkdownParagraphNode>;
|
|
1559
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MarkdownParagraphComponent, never>;
|
|
1560
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MarkdownParagraphComponent, "chat-md-paragraph", never, { "node": { "alias": "node"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1561
|
+
}
|
|
1562
|
+
|
|
1563
|
+
declare class MarkdownHeadingComponent {
|
|
1564
|
+
readonly node: _angular_core.InputSignal<MarkdownHeadingNode>;
|
|
1565
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MarkdownHeadingComponent, never>;
|
|
1566
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MarkdownHeadingComponent, "chat-md-heading", never, { "node": { "alias": "node"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1567
|
+
}
|
|
1568
|
+
|
|
1569
|
+
declare class MarkdownBlockquoteComponent {
|
|
1570
|
+
readonly node: _angular_core.InputSignal<MarkdownBlockquoteNode>;
|
|
1571
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MarkdownBlockquoteComponent, never>;
|
|
1572
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MarkdownBlockquoteComponent, "chat-md-blockquote", never, { "node": { "alias": "node"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1573
|
+
}
|
|
1574
|
+
|
|
1575
|
+
declare class MarkdownListComponent {
|
|
1576
|
+
readonly node: _angular_core.InputSignal<MarkdownListNode>;
|
|
1577
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MarkdownListComponent, never>;
|
|
1578
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MarkdownListComponent, "chat-md-list", never, { "node": { "alias": "node"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1579
|
+
}
|
|
1580
|
+
|
|
1581
|
+
declare class MarkdownListItemComponent {
|
|
1582
|
+
readonly node: _angular_core.InputSignal<MarkdownListItemNode>;
|
|
1583
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MarkdownListItemComponent, never>;
|
|
1584
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MarkdownListItemComponent, "chat-md-list-item", never, { "node": { "alias": "node"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1585
|
+
}
|
|
1586
|
+
|
|
1587
|
+
declare class MarkdownCodeBlockComponent {
|
|
1588
|
+
readonly node: _angular_core.InputSignal<MarkdownCodeBlockNode>;
|
|
1589
|
+
protected readonly languageClass: _angular_core.Signal<string>;
|
|
1590
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MarkdownCodeBlockComponent, never>;
|
|
1591
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MarkdownCodeBlockComponent, "chat-md-code-block", never, { "node": { "alias": "node"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1592
|
+
}
|
|
1593
|
+
|
|
1594
|
+
declare class MarkdownThematicBreakComponent {
|
|
1595
|
+
readonly node: _angular_core.InputSignal<MarkdownThematicBreakNode>;
|
|
1596
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MarkdownThematicBreakComponent, never>;
|
|
1597
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MarkdownThematicBreakComponent, "chat-md-thematic-break", never, { "node": { "alias": "node"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1598
|
+
}
|
|
1599
|
+
|
|
1600
|
+
declare class MarkdownTextComponent {
|
|
1601
|
+
readonly node: _angular_core.InputSignal<MarkdownTextNode>;
|
|
1602
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MarkdownTextComponent, never>;
|
|
1603
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MarkdownTextComponent, "chat-md-text", never, { "node": { "alias": "node"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1604
|
+
}
|
|
1605
|
+
|
|
1606
|
+
declare class MarkdownEmphasisComponent {
|
|
1607
|
+
readonly node: _angular_core.InputSignal<MarkdownEmphasisNode>;
|
|
1608
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MarkdownEmphasisComponent, never>;
|
|
1609
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MarkdownEmphasisComponent, "chat-md-emphasis", never, { "node": { "alias": "node"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1610
|
+
}
|
|
1611
|
+
|
|
1612
|
+
declare class MarkdownStrongComponent {
|
|
1613
|
+
readonly node: _angular_core.InputSignal<MarkdownStrongNode>;
|
|
1614
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MarkdownStrongComponent, never>;
|
|
1615
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MarkdownStrongComponent, "chat-md-strong", never, { "node": { "alias": "node"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1616
|
+
}
|
|
1617
|
+
|
|
1618
|
+
declare class MarkdownStrikethroughComponent {
|
|
1619
|
+
readonly node: _angular_core.InputSignal<MarkdownStrikethroughNode>;
|
|
1620
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MarkdownStrikethroughComponent, never>;
|
|
1621
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MarkdownStrikethroughComponent, "chat-md-strikethrough", never, { "node": { "alias": "node"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1622
|
+
}
|
|
1623
|
+
|
|
1624
|
+
declare class MarkdownInlineCodeComponent {
|
|
1625
|
+
readonly node: _angular_core.InputSignal<MarkdownInlineCodeNode>;
|
|
1626
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MarkdownInlineCodeComponent, never>;
|
|
1627
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MarkdownInlineCodeComponent, "chat-md-inline-code", never, { "node": { "alias": "node"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1628
|
+
}
|
|
1629
|
+
|
|
1630
|
+
declare class MarkdownLinkComponent {
|
|
1631
|
+
readonly node: _angular_core.InputSignal<MarkdownLinkNode>;
|
|
1632
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MarkdownLinkComponent, never>;
|
|
1633
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MarkdownLinkComponent, "chat-md-link", never, { "node": { "alias": "node"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1634
|
+
}
|
|
1635
|
+
|
|
1636
|
+
declare class MarkdownAutolinkComponent {
|
|
1637
|
+
readonly node: _angular_core.InputSignal<MarkdownAutolinkNode>;
|
|
1638
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MarkdownAutolinkComponent, never>;
|
|
1639
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MarkdownAutolinkComponent, "chat-md-autolink", never, { "node": { "alias": "node"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1640
|
+
}
|
|
1641
|
+
|
|
1642
|
+
declare class MarkdownImageComponent {
|
|
1643
|
+
readonly node: _angular_core.InputSignal<MarkdownImageNode>;
|
|
1644
|
+
protected readonly failed: _angular_core.WritableSignal<boolean>;
|
|
1645
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MarkdownImageComponent, never>;
|
|
1646
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MarkdownImageComponent, "chat-md-image", never, { "node": { "alias": "node"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1647
|
+
}
|
|
1648
|
+
|
|
1649
|
+
declare class MarkdownSoftBreakComponent {
|
|
1650
|
+
readonly node: _angular_core.InputSignal<MarkdownSoftBreakNode>;
|
|
1651
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MarkdownSoftBreakComponent, never>;
|
|
1652
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MarkdownSoftBreakComponent, "chat-md-soft-break", never, { "node": { "alias": "node"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1653
|
+
}
|
|
1654
|
+
|
|
1655
|
+
declare class MarkdownHardBreakComponent {
|
|
1656
|
+
readonly node: _angular_core.InputSignal<MarkdownHardBreakNode>;
|
|
1657
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MarkdownHardBreakComponent, never>;
|
|
1658
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MarkdownHardBreakComponent, "chat-md-hard-break", never, { "node": { "alias": "node"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1659
|
+
}
|
|
1660
|
+
|
|
1661
|
+
declare class MarkdownCitationReferenceComponent {
|
|
1662
|
+
readonly node: _angular_core.InputSignal<MarkdownCitationReferenceNode>;
|
|
1663
|
+
private readonly resolver;
|
|
1664
|
+
protected readonly resolved: _angular_core.Signal<_threadplane_chat.ResolvedCitation | null>;
|
|
1665
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MarkdownCitationReferenceComponent, never>;
|
|
1666
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MarkdownCitationReferenceComponent, "chat-md-citation-reference", never, { "node": { "alias": "node"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1667
|
+
}
|
|
1668
|
+
|
|
1669
|
+
declare class MarkdownTableComponent {
|
|
1670
|
+
readonly node: _angular_core.InputSignal<MarkdownTableNode>;
|
|
1671
|
+
protected readonly headerRow: _angular_core.Signal<MarkdownTableRowNode | null>;
|
|
1672
|
+
protected readonly bodyRows: _angular_core.Signal<MarkdownTableRowNode[]>;
|
|
1673
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MarkdownTableComponent, never>;
|
|
1674
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MarkdownTableComponent, "chat-md-table", never, { "node": { "alias": "node"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1675
|
+
}
|
|
1676
|
+
|
|
1677
|
+
declare class MarkdownTableRowComponent {
|
|
1678
|
+
readonly node: _angular_core.InputSignal<MarkdownTableRowNode>;
|
|
1679
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MarkdownTableRowComponent, never>;
|
|
1680
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MarkdownTableRowComponent, "chat-md-table-row", never, { "node": { "alias": "node"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1681
|
+
}
|
|
1682
|
+
|
|
1683
|
+
declare class MarkdownTableCellComponent {
|
|
1684
|
+
readonly node: _angular_core.InputSignal<MarkdownTableCellNode>;
|
|
1685
|
+
private readonly isHeaderRowToken;
|
|
1686
|
+
protected readonly isHeader: _angular_core.Signal<boolean>;
|
|
1687
|
+
protected readonly alignment: _angular_core.Signal<_cacheplane_partial_markdown.Alignment>;
|
|
1688
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MarkdownTableCellComponent, never>;
|
|
1689
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MarkdownTableCellComponent, "chat-md-table-cell", never, { "node": { "alias": "node"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1690
|
+
}
|
|
1691
|
+
|
|
1692
|
+
/**
|
|
1693
|
+
* Provided by MarkdownTableRowComponent for header rows so that
|
|
1694
|
+
* MarkdownTableCellComponent can render <th> instead of <td>.
|
|
1695
|
+
* The value is a Signal<boolean> so that it tracks the row's isHeader reactively.
|
|
1696
|
+
*/
|
|
1697
|
+
declare const IS_HEADER_ROW: InjectionToken<Signal<boolean>>;
|
|
1698
|
+
|
|
1699
|
+
declare const CHAT_MARKDOWN_STYLES = "\n chat-streaming-md { display: block; color: var(--ngaf-chat-text); line-height: var(--ngaf-chat-line-height); }\n\n /* Headings */\n chat-streaming-md h1, chat-streaming-md h2, chat-streaming-md h3, chat-streaming-md h4, chat-streaming-md h5, chat-streaming-md h6 {\n font-weight: 600;\n line-height: 1.25;\n margin: 1.25rem 0 0.75rem;\n }\n chat-streaming-md h1:first-child, chat-streaming-md h2:first-child, chat-streaming-md h3:first-child,\n chat-streaming-md h4:first-child, chat-streaming-md h5:first-child, chat-streaming-md h6:first-child { margin-top: 0; }\n chat-streaming-md h1 { font-size: 1.5em; font-weight: 700; }\n chat-streaming-md h2 { font-size: 1.25em; }\n chat-streaming-md h3 { font-size: 1.1em; }\n chat-streaming-md h4 { font-size: 1em; }\n chat-streaming-md h5, chat-streaming-md h6 { font-size: 0.95em; color: var(--ngaf-chat-text-muted); }\n\n /* Paragraphs and inline emphasis */\n chat-streaming-md p { margin: 0 0 0.75rem; line-height: 1.6; font-size: var(--ngaf-chat-font-size); }\n chat-streaming-md p:last-child { margin-bottom: 0; }\n chat-streaming-md strong, chat-streaming-md b { font-weight: 700; }\n chat-streaming-md em, chat-streaming-md i { font-style: italic; }\n chat-streaming-md del, chat-streaming-md s { text-decoration: line-through; color: var(--ngaf-chat-text-muted); }\n chat-streaming-md mark { background: var(--ngaf-chat-surface-alt); padding: 0 2px; border-radius: 2px; }\n chat-streaming-md sub { font-size: 0.75em; vertical-align: sub; }\n chat-streaming-md sup { font-size: 0.75em; vertical-align: super; }\n\n /* Links */\n chat-streaming-md a { color: var(--ngaf-chat-primary); text-decoration: underline; text-underline-offset: 2px; }\n chat-streaming-md a:hover { text-decoration-thickness: 2px; }\n\n /* Lists (CommonMark + GFM task lists) */\n chat-streaming-md ul, chat-streaming-md ol { margin: 0 0 0.75rem; padding-left: 1.5rem; }\n chat-streaming-md ul { list-style: disc outside; }\n chat-streaming-md ol { list-style: decimal outside; }\n chat-streaming-md ul ul { list-style: circle outside; }\n chat-streaming-md ul ul ul { list-style: square outside; }\n chat-streaming-md li { margin: 0.2rem 0; }\n chat-streaming-md li::marker { color: var(--ngaf-chat-text-muted); }\n chat-streaming-md li > p { margin: 0 0 0.25rem; }\n chat-streaming-md li > ul, chat-streaming-md li > ol { margin: 0.25rem 0 0; }\n /* GFM task lists: marked emits <li><input type=\"checkbox\" disabled> ... */\n chat-streaming-md li:has(> input[type=\"checkbox\"]) { list-style: none; margin-left: -1.25rem; }\n chat-streaming-md li > input[type=\"checkbox\"] { margin-right: 0.5rem; vertical-align: middle; }\n\n /* Code (inline + fenced) */\n chat-streaming-md code {\n background: var(--ngaf-chat-surface-alt);\n color: var(--ngaf-chat-text);\n padding: 1px 5px;\n border-radius: 4px;\n font-family: var(--ngaf-chat-font-mono);\n font-size: 0.9em;\n }\n chat-streaming-md pre {\n background: var(--ngaf-chat-surface-alt);\n color: var(--ngaf-chat-text);\n padding: 12px 14px;\n border-radius: var(--ngaf-chat-radius-card);\n overflow-x: auto;\n font-family: var(--ngaf-chat-font-mono);\n font-size: var(--ngaf-chat-font-size-sm);\n line-height: 1.5;\n margin: 0 0 0.75rem;\n }\n chat-streaming-md pre code { background: transparent; padding: 0; border-radius: 0; font-size: inherit; }\n\n /* Blockquote */\n chat-streaming-md blockquote {\n border-left: 3px solid var(--ngaf-chat-separator);\n padding: 0.25rem 0 0.25rem 12px;\n margin: 0 0 0.75rem;\n color: var(--ngaf-chat-text-muted);\n }\n chat-streaming-md blockquote > :last-child { margin-bottom: 0; }\n\n /* Horizontal rule */\n chat-streaming-md hr {\n border: none;\n border-top: 1px solid var(--ngaf-chat-separator);\n margin: 1rem 0;\n }\n\n /* Tables (GFM) */\n chat-streaming-md table {\n border-collapse: collapse;\n margin: 0 0 0.75rem;\n width: 100%;\n font-size: 0.95em;\n }\n chat-streaming-md thead { background: var(--ngaf-chat-surface-alt); }\n chat-streaming-md th, chat-streaming-md td {\n border: 1px solid var(--ngaf-chat-separator);\n padding: 6px 10px;\n text-align: left;\n vertical-align: top;\n }\n chat-streaming-md th { font-weight: 600; }\n /* Component-rendered table: chat-md-table becomes a horizontally-scrollable\n wrapper for the inner <table>; row/cell elements stay layout-transparent\n so the browser's table layout takes over. Without this overflow wrapper,\n wide tables push their parent container past the viewport horizontally. */\n chat-streaming-md chat-md-table {\n display: block;\n overflow-x: auto;\n max-width: 100%;\n margin: 0 0 0.75rem;\n }\n chat-streaming-md chat-md-table-row { display: contents; }\n chat-streaming-md chat-md-table-cell { display: contents; }\n chat-streaming-md chat-md-table > table { margin: 0; }\n /* Task-list items: checkbox + first paragraph render inline; subsequent\n blocks (sub-lists, multi-paragraph items) flow normally below. */\n chat-streaming-md li.chat-md-list-item--task {\n list-style: none;\n margin-left: -1.25rem;\n display: flex;\n flex-wrap: wrap;\n align-items: baseline;\n gap: 0.5rem;\n }\n chat-streaming-md li.chat-md-list-item--task > input[type=\"checkbox\"] {\n margin: 0;\n flex: 0 0 auto;\n transform: translateY(2px);\n }\n /* The chat-md-children wrapper around list-item content takes remaining width */\n chat-streaming-md li.chat-md-list-item--task > chat-md-children {\n flex: 1 1 auto;\n min-width: 0;\n }\n /* Tight task items: only the FIRST paragraph aligns inline with the\n checkbox (margin collapsed). Subsequent paragraphs/blocks keep their\n normal vertical spacing so multi-block items render readably. */\n chat-streaming-md li.chat-md-list-item--task > chat-md-children > chat-md-paragraph:first-child > p {\n margin: 0;\n }\n\n /* Media */\n chat-streaming-md img { max-width: 100%; height: auto; border-radius: 6px; }\n /* Broken-image fallback: muted pill showing alt text + icon. Triggered\n when <img> fires (error). Caught by live browser smoke \u2014 prior impl\n showed only the browser's broken-image icon with no readable alt. */\n chat-streaming-md .chat-md-image--broken {\n display: inline-flex;\n align-items: center;\n gap: 0.4rem;\n padding: 0.25rem 0.5rem;\n background: var(--ngaf-chat-surface-alt);\n border: 1px dashed var(--ngaf-chat-separator);\n border-radius: 6px;\n font-size: 0.9em;\n color: var(--ngaf-chat-text-muted, currentColor);\n opacity: 0.85;\n }\n chat-streaming-md .chat-md-image__icon { font-size: 1em; line-height: 1; }\n chat-streaming-md .chat-md-image__alt { font-style: italic; }\n";
|
|
1700
|
+
|
|
1701
|
+
/**
|
|
1702
|
+
* Renders markdown content to sanitized HTML.
|
|
1703
|
+
* Falls back to plain text with newline->br conversion if `marked` is not installed.
|
|
1704
|
+
*/
|
|
1705
|
+
declare function renderMarkdown(content: string, sanitizer: DomSanitizer): SafeHtml;
|
|
1706
|
+
|
|
1707
|
+
/**
|
|
1708
|
+
* Render a millisecond duration as a human-readable label suitable for
|
|
1709
|
+
* the chat-reasoning "Thought for Ns" pill.
|
|
1710
|
+
*
|
|
1711
|
+
* - <1 s → "<1s"
|
|
1712
|
+
* - 1–59 s → "Ns" (e.g. "4s")
|
|
1713
|
+
* - ≥60 s → "Nm Ms" (e.g. "1m 12s", "60m 0s")
|
|
1714
|
+
*
|
|
1715
|
+
* Negative or non-finite inputs collapse to "<1s" so a corrupted timing
|
|
1716
|
+
* map never produces noisy output.
|
|
1717
|
+
*/
|
|
1718
|
+
declare function formatDuration(ms: number): string;
|
|
1719
|
+
|
|
1720
|
+
/** Chevron down (▼ replacement). 12x12, stroke-based. */
|
|
1721
|
+
declare const ICON_CHEVRON_DOWN = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M3 4.5L6 7.5L9 4.5\"/></svg>";
|
|
1722
|
+
/** Chevron up (▲ replacement). 12x12, stroke-based. */
|
|
1723
|
+
declare const ICON_CHEVRON_UP = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M3 7.5L6 4.5L9 7.5\"/></svg>";
|
|
1724
|
+
/** Gear icon (⚙ replacement). 14x14. */
|
|
1725
|
+
declare const ICON_TOOL = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><circle cx=\"12\" cy=\"12\" r=\"3\"/><path d=\"M12 1v2M12 21v2M4.22 4.22l1.42 1.42M18.36 18.36l1.42 1.42M1 12h2M21 12h2M4.22 19.78l1.42-1.42M18.36 5.64l1.42-1.42\"/></svg>";
|
|
1726
|
+
/** Warning triangle (⚠ replacement). 18x18. */
|
|
1727
|
+
declare const ICON_WARNING = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z\"/><line x1=\"12\" y1=\"9\" x2=\"12\" y2=\"13\"/><line x1=\"12\" y1=\"17\" x2=\"12.01\" y2=\"17\"/></svg>";
|
|
1728
|
+
/** Robot/agent icon (replacement). 14x14. */
|
|
1729
|
+
declare const ICON_AGENT = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><rect x=\"3\" y=\"11\" width=\"18\" height=\"10\" rx=\"2\"/><circle cx=\"12\" cy=\"5\" r=\"2\"/><path d=\"M12 7v4\"/><line x1=\"8\" y1=\"16\" x2=\"8\" y2=\"16\"/><line x1=\"16\" y1=\"16\" x2=\"16\" y2=\"16\"/></svg>";
|
|
1730
|
+
/** Check mark replacement. 12x12. */
|
|
1731
|
+
declare const ICON_CHECK = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M2.5 6L5 8.5L9.5 3.5\"/></svg>";
|
|
1732
|
+
/** Send arrow (for chat input). 16x16. */
|
|
1733
|
+
declare const ICON_SEND = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M8 12V4M8 4L4 8M8 4L12 8\"/></svg>";
|
|
1734
|
+
|
|
1735
|
+
/** Catalog entry for the A2UI surface renderer.
|
|
1736
|
+
*
|
|
1737
|
+
* `component` is mounted once all of the component's bindings (data
|
|
1738
|
+
* model paths referenced in its prop expressions) have resolved. While
|
|
1739
|
+
* any binding is unpopulated, the `fallback` is mounted instead. If
|
|
1740
|
+
* `fallback` is omitted, the lib's default fallback
|
|
1741
|
+
* (`A2uiDefaultFallbackComponent`) is mounted.
|
|
1742
|
+
*
|
|
1743
|
+
* This is a chat-side alias for the shared `RenderViewEntry` shape so
|
|
1744
|
+
* consumers of `@threadplane/chat` don't have to import from `@threadplane/render`. */
|
|
1745
|
+
type A2uiViewEntry = RenderViewEntry;
|
|
1746
|
+
/** Catalog shape accepted by `<a2ui-surface>`. Each entry is either a
|
|
1747
|
+
* bare `Type<unknown>` (legacy shape — no per-component fallback) or
|
|
1748
|
+
* an `A2uiViewEntry`. */
|
|
1749
|
+
type A2uiViews = Readonly<Record<string, Type<unknown> | A2uiViewEntry>>;
|
|
1750
|
+
/** Normalize a catalog entry to the `A2uiViewEntry` shape. Bare
|
|
1751
|
+
* `Type<unknown>` entries are wrapped as `{ component }`; entries
|
|
1752
|
+
* already in the discriminated shape are returned unchanged. */
|
|
1753
|
+
declare function normalizeViewEntry(entry: Type<unknown> | A2uiViewEntry): A2uiViewEntry;
|
|
1754
|
+
|
|
1755
|
+
interface PartialArgsBridge {
|
|
1756
|
+
/**
|
|
1757
|
+
* Replace the cumulative argument-string buffer for `toolCallId` with
|
|
1758
|
+
* `argsSoFar` and re-extract any newly-complete envelopes. The args
|
|
1759
|
+
* string is expected to grow monotonically.
|
|
1760
|
+
*/
|
|
1761
|
+
push(toolCallId: string, argsSoFar: string): void;
|
|
1762
|
+
/** True if a tool_call_id has been poisoned by malformed input. */
|
|
1763
|
+
isPoisoned(toolCallId: string): boolean;
|
|
1764
|
+
}
|
|
1765
|
+
/**
|
|
1766
|
+
* Subscribes to LangGraph custom events of name 'a2ui-partial' and feeds
|
|
1767
|
+
* the surface store envelope-by-envelope as the parent LLM streams its
|
|
1768
|
+
* tool_call.arguments JSON. Uses @cacheplane/partial-json to extract
|
|
1769
|
+
* structurally-complete envelope objects from the growing args string.
|
|
1770
|
+
*
|
|
1771
|
+
* Synthesis safety net: if the first complete surfaceUpdate arrives and
|
|
1772
|
+
* no beginRendering has been extracted yet, the bridge synthesises one
|
|
1773
|
+
* targeted at the surfaceUpdate's first component (preferring id='root'
|
|
1774
|
+
* if present). This makes the surface mount IMMEDIATELY after the first
|
|
1775
|
+
* surfaceUpdate parses — without waiting for the LLM to emit beginRendering
|
|
1776
|
+
* at the end of its envelope list — so the render-element fallback gate
|
|
1777
|
+
* (PR #252) actually fires while dataModelUpdates flow in.
|
|
1778
|
+
*
|
|
1779
|
+
* The store's apply() already treats repeated beginRendering for the same
|
|
1780
|
+
* surfaceId as idempotent (just re-applies styles), so the LLM's eventual
|
|
1781
|
+
* beginRendering (if any) is a no-op rather than a conflict.
|
|
1782
|
+
*/
|
|
1783
|
+
declare function createPartialArgsBridge(store: A2uiSurfaceStore): PartialArgsBridge;
|
|
1784
|
+
|
|
1785
|
+
/**
|
|
1786
|
+
* The parent LLM may emit envelope-tool arguments in four shapes (observed in
|
|
1787
|
+
* the spike across gpt-5-mini and gpt-5): the canonical {envelopes: [...]},
|
|
1788
|
+
* a singular typo {envelope: [...]}, positional keys {0: env, 1: env, ...}
|
|
1789
|
+
* when the model treats the args as the array, or a flat single envelope.
|
|
1790
|
+
* This pure function maps all four into a canonical envelope list.
|
|
1791
|
+
*
|
|
1792
|
+
* Strict-mode tool binding (OpenAI) should eliminate the non-canonical
|
|
1793
|
+
* shapes in production, but the normalizer is the safety net.
|
|
1794
|
+
*/
|
|
1795
|
+
declare function normalizeEnvelopeArgs(args: Record<string, unknown> | null | undefined): unknown[] | null;
|
|
1796
|
+
|
|
1797
|
+
declare class A2uiSurfaceComponent {
|
|
1798
|
+
/** Wire-format surface (legacy path — kept for backwards compat). */
|
|
1799
|
+
readonly surface: _angular_core.InputSignal<A2uiSurface | undefined>;
|
|
1800
|
+
/** Chat-side surface state with per-component readiness. When set,
|
|
1801
|
+
* this takes priority and the progressive renderer is used. */
|
|
1802
|
+
readonly state: _angular_core.InputSignal<A2uiSurfaceState | undefined>;
|
|
1803
|
+
readonly catalog: _angular_core.InputSignal<Readonly<Record<string, Type<unknown> | _threadplane_render.RenderViewEntry>> | Readonly<Record<string, Type<unknown> | _threadplane_render.RenderViewEntry>>>;
|
|
1804
|
+
readonly handlers: _angular_core.InputSignal<Record<string, (params: Record<string, unknown>) => unknown | Promise<unknown>>>;
|
|
1805
|
+
/** Optional top-level placeholder when the surface has no components
|
|
1806
|
+
* yet. Defaults to A2uiDefaultFallbackComponent. */
|
|
1807
|
+
readonly surfaceFallback: _angular_core.InputSignal<Type<unknown> | undefined>;
|
|
1808
|
+
readonly events: _angular_core.OutputEmitterRef<RenderEvent>;
|
|
1809
|
+
readonly action: _angular_core.OutputEmitterRef<A2uiActionMessage>;
|
|
1810
|
+
/** Agent-set primary color from `beginRendering.styles.primaryColor`.
|
|
1811
|
+
* Returns null when unset so the host binding doesn't override the
|
|
1812
|
+
* consumer's `:root`-level `--a2ui-primary` default. */
|
|
1813
|
+
readonly primaryColor: _angular_core.Signal<string | null>;
|
|
1814
|
+
/** Agent-set font family from `beginRendering.styles.font`. Returns
|
|
1815
|
+
* null when unset so the host doesn't override consumer fonts. */
|
|
1816
|
+
readonly fontFamily: _angular_core.Signal<string | null>;
|
|
1817
|
+
/** Roots from the surface state — components whose ids appear as
|
|
1818
|
+
* children of no other component. The wire spec includes
|
|
1819
|
+
* `beginRendering.root` as the single root; that path stays usable
|
|
1820
|
+
* but we keep the renderer permissive in case future surfaces emit
|
|
1821
|
+
* multiple top-level components.
|
|
1822
|
+
*
|
|
1823
|
+
* Conservative: returns only the first key from componentViews
|
|
1824
|
+
* insertion order. The wire format's beginRendering.root carries the
|
|
1825
|
+
* true root id; plumbing it through A2uiSurfaceState is a follow-up. */
|
|
1826
|
+
readonly rootIds: _angular_core.Signal<string[]>;
|
|
1827
|
+
/** Convert the A2UI surface to a json-render Spec for rendering.
|
|
1828
|
+
* Prefers `state().surface` (the progressively-built wire surface)
|
|
1829
|
+
* over the legacy `surface` input. surfaceToSpec handles
|
|
1830
|
+
* children.explicitList → spec.children translation + reserved-key
|
|
1831
|
+
* filtering + path-ref → $bindState rewriting; the rendered tree
|
|
1832
|
+
* then uses render-element's standard input-mapping
|
|
1833
|
+
* (`childKeys: el.children`) so catalog components receive the
|
|
1834
|
+
* inputs they actually declare.
|
|
1835
|
+
*
|
|
1836
|
+
* This supersedes the earlier slot-based progressive renderer,
|
|
1837
|
+
* which mounted root components but never populated their
|
|
1838
|
+
* childKeys input — leaving Columns/Rows/etc. with no children. */
|
|
1839
|
+
readonly spec: _angular_core.Signal<_json_render_core.Spec | null>;
|
|
1840
|
+
/** Convert ViewRegistry to AngularRegistry for RenderSpecComponent. */
|
|
1841
|
+
readonly registry: _angular_core.Signal<_threadplane_render.AngularRegistry>;
|
|
1842
|
+
/** Merge built-in A2UI handlers with consumer-provided handlers. */
|
|
1843
|
+
readonly internalHandlers: _angular_core.Signal<{
|
|
1844
|
+
'a2ui:event': (params: Record<string, unknown>) => A2uiActionMessage | undefined;
|
|
1845
|
+
'a2ui:localAction': (params: Record<string, unknown>) => unknown;
|
|
1846
|
+
}>;
|
|
1847
|
+
onRenderEvent(event: RenderEvent): void;
|
|
1848
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<A2uiSurfaceComponent, never>;
|
|
1849
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<A2uiSurfaceComponent, "a2ui-surface", never, { "surface": { "alias": "surface"; "required": false; "isSignal": true; }; "state": { "alias": "state"; "required": false; "isSignal": true; }; "catalog": { "alias": "catalog"; "required": true; "isSignal": true; }; "handlers": { "alias": "handlers"; "required": false; "isSignal": true; }; "surfaceFallback": { "alias": "surfaceFallback"; "required": false; "isSignal": true; }; }, { "events": "events"; "action": "action"; }, never, never, true, never>;
|
|
1850
|
+
}
|
|
1851
|
+
|
|
1852
|
+
declare function surfaceToSpec(surface: A2uiSurface): Spec | null;
|
|
1853
|
+
|
|
1854
|
+
/** Builds an A2uiActionMessage from handler params and the current surface.
|
|
1855
|
+
* The action.context is serialized as v1 DynamicValue-wrapped entries.
|
|
1856
|
+
* Sets action.label when the source component is a Button with a Text
|
|
1857
|
+
* child whose literalString is non-empty. */
|
|
1858
|
+
declare function buildA2uiActionMessage(params: Record<string, unknown>, surface: A2uiSurface): A2uiActionMessage;
|
|
1859
|
+
|
|
1860
|
+
declare function a2uiBasicCatalog(): ViewRegistry;
|
|
1861
|
+
|
|
1862
|
+
/** Emits a data model binding event if the prop has a binding path. */
|
|
1863
|
+
declare function emitBinding(emit: (event: string) => void, bindings: Record<string, string> | undefined, prop: string, value: unknown): void;
|
|
1864
|
+
|
|
1865
|
+
/** v1 textFieldType values from A2uiTextField. */
|
|
1866
|
+
type TextFieldType = 'date' | 'longText' | 'number' | 'shortText' | 'obscured';
|
|
1867
|
+
declare class A2uiTextFieldComponent {
|
|
1868
|
+
private static _idCounter;
|
|
1869
|
+
protected readonly _inputId: string;
|
|
1870
|
+
readonly label: _angular_core.InputSignal<string>;
|
|
1871
|
+
/** v1 prop: text (resolved string value). */
|
|
1872
|
+
readonly text: _angular_core.InputSignal<string>;
|
|
1873
|
+
/** Back-compat alias: value. surface-to-spec resolves DynamicString → plain string. */
|
|
1874
|
+
readonly value: _angular_core.Signal<string>;
|
|
1875
|
+
readonly placeholder: _angular_core.InputSignal<string>;
|
|
1876
|
+
readonly textFieldType: _angular_core.InputSignal<TextFieldType>;
|
|
1877
|
+
readonly validationRegexp: _angular_core.InputSignal<string>;
|
|
1878
|
+
readonly _bindings: _angular_core.InputSignal<Record<string, string>>;
|
|
1879
|
+
readonly emit: _angular_core.InputSignal<(event: string) => void>;
|
|
1880
|
+
readonly bindings: _angular_core.InputSignal<Record<string, string>>;
|
|
1881
|
+
readonly loading: _angular_core.InputSignal<boolean>;
|
|
1882
|
+
readonly childKeys: _angular_core.InputSignal<string[]>;
|
|
1883
|
+
readonly spec: _angular_core.InputSignal<Spec | undefined>;
|
|
1884
|
+
protected readonly htmlInputType: _angular_core.Signal<string>;
|
|
1885
|
+
onInput(event: Event): void;
|
|
1886
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<A2uiTextFieldComponent, never>;
|
|
1887
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<A2uiTextFieldComponent, "a2ui-text-field", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "text": { "alias": "text"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "textFieldType": { "alias": "textFieldType"; "required": false; "isSignal": true; }; "validationRegexp": { "alias": "validationRegexp"; "required": false; "isSignal": true; }; "_bindings": { "alias": "_bindings"; "required": false; "isSignal": true; }; "emit": { "alias": "emit"; "required": false; "isSignal": true; }; "bindings": { "alias": "bindings"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "childKeys": { "alias": "childKeys"; "required": false; "isSignal": true; }; "spec": { "alias": "spec"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1888
|
+
}
|
|
1889
|
+
|
|
1890
|
+
declare class A2uiCheckBoxComponent {
|
|
1891
|
+
readonly label: _angular_core.InputSignal<string>;
|
|
1892
|
+
/** v1 canonical prop: boolean checked state. */
|
|
1893
|
+
readonly value: _angular_core.InputSignal<boolean | undefined>;
|
|
1894
|
+
/** Pre-v1 alias retained for back-compat. */
|
|
1895
|
+
readonly checked: _angular_core.InputSignal<boolean>;
|
|
1896
|
+
readonly _bindings: _angular_core.InputSignal<Record<string, string>>;
|
|
1897
|
+
readonly emit: _angular_core.InputSignal<(event: string) => void>;
|
|
1898
|
+
readonly bindings: _angular_core.InputSignal<Record<string, string>>;
|
|
1899
|
+
readonly loading: _angular_core.InputSignal<boolean>;
|
|
1900
|
+
readonly childKeys: _angular_core.InputSignal<string[]>;
|
|
1901
|
+
readonly spec: _angular_core.InputSignal<Spec | undefined>;
|
|
1902
|
+
protected readonly effectiveValue: _angular_core.Signal<boolean>;
|
|
1903
|
+
onChange(event: Event): void;
|
|
1904
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<A2uiCheckBoxComponent, never>;
|
|
1905
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<A2uiCheckBoxComponent, "a2ui-check-box", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "checked": { "alias": "checked"; "required": false; "isSignal": true; }; "_bindings": { "alias": "_bindings"; "required": false; "isSignal": true; }; "emit": { "alias": "emit"; "required": false; "isSignal": true; }; "bindings": { "alias": "bindings"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "childKeys": { "alias": "childKeys"; "required": false; "isSignal": true; }; "spec": { "alias": "spec"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1906
|
+
}
|
|
1907
|
+
|
|
1908
|
+
declare class A2uiButtonComponent {
|
|
1909
|
+
/** v1: child Text component is rendered inside the button via childKeys. */
|
|
1910
|
+
readonly childKeys: _angular_core.InputSignal<string[]>;
|
|
1911
|
+
readonly spec: _angular_core.InputSignal<Spec>;
|
|
1912
|
+
readonly primary: _angular_core.InputSignal<boolean>;
|
|
1913
|
+
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
1914
|
+
readonly emit: _angular_core.InputSignal<(event: string) => void>;
|
|
1915
|
+
readonly bindings: _angular_core.InputSignal<Record<string, string>>;
|
|
1916
|
+
readonly loading: _angular_core.InputSignal<boolean>;
|
|
1917
|
+
handleClick(): void;
|
|
1918
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<A2uiButtonComponent, never>;
|
|
1919
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<A2uiButtonComponent, "a2ui-button", never, { "childKeys": { "alias": "childKeys"; "required": false; "isSignal": true; }; "spec": { "alias": "spec"; "required": true; "isSignal": true; }; "primary": { "alias": "primary"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "emit": { "alias": "emit"; "required": false; "isSignal": true; }; "bindings": { "alias": "bindings"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1920
|
+
}
|
|
1921
|
+
|
|
1922
|
+
/** Resolved option shape — label and value are plain strings after surface-to-spec resolves them. */
|
|
1923
|
+
interface ResolvedOption {
|
|
1924
|
+
label: string;
|
|
1925
|
+
value: string;
|
|
1926
|
+
}
|
|
1927
|
+
declare class A2uiMultipleChoiceComponent {
|
|
1928
|
+
readonly label: _angular_core.InputSignal<string>;
|
|
1929
|
+
/** Resolved current selections from surface-to-spec. Normalized in
|
|
1930
|
+
* `selectionsArray` because LLMs sometimes seed the data model with a
|
|
1931
|
+
* scalar (e.g. `"5"`) instead of an array (`["5"]`); we coerce so
|
|
1932
|
+
* .includes() works either way. */
|
|
1933
|
+
readonly selections: _angular_core.InputSignal<string | string[] | undefined>;
|
|
1934
|
+
protected readonly selectionsArray: _angular_core.Signal<string[]>;
|
|
1935
|
+
/** Resolved options with plain string labels (surface-to-spec resolves DynamicString). */
|
|
1936
|
+
readonly options: _angular_core.InputSignal<ResolvedOption[]>;
|
|
1937
|
+
/** When ≤ 1 — render as single-select <select>; otherwise multi-select checkboxes. */
|
|
1938
|
+
readonly maxAllowedSelections: _angular_core.InputSignal<number>;
|
|
1939
|
+
readonly _bindings: _angular_core.InputSignal<Record<string, string>>;
|
|
1940
|
+
readonly emit: _angular_core.InputSignal<(event: string) => void>;
|
|
1941
|
+
readonly bindings: _angular_core.InputSignal<Record<string, string>>;
|
|
1942
|
+
readonly loading: _angular_core.InputSignal<boolean>;
|
|
1943
|
+
readonly childKeys: _angular_core.InputSignal<string[]>;
|
|
1944
|
+
readonly spec: _angular_core.InputSignal<Spec | undefined>;
|
|
1945
|
+
protected readonly isSingleSelect: _angular_core.Signal<boolean>;
|
|
1946
|
+
protected isSelected(value: string): boolean;
|
|
1947
|
+
onSelectChange(event: Event): void;
|
|
1948
|
+
onCheckChange(value: string, event: Event): void;
|
|
1949
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<A2uiMultipleChoiceComponent, never>;
|
|
1950
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<A2uiMultipleChoiceComponent, "a2ui-multiple-choice", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "selections": { "alias": "selections"; "required": false; "isSignal": true; }; "options": { "alias": "options"; "required": false; "isSignal": true; }; "maxAllowedSelections": { "alias": "maxAllowedSelections"; "required": false; "isSignal": true; }; "_bindings": { "alias": "_bindings"; "required": false; "isSignal": true; }; "emit": { "alias": "emit"; "required": false; "isSignal": true; }; "bindings": { "alias": "bindings"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "childKeys": { "alias": "childKeys"; "required": false; "isSignal": true; }; "spec": { "alias": "spec"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1951
|
+
}
|
|
1952
|
+
|
|
1953
|
+
declare class A2uiSliderComponent {
|
|
1954
|
+
private static _idCounter;
|
|
1955
|
+
protected readonly _inputId: string;
|
|
1956
|
+
readonly label: _angular_core.InputSignal<string>;
|
|
1957
|
+
/** v1 prop: value (resolved DynamicNumber). */
|
|
1958
|
+
readonly value: _angular_core.InputSignal<number>;
|
|
1959
|
+
/** v1 prop: minValue. */
|
|
1960
|
+
readonly minValue: _angular_core.InputSignal<number>;
|
|
1961
|
+
/** v1 prop: maxValue. */
|
|
1962
|
+
readonly maxValue: _angular_core.InputSignal<number>;
|
|
1963
|
+
readonly step: _angular_core.InputSignal<number>;
|
|
1964
|
+
readonly _bindings: _angular_core.InputSignal<Record<string, string>>;
|
|
1965
|
+
readonly emit: _angular_core.InputSignal<(event: string) => void>;
|
|
1966
|
+
readonly bindings: _angular_core.InputSignal<Record<string, string>>;
|
|
1967
|
+
readonly loading: _angular_core.InputSignal<boolean>;
|
|
1968
|
+
readonly childKeys: _angular_core.InputSignal<string[]>;
|
|
1969
|
+
readonly spec: _angular_core.InputSignal<Spec | undefined>;
|
|
1970
|
+
onInput(event: Event): void;
|
|
1971
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<A2uiSliderComponent, never>;
|
|
1972
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<A2uiSliderComponent, "a2ui-slider", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "minValue": { "alias": "minValue"; "required": false; "isSignal": true; }; "maxValue": { "alias": "maxValue"; "required": false; "isSignal": true; }; "step": { "alias": "step"; "required": false; "isSignal": true; }; "_bindings": { "alias": "_bindings"; "required": false; "isSignal": true; }; "emit": { "alias": "emit"; "required": false; "isSignal": true; }; "bindings": { "alias": "bindings"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "childKeys": { "alias": "childKeys"; "required": false; "isSignal": true; }; "spec": { "alias": "spec"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1973
|
+
}
|
|
1974
|
+
|
|
1975
|
+
declare class A2uiDateTimeInputComponent {
|
|
1976
|
+
private static _idCounter;
|
|
1977
|
+
protected readonly _inputId: string;
|
|
1978
|
+
readonly label: _angular_core.InputSignal<string>;
|
|
1979
|
+
/** v1 prop: value (resolved DynamicString). */
|
|
1980
|
+
readonly value: _angular_core.InputSignal<string>;
|
|
1981
|
+
/** v1 prop: enableDate — include date portion. */
|
|
1982
|
+
readonly enableDate: _angular_core.InputSignal<boolean>;
|
|
1983
|
+
/** v1 prop: enableTime — include time portion. */
|
|
1984
|
+
readonly enableTime: _angular_core.InputSignal<boolean>;
|
|
1985
|
+
readonly _bindings: _angular_core.InputSignal<Record<string, string>>;
|
|
1986
|
+
readonly emit: _angular_core.InputSignal<(event: string) => void>;
|
|
1987
|
+
readonly bindings: _angular_core.InputSignal<Record<string, string>>;
|
|
1988
|
+
readonly loading: _angular_core.InputSignal<boolean>;
|
|
1989
|
+
readonly childKeys: _angular_core.InputSignal<string[]>;
|
|
1990
|
+
readonly spec: _angular_core.InputSignal<Spec | undefined>;
|
|
1991
|
+
/** Derives HTML input type from enableDate + enableTime. */
|
|
1992
|
+
protected readonly htmlInputType: _angular_core.Signal<string>;
|
|
1993
|
+
onChange(event: Event): void;
|
|
1994
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<A2uiDateTimeInputComponent, never>;
|
|
1995
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<A2uiDateTimeInputComponent, "a2ui-date-time-input", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "enableDate": { "alias": "enableDate"; "required": false; "isSignal": true; }; "enableTime": { "alias": "enableTime"; "required": false; "isSignal": true; }; "_bindings": { "alias": "_bindings"; "required": false; "isSignal": true; }; "emit": { "alias": "emit"; "required": false; "isSignal": true; }; "bindings": { "alias": "bindings"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "childKeys": { "alias": "childKeys"; "required": false; "isSignal": true; }; "spec": { "alias": "spec"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1996
|
+
}
|
|
1997
|
+
|
|
1998
|
+
type UsageHint = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'caption' | 'body';
|
|
1999
|
+
declare class A2uiTextComponent {
|
|
2000
|
+
readonly text: _angular_core.InputSignal<string>;
|
|
2001
|
+
readonly usageHint: _angular_core.InputSignal<UsageHint>;
|
|
2002
|
+
readonly bindings: _angular_core.InputSignal<Record<string, string>>;
|
|
2003
|
+
readonly emit: _angular_core.InputSignal<(event: string) => void>;
|
|
2004
|
+
readonly loading: _angular_core.InputSignal<boolean>;
|
|
2005
|
+
readonly childKeys: _angular_core.InputSignal<string[]>;
|
|
2006
|
+
readonly spec: _angular_core.InputSignal<Spec | undefined>;
|
|
2007
|
+
protected cssClass(): string;
|
|
2008
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<A2uiTextComponent, never>;
|
|
2009
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<A2uiTextComponent, "a2ui-text", never, { "text": { "alias": "text"; "required": false; "isSignal": true; }; "usageHint": { "alias": "usageHint"; "required": false; "isSignal": true; }; "bindings": { "alias": "bindings"; "required": false; "isSignal": true; }; "emit": { "alias": "emit"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "childKeys": { "alias": "childKeys"; "required": false; "isSignal": true; }; "spec": { "alias": "spec"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
2010
|
+
}
|
|
2011
|
+
|
|
2012
|
+
declare class A2uiIconComponent {
|
|
2013
|
+
/** v1 canonical prop. */
|
|
2014
|
+
readonly name: _angular_core.InputSignal<string | undefined>;
|
|
2015
|
+
/** Pre-v1 alias retained for back-compat. */
|
|
2016
|
+
readonly icon: _angular_core.InputSignal<string>;
|
|
2017
|
+
readonly size: _angular_core.InputSignal<number | null>;
|
|
2018
|
+
readonly bindings: _angular_core.InputSignal<Record<string, string>>;
|
|
2019
|
+
readonly emit: _angular_core.InputSignal<(event: string) => void>;
|
|
2020
|
+
readonly loading: _angular_core.InputSignal<boolean>;
|
|
2021
|
+
readonly childKeys: _angular_core.InputSignal<string[]>;
|
|
2022
|
+
readonly spec: _angular_core.InputSignal<Spec | undefined>;
|
|
2023
|
+
protected readonly effectiveName: _angular_core.Signal<string>;
|
|
2024
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<A2uiIconComponent, never>;
|
|
2025
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<A2uiIconComponent, "a2ui-icon", never, { "name": { "alias": "name"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "bindings": { "alias": "bindings"; "required": false; "isSignal": true; }; "emit": { "alias": "emit"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "childKeys": { "alias": "childKeys"; "required": false; "isSignal": true; }; "spec": { "alias": "spec"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
2026
|
+
}
|
|
2027
|
+
|
|
2028
|
+
/** v1 fit values mapped 1:1 to CSS object-fit. */
|
|
2029
|
+
type ImageFit = 'contain' | 'cover' | 'fill' | 'none' | 'scale-down';
|
|
2030
|
+
/** v1 usageHint maps to a sizing preset. The component renders fluid by
|
|
2031
|
+
* default; usageHint sets a max-width / aspect-ratio to match common
|
|
2032
|
+
* intents. */
|
|
2033
|
+
type ImageUsageHint = 'icon' | 'avatar' | 'smallFeature' | 'mediumFeature' | 'largeFeature' | 'header';
|
|
2034
|
+
declare class A2uiImageComponent {
|
|
2035
|
+
readonly url: _angular_core.InputSignal<string>;
|
|
2036
|
+
readonly alt: _angular_core.InputSignal<string>;
|
|
2037
|
+
readonly width: _angular_core.InputSignal<number | null>;
|
|
2038
|
+
readonly height: _angular_core.InputSignal<number | null>;
|
|
2039
|
+
/** v1 prop: CSS object-fit equivalent. */
|
|
2040
|
+
readonly fit: _angular_core.InputSignal<ImageFit | undefined>;
|
|
2041
|
+
/** v1 prop: sizing preset. */
|
|
2042
|
+
readonly usageHint: _angular_core.InputSignal<ImageUsageHint | undefined>;
|
|
2043
|
+
readonly bindings: _angular_core.InputSignal<Record<string, string>>;
|
|
2044
|
+
readonly emit: _angular_core.InputSignal<(event: string) => void>;
|
|
2045
|
+
readonly loading: _angular_core.InputSignal<boolean>;
|
|
2046
|
+
readonly childKeys: _angular_core.InputSignal<string[]>;
|
|
2047
|
+
readonly spec: _angular_core.InputSignal<Spec | undefined>;
|
|
2048
|
+
protected explicitWidth(): string | null;
|
|
2049
|
+
protected explicitHeight(): string | null;
|
|
2050
|
+
protected hintStyle(): {
|
|
2051
|
+
maxWidth: string;
|
|
2052
|
+
aspectRatio?: string;
|
|
2053
|
+
borderRadius?: string;
|
|
2054
|
+
} | null;
|
|
2055
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<A2uiImageComponent, never>;
|
|
2056
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<A2uiImageComponent, "a2ui-image", never, { "url": { "alias": "url"; "required": false; "isSignal": true; }; "alt": { "alias": "alt"; "required": false; "isSignal": true; }; "width": { "alias": "width"; "required": false; "isSignal": true; }; "height": { "alias": "height"; "required": false; "isSignal": true; }; "fit": { "alias": "fit"; "required": false; "isSignal": true; }; "usageHint": { "alias": "usageHint"; "required": false; "isSignal": true; }; "bindings": { "alias": "bindings"; "required": false; "isSignal": true; }; "emit": { "alias": "emit"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "childKeys": { "alias": "childKeys"; "required": false; "isSignal": true; }; "spec": { "alias": "spec"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
2057
|
+
}
|
|
2058
|
+
|
|
2059
|
+
type ColumnAlignment = 'start' | 'center' | 'end' | 'stretch';
|
|
2060
|
+
declare class A2uiColumnComponent {
|
|
2061
|
+
readonly childKeys: _angular_core.InputSignal<string[]>;
|
|
2062
|
+
readonly spec: _angular_core.InputSignal<Spec>;
|
|
2063
|
+
readonly gap: _angular_core.InputSignal<number>;
|
|
2064
|
+
readonly alignment: _angular_core.InputSignal<ColumnAlignment>;
|
|
2065
|
+
readonly distribution: _angular_core.InputSignal<"center" | "start" | "end" | "spaceBetween" | "spaceAround" | "spaceEvenly">;
|
|
2066
|
+
readonly bindings: _angular_core.InputSignal<Record<string, string>>;
|
|
2067
|
+
readonly emit: _angular_core.InputSignal<(event: string) => void>;
|
|
2068
|
+
readonly loading: _angular_core.InputSignal<boolean>;
|
|
2069
|
+
protected readonly alignItems: _angular_core.Signal<string>;
|
|
2070
|
+
/** Convert the Tailwind gap unit (multiples of 4px) to pixels. */
|
|
2071
|
+
protected readonly gapPx: _angular_core.Signal<number>;
|
|
2072
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<A2uiColumnComponent, never>;
|
|
2073
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<A2uiColumnComponent, "a2ui-column", never, { "childKeys": { "alias": "childKeys"; "required": false; "isSignal": true; }; "spec": { "alias": "spec"; "required": true; "isSignal": true; }; "gap": { "alias": "gap"; "required": false; "isSignal": true; }; "alignment": { "alias": "alignment"; "required": false; "isSignal": true; }; "distribution": { "alias": "distribution"; "required": false; "isSignal": true; }; "bindings": { "alias": "bindings"; "required": false; "isSignal": true; }; "emit": { "alias": "emit"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
2074
|
+
}
|
|
2075
|
+
|
|
2076
|
+
type RowAlignment = 'start' | 'center' | 'end' | 'stretch';
|
|
2077
|
+
type RowDistribution = 'start' | 'center' | 'end' | 'space-between' | 'space-around';
|
|
2078
|
+
declare class A2uiRowComponent {
|
|
2079
|
+
readonly childKeys: _angular_core.InputSignal<string[]>;
|
|
2080
|
+
readonly spec: _angular_core.InputSignal<Spec>;
|
|
2081
|
+
readonly gap: _angular_core.InputSignal<number>;
|
|
2082
|
+
readonly alignment: _angular_core.InputSignal<RowAlignment>;
|
|
2083
|
+
readonly distribution: _angular_core.InputSignal<RowDistribution>;
|
|
2084
|
+
readonly bindings: _angular_core.InputSignal<Record<string, string>>;
|
|
2085
|
+
readonly emit: _angular_core.InputSignal<(event: string) => void>;
|
|
2086
|
+
readonly loading: _angular_core.InputSignal<boolean>;
|
|
2087
|
+
protected readonly alignItems: _angular_core.Signal<string>;
|
|
2088
|
+
protected readonly justifyContent: _angular_core.Signal<string>;
|
|
2089
|
+
/** Convert the gap unit (multiples of 4px) to pixels. */
|
|
2090
|
+
protected readonly gapPx: _angular_core.Signal<number>;
|
|
2091
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<A2uiRowComponent, never>;
|
|
2092
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<A2uiRowComponent, "a2ui-row", never, { "childKeys": { "alias": "childKeys"; "required": false; "isSignal": true; }; "spec": { "alias": "spec"; "required": true; "isSignal": true; }; "gap": { "alias": "gap"; "required": false; "isSignal": true; }; "alignment": { "alias": "alignment"; "required": false; "isSignal": true; }; "distribution": { "alias": "distribution"; "required": false; "isSignal": true; }; "bindings": { "alias": "bindings"; "required": false; "isSignal": true; }; "emit": { "alias": "emit"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
2093
|
+
}
|
|
2094
|
+
|
|
2095
|
+
declare class A2uiCardComponent {
|
|
2096
|
+
/** v1: a single child key, delivered via childKeys[0] from the render framework. */
|
|
2097
|
+
readonly childKeys: _angular_core.InputSignal<string[]>;
|
|
2098
|
+
readonly spec: _angular_core.InputSignal<Spec>;
|
|
2099
|
+
readonly bindings: _angular_core.InputSignal<Record<string, string>>;
|
|
2100
|
+
readonly emit: _angular_core.InputSignal<(event: string) => void>;
|
|
2101
|
+
readonly loading: _angular_core.InputSignal<boolean>;
|
|
2102
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<A2uiCardComponent, never>;
|
|
2103
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<A2uiCardComponent, "a2ui-card", never, { "childKeys": { "alias": "childKeys"; "required": false; "isSignal": true; }; "spec": { "alias": "spec"; "required": true; "isSignal": true; }; "bindings": { "alias": "bindings"; "required": false; "isSignal": true; }; "emit": { "alias": "emit"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
2104
|
+
}
|
|
2105
|
+
|
|
2106
|
+
declare class A2uiDividerComponent {
|
|
2107
|
+
/** Canonical v1 spec name. The LLM emits this. */
|
|
2108
|
+
readonly axis: _angular_core.InputSignal<"horizontal" | "vertical" | undefined>;
|
|
2109
|
+
/** Older alias retained for json-render usage and back-compat. */
|
|
2110
|
+
readonly direction: _angular_core.InputSignal<"horizontal" | "vertical">;
|
|
2111
|
+
/** Effective axis — `axis` wins if provided, otherwise fall back to `direction`. */
|
|
2112
|
+
protected readonly orientation: _angular_core.Signal<"horizontal" | "vertical">;
|
|
2113
|
+
readonly bindings: _angular_core.InputSignal<Record<string, string>>;
|
|
2114
|
+
readonly emit: _angular_core.InputSignal<(event: string) => void>;
|
|
2115
|
+
readonly loading: _angular_core.InputSignal<boolean>;
|
|
2116
|
+
readonly childKeys: _angular_core.InputSignal<string[]>;
|
|
2117
|
+
readonly spec: _angular_core.InputSignal<Spec | undefined>;
|
|
2118
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<A2uiDividerComponent, never>;
|
|
2119
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<A2uiDividerComponent, "a2ui-divider", never, { "axis": { "alias": "axis"; "required": false; "isSignal": true; }; "direction": { "alias": "direction"; "required": false; "isSignal": true; }; "bindings": { "alias": "bindings"; "required": false; "isSignal": true; }; "emit": { "alias": "emit"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "childKeys": { "alias": "childKeys"; "required": false; "isSignal": true; }; "spec": { "alias": "spec"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
2120
|
+
}
|
|
2121
|
+
|
|
2122
|
+
declare class A2uiListComponent {
|
|
2123
|
+
readonly childKeys: _angular_core.InputSignal<string[]>;
|
|
2124
|
+
readonly spec: _angular_core.InputSignal<Spec>;
|
|
2125
|
+
readonly direction: _angular_core.InputSignal<"horizontal" | "vertical">;
|
|
2126
|
+
/** v1 canonical prop: cross-axis alignment. */
|
|
2127
|
+
readonly alignment: _angular_core.InputSignal<"center" | "start" | "end" | "stretch" | undefined>;
|
|
2128
|
+
readonly bindings: _angular_core.InputSignal<Record<string, string>>;
|
|
2129
|
+
readonly emit: _angular_core.InputSignal<(event: string) => void>;
|
|
2130
|
+
readonly loading: _angular_core.InputSignal<boolean>;
|
|
2131
|
+
protected readonly listClass: _angular_core.Signal<"a2ui-list--horizontal" | "a2ui-list--vertical">;
|
|
2132
|
+
protected readonly alignmentCss: _angular_core.Signal<string | null>;
|
|
2133
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<A2uiListComponent, never>;
|
|
2134
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<A2uiListComponent, "a2ui-list", never, { "childKeys": { "alias": "childKeys"; "required": false; "isSignal": true; }; "spec": { "alias": "spec"; "required": true; "isSignal": true; }; "direction": { "alias": "direction"; "required": false; "isSignal": true; }; "alignment": { "alias": "alignment"; "required": false; "isSignal": true; }; "bindings": { "alias": "bindings"; "required": false; "isSignal": true; }; "emit": { "alias": "emit"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
2135
|
+
}
|
|
2136
|
+
|
|
2137
|
+
declare class A2uiModalComponent {
|
|
2138
|
+
/**
|
|
2139
|
+
* v1: childKeys[0] = entryPointChild (inline trigger),
|
|
2140
|
+
* childKeys[1] = contentChild (modal body).
|
|
2141
|
+
*/
|
|
2142
|
+
readonly childKeys: _angular_core.InputSignal<string[]>;
|
|
2143
|
+
readonly spec: _angular_core.InputSignal<Spec>;
|
|
2144
|
+
/** Resolved title string (from optional title DynamicString). */
|
|
2145
|
+
readonly title: _angular_core.InputSignal<string>;
|
|
2146
|
+
readonly bindings: _angular_core.InputSignal<Record<string, string>>;
|
|
2147
|
+
readonly emit: _angular_core.InputSignal<(event: string) => void>;
|
|
2148
|
+
readonly loading: _angular_core.InputSignal<boolean>;
|
|
2149
|
+
protected readonly open: _angular_core.WritableSignal<boolean>;
|
|
2150
|
+
protected readonly entryPointKey: _angular_core.Signal<string>;
|
|
2151
|
+
protected readonly contentKey: _angular_core.Signal<string>;
|
|
2152
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<A2uiModalComponent, never>;
|
|
2153
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<A2uiModalComponent, "a2ui-modal", never, { "childKeys": { "alias": "childKeys"; "required": false; "isSignal": true; }; "spec": { "alias": "spec"; "required": true; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; "bindings": { "alias": "bindings"; "required": false; "isSignal": true; }; "emit": { "alias": "emit"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
2154
|
+
}
|
|
2155
|
+
|
|
2156
|
+
declare class A2uiTabsComponent {
|
|
2157
|
+
/** Resolved tab titles from tabItems[*].title — produced by surface-to-spec. */
|
|
2158
|
+
readonly tabTitles: _angular_core.InputSignal<string[]>;
|
|
2159
|
+
/** v1: each child key corresponds to a tab's contentChild (childKeys[i] ↔ tabTitles[i]). */
|
|
2160
|
+
readonly childKeys: _angular_core.InputSignal<string[]>;
|
|
2161
|
+
readonly spec: _angular_core.InputSignal<Spec>;
|
|
2162
|
+
readonly bindings: _angular_core.InputSignal<Record<string, string>>;
|
|
2163
|
+
readonly emit: _angular_core.InputSignal<(event: string) => void>;
|
|
2164
|
+
readonly loading: _angular_core.InputSignal<boolean>;
|
|
2165
|
+
protected readonly activeIndex: _angular_core.WritableSignal<number>;
|
|
2166
|
+
constructor();
|
|
2167
|
+
protected readonly activeChildKey: _angular_core.Signal<string | null>;
|
|
2168
|
+
selectTab(index: number): void;
|
|
2169
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<A2uiTabsComponent, never>;
|
|
2170
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<A2uiTabsComponent, "a2ui-tabs", never, { "tabTitles": { "alias": "tabTitles"; "required": false; "isSignal": true; }; "childKeys": { "alias": "childKeys"; "required": false; "isSignal": true; }; "spec": { "alias": "spec"; "required": true; "isSignal": true; }; "bindings": { "alias": "bindings"; "required": false; "isSignal": true; }; "emit": { "alias": "emit"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
2171
|
+
}
|
|
2172
|
+
|
|
2173
|
+
declare class A2uiAudioPlayerComponent {
|
|
2174
|
+
readonly url: _angular_core.InputSignal<string>;
|
|
2175
|
+
/** v1 canonical prop: short description / title rendered above the player. */
|
|
2176
|
+
readonly description: _angular_core.InputSignal<string>;
|
|
2177
|
+
/** v1 prop name: autoPlay (camelCase). */
|
|
2178
|
+
readonly autoPlay: _angular_core.InputSignal<boolean>;
|
|
2179
|
+
readonly controls: _angular_core.InputSignal<boolean>;
|
|
2180
|
+
readonly bindings: _angular_core.InputSignal<Record<string, string>>;
|
|
2181
|
+
readonly emit: _angular_core.InputSignal<(event: string) => void>;
|
|
2182
|
+
readonly loading: _angular_core.InputSignal<boolean>;
|
|
2183
|
+
readonly childKeys: _angular_core.InputSignal<string[]>;
|
|
2184
|
+
readonly spec: _angular_core.InputSignal<Spec | undefined>;
|
|
2185
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<A2uiAudioPlayerComponent, never>;
|
|
2186
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<A2uiAudioPlayerComponent, "a2ui-audio-player", never, { "url": { "alias": "url"; "required": false; "isSignal": true; }; "description": { "alias": "description"; "required": false; "isSignal": true; }; "autoPlay": { "alias": "autoPlay"; "required": false; "isSignal": true; }; "controls": { "alias": "controls"; "required": false; "isSignal": true; }; "bindings": { "alias": "bindings"; "required": false; "isSignal": true; }; "emit": { "alias": "emit"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "childKeys": { "alias": "childKeys"; "required": false; "isSignal": true; }; "spec": { "alias": "spec"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
2187
|
+
}
|
|
2188
|
+
|
|
2189
|
+
declare class A2uiVideoComponent {
|
|
2190
|
+
readonly url: _angular_core.InputSignal<string>;
|
|
2191
|
+
/** v1 prop name: autoPlay (camelCase). */
|
|
2192
|
+
readonly autoPlay: _angular_core.InputSignal<boolean>;
|
|
2193
|
+
readonly controls: _angular_core.InputSignal<boolean>;
|
|
2194
|
+
readonly bindings: _angular_core.InputSignal<Record<string, string>>;
|
|
2195
|
+
readonly emit: _angular_core.InputSignal<(event: string) => void>;
|
|
2196
|
+
readonly loading: _angular_core.InputSignal<boolean>;
|
|
2197
|
+
readonly childKeys: _angular_core.InputSignal<string[]>;
|
|
2198
|
+
readonly spec: _angular_core.InputSignal<Spec | undefined>;
|
|
2199
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<A2uiVideoComponent, never>;
|
|
2200
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<A2uiVideoComponent, "a2ui-video", never, { "url": { "alias": "url"; "required": false; "isSignal": true; }; "autoPlay": { "alias": "autoPlay"; "required": false; "isSignal": true; }; "controls": { "alias": "controls"; "required": false; "isSignal": true; }; "bindings": { "alias": "bindings"; "required": false; "isSignal": true; }; "emit": { "alias": "emit"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "childKeys": { "alias": "childKeys"; "required": false; "isSignal": true; }; "spec": { "alias": "spec"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
2201
|
+
}
|
|
2202
|
+
|
|
2203
|
+
interface MockAgent extends Agent {
|
|
2204
|
+
messages: WritableSignal<Message[]>;
|
|
2205
|
+
status: WritableSignal<AgentStatus>;
|
|
2206
|
+
isLoading: WritableSignal<boolean>;
|
|
2207
|
+
error: WritableSignal<unknown>;
|
|
2208
|
+
toolCalls: WritableSignal<ToolCall[]>;
|
|
2209
|
+
state: WritableSignal<Record<string, unknown>>;
|
|
2210
|
+
interrupt?: WritableSignal<AgentInterrupt | undefined>;
|
|
2211
|
+
subagents?: WritableSignal<Map<string, Subagent>>;
|
|
2212
|
+
history?: WritableSignal<AgentCheckpoint[]>;
|
|
2213
|
+
events$: Observable<AgentEvent>;
|
|
2214
|
+
/**
|
|
2215
|
+
* Minimal lifecycle stub the chat lib's effects subscribe to. We only
|
|
2216
|
+
* model the signals the chat composition currently reads; richer adapter
|
|
2217
|
+
* lifecycles (langgraph, ag-ui) extend this contract on their own mocks.
|
|
2218
|
+
* The public `lifecycle` view is a readonly signal; tests drive the
|
|
2219
|
+
* value via `_internal.streamStartedAt.set(...)` below.
|
|
2220
|
+
*/
|
|
2221
|
+
lifecycle: {
|
|
2222
|
+
streamStartedAt: Signal<number | null>;
|
|
2223
|
+
};
|
|
2224
|
+
/**
|
|
2225
|
+
* Test-only escape hatch for driving lifecycle signals from a spec. Mirrors
|
|
2226
|
+
* the `_internal` pattern used by CHAT_LIFECYCLE so tests can flip the
|
|
2227
|
+
* underlying writable without going through a full submit/stream cycle.
|
|
2228
|
+
*/
|
|
2229
|
+
_internal: {
|
|
2230
|
+
streamStartedAt: WritableSignal<number | null>;
|
|
2231
|
+
};
|
|
2232
|
+
/** Captured calls to submit() in order. */
|
|
2233
|
+
submitCalls: Array<{
|
|
2234
|
+
input: AgentSubmitInput;
|
|
2235
|
+
opts?: AgentSubmitOptions;
|
|
2236
|
+
}>;
|
|
2237
|
+
/** Count of stop() invocations. */
|
|
2238
|
+
stopCount: number;
|
|
2239
|
+
}
|
|
2240
|
+
interface MockAgentOptions {
|
|
2241
|
+
messages?: Message[];
|
|
2242
|
+
status?: AgentStatus;
|
|
2243
|
+
isLoading?: boolean;
|
|
2244
|
+
error?: unknown;
|
|
2245
|
+
toolCalls?: ToolCall[];
|
|
2246
|
+
state?: Record<string, unknown>;
|
|
2247
|
+
withInterrupt?: boolean;
|
|
2248
|
+
withSubagents?: boolean;
|
|
2249
|
+
history?: AgentCheckpoint[];
|
|
2250
|
+
events$?: Observable<AgentEvent>;
|
|
2251
|
+
}
|
|
2252
|
+
declare function mockAgent(opts?: MockAgentOptions): MockAgent;
|
|
2253
|
+
|
|
2254
|
+
export { A2uiAudioPlayerComponent, A2uiButtonComponent, A2uiCardComponent, A2uiCheckBoxComponent, A2uiColumnComponent, A2uiDateTimeInputComponent, A2uiDividerComponent, A2uiIconComponent, A2uiImageComponent, A2uiListComponent, A2uiModalComponent, A2uiMultipleChoiceComponent, A2uiRowComponent, A2uiSliderComponent, A2uiSurfaceComponent, A2uiTabsComponent, A2uiTextComponent, A2uiTextFieldComponent, A2uiVideoComponent, CHAT_CONFIG, CHAT_LIFECYCLE, CHAT_MARKDOWN_STYLES, ChatCitationCardTemplateDirective, ChatCitationsCardComponent, ChatCitationsComponent, ChatComponent, ChatConfirmDialogComponent, ChatErrorComponent, ChatGenerativeUiComponent, ChatGenuiSkeletonComponent, ChatHistorySearchPaletteComponent, ChatInputComponent, ChatInterruptComponent, ChatInterruptPanelComponent, ChatLauncherButtonComponent, ChatMessageActionsComponent, ChatMessageComponent, ChatMessageListComponent, ChatOverflowMenuComponent, ChatPopupComponent, ChatProjectListComponent, ChatReasoningComponent, ChatScrollBubbleComponent, ChatSelectComponent, ChatSidebarComponent, ChatSidenavComponent, ChatSidenavScrimComponent, ChatStreamingMdComponent, ChatSubagentCardComponent, ChatSubagentsComponent, ChatSuggestionsComponent, ChatThreadListComponent, ChatTimelineComponent, ChatTimelineSliderComponent, ChatToolCallCardComponent, ChatToolCallTemplateDirective, ChatToolCallsComponent, ChatTraceComponent, ChatTypingIndicatorComponent, ChatWelcomeComponent, ChatWelcomeSuggestionComponent, ChatWindowComponent, CitationsResolverService, ICON_AGENT, ICON_CHECK, ICON_CHEVRON_DOWN, ICON_CHEVRON_UP, ICON_SEND, ICON_TOOL, ICON_WARNING, IS_HEADER_ROW, MARKDOWN_VIEW_REGISTRY, MarkdownAutolinkComponent, MarkdownBlockquoteComponent, MarkdownChildrenComponent, MarkdownCitationReferenceComponent, MarkdownCodeBlockComponent, MarkdownDocumentComponent, MarkdownEmphasisComponent, MarkdownHardBreakComponent, MarkdownHeadingComponent, MarkdownImageComponent, MarkdownInlineCodeComponent, MarkdownLinkComponent, MarkdownListComponent, MarkdownListItemComponent, MarkdownParagraphComponent, MarkdownSoftBreakComponent, MarkdownStrikethroughComponent, MarkdownStrongComponent, MarkdownTableCellComponent, MarkdownTableComponent, MarkdownTableRowComponent, MarkdownTextComponent, MarkdownThematicBreakComponent, MessageTemplateDirective, a2uiBasicCatalog, buildA2uiActionMessage, cacheplaneMarkdownViews, createA2uiSurfaceStore, createContentClassifier, createParseTreeStore, createPartialArgsBridge, emitBinding, extractErrorMessage, formatDuration, getInterrupt, getMessageType, isAssistantMessage, isSystemMessage, isToolMessage, isTyping, isUserMessage, messageContent, mockAgent, normalizeEnvelopeArgs, normalizeViewEntry, provideChat, renderMarkdown, statusColor, submitMessage, surfaceToSpec };
|
|
2255
|
+
export type { A2uiComponentView, A2uiSurfaceState, A2uiSurfaceStore, A2uiViewEntry, A2uiViews, Agent, AgentCheckpoint, AgentCustomEvent, AgentEvent, AgentInterrupt, AgentRuntimeTelemetryEvent, AgentRuntimeTelemetryPayload, AgentRuntimeTelemetryProperties, AgentRuntimeTelemetrySink, AgentStateUpdateEvent, AgentStatus, AgentSubmitInput, AgentSubmitOptions, AgentWithHistory, ChatConfig, ChatLifecycle, ChatMessageRole, ChatRenderEvent, ChatScrollBubbleMode, ChatSelectOption, ChatSidenavMode, ChatToolCallTemplateContext, Citation, ContentBlock, ContentClassifier, ContentType, ElementAccumulationState, InterruptAction, Message, MessageTemplateType, MockAgent, MockAgentOptions, OverflowMenuItem, ParseTreeStore, PartialArgsBridge, Project, ProjectActionAdapter, ResolvedCitation, Role, Subagent, SubagentStatus, Thread, ThreadActionAdapter, ThreadMatch, ToolCall, ToolCallInfo, ToolCallStatus, TraceState };
|