@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
|
@@ -35,7 +35,7 @@ function WorkbookInline({
|
|
|
35
35
|
href: "/workbooks",
|
|
36
36
|
target: "_blank",
|
|
37
37
|
rel: "noopener noreferrer",
|
|
38
|
-
className: "font-medium text-foreground underline underline-offset-2",
|
|
38
|
+
className: "font-medium text-[color:var(--mx-chat-text,hsl(var(--foreground)))] underline underline-offset-2",
|
|
39
39
|
children: "/workbooks"
|
|
40
40
|
}
|
|
41
41
|
),
|
|
@@ -75,7 +75,7 @@ function WorkbookInline({
|
|
|
75
75
|
subtitle,
|
|
76
76
|
actions,
|
|
77
77
|
children: wb.firstSheet ? /* @__PURE__ */ jsxs("div", { children: [
|
|
78
|
-
wb.firstSheet.name ? /* @__PURE__ */ jsx("div", { className: "border-b border-border px-3 py-1.5 text-[11px] font-medium text-muted-foreground", children: wb.firstSheet.name }) : null,
|
|
78
|
+
wb.firstSheet.name ? /* @__PURE__ */ jsx("div", { className: "border-b border-[color:var(--mx-chat-border,hsl(var(--border)))] px-3 py-1.5 text-[11px] font-medium text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", children: wb.firstSheet.name }) : null,
|
|
79
79
|
/* @__PURE__ */ jsx(WorkbookGrid, { values: wb.firstSheet.values, maxRows: 6, maxCols: 6 })
|
|
80
80
|
] }) : null
|
|
81
81
|
}
|
|
@@ -7,11 +7,11 @@ import { WorkbookGrid } from "./WorkbookGrid.js";
|
|
|
7
7
|
function WorkbookOverlay({ entry }) {
|
|
8
8
|
const wb = useMemo(() => parseWorkbook(entry), [entry]);
|
|
9
9
|
const name = wb.name ?? "Workbook";
|
|
10
|
-
return /* @__PURE__ */ jsxs("div", { className: "flex h-full flex-col overflow-hidden bg-card", children: [
|
|
11
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 border-b border-border px-4 py-2", children: [
|
|
12
|
-
/* @__PURE__ */ jsx(Sheet, { className: "h-4 w-4 shrink-0 text-primary" }),
|
|
13
|
-
/* @__PURE__ */ jsx("span", { className: "truncate text-sm font-medium text-foreground", children: name }),
|
|
14
|
-
wb.firstSheet?.name ? /* @__PURE__ */ jsxs("span", { className: "text-xs text-muted-foreground", children: [
|
|
10
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex h-full flex-col overflow-hidden bg-[var(--mx-chat-card,hsl(var(--card)))]", children: [
|
|
11
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 border-b border-[color:var(--mx-chat-border,hsl(var(--border)))] px-4 py-2", children: [
|
|
12
|
+
/* @__PURE__ */ jsx(Sheet, { className: "h-4 w-4 shrink-0 text-[color:var(--mx-chat-accent,hsl(var(--primary)))]" }),
|
|
13
|
+
/* @__PURE__ */ jsx("span", { className: "truncate text-sm font-medium text-[color:var(--mx-chat-text,hsl(var(--foreground)))]", children: name }),
|
|
14
|
+
wb.firstSheet?.name ? /* @__PURE__ */ jsxs("span", { className: "text-xs text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", children: [
|
|
15
15
|
"\xB7 ",
|
|
16
16
|
wb.firstSheet.name
|
|
17
17
|
] }) : null,
|
|
@@ -21,7 +21,7 @@ function WorkbookOverlay({ entry }) {
|
|
|
21
21
|
href: `/workbooks/${wb.id}`,
|
|
22
22
|
target: "_blank",
|
|
23
23
|
rel: "noopener noreferrer",
|
|
24
|
-
className: "ml-auto inline-flex items-center gap-1.5 rounded-md border border-border px-3 py-1.5 text-sm font-medium text-foreground hover:bg-muted",
|
|
24
|
+
className: "ml-auto inline-flex items-center gap-1.5 rounded-md border border-[color:var(--mx-chat-border,hsl(var(--border)))] px-3 py-1.5 text-sm font-medium text-[color:var(--mx-chat-text,hsl(var(--foreground)))] hover:bg-[var(--mx-chat-fill,hsl(var(--muted)))]",
|
|
25
25
|
children: [
|
|
26
26
|
/* @__PURE__ */ jsx(ExternalLink, { className: "h-4 w-4" }),
|
|
27
27
|
"Open full editor"
|
|
@@ -29,7 +29,7 @@ function WorkbookOverlay({ entry }) {
|
|
|
29
29
|
}
|
|
30
30
|
) : null
|
|
31
31
|
] }),
|
|
32
|
-
/* @__PURE__ */ jsx("div", { className: "flex-1 overflow-auto p-4", children: wb.firstSheet ? /* @__PURE__ */ jsx(WorkbookGrid, { values: wb.firstSheet.values, maxRows: 60, maxCols: 26 }) : /* @__PURE__ */ jsx("div", { className: "py-10 text-center text-sm text-muted-foreground", children: "No sheet data to preview." }) })
|
|
32
|
+
/* @__PURE__ */ jsx("div", { className: "flex-1 overflow-auto p-4", children: wb.firstSheet ? /* @__PURE__ */ jsx(WorkbookGrid, { values: wb.firstSheet.values, maxRows: 60, maxCols: 26 }) : /* @__PURE__ */ jsx("div", { className: "py-10 text-center text-sm text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", children: "No sheet data to preview." }) })
|
|
33
33
|
] });
|
|
34
34
|
}
|
|
35
35
|
export {
|
|
@@ -41,7 +41,7 @@ const Paper = ({
|
|
|
41
41
|
"div",
|
|
42
42
|
{
|
|
43
43
|
className: cn(
|
|
44
|
-
"max-h-96 w-full overflow-auto border border-border/50 bg-card px-5 py-4 shadow-xs",
|
|
44
|
+
"max-h-96 w-full overflow-auto border border-border/50 bg-[var(--mx-chat-card,hsl(var(--card)))] px-5 py-4 shadow-xs",
|
|
45
45
|
// Attached: this sheet continues the ArtifactResultBar header above it —
|
|
46
46
|
// square top, no top border, one continuous surface.
|
|
47
47
|
attached ? "rounded-b-xl rounded-t-none border-t-0" : "rounded-xl"
|
|
@@ -87,12 +87,12 @@ const PatchDiffInline = (props) => {
|
|
|
87
87
|
const isStructural = command !== null && STRUCTURAL_PATCH_COMMANDS.has(command);
|
|
88
88
|
const hasText = after !== null && before !== null;
|
|
89
89
|
if (isStructural || !hasText) {
|
|
90
|
-
return /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground", children: isStructural ? "Structured update applied." : isTerminal(entry) ? "Updated." : "Updating\u2026" });
|
|
90
|
+
return /* @__PURE__ */ jsx("p", { className: "text-xs text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", children: isStructural ? "Structured update applied." : isTerminal(entry) ? "Updated." : "Updating\u2026" });
|
|
91
91
|
}
|
|
92
92
|
const rewrite = isEffectivelyRewrite(before, after);
|
|
93
93
|
return /* @__PURE__ */ jsx(Paper, { attached, children: rewrite ? (
|
|
94
94
|
// Full rewrite (or fresh body): the final document, no highlights.
|
|
95
|
-
/* @__PURE__ */ jsx("div", { className: `whitespace-pre-wrap break-words text-foreground ${PAPER_TEXT}`, children: after })
|
|
95
|
+
/* @__PURE__ */ jsx("div", { className: `whitespace-pre-wrap break-words text-[color:var(--mx-chat-text,hsl(var(--foreground)))] ${PAPER_TEXT}`, children: after })
|
|
96
96
|
) : /* @__PURE__ */ jsx(
|
|
97
97
|
AnimatedDiffReveal,
|
|
98
98
|
{
|
|
@@ -12,7 +12,7 @@ const EmptyResult = ({
|
|
|
12
12
|
"div",
|
|
13
13
|
{
|
|
14
14
|
className: cn(
|
|
15
|
-
"flex items-center gap-2 text-muted-foreground",
|
|
15
|
+
"flex items-center gap-2 text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]",
|
|
16
16
|
full ? "flex-col justify-center py-10 text-sm" : "py-2 text-xs",
|
|
17
17
|
className
|
|
18
18
|
),
|
|
@@ -80,7 +80,7 @@ function renderFieldValue(key, val, density, depth, embedMedia) {
|
|
|
80
80
|
if (typeof val === "string") {
|
|
81
81
|
const human = humanizeEnumValue(val);
|
|
82
82
|
if (human) {
|
|
83
|
-
return /* @__PURE__ */ jsx("span", { className: "text-sm text-foreground", title: val, children: human });
|
|
83
|
+
return /* @__PURE__ */ jsx("span", { className: "text-sm text-[color:var(--mx-chat-text,hsl(var(--foreground)))]", title: val, children: human });
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
86
|
return /* @__PURE__ */ jsx(
|
|
@@ -99,7 +99,7 @@ const IdentifierListRow = ({
|
|
|
99
99
|
ids
|
|
100
100
|
}) => {
|
|
101
101
|
const [open, setOpen] = React.useState(false);
|
|
102
|
-
return /* @__PURE__ */ jsxs("div", { className: "text-xs text-muted-foreground", children: [
|
|
102
|
+
return /* @__PURE__ */ jsxs("div", { className: "text-xs text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", children: [
|
|
103
103
|
/* @__PURE__ */ jsxs(Button, { variant: "quiet", onClick: (e) => {
|
|
104
104
|
e.stopPropagation();
|
|
105
105
|
setOpen((v) => !v);
|
|
@@ -122,7 +122,7 @@ function notApplicableSummary(names) {
|
|
|
122
122
|
}
|
|
123
123
|
const NotApplicableRow = ({ entries, labels, density, depth, embedMedia }) => {
|
|
124
124
|
const [open, setOpen] = React.useState(false);
|
|
125
|
-
return /* @__PURE__ */ jsxs("div", { className: "text-xs text-muted-foreground", children: [
|
|
125
|
+
return /* @__PURE__ */ jsxs("div", { className: "text-xs text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", children: [
|
|
126
126
|
/* @__PURE__ */ jsxs(Button, { variant: "quiet", onClick: (e) => {
|
|
127
127
|
e.stopPropagation();
|
|
128
128
|
setOpen((v) => !v);
|
|
@@ -206,7 +206,7 @@ const KeyValueGridBody = ({
|
|
|
206
206
|
/* @__PURE__ */ jsx(
|
|
207
207
|
"dt",
|
|
208
208
|
{
|
|
209
|
-
className: "truncate text-xs font-medium text-muted-foreground",
|
|
209
|
+
className: "truncate text-xs font-medium text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]",
|
|
210
210
|
title: fieldLabel(key, labels).description ?? key,
|
|
211
211
|
children: fieldLabel(key, labels).label
|
|
212
212
|
}
|
|
@@ -223,11 +223,11 @@ const KeyValueGridBody = ({
|
|
|
223
223
|
chips.length > 0 && /* @__PURE__ */ jsx("div", { className: "flex flex-wrap items-center gap-1.5", children: chips.map(([key, val]) => /* @__PURE__ */ jsxs(
|
|
224
224
|
"span",
|
|
225
225
|
{
|
|
226
|
-
className: "inline-flex items-center gap-1 rounded-md bg-muted px-1.5 py-0.5 text-xs",
|
|
226
|
+
className: "inline-flex items-center gap-1 rounded-md bg-[var(--mx-chat-fill,hsl(var(--muted)))] px-1.5 py-0.5 text-xs",
|
|
227
227
|
title: key,
|
|
228
228
|
children: [
|
|
229
|
-
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: fieldLabel(key, labels).label }),
|
|
230
|
-
/* @__PURE__ */ jsx("span", { className: "font-medium tabular-nums text-foreground", children: formatMetaNumber(val) })
|
|
229
|
+
/* @__PURE__ */ jsx("span", { className: "text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", children: fieldLabel(key, labels).label }),
|
|
230
|
+
/* @__PURE__ */ jsx("span", { className: "font-medium tabular-nums text-[color:var(--mx-chat-text,hsl(var(--foreground)))]", children: formatMetaNumber(val) })
|
|
231
231
|
]
|
|
232
232
|
},
|
|
233
233
|
key
|
|
@@ -236,7 +236,7 @@ const KeyValueGridBody = ({
|
|
|
236
236
|
/* @__PURE__ */ jsx(
|
|
237
237
|
"div",
|
|
238
238
|
{
|
|
239
|
-
className: "text-xs font-medium leading-none text-muted-foreground",
|
|
239
|
+
className: "text-xs font-medium leading-none text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]",
|
|
240
240
|
title: fieldLabel(key, labels).description ?? key,
|
|
241
241
|
children: fieldLabel(key, labels).label
|
|
242
242
|
}
|
|
@@ -258,7 +258,7 @@ const KeyValueGridBody = ({
|
|
|
258
258
|
},
|
|
259
259
|
key
|
|
260
260
|
)),
|
|
261
|
-
ids.length > 0 && /* @__PURE__ */ jsx("div", { className: "flex flex-wrap items-center gap-x-3 gap-y-1", children: ids.map(([key, val]) => /* @__PURE__ */ jsxs("span", { className: "inline-flex items-center gap-1.5 text-xs text-muted-foreground", children: [
|
|
261
|
+
ids.length > 0 && /* @__PURE__ */ jsx("div", { className: "flex flex-wrap items-center gap-x-3 gap-y-1", children: ids.map(([key, val]) => /* @__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: [
|
|
262
262
|
fieldLabel(key, labels).label,
|
|
263
263
|
/* @__PURE__ */ jsx(ShortId, { value: val })
|
|
264
264
|
] }, key)) }),
|
|
@@ -76,14 +76,14 @@ const ResultFile = ({ file, density = "inline", className }) => {
|
|
|
76
76
|
"div",
|
|
77
77
|
{
|
|
78
78
|
className: cn(
|
|
79
|
-
"inline-flex max-w-full items-center gap-3 rounded-md border border-border bg-card px-3 py-2",
|
|
79
|
+
"inline-flex max-w-full items-center gap-3 rounded-md border border-[color:var(--mx-chat-border,hsl(var(--border)))] bg-[var(--mx-chat-card,hsl(var(--card)))] px-3 py-2",
|
|
80
80
|
className
|
|
81
81
|
),
|
|
82
82
|
children: [
|
|
83
83
|
/* @__PURE__ */ jsx(FileIcon, { fileName: name, mimeType: file.mime_type ?? null, size: iconSize }),
|
|
84
84
|
/* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
85
|
-
/* @__PURE__ */ jsx("p", { className: "truncate text-sm font-medium text-foreground", title: name, children: name }),
|
|
86
|
-
metaParts.length > 0 ? /* @__PURE__ */ jsx("p", { className: "truncate text-xs text-muted-foreground tabular-nums", children: metaParts.join(" \xB7 ") }) : null
|
|
85
|
+
/* @__PURE__ */ jsx("p", { className: "truncate text-sm font-medium text-[color:var(--mx-chat-text,hsl(var(--foreground)))]", title: name, children: name }),
|
|
86
|
+
metaParts.length > 0 ? /* @__PURE__ */ jsx("p", { className: "truncate text-xs text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))] tabular-nums", children: metaParts.join(" \xB7 ") }) : null
|
|
87
87
|
] }),
|
|
88
88
|
/* @__PURE__ */ jsxs("div", { className: "flex shrink-0 items-center gap-1", children: [
|
|
89
89
|
openHref ? /* @__PURE__ */ jsx(
|
|
@@ -95,7 +95,7 @@ const ResultFile = ({ file, density = "inline", className }) => {
|
|
|
95
95
|
onClick: (e) => e.stopPropagation(),
|
|
96
96
|
"aria-label": openLabel,
|
|
97
97
|
title: openLabel,
|
|
98
|
-
className: "flex h-7 w-7 items-center justify-center rounded-md text-muted-foreground hover:bg-accent hover:text-foreground",
|
|
98
|
+
className: "flex h-7 w-7 items-center justify-center rounded-md text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))] hover:bg-accent hover:text-[color:var(--mx-chat-text,hsl(var(--foreground)))]",
|
|
99
99
|
children: /* @__PURE__ */ jsx(ExternalLink, { className: "h-4 w-4", "aria-hidden": "true" })
|
|
100
100
|
}
|
|
101
101
|
) : null,
|
|
@@ -3,7 +3,7 @@ import { jsx } from "react/jsx-runtime";
|
|
|
3
3
|
import { JsonInspector } from "../../host/ui-slots.js";
|
|
4
4
|
import { KindDataGate } from "../../host/ui-slots.js";
|
|
5
5
|
import { cn } from "@ai-matrx/design-system";
|
|
6
|
-
const ResultJson = ({ data, className, showSource = false }) => /* @__PURE__ */ jsx(KindDataGate, { component: "ResultJson", data, showSource, children: /* @__PURE__ */ jsx("div", { className: cn("min-w-0 h-80 overflow-hidden rounded-md border border-border bg-card", className), children: /* @__PURE__ */ jsx(JsonInspector, { data, showSource: true }) }) });
|
|
6
|
+
const ResultJson = ({ data, className, showSource = false }) => /* @__PURE__ */ jsx(KindDataGate, { component: "ResultJson", data, showSource, children: /* @__PURE__ */ jsx("div", { className: cn("min-w-0 h-80 overflow-hidden rounded-md border border-[color:var(--mx-chat-border,hsl(var(--border)))] bg-[var(--mx-chat-card,hsl(var(--card)))]", className), children: /* @__PURE__ */ jsx(JsonInspector, { data, showSource: true }) }) });
|
|
7
7
|
export {
|
|
8
8
|
ResultJson
|
|
9
9
|
};
|
|
@@ -30,7 +30,7 @@ const ResultMedia = ({
|
|
|
30
30
|
"div",
|
|
31
31
|
{
|
|
32
32
|
className: cn(
|
|
33
|
-
"overflow-hidden rounded-md border border-border bg-card",
|
|
33
|
+
"overflow-hidden rounded-md border border-[color:var(--mx-chat-border,hsl(var(--border)))] bg-[var(--mx-chat-card,hsl(var(--card)))]",
|
|
34
34
|
density === "full" ? "w-full max-w-2xl" : "w-fit max-w-full",
|
|
35
35
|
className
|
|
36
36
|
),
|
|
@@ -44,7 +44,7 @@ const ResultMedia = ({
|
|
|
44
44
|
rel: "noopener noreferrer",
|
|
45
45
|
onClick: (event) => event.stopPropagation(),
|
|
46
46
|
"aria-label": "View in Files",
|
|
47
|
-
className: "flex items-center justify-center gap-1.5 border-t border-border px-2 py-1.5 text-xs font-medium text-muted-foreground hover:bg-accent hover:text-foreground",
|
|
47
|
+
className: "flex items-center justify-center gap-1.5 border-t border-[color:var(--mx-chat-border,hsl(var(--border)))] px-2 py-1.5 text-xs font-medium text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))] hover:bg-accent hover:text-[color:var(--mx-chat-text,hsl(var(--foreground)))]",
|
|
48
48
|
children: [
|
|
49
49
|
/* @__PURE__ */ jsx(ExternalLink, { className: "h-3.5 w-3.5", "aria-hidden": "true" }),
|
|
50
50
|
/* @__PURE__ */ jsx("span", { children: "Open" })
|
|
@@ -7,9 +7,9 @@ const ResultScalar = ({ value, type, className }) => {
|
|
|
7
7
|
return /* @__PURE__ */ jsx(Badge, { variant: value ? "success" : "neutral", className, children: value ? "Yes" : "No" });
|
|
8
8
|
}
|
|
9
9
|
if (type === "number") {
|
|
10
|
-
return /* @__PURE__ */ jsx("span", { className: cn("font-mono tabular-nums text-foreground", className), children: String(value) });
|
|
10
|
+
return /* @__PURE__ */ jsx("span", { className: cn("font-mono tabular-nums text-[color:var(--mx-chat-text,hsl(var(--foreground)))]", className), children: String(value) });
|
|
11
11
|
}
|
|
12
|
-
return /* @__PURE__ */ jsx("span", { className: cn("text-foreground break-words", className), children: String(value) });
|
|
12
|
+
return /* @__PURE__ */ jsx("span", { className: cn("text-[color:var(--mx-chat-text,hsl(var(--foreground)))] break-words", className), children: String(value) });
|
|
13
13
|
};
|
|
14
14
|
export {
|
|
15
15
|
ResultScalar
|
|
@@ -111,7 +111,7 @@ const Cell = ({
|
|
|
111
111
|
}) => {
|
|
112
112
|
const mediaElementHint = mediaElementHintForKey(fieldKey);
|
|
113
113
|
if (value === null || value === void 0) {
|
|
114
|
-
return /* @__PURE__ */ jsx("span", { className: "italic text-muted-foreground", children: "\u2014" });
|
|
114
|
+
return /* @__PURE__ */ jsx("span", { className: "italic text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", children: "\u2014" });
|
|
115
115
|
}
|
|
116
116
|
if (typeof value === "string" && detectResultShape(value, { embedMedia }).kind === "media") {
|
|
117
117
|
return /* @__PURE__ */ jsx(
|
|
@@ -150,7 +150,7 @@ const Cell = ({
|
|
|
150
150
|
return /* @__PURE__ */ jsx("span", { className: "flex flex-wrap gap-1", children: value.map((item, i) => /* @__PURE__ */ jsx(
|
|
151
151
|
"span",
|
|
152
152
|
{
|
|
153
|
-
className: "rounded bg-muted px-1 py-px text-[11px] leading-tight text-muted-foreground",
|
|
153
|
+
className: "rounded bg-[var(--mx-chat-fill,hsl(var(--muted)))] px-1 py-px text-[11px] leading-tight text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]",
|
|
154
154
|
children: String(item)
|
|
155
155
|
},
|
|
156
156
|
i
|
|
@@ -240,9 +240,9 @@ const ResultTable = ({
|
|
|
240
240
|
onChange: (e) => setFilter(e.target.value),
|
|
241
241
|
onClick: (e) => e.stopPropagation(),
|
|
242
242
|
placeholder: `Filter ${rows.length} rows\u2026`,
|
|
243
|
-
className: "h-9 w-full max-w-xs rounded-md border border-border bg-background px-3 text-base text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring sm:text-sm"
|
|
243
|
+
className: "h-9 w-full max-w-xs rounded-md border border-[color:var(--mx-chat-border,hsl(var(--border)))] bg-background px-3 text-base text-[color:var(--mx-chat-text,hsl(var(--foreground)))] placeholder:text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))] focus:outline-none focus:ring-2 focus:ring-ring sm:text-sm"
|
|
244
244
|
}
|
|
245
|
-
) : /* @__PURE__ */ jsxs("span", { className: "text-xs text-muted-foreground", children: [
|
|
245
|
+
) : /* @__PURE__ */ jsxs("span", { className: "text-xs text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", children: [
|
|
246
246
|
rows.length,
|
|
247
247
|
" ",
|
|
248
248
|
rows.length === 1 ? "row" : "rows"
|
|
@@ -255,7 +255,7 @@ const ResultTable = ({
|
|
|
255
255
|
"th",
|
|
256
256
|
{
|
|
257
257
|
className: cn(
|
|
258
|
-
"border-b border-border/60 px-2.5 py-1.5 text-left align-bottom text-[11px] font-medium text-muted-foreground",
|
|
258
|
+
"border-b border-border/60 px-2.5 py-1.5 text-left align-bottom text-[11px] font-medium text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]",
|
|
259
259
|
colIdx === 0 && MOBILE_TABLE_FROZEN_HEAD
|
|
260
260
|
),
|
|
261
261
|
children: /* @__PURE__ */ jsxs(
|
|
@@ -266,7 +266,7 @@ const ResultTable = ({
|
|
|
266
266
|
e.stopPropagation();
|
|
267
267
|
cycleSort(col.key);
|
|
268
268
|
},
|
|
269
|
-
className: "inline-flex items-center gap-1 hover:text-foreground",
|
|
269
|
+
className: "inline-flex items-center gap-1 hover:text-[color:var(--mx-chat-text,hsl(var(--foreground)))]",
|
|
270
270
|
title: `Sort by ${col.label}`,
|
|
271
271
|
children: [
|
|
272
272
|
/* @__PURE__ */ jsx("span", { className: "break-words", children: col.label }),
|
|
@@ -278,13 +278,13 @@ const ResultTable = ({
|
|
|
278
278
|
col.key
|
|
279
279
|
);
|
|
280
280
|
}),
|
|
281
|
-
collapseTechnicalColumns ? /* @__PURE__ */ jsx("th", { className: "border-b border-border/60 px-2.5 py-1.5 text-left align-bottom text-[11px] font-medium text-muted-foreground", children: "Details" }) : null
|
|
281
|
+
collapseTechnicalColumns ? /* @__PURE__ */ jsx("th", { className: "border-b border-border/60 px-2.5 py-1.5 text-left align-bottom text-[11px] font-medium text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", children: "Details" }) : null
|
|
282
282
|
] }) }),
|
|
283
283
|
/* @__PURE__ */ jsx("tbody", { children: shown.length === 0 ? /* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsx(
|
|
284
284
|
"td",
|
|
285
285
|
{
|
|
286
286
|
colSpan: visibleColumns.length + (collapseTechnicalColumns ? 1 : 0),
|
|
287
|
-
className: "px-3 py-4 text-center text-xs text-muted-foreground",
|
|
287
|
+
className: "px-3 py-4 text-center text-xs text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]",
|
|
288
288
|
children: "No rows match the filter"
|
|
289
289
|
}
|
|
290
290
|
) }) : shown.map((row, ri) => /* @__PURE__ */ jsxs("tr", { className: "border-b border-border/60 last:border-0 hover:bg-muted/30", children: [
|
|
@@ -292,7 +292,7 @@ const ResultTable = ({
|
|
|
292
292
|
"td",
|
|
293
293
|
{
|
|
294
294
|
className: cn(
|
|
295
|
-
"px-2.5 py-1.5 align-top text-foreground",
|
|
295
|
+
"px-2.5 py-1.5 align-top text-[color:var(--mx-chat-text,hsl(var(--foreground)))]",
|
|
296
296
|
colIdx === 0 && MOBILE_TABLE_FROZEN_CELL
|
|
297
297
|
),
|
|
298
298
|
children: /* @__PURE__ */ jsx(
|
|
@@ -307,7 +307,7 @@ const ResultTable = ({
|
|
|
307
307
|
},
|
|
308
308
|
col.key
|
|
309
309
|
)),
|
|
310
|
-
collapseTechnicalColumns ? /* @__PURE__ */ jsx("td", { className: "px-2.5 py-1.5 align-top text-foreground", children: /* @__PURE__ */ jsx(
|
|
310
|
+
collapseTechnicalColumns ? /* @__PURE__ */ jsx("td", { className: "px-2.5 py-1.5 align-top text-[color:var(--mx-chat-text,hsl(var(--foreground)))]", children: /* @__PURE__ */ jsx(
|
|
311
311
|
TechnicalDetailsCell,
|
|
312
312
|
{
|
|
313
313
|
row,
|
|
@@ -27,11 +27,11 @@ const InlineText = ({ value }) => {
|
|
|
27
27
|
const lines = value.split("\n");
|
|
28
28
|
const isLong = lines.length > INLINE_TEXT_LINES || value.length > 600;
|
|
29
29
|
if (!isLong) {
|
|
30
|
-
return /* @__PURE__ */ jsx("p", { className: "whitespace-pre-wrap break-words text-sm text-foreground", children: value });
|
|
30
|
+
return /* @__PURE__ */ jsx("p", { className: "whitespace-pre-wrap break-words text-sm text-[color:var(--mx-chat-text,hsl(var(--foreground)))]", children: value });
|
|
31
31
|
}
|
|
32
32
|
const shown = expanded ? value : lines.slice(0, INLINE_TEXT_LINES).join("\n");
|
|
33
33
|
return /* @__PURE__ */ jsxs("div", { children: [
|
|
34
|
-
/* @__PURE__ */ jsx("p", { className: "whitespace-pre-wrap break-words text-sm text-foreground", children: shown }),
|
|
34
|
+
/* @__PURE__ */ jsx("p", { className: "whitespace-pre-wrap break-words text-sm text-[color:var(--mx-chat-text,hsl(var(--foreground)))]", children: shown }),
|
|
35
35
|
/* @__PURE__ */ jsx(Button, { variant: "quiet", tone: "primary", onClick: (e) => {
|
|
36
36
|
e.stopPropagation();
|
|
37
37
|
setExpanded((v) => !v);
|
|
@@ -44,9 +44,9 @@ const ScalarList = ({ items, density }) => {
|
|
|
44
44
|
const shown = items.slice(0, cap);
|
|
45
45
|
const remaining = items.length - shown.length;
|
|
46
46
|
return /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
|
|
47
|
-
/* @__PURE__ */ jsx("ul", { className: "space-y-0.5", children: shown.map((item, i) => /* @__PURE__ */ jsxs("li", { className: "flex gap-2 text-sm text-foreground", children: [
|
|
48
|
-
/* @__PURE__ */ jsx("span", { className: "select-none text-muted-foreground", children: "\u2022" }),
|
|
49
|
-
/* @__PURE__ */ jsx("div", { className: "min-w-0 flex-1 break-words", children: typeof item === "string" && looksLikeMarkdown(item) ? /* @__PURE__ */ jsx(ResultMarkdown, { content: item, density }) : item === null ? /* @__PURE__ */ jsx("span", { className: "italic text-muted-foreground", children: "null" }) : String(item) })
|
|
47
|
+
/* @__PURE__ */ jsx("ul", { className: "space-y-0.5", children: shown.map((item, i) => /* @__PURE__ */ jsxs("li", { className: "flex gap-2 text-sm text-[color:var(--mx-chat-text,hsl(var(--foreground)))]", children: [
|
|
48
|
+
/* @__PURE__ */ jsx("span", { className: "select-none text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", children: "\u2022" }),
|
|
49
|
+
/* @__PURE__ */ jsx("div", { className: "min-w-0 flex-1 break-words", children: typeof item === "string" && looksLikeMarkdown(item) ? /* @__PURE__ */ jsx(ResultMarkdown, { content: item, density }) : item === null ? /* @__PURE__ */ jsx("span", { className: "italic text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", children: "null" }) : String(item) })
|
|
50
50
|
] }, i)) }),
|
|
51
51
|
remaining > 0 && /* @__PURE__ */ jsxs(Button, { variant: "quiet", tone: "primary", onClick: (e) => {
|
|
52
52
|
e.stopPropagation();
|
|
@@ -129,7 +129,7 @@ const ResultValue = ({
|
|
|
129
129
|
) : null
|
|
130
130
|
] });
|
|
131
131
|
case "text":
|
|
132
|
-
return shape.markdown ? /* @__PURE__ */ jsx(ResultMarkdown, { content: shape.value, density }) : density === "full" ? /* @__PURE__ */ jsx("p", { className: "whitespace-pre-wrap break-words text-sm text-foreground", children: shape.value }) : /* @__PURE__ */ jsx(InlineText, { value: shape.value });
|
|
132
|
+
return shape.markdown ? /* @__PURE__ */ jsx(ResultMarkdown, { content: shape.value, density }) : density === "full" ? /* @__PURE__ */ jsx("p", { className: "whitespace-pre-wrap break-words text-sm text-[color:var(--mx-chat-text,hsl(var(--foreground)))]", children: shape.value }) : /* @__PURE__ */ jsx(InlineText, { value: shape.value });
|
|
133
133
|
case "list":
|
|
134
134
|
return /* @__PURE__ */ jsx(ScalarList, { items: shape.items, density });
|
|
135
135
|
case "idList":
|
|
@@ -161,7 +161,7 @@ const ResultValue = ({
|
|
|
161
161
|
case "recordRef":
|
|
162
162
|
return /* @__PURE__ */ jsx(ResultRecordRef, { token: shape.token, id: shape.id, label: shape.label });
|
|
163
163
|
case "textWithRecordRefs":
|
|
164
|
-
return /* @__PURE__ */ jsx("p", { className: "whitespace-pre-wrap break-words text-sm text-foreground", children: shape.segments.map(
|
|
164
|
+
return /* @__PURE__ */ jsx("p", { className: "whitespace-pre-wrap break-words text-sm text-[color:var(--mx-chat-text,hsl(var(--foreground)))]", children: shape.segments.map(
|
|
165
165
|
(segment, index) => segment.type === "text" ? (
|
|
166
166
|
// Position is the identity: a deterministic split of one string.
|
|
167
167
|
/* @__PURE__ */ jsx(TextWithDoors, { text: segment.text }, `t${index}`)
|
|
@@ -28,9 +28,9 @@ const ShortId = ({
|
|
|
28
28
|
timer.current = setTimeout(() => setCopied(false), 1500);
|
|
29
29
|
});
|
|
30
30
|
};
|
|
31
|
-
const display = variant === "full" ? /* @__PURE__ */ jsx("span", { className: "break-all font-mono text-xs text-foreground", children: value }) : /* @__PURE__ */ jsxs("span", { className: "font-mono text-xs text-foreground", children: [
|
|
31
|
+
const display = variant === "full" ? /* @__PURE__ */ jsx("span", { className: "break-all font-mono text-xs text-[color:var(--mx-chat-text,hsl(var(--foreground)))]", children: value }) : /* @__PURE__ */ jsxs("span", { className: "font-mono text-xs text-[color:var(--mx-chat-text,hsl(var(--foreground)))]", children: [
|
|
32
32
|
value.slice(0, 8),
|
|
33
|
-
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: "\u2026" })
|
|
33
|
+
/* @__PURE__ */ jsx("span", { className: "text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", children: "\u2026" })
|
|
34
34
|
] });
|
|
35
35
|
return /* @__PURE__ */ jsxs(
|
|
36
36
|
"span",
|
|
@@ -74,7 +74,7 @@ const IdListChip = ({
|
|
|
74
74
|
"span",
|
|
75
75
|
{
|
|
76
76
|
className: cn(
|
|
77
|
-
"inline-flex items-center gap-1 text-xs text-muted-foreground",
|
|
77
|
+
"inline-flex items-center gap-1 text-xs text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]",
|
|
78
78
|
className
|
|
79
79
|
),
|
|
80
80
|
children: [
|
|
@@ -48,21 +48,21 @@ const ToolErrorCard = ({
|
|
|
48
48
|
className: cn(
|
|
49
49
|
// Calm, not alarming: a quiet bordered row, muted icon — NOT red.
|
|
50
50
|
// A tool error is a routine retry signal, not an app failure.
|
|
51
|
-
"flex items-center gap-2 rounded-md border border-border bg-muted/30 px-3 py-2",
|
|
51
|
+
"flex items-center gap-2 rounded-md border border-[color:var(--mx-chat-border,hsl(var(--border)))] bg-muted/30 px-3 py-2",
|
|
52
52
|
className
|
|
53
53
|
),
|
|
54
54
|
children: [
|
|
55
|
-
/* @__PURE__ */ jsx(Icon, { className: "h-3.5 w-3.5 flex-shrink-0 text-muted-foreground" }),
|
|
55
|
+
/* @__PURE__ */ jsx(Icon, { className: "h-3.5 w-3.5 flex-shrink-0 text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]" }),
|
|
56
56
|
/* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-1 items-baseline gap-2", children: [
|
|
57
57
|
/* @__PURE__ */ jsx(
|
|
58
58
|
"span",
|
|
59
59
|
{
|
|
60
|
-
className: "flex-shrink-0 text-xs font-medium text-foreground",
|
|
60
|
+
className: "flex-shrink-0 text-xs font-medium text-[color:var(--mx-chat-text,hsl(var(--foreground)))]",
|
|
61
61
|
title: routed?.tooltip,
|
|
62
62
|
children: label
|
|
63
63
|
}
|
|
64
64
|
),
|
|
65
|
-
detail && /* @__PURE__ */ jsx("span", { className: "min-w-0 truncate text-xs text-muted-foreground", children: detail })
|
|
65
|
+
detail && /* @__PURE__ */ jsx("span", { className: "min-w-0 truncate text-xs text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", children: detail })
|
|
66
66
|
] }),
|
|
67
67
|
onOpenOverlay && /* @__PURE__ */ jsx(Button, { variant: "quiet", onClick: (e) => {
|
|
68
68
|
e.stopPropagation();
|
|
@@ -47,16 +47,16 @@ const UrlChip = ({ url, label, className }) => {
|
|
|
47
47
|
onClick: (e) => e.stopPropagation(),
|
|
48
48
|
title: href,
|
|
49
49
|
className: cn(
|
|
50
|
-
"inline-flex max-w-full items-center gap-1.5 rounded-md border border-border bg-muted/50 px-2 py-1 text-xs text-foreground transition-colors hover:bg-accent",
|
|
50
|
+
"inline-flex max-w-full items-center gap-1.5 rounded-md border border-[color:var(--mx-chat-border,hsl(var(--border)))] bg-muted/50 px-2 py-1 text-xs text-[color:var(--mx-chat-text,hsl(var(--foreground)))] transition-colors hover:bg-accent",
|
|
51
51
|
className
|
|
52
52
|
),
|
|
53
53
|
children: [
|
|
54
54
|
favicon ? (
|
|
55
55
|
// eslint-disable-next-line @next/next/no-img-element -- tiny external favicon, not app media
|
|
56
56
|
/* @__PURE__ */ jsx("img", { src: favicon, alt: "", width: 14, height: 14, className: "h-3.5 w-3.5 flex-shrink-0 rounded-sm" })
|
|
57
|
-
) : /* @__PURE__ */ jsx(ExternalLink, { className: "h-3.5 w-3.5 flex-shrink-0 text-muted-foreground" }),
|
|
57
|
+
) : /* @__PURE__ */ jsx(ExternalLink, { className: "h-3.5 w-3.5 flex-shrink-0 text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]" }),
|
|
58
58
|
/* @__PURE__ */ jsx("span", { className: "truncate", children: label ?? derived }),
|
|
59
|
-
/* @__PURE__ */ jsx(ExternalLink, { className: "h-3 w-3 flex-shrink-0 text-muted-foreground opacity-60" })
|
|
59
|
+
/* @__PURE__ */ jsx(ExternalLink, { className: "h-3 w-3 flex-shrink-0 text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))] opacity-60" })
|
|
60
60
|
]
|
|
61
61
|
}
|
|
62
62
|
);
|
|
@@ -44,7 +44,7 @@ function SurfaceWriteDiff({
|
|
|
44
44
|
const language = diffLanguageOf(receipt);
|
|
45
45
|
const heavy = !!language && !isMobile || receipt.before.length + receipt.after.length > LARGE_INPUT_CHARS;
|
|
46
46
|
const canPreview = receipt.contentFormat === "markdown" || receipt.contentFormat === "text";
|
|
47
|
-
const slot = /* @__PURE__ */ jsxs("span", { className: "ml-1 inline-flex items-center gap-1.5 text-[11px] text-muted-foreground", children: [
|
|
47
|
+
const slot = /* @__PURE__ */ jsxs("span", { className: "ml-1 inline-flex items-center gap-1.5 text-[11px] text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", children: [
|
|
48
48
|
/* @__PURE__ */ jsx("span", { children: MODE_LABEL[receipt.mode] ?? "Changed" }),
|
|
49
49
|
receipt.truncated ? /* @__PURE__ */ jsx(
|
|
50
50
|
Badge,
|
|
@@ -62,7 +62,7 @@ function SurfaceWriteDiff({
|
|
|
62
62
|
"data-surface-write-diff": "",
|
|
63
63
|
"data-surface-write-mode": receipt.mode,
|
|
64
64
|
className: cn(
|
|
65
|
-
"w-full overflow-hidden rounded-lg border border-border/60 bg-card text-[13px]",
|
|
65
|
+
"w-full overflow-hidden rounded-lg border border-border/60 bg-[var(--mx-chat-card,hsl(var(--card)))] text-[13px]",
|
|
66
66
|
className
|
|
67
67
|
),
|
|
68
68
|
children: preview ? /* @__PURE__ */ jsxs("div", { children: [
|
|
@@ -159,7 +159,7 @@ function SurfaceWriteStress() {
|
|
|
159
159
|
return /* @__PURE__ */ jsxs("div", { className: "mx-auto flex h-full max-w-3xl flex-col gap-3 overflow-auto px-2 py-4", children: [
|
|
160
160
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
161
161
|
/* @__PURE__ */ jsx(Button, { variant: "primary", onClick: run, children: "Run 200 KB write" }),
|
|
162
|
-
/* @__PURE__ */ jsx("span", { className: "text-xs text-muted-foreground", children: "Streams 2 s, then the receipt lands (\u2248200 KB before and after)." })
|
|
162
|
+
/* @__PURE__ */ jsx("span", { className: "text-xs text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", children: "Streams 2 s, then the receipt lands (\u2248200 KB before and after)." })
|
|
163
163
|
] }),
|
|
164
164
|
/* @__PURE__ */ jsx("div", { ref: hostRef, "data-stress-host": "", children: entry ? /* @__PURE__ */ jsx(ToolCallVisualization, { entries: [entry], hasContent: true }) : null })
|
|
165
165
|
] });
|
|
@@ -53,7 +53,7 @@ const EntrySidebar = ({
|
|
|
53
53
|
onLoadMore
|
|
54
54
|
}) => {
|
|
55
55
|
return /* @__PURE__ */ jsxs("div", { className: "flex h-full flex-col overflow-hidden", children: [
|
|
56
|
-
conversationScopeAvailable && /* @__PURE__ */ jsx("div", { className: "flex-shrink-0 border-b border-border p-2", children: /* @__PURE__ */ jsxs(
|
|
56
|
+
conversationScopeAvailable && /* @__PURE__ */ jsx("div", { className: "flex-shrink-0 border-b border-[color:var(--mx-chat-border,hsl(var(--border)))] p-2", children: /* @__PURE__ */ jsxs(
|
|
57
57
|
ToggleGroup,
|
|
58
58
|
{
|
|
59
59
|
type: "single",
|
|
@@ -90,7 +90,7 @@ const EntrySidebar = ({
|
|
|
90
90
|
className: "m-2",
|
|
91
91
|
onRetry
|
|
92
92
|
}
|
|
93
|
-
) : entries.length === 0 ? /* @__PURE__ */ jsx("div", { className: "px-3 py-4 text-xs italic text-muted-foreground", children: loadingMore ? "Loading tool calls\u2026" : "No tool entries" }) : entries.map((entry, idx) => {
|
|
93
|
+
) : entries.length === 0 ? /* @__PURE__ */ jsx("div", { className: "px-3 py-4 text-xs italic text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", children: loadingMore ? "Loading tool calls\u2026" : "No tool entries" }) : entries.map((entry, idx) => {
|
|
94
94
|
const isActive = entry.callId === selectedCallId;
|
|
95
95
|
const label = getToolDisplayName(entry.toolName);
|
|
96
96
|
const isError = entry.status === "error";
|
|
@@ -103,7 +103,7 @@ const EntrySidebar = ({
|
|
|
103
103
|
onClick: () => onSelect(entry.callId),
|
|
104
104
|
className: cn(
|
|
105
105
|
"mx-1 flex items-center gap-2 rounded-md border px-2 py-1.5 text-left text-xs transition-colors",
|
|
106
|
-
isActive ? "border-primary/30 bg-primary/10 text-foreground" : "border-transparent text-muted-foreground hover:bg-muted hover:text-foreground"
|
|
106
|
+
isActive ? "border-primary/30 bg-primary/10 text-[color:var(--mx-chat-text,hsl(var(--foreground)))]" : "border-transparent text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))] hover:bg-[var(--mx-chat-fill,hsl(var(--muted)))] hover:text-[color:var(--mx-chat-text,hsl(var(--foreground)))]"
|
|
107
107
|
),
|
|
108
108
|
title: `${label} \u2014 ${entry.status}`,
|
|
109
109
|
children: [
|
|
@@ -112,7 +112,7 @@ const EntrySidebar = ({
|
|
|
112
112
|
"."
|
|
113
113
|
] }),
|
|
114
114
|
/* @__PURE__ */ jsx("span", { className: "flex-1 truncate font-medium", children: label }),
|
|
115
|
-
/* @__PURE__ */ jsx("span", { className: "flex-shrink-0", children: isError ? /* @__PURE__ */ jsx(AlertTriangle, { className: "h-3 w-3 text-destructive" }) : isRunning ? /* @__PURE__ */ jsx(Loader2, { className: "h-3 w-3 animate-spin text-primary" }) : isComplete ? /* @__PURE__ */ jsx(CheckCircle, { className: "h-3 w-3 text-success" }) : /* @__PURE__ */ jsx("span", { className: "block h-2 w-2 rounded-full bg-muted-foreground/40" }) })
|
|
115
|
+
/* @__PURE__ */ jsx("span", { className: "flex-shrink-0", children: isError ? /* @__PURE__ */ jsx(AlertTriangle, { className: "h-3 w-3 text-destructive" }) : isRunning ? /* @__PURE__ */ jsx(Loader2, { className: "h-3 w-3 animate-spin text-[color:var(--mx-chat-accent,hsl(var(--primary)))]" }) : isComplete ? /* @__PURE__ */ jsx(CheckCircle, { className: "h-3 w-3 text-success" }) : /* @__PURE__ */ jsx("span", { className: "block h-2 w-2 rounded-full bg-muted-foreground/40" }) })
|
|
116
116
|
]
|
|
117
117
|
},
|
|
118
118
|
entry.callId
|
|
@@ -127,7 +127,7 @@ const EntrySidebar = ({
|
|
|
127
127
|
onRetry: hasMore ? onLoadMore : onRetry
|
|
128
128
|
}
|
|
129
129
|
),
|
|
130
|
-
scope === "conversation" && (hasMore || loadingMore) && /* @__PURE__ */ jsx("div", { className: "flex-shrink-0 border-t border-border p-1.5", children: /* @__PURE__ */ jsx(
|
|
130
|
+
scope === "conversation" && (hasMore || loadingMore) && /* @__PURE__ */ jsx("div", { className: "flex-shrink-0 border-t border-[color:var(--mx-chat-border,hsl(var(--border)))] p-1.5", children: /* @__PURE__ */ jsx(
|
|
131
131
|
Button,
|
|
132
132
|
{
|
|
133
133
|
variant: "quiet",
|
|
@@ -161,7 +161,7 @@ const ToolBrowserTabBar = ({ tabs, activeTabId, onTabClick }) => {
|
|
|
161
161
|
ref: scrollRef,
|
|
162
162
|
role: "tablist",
|
|
163
163
|
"aria-label": "Tool result views",
|
|
164
|
-
className: "flex h-[34px] min-h-[34px] shrink-0 items-stretch overflow-x-auto overflow-y-hidden border-b border-border bg-muted/40",
|
|
164
|
+
className: "flex h-[34px] min-h-[34px] shrink-0 items-stretch overflow-x-auto overflow-y-hidden border-b border-[color:var(--mx-chat-border,hsl(var(--border)))] bg-muted/40",
|
|
165
165
|
style: { scrollbarWidth: "none" },
|
|
166
166
|
children: [
|
|
167
167
|
tabs.map((tab) => {
|
|
@@ -174,8 +174,8 @@ const ToolBrowserTabBar = ({ tabs, activeTabId, onTabClick }) => {
|
|
|
174
174
|
"data-active": isActive,
|
|
175
175
|
onClick: () => onTabClick(tab.id),
|
|
176
176
|
className: cn(
|
|
177
|
-
"relative flex h-full shrink-0 cursor-pointer select-none items-center gap-1.5 border-r border-border px-3 transition-colors",
|
|
178
|
-
isActive ? "bg-background text-foreground" : "bg-transparent text-muted-foreground hover:bg-muted/60 hover:text-foreground"
|
|
177
|
+
"relative flex h-full shrink-0 cursor-pointer select-none items-center gap-1.5 border-r border-[color:var(--mx-chat-border,hsl(var(--border)))] px-3 transition-colors",
|
|
178
|
+
isActive ? "bg-background text-[color:var(--mx-chat-text,hsl(var(--foreground)))]" : "bg-transparent text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))] hover:bg-muted/60 hover:text-[color:var(--mx-chat-text,hsl(var(--foreground)))]"
|
|
179
179
|
),
|
|
180
180
|
children: [
|
|
181
181
|
isActive && /* @__PURE__ */ jsx("span", { className: "absolute inset-x-0 top-0 h-[2px] bg-primary" }),
|
|
@@ -352,7 +352,7 @@ const ToolCallWindowPanelBody = ({
|
|
|
352
352
|
what: "this conversation's tool calls",
|
|
353
353
|
onRetry: retryConversationEntries
|
|
354
354
|
}
|
|
355
|
-
) : /* @__PURE__ */ jsx("div", { className: "p-8 text-center text-muted-foreground", children: /* @__PURE__ */ jsx("p", { className: "text-sm", children: "No tool data available" }) });
|
|
355
|
+
) : /* @__PURE__ */ jsx("div", { className: "p-8 text-center text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", children: /* @__PURE__ */ jsx("p", { className: "text-sm", children: "No tool data available" }) });
|
|
356
356
|
const adminTabs = [
|
|
357
357
|
{
|
|
358
358
|
id: "input",
|