@wrongstack/webui 0.291.0 → 0.291.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/dist/assets/{AnalyticsDashboard-DGSAut_P.js → AnalyticsDashboard-BBbdycai.js} +1 -1
- package/dist/assets/{AudienceMemoryPanel-DjdzWznT.js → AudienceMemoryPanel-BWcCpuCv.js} +1 -1
- package/dist/assets/{ChangesView-BY9-680w.js → ChangesView-Bwb4Qh4n.js} +1 -1
- package/dist/assets/{ChronicleDashboard-_i-J0z7w.js → ChronicleDashboard-oOlGTsm5.js} +1 -1
- package/dist/assets/{CodeEditor-UhIn6DIp.js → CodeEditor-Bt9fqzjU.js} +1 -1
- package/dist/assets/{CronJobsPanel-BKknBQzw.js → CronJobsPanel-i2-zcKIC.js} +1 -1
- package/dist/assets/{DebugDashboard-D47dsdl6.js → DebugDashboard-CCe1PP60.js} +1 -1
- package/dist/assets/{DesignGalleryView-B2yA--3z.js → DesignGalleryView-BDxyVUoW.js} +1 -1
- package/dist/assets/{GoalView-BEX-kC__.js → GoalView-Ck6Oa8nh.js} +1 -1
- package/dist/assets/{KanbanView-C9EY0_-X.js → KanbanView-BSoNz6a-.js} +1 -1
- package/dist/assets/LazyMarkdown-CGMv69IJ.js +3 -0
- package/dist/assets/MailboxDetailView-Dr3B9nM0.js +1 -0
- package/dist/assets/MemoryManager-BQZeiYDi.js +1 -0
- package/dist/assets/{ModelPicker-DPNTWYxu.js → ModelPicker-DwoHlu_Q.js} +1 -1
- package/dist/assets/OfficeMapPanel-CA-BmADR.js +4 -0
- package/dist/assets/{ProcessMonitor-C9yCk-bu.js → ProcessMonitor-7mzC-JTl.js} +1 -1
- package/dist/assets/{QueuePanel-SPyWkHtD.js → QueuePanel-DNccWIKx.js} +1 -1
- package/dist/assets/{RefreshDebugView-k1iKV6Hh.js → RefreshDebugView-2Ockf4po.js} +1 -1
- package/dist/assets/{SddHub-CktdOif3.js → SddHub-Cg63TJIL.js} +1 -1
- package/dist/assets/{SessionsDashboard-DMaHyATc.js → SessionsDashboard-yrSEaUdc.js} +1 -1
- package/dist/assets/{SetupScreen-D7_1mlMi.js → SetupScreen-BFfYTt1L.js} +1 -1
- package/dist/assets/{SkillDetailView-DGDLax2X.js → SkillDetailView-Sqe-T3-x.js} +2 -2
- package/dist/assets/{SpecsView-ecFmV6N0.js → SpecsView-DFj6_8G5.js} +1 -1
- package/dist/assets/{TechStackView-CVdayRXB.js → TechStackView-DPxBWfsU.js} +1 -1
- package/dist/assets/{TerminalPanel-Dd3kbKFo.js → TerminalPanel-B-BSGITg.js} +1 -1
- package/dist/assets/index-CuByAUEC.css +1 -0
- package/dist/assets/{index-DeInm8PK.js → index-D_QeLLAg.js} +16 -16
- package/dist/assets/{stores-j4CUJPI1.js → stores-BazbaxhT.js} +1 -1
- package/dist/assets/{useWebSocket-6y5oEA6Z.js → useWebSocket-BEkBQAAR.js} +2 -2
- package/dist/assets/{ws-client-fBMR5Zg-.js → ws-client-BOKgdABR.js} +1 -1
- package/dist/components/MemoryManager/index.d.ts.map +1 -1
- package/dist/components/MessageBubble/index.d.ts.map +1 -1
- package/dist/components/MessageBubble/utils.d.ts.map +1 -1
- package/dist/components/WatchMessageBubble.d.ts +1 -1
- package/dist/components/WatchMessageBubble.d.ts.map +1 -1
- package/dist/hooks/useWebSocket.d.ts +7 -0
- package/dist/hooks/useWebSocket.d.ts.map +1 -1
- package/dist/index.html +7 -7
- package/dist/index.js +625 -340
- package/dist/index.js.map +4 -4
- package/dist/lib/ws-client.d.ts +12 -0
- package/dist/lib/ws-client.d.ts.map +1 -1
- package/dist/types.d.ts +20 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +6 -6
- package/dist/assets/MailboxDetailView-DqCY91Vm.js +0 -1
- package/dist/assets/MemoryManager-QB0lTAxf.js +0 -1
- package/dist/assets/OfficeMapPanel-Duzb5VQW.js +0 -4
- package/dist/assets/index-B-xfHdYd.css +0 -1
- package/dist/assets/utils-dYJO5odh.js +0 -3
package/dist/index.js
CHANGED
|
@@ -20514,6 +20514,7 @@ var init_ws_client = __esm({
|
|
|
20514
20514
|
"memory.list": "memory.list",
|
|
20515
20515
|
"memory.super.get": "memory.super.get",
|
|
20516
20516
|
"memory.super.list": "memory.super.list",
|
|
20517
|
+
"memory.super.listPage": "memory.super.listPage",
|
|
20517
20518
|
"memory.super.remember": "memory.super.remember",
|
|
20518
20519
|
"memory.super.update": "memory.super.update",
|
|
20519
20520
|
"skills.list": "skills.list",
|
|
@@ -21050,6 +21051,14 @@ var init_ws_client = __esm({
|
|
|
21050
21051
|
listSuperMemories(options) {
|
|
21051
21052
|
this.send({ type: "memory.super.list" }, options);
|
|
21052
21053
|
}
|
|
21054
|
+
/**
|
|
21055
|
+
* Paginated, status-filtered listing. Defaults (server-side) to every status
|
|
21056
|
+
* except `deleted`. Pass `{ statuses: ['deleted'] }` for the "Deleted" tab and
|
|
21057
|
+
* `cursor` (from the previous page's `nextCursor`) to load the next page.
|
|
21058
|
+
*/
|
|
21059
|
+
listSuperMemoriesPage(params, options) {
|
|
21060
|
+
this.send({ type: "memory.super.listPage", payload: { ...params } }, options);
|
|
21061
|
+
}
|
|
21053
21062
|
getSuperMemory(id, options) {
|
|
21054
21063
|
this.send({ type: "memory.super.get", payload: { id } }, options);
|
|
21055
21064
|
}
|
|
@@ -27047,6 +27056,10 @@ function useWebSocket() {
|
|
|
27047
27056
|
(options) => client2.listSuperMemories(options),
|
|
27048
27057
|
[client2]
|
|
27049
27058
|
);
|
|
27059
|
+
const listSuperMemoriesPage = useCallback(
|
|
27060
|
+
(params, options) => client2.listSuperMemoriesPage(params, options),
|
|
27061
|
+
[client2]
|
|
27062
|
+
);
|
|
27050
27063
|
const getSuperMemory = useCallback(
|
|
27051
27064
|
(id, options) => client2.getSuperMemory(id, options),
|
|
27052
27065
|
[client2]
|
|
@@ -27156,6 +27169,7 @@ function useWebSocket() {
|
|
|
27156
27169
|
listTools,
|
|
27157
27170
|
listMemory,
|
|
27158
27171
|
listSuperMemories,
|
|
27172
|
+
listSuperMemoriesPage,
|
|
27159
27173
|
getSuperMemory,
|
|
27160
27174
|
updateSuperMemory,
|
|
27161
27175
|
deleteSuperMemory,
|
|
@@ -27464,25 +27478,11 @@ var init_usePagination = __esm({
|
|
|
27464
27478
|
}
|
|
27465
27479
|
});
|
|
27466
27480
|
|
|
27467
|
-
// src/components/MessageBubble/LazyMarkdown.tsx
|
|
27468
|
-
import { lazy, Suspense } from "react";
|
|
27469
|
-
import { jsx as jsx24 } from "react/jsx-runtime";
|
|
27470
|
-
function LazyMarkdown(props) {
|
|
27471
|
-
return /* @__PURE__ */ jsx24(Suspense, { fallback: null, children: /* @__PURE__ */ jsx24(ReactMarkdownLazy, { ...props }) });
|
|
27472
|
-
}
|
|
27473
|
-
var ReactMarkdownLazy;
|
|
27474
|
-
var init_LazyMarkdown = __esm({
|
|
27475
|
-
"src/components/MessageBubble/LazyMarkdown.tsx"() {
|
|
27476
|
-
"use strict";
|
|
27477
|
-
ReactMarkdownLazy = lazy(() => import("react-markdown"));
|
|
27478
|
-
}
|
|
27479
|
-
});
|
|
27480
|
-
|
|
27481
27481
|
// src/components/DiffView.tsx
|
|
27482
27482
|
import { computeLineDiff, parseUnifiedDiff } from "@wrongstack/tools/tool-diff";
|
|
27483
27483
|
import { memo, useMemo as useMemo8 } from "react";
|
|
27484
27484
|
import { diffFromToolInput } from "@wrongstack/tools/tool-diff";
|
|
27485
|
-
import { jsx as
|
|
27485
|
+
import { jsx as jsx24, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
27486
27486
|
var DiffView, ToolDiffView, DiffRows;
|
|
27487
27487
|
var init_DiffView = __esm({
|
|
27488
27488
|
"src/components/DiffView.tsx"() {
|
|
@@ -27491,14 +27491,14 @@ var init_DiffView = __esm({
|
|
|
27491
27491
|
init_i18n();
|
|
27492
27492
|
DiffView = memo(function DiffView2({ oldText, newText, caption, fill }) {
|
|
27493
27493
|
const rows = useMemo8(() => computeLineDiff(oldText, newText), [oldText, newText]);
|
|
27494
|
-
return /* @__PURE__ */
|
|
27494
|
+
return /* @__PURE__ */ jsx24(DiffRows, { rows, caption, fill });
|
|
27495
27495
|
});
|
|
27496
27496
|
ToolDiffView = memo(function ToolDiffView2({ diff, fill }) {
|
|
27497
27497
|
const rows = useMemo8(
|
|
27498
27498
|
() => diff.mode === "unified" ? parseUnifiedDiff(diff.patchText) : computeLineDiff(diff.oldText, diff.newText),
|
|
27499
27499
|
[diff]
|
|
27500
27500
|
);
|
|
27501
|
-
return /* @__PURE__ */
|
|
27501
|
+
return /* @__PURE__ */ jsx24(DiffRows, { rows, caption: diff.caption, fill });
|
|
27502
27502
|
});
|
|
27503
27503
|
DiffRows = memo(function DiffRows2({
|
|
27504
27504
|
rows,
|
|
@@ -27507,7 +27507,7 @@ var init_DiffView = __esm({
|
|
|
27507
27507
|
}) {
|
|
27508
27508
|
const { t } = useTranslation();
|
|
27509
27509
|
if (rows === null) {
|
|
27510
|
-
return /* @__PURE__ */
|
|
27510
|
+
return /* @__PURE__ */ jsx24("div", { className: "text-xs text-muted-foreground italic px-3 py-2", children: t("activity:diff.tooLarge") });
|
|
27511
27511
|
}
|
|
27512
27512
|
const adds = rows.filter((r) => r.kind === "add").length;
|
|
27513
27513
|
const dels = rows.filter((r) => r.kind === "del").length;
|
|
@@ -27520,7 +27520,7 @@ var init_DiffView = __esm({
|
|
|
27520
27520
|
),
|
|
27521
27521
|
children: [
|
|
27522
27522
|
(caption || adds > 0 || dels > 0) && /* @__PURE__ */ jsxs21("div", { className: "flex items-center gap-2 px-3 py-1.5 border-b bg-muted/40 font-mono text-[11px]", children: [
|
|
27523
|
-
caption && /* @__PURE__ */
|
|
27523
|
+
caption && /* @__PURE__ */ jsx24("span", { className: "text-muted-foreground truncate", children: caption }),
|
|
27524
27524
|
/* @__PURE__ */ jsxs21("span", { className: "ml-auto flex items-center gap-2", children: [
|
|
27525
27525
|
adds > 0 && /* @__PURE__ */ jsxs21("span", { className: "text-success", children: [
|
|
27526
27526
|
"+",
|
|
@@ -27532,7 +27532,7 @@ var init_DiffView = __esm({
|
|
|
27532
27532
|
] })
|
|
27533
27533
|
] })
|
|
27534
27534
|
] }),
|
|
27535
|
-
/* @__PURE__ */
|
|
27535
|
+
/* @__PURE__ */ jsx24("div", { className: cn("overflow-auto font-mono leading-relaxed", fill ? "flex-1 min-h-0" : "max-h-96"), children: rows.map((r, idx) => /* @__PURE__ */ jsxs21(
|
|
27536
27536
|
"div",
|
|
27537
27537
|
{
|
|
27538
27538
|
className: cn(
|
|
@@ -27542,7 +27542,7 @@ var init_DiffView = __esm({
|
|
|
27542
27542
|
r.kind === "meta" && "bg-muted/60"
|
|
27543
27543
|
),
|
|
27544
27544
|
children: [
|
|
27545
|
-
/* @__PURE__ */
|
|
27545
|
+
/* @__PURE__ */ jsx24(
|
|
27546
27546
|
"span",
|
|
27547
27547
|
{
|
|
27548
27548
|
"aria-hidden": true,
|
|
@@ -27555,7 +27555,7 @@ var init_DiffView = __esm({
|
|
|
27555
27555
|
children: r.kind === "add" ? "+" : r.kind === "del" ? "-" : r.kind === "meta" ? "@" : " "
|
|
27556
27556
|
}
|
|
27557
27557
|
),
|
|
27558
|
-
/* @__PURE__ */
|
|
27558
|
+
/* @__PURE__ */ jsx24(
|
|
27559
27559
|
"pre",
|
|
27560
27560
|
{
|
|
27561
27561
|
className: cn(
|
|
@@ -27580,7 +27580,7 @@ var init_DiffView = __esm({
|
|
|
27580
27580
|
import { Check as Check4, Copy, FileCode2 } from "lucide-react";
|
|
27581
27581
|
import { isValidElement, useCallback as useCallback8, useMemo as useMemo10, useState as useState21 } from "react";
|
|
27582
27582
|
import rehypeHighlight from "rehype-highlight";
|
|
27583
|
-
import { jsx as
|
|
27583
|
+
import { jsx as jsx27, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
27584
27584
|
async function copyToClipboard(text4) {
|
|
27585
27585
|
try {
|
|
27586
27586
|
if (typeof navigator !== "undefined" && navigator.clipboard?.writeText) {
|
|
@@ -27658,8 +27658,8 @@ function CodeCopyButton({ text: text4 }) {
|
|
|
27658
27658
|
),
|
|
27659
27659
|
title: copied ? t("common:action.copied") : t("common:action.copy"),
|
|
27660
27660
|
children: [
|
|
27661
|
-
copied ? /* @__PURE__ */
|
|
27662
|
-
/* @__PURE__ */
|
|
27661
|
+
copied ? /* @__PURE__ */ jsx27(Check4, { className: "h-3 w-3" }) : /* @__PURE__ */ jsx27(Copy, { className: "h-3 w-3" }),
|
|
27662
|
+
/* @__PURE__ */ jsx27("span", { children: copied ? t("common:action.copied") : t("common:action.copy") })
|
|
27663
27663
|
]
|
|
27664
27664
|
}
|
|
27665
27665
|
);
|
|
@@ -27692,7 +27692,7 @@ var init_utils2 = __esm({
|
|
|
27692
27692
|
const match = /language-(\w+)/.exec(className ?? "");
|
|
27693
27693
|
const codeText = codeNodeText(children).replace(/\n$/, "");
|
|
27694
27694
|
if (inline || !match) {
|
|
27695
|
-
return /* @__PURE__ */
|
|
27695
|
+
return /* @__PURE__ */ jsx27(
|
|
27696
27696
|
"code",
|
|
27697
27697
|
{
|
|
27698
27698
|
className: cn(
|
|
@@ -27709,28 +27709,36 @@ var init_utils2 = __esm({
|
|
|
27709
27709
|
return /* @__PURE__ */ jsxs24("div", { className: "not-prose relative my-3 rounded-lg border border-border overflow-hidden group/codeblock", children: [
|
|
27710
27710
|
/* @__PURE__ */ jsxs24("div", { className: "flex items-center justify-between px-3 py-1 border-b border-border text-xs", children: [
|
|
27711
27711
|
/* @__PURE__ */ jsxs24("div", { className: "flex items-center gap-2", children: [
|
|
27712
|
-
/* @__PURE__ */
|
|
27713
|
-
/* @__PURE__ */
|
|
27712
|
+
/* @__PURE__ */ jsx27(FileCode2, { className: "h-3 w-3 text-muted-foreground" }),
|
|
27713
|
+
/* @__PURE__ */ jsx27("span", { className: "font-mono text-muted-foreground font-medium", children: match[1] }),
|
|
27714
27714
|
lines.length > 0 && /* @__PURE__ */ jsxs24("span", { className: "text-[10px] text-muted-foreground/75 tabular-nums", children: [
|
|
27715
27715
|
lines.length,
|
|
27716
27716
|
" line",
|
|
27717
27717
|
lines.length === 1 ? "" : "s"
|
|
27718
27718
|
] })
|
|
27719
27719
|
] }),
|
|
27720
|
-
/* @__PURE__ */
|
|
27720
|
+
/* @__PURE__ */ jsx27(CodeCopyButton, { text: codeText })
|
|
27721
27721
|
] }),
|
|
27722
27722
|
hasLineNumbers ? /* @__PURE__ */ jsxs24("div", { className: "flex max-h-[40rem] overflow-auto", children: [
|
|
27723
|
-
/* @__PURE__ */
|
|
27723
|
+
/* @__PURE__ */ jsx27(
|
|
27724
27724
|
"pre",
|
|
27725
27725
|
{
|
|
27726
27726
|
"aria-hidden": true,
|
|
27727
27727
|
className: "text-xs font-mono leading-[1.55] py-3 pl-3 pr-2 text-muted-foreground/65 select-none border-r border-border/30 tabular-nums text-right shrink-0",
|
|
27728
|
-
children: lines.map((_, i) => /* @__PURE__ */
|
|
27728
|
+
children: lines.map((_, i) => /* @__PURE__ */ jsx27("div", { children: i + 1 }, i))
|
|
27729
27729
|
}
|
|
27730
27730
|
),
|
|
27731
|
-
/* @__PURE__ */
|
|
27732
|
-
] }) : /* @__PURE__ */
|
|
27733
|
-
/* @__PURE__ */
|
|
27731
|
+
/* @__PURE__ */ jsx27("pre", { className: "overflow-x-auto py-3 px-3 text-xs leading-[1.55] font-mono flex-1", children: /* @__PURE__ */ jsx27("code", { className: cn("hljs", className), ...props, children }) })
|
|
27732
|
+
] }) : /* @__PURE__ */ jsx27("pre", { className: "overflow-x-auto p-3 text-xs leading-relaxed font-mono max-h-[40rem]", children: /* @__PURE__ */ jsx27("code", { className: cn("hljs", className), ...props, children }) }),
|
|
27733
|
+
/* @__PURE__ */ jsx27(
|
|
27734
|
+
"div",
|
|
27735
|
+
{
|
|
27736
|
+
className: "pointer-events-none absolute bottom-8 left-0 right-0 h-8 opacity-0 group-hover/codeblock:opacity-100 transition-opacity",
|
|
27737
|
+
style: {
|
|
27738
|
+
background: "linear-gradient(to top, hsl(var(--foreground) / 0.08), transparent)"
|
|
27739
|
+
}
|
|
27740
|
+
}
|
|
27741
|
+
)
|
|
27734
27742
|
] });
|
|
27735
27743
|
}
|
|
27736
27744
|
};
|
|
@@ -27740,7 +27748,7 @@ var init_utils2 = __esm({
|
|
|
27740
27748
|
// src/components/MessageBubble/CopyButton.tsx
|
|
27741
27749
|
import { Copy as Copy2, Check as Check5 } from "lucide-react";
|
|
27742
27750
|
import { useState as useState22 } from "react";
|
|
27743
|
-
import { Fragment as Fragment8, jsx as
|
|
27751
|
+
import { Fragment as Fragment8, jsx as jsx28, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
27744
27752
|
function CopyButton({
|
|
27745
27753
|
text: text4,
|
|
27746
27754
|
className,
|
|
@@ -27749,7 +27757,7 @@ function CopyButton({
|
|
|
27749
27757
|
const { t } = useTranslation();
|
|
27750
27758
|
const [copied, setCopied] = useState22(false);
|
|
27751
27759
|
const labelText = label ?? t("common:action.copy");
|
|
27752
|
-
return /* @__PURE__ */
|
|
27760
|
+
return /* @__PURE__ */ jsx28(
|
|
27753
27761
|
"button",
|
|
27754
27762
|
{
|
|
27755
27763
|
type: "button",
|
|
@@ -27769,11 +27777,11 @@ function CopyButton({
|
|
|
27769
27777
|
),
|
|
27770
27778
|
title: labelText,
|
|
27771
27779
|
children: copied ? /* @__PURE__ */ jsxs25(Fragment8, { children: [
|
|
27772
|
-
/* @__PURE__ */
|
|
27773
|
-
/* @__PURE__ */
|
|
27780
|
+
/* @__PURE__ */ jsx28(Check5, { className: "h-3 w-3 text-success" }),
|
|
27781
|
+
/* @__PURE__ */ jsx28("span", { children: t("common:action.copied") })
|
|
27774
27782
|
] }) : /* @__PURE__ */ jsxs25(Fragment8, { children: [
|
|
27775
|
-
/* @__PURE__ */
|
|
27776
|
-
/* @__PURE__ */
|
|
27783
|
+
/* @__PURE__ */ jsx28(Copy2, { className: "h-3 w-3" }),
|
|
27784
|
+
/* @__PURE__ */ jsx28("span", { children: labelText })
|
|
27777
27785
|
] })
|
|
27778
27786
|
}
|
|
27779
27787
|
);
|
|
@@ -27791,7 +27799,7 @@ var init_CopyButton = __esm({
|
|
|
27791
27799
|
// src/components/MessageBubble/ErrorBody.tsx
|
|
27792
27800
|
import { expectDefined as expectDefined9 } from "@wrongstack/core";
|
|
27793
27801
|
import { useState as useState23 } from "react";
|
|
27794
|
-
import { jsx as
|
|
27802
|
+
import { jsx as jsx29, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
27795
27803
|
function detectStackBoundary(text4) {
|
|
27796
27804
|
const lines = text4.split("\n");
|
|
27797
27805
|
for (let i = 0; i < lines.length; i++) {
|
|
@@ -27807,15 +27815,15 @@ function ErrorBodyWithStack({ text: text4 }) {
|
|
|
27807
27815
|
const idx = detectStackBoundary(text4);
|
|
27808
27816
|
const [open, setOpen] = useState23(false);
|
|
27809
27817
|
if (idx === -1) {
|
|
27810
|
-
return /* @__PURE__ */
|
|
27818
|
+
return /* @__PURE__ */ jsx29("pre", { className: "whitespace-pre-wrap break-words font-mono text-xs leading-relaxed", children: text4 });
|
|
27811
27819
|
}
|
|
27812
27820
|
const lines = text4.split("\n");
|
|
27813
27821
|
const head = lines.slice(0, idx).join("\n").trim();
|
|
27814
27822
|
const stack = lines.slice(idx).join("\n");
|
|
27815
27823
|
const frameCount = stack.split("\n").filter((l) => l.trim().length > 0).length;
|
|
27816
|
-
return /* @__PURE__ */
|
|
27817
|
-
head && /* @__PURE__ */
|
|
27818
|
-
/* @__PURE__ */
|
|
27824
|
+
return /* @__PURE__ */ jsxs26("div", { className: "space-y-2", children: [
|
|
27825
|
+
head && /* @__PURE__ */ jsx29("pre", { className: "whitespace-pre-wrap break-words font-mono text-xs leading-relaxed", children: head }),
|
|
27826
|
+
/* @__PURE__ */ jsxs26(
|
|
27819
27827
|
"button",
|
|
27820
27828
|
{
|
|
27821
27829
|
type: "button",
|
|
@@ -27828,7 +27836,7 @@ function ErrorBodyWithStack({ text: text4 }) {
|
|
|
27828
27836
|
]
|
|
27829
27837
|
}
|
|
27830
27838
|
),
|
|
27831
|
-
open && /* @__PURE__ */
|
|
27839
|
+
open && /* @__PURE__ */ jsx29("pre", { className: "whitespace-pre-wrap break-words font-mono text-[11px] leading-snug bg-destructive/5 border border-destructive/20 rounded p-2 max-h-80 overflow-auto", children: stack })
|
|
27832
27840
|
] });
|
|
27833
27841
|
}
|
|
27834
27842
|
var init_ErrorBody = __esm({
|
|
@@ -27838,6 +27846,20 @@ var init_ErrorBody = __esm({
|
|
|
27838
27846
|
}
|
|
27839
27847
|
});
|
|
27840
27848
|
|
|
27849
|
+
// src/components/MessageBubble/LazyMarkdown.tsx
|
|
27850
|
+
import { lazy, Suspense } from "react";
|
|
27851
|
+
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
27852
|
+
function LazyMarkdown(props) {
|
|
27853
|
+
return /* @__PURE__ */ jsx30(Suspense, { fallback: null, children: /* @__PURE__ */ jsx30(ReactMarkdownLazy, { ...props }) });
|
|
27854
|
+
}
|
|
27855
|
+
var ReactMarkdownLazy;
|
|
27856
|
+
var init_LazyMarkdown = __esm({
|
|
27857
|
+
"src/components/MessageBubble/LazyMarkdown.tsx"() {
|
|
27858
|
+
"use strict";
|
|
27859
|
+
ReactMarkdownLazy = lazy(() => import("react-markdown"));
|
|
27860
|
+
}
|
|
27861
|
+
});
|
|
27862
|
+
|
|
27841
27863
|
// src/components/MessageBubble/ToolInputView.tsx
|
|
27842
27864
|
import { useState as useState24 } from "react";
|
|
27843
27865
|
import { jsx as jsx32, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
@@ -38736,7 +38758,7 @@ import { jsx as jsx127, jsxs as jsxs119 } from "react/jsx-runtime";
|
|
|
38736
38758
|
function MemoryManager() {
|
|
38737
38759
|
const {
|
|
38738
38760
|
client: client2,
|
|
38739
|
-
|
|
38761
|
+
listSuperMemoriesPage,
|
|
38740
38762
|
rememberSuperMemory,
|
|
38741
38763
|
updateSuperMemory,
|
|
38742
38764
|
deleteSuperMemory,
|
|
@@ -38766,6 +38788,12 @@ function MemoryManager() {
|
|
|
38766
38788
|
const [kindFilter, setKindFilter] = useState86("all");
|
|
38767
38789
|
const [audienceOnly, setAudienceOnly] = useState86(false);
|
|
38768
38790
|
const [tagFilter, setTagFilter] = useState86(null);
|
|
38791
|
+
const [showDeleted, setShowDeleted] = useState86(false);
|
|
38792
|
+
const [pageCursor, setPageCursor] = useState86(null);
|
|
38793
|
+
const [hasMore, setHasMore] = useState86(false);
|
|
38794
|
+
const [loadingMore, setLoadingMore] = useState86(false);
|
|
38795
|
+
const [statusCounts, setStatusCounts] = useState86({});
|
|
38796
|
+
const PAGE_SIZE = 100;
|
|
38769
38797
|
const [drawerOpen, setDrawerOpen] = useState86(false);
|
|
38770
38798
|
const [currentFilePath, setCurrentFilePath] = useState86(null);
|
|
38771
38799
|
const [cursorLineStart, setCursorLineStart] = useState86(void 0);
|
|
@@ -38784,12 +38812,17 @@ function MemoryManager() {
|
|
|
38784
38812
|
() => memories.find((memory) => memory.id === selectedId) ?? null,
|
|
38785
38813
|
[memories, selectedId]
|
|
38786
38814
|
);
|
|
38787
|
-
const
|
|
38815
|
+
const loadPage = useCallback50((cursor) => {
|
|
38816
|
+
const isAppend = cursor !== null;
|
|
38788
38817
|
const generation = ++listGenerationRef.current;
|
|
38789
38818
|
listCleanupRef.current?.();
|
|
38790
|
-
setRefreshing(true);
|
|
38791
38819
|
setLoadError(null);
|
|
38792
|
-
if (
|
|
38820
|
+
if (isAppend) {
|
|
38821
|
+
setLoadingMore(true);
|
|
38822
|
+
} else {
|
|
38823
|
+
setRefreshing(true);
|
|
38824
|
+
if (!hasLoadedRef.current) setInitialLoading(true);
|
|
38825
|
+
}
|
|
38793
38826
|
let off = () => {
|
|
38794
38827
|
};
|
|
38795
38828
|
let timeout = null;
|
|
@@ -38801,7 +38834,7 @@ function MemoryManager() {
|
|
|
38801
38834
|
off();
|
|
38802
38835
|
if (listCleanupRef.current === cleanup) listCleanupRef.current = null;
|
|
38803
38836
|
};
|
|
38804
|
-
off = client2.on("memory.super.
|
|
38837
|
+
off = client2.on("memory.super.listPage", (message) => {
|
|
38805
38838
|
if (generation !== listGenerationRef.current || !mountedRef.current) {
|
|
38806
38839
|
cleanup();
|
|
38807
38840
|
return;
|
|
@@ -38810,16 +38843,29 @@ function MemoryManager() {
|
|
|
38810
38843
|
if (message.payload.error) {
|
|
38811
38844
|
setLoadError(message.payload.error);
|
|
38812
38845
|
} else {
|
|
38813
|
-
const
|
|
38814
|
-
setMemories(
|
|
38815
|
-
|
|
38846
|
+
const page = message.payload.memories ?? [];
|
|
38847
|
+
setMemories((current) => isAppend ? [...current, ...page] : page);
|
|
38848
|
+
setPageCursor(message.payload.nextCursor ?? null);
|
|
38849
|
+
setHasMore(Boolean(message.payload.nextCursor));
|
|
38850
|
+
const counts = message.payload.statusCounts ?? {};
|
|
38851
|
+
setStatusCounts(counts);
|
|
38852
|
+
const total = Object.values(counts).reduce((sum, n) => sum + n, 0);
|
|
38853
|
+
setStats((prev) => ({
|
|
38854
|
+
total,
|
|
38855
|
+
byStatus: counts,
|
|
38856
|
+
byKind: prev?.byKind ?? {},
|
|
38857
|
+
edges: prev?.edges ?? 0
|
|
38858
|
+
}));
|
|
38816
38859
|
hasLoadedRef.current = true;
|
|
38817
|
-
|
|
38818
|
-
(
|
|
38819
|
-
|
|
38860
|
+
if (!isAppend) {
|
|
38861
|
+
setSelectedId(
|
|
38862
|
+
(current) => current && page.some((memory) => memory.id === current) ? current : null
|
|
38863
|
+
);
|
|
38864
|
+
}
|
|
38820
38865
|
}
|
|
38821
38866
|
setInitialLoading(false);
|
|
38822
38867
|
setRefreshing(false);
|
|
38868
|
+
setLoadingMore(false);
|
|
38823
38869
|
});
|
|
38824
38870
|
timeout = setTimeout(() => {
|
|
38825
38871
|
if (generation !== listGenerationRef.current || !mountedRef.current) return;
|
|
@@ -38829,10 +38875,27 @@ function MemoryManager() {
|
|
|
38829
38875
|
);
|
|
38830
38876
|
setInitialLoading(false);
|
|
38831
38877
|
setRefreshing(false);
|
|
38878
|
+
setLoadingMore(false);
|
|
38832
38879
|
}, 2e4);
|
|
38833
38880
|
listCleanupRef.current = cleanup;
|
|
38834
|
-
|
|
38835
|
-
|
|
38881
|
+
listSuperMemoriesPage(
|
|
38882
|
+
{
|
|
38883
|
+
limit: PAGE_SIZE,
|
|
38884
|
+
...showDeleted ? { statuses: ["deleted"] } : {},
|
|
38885
|
+
...cursor ? { cursor } : {}
|
|
38886
|
+
},
|
|
38887
|
+
{ echoToChat: false }
|
|
38888
|
+
);
|
|
38889
|
+
}, [client2, listSuperMemoriesPage, showDeleted]);
|
|
38890
|
+
const loadMemories = useCallback50(() => {
|
|
38891
|
+
setPageCursor(null);
|
|
38892
|
+
setHasMore(false);
|
|
38893
|
+
loadPage(null);
|
|
38894
|
+
}, [loadPage]);
|
|
38895
|
+
const loadMore = useCallback50(() => {
|
|
38896
|
+
if (loadingMore || !pageCursor) return;
|
|
38897
|
+
loadPage(pageCursor);
|
|
38898
|
+
}, [loadPage, loadingMore, pageCursor]);
|
|
38836
38899
|
useEffect86(() => {
|
|
38837
38900
|
mountedRef.current = true;
|
|
38838
38901
|
loadMemories();
|
|
@@ -39332,6 +39395,57 @@ function MemoryManager() {
|
|
|
39332
39395
|
)
|
|
39333
39396
|
] })
|
|
39334
39397
|
] }),
|
|
39398
|
+
/* @__PURE__ */ jsxs119(
|
|
39399
|
+
"div",
|
|
39400
|
+
{
|
|
39401
|
+
className: "flex shrink-0 items-center gap-1 border-b border-border/60 px-3 pt-1",
|
|
39402
|
+
role: "tablist",
|
|
39403
|
+
"aria-label": "Memory view",
|
|
39404
|
+
children: [
|
|
39405
|
+
/* @__PURE__ */ jsx127(
|
|
39406
|
+
Button,
|
|
39407
|
+
{
|
|
39408
|
+
type: "button",
|
|
39409
|
+
variant: "ghost",
|
|
39410
|
+
size: "sm",
|
|
39411
|
+
role: "tab",
|
|
39412
|
+
"aria-selected": !showDeleted,
|
|
39413
|
+
onClick: () => {
|
|
39414
|
+
if (!showDeleted) return;
|
|
39415
|
+
setShowDeleted(false);
|
|
39416
|
+
},
|
|
39417
|
+
className: cn(
|
|
39418
|
+
"h-7 rounded-b-none border-b-2 px-3 text-[11px]",
|
|
39419
|
+
!showDeleted ? "border-primary text-foreground" : "border-transparent text-muted-foreground"
|
|
39420
|
+
),
|
|
39421
|
+
children: "Active"
|
|
39422
|
+
}
|
|
39423
|
+
),
|
|
39424
|
+
/* @__PURE__ */ jsxs119(
|
|
39425
|
+
Button,
|
|
39426
|
+
{
|
|
39427
|
+
type: "button",
|
|
39428
|
+
variant: "ghost",
|
|
39429
|
+
size: "sm",
|
|
39430
|
+
role: "tab",
|
|
39431
|
+
"aria-selected": showDeleted,
|
|
39432
|
+
onClick: () => {
|
|
39433
|
+
if (showDeleted) return;
|
|
39434
|
+
setShowDeleted(true);
|
|
39435
|
+
},
|
|
39436
|
+
className: cn(
|
|
39437
|
+
"h-7 rounded-b-none border-b-2 px-3 text-[11px]",
|
|
39438
|
+
showDeleted ? "border-primary text-foreground" : "border-transparent text-muted-foreground"
|
|
39439
|
+
),
|
|
39440
|
+
children: [
|
|
39441
|
+
"Deleted",
|
|
39442
|
+
typeof statusCounts["deleted"] === "number" ? ` (${statusCounts["deleted"]})` : ""
|
|
39443
|
+
]
|
|
39444
|
+
}
|
|
39445
|
+
)
|
|
39446
|
+
]
|
|
39447
|
+
}
|
|
39448
|
+
),
|
|
39335
39449
|
/* @__PURE__ */ jsx127(
|
|
39336
39450
|
MemoryFilters,
|
|
39337
39451
|
{
|
|
@@ -39362,7 +39476,19 @@ function MemoryManager() {
|
|
|
39362
39476
|
onOpenCreate: openCreate,
|
|
39363
39477
|
onClearFilters: clearFilters
|
|
39364
39478
|
}
|
|
39365
|
-
)
|
|
39479
|
+
),
|
|
39480
|
+
hasMore ? /* @__PURE__ */ jsx127("div", { className: "shrink-0 border-t border-border/60 p-2", children: /* @__PURE__ */ jsx127(
|
|
39481
|
+
Button,
|
|
39482
|
+
{
|
|
39483
|
+
type: "button",
|
|
39484
|
+
variant: "outline",
|
|
39485
|
+
size: "sm",
|
|
39486
|
+
onClick: loadMore,
|
|
39487
|
+
disabled: loadingMore,
|
|
39488
|
+
className: "h-7 w-full text-[11px]",
|
|
39489
|
+
children: loadingMore ? "Loading\u2026" : `Load more (${memories.length} loaded)`
|
|
39490
|
+
}
|
|
39491
|
+
) }) : null
|
|
39366
39492
|
]
|
|
39367
39493
|
}
|
|
39368
39494
|
),
|
|
@@ -46746,8 +46872,8 @@ var init_AgentOfficeView2 = __esm({
|
|
|
46746
46872
|
});
|
|
46747
46873
|
|
|
46748
46874
|
// src/components/WatchMessageBubble.tsx
|
|
46749
|
-
import remarkGfm3 from "remark-gfm";
|
|
46750
46875
|
import { AlertCircle as AlertCircle4, Bot as Bot18, Clock as Clock14, Terminal as Terminal9, User as User3 } from "lucide-react";
|
|
46876
|
+
import remarkGfm3 from "remark-gfm";
|
|
46751
46877
|
import { jsx as jsx138, jsxs as jsxs130 } from "react/jsx-runtime";
|
|
46752
46878
|
function fmtDuration4(durationMs) {
|
|
46753
46879
|
if (durationMs < 1e3) return `${durationMs}ms`;
|
|
@@ -46806,10 +46932,7 @@ function WatchBubbleContent({ entry }) {
|
|
|
46806
46932
|
}
|
|
46807
46933
|
) });
|
|
46808
46934
|
}
|
|
46809
|
-
function WatchMessageBubble({
|
|
46810
|
-
entry,
|
|
46811
|
-
isContinuation = false
|
|
46812
|
-
}) {
|
|
46935
|
+
function WatchMessageBubble({ entry, isContinuation = false }) {
|
|
46813
46936
|
const { t } = useTranslation();
|
|
46814
46937
|
const cfg = ROLE_CONFIG[entry.role];
|
|
46815
46938
|
const Icon2 = cfg.Icon;
|
|
@@ -46843,7 +46966,7 @@ function WatchMessageBubble({
|
|
|
46843
46966
|
{
|
|
46844
46967
|
className: cn(
|
|
46845
46968
|
"rounded-2xl px-4 py-3 border",
|
|
46846
|
-
entry.role === "user" && "rounded-br-md",
|
|
46969
|
+
entry.role === "user" && "rounded-br-md msg-user-bubble",
|
|
46847
46970
|
entry.role === "assistant" && "rounded-bl-md",
|
|
46848
46971
|
entry.role === "tool" && "rounded-bl-sm",
|
|
46849
46972
|
entry.role === "system" && "rounded-bl-sm opacity-70",
|
|
@@ -46862,12 +46985,12 @@ var ROLE_CONFIG;
|
|
|
46862
46985
|
var init_WatchMessageBubble = __esm({
|
|
46863
46986
|
"src/components/WatchMessageBubble.tsx"() {
|
|
46864
46987
|
"use strict";
|
|
46865
|
-
init_LazyMarkdown();
|
|
46866
|
-
init_utils();
|
|
46867
46988
|
init_i18n();
|
|
46989
|
+
init_utils();
|
|
46868
46990
|
init_CopyButton();
|
|
46869
|
-
init_ToolInputView();
|
|
46870
46991
|
init_ErrorBody();
|
|
46992
|
+
init_LazyMarkdown();
|
|
46993
|
+
init_ToolInputView();
|
|
46871
46994
|
init_utils2();
|
|
46872
46995
|
ROLE_CONFIG = {
|
|
46873
46996
|
user: {
|
|
@@ -63059,10 +63182,27 @@ function CostChip() {
|
|
|
63059
63182
|
}
|
|
63060
63183
|
|
|
63061
63184
|
// src/components/MessageBubble/index.tsx
|
|
63185
|
+
init_i18n();
|
|
63062
63186
|
import { expectDefined as expectDefined10 } from "@wrongstack/core";
|
|
63063
|
-
|
|
63064
|
-
|
|
63065
|
-
|
|
63187
|
+
import {
|
|
63188
|
+
Bot as Bot2,
|
|
63189
|
+
Brain as Brain3,
|
|
63190
|
+
CheckCircle2 as CheckCircle22,
|
|
63191
|
+
ChevronDown as ChevronDown4,
|
|
63192
|
+
ChevronRight as ChevronRight4,
|
|
63193
|
+
Clock as Clock3,
|
|
63194
|
+
Download as Download2,
|
|
63195
|
+
FileCode2 as FileCode22,
|
|
63196
|
+
Pencil as Pencil2,
|
|
63197
|
+
Pin,
|
|
63198
|
+
PinOff,
|
|
63199
|
+
RotateCcw as RotateCcw2,
|
|
63200
|
+
Terminal,
|
|
63201
|
+
User,
|
|
63202
|
+
XCircle as XCircle2
|
|
63203
|
+
} from "lucide-react";
|
|
63204
|
+
import { memo as memo4, useEffect as useEffect24, useState as useState25 } from "react";
|
|
63205
|
+
import remarkGfm2 from "remark-gfm";
|
|
63066
63206
|
|
|
63067
63207
|
// src/lib/tool-icon.ts
|
|
63068
63208
|
import { getToolIcon, TOOL_ICON_CONFIG } from "@wrongstack/tools/tool-icons";
|
|
@@ -63182,41 +63322,24 @@ function hexToColorName(hex) {
|
|
|
63182
63322
|
return colors[hex] ?? "colored";
|
|
63183
63323
|
}
|
|
63184
63324
|
|
|
63325
|
+
// src/lib/tool-summary.ts
|
|
63326
|
+
import { FALLBACK_HEAD_FIELDS, summarizeToolInput } from "@wrongstack/tools/tool-summary";
|
|
63327
|
+
|
|
63185
63328
|
// src/components/MessageBubble/index.tsx
|
|
63186
63329
|
init_utils();
|
|
63187
63330
|
init_ws_client();
|
|
63188
63331
|
init_stores();
|
|
63189
|
-
init_stores();
|
|
63190
63332
|
init_local_prefs();
|
|
63191
|
-
|
|
63192
|
-
init_LazyMarkdown();
|
|
63333
|
+
init_image_attachments();
|
|
63193
63334
|
init_DiffView();
|
|
63194
|
-
|
|
63195
|
-
Bot as Bot2,
|
|
63196
|
-
Brain as Brain3,
|
|
63197
|
-
CheckCircle2 as CheckCircle22,
|
|
63198
|
-
ChevronDown as ChevronDown4,
|
|
63199
|
-
ChevronRight as ChevronRight4,
|
|
63200
|
-
Clock as Clock3,
|
|
63201
|
-
Download as Download2,
|
|
63202
|
-
FileCode2 as FileCode22,
|
|
63203
|
-
Pencil as Pencil2,
|
|
63204
|
-
Pin,
|
|
63205
|
-
PinOff,
|
|
63206
|
-
RotateCcw as RotateCcw2,
|
|
63207
|
-
Terminal,
|
|
63208
|
-
User,
|
|
63209
|
-
XCircle as XCircle2
|
|
63210
|
-
} from "lucide-react";
|
|
63211
|
-
import { memo as memo4, useEffect as useEffect24, useState as useState25 } from "react";
|
|
63212
|
-
import remarkGfm2 from "remark-gfm";
|
|
63335
|
+
init_Toaster();
|
|
63213
63336
|
|
|
63214
63337
|
// src/components/ToolResult.tsx
|
|
63215
63338
|
init_utils();
|
|
63216
63339
|
init_i18n();
|
|
63217
63340
|
import { ChevronDown as ChevronDown3, ChevronRight as ChevronRight3, ChevronsDown, ChevronsUp } from "lucide-react";
|
|
63218
63341
|
import { memo as memo2, useMemo as useMemo9, useState as useState19 } from "react";
|
|
63219
|
-
import { Fragment as Fragment7, jsx as
|
|
63342
|
+
import { Fragment as Fragment7, jsx as jsx25, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
63220
63343
|
var LONG_OUTPUT_THRESHOLD = 25;
|
|
63221
63344
|
var LONG_PEEK_LINES = 12;
|
|
63222
63345
|
function CollapsibleText({
|
|
@@ -63240,7 +63363,7 @@ function CollapsibleText({
|
|
|
63240
63363
|
// the shared overflow container rather than wrapping (which would
|
|
63241
63364
|
// break alignment between the gutter and the body).
|
|
63242
63365
|
/* @__PURE__ */ jsxs22("div", { className: "flex max-h-96 overflow-auto", children: [
|
|
63243
|
-
/* @__PURE__ */
|
|
63366
|
+
/* @__PURE__ */ jsx25(
|
|
63244
63367
|
"pre",
|
|
63245
63368
|
{
|
|
63246
63369
|
"aria-hidden": true,
|
|
@@ -63248,7 +63371,7 @@ function CollapsibleText({
|
|
|
63248
63371
|
children: lines.map((_, i) => `${i + 1}`).join("\n")
|
|
63249
63372
|
}
|
|
63250
63373
|
),
|
|
63251
|
-
/* @__PURE__ */
|
|
63374
|
+
/* @__PURE__ */ jsx25(
|
|
63252
63375
|
"pre",
|
|
63253
63376
|
{
|
|
63254
63377
|
className: cn(
|
|
@@ -63259,7 +63382,7 @@ function CollapsibleText({
|
|
|
63259
63382
|
}
|
|
63260
63383
|
)
|
|
63261
63384
|
] })
|
|
63262
|
-
) : /* @__PURE__ */
|
|
63385
|
+
) : /* @__PURE__ */ jsx25(
|
|
63263
63386
|
"pre",
|
|
63264
63387
|
{
|
|
63265
63388
|
className: cn(
|
|
@@ -63270,17 +63393,17 @@ function CollapsibleText({
|
|
|
63270
63393
|
children: shown
|
|
63271
63394
|
}
|
|
63272
63395
|
),
|
|
63273
|
-
isLong && /* @__PURE__ */
|
|
63396
|
+
isLong && /* @__PURE__ */ jsx25(
|
|
63274
63397
|
"button",
|
|
63275
63398
|
{
|
|
63276
63399
|
type: "button",
|
|
63277
63400
|
onClick: () => setExpanded((v) => !v),
|
|
63278
63401
|
className: "w-full flex items-center justify-center gap-1 px-2 py-1 border-t bg-muted/30 text-[11px] text-muted-foreground hover:text-foreground transition-colors",
|
|
63279
63402
|
children: expanded ? /* @__PURE__ */ jsxs22(Fragment7, { children: [
|
|
63280
|
-
/* @__PURE__ */
|
|
63403
|
+
/* @__PURE__ */ jsx25(ChevronsUp, { className: "h-3 w-3" }),
|
|
63281
63404
|
t("activity:toolResult.collapseToLines", { count: LONG_PEEK_LINES })
|
|
63282
63405
|
] }) : /* @__PURE__ */ jsxs22(Fragment7, { children: [
|
|
63283
|
-
/* @__PURE__ */
|
|
63406
|
+
/* @__PURE__ */ jsx25(ChevronsDown, { className: "h-3 w-3" }),
|
|
63284
63407
|
t("activity:toolResult.showAllLines", { total: lines.length, more: lines.length - LONG_PEEK_LINES })
|
|
63285
63408
|
] })
|
|
63286
63409
|
}
|
|
@@ -63298,7 +63421,7 @@ var ToolResult = memo2(function ToolResult2({
|
|
|
63298
63421
|
const { t } = useTranslation();
|
|
63299
63422
|
const defaultCollapsed = renderMode === "simple";
|
|
63300
63423
|
if (shape.kind === "json") {
|
|
63301
|
-
return /* @__PURE__ */
|
|
63424
|
+
return /* @__PURE__ */ jsx25(
|
|
63302
63425
|
JsonResult,
|
|
63303
63426
|
{
|
|
63304
63427
|
value: shape.value,
|
|
@@ -63309,7 +63432,7 @@ var ToolResult = memo2(function ToolResult2({
|
|
|
63309
63432
|
);
|
|
63310
63433
|
}
|
|
63311
63434
|
if (shape.kind === "numbered") {
|
|
63312
|
-
return /* @__PURE__ */
|
|
63435
|
+
return /* @__PURE__ */ jsx25(
|
|
63313
63436
|
CollapsibleText,
|
|
63314
63437
|
{
|
|
63315
63438
|
text: result,
|
|
@@ -63322,7 +63445,7 @@ var ToolResult = memo2(function ToolResult2({
|
|
|
63322
63445
|
}
|
|
63323
63446
|
if (shape.kind === "bash") {
|
|
63324
63447
|
return /* @__PURE__ */ jsxs22("div", { className: cn("rounded-md border bg-background/40 overflow-hidden", className), children: [
|
|
63325
|
-
shape.stdout && /* @__PURE__ */
|
|
63448
|
+
shape.stdout && /* @__PURE__ */ jsx25(
|
|
63326
63449
|
CollapsibleText,
|
|
63327
63450
|
{
|
|
63328
63451
|
text: shape.stdout,
|
|
@@ -63344,15 +63467,15 @@ var ToolResult = memo2(function ToolResult2({
|
|
|
63344
63467
|
shape.exitCode !== void 0 && /* @__PURE__ */ jsxs22("span", { children: [
|
|
63345
63468
|
t("activity:toolResult.exitCode"),
|
|
63346
63469
|
" ",
|
|
63347
|
-
/* @__PURE__ */
|
|
63470
|
+
/* @__PURE__ */ jsx25("span", { className: "font-mono", children: shape.exitCode })
|
|
63348
63471
|
] }),
|
|
63349
|
-
shape.duration && /* @__PURE__ */
|
|
63472
|
+
shape.duration && /* @__PURE__ */ jsx25("span", { children: shape.duration })
|
|
63350
63473
|
]
|
|
63351
63474
|
}
|
|
63352
63475
|
)
|
|
63353
63476
|
] });
|
|
63354
63477
|
}
|
|
63355
|
-
return /* @__PURE__ */
|
|
63478
|
+
return /* @__PURE__ */ jsx25(
|
|
63356
63479
|
CollapsibleText,
|
|
63357
63480
|
{
|
|
63358
63481
|
text: result,
|
|
@@ -63428,14 +63551,14 @@ function JsonResult({
|
|
|
63428
63551
|
className: "w-full flex items-center justify-between px-2 py-1 border-b bg-muted/30 text-[11px] text-muted-foreground hover:text-foreground",
|
|
63429
63552
|
children: [
|
|
63430
63553
|
/* @__PURE__ */ jsxs22("span", { className: "flex items-center gap-1", children: [
|
|
63431
|
-
expanded ? /* @__PURE__ */
|
|
63432
|
-
/* @__PURE__ */
|
|
63554
|
+
expanded ? /* @__PURE__ */ jsx25(ChevronDown3, { className: "h-3 w-3" }) : /* @__PURE__ */ jsx25(ChevronRight3, { className: "h-3 w-3" }),
|
|
63555
|
+
/* @__PURE__ */ jsx25("span", { className: "font-mono", children: t("activity:toolResult.jsonLines", { count: lineCount2 }) })
|
|
63433
63556
|
] }),
|
|
63434
|
-
/* @__PURE__ */
|
|
63557
|
+
/* @__PURE__ */ jsx25("span", { children: expanded ? t("activity:toolResult.collapse") : t("activity:toolResult.expand") })
|
|
63435
63558
|
]
|
|
63436
63559
|
}
|
|
63437
63560
|
),
|
|
63438
|
-
expanded && /* @__PURE__ */
|
|
63561
|
+
expanded && /* @__PURE__ */ jsx25(
|
|
63439
63562
|
"pre",
|
|
63440
63563
|
{
|
|
63441
63564
|
className: cn(
|
|
@@ -63450,29 +63573,25 @@ function JsonResult({
|
|
|
63450
63573
|
);
|
|
63451
63574
|
}
|
|
63452
63575
|
|
|
63453
|
-
// src/components/MessageBubble/index.tsx
|
|
63454
|
-
init_Toaster();
|
|
63455
|
-
init_image_attachments();
|
|
63456
|
-
|
|
63457
63576
|
// src/components/MessageBubble/AttachmentGallery.tsx
|
|
63458
63577
|
init_utils();
|
|
63459
63578
|
import { ImageOff } from "lucide-react";
|
|
63460
63579
|
import { useState as useState20 } from "react";
|
|
63461
|
-
import { jsx as
|
|
63580
|
+
import { jsx as jsx26, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
63462
63581
|
function AttachmentGallery({
|
|
63463
63582
|
attachments,
|
|
63464
63583
|
notRetainedLabel
|
|
63465
63584
|
}) {
|
|
63466
63585
|
const [expandedId, setExpandedId] = useState20(null);
|
|
63467
|
-
return /* @__PURE__ */
|
|
63468
|
-
(att) => att.dataUrl ? /* @__PURE__ */
|
|
63586
|
+
return /* @__PURE__ */ jsx26("div", { className: "mb-2 flex flex-wrap gap-2", children: attachments.map(
|
|
63587
|
+
(att) => att.dataUrl ? /* @__PURE__ */ jsx26(
|
|
63469
63588
|
"button",
|
|
63470
63589
|
{
|
|
63471
63590
|
type: "button",
|
|
63472
63591
|
onClick: () => setExpandedId((cur) => cur === att.id ? null : att.id),
|
|
63473
63592
|
className: "group relative overflow-hidden rounded-lg border border-border/40 bg-background/20 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
63474
63593
|
title: att.name ?? att.mediaType,
|
|
63475
|
-
children: /* @__PURE__ */
|
|
63594
|
+
children: /* @__PURE__ */ jsx26(
|
|
63476
63595
|
"img",
|
|
63477
63596
|
{
|
|
63478
63597
|
src: att.dataUrl,
|
|
@@ -63491,8 +63610,8 @@ function AttachmentGallery({
|
|
|
63491
63610
|
className: "inline-flex items-center gap-1.5 rounded-lg border border-border/40 bg-background/20 px-2 py-1.5 text-xs opacity-80",
|
|
63492
63611
|
title: notRetainedLabel,
|
|
63493
63612
|
children: [
|
|
63494
|
-
/* @__PURE__ */
|
|
63495
|
-
/* @__PURE__ */
|
|
63613
|
+
/* @__PURE__ */ jsx26(ImageOff, { className: "h-3.5 w-3.5 shrink-0" }),
|
|
63614
|
+
/* @__PURE__ */ jsx26("span", { className: "max-w-[140px] truncate", children: att.name ?? att.mediaType }),
|
|
63496
63615
|
/* @__PURE__ */ jsxs23("span", { className: "tabular-nums opacity-70", children: [
|
|
63497
63616
|
Math.max(1, Math.round(att.bytes / 1024)),
|
|
63498
63617
|
" KB"
|
|
@@ -63506,13 +63625,15 @@ function AttachmentGallery({
|
|
|
63506
63625
|
|
|
63507
63626
|
// src/components/MessageBubble/index.tsx
|
|
63508
63627
|
init_CopyButton();
|
|
63628
|
+
init_ErrorBody();
|
|
63629
|
+
init_LazyMarkdown();
|
|
63509
63630
|
|
|
63510
63631
|
// src/components/MessageBubble/StreamingMarkdown.tsx
|
|
63511
63632
|
init_LazyMarkdown();
|
|
63512
63633
|
init_utils2();
|
|
63513
63634
|
import { memo as memo3, useMemo as useMemo11 } from "react";
|
|
63514
63635
|
import remarkGfm from "remark-gfm";
|
|
63515
|
-
import { Fragment as Fragment9, jsx as
|
|
63636
|
+
import { Fragment as Fragment9, jsx as jsx31, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
63516
63637
|
function splitStableStreamPrefix(text4) {
|
|
63517
63638
|
let lastSafe = -1;
|
|
63518
63639
|
let fenceOpen = false;
|
|
@@ -63526,18 +63647,17 @@ function splitStableStreamPrefix(text4) {
|
|
|
63526
63647
|
return [text4.slice(0, lastSafe), text4.slice(lastSafe)];
|
|
63527
63648
|
}
|
|
63528
63649
|
var StableMarkdownPrefix = memo3(function StableMarkdownPrefix2({ text: text4 }) {
|
|
63529
|
-
return /* @__PURE__ */
|
|
63650
|
+
return /* @__PURE__ */ jsx31(LazyMarkdown, { remarkPlugins: [remarkGfm], rehypePlugins, components: markdownComponents, children: text4 });
|
|
63530
63651
|
});
|
|
63531
63652
|
function StreamingMarkdown({ text: text4 }) {
|
|
63532
63653
|
const [prefix, tail] = useMemo11(() => splitStableStreamPrefix(text4), [text4]);
|
|
63533
|
-
return /* @__PURE__ */
|
|
63534
|
-
prefix ? /* @__PURE__ */
|
|
63535
|
-
tail ? /* @__PURE__ */
|
|
63654
|
+
return /* @__PURE__ */ jsxs27(Fragment9, { children: [
|
|
63655
|
+
prefix ? /* @__PURE__ */ jsx31(StableMarkdownPrefix, { text: prefix }) : null,
|
|
63656
|
+
tail ? /* @__PURE__ */ jsx31("span", { className: "whitespace-pre-wrap break-words", children: tail }) : null
|
|
63536
63657
|
] });
|
|
63537
63658
|
}
|
|
63538
63659
|
|
|
63539
63660
|
// src/components/MessageBubble/index.tsx
|
|
63540
|
-
init_ErrorBody();
|
|
63541
63661
|
init_ToolInputView();
|
|
63542
63662
|
init_utils2();
|
|
63543
63663
|
import { Fragment as Fragment10, jsx as jsx33, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
@@ -63698,11 +63818,17 @@ var MessageBubble = memo4(function MessageBubble2({
|
|
|
63698
63818
|
isPinned && "ring-1 ring-warning/30 bg-warning/[0.02] px-1 -mx-1"
|
|
63699
63819
|
),
|
|
63700
63820
|
children: [
|
|
63701
|
-
isContinuation ? /* @__PURE__ */ jsx33("div", { className: "flex-shrink-0 w-8 h-8", "aria-hidden": true }) : /* @__PURE__ */ jsx33(
|
|
63702
|
-
"
|
|
63703
|
-
|
|
63704
|
-
|
|
63705
|
-
|
|
63821
|
+
isContinuation ? /* @__PURE__ */ jsx33("div", { className: "flex-shrink-0 w-8 h-8", "aria-hidden": true }) : /* @__PURE__ */ jsx33(
|
|
63822
|
+
"div",
|
|
63823
|
+
{
|
|
63824
|
+
className: cn(
|
|
63825
|
+
"flex-shrink-0 w-8 h-8 rounded-lg flex items-center justify-center",
|
|
63826
|
+
"ring-1 ring-offset-2 ring-offset-background",
|
|
63827
|
+
isUser ? "bg-primary text-primary-foreground ring-primary/20" : isTool ? "bg-secondary text-secondary-foreground ring-secondary/20" : isThinkingLog ? "bg-primary/10 text-primary ring-primary/20" : "bg-accent text-accent-foreground ring-accent/20"
|
|
63828
|
+
),
|
|
63829
|
+
children: isUser ? /* @__PURE__ */ jsx33(User, { className: "h-4 w-4" }) : isTool ? /* @__PURE__ */ jsx33(Terminal, { className: "h-4 w-4" }) : isThinkingLog ? /* @__PURE__ */ jsx33(Brain3, { className: "h-4 w-4" }) : /* @__PURE__ */ jsx33(Bot2, { className: "h-4 w-4" })
|
|
63830
|
+
}
|
|
63831
|
+
),
|
|
63706
63832
|
/* @__PURE__ */ jsxs29(
|
|
63707
63833
|
"div",
|
|
63708
63834
|
{
|
|
@@ -63711,7 +63837,16 @@ var MessageBubble = memo4(function MessageBubble2({
|
|
|
63711
63837
|
isUser && "items-end sm:max-w-[44rem]"
|
|
63712
63838
|
),
|
|
63713
63839
|
children: [
|
|
63714
|
-
isFirst && !isContinuation && /* @__PURE__ */ jsx33(
|
|
63840
|
+
isFirst && !isContinuation && /* @__PURE__ */ jsx33(
|
|
63841
|
+
"span",
|
|
63842
|
+
{
|
|
63843
|
+
className: cn(
|
|
63844
|
+
"text-xs font-medium px-1",
|
|
63845
|
+
isUser ? "text-primary" : isTool ? "text-secondary" : isThinkingLog ? "text-primary" : "text-muted-foreground"
|
|
63846
|
+
),
|
|
63847
|
+
children: isUser ? t("activity:message.roleYou") : isTool ? t("activity:message.roleTool") : isThinkingLog ? t("activity:message.roleThinking") : t("activity:message.roleAssistant")
|
|
63848
|
+
}
|
|
63849
|
+
),
|
|
63715
63850
|
isTool && message.toolName && (() => {
|
|
63716
63851
|
const { Icon: ToolIcon, color: toolColor } = getToolVisual(message.toolName);
|
|
63717
63852
|
const tooltip = getToolTooltip(message.toolName);
|
|
@@ -63720,7 +63855,11 @@ var MessageBubble = memo4(function MessageBubble2({
|
|
|
63720
63855
|
{
|
|
63721
63856
|
type: "button",
|
|
63722
63857
|
onClick: () => toggleTool(message.id),
|
|
63723
|
-
className: cn(
|
|
63858
|
+
className: cn(
|
|
63859
|
+
"flex items-center gap-2 text-sm font-medium cursor-pointer select-none",
|
|
63860
|
+
"hover:bg-muted/50 rounded-lg px-2 py-1 -mx-2 transition-colors",
|
|
63861
|
+
message.isError ? "text-destructive" : "text-foreground"
|
|
63862
|
+
),
|
|
63724
63863
|
"aria-expanded": !!expandedTools[message.id],
|
|
63725
63864
|
title: tooltip,
|
|
63726
63865
|
children: [
|
|
@@ -63733,154 +63872,236 @@ var MessageBubble = memo4(function MessageBubble2({
|
|
|
63733
63872
|
}
|
|
63734
63873
|
);
|
|
63735
63874
|
})(),
|
|
63736
|
-
/* @__PURE__ */ jsx33(
|
|
63737
|
-
"
|
|
63738
|
-
|
|
63739
|
-
|
|
63740
|
-
|
|
63741
|
-
|
|
63742
|
-
|
|
63743
|
-
|
|
63744
|
-
|
|
63745
|
-
|
|
63746
|
-
|
|
63747
|
-
|
|
63748
|
-
|
|
63749
|
-
const
|
|
63750
|
-
return
|
|
63751
|
-
|
|
63752
|
-
|
|
63753
|
-
|
|
63754
|
-
|
|
63755
|
-
|
|
63756
|
-
|
|
63757
|
-
|
|
63758
|
-
|
|
63759
|
-
|
|
63760
|
-
|
|
63761
|
-
|
|
63762
|
-
|
|
63875
|
+
/* @__PURE__ */ jsx33(
|
|
63876
|
+
"div",
|
|
63877
|
+
{
|
|
63878
|
+
className: cn(
|
|
63879
|
+
"max-w-full rounded-lg shadow-sm",
|
|
63880
|
+
compactMode ? "px-3 py-1.5" : "px-4 py-3",
|
|
63881
|
+
isUser ? "bg-primary text-primary-foreground rounded-br-sm msg-user-bubble" : isTool ? message.isError ? "bg-destructive/5 border border-destructive/25 text-destructive" : "bg-muted/70 border border-border/60 text-foreground" : "bg-card border border-border/70 text-foreground",
|
|
63882
|
+
message.isError && !isTool && "border-destructive/20",
|
|
63883
|
+
isUser && message.status === "failed" && "opacity-60 ring-1 ring-destructive/30"
|
|
63884
|
+
),
|
|
63885
|
+
children: isTool ? (() => {
|
|
63886
|
+
const expanded = !!expandedTools[message.id];
|
|
63887
|
+
const inputSummary = message.toolInput !== void 0 ? summarizeToolInput(message.toolName, message.toolInput) : "";
|
|
63888
|
+
const lines = message.toolResult ? message.toolResult.split("\n").length : 0;
|
|
63889
|
+
return /* @__PURE__ */ jsxs29("div", { className: "space-y-1 tool-details", children: [
|
|
63890
|
+
inputSummary && !expanded && /* @__PURE__ */ jsx33("div", { className: "text-xs text-muted-foreground font-mono truncate", children: inputSummary }),
|
|
63891
|
+
message.toolResult === void 0 && message.progressLines && message.progressLines.length > 0 && /* @__PURE__ */ jsx33("div", { className: "mt-1 rounded-md border border-warning/20 bg-warning/5 p-1.5 text-[11px] font-mono leading-snug max-h-32 overflow-auto", children: (() => {
|
|
63892
|
+
const seen = /* @__PURE__ */ new Map();
|
|
63893
|
+
return message.progressLines.slice(-6).map((line) => {
|
|
63894
|
+
const occurrence = seen.get(line) ?? 0;
|
|
63895
|
+
seen.set(line, occurrence + 1);
|
|
63896
|
+
return /* @__PURE__ */ jsx33(
|
|
63897
|
+
"div",
|
|
63898
|
+
{
|
|
63899
|
+
className: "truncate text-muted-foreground",
|
|
63900
|
+
children: line
|
|
63901
|
+
},
|
|
63902
|
+
`${line}-${occurrence}`
|
|
63903
|
+
);
|
|
63904
|
+
});
|
|
63905
|
+
})() }),
|
|
63906
|
+
expanded && message.toolInput !== void 0 && (() => {
|
|
63907
|
+
const diff = diffFromToolInput(message.toolName, message.toolInput);
|
|
63908
|
+
if (diff) return /* @__PURE__ */ jsx33(ToolDiffView, { diff });
|
|
63909
|
+
return /* @__PURE__ */ jsxs29("div", { className: "p-3 bg-muted/50 rounded-lg overflow-x-auto", children: [
|
|
63910
|
+
/* @__PURE__ */ jsxs29("div", { className: "flex items-center gap-1 text-muted-foreground mb-2 text-xs", children: [
|
|
63911
|
+
/* @__PURE__ */ jsx33(Clock3, { className: "h-3 w-3" }),
|
|
63912
|
+
/* @__PURE__ */ jsx33("span", { children: t("activity:message.inputLabel") })
|
|
63913
|
+
] }),
|
|
63914
|
+
/* @__PURE__ */ jsx33(ToolInputView, { input: message.toolInput })
|
|
63915
|
+
] });
|
|
63916
|
+
})(),
|
|
63917
|
+
expanded && message.toolResult !== void 0 && message.toolResult.length > 0 && /* @__PURE__ */ jsxs29("div", { className: "relative group/tool", children: [
|
|
63918
|
+
/* @__PURE__ */ jsx33(
|
|
63919
|
+
ToolResult,
|
|
63920
|
+
{
|
|
63921
|
+
toolName: message.toolName,
|
|
63922
|
+
result: message.toolResult,
|
|
63923
|
+
isError: message.isError
|
|
63924
|
+
}
|
|
63925
|
+
),
|
|
63926
|
+
/* @__PURE__ */ jsxs29("div", { className: "absolute top-1.5 right-1.5 flex items-center gap-1 opacity-0 group-hover/tool:opacity-100 transition-opacity", children: [
|
|
63927
|
+
/* @__PURE__ */ jsx33(
|
|
63928
|
+
CopyButton,
|
|
63929
|
+
{
|
|
63930
|
+
text: message.toolResult,
|
|
63931
|
+
label: "",
|
|
63932
|
+
className: "bg-background/80 border rounded px-1.5 py-0.5"
|
|
63933
|
+
}
|
|
63934
|
+
),
|
|
63935
|
+
message.toolResult.split("\n").length > 5 && /* @__PURE__ */ jsx33(
|
|
63936
|
+
"button",
|
|
63937
|
+
{
|
|
63938
|
+
type: "button",
|
|
63939
|
+
onClick: (ev) => {
|
|
63940
|
+
ev.stopPropagation();
|
|
63941
|
+
const ext = fileExtensionFor(message.toolName);
|
|
63942
|
+
const base = (message.toolName ?? "output").replace(/[^a-z0-9_-]+/gi, "-").toLowerCase();
|
|
63943
|
+
downloadTextFile(
|
|
63944
|
+
`${base}-${(/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-")}.${ext}`,
|
|
63945
|
+
message.toolResult ?? ""
|
|
63946
|
+
);
|
|
63947
|
+
},
|
|
63948
|
+
className: "inline-flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground bg-background/80 border rounded px-1.5 py-0.5",
|
|
63949
|
+
title: t("activity:message.downloadTitle"),
|
|
63950
|
+
children: /* @__PURE__ */ jsx33(Download2, { className: "h-3 w-3" })
|
|
63951
|
+
}
|
|
63952
|
+
)
|
|
63953
|
+
] })
|
|
63763
63954
|
] }),
|
|
63764
|
-
/* @__PURE__ */ jsx33(
|
|
63955
|
+
expanded && message.toolResult !== void 0 && message.toolResult.length === 0 && /* @__PURE__ */ jsx33("span", { className: "text-xs text-muted-foreground italic", children: t("activity:message.empty") }),
|
|
63956
|
+
!expanded && message.isError && message.toolResult && /* @__PURE__ */ jsx33("div", { className: "text-xs font-mono text-destructive truncate", children: message.toolResult.split("\n")[0] }),
|
|
63957
|
+
(message.toolResult !== void 0 && message.toolResult.length > 0 || message.toolInput !== void 0 && Object.keys(message.toolInput ?? {}).length > 0) && /* @__PURE__ */ jsx33(
|
|
63958
|
+
"button",
|
|
63959
|
+
{
|
|
63960
|
+
type: "button",
|
|
63961
|
+
onClick: () => toggleTool(message.id),
|
|
63962
|
+
className: "text-xs text-muted-foreground hover:text-foreground transition-colors",
|
|
63963
|
+
children: expanded ? t("activity:message.hideDetails") : lines > 0 ? t("activity:message.showDetailsLines", { count: lines }) : t("activity:message.showDetails")
|
|
63964
|
+
}
|
|
63965
|
+
)
|
|
63765
63966
|
] });
|
|
63766
|
-
})(),
|
|
63767
|
-
expanded && message.toolResult !== void 0 && message.toolResult.length > 0 && /* @__PURE__ */ jsxs29("div", { className: "relative group/tool", children: [
|
|
63967
|
+
})() : editing && isUser ? /* @__PURE__ */ jsxs29("div", { className: "flex flex-col gap-2 min-w-[280px]", children: [
|
|
63768
63968
|
/* @__PURE__ */ jsx33(
|
|
63769
|
-
|
|
63969
|
+
"textarea",
|
|
63770
63970
|
{
|
|
63771
|
-
|
|
63772
|
-
|
|
63773
|
-
|
|
63971
|
+
value: editValue,
|
|
63972
|
+
onChange: (e) => setEditValue(e.target.value),
|
|
63973
|
+
onKeyDown: (e) => {
|
|
63974
|
+
if (e.key === "Escape") {
|
|
63975
|
+
e.preventDefault();
|
|
63976
|
+
cancelEdit();
|
|
63977
|
+
} else if (e.key === "Enter" && (e.metaKey || e.ctrlKey)) {
|
|
63978
|
+
e.preventDefault();
|
|
63979
|
+
saveEdit();
|
|
63980
|
+
}
|
|
63981
|
+
},
|
|
63982
|
+
rows: Math.min(8, Math.max(2, editValue.split("\n").length)),
|
|
63983
|
+
className: "w-full resize-none rounded-md border bg-background text-foreground px-2 py-1.5 text-sm font-mono focus:outline-none focus:ring-2 focus:ring-ring"
|
|
63774
63984
|
}
|
|
63775
63985
|
),
|
|
63776
|
-
/* @__PURE__ */ jsxs29("div", { className: "
|
|
63777
|
-
/* @__PURE__ */ jsx33(
|
|
63778
|
-
|
|
63986
|
+
/* @__PURE__ */ jsxs29("div", { className: "flex items-center justify-between gap-2", children: [
|
|
63987
|
+
/* @__PURE__ */ jsx33("span", { className: "text-[10px] text-primary-foreground/60", children: t("activity:message.editHint") }),
|
|
63988
|
+
/* @__PURE__ */ jsxs29("div", { className: "flex gap-1", children: [
|
|
63989
|
+
/* @__PURE__ */ jsx33(
|
|
63990
|
+
"button",
|
|
63991
|
+
{
|
|
63992
|
+
type: "button",
|
|
63993
|
+
onClick: cancelEdit,
|
|
63994
|
+
className: "text-xs px-2 py-0.5 rounded border border-primary-foreground/30 hover:bg-primary-foreground/10",
|
|
63995
|
+
children: t("common:action.cancel")
|
|
63996
|
+
}
|
|
63997
|
+
),
|
|
63998
|
+
/* @__PURE__ */ jsx33(
|
|
63999
|
+
"button",
|
|
64000
|
+
{
|
|
64001
|
+
type: "button",
|
|
64002
|
+
onClick: saveEdit,
|
|
64003
|
+
disabled: !editValue.trim(),
|
|
64004
|
+
className: "text-xs px-2 py-0.5 rounded bg-primary-foreground text-primary disabled:opacity-50",
|
|
64005
|
+
children: t("activity:message.saveResend")
|
|
64006
|
+
}
|
|
64007
|
+
)
|
|
64008
|
+
] })
|
|
64009
|
+
] })
|
|
64010
|
+
] }) : message.thinkingLog && showThinkingLogs ? (() => {
|
|
64011
|
+
const log = message.thinkingLog;
|
|
64012
|
+
const lineCount2 = log.text.split("\n").length;
|
|
64013
|
+
const seconds = Math.max(0.1, log.durationMs / 1e3);
|
|
64014
|
+
const durationLabel = log.replayed ? t("activity:message.replay") : `${seconds.toFixed(seconds < 10 ? 1 : 0)}s`;
|
|
64015
|
+
const preview2 = log.text.split("\n").slice(-4).join("\n").trim();
|
|
64016
|
+
return /* @__PURE__ */ jsxs29("div", { className: "min-w-0 max-w-full sm:max-w-[720px]", children: [
|
|
64017
|
+
/* @__PURE__ */ jsxs29(
|
|
63779
64018
|
"button",
|
|
63780
64019
|
{
|
|
63781
64020
|
type: "button",
|
|
63782
|
-
onClick: (
|
|
63783
|
-
|
|
63784
|
-
|
|
63785
|
-
|
|
63786
|
-
|
|
63787
|
-
|
|
63788
|
-
|
|
63789
|
-
|
|
63790
|
-
|
|
64021
|
+
onClick: () => setThinkingExpanded((v) => !v),
|
|
64022
|
+
className: "flex w-full flex-wrap items-center gap-x-2 gap-y-1 text-left text-sm font-medium text-primary",
|
|
64023
|
+
"aria-expanded": thinkingExpanded,
|
|
64024
|
+
children: [
|
|
64025
|
+
/* @__PURE__ */ jsx33("span", { className: "text-muted-foreground/75", children: thinkingExpanded ? /* @__PURE__ */ jsx33(ChevronDown4, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ jsx33(ChevronRight4, { className: "h-3.5 w-3.5" }) }),
|
|
64026
|
+
/* @__PURE__ */ jsx33(Brain3, { className: "h-3.5 w-3.5" }),
|
|
64027
|
+
/* @__PURE__ */ jsx33("span", { className: "min-w-0", children: t("activity:message.thinkingProcess") }),
|
|
64028
|
+
/* @__PURE__ */ jsx33("span", { className: "ml-0 text-[10px] font-mono font-normal text-muted-foreground sm:ml-auto", children: t("activity:message.thinkingMeta", {
|
|
64029
|
+
iter: log.iteration,
|
|
64030
|
+
dur: durationLabel,
|
|
64031
|
+
lines: t("activity:message.linesSuffix", { count: lineCount2 })
|
|
64032
|
+
}) })
|
|
64033
|
+
]
|
|
63791
64034
|
}
|
|
63792
|
-
)
|
|
63793
|
-
|
|
63794
|
-
|
|
63795
|
-
|
|
63796
|
-
|
|
63797
|
-
|
|
63798
|
-
|
|
63799
|
-
|
|
63800
|
-
|
|
63801
|
-
|
|
63802
|
-
|
|
63803
|
-
|
|
63804
|
-
|
|
63805
|
-
|
|
63806
|
-
|
|
63807
|
-
|
|
63808
|
-
|
|
63809
|
-
|
|
63810
|
-
|
|
63811
|
-
|
|
63812
|
-
|
|
63813
|
-
|
|
63814
|
-
|
|
63815
|
-
|
|
63816
|
-
|
|
63817
|
-
|
|
63818
|
-
|
|
63819
|
-
|
|
63820
|
-
|
|
63821
|
-
|
|
63822
|
-
|
|
63823
|
-
|
|
63824
|
-
|
|
63825
|
-
|
|
63826
|
-
|
|
63827
|
-
|
|
63828
|
-
|
|
63829
|
-
const durationLabel = log.replayed ? t("activity:message.replay") : `${seconds.toFixed(seconds < 10 ? 1 : 0)}s`;
|
|
63830
|
-
const preview2 = log.text.split("\n").slice(-4).join("\n").trim();
|
|
63831
|
-
return /* @__PURE__ */ jsxs29("div", { className: "min-w-0 max-w-full sm:max-w-[720px]", children: [
|
|
63832
|
-
/* @__PURE__ */ jsxs29(
|
|
63833
|
-
"button",
|
|
63834
|
-
{
|
|
63835
|
-
type: "button",
|
|
63836
|
-
onClick: () => setThinkingExpanded((v) => !v),
|
|
63837
|
-
className: "flex w-full flex-wrap items-center gap-x-2 gap-y-1 text-left text-sm font-medium text-primary",
|
|
63838
|
-
"aria-expanded": thinkingExpanded,
|
|
63839
|
-
children: [
|
|
63840
|
-
/* @__PURE__ */ jsx33("span", { className: "text-muted-foreground/75", children: thinkingExpanded ? /* @__PURE__ */ jsx33(ChevronDown4, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ jsx33(ChevronRight4, { className: "h-3.5 w-3.5" }) }),
|
|
63841
|
-
/* @__PURE__ */ jsx33(Brain3, { className: "h-3.5 w-3.5" }),
|
|
63842
|
-
/* @__PURE__ */ jsx33("span", { className: "min-w-0", children: t("activity:message.thinkingProcess") }),
|
|
63843
|
-
/* @__PURE__ */ jsx33("span", { className: "ml-0 text-[10px] font-mono font-normal text-muted-foreground sm:ml-auto", children: t("activity:message.thinkingMeta", { iter: log.iteration, dur: durationLabel, lines: t("activity:message.linesSuffix", { count: lineCount2 }) }) })
|
|
63844
|
-
]
|
|
63845
|
-
}
|
|
63846
|
-
),
|
|
63847
|
-
/* @__PURE__ */ jsx33("pre", { className: cn(
|
|
63848
|
-
"mt-2 whitespace-pre-wrap break-words rounded-lg border border-primary/20 bg-primary/[0.04] p-3 font-mono text-xs leading-relaxed text-foreground/80",
|
|
63849
|
-
thinkingExpanded ? "max-h-[32rem] overflow-auto" : "max-h-24 overflow-hidden"
|
|
63850
|
-
), children: thinkingExpanded ? log.text : preview2 || log.text }),
|
|
63851
|
-
/* @__PURE__ */ jsxs29("div", { className: "mt-2 flex items-center gap-2", children: [
|
|
63852
|
-
/* @__PURE__ */ jsx33(CopyButton, { text: log.text, label: t("activity:message.copyLog"), className: "opacity-70 hover:opacity-100 transition-opacity" }),
|
|
63853
|
-
!thinkingExpanded && lineCount2 > 4 && /* @__PURE__ */ jsx33(
|
|
63854
|
-
"button",
|
|
64035
|
+
),
|
|
64036
|
+
/* @__PURE__ */ jsx33(
|
|
64037
|
+
"pre",
|
|
64038
|
+
{
|
|
64039
|
+
className: cn(
|
|
64040
|
+
"mt-2 whitespace-pre-wrap break-words rounded-lg border border-primary/20 bg-primary/[0.04] p-3 font-mono text-xs leading-relaxed text-foreground/80",
|
|
64041
|
+
thinkingExpanded ? "max-h-[32rem] overflow-auto" : "max-h-24 overflow-hidden"
|
|
64042
|
+
),
|
|
64043
|
+
children: thinkingExpanded ? log.text : preview2 || log.text
|
|
64044
|
+
}
|
|
64045
|
+
),
|
|
64046
|
+
/* @__PURE__ */ jsxs29("div", { className: "mt-2 flex items-center gap-2", children: [
|
|
64047
|
+
/* @__PURE__ */ jsx33(
|
|
64048
|
+
CopyButton,
|
|
64049
|
+
{
|
|
64050
|
+
text: log.text,
|
|
64051
|
+
label: t("activity:message.copyLog"),
|
|
64052
|
+
className: "opacity-70 hover:opacity-100 transition-opacity"
|
|
64053
|
+
}
|
|
64054
|
+
),
|
|
64055
|
+
!thinkingExpanded && lineCount2 > 4 && /* @__PURE__ */ jsx33(
|
|
64056
|
+
"button",
|
|
64057
|
+
{
|
|
64058
|
+
type: "button",
|
|
64059
|
+
onClick: () => setThinkingExpanded(true),
|
|
64060
|
+
className: "text-xs text-muted-foreground hover:text-foreground transition-colors",
|
|
64061
|
+
children: t("activity:message.showFullLog")
|
|
64062
|
+
}
|
|
64063
|
+
)
|
|
64064
|
+
] })
|
|
64065
|
+
] });
|
|
64066
|
+
})() : (() => {
|
|
64067
|
+
if (hideEmptyReasoning) return null;
|
|
64068
|
+
const renderedContent = message.content;
|
|
64069
|
+
const hasAttachments = !!message.attachments && message.attachments.length > 0;
|
|
64070
|
+
return /* @__PURE__ */ jsxs29(
|
|
64071
|
+
"div",
|
|
63855
64072
|
{
|
|
63856
|
-
|
|
63857
|
-
|
|
63858
|
-
|
|
63859
|
-
|
|
64073
|
+
className: cn(
|
|
64074
|
+
"text-sm leading-relaxed markdown-content",
|
|
64075
|
+
message.streaming && "streaming-cursor"
|
|
64076
|
+
),
|
|
64077
|
+
children: [
|
|
64078
|
+
hasAttachments && /* @__PURE__ */ jsx33(
|
|
64079
|
+
AttachmentGallery,
|
|
64080
|
+
{
|
|
64081
|
+
attachments: message.attachments ?? [],
|
|
64082
|
+
notRetainedLabel: t("activity:message.imageNotRetained")
|
|
64083
|
+
}
|
|
64084
|
+
),
|
|
64085
|
+
renderedContent ? showRaw && message.role === "assistant" ? /* @__PURE__ */ jsx33("pre", { className: "whitespace-pre-wrap break-words font-mono text-xs leading-relaxed text-foreground/90 max-h-[40rem] overflow-auto", children: message.content }) : message.role === "assistant" && message.isError ? /* @__PURE__ */ jsx33(ErrorBodyWithStack, { text: message.content }) : message.streaming ? (
|
|
64086
|
+
// While streaming, avoid re-parsing the whole growing
|
|
64087
|
+
// message through remark on every frame — see
|
|
64088
|
+
// StreamingMarkdown for the stable-prefix strategy.
|
|
64089
|
+
/* @__PURE__ */ jsx33(StreamingMarkdown, { text: renderedContent })
|
|
64090
|
+
) : /* @__PURE__ */ jsx33(
|
|
64091
|
+
LazyMarkdown,
|
|
64092
|
+
{
|
|
64093
|
+
remarkPlugins: [remarkGfm2],
|
|
64094
|
+
rehypePlugins,
|
|
64095
|
+
components: markdownComponents,
|
|
64096
|
+
children: renderedContent
|
|
64097
|
+
}
|
|
64098
|
+
) : message.streaming ? /* @__PURE__ */ jsx33("span", { className: "inline-block animate-pulse text-muted-foreground", children: t("activity:message.typing") }) : hasAttachments ? null : /* @__PURE__ */ jsx33("span", { className: "text-muted-foreground italic", children: t("activity:message.noContent") })
|
|
64099
|
+
]
|
|
63860
64100
|
}
|
|
63861
|
-
)
|
|
63862
|
-
|
|
63863
|
-
|
|
63864
|
-
|
|
63865
|
-
if (hideEmptyReasoning) return null;
|
|
63866
|
-
const renderedContent = message.content;
|
|
63867
|
-
const hasAttachments = !!message.attachments && message.attachments.length > 0;
|
|
63868
|
-
return /* @__PURE__ */ jsxs29("div", { className: cn("text-sm leading-relaxed markdown-content", message.streaming && "streaming-cursor"), children: [
|
|
63869
|
-
hasAttachments && /* @__PURE__ */ jsx33(
|
|
63870
|
-
AttachmentGallery,
|
|
63871
|
-
{
|
|
63872
|
-
attachments: message.attachments ?? [],
|
|
63873
|
-
notRetainedLabel: t("activity:message.imageNotRetained")
|
|
63874
|
-
}
|
|
63875
|
-
),
|
|
63876
|
-
renderedContent ? showRaw && message.role === "assistant" ? /* @__PURE__ */ jsx33("pre", { className: "whitespace-pre-wrap break-words font-mono text-xs leading-relaxed text-foreground/90 max-h-[40rem] overflow-auto", children: message.content }) : message.role === "assistant" && message.isError ? /* @__PURE__ */ jsx33(ErrorBodyWithStack, { text: message.content }) : message.streaming ? (
|
|
63877
|
-
// While streaming, avoid re-parsing the whole growing
|
|
63878
|
-
// message through remark on every frame — see
|
|
63879
|
-
// StreamingMarkdown for the stable-prefix strategy.
|
|
63880
|
-
/* @__PURE__ */ jsx33(StreamingMarkdown, { text: renderedContent })
|
|
63881
|
-
) : /* @__PURE__ */ jsx33(LazyMarkdown, { remarkPlugins: [remarkGfm2], rehypePlugins, components: markdownComponents, children: renderedContent }) : message.streaming ? /* @__PURE__ */ jsx33("span", { className: "inline-block animate-pulse text-muted-foreground", children: t("activity:message.typing") }) : hasAttachments ? null : /* @__PURE__ */ jsx33("span", { className: "text-muted-foreground italic", children: t("activity:message.noContent") })
|
|
63882
|
-
] });
|
|
63883
|
-
})() }),
|
|
64101
|
+
);
|
|
64102
|
+
})()
|
|
64103
|
+
}
|
|
64104
|
+
),
|
|
63884
64105
|
isUser && message.status === "failed" && /* @__PURE__ */ jsx33("span", { className: "text-[10px] font-medium text-destructive flex items-center gap-1 px-1", children: t("activity:message.failedToSend") }),
|
|
63885
64106
|
nextSteps.length > 0 && /* @__PURE__ */ jsx33(
|
|
63886
64107
|
NextStepsBar,
|
|
@@ -63893,75 +64114,139 @@ var MessageBubble = memo4(function MessageBubble2({
|
|
|
63893
64114
|
canAutoSubmit: canAutoSubmitNow
|
|
63894
64115
|
}
|
|
63895
64116
|
),
|
|
63896
|
-
/* @__PURE__ */ jsxs29(
|
|
63897
|
-
|
|
63898
|
-
|
|
63899
|
-
|
|
63900
|
-
|
|
63901
|
-
|
|
63902
|
-
|
|
63903
|
-
|
|
63904
|
-
|
|
63905
|
-
|
|
63906
|
-
|
|
63907
|
-
|
|
63908
|
-
|
|
63909
|
-
|
|
63910
|
-
|
|
63911
|
-
|
|
63912
|
-
|
|
63913
|
-
|
|
63914
|
-
|
|
63915
|
-
|
|
63916
|
-
|
|
63917
|
-
|
|
63918
|
-
|
|
63919
|
-
|
|
63920
|
-
|
|
63921
|
-
|
|
63922
|
-
|
|
63923
|
-
|
|
63924
|
-
|
|
63925
|
-
|
|
63926
|
-
|
|
63927
|
-
|
|
63928
|
-
|
|
63929
|
-
|
|
63930
|
-
|
|
63931
|
-
|
|
63932
|
-
|
|
63933
|
-
|
|
63934
|
-
|
|
63935
|
-
|
|
63936
|
-
|
|
63937
|
-
|
|
63938
|
-
|
|
63939
|
-
|
|
63940
|
-
|
|
63941
|
-
|
|
63942
|
-
|
|
63943
|
-
|
|
63944
|
-
|
|
63945
|
-
|
|
63946
|
-
|
|
63947
|
-
|
|
63948
|
-
|
|
63949
|
-
|
|
63950
|
-
|
|
63951
|
-
|
|
63952
|
-
|
|
63953
|
-
|
|
63954
|
-
|
|
63955
|
-
|
|
63956
|
-
|
|
63957
|
-
|
|
63958
|
-
|
|
63959
|
-
|
|
63960
|
-
|
|
63961
|
-
|
|
63962
|
-
|
|
63963
|
-
|
|
63964
|
-
|
|
64117
|
+
/* @__PURE__ */ jsxs29(
|
|
64118
|
+
"div",
|
|
64119
|
+
{
|
|
64120
|
+
className: cn(
|
|
64121
|
+
"flex max-w-full flex-wrap items-center gap-2 px-1",
|
|
64122
|
+
isUser ? "flex-row-reverse" : "flex-row"
|
|
64123
|
+
),
|
|
64124
|
+
children: [
|
|
64125
|
+
!hideEmptyReasoning && /* @__PURE__ */ jsxs29(Fragment10, { children: [
|
|
64126
|
+
/* @__PURE__ */ jsx33("span", { className: "text-xs text-muted-foreground/70", children: new Date(message.timestamp).toLocaleTimeString([], {
|
|
64127
|
+
hour: "2-digit",
|
|
64128
|
+
minute: "2-digit"
|
|
64129
|
+
}) }),
|
|
64130
|
+
/* @__PURE__ */ jsx33("span", { className: "w-px h-3 bg-border/60 shrink-0", "aria-hidden": true })
|
|
64131
|
+
] }),
|
|
64132
|
+
message.runSummary && /* @__PURE__ */ jsxs29(
|
|
64133
|
+
"span",
|
|
64134
|
+
{
|
|
64135
|
+
className: "text-[10px] text-muted-foreground/75 font-mono tabular-nums",
|
|
64136
|
+
title: [
|
|
64137
|
+
t("activity:message.rsIterations", { n: message.runSummary.iterations }),
|
|
64138
|
+
t("activity:message.rsTools", { n: message.runSummary.tools }),
|
|
64139
|
+
t("activity:message.rsElapsed", {
|
|
64140
|
+
s: `${(message.runSummary.durationMs / 1e3).toFixed(2)}s`
|
|
64141
|
+
}),
|
|
64142
|
+
message.runSummary.costDelta > 0 ? t("activity:message.rsCost", { c: message.runSummary.costDelta.toFixed(4) }) : ""
|
|
64143
|
+
].filter(Boolean).join(" \xB7 "),
|
|
64144
|
+
children: [
|
|
64145
|
+
message.runSummary.iterations,
|
|
64146
|
+
" iter",
|
|
64147
|
+
message.runSummary.tools > 0 ? ` \xB7 ${message.runSummary.tools} tool${message.runSummary.tools === 1 ? "" : "s"}` : "",
|
|
64148
|
+
" ",
|
|
64149
|
+
"\xB7",
|
|
64150
|
+
" ",
|
|
64151
|
+
message.runSummary.durationMs < 6e4 ? `${(message.runSummary.durationMs / 1e3).toFixed(1)}s` : `${Math.floor(message.runSummary.durationMs / 6e4)}m ${Math.floor(message.runSummary.durationMs % 6e4 / 1e3)}s`,
|
|
64152
|
+
message.runSummary.costDelta > 0 ? ` \xB7 ${message.runSummary.costDelta >= 0.01 ? message.runSummary.costDelta.toFixed(4) : message.runSummary.costDelta.toFixed(6).replace(/0+$/, "").replace(/\.$/, "")}` : ""
|
|
64153
|
+
]
|
|
64154
|
+
}
|
|
64155
|
+
),
|
|
64156
|
+
message.usage && (message.usage.input > 0 || message.usage.output > 0) && (() => {
|
|
64157
|
+
const u = message.usage;
|
|
64158
|
+
const dollars = (u.input * inputCost + u.output * outputCost + (u.cacheRead ?? 0) * cacheReadCost) / 1e6;
|
|
64159
|
+
const haveCost = inputCost > 0 || outputCost > 0;
|
|
64160
|
+
const dollarStr = dollars >= 0.01 ? `${dollars.toFixed(4)}` : dollars > 0 ? `${dollars.toFixed(6).replace(/0+$/, "").replace(/\.$/, "")}` : "";
|
|
64161
|
+
return /* @__PURE__ */ jsxs29(
|
|
64162
|
+
"span",
|
|
64163
|
+
{
|
|
64164
|
+
className: "text-[10px] text-muted-foreground/75 font-mono tabular-nums",
|
|
64165
|
+
title: [
|
|
64166
|
+
t("activity:message.useInput", { n: u.input.toLocaleString() }),
|
|
64167
|
+
t("activity:message.useOutput", { n: u.output.toLocaleString() }),
|
|
64168
|
+
u.cacheRead ? t("activity:message.useCacheRead", { n: u.cacheRead.toLocaleString() }) : "",
|
|
64169
|
+
haveCost ? t("activity:message.useCost", { c: dollarStr }) : ""
|
|
64170
|
+
].filter(Boolean).join(" \xB7 "),
|
|
64171
|
+
children: [
|
|
64172
|
+
u.input.toLocaleString(),
|
|
64173
|
+
"\u2192",
|
|
64174
|
+
u.output.toLocaleString(),
|
|
64175
|
+
u.cacheRead ? ` \xB7 ${u.cacheRead.toLocaleString()} \u21BA` : "",
|
|
64176
|
+
haveCost && dollarStr ? ` \xB7 ${dollarStr}` : ""
|
|
64177
|
+
]
|
|
64178
|
+
}
|
|
64179
|
+
);
|
|
64180
|
+
})(),
|
|
64181
|
+
!isTool && message.content && !message.streaming && /* @__PURE__ */ jsx33(
|
|
64182
|
+
CopyButton,
|
|
64183
|
+
{
|
|
64184
|
+
text: message.content,
|
|
64185
|
+
label: t("common:action.copy"),
|
|
64186
|
+
className: "opacity-50 hover:opacity-100 transition-opacity"
|
|
64187
|
+
}
|
|
64188
|
+
),
|
|
64189
|
+
message.role === "assistant" && message.content && !message.streaming && /* @__PURE__ */ jsxs29(
|
|
64190
|
+
"button",
|
|
64191
|
+
{
|
|
64192
|
+
type: "button",
|
|
64193
|
+
onClick: () => setShowRaw((v) => !v),
|
|
64194
|
+
title: showRaw ? t("activity:message.showRenderedTitle") : t("activity:message.showRawTitle"),
|
|
64195
|
+
className: cn(
|
|
64196
|
+
"text-xs inline-flex items-center gap-1 transition-opacity",
|
|
64197
|
+
showRaw ? "text-primary hover:text-primary/80 opacity-100" : "opacity-50 hover:opacity-100 text-muted-foreground hover:text-foreground"
|
|
64198
|
+
),
|
|
64199
|
+
children: [
|
|
64200
|
+
/* @__PURE__ */ jsx33(FileCode22, { className: "h-3 w-3" }),
|
|
64201
|
+
/* @__PURE__ */ jsx33("span", { children: showRaw ? t("activity:message.renderedLabel") : t("activity:message.rawLabel") })
|
|
64202
|
+
]
|
|
64203
|
+
}
|
|
64204
|
+
),
|
|
64205
|
+
isUser && !editing && !isLoading && message.content && /* @__PURE__ */ jsxs29(
|
|
64206
|
+
"button",
|
|
64207
|
+
{
|
|
64208
|
+
type: "button",
|
|
64209
|
+
onClick: startEdit,
|
|
64210
|
+
title: t("activity:message.editTitle"),
|
|
64211
|
+
className: "opacity-50 hover:opacity-100 transition-opacity text-xs text-muted-foreground hover:text-foreground inline-flex items-center gap-1",
|
|
64212
|
+
children: [
|
|
64213
|
+
/* @__PURE__ */ jsx33(Pencil2, { className: "h-3 w-3" }),
|
|
64214
|
+
/* @__PURE__ */ jsx33("span", { children: t("activity:message.editLabel") })
|
|
64215
|
+
]
|
|
64216
|
+
}
|
|
64217
|
+
),
|
|
64218
|
+
message.role === "assistant" && message.content && !message.streaming && /* @__PURE__ */ jsxs29(
|
|
64219
|
+
"button",
|
|
64220
|
+
{
|
|
64221
|
+
type: "button",
|
|
64222
|
+
onClick: () => togglePin(message.id),
|
|
64223
|
+
title: isPinned ? t("activity:message.unpinTitle") : t("activity:message.pinTitle"),
|
|
64224
|
+
className: cn(
|
|
64225
|
+
"text-xs inline-flex items-center gap-1 transition-opacity",
|
|
64226
|
+
isPinned ? "text-warning hover:text-warning/85 opacity-100" : "opacity-50 hover:opacity-100 text-muted-foreground hover:text-foreground"
|
|
64227
|
+
),
|
|
64228
|
+
children: [
|
|
64229
|
+
isPinned ? /* @__PURE__ */ jsx33(PinOff, { className: "h-3 w-3" }) : /* @__PURE__ */ jsx33(Pin, { className: "h-3 w-3" }),
|
|
64230
|
+
/* @__PURE__ */ jsx33("span", { children: isPinned ? t("activity:message.pinnedLabel") : t("activity:message.pinLabel") })
|
|
64231
|
+
]
|
|
64232
|
+
}
|
|
64233
|
+
),
|
|
64234
|
+
isLatestAssistant && message.content && !message.streaming && /* @__PURE__ */ jsxs29(
|
|
64235
|
+
"button",
|
|
64236
|
+
{
|
|
64237
|
+
type: "button",
|
|
64238
|
+
onClick: regenerate,
|
|
64239
|
+
title: t("activity:message.regenerateTitle"),
|
|
64240
|
+
className: "opacity-50 hover:opacity-100 transition-opacity text-xs text-muted-foreground hover:text-foreground inline-flex items-center gap-1",
|
|
64241
|
+
children: [
|
|
64242
|
+
/* @__PURE__ */ jsx33(RotateCcw2, { className: "h-3 w-3" }),
|
|
64243
|
+
/* @__PURE__ */ jsx33("span", { children: t("activity:message.retryLabel") })
|
|
64244
|
+
]
|
|
64245
|
+
}
|
|
64246
|
+
)
|
|
64247
|
+
]
|
|
64248
|
+
}
|
|
64249
|
+
)
|
|
63965
64250
|
]
|
|
63966
64251
|
}
|
|
63967
64252
|
)
|
|
@@ -70153,7 +70438,7 @@ function ModelSection({
|
|
|
70153
70438
|
badges: m.capabilities,
|
|
70154
70439
|
detail: [
|
|
70155
70440
|
m.contextWindow ? `${Math.round(m.contextWindow / 1e3)}k` : "",
|
|
70156
|
-
m.inputCost != null ?
|
|
70441
|
+
m.inputCost != null ? `${m.inputCost}/${m.outputCost}` : ""
|
|
70157
70442
|
].filter(Boolean).join(" \xB7 "),
|
|
70158
70443
|
detailHighlight: true
|
|
70159
70444
|
})),
|