@ai-matrx/chat 0.7.6 → 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 (151) hide show
  1. package/CHANGELOG.md +23 -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/chat/begin-fresh-chat.js +2 -2
  5. package/dist/agents/components/inputs/smart-input/composer/ComposerSplash.js +2 -3
  6. package/dist/agents/components/inputs/smart-input/composer/useComposerMode.js +4 -2
  7. package/dist/agents/components/live-run/LiveRunDisplay.d.ts +7 -1
  8. package/dist/agents/components/live-run/LiveRunDisplay.js +3 -1
  9. package/dist/agents/components/messages-display/AgentConversationDisplay.js +1 -1
  10. package/dist/agents/components/messages-display/assistant/AgentEmptyMessageDisplay.js +4 -4
  11. package/dist/agents/components/messages-display/assistant/AssistantNoAnswer.js +1 -1
  12. package/dist/agents/components/messages-display/assistant/BreathingOrb.js +1 -1
  13. package/dist/agents/components/messages-display/assistant/InPlaceAnswerEditor.js +1 -1
  14. package/dist/agents/components/messages-display/citations/MessageSourcesRow.js +1 -1
  15. package/dist/agents/components/messages-display/conversation-tools/ConversationFindBar.js +4 -4
  16. package/dist/agents/components/messages-display/message-options/EditHistoryDialog.js +7 -7
  17. package/dist/agents/components/messages-display/user/AgentUserMessage.js +4 -4
  18. package/dist/agents/components/messages-display/user/CollabNoteMessage.js +2 -2
  19. package/dist/agents/components/messages-display/user/FirstTurnVariables.js +3 -3
  20. package/dist/agents/components/messages-display/user/PendingSendMessage.js +4 -4
  21. package/dist/agents/components/messages-display/user/RemarksTranscriptView.js +7 -7
  22. package/dist/agents/components/messages-display/user/ResourceAttachmentTile.js +9 -9
  23. package/dist/agents/components/messages-display/user/ResourceEditableToggleSamples.js +4 -4
  24. package/dist/agents/components/messages-display/user/UserActionBar.js +3 -3
  25. package/dist/agents/components/messages-display/user/UserMessageAttachmentStyleComparison.js +12 -12
  26. package/dist/agents/components/messages-display/user/UserMessageChipsDemo.js +19 -19
  27. package/dist/agents/components/messages-display/user/UserMessageHybridTileSamples.js +22 -22
  28. package/dist/agents/components/run/AgentRunnerPage.js +4 -4
  29. package/dist/agents/components/run/AssistantError.js +1 -1
  30. package/dist/agents/components/run/AssistantWarning.js +1 -1
  31. package/dist/agents/components/run/GenerationJobCard.js +5 -5
  32. package/dist/agents/components/run/IncompleteNote.js +1 -1
  33. package/dist/agents/components/run/RunJobWorkingLine.js +1 -1
  34. package/dist/agents/components/shared/AgentConversationColumn.js +1 -1
  35. package/dist/agents/components/shared/AgentHeaderMobile.js +6 -6
  36. package/dist/agents/components/shared/AgentModeController.js +1 -1
  37. package/dist/agents/components/shared/AutoInjectionSwitch.js +6 -6
  38. package/dist/agents/components/shared/DesktopFilterPanel.js +8 -8
  39. package/dist/agents/components/smart/AgentRunner.js +1 -1
  40. package/dist/agents/components/smart/CreateWithAiTabs.js +1 -1
  41. package/dist/agents/redux/agent-definition/agent-cache-bust-request.js +7 -7
  42. package/dist/agents/redux/execution-system/context-rules/receipt-check.js +2 -2
  43. package/dist/agents/redux/execution-system/inbox/inbox.thunks.d.ts +2 -2
  44. package/dist/agents/redux/execution-system/inbox/inbox.thunks.js +7 -15
  45. package/dist/agents/redux/execution-system/observational-memory/fetch-memory-cost.thunk.d.ts +1 -1
  46. package/dist/agents/redux/execution-system/observational-memory/fetch-memory-cost.thunk.js +7 -4
  47. package/dist/agents/redux/execution-system/selectors/aggregate.selectors.d.ts +1 -114
  48. package/dist/agents/redux/execution-system/selectors/aggregate.selectors.js +28 -43
  49. package/dist/agents/redux/execution-system/thunks/call-conversation-api.d.ts +44 -0
  50. package/dist/agents/redux/execution-system/thunks/call-conversation-api.js +78 -0
  51. package/dist/agents/redux/execution-system/thunks/continue-agent-json.d.ts +41 -0
  52. package/dist/agents/redux/execution-system/thunks/continue-agent-json.js +66 -0
  53. package/dist/agents/redux/execution-system/thunks/execute-instance.thunk.d.ts +20 -0
  54. package/dist/agents/redux/execution-system/thunks/execute-instance.thunk.js +9 -2
  55. package/dist/agents/redux/execution-system/thunks/launch-agent-execution.thunk.js +4 -6
  56. package/dist/agents/redux/execution-system/thunks/notify-and-play-dispatcher.d.ts +1 -5
  57. package/dist/agents/redux/execution-system/thunks/notify-and-play-dispatcher.js +2 -1
  58. package/dist/agents/redux/execution-system/thunks/resolve-base-url.js +7 -17
  59. package/dist/agents/redux/execution-system/thunks/settle-after-stop.thunk.js +2 -2
  60. package/dist/agents/redux/execution-system/thunks/smart-execute.thunk.js +3 -3
  61. package/dist/agents/redux/execution-system/utils/continuation-body.d.ts +8 -2
  62. package/dist/agents/redux/execution-system/utils/continuation-body.js +3 -3
  63. package/dist/agents/redux/execution-system/utils/required-organization.d.ts +18 -0
  64. package/dist/agents/redux/execution-system/utils/required-organization.js +14 -10
  65. package/dist/agents/services/mcp-connections.service.js +5 -8
  66. package/dist/agents/ui-first-tools/dispatcher/dispatch-ui-first-tool.thunk.js +2 -1
  67. package/dist/host/defaults/files-host.js +11 -1
  68. package/dist/host/defaults/server-api.d.ts +1 -15
  69. package/dist/host/defaults/server-api.js +0 -21
  70. package/dist/host/defaults/server.d.ts +2 -1
  71. package/dist/host/defaults/server.js +8 -6
  72. package/dist/host/request-headers.d.ts +26 -0
  73. package/dist/host/request-headers.js +15 -0
  74. package/dist/host/server/call-api.d.ts +0 -13
  75. package/dist/host/server/call-api.js +0 -2
  76. package/dist/host/server/matrx-transport.d.ts +0 -1
  77. package/dist/host/server/matrx-transport.js +0 -2
  78. package/dist/store/root-state.d.ts +4 -21
  79. package/dist/surfaces/hooks/useSurfaceConfig.js +2 -1
  80. package/dist/surfaces/runtime/surface-feedback.js +2 -2
  81. package/dist/tool-call-visualization/components/ArtifactResultBar.js +4 -4
  82. package/dist/tool-call-visualization/components/ChatResultColumn.d.ts +1 -1
  83. package/dist/tool-call-visualization/components/ToolCallBatch.js +2 -2
  84. package/dist/tool-call-visualization/components/ToolCallVisualization.js +5 -5
  85. package/dist/tool-call-visualization/components/ToolTabBodies.js +12 -12
  86. package/dist/tool-call-visualization/components/ToolUpdatesOverlay.js +4 -4
  87. package/dist/tool-call-visualization/configured-rows/ConfiguredToolRow.js +8 -8
  88. package/dist/tool-call-visualization/configured-rows/CopyToolButton.js +1 -1
  89. package/dist/tool-call-visualization/configured-rows/ToolProgressView.js +7 -7
  90. package/dist/tool-call-visualization/configured-rows/field-components.js +6 -6
  91. package/dist/tool-call-visualization/registry/GenericRenderer.js +4 -4
  92. package/dist/tool-call-visualization/renderers/_shared-entity/EmptyResultCard.js +1 -1
  93. package/dist/tool-call-visualization/renderers/_shared-entity/EntityCard.js +5 -5
  94. package/dist/tool-call-visualization/renderers/_shared-entity/PartPeekPopover.js +2 -2
  95. package/dist/tool-call-visualization/renderers/_shared-entity/ToolGlyph.js +1 -1
  96. package/dist/tool-call-visualization/renderers/_shared-entity/ToolResultCard.js +6 -6
  97. package/dist/tool-call-visualization/renderers/agent-call/AgentCallInline.js +5 -5
  98. package/dist/tool-call-visualization/renderers/agent-call/CollabCallCard.js +4 -4
  99. package/dist/tool-call-visualization/renderers/agent-call/ImageGenerationResult.js +1 -1
  100. package/dist/tool-call-visualization/renderers/ask/AskInline.js +3 -3
  101. package/dist/tool-call-visualization/renderers/ask-person/AskPersonInline.js +2 -2
  102. package/dist/tool-call-visualization/renderers/cloud-browser/CloudBrowserRunCard.js +5 -5
  103. package/dist/tool-call-visualization/renderers/ctx/CtxBatchInline.js +3 -3
  104. package/dist/tool-call-visualization/renderers/ctx/CtxGetInline.js +2 -2
  105. package/dist/tool-call-visualization/renderers/ctx/CtxItemCard.js +3 -3
  106. package/dist/tool-call-visualization/renderers/ctx/CtxPatchInline.js +6 -6
  107. package/dist/tool-call-visualization/renderers/dictionary/DictEntryList.js +12 -12
  108. package/dist/tool-call-visualization/renderers/dictionary/DictionaryOverlay.js +5 -5
  109. package/dist/tool-call-visualization/renderers/fs/FsInline.js +7 -7
  110. package/dist/tool-call-visualization/renderers/news-api/NewsInline.js +17 -17
  111. package/dist/tool-call-visualization/renderers/news-api/NewsOverlay.js +12 -12
  112. package/dist/tool-call-visualization/renderers/random-wheel/RandomWheelInline.js +34 -34
  113. package/dist/tool-call-visualization/renderers/records/RecordsInline.js +1 -1
  114. package/dist/tool-call-visualization/renderers/research/ResearchInline.js +10 -10
  115. package/dist/tool-call-visualization/renderers/research/ResearchOverlay.js +19 -19
  116. package/dist/tool-call-visualization/renderers/research/SubagentReportBlock.js +11 -11
  117. package/dist/tool-call-visualization/renderers/scrape/ScrapeInline.js +18 -18
  118. package/dist/tool-call-visualization/renderers/scrape/ScrapeOverlay.js +17 -17
  119. package/dist/tool-call-visualization/renderers/search/SearchInline.js +30 -30
  120. package/dist/tool-call-visualization/renderers/search/SearchOverlay.js +40 -40
  121. package/dist/tool-call-visualization/renderers/shell/ShellInline.js +3 -3
  122. package/dist/tool-call-visualization/renderers/skill/SkillInline.js +5 -5
  123. package/dist/tool-call-visualization/renderers/sql/DbSchemaInline.js +7 -7
  124. package/dist/tool-call-visualization/renderers/sql/SqlInline.js +4 -4
  125. package/dist/tool-call-visualization/renderers/workbook/WorkbookGrid.js +4 -4
  126. package/dist/tool-call-visualization/renderers/workbook/WorkbookInline.js +2 -2
  127. package/dist/tool-call-visualization/renderers/workbook/WorkbookOverlay.js +7 -7
  128. package/dist/tool-call-visualization/renderers/working-document/PatchDiffInline.js +3 -3
  129. package/dist/tool-call-visualization/result-fields/EmptyResult.js +1 -1
  130. package/dist/tool-call-visualization/result-fields/KeyValueGrid.js +9 -9
  131. package/dist/tool-call-visualization/result-fields/ResultFile.js +4 -4
  132. package/dist/tool-call-visualization/result-fields/ResultJson.js +1 -1
  133. package/dist/tool-call-visualization/result-fields/ResultMedia.js +2 -2
  134. package/dist/tool-call-visualization/result-fields/ResultScalar.js +2 -2
  135. package/dist/tool-call-visualization/result-fields/ResultTable.js +10 -10
  136. package/dist/tool-call-visualization/result-fields/ResultValue.js +7 -7
  137. package/dist/tool-call-visualization/result-fields/ShortId.js +3 -3
  138. package/dist/tool-call-visualization/result-fields/ToolErrorCard.js +4 -4
  139. package/dist/tool-call-visualization/result-fields/UrlChips.js +3 -3
  140. package/dist/tool-call-visualization/surface-write/SurfaceWriteDiff.js +2 -2
  141. package/dist/tool-call-visualization/surface-write/SurfaceWriteStress.js +1 -1
  142. package/dist/tool-call-visualization/window-panel/ToolCallWindowPanel.js +9 -9
  143. package/dist/ui/mandates-storage/mandateStorage.d.ts +36 -0
  144. package/dist/ui/mandates-storage/shortcutStorage.d.ts +9 -0
  145. package/dist/ui/markdown-stream/EnhancedChatMarkdown.js +22 -0
  146. package/dist/ui/markdown-stream/MarkdownStreamImpl.js +3 -3
  147. package/dist/ui/markdown-stream/StreamTextFallback.d.ts +6 -0
  148. package/dist/ui/markdown-stream/StreamTextFallback.js +23 -0
  149. package/dist/ui/markdown-stream/merge-thinking-across-hidden.d.ts +19 -0
  150. package/dist/ui/markdown-stream/merge-thinking-across-hidden.js +21 -0
  151. package/package.json +12 -7
@@ -46,16 +46,16 @@ function SentMessageChip({ spec }) {
46
46
  function ThumbnailTile({ spec }) {
47
47
  const Icon = COMPARISON_ICONS[spec.id] ?? FileText;
48
48
  const isImage = spec.id === "image-legacy";
49
- return /* @__PURE__ */ jsx("div", { className: "relative rounded-lg overflow-hidden border border-border shrink-0", children: isImage ? /* @__PURE__ */ jsx(
49
+ return /* @__PURE__ */ jsx("div", { className: "relative rounded-lg overflow-hidden border border-[color:var(--mx-chat-border,hsl(var(--border)))] shrink-0", children: isImage ? /* @__PURE__ */ jsx(
50
50
  "div",
51
51
  {
52
52
  className: "h-10 w-10 bg-gradient-to-br from-blue-100 to-indigo-200 dark:from-blue-950/60 dark:to-indigo-900/40 flex items-center justify-center",
53
53
  title: spec.title,
54
54
  children: /* @__PURE__ */ jsx(ImageIcon, { className: "h-4 w-4 text-blue-600 dark:text-blue-400" })
55
55
  }
56
- ) : /* @__PURE__ */ jsxs("div", { className: "h-10 w-12 flex flex-col items-center justify-center bg-muted py-1", children: [
57
- /* @__PURE__ */ jsx(Icon, { className: "h-6 w-6 text-muted-foreground mb-1" }),
58
- /* @__PURE__ */ jsx("span", { className: "text-[8px] text-muted-foreground text-center truncate w-full px-1", children: spec.title })
56
+ ) : /* @__PURE__ */ jsxs("div", { className: "h-10 w-12 flex flex-col items-center justify-center bg-[var(--mx-chat-fill,hsl(var(--muted)))] py-1", children: [
57
+ /* @__PURE__ */ jsx(Icon, { className: "h-6 w-6 text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))] mb-1" }),
58
+ /* @__PURE__ */ jsx("span", { className: "text-[8px] text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))] text-center truncate w-full px-1", children: spec.title })
59
59
  ] }) });
60
60
  }
61
61
  function ComparisonColumn({
@@ -67,14 +67,14 @@ function ComparisonColumn({
67
67
  return /* @__PURE__ */ jsxs("div", { className: "flex flex-col min-w-0", children: [
68
68
  /* @__PURE__ */ jsxs("div", { className: "mb-2 space-y-0.5", children: [
69
69
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 flex-wrap", children: [
70
- /* @__PURE__ */ jsx("h3", { className: "text-sm font-semibold text-foreground", children: title }),
71
- badge ? /* @__PURE__ */ jsx("span", { className: "text-[10px] font-medium uppercase tracking-wide text-muted-foreground bg-muted px-1.5 py-0.5 rounded border border-border", children: badge }) : null
70
+ /* @__PURE__ */ jsx("h3", { className: "text-sm font-semibold text-[color:var(--mx-chat-text,hsl(var(--foreground)))]", children: title }),
71
+ badge ? /* @__PURE__ */ jsx("span", { className: "text-[10px] font-medium uppercase tracking-wide text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))] bg-[var(--mx-chat-fill,hsl(var(--muted)))] px-1.5 py-0.5 rounded border border-[color:var(--mx-chat-border,hsl(var(--border)))]", children: badge }) : null
72
72
  ] }),
73
- /* @__PURE__ */ jsx("p", { className: "text-[11px] text-muted-foreground font-mono", children: source })
73
+ /* @__PURE__ */ jsx("p", { className: "text-[11px] text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))] font-mono", children: source })
74
74
  ] }),
75
- /* @__PURE__ */ jsx("div", { className: "bg-muted border border-border rounded-lg px-2 py-2 flex-1", children: /* @__PURE__ */ jsxs("div", { className: "space-y-1.5", children: [
75
+ /* @__PURE__ */ jsx("div", { className: "bg-[var(--mx-chat-fill,hsl(var(--muted)))] border border-[color:var(--mx-chat-border,hsl(var(--border)))] rounded-lg px-2 py-2 flex-1", children: /* @__PURE__ */ jsxs("div", { className: "space-y-1.5", children: [
76
76
  children,
77
- /* @__PURE__ */ jsx("p", { className: "text-xs text-foreground whitespace-pre-wrap pt-1", children: "Can you review these attachments and summarize next steps?" })
77
+ /* @__PURE__ */ jsx("p", { className: "text-xs text-[color:var(--mx-chat-text,hsl(var(--foreground)))] whitespace-pre-wrap pt-1", children: "Can you review these attachments and summarize next steps?" })
78
78
  ] }) })
79
79
  ] });
80
80
  }
@@ -84,8 +84,8 @@ function UserMessageAttachmentStyleComparison({
84
84
  }) {
85
85
  return /* @__PURE__ */ jsxs("section", { className: "space-y-4", children: [
86
86
  /* @__PURE__ */ jsxs("div", { children: [
87
- /* @__PURE__ */ jsx("h2", { className: "text-base font-semibold text-foreground border-b border-border pb-2", children: "Side-by-side: attachment styles" }),
88
- /* @__PURE__ */ jsxs("p", { className: "text-xs text-muted-foreground mt-2 max-w-3xl", children: [
87
+ /* @__PURE__ */ jsx("h2", { className: "text-base font-semibold text-[color:var(--mx-chat-text,hsl(var(--foreground)))] border-b border-[color:var(--mx-chat-border,hsl(var(--border)))] pb-2", children: "Side-by-side: attachment styles" }),
88
+ /* @__PURE__ */ jsxs("p", { className: "text-xs text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))] mt-2 max-w-3xl", children: [
89
89
  "Same six fake resources in each column. Input bar and sent messages both use ",
90
90
  /* @__PURE__ */ jsx("code", { className: "text-[10px]", children: "ResourceAttachmentTile" }),
91
91
  " ",
@@ -120,7 +120,7 @@ function UserMessageAttachmentStyleComparison({
120
120
  conversationId: inputChipsConversationId
121
121
  }
122
122
  ) }),
123
- /* @__PURE__ */ jsxs("p", { className: "text-[10px] text-muted-foreground", children: [
123
+ /* @__PURE__ */ jsxs("p", { className: "text-[10px] text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", children: [
124
124
  "Hover for previews. Use the corner Remove control. Image/audio with",
125
125
  " ",
126
126
  /* @__PURE__ */ jsx("code", { className: "text-[10px]", children: "file_id" }),
@@ -119,17 +119,17 @@ function DemoBubble({
119
119
  }) {
120
120
  return /* @__PURE__ */ jsxs("section", { className: cn("space-y-2", className), children: [
121
121
  /* @__PURE__ */ jsxs("div", { children: [
122
- /* @__PURE__ */ jsx("h3", { className: "text-sm font-semibold text-foreground", children: title }),
123
- description ? /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground mt-0.5", children: description }) : null
122
+ /* @__PURE__ */ jsx("h3", { className: "text-sm font-semibold text-[color:var(--mx-chat-text,hsl(var(--foreground)))]", children: title }),
123
+ description ? /* @__PURE__ */ jsx("p", { className: "text-xs text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))] mt-0.5", children: description }) : null
124
124
  ] }),
125
- /* @__PURE__ */ jsx("div", { className: "bg-muted border border-border rounded-lg px-2 py-2 max-w-md", children: /* @__PURE__ */ jsx("div", { className: "space-y-1.5", children }) })
125
+ /* @__PURE__ */ jsx("div", { className: "bg-[var(--mx-chat-fill,hsl(var(--muted)))] border border-[color:var(--mx-chat-border,hsl(var(--border)))] rounded-lg px-2 py-2 max-w-md", children: /* @__PURE__ */ jsx("div", { className: "space-y-1.5", children }) })
126
126
  ] });
127
127
  }
128
128
  function DemoAttachmentChip({ spec }) {
129
129
  const Icon = ATTACHMENT_ICONS[spec.id] ?? FileText;
130
130
  return /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
131
131
  /* @__PURE__ */ jsx(Button, { variant: "outline", icon: /* @__PURE__ */ jsx(Icon, {}), title: spec.title, children: spec.title }),
132
- spec.note ? /* @__PURE__ */ jsx("p", { className: "text-[10px] text-muted-foreground", children: spec.note }) : null
132
+ spec.note ? /* @__PURE__ */ jsx("p", { className: "text-[10px] text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", children: spec.note }) : null
133
133
  ] });
134
134
  }
135
135
  function UserMessageChipsDemo() {
@@ -146,8 +146,8 @@ function UserMessageChipsDemo() {
146
146
  }, [dispatch]);
147
147
  return /* @__PURE__ */ jsx("div", { className: "min-h-dvh bg-textured", children: /* @__PURE__ */ jsxs("div", { className: "max-w-6xl mx-auto px-4 py-8 space-y-10", children: [
148
148
  /* @__PURE__ */ jsxs("header", { className: "space-y-1", children: [
149
- /* @__PURE__ */ jsx("h1", { className: "text-2xl font-bold text-foreground", children: "User Message Chips" }),
150
- /* @__PURE__ */ jsxs("p", { className: "text-sm text-muted-foreground", children: [
149
+ /* @__PURE__ */ jsx("h1", { className: "text-2xl font-bold text-[color:var(--mx-chat-text,hsl(var(--foreground)))]", children: "User Message Chips" }),
150
+ /* @__PURE__ */ jsxs("p", { className: "text-sm text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", children: [
151
151
  "Production tiles in",
152
152
  " ",
153
153
  /* @__PURE__ */ jsx("code", { className: "text-xs", children: "AgentUserMessage" }),
@@ -175,7 +175,7 @@ function UserMessageChipsDemo() {
175
175
  parts: SUBMITTED_ATTACHMENT_PARTS
176
176
  }
177
177
  ),
178
- /* @__PURE__ */ jsx("p", { className: "text-xs text-foreground whitespace-pre-wrap", children: "Please turn the attached research into an infographic prompt." })
178
+ /* @__PURE__ */ jsx("p", { className: "text-xs text-[color:var(--mx-chat-text,hsl(var(--foreground)))] whitespace-pre-wrap", children: "Please turn the attached research into an infographic prompt." })
179
179
  ]
180
180
  }
181
181
  ),
@@ -188,7 +188,7 @@ function UserMessageChipsDemo() {
188
188
  ),
189
189
  /* @__PURE__ */ jsx(UserMessageHybridTileSamples, { specs: DEMO_COMPARISON_ATTACHMENTS }),
190
190
  /* @__PURE__ */ jsxs("div", { className: "space-y-6", children: [
191
- /* @__PURE__ */ jsx("h2", { className: "text-base font-semibold text-foreground border-b border-border pb-2", children: "Context policies" }),
191
+ /* @__PURE__ */ jsx("h2", { className: "text-base font-semibold text-[color:var(--mx-chat-text,hsl(var(--foreground)))] border-b border-[color:var(--mx-chat-border,hsl(var(--border)))] pb-2", children: "Context policies" }),
192
192
  /* @__PURE__ */ jsxs(
193
193
  DemoBubble,
194
194
  {
@@ -203,7 +203,7 @@ function UserMessageChipsDemo() {
203
203
  entries: [DEMO_SINGLE_ENTRY]
204
204
  }
205
205
  ),
206
- /* @__PURE__ */ jsx("p", { className: "text-xs text-foreground whitespace-pre-wrap", children: "Can you go ahead and get this working document ready?" })
206
+ /* @__PURE__ */ jsx("p", { className: "text-xs text-[color:var(--mx-chat-text,hsl(var(--foreground)))] whitespace-pre-wrap", children: "Can you go ahead and get this working document ready?" })
207
207
  ]
208
208
  }
209
209
  ),
@@ -221,14 +221,14 @@ function UserMessageChipsDemo() {
221
221
  entries: DEMO_MULTI_ENTRIES
222
222
  }
223
223
  ),
224
- /* @__PURE__ */ jsx("p", { className: "text-xs text-foreground whitespace-pre-wrap", children: "Here is everything attached \u2014 open the popover to browse each slot." })
224
+ /* @__PURE__ */ jsx("p", { className: "text-xs text-[color:var(--mx-chat-text,hsl(var(--foreground)))] whitespace-pre-wrap", children: "Here is everything attached \u2014 open the popover to browse each slot." })
225
225
  ]
226
226
  }
227
227
  ),
228
228
  /* @__PURE__ */ jsxs("section", { className: "space-y-3", children: [
229
229
  /* @__PURE__ */ jsxs("div", { children: [
230
- /* @__PURE__ */ jsx("h3", { className: "text-sm font-semibold text-foreground", children: "All context types" }),
231
- /* @__PURE__ */ jsxs("p", { className: "text-xs text-muted-foreground mt-0.5", children: [
230
+ /* @__PURE__ */ jsx("h3", { className: "text-sm font-semibold text-[color:var(--mx-chat-text,hsl(var(--foreground)))]", children: "All context types" }),
231
+ /* @__PURE__ */ jsxs("p", { className: "text-xs text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))] mt-0.5", children: [
232
232
  "One bubble per",
233
233
  " ",
234
234
  /* @__PURE__ */ jsx("code", { className: "text-[10px]", children: "ContextObjectType" }),
@@ -247,7 +247,7 @@ function UserMessageChipsDemo() {
247
247
  ] })
248
248
  ] }),
249
249
  /* @__PURE__ */ jsxs("div", { className: "space-y-6", children: [
250
- /* @__PURE__ */ jsx("h2", { className: "text-base font-semibold text-foreground border-b border-border pb-2", children: "Resource attachments" }),
250
+ /* @__PURE__ */ jsx("h2", { className: "text-base font-semibold text-[color:var(--mx-chat-text,hsl(var(--foreground)))] border-b border-[color:var(--mx-chat-border,hsl(var(--border)))] pb-2", children: "Resource attachments" }),
251
251
  /* @__PURE__ */ jsxs(
252
252
  DemoBubble,
253
253
  {
@@ -261,7 +261,7 @@ function UserMessageChipsDemo() {
261
261
  size: "xs"
262
262
  }
263
263
  ) }),
264
- /* @__PURE__ */ jsxs("p", { className: "text-[10px] text-muted-foreground", children: [
264
+ /* @__PURE__ */ jsxs("p", { className: "text-[10px] text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", children: [
265
265
  "Fake UUID above \u2014 shows \u201CUnknown file\u201D fallback until a real file is in Redux. Swap in a real",
266
266
  " ",
267
267
  /* @__PURE__ */ jsx("code", { className: "text-[10px]", children: "file_id" }),
@@ -272,8 +272,8 @@ function UserMessageChipsDemo() {
272
272
  ),
273
273
  /* @__PURE__ */ jsxs("section", { className: "space-y-3", children: [
274
274
  /* @__PURE__ */ jsxs("div", { children: [
275
- /* @__PURE__ */ jsx("h3", { className: "text-sm font-semibold text-foreground", children: "Legacy block chips" }),
276
- /* @__PURE__ */ jsxs("p", { className: "text-xs text-muted-foreground mt-0.5", children: [
275
+ /* @__PURE__ */ jsx("h3", { className: "text-sm font-semibold text-[color:var(--mx-chat-text,hsl(var(--foreground)))]", children: "Legacy block chips" }),
276
+ /* @__PURE__ */ jsxs("p", { className: "text-xs text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))] mt-0.5", children: [
277
277
  "Notes, tasks, webpages, tables, etc. \u2014 per-type pill + modal on click. Styled to match",
278
278
  " ",
279
279
  /* @__PURE__ */ jsx("code", { className: "text-[10px]", children: "AttachmentChip" }),
@@ -287,14 +287,14 @@ function UserMessageChipsDemo() {
287
287
  className: "max-w-lg",
288
288
  children: [
289
289
  /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-1", children: DEMO_LEGACY_ATTACHMENTS.map((spec) => /* @__PURE__ */ jsx(DemoAttachmentChip, { spec }, spec.id)) }),
290
- /* @__PURE__ */ jsx("p", { className: "text-xs text-foreground whitespace-pre-wrap", children: "Mixed attachments above a text line \u2014 same layout as production." })
290
+ /* @__PURE__ */ jsx("p", { className: "text-xs text-[color:var(--mx-chat-text,hsl(var(--foreground)))] whitespace-pre-wrap", children: "Mixed attachments above a text line \u2014 same layout as production." })
291
291
  ]
292
292
  }
293
293
  )
294
294
  ] })
295
295
  ] }),
296
296
  /* @__PURE__ */ jsxs("div", { className: "space-y-6", children: [
297
- /* @__PURE__ */ jsx("h2", { className: "text-base font-semibold text-foreground border-b border-border pb-2", children: "Combined (production layout)" }),
297
+ /* @__PURE__ */ jsx("h2", { className: "text-base font-semibold text-[color:var(--mx-chat-text,hsl(var(--foreground)))] border-b border-[color:var(--mx-chat-border,hsl(var(--border)))] pb-2", children: "Combined (production layout)" }),
298
298
  /* @__PURE__ */ jsxs(
299
299
  DemoBubble,
300
300
  {
@@ -323,7 +323,7 @@ function UserMessageChipsDemo() {
323
323
  spec.id
324
324
  );
325
325
  }) }),
326
- /* @__PURE__ */ jsx("p", { className: "text-xs text-foreground whitespace-pre-wrap", children: "Can you go ahead and get this working document ready with the content and then let's talk about it?" })
326
+ /* @__PURE__ */ jsx("p", { className: "text-xs text-[color:var(--mx-chat-text,hsl(var(--foreground)))] whitespace-pre-wrap", children: "Can you go ahead and get this working document ready with the content and then let's talk about it?" })
327
327
  ]
328
328
  }
329
329
  )
@@ -107,7 +107,7 @@ function HybridTileStacked({ spec }) {
107
107
  ),
108
108
  children: [
109
109
  /* @__PURE__ */ jsx("div", { className: "flex-1 flex items-center justify-center min-h-0 p-1.5", children: isImage ? /* @__PURE__ */ jsx("div", { className: "h-full w-full rounded-md bg-gradient-to-br from-blue-200/80 to-indigo-300/60 dark:from-blue-800/50 dark:to-indigo-900/40 flex items-center justify-center", children: /* @__PURE__ */ jsx(ImageIcon, { className: cn("h-5 w-5", theme.icon) }) }) : /* @__PURE__ */ jsx(TileIcon, { spec, className: "h-5 w-5" }) }),
110
- /* @__PURE__ */ jsx("div", { className: "px-1.5 py-1 border-t border-border/40 bg-background/30 dark:bg-black/10", children: /* @__PURE__ */ jsx("span", { className: "block text-[10px] leading-tight font-medium text-foreground text-center truncate", children: truncateLabel(spec.title, 12) }) })
110
+ /* @__PURE__ */ jsx("div", { className: "px-1.5 py-1 border-t border-border/40 bg-background/30 dark:bg-black/10", children: /* @__PURE__ */ jsx("span", { className: "block text-[10px] leading-tight font-medium text-[color:var(--mx-chat-text,hsl(var(--foreground)))] text-center truncate", children: truncateLabel(spec.title, 12) }) })
111
111
  ]
112
112
  }
113
113
  );
@@ -127,8 +127,8 @@ function HybridTileHorizontal({ spec }) {
127
127
  children: [
128
128
  /* @__PURE__ */ jsx("span", { className: "flex h-7 w-7 shrink-0 items-center justify-center rounded-md bg-background/40 dark:bg-black/15", children: /* @__PURE__ */ jsx(TileIcon, { spec, className: "h-3.5 w-3.5" }) }),
129
129
  /* @__PURE__ */ jsxs("span", { className: "min-w-0 flex-1 text-left", children: [
130
- /* @__PURE__ */ jsx("span", { className: "block text-[9px] uppercase tracking-wide text-muted-foreground leading-none mb-0.5", children: spec.label }),
131
- /* @__PURE__ */ jsx("span", { className: "block text-[10px] font-medium text-foreground leading-tight truncate", children: truncateLabel(spec.title, 16) })
130
+ /* @__PURE__ */ jsx("span", { className: "block text-[9px] uppercase tracking-wide text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))] leading-none mb-0.5", children: spec.label }),
131
+ /* @__PURE__ */ jsx("span", { className: "block text-[10px] font-medium text-[color:var(--mx-chat-text,hsl(var(--foreground)))] leading-tight truncate", children: truncateLabel(spec.title, 16) })
132
132
  ] })
133
133
  ]
134
134
  }
@@ -177,7 +177,7 @@ function HybridTileStackedRowsBase({
177
177
  {
178
178
  className: cn(
179
179
  config.typeClass,
180
- "min-w-0 flex-1 truncate whitespace-nowrap text-muted-foreground uppercase tracking-wide"
180
+ "min-w-0 flex-1 truncate whitespace-nowrap text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))] uppercase tracking-wide"
181
181
  ),
182
182
  children: spec.label
183
183
  }
@@ -188,7 +188,7 @@ function HybridTileStackedRowsBase({
188
188
  {
189
189
  className: cn(
190
190
  config.titleClass,
191
- "block w-full min-w-0 truncate whitespace-nowrap text-foreground font-medium"
191
+ "block w-full min-w-0 truncate whitespace-nowrap text-[color:var(--mx-chat-text,hsl(var(--foreground)))] font-medium"
192
192
  ),
193
193
  children: spec.title
194
194
  }
@@ -367,8 +367,8 @@ function HybridTileWide({ spec }) {
367
367
  children: [
368
368
  /* @__PURE__ */ jsx(TileIcon, { spec, className: "h-4 w-4 mt-0.5" }),
369
369
  /* @__PURE__ */ jsxs("span", { className: "min-w-0 flex-1", children: [
370
- /* @__PURE__ */ jsx("span", { className: "block text-[9px] font-medium text-muted-foreground leading-none", children: spec.label }),
371
- /* @__PURE__ */ jsx("span", { className: "block text-[11px] font-medium text-foreground leading-snug line-clamp-2 mt-1", children: truncateLabel(spec.title, 22) })
370
+ /* @__PURE__ */ jsx("span", { className: "block text-[9px] font-medium text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))] leading-none", children: spec.label }),
371
+ /* @__PURE__ */ jsx("span", { className: "block text-[11px] font-medium text-[color:var(--mx-chat-text,hsl(var(--foreground)))] leading-snug line-clamp-2 mt-1", children: truncateLabel(spec.title, 22) })
372
372
  ] })
373
373
  ]
374
374
  }
@@ -391,7 +391,7 @@ function HybridTileCaption({ spec }) {
391
391
  children: isImage ? /* @__PURE__ */ jsx("div", { className: "h-full w-full rounded-md bg-gradient-to-br from-blue-200/80 to-indigo-300/60 dark:from-blue-800/50 dark:to-indigo-900/40 flex items-center justify-center", children: /* @__PURE__ */ jsx(ImageIcon, { className: cn("h-6 w-6", theme.icon) }) }) : /* @__PURE__ */ jsx(TileIcon, { spec, className: "h-6 w-6" })
392
392
  }
393
393
  ),
394
- /* @__PURE__ */ jsx("span", { className: "w-full text-[10px] text-foreground font-medium text-center leading-tight line-clamp-2 px-0.5", children: truncateLabel(spec.title, 18) })
394
+ /* @__PURE__ */ jsx("span", { className: "w-full text-[10px] text-[color:var(--mx-chat-text,hsl(var(--foreground)))] font-medium text-center leading-tight line-clamp-2 px-0.5", children: truncateLabel(spec.title, 18) })
395
395
  ] });
396
396
  }
397
397
  const HYBRID_VARIANTS = [
@@ -438,12 +438,12 @@ function SampleBubble({
438
438
  }) {
439
439
  return /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
440
440
  /* @__PURE__ */ jsxs("div", { children: [
441
- /* @__PURE__ */ jsx("h3", { className: "text-sm font-semibold text-foreground", children: title }),
442
- /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground mt-0.5", children: description })
441
+ /* @__PURE__ */ jsx("h3", { className: "text-sm font-semibold text-[color:var(--mx-chat-text,hsl(var(--foreground)))]", children: title }),
442
+ /* @__PURE__ */ jsx("p", { className: "text-xs text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))] mt-0.5", children: description })
443
443
  ] }),
444
- /* @__PURE__ */ jsx("div", { className: "bg-muted border border-border rounded-lg px-2 py-2", children: /* @__PURE__ */ jsxs("div", { className: "space-y-1.5", children: [
444
+ /* @__PURE__ */ jsx("div", { className: "bg-[var(--mx-chat-fill,hsl(var(--muted)))] border border-[color:var(--mx-chat-border,hsl(var(--border)))] rounded-lg px-2 py-2", children: /* @__PURE__ */ jsxs("div", { className: "space-y-1.5", children: [
445
445
  children,
446
- /* @__PURE__ */ jsx("p", { className: "text-xs text-foreground whitespace-pre-wrap pt-1", children: "Can you review these attachments and summarize next steps?" })
446
+ /* @__PURE__ */ jsx("p", { className: "text-xs text-[color:var(--mx-chat-text,hsl(var(--foreground)))] whitespace-pre-wrap pt-1", children: "Can you review these attachments and summarize next steps?" })
447
447
  ] }) })
448
448
  ] });
449
449
  }
@@ -452,8 +452,8 @@ function UserMessageHybridTileSamples({
452
452
  }) {
453
453
  return /* @__PURE__ */ jsxs("section", { className: "space-y-4", children: [
454
454
  /* @__PURE__ */ jsxs("div", { children: [
455
- /* @__PURE__ */ jsx("h2", { className: "text-base font-semibold text-foreground border-b border-border pb-2", children: "Hybrid tile samples" }),
456
- /* @__PURE__ */ jsxs("p", { className: "text-xs text-muted-foreground mt-2 max-w-3xl", children: [
455
+ /* @__PURE__ */ jsx("h2", { className: "text-base font-semibold text-[color:var(--mx-chat-text,hsl(var(--foreground)))] border-b border-[color:var(--mx-chat-border,hsl(var(--border)))] pb-2", children: "Hybrid tile samples" }),
456
+ /* @__PURE__ */ jsxs("p", { className: "text-xs text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))] mt-2 max-w-3xl", children: [
457
457
  "Input-bar tints + old-chat",
458
458
  " ",
459
459
  /* @__PURE__ */ jsx("code", { className: "text-[10px]", children: "rounded-lg" }),
@@ -462,10 +462,10 @@ function UserMessageHybridTileSamples({
462
462
  ] }),
463
463
  /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
464
464
  /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [
465
- /* @__PURE__ */ jsx("h3", { className: "text-sm font-semibold text-foreground", children: "S8 \xB7 Adaptive \u2014 ship candidate" }),
465
+ /* @__PURE__ */ jsx("h3", { className: "text-sm font-semibold text-[color:var(--mx-chat-text,hsl(var(--foreground)))]", children: "S8 \xB7 Adaptive \u2014 ship candidate" }),
466
466
  /* @__PURE__ */ jsx(Badge, { tone: "primary", children: "Light 3D + dark glass" })
467
467
  ] }),
468
- /* @__PURE__ */ jsxs("p", { className: "text-xs text-muted-foreground max-w-3xl", children: [
468
+ /* @__PURE__ */ jsxs("p", { className: "text-xs text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))] max-w-3xl", children: [
469
469
  "Combines S5 (3D raised) in light mode and S7 (glass ring + gradient) in dark mode. Icons sit directly on the tile \u2014 no inset plate. Wired into ",
470
470
  /* @__PURE__ */ jsx("code", { className: "text-[10px]", children: "AgentUserMessage" }),
471
471
  " via",
@@ -483,8 +483,8 @@ function UserMessageHybridTileSamples({
483
483
  )
484
484
  ] }),
485
485
  /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
486
- /* @__PURE__ */ jsx("div", { className: "flex flex-wrap items-center gap-2", children: /* @__PURE__ */ jsx("h3", { className: "text-sm font-semibold text-foreground", children: "E3 \xB7 Style polish (exploration)" }) }),
487
- /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground max-w-3xl", children: "Historical S0\u2013S7 chrome on the E3 layout. Ship candidate is S8 above (adaptive shell + transparent icons)." }),
486
+ /* @__PURE__ */ jsx("div", { className: "flex flex-wrap items-center gap-2", children: /* @__PURE__ */ jsx("h3", { className: "text-sm font-semibold text-[color:var(--mx-chat-text,hsl(var(--foreground)))]", children: "E3 \xB7 Style polish (exploration)" }) }),
487
+ /* @__PURE__ */ jsx("p", { className: "text-xs text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))] max-w-3xl", children: "Historical S0\u2013S7 chrome on the E3 layout. Ship candidate is S8 above (adaptive shell + transparent icons)." }),
488
488
  /* @__PURE__ */ jsx("div", { className: "grid gap-4 md:grid-cols-2 xl:grid-cols-2", children: E3_STYLE_VARIANTS.map((variant) => /* @__PURE__ */ jsx(
489
489
  SampleBubble,
490
490
  {
@@ -508,8 +508,8 @@ function UserMessageHybridTileSamples({
508
508
  )) })
509
509
  ] }),
510
510
  /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
511
- /* @__PURE__ */ jsx("h3", { className: "text-sm font-semibold text-foreground", children: "E refinements \u2014 layout pick (done)" }),
512
- /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground max-w-3xl", children: "Same layout: icon + type, then title. No wrap \u2014 truncate only. Title left edge aligns with icon left edge." }),
511
+ /* @__PURE__ */ jsx("h3", { className: "text-sm font-semibold text-[color:var(--mx-chat-text,hsl(var(--foreground)))]", children: "E refinements \u2014 layout pick (done)" }),
512
+ /* @__PURE__ */ jsx("p", { className: "text-xs text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))] max-w-3xl", children: "Same layout: icon + type, then title. No wrap \u2014 truncate only. Title left edge aligns with icon left edge." }),
513
513
  /* @__PURE__ */ jsxs("div", { className: "grid gap-4 lg:grid-cols-3", children: [
514
514
  /* @__PURE__ */ jsx(
515
515
  SampleBubble,
@@ -556,8 +556,8 @@ function UserMessageHybridTileSamples({
556
556
  ] })
557
557
  ] }),
558
558
  /* @__PURE__ */ jsx("div", { className: "grid gap-6 md:grid-cols-2", children: HYBRID_VARIANTS.map(({ id, title, description, Tile, gap }) => /* @__PURE__ */ jsx(SampleBubble, { title, description, children: /* @__PURE__ */ jsx("div", { className: cn("flex flex-wrap items-start", gap), children: specs.map((spec) => /* @__PURE__ */ jsx(Tile, { spec }, `${id}-${spec.id}`)) }) }, id)) }),
559
- /* @__PURE__ */ jsx("div", { className: "rounded-lg border border-dashed border-border bg-card/50 px-3 py-2", children: /* @__PURE__ */ jsxs("p", { className: "text-[11px] text-muted-foreground", children: [
560
- /* @__PURE__ */ jsx("span", { className: "font-medium text-foreground", children: "Shared rules:" }),
559
+ /* @__PURE__ */ jsx("div", { className: "rounded-lg border border-dashed border-[color:var(--mx-chat-border,hsl(var(--border)))] bg-card/50 px-3 py-2", children: /* @__PURE__ */ jsxs("p", { className: "text-[11px] text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", children: [
560
+ /* @__PURE__ */ jsx("span", { className: "font-medium text-[color:var(--mx-chat-text,hsl(var(--foreground)))]", children: "Shared rules:" }),
561
561
  " ",
562
562
  /* @__PURE__ */ jsx("code", { className: "text-[10px]", children: "rounded-lg" }),
563
563
  ",",
@@ -191,8 +191,8 @@ function AgentRunnerPage({
191
191
  /* @__PURE__ */ jsx(AlertTriangle, { className: "w-5 h-5" }),
192
192
  /* @__PURE__ */ jsx("span", { className: "font-medium", children: "Couldn't reach the agent service" })
193
193
  ] }),
194
- /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground leading-snug", children: initError }),
195
- /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground leading-snug", children: "Your work is safe \u2014 anything you had typed will be restored once the agent loads." }),
194
+ /* @__PURE__ */ jsx("p", { className: "text-sm text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))] leading-snug", children: initError }),
195
+ /* @__PURE__ */ jsx("p", { className: "text-xs text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))] leading-snug", children: "Your work is safe \u2014 anything you had typed will be restored once the agent loads." }),
196
196
  /* @__PURE__ */ jsx(
197
197
  Button,
198
198
  {
@@ -209,8 +209,8 @@ function AgentRunnerPage({
209
209
  const activeConversationId = conversationIdFromUrl ?? conversationId;
210
210
  const isColdLoadingConversation = !!conversationIdFromUrl && coldLoadingConversationId === conversationIdFromUrl;
211
211
  if (isInitializing || !activeConversationId) {
212
- return /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-center h-full gap-3 text-muted-foreground", children: [
213
- /* @__PURE__ */ jsx(Loader2, { className: "w-5 h-5 animate-spin text-primary" }),
212
+ return /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-center h-full gap-3 text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", children: [
213
+ /* @__PURE__ */ jsx(Loader2, { className: "w-5 h-5 animate-spin text-[color:var(--mx-chat-accent,hsl(var(--primary)))]" }),
214
214
  /* @__PURE__ */ jsx("span", { className: "text-sm", children: "Loading agent..." })
215
215
  ] });
216
216
  }
@@ -107,7 +107,7 @@ function AssistantError({
107
107
  retry && /* @__PURE__ */ jsx(Button, { variant: "outline", icon: retrying ? /* @__PURE__ */ jsx(Loader2, { className: "animate-spin" }) : /* @__PURE__ */ jsx(RotateCw, {}), disabled: retrying, onClick: retry, children: retrying ? "Retrying\u2026" : "Retry" }),
108
108
  hasDetails && /* @__PURE__ */ jsx(Button, { variant: "link", onClick: () => setShowDetails((v) => !v), children: showDetails ? "Hide details" : "Details" })
109
109
  ] }),
110
- hasDetails && showDetails && /* @__PURE__ */ jsxs("div", { className: "mt-1 flex flex-col gap-0.5 rounded bg-muted/50 px-2 py-1.5 font-mono text-[11px] leading-relaxed text-muted-foreground", children: [
110
+ hasDetails && showDetails && /* @__PURE__ */ jsxs("div", { className: "mt-1 flex flex-col gap-0.5 rounded bg-muted/50 px-2 py-1.5 font-mono text-[11px] leading-relaxed text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", children: [
111
111
  (errorType || code != null) && /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap gap-x-3", children: [
112
112
  errorType && /* @__PURE__ */ jsxs("span", { children: [
113
113
  /* @__PURE__ */ jsx("span", { className: "text-muted-foreground/60", children: "type: " }),
@@ -30,7 +30,7 @@ function AssistantWarning({ warning }) {
30
30
  ] }),
31
31
  hasDetails && /* @__PURE__ */ jsx(Button, { variant: "link", onClick: () => setShowDetails((value) => !value), children: showDetails ? "Hide details" : "Details" })
32
32
  ] }),
33
- hasDetails && showDetails && /* @__PURE__ */ jsxs("div", { className: "mt-1 flex flex-col gap-0.5 rounded bg-amber-500/10 px-2 py-1.5 font-mono text-[11px] leading-relaxed text-muted-foreground", children: [
33
+ hasDetails && showDetails && /* @__PURE__ */ jsxs("div", { className: "mt-1 flex flex-col gap-0.5 rounded bg-amber-500/10 px-2 py-1.5 font-mono text-[11px] leading-relaxed text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", children: [
34
34
  warning.code && /* @__PURE__ */ jsxs("span", { children: [
35
35
  /* @__PURE__ */ jsx("span", { className: "text-muted-foreground/60", children: "code: " }),
36
36
  warning.code
@@ -94,23 +94,23 @@ function GenerationJobCard({
94
94
  "aria-live": "polite",
95
95
  "data-testid": "generation-job-card",
96
96
  className: cn(
97
- "w-full max-w-md rounded-lg border border-border bg-card p-3 text-sm",
97
+ "w-full max-w-md rounded-lg border border-[color:var(--mx-chat-border,hsl(var(--border)))] bg-[var(--mx-chat-card,hsl(var(--card)))] p-3 text-sm",
98
98
  className
99
99
  ),
100
100
  children: [
101
101
  /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 items-center gap-2", children: [
102
- /* @__PURE__ */ jsx(Clapperboard, { className: "h-4 w-4 shrink-0 text-muted-foreground" }),
102
+ /* @__PURE__ */ jsx(Clapperboard, { className: "h-4 w-4 shrink-0 text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]" }),
103
103
  /* @__PURE__ */ jsxs("span", { className: "min-w-0 truncate", children: [
104
104
  /* @__PURE__ */ jsx("span", { className: "font-medium", children: "Generating a video" }),
105
- job.modelLabel && /* @__PURE__ */ jsxs("span", { className: "text-muted-foreground", children: [
105
+ job.modelLabel && /* @__PURE__ */ jsxs("span", { className: "text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", children: [
106
106
  " \xB7 ",
107
107
  job.modelLabel
108
108
  ] })
109
109
  ] }),
110
- elapsed && /* @__PURE__ */ jsx("span", { className: "ml-auto shrink-0 text-xs tabular-nums text-muted-foreground", children: elapsed })
110
+ elapsed && /* @__PURE__ */ jsx("span", { className: "ml-auto shrink-0 text-xs tabular-nums text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", children: elapsed })
111
111
  ] }),
112
112
  /* @__PURE__ */ jsx(Progress, { value: null, "aria-label": "Generating a video", className: "mt-2 h-1.5" }),
113
- /* @__PURE__ */ jsx("p", { className: "mt-2 text-xs text-muted-foreground", "data-testid": "generation-job-facts", children: facts.join(" \xB7 ") })
113
+ /* @__PURE__ */ jsx("p", { className: "mt-2 text-xs text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", "data-testid": "generation-job-facts", children: facts.join(" \xB7 ") })
114
114
  ]
115
115
  }
116
116
  );
@@ -13,7 +13,7 @@ function IncompleteNote({ label, detail }) {
13
13
  ] }),
14
14
  detail && /* @__PURE__ */ jsx(Button, { variant: "link", onClick: () => setOpen((v) => !v), children: open ? "Hide details" : "Details" })
15
15
  ] }),
16
- detail && open && /* @__PURE__ */ jsx("div", { className: "mt-1 rounded bg-amber-500/10 px-2 py-1.5 text-[11px] leading-relaxed text-muted-foreground", children: detail })
16
+ detail && open && /* @__PURE__ */ jsx("div", { className: "mt-1 rounded bg-amber-500/10 px-2 py-1.5 text-[11px] leading-relaxed text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", children: detail })
17
17
  ] });
18
18
  }
19
19
  export {
@@ -39,7 +39,7 @@ function RunJobWorkingLine({
39
39
  className: "text-sm"
40
40
  }
41
41
  ),
42
- elapsed && /* @__PURE__ */ jsx("span", { className: "ml-2 text-xs tabular-nums text-muted-foreground", children: elapsed })
42
+ elapsed && /* @__PURE__ */ jsx("span", { className: "ml-2 text-xs tabular-nums text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", children: elapsed })
43
43
  ]
44
44
  }
45
45
  );
@@ -361,7 +361,7 @@ function AgentConversationColumn({
361
361
  ...smartInputProps
362
362
  }
363
363
  ),
364
- belowInput ? /* @__PURE__ */ jsx("div", { className: "px-1 pb-1 text-xs text-muted-foreground", "data-chat-below-input": "", children: belowInput }) : null
364
+ belowInput ? /* @__PURE__ */ jsx("div", { className: "px-1 pb-1 text-xs text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", "data-chat-below-input": "", children: belowInput }) : null
365
365
  ]
366
366
  }
367
367
  )
@@ -131,9 +131,9 @@ function AgentHeaderMobile({
131
131
  onClick: () => handleModeChange(m.id),
132
132
  className: "flex w-full min-h-12 items-center gap-3 px-2 text-left text-base",
133
133
  children: [
134
- /* @__PURE__ */ jsx(Icon, { className: cn("h-5 w-5 shrink-0", isActive ? "text-primary" : "text-muted-foreground") }),
134
+ /* @__PURE__ */ jsx(Icon, { className: cn("h-5 w-5 shrink-0", isActive ? "text-[color:var(--mx-chat-accent,hsl(var(--primary)))]" : "text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]") }),
135
135
  /* @__PURE__ */ jsx("span", { className: cn("flex-1", isActive && "font-medium"), children: m.label }),
136
- isActive ? /* @__PURE__ */ jsx(Check, { className: "h-4 w-4 shrink-0 text-primary" }) : null
136
+ isActive ? /* @__PURE__ */ jsx(Check, { className: "h-4 w-4 shrink-0 text-[color:var(--mx-chat-accent,hsl(var(--primary)))]" }) : null
137
137
  ]
138
138
  },
139
139
  m.id
@@ -173,7 +173,7 @@ function AgentHeaderMobile({
173
173
  icon: /* @__PURE__ */ jsx(
174
174
  Icon,
175
175
  {
176
- className: `w-4 h-4 ${isActive ? "text-primary" : ""}`
176
+ className: `w-4 h-4 ${isActive ? "text-[color:var(--mx-chat-accent,hsl(var(--primary)))]" : ""}`
177
177
  }
178
178
  ),
179
179
  ariaLabel: label,
@@ -188,7 +188,7 @@ function AgentHeaderMobile({
188
188
  icon: /* @__PURE__ */ jsx(
189
189
  MoreHorizontal,
190
190
  {
191
- className: `w-4 h-4 ${!PROMINENT.includes(mode) ? "text-primary" : ""}`
191
+ className: `w-4 h-4 ${!PROMINENT.includes(mode) ? "text-[color:var(--mx-chat-accent,hsl(var(--primary)))]" : ""}`
192
192
  }
193
193
  ),
194
194
  ariaLabel: "More",
@@ -234,7 +234,7 @@ function AgentHeaderMobile({
234
234
  {
235
235
  className: cn(
236
236
  "w-4 h-4 mr-3 shrink-0",
237
- isActive ? "text-primary" : "text-muted-foreground"
237
+ isActive ? "text-[color:var(--mx-chat-accent,hsl(var(--primary)))]" : "text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]"
238
238
  )
239
239
  }
240
240
  ),
@@ -248,7 +248,7 @@ function AgentHeaderMobile({
248
248
  children: m.label
249
249
  }
250
250
  ),
251
- isActive && /* @__PURE__ */ jsx(Check, { className: "w-4 h-4 text-primary shrink-0" })
251
+ isActive && /* @__PURE__ */ jsx(Check, { className: "w-4 h-4 text-[color:var(--mx-chat-accent,hsl(var(--primary)))] shrink-0" })
252
252
  ]
253
253
  },
254
254
  m.id
@@ -193,7 +193,7 @@ function AgentModeController({
193
193
  onSelect: () => handleModeChange(id),
194
194
  className: "gap-2",
195
195
  children: [
196
- /* @__PURE__ */ jsx(Icon, { className: "h-4 w-4 text-muted-foreground" }),
196
+ /* @__PURE__ */ jsx(Icon, { className: "h-4 w-4 text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]" }),
197
197
  label
198
198
  ]
199
199
  },
@@ -21,7 +21,7 @@ function AutoInjectionSwitch({
21
21
  htmlFor: id,
22
22
  title,
23
23
  className: cn(
24
- "inline-flex h-7 shrink-0 cursor-pointer items-center gap-1.5 rounded-md px-1.5 transition-colors hover:bg-muted",
24
+ "inline-flex h-7 shrink-0 cursor-pointer items-center gap-1.5 rounded-md px-1.5 transition-colors hover:bg-[var(--mx-chat-fill,hsl(var(--muted)))]",
25
25
  warn && "bg-amber-500/10",
26
26
  className
27
27
  ),
@@ -31,7 +31,7 @@ function AutoInjectionSwitch({
31
31
  {
32
32
  className: cn(
33
33
  "shrink-0",
34
- disabled ? "text-muted-foreground" : "text-primary",
34
+ disabled ? "text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]" : "text-[color:var(--mx-chat-accent,hsl(var(--primary)))]",
35
35
  warn && "text-amber-600 dark:text-amber-400"
36
36
  ),
37
37
  children: icon
@@ -57,7 +57,7 @@ function AutoInjectionSwitch({
57
57
  {
58
58
  htmlFor: id,
59
59
  className: cn(
60
- "flex items-center justify-between gap-3 px-3 py-2 border-b border-border bg-muted/30 shrink-0 cursor-pointer",
60
+ "flex items-center justify-between gap-3 px-3 py-2 border-b border-[color:var(--mx-chat-border,hsl(var(--border)))] bg-muted/30 shrink-0 cursor-pointer",
61
61
  className
62
62
  ),
63
63
  children: [
@@ -67,20 +67,20 @@ function AutoInjectionSwitch({
67
67
  {
68
68
  className: cn(
69
69
  "shrink-0",
70
- disabled ? "text-muted-foreground" : "text-primary",
70
+ disabled ? "text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]" : "text-[color:var(--mx-chat-accent,hsl(var(--primary)))]",
71
71
  warn && "text-amber-600 dark:text-amber-400"
72
72
  ),
73
73
  children: icon
74
74
  }
75
75
  ),
76
76
  /* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
77
- /* @__PURE__ */ jsx("span", { className: "text-xs font-medium text-foreground", children: label }),
77
+ /* @__PURE__ */ jsx("span", { className: "text-xs font-medium text-[color:var(--mx-chat-text,hsl(var(--foreground)))]", children: label }),
78
78
  /* @__PURE__ */ jsx(
79
79
  "p",
80
80
  {
81
81
  className: cn(
82
82
  "text-[11px] leading-tight",
83
- warn ? "text-amber-700 dark:text-amber-300" : "text-muted-foreground"
83
+ warn ? "text-amber-700 dark:text-amber-300" : "text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]"
84
84
  ),
85
85
  children: statusText
86
86
  }