@tangle-network/ui 11.44.0 → 11.45.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 +43 -0
- package/dist/_virtual/_rolldown/runtime.js +1 -2
- package/dist/auth/auth.d.ts +1 -3
- package/dist/auth/auth.js +1 -2
- package/dist/auth/login-layout.d.ts +1 -3
- package/dist/auth/login-layout.js +1 -2
- package/dist/chat/agent-timeline.d.ts +1 -3
- package/dist/chat/agent-timeline.js +1 -2
- package/dist/chat/chat-container.d.ts +1 -3
- package/dist/chat/chat-container.js +3 -4
- package/dist/chat/chat-message.d.ts +1 -3
- package/dist/chat/chat-message.js +1 -2
- package/dist/chat/message-author.d.ts +1 -3
- package/dist/chat/message-author.js +1 -2
- package/dist/chat/message-list.d.ts +1 -3
- package/dist/chat/message-list.js +1 -2
- package/dist/chat/synthetic-text.js +1 -2
- package/dist/chat/thinking-indicator.d.ts +1 -3
- package/dist/chat/thinking-indicator.js +1 -2
- package/dist/chat/transcript-text.d.ts +1 -3
- package/dist/chat/transcript-text.js +1 -2
- package/dist/chat/user-message.d.ts +1 -3
- package/dist/chat/user-message.js +1 -2
- package/dist/code-presentation.js +1 -2
- package/dist/editor/document-editor-pane.d.ts +1 -3
- package/dist/editor/document-editor-pane.js +3 -4
- package/dist/editor/editor-lazy.js +1 -2
- package/dist/editor/editor-loading.js +1 -2
- package/dist/editor/editor-peers.js +1 -2
- package/dist/editor/editor-provider.d.ts +1 -3
- package/dist/editor/editor-provider.js +1 -2
- package/dist/editor/editor-toolbar.d.ts +1 -3
- package/dist/editor/editor-toolbar.js +1 -2
- package/dist/editor/markdown-conversion.js +1 -2
- package/dist/editor/markdown-document-editor.js +1 -2
- package/dist/editor/source-markdown-editor.js +1 -2
- package/dist/editor/source-markdown.js +1 -2
- package/dist/editor/tiptap-editor.d.ts +0 -2
- package/dist/editor/tiptap-editor.js +1 -2
- package/dist/editor/use-editor.d.ts +1 -3
- package/dist/editor/use-editor.js +1 -2
- package/dist/files/file-artifact-pane.d.ts +1 -3
- package/dist/files/file-artifact-pane.js +6 -6
- package/dist/files/file-card.d.ts +1 -3
- package/dist/files/file-card.js +1 -2
- package/dist/files/file-format.d.ts +1 -3
- package/dist/files/file-format.js +1 -2
- package/dist/files/file-list.d.ts +1 -3
- package/dist/files/file-list.js +1 -2
- package/dist/files/file-preview.d.ts +1 -3
- package/dist/files/file-preview.js +1 -2
- package/dist/files/file-tabs.d.ts +8 -4
- package/dist/files/file-tabs.js +79 -15
- package/dist/files/file-tree.d.ts +1 -3
- package/dist/files/file-tree.js +1 -2
- package/dist/files/pdf-loader.d.ts +1 -3
- package/dist/files/pdf-loader.js +1 -2
- package/dist/files/pdf-viewer.d.ts +1 -3
- package/dist/files/pdf-viewer.js +1 -2
- package/dist/files/rich-file-tree.d.ts +1 -3
- package/dist/files/rich-file-tree.js +1 -2
- package/dist/hooks/use-auth.d.ts +1 -3
- package/dist/hooks/use-auth.js +1 -2
- package/dist/hooks/use-auto-scroll.d.ts +1 -3
- package/dist/hooks/use-auto-scroll.js +1 -2
- package/dist/hooks/use-dropdown-menu.d.ts +1 -2
- package/dist/hooks/use-dropdown-menu.js +1 -2
- package/dist/hooks/use-live-time.d.ts +1 -3
- package/dist/hooks/use-live-time.js +1 -2
- package/dist/hooks/use-realtime-session.d.ts +1 -3
- package/dist/hooks/use-realtime-session.js +1 -2
- package/dist/hooks/use-run-collapse-state.d.ts +1 -3
- package/dist/hooks/use-run-collapse-state.js +1 -2
- package/dist/hooks/use-run-groups.d.ts +1 -3
- package/dist/hooks/use-run-groups.js +1 -2
- package/dist/hooks/use-sdk-session.d.ts +1 -3
- package/dist/hooks/use-sdk-session.js +1 -2
- package/dist/hooks/use-sse-stream.d.ts +1 -3
- package/dist/hooks/use-sse-stream.js +1 -2
- package/dist/hooks/use-tool-call-stream.d.ts +1 -3
- package/dist/hooks/use-tool-call-stream.js +1 -2
- package/dist/lib/code-presentation.d.ts +1 -3
- package/dist/lib/code-presentation.js +1 -2
- package/dist/lib/control-presentation.d.ts +0 -2
- package/dist/lib/control-presentation.js +1 -2
- package/dist/lib/focus.d.ts +1 -3
- package/dist/lib/focus.js +1 -2
- package/dist/lib/interaction.d.ts +1 -3
- package/dist/lib/interaction.js +1 -2
- package/dist/lib/motion.d.ts +1 -3
- package/dist/lib/motion.js +1 -2
- package/dist/lib/optional-peer.js +1 -2
- package/dist/lib/series.d.ts +1 -3
- package/dist/lib/series.js +1 -2
- package/dist/lib/surface-motion.js +1 -2
- package/dist/lib/utils.d.ts +1 -3
- package/dist/lib/utils.js +1 -2
- package/dist/markdown/api-schema.d.ts +1 -3
- package/dist/markdown/api-schema.js +1 -2
- package/dist/markdown/code-block.d.ts +0 -2
- package/dist/markdown/code-block.js +1 -2
- package/dist/markdown/code-meta.d.ts +1 -3
- package/dist/markdown/code-meta.js +1 -2
- package/dist/markdown/markdown-table.d.ts +1 -3
- package/dist/markdown/markdown-table.js +1 -2
- package/dist/markdown/markdown.d.ts +1 -3
- package/dist/markdown/markdown.js +1 -2
- package/dist/nav.d.ts +0 -2
- package/dist/nav.js +1 -2
- package/dist/openui/openui-artifact-renderer.d.ts +1 -2
- package/dist/openui/openui-artifact-renderer.js +1 -2
- package/dist/openui/schema-compiled.js +1 -2
- package/dist/openui/schema-data.d.ts +1 -3
- package/dist/openui/schema-data.js +1 -2
- package/dist/openui-schema.d.ts +0 -2
- package/dist/openui-schema.js +1 -2
- package/dist/presentation.d.ts +0 -2
- package/dist/presentation.js +1 -2
- package/dist/primitives/alert-dialog.d.ts +0 -2
- package/dist/primitives/alert-dialog.js +1 -2
- package/dist/primitives/alert.d.ts +1 -3
- package/dist/primitives/alert.js +1 -2
- package/dist/primitives/artifact-pane.d.ts +1 -3
- package/dist/primitives/artifact-pane.js +1 -2
- package/dist/primitives/avatar.d.ts +0 -2
- package/dist/primitives/avatar.js +1 -2
- package/dist/primitives/badge.d.ts +0 -2
- package/dist/primitives/badge.js +1 -2
- package/dist/primitives/breadcrumb.d.ts +0 -2
- package/dist/primitives/breadcrumb.js +1 -2
- package/dist/primitives/button.d.ts +0 -2
- package/dist/primitives/button.js +1 -2
- package/dist/primitives/calendar.d.ts +0 -2
- package/dist/primitives/calendar.js +1 -2
- package/dist/primitives/card.d.ts +0 -2
- package/dist/primitives/card.js +1 -2
- package/dist/primitives/checkbox.d.ts +0 -2
- package/dist/primitives/checkbox.js +1 -2
- package/dist/primitives/chip.d.ts +0 -2
- package/dist/primitives/chip.js +1 -2
- package/dist/primitives/code-block.d.ts +0 -2
- package/dist/primitives/code-block.js +1 -2
- package/dist/primitives/collapsible.d.ts +0 -2
- package/dist/primitives/collapsible.js +1 -2
- package/dist/primitives/compliance-badge.d.ts +0 -2
- package/dist/primitives/compliance-badge.js +3 -4
- package/dist/primitives/context-menu.d.ts +0 -2
- package/dist/primitives/context-menu.js +1 -2
- package/dist/primitives/date-picker.d.ts +0 -2
- package/dist/primitives/date-picker.js +1 -2
- package/dist/primitives/dialog.d.ts +0 -2
- package/dist/primitives/dialog.js +3 -4
- package/dist/primitives/drop-zone.d.ts +1 -3
- package/dist/primitives/drop-zone.js +1 -2
- package/dist/primitives/dropdown-menu.d.ts +0 -2
- package/dist/primitives/dropdown-menu.js +1 -2
- package/dist/primitives/empty-state.d.ts +0 -2
- package/dist/primitives/empty-state.js +1 -2
- package/dist/primitives/field.d.ts +1 -3
- package/dist/primitives/field.js +1 -2
- package/dist/primitives/heading.d.ts +0 -2
- package/dist/primitives/heading.js +3 -4
- package/dist/primitives/help-text.d.ts +0 -2
- package/dist/primitives/help-text.js +1 -2
- package/dist/primitives/hover-card.d.ts +0 -2
- package/dist/primitives/hover-card.js +1 -2
- package/dist/primitives/icon-tile.d.ts +0 -2
- package/dist/primitives/icon-tile.js +1 -2
- package/dist/primitives/info-tip.js +1 -2
- package/dist/primitives/input.d.ts +0 -2
- package/dist/primitives/input.js +1 -2
- package/dist/primitives/label.d.ts +0 -2
- package/dist/primitives/label.js +1 -2
- package/dist/primitives/metric-chart.d.ts +0 -2
- package/dist/primitives/metric-chart.js +1 -2
- package/dist/primitives/metric-strip.d.ts +0 -2
- package/dist/primitives/metric-strip.js +1 -2
- package/dist/primitives/page-header.d.ts +0 -2
- package/dist/primitives/page-header.js +1 -2
- package/dist/primitives/page-shell.d.ts +1 -3
- package/dist/primitives/page-shell.js +1 -2
- package/dist/primitives/pagination.d.ts +1 -2
- package/dist/primitives/pagination.js +1 -2
- package/dist/primitives/popover.d.ts +0 -2
- package/dist/primitives/popover.js +1 -2
- package/dist/primitives/progress.d.ts +0 -2
- package/dist/primitives/progress.js +1 -2
- package/dist/primitives/radio-group.d.ts +0 -2
- package/dist/primitives/radio-group.js +1 -2
- package/dist/primitives/segmented-control.d.ts +1 -3
- package/dist/primitives/segmented-control.js +4 -5
- package/dist/primitives/select.d.ts +0 -2
- package/dist/primitives/select.js +1 -2
- package/dist/primitives/separator.d.ts +0 -2
- package/dist/primitives/separator.js +1 -2
- package/dist/primitives/series-sparkline.d.ts +0 -2
- package/dist/primitives/series-sparkline.js +1 -2
- package/dist/primitives/settings.d.ts +1 -3
- package/dist/primitives/settings.js +1 -2
- package/dist/primitives/sheet.d.ts +0 -2
- package/dist/primitives/sheet.js +3 -4
- package/dist/primitives/sidebar-drop-zone.d.ts +1 -3
- package/dist/primitives/sidebar-drop-zone.js +2 -3
- package/dist/primitives/skeleton.d.ts +0 -2
- package/dist/primitives/skeleton.js +1 -2
- package/dist/primitives/slider.d.ts +0 -2
- package/dist/primitives/slider.js +1 -2
- package/dist/primitives/stat-card.d.ts +0 -2
- package/dist/primitives/stat-card.js +1 -2
- package/dist/primitives/status-pill.d.ts +0 -2
- package/dist/primitives/status-pill.js +1 -2
- package/dist/primitives/switch.d.ts +0 -2
- package/dist/primitives/switch.js +1 -2
- package/dist/primitives/table.d.ts +0 -2
- package/dist/primitives/table.js +1 -2
- package/dist/primitives/tabs.d.ts +0 -2
- package/dist/primitives/tabs.js +1 -2
- package/dist/primitives/tag.d.ts +0 -2
- package/dist/primitives/tag.js +1 -2
- package/dist/primitives/terminal-display.d.ts +0 -2
- package/dist/primitives/terminal-display.js +1 -2
- package/dist/primitives/text-shimmer.d.ts +1 -3
- package/dist/primitives/text-shimmer.js +1 -2
- package/dist/primitives/theme-toggle.d.ts +1 -2
- package/dist/primitives/theme-toggle.js +1 -2
- package/dist/primitives/time-select.d.ts +0 -2
- package/dist/primitives/time-select.js +1 -2
- package/dist/primitives/toast.d.ts +1 -2
- package/dist/primitives/toast.js +1 -2
- package/dist/primitives/tone.d.ts +1 -3
- package/dist/primitives/tone.js +1 -2
- package/dist/primitives/toolbar.d.ts +0 -2
- package/dist/primitives/toolbar.js +1 -2
- package/dist/primitives/tooltip.d.ts +0 -2
- package/dist/primitives/tooltip.js +1 -2
- package/dist/primitives/upload-progress.d.ts +1 -3
- package/dist/primitives/upload-progress.js +1 -2
- package/dist/primitives/wizard.d.ts +1 -3
- package/dist/primitives/wizard.js +1 -2
- package/dist/redaction/redacted-document.d.ts +1 -3
- package/dist/redaction/redacted-document.js +1 -2
- package/dist/redaction.js +1 -2
- package/dist/run/approval-card.d.ts +1 -3
- package/dist/run/approval-card.js +1 -2
- package/dist/run/expandable-content.js +1 -2
- package/dist/run/expanded-tool-detail.d.ts +1 -3
- package/dist/run/expanded-tool-detail.js +1 -2
- package/dist/run/inline-thinking-item.d.ts +1 -3
- package/dist/run/inline-thinking-item.js +1 -2
- package/dist/run/inline-tool-item.d.ts +1 -3
- package/dist/run/inline-tool-item.js +1 -2
- package/dist/run/run-group.d.ts +1 -3
- package/dist/run/run-group.js +1 -2
- package/dist/run/run-item-primitives.d.ts +1 -3
- package/dist/run/run-item-primitives.js +1 -2
- package/dist/run/run-phase-list.d.ts +1 -3
- package/dist/run/run-phase-list.js +1 -2
- package/dist/run/run-row-shell.d.ts +1 -3
- package/dist/run/run-row-shell.js +1 -2
- package/dist/run/task-list.d.ts +1 -3
- package/dist/run/task-list.js +1 -2
- package/dist/run/tool-call-feed.d.ts +1 -3
- package/dist/run/tool-call-feed.js +1 -2
- package/dist/run/tool-call-step.d.ts +1 -3
- package/dist/run/tool-call-step.js +1 -2
- package/dist/stores/active-sessions-store.d.ts +1 -3
- package/dist/stores/active-sessions-store.js +1 -2
- package/dist/stores/chat-store.d.ts +1 -3
- package/dist/stores/chat-store.js +1 -2
- package/dist/tool-previews/command-preview.d.ts +1 -3
- package/dist/tool-previews/command-preview.js +1 -2
- package/dist/tool-previews/diff-preview.d.ts +1 -3
- package/dist/tool-previews/diff-preview.js +1 -2
- package/dist/tool-previews/glob-results-preview.d.ts +1 -3
- package/dist/tool-previews/glob-results-preview.js +1 -2
- package/dist/tool-previews/grep-results-preview.d.ts +1 -3
- package/dist/tool-previews/grep-results-preview.js +1 -2
- package/dist/tool-previews/preview-primitives.js +1 -2
- package/dist/tool-previews/question-preview.d.ts +1 -3
- package/dist/tool-previews/question-preview.js +1 -2
- package/dist/tool-previews/web-search-preview.d.ts +1 -3
- package/dist/tool-previews/web-search-preview.js +1 -2
- package/dist/tool-previews/write-file-preview.d.ts +1 -3
- package/dist/tool-previews/write-file-preview.js +1 -2
- package/dist/types/branding.d.ts +1 -3
- package/dist/types/message.d.ts +1 -3
- package/dist/types/parts.d.ts +1 -3
- package/dist/types/run.d.ts +1 -3
- package/dist/types/tool-display.d.ts +1 -3
- package/dist/utils/copy-text.d.ts +1 -3
- package/dist/utils/copy-text.js +1 -2
- package/dist/utils/format.d.ts +1 -3
- package/dist/utils/format.js +1 -2
- package/dist/utils/time-ago.d.ts +1 -3
- package/dist/utils/time-ago.js +1 -2
- package/dist/utils/tool-display.d.ts +1 -3
- package/dist/utils/tool-display.js +1 -2
- package/package.json +38 -38
- package/src/files/file-artifact-pane.tsx +1 -0
- package/src/files/file-tabs.test.tsx +66 -0
- package/src/files/file-tabs.tsx +77 -17
- package/src/primitives/heading.tsx +2 -2
- package/src/primitives/sidebar-drop-zone.tsx +1 -1
- package/src/styles/presentation.css +3 -3
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { cn } from "../lib/utils.js";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { Check, ChevronRight, Circle, FileMinus, FilePen, FilePlus } from "lucide-react";
|
|
4
|
-
|
|
4
|
+
// src/run/approval-card.tsx
|
|
5
5
|
const CHANGE_ICON = {
|
|
6
6
|
added: FilePlus,
|
|
7
7
|
modified: FilePen,
|
|
@@ -158,5 +158,4 @@ function ApprovalCard({ title, context, step, plan, diff, diffNote, details, sta
|
|
|
158
158
|
]
|
|
159
159
|
});
|
|
160
160
|
}
|
|
161
|
-
//#endregion
|
|
162
161
|
export { ApprovalCard, ApprovalDiffSummary };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { cn } from "../lib/utils.js";
|
|
2
2
|
import { useEffect, useRef, useState } from "react";
|
|
3
3
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
-
|
|
4
|
+
// src/run/expandable-content.tsx
|
|
5
5
|
/**
|
|
6
6
|
* Clamps tall content to a fixed height with a bottom fade and a
|
|
7
7
|
* "Show more / Show less" toggle. Content shorter than the cap renders
|
|
@@ -37,5 +37,4 @@ function ExpandableContent({ children, collapsedMaxPx = 180, fadeClassName = "fr
|
|
|
37
37
|
}) : null]
|
|
38
38
|
});
|
|
39
39
|
}
|
|
40
|
-
//#endregion
|
|
41
40
|
export { ExpandableContent };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ToolPart } from "../types/parts.js";
|
|
2
|
-
//#region src/run/expanded-tool-detail.d.ts
|
|
3
2
|
export interface ExpandedToolDetailProps {
|
|
4
3
|
part: ToolPart;
|
|
5
4
|
}
|
|
@@ -8,5 +7,4 @@ export interface ExpandedToolDetailProps {
|
|
|
8
7
|
* Dispatches to specialised previews (CommandPreview, WriteFilePreview)
|
|
9
8
|
* or falls back to a generic input/output code view.
|
|
10
9
|
*/
|
|
11
|
-
export declare const ExpandedToolDetail: import("react").MemoExoticComponent<({ part }: ExpandedToolDetailProps) => import("react").JSX.Element>;
|
|
12
|
-
//#endregion
|
|
10
|
+
export declare const ExpandedToolDetail: import("react").MemoExoticComponent<({ part }: ExpandedToolDetailProps) => import("react").JSX.Element>;
|
|
@@ -12,7 +12,7 @@ import { ExpandableContent } from "./expandable-content.js";
|
|
|
12
12
|
import { memo } from "react";
|
|
13
13
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
14
14
|
import { AlertCircle, ArrowLeft, ArrowRight, FileText, Loader2 } 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 = {
|
|
18
18
|
ts: "typescript",
|
|
@@ -165,5 +165,4 @@ const ExpandedToolDetail = memo(({ part }) => {
|
|
|
165
165
|
});
|
|
166
166
|
});
|
|
167
167
|
ExpandedToolDetail.displayName = "ExpandedToolDetail";
|
|
168
|
-
//#endregion
|
|
169
168
|
export { ExpandedToolDetail };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ReasoningPart } from "../types/parts.js";
|
|
2
|
-
//#region src/run/inline-thinking-item.d.ts
|
|
3
2
|
export interface InlineThinkingItemProps {
|
|
4
3
|
part: ReasoningPart;
|
|
5
4
|
defaultOpen?: boolean;
|
|
@@ -13,5 +12,4 @@ export interface InlineThinkingItemProps {
|
|
|
13
12
|
className?: string;
|
|
14
13
|
contentClassName?: string;
|
|
15
14
|
}
|
|
16
|
-
export declare const InlineThinkingItem: import("react").MemoExoticComponent<({ part, defaultOpen, autoCollapse, openWhileActive, className, contentClassName }: InlineThinkingItemProps) => import("react").JSX.Element>;
|
|
17
|
-
//#endregion
|
|
15
|
+
export declare const InlineThinkingItem: import("react").MemoExoticComponent<({ part, defaultOpen, autoCollapse, openWhileActive, className, contentClassName }: InlineThinkingItemProps) => import("react").JSX.Element>;
|
|
@@ -6,7 +6,7 @@ import { Markdown } from "../markdown/markdown.js";
|
|
|
6
6
|
import { memo, useEffect, useRef, useState } from "react";
|
|
7
7
|
import { jsx } from "react/jsx-runtime";
|
|
8
8
|
import { Brain } from "lucide-react";
|
|
9
|
-
|
|
9
|
+
// src/run/inline-thinking-item.tsx
|
|
10
10
|
const InlineThinkingItem = memo(({ part, defaultOpen = false, autoCollapse = true, openWhileActive = true, className, contentClassName }) => {
|
|
11
11
|
const [open, setOpen] = useState(defaultOpen);
|
|
12
12
|
const autoCollapsedRef = useRef(false);
|
|
@@ -57,5 +57,4 @@ const InlineThinkingItem = memo(({ part, defaultOpen = false, autoCollapse = tru
|
|
|
57
57
|
});
|
|
58
58
|
});
|
|
59
59
|
InlineThinkingItem.displayName = "InlineThinkingItem";
|
|
60
|
-
//#endregion
|
|
61
60
|
export { InlineThinkingItem };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { ToolPart } from "../types/parts.js";
|
|
2
2
|
import { CustomToolRenderer } from "../types/tool-display.js";
|
|
3
3
|
import { ReactNode } from "react";
|
|
4
|
-
//#region src/run/inline-tool-item.d.ts
|
|
5
4
|
export interface InlineToolItemProps {
|
|
6
5
|
part: ToolPart;
|
|
7
6
|
renderToolDetail?: CustomToolRenderer;
|
|
@@ -21,5 +20,4 @@ export interface InlineToolItemProps {
|
|
|
21
20
|
* error). Expands on click to show ExpandedToolDetail. Rendered through the
|
|
22
21
|
* shared RunRowShell so it stays consistent with the reasoning row.
|
|
23
22
|
*/
|
|
24
|
-
export declare const InlineToolItem: import("react").MemoExoticComponent<({ part, renderToolDetail, groupPosition, className, contentClassName, actions, title: titleOverride, description: descriptionOverride }: InlineToolItemProps) => import("react").JSX.Element>;
|
|
25
|
-
//#endregion
|
|
23
|
+
export declare const InlineToolItem: import("react").MemoExoticComponent<({ part, renderToolDetail, groupPosition, className, contentClassName, actions, title: titleOverride, description: descriptionOverride }: InlineToolItemProps) => import("react").JSX.Element>;
|
|
@@ -6,7 +6,7 @@ import { RunRowShell } from "./run-row-shell.js";
|
|
|
6
6
|
import { memo } from "react";
|
|
7
7
|
import { jsx } from "react/jsx-runtime";
|
|
8
8
|
import { Bot, ClipboardList, FileEdit, FileSearch, Globe, PencilLine, Search, Settings, Terminal } from "lucide-react";
|
|
9
|
-
|
|
9
|
+
// src/run/inline-tool-item.tsx
|
|
10
10
|
/** Map tool category to a lucide-react icon component. */
|
|
11
11
|
const TOOL_CATEGORY_ICON_MAP = {
|
|
12
12
|
command: Terminal,
|
|
@@ -59,5 +59,4 @@ const InlineToolItem = memo(({ part, renderToolDetail, groupPosition = "single",
|
|
|
59
59
|
});
|
|
60
60
|
});
|
|
61
61
|
InlineToolItem.displayName = "InlineToolItem";
|
|
62
|
-
//#endregion
|
|
63
62
|
export { InlineToolItem };
|
package/dist/run/run-group.d.ts
CHANGED
|
@@ -3,7 +3,6 @@ import { AgentBranding } from "../types/branding.js";
|
|
|
3
3
|
import { CustomToolRenderer } from "../types/tool-display.js";
|
|
4
4
|
import { Run } from "../types/run.js";
|
|
5
5
|
import { ReactNode } from "react";
|
|
6
|
-
//#region src/run/run-group.d.ts
|
|
7
6
|
export interface RunGroupProps {
|
|
8
7
|
run: Run;
|
|
9
8
|
partMap: Record<string, SessionPart[]>;
|
|
@@ -22,5 +21,4 @@ export interface RunGroupProps {
|
|
|
22
21
|
* Collapsible container for a consecutive group of assistant messages (a "run").
|
|
23
22
|
* Shows a summary header with stats and renders tool/thinking/text parts.
|
|
24
23
|
*/
|
|
25
|
-
export declare const RunGroup: import("react").MemoExoticComponent<({ run, partMap, collapsed, onToggle, branding, renderToolDetail, headerActions, renderToolActions }: RunGroupProps) => import("react").JSX.Element | null>;
|
|
26
|
-
//#endregion
|
|
24
|
+
export declare const RunGroup: import("react").MemoExoticComponent<({ run, partMap, collapsed, onToggle, branding, renderToolDetail, headerActions, renderToolActions }: RunGroupProps) => import("react").JSX.Element | null>;
|
package/dist/run/run-group.js
CHANGED
|
@@ -10,7 +10,7 @@ import { memo, useMemo } from "react";
|
|
|
10
10
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
11
11
|
import { Bot, ChevronDown, ChevronRight, ClipboardList, FileEdit, FileSearch, Globe, Loader2, PencilLine, Search, Settings, Sparkles, Terminal } from "lucide-react";
|
|
12
12
|
import * as Collapsible from "@radix-ui/react-collapsible";
|
|
13
|
-
|
|
13
|
+
// src/run/run-group.tsx
|
|
14
14
|
/**
|
|
15
15
|
* One row on the run's timeline spine: a connector line + accent dot in a
|
|
16
16
|
* narrow gutter, content to the right, so a run reads as separated, distinct
|
|
@@ -383,5 +383,4 @@ const RunGroup = memo(({ run, partMap, collapsed, onToggle, branding = DEFAULT_B
|
|
|
383
383
|
});
|
|
384
384
|
});
|
|
385
385
|
RunGroup.displayName = "RunGroup";
|
|
386
|
-
//#endregion
|
|
387
386
|
export { RunGroup };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { formatDuration } from "../utils/format.js";
|
|
2
2
|
import { useEffect, useState } from "react";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
|
-
|
|
4
|
+
// src/run/run-item-primitives.tsx
|
|
5
5
|
function LiveDuration({ startTime }) {
|
|
6
6
|
const [elapsed, setElapsed] = useState(Date.now() - startTime);
|
|
7
7
|
useEffect(() => {
|
|
@@ -13,5 +13,4 @@ function LiveDuration({ startTime }) {
|
|
|
13
13
|
children: formatDuration(elapsed)
|
|
14
14
|
});
|
|
15
15
|
}
|
|
16
|
-
//#endregion
|
|
17
16
|
export { LiveDuration };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ReactNode } from "react";
|
|
2
|
-
//#region src/run/run-phase-list.d.ts
|
|
3
2
|
export interface RunPhase {
|
|
4
3
|
id: string;
|
|
5
4
|
/** The step or phase the work belongs to. */
|
|
@@ -14,5 +13,4 @@ export interface RunPhase {
|
|
|
14
13
|
export declare function RunPhaseList({ phases, className }: {
|
|
15
14
|
phases: readonly RunPhase[];
|
|
16
15
|
className?: string;
|
|
17
|
-
}): import("react").JSX.Element | null;
|
|
18
|
-
//#endregion
|
|
16
|
+
}): import("react").JSX.Element | null;
|
|
@@ -3,7 +3,7 @@ import { cn } from "../lib/utils.js";
|
|
|
3
3
|
import { useState } from "react";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
import { ChevronRight, CircleAlert, Loader2 } from "lucide-react";
|
|
6
|
-
|
|
6
|
+
// src/run/run-phase-list.tsx
|
|
7
7
|
function PhaseRow({ phase }) {
|
|
8
8
|
const [open, setOpen] = useState(false);
|
|
9
9
|
const id = `run-phase-${phase.id}`;
|
|
@@ -52,5 +52,4 @@ function RunPhaseList({ phases, className }) {
|
|
|
52
52
|
children: phases.map((phase) => /* @__PURE__ */ jsx(PhaseRow, { phase }, phase.id))
|
|
53
53
|
});
|
|
54
54
|
}
|
|
55
|
-
//#endregion
|
|
56
55
|
export { RunPhaseList };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ReactNode } from "react";
|
|
2
|
-
//#region src/run/run-row-shell.d.ts
|
|
3
2
|
export type RunRowStatus = "running" | "success" | "error" | "idle";
|
|
4
3
|
/**
|
|
5
4
|
* Trailing status indicator shared by every run row. Only `error` draws a
|
|
@@ -49,5 +48,4 @@ export interface RunRowShellProps {
|
|
|
49
48
|
* present (transparent at rest) so hover and expand never shift layout.
|
|
50
49
|
* Both row kinds render through it so they read as one family.
|
|
51
50
|
*/
|
|
52
|
-
export declare function RunRowShell({ icon, title, description, descriptionMono, status, durationMs, groupPosition, collapsedError, actions, open: openProp, onOpenChange, defaultOpen, className, contentClassName, children }: RunRowShellProps): import("react").JSX.Element;
|
|
53
|
-
//#endregion
|
|
51
|
+
export declare function RunRowShell({ icon, title, description, descriptionMono, status, durationMs, groupPosition, collapsedError, actions, open: openProp, onOpenChange, defaultOpen, className, contentClassName, children }: RunRowShellProps): import("react").JSX.Element;
|
|
@@ -4,7 +4,7 @@ import { useState } from "react";
|
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
import { ChevronRight } from "lucide-react";
|
|
6
6
|
import * as Collapsible from "@radix-ui/react-collapsible";
|
|
7
|
-
|
|
7
|
+
// src/run/run-row-shell.tsx
|
|
8
8
|
/**
|
|
9
9
|
* Trailing status indicator shared by every run row. Only `error` draws a
|
|
10
10
|
* mark (a red dot). Success is silence, and a running row carries its state in
|
|
@@ -110,5 +110,4 @@ function RunRowShell({ icon, title, description, descriptionMono = false, status
|
|
|
110
110
|
})
|
|
111
111
|
});
|
|
112
112
|
}
|
|
113
|
-
//#endregion
|
|
114
113
|
export { RunRowShell, RunRowStatusDot };
|
package/dist/run/task-list.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ReactNode } from "react";
|
|
2
|
-
//#region src/run/task-list.d.ts
|
|
3
2
|
/** The states an agent's working checklist reports; unknown values read as to-do. */
|
|
4
3
|
export type TaskStatus = "pending" | "in_progress" | "completed" | "cancelled" | "blocked" | "failed";
|
|
5
4
|
export interface TaskListItem {
|
|
@@ -29,5 +28,4 @@ export declare function taskProgress(items: readonly TaskListItem[]): {
|
|
|
29
28
|
* An agent's working checklist: a header with progress, each task's state as
|
|
30
29
|
* a toned pill, and priority shown only when the tasks differ in it.
|
|
31
30
|
*/
|
|
32
|
-
export declare function TaskList({ items, title, meta, className }: TaskListProps): import("react").JSX.Element;
|
|
33
|
-
//#endregion
|
|
31
|
+
export declare function TaskList({ items, title, meta, className }: TaskListProps): import("react").JSX.Element;
|
package/dist/run/task-list.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { cn } from "../lib/utils.js";
|
|
2
2
|
import { StatusPill } from "../primitives/status-pill.js";
|
|
3
3
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
-
|
|
4
|
+
// src/run/task-list.tsx
|
|
5
5
|
const STATUS = {
|
|
6
6
|
pending: {
|
|
7
7
|
tone: "neutral",
|
|
@@ -134,5 +134,4 @@ function TaskList({ items, title = "Tasks", meta, className }) {
|
|
|
134
134
|
]
|
|
135
135
|
});
|
|
136
136
|
}
|
|
137
|
-
//#endregion
|
|
138
137
|
export { TaskList, showsTaskPriority, taskProgress, taskStatus };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ToolCallStatus, ToolCallType } from "./tool-call-step.js";
|
|
2
|
-
//#region src/run/tool-call-feed.d.ts
|
|
3
2
|
export interface ToolCallData {
|
|
4
3
|
id: string;
|
|
5
4
|
type: ToolCallType;
|
|
@@ -38,5 +37,4 @@ export declare function ToolCallFeed({ segments, className }: ToolCallFeedProps)
|
|
|
38
37
|
export declare function parseToolEvent(event: {
|
|
39
38
|
type: string;
|
|
40
39
|
data: Record<string, unknown>;
|
|
41
|
-
}): ToolCallData | null;
|
|
42
|
-
//#endregion
|
|
40
|
+
}): ToolCallData | null;
|
|
@@ -2,7 +2,7 @@ import { cn } from "../lib/utils.js";
|
|
|
2
2
|
import { Markdown } from "../markdown/markdown.js";
|
|
3
3
|
import { ToolCallGroup, ToolCallStep } from "./tool-call-step.js";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
|
-
|
|
5
|
+
// src/run/tool-call-feed.tsx
|
|
6
6
|
/**
|
|
7
7
|
* Renders a feed of interleaved text and tool calls.
|
|
8
8
|
*/
|
|
@@ -105,5 +105,4 @@ function formatToolInput(toolName, input) {
|
|
|
105
105
|
function truncate(text, max) {
|
|
106
106
|
return text.length > max ? text.slice(0, max - 3) + "..." : text;
|
|
107
107
|
}
|
|
108
|
-
//#endregion
|
|
109
108
|
export { ToolCallFeed, parseToolEvent };
|
|
@@ -1,5 +1,3 @@
|
|
|
1
1
|
import { ReactNode } from "react";
|
|
2
|
-
//#region src/run/tool-call-step.d.ts
|
|
3
2
|
export type ToolCallType = "bash" | "read" | "write" | "edit" | "glob" | "grep" | "list" | "download" | "inspect" | "audit" | "unknown";
|
|
4
|
-
export type ToolCallStatus = "running" | "success" | "error";
|
|
5
|
-
//#endregion
|
|
3
|
+
export type ToolCallStatus = "running" | "success" | "error";
|
|
@@ -2,7 +2,7 @@ import { cn } from "../lib/utils.js";
|
|
|
2
2
|
import { CodeBlock } from "../markdown/code-block.js";
|
|
3
3
|
import { InlineToolItem } from "./inline-tool-item.js";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
|
-
|
|
5
|
+
// src/run/tool-call-step.tsx
|
|
6
6
|
const EXT_LANGUAGE = {
|
|
7
7
|
ts: "typescript",
|
|
8
8
|
tsx: "typescript",
|
|
@@ -78,5 +78,4 @@ function ToolCallGroup({ title, children, className }) {
|
|
|
78
78
|
children
|
|
79
79
|
});
|
|
80
80
|
}
|
|
81
|
-
//#endregion
|
|
82
81
|
export { ToolCallGroup, ToolCallStep };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/stores/active-sessions-store.d.ts
|
|
2
1
|
export type SessionProjectKey = string | number;
|
|
3
2
|
export type ActiveSessionStatus = "idle" | "running" | "attention-needed" | "error";
|
|
4
3
|
export type ActiveSessionReconnectState = "idle" | "reconnecting" | "failed";
|
|
@@ -79,5 +78,4 @@ export declare function useNavbarSessions(projectId?: SessionProjectKey | null):
|
|
|
79
78
|
export declare function useSessionsByActivity(): ActiveSessionRecord[];
|
|
80
79
|
export declare function useProjectActivity(): ActiveProjectActivity[];
|
|
81
80
|
export declare function useTotalRunningSessions(): number;
|
|
82
|
-
export declare function useHasBackgroundRunningSessions(): boolean;
|
|
83
|
-
//#endregion
|
|
81
|
+
export declare function useHasBackgroundRunningSessions(): boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useMemo } from "react";
|
|
2
2
|
import { useStore } from "@nanostores/react";
|
|
3
3
|
import { atom } from "nanostores";
|
|
4
|
-
|
|
4
|
+
// src/stores/active-sessions-store.ts
|
|
5
5
|
const INITIAL_STATE = {
|
|
6
6
|
sessions: {},
|
|
7
7
|
lastUpdatedAt: 0
|
|
@@ -258,5 +258,4 @@ function useHasBackgroundRunningSessions() {
|
|
|
258
258
|
const state = useStore(activeSessionsAtom);
|
|
259
259
|
return useMemo(() => hasBackgroundRunningSessions(state), [state]);
|
|
260
260
|
}
|
|
261
|
-
//#endregion
|
|
262
261
|
export { activeSessionsAtom, bumpActiveSessionActivity, getActiveSession, getAllActiveSessions, getAllProjectActivity, getSessionsByActivity, getSessionsForNavbar, getSessionsForProject, getTotalRunningSessionCount, hasBackgroundRunningSessions, registerActiveSession, resetActiveSessions, setActiveSessionAttention, setActiveSessionConnection, setActiveSessionError, setActiveSessionRunning, setForegroundActiveSession, unregisterActiveSession, updateActiveSessionMeta, useActiveSession, useActiveSessions, useActiveSessionsState, useHasBackgroundRunningSessions, useNavbarSessions, useProjectActivity, useProjectSessions, useSessionsByActivity, useTotalRunningSessions };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { SessionMessage } from "../types/message.js";
|
|
2
2
|
import { SessionPart } from "../types/parts.js";
|
|
3
|
-
//#region src/stores/chat-store.d.ts
|
|
4
3
|
/** Ordered list of messages in the current chat session. */
|
|
5
4
|
export declare const messagesAtom: import("nanostores").PreinitializedWritableAtom<SessionMessage[]> & object;
|
|
6
5
|
/** Map of message ID → parts for that message. */
|
|
@@ -10,5 +9,4 @@ export declare const isStreamingAtom: import("nanostores").PreinitializedWritabl
|
|
|
10
9
|
export declare function addMessage(msg: SessionMessage): void;
|
|
11
10
|
export declare function addParts(messageId: string, parts: SessionPart[]): void;
|
|
12
11
|
export declare function updatePart(messageId: string, partIndex: number, part: SessionPart): void;
|
|
13
|
-
export declare function clearChat(): void;
|
|
14
|
-
//#endregion
|
|
12
|
+
export declare function clearChat(): void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { atom, map } from "nanostores";
|
|
2
|
-
|
|
2
|
+
// src/stores/chat-store.ts
|
|
3
3
|
/** Ordered list of messages in the current chat session. */
|
|
4
4
|
const messagesAtom = atom([]);
|
|
5
5
|
/** Map of message ID → parts for that message. */
|
|
@@ -29,5 +29,4 @@ function clearChat() {
|
|
|
29
29
|
isStreamingAtom.set(false);
|
|
30
30
|
insertionCounter = 0;
|
|
31
31
|
}
|
|
32
|
-
//#endregion
|
|
33
32
|
export { addMessage, addParts, clearChat, isStreamingAtom, messagesAtom, partMapAtom, updatePart };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ToolPart } from "../types/parts.js";
|
|
2
|
-
//#region src/tool-previews/command-preview.d.ts
|
|
3
2
|
export interface CommandPreviewProps {
|
|
4
3
|
part: ToolPart;
|
|
5
4
|
/**
|
|
@@ -20,5 +19,4 @@ export interface CommandPreviewProps {
|
|
|
20
19
|
* `data-theme="dark"`, so stderr, the badges and the muted prompt keep the
|
|
21
20
|
* contrast they were designed with on a dark ground, in a light console too.
|
|
22
21
|
*/
|
|
23
|
-
export declare const CommandPreview: import("react").MemoExoticComponent<({ part, defaultExpanded, className }: CommandPreviewProps) => import("react").JSX.Element>;
|
|
24
|
-
//#endregion
|
|
22
|
+
export declare const CommandPreview: import("react").MemoExoticComponent<({ part, defaultExpanded, className }: CommandPreviewProps) => import("react").JSX.Element>;
|
|
@@ -3,7 +3,7 @@ import { cn } from "../lib/utils.js";
|
|
|
3
3
|
import { memo, useId, useLayoutEffect, useRef, useState } from "react";
|
|
4
4
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
import { ChevronDown, ChevronRight, Loader2 } from "lucide-react";
|
|
6
|
-
|
|
6
|
+
// src/tool-previews/command-preview.tsx
|
|
7
7
|
/** The input keys a shell tool names its command under. */
|
|
8
8
|
const COMMAND_KEYS = [
|
|
9
9
|
"command",
|
|
@@ -271,5 +271,4 @@ const CommandPreview = memo(({ part, defaultExpanded = false, className }) => {
|
|
|
271
271
|
});
|
|
272
272
|
});
|
|
273
273
|
CommandPreview.displayName = "CommandPreview";
|
|
274
|
-
//#endregion
|
|
275
274
|
export { CommandPreview, commandOf, extractCommandOutput };
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { ToolPart } from "../types/parts.js";
|
|
2
|
-
//#region src/tool-previews/diff-preview.d.ts
|
|
3
2
|
export interface DiffPreviewProps {
|
|
4
3
|
part: ToolPart;
|
|
5
4
|
}
|
|
6
|
-
export declare const DiffPreview: import("react").MemoExoticComponent<({ part }: DiffPreviewProps) => import("react").JSX.Element>;
|
|
7
|
-
//#endregion
|
|
5
|
+
export declare const DiffPreview: import("react").MemoExoticComponent<({ part }: DiffPreviewProps) => import("react").JSX.Element>;
|
|
@@ -3,7 +3,7 @@ import { PreviewCard, PreviewEmpty, PreviewError, PreviewLoading } from "./previ
|
|
|
3
3
|
import { memo } from "react";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
import { GitCompareArrows } from "lucide-react";
|
|
6
|
-
|
|
6
|
+
// src/tool-previews/diff-preview.tsx
|
|
7
7
|
function extractString(record, ...keys) {
|
|
8
8
|
for (const key of keys) {
|
|
9
9
|
const value = record[key];
|
|
@@ -72,5 +72,4 @@ const DiffPreview = memo(({ part }) => {
|
|
|
72
72
|
});
|
|
73
73
|
});
|
|
74
74
|
DiffPreview.displayName = "DiffPreview";
|
|
75
|
-
//#endregion
|
|
76
75
|
export { DiffPreview };
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { ToolPart } from "../types/parts.js";
|
|
2
|
-
//#region src/tool-previews/glob-results-preview.d.ts
|
|
3
2
|
export interface GlobResultsPreviewProps {
|
|
4
3
|
part: ToolPart;
|
|
5
4
|
}
|
|
6
|
-
export declare const GlobResultsPreview: import("react").MemoExoticComponent<({ part }: GlobResultsPreviewProps) => import("react").JSX.Element>;
|
|
7
|
-
//#endregion
|
|
5
|
+
export declare const GlobResultsPreview: import("react").MemoExoticComponent<({ part }: GlobResultsPreviewProps) => import("react").JSX.Element>;
|
|
@@ -2,7 +2,7 @@ import { PreviewCard, PreviewEmpty, PreviewError, PreviewLoading } from "./previ
|
|
|
2
2
|
import { memo, useMemo } from "react";
|
|
3
3
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
4
|
import { FileText, FolderOpen } from "lucide-react";
|
|
5
|
-
|
|
5
|
+
// src/tool-previews/glob-results-preview.tsx
|
|
6
6
|
function coerceString(value) {
|
|
7
7
|
return typeof value === "string" && value.trim() ? value : void 0;
|
|
8
8
|
}
|
|
@@ -49,5 +49,4 @@ const GlobResultsPreview = memo(({ part }) => {
|
|
|
49
49
|
});
|
|
50
50
|
});
|
|
51
51
|
GlobResultsPreview.displayName = "GlobResultsPreview";
|
|
52
|
-
//#endregion
|
|
53
52
|
export { GlobResultsPreview };
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { ToolPart } from "../types/parts.js";
|
|
2
|
-
//#region src/tool-previews/grep-results-preview.d.ts
|
|
3
2
|
export interface GrepResultsPreviewProps {
|
|
4
3
|
part: ToolPart;
|
|
5
4
|
}
|
|
6
|
-
export declare const GrepResultsPreview: import("react").MemoExoticComponent<({ part }: GrepResultsPreviewProps) => import("react").JSX.Element>;
|
|
7
|
-
//#endregion
|
|
5
|
+
export declare const GrepResultsPreview: import("react").MemoExoticComponent<({ part }: GrepResultsPreviewProps) => import("react").JSX.Element>;
|
|
@@ -2,7 +2,7 @@ import { PreviewCard, PreviewEmpty, PreviewError, PreviewLoading } from "./previ
|
|
|
2
2
|
import { memo, useMemo } from "react";
|
|
3
3
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
4
|
import { Search } from "lucide-react";
|
|
5
|
-
|
|
5
|
+
// src/tool-previews/grep-results-preview.tsx
|
|
6
6
|
function coerceString(value) {
|
|
7
7
|
return typeof value === "string" && value.trim() ? value : void 0;
|
|
8
8
|
}
|
|
@@ -95,5 +95,4 @@ const GrepResultsPreview = memo(({ part }) => {
|
|
|
95
95
|
});
|
|
96
96
|
});
|
|
97
97
|
GrepResultsPreview.displayName = "GrepResultsPreview";
|
|
98
|
-
//#endregion
|
|
99
98
|
export { GrepResultsPreview };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { cn } from "../lib/utils.js";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { Loader2 } from "lucide-react";
|
|
4
|
-
|
|
4
|
+
// src/tool-previews/preview-primitives.tsx
|
|
5
5
|
function PreviewCard({ icon, title, description, meta, children, className }) {
|
|
6
6
|
return /* @__PURE__ */ jsxs("div", {
|
|
7
7
|
className: cn("overflow-hidden rounded-[var(--radius-lg)] border border-border bg-card shadow-[var(--shadow-card)]", className),
|
|
@@ -54,5 +54,4 @@ function PreviewLoading({ label = "Running…" }) {
|
|
|
54
54
|
children: [/* @__PURE__ */ jsx(Loader2, { className: "h-4 w-4 animate-spin text-primary" }), /* @__PURE__ */ jsx("span", { children: label })]
|
|
55
55
|
});
|
|
56
56
|
}
|
|
57
|
-
//#endregion
|
|
58
57
|
export { PreviewCard, PreviewEmpty, PreviewError, PreviewLoading };
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { ToolPart } from "../types/parts.js";
|
|
2
|
-
//#region src/tool-previews/question-preview.d.ts
|
|
3
2
|
export interface QuestionPreviewProps {
|
|
4
3
|
part: ToolPart;
|
|
5
4
|
}
|
|
6
|
-
export declare const QuestionPreview: import("react").MemoExoticComponent<({ part }: QuestionPreviewProps) => import("react").JSX.Element>;
|
|
7
|
-
//#endregion
|
|
5
|
+
export declare const QuestionPreview: import("react").MemoExoticComponent<({ part }: QuestionPreviewProps) => import("react").JSX.Element>;
|
|
@@ -2,7 +2,7 @@ import { PreviewCard, PreviewEmpty, PreviewError, PreviewLoading } from "./previ
|
|
|
2
2
|
import { memo, useMemo } from "react";
|
|
3
3
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
4
|
import { MessageSquareQuote } from "lucide-react";
|
|
5
|
-
|
|
5
|
+
// src/tool-previews/question-preview.tsx
|
|
6
6
|
function toQuestionList(input) {
|
|
7
7
|
if (!input) return [];
|
|
8
8
|
if (typeof input === "string") return [input];
|
|
@@ -59,5 +59,4 @@ const QuestionPreview = memo(({ part }) => {
|
|
|
59
59
|
});
|
|
60
60
|
});
|
|
61
61
|
QuestionPreview.displayName = "QuestionPreview";
|
|
62
|
-
//#endregion
|
|
63
62
|
export { QuestionPreview };
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { ToolPart } from "../types/parts.js";
|
|
2
|
-
//#region src/tool-previews/web-search-preview.d.ts
|
|
3
2
|
export interface WebSearchPreviewProps {
|
|
4
3
|
part: ToolPart;
|
|
5
4
|
}
|
|
6
|
-
export declare const WebSearchPreview: import("react").MemoExoticComponent<({ part }: WebSearchPreviewProps) => import("react").JSX.Element>;
|
|
7
|
-
//#endregion
|
|
5
|
+
export declare const WebSearchPreview: import("react").MemoExoticComponent<({ part }: WebSearchPreviewProps) => import("react").JSX.Element>;
|
|
@@ -3,7 +3,7 @@ import { PreviewCard, PreviewEmpty, PreviewError, PreviewLoading } from "./previ
|
|
|
3
3
|
import { memo, useMemo } from "react";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
import { Globe } from "lucide-react";
|
|
6
|
-
|
|
6
|
+
// src/tool-previews/web-search-preview.tsx
|
|
7
7
|
function coerceString(value) {
|
|
8
8
|
return typeof value === "string" && value.trim() ? value : void 0;
|
|
9
9
|
}
|
|
@@ -74,5 +74,4 @@ const WebSearchPreview = memo(({ part }) => {
|
|
|
74
74
|
});
|
|
75
75
|
});
|
|
76
76
|
WebSearchPreview.displayName = "WebSearchPreview";
|
|
77
|
-
//#endregion
|
|
78
77
|
export { WebSearchPreview };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ToolPart } from "../types/parts.js";
|
|
2
|
-
//#region src/tool-previews/write-file-preview.d.ts
|
|
3
2
|
export interface WriteFilePreviewProps {
|
|
4
3
|
part: ToolPart;
|
|
5
4
|
}
|
|
@@ -7,5 +6,4 @@ export interface WriteFilePreviewProps {
|
|
|
7
6
|
* Preview for file write/create operations.
|
|
8
7
|
* Shows file path, line count, and the written content.
|
|
9
8
|
*/
|
|
10
|
-
export declare const WriteFilePreview: import("react").MemoExoticComponent<({ part }: WriteFilePreviewProps) => import("react").JSX.Element | null>;
|
|
11
|
-
//#endregion
|
|
9
|
+
export declare const WriteFilePreview: import("react").MemoExoticComponent<({ part }: WriteFilePreviewProps) => import("react").JSX.Element | null>;
|
|
@@ -4,7 +4,7 @@ import { PreviewCard, PreviewError, PreviewLoading } from "./preview-primitives.
|
|
|
4
4
|
import { memo } from "react";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
import { FileEdit } from "lucide-react";
|
|
7
|
-
|
|
7
|
+
// src/tool-previews/write-file-preview.tsx
|
|
8
8
|
function extractWriteContent(input) {
|
|
9
9
|
if (!input || typeof input !== "object") return null;
|
|
10
10
|
const obj = input;
|
|
@@ -48,5 +48,4 @@ const WriteFilePreview = memo(({ part }) => {
|
|
|
48
48
|
});
|
|
49
49
|
});
|
|
50
50
|
WriteFilePreview.displayName = "WriteFilePreview";
|
|
51
|
-
//#endregion
|
|
52
51
|
export { WriteFilePreview };
|
package/dist/types/branding.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/types/branding.d.ts
|
|
2
1
|
/** Visual branding for a run group header — injected by consuming app. */
|
|
3
2
|
export interface AgentBranding {
|
|
4
3
|
label: string;
|
|
@@ -9,5 +8,4 @@ export interface AgentBranding {
|
|
|
9
8
|
/** CSS class for the agent icon (legacy). Ignored when using lucide-react icons. */
|
|
10
9
|
iconClass: string;
|
|
11
10
|
textClass: string;
|
|
12
|
-
}
|
|
13
|
-
//#endregion
|
|
11
|
+
}
|
package/dist/types/message.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/types/message.d.ts
|
|
2
1
|
/** A single message in a chat session. */
|
|
3
2
|
export interface SessionMessage {
|
|
4
3
|
id: string;
|
|
@@ -30,5 +29,4 @@ export interface ChatAuthor {
|
|
|
30
29
|
role?: string;
|
|
31
30
|
/** Falls back to initials when absent or when the image fails to load. */
|
|
32
31
|
avatarUrl?: string;
|
|
33
|
-
}
|
|
34
|
-
//#endregion
|
|
32
|
+
}
|
package/dist/types/parts.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/types/parts.d.ts
|
|
2
1
|
export interface TextPart {
|
|
3
2
|
type: 'text';
|
|
4
3
|
text: string;
|
|
@@ -32,5 +31,4 @@ export interface ReasoningPart {
|
|
|
32
31
|
text: string;
|
|
33
32
|
time?: ToolTime;
|
|
34
33
|
}
|
|
35
|
-
export type SessionPart = TextPart | ToolPart | ReasoningPart;
|
|
36
|
-
//#endregion
|
|
34
|
+
export type SessionPart = TextPart | ToolPart | ReasoningPart;
|
package/dist/types/run.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { SessionMessage } from "./message.js";
|
|
2
|
-
//#region src/types/run.d.ts
|
|
3
2
|
/** Broad category of a tool invocation, used for display grouping. */
|
|
4
3
|
export type ToolCategory = "command" | "write" | "read" | "search" | "edit" | "task" | "web" | "todo" | "other";
|
|
5
4
|
export interface RunStats {
|
|
@@ -36,5 +35,4 @@ export interface MessageUser {
|
|
|
36
35
|
type: "user";
|
|
37
36
|
message: SessionMessage;
|
|
38
37
|
}
|
|
39
|
-
export type GroupedMessage = MessageRun | MessageUser;
|
|
40
|
-
//#endregion
|
|
38
|
+
export type GroupedMessage = MessageRun | MessageUser;
|