@tangle-network/ui 11.12.0 → 11.13.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 +17 -0
- package/dist/_virtual/_rolldown/runtime.js +13 -0
- package/dist/auth/auth.d.ts +53 -0
- package/dist/{auth-DOETfnd9.js → auth/auth.js} +7 -37
- package/dist/auth/login-layout.d.ts +20 -0
- package/dist/auth/login-layout.js +36 -0
- package/dist/auth.d.ts +2 -1
- package/dist/auth.js +2 -1
- package/dist/chat/agent-timeline.d.ts +83 -0
- package/dist/chat/agent-timeline.js +236 -0
- package/dist/chat/chat-container.d.ts +51 -0
- package/dist/chat/chat-container.js +309 -0
- package/dist/chat/chat-message.d.ts +22 -0
- package/dist/chat/chat-message.js +38 -0
- package/dist/chat/message-list.d.ts +32 -0
- package/dist/chat/message-list.js +37 -0
- package/dist/chat/thinking-indicator.d.ts +6 -0
- package/dist/chat/thinking-indicator.js +38 -0
- package/dist/chat/user-message.d.ts +21 -0
- package/dist/chat/user-message.js +42 -0
- package/dist/chat.d.ts +6 -1
- package/dist/chat.js +6 -1
- package/dist/editor/document-editor-pane.d.ts +37 -0
- package/dist/editor/document-editor-pane.js +199 -0
- package/dist/editor/editor-lazy.js +37 -0
- package/dist/editor/editor-loading.js +21 -0
- package/dist/editor/editor-peers.d.ts +6 -0
- package/dist/editor/editor-peers.js +155 -0
- package/dist/editor/editor-provider.d.ts +97 -0
- package/dist/editor/editor-provider.js +253 -0
- package/dist/editor/editor-toolbar.d.ts +11 -0
- package/dist/editor/editor-toolbar.js +106 -0
- package/dist/editor/markdown-conversion.js +23 -0
- package/dist/editor/markdown-document-editor.js +103 -0
- package/dist/editor/tiptap-editor.d.ts +45 -0
- package/dist/editor/tiptap-editor.js +271 -0
- package/dist/editor/use-editor.d.ts +67 -0
- package/dist/editor/use-editor.js +158 -0
- package/dist/editor.d.ts +6 -119
- package/dist/editor.js +5 -1
- package/dist/files/file-artifact-pane.d.ts +47 -0
- package/dist/files/file-artifact-pane.js +114 -0
- package/dist/files/file-format.d.ts +51 -0
- package/dist/{file-format-BgXbr-Ib.js → files/file-format.js} +1 -1
- package/dist/files/file-preview.d.ts +27 -0
- package/dist/files/file-preview.js +359 -0
- package/dist/files/file-tabs.d.ts +19 -0
- package/dist/files/file-tabs.js +48 -0
- package/dist/files/file-tree.d.ts +31 -0
- package/dist/files/file-tree.js +135 -0
- package/dist/files/rich-file-tree.d.ts +62 -0
- package/dist/files/rich-file-tree.js +122 -0
- package/dist/files.d.ts +6 -1
- package/dist/files.js +6 -2
- package/dist/hooks/use-auth.d.ts +40 -0
- package/dist/hooks/use-auth.js +91 -0
- package/dist/hooks/use-auto-scroll.d.ts +11 -0
- package/dist/hooks/use-auto-scroll.js +48 -0
- package/dist/hooks/use-dropdown-menu.d.ts +12 -0
- package/dist/hooks/use-dropdown-menu.js +31 -0
- package/dist/hooks/use-live-time.d.ts +7 -0
- package/dist/hooks/use-live-time.js +22 -0
- package/dist/hooks/use-realtime-session.d.ts +32 -0
- package/dist/hooks/use-realtime-session.js +235 -0
- package/dist/hooks/use-run-collapse-state.d.ts +13 -0
- package/dist/hooks/use-run-collapse-state.js +24 -0
- package/dist/hooks/use-run-groups.d.ts +11 -0
- package/dist/hooks/use-run-groups.js +85 -0
- package/dist/hooks/use-sdk-session.d.ts +59 -0
- package/dist/hooks/use-sdk-session.js +322 -0
- package/dist/hooks/use-sse-stream.d.ts +124 -0
- package/dist/hooks/use-sse-stream.js +229 -0
- package/dist/hooks/use-tool-call-stream.d.ts +23 -0
- package/dist/hooks/use-tool-call-stream.js +75 -0
- package/dist/hooks.d.ts +11 -49
- package/dist/hooks.js +10 -110
- package/dist/index.d.ts +99 -25
- package/dist/index.js +86 -36
- package/dist/lib/focus.d.ts +55 -0
- package/dist/{focus-BcE_SHqz.js → lib/focus.js} +1 -1
- package/dist/lib/utils.d.ts +4 -0
- package/dist/{utils-C_uf36nf.js → lib/utils.js} +1 -1
- package/dist/{code-block-B9miUPht.d.ts → markdown/code-block.d.ts} +5 -6
- package/dist/{code-block-B36KVUSN.js → markdown/code-block.js} +22 -47
- package/dist/{markdown-C0atSabr.d.ts → markdown/markdown.d.ts} +4 -5
- package/dist/{markdown-Db08KAYF.js → markdown/markdown.js} +3 -3
- package/dist/markdown.d.ts +2 -2
- package/dist/markdown.js +2 -2
- package/dist/{openui-artifact-renderer-fkBQaoLO.d.ts → openui/openui-artifact-renderer.d.ts} +20 -21
- package/dist/{openui-artifact-renderer-DG_i2lOR.js → openui/openui-artifact-renderer.js} +9 -7
- package/dist/{schema-BpW9rSSG.js → openui/schema-compiled.js} +2 -354
- package/dist/{schema-DAstk-J4.d.ts → openui/schema-data.d.ts} +3 -24
- package/dist/openui/schema-data.js +206 -0
- package/dist/openui-schema.d.ts +22 -3
- package/dist/openui-schema.js +138 -1
- package/dist/openui.d.ts +3 -2
- package/dist/openui.js +3 -2
- package/dist/{artifact-pane-BL_DFWNl.d.ts → primitives/artifact-pane.d.ts} +3 -4
- package/dist/{artifact-pane-DMXT9a8U.js → primitives/artifact-pane.js} +2 -2
- package/dist/primitives/avatar.d.ts +8 -0
- package/dist/primitives/avatar.js +25 -0
- package/dist/primitives/badge.d.ts +22 -0
- package/dist/primitives/badge.js +47 -0
- package/dist/{button-yoIv77e2.d.ts → primitives/button.d.ts} +2 -2
- package/dist/primitives/button.js +113 -0
- package/dist/primitives/card.d.ts +18 -0
- package/dist/primitives/card.js +52 -0
- package/dist/primitives/code-block.d.ts +6 -0
- package/dist/primitives/code-block.js +13 -0
- package/dist/primitives/dialog.d.ts +23 -0
- package/dist/primitives/dialog.js +59 -0
- package/dist/primitives/drop-zone.d.ts +23 -0
- package/dist/primitives/drop-zone.js +104 -0
- package/dist/primitives/dropdown-menu.d.ts +29 -0
- package/dist/{dropdown-menu-BpcLa5vF.js → primitives/dropdown-menu.js} +2 -23
- package/dist/primitives/empty-state.d.ts +11 -0
- package/dist/primitives/empty-state.js +32 -0
- package/dist/primitives/heading.d.ts +23 -0
- package/dist/primitives/heading.js +38 -0
- package/dist/primitives/input.d.ts +23 -0
- package/dist/primitives/input.js +110 -0
- package/dist/primitives/label.d.ts +6 -0
- package/dist/primitives/label.js +16 -0
- package/dist/primitives/metric-strip.d.ts +48 -0
- package/dist/primitives/metric-strip.js +52 -0
- package/dist/primitives/page-header.d.ts +25 -0
- package/dist/primitives/page-header.js +47 -0
- package/dist/primitives/page-shell.d.ts +14 -0
- package/dist/primitives/page-shell.js +17 -0
- package/dist/primitives/progress.d.ts +9 -0
- package/dist/primitives/progress.js +29 -0
- package/dist/primitives/segmented-control.d.ts +40 -0
- package/dist/primitives/segmented-control.js +57 -0
- package/dist/primitives/select.d.ts +15 -0
- package/dist/primitives/select.js +74 -0
- package/dist/primitives/sidebar-drop-zone.d.ts +21 -0
- package/dist/primitives/sidebar-drop-zone.js +88 -0
- package/dist/primitives/skeleton.d.ts +10 -0
- package/dist/primitives/skeleton.js +50 -0
- package/dist/primitives/stat-card.d.ts +16 -0
- package/dist/primitives/stat-card.js +60 -0
- package/dist/primitives/status-pill.d.ts +44 -0
- package/dist/primitives/status-pill.js +119 -0
- package/dist/primitives/switch.d.ts +6 -0
- package/dist/primitives/switch.js +16 -0
- package/dist/primitives/table.d.ts +22 -0
- package/dist/primitives/table.js +63 -0
- package/dist/primitives/tabs.d.ts +13 -0
- package/dist/{tabs-BVHR6NkO.js → primitives/tabs.js} +3 -3
- package/dist/primitives/terminal-display.d.ts +25 -0
- package/dist/primitives/terminal-display.js +109 -0
- package/dist/primitives/text-shimmer.d.ts +16 -0
- package/dist/{text-shimmer-BUUo6I-g.js → primitives/text-shimmer.js} +2 -2
- package/dist/primitives/theme-toggle.d.ts +11 -0
- package/dist/primitives/theme-toggle.js +154 -0
- package/dist/primitives/toast.d.ts +29 -0
- package/dist/primitives/toast.js +142 -0
- package/dist/primitives/toolbar.d.ts +55 -0
- package/dist/primitives/toolbar.js +37 -0
- package/dist/primitives/upload-progress.d.ts +23 -0
- package/dist/primitives/upload-progress.js +72 -0
- package/dist/primitives.d.ts +35 -5
- package/dist/primitives.js +35 -9
- package/dist/{index-COgqsFAQ.d.ts → redaction/redacted-document.d.ts} +6 -7
- package/dist/{redaction-CGGB2ENG.js → redaction/redacted-document.js} +2 -2
- package/dist/redaction.d.ts +1 -1
- package/dist/redaction.js +1 -1
- package/dist/run/expandable-content.js +41 -0
- package/dist/run/expanded-tool-detail.d.ts +12 -0
- package/dist/run/expanded-tool-detail.js +163 -0
- package/dist/run/inline-thinking-item.d.ts +11 -0
- package/dist/run/inline-thinking-item.js +60 -0
- package/dist/run/inline-tool-item.d.ts +25 -0
- package/dist/run/inline-tool-item.js +63 -0
- package/dist/run/run-group.d.ts +26 -0
- package/dist/{run-group-BWGeesgs.js → run/run-group.js} +9 -60
- package/dist/run/run-item-primitives.d.ts +5 -0
- package/dist/{run-ZsIKPA6J.js → run/run-item-primitives.js} +2 -2
- package/dist/run/run-row-shell.d.ts +53 -0
- package/dist/run/run-row-shell.js +114 -0
- package/dist/{tool-call-feed-BeB1_4pX.d.ts → run/tool-call-feed.d.ts} +7 -12
- package/dist/{tool-call-feed-BpmMLpPX.js → run/tool-call-feed.js} +4 -4
- package/dist/run/tool-call-step.d.ts +5 -0
- package/dist/run/tool-call-step.js +82 -0
- package/dist/run.d.ts +8 -2
- package/dist/run.js +7 -4
- package/dist/sdk-hooks.d.ts +8 -1
- package/dist/sdk-hooks.js +8 -2
- package/dist/stores/active-sessions-store.d.ts +83 -0
- package/dist/{active-sessions-store-Gt1R0rFG.js → stores/active-sessions-store.js} +1 -1
- package/dist/stores/chat-store.d.ts +14 -0
- package/dist/stores/chat-store.js +33 -0
- package/dist/stores.d.ts +3 -16
- package/dist/stores.js +2 -33
- package/dist/tool-previews/command-preview.d.ts +11 -0
- package/dist/tool-previews/command-preview.js +91 -0
- package/dist/tool-previews/diff-preview.d.ts +7 -0
- package/dist/tool-previews/diff-preview.js +76 -0
- package/dist/tool-previews/glob-results-preview.d.ts +7 -0
- package/dist/tool-previews/glob-results-preview.js +53 -0
- package/dist/tool-previews/grep-results-preview.d.ts +7 -0
- package/dist/tool-previews/grep-results-preview.js +99 -0
- package/dist/tool-previews/preview-primitives.js +58 -0
- package/dist/tool-previews/question-preview.d.ts +7 -0
- package/dist/tool-previews/question-preview.js +63 -0
- package/dist/tool-previews/web-search-preview.d.ts +7 -0
- package/dist/tool-previews/web-search-preview.js +78 -0
- package/dist/tool-previews/write-file-preview.d.ts +11 -0
- package/dist/tool-previews/write-file-preview.js +52 -0
- package/dist/tool-previews.d.ts +7 -1
- package/dist/tool-previews.js +7 -1
- package/dist/{branding-26d5ARIr.d.ts → types/branding.d.ts} +2 -3
- package/dist/{message-vhUI0c5G.d.ts → types/message.d.ts} +2 -3
- package/dist/{parts-5mhy9yJ3.d.ts → types/parts.d.ts} +8 -9
- package/dist/{run-OyWmIDqu.d.ts → types/run.d.ts} +9 -10
- package/dist/{tool-display-DgmL5rIU.d.ts → types/tool-display.d.ts} +5 -6
- package/dist/types.d.ts +5 -5
- package/dist/utils/copy-text.d.ts +7 -0
- package/dist/{utils-Bl_CZ0Qp.js → utils/copy-text.js} +1 -11
- package/dist/utils/format.d.ts +22 -0
- package/dist/{format-DfcLWqMa.js → utils/format.js} +1 -1
- package/dist/utils/time-ago.d.ts +3 -0
- package/dist/utils/time-ago.js +11 -0
- package/dist/utils/tool-display.d.ts +16 -0
- package/dist/{tool-display-BAuAVa43.js → utils/tool-display.js} +1 -1
- package/dist/utils.d.ts +6 -1
- package/dist/utils.js +6 -5
- package/package.json +2 -2
- package/src/files/rich-file-tree.stories.tsx +1 -1
- package/src/files/rich-file-tree.tsx +12 -9
- package/src/markdown/code-block.test.tsx +46 -2
- package/src/markdown/code-block.tsx +23 -60
- package/src/primitives/button.stories.tsx +37 -1
- package/src/primitives/button.test.tsx +230 -0
- package/src/primitives/button.tsx +62 -14
- package/src/primitives/card-anatomy.stories.tsx +51 -0
- package/src/primitives/card.test.tsx +71 -0
- package/src/primitives/card.tsx +25 -13
- package/src/primitives/heading.stories.tsx +35 -0
- package/src/primitives/heading.test.tsx +56 -0
- package/src/primitives/heading.tsx +76 -0
- package/src/primitives/index.ts +8 -0
- package/src/primitives/input.stories.tsx +28 -0
- package/src/primitives/input.test.tsx +161 -0
- package/src/primitives/input.tsx +34 -28
- package/src/primitives/page-header.stories.tsx +51 -0
- package/src/primitives/page-header.test.tsx +48 -0
- package/src/primitives/page-header.tsx +35 -35
- package/src/primitives/page-shell.stories.tsx +89 -0
- package/src/primitives/page-shell.test.tsx +24 -0
- package/src/primitives/page-shell.tsx +26 -0
- package/src/primitives/table-wrapper.stories.tsx +54 -0
- package/src/primitives/table.test.tsx +72 -0
- package/src/primitives/table.tsx +33 -12
- package/src/primitives/theme-toggle.test.tsx +167 -0
- package/src/primitives/theme-toggle.tsx +111 -39
- package/dist/active-sessions-store-nl70ZnMC.d.ts +0 -84
- package/dist/button-C87nEe2R.js +0 -78
- package/dist/chat-DDvF2oGQ.js +0 -672
- package/dist/diff-preview-BcK3nRXb.js +0 -533
- package/dist/document-editor-pane-BilJfiCo.d.ts +0 -136
- package/dist/document-editor-pane-POsq5Q0o.js +0 -1279
- package/dist/files-hywocVZz.js +0 -753
- package/dist/index-2UntyjBb.d.ts +0 -52
- package/dist/index-BgUHilZm.d.ts +0 -108
- package/dist/index-CJ8wRfiC.d.ts +0 -236
- package/dist/index-CPDET_s1.d.ts +0 -549
- package/dist/index-Cg6gYAqh.d.ts +0 -73
- package/dist/index-Cs7j8V7l.d.ts +0 -203
- package/dist/index-DjKxO357.d.ts +0 -128
- package/dist/primitives-Bx59fT-U.js +0 -1239
- package/dist/table-Bss73DhB.js +0 -146
- package/dist/tool-call-step-DNebqhmX.js +0 -434
- package/dist/use-auto-scroll-C5Pjeqon.js +0 -153
- package/dist/use-sse-stream-DjqRuDft.js +0 -884
- package/dist/use-sse-stream-Dm6R5YWz.d.ts +0 -282
package/dist/index-Cs7j8V7l.d.ts
DELETED
|
@@ -1,203 +0,0 @@
|
|
|
1
|
-
import { t as SessionMessage } from "./message-vhUI0c5G.js";
|
|
2
|
-
import { i as ToolPart, n as SessionPart } from "./parts-5mhy9yJ3.js";
|
|
3
|
-
import { t as AgentBranding } from "./branding-26d5ARIr.js";
|
|
4
|
-
import { t as CustomToolRenderer } from "./tool-display-DgmL5rIU.js";
|
|
5
|
-
import { a as Run, n as GroupedMessage } from "./run-OyWmIDqu.js";
|
|
6
|
-
import { t as OpenUIAction } from "./openui-artifact-renderer-fkBQaoLO.js";
|
|
7
|
-
import { n as ToolCallData } from "./tool-call-feed-BeB1_4pX.js";
|
|
8
|
-
import { ReactNode } from "react";
|
|
9
|
-
//#region src/chat/chat-container.d.ts
|
|
10
|
-
/**
|
|
11
|
-
* Transcript-only container: message list + auto-scroll. Composers are
|
|
12
|
-
* composed BELOW this by the app (the canonical one is `AgentComposer` in
|
|
13
|
-
* `@tangle-network/sandbox-ui`) — this component never renders an input.
|
|
14
|
-
*/
|
|
15
|
-
interface ChatContainerProps {
|
|
16
|
-
messages: SessionMessage[];
|
|
17
|
-
partMap: Record<string, SessionPart[]>;
|
|
18
|
-
isStreaming: boolean;
|
|
19
|
-
branding?: AgentBranding;
|
|
20
|
-
className?: string;
|
|
21
|
-
/** Custom renderer for tool details. Return ReactNode to override, null to use default. */
|
|
22
|
-
renderToolDetail?: CustomToolRenderer;
|
|
23
|
-
/** Presentation mode for the session view. */
|
|
24
|
-
presentation?: "runs" | "timeline";
|
|
25
|
-
/** Callback when an OpenUI action button is pressed within inline OpenUI blocks. */
|
|
26
|
-
onOpenUIAction?: (action: OpenUIAction) => void;
|
|
27
|
-
/** Enable rendering OpenUI schemas inline in the chat timeline. Defaults to true. */
|
|
28
|
-
enableOpenUI?: boolean;
|
|
29
|
-
/** Optional actions rendered beside each grouped assistant run. */
|
|
30
|
-
renderRunActions?: (run: Run) => ReactNode;
|
|
31
|
-
/** Optional actions rendered below each user message bubble. */
|
|
32
|
-
renderUserMessageActions?: (message: SessionMessage, parts: SessionPart[]) => ReactNode;
|
|
33
|
-
/** Optional actions rendered beside individual tool items in the run-grouped
|
|
34
|
-
* (`runs`) presentation. */
|
|
35
|
-
renderToolActions?: (part: ToolPart, options: {
|
|
36
|
-
run: Run;
|
|
37
|
-
messageId: string;
|
|
38
|
-
partIndex: number;
|
|
39
|
-
}) => ReactNode;
|
|
40
|
-
/** Optional actions rendered beside individual tool items in the `timeline`
|
|
41
|
-
* presentation, which has no run/message grouping (hence part-only). */
|
|
42
|
-
renderTimelineToolActions?: (part: ToolPart) => ReactNode;
|
|
43
|
-
/** In the `timeline` presentation, collapse to the first N spine rows behind
|
|
44
|
-
* a "Show N more steps" toggle. Omit to always show every row. */
|
|
45
|
-
collapseTimelineAfter?: number;
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* Chat transcript container: message list + auto-scroll.
|
|
49
|
-
* Orchestrates useRunGroups, useRunCollapseState, and useAutoScroll.
|
|
50
|
-
*/
|
|
51
|
-
declare const ChatContainer: import("react").MemoExoticComponent<({ messages, partMap, isStreaming, branding, className, renderToolDetail, presentation, onOpenUIAction, enableOpenUI, renderRunActions, renderUserMessageActions, renderToolActions, renderTimelineToolActions, collapseTimelineAfter }: ChatContainerProps) => import("react").JSX.Element>;
|
|
52
|
-
//#endregion
|
|
53
|
-
//#region src/chat/message-list.d.ts
|
|
54
|
-
interface MessageListProps {
|
|
55
|
-
groups: GroupedMessage[];
|
|
56
|
-
partMap: Record<string, SessionPart[]>;
|
|
57
|
-
isCollapsed: (runId: string) => boolean;
|
|
58
|
-
onToggleCollapse: (runId: string) => void;
|
|
59
|
-
branding?: AgentBranding;
|
|
60
|
-
renderToolDetail?: CustomToolRenderer;
|
|
61
|
-
renderRunActions?: (group: Extract<GroupedMessage, {
|
|
62
|
-
type: "run";
|
|
63
|
-
}>["run"]) => ReactNode;
|
|
64
|
-
renderUserMessageActions?: (message: SessionMessage, parts: SessionPart[]) => ReactNode;
|
|
65
|
-
renderToolActions?: (part: ToolPart, options: {
|
|
66
|
-
run: Extract<GroupedMessage, {
|
|
67
|
-
type: "run";
|
|
68
|
-
}>["run"];
|
|
69
|
-
messageId: string;
|
|
70
|
-
partIndex: number;
|
|
71
|
-
}) => ReactNode;
|
|
72
|
-
}
|
|
73
|
-
/**
|
|
74
|
-
* Maps GroupedMessage[] to UserMessage and RunGroup components.
|
|
75
|
-
* This is the main render list for the chat view.
|
|
76
|
-
*/
|
|
77
|
-
declare const MessageList: import("react").MemoExoticComponent<({ groups, partMap, isCollapsed, onToggleCollapse, branding, renderToolDetail, renderRunActions, renderUserMessageActions, renderToolActions }: MessageListProps) => import("react").JSX.Element>;
|
|
78
|
-
//#endregion
|
|
79
|
-
//#region src/chat/user-message.d.ts
|
|
80
|
-
interface UserMessageProps {
|
|
81
|
-
/** Session-model input: text is derived from these parts. */
|
|
82
|
-
message?: SessionMessage;
|
|
83
|
-
parts?: SessionPart[];
|
|
84
|
-
/** Direct-content input (e.g. AgentTimeline): explicit text + timestamp. */
|
|
85
|
-
content?: string;
|
|
86
|
-
timestamp?: Date;
|
|
87
|
-
actions?: ReactNode;
|
|
88
|
-
}
|
|
89
|
-
/**
|
|
90
|
-
* The single user message bubble uses inverse theme colors. The timestamp sits
|
|
91
|
-
* beside the bubble and appears on hover, so it costs no height. Used by both
|
|
92
|
-
* the run/message list (session-model `parts`) and AgentTimeline (direct
|
|
93
|
-
* `content`/`timestamp`).
|
|
94
|
-
*/
|
|
95
|
-
declare const UserMessage: import("react").MemoExoticComponent<({ message: _message, parts, content, timestamp, actions }: UserMessageProps) => import("react").JSX.Element | null>;
|
|
96
|
-
//#endregion
|
|
97
|
-
//#region src/chat/chat-message.d.ts
|
|
98
|
-
type MessageRole = "user" | "assistant" | "system";
|
|
99
|
-
interface ChatMessageProps {
|
|
100
|
-
role: MessageRole;
|
|
101
|
-
content: string;
|
|
102
|
-
/** Inline tool call activity rendered between text chunks */
|
|
103
|
-
toolCalls?: ReactNode;
|
|
104
|
-
/** Whether the message is still streaming */
|
|
105
|
-
isStreaming?: boolean;
|
|
106
|
-
/** Timestamp */
|
|
107
|
-
timestamp?: Date;
|
|
108
|
-
className?: string;
|
|
109
|
-
/** Custom user label. Default: "You" */
|
|
110
|
-
userLabel?: string;
|
|
111
|
-
/** Custom assistant label. Default: "Agent" */
|
|
112
|
-
assistantLabel?: string;
|
|
113
|
-
/** Hide the role label row entirely */
|
|
114
|
-
hideRoleLabel?: boolean;
|
|
115
|
-
}
|
|
116
|
-
declare function ChatMessage({ role, content, toolCalls, isStreaming, timestamp, className, userLabel, assistantLabel, hideRoleLabel }: ChatMessageProps): import("react").JSX.Element;
|
|
117
|
-
//#endregion
|
|
118
|
-
//#region src/chat/thinking-indicator.d.ts
|
|
119
|
-
interface ThinkingIndicatorProps {
|
|
120
|
-
className?: string;
|
|
121
|
-
}
|
|
122
|
-
declare function ThinkingIndicator({ className }: ThinkingIndicatorProps): import("react").JSX.Element;
|
|
123
|
-
//#endregion
|
|
124
|
-
//#region src/chat/agent-timeline.d.ts
|
|
125
|
-
type AgentTimelineTone = "default" | "info" | "success" | "warning" | "error";
|
|
126
|
-
interface AgentTimelineMessageItem {
|
|
127
|
-
id: string;
|
|
128
|
-
kind: "message";
|
|
129
|
-
role: MessageRole;
|
|
130
|
-
content: string;
|
|
131
|
-
toolCalls?: ReactNode;
|
|
132
|
-
isStreaming?: boolean;
|
|
133
|
-
/** Shown beside a user bubble on hover. Assistant prose carries no
|
|
134
|
-
* timestamp of its own — the turn's user message dates the exchange. */
|
|
135
|
-
timestamp?: Date;
|
|
136
|
-
after?: ReactNode;
|
|
137
|
-
}
|
|
138
|
-
interface AgentTimelineToolItem {
|
|
139
|
-
id: string;
|
|
140
|
-
kind: "tool";
|
|
141
|
-
call: ToolCallData;
|
|
142
|
-
/** Source tool part, so a consumer's `renderToolActions` gets the real
|
|
143
|
-
* input/output (the flat `call` is display-only). */
|
|
144
|
-
part?: ToolPart;
|
|
145
|
-
}
|
|
146
|
-
interface AgentTimelineToolGroupItem {
|
|
147
|
-
id: string;
|
|
148
|
-
kind: "tool_group";
|
|
149
|
-
/** Accessible name of the group. Not drawn — the rows are the label. */
|
|
150
|
-
title?: string;
|
|
151
|
-
calls: ToolCallData[];
|
|
152
|
-
/** Source tool parts, parallel to `calls`. */
|
|
153
|
-
parts?: ToolPart[];
|
|
154
|
-
}
|
|
155
|
-
interface AgentTimelineStatusItem {
|
|
156
|
-
id: string;
|
|
157
|
-
kind: "status";
|
|
158
|
-
label: string;
|
|
159
|
-
detail?: string;
|
|
160
|
-
tone?: AgentTimelineTone;
|
|
161
|
-
}
|
|
162
|
-
interface AgentTimelineArtifactItem {
|
|
163
|
-
id: string;
|
|
164
|
-
kind: "artifact";
|
|
165
|
-
title: string;
|
|
166
|
-
description?: string;
|
|
167
|
-
meta?: ReactNode;
|
|
168
|
-
icon?: ReactNode;
|
|
169
|
-
tone?: AgentTimelineTone;
|
|
170
|
-
action?: ReactNode;
|
|
171
|
-
onClick?: () => void;
|
|
172
|
-
}
|
|
173
|
-
interface AgentTimelineCustomItem {
|
|
174
|
-
id: string;
|
|
175
|
-
kind: "custom";
|
|
176
|
-
/** Laid out as a run row: it takes the same horizontal bleed as tool rows,
|
|
177
|
-
* so a `RunRowShell`-based row (reasoning) aligns its glyph with the prose
|
|
178
|
-
* edge. */
|
|
179
|
-
content: ReactNode;
|
|
180
|
-
}
|
|
181
|
-
type AgentTimelineItem = AgentTimelineMessageItem | AgentTimelineToolItem | AgentTimelineToolGroupItem | AgentTimelineStatusItem | AgentTimelineArtifactItem | AgentTimelineCustomItem;
|
|
182
|
-
interface AgentTimelineProps {
|
|
183
|
-
items: AgentTimelineItem[];
|
|
184
|
-
isThinking?: boolean;
|
|
185
|
-
emptyState?: ReactNode;
|
|
186
|
-
className?: string;
|
|
187
|
-
/** Optional actions rendered beside each tool item (e.g. "open in artifacts").
|
|
188
|
-
* Receives the source tool part carried on the item. */
|
|
189
|
-
renderToolActions?: (part: ToolPart) => ReactNode;
|
|
190
|
-
/** When set, collapse the timeline to the first N step rows (every item
|
|
191
|
-
* except user messages) behind a "Show N more steps" toggle. Omit to always
|
|
192
|
-
* show every row. */
|
|
193
|
-
collapseAfter?: number;
|
|
194
|
-
}
|
|
195
|
-
/**
|
|
196
|
-
* AgentTimeline — unified mixed-content transcript for agent-backed sandbox
|
|
197
|
-
* sessions. Renders messages, tool rows, status cards, and artifact handoffs
|
|
198
|
-
* as one plain column: prose at the reading size, tool calls as quiet
|
|
199
|
-
* one-liners between the paragraphs, no connector chrome.
|
|
200
|
-
*/
|
|
201
|
-
declare function AgentTimeline({ items, isThinking, emptyState, className, renderToolActions, collapseAfter }: AgentTimelineProps): import("react").JSX.Element | null;
|
|
202
|
-
//#endregion
|
|
203
|
-
export { UserMessageProps as _, AgentTimelineMessageItem as a, ChatContainer as b, AgentTimelineTone as c, ThinkingIndicator as d, ThinkingIndicatorProps as f, UserMessage as g, MessageRole as h, AgentTimelineItem as i, AgentTimelineToolGroupItem as l, ChatMessageProps as m, AgentTimelineArtifactItem as n, AgentTimelineProps as o, ChatMessage as p, AgentTimelineCustomItem as r, AgentTimelineStatusItem as s, AgentTimeline as t, AgentTimelineToolItem as u, MessageList as v, ChatContainerProps as x, MessageListProps as y };
|
package/dist/index-DjKxO357.d.ts
DELETED
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
import { i as ToolPart, n as SessionPart, t as ReasoningPart } from "./parts-5mhy9yJ3.js";
|
|
2
|
-
import { t as AgentBranding } from "./branding-26d5ARIr.js";
|
|
3
|
-
import { t as CustomToolRenderer } from "./tool-display-DgmL5rIU.js";
|
|
4
|
-
import { a as Run } from "./run-OyWmIDqu.js";
|
|
5
|
-
import "./tool-call-feed-BeB1_4pX.js";
|
|
6
|
-
import { ReactNode } from "react";
|
|
7
|
-
//#region src/run/run-group.d.ts
|
|
8
|
-
interface RunGroupProps {
|
|
9
|
-
run: Run;
|
|
10
|
-
partMap: Record<string, SessionPart[]>;
|
|
11
|
-
collapsed: boolean;
|
|
12
|
-
onToggle: () => void;
|
|
13
|
-
branding?: AgentBranding;
|
|
14
|
-
renderToolDetail?: CustomToolRenderer;
|
|
15
|
-
headerActions?: ReactNode;
|
|
16
|
-
renderToolActions?: (part: ToolPart, options: {
|
|
17
|
-
run: Run;
|
|
18
|
-
messageId: string;
|
|
19
|
-
partIndex: number;
|
|
20
|
-
}) => ReactNode;
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Collapsible container for a consecutive group of assistant messages (a "run").
|
|
24
|
-
* Shows a summary header with stats and renders tool/thinking/text parts.
|
|
25
|
-
*/
|
|
26
|
-
declare const RunGroup: import("react").MemoExoticComponent<({ run, partMap, collapsed, onToggle, branding, renderToolDetail, headerActions, renderToolActions }: RunGroupProps) => import("react").JSX.Element | null>;
|
|
27
|
-
//#endregion
|
|
28
|
-
//#region src/run/run-row-shell.d.ts
|
|
29
|
-
type RunRowStatus = "running" | "success" | "error" | "idle";
|
|
30
|
-
/**
|
|
31
|
-
* Trailing status indicator shared by every run row. Only `error` draws a
|
|
32
|
-
* mark (a red dot). Success is silence, and a running row carries its state in
|
|
33
|
-
* the title — a `TextShimmer` sweep — so neither renders anything here.
|
|
34
|
-
*/
|
|
35
|
-
declare function RunRowStatusDot({ status }: {
|
|
36
|
-
status: RunRowStatus;
|
|
37
|
-
}): import("react").JSX.Element | null;
|
|
38
|
-
interface RunRowShellProps {
|
|
39
|
-
/** Semantic lead glyph (14px). At rest it is the row's only ornament; on
|
|
40
|
-
* hover and while open the expand chevron takes its slot. */
|
|
41
|
-
icon: ReactNode;
|
|
42
|
-
/** Row title. A string in the common case; a node when the title carries its
|
|
43
|
-
* own treatment — a running row passes `<TextShimmer>` here, which is the
|
|
44
|
-
* whole in-flight signal (the shell draws no spinner). */
|
|
45
|
-
title: ReactNode;
|
|
46
|
-
/** Secondary inline text (tool path/command, or a reasoning preview). */
|
|
47
|
-
description?: string;
|
|
48
|
-
/** Render the description in mono (tools) vs prose (reasoning). */
|
|
49
|
-
descriptionMono?: boolean;
|
|
50
|
-
status?: RunRowStatus;
|
|
51
|
-
/** @deprecated The shell no longer ticks a live duration while running; the
|
|
52
|
-
* running state lives in the title (`TextShimmer`). Accepted and ignored so
|
|
53
|
-
* existing callers keep compiling. */
|
|
54
|
-
startTime?: number;
|
|
55
|
-
/** Static duration, revealed on hover once the row is no longer running. */
|
|
56
|
-
durationMs?: number;
|
|
57
|
-
/** Radius shaping when rows are stacked into a group. */
|
|
58
|
-
groupPosition?: "single" | "first" | "middle" | "last";
|
|
59
|
-
/** Message shown below the header while collapsed (tool errors). */
|
|
60
|
-
collapsedError?: string;
|
|
61
|
-
actions?: ReactNode;
|
|
62
|
-
/** Controlled open state. Omit for internal (uncontrolled) state. */
|
|
63
|
-
open?: boolean;
|
|
64
|
-
onOpenChange?: (open: boolean) => void;
|
|
65
|
-
defaultOpen?: boolean;
|
|
66
|
-
className?: string;
|
|
67
|
-
contentClassName?: string;
|
|
68
|
-
/** Expanded body. When absent the row is not expandable. */
|
|
69
|
-
children?: ReactNode;
|
|
70
|
-
}
|
|
71
|
-
/**
|
|
72
|
-
* Shared shell for the agent activity rows (reasoning + tool). A quiet
|
|
73
|
-
* one-liner at rest — bare glyph, muted title and description, no fill, no
|
|
74
|
-
* border — that becomes a bordered card only while open. The border is always
|
|
75
|
-
* present (transparent at rest) so hover and expand never shift layout.
|
|
76
|
-
* Both row kinds render through it so they read as one family.
|
|
77
|
-
*/
|
|
78
|
-
declare function RunRowShell({ icon, title, description, descriptionMono, status, durationMs, groupPosition, collapsedError, actions, open: openProp, onOpenChange, defaultOpen, className, contentClassName, children }: RunRowShellProps): import("react").JSX.Element;
|
|
79
|
-
//#endregion
|
|
80
|
-
//#region src/run/inline-tool-item.d.ts
|
|
81
|
-
interface InlineToolItemProps {
|
|
82
|
-
part: ToolPart;
|
|
83
|
-
renderToolDetail?: CustomToolRenderer;
|
|
84
|
-
groupPosition?: "single" | "first" | "middle" | "last";
|
|
85
|
-
className?: string;
|
|
86
|
-
contentClassName?: string;
|
|
87
|
-
actions?: ReactNode;
|
|
88
|
-
/** Override the derived title (default: from `getToolDisplayMetadata`). */
|
|
89
|
-
title?: string;
|
|
90
|
-
/** Override the derived inline description. */
|
|
91
|
-
description?: string;
|
|
92
|
-
}
|
|
93
|
-
/**
|
|
94
|
-
* Compact single-line tool call display: a category glyph, the tool verb, and
|
|
95
|
-
* the path or command it acted on. While the call runs the verb shimmers;
|
|
96
|
-
* once it completes the row goes quiet (duration on hover, a red dot only on
|
|
97
|
-
* error). Expands on click to show ExpandedToolDetail. Rendered through the
|
|
98
|
-
* shared RunRowShell so it stays consistent with the reasoning row.
|
|
99
|
-
*/
|
|
100
|
-
declare const InlineToolItem: import("react").MemoExoticComponent<({ part, renderToolDetail, groupPosition, className, contentClassName, actions, title: titleOverride, description: descriptionOverride }: InlineToolItemProps) => import("react").JSX.Element>;
|
|
101
|
-
//#endregion
|
|
102
|
-
//#region src/run/inline-thinking-item.d.ts
|
|
103
|
-
interface InlineThinkingItemProps {
|
|
104
|
-
part: ReasoningPart;
|
|
105
|
-
defaultOpen?: boolean;
|
|
106
|
-
autoCollapse?: boolean;
|
|
107
|
-
className?: string;
|
|
108
|
-
contentClassName?: string;
|
|
109
|
-
}
|
|
110
|
-
declare const InlineThinkingItem: import("react").MemoExoticComponent<({ part, defaultOpen, autoCollapse, className, contentClassName }: InlineThinkingItemProps) => import("react").JSX.Element>;
|
|
111
|
-
//#endregion
|
|
112
|
-
//#region src/run/expanded-tool-detail.d.ts
|
|
113
|
-
interface ExpandedToolDetailProps {
|
|
114
|
-
part: ToolPart;
|
|
115
|
-
}
|
|
116
|
-
/**
|
|
117
|
-
* Renders full tool details when a tool item is expanded.
|
|
118
|
-
* Dispatches to specialised previews (CommandPreview, WriteFilePreview)
|
|
119
|
-
* or falls back to a generic input/output code view.
|
|
120
|
-
*/
|
|
121
|
-
declare const ExpandedToolDetail: import("react").MemoExoticComponent<({ part }: ExpandedToolDetailProps) => import("react").JSX.Element>;
|
|
122
|
-
//#endregion
|
|
123
|
-
//#region src/run/run-item-primitives.d.ts
|
|
124
|
-
declare function LiveDuration({ startTime }: {
|
|
125
|
-
startTime: number;
|
|
126
|
-
}): import("react").JSX.Element;
|
|
127
|
-
//#endregion
|
|
128
|
-
export { InlineThinkingItemProps as a, RunRowShell as c, RunRowStatusDot as d, RunGroup as f, InlineThinkingItem as i, RunRowShellProps as l, ExpandedToolDetail as n, InlineToolItem as o, RunGroupProps as p, ExpandedToolDetailProps as r, InlineToolItemProps as s, LiveDuration as t, RunRowStatus as u };
|