@miiflow/assistant-ui 0.5.2 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{WelcomeScreen-D32Tsu6G.d.ts → WelcomeScreen-CVxniqqK.d.ts} +39 -9
- package/dist/{avatar-CAmTN1L7.d.ts → avatar-DnLePg72.d.ts} +2 -2
- package/dist/branding-NieTEGQf.d.ts +32 -0
- package/dist/chunk-ERJKVQQT.js +132 -0
- package/dist/chunk-ERJKVQQT.js.map +1 -0
- package/dist/chunk-IUCKTDTZ.js +2 -0
- package/dist/chunk-IUCKTDTZ.js.map +1 -0
- package/dist/chunk-NG4HKXYB.js +2 -0
- package/dist/chunk-NG4HKXYB.js.map +1 -0
- package/dist/chunk-NKLA5PPB.js +2 -0
- package/dist/chunk-NKLA5PPB.js.map +1 -0
- package/dist/chunk-QECTWT2H.js +2 -0
- package/dist/chunk-QECTWT2H.js.map +1 -0
- package/dist/client/index.d.ts +68 -4
- package/dist/client/index.js +7 -5
- package/dist/client/index.js.map +1 -1
- package/dist/composer/index.d.ts +180 -0
- package/dist/composer/index.js +2 -0
- package/dist/composer/index.js.map +1 -0
- package/dist/context/index.d.ts +16 -3
- package/dist/context/index.js +1 -1
- package/dist/hooks/index.d.ts +2 -2
- package/dist/hooks/index.js +1 -1
- package/dist/index.d.ts +18 -6
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/{message-D3D59U_Q.d.ts → message-D2ElX5k7.d.ts} +5 -4
- package/dist/primitives/index.d.ts +3 -3
- package/dist/{streaming-Q8hp5ev4.d.ts → streaming-B_u_jno6.d.ts} +77 -124
- package/dist/styled/index.d.ts +246 -73
- package/dist/styled/index.js +1 -1
- package/dist/styles-no-preflight.css +1 -1
- package/dist/styles.css +1 -1
- package/dist/types-DeHbndy0.d.ts +48 -0
- package/package.json +20 -3
- package/dist/branding-SzYU4ncD.d.ts +0 -18
- package/dist/chunk-NSTK5EUQ.js +0 -2
- package/dist/chunk-NSTK5EUQ.js.map +0 -1
- package/dist/chunk-OCKHJ4WO.js +0 -2
- package/dist/chunk-OCKHJ4WO.js.map +0 -1
- package/dist/chunk-VDFIXLNO.js +0 -20
- package/dist/chunk-VDFIXLNO.js.map +0 -1
package/dist/styled/index.d.ts
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
export { A as AttachmentPreview,
|
|
1
|
+
export { A as AttachmentPreview, a as AttachmentPreviewProps, b as Avatar, c as AvatarProps, C as ChatContainer, d as ChatContainerProps, e as ChatLayout, f as ChatLayoutProps, M as MarkdownContent, g as MarkdownContentProps, h as Message, i as MessageActionBar, j as MessageActionBarProps, k as MessageComposer, l as MessageComposerProps, m as MessageList, n as MessageListProps, o as MessageProps, S as ScrollToBottomButton, p as ScrollToBottomButtonProps, q as StreamingText, r as StreamingTextProps, s as SuggestedActions, t as SuggestedActionsProps, T as ToolStatus, u as ToolStatusIndicator, v as ToolStatusIndicatorProps, w as TypingIndicator, x as TypingIndicatorProps, W as WelcomeScreen, y as WelcomeScreenProps } from '../WelcomeScreen-CVxniqqK.js';
|
|
2
2
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
|
-
import react__default, { ReactNode } from 'react';
|
|
4
|
-
import { A as Attachment, S as SourceReference
|
|
5
|
-
export { C as ChatMessage, M as MessageData,
|
|
6
|
-
import {
|
|
7
|
-
export {
|
|
3
|
+
import react__default, { ReactNode, ComponentType } from 'react';
|
|
4
|
+
import { A as Attachment, S as SourceReference } from '../message-D2ElX5k7.js';
|
|
5
|
+
export { C as ChatMessage, M as MessageData, a as MessageError, P as Participant, b as ParticipantRole, c as SourceTypeConfig, d as SuggestedAction, e as SuggestedActionType } from '../message-D2ElX5k7.js';
|
|
6
|
+
import { k as StreamingChunk, P as PlanData, d as ClarificationData, s as ToolApprovalData, u as VisualizationChunkData, V as VisualizationActionEvent, M as MediaChunkData, b as ChartVisualizationData, v as VisualizationConfig, T as TableVisualizationData, C as CardVisualizationData, K as KpiVisualizationData, e as CodePreviewVisualizationData, h as FormVisualizationData, A as ArtifactChunkData, E as Event, f as EventStatus } from '../streaming-B_u_jno6.js';
|
|
7
|
+
export { a as ArtifactStatus, c as ChunkType, g as EventType, F as FollowupAction, O as ObservationEvent, i as PlanningEvent, j as ProgressData, l as StreamingMessage, o as SubTaskData, p as SubagentChunkData, q as SubtaskEvent, r as ThinkingEvent, t as ToolEvent, w as VisualizationType } from '../streaming-B_u_jno6.js';
|
|
8
8
|
import { z, ZodSchema } from 'zod';
|
|
9
9
|
export { ChatContextValue, ChatProvider, ChatProviderProps, useChatContext } from '../context/index.js';
|
|
10
|
-
export { B as BrandingData } from '../branding-
|
|
11
|
-
export { u as useComposer,
|
|
10
|
+
export { B as BrandingData } from '../branding-NieTEGQf.js';
|
|
11
|
+
export { u as useComposer, n as useMessage } from '../avatar-DnLePg72.js';
|
|
12
|
+
import '../types-DeHbndy0.js';
|
|
12
13
|
|
|
13
14
|
interface LoadingDotsProps {
|
|
14
15
|
/** Size variant */
|
|
@@ -82,7 +83,8 @@ interface ReasoningPanelProps {
|
|
|
82
83
|
isStreaming?: boolean;
|
|
83
84
|
/** Streaming chunks */
|
|
84
85
|
chunks?: StreamingChunk[];
|
|
85
|
-
/** Execution plan
|
|
86
|
+
/** Execution plan persisted on completed messages (historical messages only —
|
|
87
|
+
* new streams persist the plan as plain text without subtasks). */
|
|
86
88
|
plan?: PlanData;
|
|
87
89
|
/** Execution timeline (completed messages) */
|
|
88
90
|
executionTimeline?: any[];
|
|
@@ -103,38 +105,91 @@ declare function ReasoningPanel({ isStreaming, chunks, plan, executionTimeline,
|
|
|
103
105
|
|
|
104
106
|
interface ClarificationPanelProps {
|
|
105
107
|
clarification: ClarificationData;
|
|
106
|
-
onSubmit
|
|
108
|
+
onSubmit?: (response: string) => void;
|
|
107
109
|
onOptionSelect?: (option: string) => void;
|
|
108
110
|
disabled?: boolean;
|
|
109
111
|
loading?: boolean;
|
|
110
112
|
className?: string;
|
|
113
|
+
/**
|
|
114
|
+
* When set, renders a read-only "answered" state showing the user's response
|
|
115
|
+
* inline with the question. Used in scrolled-back chat history so a past
|
|
116
|
+
* clarification still shows what was asked and answered.
|
|
117
|
+
*/
|
|
118
|
+
answer?: string;
|
|
111
119
|
}
|
|
112
120
|
/**
|
|
113
121
|
* Stateless clarification panel - displays when the AI agent needs user input.
|
|
114
122
|
* Orange left-border panel with question, radio options, and free-text input.
|
|
123
|
+
*
|
|
124
|
+
* If `answer` is provided, switches to a read-only "answered" view.
|
|
115
125
|
*/
|
|
116
|
-
declare function ClarificationPanel({ clarification, onSubmit, onOptionSelect, disabled, loading, className, }: ClarificationPanelProps): react_jsx_runtime.JSX.Element;
|
|
126
|
+
declare function ClarificationPanel({ clarification, onSubmit, onOptionSelect, disabled, loading, className, answer, }: ClarificationPanelProps): react_jsx_runtime.JSX.Element;
|
|
127
|
+
|
|
128
|
+
interface ApprovalButtonSlotProps {
|
|
129
|
+
onClick: () => void;
|
|
130
|
+
disabled?: boolean;
|
|
131
|
+
children: ReactNode;
|
|
132
|
+
}
|
|
133
|
+
interface ApprovalChatInputSlotProps {
|
|
134
|
+
value: string;
|
|
135
|
+
onChange: (value: string) => void;
|
|
136
|
+
onSubmit: () => void;
|
|
137
|
+
onCancel: () => void;
|
|
138
|
+
placeholder: string;
|
|
139
|
+
disabled?: boolean;
|
|
140
|
+
autoFocus?: boolean;
|
|
141
|
+
}
|
|
142
|
+
interface ToolApprovalSlots {
|
|
143
|
+
AllowButton?: ComponentType<ApprovalButtonSlotProps>;
|
|
144
|
+
RejectButton?: ComponentType<ApprovalButtonSlotProps>;
|
|
145
|
+
ChatButton?: ComponentType<ApprovalButtonSlotProps>;
|
|
146
|
+
SendButton?: ComponentType<ApprovalButtonSlotProps>;
|
|
147
|
+
CancelButton?: ComponentType<ApprovalButtonSlotProps>;
|
|
148
|
+
ChatInput?: ComponentType<ApprovalChatInputSlotProps>;
|
|
149
|
+
}
|
|
150
|
+
interface ToolApprovalPanelProps {
|
|
151
|
+
approval: ToolApprovalData;
|
|
152
|
+
onApprove: (modifiedInputs: Record<string, unknown>) => void;
|
|
153
|
+
onReject: (reason?: string) => void;
|
|
154
|
+
disabled?: boolean;
|
|
155
|
+
className?: string;
|
|
156
|
+
/**
|
|
157
|
+
* Per-action component overrides. Pass any subset; unspecified slots fall
|
|
158
|
+
* back to the library's default Tailwind-styled renderings. Use this to
|
|
159
|
+
* align buttons and input with a host app's brand system.
|
|
160
|
+
*/
|
|
161
|
+
slots?: ToolApprovalSlots;
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* Tool approval — rendered as a raised CTA above the composer to communicate
|
|
165
|
+
* that the agent is paused on a decision. Anatomy:
|
|
166
|
+
*
|
|
167
|
+
* ┌─ Approve action ─ <tool identity> ─────────────────────┐
|
|
168
|
+
* │ <agent's prompt sentence> │
|
|
169
|
+
* │ [param: value] [param: value] │
|
|
170
|
+
* │ [ Approve ] [ Decline ] ⏎ approve · Esc decline │
|
|
171
|
+
* │ Show all details │
|
|
172
|
+
* └─────────────────────────────────────────────────────────┘
|
|
173
|
+
*
|
|
174
|
+
* Buttons and the chat input are slottable via the `slots` prop so host apps
|
|
175
|
+
* can swap in their own brand-aligned components.
|
|
176
|
+
*/
|
|
177
|
+
declare function ToolApprovalPanel({ approval, onApprove, onReject, disabled, className, slots, }: ToolApprovalPanelProps): react_jsx_runtime.JSX.Element;
|
|
117
178
|
|
|
118
179
|
interface CitationSourcesProps {
|
|
119
180
|
sources: SourceReference[];
|
|
120
181
|
className?: string;
|
|
121
|
-
onMemoryFeedback?: (semanticAtomId: string, feedback: MemoryFeedbackType) => void;
|
|
122
|
-
memoryFeedbackState?: Record<string, MemoryFeedbackType>;
|
|
123
182
|
}
|
|
124
183
|
/**
|
|
125
184
|
* Renders citation sources as a horizontal row of clickable chips.
|
|
126
185
|
* Clicking a chip opens a modal showing full source content.
|
|
127
|
-
* Memory citations include feedback buttons (thumbs up/down).
|
|
128
186
|
*/
|
|
129
|
-
declare function CitationSources({ sources, className,
|
|
187
|
+
declare function CitationSources({ sources, className, }: CitationSourcesProps): react_jsx_runtime.JSX.Element | null;
|
|
130
188
|
interface SourceDetailModalProps {
|
|
131
189
|
source: SourceReference | null;
|
|
132
190
|
onClose: () => void;
|
|
133
|
-
onMemoryFeedback?: (semanticAtomId: string, feedback: MemoryFeedbackType) => void;
|
|
134
|
-
feedbackState?: Record<string, MemoryFeedbackType>;
|
|
135
|
-
onFeedbackChange?: (source: SourceReference, feedback: MemoryFeedbackType) => void;
|
|
136
191
|
}
|
|
137
|
-
declare function SourceDetailModal({ source, onClose,
|
|
192
|
+
declare function SourceDetailModal({ source, onClose, }: SourceDetailModalProps): react_jsx_runtime.JSX.Element | null;
|
|
138
193
|
/**
|
|
139
194
|
* Inline citation badge - renders a small numbered badge like [1]
|
|
140
195
|
* with optional tooltip on hover and click-to-open URL.
|
|
@@ -145,34 +200,15 @@ interface InlineCitationProps {
|
|
|
145
200
|
}
|
|
146
201
|
declare function InlineCitation({ index, source }: InlineCitationProps): react_jsx_runtime.JSX.Element;
|
|
147
202
|
|
|
148
|
-
interface ClaudeToolPreviewProps {
|
|
149
|
-
chunk: StreamingChunk;
|
|
150
|
-
}
|
|
151
|
-
declare function ClaudeToolPreview({ chunk }: ClaudeToolPreviewProps): react_jsx_runtime.JSX.Element | null;
|
|
152
|
-
|
|
153
|
-
interface TerminalOutputProps {
|
|
154
|
-
chunk: StreamingChunk;
|
|
155
|
-
}
|
|
156
|
-
declare function TerminalOutput({ chunk }: TerminalOutputProps): react_jsx_runtime.JSX.Element | null;
|
|
157
|
-
|
|
158
|
-
interface FileOperationPreviewProps {
|
|
159
|
-
chunk: StreamingChunk;
|
|
160
|
-
}
|
|
161
|
-
declare function FileOperationPreview({ chunk }: FileOperationPreviewProps): react_jsx_runtime.JSX.Element | null;
|
|
162
|
-
|
|
163
|
-
interface SearchResultsViewProps {
|
|
164
|
-
chunk: StreamingChunk;
|
|
165
|
-
}
|
|
166
|
-
declare function SearchResultsView({ chunk }: SearchResultsViewProps): react_jsx_runtime.JSX.Element | null;
|
|
167
|
-
|
|
168
|
-
interface WebOperationPreviewProps {
|
|
169
|
-
chunk: StreamingChunk;
|
|
170
|
-
}
|
|
171
|
-
declare function WebOperationPreview({ chunk }: WebOperationPreviewProps): react_jsx_runtime.JSX.Element | null;
|
|
172
|
-
|
|
173
203
|
interface SubagentPanelProps {
|
|
174
204
|
chunk: StreamingChunk;
|
|
175
205
|
}
|
|
206
|
+
/**
|
|
207
|
+
* Renders a single sub-assistant dispatch as one row in a `Timeline` —
|
|
208
|
+
* label + description + duration + chevron — matching plan subtasks and
|
|
209
|
+
* multi-agent rows. Nested chunks (thinking/tool/observation/sub-assistant)
|
|
210
|
+
* render as an indented `EventTimeline` underneath.
|
|
211
|
+
*/
|
|
176
212
|
declare function SubagentPanel({ chunk }: SubagentPanelProps): react_jsx_runtime.JSX.Element | null;
|
|
177
213
|
|
|
178
214
|
declare const chartVisualizationSchema: z.ZodObject<{
|
|
@@ -225,6 +261,7 @@ declare const tableVisualizationSchema: z.ZodObject<{
|
|
|
225
261
|
number: "number";
|
|
226
262
|
boolean: "boolean";
|
|
227
263
|
progress: "progress";
|
|
264
|
+
media: "media";
|
|
228
265
|
currency: "currency";
|
|
229
266
|
date: "date";
|
|
230
267
|
badge: "badge";
|
|
@@ -270,7 +307,7 @@ declare const kpiVisualizationSchema: z.ZodObject<{
|
|
|
270
307
|
down: "down";
|
|
271
308
|
neutral: "neutral";
|
|
272
309
|
}>>>;
|
|
273
|
-
change: z.ZodOptional<z.ZodNullable<z.ZodString
|
|
310
|
+
change: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
274
311
|
changeLabel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
275
312
|
sparkline: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodNumber>>>;
|
|
276
313
|
color: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -278,6 +315,7 @@ declare const kpiVisualizationSchema: z.ZodObject<{
|
|
|
278
315
|
layout: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
279
316
|
row: "row";
|
|
280
317
|
grid: "grid";
|
|
318
|
+
bento: "bento";
|
|
281
319
|
}>>>;
|
|
282
320
|
}, z.core.$strip>;
|
|
283
321
|
declare const codePreviewVisualizationSchema: z.ZodObject<{
|
|
@@ -324,8 +362,10 @@ interface VisualizationRendererProps {
|
|
|
324
362
|
data: VisualizationChunkData;
|
|
325
363
|
isStreaming?: boolean;
|
|
326
364
|
onAction?: (event: VisualizationActionEvent) => void;
|
|
365
|
+
/** Message-level media bag used to resolve `media_ref:<id>` cell values. */
|
|
366
|
+
medias?: MediaChunkData[];
|
|
327
367
|
}
|
|
328
|
-
declare function VisualizationRenderer({ data, isStreaming, onAction, }: VisualizationRendererProps): react_jsx_runtime.JSX.Element;
|
|
368
|
+
declare function VisualizationRenderer({ data, isStreaming, onAction, medias, }: VisualizationRendererProps): react_jsx_runtime.JSX.Element;
|
|
329
369
|
|
|
330
370
|
interface ChartVisualizationProps {
|
|
331
371
|
data: ChartVisualizationData;
|
|
@@ -338,8 +378,10 @@ interface TableVisualizationProps {
|
|
|
338
378
|
data: TableVisualizationData;
|
|
339
379
|
config?: VisualizationConfig;
|
|
340
380
|
isStreaming?: boolean;
|
|
381
|
+
/** Message-level media bag used to resolve `media_ref:<id>` cell values. */
|
|
382
|
+
medias?: MediaChunkData[];
|
|
341
383
|
}
|
|
342
|
-
declare function TableVisualization({ data, config }: TableVisualizationProps): react_jsx_runtime.JSX.Element;
|
|
384
|
+
declare function TableVisualization({ data, config, medias }: TableVisualizationProps): react_jsx_runtime.JSX.Element;
|
|
343
385
|
|
|
344
386
|
interface CardVisualizationProps {
|
|
345
387
|
data: CardVisualizationData;
|
|
@@ -377,6 +419,7 @@ interface VisualizationEntry {
|
|
|
377
419
|
config?: VisualizationConfig;
|
|
378
420
|
isStreaming?: boolean;
|
|
379
421
|
onAction?: (event: VisualizationActionEvent) => void;
|
|
422
|
+
medias?: MediaChunkData[];
|
|
380
423
|
}>;
|
|
381
424
|
schema?: ZodSchema;
|
|
382
425
|
}
|
|
@@ -394,27 +437,97 @@ declare function getVisualization(type: string): VisualizationEntry | undefined;
|
|
|
394
437
|
*/
|
|
395
438
|
declare function getRegisteredTypes(): string[];
|
|
396
439
|
|
|
440
|
+
interface ArtifactInlineCardProps {
|
|
441
|
+
artifact: ArtifactChunkData;
|
|
442
|
+
isStreaming?: boolean;
|
|
443
|
+
onOpen?: (artifact: ArtifactChunkData) => void;
|
|
444
|
+
}
|
|
445
|
+
/**
|
|
446
|
+
* Unstyled primitive inline card. The app layer (`web/`) registers a
|
|
447
|
+
* MUI-skinned version via `registerArtifact`; this primitive is the fallback
|
|
448
|
+
* shipped with the chat-ui package so headless / embedded consumers still
|
|
449
|
+
* render something when a tool emits an artifact.
|
|
450
|
+
*/
|
|
451
|
+
declare function ArtifactInlineCard({ artifact, isStreaming, onOpen, }: ArtifactInlineCardProps): react_jsx_runtime.JSX.Element;
|
|
452
|
+
|
|
453
|
+
interface ArtifactListProps {
|
|
454
|
+
artifacts: ArtifactChunkData[];
|
|
455
|
+
isStreaming?: boolean;
|
|
456
|
+
onOpen?: (artifact: ArtifactChunkData) => void;
|
|
457
|
+
}
|
|
458
|
+
/**
|
|
459
|
+
* Renders one inline card per artifact using the registered renderer when
|
|
460
|
+
* available; falls back to the unstyled `ArtifactInlineCard` otherwise.
|
|
461
|
+
*/
|
|
462
|
+
declare function ArtifactList({ artifacts, isStreaming, onOpen, }: ArtifactListProps): react_jsx_runtime.JSX.Element | null;
|
|
463
|
+
|
|
464
|
+
/**
|
|
465
|
+
* Shape of a registered artifact type.
|
|
466
|
+
*
|
|
467
|
+
* Artifacts have a dual UI:
|
|
468
|
+
* - `InlineCard` is rendered inside the message body (compact, clickable).
|
|
469
|
+
* - `Viewer` is rendered inside the side-panel drawer (full preview).
|
|
470
|
+
*
|
|
471
|
+
* The app layer (`web/`) supplies MUI-skinned implementations; the unstyled
|
|
472
|
+
* primitive `ArtifactInlineCard` is used as a fallback for headless consumers
|
|
473
|
+
* (e.g. the embedded widget) that do not register MUI artifacts.
|
|
474
|
+
*/
|
|
475
|
+
interface ArtifactEntry {
|
|
476
|
+
type: string;
|
|
477
|
+
label: string;
|
|
478
|
+
icon?: ComponentType<{
|
|
479
|
+
className?: string;
|
|
480
|
+
}>;
|
|
481
|
+
InlineCard: ComponentType<{
|
|
482
|
+
artifact: ArtifactChunkData;
|
|
483
|
+
isStreaming?: boolean;
|
|
484
|
+
onOpen?: (artifact: ArtifactChunkData) => void;
|
|
485
|
+
}>;
|
|
486
|
+
Viewer?: ComponentType<{
|
|
487
|
+
artifact: ArtifactChunkData;
|
|
488
|
+
}>;
|
|
489
|
+
/** Optional description shown when no entry is registered for this type. */
|
|
490
|
+
fallback?: ReactNode;
|
|
491
|
+
}
|
|
492
|
+
declare function registerArtifact(type: string, entry: ArtifactEntry): void;
|
|
493
|
+
declare function getArtifact(type: string): ArtifactEntry | undefined;
|
|
494
|
+
declare function getRegisteredArtifactTypes(): string[];
|
|
495
|
+
|
|
397
496
|
interface EventContentProps {
|
|
398
497
|
event: Event;
|
|
399
498
|
className?: string;
|
|
400
|
-
/**
|
|
499
|
+
/** Active state — drives the trailing caret on tool calls. */
|
|
401
500
|
isRunning?: boolean;
|
|
501
|
+
/**
|
|
502
|
+
* Slowest duration in the surrounding timeline. Used to scale this row's
|
|
503
|
+
* trailing micro-bar so the panel reads as a proportional trace.
|
|
504
|
+
*/
|
|
505
|
+
maxDurationSeconds?: number;
|
|
402
506
|
}
|
|
403
507
|
/**
|
|
404
|
-
*
|
|
405
|
-
*
|
|
406
|
-
* -
|
|
407
|
-
*
|
|
408
|
-
* -
|
|
508
|
+
* Refreshed event content.
|
|
509
|
+
*
|
|
510
|
+
* - Thinking / planning render as prose at 78% ink with relaxed leading;
|
|
511
|
+
* active rows bump to weight 500 so the eye lands on live content.
|
|
512
|
+
* - Tool calls render as an inline monospace tag. The redundant inner dot
|
|
513
|
+
* is gone (the rail badge already conveys state at the same y); a soft
|
|
514
|
+
* caret blinks at the trailing edge while running.
|
|
515
|
+
* - Completed rows get a right-aligned duration with a proportional micro-
|
|
516
|
+
* bar — the panel reads as a tiny trace.
|
|
517
|
+
* - Observations use a quiet tinted background, no side-stripe.
|
|
409
518
|
*/
|
|
410
|
-
declare function EventContent({ event, className, isRunning }: EventContentProps): react_jsx_runtime.JSX.Element | null;
|
|
519
|
+
declare function EventContent({ event, className, isRunning, maxDurationSeconds, }: EventContentProps): react_jsx_runtime.JSX.Element | null;
|
|
411
520
|
|
|
412
521
|
/**
|
|
413
522
|
* Convert StreamingChunk to Event format
|
|
414
523
|
*/
|
|
415
524
|
declare function convertChunkToEvent(chunk: StreamingChunk, index: number): Event | null;
|
|
416
525
|
/**
|
|
417
|
-
* Convert timeline items (from metadata) to Events
|
|
526
|
+
* Convert timeline items (from metadata) to Events.
|
|
527
|
+
*
|
|
528
|
+
* Computes pairwise `durationSeconds` from `item.timestamp` so completed
|
|
529
|
+
* timelines can show per-step trace bars. Falls back to undefined when
|
|
530
|
+
* timestamps are missing (e.g. tail events without a successor).
|
|
418
531
|
*/
|
|
419
532
|
declare function convertTimelineToEvents(timeline: Array<Record<string, unknown>>): Event[];
|
|
420
533
|
interface EventTimelineProps {
|
|
@@ -439,24 +552,24 @@ interface PlanTimelineProps {
|
|
|
439
552
|
*/
|
|
440
553
|
declare function PlanTimeline({ plan, streamingChunks, className, }: PlanTimelineProps): react_jsx_runtime.JSX.Element;
|
|
441
554
|
|
|
442
|
-
|
|
443
|
-
status: EventStatus;
|
|
444
|
-
size?: number;
|
|
445
|
-
className?: string;
|
|
446
|
-
}
|
|
447
|
-
/**
|
|
448
|
-
* Circular status badge with magical animations
|
|
449
|
-
* - Pending: Dashed circle (muted)
|
|
450
|
-
* - Running: Glowing orb with pulse effect
|
|
451
|
-
* - Completed: Green check with pop + flash animation
|
|
452
|
-
* - Failed: Red X
|
|
453
|
-
*/
|
|
454
|
-
declare function StatusBadge({ status, size, className }: StatusBadgeProps): react_jsx_runtime.JSX.Element;
|
|
455
|
-
|
|
555
|
+
type TimelineItemKind = "thinking" | "planning" | "tool" | "observation" | "subagent";
|
|
456
556
|
interface TimelineItemData {
|
|
457
557
|
id: string;
|
|
458
558
|
status: EventStatus;
|
|
459
559
|
content: ReactNode;
|
|
560
|
+
/**
|
|
561
|
+
* When true, the parent Timeline does not apply the running-state
|
|
562
|
+
* gradient wash to this row's content cell. Use for rows that own a
|
|
563
|
+
* nested timeline (e.g. subagents) — the wash bleeds behind the entire
|
|
564
|
+
* expanded body and reads as a card around the group.
|
|
565
|
+
*/
|
|
566
|
+
bare?: boolean;
|
|
567
|
+
/**
|
|
568
|
+
* Semantic kind of this row. Drives adjacency-aware vertical spacing
|
|
569
|
+
* (consecutive thoughts pack tighter; tool/subagent boundaries breathe
|
|
570
|
+
* wider) and the StatusBadge marker variant (subagent gets a ring).
|
|
571
|
+
*/
|
|
572
|
+
kind?: TimelineItemKind;
|
|
460
573
|
}
|
|
461
574
|
interface TimelineProps {
|
|
462
575
|
items: TimelineItemData[];
|
|
@@ -464,8 +577,13 @@ interface TimelineProps {
|
|
|
464
577
|
className?: string;
|
|
465
578
|
}
|
|
466
579
|
/**
|
|
467
|
-
* Vertical timeline
|
|
468
|
-
*
|
|
580
|
+
* Vertical timeline — refreshed look.
|
|
581
|
+
*
|
|
582
|
+
* One unbroken hairline rail down the badge column with rail-anchored ink
|
|
583
|
+
* markers. The active segment carries a soft downward-flowing gradient
|
|
584
|
+
* slice; running rows get a left-anchored gradient wash on the content
|
|
585
|
+
* side. Spacing varies by adjacency so the panel reads like prose, not a
|
|
586
|
+
* uniform list.
|
|
469
587
|
*/
|
|
470
588
|
declare function Timeline({ items, badgeSize, className }: TimelineProps): react_jsx_runtime.JSX.Element | null;
|
|
471
589
|
interface TimelineItemProps {
|
|
@@ -476,8 +594,63 @@ interface TimelineItemProps {
|
|
|
476
594
|
className?: string;
|
|
477
595
|
}
|
|
478
596
|
/**
|
|
479
|
-
* Single timeline item (alternative API)
|
|
597
|
+
* Single timeline item (alternative API). Matches the refreshed look of
|
|
598
|
+
* the parent `Timeline`: hairline rail, ink-dot markers, no card chrome.
|
|
480
599
|
*/
|
|
481
600
|
declare function TimelineItem({ status, isLast, badgeSize, children, className, }: TimelineItemProps): react_jsx_runtime.JSX.Element;
|
|
482
601
|
|
|
483
|
-
|
|
602
|
+
interface StatusBadgeProps {
|
|
603
|
+
status: EventStatus;
|
|
604
|
+
size?: number;
|
|
605
|
+
className?: string;
|
|
606
|
+
/**
|
|
607
|
+
* Semantic kind of the row this badge marks. Each kind has a distinct
|
|
608
|
+
* marker geometry so the rail itself encodes event type at a glance —
|
|
609
|
+
* dot for thoughts (soft/prose), diamond for tool calls (geometric/
|
|
610
|
+
* action), ring for subagents (a dispatched thread). Shape, not just
|
|
611
|
+
* color, carries the categorical distinction.
|
|
612
|
+
*/
|
|
613
|
+
kind?: TimelineItemKind;
|
|
614
|
+
}
|
|
615
|
+
/**
|
|
616
|
+
* Rail-anchored state marker.
|
|
617
|
+
*
|
|
618
|
+
* Shape carries state alongside color: running markers are visibly larger
|
|
619
|
+
* with a strong breathing halo, so a neutral activity color still reads
|
|
620
|
+
* as "in progress." Color comes from `--chat-activity` with a fallback to
|
|
621
|
+
* `--chat-primary`; callers whose primary is neutral can override the
|
|
622
|
+
* activity accent independently via `BrandingData.activityAccentColor`.
|
|
623
|
+
*/
|
|
624
|
+
declare function StatusBadge({ status, size, className, kind }: StatusBadgeProps): react_jsx_runtime.JSX.Element;
|
|
625
|
+
|
|
626
|
+
interface TimelineRowProps {
|
|
627
|
+
/** Primary label — subtask description, agent name, or humanized handle. */
|
|
628
|
+
label: string;
|
|
629
|
+
/** Secondary text — task summary, self-description, or error message. */
|
|
630
|
+
description?: string;
|
|
631
|
+
/** Duration in seconds. Rendered right-aligned with tabular numerals. */
|
|
632
|
+
durationSeconds?: number;
|
|
633
|
+
/** Apply failed-state coloring to label/description. */
|
|
634
|
+
isFailed?: boolean;
|
|
635
|
+
/** Auto-expand the row when first rendered (e.g. when running). */
|
|
636
|
+
defaultExpanded?: boolean;
|
|
637
|
+
/** Nested events rendered in an indented body when expanded. */
|
|
638
|
+
nestedEvents?: Event[];
|
|
639
|
+
/** When true, the chevron is suppressed (used for non-expandable rows). */
|
|
640
|
+
hideChevron?: boolean;
|
|
641
|
+
}
|
|
642
|
+
/**
|
|
643
|
+
* Shared row content used by every reasoning-panel timeline:
|
|
644
|
+
* plan subtasks, multi-agent subagents, and sub-assistant dispatches.
|
|
645
|
+
*
|
|
646
|
+
* The leading status marker and rail are provided by the parent
|
|
647
|
+
* `Timeline`; this component only owns the label/description/duration row
|
|
648
|
+
* and the nested timeline that expands beneath it.
|
|
649
|
+
*
|
|
650
|
+
* Refreshed look: the lucide chevron is replaced by a typographic caret
|
|
651
|
+
* that rotates on expand; the duration is rendered as a tabular-num pill
|
|
652
|
+
* with quiet weight so it reads as data, not chrome.
|
|
653
|
+
*/
|
|
654
|
+
declare function TimelineRow({ label, description, durationSeconds, isFailed, defaultExpanded, nestedEvents, hideChevron, }: TimelineRowProps): react_jsx_runtime.JSX.Element;
|
|
655
|
+
|
|
656
|
+
export { type ApprovalButtonSlotProps, type ApprovalChatInputSlotProps, ArtifactChunkData, type ArtifactEntry, ArtifactInlineCard, type ArtifactInlineCardProps, ArtifactList, type ArtifactListProps, Attachment, CardVisualization, type CardVisualizationProps, ChartVisualization, type ChartVisualizationProps, ChatHeader, type ChatHeaderAction, type ChatHeaderProps, CitationSources, type CitationSourcesProps, ClarificationData, ClarificationPanel, type ClarificationPanelProps, CodePreviewVisualization, type CodePreviewVisualizationProps, Event, EventContent, EventStatus, EventTimeline, type EventTimelineProps, FormVisualization, type FormVisualizationProps, InlineCitation, type InlineCitationProps, KpiVisualization, type KpiVisualizationProps, LoadingDots, type LoadingDotsProps, MediaChunkData, MessageAttachments, type MessageAttachmentsProps, PlanData, PlanTimeline, type PlanTimelineProps, ReasoningPanel, type ReasoningPanelProps, SourceDetailModal, type SourceDetailModalProps, SourceReference, StatusBadge, StreamingChunk, SubagentPanel, type SubagentPanelProps, TableVisualization, type TableVisualizationProps, TimeMarker, type TimeMarkerProps, Timeline, TimelineItem, type TimelineItemData, type TimelineItemProps, type TimelineProps, TimelineRow, type TimelineRowProps, ToolApprovalPanel, type ToolApprovalPanelProps, type ToolApprovalSlots, VisualizationActionEvent, VisualizationChunkData, VisualizationConfig, type VisualizationEntry, VisualizationRenderer, type VisualizationRendererProps, cardVisualizationSchema, chartVisualizationSchema, codePreviewVisualizationSchema, convertChunkToEvent, convertTimelineToEvents, formVisualizationSchema, getArtifact, getRegisteredArtifactTypes, getRegisteredTypes, getVisualization, kpiVisualizationSchema, registerArtifact, registerVisualization, tableVisualizationSchema };
|
package/dist/styled/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export{
|
|
1
|
+
export{O as ArtifactInlineCard,S as ArtifactList,a as AttachmentPreview,b as Avatar,A as CardVisualization,y as ChartVisualization,c as ChatContainer,_ as ChatHeader,aa as ChatLayout,f as CitationSources,i as ClarificationPanel,C as CodePreviewVisualization,p as EventContent,s as EventTimeline,D as FormVisualization,h as InlineCitation,B as KpiVisualization,d as LoadingDots,e as MarkdownContent,U as Message,k as MessageActionBar,l as MessageAttachments,V as MessageComposer,X as MessageList,u as PlanTimeline,v as ReasoningPanel,W as ScrollToBottomButton,g as SourceDetailModal,m as StatusBadge,w as StreamingText,ca as SubagentPanel,x as SuggestedActions,z as TableVisualization,Y as TimeMarker,n as Timeline,o as TimelineItem,t as TimelineRow,j as ToolApprovalPanel,$ as ToolStatusIndicator,Z as TypingIndicator,N as VisualizationRenderer,ba as WelcomeScreen,J as cardVisualizationSchema,H as chartVisualizationSchema,L as codePreviewVisualizationSchema,q as convertChunkToEvent,r as convertTimelineToEvents,M as formVisualizationSchema,Q as getArtifact,R as getRegisteredArtifactTypes,G as getRegisteredTypes,F as getVisualization,K as kpiVisualizationSchema,P as registerArtifact,E as registerVisualization,I as tableVisualizationSchema}from'../chunk-ERJKVQQT.js';export{h as useComposer,b as useMessage}from'../chunk-6RN7SUWT.js';import'../chunk-D2PFIJNZ.js';import'../chunk-4WWJTYYA.js';export{b as ChatProvider,c as useChatContext}from'../chunk-NKLA5PPB.js';import'../chunk-NG4HKXYB.js';import'../chunk-IUCKTDTZ.js';//# sourceMappingURL=index.js.map
|
|
2
2
|
//# sourceMappingURL=index.js.map
|