@tangle-network/sandbox-ui 0.6.1 → 0.8.4
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/dist/auth.d.ts +10 -6
- package/dist/auth.js +3 -3
- package/dist/{chat-container-Cg-GwyiK.d.ts → chat-container-f4yEs6KN.d.ts} +9 -1
- package/dist/chat.d.ts +12 -2
- package/dist/chat.js +10 -10
- package/dist/{chunk-TSE423UF.js → chunk-2QZ6G7NM.js} +6 -6
- package/dist/{chunk-WBQ7VULC.js → chunk-34A66VBG.js} +7 -7
- package/dist/{chunk-JP725R4W.js → chunk-34I7UFSX.js} +2 -2
- package/dist/{chunk-YS66Q3RC.js → chunk-3CJ2SOEI.js} +2 -2
- package/dist/{chunk-CNWVHQFY.js → chunk-54SQQMMM.js} +6 -24
- package/dist/{chunk-DLCFZDGX.js → chunk-5UM2XMEJ.js} +39 -14
- package/dist/{chunk-YYGECNZZ.js → chunk-66EZOYZR.js} +3 -3
- package/dist/chunk-7U2Z23NE.js +49 -0
- package/dist/{chunk-RKXIRRKQ.js → chunk-BUOQTBTO.js} +70 -66
- package/dist/{chunk-DCPYTL4W.js → chunk-D4CZWJCD.js} +72 -148
- package/dist/{chunk-MXRQ4MJE.js → chunk-DXMIEK4K.js} +34 -23
- package/dist/{chunk-ZMWWE5RF.js → chunk-EXSOPXIY.js} +141 -123
- package/dist/{chunk-GW4GRAWJ.js → chunk-GSZA3TSY.js} +18 -12
- package/dist/{chunk-W4LM3QYZ.js → chunk-HB5Y37YU.js} +8 -8
- package/dist/{chunk-E2XT3G52.js → chunk-HFMAXUHV.js} +136 -137
- package/dist/{chunk-BRBTD7RH.js → chunk-MA7YKRUP.js} +28 -18
- package/dist/{chunk-MJUDMVRU.js → chunk-MT5FJ3ZT.js} +17 -17
- package/dist/chunk-OKLQVY3Y.js +139 -0
- package/dist/{chunk-KH5UDAJ2.js → chunk-QDH5GEGY.js} +58 -54
- package/dist/{chunk-33W2TLUL.js → chunk-QID2OOMG.js} +12 -3
- package/dist/{chunk-FJSVPBKY.js → chunk-S7OXQTST.js} +17 -3
- package/dist/chunk-T7HMZEVO.js +216 -0
- package/dist/{chunk-FNYJFCGU.js → chunk-U6QTHMY6.js} +145 -256
- package/dist/{chunk-565V6JTN.js → chunk-UXQMIR3D.js} +60 -99
- package/dist/{chunk-XTPAWK7L.js → chunk-VOUV7GGB.js} +25 -47
- package/dist/{chunk-OVNLOE3Y.js → chunk-WXK43R62.js} +41 -41
- package/dist/{chunk-6V4XVKFY.js → chunk-XXDFEF72.js} +340 -335
- package/dist/{chunk-TDYQBLL5.js → chunk-ZMNSRDMH.js} +6 -6
- package/dist/dashboard.d.ts +135 -3
- package/dist/dashboard.js +848 -8
- package/dist/{document-editor-pane-DWWUTTTZ.js → document-editor-pane-TLPVRBBU.js} +3 -3
- package/dist/editor.d.ts +9 -8
- package/dist/editor.js +3 -3
- package/dist/files.js +3 -3
- package/dist/globals.css +5304 -68
- package/dist/hooks.d.ts +1 -1
- package/dist/hooks.js +7 -7
- package/dist/index.d.ts +4 -4
- package/dist/index.js +28 -28
- package/dist/markdown.js +1 -1
- package/dist/openui.js +5 -5
- package/dist/pages.d.ts +47 -3
- package/dist/pages.js +911 -357
- package/dist/primitives.d.ts +5 -2
- package/dist/primitives.js +10 -10
- package/dist/run.js +4 -4
- package/dist/sdk-hooks.d.ts +2 -3
- package/dist/sdk-hooks.js +5 -5
- package/dist/styles.css +5304 -68
- package/dist/template-card-BAtvcAkU.d.ts +18 -0
- package/dist/terminal.d.ts +3 -1
- package/dist/terminal.js +66 -32
- package/dist/tokens.css +701 -40
- package/dist/{usage-chart-XCoB_7Xu.d.ts → usage-chart-SSiOgeQI.d.ts} +3 -1
- package/dist/{use-pty-session-COzVkhtc.d.ts → use-pty-session-0AOuwXgq.d.ts} +2 -0
- package/dist/{index-BT_-ecpc.d.ts → variant-list-C8wx2TqF.d.ts} +17 -8
- package/dist/workspace.d.ts +1 -1
- package/dist/workspace.js +13 -13
- package/package.json +3 -1
- package/tailwind.config.cjs +3 -2
- package/dist/chunk-3HW53XTH.js +0 -228
- package/dist/chunk-OKCIKTXQ.js +0 -63
|
@@ -2,24 +2,24 @@ import {
|
|
|
2
2
|
useAutoScroll,
|
|
3
3
|
useRunCollapseState,
|
|
4
4
|
useRunGroups
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-54SQQMMM.js";
|
|
6
6
|
import {
|
|
7
7
|
InlineThinkingItem,
|
|
8
8
|
RunGroup
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-EXSOPXIY.js";
|
|
10
10
|
import {
|
|
11
11
|
ToolCallGroup,
|
|
12
12
|
ToolCallStep
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-MT5FJ3ZT.js";
|
|
14
14
|
import {
|
|
15
15
|
getToolDisplayMetadata
|
|
16
16
|
} from "./chunk-BX6AQMUS.js";
|
|
17
17
|
import {
|
|
18
18
|
OpenUIArtifactRenderer
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-WXK43R62.js";
|
|
20
20
|
import {
|
|
21
21
|
Markdown
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-T7HMZEVO.js";
|
|
23
23
|
import {
|
|
24
24
|
cn
|
|
25
25
|
} from "./chunk-RQHJBTEU.js";
|
|
@@ -31,11 +31,11 @@ var UserMessage = memo(({ message, parts, actions }) => {
|
|
|
31
31
|
const textContent = parts.filter((p) => p.type === "text").map((p) => p.text).join("\n");
|
|
32
32
|
if (!textContent.trim()) return null;
|
|
33
33
|
return /* @__PURE__ */ jsx("div", { className: "flex justify-end", children: /* @__PURE__ */ jsxs("div", { className: "flex max-w-[82%] flex-col items-end gap-2", children: [
|
|
34
|
-
/* @__PURE__ */ jsxs("div", { className: "w-full rounded-[var(--radius-xl)] rounded-br-[var(--radius-sm)] border border-
|
|
35
|
-
/* @__PURE__ */ jsx("div", { className: "mb-1.5 text-[11px] font-semibold uppercase tracking-[0.14em] text-
|
|
36
|
-
/* @__PURE__ */ jsx("div", { className: "text-[15px] leading-7 text-
|
|
34
|
+
/* @__PURE__ */ jsxs("div", { className: "w-full rounded-[var(--radius-xl)] rounded-br-[var(--radius-sm)] border border-border bg-muted/50 px-4 py-3.5", children: [
|
|
35
|
+
/* @__PURE__ */ jsx("div", { className: "mb-1.5 text-[11px] font-semibold uppercase tracking-[0.14em] text-primary", children: "You" }),
|
|
36
|
+
/* @__PURE__ */ jsx("div", { className: "text-[15px] leading-7 text-foreground", children: /* @__PURE__ */ jsx(Markdown, { className: "tangle-prose", children: textContent }) })
|
|
37
37
|
] }),
|
|
38
|
-
actions ? /* @__PURE__ */ jsx("div", { className: "flex flex-wrap items-center justify-end gap-1.5 text-xs text-
|
|
38
|
+
actions ? /* @__PURE__ */ jsx("div", { className: "flex flex-wrap items-center justify-end gap-1.5 text-xs text-muted-foreground", children: actions }) : null
|
|
39
39
|
] }) });
|
|
40
40
|
});
|
|
41
41
|
UserMessage.displayName = "UserMessage";
|
|
@@ -98,11 +98,11 @@ function ThinkingIndicator({ className }) {
|
|
|
98
98
|
}, []);
|
|
99
99
|
return /* @__PURE__ */ jsxs2("div", { className: cn("flex items-center gap-2 px-3 py-1.5", className), children: [
|
|
100
100
|
/* @__PURE__ */ jsxs2("div", { className: "flex gap-[3px]", children: [
|
|
101
|
-
/* @__PURE__ */ jsx3("span", { className: "h-
|
|
102
|
-
/* @__PURE__ */ jsx3("span", { className: "h-
|
|
103
|
-
/* @__PURE__ */ jsx3("span", { className: "h-
|
|
101
|
+
/* @__PURE__ */ jsx3("span", { className: "h-[var(--indicator-dot-size)] w-[var(--indicator-dot-size)] animate-bounce rounded-full bg-[var(--brand-glow)]", style: { animationDelay: "0ms" } }),
|
|
102
|
+
/* @__PURE__ */ jsx3("span", { className: "h-[var(--indicator-dot-size)] w-[var(--indicator-dot-size)] animate-bounce rounded-full bg-[var(--brand-glow)]", style: { animationDelay: "150ms" } }),
|
|
103
|
+
/* @__PURE__ */ jsx3("span", { className: "h-[var(--indicator-dot-size)] w-[var(--indicator-dot-size)] animate-bounce rounded-full bg-[var(--brand-glow)]", style: { animationDelay: "300ms" } })
|
|
104
104
|
] }),
|
|
105
|
-
elapsed > 3 && /* @__PURE__ */ jsxs2("span", { className: "text-[
|
|
105
|
+
elapsed > 3 && /* @__PURE__ */ jsxs2("span", { className: "text-[var(--font-size-xs)] tabular-nums text-[var(--text-dim)]", children: [
|
|
106
106
|
elapsed,
|
|
107
107
|
"s"
|
|
108
108
|
] })
|
|
@@ -121,8 +121,8 @@ import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
|
121
121
|
var TONE_STYLES = {
|
|
122
122
|
default: {
|
|
123
123
|
dot: "bg-[var(--border-hover)]",
|
|
124
|
-
card: "border-
|
|
125
|
-
text: "text-
|
|
124
|
+
card: "border-border bg-card",
|
|
125
|
+
text: "text-foreground",
|
|
126
126
|
icon: CircleDot
|
|
127
127
|
},
|
|
128
128
|
info: {
|
|
@@ -156,25 +156,25 @@ function formatTime(date) {
|
|
|
156
156
|
function AgentTimelineRow({ isLast, accentClassName, children }) {
|
|
157
157
|
return /* @__PURE__ */ jsxs3("div", { className: "grid grid-cols-[1.25rem_minmax(0,1fr)] gap-x-4", children: [
|
|
158
158
|
/* @__PURE__ */ jsxs3("div", { className: "relative flex justify-center", children: [
|
|
159
|
-
!isLast && /* @__PURE__ */ jsx4("span", { className: "absolute top-4 bottom-[-0.75rem] left-1/2 w-px -translate-x-1/2 bg-
|
|
160
|
-
/* @__PURE__ */ jsx4("span", { className: cn("relative mt-2 h-
|
|
159
|
+
!isLast && /* @__PURE__ */ jsx4("span", { className: "absolute top-4 bottom-[-0.75rem] left-1/2 w-px -translate-x-1/2 bg-border" }),
|
|
160
|
+
/* @__PURE__ */ jsx4("span", { className: cn("relative mt-2 h-[var(--timeline-dot-size)] w-[var(--timeline-dot-size)] rounded-full ring-4 ring-[var(--bg-root)]", accentClassName) })
|
|
161
161
|
] }),
|
|
162
162
|
/* @__PURE__ */ jsx4("div", { className: "min-w-0 pb-3", children })
|
|
163
163
|
] });
|
|
164
164
|
}
|
|
165
165
|
function UserMessage2({ item }) {
|
|
166
|
-
return /* @__PURE__ */ jsx4("div", { className: "mb-3 flex justify-end", children: /* @__PURE__ */ jsx4("div", { className: "max-w-[72%]", children: /* @__PURE__ */ jsxs3("div", { className: "rounded-2xl border border-
|
|
167
|
-
item.timestamp && /* @__PURE__ */ jsx4("div", { className: "mb-1.5 text-right text-[
|
|
168
|
-
/* @__PURE__ */ jsx4("div", { className: "whitespace-pre-wrap text-[
|
|
166
|
+
return /* @__PURE__ */ jsx4("div", { className: "mb-3 flex justify-end", children: /* @__PURE__ */ jsx4("div", { className: "max-w-[72%]", children: /* @__PURE__ */ jsxs3("div", { className: "rounded-2xl border border-border bg-muted/50 px-4 py-3", children: [
|
|
167
|
+
item.timestamp && /* @__PURE__ */ jsx4("div", { className: "mb-1.5 text-right text-[var(--font-size-xs)] text-muted-foreground", children: formatTime(item.timestamp) }),
|
|
168
|
+
/* @__PURE__ */ jsx4("div", { className: "whitespace-pre-wrap text-[var(--font-size-base)] leading-[var(--line-height-base)] text-foreground", children: item.content })
|
|
169
169
|
] }) }) });
|
|
170
170
|
}
|
|
171
171
|
function AssistantMessage({ item }) {
|
|
172
172
|
return /* @__PURE__ */ jsxs3("div", { className: "-mt-0.5", children: [
|
|
173
|
-
item.timestamp && /* @__PURE__ */ jsx4("div", { className: "mb-2 text-[
|
|
174
|
-
item.content && /* @__PURE__ */ jsx4(Markdown, { className: "tangle-prose text-[
|
|
175
|
-
item.isStreaming && /* @__PURE__ */ jsx4("span", { className: "ml-0.5 inline-block h-4 w-2 animate-pulse rounded-sm bg-
|
|
173
|
+
item.timestamp && /* @__PURE__ */ jsx4("div", { className: "mb-2 text-[var(--font-size-xs)] text-muted-foreground", children: formatTime(item.timestamp) }),
|
|
174
|
+
item.content && /* @__PURE__ */ jsx4(Markdown, { className: "tangle-prose text-[var(--font-size-base)] leading-[var(--line-height-base)]", children: item.content }),
|
|
175
|
+
item.isStreaming && /* @__PURE__ */ jsx4("span", { className: "ml-0.5 inline-block h-4 w-2 animate-pulse rounded-sm bg-primary align-text-bottom" }),
|
|
176
176
|
item.toolCalls && /* @__PURE__ */ jsx4("div", { className: "mt-3", children: item.toolCalls }),
|
|
177
|
-
item.after && /* @__PURE__ */ jsx4("div", { className: "mt-3 border-t border-
|
|
177
|
+
item.after && /* @__PURE__ */ jsx4("div", { className: "mt-3 border-t border-border pt-3", children: item.after })
|
|
178
178
|
] });
|
|
179
179
|
}
|
|
180
180
|
function StatusCard({ item }) {
|
|
@@ -184,18 +184,18 @@ function StatusCard({ item }) {
|
|
|
184
184
|
/* @__PURE__ */ jsx4(Icon, { className: cn("mt-0.5 h-4 w-4 shrink-0", tone.text) }),
|
|
185
185
|
/* @__PURE__ */ jsxs3("div", { className: "min-w-0", children: [
|
|
186
186
|
/* @__PURE__ */ jsx4("div", { className: cn("text-sm font-medium", tone.text), children: item.label }),
|
|
187
|
-
item.detail && /* @__PURE__ */ jsx4("div", { className: "mt-0.5 text-sm text-
|
|
187
|
+
item.detail && /* @__PURE__ */ jsx4("div", { className: "mt-0.5 text-sm text-muted-foreground", children: item.detail })
|
|
188
188
|
] })
|
|
189
189
|
] }) });
|
|
190
190
|
}
|
|
191
191
|
function ArtifactCard({ item }) {
|
|
192
192
|
const tone = TONE_STYLES[item.tone ?? "default"];
|
|
193
193
|
const content = /* @__PURE__ */ jsx4("div", { className: cn("rounded-[var(--radius-lg)] border px-4 py-3", tone.card), children: /* @__PURE__ */ jsxs3("div", { className: "flex items-start gap-3", children: [
|
|
194
|
-
/* @__PURE__ */ jsx4("div", { className: "mt-0.5 flex h-
|
|
194
|
+
/* @__PURE__ */ jsx4("div", { className: "mt-0.5 flex h-[var(--avatar-size)] w-[var(--avatar-size)] shrink-0 items-center justify-center rounded-[var(--radius-md)] bg-muted/50 text-foreground", children: item.icon ?? /* @__PURE__ */ jsx4(FileText, { className: "h-4 w-4" }) }),
|
|
195
195
|
/* @__PURE__ */ jsxs3("div", { className: "min-w-0 flex-1", children: [
|
|
196
|
-
/* @__PURE__ */ jsx4("div", { className: "text-sm font-medium text-
|
|
197
|
-
item.description && /* @__PURE__ */ jsx4("div", { className: "mt-1 text-sm text-
|
|
198
|
-
item.meta && /* @__PURE__ */ jsx4("div", { className: "mt-2 flex flex-wrap items-center gap-2 text-xs text-
|
|
196
|
+
/* @__PURE__ */ jsx4("div", { className: "text-sm font-medium text-foreground", children: item.title }),
|
|
197
|
+
item.description && /* @__PURE__ */ jsx4("div", { className: "mt-1 text-sm text-muted-foreground", children: item.description }),
|
|
198
|
+
item.meta && /* @__PURE__ */ jsx4("div", { className: "mt-2 flex flex-wrap items-center gap-2 text-xs text-muted-foreground", children: item.meta })
|
|
199
199
|
] }),
|
|
200
200
|
item.action && /* @__PURE__ */ jsx4("div", { className: "shrink-0", children: item.action })
|
|
201
201
|
] }) });
|
|
@@ -212,7 +212,7 @@ function ArtifactCard({ item }) {
|
|
|
212
212
|
item.onClick?.();
|
|
213
213
|
}
|
|
214
214
|
},
|
|
215
|
-
className: "block w-full text-left transition-transform hover:-translate-y-0.5 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-
|
|
215
|
+
className: "block w-full text-left transition-transform hover:-translate-y-0.5 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/60",
|
|
216
216
|
children: content
|
|
217
217
|
}
|
|
218
218
|
);
|
|
@@ -309,7 +309,11 @@ function ChatInput({
|
|
|
309
309
|
accept,
|
|
310
310
|
dropTitle = "Drop files to add context",
|
|
311
311
|
dropDescription = "Files will be attached to your next message.",
|
|
312
|
-
className
|
|
312
|
+
className,
|
|
313
|
+
inputLabel = "Agent Command Deck",
|
|
314
|
+
idleStatus = "Ready for next instruction",
|
|
315
|
+
streamingStatus = "Streaming response",
|
|
316
|
+
hideShortcutHint
|
|
313
317
|
}) {
|
|
314
318
|
const [value, setValue] = useState2("");
|
|
315
319
|
const [dragOver, setDragOver] = useState2(false);
|
|
@@ -398,10 +402,10 @@ function ChatInput({
|
|
|
398
402
|
onDragOver: onAttach ? handleDragOver : void 0,
|
|
399
403
|
onDrop: onAttach ? handleDrop : void 0,
|
|
400
404
|
children: [
|
|
401
|
-
dragOver && /* @__PURE__ */ jsx5("div", { className: "absolute inset-0 z-10 flex items-center justify-center rounded-[var(--radius-xl)] border-2 border-dashed border-
|
|
402
|
-
/* @__PURE__ */ jsx5("div", { className: "mx-auto mb-3 flex h-12 w-12 items-center justify-center rounded-xl bg-[var(--accent-surface-soft)]", children: /* @__PURE__ */ jsx5(Upload, { className: "h-6 w-6 text-
|
|
403
|
-
/* @__PURE__ */ jsx5("p", { className: "text-sm font-semibold text-
|
|
404
|
-
/* @__PURE__ */ jsx5("p", { className: "mt-1 text-xs text-
|
|
405
|
+
dragOver && /* @__PURE__ */ jsx5("div", { className: "absolute inset-0 z-10 flex items-center justify-center rounded-[var(--radius-xl)] border-2 border-dashed border-border bg-card pointer-events-none", children: /* @__PURE__ */ jsxs4("div", { className: "text-center", children: [
|
|
406
|
+
/* @__PURE__ */ jsx5("div", { className: "mx-auto mb-3 flex h-12 w-12 items-center justify-center rounded-xl bg-[var(--accent-surface-soft)]", children: /* @__PURE__ */ jsx5(Upload, { className: "h-6 w-6 text-primary" }) }),
|
|
407
|
+
/* @__PURE__ */ jsx5("p", { className: "text-sm font-semibold text-foreground", children: dropTitle }),
|
|
408
|
+
/* @__PURE__ */ jsx5("p", { className: "mt-1 text-xs text-muted-foreground", children: dropDescription })
|
|
405
409
|
] }) }),
|
|
406
410
|
pendingFiles.length > 0 && /* @__PURE__ */ jsxs4("div", { className: "mb-3 flex flex-wrap gap-2", children: [
|
|
407
411
|
folderChips.map((f) => /* @__PURE__ */ jsxs4(
|
|
@@ -409,26 +413,26 @@ function ChatInput({
|
|
|
409
413
|
{
|
|
410
414
|
className: cn(
|
|
411
415
|
"inline-flex items-center gap-1.5 rounded-[var(--radius-full)] border px-3 py-1.5 text-xs",
|
|
412
|
-
"border-
|
|
416
|
+
"border-border bg-muted/50",
|
|
413
417
|
f.status === "error" && "border-[var(--code-error)]/30 text-[var(--code-error)]",
|
|
414
|
-
f.status !== "error" && "text-
|
|
418
|
+
f.status !== "error" && "text-foreground"
|
|
415
419
|
),
|
|
416
420
|
children: [
|
|
417
421
|
/* @__PURE__ */ jsx5(FolderUp, { className: "h-3 w-3 shrink-0" }),
|
|
418
422
|
/* @__PURE__ */ jsx5("span", { className: "truncate max-w-[150px]", children: f.name }),
|
|
419
|
-
f.fileCount !== void 0 && /* @__PURE__ */ jsxs4("span", { className: "text-
|
|
423
|
+
f.fileCount !== void 0 && /* @__PURE__ */ jsxs4("span", { className: "text-muted-foreground", children: [
|
|
420
424
|
"(",
|
|
421
425
|
f.fileCount,
|
|
422
426
|
")"
|
|
423
427
|
] }),
|
|
424
|
-
f.status === "uploading" && /* @__PURE__ */ jsx5("span", { className: "w-3 h-3 border-2 border-
|
|
428
|
+
f.status === "uploading" && /* @__PURE__ */ jsx5("span", { className: "w-3 h-3 border-2 border-primary border-t-transparent rounded-full animate-spin" }),
|
|
425
429
|
onRemoveFile && /* @__PURE__ */ jsx5(
|
|
426
430
|
"button",
|
|
427
431
|
{
|
|
428
432
|
type: "button",
|
|
429
433
|
"aria-label": `Remove ${f.name}`,
|
|
430
434
|
onClick: () => onRemoveFile(f.id),
|
|
431
|
-
className: "rounded p-0.5 transition-colors hover:text-
|
|
435
|
+
className: "rounded p-0.5 transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/60",
|
|
432
436
|
children: /* @__PURE__ */ jsx5(X, { className: "h-3 w-3" })
|
|
433
437
|
}
|
|
434
438
|
)
|
|
@@ -441,21 +445,21 @@ function ChatInput({
|
|
|
441
445
|
{
|
|
442
446
|
className: cn(
|
|
443
447
|
"inline-flex items-center gap-1.5 rounded-[var(--radius-full)] border px-3 py-1.5 text-xs",
|
|
444
|
-
"border-
|
|
448
|
+
"border-border bg-muted/50",
|
|
445
449
|
f.status === "error" && "border-[var(--code-error)]/30 text-[var(--code-error)]",
|
|
446
|
-
f.status !== "error" && "text-
|
|
450
|
+
f.status !== "error" && "text-foreground"
|
|
447
451
|
),
|
|
448
452
|
children: [
|
|
449
453
|
/* @__PURE__ */ jsx5(Paperclip, { className: "h-3 w-3 shrink-0" }),
|
|
450
454
|
/* @__PURE__ */ jsx5("span", { className: "truncate max-w-[150px]", children: f.name }),
|
|
451
|
-
f.status === "uploading" && /* @__PURE__ */ jsx5("span", { className: "w-3 h-3 border-2 border-
|
|
455
|
+
f.status === "uploading" && /* @__PURE__ */ jsx5("span", { className: "w-3 h-3 border-2 border-primary border-t-transparent rounded-full animate-spin" }),
|
|
452
456
|
onRemoveFile && /* @__PURE__ */ jsx5(
|
|
453
457
|
"button",
|
|
454
458
|
{
|
|
455
459
|
type: "button",
|
|
456
460
|
"aria-label": `Remove ${f.name}`,
|
|
457
461
|
onClick: () => onRemoveFile(f.id),
|
|
458
|
-
className: "rounded p-0.5 transition-colors hover:text-
|
|
462
|
+
className: "rounded p-0.5 transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/60",
|
|
459
463
|
children: /* @__PURE__ */ jsx5(X, { className: "h-3 w-3" })
|
|
460
464
|
}
|
|
461
465
|
)
|
|
@@ -464,10 +468,10 @@ function ChatInput({
|
|
|
464
468
|
f.id
|
|
465
469
|
))
|
|
466
470
|
] }),
|
|
467
|
-
/* @__PURE__ */ jsx5("div", { className: "rounded-[var(--radius-xl)] border border-[var(--border-default)]
|
|
468
|
-
/* @__PURE__ */ jsxs4("div", { className: "mb-1.5 flex items-center justify-between gap-3 px-1", children: [
|
|
469
|
-
/* @__PURE__ */ jsx5("div", { className: "text-[11px] font-
|
|
470
|
-
/* @__PURE__ */ jsx5("div", { className: "text-[11px] text-[var(--text-muted)]", children: isStreaming ?
|
|
471
|
+
/* @__PURE__ */ jsx5("div", { className: "rounded-[var(--radius-xl)] border border-[var(--chat-input-border,var(--border-default))] [background:var(--chat-input-bg,var(--depth-2))] shadow-[var(--chat-input-shadow,var(--shadow-card))] transition-all focus-within:border-[var(--chat-input-focus-border,var(--border-accent))] focus-within:shadow-[var(--chat-input-focus-shadow,var(--shadow-card))]", children: /* @__PURE__ */ jsxs4("div", { className: "rounded-[var(--radius-xl)] px-3 py-[var(--chat-input-py)]", children: [
|
|
472
|
+
(inputLabel !== null || idleStatus !== null || streamingStatus !== null) && /* @__PURE__ */ jsxs4("div", { className: "mb-1.5 flex items-center justify-between gap-3 px-1", children: [
|
|
473
|
+
inputLabel !== null && /* @__PURE__ */ jsx5("div", { className: "text-[var(--chat-label-size,11px)] font-[var(--chat-label-weight,600)] uppercase tracking-[var(--chat-label-tracking,0.16em)] text-[var(--text-muted)]", children: inputLabel }),
|
|
474
|
+
(idleStatus !== null || streamingStatus !== null) && /* @__PURE__ */ jsx5("div", { className: "text-[var(--chat-label-size,11px)] text-[var(--text-muted)]", children: isStreaming ? streamingStatus ?? "" : idleStatus ?? "" })
|
|
471
475
|
] }),
|
|
472
476
|
/* @__PURE__ */ jsxs4("div", { className: "flex items-end gap-2", children: [
|
|
473
477
|
onAttach && /* @__PURE__ */ jsxs4(Fragment, { children: [
|
|
@@ -479,7 +483,7 @@ function ChatInput({
|
|
|
479
483
|
disabled: isStreaming,
|
|
480
484
|
"aria-label": "Attach files",
|
|
481
485
|
title: "Attach files",
|
|
482
|
-
className: "mb-0.5 shrink-0 rounded-[var(--radius-md)] border border-transparent p-2 text-
|
|
486
|
+
className: "mb-0.5 shrink-0 rounded-[var(--radius-md)] border border-transparent p-2 text-muted-foreground transition-colors hover:border-border hover:bg-accent hover:text-foreground disabled:opacity-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/60",
|
|
483
487
|
children: /* @__PURE__ */ jsx5(Paperclip, { className: "h-4 w-4" })
|
|
484
488
|
}
|
|
485
489
|
),
|
|
@@ -504,7 +508,7 @@ function ChatInput({
|
|
|
504
508
|
disabled: isStreaming,
|
|
505
509
|
"aria-label": "Attach folder",
|
|
506
510
|
title: "Attach folder",
|
|
507
|
-
className: "mb-0.5 shrink-0 rounded-[var(--radius-md)] border border-transparent p-2 text-
|
|
511
|
+
className: "mb-0.5 shrink-0 rounded-[var(--radius-md)] border border-transparent p-2 text-muted-foreground transition-colors hover:border-border hover:bg-accent hover:text-foreground disabled:opacity-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/60",
|
|
508
512
|
children: /* @__PURE__ */ jsx5(FolderUp, { className: "h-4 w-4" })
|
|
509
513
|
}
|
|
510
514
|
),
|
|
@@ -531,7 +535,7 @@ function ChatInput({
|
|
|
531
535
|
disabled: isStreaming || disabled,
|
|
532
536
|
rows: 1,
|
|
533
537
|
"aria-label": "Message input",
|
|
534
|
-
className: "min-h-[32px] max-h-[120px] flex-1 resize-none bg-transparent text-[14px] leading-6 text-
|
|
538
|
+
className: "min-h-[32px] max-h-[120px] flex-1 resize-none bg-transparent text-[14px] leading-6 text-foreground placeholder:text-muted-foreground disabled:opacity-50 focus-visible:outline-none"
|
|
535
539
|
}
|
|
536
540
|
),
|
|
537
541
|
isStreaming ? /* @__PURE__ */ jsx5(
|
|
@@ -550,29 +554,29 @@ function ChatInput({
|
|
|
550
554
|
onClick: handleSend,
|
|
551
555
|
disabled: !value.trim() || disabled,
|
|
552
556
|
"aria-label": "Send message",
|
|
553
|
-
className: "mb-0.5 shrink-0 rounded-[var(--radius-lg)] border border-[var(--border-accent)]
|
|
557
|
+
className: "mb-0.5 shrink-0 rounded-[var(--chat-send-radius,var(--radius-lg))] border border-[var(--chat-send-border,var(--border-accent))] [background:var(--chat-send-bg,var(--accent-surface-soft))] p-2.5 text-[var(--chat-send-color,var(--accent-text))] shadow-[var(--chat-send-shadow,none)] transition-all hover:translate-y-[-1px] hover:[background:var(--chat-send-hover-bg,var(--accent-surface-strong))] disabled:opacity-30 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--chat-send-ring,var(--border-accent))]",
|
|
554
558
|
children: /* @__PURE__ */ jsx5(Send, { className: "h-4 w-4" })
|
|
555
559
|
}
|
|
556
560
|
)
|
|
557
561
|
] })
|
|
558
562
|
] }) }),
|
|
559
|
-
/* @__PURE__ */ jsxs4("div", { className: "mt-2 flex items-center justify-between px-1", children: [
|
|
563
|
+
(modelLabel || !hideShortcutHint) && /* @__PURE__ */ jsxs4("div", { className: "mt-2 flex items-center justify-between px-1", children: [
|
|
560
564
|
/* @__PURE__ */ jsx5("div", { className: "flex items-center gap-2", children: modelLabel && /* @__PURE__ */ jsxs4(
|
|
561
565
|
"button",
|
|
562
566
|
{
|
|
563
567
|
type: "button",
|
|
564
568
|
onClick: onModelClick,
|
|
565
569
|
"aria-label": `Select model, current model ${modelLabel}`,
|
|
566
|
-
className: "inline-flex items-center gap-1.5 rounded-[var(--radius-full)] border border-
|
|
570
|
+
className: "inline-flex items-center gap-1.5 rounded-[var(--radius-full)] border border-border bg-[linear-gradient(180deg,rgba(255,255,255,0.04),transparent)] px-2.5 py-1 text-xs text-muted-foreground transition-colors hover:border-primary/20 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/60",
|
|
567
571
|
children: [
|
|
568
572
|
/* @__PURE__ */ jsx5("span", { className: "w-1.5 h-1.5 rounded-full bg-[var(--code-success)]" }),
|
|
569
573
|
modelLabel
|
|
570
574
|
]
|
|
571
575
|
}
|
|
572
576
|
) }),
|
|
573
|
-
/* @__PURE__ */ jsxs4("span", { className: "text-xs text-
|
|
574
|
-
/* @__PURE__ */ jsx5("kbd", { className: "px-1 py-0.5 bg-
|
|
575
|
-
/* @__PURE__ */ jsx5("kbd", { className: "px-1 py-0.5 bg-
|
|
577
|
+
!hideShortcutHint && /* @__PURE__ */ jsxs4("span", { className: "text-xs text-muted-foreground", children: [
|
|
578
|
+
/* @__PURE__ */ jsx5("kbd", { className: "px-1 py-0.5 bg-background rounded border border-border text-[10px]", children: "Cmd" }),
|
|
579
|
+
/* @__PURE__ */ jsx5("kbd", { className: "px-1 py-0.5 bg-background rounded border border-border text-[10px] ml-0.5", children: "L" }),
|
|
576
580
|
/* @__PURE__ */ jsx5("span", { className: "ml-1", children: "to focus" })
|
|
577
581
|
] })
|
|
578
582
|
] })
|
|
@@ -739,7 +743,7 @@ function buildTimelineItems(messages, partMap, isStreaming, onOpenUIAction, enab
|
|
|
739
743
|
items.push({
|
|
740
744
|
id: `${message.id}-openui-${part.id}`,
|
|
741
745
|
kind: "custom",
|
|
742
|
-
content: /* @__PURE__ */ jsx6("div", { className: "my-2 rounded-[var(--radius-lg)] border border-
|
|
746
|
+
content: /* @__PURE__ */ jsx6("div", { className: "my-2 rounded-[var(--radius-lg)] border border-border bg-card p-4 shadow-[var(--shadow-card)]", children: /* @__PURE__ */ jsx6(OpenUIArtifactRenderer, { schema, onAction: onOpenUIAction }) })
|
|
743
747
|
});
|
|
744
748
|
}
|
|
745
749
|
}
|
|
@@ -771,7 +775,7 @@ function buildTimelineItems(messages, partMap, isStreaming, onOpenUIAction, enab
|
|
|
771
775
|
items.push({
|
|
772
776
|
id: `${itemId}-openui`,
|
|
773
777
|
kind: "custom",
|
|
774
|
-
content: /* @__PURE__ */ jsx6("div", { className: "my-2 rounded-[var(--radius-lg)] border border-
|
|
778
|
+
content: /* @__PURE__ */ jsx6("div", { className: "my-2 rounded-[var(--radius-lg)] border border-border bg-card p-4 shadow-[var(--shadow-card)]", children: /* @__PURE__ */ jsx6(OpenUIArtifactRenderer, { schema, onAction: onOpenUIAction }) })
|
|
775
779
|
});
|
|
776
780
|
const afterJson = part.text.slice(part.text.lastIndexOf("```") + 3).trim();
|
|
777
781
|
if (afterJson) {
|
|
@@ -863,9 +867,9 @@ var ChatContainer = memo3(
|
|
|
863
867
|
{
|
|
864
868
|
ref: scrollRef,
|
|
865
869
|
className: "flex-1 overflow-y-auto px-4 py-2 [scrollbar-gutter:stable]",
|
|
866
|
-
children: messages.length === 0 ? /* @__PURE__ */ jsx6("div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ jsxs5("div", { className: "max-w-md rounded-[var(--radius-xl)] border border-
|
|
867
|
-
/* @__PURE__ */ jsx6("div", { className: "text-sm font-semibold text-
|
|
868
|
-
/* @__PURE__ */ jsx6("div", { className: "mt-2 text-sm leading-relaxed text-
|
|
870
|
+
children: messages.length === 0 ? /* @__PURE__ */ jsx6("div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ jsxs5("div", { className: "max-w-md rounded-[var(--radius-xl)] border border-border bg-[linear-gradient(180deg,rgba(255,255,255,0.03),transparent)] px-5 py-5 text-center shadow-[var(--shadow-card)]", children: [
|
|
871
|
+
/* @__PURE__ */ jsx6("div", { className: "text-sm font-semibold text-foreground", children: "Start the filing workflow" }),
|
|
872
|
+
/* @__PURE__ */ jsx6("div", { className: "mt-2 text-sm leading-relaxed text-muted-foreground", children: "Ask the agent to analyze documents, generate forms, explain a calculation, or review the current filing package." })
|
|
869
873
|
] }) }) : presentation === "timeline" ? /* @__PURE__ */ jsx6(AgentTimeline, { items: timeline.items, isThinking: timeline.showThinking }) : /* @__PURE__ */ jsx6("div", { className: "mx-auto flex w-full max-w-5xl flex-col gap-3", children: /* @__PURE__ */ jsx6(
|
|
870
874
|
MessageList,
|
|
871
875
|
{
|
|
@@ -888,9 +892,9 @@ var ChatContainer = memo3(
|
|
|
888
892
|
onClick: scrollToBottom,
|
|
889
893
|
className: cn(
|
|
890
894
|
"flex items-center gap-1.5 px-3 py-1.5 rounded-full",
|
|
891
|
-
"border border-
|
|
892
|
-
"text-xs text-
|
|
893
|
-
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-
|
|
895
|
+
"border border-border bg-card shadow-[var(--shadow-card)]",
|
|
896
|
+
"text-xs text-foreground transition-colors hover:bg-accent",
|
|
897
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/60"
|
|
894
898
|
),
|
|
895
899
|
children: [
|
|
896
900
|
/* @__PURE__ */ jsx6(ArrowDown, { className: "w-3 h-3" }),
|
|
@@ -911,7 +915,7 @@ var ChatContainer = memo3(
|
|
|
911
915
|
onRemoveFile,
|
|
912
916
|
onAttach,
|
|
913
917
|
disabled,
|
|
914
|
-
className: "shrink-0 border-t border-
|
|
918
|
+
className: "shrink-0 border-t border-border bg-background"
|
|
915
919
|
}
|
|
916
920
|
)
|
|
917
921
|
] });
|