@tangle-network/ui 11.11.6 → 11.11.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/dist/{chat-DXidmE_w.js → chat-DDvF2oGQ.js} +9 -9
- package/dist/chat.d.ts +1 -1
- package/dist/chat.js +1 -1
- package/dist/{document-editor-pane-DrjsLZ3a.js → document-editor-pane-CsFbH2qo.js} +1 -1
- package/dist/editor.js +1 -1
- package/dist/{files-DDpeW_nO.js → files--Unn___t.js} +2 -2
- package/dist/files.js +1 -1
- package/dist/hooks.js +1 -1
- package/dist/{index-D-9c3r-Y.d.ts → index-Cs7j8V7l.d.ts} +1 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +8 -8
- package/dist/{markdown-PywkQXWk.js → markdown-Db08KAYF.js} +1 -1
- package/dist/markdown.js +1 -1
- package/dist/{openui-artifact-renderer-DjLPuaP9.js → openui-artifact-renderer-DG_i2lOR.js} +1 -1
- package/dist/openui.js +1 -1
- package/dist/{primitives-Cb8GGVKr.js → primitives-Bx59fT-U.js} +1 -1
- package/dist/primitives.js +1 -1
- package/dist/{run-group-COUIsZ_x.js → run-group-BWGeesgs.js} +2 -2
- package/dist/run.js +2 -2
- package/dist/sdk-hooks.js +1 -1
- package/dist/{tool-call-feed-DNADpFyJ.js → tool-call-feed-BpmMLpPX.js} +1 -1
- package/dist/{use-sse-stream-OOPpkt_E.js → use-sse-stream-DjqRuDft.js} +1 -1
- package/package.json +1 -1
- package/src/chat/chat-message.tsx +8 -8
- package/src/chat/user-message.test.tsx +3 -3
- package/src/chat/user-message.tsx +3 -4
- package/src/markdown/markdown.tsx +2 -1
- package/src/primitives/code-block.tsx +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @tangle-network/ui
|
|
2
2
|
|
|
3
|
+
## 11.11.8
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- dc29f33: Use semantic theme colors for inline code in Markdown and the InlineCode primitive.
|
|
8
|
+
|
|
9
|
+
## 11.11.7
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- cad5ba2: Use inverse theme colors for user messages and leave assistant prose unboxed across the shared chat renderers.
|
|
14
|
+
|
|
3
15
|
## 11.11.6
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -3,9 +3,9 @@ import { t as cn } from "./utils-C_uf36nf.js";
|
|
|
3
3
|
import { r as getToolDisplayMetadata } from "./tool-display-BAuAVa43.js";
|
|
4
4
|
import { n as useRunCollapseState, r as useRunGroups, t as useAutoScroll } from "./use-auto-scroll-C5Pjeqon.js";
|
|
5
5
|
import { n as ToolCallStep, t as ToolCallGroup } from "./tool-call-step-DNebqhmX.js";
|
|
6
|
-
import { t as Markdown } from "./markdown-
|
|
7
|
-
import { n as InlineThinkingItem, t as RunGroup } from "./run-group-
|
|
8
|
-
import { t as OpenUIArtifactRenderer } from "./openui-artifact-renderer-
|
|
6
|
+
import { t as Markdown } from "./markdown-Db08KAYF.js";
|
|
7
|
+
import { n as InlineThinkingItem, t as RunGroup } from "./run-group-BWGeesgs.js";
|
|
8
|
+
import { t as OpenUIArtifactRenderer } from "./openui-artifact-renderer-DG_i2lOR.js";
|
|
9
9
|
import { memo, useEffect, useMemo, useRef, useState } from "react";
|
|
10
10
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
11
11
|
import { AlertTriangle, ArrowDown, CheckCircle2, CircleDot, FileText, Info } from "lucide-react";
|
|
@@ -17,8 +17,7 @@ function formatTime$1(date) {
|
|
|
17
17
|
});
|
|
18
18
|
}
|
|
19
19
|
/**
|
|
20
|
-
* The single user message bubble
|
|
21
|
-
* semantic border (no loud fill, no uppercase label). The timestamp sits
|
|
20
|
+
* The single user message bubble uses inverse theme colors. The timestamp sits
|
|
22
21
|
* beside the bubble and appears on hover, so it costs no height. Used by both
|
|
23
22
|
* the run/message list (session-model `parts`) and AgentTimeline (direct
|
|
24
23
|
* `content`/`timestamp`).
|
|
@@ -31,13 +30,13 @@ const UserMessage = memo(({ message: _message, parts, content, timestamp, action
|
|
|
31
30
|
children: /* @__PURE__ */ jsxs("div", {
|
|
32
31
|
className: "group flex min-w-0 max-w-[78%] flex-col items-end gap-2",
|
|
33
32
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
34
|
-
className: "relative w-full min-w-0 rounded-2xl
|
|
33
|
+
className: "relative w-full min-w-0 rounded-2xl bg-foreground px-4 py-3 text-background",
|
|
35
34
|
children: [timestamp ? /* @__PURE__ */ jsx("span", {
|
|
36
35
|
"data-user-message-time": "",
|
|
37
36
|
className: "pointer-events-none absolute right-full top-1/2 mr-3 -translate-y-1/2 whitespace-nowrap text-[var(--font-size-xs)] text-muted-foreground opacity-0 transition-opacity group-hover:opacity-100",
|
|
38
37
|
children: formatTime$1(timestamp)
|
|
39
38
|
}) : null, /* @__PURE__ */ jsx("div", {
|
|
40
|
-
className: "break-words whitespace-pre-wrap text-[var(--font-size-base)] leading-[1.5]
|
|
39
|
+
className: "break-words whitespace-pre-wrap text-[var(--font-size-base)] leading-[1.5]",
|
|
41
40
|
children: text
|
|
42
41
|
})]
|
|
43
42
|
}), actions ? /* @__PURE__ */ jsx("div", {
|
|
@@ -639,6 +638,7 @@ ChatContainer.displayName = "ChatContainer";
|
|
|
639
638
|
//#region src/chat/chat-message.tsx
|
|
640
639
|
function ChatMessage({ role, content, toolCalls, isStreaming, timestamp, className, userLabel = "You", assistantLabel = "Agent", hideRoleLabel }) {
|
|
641
640
|
const isUser = role === "user";
|
|
641
|
+
const isAssistant = role === "assistant";
|
|
642
642
|
return /* @__PURE__ */ jsxs("div", {
|
|
643
643
|
className: cn("flex flex-col gap-1", isUser ? "items-end" : "items-start", className),
|
|
644
644
|
children: [!hideRoleLabel && /* @__PURE__ */ jsxs("div", {
|
|
@@ -651,9 +651,9 @@ function ChatMessage({ role, content, toolCalls, isStreaming, timestamp, classNa
|
|
|
651
651
|
children: formatTime(timestamp)
|
|
652
652
|
})]
|
|
653
653
|
}), /* @__PURE__ */ jsxs("div", {
|
|
654
|
-
className: cn("min-w-0 max-w-[85%] space-y-1 rounded-[var(--radius-lg)]
|
|
654
|
+
className: cn("min-w-0 max-w-[85%] space-y-1", isUser ? "rounded-[var(--radius-lg)] bg-foreground px-[var(--chat-message-px)] py-[var(--chat-message-py)] text-background" : isAssistant ? "text-foreground" : "rounded-[var(--radius-lg)] border border-border bg-card px-[var(--chat-message-px)] py-[var(--chat-message-py)]"),
|
|
655
655
|
children: [isUser ? /* @__PURE__ */ jsx("div", {
|
|
656
|
-
className: "whitespace-pre-wrap text-[var(--font-size-base)] leading-[var(--line-height-base)]
|
|
656
|
+
className: "whitespace-pre-wrap text-[var(--font-size-base)] leading-[var(--line-height-base)]",
|
|
657
657
|
children: content
|
|
658
658
|
}) : /* @__PURE__ */ jsxs(Fragment$1, { children: [content && /* @__PURE__ */ jsx(Markdown, {
|
|
659
659
|
className: "tangle-prose text-[var(--font-size-base)] leading-[var(--line-height-base)]",
|
package/dist/chat.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _ as UserMessageProps, a as AgentTimelineMessageItem, b as ChatContainer, c as AgentTimelineTone, d as ThinkingIndicator, f as ThinkingIndicatorProps, g as UserMessage, h as MessageRole, i as AgentTimelineItem, l as AgentTimelineToolGroupItem, m as ChatMessageProps, n as AgentTimelineArtifactItem, o as AgentTimelineProps, p as ChatMessage, r as AgentTimelineCustomItem, s as AgentTimelineStatusItem, t as AgentTimeline, u as AgentTimelineToolItem, v as MessageList, x as ChatContainerProps, y as MessageListProps } from "./index-
|
|
1
|
+
import { _ as UserMessageProps, a as AgentTimelineMessageItem, b as ChatContainer, c as AgentTimelineTone, d as ThinkingIndicator, f as ThinkingIndicatorProps, g as UserMessage, h as MessageRole, i as AgentTimelineItem, l as AgentTimelineToolGroupItem, m as ChatMessageProps, n as AgentTimelineArtifactItem, o as AgentTimelineProps, p as ChatMessage, r as AgentTimelineCustomItem, s as AgentTimelineStatusItem, t as AgentTimeline, u as AgentTimelineToolItem, v as MessageList, x as ChatContainerProps, y as MessageListProps } from "./index-Cs7j8V7l.js";
|
|
2
2
|
export { AgentTimeline, type AgentTimelineArtifactItem, type AgentTimelineCustomItem, type AgentTimelineItem, type AgentTimelineMessageItem, type AgentTimelineProps, type AgentTimelineStatusItem, type AgentTimelineTone, type AgentTimelineToolGroupItem, type AgentTimelineToolItem, ChatContainer, type ChatContainerProps, ChatMessage, type ChatMessageProps, MessageList, type MessageListProps, type MessageRole, ThinkingIndicator, type ThinkingIndicatorProps, UserMessage, type UserMessageProps };
|
package/dist/chat.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as MessageList, i as ThinkingIndicator, n as ChatContainer, o as UserMessage, r as AgentTimeline, t as ChatMessage } from "./chat-
|
|
1
|
+
import { a as MessageList, i as ThinkingIndicator, n as ChatContainer, o as UserMessage, r as AgentTimeline, t as ChatMessage } from "./chat-DDvF2oGQ.js";
|
|
2
2
|
export { AgentTimeline, ChatContainer, ChatMessage, MessageList, ThinkingIndicator, UserMessage };
|
|
@@ -3,7 +3,7 @@ import { i as focusRing } from "./focus-BcE_SHqz.js";
|
|
|
3
3
|
import { t as cn } from "./utils-C_uf36nf.js";
|
|
4
4
|
import { i as TabsTrigger, n as TabsContent, r as TabsList, t as Tabs } from "./tabs-BVHR6NkO.js";
|
|
5
5
|
import { t as ArtifactPane } from "./artifact-pane-DMXT9a8U.js";
|
|
6
|
-
import { t as Markdown } from "./markdown-
|
|
6
|
+
import { t as Markdown } from "./markdown-Db08KAYF.js";
|
|
7
7
|
import { Suspense, createContext, lazy, useCallback, useContext, useEffect, useMemo, useRef, useState } from "react";
|
|
8
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
9
|
import { PencilLine, Save, Users, Wifi, WifiOff } from "lucide-react";
|
package/dist/editor.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as useCollaborators, c as useYjsState, d as EditorToolbar, f as EditorProvider, i as useCollaboratorPresence, l as CollaboratorsList, o as useDocumentChanges, p as useEditorContext, r as useAwareness, s as useEditorConnection, t as DocumentEditorPane, u as TiptapEditor } from "./document-editor-pane-
|
|
1
|
+
import { a as useCollaborators, c as useYjsState, d as EditorToolbar, f as EditorProvider, i as useCollaboratorPresence, l as CollaboratorsList, o as useDocumentChanges, p as useEditorContext, r as useAwareness, s as useEditorConnection, t as DocumentEditorPane, u as TiptapEditor } from "./document-editor-pane-CsFbH2qo.js";
|
|
2
2
|
export { CollaboratorsList, DocumentEditorPane, EditorProvider, EditorToolbar, TiptapEditor, useAwareness, useCollaboratorPresence, useCollaborators, useDocumentChanges, useEditorConnection, useEditorContext, useYjsState };
|
|
@@ -5,7 +5,7 @@ import { t as ArtifactPane } from "./artifact-pane-DMXT9a8U.js";
|
|
|
5
5
|
import { n as CopyButton, t as CodeBlock } from "./code-block-B36KVUSN.js";
|
|
6
6
|
import { t as formatBytes } from "./format-DfcLWqMa.js";
|
|
7
7
|
import { i as getFormatLabel, n as fileExtension, o as resolveFilePreviewKind, r as getCodeLanguage, t as detectFileFormat } from "./file-format-BgXbr-Ib.js";
|
|
8
|
-
import { t as Markdown } from "./markdown-
|
|
8
|
+
import { t as Markdown } from "./markdown-Db08KAYF.js";
|
|
9
9
|
import { Suspense, lazy, useEffect, useMemo, useState } from "react";
|
|
10
10
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
11
11
|
import { ChevronRight, Download, File, FileCode, FileImage, FileJson, FileSpreadsheet, FileText, Folder, FolderOpen, Music, X } from "lucide-react";
|
|
@@ -647,7 +647,7 @@ function FileTabs({ tabs, activeId, onSelect, onClose, className }) {
|
|
|
647
647
|
//#endregion
|
|
648
648
|
//#region src/files/file-artifact-pane.tsx
|
|
649
649
|
const LazyDocumentEditorPane = lazy(async () => {
|
|
650
|
-
return { default: (await import("./document-editor-pane-
|
|
650
|
+
return { default: (await import("./document-editor-pane-CsFbH2qo.js").then((n) => n.n)).DocumentEditorPane };
|
|
651
651
|
});
|
|
652
652
|
/**
|
|
653
653
|
* FileArtifactPane — opinionated artifact frame for file previews with tabs and
|
package/dist/files.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { a as getSyntaxLanguage, i as getFormatLabel, n as fileExtension, o as resolveFilePreviewKind, r as getCodeLanguage, t as detectFileFormat } from "./file-format-BgXbr-Ib.js";
|
|
2
|
-
import { a as parseCsv, c as filterFileTree, i as FilePreview, n as FileTabs, o as RichFileTree, r as CSV_PREVIEW_ROW_LIMIT, s as FileTree, t as FileArtifactPane } from "./files
|
|
2
|
+
import { a as parseCsv, c as filterFileTree, i as FilePreview, n as FileTabs, o as RichFileTree, r as CSV_PREVIEW_ROW_LIMIT, s as FileTree, t as FileArtifactPane } from "./files--Unn___t.js";
|
|
3
3
|
export { CSV_PREVIEW_ROW_LIMIT, FileArtifactPane, FilePreview, FileTabs, FileTree, RichFileTree, detectFileFormat, fileExtension, filterFileTree, getCodeLanguage, getFormatLabel, getSyntaxLanguage, parseCsv, resolveFilePreviewKind };
|
package/dist/hooks.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as useRunCollapseState, r as useRunGroups, t as useAutoScroll } from "./use-auto-scroll-C5Pjeqon.js";
|
|
2
|
-
import { a as useToolCallStream, i as useRealtimeSession, n as useSdkSession, o as useDropdownMenu, r as RealtimeSessionRegistry, t as useSSEStream } from "./use-sse-stream-
|
|
2
|
+
import { a as useToolCallStream, i as useRealtimeSession, n as useSdkSession, o as useDropdownMenu, r as RealtimeSessionRegistry, t as useSSEStream } from "./use-sse-stream-DjqRuDft.js";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
//#region src/hooks/use-live-time.ts
|
|
5
5
|
/**
|
|
@@ -87,8 +87,7 @@ interface UserMessageProps {
|
|
|
87
87
|
actions?: ReactNode;
|
|
88
88
|
}
|
|
89
89
|
/**
|
|
90
|
-
* The single user message bubble
|
|
91
|
-
* semantic border (no loud fill, no uppercase label). The timestamp sits
|
|
90
|
+
* The single user message bubble uses inverse theme colors. The timestamp sits
|
|
92
91
|
* beside the bubble and appears on hover, so it costs no height. Used by both
|
|
93
92
|
* the run/message list (session-model `parts`) and AgentTimeline (direct
|
|
94
93
|
* `content`/`timestamp`).
|
package/dist/index.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ import { n as DisplayVariant, r as ToolDisplayMetadata, t as CustomToolRenderer
|
|
|
7
7
|
import { a as Run, i as MessageUser, n as GroupedMessage, o as RunStats, r as MessageRun, s as ToolCategory, t as FinalTextPart } from "./run-OyWmIDqu.js";
|
|
8
8
|
import { n as MarkdownProps, r as getSanitizedMarkdownHeadingIdFromRawFragment, t as Markdown } from "./markdown-C0atSabr.js";
|
|
9
9
|
import { _ as OpenUITableNode, a as OpenUIBadgeNode, c as OpenUIComponentNode, d as OpenUIKeyValueNode, f as OpenUIMarkdownNode, g as OpenUIStatNode, h as OpenUIStackNode, i as OpenUIArtifactRendererProps, l as OpenUIGridNode, m as OpenUISeparatorNode, n as OpenUIActionsNode, o as OpenUICardNode, p as OpenUIPrimitive, r as OpenUIArtifactRenderer, s as OpenUICodeNode, t as OpenUIAction, u as OpenUIHeadingNode, v as OpenUITextNode } from "./openui-artifact-renderer-fkBQaoLO.js";
|
|
10
|
-
import { _ as UserMessageProps, a as AgentTimelineMessageItem, b as ChatContainer, c as AgentTimelineTone, d as ThinkingIndicator, f as ThinkingIndicatorProps, g as UserMessage, h as MessageRole, i as AgentTimelineItem, l as AgentTimelineToolGroupItem, m as ChatMessageProps, n as AgentTimelineArtifactItem, o as AgentTimelineProps, p as ChatMessage, r as AgentTimelineCustomItem, s as AgentTimelineStatusItem, t as AgentTimeline, u as AgentTimelineToolItem, v as MessageList, x as ChatContainerProps, y as MessageListProps } from "./index-
|
|
10
|
+
import { _ as UserMessageProps, a as AgentTimelineMessageItem, b as ChatContainer, c as AgentTimelineTone, d as ThinkingIndicator, f as ThinkingIndicatorProps, g as UserMessage, h as MessageRole, i as AgentTimelineItem, l as AgentTimelineToolGroupItem, m as ChatMessageProps, n as AgentTimelineArtifactItem, o as AgentTimelineProps, p as ChatMessage, r as AgentTimelineCustomItem, s as AgentTimelineStatusItem, t as AgentTimeline, u as AgentTimelineToolItem, v as MessageList, x as ChatContainerProps, y as MessageListProps } from "./index-Cs7j8V7l.js";
|
|
11
11
|
import { a as parseToolEvent, i as ToolCallFeedProps, n as ToolCallData, o as ToolCallStatus, r as ToolCallFeed, s as ToolCallType, t as FeedSegment } from "./tool-call-feed-BeB1_4pX.js";
|
|
12
12
|
import { n as ArtifactPaneProps, t as ArtifactPane } from "./artifact-pane-BL_DFWNl.js";
|
|
13
13
|
import { C as FileNode, D as filterFileTree, E as FileTreeVisibilityOptions, S as RichFileTreeThemeVars, T as FileTreeProps, _ as parseCsv, a as getCodeLanguage, b as RichFileTreeGitStatus, c as resolveFilePreviewKind, d as FileTabData, f as FileTabs, g as FilePreviewProps, h as FilePreview, i as fileExtension, l as FileArtifactPane, m as CSV_PREVIEW_ROW_LIMIT, n as FilePreviewKind, o as getFormatLabel, p as FileTabsProps, r as detectFileFormat, s as getSyntaxLanguage, t as FileFormat, u as FileArtifactPaneProps, v as RichFileTree, w as FileTree, x as RichFileTreeProps, y as RichFileTreeGitEntry } from "./index-CyGSLGVF.js";
|
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import { a as focusRingInset, i as focusRing, n as focusFieldInvalid, r as focus
|
|
|
3
3
|
import { t as cn } from "./utils-C_uf36nf.js";
|
|
4
4
|
import { n as buttonVariants, t as Button } from "./button-C87nEe2R.js";
|
|
5
5
|
import { a as TableFooter, c as TableRow, d as Card, f as CardContent, g as CardTitle, h as CardHeader, i as TableCell, l as Badge, m as CardFooter, n as TableBody, o as TableHead, p as CardDescription, r as TableCaption, s as TableHeader, t as Table, u as badgeVariants } from "./table-Bss73DhB.js";
|
|
6
|
-
import { A as SegmentedControl, B as SelectValue, C as ToastProvider, D as SkeletonTable, E as SkeletonCard, F as SelectLabel, G as DialogContent, H as Textarea, I as SelectScrollDownButton, J as DialogHeader, K as DialogDescription, L as SelectScrollUpButton, M as SelectContent, N as SelectGroup, O as Switch, P as SelectItem, Q as DialogTrigger, R as SelectSeparator, S as ToastContainer, T as Skeleton, U as Dialog, V as Input, W as DialogClose, X as DialogPortal, Y as DialogOverlay, Z as DialogTitle, _ as TerminalInput, a as Metric, b as EmptyState, c as PageHeader, d as InlineCode, f as SidebarDropZone, g as TerminalDisplay, h as TerminalCursor, i as Toolbar, j as Select, k as Progress, l as ThemeToggle, m as DropZone, n as TangleKnot, o as MetricStrip, p as UploadProgress, q as DialogFooter, r as FilterField, s as StatusPill, t as Logo, u as useTheme, v as TerminalLine, w as useToast, x as Label, y as StatCard, z as SelectTrigger } from "./primitives-
|
|
6
|
+
import { A as SegmentedControl, B as SelectValue, C as ToastProvider, D as SkeletonTable, E as SkeletonCard, F as SelectLabel, G as DialogContent, H as Textarea, I as SelectScrollDownButton, J as DialogHeader, K as DialogDescription, L as SelectScrollUpButton, M as SelectContent, N as SelectGroup, O as Switch, P as SelectItem, Q as DialogTrigger, R as SelectSeparator, S as ToastContainer, T as Skeleton, U as Dialog, V as Input, W as DialogClose, X as DialogPortal, Y as DialogOverlay, Z as DialogTitle, _ as TerminalInput, a as Metric, b as EmptyState, c as PageHeader, d as InlineCode, f as SidebarDropZone, g as TerminalDisplay, h as TerminalCursor, i as Toolbar, j as Select, k as Progress, l as ThemeToggle, m as DropZone, n as TangleKnot, o as MetricStrip, p as UploadProgress, q as DialogFooter, r as FilterField, s as StatusPill, t as Logo, u as useTheme, v as TerminalLine, w as useToast, x as Label, y as StatCard, z as SelectTrigger } from "./primitives-Bx59fT-U.js";
|
|
7
7
|
import { _ as AvatarFallback, a as DropdownMenuItem, c as DropdownMenuRadioGroup, d as DropdownMenuShortcut, f as DropdownMenuSub, g as Avatar, h as DropdownMenuTrigger, i as DropdownMenuGroup, l as DropdownMenuRadioItem, m as DropdownMenuSubTrigger, n as DropdownMenuCheckboxItem, o as DropdownMenuLabel, p as DropdownMenuSubContent, r as DropdownMenuContent, s as DropdownMenuPortal, t as DropdownMenu, u as DropdownMenuSeparator, v as AvatarImage } from "./dropdown-menu-BpcLa5vF.js";
|
|
8
8
|
import { i as TabsTrigger, n as TabsContent, r as TabsList, t as Tabs } from "./tabs-BVHR6NkO.js";
|
|
9
9
|
import { t as TextShimmer } from "./text-shimmer-BUUo6I-g.js";
|
|
@@ -15,17 +15,17 @@ import { i as truncateText, n as formatDuration, r as formatUptime, t as formatB
|
|
|
15
15
|
import { a as GrepResultsPreview, i as GlobResultsPreview, n as QuestionPreview, o as WriteFilePreview, r as WebSearchPreview, s as CommandPreview, t as DiffPreview } from "./diff-preview-BcK3nRXb.js";
|
|
16
16
|
import { a as getSyntaxLanguage, i as getFormatLabel, n as fileExtension, o as resolveFilePreviewKind, r as getCodeLanguage, t as detectFileFormat } from "./file-format-BgXbr-Ib.js";
|
|
17
17
|
import { a as RunRowStatusDot, i as RunRowShell, o as ExpandedToolDetail, r as InlineToolItem } from "./tool-call-step-DNebqhmX.js";
|
|
18
|
-
import { n as getSanitizedMarkdownHeadingIdFromRawFragment, t as Markdown } from "./markdown-
|
|
19
|
-
import { n as InlineThinkingItem, t as RunGroup } from "./run-group-
|
|
20
|
-
import { t as OpenUIArtifactRenderer } from "./openui-artifact-renderer-
|
|
21
|
-
import { a as MessageList, i as ThinkingIndicator, n as ChatContainer, o as UserMessage, r as AgentTimeline, t as ChatMessage } from "./chat-
|
|
18
|
+
import { n as getSanitizedMarkdownHeadingIdFromRawFragment, t as Markdown } from "./markdown-Db08KAYF.js";
|
|
19
|
+
import { n as InlineThinkingItem, t as RunGroup } from "./run-group-BWGeesgs.js";
|
|
20
|
+
import { t as OpenUIArtifactRenderer } from "./openui-artifact-renderer-DG_i2lOR.js";
|
|
21
|
+
import { a as MessageList, i as ThinkingIndicator, n as ChatContainer, o as UserMessage, r as AgentTimeline, t as ChatMessage } from "./chat-DDvF2oGQ.js";
|
|
22
22
|
import { t as LiveDuration } from "./run-ZsIKPA6J.js";
|
|
23
|
-
import { n as parseToolEvent, t as ToolCallFeed } from "./tool-call-feed-
|
|
23
|
+
import { n as parseToolEvent, t as ToolCallFeed } from "./tool-call-feed-BpmMLpPX.js";
|
|
24
24
|
import "./openui.js";
|
|
25
|
-
import { a as parseCsv, c as filterFileTree, i as FilePreview, n as FileTabs, o as RichFileTree, r as CSV_PREVIEW_ROW_LIMIT, s as FileTree, t as FileArtifactPane } from "./files
|
|
25
|
+
import { a as parseCsv, c as filterFileTree, i as FilePreview, n as FileTabs, o as RichFileTree, r as CSV_PREVIEW_ROW_LIMIT, s as FileTree, t as FileArtifactPane } from "./files--Unn___t.js";
|
|
26
26
|
import "./markdown.js";
|
|
27
27
|
import { i as UserMenu, n as AuthHeader, r as GitHubLoginButton, t as LoginLayout } from "./auth-DOETfnd9.js";
|
|
28
|
-
import { a as useToolCallStream, i as useRealtimeSession, n as useSdkSession, o as useDropdownMenu, r as RealtimeSessionRegistry, t as useSSEStream } from "./use-sse-stream-
|
|
28
|
+
import { a as useToolCallStream, i as useRealtimeSession, n as useSdkSession, o as useDropdownMenu, r as RealtimeSessionRegistry, t as useSSEStream } from "./use-sse-stream-DjqRuDft.js";
|
|
29
29
|
import { C as useHasBackgroundRunningSessions, D as useSessionsByActivity, E as useProjectSessions, O as useTotalRunningSessions, S as useActiveSessionsState, T as useProjectActivity, _ as setForegroundActiveSession, a as getAllProjectActivity, b as useActiveSession, c as getSessionsForProject, d as registerActiveSession, f as resetActiveSessions, g as setActiveSessionRunning, h as setActiveSessionError, i as getAllActiveSessions, l as getTotalRunningSessionCount, m as setActiveSessionConnection, n as bumpActiveSessionActivity, o as getSessionsByActivity, p as setActiveSessionAttention, r as getActiveSession, s as getSessionsForNavbar, t as activeSessionsAtom, u as hasBackgroundRunningSessions, v as unregisterActiveSession, w as useNavbarSessions, x as useActiveSessions, y as updateActiveSessionMeta } from "./active-sessions-store-Gt1R0rFG.js";
|
|
30
30
|
import { createAuthFetcher, useApiKey, useAuth, useLiveTime } from "./hooks.js";
|
|
31
31
|
import { addMessage, addParts, clearChat, isStreamingAtom, messagesAtom, partMapAtom, updatePart } from "./stores.js";
|
|
@@ -46,7 +46,7 @@ const Markdown = memo(({ children, className, urlTransform }) => {
|
|
|
46
46
|
const language = /language-(\w+)/.exec(codeClass || "")?.[1];
|
|
47
47
|
const code = String(codeChildren).replace(/\n$/, "");
|
|
48
48
|
if (!language && !code.includes("\n")) return /* @__PURE__ */ jsx("code", {
|
|
49
|
-
className: cn("px-1.5 py-0.5 rounded border border-border bg-
|
|
49
|
+
className: cn("px-1.5 py-0.5 rounded border border-border bg-muted text-foreground text-[0.85em] font-mono", codeClass),
|
|
50
50
|
...rest,
|
|
51
51
|
children: codeChildren
|
|
52
52
|
});
|
package/dist/markdown.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { n as CopyButton, t as CodeBlock } from "./code-block-B36KVUSN.js";
|
|
2
|
-
import { n as getSanitizedMarkdownHeadingIdFromRawFragment, t as Markdown } from "./markdown-
|
|
2
|
+
import { n as getSanitizedMarkdownHeadingIdFromRawFragment, t as Markdown } from "./markdown-Db08KAYF.js";
|
|
3
3
|
export { CodeBlock, CopyButton, Markdown, getSanitizedMarkdownHeadingIdFromRawFragment };
|
|
@@ -3,7 +3,7 @@ import { t as cn } from "./utils-C_uf36nf.js";
|
|
|
3
3
|
import { t as Button } from "./button-C87nEe2R.js";
|
|
4
4
|
import { c as TableRow, d as Card, f as CardContent, g as CardTitle, h as CardHeader, i as TableCell, l as Badge, n as TableBody, o as TableHead, p as CardDescription, s as TableHeader, t as Table } from "./table-Bss73DhB.js";
|
|
5
5
|
import { t as CodeBlock } from "./code-block-B36KVUSN.js";
|
|
6
|
-
import { t as Markdown } from "./markdown-
|
|
6
|
+
import { t as Markdown } from "./markdown-Db08KAYF.js";
|
|
7
7
|
import { Fragment } from "react";
|
|
8
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
9
|
import { Minus } from "lucide-react";
|
package/dist/openui.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { a as OPENUI_NODE_TYPES, i as OPENUI_NODE_JSON_SCHEMA, n as validateOpenUIJsonArtifact, r as validateOpenUIJsonNode, t as findUnsupportedOpenUINode } from "./schema-BpW9rSSG.js";
|
|
2
|
-
import { t as OpenUIArtifactRenderer } from "./openui-artifact-renderer-
|
|
2
|
+
import { t as OpenUIArtifactRenderer } from "./openui-artifact-renderer-DG_i2lOR.js";
|
|
3
3
|
export { OPENUI_NODE_JSON_SCHEMA, OPENUI_NODE_TYPES, OpenUIArtifactRenderer, findUnsupportedOpenUINode, validateOpenUIJsonArtifact, validateOpenUIJsonNode };
|
|
@@ -929,7 +929,7 @@ function SidebarDropZone({ onDrop, accept, disabled, title = "Drop files here",
|
|
|
929
929
|
//#region src/primitives/code-block.tsx
|
|
930
930
|
function InlineCode({ className, children, ...props }) {
|
|
931
931
|
return /* @__PURE__ */ jsx("code", {
|
|
932
|
-
className: cn("rounded border border-border bg-
|
|
932
|
+
className: cn("rounded border border-border bg-muted px-1.5 py-0.5 font-mono text-[0.85em] text-foreground", className),
|
|
933
933
|
...props,
|
|
934
934
|
children
|
|
935
935
|
});
|
package/dist/primitives.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as buttonVariants, t as Button } from "./button-C87nEe2R.js";
|
|
2
2
|
import { a as TableFooter, c as TableRow, d as Card, f as CardContent, g as CardTitle, h as CardHeader, i as TableCell, l as Badge, m as CardFooter, n as TableBody, o as TableHead, p as CardDescription, r as TableCaption, s as TableHeader, t as Table, u as badgeVariants } from "./table-Bss73DhB.js";
|
|
3
|
-
import { A as SegmentedControl, B as SelectValue, C as ToastProvider, D as SkeletonTable, E as SkeletonCard, F as SelectLabel, G as DialogContent, H as Textarea, I as SelectScrollDownButton, J as DialogHeader, K as DialogDescription, L as SelectScrollUpButton, M as SelectContent, N as SelectGroup, O as Switch, P as SelectItem, Q as DialogTrigger, R as SelectSeparator, S as ToastContainer, T as Skeleton, U as Dialog, V as Input, W as DialogClose, X as DialogPortal, Y as DialogOverlay, Z as DialogTitle, _ as TerminalInput, a as Metric, b as EmptyState, c as PageHeader, d as InlineCode, f as SidebarDropZone, g as TerminalDisplay, h as TerminalCursor, i as Toolbar, j as Select, k as Progress, l as ThemeToggle, m as DropZone, n as TangleKnot, o as MetricStrip, p as UploadProgress, q as DialogFooter, r as FilterField, s as StatusPill, t as Logo, u as useTheme, v as TerminalLine, w as useToast, x as Label, y as StatCard, z as SelectTrigger } from "./primitives-
|
|
3
|
+
import { A as SegmentedControl, B as SelectValue, C as ToastProvider, D as SkeletonTable, E as SkeletonCard, F as SelectLabel, G as DialogContent, H as Textarea, I as SelectScrollDownButton, J as DialogHeader, K as DialogDescription, L as SelectScrollUpButton, M as SelectContent, N as SelectGroup, O as Switch, P as SelectItem, Q as DialogTrigger, R as SelectSeparator, S as ToastContainer, T as Skeleton, U as Dialog, V as Input, W as DialogClose, X as DialogPortal, Y as DialogOverlay, Z as DialogTitle, _ as TerminalInput, a as Metric, b as EmptyState, c as PageHeader, d as InlineCode, f as SidebarDropZone, g as TerminalDisplay, h as TerminalCursor, i as Toolbar, j as Select, k as Progress, l as ThemeToggle, m as DropZone, n as TangleKnot, o as MetricStrip, p as UploadProgress, q as DialogFooter, r as FilterField, s as StatusPill, t as Logo, u as useTheme, v as TerminalLine, w as useToast, x as Label, y as StatCard, z as SelectTrigger } from "./primitives-Bx59fT-U.js";
|
|
4
4
|
import { _ as AvatarFallback, a as DropdownMenuItem, c as DropdownMenuRadioGroup, d as DropdownMenuShortcut, f as DropdownMenuSub, g as Avatar, h as DropdownMenuTrigger, i as DropdownMenuGroup, l as DropdownMenuRadioItem, m as DropdownMenuSubTrigger, n as DropdownMenuCheckboxItem, o as DropdownMenuLabel, p as DropdownMenuSubContent, r as DropdownMenuContent, s as DropdownMenuPortal, t as DropdownMenu, u as DropdownMenuSeparator, v as AvatarImage } from "./dropdown-menu-BpcLa5vF.js";
|
|
5
5
|
import { i as TabsTrigger, n as TabsContent, r as TabsList, t as Tabs } from "./tabs-BVHR6NkO.js";
|
|
6
6
|
import { t as TextShimmer } from "./text-shimmer-BUUo6I-g.js";
|
|
@@ -2,8 +2,8 @@ import { t as cn } from "./utils-C_uf36nf.js";
|
|
|
2
2
|
import { t as TextShimmer } from "./text-shimmer-BUUo6I-g.js";
|
|
3
3
|
import { i as truncateText, n as formatDuration } from "./format-DfcLWqMa.js";
|
|
4
4
|
import { i as RunRowShell, r as InlineToolItem, s as ExpandableContent } from "./tool-call-step-DNebqhmX.js";
|
|
5
|
-
import { t as Markdown } from "./markdown-
|
|
6
|
-
import { t as OpenUIArtifactRenderer } from "./openui-artifact-renderer-
|
|
5
|
+
import { t as Markdown } from "./markdown-Db08KAYF.js";
|
|
6
|
+
import { t as OpenUIArtifactRenderer } from "./openui-artifact-renderer-DG_i2lOR.js";
|
|
7
7
|
import { memo, useEffect, useMemo, useRef, useState } from "react";
|
|
8
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
9
|
import { Bot, Brain, ChevronDown, ChevronRight, ClipboardList, FileEdit, FileSearch, Globe, Loader2, PencilLine, Search, Settings, Sparkles, Terminal } from "lucide-react";
|
package/dist/run.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as RunRowStatusDot, i as RunRowShell, o as ExpandedToolDetail, r as InlineToolItem } from "./tool-call-step-DNebqhmX.js";
|
|
2
|
-
import { n as InlineThinkingItem, t as RunGroup } from "./run-group-
|
|
2
|
+
import { n as InlineThinkingItem, t as RunGroup } from "./run-group-BWGeesgs.js";
|
|
3
3
|
import { t as LiveDuration } from "./run-ZsIKPA6J.js";
|
|
4
|
-
import { n as parseToolEvent, t as ToolCallFeed } from "./tool-call-feed-
|
|
4
|
+
import { n as parseToolEvent, t as ToolCallFeed } from "./tool-call-feed-BpmMLpPX.js";
|
|
5
5
|
export { ExpandedToolDetail, InlineThinkingItem, InlineToolItem, LiveDuration, RunGroup, RunRowShell, RunRowStatusDot, ToolCallFeed, parseToolEvent };
|
package/dist/sdk-hooks.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { n as useRunCollapseState, r as useRunGroups, t as useAutoScroll } from "./use-auto-scroll-C5Pjeqon.js";
|
|
2
|
-
import { a as useToolCallStream, i as useRealtimeSession, n as useSdkSession, o as useDropdownMenu, r as RealtimeSessionRegistry, t as useSSEStream } from "./use-sse-stream-
|
|
2
|
+
import { a as useToolCallStream, i as useRealtimeSession, n as useSdkSession, o as useDropdownMenu, r as RealtimeSessionRegistry, t as useSSEStream } from "./use-sse-stream-DjqRuDft.js";
|
|
3
3
|
export { RealtimeSessionRegistry, useAutoScroll, useDropdownMenu, useRealtimeSession, useRunCollapseState, useRunGroups, useSSEStream, useSdkSession, useToolCallStream };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as cn } from "./utils-C_uf36nf.js";
|
|
2
2
|
import { n as ToolCallStep, t as ToolCallGroup } from "./tool-call-step-DNebqhmX.js";
|
|
3
|
-
import { t as Markdown } from "./markdown-
|
|
3
|
+
import { t as Markdown } from "./markdown-Db08KAYF.js";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
//#region src/run/tool-call-feed.tsx
|
|
6
6
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as parseToolEvent } from "./tool-call-feed-
|
|
1
|
+
import { n as parseToolEvent } from "./tool-call-feed-BpmMLpPX.js";
|
|
2
2
|
import { _ as setForegroundActiveSession, d as registerActiveSession, g as setActiveSessionRunning, h as setActiveSessionError, m as setActiveSessionConnection, n as bumpActiveSessionActivity, p as setActiveSessionAttention, v as unregisterActiveSession, y as updateActiveSessionMeta } from "./active-sessions-store-Gt1R0rFG.js";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { createElement, useCallback, useEffect, useMemo, useRef, useState } from "react";
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* ChatMessage —
|
|
2
|
+
* ChatMessage — one message in the conversation.
|
|
3
3
|
*
|
|
4
4
|
* Supports user messages (plain text) and assistant messages
|
|
5
5
|
* (rich markdown with inline tool call activity).
|
|
@@ -41,6 +41,7 @@ export function ChatMessage({
|
|
|
41
41
|
hideRoleLabel,
|
|
42
42
|
}: ChatMessageProps) {
|
|
43
43
|
const isUser = role === "user";
|
|
44
|
+
const isAssistant = role === "assistant";
|
|
44
45
|
|
|
45
46
|
return (
|
|
46
47
|
<div
|
|
@@ -63,19 +64,18 @@ export function ChatMessage({
|
|
|
63
64
|
</div>
|
|
64
65
|
)}
|
|
65
66
|
|
|
66
|
-
{/* Bubble */}
|
|
67
67
|
<div
|
|
68
68
|
className={cn(
|
|
69
|
-
"min-w-0 max-w-[85%] space-y-1
|
|
70
|
-
"px-[var(--chat-message-px)] py-[var(--chat-message-py)]",
|
|
69
|
+
"min-w-0 max-w-[85%] space-y-1",
|
|
71
70
|
isUser
|
|
72
|
-
? "
|
|
73
|
-
:
|
|
71
|
+
? "rounded-[var(--radius-lg)] bg-foreground px-[var(--chat-message-px)] py-[var(--chat-message-py)] text-background"
|
|
72
|
+
: isAssistant
|
|
73
|
+
? "text-foreground"
|
|
74
|
+
: "rounded-[var(--radius-lg)] border border-border bg-card px-[var(--chat-message-px)] py-[var(--chat-message-py)]",
|
|
74
75
|
)}
|
|
75
76
|
>
|
|
76
|
-
{/* Message body */}
|
|
77
77
|
{isUser ? (
|
|
78
|
-
<div className="whitespace-pre-wrap text-[var(--font-size-base)] leading-[var(--line-height-base)]
|
|
78
|
+
<div className="whitespace-pre-wrap text-[var(--font-size-base)] leading-[var(--line-height-base)]">
|
|
79
79
|
{content}
|
|
80
80
|
</div>
|
|
81
81
|
) : (
|
|
@@ -3,13 +3,13 @@ import { describe, expect, it } from "vitest"
|
|
|
3
3
|
import { UserMessage } from "./user-message"
|
|
4
4
|
|
|
5
5
|
describe("UserMessage", () => {
|
|
6
|
-
it("renders
|
|
6
|
+
it("renders inverse text in a bubble that wraps in narrow panes", () => {
|
|
7
7
|
const { container } = render(<UserMessage content="Run the tests." />)
|
|
8
8
|
expect(screen.getByText("Run the tests.")).toBeInTheDocument()
|
|
9
9
|
const bubble = container.querySelector(".rounded-2xl")
|
|
10
10
|
expect(bubble).not.toBeNull()
|
|
11
|
-
expect(bubble!.className).toContain("bg-
|
|
12
|
-
expect(bubble!.className).toContain("
|
|
11
|
+
expect(bubble!.className).toContain("bg-foreground")
|
|
12
|
+
expect(bubble!.className).toContain("text-background")
|
|
13
13
|
expect(container.querySelector(".group")?.className).toContain(
|
|
14
14
|
"min-w-0",
|
|
15
15
|
)
|
|
@@ -17,8 +17,7 @@ function formatTime(date: Date): string {
|
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
|
-
* The single user message bubble
|
|
21
|
-
* semantic border (no loud fill, no uppercase label). The timestamp sits
|
|
20
|
+
* The single user message bubble uses inverse theme colors. The timestamp sits
|
|
22
21
|
* beside the bubble and appears on hover, so it costs no height. Used by both
|
|
23
22
|
* the run/message list (session-model `parts`) and AgentTimeline (direct
|
|
24
23
|
* `content`/`timestamp`).
|
|
@@ -38,7 +37,7 @@ export const UserMessage = memo(
|
|
|
38
37
|
<div className="flex justify-end">
|
|
39
38
|
<div className="group flex min-w-0 max-w-[78%] flex-col items-end gap-2">
|
|
40
39
|
<div
|
|
41
|
-
className="relative w-full min-w-0 rounded-2xl
|
|
40
|
+
className="relative w-full min-w-0 rounded-2xl bg-foreground px-4 py-3 text-background"
|
|
42
41
|
>
|
|
43
42
|
{timestamp ? (
|
|
44
43
|
<span
|
|
@@ -48,7 +47,7 @@ export const UserMessage = memo(
|
|
|
48
47
|
{formatTime(timestamp)}
|
|
49
48
|
</span>
|
|
50
49
|
) : null}
|
|
51
|
-
<div className="break-words whitespace-pre-wrap text-[var(--font-size-base)] leading-[1.5]
|
|
50
|
+
<div className="break-words whitespace-pre-wrap text-[var(--font-size-base)] leading-[1.5]">
|
|
52
51
|
{text}
|
|
53
52
|
</div>
|
|
54
53
|
</div>
|
|
@@ -75,7 +75,7 @@ export const Markdown = memo(({ children, className, urlTransform }: MarkdownPro
|
|
|
75
75
|
return (
|
|
76
76
|
<code
|
|
77
77
|
className={cn(
|
|
78
|
-
"px-1.5 py-0.5 rounded border border-border bg-
|
|
78
|
+
"px-1.5 py-0.5 rounded border border-border bg-muted text-foreground text-[0.85em] font-mono",
|
|
79
79
|
codeClass,
|
|
80
80
|
)}
|
|
81
81
|
{...rest}
|
|
@@ -99,3 +99,4 @@ export const Markdown = memo(({ children, className, urlTransform }: MarkdownPro
|
|
|
99
99
|
);
|
|
100
100
|
});
|
|
101
101
|
Markdown.displayName = "Markdown";
|
|
102
|
+
|
|
@@ -11,7 +11,7 @@ export function InlineCode({ className, children, ...props }: InlineCodeProps) {
|
|
|
11
11
|
return (
|
|
12
12
|
<code
|
|
13
13
|
className={cn(
|
|
14
|
-
"rounded border border-border bg-
|
|
14
|
+
"rounded border border-border bg-muted px-1.5 py-0.5 font-mono text-[0.85em] text-foreground",
|
|
15
15
|
className,
|
|
16
16
|
)}
|
|
17
17
|
{...props}
|
|
@@ -20,3 +20,4 @@ export function InlineCode({ className, children, ...props }: InlineCodeProps) {
|
|
|
20
20
|
</code>
|
|
21
21
|
);
|
|
22
22
|
}
|
|
23
|
+
|