@ai-matrx/chat 0.7.5 → 0.7.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +36 -0
- package/dist/agents/api/fetch-pending-calls.js +4 -3
- package/dist/agents/api/submit-tool-results.js +3 -6
- package/dist/agents/components/ambient-assistant/ScrollAssistantLauncherImpl.js +13 -6
- package/dist/agents/components/chat/begin-fresh-chat.js +2 -2
- package/dist/agents/components/identity-refs/AiIdentityRef.js +2 -2
- package/dist/agents/components/inputs/smart-input/composer/ComposerSplash.js +2 -3
- package/dist/agents/components/inputs/smart-input/composer/useComposerMode.js +4 -2
- package/dist/agents/components/live-run/LiveRunDisplay.d.ts +7 -1
- package/dist/agents/components/live-run/LiveRunDisplay.js +3 -1
- package/dist/agents/components/messages-display/AgentConversationDisplay.js +1 -1
- package/dist/agents/components/messages-display/assistant/AgentEmptyMessageDisplay.js +4 -4
- package/dist/agents/components/messages-display/assistant/AssistantNoAnswer.js +1 -1
- package/dist/agents/components/messages-display/assistant/BreathingOrb.js +1 -1
- package/dist/agents/components/messages-display/assistant/InPlaceAnswerEditor.js +1 -1
- package/dist/agents/components/messages-display/citations/MessageSourcesRow.js +1 -1
- package/dist/agents/components/messages-display/conversation-tools/ConversationFindBar.js +4 -4
- package/dist/agents/components/messages-display/message-options/EditHistoryDialog.js +7 -7
- package/dist/agents/components/messages-display/user/AgentUserMessage.js +4 -4
- package/dist/agents/components/messages-display/user/CollabNoteMessage.js +2 -2
- package/dist/agents/components/messages-display/user/FirstTurnVariables.js +3 -3
- package/dist/agents/components/messages-display/user/PendingSendMessage.js +4 -4
- package/dist/agents/components/messages-display/user/RemarksTranscriptView.js +7 -7
- package/dist/agents/components/messages-display/user/ResourceAttachmentTile.js +9 -9
- package/dist/agents/components/messages-display/user/ResourceEditableToggleSamples.js +4 -4
- package/dist/agents/components/messages-display/user/UserActionBar.js +3 -3
- package/dist/agents/components/messages-display/user/UserMessageAttachmentStyleComparison.js +12 -12
- package/dist/agents/components/messages-display/user/UserMessageChipsDemo.js +19 -19
- package/dist/agents/components/messages-display/user/UserMessageHybridTileSamples.js +22 -22
- package/dist/agents/components/run/AgentRunnerPage.js +4 -4
- package/dist/agents/components/run/AssistantError.js +1 -1
- package/dist/agents/components/run/AssistantWarning.js +1 -1
- package/dist/agents/components/run/GenerationJobCard.js +5 -5
- package/dist/agents/components/run/IncompleteNote.js +1 -1
- package/dist/agents/components/run/RunJobWorkingLine.js +1 -1
- package/dist/agents/components/shared/AgentConversationColumn.js +1 -1
- package/dist/agents/components/shared/AgentHeaderMobile.js +6 -6
- package/dist/agents/components/shared/AgentModeController.js +1 -1
- package/dist/agents/components/shared/AutoInjectionSwitch.js +6 -6
- package/dist/agents/components/shared/DesktopFilterPanel.js +8 -8
- package/dist/agents/components/smart/AgentRunner.js +1 -1
- package/dist/agents/components/smart/CreateWithAiTabs.js +1 -1
- package/dist/agents/redux/agent-definition/agent-cache-bust-request.js +7 -7
- package/dist/agents/redux/execution-system/context-rules/receipt-check.js +2 -2
- package/dist/agents/redux/execution-system/inbox/inbox.thunks.d.ts +2 -2
- package/dist/agents/redux/execution-system/inbox/inbox.thunks.js +7 -15
- package/dist/agents/redux/execution-system/observational-memory/fetch-memory-cost.thunk.d.ts +1 -1
- package/dist/agents/redux/execution-system/observational-memory/fetch-memory-cost.thunk.js +7 -4
- package/dist/agents/redux/execution-system/selectors/aggregate.selectors.d.ts +1 -114
- package/dist/agents/redux/execution-system/selectors/aggregate.selectors.js +28 -43
- package/dist/agents/redux/execution-system/thunks/call-conversation-api.d.ts +44 -0
- package/dist/agents/redux/execution-system/thunks/call-conversation-api.js +78 -0
- package/dist/agents/redux/execution-system/thunks/continue-agent-json.d.ts +41 -0
- package/dist/agents/redux/execution-system/thunks/continue-agent-json.js +66 -0
- package/dist/agents/redux/execution-system/thunks/execute-instance.thunk.d.ts +20 -0
- package/dist/agents/redux/execution-system/thunks/execute-instance.thunk.js +9 -2
- package/dist/agents/redux/execution-system/thunks/launch-agent-execution.thunk.js +4 -6
- package/dist/agents/redux/execution-system/thunks/notify-and-play-dispatcher.d.ts +1 -5
- package/dist/agents/redux/execution-system/thunks/notify-and-play-dispatcher.js +2 -1
- package/dist/agents/redux/execution-system/thunks/resolve-base-url.js +7 -17
- package/dist/agents/redux/execution-system/thunks/settle-after-stop.thunk.js +2 -2
- package/dist/agents/redux/execution-system/thunks/smart-execute.thunk.js +3 -3
- package/dist/agents/redux/execution-system/utils/continuation-body.d.ts +8 -2
- package/dist/agents/redux/execution-system/utils/continuation-body.js +3 -3
- package/dist/agents/redux/execution-system/utils/required-organization.d.ts +18 -0
- package/dist/agents/redux/execution-system/utils/required-organization.js +14 -10
- package/dist/agents/redux/execution-system/utils/stream-block-accumulator.d.ts +69 -333
- package/dist/agents/redux/execution-system/utils/stream-block-accumulator.js +268 -1896
- package/dist/agents/services/mcp-connections.service.js +5 -8
- package/dist/agents/ui-first-tools/dispatcher/dispatch-ui-first-tool.thunk.js +2 -1
- package/dist/host/defaults/files-host.js +11 -1
- package/dist/host/defaults/files-ui.js +2 -1
- package/dist/host/defaults/server-api.d.ts +1 -15
- package/dist/host/defaults/server-api.js +0 -21
- package/dist/host/defaults/server.d.ts +2 -1
- package/dist/host/defaults/server.js +8 -6
- package/dist/host/request-headers.d.ts +26 -0
- package/dist/host/request-headers.js +15 -0
- package/dist/host/server/call-api.d.ts +0 -13
- package/dist/host/server/call-api.js +0 -2
- package/dist/host/server/matrx-transport.d.ts +0 -1
- package/dist/host/server/matrx-transport.js +0 -2
- package/dist/store/root-state.d.ts +4 -21
- package/dist/surfaces/hooks/useSurfaceConfig.js +2 -1
- package/dist/surfaces/runtime/surface-feedback.js +2 -2
- package/dist/tool-call-visualization/components/ArtifactResultBar.js +4 -4
- package/dist/tool-call-visualization/components/ChatResultColumn.d.ts +1 -1
- package/dist/tool-call-visualization/components/ToolCallBatch.js +2 -2
- package/dist/tool-call-visualization/components/ToolCallVisualization.js +5 -5
- package/dist/tool-call-visualization/components/ToolTabBodies.js +12 -12
- package/dist/tool-call-visualization/components/ToolUpdatesOverlay.js +4 -4
- package/dist/tool-call-visualization/configured-rows/ConfiguredToolRow.js +8 -8
- package/dist/tool-call-visualization/configured-rows/CopyToolButton.js +1 -1
- package/dist/tool-call-visualization/configured-rows/ToolProgressView.js +7 -7
- package/dist/tool-call-visualization/configured-rows/field-components.js +28 -50
- package/dist/tool-call-visualization/registry/GenericRenderer.js +4 -4
- package/dist/tool-call-visualization/renderers/_shared-entity/EmptyResultCard.js +1 -1
- package/dist/tool-call-visualization/renderers/_shared-entity/EntityCard.js +5 -5
- package/dist/tool-call-visualization/renderers/_shared-entity/PartPeekPopover.js +2 -2
- package/dist/tool-call-visualization/renderers/_shared-entity/ToolGlyph.js +1 -1
- package/dist/tool-call-visualization/renderers/_shared-entity/ToolResultCard.js +6 -6
- package/dist/tool-call-visualization/renderers/agent-call/AgentCallInline.js +5 -5
- package/dist/tool-call-visualization/renderers/agent-call/CollabCallCard.js +4 -4
- package/dist/tool-call-visualization/renderers/agent-call/ImageGenerationResult.js +1 -1
- package/dist/tool-call-visualization/renderers/ask/AskInline.js +3 -3
- package/dist/tool-call-visualization/renderers/ask-person/AskPersonInline.js +2 -2
- package/dist/tool-call-visualization/renderers/cloud-browser/CloudBrowserRunCard.js +5 -5
- package/dist/tool-call-visualization/renderers/ctx/CtxBatchInline.js +3 -3
- package/dist/tool-call-visualization/renderers/ctx/CtxGetInline.js +2 -2
- package/dist/tool-call-visualization/renderers/ctx/CtxItemCard.js +3 -3
- package/dist/tool-call-visualization/renderers/ctx/CtxPatchInline.js +6 -6
- package/dist/tool-call-visualization/renderers/dictionary/DictEntryList.js +12 -12
- package/dist/tool-call-visualization/renderers/dictionary/DictionaryOverlay.js +5 -5
- package/dist/tool-call-visualization/renderers/fs/FsInline.js +7 -7
- package/dist/tool-call-visualization/renderers/news-api/NewsInline.js +17 -17
- package/dist/tool-call-visualization/renderers/news-api/NewsOverlay.js +12 -12
- package/dist/tool-call-visualization/renderers/random-wheel/RandomWheelInline.js +34 -34
- package/dist/tool-call-visualization/renderers/records/RecordsInline.js +1 -1
- package/dist/tool-call-visualization/renderers/research/ResearchInline.js +10 -10
- package/dist/tool-call-visualization/renderers/research/ResearchOverlay.js +19 -19
- package/dist/tool-call-visualization/renderers/research/SubagentReportBlock.js +11 -11
- package/dist/tool-call-visualization/renderers/scrape/ScrapeInline.js +18 -18
- package/dist/tool-call-visualization/renderers/scrape/ScrapeOverlay.js +17 -17
- package/dist/tool-call-visualization/renderers/search/SearchInline.js +30 -30
- package/dist/tool-call-visualization/renderers/search/SearchOverlay.js +40 -40
- package/dist/tool-call-visualization/renderers/shell/ShellInline.js +3 -3
- package/dist/tool-call-visualization/renderers/skill/SkillInline.js +5 -5
- package/dist/tool-call-visualization/renderers/sql/DbSchemaInline.js +7 -7
- package/dist/tool-call-visualization/renderers/sql/SqlInline.js +4 -4
- package/dist/tool-call-visualization/renderers/workbook/WorkbookGrid.js +4 -4
- package/dist/tool-call-visualization/renderers/workbook/WorkbookInline.js +2 -2
- package/dist/tool-call-visualization/renderers/workbook/WorkbookOverlay.js +7 -7
- package/dist/tool-call-visualization/renderers/working-document/PatchDiffInline.js +3 -3
- package/dist/tool-call-visualization/result-fields/EmptyResult.js +1 -1
- package/dist/tool-call-visualization/result-fields/KeyValueGrid.js +9 -9
- package/dist/tool-call-visualization/result-fields/ResultFile.js +4 -4
- package/dist/tool-call-visualization/result-fields/ResultJson.js +1 -1
- package/dist/tool-call-visualization/result-fields/ResultMedia.js +2 -2
- package/dist/tool-call-visualization/result-fields/ResultScalar.js +2 -2
- package/dist/tool-call-visualization/result-fields/ResultTable.js +10 -10
- package/dist/tool-call-visualization/result-fields/ResultValue.js +7 -7
- package/dist/tool-call-visualization/result-fields/ShortId.js +3 -3
- package/dist/tool-call-visualization/result-fields/ToolErrorCard.js +4 -4
- package/dist/tool-call-visualization/result-fields/UrlChips.js +3 -3
- package/dist/tool-call-visualization/surface-write/SurfaceWriteDiff.js +2 -2
- package/dist/tool-call-visualization/surface-write/SurfaceWriteStress.js +1 -1
- package/dist/tool-call-visualization/window-panel/ToolCallWindowPanel.js +9 -9
- package/dist/ui/mandates-storage/mandateStorage.d.ts +36 -0
- package/dist/ui/mandates-storage/shortcutStorage.d.ts +9 -0
- package/dist/ui/markdown-stream/EnhancedChatMarkdown.js +22 -0
- package/dist/ui/markdown-stream/MarkdownStreamImpl.js +3 -3
- package/dist/ui/markdown-stream/StreamTextFallback.d.ts +6 -0
- package/dist/ui/markdown-stream/StreamTextFallback.js +23 -0
- package/dist/ui/markdown-stream/merge-thinking-across-hidden.d.ts +19 -0
- package/dist/ui/markdown-stream/merge-thinking-across-hidden.js +21 -0
- package/package.json +14 -9
- package/dist/agents/redux/execution-system/utils/content-prefilter.d.ts +0 -50
- package/dist/agents/redux/execution-system/utils/content-prefilter.js +0 -243
|
@@ -40,7 +40,7 @@ function ConfiguredToolRow({ entry, kind, cfg }) {
|
|
|
40
40
|
kind === "server" && /* @__PURE__ */ jsx(
|
|
41
41
|
ChevronRight,
|
|
42
42
|
{
|
|
43
|
-
className: `size-3 shrink-0 text-muted-foreground transition-transform ${open ? "rotate-90" : ""}`
|
|
43
|
+
className: `size-3 shrink-0 text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))] transition-transform ${open ? "rotate-90" : ""}`
|
|
44
44
|
}
|
|
45
45
|
),
|
|
46
46
|
/* @__PURE__ */ jsx(
|
|
@@ -53,18 +53,18 @@ function ConfiguredToolRow({ entry, kind, cfg }) {
|
|
|
53
53
|
spin: shouldSpin
|
|
54
54
|
}
|
|
55
55
|
),
|
|
56
|
-
headerLabel && /* @__PURE__ */ jsx("span", { className: cn("truncate text-foreground", shimmer && "min-w-0"), children: shimmer ? /* @__PURE__ */ jsx(ShimmerText, { text: headerLabel }) : headerLabel }),
|
|
56
|
+
headerLabel && /* @__PURE__ */ jsx("span", { className: cn("truncate text-[color:var(--mx-chat-text,hsl(var(--foreground)))]", shimmer && "min-w-0"), children: shimmer ? /* @__PURE__ */ jsx(ShimmerText, { text: headerLabel }) : headerLabel }),
|
|
57
57
|
infoText && /* @__PURE__ */ jsx(
|
|
58
58
|
"span",
|
|
59
59
|
{
|
|
60
60
|
className: cn(
|
|
61
|
-
"text-muted-foreground",
|
|
61
|
+
"text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]",
|
|
62
62
|
inline.isMultiline ? "whitespace-pre-wrap" : "truncate"
|
|
63
63
|
),
|
|
64
64
|
children: infoText
|
|
65
65
|
}
|
|
66
66
|
),
|
|
67
|
-
phase !== "started" && entry.endedAt && /* @__PURE__ */ jsxs("span", { className: "ml-auto text-[10px] text-muted-foreground", children: [
|
|
67
|
+
phase !== "started" && entry.endedAt && /* @__PURE__ */ jsxs("span", { className: "ml-auto text-[10px] text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", children: [
|
|
68
68
|
Math.max(1, entry.endedAt - entry.startedAt),
|
|
69
69
|
"ms"
|
|
70
70
|
] })
|
|
@@ -144,7 +144,7 @@ function ExpandedBody({ entry, cfg, skipResults = false }) {
|
|
|
144
144
|
const preClass = "mt-0.5 max-h-48 overflow-auto rounded-md bg-background/60 p-1.5 text-[11px] leading-snug";
|
|
145
145
|
function SectionLabel({ label, children }) {
|
|
146
146
|
return /* @__PURE__ */ jsxs("div", { children: [
|
|
147
|
-
/* @__PURE__ */ jsx("div", { className: "text-[10px] uppercase tracking-wide text-muted-foreground", children: label }),
|
|
147
|
+
/* @__PURE__ */ jsx("div", { className: "text-[10px] uppercase tracking-wide text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", children: label }),
|
|
148
148
|
children
|
|
149
149
|
] });
|
|
150
150
|
}
|
|
@@ -167,7 +167,7 @@ function renderStandardDisplay(value, displayType) {
|
|
|
167
167
|
const entries = Object.entries(value);
|
|
168
168
|
if (entries.length === 0) return null;
|
|
169
169
|
if (displayType === "values-only") {
|
|
170
|
-
return /* @__PURE__ */ jsx("ul", { className: "mt-0.5 list-disc space-y-0.5 pl-4 text-[11px] text-foreground", children: entries.map(([k, v]) => /* @__PURE__ */ jsx("li", { children: stringifyValue(v) }, k)) });
|
|
170
|
+
return /* @__PURE__ */ jsx("ul", { className: "mt-0.5 list-disc space-y-0.5 pl-4 text-[11px] text-[color:var(--mx-chat-text,hsl(var(--foreground)))]", children: entries.map(([k, v]) => /* @__PURE__ */ jsx("li", { children: stringifyValue(v) }, k)) });
|
|
171
171
|
}
|
|
172
172
|
return /* @__PURE__ */ jsx("div", { className: "mt-0.5 grid grid-cols-[minmax(0,auto)_1fr] gap-x-2 gap-y-0.5 text-[11px]", children: entries.map(([k, v]) => /* @__PURE__ */ jsx(FieldRow, { k, v }, k)) });
|
|
173
173
|
}
|
|
@@ -175,8 +175,8 @@ function renderStandardDisplay(value, displayType) {
|
|
|
175
175
|
}
|
|
176
176
|
function FieldRow({ k, v }) {
|
|
177
177
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
178
|
-
/* @__PURE__ */ jsx("span", { className: "font-medium text-muted-foreground", children: k }),
|
|
179
|
-
/* @__PURE__ */ jsx("span", { className: "min-w-0 truncate text-foreground", children: stringifyValue(v) })
|
|
178
|
+
/* @__PURE__ */ jsx("span", { className: "font-medium text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", children: k }),
|
|
179
|
+
/* @__PURE__ */ jsx("span", { className: "min-w-0 truncate text-[color:var(--mx-chat-text,hsl(var(--foreground)))]", children: stringifyValue(v) })
|
|
180
180
|
] });
|
|
181
181
|
}
|
|
182
182
|
function CustomResults({ result, keysInfo }) {
|
|
@@ -49,7 +49,7 @@ function CopyToolButton({ data, className }) {
|
|
|
49
49
|
title: copied ? "Copied!" : "Copy tool data",
|
|
50
50
|
"aria-label": "Copy tool data",
|
|
51
51
|
className: cn(
|
|
52
|
-
"inline-flex size-5 shrink-0 items-center justify-center rounded text-muted-foreground opacity-0 transition-opacity hover:bg-muted/60 hover:text-foreground focus:opacity-100 group-hover:opacity-100",
|
|
52
|
+
"inline-flex size-5 shrink-0 items-center justify-center rounded text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))] opacity-0 transition-opacity hover:bg-muted/60 hover:text-[color:var(--mx-chat-text,hsl(var(--foreground)))] focus:opacity-100 group-hover:opacity-100",
|
|
53
53
|
copied && "opacity-100 text-emerald-600 dark:text-emerald-400",
|
|
54
54
|
className
|
|
55
55
|
),
|
|
@@ -24,7 +24,7 @@ function ToolProgressView({ progress, phase, cfg }) {
|
|
|
24
24
|
}
|
|
25
25
|
);
|
|
26
26
|
}
|
|
27
|
-
const lineClass = "flex items-center gap-1.5 text-[11px] leading-snug text-muted-foreground";
|
|
27
|
+
const lineClass = "flex items-center gap-1.5 text-[11px] leading-snug text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]";
|
|
28
28
|
const wrapClass = "mt-1 ml-5 border-l border-border/50 pl-2 space-y-0.5";
|
|
29
29
|
function entryLabel(e) {
|
|
30
30
|
return e.label ?? e.step ?? e.status ?? "\u2026";
|
|
@@ -33,7 +33,7 @@ function PercentBar({ percent }) {
|
|
|
33
33
|
const pct = percent <= 1 ? percent * 100 : percent;
|
|
34
34
|
const clamped = Math.max(0, Math.min(100, pct));
|
|
35
35
|
return /* @__PURE__ */ jsxs("span", { className: "ml-auto inline-flex items-center gap-1", children: [
|
|
36
|
-
/* @__PURE__ */ jsx("span", { className: "h-1 w-16 overflow-hidden rounded-full bg-muted", children: /* @__PURE__ */ jsx(
|
|
36
|
+
/* @__PURE__ */ jsx("span", { className: "h-1 w-16 overflow-hidden rounded-full bg-[var(--mx-chat-fill,hsl(var(--muted)))]", children: /* @__PURE__ */ jsx(
|
|
37
37
|
"span",
|
|
38
38
|
{
|
|
39
39
|
className: "block h-full rounded-full bg-primary/70 transition-all",
|
|
@@ -60,7 +60,7 @@ function LogProgress({
|
|
|
60
60
|
{
|
|
61
61
|
type: "button",
|
|
62
62
|
onClick: () => setOpen((v) => !v),
|
|
63
|
-
className: "inline-flex items-center gap-1 text-[10px] text-muted-foreground hover:text-foreground",
|
|
63
|
+
className: "inline-flex items-center gap-1 text-[10px] text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))] hover:text-[color:var(--mx-chat-text,hsl(var(--foreground)))]",
|
|
64
64
|
children: [
|
|
65
65
|
open ? /* @__PURE__ */ jsx(ChevronDown, { className: "size-3" }) : /* @__PURE__ */ jsx(ChevronRight, { className: "size-3" }),
|
|
66
66
|
entries.length,
|
|
@@ -89,8 +89,8 @@ function LogProgress({
|
|
|
89
89
|
function ProgressLine({ e, active }) {
|
|
90
90
|
const errored = e.status === "error";
|
|
91
91
|
return /* @__PURE__ */ jsxs("div", { className: cn(lineClass, errored && "text-red-600 dark:text-red-400"), children: [
|
|
92
|
-
active ? /* @__PURE__ */ jsx(Loader2, { className: "size-3 shrink-0 animate-spin text-primary" }) : errored ? /* @__PURE__ */ jsx(AlertTriangle, { className: "size-3 shrink-0" }) : /* @__PURE__ */ jsx("span", { className: "size-3 shrink-0 text-center text-muted-foreground/40", children: "\xB7" }),
|
|
93
|
-
/* @__PURE__ */ jsx("span", { className: cn(active ? "truncate text-foreground" : "truncate"), children: entryLabel(e) }),
|
|
92
|
+
active ? /* @__PURE__ */ jsx(Loader2, { className: "size-3 shrink-0 animate-spin text-[color:var(--mx-chat-accent,hsl(var(--primary)))]" }) : errored ? /* @__PURE__ */ jsx(AlertTriangle, { className: "size-3 shrink-0" }) : /* @__PURE__ */ jsx("span", { className: "size-3 shrink-0 text-center text-muted-foreground/40", children: "\xB7" }),
|
|
93
|
+
/* @__PURE__ */ jsx("span", { className: cn(active ? "truncate text-[color:var(--mx-chat-text,hsl(var(--foreground)))]" : "truncate"), children: entryLabel(e) }),
|
|
94
94
|
typeof e.percent === "number" && /* @__PURE__ */ jsx(PercentBar, { percent: e.percent })
|
|
95
95
|
] });
|
|
96
96
|
}
|
|
@@ -123,7 +123,7 @@ function StepsProgress({
|
|
|
123
123
|
className: cn(
|
|
124
124
|
lineClass,
|
|
125
125
|
status === "error" && "text-red-600 dark:text-red-400",
|
|
126
|
-
status === "done" && "text-foreground"
|
|
126
|
+
status === "done" && "text-[color:var(--mx-chat-text,hsl(var(--foreground)))]"
|
|
127
127
|
),
|
|
128
128
|
children: [
|
|
129
129
|
/* @__PURE__ */ jsx(StepIcon, { status }),
|
|
@@ -136,7 +136,7 @@ function StepsProgress({
|
|
|
136
136
|
}) });
|
|
137
137
|
}
|
|
138
138
|
function StepIcon({ status }) {
|
|
139
|
-
if (status === "active") return /* @__PURE__ */ jsx(Loader2, { className: "size-3 shrink-0 animate-spin text-primary" });
|
|
139
|
+
if (status === "active") return /* @__PURE__ */ jsx(Loader2, { className: "size-3 shrink-0 animate-spin text-[color:var(--mx-chat-accent,hsl(var(--primary)))]" });
|
|
140
140
|
if (status === "done")
|
|
141
141
|
return /* @__PURE__ */ jsx(Check, { className: "size-3 shrink-0 text-emerald-600 dark:text-emerald-400" });
|
|
142
142
|
if (status === "error") return /* @__PURE__ */ jsx(AlertTriangle, { className: "size-3 shrink-0" });
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { cn } from "@ai-matrx/design-system";
|
|
2
|
+
import { Badge, Table, TableBody, TableCell, TableHead, TableHeader, TableRow, cn } from "@ai-matrx/design-system";
|
|
3
3
|
import { MarkdownStream } from "../../ui/markdown-stream/MarkdownStream.js";
|
|
4
4
|
import { formatFileSize } from "@ai-matrx/kit/format";
|
|
5
5
|
import { Globe } from "lucide-react";
|
|
@@ -68,7 +68,7 @@ const Base64Image = ({ value, className }) => {
|
|
|
68
68
|
className: "max-h-[28rem] w-full rounded-md border border-border/40 object-contain"
|
|
69
69
|
}
|
|
70
70
|
),
|
|
71
|
-
meta && /* @__PURE__ */ jsx("div", { className: "text-[10px] text-muted-foreground", children: meta })
|
|
71
|
+
meta && /* @__PURE__ */ jsx("div", { className: "text-[10px] text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", children: meta })
|
|
72
72
|
] });
|
|
73
73
|
};
|
|
74
74
|
function toDataUri(value) {
|
|
@@ -115,23 +115,14 @@ function formatToMime(format) {
|
|
|
115
115
|
if (f === "gif") return "image/gif";
|
|
116
116
|
return `image/${f}`;
|
|
117
117
|
}
|
|
118
|
-
const
|
|
119
|
-
"span",
|
|
120
|
-
{
|
|
121
|
-
className: cn(
|
|
122
|
-
"inline-flex rounded-full bg-muted px-2 py-0.5 text-[10px] text-muted-foreground",
|
|
123
|
-
className
|
|
124
|
-
),
|
|
125
|
-
children: String(value ?? "")
|
|
126
|
-
}
|
|
127
|
-
);
|
|
118
|
+
const BadgeField = ({ value, className }) => /* @__PURE__ */ jsx(Badge, { variant: "neutral", className, children: String(value ?? "") });
|
|
128
119
|
const Chips = ({ value, className }) => {
|
|
129
120
|
const items = Array.isArray(value) ? value.map((v) => v == null ? "" : String(v)).filter(Boolean) : value == null ? [] : [String(value)];
|
|
130
121
|
if (items.length === 0) return null;
|
|
131
122
|
return /* @__PURE__ */ jsx("div", { className: cn("flex flex-wrap gap-1", className), children: items.map((item, i) => /* @__PURE__ */ jsx(
|
|
132
123
|
"span",
|
|
133
124
|
{
|
|
134
|
-
className: "inline-flex rounded-md border border-border/50 bg-muted/40 px-1.5 py-0.5 font-mono text-[10px] text-foreground",
|
|
125
|
+
className: "inline-flex rounded-md border border-border/50 bg-muted/40 px-1.5 py-0.5 font-mono text-[10px] text-[color:var(--mx-chat-text,hsl(var(--foreground)))]",
|
|
135
126
|
children: item
|
|
136
127
|
},
|
|
137
128
|
`${item}-${i}`
|
|
@@ -160,16 +151,16 @@ const TabCard = ({ value, className }) => {
|
|
|
160
151
|
className: "size-5 shrink-0 rounded-sm object-contain",
|
|
161
152
|
onError: () => setFaviconErr(true)
|
|
162
153
|
}
|
|
163
|
-
) : /* @__PURE__ */ jsx(Globe, { className: "size-5 shrink-0 text-muted-foreground" }),
|
|
154
|
+
) : /* @__PURE__ */ jsx(Globe, { className: "size-5 shrink-0 text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]" }),
|
|
164
155
|
/* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1 space-y-0.5", children: [
|
|
165
|
-
title && /* @__PURE__ */ jsx("div", { className: "truncate text-[12px] font-medium text-foreground", children: title }),
|
|
156
|
+
title && /* @__PURE__ */ jsx("div", { className: "truncate text-[12px] font-medium text-[color:var(--mx-chat-text,hsl(var(--foreground)))]", children: title }),
|
|
166
157
|
url && /* @__PURE__ */ jsx(
|
|
167
158
|
"a",
|
|
168
159
|
{
|
|
169
160
|
href: url,
|
|
170
161
|
target: "_blank",
|
|
171
162
|
rel: "noreferrer noopener",
|
|
172
|
-
className: "block truncate text-[10px] text-muted-foreground hover:text-foreground hover:underline",
|
|
163
|
+
className: "block truncate text-[10px] text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))] hover:text-[color:var(--mx-chat-text,hsl(var(--foreground)))] hover:underline",
|
|
173
164
|
onClick: (e) => e.stopPropagation(),
|
|
174
165
|
children: url
|
|
175
166
|
}
|
|
@@ -179,7 +170,7 @@ const TabCard = ({ value, className }) => {
|
|
|
179
170
|
}
|
|
180
171
|
);
|
|
181
172
|
};
|
|
182
|
-
const
|
|
173
|
+
const ExtractTableField = ({ value, className }) => {
|
|
183
174
|
if (value == null || typeof value !== "object") return null;
|
|
184
175
|
const obj = value;
|
|
185
176
|
const columns = Array.isArray(obj.columns) ? obj.columns : [];
|
|
@@ -194,37 +185,24 @@ const Table = ({ value, className }) => {
|
|
|
194
185
|
});
|
|
195
186
|
});
|
|
196
187
|
if (visibleCols.length === 0) return null;
|
|
197
|
-
return /* @__PURE__ */ jsxs(
|
|
198
|
-
"
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
/* @__PURE__ */
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
{
|
|
216
|
-
className: "max-w-[20rem] truncate px-2 py-1 align-top text-foreground",
|
|
217
|
-
title: typeof cell?.value === "string" ? cell.value : void 0,
|
|
218
|
-
children: typeof cell?.value === "string" ? cell.value : cell?.value == null ? "" : String(cell.value)
|
|
219
|
-
},
|
|
220
|
-
c.index
|
|
221
|
-
);
|
|
222
|
-
}) }, r.index ?? ri)) })
|
|
223
|
-
] }),
|
|
224
|
-
obj.truncated === true && /* @__PURE__ */ jsx("div", { className: "border-t border-border/30 bg-muted/30 px-2 py-1 text-[10px] text-muted-foreground", children: "Table was truncated" })
|
|
225
|
-
]
|
|
226
|
-
}
|
|
227
|
-
);
|
|
188
|
+
return /* @__PURE__ */ jsxs("div", { className: cn("rounded-md border border-border/40", className), children: [
|
|
189
|
+
/* @__PURE__ */ jsxs(Table, { size: "sm", children: [
|
|
190
|
+
/* @__PURE__ */ jsx(TableHeader, { children: /* @__PURE__ */ jsx(TableRow, { children: visibleCols.map((c) => /* @__PURE__ */ jsx(TableHead, { children: (c.path ?? []).join(" \u203A ") }, c.index)) }) }),
|
|
191
|
+
/* @__PURE__ */ jsx(TableBody, { children: rows.map((r, ri) => /* @__PURE__ */ jsx(TableRow, { children: visibleCols.map((c) => {
|
|
192
|
+
const cell = r.cells?.[c.index];
|
|
193
|
+
return /* @__PURE__ */ jsx(
|
|
194
|
+
TableCell,
|
|
195
|
+
{
|
|
196
|
+
className: "max-w-[20rem] truncate align-top",
|
|
197
|
+
title: typeof cell?.value === "string" ? cell.value : void 0,
|
|
198
|
+
children: typeof cell?.value === "string" ? cell.value : cell?.value == null ? "" : String(cell.value)
|
|
199
|
+
},
|
|
200
|
+
c.index
|
|
201
|
+
);
|
|
202
|
+
}) }, r.index ?? ri)) })
|
|
203
|
+
] }),
|
|
204
|
+
obj.truncated === true && /* @__PURE__ */ jsx("div", { className: "border-t border-border/30 bg-muted/30 px-2 py-1 text-[10px] text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", children: "Table was truncated" })
|
|
205
|
+
] });
|
|
228
206
|
};
|
|
229
207
|
const fieldComponents = {
|
|
230
208
|
BoldLabel,
|
|
@@ -234,10 +212,10 @@ const fieldComponents = {
|
|
|
234
212
|
Json,
|
|
235
213
|
Image,
|
|
236
214
|
Base64Image,
|
|
237
|
-
Badge,
|
|
215
|
+
Badge: BadgeField,
|
|
238
216
|
Chips,
|
|
239
217
|
TabCard,
|
|
240
|
-
Table
|
|
218
|
+
Table: ExtractTableField
|
|
241
219
|
};
|
|
242
220
|
export {
|
|
243
221
|
fieldComponents
|
|
@@ -57,7 +57,7 @@ const ProgressLine = ({
|
|
|
57
57
|
return /* @__PURE__ */ jsx(
|
|
58
58
|
"div",
|
|
59
59
|
{
|
|
60
|
-
className: "flex min-w-0 items-center gap-2 text-xs text-muted-foreground animate-in fade-in slide-in-from-bottom-1 duration-300",
|
|
60
|
+
className: "flex min-w-0 items-center gap-2 text-xs text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))] animate-in fade-in slide-in-from-bottom-1 duration-300",
|
|
61
61
|
style: {
|
|
62
62
|
animationDelay: `${index * 60}ms`,
|
|
63
63
|
animationFillMode: "backwards"
|
|
@@ -89,7 +89,7 @@ const GenericRenderer = ({
|
|
|
89
89
|
);
|
|
90
90
|
}
|
|
91
91
|
if (isComplete && entry.result == null) {
|
|
92
|
-
return /* @__PURE__ */ jsx("div", { className: "text-xs text-muted-foreground", children: "Completed. No output was captured for this call." });
|
|
92
|
+
return /* @__PURE__ */ jsx("div", { className: "text-xs text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", children: "Completed. No output was captured for this call." });
|
|
93
93
|
}
|
|
94
94
|
if (!isComplete || entry.result == null) {
|
|
95
95
|
const source = events && events.length > 0 ? collectMessages(events) : entry.latestMessage ? [entry.latestMessage] : [];
|
|
@@ -104,7 +104,7 @@ const GenericRenderer = ({
|
|
|
104
104
|
},
|
|
105
105
|
`${i}-${msg.slice(0, 16)}`
|
|
106
106
|
)) }) : null,
|
|
107
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 text-xs text-muted-foreground", children: [
|
|
107
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 text-xs text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", children: [
|
|
108
108
|
/* @__PURE__ */ jsx(Loader2, { className: "h-3.5 w-3.5 animate-spin" }),
|
|
109
109
|
/* @__PURE__ */ jsx("span", { children: "Working\u2026" })
|
|
110
110
|
] })
|
|
@@ -150,7 +150,7 @@ const GenericRenderer = ({
|
|
|
150
150
|
e.stopPropagation();
|
|
151
151
|
onOpenOverlay(`tool-group-${groupId}`);
|
|
152
152
|
},
|
|
153
|
-
className: "group flex w-full items-center justify-between gap-2 rounded border border-border/60 px-2 py-1 text-xs text-muted-foreground transition-colors hover:border-primary/40 hover:text-foreground",
|
|
153
|
+
className: "group flex w-full items-center justify-between gap-2 rounded border border-border/60 px-2 py-1 text-xs text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))] transition-colors hover:border-primary/40 hover:text-[color:var(--mx-chat-text,hsl(var(--foreground)))]",
|
|
154
154
|
children: [
|
|
155
155
|
/* @__PURE__ */ jsx("span", { children: "View complete result" }),
|
|
156
156
|
/* @__PURE__ */ jsx(Maximize2, { className: "h-3 w-3 shrink-0" })
|
|
@@ -23,7 +23,7 @@ function EmptyResultCard({
|
|
|
23
23
|
title,
|
|
24
24
|
subtitle: `${did} \xB7 nothing to show`,
|
|
25
25
|
actions,
|
|
26
|
-
children: /* @__PURE__ */ jsxs("div", { className: "px-3 py-2 text-xs leading-relaxed text-muted-foreground", children: [
|
|
26
|
+
children: /* @__PURE__ */ jsxs("div", { className: "px-3 py-2 text-xs leading-relaxed text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", children: [
|
|
27
27
|
did,
|
|
28
28
|
", but the tool returned nothing to open from here. ",
|
|
29
29
|
remedy
|
|
@@ -38,7 +38,7 @@ function EntityCard({
|
|
|
38
38
|
"div",
|
|
39
39
|
{
|
|
40
40
|
className: cn(
|
|
41
|
-
"overflow-hidden rounded-xl border border-border bg-card text-card-foreground",
|
|
41
|
+
"overflow-hidden rounded-xl border border-[color:var(--mx-chat-border,hsl(var(--border)))] bg-[var(--mx-chat-card,hsl(var(--card)))] text-card-foreground",
|
|
42
42
|
className
|
|
43
43
|
),
|
|
44
44
|
children: [
|
|
@@ -61,7 +61,7 @@ function EntityCard({
|
|
|
61
61
|
children: [
|
|
62
62
|
/* @__PURE__ */ jsx(ToolGlyph, { icon, accent, size: "lg" }),
|
|
63
63
|
/* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
64
|
-
/* @__PURE__ */ jsx("div", { className: "truncate text-sm font-semibold leading-tight text-foreground", children: title }),
|
|
64
|
+
/* @__PURE__ */ jsx("div", { className: "truncate text-sm font-semibold leading-tight text-[color:var(--mx-chat-text,hsl(var(--foreground)))]", children: title }),
|
|
65
65
|
subtitle || hoverAct ? /* @__PURE__ */ jsxs("div", { className: "relative mt-0.5 h-4 text-xs leading-tight", children: [
|
|
66
66
|
subtitle ? /* @__PURE__ */ jsx(
|
|
67
67
|
"span",
|
|
@@ -69,7 +69,7 @@ function EntityCard({
|
|
|
69
69
|
className: cn(
|
|
70
70
|
// Text only: it never takes the press meant for the hover action drawn over it
|
|
71
71
|
// (review 2: "Open in window" was covered by this span and could not be clicked).
|
|
72
|
-
"pointer-events-none absolute inset-0 truncate text-muted-foreground transition-opacity",
|
|
72
|
+
"pointer-events-none absolute inset-0 truncate text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))] transition-opacity",
|
|
73
73
|
hoverAct && "group-hover/eh:opacity-0 group-focus-within/eh:opacity-0"
|
|
74
74
|
),
|
|
75
75
|
children: subtitle
|
|
@@ -84,7 +84,7 @@ function EntityCard({
|
|
|
84
84
|
hoverAct.onSelect?.();
|
|
85
85
|
},
|
|
86
86
|
"data-entity-hover-action": "",
|
|
87
|
-
className: "absolute inset-0 flex w-full items-center gap-1 truncate text-left font-medium text-primary opacity-0 transition-opacity pointer-events-none group-hover/eh:pointer-events-auto group-hover/eh:opacity-100 focus-visible:pointer-events-auto focus-visible:opacity-100",
|
|
87
|
+
className: "absolute inset-0 flex w-full items-center gap-1 truncate text-left font-medium text-[color:var(--mx-chat-accent,hsl(var(--primary)))] opacity-0 transition-opacity pointer-events-none group-hover/eh:pointer-events-auto group-hover/eh:opacity-100 focus-visible:pointer-events-auto focus-visible:opacity-100",
|
|
88
88
|
children: [
|
|
89
89
|
hoverAct.icon ? /* @__PURE__ */ jsx(hoverAct.icon, { className: "h-3 w-3 shrink-0" }) : null,
|
|
90
90
|
/* @__PURE__ */ jsx("span", { className: "truncate", children: hoverAct.label }),
|
|
@@ -150,7 +150,7 @@ function EntityCard({
|
|
|
150
150
|
"grid transition-[grid-template-rows] duration-300 ease-in-out",
|
|
151
151
|
open ? "grid-rows-[1fr]" : "grid-rows-[0fr]"
|
|
152
152
|
),
|
|
153
|
-
children: /* @__PURE__ */ jsx("div", { className: "overflow-hidden", children: /* @__PURE__ */ jsx("div", { className: "border-t border-border", children }) })
|
|
153
|
+
children: /* @__PURE__ */ jsx("div", { className: "overflow-hidden", children: /* @__PURE__ */ jsx("div", { className: "border-t border-[color:var(--mx-chat-border,hsl(var(--border)))]", children }) })
|
|
154
154
|
}
|
|
155
155
|
) : null
|
|
156
156
|
]
|
|
@@ -28,13 +28,13 @@ function PartPeekPopover({
|
|
|
28
28
|
"div",
|
|
29
29
|
{
|
|
30
30
|
className: cn(
|
|
31
|
-
"border-b border-border px-3 py-1.5 text-[11px] font-medium uppercase tracking-wide text-muted-foreground",
|
|
31
|
+
"border-b border-[color:var(--mx-chat-border,hsl(var(--border)))] px-3 py-1.5 text-[11px] font-medium uppercase tracking-wide text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]",
|
|
32
32
|
headerClassName ?? "bg-muted/40"
|
|
33
33
|
),
|
|
34
34
|
children: header
|
|
35
35
|
}
|
|
36
36
|
) : null,
|
|
37
|
-
/* @__PURE__ */ jsx("div", { className: "px-3 py-2.5 text-xs leading-relaxed text-foreground", children: body })
|
|
37
|
+
/* @__PURE__ */ jsx("div", { className: "px-3 py-2.5 text-xs leading-relaxed text-[color:var(--mx-chat-text,hsl(var(--foreground)))]", children: body })
|
|
38
38
|
]
|
|
39
39
|
}
|
|
40
40
|
)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { cn } from "@ai-matrx/design-system";
|
|
3
3
|
const ACCENT_ICON = {
|
|
4
|
-
primary: "text-primary",
|
|
4
|
+
primary: "text-[color:var(--mx-chat-accent,hsl(var(--primary)))]",
|
|
5
5
|
blue: "text-blue-600 dark:text-blue-400",
|
|
6
6
|
violet: "text-violet-600 dark:text-violet-400",
|
|
7
7
|
cyan: "text-cyan-600 dark:text-cyan-400",
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
import { cn } from "@ai-matrx/design-system";
|
|
17
17
|
function ToolResultCard({
|
|
18
18
|
icon: Icon,
|
|
19
|
-
iconClassName = "text-primary",
|
|
19
|
+
iconClassName = "text-[color:var(--mx-chat-accent,hsl(var(--primary)))]",
|
|
20
20
|
title,
|
|
21
21
|
sub,
|
|
22
22
|
children,
|
|
@@ -49,7 +49,7 @@ function ToolResultCard({
|
|
|
49
49
|
}
|
|
50
50
|
},
|
|
51
51
|
className: cn(
|
|
52
|
-
"flex w-full cursor-pointer items-center gap-3 border border-border/50 bg-card px-4 py-2.5 text-left transition-colors hover:bg-accent/30",
|
|
52
|
+
"flex w-full cursor-pointer items-center gap-3 border border-border/50 bg-[var(--mx-chat-card,hsl(var(--card)))] px-4 py-2.5 text-left transition-colors hover:bg-accent/30",
|
|
53
53
|
showBody ? "rounded-t-xl border-b-0" : "rounded-xl"
|
|
54
54
|
),
|
|
55
55
|
children: [
|
|
@@ -61,8 +61,8 @@ function ToolResultCard({
|
|
|
61
61
|
}
|
|
62
62
|
),
|
|
63
63
|
/* @__PURE__ */ jsxs("span", { className: "min-w-0 flex-1", children: [
|
|
64
|
-
/* @__PURE__ */ jsx("span", { className: "block break-words text-sm font-medium text-foreground sm:truncate", children: title }),
|
|
65
|
-
sub && /* @__PURE__ */ jsx("span", { className: "block break-words text-xs text-muted-foreground sm:truncate", children: sub })
|
|
64
|
+
/* @__PURE__ */ jsx("span", { className: "block break-words text-sm font-medium text-[color:var(--mx-chat-text,hsl(var(--foreground)))] sm:truncate", children: title }),
|
|
65
|
+
sub && /* @__PURE__ */ jsx("span", { className: "block break-words text-xs text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))] sm:truncate", children: sub })
|
|
66
66
|
] }),
|
|
67
67
|
headerAction && /* @__PURE__ */ jsx(
|
|
68
68
|
"span",
|
|
@@ -81,7 +81,7 @@ function ToolResultCard({
|
|
|
81
81
|
tabIndex: 0,
|
|
82
82
|
onClick: (e) => e.stopPropagation(),
|
|
83
83
|
onKeyDown: (e) => e.stopPropagation(),
|
|
84
|
-
className: "flex min-h-11 shrink-0 cursor-pointer items-center gap-1.5 rounded-xl border border-border/70 bg-background/60 px-2.5 py-1.5 text-xs font-medium text-muted-foreground transition-colors hover:bg-accent/40 hover:text-foreground sm:min-h-0",
|
|
84
|
+
className: "flex min-h-11 shrink-0 cursor-pointer items-center gap-1.5 rounded-xl border border-border/70 bg-background/60 px-2.5 py-1.5 text-xs font-medium text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))] transition-colors hover:bg-accent/40 hover:text-[color:var(--mx-chat-text,hsl(var(--foreground)))] sm:min-h-0",
|
|
85
85
|
"aria-label": "Open options",
|
|
86
86
|
children: [
|
|
87
87
|
/* @__PURE__ */ jsx(PanelRightOpen, { className: "size-3.5" }),
|
|
@@ -124,7 +124,7 @@ function ToolResultCard({
|
|
|
124
124
|
]
|
|
125
125
|
}
|
|
126
126
|
),
|
|
127
|
-
showBody && /* @__PURE__ */ jsx("div", { className: "overflow-hidden rounded-b-xl border border-t-0 border-border/50 bg-card", children })
|
|
127
|
+
showBody && /* @__PURE__ */ jsx("div", { className: "overflow-hidden rounded-b-xl border border-t-0 border-border/50 bg-[var(--mx-chat-card,hsl(var(--card)))]", children })
|
|
128
128
|
] });
|
|
129
129
|
}
|
|
130
130
|
var ToolResultCard_default = ToolResultCard;
|
|
@@ -54,19 +54,19 @@ function ImageGenerationLoading() {
|
|
|
54
54
|
className: "absolute -inset-8 rotate-12 bg-[linear-gradient(110deg,transparent_35%,color-mix(in_oklab,var(--color-background)_80%,transparent)_50%,transparent_65%)] bg-[length:200%_100%]"
|
|
55
55
|
}
|
|
56
56
|
),
|
|
57
|
-
/* @__PURE__ */ jsx(ImageIcon, { className: "relative h-8 w-8 text-primary" }),
|
|
57
|
+
/* @__PURE__ */ jsx(ImageIcon, { className: "relative h-8 w-8 text-[color:var(--mx-chat-accent,hsl(var(--primary)))]" }),
|
|
58
58
|
/* @__PURE__ */ jsx(Aperture, { className: "absolute right-2 top-2 h-4 w-4 text-violet-500 animate-pulse" }),
|
|
59
59
|
/* @__PURE__ */ jsx("span", { className: "absolute bottom-2 left-2 h-1.5 w-1.5 rounded-full bg-cyan-400 shadow-[0_0_10px_2px_rgb(34_211_238_/_0.55)]" })
|
|
60
60
|
] }),
|
|
61
61
|
/* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1 space-y-2.5", children: [
|
|
62
62
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
63
|
-
/* @__PURE__ */ jsx("p", { className: "text-sm font-medium text-foreground", children: "Composing your image" }),
|
|
64
|
-
/* @__PURE__ */ jsx("p", { className: "mt-0.5 text-xs leading-relaxed text-muted-foreground", children: "Building the scene, details, lighting, and final finish." })
|
|
63
|
+
/* @__PURE__ */ jsx("p", { className: "text-sm font-medium text-[color:var(--mx-chat-text,hsl(var(--foreground)))]", children: "Composing your image" }),
|
|
64
|
+
/* @__PURE__ */ jsx("p", { className: "mt-0.5 text-xs leading-relaxed text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", children: "Building the scene, details, lighting, and final finish." })
|
|
65
65
|
] }),
|
|
66
66
|
/* @__PURE__ */ jsx("div", { className: "flex gap-1.5", "aria-hidden": "true", children: [0, 1, 2, 3].map((step) => /* @__PURE__ */ jsx(
|
|
67
67
|
"span",
|
|
68
68
|
{
|
|
69
|
-
className: "h-1 flex-1 overflow-hidden rounded-full bg-muted",
|
|
69
|
+
className: "h-1 flex-1 overflow-hidden rounded-full bg-[var(--mx-chat-fill,hsl(var(--muted)))]",
|
|
70
70
|
children: /* @__PURE__ */ jsx(
|
|
71
71
|
"span",
|
|
72
72
|
{
|
|
@@ -94,7 +94,7 @@ function AgentCallLiveChild(props) {
|
|
|
94
94
|
if (!requestId || !child || !child.text.trim()) {
|
|
95
95
|
return /* @__PURE__ */ jsx(GenericRenderer, { ...props });
|
|
96
96
|
}
|
|
97
|
-
return /* @__PURE__ */ jsx("div", { className: "max-h-64 overflow-y-auto rounded-md border border-border bg-background/60 px-3 py-2", children: /* @__PURE__ */ jsx(
|
|
97
|
+
return /* @__PURE__ */ jsx("div", { className: "max-h-64 overflow-y-auto rounded-md border border-[color:var(--mx-chat-border,hsl(var(--border)))] bg-background/60 px-3 py-2", children: /* @__PURE__ */ jsx(
|
|
98
98
|
MarkdownStream,
|
|
99
99
|
{
|
|
100
100
|
imagePolicy: "ai",
|
|
@@ -43,7 +43,7 @@ function CollabCallCard(props) {
|
|
|
43
43
|
return /* @__PURE__ */ jsxs("div", { className: "overflow-hidden rounded-xl border border-violet-500/20 bg-violet-500/[0.04] dark:bg-violet-400/[0.05]", children: [
|
|
44
44
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-x-2 gap-y-1 px-3 py-2", children: [
|
|
45
45
|
/* @__PURE__ */ jsx(Handshake, { className: "h-4 w-4 shrink-0 text-violet-600 dark:text-violet-400" }),
|
|
46
|
-
/* @__PURE__ */ jsxs("span", { className: "min-w-0 text-sm font-medium text-foreground", children: [
|
|
46
|
+
/* @__PURE__ */ jsxs("span", { className: "min-w-0 text-sm font-medium text-[color:var(--mx-chat-text,hsl(var(--foreground)))]", children: [
|
|
47
47
|
agentLabel,
|
|
48
48
|
" ",
|
|
49
49
|
isActive ? "is reviewing" : "reviewed",
|
|
@@ -68,14 +68,14 @@ function CollabCallCard(props) {
|
|
|
68
68
|
label: MODE_CHIP[info.historyMode]
|
|
69
69
|
}
|
|
70
70
|
),
|
|
71
|
-
info.messagesIncluded !== null && /* @__PURE__ */ jsxs("span", { className: "text-xs text-muted-foreground", children: [
|
|
71
|
+
info.messagesIncluded !== null && /* @__PURE__ */ jsxs("span", { className: "text-xs text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", children: [
|
|
72
72
|
info.messagesIncluded,
|
|
73
73
|
" message",
|
|
74
74
|
info.messagesIncluded === 1 ? "" : "s",
|
|
75
75
|
" shared"
|
|
76
76
|
] })
|
|
77
77
|
] }),
|
|
78
|
-
showLiveStream && /* @__PURE__ */ jsx("div", { className: "mx-3 mb-2 max-h-64 overflow-y-auto rounded-md border border-border bg-background/60 px-3 py-2", children: /* @__PURE__ */ jsx(
|
|
78
|
+
showLiveStream && /* @__PURE__ */ jsx("div", { className: "mx-3 mb-2 max-h-64 overflow-y-auto rounded-md border border-[color:var(--mx-chat-border,hsl(var(--border)))] bg-background/60 px-3 py-2", children: /* @__PURE__ */ jsx(
|
|
79
79
|
MarkdownStream,
|
|
80
80
|
{
|
|
81
81
|
imagePolicy: "ai",
|
|
@@ -112,7 +112,7 @@ function CollabCallCard(props) {
|
|
|
112
112
|
labelClassName: "text-xs"
|
|
113
113
|
}
|
|
114
114
|
),
|
|
115
|
-
info.remember?.status === "queued" && /* @__PURE__ */ jsxs("span", { className: "inline-flex items-center gap-1.5 text-xs text-muted-foreground", children: [
|
|
115
|
+
info.remember?.status === "queued" && /* @__PURE__ */ jsxs("span", { className: "inline-flex items-center gap-1.5 text-xs text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", children: [
|
|
116
116
|
/* @__PURE__ */ jsx(Inbox, { className: "h-3.5 w-3.5 shrink-0 text-violet-600 dark:text-violet-400" }),
|
|
117
117
|
"Note queued for ",
|
|
118
118
|
isCurrentSource ? "this conversation" : sourceTitle ?? "the source conversation",
|
|
@@ -41,7 +41,7 @@ const ImageGenerationResult = (props) => {
|
|
|
41
41
|
e.stopPropagation();
|
|
42
42
|
onOpenOverlay(`tool-group-${groupId}`);
|
|
43
43
|
},
|
|
44
|
-
className: "group flex w-full items-center justify-between gap-2 rounded border border-border/60 px-2 py-1 text-xs text-muted-foreground transition-colors hover:border-primary/40 hover:text-foreground",
|
|
44
|
+
className: "group flex w-full items-center justify-between gap-2 rounded border border-border/60 px-2 py-1 text-xs text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))] transition-colors hover:border-primary/40 hover:text-[color:var(--mx-chat-text,hsl(var(--foreground)))]",
|
|
45
45
|
children: [
|
|
46
46
|
/* @__PURE__ */ jsx("span", { children: "View complete result" }),
|
|
47
47
|
/* @__PURE__ */ jsx(Maximize2, { className: "h-3 w-3 shrink-0" })
|
|
@@ -117,10 +117,10 @@ const AskInline = (props) => {
|
|
|
117
117
|
{
|
|
118
118
|
className: cn("px-4 py-2", i > 0 && "border-t border-border/30"),
|
|
119
119
|
children: [
|
|
120
|
-
/* @__PURE__ */ jsx("p", { className: "text-[13px] leading-snug text-foreground", children: qa.question }),
|
|
120
|
+
/* @__PURE__ */ jsx("p", { className: "text-[13px] leading-snug text-[color:var(--mx-chat-text,hsl(var(--foreground)))]", children: qa.question }),
|
|
121
121
|
/* @__PURE__ */ jsxs("p", { className: "mt-1 flex items-start gap-1.5 text-[13px] leading-snug", children: [
|
|
122
|
-
/* @__PURE__ */ jsx(CornerDownRight, { className: "mt-0.5 size-3 shrink-0 text-muted-foreground" }),
|
|
123
|
-
qa.answer !== null ? /* @__PURE__ */ jsx("span", { className: "font-medium text-foreground", children: qa.answer }) : /* @__PURE__ */ jsx("span", { className: "italic text-muted-foreground", children: "Awaiting answer" })
|
|
122
|
+
/* @__PURE__ */ jsx(CornerDownRight, { className: "mt-0.5 size-3 shrink-0 text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]" }),
|
|
123
|
+
qa.answer !== null ? /* @__PURE__ */ jsx("span", { className: "font-medium text-[color:var(--mx-chat-text,hsl(var(--foreground)))]", children: qa.answer }) : /* @__PURE__ */ jsx("span", { className: "italic text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", children: "Awaiting answer" })
|
|
124
124
|
] })
|
|
125
125
|
]
|
|
126
126
|
},
|
|
@@ -50,12 +50,12 @@ const AskPersonInline = (props) => {
|
|
|
50
50
|
"No longer needed"
|
|
51
51
|
) : lookup.phase === "unreachable" ? "Could not load this ask" : null;
|
|
52
52
|
const body = open ? /* @__PURE__ */ jsx("div", { "data-parked-ask": "", children: /* @__PURE__ */ jsx(ActionRequestInlineAnswer, { request: open, onAnswered: rereadConversation }) }) : lookup.phase === "unreachable" ? /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-3 p-4", children: [
|
|
53
|
-
/* @__PURE__ */ jsxs("p", { className: "text-sm text-muted-foreground", children: [
|
|
53
|
+
/* @__PURE__ */ jsxs("p", { className: "text-sm text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", children: [
|
|
54
54
|
"We could not reach your agent just now. Nothing was lost \u2014 try again.",
|
|
55
55
|
/* @__PURE__ */ jsx(ErrorAlchemyMenu, {})
|
|
56
56
|
] }),
|
|
57
57
|
/* @__PURE__ */ jsx(Button, { size: "sm", variant: "outline", onClick: lookup.retry, children: "Try again" })
|
|
58
|
-
] }) : lookup.phase === "closed" && cannotLook ? /* @__PURE__ */ jsx("p", { className: "p-4 text-sm text-muted-foreground", children: "Open this ask from the chat to answer it." }) : lookup.phase === "closed" ? /* @__PURE__ */ jsx("p", { className: "p-4 text-sm text-muted-foreground", children: isTerminal(entry) && !parked ? "Done \u2014 your agent has what it asked for." : "This ask is no longer open." }) : /* @__PURE__ */ jsx("p", { className: "p-4 text-sm text-muted-foreground", children: sub });
|
|
58
|
+
] }) : lookup.phase === "closed" && cannotLook ? /* @__PURE__ */ jsx("p", { className: "p-4 text-sm text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", children: "Open this ask from the chat to answer it." }) : lookup.phase === "closed" ? /* @__PURE__ */ jsx("p", { className: "p-4 text-sm text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", children: isTerminal(entry) && !parked ? "Done \u2014 your agent has what it asked for." : "This ask is no longer open." }) : /* @__PURE__ */ jsx("p", { className: "p-4 text-sm text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", children: sub });
|
|
59
59
|
if (!onToggleExpanded) {
|
|
60
60
|
return /* @__PURE__ */ jsxs("div", { children: [
|
|
61
61
|
open && open.render.form !== "questions" ? /* @__PURE__ */ jsx("p", { className: "px-4 pt-4 text-sm font-medium", children: open.render.title }) : null,
|
|
@@ -52,7 +52,7 @@ function ActivityUrl({ url }) {
|
|
|
52
52
|
target: "_blank",
|
|
53
53
|
rel: "noopener noreferrer",
|
|
54
54
|
onClick: (event) => event.stopPropagation(),
|
|
55
|
-
className: "inline-flex min-w-0 max-w-[min(22rem,48vw)] items-center gap-1 text-primary hover:underline",
|
|
55
|
+
className: "inline-flex min-w-0 max-w-[min(22rem,48vw)] items-center gap-1 text-[color:var(--mx-chat-accent,hsl(var(--primary)))] hover:underline",
|
|
56
56
|
title: url,
|
|
57
57
|
children: [
|
|
58
58
|
/* @__PURE__ */ jsx("span", { className: "truncate", children: label }),
|
|
@@ -94,7 +94,7 @@ function CloudBrowserRunCard({
|
|
|
94
94
|
{
|
|
95
95
|
className: cn(
|
|
96
96
|
"min-w-0 truncate",
|
|
97
|
-
activity.isError ? "text-destructive" : "text-muted-foreground"
|
|
97
|
+
activity.isError ? "text-destructive" : "text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]"
|
|
98
98
|
),
|
|
99
99
|
title: activity.label,
|
|
100
100
|
children: activity.label
|
|
@@ -106,12 +106,12 @@ function CloudBrowserRunCard({
|
|
|
106
106
|
] }, entries[index]?.callId ?? index);
|
|
107
107
|
}) }),
|
|
108
108
|
/* @__PURE__ */ jsxs("details", { className: "group/details mt-1.5 border-t border-border/40 pt-1.5", children: [
|
|
109
|
-
/* @__PURE__ */ jsxs("summary", { className: "flex w-fit cursor-pointer list-none items-center gap-1.5 rounded px-1 py-0.5 text-[11px] text-muted-foreground transition-colors hover:bg-accent/40 hover:text-foreground [&::-webkit-details-marker]:hidden", children: [
|
|
109
|
+
/* @__PURE__ */ jsxs("summary", { className: "flex w-fit cursor-pointer list-none items-center gap-1.5 rounded px-1 py-0.5 text-[11px] text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))] transition-colors hover:bg-accent/40 hover:text-[color:var(--mx-chat-text,hsl(var(--foreground)))] [&::-webkit-details-marker]:hidden", children: [
|
|
110
110
|
/* @__PURE__ */ jsx(SlidersHorizontal, { className: "size-3" }),
|
|
111
111
|
"Details"
|
|
112
112
|
] }),
|
|
113
113
|
/* @__PURE__ */ jsx("div", { className: "mt-1.5 max-h-64 space-y-2 overflow-y-auto rounded-md bg-muted/30 p-2 scrollbar-thin", children: entries.map((entry, index) => /* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
|
|
114
|
-
/* @__PURE__ */ jsxs("p", { className: "mb-1 text-[10px] font-medium uppercase tracking-wide text-muted-foreground", children: [
|
|
114
|
+
/* @__PURE__ */ jsxs("p", { className: "mb-1 text-[10px] font-medium uppercase tracking-wide text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", children: [
|
|
115
115
|
"Step ",
|
|
116
116
|
index + 1
|
|
117
117
|
] }),
|
|
@@ -121,7 +121,7 @@ function CloudBrowserRunCard({
|
|
|
121
121
|
] });
|
|
122
122
|
if (compact) {
|
|
123
123
|
return /* @__PURE__ */ jsxs("div", { className: cn("mb-1 w-full min-w-0", className), children: [
|
|
124
|
-
/* @__PURE__ */ jsxs("div", { className: "flex min-h-7 min-w-0 items-center gap-1.5 text-[12px] text-muted-foreground", children: [
|
|
124
|
+
/* @__PURE__ */ jsxs("div", { className: "flex min-h-7 min-w-0 items-center gap-1.5 text-[12px] text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", children: [
|
|
125
125
|
/* @__PURE__ */ jsx(Globe2, { className: "size-3.5 shrink-0 text-info" }),
|
|
126
126
|
/* @__PURE__ */ jsx(Tile, { variant: "quiet", title: `Continued browsing \xB7 ${entries.length} actions`, end: expanded ? /* @__PURE__ */ jsx(ChevronDown, {}) : /* @__PURE__ */ jsx(ChevronRight, {}), onClick: onToggleExpanded, "aria-expanded": expanded, className: "min-w-0" }),
|
|
127
127
|
latestUrl && /* @__PURE__ */ jsx("span", { className: "hidden min-w-0 flex-1 sm:block", children: /* @__PURE__ */ jsx(ActivityUrl, { url: latestUrl }) }),
|