@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 +14 -0
- package/dist/chat/agent-timeline.d.ts +29 -0
- package/dist/chat/agent-timeline.js +77 -53
- package/dist/chat/message-author.d.ts +4 -3
- package/dist/chat/message-author.js +5 -3
- package/dist/chat/speaker.d.ts +57 -0
- package/dist/chat/speaker.js +84 -0
- package/dist/chat/user-message.js +1 -1
- package/dist/chat.d.ts +3 -2
- package/dist/chat.js +3 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.js +3 -2
- package/dist/run/inline-thinking-item.js +1 -1
- package/dist/run/run-row-shell.d.ts +4 -3
- package/dist/run/run-row-shell.js +12 -13
- package/package.json +1 -1
- package/src/chat/agent-timeline.tsx +98 -70
- package/src/chat/index.ts +14 -0
- package/src/chat/message-author.test.tsx +2 -2
- package/src/chat/message-author.tsx +5 -3
- package/src/chat/speaker.stories.tsx +95 -0
- package/src/chat/speaker.test.tsx +81 -0
- package/src/chat/speaker.tsx +110 -0
- package/src/chat/user-message.tsx +1 -1
- package/src/run/inline-thinking-item.tsx +1 -1
- package/src/run/inline-tool-item.test.tsx +1 -1
- package/src/run/run-row-shell.test.tsx +1 -1
- package/src/run/run-row-shell.tsx +18 -16
|
@@ -7,9 +7,10 @@ import { formatDuration } from "../utils/format";
|
|
|
7
7
|
export type RunRowStatus = "running" | "success" | "error" | "idle";
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
10
|
+
* A red dot for a failed row, for rows composed outside the shell. The shell
|
|
11
|
+
* itself marks a failure on the row's own glyph, beside its name, never at the
|
|
12
|
+
* far edge. Success is silence, and a running row carries its state in the
|
|
13
|
+
* title — a `TextShimmer` sweep.
|
|
13
14
|
*/
|
|
14
15
|
export function RunRowStatusDot({ status }: { status: RunRowStatus }) {
|
|
15
16
|
if (status !== "error") return null;
|
|
@@ -132,7 +133,11 @@ export function RunRowShell({
|
|
|
132
133
|
>
|
|
133
134
|
<span
|
|
134
135
|
aria-hidden
|
|
135
|
-
|
|
136
|
+
data-run-row-status={status === "error" ? "error" : undefined}
|
|
137
|
+
className={cn(
|
|
138
|
+
"flex h-[1.375rem] w-[1.375rem] shrink-0 items-center justify-center",
|
|
139
|
+
status === "error" ? "text-[var(--surface-danger-text)]" : "text-muted-foreground",
|
|
140
|
+
)}
|
|
136
141
|
>
|
|
137
142
|
<span
|
|
138
143
|
data-run-row-glyph=""
|
|
@@ -174,24 +179,21 @@ export function RunRowShell({
|
|
|
174
179
|
</span>
|
|
175
180
|
) : null}
|
|
176
181
|
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
) : null}
|
|
186
|
-
<RunRowStatusDot status={status} />
|
|
187
|
-
</span>
|
|
182
|
+
{!isRunning && durationMs != null ? (
|
|
183
|
+
<span
|
|
184
|
+
data-run-row-duration=""
|
|
185
|
+
className="ml-auto shrink-0 font-mono text-sm tabular-nums text-muted-foreground opacity-0 transition-opacity group-hover:opacity-100"
|
|
186
|
+
>
|
|
187
|
+
{formatDuration(durationMs)}
|
|
188
|
+
</span>
|
|
189
|
+
) : null}
|
|
188
190
|
</button>
|
|
189
191
|
</Collapsible.Trigger>
|
|
190
192
|
|
|
191
193
|
{collapsedError && !open ? (
|
|
192
194
|
<div
|
|
193
195
|
className={cn(
|
|
194
|
-
"pb-1.5 pr-2 text-
|
|
196
|
+
"pb-1.5 pr-2 text-sm leading-snug text-[var(--surface-danger-text)]",
|
|
195
197
|
ERROR_INDENT,
|
|
196
198
|
)}
|
|
197
199
|
>
|