@tangle-network/ui 11.47.0 → 11.49.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 +12 -0
- 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.d.ts +2 -1
- package/dist/chat.js +2 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +3 -1
- package/dist/run/expanded-tool-detail.js +12 -4
- package/dist/run/run-group.js +21 -9
- package/dist/run/run-phase-list.js +5 -8
- package/dist/run/status-meta.d.ts +25 -0
- package/dist/run/status-meta.js +105 -0
- package/dist/run.d.ts +2 -1
- package/dist/run.js +2 -1
- package/package.json +2 -2
- package/src/chat/index.ts +9 -0
- 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/run/expanded-tool-detail.tsx +4 -10
- package/src/run/index.ts +8 -0
- package/src/run/run-group.tsx +8 -16
- package/src/run/run-phase-list.stories.tsx +19 -0
- package/src/run/run-phase-list.test.tsx +9 -1
- package/src/run/run-phase-list.tsx +3 -3
- package/src/run/status-meta.tsx +92 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @tangle-network/ui
|
|
2
2
|
|
|
3
|
+
## 11.49.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 29e2a49: `statusMeta(status)` returns the one `{ label, icon, token }` for Running, Waiting, Needs you, Done, Failed, Stopped, Idle and Unknown, and `RunStatusIcon` draws it on the 16px lucide grid at stroke 1.75. `runStatus` maps the vocabularies ui already speaks (completed, error, attention-needed, cancelled …) and reads anything else as Unknown. Failed is always CircleX; only Needs you takes the warning amber; Running breathes on `--motion-ambient` instead of spinning. `RunPhaseList`, `ExpandedToolDetail` and `RunGroup` render their status through it, so a failed phase reads "Failed" with CircleX and a finished run reads "Done" with CircleCheck.
|
|
8
|
+
|
|
9
|
+
## 11.48.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- 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.
|
|
14
|
+
|
|
3
15
|
## 11.47.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
|
@@ -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
|
|
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 };
|
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
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, 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, TRANSCRIPT_TEXT, ThinkingIndicator, type ThinkingIndicatorProps, UserMessage, type UserMessageProps, agentTimelineStepKind, 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
|
@@ -6,4 +6,5 @@ import { ThinkingIndicator } from "./chat/thinking-indicator.js";
|
|
|
6
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
|
-
|
|
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,6 +16,7 @@ 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";
|
|
@@ -117,6 +118,7 @@ import { LiveDuration } from "./run/run-item-primitives.js";
|
|
|
117
118
|
import { TaskList, TaskListItem, TaskListProps, TaskStatus, showsTaskPriority, taskProgress, taskStatus } from "./run/task-list.js";
|
|
118
119
|
import { ApprovalCard, ApprovalCardProps, ApprovalDiffFile, ApprovalDiffSummary, ApprovalPlanStep } from "./run/approval-card.js";
|
|
119
120
|
import { RunPhase, RunPhaseList } from "./run/run-phase-list.js";
|
|
121
|
+
import { RunStatus, RunStatusIcon, RunStatusIconProps, StatusMeta, runStatus, statusMeta } from "./run/status-meta.js";
|
|
120
122
|
import "./run.js";
|
|
121
123
|
import { OPENUI_NODE_JSON_SCHEMA, OPENUI_NODE_TYPES } from "./openui/schema-data.js";
|
|
122
124
|
import { OpenUISchemaIssue, OpenUISchemaValidation, findUnsupportedOpenUINode, validateOpenUIJsonArtifact, validateOpenUIJsonNode } from "./openui-schema.js";
|
|
@@ -143,4 +145,4 @@ import { QuestionPreview, QuestionPreviewProps } from "./tool-previews/question-
|
|
|
143
145
|
import { DiffPreview, DiffPreviewProps } from "./tool-previews/diff-preview.js";
|
|
144
146
|
import { RedactedDocSegment, RedactedDocument, RedactedDocumentData, RedactedDocumentProps, RevealResult } from "./redaction/redacted-document.js";
|
|
145
147
|
import "./redaction.js";
|
|
146
|
-
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, 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, 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 };
|
|
148
|
+
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, type RunStatus, RunStatusIcon, type RunStatusIconProps, 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, type StatusMeta, 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, runStatus, seriesAreaPath, seriesExtent, seriesLinePath, seriesMean, seriesScale, setActiveSessionAttention, setActiveSessionConnection, setActiveSessionError, setActiveSessionRunning, setForegroundActiveSession, showsTaskPriority, statusMeta, 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
|
@@ -79,6 +79,7 @@ import { GlobResultsPreview } from "./tool-previews/glob-results-preview.js";
|
|
|
79
79
|
import { WebSearchPreview } from "./tool-previews/web-search-preview.js";
|
|
80
80
|
import { QuestionPreview } from "./tool-previews/question-preview.js";
|
|
81
81
|
import { DiffPreview } from "./tool-previews/diff-preview.js";
|
|
82
|
+
import { RunStatusIcon, runStatus, statusMeta } from "./run/status-meta.js";
|
|
82
83
|
import { ExpandedToolDetail } from "./run/expanded-tool-detail.js";
|
|
83
84
|
import { RunRowShell, RunRowStatusDot } from "./run/run-row-shell.js";
|
|
84
85
|
import { InlineToolItem } from "./run/inline-tool-item.js";
|
|
@@ -98,6 +99,7 @@ import { ThinkingIndicator } from "./chat/thinking-indicator.js";
|
|
|
98
99
|
import { AgentTimeline, AgentTimelineColumn, AgentTimelineStep, agentTimelineStepKind } from "./chat/agent-timeline.js";
|
|
99
100
|
import { ChatContainer } from "./chat/chat-container.js";
|
|
100
101
|
import { ChatMessage } from "./chat/chat-message.js";
|
|
102
|
+
import { SpeakerHeader, partitionBySpeaker } from "./chat/speaker.js";
|
|
101
103
|
import { LiveDuration } from "./run/run-item-primitives.js";
|
|
102
104
|
import { ToolCallFeed, parseToolEvent } from "./run/tool-call-feed.js";
|
|
103
105
|
import { TaskList, showsTaskPriority, taskProgress, taskStatus } from "./run/task-list.js";
|
|
@@ -127,4 +129,4 @@ import { addMessage, addParts, clearChat, isStreamingAtom, messagesAtom, partMap
|
|
|
127
129
|
import { copyText } from "./utils/copy-text.js";
|
|
128
130
|
import { timeAgo } from "./utils/time-ago.js";
|
|
129
131
|
import { RedactedDocument } from "./redaction/redacted-document.js";
|
|
130
|
-
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, 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, 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 };
|
|
132
|
+
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, RunStatusIcon, 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, runStatus, seriesAreaPath, seriesExtent, seriesLinePath, seriesMean, seriesScale, setActiveSessionAttention, setActiveSessionConnection, setActiveSessionError, setActiveSessionRunning, setForegroundActiveSession, showsTaskPriority, statusMeta, 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 };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { cn } from "../lib/utils.js";
|
|
2
1
|
import { CodeBlock } from "../markdown/code-block.js";
|
|
3
2
|
import { getToolDisplayMetadata } from "../utils/tool-display.js";
|
|
4
3
|
import { CommandPreview } from "../tool-previews/command-preview.js";
|
|
@@ -9,9 +8,10 @@ import { WebSearchPreview } from "../tool-previews/web-search-preview.js";
|
|
|
9
8
|
import { QuestionPreview } from "../tool-previews/question-preview.js";
|
|
10
9
|
import { DiffPreview } from "../tool-previews/diff-preview.js";
|
|
11
10
|
import { ExpandableContent } from "./expandable-content.js";
|
|
11
|
+
import { RunStatusIcon } from "./status-meta.js";
|
|
12
12
|
import { memo } from "react";
|
|
13
13
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
14
|
-
import {
|
|
14
|
+
import { ArrowLeft, ArrowRight, FileText } from "lucide-react";
|
|
15
15
|
// src/run/expanded-tool-detail.tsx
|
|
16
16
|
const FLUSH_TOGGLE = "mx-3 mb-2";
|
|
17
17
|
const EXT_LANG = {
|
|
@@ -144,7 +144,11 @@ const ExpandedToolDetail = memo(({ part }) => {
|
|
|
144
144
|
className: "overflow-hidden rounded-[var(--radius-lg)] border border-[var(--surface-danger-border)]",
|
|
145
145
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
146
146
|
className: "flex items-center gap-2 border-b border-[var(--surface-danger-border)] bg-[var(--surface-danger-bg)] px-3 py-2",
|
|
147
|
-
children: [/* @__PURE__ */ jsx(
|
|
147
|
+
children: [/* @__PURE__ */ jsx(RunStatusIcon, {
|
|
148
|
+
status: "failed",
|
|
149
|
+
"aria-hidden": true,
|
|
150
|
+
className: "size-3"
|
|
151
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
148
152
|
className: "text-xs font-medium uppercase tracking-[0.08em] text-[var(--surface-danger-text)]",
|
|
149
153
|
children: "Error"
|
|
150
154
|
})]
|
|
@@ -159,7 +163,11 @@ const ExpandedToolDetail = memo(({ part }) => {
|
|
|
159
163
|
}),
|
|
160
164
|
(status === "pending" || status === "running") && /* @__PURE__ */ jsxs("div", {
|
|
161
165
|
className: "flex items-center gap-2 rounded-[var(--radius-md)] border border-border bg-muted px-3 py-3 text-xs text-muted-foreground",
|
|
162
|
-
children: [/* @__PURE__ */ jsx(
|
|
166
|
+
children: [/* @__PURE__ */ jsx(RunStatusIcon, {
|
|
167
|
+
status: "running",
|
|
168
|
+
"aria-hidden": true,
|
|
169
|
+
className: "size-3"
|
|
170
|
+
}), "Running…"]
|
|
163
171
|
})
|
|
164
172
|
]
|
|
165
173
|
});
|
package/dist/run/run-group.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { cn } from "../lib/utils.js";
|
|
2
2
|
import { formatDuration } from "../utils/format.js";
|
|
3
|
+
import { RunStatusIcon, statusMeta } from "./status-meta.js";
|
|
3
4
|
import { InlineToolItem } from "./inline-tool-item.js";
|
|
4
5
|
import { Markdown } from "../markdown/markdown.js";
|
|
5
6
|
import { InlineThinkingItem } from "./inline-thinking-item.js";
|
|
@@ -8,7 +9,7 @@ import { OpenUIArtifactRenderer } from "../openui/openui-artifact-renderer.js";
|
|
|
8
9
|
import { TRANSCRIPT_TEXT } from "../chat/transcript-text.js";
|
|
9
10
|
import { memo, useMemo } from "react";
|
|
10
11
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
11
|
-
import { Bot, ChevronDown, ChevronRight, ClipboardList, FileEdit, FileSearch, Globe,
|
|
12
|
+
import { Bot, ChevronDown, ChevronRight, ClipboardList, FileEdit, FileSearch, Globe, PencilLine, Search, Settings, Terminal } from "lucide-react";
|
|
12
13
|
import * as Collapsible from "@radix-ui/react-collapsible";
|
|
13
14
|
// src/run/run-group.tsx
|
|
14
15
|
/**
|
|
@@ -46,7 +47,11 @@ function AssistantShell({ branding, isStreaming, children }) {
|
|
|
46
47
|
className: "flex items-center gap-2 px-1 font-medium text-muted-foreground text-xs",
|
|
47
48
|
children: [/* @__PURE__ */ jsx("span", { children: branding.label }), isStreaming ? /* @__PURE__ */ jsxs("span", {
|
|
48
49
|
className: "inline-flex items-center gap-1.5",
|
|
49
|
-
children: [/* @__PURE__ */ jsx(
|
|
50
|
+
children: [/* @__PURE__ */ jsx(RunStatusIcon, {
|
|
51
|
+
status: "running",
|
|
52
|
+
"aria-hidden": true,
|
|
53
|
+
className: "size-3"
|
|
54
|
+
}), "Thinking"]
|
|
50
55
|
}) : null]
|
|
51
56
|
}), /* @__PURE__ */ jsx("div", {
|
|
52
57
|
className: ASSISTANT_SHELL,
|
|
@@ -249,7 +254,10 @@ const RunGroup = memo(({ run, partMap, collapsed, onToggle, branding = DEFAULT_B
|
|
|
249
254
|
}, key);
|
|
250
255
|
if (toolPart.state.status === "running") return /* @__PURE__ */ jsxs("div", {
|
|
251
256
|
className: "flex items-center gap-2 rounded-[var(--radius-lg)] border border-[var(--border-subtle)] bg-[var(--md3-surface-container)] px-4 py-3 text-sm text-muted-foreground",
|
|
252
|
-
children: [/* @__PURE__ */ jsx(
|
|
257
|
+
children: [/* @__PURE__ */ jsx(RunStatusIcon, {
|
|
258
|
+
status: "running",
|
|
259
|
+
"aria-hidden": true
|
|
260
|
+
}), "Building view…"]
|
|
253
261
|
}, key);
|
|
254
262
|
}
|
|
255
263
|
if (part.type === "text" && !part.synthetic && part.text.trim()) return /* @__PURE__ */ jsx("div", {
|
|
@@ -302,12 +310,13 @@ const RunGroup = memo(({ run, partMap, collapsed, onToggle, branding = DEFAULT_B
|
|
|
302
310
|
}) : null,
|
|
303
311
|
/* @__PURE__ */ jsxs("span", {
|
|
304
312
|
className: "ml-auto flex shrink-0 items-center gap-1.5",
|
|
305
|
-
children: [/* @__PURE__ */ jsx(CategoryBadges, { categories: stats.toolCategories }),
|
|
306
|
-
className: "inline-flex items-center gap-1 rounded-full border border-[var(--border-accent)] bg-[var(--accent-surface-soft)] px-2 py-px text-[10px] font-semibold uppercase text-[var(--accent-text)]",
|
|
307
|
-
children: [/* @__PURE__ */ jsx(Loader2, { className: "h-2.5 w-2.5 animate-spin" }), "Running"]
|
|
308
|
-
}) : /* @__PURE__ */ jsxs("span", {
|
|
313
|
+
children: [/* @__PURE__ */ jsx(CategoryBadges, { categories: stats.toolCategories }), /* @__PURE__ */ jsxs("span", {
|
|
309
314
|
className: "inline-flex items-center gap-1 rounded-full border border-border px-2 py-px text-[10px] font-semibold uppercase text-muted-foreground",
|
|
310
|
-
children: [/* @__PURE__ */ jsx(
|
|
315
|
+
children: [/* @__PURE__ */ jsx(RunStatusIcon, {
|
|
316
|
+
status: isStreaming ? "running" : "done",
|
|
317
|
+
"aria-hidden": true,
|
|
318
|
+
className: "size-3"
|
|
319
|
+
}), statusMeta(isStreaming ? "running" : "done").label]
|
|
311
320
|
})]
|
|
312
321
|
})
|
|
313
322
|
]
|
|
@@ -346,7 +355,10 @@ const RunGroup = memo(({ run, partMap, collapsed, onToggle, branding = DEFAULT_B
|
|
|
346
355
|
});
|
|
347
356
|
else if (toolPart.state.status === "running") node = /* @__PURE__ */ jsxs("div", {
|
|
348
357
|
className: "flex items-center gap-3 rounded-[var(--radius-lg)] border border-[var(--border-subtle)] bg-[var(--md3-surface-container)] px-4 py-3 text-sm text-muted-foreground",
|
|
349
|
-
children: [/* @__PURE__ */ jsx(
|
|
358
|
+
children: [/* @__PURE__ */ jsx(RunStatusIcon, {
|
|
359
|
+
status: "running",
|
|
360
|
+
"aria-hidden": true
|
|
361
|
+
}), "Building view…"]
|
|
350
362
|
});
|
|
351
363
|
}
|
|
352
364
|
if (node === null) node = /* @__PURE__ */ jsx(InlineToolItem, {
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { focusRing } from "../lib/focus.js";
|
|
2
2
|
import { cn } from "../lib/utils.js";
|
|
3
|
+
import { RunStatusIcon } from "./status-meta.js";
|
|
3
4
|
import { useState } from "react";
|
|
4
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
-
import { ChevronRight
|
|
6
|
+
import { ChevronRight } from "lucide-react";
|
|
6
7
|
// src/run/run-phase-list.tsx
|
|
7
8
|
function PhaseRow({ phase }) {
|
|
8
9
|
const [open, setOpen] = useState(false);
|
|
@@ -28,13 +29,9 @@ function PhaseRow({ phase }) {
|
|
|
28
29
|
children: [" · ", phase.summary]
|
|
29
30
|
})]
|
|
30
31
|
}),
|
|
31
|
-
phase.status
|
|
32
|
-
|
|
33
|
-
className: "mt-1
|
|
34
|
-
}),
|
|
35
|
-
phase.status === "error" && /* @__PURE__ */ jsx(CircleAlert, {
|
|
36
|
-
"aria-label": "Had an error",
|
|
37
|
-
className: "mt-1 size-4 shrink-0 text-[var(--surface-danger-text)]"
|
|
32
|
+
phase.status && phase.status !== "done" && /* @__PURE__ */ jsx(RunStatusIcon, {
|
|
33
|
+
status: phase.status,
|
|
34
|
+
className: "mt-1"
|
|
38
35
|
})
|
|
39
36
|
]
|
|
40
37
|
}), open && /* @__PURE__ */ jsx("div", {
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { LucideIcon, LucideProps } from "lucide-react";
|
|
2
|
+
/** The states an agent or a run reports. Every surface names them with `statusMeta`. */
|
|
3
|
+
export type RunStatus = "running" | "waiting" | "needs-you" | "done" | "failed" | "stopped" | "idle" | "unknown";
|
|
4
|
+
export interface StatusMeta {
|
|
5
|
+
/** The one word for the state. A qualifier such as "Shipped" follows Done; it never replaces it. */
|
|
6
|
+
label: string;
|
|
7
|
+
/** The lucide glyph, drawn on the 16px grid at stroke 1.75 (`RunStatusIcon` does both). */
|
|
8
|
+
icon: LucideIcon;
|
|
9
|
+
/** The Brand colour token for the glyph and any bare status text: `color: var(<token>)`. */
|
|
10
|
+
token: `--${string}`;
|
|
11
|
+
}
|
|
12
|
+
/** Any status string as a `RunStatus`; a value nothing names reads as Unknown, never as a guess. */
|
|
13
|
+
export declare function runStatus(status: string): RunStatus;
|
|
14
|
+
/** The label, glyph and colour token for a status, in every surface. */
|
|
15
|
+
export declare function statusMeta(status: RunStatus | (string & {})): StatusMeta;
|
|
16
|
+
export interface RunStatusIconProps extends Omit<LucideProps, "ref"> {
|
|
17
|
+
status: RunStatus | (string & {});
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* A status glyph on the icon grid, in its token colour and labelled with its
|
|
21
|
+
* word. Pass `aria-hidden` where the label is already printed beside it.
|
|
22
|
+
* Running breathes on `--motion-ambient`, the page's one loop period; the
|
|
23
|
+
* breathe is opacity only, so it is the essential motion reduced motion keeps.
|
|
24
|
+
*/
|
|
25
|
+
export declare function RunStatusIcon({ status, className, style, ...props }: RunStatusIconProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { cn } from "../lib/utils.js";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { CircleCheck, CircleDashed, CircleDot, CircleQuestionMark, CircleStop, CircleX, Hand, Hourglass } from "lucide-react";
|
|
4
|
+
// src/run/status-meta.tsx
|
|
5
|
+
const META = {
|
|
6
|
+
running: {
|
|
7
|
+
label: "Running",
|
|
8
|
+
icon: CircleDot,
|
|
9
|
+
token: "--surface-info-text"
|
|
10
|
+
},
|
|
11
|
+
waiting: {
|
|
12
|
+
label: "Waiting",
|
|
13
|
+
icon: Hourglass,
|
|
14
|
+
token: "--surface-neutral-text"
|
|
15
|
+
},
|
|
16
|
+
"needs-you": {
|
|
17
|
+
label: "Needs you",
|
|
18
|
+
icon: Hand,
|
|
19
|
+
token: "--surface-warning-text"
|
|
20
|
+
},
|
|
21
|
+
done: {
|
|
22
|
+
label: "Done",
|
|
23
|
+
icon: CircleCheck,
|
|
24
|
+
token: "--surface-success-text"
|
|
25
|
+
},
|
|
26
|
+
failed: {
|
|
27
|
+
label: "Failed",
|
|
28
|
+
icon: CircleX,
|
|
29
|
+
token: "--surface-danger-text"
|
|
30
|
+
},
|
|
31
|
+
stopped: {
|
|
32
|
+
label: "Stopped",
|
|
33
|
+
icon: CircleStop,
|
|
34
|
+
token: "--surface-neutral-text"
|
|
35
|
+
},
|
|
36
|
+
idle: {
|
|
37
|
+
label: "Idle",
|
|
38
|
+
icon: CircleDashed,
|
|
39
|
+
token: "--surface-neutral-text"
|
|
40
|
+
},
|
|
41
|
+
unknown: {
|
|
42
|
+
label: "Unknown",
|
|
43
|
+
icon: CircleQuestionMark,
|
|
44
|
+
token: "--surface-neutral-text"
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
const ALIASES = {
|
|
48
|
+
active: "running",
|
|
49
|
+
in_progress: "running",
|
|
50
|
+
"in-progress": "running",
|
|
51
|
+
streaming: "running",
|
|
52
|
+
pending: "waiting",
|
|
53
|
+
queued: "waiting",
|
|
54
|
+
blocked: "waiting",
|
|
55
|
+
"attention-needed": "needs-you",
|
|
56
|
+
needs_you: "needs-you",
|
|
57
|
+
needs_input: "needs-you",
|
|
58
|
+
awaiting_input: "needs-you",
|
|
59
|
+
completed: "done",
|
|
60
|
+
complete: "done",
|
|
61
|
+
success: "done",
|
|
62
|
+
succeeded: "done",
|
|
63
|
+
shipped: "done",
|
|
64
|
+
error: "failed",
|
|
65
|
+
errored: "failed",
|
|
66
|
+
cancelled: "stopped",
|
|
67
|
+
canceled: "stopped",
|
|
68
|
+
aborted: "stopped"
|
|
69
|
+
};
|
|
70
|
+
/** Any status string as a `RunStatus`; a value nothing names reads as Unknown, never as a guess. */
|
|
71
|
+
function runStatus(status) {
|
|
72
|
+
const key = status.trim().toLowerCase();
|
|
73
|
+
if (Object.hasOwn(META, key)) return key;
|
|
74
|
+
return Object.hasOwn(ALIASES, key) ? ALIASES[key] : "unknown";
|
|
75
|
+
}
|
|
76
|
+
/** The label, glyph and colour token for a status, in every surface. */
|
|
77
|
+
function statusMeta(status) {
|
|
78
|
+
return META[runStatus(status)];
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* A status glyph on the icon grid, in its token colour and labelled with its
|
|
82
|
+
* word. Pass `aria-hidden` where the label is already printed beside it.
|
|
83
|
+
* Running breathes on `--motion-ambient`, the page's one loop period; the
|
|
84
|
+
* breathe is opacity only, so it is the essential motion reduced motion keeps.
|
|
85
|
+
*/
|
|
86
|
+
function RunStatusIcon({ status, className, style, ...props }) {
|
|
87
|
+
const key = runStatus(status);
|
|
88
|
+
const { label, icon: Icon, token } = META[key];
|
|
89
|
+
const running = key === "running";
|
|
90
|
+
return /* @__PURE__ */ jsx(Icon, {
|
|
91
|
+
role: "img",
|
|
92
|
+
"aria-label": label,
|
|
93
|
+
size: 16,
|
|
94
|
+
strokeWidth: 1.75,
|
|
95
|
+
"data-run-status": key,
|
|
96
|
+
"data-motion": running ? "essential" : void 0,
|
|
97
|
+
className: cn("shrink-0", running && "animate-[tangle-breathe_var(--motion-ambient)_infinite]", className),
|
|
98
|
+
style: {
|
|
99
|
+
color: `var(${token})`,
|
|
100
|
+
...style
|
|
101
|
+
},
|
|
102
|
+
...props
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
export { RunStatusIcon, runStatus, statusMeta };
|
package/dist/run.d.ts
CHANGED
|
@@ -9,4 +9,5 @@ import { LiveDuration } from "./run/run-item-primitives.js";
|
|
|
9
9
|
import { TaskList, TaskListItem, TaskListProps, TaskStatus, showsTaskPriority, taskProgress, taskStatus } from "./run/task-list.js";
|
|
10
10
|
import { ApprovalCard, ApprovalCardProps, ApprovalDiffFile, ApprovalDiffSummary, ApprovalPlanStep } from "./run/approval-card.js";
|
|
11
11
|
import { RunPhase, RunPhaseList } from "./run/run-phase-list.js";
|
|
12
|
-
|
|
12
|
+
import { RunStatus, RunStatusIcon, RunStatusIconProps, StatusMeta, runStatus, statusMeta } from "./run/status-meta.js";
|
|
13
|
+
export { ApprovalCard, type ApprovalCardProps, type ApprovalDiffFile, ApprovalDiffSummary, type ApprovalPlanStep, ExpandedToolDetail, type ExpandedToolDetailProps, type FeedSegment, InlineThinkingItem, type InlineThinkingItemProps, InlineToolItem, type InlineToolItemProps, LiveDuration, RunGroup, type RunGroupProps, type RunPhase, RunPhaseList, RunRowShell, type RunRowShellProps, type RunRowStatus, RunRowStatusDot, type RunStatus, RunStatusIcon, type RunStatusIconProps, type StatusMeta, TaskList, type TaskListItem, type TaskListProps, type TaskStatus, type ToolCallData, ToolCallFeed, type ToolCallFeedProps, type ToolCallStatus, type ToolCallType, parseToolEvent, runStatus, showsTaskPriority, statusMeta, taskProgress, taskStatus };
|