@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.
Files changed (158) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/dist/agents/api/fetch-pending-calls.js +4 -3
  3. package/dist/agents/api/submit-tool-results.js +3 -6
  4. package/dist/agents/components/ambient-assistant/ScrollAssistantLauncherImpl.js +13 -6
  5. package/dist/agents/components/chat/begin-fresh-chat.js +2 -2
  6. package/dist/agents/components/identity-refs/AiIdentityRef.js +2 -2
  7. package/dist/agents/components/inputs/smart-input/composer/ComposerSplash.js +2 -3
  8. package/dist/agents/components/inputs/smart-input/composer/useComposerMode.js +4 -2
  9. package/dist/agents/components/live-run/LiveRunDisplay.d.ts +7 -1
  10. package/dist/agents/components/live-run/LiveRunDisplay.js +3 -1
  11. package/dist/agents/components/messages-display/AgentConversationDisplay.js +1 -1
  12. package/dist/agents/components/messages-display/assistant/AgentEmptyMessageDisplay.js +4 -4
  13. package/dist/agents/components/messages-display/assistant/AssistantNoAnswer.js +1 -1
  14. package/dist/agents/components/messages-display/assistant/BreathingOrb.js +1 -1
  15. package/dist/agents/components/messages-display/assistant/InPlaceAnswerEditor.js +1 -1
  16. package/dist/agents/components/messages-display/citations/MessageSourcesRow.js +1 -1
  17. package/dist/agents/components/messages-display/conversation-tools/ConversationFindBar.js +4 -4
  18. package/dist/agents/components/messages-display/message-options/EditHistoryDialog.js +7 -7
  19. package/dist/agents/components/messages-display/user/AgentUserMessage.js +4 -4
  20. package/dist/agents/components/messages-display/user/CollabNoteMessage.js +2 -2
  21. package/dist/agents/components/messages-display/user/FirstTurnVariables.js +3 -3
  22. package/dist/agents/components/messages-display/user/PendingSendMessage.js +4 -4
  23. package/dist/agents/components/messages-display/user/RemarksTranscriptView.js +7 -7
  24. package/dist/agents/components/messages-display/user/ResourceAttachmentTile.js +9 -9
  25. package/dist/agents/components/messages-display/user/ResourceEditableToggleSamples.js +4 -4
  26. package/dist/agents/components/messages-display/user/UserActionBar.js +3 -3
  27. package/dist/agents/components/messages-display/user/UserMessageAttachmentStyleComparison.js +12 -12
  28. package/dist/agents/components/messages-display/user/UserMessageChipsDemo.js +19 -19
  29. package/dist/agents/components/messages-display/user/UserMessageHybridTileSamples.js +22 -22
  30. package/dist/agents/components/run/AgentRunnerPage.js +4 -4
  31. package/dist/agents/components/run/AssistantError.js +1 -1
  32. package/dist/agents/components/run/AssistantWarning.js +1 -1
  33. package/dist/agents/components/run/GenerationJobCard.js +5 -5
  34. package/dist/agents/components/run/IncompleteNote.js +1 -1
  35. package/dist/agents/components/run/RunJobWorkingLine.js +1 -1
  36. package/dist/agents/components/shared/AgentConversationColumn.js +1 -1
  37. package/dist/agents/components/shared/AgentHeaderMobile.js +6 -6
  38. package/dist/agents/components/shared/AgentModeController.js +1 -1
  39. package/dist/agents/components/shared/AutoInjectionSwitch.js +6 -6
  40. package/dist/agents/components/shared/DesktopFilterPanel.js +8 -8
  41. package/dist/agents/components/smart/AgentRunner.js +1 -1
  42. package/dist/agents/components/smart/CreateWithAiTabs.js +1 -1
  43. package/dist/agents/redux/agent-definition/agent-cache-bust-request.js +7 -7
  44. package/dist/agents/redux/execution-system/context-rules/receipt-check.js +2 -2
  45. package/dist/agents/redux/execution-system/inbox/inbox.thunks.d.ts +2 -2
  46. package/dist/agents/redux/execution-system/inbox/inbox.thunks.js +7 -15
  47. package/dist/agents/redux/execution-system/observational-memory/fetch-memory-cost.thunk.d.ts +1 -1
  48. package/dist/agents/redux/execution-system/observational-memory/fetch-memory-cost.thunk.js +7 -4
  49. package/dist/agents/redux/execution-system/selectors/aggregate.selectors.d.ts +1 -114
  50. package/dist/agents/redux/execution-system/selectors/aggregate.selectors.js +28 -43
  51. package/dist/agents/redux/execution-system/thunks/call-conversation-api.d.ts +44 -0
  52. package/dist/agents/redux/execution-system/thunks/call-conversation-api.js +78 -0
  53. package/dist/agents/redux/execution-system/thunks/continue-agent-json.d.ts +41 -0
  54. package/dist/agents/redux/execution-system/thunks/continue-agent-json.js +66 -0
  55. package/dist/agents/redux/execution-system/thunks/execute-instance.thunk.d.ts +20 -0
  56. package/dist/agents/redux/execution-system/thunks/execute-instance.thunk.js +9 -2
  57. package/dist/agents/redux/execution-system/thunks/launch-agent-execution.thunk.js +4 -6
  58. package/dist/agents/redux/execution-system/thunks/notify-and-play-dispatcher.d.ts +1 -5
  59. package/dist/agents/redux/execution-system/thunks/notify-and-play-dispatcher.js +2 -1
  60. package/dist/agents/redux/execution-system/thunks/resolve-base-url.js +7 -17
  61. package/dist/agents/redux/execution-system/thunks/settle-after-stop.thunk.js +2 -2
  62. package/dist/agents/redux/execution-system/thunks/smart-execute.thunk.js +3 -3
  63. package/dist/agents/redux/execution-system/utils/continuation-body.d.ts +8 -2
  64. package/dist/agents/redux/execution-system/utils/continuation-body.js +3 -3
  65. package/dist/agents/redux/execution-system/utils/required-organization.d.ts +18 -0
  66. package/dist/agents/redux/execution-system/utils/required-organization.js +14 -10
  67. package/dist/agents/redux/execution-system/utils/stream-block-accumulator.d.ts +69 -333
  68. package/dist/agents/redux/execution-system/utils/stream-block-accumulator.js +268 -1896
  69. package/dist/agents/services/mcp-connections.service.js +5 -8
  70. package/dist/agents/ui-first-tools/dispatcher/dispatch-ui-first-tool.thunk.js +2 -1
  71. package/dist/host/defaults/files-host.js +11 -1
  72. package/dist/host/defaults/files-ui.js +2 -1
  73. package/dist/host/defaults/server-api.d.ts +1 -15
  74. package/dist/host/defaults/server-api.js +0 -21
  75. package/dist/host/defaults/server.d.ts +2 -1
  76. package/dist/host/defaults/server.js +8 -6
  77. package/dist/host/request-headers.d.ts +26 -0
  78. package/dist/host/request-headers.js +15 -0
  79. package/dist/host/server/call-api.d.ts +0 -13
  80. package/dist/host/server/call-api.js +0 -2
  81. package/dist/host/server/matrx-transport.d.ts +0 -1
  82. package/dist/host/server/matrx-transport.js +0 -2
  83. package/dist/store/root-state.d.ts +4 -21
  84. package/dist/surfaces/hooks/useSurfaceConfig.js +2 -1
  85. package/dist/surfaces/runtime/surface-feedback.js +2 -2
  86. package/dist/tool-call-visualization/components/ArtifactResultBar.js +4 -4
  87. package/dist/tool-call-visualization/components/ChatResultColumn.d.ts +1 -1
  88. package/dist/tool-call-visualization/components/ToolCallBatch.js +2 -2
  89. package/dist/tool-call-visualization/components/ToolCallVisualization.js +5 -5
  90. package/dist/tool-call-visualization/components/ToolTabBodies.js +12 -12
  91. package/dist/tool-call-visualization/components/ToolUpdatesOverlay.js +4 -4
  92. package/dist/tool-call-visualization/configured-rows/ConfiguredToolRow.js +8 -8
  93. package/dist/tool-call-visualization/configured-rows/CopyToolButton.js +1 -1
  94. package/dist/tool-call-visualization/configured-rows/ToolProgressView.js +7 -7
  95. package/dist/tool-call-visualization/configured-rows/field-components.js +28 -50
  96. package/dist/tool-call-visualization/registry/GenericRenderer.js +4 -4
  97. package/dist/tool-call-visualization/renderers/_shared-entity/EmptyResultCard.js +1 -1
  98. package/dist/tool-call-visualization/renderers/_shared-entity/EntityCard.js +5 -5
  99. package/dist/tool-call-visualization/renderers/_shared-entity/PartPeekPopover.js +2 -2
  100. package/dist/tool-call-visualization/renderers/_shared-entity/ToolGlyph.js +1 -1
  101. package/dist/tool-call-visualization/renderers/_shared-entity/ToolResultCard.js +6 -6
  102. package/dist/tool-call-visualization/renderers/agent-call/AgentCallInline.js +5 -5
  103. package/dist/tool-call-visualization/renderers/agent-call/CollabCallCard.js +4 -4
  104. package/dist/tool-call-visualization/renderers/agent-call/ImageGenerationResult.js +1 -1
  105. package/dist/tool-call-visualization/renderers/ask/AskInline.js +3 -3
  106. package/dist/tool-call-visualization/renderers/ask-person/AskPersonInline.js +2 -2
  107. package/dist/tool-call-visualization/renderers/cloud-browser/CloudBrowserRunCard.js +5 -5
  108. package/dist/tool-call-visualization/renderers/ctx/CtxBatchInline.js +3 -3
  109. package/dist/tool-call-visualization/renderers/ctx/CtxGetInline.js +2 -2
  110. package/dist/tool-call-visualization/renderers/ctx/CtxItemCard.js +3 -3
  111. package/dist/tool-call-visualization/renderers/ctx/CtxPatchInline.js +6 -6
  112. package/dist/tool-call-visualization/renderers/dictionary/DictEntryList.js +12 -12
  113. package/dist/tool-call-visualization/renderers/dictionary/DictionaryOverlay.js +5 -5
  114. package/dist/tool-call-visualization/renderers/fs/FsInline.js +7 -7
  115. package/dist/tool-call-visualization/renderers/news-api/NewsInline.js +17 -17
  116. package/dist/tool-call-visualization/renderers/news-api/NewsOverlay.js +12 -12
  117. package/dist/tool-call-visualization/renderers/random-wheel/RandomWheelInline.js +34 -34
  118. package/dist/tool-call-visualization/renderers/records/RecordsInline.js +1 -1
  119. package/dist/tool-call-visualization/renderers/research/ResearchInline.js +10 -10
  120. package/dist/tool-call-visualization/renderers/research/ResearchOverlay.js +19 -19
  121. package/dist/tool-call-visualization/renderers/research/SubagentReportBlock.js +11 -11
  122. package/dist/tool-call-visualization/renderers/scrape/ScrapeInline.js +18 -18
  123. package/dist/tool-call-visualization/renderers/scrape/ScrapeOverlay.js +17 -17
  124. package/dist/tool-call-visualization/renderers/search/SearchInline.js +30 -30
  125. package/dist/tool-call-visualization/renderers/search/SearchOverlay.js +40 -40
  126. package/dist/tool-call-visualization/renderers/shell/ShellInline.js +3 -3
  127. package/dist/tool-call-visualization/renderers/skill/SkillInline.js +5 -5
  128. package/dist/tool-call-visualization/renderers/sql/DbSchemaInline.js +7 -7
  129. package/dist/tool-call-visualization/renderers/sql/SqlInline.js +4 -4
  130. package/dist/tool-call-visualization/renderers/workbook/WorkbookGrid.js +4 -4
  131. package/dist/tool-call-visualization/renderers/workbook/WorkbookInline.js +2 -2
  132. package/dist/tool-call-visualization/renderers/workbook/WorkbookOverlay.js +7 -7
  133. package/dist/tool-call-visualization/renderers/working-document/PatchDiffInline.js +3 -3
  134. package/dist/tool-call-visualization/result-fields/EmptyResult.js +1 -1
  135. package/dist/tool-call-visualization/result-fields/KeyValueGrid.js +9 -9
  136. package/dist/tool-call-visualization/result-fields/ResultFile.js +4 -4
  137. package/dist/tool-call-visualization/result-fields/ResultJson.js +1 -1
  138. package/dist/tool-call-visualization/result-fields/ResultMedia.js +2 -2
  139. package/dist/tool-call-visualization/result-fields/ResultScalar.js +2 -2
  140. package/dist/tool-call-visualization/result-fields/ResultTable.js +10 -10
  141. package/dist/tool-call-visualization/result-fields/ResultValue.js +7 -7
  142. package/dist/tool-call-visualization/result-fields/ShortId.js +3 -3
  143. package/dist/tool-call-visualization/result-fields/ToolErrorCard.js +4 -4
  144. package/dist/tool-call-visualization/result-fields/UrlChips.js +3 -3
  145. package/dist/tool-call-visualization/surface-write/SurfaceWriteDiff.js +2 -2
  146. package/dist/tool-call-visualization/surface-write/SurfaceWriteStress.js +1 -1
  147. package/dist/tool-call-visualization/window-panel/ToolCallWindowPanel.js +9 -9
  148. package/dist/ui/mandates-storage/mandateStorage.d.ts +36 -0
  149. package/dist/ui/mandates-storage/shortcutStorage.d.ts +9 -0
  150. package/dist/ui/markdown-stream/EnhancedChatMarkdown.js +22 -0
  151. package/dist/ui/markdown-stream/MarkdownStreamImpl.js +3 -3
  152. package/dist/ui/markdown-stream/StreamTextFallback.d.ts +6 -0
  153. package/dist/ui/markdown-stream/StreamTextFallback.js +23 -0
  154. package/dist/ui/markdown-stream/merge-thinking-across-hidden.d.ts +19 -0
  155. package/dist/ui/markdown-stream/merge-thinking-across-hidden.js +21 -0
  156. package/package.json +14 -9
  157. package/dist/agents/redux/execution-system/utils/content-prefilter.d.ts +0 -50
  158. package/dist/agents/redux/execution-system/utils/content-prefilter.js +0 -243
@@ -23,7 +23,7 @@ import { Button } from "@ai-matrx/design-system/controls";
23
23
  const Favicon = ({ url, className }) => {
24
24
  const [failed, setFailed] = React.useState(false);
25
25
  const src = url ? getFaviconUrl(url) : "";
26
- if (failed || !src) return /* @__PURE__ */ jsx(Globe, { className: `text-muted-foreground ${className ?? ""}` });
26
+ if (failed || !src) return /* @__PURE__ */ jsx(Globe, { className: `text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))] ${className ?? ""}` });
27
27
  return (
28
28
  // eslint-disable-next-line @next/next/no-img-element -- favicon service, not owned media
29
29
  /* @__PURE__ */ jsx("img", { src, alt: "", className: `rounded-sm ${className ?? ""}`, onError: () => setFailed(true) })
@@ -33,10 +33,10 @@ const StatChip = ({
33
33
  icon,
34
34
  value,
35
35
  label
36
- }) => /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 rounded-md border border-border bg-card px-2.5 py-1.5", children: [
37
- /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: icon }),
38
- /* @__PURE__ */ jsx("span", { className: "text-sm font-semibold tabular-nums text-foreground", children: value }),
39
- /* @__PURE__ */ jsx("span", { className: "text-xs text-muted-foreground", children: label })
36
+ }) => /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 rounded-md border border-[color:var(--mx-chat-border,hsl(var(--border)))] bg-[var(--mx-chat-card,hsl(var(--card)))] px-2.5 py-1.5", children: [
37
+ /* @__PURE__ */ jsx("span", { className: "text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", children: icon }),
38
+ /* @__PURE__ */ jsx("span", { className: "text-sm font-semibold tabular-nums text-[color:var(--mx-chat-text,hsl(var(--foreground)))]", children: value }),
39
+ /* @__PURE__ */ jsx("span", { className: "text-xs text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", children: label })
40
40
  ] });
41
41
  const SourceRow = ({ source, index }) => /* @__PURE__ */ jsxs(
42
42
  "a",
@@ -49,8 +49,8 @@ const SourceRow = ({ source, index }) => /* @__PURE__ */ jsxs(
49
49
  style: { animationDelay: `${Math.min(index, 10) * 30}ms`, animationDuration: "220ms", animationFillMode: "backwards" },
50
50
  children: [
51
51
  /* @__PURE__ */ jsx(Favicon, { url: source.url, className: "h-4 w-4 flex-shrink-0" }),
52
- /* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 truncate text-sm text-foreground group-hover:text-primary", children: source.title }),
53
- /* @__PURE__ */ jsx("span", { className: "hidden flex-shrink-0 truncate text-xs text-muted-foreground sm:inline", children: source.domain })
52
+ /* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 truncate text-sm text-[color:var(--mx-chat-text,hsl(var(--foreground)))] group-hover:text-[color:var(--mx-chat-accent,hsl(var(--primary)))]", children: source.title }),
53
+ /* @__PURE__ */ jsx("span", { className: "hidden flex-shrink-0 truncate text-xs text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))] sm:inline", children: source.domain })
54
54
  ]
55
55
  }
56
56
  );
@@ -156,15 +156,15 @@ const ResearchInline = ({
156
156
  parsed.domains.slice(0, 8).map((d) => /* @__PURE__ */ jsxs(Badge, { variant: "secondary", className: "gap-1.5 font-normal", children: [
157
157
  /* @__PURE__ */ jsx(Favicon, { url: `https://${d.domain}`, className: "h-3 w-3" }),
158
158
  /* @__PURE__ */ jsx("span", { className: "max-w-[140px] truncate", children: d.domain }),
159
- /* @__PURE__ */ jsx("span", { className: "tabular-nums text-muted-foreground", children: d.count })
159
+ /* @__PURE__ */ jsx("span", { className: "tabular-nums text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", children: d.count })
160
160
  ] }, d.domain)),
161
- parsed.domains.length > 8 && /* @__PURE__ */ jsxs(Badge, { variant: "outline", className: "font-normal text-muted-foreground", children: [
161
+ parsed.domains.length > 8 && /* @__PURE__ */ jsxs(Badge, { variant: "outline", className: "font-normal text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", children: [
162
162
  "+",
163
163
  parsed.domains.length - 8,
164
164
  " more"
165
165
  ] })
166
166
  ] }),
167
- topSources.length > 0 && /* @__PURE__ */ jsx("div", { className: "divide-y divide-border/50 rounded-md border border-border p-1", children: topSources.map((s, i) => /* @__PURE__ */ jsx(SourceRow, { index: i, source: s }, `${s.url}-${i}`)) }),
167
+ topSources.length > 0 && /* @__PURE__ */ jsx("div", { className: "divide-y divide-border/50 rounded-md border border-[color:var(--mx-chat-border,hsl(var(--border)))] p-1", children: topSources.map((s, i) => /* @__PURE__ */ jsx(SourceRow, { index: i, source: s }, `${s.url}-${i}`)) }),
168
168
  onOpenOverlay && (parsed.sources.length > 0 || parsed.reads.length > 0) && /* @__PURE__ */ jsxs(Button, { variant: "outline", iconEnd: /* @__PURE__ */ jsx(ArrowRight, {}), onClick: (e) => {
169
169
  e.stopPropagation();
170
170
  onOpenOverlay(`tool-group-${toolGroupId}`);
@@ -26,13 +26,13 @@ import { RichDocument } from "@ai-matrx/rich-content/rich-document/RichDocument"
26
26
  const Favicon = ({ url, className }) => {
27
27
  const [failed, setFailed] = useState(false);
28
28
  const src = url ? getFaviconUrl(url) : "";
29
- if (failed || !src) return /* @__PURE__ */ jsx(Globe, { className: cn("text-muted-foreground", className) });
29
+ if (failed || !src) return /* @__PURE__ */ jsx(Globe, { className: cn("text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", className) });
30
30
  return (
31
31
  // eslint-disable-next-line @next/next/no-img-element -- favicon service, not owned media
32
32
  /* @__PURE__ */ jsx("img", { src, alt: "", className: cn("rounded-sm", className), onError: () => setFailed(true) })
33
33
  );
34
34
  };
35
- const EmptyState = ({ icon, message }) => /* @__PURE__ */ jsx("div", { className: "flex h-64 items-center justify-center text-muted-foreground", children: /* @__PURE__ */ jsxs("div", { className: "text-center", children: [
35
+ const EmptyState = ({ icon, message }) => /* @__PURE__ */ jsx("div", { className: "flex h-64 items-center justify-center text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", children: /* @__PURE__ */ jsxs("div", { className: "text-center", children: [
36
36
  /* @__PURE__ */ jsx("div", { className: "mx-auto mb-3 opacity-40", children: icon }),
37
37
  /* @__PURE__ */ jsx("p", { className: "text-sm", children: message })
38
38
  ] }) });
@@ -44,10 +44,10 @@ const ResearchReportTab = ({ entry }) => {
44
44
  if (!parsed.report) {
45
45
  return /* @__PURE__ */ jsx(EmptyState, { icon: /* @__PURE__ */ jsx(FileText, { className: "h-12 w-12" }), message: "No curated report available" });
46
46
  }
47
- return /* @__PURE__ */ jsx("div", { className: "space-y-4", children: /* @__PURE__ */ jsxs("div", { className: "overflow-hidden rounded-lg border border-border bg-card", children: [
48
- parsed.queries.length > 0 && /* @__PURE__ */ jsxs("div", { className: "border-b border-border bg-muted/40 px-5 py-3", children: [
49
- /* @__PURE__ */ jsx("p", { className: "mb-1 text-xs font-medium uppercase tracking-wide text-muted-foreground", children: "Queries" }),
50
- /* @__PURE__ */ jsx("p", { className: "text-sm text-foreground", children: parsed.queries.join(" \xB7 ") })
47
+ return /* @__PURE__ */ jsx("div", { className: "space-y-4", children: /* @__PURE__ */ jsxs("div", { className: "overflow-hidden rounded-lg border border-[color:var(--mx-chat-border,hsl(var(--border)))] bg-[var(--mx-chat-card,hsl(var(--card)))]", children: [
48
+ parsed.queries.length > 0 && /* @__PURE__ */ jsxs("div", { className: "border-b border-[color:var(--mx-chat-border,hsl(var(--border)))] bg-muted/40 px-5 py-3", children: [
49
+ /* @__PURE__ */ jsx("p", { className: "mb-1 text-xs font-medium uppercase tracking-wide text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", children: "Queries" }),
50
+ /* @__PURE__ */ jsx("p", { className: "text-sm text-[color:var(--mx-chat-text,hsl(var(--foreground)))]", children: parsed.queries.join(" \xB7 ") })
51
51
  ] }),
52
52
  /* @__PURE__ */ jsx("div", { className: "p-5", children: /* @__PURE__ */ jsx(
53
53
  RichDocument,
@@ -72,8 +72,8 @@ const ReadCard = ({
72
72
  }) => {
73
73
  const [expanded, setExpanded] = useState(false);
74
74
  const isLong = read.text.length > 500;
75
- return /* @__PURE__ */ jsxs("div", { className: "overflow-hidden rounded-lg border border-border bg-card", children: [
76
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2.5 border-b border-border bg-muted/40 px-4 py-2.5", children: [
75
+ return /* @__PURE__ */ jsxs("div", { className: "overflow-hidden rounded-lg border border-[color:var(--mx-chat-border,hsl(var(--border)))] bg-[var(--mx-chat-card,hsl(var(--card)))]", children: [
76
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2.5 border-b border-[color:var(--mx-chat-border,hsl(var(--border)))] bg-muted/40 px-4 py-2.5", children: [
77
77
  /* @__PURE__ */ jsx(Favicon, { url: read.url, className: "h-4 w-4 flex-shrink-0" }),
78
78
  /* @__PURE__ */ jsx(
79
79
  "a",
@@ -81,7 +81,7 @@ const ReadCard = ({
81
81
  href: read.url || void 0,
82
82
  target: "_blank",
83
83
  rel: "noopener noreferrer",
84
- className: "truncate text-xs font-medium text-primary hover:underline",
84
+ className: "truncate text-xs font-medium text-[color:var(--mx-chat-accent,hsl(var(--primary)))] hover:underline",
85
85
  title: read.url,
86
86
  children: getDomain(read.url)
87
87
  }
@@ -95,7 +95,7 @@ const ReadCard = ({
95
95
  href: read.url || void 0,
96
96
  target: "_blank",
97
97
  rel: "noopener noreferrer",
98
- className: "block text-base font-semibold text-foreground hover:text-primary",
98
+ className: "block text-base font-semibold text-[color:var(--mx-chat-text,hsl(var(--foreground)))] hover:text-[color:var(--mx-chat-accent,hsl(var(--primary)))]",
99
99
  children: read.title || getDomain(read.url)
100
100
  }
101
101
  ),
@@ -120,15 +120,15 @@ const RankedSource = ({ source, rank }) => /* @__PURE__ */ jsxs(
120
120
  rel: "noopener noreferrer",
121
121
  className: "group flex items-start gap-3 px-3 py-2 transition-colors hover:bg-muted/40",
122
122
  children: [
123
- /* @__PURE__ */ jsx("span", { className: "mt-0.5 w-6 flex-shrink-0 text-right text-xs tabular-nums text-muted-foreground", children: rank }),
123
+ /* @__PURE__ */ jsx("span", { className: "mt-0.5 w-6 flex-shrink-0 text-right text-xs tabular-nums text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", children: rank }),
124
124
  /* @__PURE__ */ jsx(Favicon, { url: source.url, className: "mt-0.5 h-4 w-4 flex-shrink-0" }),
125
125
  /* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
126
126
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
127
- /* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 truncate text-sm font-medium text-foreground group-hover:text-primary", children: source.title }),
128
- /* @__PURE__ */ jsx(ExternalLink, { className: "h-3 w-3 flex-shrink-0 text-muted-foreground opacity-0 transition-opacity group-hover:opacity-100" })
127
+ /* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 truncate text-sm font-medium text-[color:var(--mx-chat-text,hsl(var(--foreground)))] group-hover:text-[color:var(--mx-chat-accent,hsl(var(--primary)))]", children: source.title }),
128
+ /* @__PURE__ */ jsx(ExternalLink, { className: "h-3 w-3 flex-shrink-0 text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))] opacity-0 transition-opacity group-hover:opacity-100" })
129
129
  ] }),
130
130
  /* @__PURE__ */ jsx("div", { className: "truncate text-xs text-primary/80", children: source.domain }),
131
- source.snippet && /* @__PURE__ */ jsx("p", { className: "mt-1 line-clamp-2 text-xs leading-relaxed text-muted-foreground", children: source.snippet })
131
+ source.snippet && /* @__PURE__ */ jsx("p", { className: "mt-1 line-clamp-2 text-xs leading-relaxed text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", children: source.snippet })
132
132
  ] })
133
133
  ]
134
134
  }
@@ -150,10 +150,10 @@ ${read.text}`, "default", { toast: false })) {
150
150
  }
151
151
  return /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
152
152
  parsed.reads.length > 0 && /* @__PURE__ */ jsx("div", { className: "space-y-3", children: parsed.reads.map((r, i) => /* @__PURE__ */ jsx(ReadCard, { read: r, index: i, copied, onCopy: handleCopy }, `${r.url}-${i}`)) }),
153
- parsed.sources.length > 0 && /* @__PURE__ */ jsxs("div", { className: "overflow-hidden rounded-md border border-border", children: [
154
- /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between border-b border-border bg-muted/40 px-3 py-2", children: [
155
- /* @__PURE__ */ jsx("span", { className: "text-sm font-medium text-foreground", children: "All sources" }),
156
- /* @__PURE__ */ jsxs("span", { className: "text-xs tabular-nums text-muted-foreground", children: [
153
+ parsed.sources.length > 0 && /* @__PURE__ */ jsxs("div", { className: "overflow-hidden rounded-md border border-[color:var(--mx-chat-border,hsl(var(--border)))]", children: [
154
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between border-b border-[color:var(--mx-chat-border,hsl(var(--border)))] bg-muted/40 px-3 py-2", children: [
155
+ /* @__PURE__ */ jsx("span", { className: "text-sm font-medium text-[color:var(--mx-chat-text,hsl(var(--foreground)))]", children: "All sources" }),
156
+ /* @__PURE__ */ jsxs("span", { className: "text-xs tabular-nums text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", children: [
157
157
  parsed.sources.length,
158
158
  " ",
159
159
  parsed.sources.length === 1 ? "source" : "sources"
@@ -230,7 +230,7 @@ const ResearchFullTextTab = ({ entry }) => {
230
230
  if (!fullText.trim()) {
231
231
  return /* @__PURE__ */ jsx(EmptyState, { icon: /* @__PURE__ */ jsx(BookOpen, { className: "h-12 w-12" }), message: "No research data available" });
232
232
  }
233
- return /* @__PURE__ */ jsxs("div", { className: "relative overflow-hidden rounded-lg border border-border bg-card", children: [
233
+ return /* @__PURE__ */ jsxs("div", { className: "relative overflow-hidden rounded-lg border border-[color:var(--mx-chat-border,hsl(var(--border)))] bg-[var(--mx-chat-card,hsl(var(--card)))]", children: [
234
234
  /* @__PURE__ */ jsx(Button, { variant: "outline", icon: copied ? /* @__PURE__ */ jsx(Check, {}) : /* @__PURE__ */ jsx(Copy, {}), glyphTone: copied ? "success" : void 0, onClick: handleCopyAll, "aria-label": copied ? "Copied" : "Copy all", title: copied ? "Copied" : "Copy all", className: "absolute right-2 top-2 z-10" }),
235
235
  /* @__PURE__ */ jsx("div", { className: "p-5", children: /* @__PURE__ */ jsx(RichContent, { level: "full", imagePolicy: "ai", source: fullText, hideCopyButton: true, className: "text-sm" }) })
236
236
  ] });
@@ -24,8 +24,8 @@ const SubagentReportBlock = ({
24
24
  const effectiveView = streaming ? "partial" : view;
25
25
  const scrollRef = useAutoScrollOnStream(report, streaming);
26
26
  const hasReport = report.trim().length > 0;
27
- return /* @__PURE__ */ jsxs("div", { className: "mx-auto w-[94%] overflow-hidden rounded-xl border border-primary/20 bg-card shadow-sm", children: [
28
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 border-b border-border bg-primary/5 px-3 py-2", children: [
27
+ return /* @__PURE__ */ jsxs("div", { className: "mx-auto w-[94%] overflow-hidden rounded-xl border border-primary/20 bg-[var(--mx-chat-card,hsl(var(--card)))] shadow-sm", children: [
28
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 border-b border-[color:var(--mx-chat-border,hsl(var(--border)))] bg-primary/5 px-3 py-2", children: [
29
29
  /* @__PURE__ */ jsxs(
30
30
  "button",
31
31
  {
@@ -34,19 +34,19 @@ const SubagentReportBlock = ({
34
34
  className: "flex min-w-0 flex-1 items-center gap-2 text-left",
35
35
  "aria-expanded": effectiveView !== "none",
36
36
  children: [
37
- effectiveView === "none" ? /* @__PURE__ */ jsx(ChevronRight, { className: "h-4 w-4 flex-shrink-0 text-muted-foreground" }) : /* @__PURE__ */ jsx(ChevronDown, { className: "h-4 w-4 flex-shrink-0 text-muted-foreground" }),
38
- /* @__PURE__ */ jsx(AGENT_ICON, { className: "h-4 w-4 flex-shrink-0 text-primary" }),
37
+ effectiveView === "none" ? /* @__PURE__ */ jsx(ChevronRight, { className: "h-4 w-4 flex-shrink-0 text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]" }) : /* @__PURE__ */ jsx(ChevronDown, { className: "h-4 w-4 flex-shrink-0 text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]" }),
38
+ /* @__PURE__ */ jsx(AGENT_ICON, { className: "h-4 w-4 flex-shrink-0 text-[color:var(--mx-chat-accent,hsl(var(--primary)))]" }),
39
39
  /* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
40
40
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
41
- /* @__PURE__ */ jsx("span", { className: "text-sm font-semibold text-foreground", children: "Research report" }),
41
+ /* @__PURE__ */ jsx("span", { className: "text-sm font-semibold text-[color:var(--mx-chat-text,hsl(var(--foreground)))]", children: "Research report" }),
42
42
  /* @__PURE__ */ jsx(Badge, { tone: "primary", children: "Sub-agent" })
43
43
  ] }),
44
- queries && queries.length > 0 && /* @__PURE__ */ jsx("div", { className: "truncate text-xs text-muted-foreground", children: queries.join(" \xB7 ") })
44
+ queries && queries.length > 0 && /* @__PURE__ */ jsx("div", { className: "truncate text-xs text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", children: queries.join(" \xB7 ") })
45
45
  ] })
46
46
  ]
47
47
  }
48
48
  ),
49
- streaming ? /* @__PURE__ */ jsxs("span", { className: "flex flex-shrink-0 items-center gap-1.5 text-xs font-medium text-primary", children: [
49
+ streaming ? /* @__PURE__ */ jsxs("span", { className: "flex flex-shrink-0 items-center gap-1.5 text-xs font-medium text-[color:var(--mx-chat-accent,hsl(var(--primary)))]", children: [
50
50
  /* @__PURE__ */ jsx("span", { className: "h-1.5 w-1.5 rounded-full bg-primary animate-pulse" }),
51
51
  "Streaming"
52
52
  ] }) : effectiveView !== "none" && /* @__PURE__ */ jsx(
@@ -54,7 +54,7 @@ const SubagentReportBlock = ({
54
54
  {
55
55
  type: "button",
56
56
  onClick: () => setView((v) => v === "full" ? "partial" : "full"),
57
- className: "flex flex-shrink-0 items-center gap-1 rounded-md border border-border bg-background px-2 py-1 text-xs text-muted-foreground transition-colors hover:bg-muted/50",
57
+ className: "flex flex-shrink-0 items-center gap-1 rounded-md border border-[color:var(--mx-chat-border,hsl(var(--border)))] bg-background px-2 py-1 text-xs text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))] transition-colors hover:bg-muted/50",
58
58
  title: view === "full" ? "Collapse to a window" : "Expand fully",
59
59
  children: view === "full" ? /* @__PURE__ */ jsxs(Fragment, { children: [
60
60
  /* @__PURE__ */ jsx(Minimize2, { className: "h-3 w-3" }),
@@ -84,8 +84,8 @@ const SubagentReportBlock = ({
84
84
  hideCopyButton: true,
85
85
  className: "text-sm"
86
86
  }
87
- ) : /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 py-6 text-sm text-muted-foreground", children: [
88
- /* @__PURE__ */ jsx(FileText, { className: "h-4 w-4 text-primary" }),
87
+ ) : /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 py-6 text-sm text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", children: [
88
+ /* @__PURE__ */ jsx(FileText, { className: "h-4 w-4 text-[color:var(--mx-chat-accent,hsl(var(--primary)))]" }),
89
89
  "Synthesizing the report\u2026"
90
90
  ] })
91
91
  }
@@ -116,7 +116,7 @@ const SubagentReportBlock = ({
116
116
  ) })
117
117
  }
118
118
  )
119
- ) : /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 p-4 text-sm text-muted-foreground", children: [
119
+ ) : /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 p-4 text-sm text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", children: [
120
120
  /* @__PURE__ */ jsx(FileText, { className: "h-4 w-4" }),
121
121
  "No report was produced."
122
122
  ] }) })
@@ -27,7 +27,7 @@ const Favicon = ({
27
27
  const [failed, setFailed] = useState(false);
28
28
  const src = url ? getFaviconUrl(url) : "";
29
29
  if (failed || !src)
30
- return /* @__PURE__ */ jsx(Globe, { className: cn("text-muted-foreground", className) });
30
+ return /* @__PURE__ */ jsx(Globe, { className: cn("text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", className) });
31
31
  return (
32
32
  // eslint-disable-next-line @next/next/no-img-element -- favicon service, not owned media
33
33
  /* @__PURE__ */ jsx(
@@ -79,9 +79,9 @@ const PulsingDots = () => /* @__PURE__ */ jsxs("span", { className: "flex gap-0.
79
79
  )
80
80
  ] });
81
81
  const ContentSkeleton = () => /* @__PURE__ */ jsxs("div", { className: "space-y-1.5", children: [
82
- /* @__PURE__ */ jsx("div", { className: "h-2.5 w-3/4 rounded bg-muted", style: { animation: "pulse 1.6s ease-in-out infinite" } }),
83
- /* @__PURE__ */ jsx("div", { className: "h-2.5 w-full rounded bg-muted", style: { animation: "pulse 1.6s ease-in-out infinite 0.15s" } }),
84
- /* @__PURE__ */ jsx("div", { className: "h-2.5 w-5/6 rounded bg-muted", style: { animation: "pulse 1.6s ease-in-out infinite 0.3s" } })
82
+ /* @__PURE__ */ jsx("div", { className: "h-2.5 w-3/4 rounded bg-[var(--mx-chat-fill,hsl(var(--muted)))]", style: { animation: "pulse 1.6s ease-in-out infinite" } }),
83
+ /* @__PURE__ */ jsx("div", { className: "h-2.5 w-full rounded bg-[var(--mx-chat-fill,hsl(var(--muted)))]", style: { animation: "pulse 1.6s ease-in-out infinite 0.15s" } }),
84
+ /* @__PURE__ */ jsx("div", { className: "h-2.5 w-5/6 rounded bg-[var(--mx-chat-fill,hsl(var(--muted)))]", style: { animation: "pulse 1.6s ease-in-out infinite 0.3s" } })
85
85
  ] });
86
86
  const PageCardHeader = ({ url, domain, reading }) => /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
87
87
  /* @__PURE__ */ jsx(Favicon, { url, className: "h-4 w-4 flex-shrink-0" }),
@@ -98,9 +98,9 @@ const PageCardHeader = ({ url, domain, reading }) => /* @__PURE__ */ jsxs("div",
98
98
  }
99
99
  ),
100
100
  reading ? /* @__PURE__ */ jsxs("span", { className: "flex flex-shrink-0 items-center gap-1.5", children: [
101
- /* @__PURE__ */ jsx("span", { className: "text-xs font-medium text-primary", children: "Reading" }),
101
+ /* @__PURE__ */ jsx("span", { className: "text-xs font-medium text-[color:var(--mx-chat-accent,hsl(var(--primary)))]", children: "Reading" }),
102
102
  /* @__PURE__ */ jsx(PulsingDots, {})
103
- ] }) : /* @__PURE__ */ jsx(BookOpenCheck, { className: "h-3.5 w-3.5 flex-shrink-0 text-primary" })
103
+ ] }) : /* @__PURE__ */ jsx(BookOpenCheck, { className: "h-3.5 w-3.5 flex-shrink-0 text-[color:var(--mx-chat-accent,hsl(var(--primary)))]" })
104
104
  ] });
105
105
  const ReadingCard = ({
106
106
  url,
@@ -128,14 +128,14 @@ const ReadPageCard = ({ page, index, onOpen }) => {
128
128
  return /* @__PURE__ */ jsxs(
129
129
  "div",
130
130
  {
131
- className: "animate-in fade-in slide-in-from-bottom-1 overflow-hidden rounded-lg border border-border bg-card",
131
+ className: "animate-in fade-in slide-in-from-bottom-1 overflow-hidden rounded-lg border border-[color:var(--mx-chat-border,hsl(var(--border)))] bg-[var(--mx-chat-card,hsl(var(--card)))]",
132
132
  style: {
133
133
  animationDelay: `${Math.min(index, 8) * 70}ms`,
134
134
  animationDuration: "280ms",
135
135
  animationFillMode: "backwards"
136
136
  },
137
137
  children: [
138
- page.image && /* @__PURE__ */ jsx("div", { className: "relative h-32 w-full overflow-hidden border-b border-border bg-muted", children: /* @__PURE__ */ jsx(
138
+ page.image && /* @__PURE__ */ jsx("div", { className: "relative h-32 w-full overflow-hidden border-b border-[color:var(--mx-chat-border,hsl(var(--border)))] bg-[var(--mx-chat-fill,hsl(var(--muted)))]", children: /* @__PURE__ */ jsx(
139
139
  InlineMediaRef,
140
140
  {
141
141
  ref: { url: page.image },
@@ -157,16 +157,16 @@ const ReadPageCard = ({ page, index, onOpen }) => {
157
157
  target: "_blank",
158
158
  rel: "noopener noreferrer",
159
159
  onClick: (e) => e.stopPropagation(),
160
- className: "block text-sm font-semibold leading-snug text-foreground hover:text-primary",
160
+ className: "block text-sm font-semibold leading-snug text-[color:var(--mx-chat-text,hsl(var(--foreground)))] hover:text-[color:var(--mx-chat-accent,hsl(var(--primary)))]",
161
161
  children: page.title
162
162
  }
163
163
  ),
164
164
  page.aiReview && /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-1.5 rounded-md border border-primary/15 bg-primary/5 px-2 py-1.5", children: [
165
- /* @__PURE__ */ jsx(AGENT_ICON, { className: "mt-0.5 h-3 w-3 flex-shrink-0 text-primary" }),
165
+ /* @__PURE__ */ jsx(AGENT_ICON, { className: "mt-0.5 h-3 w-3 flex-shrink-0 text-[color:var(--mx-chat-accent,hsl(var(--primary)))]" }),
166
166
  /* @__PURE__ */ jsx("span", { className: "text-xs leading-relaxed text-foreground/85", children: page.aiReview })
167
167
  ] }),
168
- snippet && /* @__PURE__ */ jsx("p", { className: "line-clamp-3 whitespace-pre-wrap text-xs leading-relaxed text-muted-foreground", children: snippet }),
169
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 pt-0.5 text-xs text-muted-foreground", children: [
168
+ snippet && /* @__PURE__ */ jsx("p", { className: "line-clamp-3 whitespace-pre-wrap text-xs leading-relaxed text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", children: snippet }),
169
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 pt-0.5 text-xs text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", children: [
170
170
  /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-1", children: [
171
171
  /* @__PURE__ */ jsx(FileText, { className: "h-3 w-3" }),
172
172
  formatCount(page.charCount),
@@ -227,8 +227,8 @@ const ScrapeInline = ({
227
227
  const pendingUrls = browsingUrls.filter((u) => !readUrls.has(u));
228
228
  const headerCount = browsingUrls.length || parsed.pages.length || 1;
229
229
  return /* @__PURE__ */ jsxs("div", { className: "space-y-2.5", children: [
230
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 text-sm text-muted-foreground", children: [
231
- /* @__PURE__ */ jsx(Loader2, { className: "h-4 w-4 animate-spin text-primary" }),
230
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 text-sm text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", children: [
231
+ /* @__PURE__ */ jsx(Loader2, { className: "h-4 w-4 animate-spin text-[color:var(--mx-chat-accent,hsl(var(--primary)))]" }),
232
232
  /* @__PURE__ */ jsxs("span", { className: "font-medium", children: [
233
233
  "Reading ",
234
234
  headerCount,
@@ -255,16 +255,16 @@ const ScrapeInline = ({
255
255
  },
256
256
  `reading-${url}-${i}`
257
257
  )) : parsed.pages.length === 0 && // No URLs known yet — a single tasteful "working" card.
258
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2.5 rounded-lg border border-border bg-muted/20 px-3 py-3", children: [
259
- /* @__PURE__ */ jsx(ScanText, { className: "h-4 w-4 flex-shrink-0 text-primary" }),
260
- /* @__PURE__ */ jsx("span", { className: "text-xs font-medium text-muted-foreground", children: "Fetching page content\u2026" }),
258
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2.5 rounded-lg border border-[color:var(--mx-chat-border,hsl(var(--border)))] bg-muted/20 px-3 py-3", children: [
259
+ /* @__PURE__ */ jsx(ScanText, { className: "h-4 w-4 flex-shrink-0 text-[color:var(--mx-chat-accent,hsl(var(--primary)))]" }),
260
+ /* @__PURE__ */ jsx("span", { className: "text-xs font-medium text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", children: "Fetching page content\u2026" }),
261
261
  /* @__PURE__ */ jsx("span", { className: "ml-auto", children: /* @__PURE__ */ jsx(PulsingDots, {}) })
262
262
  ] })
263
263
  ] })
264
264
  ] });
265
265
  }
266
266
  if (parsed.pages.length === 0) {
267
- return /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 py-2 text-sm text-muted-foreground", children: [
267
+ return /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 py-2 text-sm text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", children: [
268
268
  /* @__PURE__ */ jsx(FileText, { className: "h-4 w-4 flex-shrink-0" }),
269
269
  /* @__PURE__ */ jsx("span", { children: "No page content captured." })
270
270
  ] });
@@ -21,7 +21,7 @@ const Favicon = ({
21
21
  const [failed, setFailed] = useState(false);
22
22
  const src = url ? getFaviconUrl(url) : "";
23
23
  if (failed || !src)
24
- return /* @__PURE__ */ jsx(Globe, { className: cn("text-muted-foreground", className) });
24
+ return /* @__PURE__ */ jsx(Globe, { className: cn("text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", className) });
25
25
  return (
26
26
  // eslint-disable-next-line @next/next/no-img-element -- favicon service, not owned media
27
27
  /* @__PURE__ */ jsx(
@@ -41,30 +41,30 @@ const ScrapeOverlay = ({ entry }) => {
41
41
  const [active, setActive] = useState(0);
42
42
  const current = pages[active];
43
43
  if (pages.length === 0) {
44
- return /* @__PURE__ */ jsx("div", { className: "flex h-64 items-center justify-center text-muted-foreground", children: /* @__PURE__ */ jsxs("div", { className: "text-center", children: [
44
+ return /* @__PURE__ */ jsx("div", { className: "flex h-64 items-center justify-center text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", children: /* @__PURE__ */ jsxs("div", { className: "text-center", children: [
45
45
  /* @__PURE__ */ jsx(FileText, { className: "mx-auto mb-3 h-12 w-12 opacity-40" }),
46
46
  /* @__PURE__ */ jsx("p", { className: "text-sm", children: "No page content captured" })
47
47
  ] }) });
48
48
  }
49
49
  return /* @__PURE__ */ jsxs("div", { className: "h-full w-full overflow-hidden bg-background", children: [
50
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 border-b border-border bg-muted/40 px-4 py-2.5", children: [
51
- /* @__PURE__ */ jsx(BookOpenText, { className: "h-4 w-4 text-primary" }),
52
- /* @__PURE__ */ jsxs("span", { className: "text-sm font-medium text-foreground", children: [
50
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 border-b border-[color:var(--mx-chat-border,hsl(var(--border)))] bg-muted/40 px-4 py-2.5", children: [
51
+ /* @__PURE__ */ jsx(BookOpenText, { className: "h-4 w-4 text-[color:var(--mx-chat-accent,hsl(var(--primary)))]" }),
52
+ /* @__PURE__ */ jsxs("span", { className: "text-sm font-medium text-[color:var(--mx-chat-text,hsl(var(--foreground)))]", children: [
53
53
  "Pages read",
54
54
  " ",
55
- /* @__PURE__ */ jsxs("span", { className: "text-muted-foreground", children: [
55
+ /* @__PURE__ */ jsxs("span", { className: "text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", children: [
56
56
  "(",
57
57
  pages.length,
58
58
  ")"
59
59
  ] })
60
60
  ] }),
61
- parsed.totalChars > 0 && /* @__PURE__ */ jsxs("span", { className: "ml-auto text-xs tabular-nums text-muted-foreground", children: [
61
+ parsed.totalChars > 0 && /* @__PURE__ */ jsxs("span", { className: "ml-auto text-xs tabular-nums text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", children: [
62
62
  formatCount(parsed.totalChars),
63
63
  " chars total"
64
64
  ] })
65
65
  ] }),
66
66
  /* @__PURE__ */ jsxs("div", { className: "flex h-[calc(100%-3rem)] flex-col md:flex-row", children: [
67
- /* @__PURE__ */ jsx("div", { className: "flex-shrink-0 divide-y divide-border/60 overflow-y-auto border-b border-border md:w-72 md:border-b-0 md:border-r", children: pages.map((p, i) => /* @__PURE__ */ jsxs(
67
+ /* @__PURE__ */ jsx("div", { className: "flex-shrink-0 divide-y divide-border/60 overflow-y-auto border-b border-[color:var(--mx-chat-border,hsl(var(--border)))] md:w-72 md:border-b-0 md:border-r", children: pages.map((p, i) => /* @__PURE__ */ jsxs(
68
68
  "button",
69
69
  {
70
70
  type: "button",
@@ -81,12 +81,12 @@ const ScrapeOverlay = ({ entry }) => {
81
81
  {
82
82
  className: cn(
83
83
  "truncate text-xs font-medium",
84
- i === active ? "text-primary" : "text-foreground"
84
+ i === active ? "text-[color:var(--mx-chat-accent,hsl(var(--primary)))]" : "text-[color:var(--mx-chat-text,hsl(var(--foreground)))]"
85
85
  ),
86
86
  children: p.title || p.domain
87
87
  }
88
88
  ),
89
- /* @__PURE__ */ jsxs("div", { className: "truncate text-xs text-muted-foreground", children: [
89
+ /* @__PURE__ */ jsxs("div", { className: "truncate text-xs text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", children: [
90
90
  p.domain,
91
91
  " \xB7 ",
92
92
  formatCount(p.charCount),
@@ -98,7 +98,7 @@ const ScrapeOverlay = ({ entry }) => {
98
98
  `${p.url}-${i}`
99
99
  )) }),
100
100
  /* @__PURE__ */ jsx("div", { className: "min-w-0 flex-1 overflow-y-auto p-4", children: current ? /* @__PURE__ */ jsxs(Fragment, { children: [
101
- current.image && /* @__PURE__ */ jsx("div", { className: "relative mb-4 h-48 w-full overflow-hidden rounded-md border border-border bg-muted", children: /* @__PURE__ */ jsx(
101
+ current.image && /* @__PURE__ */ jsx("div", { className: "relative mb-4 h-48 w-full overflow-hidden rounded-md border border-[color:var(--mx-chat-border,hsl(var(--border)))] bg-[var(--mx-chat-fill,hsl(var(--muted)))]", children: /* @__PURE__ */ jsx(
102
102
  InlineMediaRef,
103
103
  {
104
104
  ref: { url: current.image },
@@ -111,7 +111,7 @@ const ScrapeOverlay = ({ entry }) => {
111
111
  className: "h-full w-full"
112
112
  }
113
113
  ) }),
114
- /* @__PURE__ */ jsxs("div", { className: "mb-3 flex items-start gap-2 border-b border-border pb-3", children: [
114
+ /* @__PURE__ */ jsxs("div", { className: "mb-3 flex items-start gap-2 border-b border-[color:var(--mx-chat-border,hsl(var(--border)))] pb-3", children: [
115
115
  /* @__PURE__ */ jsx(
116
116
  Favicon,
117
117
  {
@@ -120,14 +120,14 @@ const ScrapeOverlay = ({ entry }) => {
120
120
  }
121
121
  ),
122
122
  /* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
123
- /* @__PURE__ */ jsx("div", { className: "text-sm font-semibold text-foreground", children: current.title || current.domain }),
123
+ /* @__PURE__ */ jsx("div", { className: "text-sm font-semibold text-[color:var(--mx-chat-text,hsl(var(--foreground)))]", children: current.title || current.domain }),
124
124
  /* @__PURE__ */ jsxs(
125
125
  "a",
126
126
  {
127
127
  href: current.url || void 0,
128
128
  target: "_blank",
129
129
  rel: "noopener noreferrer",
130
- className: "inline-flex items-center gap-1 text-xs text-primary hover:underline",
130
+ className: "inline-flex items-center gap-1 text-xs text-[color:var(--mx-chat-accent,hsl(var(--primary)))] hover:underline",
131
131
  children: [
132
132
  /* @__PURE__ */ jsx("span", { className: "truncate", children: current.url }),
133
133
  /* @__PURE__ */ jsx(ExternalLink, { className: "h-3 w-3 flex-shrink-0" })
@@ -137,11 +137,11 @@ const ScrapeOverlay = ({ entry }) => {
137
137
  ] })
138
138
  ] }),
139
139
  current.aiReview && /* @__PURE__ */ jsxs("div", { className: "mb-4 flex items-start gap-2 rounded-md border border-primary/15 bg-primary/5 p-3", children: [
140
- /* @__PURE__ */ jsx(AGENT_ICON, { className: "mt-0.5 h-4 w-4 flex-shrink-0 text-primary" }),
140
+ /* @__PURE__ */ jsx(AGENT_ICON, { className: "mt-0.5 h-4 w-4 flex-shrink-0 text-[color:var(--mx-chat-accent,hsl(var(--primary)))]" }),
141
141
  /* @__PURE__ */ jsx("div", { className: "text-sm leading-relaxed text-foreground/90", children: current.aiReview })
142
142
  ] }),
143
- current.content ? /* @__PURE__ */ jsx("div", { className: "text-sm", children: /* @__PURE__ */ jsx(BasicMarkdownContent, { imagePolicy: "other", content: current.content }) }) : /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: "No page content captured." })
144
- ] }) : /* @__PURE__ */ jsxs("div", { className: "flex h-full items-center justify-center text-sm text-muted-foreground", children: [
143
+ current.content ? /* @__PURE__ */ jsx("div", { className: "text-sm", children: /* @__PURE__ */ jsx(BasicMarkdownContent, { imagePolicy: "other", content: current.content }) }) : /* @__PURE__ */ jsx("p", { className: "text-sm text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", children: "No page content captured." })
144
+ ] }) : /* @__PURE__ */ jsxs("div", { className: "flex h-full items-center justify-center text-sm text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", children: [
145
145
  /* @__PURE__ */ jsx(FileText, { className: "mr-2 h-4 w-4" }),
146
146
  " Select a page"
147
147
  ] }) })