@tangle-network/ui 11.46.0 → 11.48.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/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @tangle-network/ui
2
2
 
3
+ ## 11.48.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 182708a: `@tangle-network/ui/chat` adds `partitionBySpeaker` and `SpeakerHeader` for a turn addressed to several agents. `partitionBySpeaker(parts)` splits one assistant turn's parts by responder: a stored row by position after each speaker part, a live stream by each part's `speaker` tag, and a repeated speaker part carries that responder's end state. `SpeakerHeader` is the author line with the agent's handle and its state: answering, done (silent) or failed. `MessageAuthor` now renders children after the name and role.
8
+
9
+ ## 11.47.0
10
+
11
+ ### Minor Changes
12
+
13
+ - 99cf964: A windowed transcript keeps the chat's rhythm and edge. `AgentTimeline` now renders through two new exports, `AgentTimelineColumn` (the centred reading column) and `AgentTimelineStep` (one row with the gap its neighbour pair calls for, from `agentTimelineStepKind`), so a consumer that virtualizes a long transcript renders its rows inside one column instead of one `AgentTimeline` per row.
14
+
15
+ `RunRowShell` (and so `InlineToolItem` and `InlineThinkingItem`) marks a failure on the row's own glyph, tinted to the danger ink beside the tool's name, instead of a red dot at the row's far edge. `data-run-row-status="error"` moves to the glyph slot. The collapsed error line, the hover duration, an opened reasoning body, a user message's timestamp row and the "Show more steps" toggle read at `text-sm` (14px) instead of 10–12px.
16
+
3
17
  ## 11.46.0
4
18
 
5
19
  ### Minor Changes
@@ -84,6 +84,35 @@ export interface AgentTimelineProps {
84
84
  */
85
85
  viewerId?: string;
86
86
  }
87
+ /**
88
+ * Vertical rhythm. Rows are grouped by what they are, and the gap between two
89
+ * neighbours follows from the pair: a turn boundary (user message) separates
90
+ * most, a tool sequence — and prose beside it — sits tightest, cards and
91
+ * consecutive paragraphs fall between.
92
+ */
93
+ export type AgentTimelineStepKind = "user" | "prose" | "tool" | "card";
94
+ /** What a row is, for the gap above the next one. */
95
+ export declare function agentTimelineStepKind(item: AgentTimelineItem): AgentTimelineStepKind;
96
+ /** The transcript column every timeline sits in: centred, at the reading width. */
97
+ export declare function AgentTimelineColumn({ className, children }: {
98
+ className?: string;
99
+ children?: ReactNode;
100
+ }): import("react").JSX.Element;
101
+ export interface AgentTimelineStepProps {
102
+ item: AgentTimelineItem;
103
+ /** The kind of the row above, which sets the gap; omit for the first row. */
104
+ previous?: AgentTimelineStepKind;
105
+ /** Draw the message's author line (the first prose of a turn). */
106
+ headed?: boolean;
107
+ renderToolActions?: (part: ToolPart) => ReactNode;
108
+ viewerId?: string;
109
+ }
110
+ /**
111
+ * One row of the timeline with the gap its neighbour pair calls for. A
112
+ * consumer that windows a long transcript renders these inside one
113
+ * `AgentTimelineColumn`, so the rows keep the column's rhythm and edge.
114
+ */
115
+ export declare function AgentTimelineStep({ item, previous, headed, renderToolActions, viewerId }: AgentTimelineStepProps): import("react").JSX.Element;
87
116
  /**
88
117
  * AgentTimeline — unified mixed-content transcript for agent-backed sandbox
89
118
  * sessions. Renders messages, tool rows, status cards, and artifact handoffs
@@ -42,7 +42,8 @@ const TONE_STYLES = {
42
42
  icon: AlertTriangle
43
43
  }
44
44
  };
45
- function stepKind(item) {
45
+ /** What a row is, for the gap above the next one. */
46
+ function agentTimelineStepKind(item) {
46
47
  if (item.kind === "message") return item.role === "user" ? "user" : "prose";
47
48
  if (item.kind === "status" || item.kind === "artifact") return "card";
48
49
  return "tool";
@@ -151,6 +152,71 @@ function ArtifactCard({ item }) {
151
152
  children: content
152
153
  });
153
154
  }
155
+ /** The transcript column every timeline sits in: centred, at the reading width. */
156
+ function AgentTimelineColumn({ className, children }) {
157
+ return /* @__PURE__ */ jsx("div", {
158
+ className: cn("mx-auto flex w-full max-w-5xl flex-col px-4 py-4", className),
159
+ children
160
+ });
161
+ }
162
+ /**
163
+ * One row of the timeline with the gap its neighbour pair calls for. A
164
+ * consumer that windows a long transcript renders these inside one
165
+ * `AgentTimelineColumn`, so the rows keep the column's rhythm and edge.
166
+ */
167
+ function AgentTimelineStep({ item, previous, headed, renderToolActions, viewerId }) {
168
+ const kind = agentTimelineStepKind(item);
169
+ return /* @__PURE__ */ jsx("div", {
170
+ "data-timeline-step": kind,
171
+ className: cn(spacingBefore(previous, kind), kind === "tool" && ROW_BLEED),
172
+ children: /* @__PURE__ */ jsx(TimelineItem, {
173
+ item,
174
+ headed,
175
+ renderToolActions,
176
+ viewerId
177
+ })
178
+ });
179
+ }
180
+ function TimelineItem({ item, headed, renderToolActions, viewerId }) {
181
+ if (item.kind === "message") return item.role === "user" ? /* @__PURE__ */ jsx(UserMessage, {
182
+ content: item.content,
183
+ timestamp: item.timestamp,
184
+ author: item.author,
185
+ viewerId
186
+ }) : /* @__PURE__ */ jsx(AssistantMessage, {
187
+ item,
188
+ author: headed ? item.author : void 0
189
+ });
190
+ if (item.kind === "tool") return /* @__PURE__ */ jsx(ToolCallStep, {
191
+ type: item.call.type,
192
+ label: item.call.label,
193
+ status: item.call.status,
194
+ detail: item.call.detail,
195
+ output: item.call.output,
196
+ duration: item.call.duration,
197
+ part: item.part,
198
+ actions: item.part ? renderToolActions?.(item.part) : void 0
199
+ });
200
+ if (item.kind === "tool_group") return /* @__PURE__ */ jsx(ToolCallGroup, {
201
+ title: item.title,
202
+ children: item.calls.map((call, callIndex) => {
203
+ const part = item.parts?.[callIndex];
204
+ return /* @__PURE__ */ jsx(ToolCallStep, {
205
+ type: call.type,
206
+ label: call.label,
207
+ status: call.status,
208
+ detail: call.detail,
209
+ output: call.output,
210
+ duration: call.duration,
211
+ part,
212
+ actions: part ? renderToolActions?.(part) : void 0
213
+ }, call.id);
214
+ })
215
+ });
216
+ if (item.kind === "status") return /* @__PURE__ */ jsx(StatusCard, { item });
217
+ if (item.kind === "artifact") return /* @__PURE__ */ jsx(ArtifactCard, { item });
218
+ return item.content;
219
+ }
154
220
  /**
155
221
  * AgentTimeline — unified mixed-content transcript for agent-backed sandbox
156
222
  * sessions. Renders messages, tool rows, status cards, and artifact handoffs
@@ -197,62 +263,20 @@ function AgentTimeline({ items, isThinking, emptyState, className, renderToolAct
197
263
  if (item.author && item.author.id !== speakingAgent) headedAgentMessages.add(item.id);
198
264
  speakingAgent = item.author?.id;
199
265
  }
200
- const renderItem = (item) => {
201
- if (item.kind === "message") return item.role === "user" ? /* @__PURE__ */ jsx(UserMessage, {
202
- content: item.content,
203
- timestamp: item.timestamp,
204
- author: item.author,
205
- viewerId
206
- }) : /* @__PURE__ */ jsx(AssistantMessage, {
266
+ return /* @__PURE__ */ jsxs(AgentTimelineColumn, {
267
+ className,
268
+ children: [renderList.map((item, index) => /* @__PURE__ */ jsx(AgentTimelineStep, {
207
269
  item,
208
- author: headedAgentMessages.has(item.id) ? item.author : void 0
209
- });
210
- if (item.kind === "tool") return /* @__PURE__ */ jsx(ToolCallStep, {
211
- type: item.call.type,
212
- label: item.call.label,
213
- status: item.call.status,
214
- detail: item.call.detail,
215
- output: item.call.output,
216
- duration: item.call.duration,
217
- part: item.part,
218
- actions: item.part ? renderToolActions?.(item.part) : void 0
219
- });
220
- if (item.kind === "tool_group") return /* @__PURE__ */ jsx(ToolCallGroup, {
221
- title: item.title,
222
- children: item.calls.map((call, callIndex) => {
223
- const part = item.parts?.[callIndex];
224
- return /* @__PURE__ */ jsx(ToolCallStep, {
225
- type: call.type,
226
- label: call.label,
227
- status: call.status,
228
- detail: call.detail,
229
- output: call.output,
230
- duration: call.duration,
231
- part,
232
- actions: part ? renderToolActions?.(part) : void 0
233
- }, call.id);
234
- })
235
- });
236
- if (item.kind === "status") return /* @__PURE__ */ jsx(StatusCard, { item });
237
- if (item.kind === "artifact") return /* @__PURE__ */ jsx(ArtifactCard, { item });
238
- return item.content;
239
- };
240
- return /* @__PURE__ */ jsxs("div", {
241
- className: cn("mx-auto flex w-full max-w-5xl flex-col px-4 py-4", className),
242
- children: [renderList.map((item, index) => {
243
- const kind = stepKind(item);
244
- const prev = index > 0 ? stepKind(renderList[index - 1]) : void 0;
245
- return /* @__PURE__ */ jsx("div", {
246
- "data-timeline-step": kind,
247
- className: cn(spacingBefore(prev, kind), kind === "tool" && ROW_BLEED),
248
- children: renderItem(item)
249
- }, item.id);
250
- }), collapsible ? /* @__PURE__ */ jsx("button", {
270
+ previous: index > 0 ? agentTimelineStepKind(renderList[index - 1]) : void 0,
271
+ headed: headedAgentMessages.has(item.id),
272
+ renderToolActions,
273
+ viewerId
274
+ }, item.id)), collapsible ? /* @__PURE__ */ jsx("button", {
251
275
  type: "button",
252
276
  onClick: () => setExpanded((value) => !value),
253
- className: "mt-2 self-start text-xs font-medium text-muted-foreground transition-colors hover:text-foreground",
277
+ className: "mt-2 self-start text-sm font-medium text-muted-foreground transition-colors hover:text-foreground",
254
278
  children: collapsed ? `Show ${hiddenCount} more step${hiddenCount === 1 ? "" : "s"}` : "Show less"
255
279
  }) : null]
256
280
  });
257
281
  }
258
- export { AgentTimeline };
282
+ export { AgentTimeline, AgentTimelineColumn, AgentTimelineStep, agentTimelineStepKind };
@@ -7,16 +7,17 @@ import { HTMLAttributes } from "react";
7
7
  * `viewerId`, every authored message belongs to someone else.
8
8
  */
9
9
  export declare function isViewerMessage(author: ChatAuthor | undefined, viewerId: string | undefined): boolean;
10
- export interface MessageAuthorProps extends Omit<HTMLAttributes<HTMLDivElement>, "children"> {
10
+ export interface MessageAuthorProps extends HTMLAttributes<HTMLDivElement> {
11
11
  author: ChatAuthor;
12
12
  }
13
13
  /**
14
14
  * The line above a message in a transcript with several participants: the
15
- * author's avatar, name and, when given, their role as a tag.
15
+ * author's avatar, name and, when given, their role as a tag. Children follow
16
+ * on the same line, such as a responder's handle and state.
16
17
  *
17
18
  * The avatar's tone comes from the author's id, so a participant keeps one
18
19
  * colour for the whole thread and in every product. Tones can repeat between
19
20
  * participants, so the name is always shown beside it. The avatar repeats the
20
21
  * visible name and is hidden from assistive technology.
21
22
  */
22
- export declare function MessageAuthor({ author, className, ...props }: MessageAuthorProps): import("react").JSX.Element;
23
+ export declare function MessageAuthor({ author, className, children, ...props }: MessageAuthorProps): import("react").JSX.Element;
@@ -15,14 +15,15 @@ function isViewerMessage(author, viewerId) {
15
15
  }
16
16
  /**
17
17
  * The line above a message in a transcript with several participants: the
18
- * author's avatar, name and, when given, their role as a tag.
18
+ * author's avatar, name and, when given, their role as a tag. Children follow
19
+ * on the same line, such as a responder's handle and state.
19
20
  *
20
21
  * The avatar's tone comes from the author's id, so a participant keeps one
21
22
  * colour for the whole thread and in every product. Tones can repeat between
22
23
  * participants, so the name is always shown beside it. The avatar repeats the
23
24
  * visible name and is hidden from assistive technology.
24
25
  */
25
- function MessageAuthor({ author, className, ...props }) {
26
+ function MessageAuthor({ author, className, children, ...props }) {
26
27
  return /* @__PURE__ */ jsxs("div", {
27
28
  "data-message-author": "",
28
29
  className: cn("flex min-w-0 max-w-full items-center gap-2", className),
@@ -45,7 +46,8 @@ function MessageAuthor({ author, className, ...props }) {
45
46
  emphasis: "outline",
46
47
  className: "max-w-[50%]",
47
48
  children: author.role
48
- }) : null
49
+ }) : null,
50
+ children
49
51
  ]
50
52
  });
51
53
  }
@@ -0,0 +1,57 @@
1
+ import { HTMLAttributes } from "react";
2
+ /** Where one responder is in its answer. */
3
+ export type SpeakerState = "answering" | "done" | "failed";
4
+ /**
5
+ * A responder of a turn addressed to several agents. In the turn's parts it is
6
+ * a `{ type: "speaker", id, name, handle?, state? }` part written before the
7
+ * responder's answer.
8
+ */
9
+ export interface Speaker {
10
+ /** The agent's stable id. It keys the avatar's tone and a live part's `speaker` tag. */
11
+ id: string;
12
+ name: string;
13
+ /** What a person types after `@` to address the agent. */
14
+ handle?: string;
15
+ /** Set once the responder ended; absent while it answers and on rows written before responders reported an end. */
16
+ state?: SpeakerState;
17
+ }
18
+ export type SpeakerPart = Speaker & {
19
+ type: "speaker";
20
+ };
21
+ /** One responder's share of a turn: its speaker part and the parts it wrote. */
22
+ export interface SpeakerSection<T> {
23
+ /** The latest speaker part for this responder; null for the parts no speaker owns. */
24
+ speaker: (T & SpeakerPart) | null;
25
+ parts: T[];
26
+ }
27
+ /**
28
+ * Splits one assistant turn's parts by the agent that wrote them.
29
+ *
30
+ * A stored row holds a speaker part before each responder's answer, so a part
31
+ * belongs to the speaker part before it. A live stream announces every
32
+ * responder first and then interleaves their output, so a part names its owner
33
+ * in `speaker` (the responder's id), which wins over position. A later speaker
34
+ * part with an id already seen replaces that responder's speaker part, which is
35
+ * how its end state arrives, and never opens a second section.
36
+ *
37
+ * Sections keep the order speakers were first announced. Parts no speaker owns
38
+ * come first, in a section whose `speaker` is null; a turn without speaker
39
+ * parts is that one section. No part is dropped, copied or reordered within its
40
+ * section.
41
+ */
42
+ export declare function partitionBySpeaker<T extends object>(parts: readonly T[]): SpeakerSection<T>[];
43
+ export interface SpeakerHeaderProps extends Omit<HTMLAttributes<HTMLDivElement>, "children"> {
44
+ speaker: Speaker;
45
+ /** The turn is still running, so a responder that has not reported an end is answering. */
46
+ live?: boolean;
47
+ }
48
+ /**
49
+ * The line above one responder's answer: the author line every participant
50
+ * gets, then the handle a person types to address the agent, then its state.
51
+ *
52
+ * The state comes from the speaker's own end state, else from `live`. An
53
+ * answering responder shows the status grammar's open ring with the word, a
54
+ * failed one its cross with the word, and a finished one nothing, as a settled
55
+ * run row does. `data-speaker-state` carries all three.
56
+ */
57
+ export declare function SpeakerHeader({ speaker, live, ...props }: SpeakerHeaderProps): import("react").JSX.Element;
@@ -0,0 +1,84 @@
1
+ import { StatusPill } from "../primitives/status-pill.js";
2
+ import { MessageAuthor } from "./message-author.js";
3
+ import { jsx, jsxs } from "react/jsx-runtime";
4
+ // src/chat/speaker.tsx
5
+ function isSpeakerPart(part) {
6
+ const record = part;
7
+ return !!record && record.type === "speaker" && typeof record.id === "string" && typeof record.name === "string";
8
+ }
9
+ /**
10
+ * Splits one assistant turn's parts by the agent that wrote them.
11
+ *
12
+ * A stored row holds a speaker part before each responder's answer, so a part
13
+ * belongs to the speaker part before it. A live stream announces every
14
+ * responder first and then interleaves their output, so a part names its owner
15
+ * in `speaker` (the responder's id), which wins over position. A later speaker
16
+ * part with an id already seen replaces that responder's speaker part, which is
17
+ * how its end state arrives, and never opens a second section.
18
+ *
19
+ * Sections keep the order speakers were first announced. Parts no speaker owns
20
+ * come first, in a section whose `speaker` is null; a turn without speaker
21
+ * parts is that one section. No part is dropped, copied or reordered within its
22
+ * section.
23
+ */
24
+ function partitionBySpeaker(parts) {
25
+ const sections = /* @__PURE__ */ new Map();
26
+ const unowned = [];
27
+ let current;
28
+ for (const part of parts) {
29
+ if (isSpeakerPart(part)) {
30
+ current = sections.get(part.id);
31
+ if (current) current.speaker = part;
32
+ else sections.set(part.id, current = {
33
+ speaker: part,
34
+ parts: []
35
+ });
36
+ continue;
37
+ }
38
+ const tag = part.speaker;
39
+ ((typeof tag === "string" ? sections.get(tag) : current)?.parts ?? unowned).push(part);
40
+ }
41
+ const owned = [...sections.values()];
42
+ return unowned.length > 0 || owned.length === 0 ? [{
43
+ speaker: null,
44
+ parts: unowned
45
+ }, ...owned] : owned;
46
+ }
47
+ /**
48
+ * The line above one responder's answer: the author line every participant
49
+ * gets, then the handle a person types to address the agent, then its state.
50
+ *
51
+ * The state comes from the speaker's own end state, else from `live`. An
52
+ * answering responder shows the status grammar's open ring with the word, a
53
+ * failed one its cross with the word, and a finished one nothing, as a settled
54
+ * run row does. `data-speaker-state` carries all three.
55
+ */
56
+ function SpeakerHeader({ speaker, live = false, ...props }) {
57
+ const state = speaker.state ?? (live ? "answering" : "done");
58
+ return /* @__PURE__ */ jsxs(MessageAuthor, {
59
+ author: {
60
+ id: speaker.id,
61
+ name: speaker.name
62
+ },
63
+ "data-speaker-state": state,
64
+ ...props,
65
+ children: [speaker.handle ? /* @__PURE__ */ jsxs("span", {
66
+ className: "min-w-0 truncate text-muted-foreground text-sm",
67
+ title: `@${speaker.handle}`,
68
+ children: ["@", speaker.handle]
69
+ }) : null, state === "answering" ? /* @__PURE__ */ jsx(StatusPill, {
70
+ tone: "running",
71
+ bare: true,
72
+ size: "md",
73
+ className: "shrink-0 py-0",
74
+ children: "Answering"
75
+ }) : state === "failed" ? /* @__PURE__ */ jsx(StatusPill, {
76
+ tone: "danger",
77
+ bare: true,
78
+ size: "md",
79
+ className: "shrink-0 py-0",
80
+ children: "Failed"
81
+ }) : null]
82
+ });
83
+ }
84
+ export { SpeakerHeader, partitionBySpeaker };
@@ -12,7 +12,7 @@ function formatTime(date) {
12
12
  }
13
13
  function MessageActions({ children, align = "end" }) {
14
14
  return /* @__PURE__ */ jsx("div", {
15
- className: `flex flex-wrap items-center ${align === "end" ? "justify-end" : "justify-start"} gap-1.5 text-xs text-muted-foreground`,
15
+ className: `flex flex-wrap items-center ${align === "end" ? "justify-end" : "justify-start"} gap-1.5 text-sm text-muted-foreground`,
16
16
  children
17
17
  });
18
18
  }
package/dist/chat.d.ts CHANGED
@@ -4,7 +4,8 @@ import { MessageList, MessageListProps } from "./chat/message-list.js";
4
4
  import { UserMessage, UserMessageProps } from "./chat/user-message.js";
5
5
  import { ChatMessage, ChatMessageProps, MessageRole } from "./chat/chat-message.js";
6
6
  import { MessageAuthor, MessageAuthorProps, isViewerMessage } from "./chat/message-author.js";
7
+ import { Speaker, SpeakerHeader, SpeakerHeaderProps, SpeakerPart, SpeakerSection, SpeakerState, partitionBySpeaker } from "./chat/speaker.js";
7
8
  import { ThinkingIndicator, ThinkingIndicatorProps } from "./chat/thinking-indicator.js";
8
- import { AgentTimeline, AgentTimelineArtifactItem, AgentTimelineCustomItem, AgentTimelineItem, AgentTimelineMessageItem, AgentTimelineProps, AgentTimelineStatusItem, AgentTimelineTone, AgentTimelineToolGroupItem, AgentTimelineToolItem } from "./chat/agent-timeline.js";
9
+ import { AgentTimeline, AgentTimelineArtifactItem, AgentTimelineColumn, AgentTimelineCustomItem, AgentTimelineItem, AgentTimelineMessageItem, AgentTimelineProps, AgentTimelineStatusItem, AgentTimelineStep, AgentTimelineStepKind, AgentTimelineStepProps, AgentTimelineTone, AgentTimelineToolGroupItem, AgentTimelineToolItem, agentTimelineStepKind } from "./chat/agent-timeline.js";
9
10
  import { TRANSCRIPT_TEXT } from "./chat/transcript-text.js";
10
- export { AgentTimeline, type AgentTimelineArtifactItem, type AgentTimelineCustomItem, type AgentTimelineItem, type AgentTimelineMessageItem, type AgentTimelineProps, type AgentTimelineStatusItem, type AgentTimelineTone, type AgentTimelineToolGroupItem, type AgentTimelineToolItem, type ChatAuthor, ChatContainer, type ChatContainerProps, ChatMessage, type ChatMessageProps, MessageAuthor, type MessageAuthorProps, MessageList, type MessageListProps, type MessageRole, TRANSCRIPT_TEXT, ThinkingIndicator, type ThinkingIndicatorProps, UserMessage, type UserMessageProps, isViewerMessage };
11
+ export { AgentTimeline, type AgentTimelineArtifactItem, AgentTimelineColumn, type AgentTimelineCustomItem, type AgentTimelineItem, type AgentTimelineMessageItem, type AgentTimelineProps, type AgentTimelineStatusItem, AgentTimelineStep, type AgentTimelineStepKind, type AgentTimelineStepProps, type AgentTimelineTone, type AgentTimelineToolGroupItem, type AgentTimelineToolItem, type ChatAuthor, ChatContainer, type ChatContainerProps, ChatMessage, type ChatMessageProps, MessageAuthor, type MessageAuthorProps, MessageList, type MessageListProps, type MessageRole, type Speaker, SpeakerHeader, type SpeakerHeaderProps, type SpeakerPart, type SpeakerSection, type SpeakerState, TRANSCRIPT_TEXT, ThinkingIndicator, type ThinkingIndicatorProps, UserMessage, type UserMessageProps, agentTimelineStepKind, isViewerMessage, partitionBySpeaker };
package/dist/chat.js CHANGED
@@ -3,7 +3,8 @@ import { MessageAuthor, isViewerMessage } from "./chat/message-author.js";
3
3
  import { UserMessage } from "./chat/user-message.js";
4
4
  import { MessageList } from "./chat/message-list.js";
5
5
  import { ThinkingIndicator } from "./chat/thinking-indicator.js";
6
- import { AgentTimeline } from "./chat/agent-timeline.js";
6
+ import { AgentTimeline, AgentTimelineColumn, AgentTimelineStep, agentTimelineStepKind } from "./chat/agent-timeline.js";
7
7
  import { ChatContainer } from "./chat/chat-container.js";
8
8
  import { ChatMessage } from "./chat/chat-message.js";
9
- export { AgentTimeline, ChatContainer, ChatMessage, MessageAuthor, MessageList, TRANSCRIPT_TEXT, ThinkingIndicator, UserMessage, isViewerMessage };
9
+ import { SpeakerHeader, partitionBySpeaker } from "./chat/speaker.js";
10
+ export { AgentTimeline, AgentTimelineColumn, AgentTimelineStep, ChatContainer, ChatMessage, MessageAuthor, MessageList, SpeakerHeader, TRANSCRIPT_TEXT, ThinkingIndicator, UserMessage, agentTimelineStepKind, isViewerMessage, partitionBySpeaker };
package/dist/index.d.ts CHANGED
@@ -16,10 +16,11 @@ import { MessageList, MessageListProps } from "./chat/message-list.js";
16
16
  import { UserMessage, UserMessageProps } from "./chat/user-message.js";
17
17
  import { ChatMessage, ChatMessageProps, MessageRole } from "./chat/chat-message.js";
18
18
  import { MessageAuthor, MessageAuthorProps, isViewerMessage } from "./chat/message-author.js";
19
+ import { Speaker, SpeakerHeader, SpeakerHeaderProps, SpeakerPart, SpeakerSection, SpeakerState, partitionBySpeaker } from "./chat/speaker.js";
19
20
  import { ThinkingIndicator, ThinkingIndicatorProps } from "./chat/thinking-indicator.js";
20
21
  import { ToolCallStatus, ToolCallType } from "./run/tool-call-step.js";
21
22
  import { FeedSegment, ToolCallData, ToolCallFeed, ToolCallFeedProps, parseToolEvent } from "./run/tool-call-feed.js";
22
- import { AgentTimeline, AgentTimelineArtifactItem, AgentTimelineCustomItem, AgentTimelineItem, AgentTimelineMessageItem, AgentTimelineProps, AgentTimelineStatusItem, AgentTimelineTone, AgentTimelineToolGroupItem, AgentTimelineToolItem } from "./chat/agent-timeline.js";
23
+ import { AgentTimeline, AgentTimelineArtifactItem, AgentTimelineColumn, AgentTimelineCustomItem, AgentTimelineItem, AgentTimelineMessageItem, AgentTimelineProps, AgentTimelineStatusItem, AgentTimelineStep, AgentTimelineStepKind, AgentTimelineStepProps, AgentTimelineTone, AgentTimelineToolGroupItem, AgentTimelineToolItem, agentTimelineStepKind } from "./chat/agent-timeline.js";
23
24
  import { TRANSCRIPT_TEXT } from "./chat/transcript-text.js";
24
25
  import "./chat.js";
25
26
  import { codeBlockGrammar } from "./lib/code-presentation.js";
@@ -143,4 +144,4 @@ import { QuestionPreview, QuestionPreviewProps } from "./tool-previews/question-
143
144
  import { DiffPreview, DiffPreviewProps } from "./tool-previews/diff-preview.js";
144
145
  import { RedactedDocSegment, RedactedDocument, RedactedDocumentData, RedactedDocumentProps, RevealResult } from "./redaction/redacted-document.js";
145
146
  import "./redaction.js";
146
- export { ActiveProjectActivity, ActiveSessionActivityOptions, ActiveSessionConnectionOptions, ActiveSessionConnectionState, ActiveSessionReconnectState, ActiveSessionRecord, ActiveSessionStatus, ActiveSessionTransportMode, ActiveSessionsState, AgentBranding, AgentStreamEvent, AgentTimeline, type AgentTimelineArtifactItem, type AgentTimelineCustomItem, type AgentTimelineItem, type AgentTimelineMessageItem, type AgentTimelineProps, type AgentTimelineStatusItem, type AgentTimelineTone, type AgentTimelineToolGroupItem, type AgentTimelineToolItem, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, type AlertProps, AlertTitle, type AlertTone, ApiSchema, type ApiSchemaProps, AppendUserMessageOptions, ApplySdkEventOptions, ApprovalCard, type ApprovalCardProps, type ApprovalDiffFile, ApprovalDiffSummary, type ApprovalPlanStep, ArtifactPane, type ArtifactPaneProps, AuthHeader, type AuthHeaderProps, AuthUser, AutomationStreamEvent, Avatar, AvatarFallback, AvatarImage, type AvatarProps, Badge, type BadgeProps, BeginAssistantMessageOptions, BotStreamEvent, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, type ButtonProps, CATEGORY_TONES, CSV_PREVIEW_ROW_LIMIT, Calendar, type CalendarDate, type CalendarProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, type CardTitleProps, type CategoryTone, type ChartReferenceLine, ChatAuthor, ChatContainer, type ChatContainerProps, ChatMessage, type ChatMessageProps, Checkbox, Chip, type ChipProps, CodeBlock, type CodeBlockProps, Collapsible, CollapsibleContent, CollapsibleTrigger, CommandPreview, type CommandPreviewProps, CompleteAssistantMessageOptions, ComplianceBadge, type ComplianceBadgeProps, type ComplianceProduct, type ComplianceStatus, ConnectionState, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, CopyButton, type CopyButtonProps, CustomToolRenderer, DatePicker, type DatePickerProps, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DiffPreview, type DiffPreviewProps, DisplayVariant, DropZone, type DropZoneProps, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, type EmptyStateProps, ExpandedToolDetail, type ExpandedToolDetailProps, type FeedSegment, Field, type FieldProps, FileArtifactPane, type FileArtifactPaneProps, FileCard, type FileCardProps, type FileDetails, type FileFormat, FileList, type FileListItem, type FileListProps, type FileNode, FilePreview, type FilePreviewKind, type FilePreviewProps, type FileTabData, FileTabs, type FileTabsProps, FileTree, type FileTreeProps, type FileTreeVisibilityOptions, type FileUploader, FilterField, type FilterFieldProps, FinalTextPart, GitHubLoginButton, type GitHubLoginButtonProps, GlobResultsPreview, type GlobResultsPreviewProps, GrepResultsPreview, type GrepResultsPreviewProps, GroupedMessage, Heading, type HeadingProps, type HeadingVariant, HelpText, type HelpTextProps, HoverCard, HoverCardContent, HoverCardDescription, HoverCardHeader, HoverCardTitle, HoverCardTrigger, IconTile, type IconTileProps, InlineCode, type InlineCodeProps, InlineThinkingItem, type InlineThinkingItemProps, InlineToolItem, type InlineToolItemProps, Input, type InputProps, Label, LiveDuration, LoginLayout, type LoginLayoutProps, Logo, type LogoProps, Markdown, type MarkdownLinkChip, type MarkdownLinkChipResolver, type MarkdownProps, MessageAuthor, type MessageAuthorProps, MessageList, type MessageListProps, type MessageRole, MessageRun, MessageUser, Metric, MetricChart, type MetricChartProps, type MetricProps, MetricStrip, type MetricStripProps, OPENUI_NODE_JSON_SCHEMA, OPENUI_NODE_TYPES, type OpenUIAction, type OpenUIActionsNode, OpenUIArtifactRenderer, type OpenUIArtifactRendererProps, type OpenUIBadgeNode, type OpenUICardNode, type OpenUICodeNode, type OpenUIComponentNode, type OpenUIGridNode, type OpenUIHeadingNode, type OpenUIKeyValueNode, type OpenUIMarkdownNode, type OpenUIPrimitive, type OpenUISchemaIssue, type OpenUISchemaValidation, type OpenUISeparatorNode, type OpenUIStackNode, type OpenUIStatNode, type OpenUITableNode, type OpenUITextNode, PageHeader, type PageHeaderProps, PageShell, type PageShellProps, Pagination, type PaginationProps, PdfViewer, type PdfViewerConfig, type PdfViewerProps, type PeriodDelta, Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverTrigger, Progress, QuestionPreview, type QuestionPreviewProps, RadioGroup, RadioGroupItem, RealtimeSessionOptions, RealtimeSessionRegistry, RealtimeSessionRegistryProps, RealtimeSessionState, RealtimeSessionTarget, ReasoningPart, type RedactedDocSegment, RedactedDocument, type RedactedDocumentData, type RedactedDocumentProps, RegisterActiveSessionOptions, type RevealResult, RichFileTree, type RichFileTreeGitEntry, type RichFileTreeGitStatus, type RichFileTreeProps, type RichFileTreeThemeVars, Run, RunGroup, type RunGroupProps, type RunPhase, RunPhaseList, RunRowShell, type RunRowShellProps, type RunRowStatus, RunRowStatusDot, RunStats, SSEEvent, SdkSessionAttachment, SdkSessionEvent, SdkSessionSeed, SegmentedControl, type SegmentedControlOption, type SegmentedControlProps, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, type SeriesExtent, type SeriesPoint, type SeriesPointInput, type SeriesScale, SeriesSparkline, type SeriesSparklineProps, SessionMessage, SessionPart, SessionProjectKey, type SessionUser, SettingsList, type SettingsListAction, type SettingsListColumns, SettingsListItem, type SettingsListItemProps, type SettingsListMenuItem, type SettingsListProps, SettingsRow, type SettingsRowLayout, type SettingsRowProps, SettingsSection, type SettingsSectionProps, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, SidebarDropZone, type SidebarDropZoneProps, Skeleton, SkeletonCard, SkeletonTable, Slider, StatCard, type StatCardProps, StatusPill, type StatusPillProps, type StatusTone, Switch, TONE_CLASSES, TOOL_CATEGORY_ICONS, TRANSCRIPT_TEXT, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, type TableProps, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Tag, type TagProps, TangleKnot, TaskList, type TaskListItem, type TaskListProps, type TaskStatus, TaskStreamEvent, TerminalCursor, TerminalDisplay, TerminalInput, TerminalLine, TerminalStreamEvent, TextPart, TextShimmer, type TextShimmerProps, Textarea, type TextareaProps, ThemeToggle, ThinkingIndicator, type ThinkingIndicatorProps, TimeSelect, type TimeSelectProps, type Toast, ToastContainer, ToastProvider, type Tone, type ToneClasses, type ToolCallData, ToolCallFeed, type ToolCallFeedProps, type ToolCallStatus, type ToolCallType, ToolCategory, ToolDisplayMetadata, ToolPart, ToolState, ToolStatus, ToolTime, Toolbar, type ToolbarProps, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, type UploadFile, UploadProgress, type UploadProgressProps, UseAuthOptions, UseAuthResult, UseRunGroupsOptions, UseSSEStreamOptions, UseSSEStreamResult, UseSdkSessionOptions, UseSdkSessionReturn, UseToolCallStreamReturn, UserMenu, type UserMenuProps, UserMessage, type UserMessageProps, WebSearchPreview, type WebSearchPreviewProps, Wizard, type WizardProps, WizardStep, type WizardStepProps, WriteFilePreview, type WriteFilePreviewProps, activeSessionsAtom, addMessage, addParts, badgeVariants, bumpActiveSessionActivity, buttonVariants, clearChat, cn, codeBlockGrammar, configurePdfViewer, copyText, createAuthFetcher, detectFileFormat, fenceInfo, fieldMessageId, fileExtension, filterFileTree, findUnsupportedOpenUINode, focusField, focusFieldInvalid, focusFieldWithin, focusRing, focusRingInset, formatBytes, formatCalendarDate, formatDuration, formatUptime, getActiveSession, getAllActiveSessions, getAllProjectActivity, getCodeLanguage, getFormatLabel, getSanitizedMarkdownHeadingIdFromRawFragment, getSessionsByActivity, getSessionsForNavbar, getSessionsForProject, getSyntaxLanguage, getToolCategory, getToolDisplayMetadata, getToolErrorText, getTotalRunningSessionCount, hasBackgroundRunningSessions, initialsOf, isStreamingAtom, isViewerMessage, ixControl, ixControlAfter, ixControlSoft, ixField, ixRow, ixSelected, ixTabUnderline, localToday, messagesAtom, normalizeSeries, numericColumns, parseCalendarDate, parseCsv, parseToolEvent, partMapAtom, periodDelta, plainTextFromMarkdown, registerActiveSession, resetActiveSessions, resolveFilePreviewKind, seriesAreaPath, seriesExtent, seriesLinePath, seriesMean, seriesScale, setActiveSessionAttention, setActiveSessionConnection, setActiveSessionError, setActiveSessionRunning, setForegroundActiveSession, showsTaskPriority, tableCsv, taskProgress, taskStatus, timeAgo, toneFor, truncateText, unregisterActiveSession, updateActiveSessionMeta, updatePart, useActiveSession, useActiveSessions, useActiveSessionsState, useApiKey, useAuth, useAutoScroll, useDropdownMenu, useHasBackgroundRunningSessions, useLiveTime, useNavbarSessions, useProjectActivity, useProjectSessions, useRealtimeSession, useRunCollapseState, useRunGroups, useSSEStream, useSdkSession, useSessionsByActivity, useTheme, useToast, useToolCallStream, useTotalRunningSessions, validateOpenUIJsonArtifact, validateOpenUIJsonNode };
147
+ export { ActiveProjectActivity, ActiveSessionActivityOptions, ActiveSessionConnectionOptions, ActiveSessionConnectionState, ActiveSessionReconnectState, ActiveSessionRecord, ActiveSessionStatus, ActiveSessionTransportMode, ActiveSessionsState, AgentBranding, AgentStreamEvent, AgentTimeline, type AgentTimelineArtifactItem, AgentTimelineColumn, type AgentTimelineCustomItem, type AgentTimelineItem, type AgentTimelineMessageItem, type AgentTimelineProps, type AgentTimelineStatusItem, AgentTimelineStep, type AgentTimelineStepKind, type AgentTimelineStepProps, type AgentTimelineTone, type AgentTimelineToolGroupItem, type AgentTimelineToolItem, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, type AlertProps, AlertTitle, type AlertTone, ApiSchema, type ApiSchemaProps, AppendUserMessageOptions, ApplySdkEventOptions, ApprovalCard, type ApprovalCardProps, type ApprovalDiffFile, ApprovalDiffSummary, type ApprovalPlanStep, ArtifactPane, type ArtifactPaneProps, AuthHeader, type AuthHeaderProps, AuthUser, AutomationStreamEvent, Avatar, AvatarFallback, AvatarImage, type AvatarProps, Badge, type BadgeProps, BeginAssistantMessageOptions, BotStreamEvent, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, type ButtonProps, CATEGORY_TONES, CSV_PREVIEW_ROW_LIMIT, Calendar, type CalendarDate, type CalendarProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, type CardTitleProps, type CategoryTone, type ChartReferenceLine, ChatAuthor, ChatContainer, type ChatContainerProps, ChatMessage, type ChatMessageProps, Checkbox, Chip, type ChipProps, CodeBlock, type CodeBlockProps, Collapsible, CollapsibleContent, CollapsibleTrigger, CommandPreview, type CommandPreviewProps, CompleteAssistantMessageOptions, ComplianceBadge, type ComplianceBadgeProps, type ComplianceProduct, type ComplianceStatus, ConnectionState, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, CopyButton, type CopyButtonProps, CustomToolRenderer, DatePicker, type DatePickerProps, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DiffPreview, type DiffPreviewProps, DisplayVariant, DropZone, type DropZoneProps, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, type EmptyStateProps, ExpandedToolDetail, type ExpandedToolDetailProps, type FeedSegment, Field, type FieldProps, FileArtifactPane, type FileArtifactPaneProps, FileCard, type FileCardProps, type FileDetails, type FileFormat, FileList, type FileListItem, type FileListProps, type FileNode, FilePreview, type FilePreviewKind, type FilePreviewProps, type FileTabData, FileTabs, type FileTabsProps, FileTree, type FileTreeProps, type FileTreeVisibilityOptions, type FileUploader, FilterField, type FilterFieldProps, FinalTextPart, GitHubLoginButton, type GitHubLoginButtonProps, GlobResultsPreview, type GlobResultsPreviewProps, GrepResultsPreview, type GrepResultsPreviewProps, GroupedMessage, Heading, type HeadingProps, type HeadingVariant, HelpText, type HelpTextProps, HoverCard, HoverCardContent, HoverCardDescription, HoverCardHeader, HoverCardTitle, HoverCardTrigger, IconTile, type IconTileProps, InlineCode, type InlineCodeProps, InlineThinkingItem, type InlineThinkingItemProps, InlineToolItem, type InlineToolItemProps, Input, type InputProps, Label, LiveDuration, LoginLayout, type LoginLayoutProps, Logo, type LogoProps, Markdown, type MarkdownLinkChip, type MarkdownLinkChipResolver, type MarkdownProps, MessageAuthor, type MessageAuthorProps, MessageList, type MessageListProps, type MessageRole, MessageRun, MessageUser, Metric, MetricChart, type MetricChartProps, type MetricProps, MetricStrip, type MetricStripProps, OPENUI_NODE_JSON_SCHEMA, OPENUI_NODE_TYPES, type OpenUIAction, type OpenUIActionsNode, OpenUIArtifactRenderer, type OpenUIArtifactRendererProps, type OpenUIBadgeNode, type OpenUICardNode, type OpenUICodeNode, type OpenUIComponentNode, type OpenUIGridNode, type OpenUIHeadingNode, type OpenUIKeyValueNode, type OpenUIMarkdownNode, type OpenUIPrimitive, type OpenUISchemaIssue, type OpenUISchemaValidation, type OpenUISeparatorNode, type OpenUIStackNode, type OpenUIStatNode, type OpenUITableNode, type OpenUITextNode, PageHeader, type PageHeaderProps, PageShell, type PageShellProps, Pagination, type PaginationProps, PdfViewer, type PdfViewerConfig, type PdfViewerProps, type PeriodDelta, Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverTrigger, Progress, QuestionPreview, type QuestionPreviewProps, RadioGroup, RadioGroupItem, RealtimeSessionOptions, RealtimeSessionRegistry, RealtimeSessionRegistryProps, RealtimeSessionState, RealtimeSessionTarget, ReasoningPart, type RedactedDocSegment, RedactedDocument, type RedactedDocumentData, type RedactedDocumentProps, RegisterActiveSessionOptions, type RevealResult, RichFileTree, type RichFileTreeGitEntry, type RichFileTreeGitStatus, type RichFileTreeProps, type RichFileTreeThemeVars, Run, RunGroup, type RunGroupProps, type RunPhase, RunPhaseList, RunRowShell, type RunRowShellProps, type RunRowStatus, RunRowStatusDot, RunStats, SSEEvent, SdkSessionAttachment, SdkSessionEvent, SdkSessionSeed, SegmentedControl, type SegmentedControlOption, type SegmentedControlProps, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, type SeriesExtent, type SeriesPoint, type SeriesPointInput, type SeriesScale, SeriesSparkline, type SeriesSparklineProps, SessionMessage, SessionPart, SessionProjectKey, type SessionUser, SettingsList, type SettingsListAction, type SettingsListColumns, SettingsListItem, type SettingsListItemProps, type SettingsListMenuItem, type SettingsListProps, SettingsRow, type SettingsRowLayout, type SettingsRowProps, SettingsSection, type SettingsSectionProps, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, SidebarDropZone, type SidebarDropZoneProps, Skeleton, SkeletonCard, SkeletonTable, Slider, type Speaker, SpeakerHeader, type SpeakerHeaderProps, type SpeakerPart, type SpeakerSection, type SpeakerState, StatCard, type StatCardProps, StatusPill, type StatusPillProps, type StatusTone, Switch, TONE_CLASSES, TOOL_CATEGORY_ICONS, TRANSCRIPT_TEXT, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, type TableProps, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Tag, type TagProps, TangleKnot, TaskList, type TaskListItem, type TaskListProps, type TaskStatus, TaskStreamEvent, TerminalCursor, TerminalDisplay, TerminalInput, TerminalLine, TerminalStreamEvent, TextPart, TextShimmer, type TextShimmerProps, Textarea, type TextareaProps, ThemeToggle, ThinkingIndicator, type ThinkingIndicatorProps, TimeSelect, type TimeSelectProps, type Toast, ToastContainer, ToastProvider, type Tone, type ToneClasses, type ToolCallData, ToolCallFeed, type ToolCallFeedProps, type ToolCallStatus, type ToolCallType, ToolCategory, ToolDisplayMetadata, ToolPart, ToolState, ToolStatus, ToolTime, Toolbar, type ToolbarProps, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, type UploadFile, UploadProgress, type UploadProgressProps, UseAuthOptions, UseAuthResult, UseRunGroupsOptions, UseSSEStreamOptions, UseSSEStreamResult, UseSdkSessionOptions, UseSdkSessionReturn, UseToolCallStreamReturn, UserMenu, type UserMenuProps, UserMessage, type UserMessageProps, WebSearchPreview, type WebSearchPreviewProps, Wizard, type WizardProps, WizardStep, type WizardStepProps, WriteFilePreview, type WriteFilePreviewProps, activeSessionsAtom, addMessage, addParts, agentTimelineStepKind, badgeVariants, bumpActiveSessionActivity, buttonVariants, clearChat, cn, codeBlockGrammar, configurePdfViewer, copyText, createAuthFetcher, detectFileFormat, fenceInfo, fieldMessageId, fileExtension, filterFileTree, findUnsupportedOpenUINode, focusField, focusFieldInvalid, focusFieldWithin, focusRing, focusRingInset, formatBytes, formatCalendarDate, formatDuration, formatUptime, getActiveSession, getAllActiveSessions, getAllProjectActivity, getCodeLanguage, getFormatLabel, getSanitizedMarkdownHeadingIdFromRawFragment, getSessionsByActivity, getSessionsForNavbar, getSessionsForProject, getSyntaxLanguage, getToolCategory, getToolDisplayMetadata, getToolErrorText, getTotalRunningSessionCount, hasBackgroundRunningSessions, initialsOf, isStreamingAtom, isViewerMessage, ixControl, ixControlAfter, ixControlSoft, ixField, ixRow, ixSelected, ixTabUnderline, localToday, messagesAtom, normalizeSeries, numericColumns, parseCalendarDate, parseCsv, parseToolEvent, partMapAtom, partitionBySpeaker, periodDelta, plainTextFromMarkdown, registerActiveSession, resetActiveSessions, resolveFilePreviewKind, seriesAreaPath, seriesExtent, seriesLinePath, seriesMean, seriesScale, setActiveSessionAttention, setActiveSessionConnection, setActiveSessionError, setActiveSessionRunning, setForegroundActiveSession, showsTaskPriority, tableCsv, taskProgress, taskStatus, timeAgo, toneFor, truncateText, unregisterActiveSession, updateActiveSessionMeta, updatePart, useActiveSession, useActiveSessions, useActiveSessionsState, useApiKey, useAuth, useAutoScroll, useDropdownMenu, useHasBackgroundRunningSessions, useLiveTime, useNavbarSessions, useProjectActivity, useProjectSessions, useRealtimeSession, useRunCollapseState, useRunGroups, useSSEStream, useSdkSession, useSessionsByActivity, useTheme, useToast, useToolCallStream, useTotalRunningSessions, validateOpenUIJsonArtifact, validateOpenUIJsonNode };
package/dist/index.js CHANGED
@@ -95,9 +95,10 @@ import { MessageAuthor, isViewerMessage } from "./chat/message-author.js";
95
95
  import { UserMessage } from "./chat/user-message.js";
96
96
  import { MessageList } from "./chat/message-list.js";
97
97
  import { ThinkingIndicator } from "./chat/thinking-indicator.js";
98
- import { AgentTimeline } from "./chat/agent-timeline.js";
98
+ import { AgentTimeline, AgentTimelineColumn, AgentTimelineStep, agentTimelineStepKind } from "./chat/agent-timeline.js";
99
99
  import { ChatContainer } from "./chat/chat-container.js";
100
100
  import { ChatMessage } from "./chat/chat-message.js";
101
+ import { SpeakerHeader, partitionBySpeaker } from "./chat/speaker.js";
101
102
  import { LiveDuration } from "./run/run-item-primitives.js";
102
103
  import { ToolCallFeed, parseToolEvent } from "./run/tool-call-feed.js";
103
104
  import { TaskList, showsTaskPriority, taskProgress, taskStatus } from "./run/task-list.js";
@@ -127,4 +128,4 @@ import { addMessage, addParts, clearChat, isStreamingAtom, messagesAtom, partMap
127
128
  import { copyText } from "./utils/copy-text.js";
128
129
  import { timeAgo } from "./utils/time-ago.js";
129
130
  import { RedactedDocument } from "./redaction/redacted-document.js";
130
- export { AgentTimeline, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, ApiSchema, ApprovalCard, ApprovalDiffSummary, ArtifactPane, AuthHeader, Avatar, AvatarFallback, AvatarImage, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, CATEGORY_TONES, CSV_PREVIEW_ROW_LIMIT, Calendar, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, ChatContainer, ChatMessage, Checkbox, Chip, CodeBlock, Collapsible, CollapsibleContent, CollapsibleTrigger, CommandPreview, ComplianceBadge, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, CopyButton, DatePicker, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DiffPreview, DropZone, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, ExpandedToolDetail, Field, FileArtifactPane, FileCard, FileList, FilePreview, FileTabs, FileTree, FilterField, GitHubLoginButton, GlobResultsPreview, GrepResultsPreview, Heading, HelpText, HoverCard, HoverCardContent, HoverCardDescription, HoverCardHeader, HoverCardTitle, HoverCardTrigger, IconTile, InlineCode, InlineThinkingItem, InlineToolItem, Input, Label, LiveDuration, LoginLayout, Logo, Markdown, MessageAuthor, MessageList, Metric, MetricChart, MetricStrip, OPENUI_NODE_JSON_SCHEMA, OPENUI_NODE_TYPES, OpenUIArtifactRenderer, PageHeader, PageShell, Pagination, PdfViewer, Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverTrigger, Progress, QuestionPreview, RadioGroup, RadioGroupItem, RealtimeSessionRegistry, RedactedDocument, RichFileTree, RunGroup, RunPhaseList, RunRowShell, RunRowStatusDot, SegmentedControl, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, SeriesSparkline, SettingsList, SettingsListItem, SettingsRow, SettingsSection, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, SidebarDropZone, Skeleton, SkeletonCard, SkeletonTable, Slider, StatCard, StatusPill, Switch, TONE_CLASSES, TOOL_CATEGORY_ICONS, TRANSCRIPT_TEXT, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Tag, TangleKnot, TaskList, TerminalCursor, TerminalDisplay, TerminalInput, TerminalLine, TextShimmer, Textarea, ThemeToggle, ThinkingIndicator, TimeSelect, ToastContainer, ToastProvider, ToolCallFeed, Toolbar, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, UploadProgress, UserMenu, UserMessage, WebSearchPreview, Wizard, WizardStep, WriteFilePreview, activeSessionsAtom, addMessage, addParts, badgeVariants, bumpActiveSessionActivity, buttonVariants, clearChat, cn, codeBlockGrammar, configurePdfViewer, copyText, createAuthFetcher, detectFileFormat, fenceInfo, fieldMessageId, fileExtension, filterFileTree, findUnsupportedOpenUINode, focusField, focusFieldInvalid, focusFieldWithin, focusRing, focusRingInset, formatBytes, formatCalendarDate, formatDuration, formatUptime, getActiveSession, getAllActiveSessions, getAllProjectActivity, getCodeLanguage, getFormatLabel, getSanitizedMarkdownHeadingIdFromRawFragment, getSessionsByActivity, getSessionsForNavbar, getSessionsForProject, getSyntaxLanguage, getToolCategory, getToolDisplayMetadata, getToolErrorText, getTotalRunningSessionCount, hasBackgroundRunningSessions, initialsOf, isStreamingAtom, isViewerMessage, ixControl, ixControlAfter, ixControlSoft, ixField, ixRow, ixSelected, ixTabUnderline, localToday, messagesAtom, normalizeSeries, numericColumns, parseCalendarDate, parseCsv, parseToolEvent, partMapAtom, periodDelta, plainTextFromMarkdown, registerActiveSession, resetActiveSessions, resolveFilePreviewKind, seriesAreaPath, seriesExtent, seriesLinePath, seriesMean, seriesScale, setActiveSessionAttention, setActiveSessionConnection, setActiveSessionError, setActiveSessionRunning, setForegroundActiveSession, showsTaskPriority, tableCsv, taskProgress, taskStatus, timeAgo, toneFor, truncateText, unregisterActiveSession, updateActiveSessionMeta, updatePart, useActiveSession, useActiveSessions, useActiveSessionsState, useApiKey, useAuth, useAutoScroll, useDropdownMenu, useHasBackgroundRunningSessions, useLiveTime, useNavbarSessions, useProjectActivity, useProjectSessions, useRealtimeSession, useRunCollapseState, useRunGroups, useSSEStream, useSdkSession, useSessionsByActivity, useTheme, useToast, useToolCallStream, useTotalRunningSessions, validateOpenUIJsonArtifact, validateOpenUIJsonNode };
131
+ export { AgentTimeline, AgentTimelineColumn, AgentTimelineStep, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, ApiSchema, ApprovalCard, ApprovalDiffSummary, ArtifactPane, AuthHeader, Avatar, AvatarFallback, AvatarImage, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, CATEGORY_TONES, CSV_PREVIEW_ROW_LIMIT, Calendar, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, ChatContainer, ChatMessage, Checkbox, Chip, CodeBlock, Collapsible, CollapsibleContent, CollapsibleTrigger, CommandPreview, ComplianceBadge, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, CopyButton, DatePicker, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DiffPreview, DropZone, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, ExpandedToolDetail, Field, FileArtifactPane, FileCard, FileList, FilePreview, FileTabs, FileTree, FilterField, GitHubLoginButton, GlobResultsPreview, GrepResultsPreview, Heading, HelpText, HoverCard, HoverCardContent, HoverCardDescription, HoverCardHeader, HoverCardTitle, HoverCardTrigger, IconTile, InlineCode, InlineThinkingItem, InlineToolItem, Input, Label, LiveDuration, LoginLayout, Logo, Markdown, MessageAuthor, MessageList, Metric, MetricChart, MetricStrip, OPENUI_NODE_JSON_SCHEMA, OPENUI_NODE_TYPES, OpenUIArtifactRenderer, PageHeader, PageShell, Pagination, PdfViewer, Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverTrigger, Progress, QuestionPreview, RadioGroup, RadioGroupItem, RealtimeSessionRegistry, RedactedDocument, RichFileTree, RunGroup, RunPhaseList, RunRowShell, RunRowStatusDot, SegmentedControl, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, SeriesSparkline, SettingsList, SettingsListItem, SettingsRow, SettingsSection, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, SidebarDropZone, Skeleton, SkeletonCard, SkeletonTable, Slider, SpeakerHeader, StatCard, StatusPill, Switch, TONE_CLASSES, TOOL_CATEGORY_ICONS, TRANSCRIPT_TEXT, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Tag, TangleKnot, TaskList, TerminalCursor, TerminalDisplay, TerminalInput, TerminalLine, TextShimmer, Textarea, ThemeToggle, ThinkingIndicator, TimeSelect, ToastContainer, ToastProvider, ToolCallFeed, Toolbar, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, UploadProgress, UserMenu, UserMessage, WebSearchPreview, Wizard, WizardStep, WriteFilePreview, activeSessionsAtom, addMessage, addParts, agentTimelineStepKind, badgeVariants, bumpActiveSessionActivity, buttonVariants, clearChat, cn, codeBlockGrammar, configurePdfViewer, copyText, createAuthFetcher, detectFileFormat, fenceInfo, fieldMessageId, fileExtension, filterFileTree, findUnsupportedOpenUINode, focusField, focusFieldInvalid, focusFieldWithin, focusRing, focusRingInset, formatBytes, formatCalendarDate, formatDuration, formatUptime, getActiveSession, getAllActiveSessions, getAllProjectActivity, getCodeLanguage, getFormatLabel, getSanitizedMarkdownHeadingIdFromRawFragment, getSessionsByActivity, getSessionsForNavbar, getSessionsForProject, getSyntaxLanguage, getToolCategory, getToolDisplayMetadata, getToolErrorText, getTotalRunningSessionCount, hasBackgroundRunningSessions, initialsOf, isStreamingAtom, isViewerMessage, ixControl, ixControlAfter, ixControlSoft, ixField, ixRow, ixSelected, ixTabUnderline, localToday, messagesAtom, normalizeSeries, numericColumns, parseCalendarDate, parseCsv, parseToolEvent, partMapAtom, partitionBySpeaker, periodDelta, plainTextFromMarkdown, registerActiveSession, resetActiveSessions, resolveFilePreviewKind, seriesAreaPath, seriesExtent, seriesLinePath, seriesMean, seriesScale, setActiveSessionAttention, setActiveSessionConnection, setActiveSessionError, setActiveSessionRunning, setForegroundActiveSession, showsTaskPriority, tableCsv, taskProgress, taskStatus, timeAgo, toneFor, truncateText, unregisterActiveSession, updateActiveSessionMeta, updatePart, useActiveSession, useActiveSessions, useActiveSessionsState, useApiKey, useAuth, useAutoScroll, useDropdownMenu, useHasBackgroundRunningSessions, useLiveTime, useNavbarSessions, useProjectActivity, useProjectSessions, useRealtimeSession, useRunCollapseState, useRunGroups, useSSEStream, useSdkSession, useSessionsByActivity, useTheme, useToast, useToolCallStream, useTotalRunningSessions, validateOpenUIJsonArtifact, validateOpenUIJsonNode };
@@ -51,7 +51,7 @@ const InlineThinkingItem = memo(({ part, defaultOpen = false, autoCollapse = tru
51
51
  children: /* @__PURE__ */ jsx(Markdown, { children: part.text })
52
52
  })
53
53
  }) : /* @__PURE__ */ jsx("div", {
54
- className: "px-3 py-2.5 text-xs text-muted-foreground",
54
+ className: "px-3 py-2.5 text-sm text-muted-foreground",
55
55
  children: "No reasoning text provided."
56
56
  })
57
57
  });
@@ -1,9 +1,10 @@
1
1
  import { ReactNode } from "react";
2
2
  export type RunRowStatus = "running" | "success" | "error" | "idle";
3
3
  /**
4
- * Trailing status indicator shared by every run row. Only `error` draws a
5
- * mark (a red dot). Success is silence, and a running row carries its state in
6
- * the title — a `TextShimmer` sweep — so neither renders anything here.
4
+ * A red dot for a failed row, for rows composed outside the shell. The shell
5
+ * itself marks a failure on the row's own glyph, beside its name, never at the
6
+ * far edge. Success is silence, and a running row carries its state in the
7
+ * title — a `TextShimmer` sweep.
7
8
  */
8
9
  export declare function RunRowStatusDot({ status }: {
9
10
  status: RunRowStatus;
@@ -6,9 +6,10 @@ import { ChevronRight } from "lucide-react";
6
6
  import * as Collapsible from "@radix-ui/react-collapsible";
7
7
  // src/run/run-row-shell.tsx
8
8
  /**
9
- * Trailing status indicator shared by every run row. Only `error` draws a
10
- * mark (a red dot). Success is silence, and a running row carries its state in
11
- * the title — a `TextShimmer` sweep — so neither renders anything here.
9
+ * A red dot for a failed row, for rows composed outside the shell. The shell
10
+ * itself marks a failure on the row's own glyph, beside its name, never at the
11
+ * far edge. Success is silence, and a running row carries its state in the
12
+ * title — a `TextShimmer` sweep.
12
13
  */
13
14
  function RunRowStatusDot({ status }) {
14
15
  if (status !== "error") return null;
@@ -61,7 +62,8 @@ function RunRowShell({ icon, title, description, descriptionMono = false, status
61
62
  children: [
62
63
  /* @__PURE__ */ jsxs("span", {
63
64
  "aria-hidden": true,
64
- className: "flex h-[1.375rem] w-[1.375rem] shrink-0 items-center justify-center text-muted-foreground",
65
+ "data-run-row-status": status === "error" ? "error" : void 0,
66
+ className: cn("flex h-[1.375rem] w-[1.375rem] shrink-0 items-center justify-center", status === "error" ? "text-[var(--surface-danger-text)]" : "text-muted-foreground"),
65
67
  children: [/* @__PURE__ */ jsx("span", {
66
68
  "data-run-row-glyph": "",
67
69
  className: cn("flex items-center justify-center", expandable && "group-hover:hidden", open && "hidden"),
@@ -79,19 +81,16 @@ function RunRowShell({ icon, title, description, descriptionMono = false, status
79
81
  className: cn("min-w-0 flex-1 truncate text-sm text-muted-foreground transition-colors group-hover:text-foreground", descriptionMono && "font-mono"),
80
82
  children: description
81
83
  }) : null,
82
- /* @__PURE__ */ jsxs("span", {
83
- className: "ml-auto flex shrink-0 items-center gap-1.5",
84
- children: [!isRunning && durationMs != null ? /* @__PURE__ */ jsx("span", {
85
- "data-run-row-duration": "",
86
- className: "font-mono text-[10px] tabular-nums text-muted-foreground opacity-0 transition-opacity group-hover:opacity-100",
87
- children: formatDuration(durationMs)
88
- }) : null, /* @__PURE__ */ jsx(RunRowStatusDot, { status })]
89
- })
84
+ !isRunning && durationMs != null ? /* @__PURE__ */ jsx("span", {
85
+ "data-run-row-duration": "",
86
+ className: "ml-auto shrink-0 font-mono text-sm tabular-nums text-muted-foreground opacity-0 transition-opacity group-hover:opacity-100",
87
+ children: formatDuration(durationMs)
88
+ }) : null
90
89
  ]
91
90
  })
92
91
  }),
93
92
  collapsedError && !open ? /* @__PURE__ */ jsx("div", {
94
- className: cn("pb-1.5 pr-2 text-xs leading-snug text-[var(--surface-danger-text)]", ERROR_INDENT),
93
+ className: cn("pb-1.5 pr-2 text-sm leading-snug text-[var(--surface-danger-text)]", ERROR_INDENT),
95
94
  children: collapsedError
96
95
  }) : null,
97
96
  expandable ? /* @__PURE__ */ jsx(Collapsible.Content, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tangle-network/ui",
3
- "version": "11.46.0",
3
+ "version": "11.48.0",
4
4
  "description": "Generic React UI components for Tangle products — primitives, chat, run, files, editor, markdown.",
5
5
  "type": "module",
6
6
  "license": "MIT",