@tangle-network/ui 11.43.0 → 11.44.1
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/_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 +4 -5
- 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 +1 -3
- package/dist/files/file-tabs.js +1 -2
- 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 +1 -2
- 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 +8 -6
- package/dist/primitives/settings.js +13 -8
- 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 +1 -2
- 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/primitives/settings.stories.tsx +37 -0
- package/src/primitives/settings.tsx +17 -8
|
@@ -2,7 +2,6 @@ import { ArtifactPaneProps } from "../primitives/artifact-pane.js";
|
|
|
2
2
|
import { DocumentEditorBackend, DocumentEditorMode, DocumentEditorPaneCollaborationConfig } from "../editor/document-editor-pane.js";
|
|
3
3
|
import { FilePreviewProps } from "./file-preview.js";
|
|
4
4
|
import { FileTabData } from "./file-tabs.js";
|
|
5
|
-
//#region src/files/file-artifact-pane.d.ts
|
|
6
5
|
export interface FileArtifactPaneEditorOptions {
|
|
7
6
|
enabled?: boolean;
|
|
8
7
|
/** Persisted baseline when content is the current draft. */
|
|
@@ -45,5 +44,4 @@ export interface FileArtifactPaneProps extends Omit<FilePreviewProps, "className
|
|
|
45
44
|
* PDF, video, audio, CSV, spreadsheet, markdown, code, text) renders here too;
|
|
46
45
|
* `onDownload` drives both the header button and the body's download cards.
|
|
47
46
|
*/
|
|
48
|
-
export declare function FileArtifactPane({ filename, content, blobUrl, mimeType, size, onClose, onDownload, urlTransform, path, tabs, activeTabId, onTabSelect, onTabClose, eyebrow, meta, toolbar, footer, className, headerClassName, hideTitleBlock, editor }: FileArtifactPaneProps): import("react").JSX.Element;
|
|
49
|
-
//#endregion
|
|
47
|
+
export declare function FileArtifactPane({ filename, content, blobUrl, mimeType, size, onClose, onDownload, urlTransform, path, tabs, activeTabId, onTabSelect, onTabClose, eyebrow, meta, toolbar, footer, className, headerClassName, hideTitleBlock, editor }: FileArtifactPaneProps): import("react").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import "../lib/focus.js";
|
|
2
2
|
import { ArtifactPane } from "../primitives/artifact-pane.js";
|
|
3
3
|
import { detectFileFormat } from "./file-format.js";
|
|
4
4
|
import { FilePreview } from "./file-preview.js";
|
|
@@ -6,7 +6,7 @@ import { FileTabs } from "./file-tabs.js";
|
|
|
6
6
|
import { Suspense, lazy } from "react";
|
|
7
7
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
8
8
|
import { Download, X } from "lucide-react";
|
|
9
|
-
|
|
9
|
+
// src/files/file-artifact-pane.tsx
|
|
10
10
|
const LazyDocumentEditorPane = lazy(async () => {
|
|
11
11
|
return { default: (await import("../editor/document-editor-pane.js")).DocumentEditorPane };
|
|
12
12
|
});
|
|
@@ -28,13 +28,13 @@ function FileArtifactPane({ filename, content, blobUrl, mimeType, size, onClose,
|
|
|
28
28
|
type: "button",
|
|
29
29
|
"aria-label": `Download ${filename}`,
|
|
30
30
|
onClick: onDownload,
|
|
31
|
-
className: `rounded-[var(--radius-sm)] p-1.5 text-muted-foreground transition-colors hover:bg-accent hover:text-foreground
|
|
31
|
+
className: `rounded-[var(--radius-sm)] p-1.5 text-muted-foreground transition-colors hover:bg-accent hover:text-foreground focus-visible:outline-1 focus-visible:outline-[var(--focus-border)] focus-visible:ring-4 focus-visible:ring-[var(--focus-halo)] focus-visible:outline-offset-0`,
|
|
32
32
|
children: /* @__PURE__ */ jsx(Download, { className: "h-4 w-4" })
|
|
33
33
|
}), onClose && /* @__PURE__ */ jsx("button", {
|
|
34
34
|
type: "button",
|
|
35
35
|
"aria-label": `Close ${filename}`,
|
|
36
36
|
onClick: onClose,
|
|
37
|
-
className: `rounded-[var(--radius-sm)] p-1.5 text-muted-foreground transition-colors hover:bg-accent hover:text-foreground
|
|
37
|
+
className: `rounded-[var(--radius-sm)] p-1.5 text-muted-foreground transition-colors hover:bg-accent hover:text-foreground focus-visible:outline-1 focus-visible:outline-[var(--focus-border)] focus-visible:ring-4 focus-visible:ring-[var(--focus-halo)] focus-visible:outline-offset-0`,
|
|
38
38
|
children: /* @__PURE__ */ jsx(X, { className: "h-4 w-4" })
|
|
39
39
|
})] }) : void 0;
|
|
40
40
|
if (isEditableMarkdown) return /* @__PURE__ */ jsx(Suspense, {
|
|
@@ -111,5 +111,4 @@ function FileArtifactPane({ filename, content, blobUrl, mimeType, size, onClose,
|
|
|
111
111
|
})
|
|
112
112
|
});
|
|
113
113
|
}
|
|
114
|
-
//#endregion
|
|
115
114
|
export { FileArtifactPane };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import "../primitives/icon-tile.js";
|
|
2
2
|
import * as React from "react";
|
|
3
|
-
//#region src/files/file-card.d.ts
|
|
4
3
|
/** Who added a file, as a reader of the list should see them. */
|
|
5
4
|
export interface FileUploader {
|
|
6
5
|
name: string;
|
|
@@ -26,5 +25,4 @@ export interface FileCardProps extends FileDetails, Omit<React.HTMLAttributes<HT
|
|
|
26
25
|
/** Further buttons after Download, such as Open or Delete. */
|
|
27
26
|
actions?: React.ReactNode;
|
|
28
27
|
}
|
|
29
|
-
export declare const FileCard: React.ForwardRefExoticComponent<FileCardProps & React.RefAttributes<HTMLDivElement>>;
|
|
30
|
-
//#endregion
|
|
28
|
+
export declare const FileCard: React.ForwardRefExoticComponent<FileCardProps & React.RefAttributes<HTMLDivElement>>;
|
package/dist/files/file-card.js
CHANGED
|
@@ -6,7 +6,7 @@ import { getFormatLabel, resolveFilePreviewKind } from "./file-format.js";
|
|
|
6
6
|
import * as React from "react";
|
|
7
7
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
8
8
|
import { Download, File, FileAudio, FileCode, FileImage, FileJson, FileSpreadsheet, FileText, FileVideo } from "lucide-react";
|
|
9
|
-
|
|
9
|
+
// src/files/file-card.tsx
|
|
10
10
|
/**
|
|
11
11
|
* FileCard — one file, described: its kind, name, size, date and uploader,
|
|
12
12
|
* with Download and any actions the host adds. FilePreview shows it for a file
|
|
@@ -158,5 +158,4 @@ const FileCard = React.forwardRef(({ filename, mimeType, size, date, uploader, d
|
|
|
158
158
|
]
|
|
159
159
|
}));
|
|
160
160
|
FileCard.displayName = "FileCard";
|
|
161
|
-
//#endregion
|
|
162
161
|
export { FactSeparator, FileCard, FileFacts, FileKindTile, uploaderLabel };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/files/file-format.d.ts
|
|
2
1
|
/**
|
|
3
2
|
* Shared file-format detection for every file surface — the preview pane, the
|
|
4
3
|
* artifact pane, and code rendering. Centralising extension/MIME → format logic
|
|
@@ -47,5 +46,4 @@ export declare function getSyntaxLanguage(filename: string): string | undefined;
|
|
|
47
46
|
* a MIME type on an extensionless file (where the extension can't reveal it);
|
|
48
47
|
* any other code format keys off the extension.
|
|
49
48
|
*/
|
|
50
|
-
export declare function getCodeLanguage(filename: string, format: FileFormat | FilePreviewKind): string | undefined;
|
|
51
|
-
//#endregion
|
|
49
|
+
export declare function getCodeLanguage(filename: string, format: FileFormat | FilePreviewKind): string | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/files/file-format.ts
|
|
2
2
|
const IMAGE_EXTENSIONS = [
|
|
3
3
|
"png",
|
|
4
4
|
"jpg",
|
|
@@ -156,5 +156,4 @@ function getCodeLanguage(filename, format) {
|
|
|
156
156
|
if (format === "json" || format === "yaml") return format;
|
|
157
157
|
return getSyntaxLanguage(filename);
|
|
158
158
|
}
|
|
159
|
-
//#endregion
|
|
160
159
|
export { detectFileFormat, fileExtension, getCodeLanguage, getFormatLabel, getSyntaxLanguage, resolveFilePreviewKind };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { FileDetails } from "./file-card.js";
|
|
2
2
|
import * as React from "react";
|
|
3
|
-
//#region src/files/file-list.d.ts
|
|
4
3
|
export interface FileListItem extends FileDetails {
|
|
5
4
|
/** Stable key, and what `activeId` matches. */
|
|
6
5
|
id: string;
|
|
@@ -21,5 +20,4 @@ export interface FileListProps<T extends FileListItem = FileListItem> extends Om
|
|
|
21
20
|
/** Shown in place of the list when `files` is empty. */
|
|
22
21
|
empty?: React.ReactNode;
|
|
23
22
|
}
|
|
24
|
-
export declare function FileList<T extends FileListItem>({ files, onOpen, onDownload, onDelete, activeId, empty, className, ...props }: FileListProps<T>): React.JSX.Element;
|
|
25
|
-
//#endregion
|
|
23
|
+
export declare function FileList<T extends FileListItem>({ files, onOpen, onDownload, onDelete, activeId, empty, className, ...props }: FileListProps<T>): React.JSX.Element;
|
package/dist/files/file-list.js
CHANGED
|
@@ -5,7 +5,7 @@ import { FactSeparator, FileFacts, FileKindTile, uploaderLabel } from "./file-ca
|
|
|
5
5
|
import "react";
|
|
6
6
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
import { Download, Trash2 } from "lucide-react";
|
|
8
|
-
|
|
8
|
+
// src/files/file-list.tsx
|
|
9
9
|
function FileList({ files, onOpen, onDownload, onDelete, activeId, empty = "No files yet.", className, ...props }) {
|
|
10
10
|
if (files.length === 0) return /* @__PURE__ */ jsx("div", {
|
|
11
11
|
className: cn("rounded-[var(--radius-md)] border border-border bg-card px-4 py-10 text-center text-sm text-muted-foreground", className),
|
|
@@ -84,5 +84,4 @@ function FileList({ files, onOpen, onDownload, onDelete, activeId, empty = "No f
|
|
|
84
84
|
})
|
|
85
85
|
});
|
|
86
86
|
}
|
|
87
|
-
//#endregion
|
|
88
87
|
export { FileList };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { UrlTransform } from "react-markdown";
|
|
2
|
-
//#region src/files/file-preview.d.ts
|
|
3
2
|
export interface FilePreviewProps {
|
|
4
3
|
filename: string;
|
|
5
4
|
content?: string;
|
|
@@ -23,5 +22,4 @@ export declare const CSV_PREVIEW_ROW_LIMIT = 500;
|
|
|
23
22
|
* a trailing line break add no row.
|
|
24
23
|
*/
|
|
25
24
|
export declare function parseCsv(content: string): string[][];
|
|
26
|
-
export declare function FilePreview({ filename, content, blobUrl, mimeType, size, urlTransform, onClose, onDownload, hideHeader, className }: FilePreviewProps): import("react").JSX.Element;
|
|
27
|
-
//#endregion
|
|
25
|
+
export declare function FilePreview({ filename, content, blobUrl, mimeType, size, urlTransform, onClose, onDownload, hideHeader, className }: FilePreviewProps): import("react").JSX.Element;
|
|
@@ -8,7 +8,7 @@ import { PdfViewer } from "./pdf-viewer.js";
|
|
|
8
8
|
import { useState } from "react";
|
|
9
9
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
10
|
import { Download, Music, X } from "lucide-react";
|
|
11
|
-
|
|
11
|
+
// src/files/file-preview.tsx
|
|
12
12
|
/**
|
|
13
13
|
* FilePreview — universal file renderer.
|
|
14
14
|
*
|
|
@@ -309,5 +309,4 @@ function FilePreview({ filename, content, blobUrl, mimeType, size, urlTransform,
|
|
|
309
309
|
})]
|
|
310
310
|
});
|
|
311
311
|
}
|
|
312
|
-
//#endregion
|
|
313
312
|
export { CSV_PREVIEW_ROW_LIMIT, FilePreview, parseCsv };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/files/file-tabs.d.ts
|
|
2
1
|
/**
|
|
3
2
|
* FileTabs — tab bar for open files in the preview panel.
|
|
4
3
|
*/
|
|
@@ -15,5 +14,4 @@ export interface FileTabsProps {
|
|
|
15
14
|
onClose: (id: string) => void;
|
|
16
15
|
className?: string;
|
|
17
16
|
}
|
|
18
|
-
export declare function FileTabs({ tabs, activeId, onSelect, onClose, className }: FileTabsProps): import("react").JSX.Element | null;
|
|
19
|
-
//#endregion
|
|
17
|
+
export declare function FileTabs({ tabs, activeId, onSelect, onClose, className }: FileTabsProps): import("react").JSX.Element | null;
|
package/dist/files/file-tabs.js
CHANGED
|
@@ -2,7 +2,7 @@ import { focusRing, focusRingInset } from "../lib/focus.js";
|
|
|
2
2
|
import { cn } from "../lib/utils.js";
|
|
3
3
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
4
|
import { FileCode, FileSpreadsheet, FileText, X } from "lucide-react";
|
|
5
|
-
|
|
5
|
+
// src/files/file-tabs.tsx
|
|
6
6
|
/**
|
|
7
7
|
* FileTabs — tab bar for open files in the preview panel.
|
|
8
8
|
*/
|
|
@@ -44,5 +44,4 @@ function FileTabs({ tabs, activeId, onSelect, onClose, className }) {
|
|
|
44
44
|
})
|
|
45
45
|
});
|
|
46
46
|
}
|
|
47
|
-
//#endregion
|
|
48
47
|
export { FileTabs };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/files/file-tree.d.ts
|
|
2
1
|
/**
|
|
3
2
|
* FileTree — directory browser with file type icons.
|
|
4
3
|
*
|
|
@@ -27,5 +26,4 @@ export interface FileTreeVisibilityOptions {
|
|
|
27
26
|
isVisible?: (node: FileNode) => boolean;
|
|
28
27
|
}
|
|
29
28
|
export declare function filterFileTree(root: FileNode, visibility?: FileTreeVisibilityOptions): FileNode | null;
|
|
30
|
-
export declare function FileTree({ root, selectedPath, onSelect, className, defaultExpanded, visibility }: FileTreeProps): import("react").JSX.Element | null;
|
|
31
|
-
//#endregion
|
|
29
|
+
export declare function FileTree({ root, selectedPath, onSelect, className, defaultExpanded, visibility }: FileTreeProps): import("react").JSX.Element | null;
|
package/dist/files/file-tree.js
CHANGED
|
@@ -2,7 +2,7 @@ import { cn } from "../lib/utils.js";
|
|
|
2
2
|
import { useState } from "react";
|
|
3
3
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
4
|
import { ChevronRight, File, FileCode, FileImage, FileJson, FileSpreadsheet, FileText, Folder, FolderOpen } from "lucide-react";
|
|
5
|
-
|
|
5
|
+
// src/files/file-tree.tsx
|
|
6
6
|
/**
|
|
7
7
|
* FileTree — directory browser with file type icons.
|
|
8
8
|
*
|
|
@@ -131,5 +131,4 @@ function FileTree({ root, selectedPath, onSelect, className, defaultExpanded = t
|
|
|
131
131
|
})
|
|
132
132
|
});
|
|
133
133
|
}
|
|
134
|
-
//#endregion
|
|
135
134
|
export { FileTree, filterFileTree };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import "pdfjs-dist";
|
|
2
|
-
//#region src/files/pdf-loader.d.ts
|
|
3
2
|
export interface PdfViewerConfig {
|
|
4
3
|
/**
|
|
5
4
|
* URL of `pdfjs-dist/legacy/build/pdf.worker.min.mjs` from the installed
|
|
@@ -18,5 +17,4 @@ export interface PdfViewerConfig {
|
|
|
18
17
|
* the first `PdfViewer` renders; a worker set afterwards applies only when no
|
|
19
18
|
* document has loaded the main-thread worker yet.
|
|
20
19
|
*/
|
|
21
|
-
export declare function configurePdfViewer(next: PdfViewerConfig): void;
|
|
22
|
-
//#endregion
|
|
20
|
+
export declare function configurePdfViewer(next: PdfViewerConfig): void;
|
package/dist/files/pdf-loader.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { isMissingPeerError, rethrow } from "../lib/optional-peer.js";
|
|
2
|
-
|
|
2
|
+
// src/files/pdf-loader.ts
|
|
3
3
|
let config = {};
|
|
4
4
|
/**
|
|
5
5
|
* Sets the page-wide pdf.js worker and asset locations. Call it once, before
|
|
@@ -78,5 +78,4 @@ function pdfAssetParams() {
|
|
|
78
78
|
iccUrl: `${base}iccs/`
|
|
79
79
|
};
|
|
80
80
|
}
|
|
81
|
-
//#endregion
|
|
82
81
|
export { MissingPdfjsError, asMissingPdfjsError, configurePdfViewer, isMissingPdfjsError, loadPdfjs, pdfAssetParams };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/files/pdf-viewer.d.ts
|
|
2
1
|
/**
|
|
3
2
|
* PdfViewer — renders a PDF's pages to canvas with pdf.js, so a document reads
|
|
4
3
|
* the same in every browser, phones included. A continuous column of pages
|
|
@@ -28,5 +27,4 @@ export interface PdfViewerProps {
|
|
|
28
27
|
/** Give the viewer a height; it scrolls its pages inside it. */
|
|
29
28
|
className?: string;
|
|
30
29
|
}
|
|
31
|
-
export declare function PdfViewer({ src, filename, size, onDownload, className }: PdfViewerProps): import("react").JSX.Element;
|
|
32
|
-
//#endregion
|
|
30
|
+
export declare function PdfViewer({ src, filename, size, onDownload, className }: PdfViewerProps): import("react").JSX.Element;
|
package/dist/files/pdf-viewer.js
CHANGED
|
@@ -8,7 +8,7 @@ import { isMissingPdfjsError, loadPdfjs, pdfAssetParams } from "./pdf-loader.js"
|
|
|
8
8
|
import { memo, useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from "react";
|
|
9
9
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
10
10
|
import { ChevronLeft, ChevronRight, Download, Info, LoaderCircle, ZoomIn, ZoomOut } from "lucide-react";
|
|
11
|
-
|
|
11
|
+
// src/files/pdf-viewer.tsx
|
|
12
12
|
/**
|
|
13
13
|
* PdfViewer — renders a PDF's pages to canvas with pdf.js, so a document reads
|
|
14
14
|
* the same in every browser, phones included. A continuous column of pages
|
|
@@ -563,5 +563,4 @@ const PdfPage = memo(function PdfPage({ doc, pageNumber, pageCount, zoom, placeh
|
|
|
563
563
|
})]
|
|
564
564
|
});
|
|
565
565
|
});
|
|
566
|
-
//#endregion
|
|
567
566
|
export { PdfViewer };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { FileNode } from "./file-tree.js";
|
|
2
2
|
import { CSSProperties, ReactNode } from "react";
|
|
3
3
|
import { ContextMenuItem, ContextMenuOpenContext, GitStatus, GitStatusEntry } from "@pierre/trees";
|
|
4
|
-
//#region src/files/rich-file-tree.d.ts
|
|
5
4
|
/**
|
|
6
5
|
* Re-export Pierre's git-status union under a stable name so consumers
|
|
7
6
|
* don't import directly from the dep. If we ever swap the underlying
|
|
@@ -58,5 +57,4 @@ export interface RichFileTreeThemeVars {
|
|
|
58
57
|
/** Muted (parent path, breadcrumb) foreground. */
|
|
59
58
|
mutedFg: string;
|
|
60
59
|
}
|
|
61
|
-
export declare function RichFileTree({ root, paths, selectedPath, onSelect, search, initialExpansion, gitStatus, renderContextMenu, header, themeOverrides, className, style, height }: RichFileTreeProps): import("react").JSX.Element;
|
|
62
|
-
//#endregion
|
|
60
|
+
export declare function RichFileTree({ root, paths, selectedPath, onSelect, search, initialExpansion, gitStatus, renderContextMenu, header, themeOverrides, className, style, height }: RichFileTreeProps): import("react").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useEffect, useMemo, useRef } from "react";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
import { FileTree, useFileTree } from "@pierre/trees/react";
|
|
4
|
-
|
|
4
|
+
// src/files/rich-file-tree.tsx
|
|
5
5
|
/**
|
|
6
6
|
* RichFileTree — feature-rich file browser built on @pierre/trees.
|
|
7
7
|
*
|
|
@@ -141,5 +141,4 @@ function RichFileTree({ root, paths, selectedPath, onSelect, search = true, init
|
|
|
141
141
|
style: themeStyle
|
|
142
142
|
});
|
|
143
143
|
}
|
|
144
|
-
//#endregion
|
|
145
144
|
export { RichFileTree };
|
package/dist/hooks/use-auth.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/hooks/use-auth.d.ts
|
|
2
1
|
export interface AuthUser {
|
|
3
2
|
customer_id: string;
|
|
4
3
|
email: string;
|
|
@@ -36,5 +35,4 @@ export declare function createAuthFetcher(_apiBaseUrl: string): <T = unknown>(ur
|
|
|
36
35
|
* Hook to get the API key from localStorage.
|
|
37
36
|
* For backwards compatibility with API key-based auth.
|
|
38
37
|
*/
|
|
39
|
-
export declare function useApiKey(): string | null;
|
|
40
|
-
//#endregion
|
|
38
|
+
export declare function useApiKey(): string | null;
|
package/dist/hooks/use-auth.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import * as React from "react";
|
|
3
|
-
|
|
3
|
+
// src/hooks/use-auth.ts
|
|
4
4
|
/**
|
|
5
5
|
* Hook for managing authentication state.
|
|
6
6
|
* Fetches user session from the API and provides loading/error states.
|
|
@@ -87,5 +87,4 @@ function useApiKey() {
|
|
|
87
87
|
}, []);
|
|
88
88
|
return apiKey;
|
|
89
89
|
}
|
|
90
|
-
//#endregion
|
|
91
90
|
export { createAuthFetcher, useApiKey, useAuth };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { RefObject } from "react";
|
|
2
|
-
//#region src/hooks/use-auto-scroll.d.ts
|
|
3
2
|
/**
|
|
4
3
|
* Scroll-to-bottom behaviour: sticks to the bottom while streaming,
|
|
5
4
|
* pauses when user scrolls up, resumes when user scrolls back down.
|
|
@@ -7,5 +6,4 @@ import { RefObject } from "react";
|
|
|
7
6
|
export declare function useAutoScroll(containerRef: RefObject<HTMLElement | null>, deps?: unknown[]): {
|
|
8
7
|
isAtBottom: boolean;
|
|
9
8
|
scrollToBottom: () => void;
|
|
10
|
-
};
|
|
11
|
-
//#endregion
|
|
9
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useCallback, useEffect, useRef, useState } from "react";
|
|
2
|
-
|
|
2
|
+
// src/hooks/use-auto-scroll.ts
|
|
3
3
|
const BOTTOM_THRESHOLD = 40;
|
|
4
4
|
/**
|
|
5
5
|
* Scroll-to-bottom behaviour: sticks to the bottom while streaming,
|
|
@@ -44,5 +44,4 @@ function useAutoScroll(containerRef, deps = []) {
|
|
|
44
44
|
}, [containerRef])
|
|
45
45
|
};
|
|
46
46
|
}
|
|
47
|
-
//#endregion
|
|
48
47
|
export { useAutoScroll };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/hooks/use-dropdown-menu.d.ts
|
|
2
1
|
interface UseDropdownMenuOptions {
|
|
3
2
|
closeOnEsc?: boolean;
|
|
4
3
|
}
|
|
@@ -9,4 +8,4 @@ export declare function useDropdownMenu(options?: UseDropdownMenuOptions): {
|
|
|
9
8
|
toggle: () => void;
|
|
10
9
|
close: () => void;
|
|
11
10
|
};
|
|
12
|
-
|
|
11
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useEffect, useRef, useState } from "react";
|
|
2
|
-
|
|
2
|
+
// src/hooks/use-dropdown-menu.ts
|
|
3
3
|
function useDropdownMenu(options) {
|
|
4
4
|
const closeOnEsc = options?.closeOnEsc ?? true;
|
|
5
5
|
const [open, setOpen] = useState(false);
|
|
@@ -27,5 +27,4 @@ function useDropdownMenu(options) {
|
|
|
27
27
|
close: () => setOpen(false)
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
|
-
//#endregion
|
|
31
30
|
export { useDropdownMenu };
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
//#region src/hooks/use-live-time.d.ts
|
|
2
1
|
/**
|
|
3
2
|
* Returns `Date.now()` and re-renders every `intervalMs` so derived
|
|
4
3
|
* values like "uptime" tick forward without polling upstream data.
|
|
5
4
|
*/
|
|
6
|
-
export declare function useLiveTime(intervalMs?: number): number;
|
|
7
|
-
//#endregion
|
|
5
|
+
export declare function useLiveTime(intervalMs?: number): number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import * as React from "react";
|
|
3
|
-
|
|
3
|
+
// src/hooks/use-live-time.ts
|
|
4
4
|
/**
|
|
5
5
|
* Returns `Date.now()` and re-renders every `intervalMs` so derived
|
|
6
6
|
* values like "uptime" tick forward without polling upstream data.
|
|
@@ -18,5 +18,4 @@ function useLiveTime(intervalMs = 1e3) {
|
|
|
18
18
|
}, [intervalMs]);
|
|
19
19
|
return now;
|
|
20
20
|
}
|
|
21
|
-
//#endregion
|
|
22
21
|
export { useLiveTime };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { SdkSessionEvent } from "./use-sdk-session.js";
|
|
2
2
|
import { ActiveSessionConnectionState, ActiveSessionTransportMode, RegisterActiveSessionOptions } from "../stores/active-sessions-store.js";
|
|
3
|
-
//#region src/hooks/use-realtime-session.d.ts
|
|
4
3
|
export interface RealtimeSessionOptions extends RegisterActiveSessionOptions {
|
|
5
4
|
connectUrl?: string | null;
|
|
6
5
|
enabled?: boolean;
|
|
@@ -28,5 +27,4 @@ export interface RealtimeSessionRegistryProps {
|
|
|
28
27
|
sessions: RealtimeSessionTarget[];
|
|
29
28
|
}
|
|
30
29
|
export declare function useRealtimeSession({ sessionId, projectId, projectLabel, title, href, metadata, connectUrl, enabled, foreground, keepRegistered, reconnect, reconnectIntervalMs, maxReconnectAttempts, transportMode, onEvent, onOpen, onClose, onError }: RealtimeSessionOptions): RealtimeSessionState;
|
|
31
|
-
export declare function RealtimeSessionRegistry({ sessions }: RealtimeSessionRegistryProps): import("react").FunctionComponentElement<RealtimeSessionTarget>[];
|
|
32
|
-
//#endregion
|
|
30
|
+
export declare function RealtimeSessionRegistry({ sessions }: RealtimeSessionRegistryProps): import("react").FunctionComponentElement<RealtimeSessionTarget>[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { bumpActiveSessionActivity, registerActiveSession, setActiveSessionAttention, setActiveSessionConnection, setActiveSessionError, setActiveSessionRunning, setForegroundActiveSession, unregisterActiveSession, updateActiveSessionMeta } from "../stores/active-sessions-store.js";
|
|
2
2
|
import { createElement, useEffect, useMemo, useRef, useState } from "react";
|
|
3
|
-
|
|
3
|
+
// src/hooks/use-realtime-session.ts
|
|
4
4
|
function parseEvent(message) {
|
|
5
5
|
try {
|
|
6
6
|
const parsed = JSON.parse(message);
|
|
@@ -231,5 +231,4 @@ function RealtimeSessionRegistry({ sessions }) {
|
|
|
231
231
|
...session
|
|
232
232
|
}));
|
|
233
233
|
}
|
|
234
|
-
//#endregion
|
|
235
234
|
export { RealtimeSessionRegistry, useRealtimeSession };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Run } from "../types/run.js";
|
|
2
|
-
//#region src/hooks/use-run-collapse-state.d.ts
|
|
3
2
|
/**
|
|
4
3
|
* Manages per-run collapse state with auto-collapse after run completion.
|
|
5
4
|
*
|
|
@@ -9,5 +8,4 @@ import { Run } from "../types/run.js";
|
|
|
9
8
|
export declare function useRunCollapseState(runs: Run[]): {
|
|
10
9
|
isCollapsed: (runId: string) => boolean;
|
|
11
10
|
toggleCollapse: (runId: string) => void;
|
|
12
|
-
};
|
|
13
|
-
//#endregion
|
|
11
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useCallback, useState } from "react";
|
|
2
|
-
|
|
2
|
+
// src/hooks/use-run-collapse-state.ts
|
|
3
3
|
/**
|
|
4
4
|
* Manages per-run collapse state with auto-collapse after run completion.
|
|
5
5
|
*
|
|
@@ -20,5 +20,4 @@ function useRunCollapseState(runs) {
|
|
|
20
20
|
}, [])
|
|
21
21
|
};
|
|
22
22
|
}
|
|
23
|
-
//#endregion
|
|
24
23
|
export { useRunCollapseState };
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { SessionMessage } from "../types/message.js";
|
|
2
2
|
import { SessionPart } from "../types/parts.js";
|
|
3
3
|
import { GroupedMessage } from "../types/run.js";
|
|
4
|
-
//#region src/hooks/use-run-groups.d.ts
|
|
5
4
|
export interface UseRunGroupsOptions {
|
|
6
5
|
messages: SessionMessage[];
|
|
7
6
|
partMap: Record<string, SessionPart[]>;
|
|
8
7
|
isStreaming: boolean;
|
|
9
8
|
}
|
|
10
|
-
export declare function useRunGroups({ messages, partMap, isStreaming }: UseRunGroupsOptions): GroupedMessage[];
|
|
11
|
-
//#endregion
|
|
9
|
+
export declare function useRunGroups({ messages, partMap, isStreaming }: UseRunGroupsOptions): GroupedMessage[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getToolCategory } from "../utils/tool-display.js";
|
|
2
2
|
import { useMemo } from "react";
|
|
3
|
-
|
|
3
|
+
// src/hooks/use-run-groups.ts
|
|
4
4
|
function computeRunStats(messages, partMap) {
|
|
5
5
|
const stats = {
|
|
6
6
|
toolCount: 0,
|
|
@@ -81,5 +81,4 @@ function useRunGroups({ messages, partMap, isStreaming }) {
|
|
|
81
81
|
isStreaming
|
|
82
82
|
]);
|
|
83
83
|
}
|
|
84
|
-
//#endregion
|
|
85
84
|
export { useRunGroups };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { SessionMessage } from "../types/message.js";
|
|
2
2
|
import { SessionPart } from "../types/parts.js";
|
|
3
|
-
//#region src/hooks/use-sdk-session.d.ts
|
|
4
3
|
export interface SdkSessionAttachment {
|
|
5
4
|
name: string;
|
|
6
5
|
size?: number;
|
|
@@ -55,5 +54,4 @@ export interface UseSdkSessionReturn {
|
|
|
55
54
|
setStreaming: (value: boolean) => void;
|
|
56
55
|
reset: () => void;
|
|
57
56
|
}
|
|
58
|
-
export declare function useSdkSession({ initialMessages }?: UseSdkSessionOptions): UseSdkSessionReturn;
|
|
59
|
-
//#endregion
|
|
57
|
+
export declare function useSdkSession({ initialMessages }?: UseSdkSessionOptions): UseSdkSessionReturn;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useCallback, useMemo, useRef, useState } from "react";
|
|
2
|
-
|
|
2
|
+
// src/hooks/use-sdk-session.ts
|
|
3
3
|
function uid() {
|
|
4
4
|
if (typeof globalThis.crypto !== "undefined" && typeof globalThis.crypto.randomUUID === "function") try {
|
|
5
5
|
return globalThis.crypto.randomUUID();
|
|
@@ -318,5 +318,4 @@ function useSdkSession({ initialMessages = [] } = {}) {
|
|
|
318
318
|
reset
|
|
319
319
|
};
|
|
320
320
|
}
|
|
321
|
-
//#endregion
|
|
322
321
|
export { useSdkSession };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/hooks/use-sse-stream.d.ts
|
|
2
1
|
/**
|
|
3
2
|
* SSE Event data structure
|
|
4
3
|
*/
|
|
@@ -120,5 +119,4 @@ export interface BotStreamEvent {
|
|
|
120
119
|
type: "balance" | "trade" | "decision" | "log" | "error";
|
|
121
120
|
data: unknown;
|
|
122
121
|
timestamp: number;
|
|
123
|
-
}
|
|
124
|
-
//#endregion
|
|
122
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import * as React from "react";
|
|
3
|
-
|
|
3
|
+
// src/hooks/use-sse-stream.ts
|
|
4
4
|
/**
|
|
5
5
|
* React hook for consuming SSE streams with automatic reconnection,
|
|
6
6
|
* event buffering, and state management.
|
|
@@ -225,5 +225,4 @@ function useSSEStream(options) {
|
|
|
225
225
|
timeSinceLastEvent
|
|
226
226
|
};
|
|
227
227
|
}
|
|
228
|
-
//#endregion
|
|
229
228
|
export { useSSEStream };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { FeedSegment } from "../run/tool-call-feed.js";
|
|
2
|
-
//#region src/hooks/use-tool-call-stream.d.ts
|
|
3
2
|
export interface UseToolCallStreamReturn {
|
|
4
3
|
/** Current feed segments (text + tool calls interleaved) */
|
|
5
4
|
segments: FeedSegment[];
|
|
@@ -19,5 +18,4 @@ export interface UseToolCallStreamReturn {
|
|
|
19
18
|
/** Reset the stream */
|
|
20
19
|
reset: () => void;
|
|
21
20
|
}
|
|
22
|
-
export declare function useToolCallStream(): UseToolCallStreamReturn;
|
|
23
|
-
//#endregion
|
|
21
|
+
export declare function useToolCallStream(): UseToolCallStreamReturn;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { parseToolEvent } from "../run/tool-call-feed.js";
|
|
2
2
|
import { useCallback, useRef, useState } from "react";
|
|
3
|
-
|
|
3
|
+
// src/hooks/use-tool-call-stream.ts
|
|
4
4
|
/**
|
|
5
5
|
* useToolCallStream — parses SSE events into ToolCallFeed segments.
|
|
6
6
|
*
|
|
@@ -71,5 +71,4 @@ function useToolCallStream() {
|
|
|
71
71
|
}, [])
|
|
72
72
|
};
|
|
73
73
|
}
|
|
74
|
-
//#endregion
|
|
75
74
|
export { useToolCallStream };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import "shiki/core";
|
|
2
|
-
//#region src/lib/code-presentation.d.ts
|
|
3
2
|
export declare function codeBlockGrammar(language: string | undefined): string | undefined;
|
|
4
3
|
export interface TokenStyle {
|
|
5
4
|
color?: string;
|
|
@@ -88,5 +87,4 @@ export interface ApiField {
|
|
|
88
87
|
export declare function schemaRows(fields: readonly ApiField[], parent?: string, depth?: number): Array<ApiField & {
|
|
89
88
|
path: string;
|
|
90
89
|
depth: number;
|
|
91
|
-
}>;
|
|
92
|
-
//#endregion
|
|
90
|
+
}>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { tabsPresentation } from "../presentation.js";
|
|
2
|
-
|
|
2
|
+
// src/lib/code-presentation.ts
|
|
3
3
|
const SYNTAX = {
|
|
4
4
|
comment: "var(--syntax-comment, currentColor)",
|
|
5
5
|
keyword: "var(--syntax-keyword, currentColor)",
|
|
@@ -433,5 +433,4 @@ function schemaRows(fields, parent = "", depth = 0) {
|
|
|
433
433
|
}, ...schemaRows(field.children ?? [], path, depth + 1)];
|
|
434
434
|
});
|
|
435
435
|
}
|
|
436
|
-
//#endregion
|
|
437
436
|
export { LANGUAGE_NAMES, PLAIN_TEXT, SYNTAX, apiMetadataText, bindCodeTabs, bindCopyButton, codeBlockGrammar, codePreStyle, codePresentation, codeTextStyle, createCopyFeedback, highlightCode, interactionBudgets, schemaRows, tokenStyle, tokenize, writeClipboard };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { controlMotion } from "./motion.js";
|
|
2
|
-
//#region src/lib/control-presentation.d.ts
|
|
3
2
|
/**
|
|
4
3
|
* The control scale. Button, Input, Textarea and SelectTrigger take the same
|
|
5
4
|
* `sm | md | lg` sizes and read the same Brand tokens, so any row of controls
|
|
@@ -39,5 +38,4 @@ export declare const controlSizes: {
|
|
|
39
38
|
readonly touch: "h-11 min-h-11 min-w-11 px-4 py-2 text-base";
|
|
40
39
|
};
|
|
41
40
|
export declare const fieldPresentation: string;
|
|
42
|
-
//#endregion
|
|
43
41
|
export { controlMotion };
|