@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.
- package/CHANGELOG.md +23 -0
- package/dist/agents/api/fetch-pending-calls.js +4 -3
- package/dist/agents/api/submit-tool-results.js +3 -6
- package/dist/agents/components/chat/begin-fresh-chat.js +2 -2
- package/dist/agents/components/inputs/smart-input/composer/ComposerSplash.js +2 -3
- package/dist/agents/components/inputs/smart-input/composer/useComposerMode.js +4 -2
- package/dist/agents/components/live-run/LiveRunDisplay.d.ts +7 -1
- package/dist/agents/components/live-run/LiveRunDisplay.js +3 -1
- package/dist/agents/components/messages-display/AgentConversationDisplay.js +1 -1
- package/dist/agents/components/messages-display/assistant/AgentEmptyMessageDisplay.js +4 -4
- package/dist/agents/components/messages-display/assistant/AssistantNoAnswer.js +1 -1
- package/dist/agents/components/messages-display/assistant/BreathingOrb.js +1 -1
- package/dist/agents/components/messages-display/assistant/InPlaceAnswerEditor.js +1 -1
- package/dist/agents/components/messages-display/citations/MessageSourcesRow.js +1 -1
- package/dist/agents/components/messages-display/conversation-tools/ConversationFindBar.js +4 -4
- package/dist/agents/components/messages-display/message-options/EditHistoryDialog.js +7 -7
- package/dist/agents/components/messages-display/user/AgentUserMessage.js +4 -4
- package/dist/agents/components/messages-display/user/CollabNoteMessage.js +2 -2
- package/dist/agents/components/messages-display/user/FirstTurnVariables.js +3 -3
- package/dist/agents/components/messages-display/user/PendingSendMessage.js +4 -4
- package/dist/agents/components/messages-display/user/RemarksTranscriptView.js +7 -7
- package/dist/agents/components/messages-display/user/ResourceAttachmentTile.js +9 -9
- package/dist/agents/components/messages-display/user/ResourceEditableToggleSamples.js +4 -4
- package/dist/agents/components/messages-display/user/UserActionBar.js +3 -3
- package/dist/agents/components/messages-display/user/UserMessageAttachmentStyleComparison.js +12 -12
- package/dist/agents/components/messages-display/user/UserMessageChipsDemo.js +19 -19
- package/dist/agents/components/messages-display/user/UserMessageHybridTileSamples.js +22 -22
- package/dist/agents/components/run/AgentRunnerPage.js +4 -4
- package/dist/agents/components/run/AssistantError.js +1 -1
- package/dist/agents/components/run/AssistantWarning.js +1 -1
- package/dist/agents/components/run/GenerationJobCard.js +5 -5
- package/dist/agents/components/run/IncompleteNote.js +1 -1
- package/dist/agents/components/run/RunJobWorkingLine.js +1 -1
- package/dist/agents/components/shared/AgentConversationColumn.js +1 -1
- package/dist/agents/components/shared/AgentHeaderMobile.js +6 -6
- package/dist/agents/components/shared/AgentModeController.js +1 -1
- package/dist/agents/components/shared/AutoInjectionSwitch.js +6 -6
- package/dist/agents/components/shared/DesktopFilterPanel.js +8 -8
- package/dist/agents/components/smart/AgentRunner.js +1 -1
- package/dist/agents/components/smart/CreateWithAiTabs.js +1 -1
- package/dist/agents/redux/agent-definition/agent-cache-bust-request.js +7 -7
- package/dist/agents/redux/execution-system/context-rules/receipt-check.js +2 -2
- package/dist/agents/redux/execution-system/inbox/inbox.thunks.d.ts +2 -2
- package/dist/agents/redux/execution-system/inbox/inbox.thunks.js +7 -15
- package/dist/agents/redux/execution-system/observational-memory/fetch-memory-cost.thunk.d.ts +1 -1
- package/dist/agents/redux/execution-system/observational-memory/fetch-memory-cost.thunk.js +7 -4
- package/dist/agents/redux/execution-system/selectors/aggregate.selectors.d.ts +1 -114
- package/dist/agents/redux/execution-system/selectors/aggregate.selectors.js +28 -43
- package/dist/agents/redux/execution-system/thunks/call-conversation-api.d.ts +44 -0
- package/dist/agents/redux/execution-system/thunks/call-conversation-api.js +78 -0
- package/dist/agents/redux/execution-system/thunks/continue-agent-json.d.ts +41 -0
- package/dist/agents/redux/execution-system/thunks/continue-agent-json.js +66 -0
- package/dist/agents/redux/execution-system/thunks/execute-instance.thunk.d.ts +20 -0
- package/dist/agents/redux/execution-system/thunks/execute-instance.thunk.js +9 -2
- package/dist/agents/redux/execution-system/thunks/launch-agent-execution.thunk.js +4 -6
- package/dist/agents/redux/execution-system/thunks/notify-and-play-dispatcher.d.ts +1 -5
- package/dist/agents/redux/execution-system/thunks/notify-and-play-dispatcher.js +2 -1
- package/dist/agents/redux/execution-system/thunks/resolve-base-url.js +7 -17
- package/dist/agents/redux/execution-system/thunks/settle-after-stop.thunk.js +2 -2
- package/dist/agents/redux/execution-system/thunks/smart-execute.thunk.js +3 -3
- package/dist/agents/redux/execution-system/utils/continuation-body.d.ts +8 -2
- package/dist/agents/redux/execution-system/utils/continuation-body.js +3 -3
- package/dist/agents/redux/execution-system/utils/required-organization.d.ts +18 -0
- package/dist/agents/redux/execution-system/utils/required-organization.js +14 -10
- package/dist/agents/services/mcp-connections.service.js +5 -8
- package/dist/agents/ui-first-tools/dispatcher/dispatch-ui-first-tool.thunk.js +2 -1
- package/dist/host/defaults/files-host.js +11 -1
- package/dist/host/defaults/server-api.d.ts +1 -15
- package/dist/host/defaults/server-api.js +0 -21
- package/dist/host/defaults/server.d.ts +2 -1
- package/dist/host/defaults/server.js +8 -6
- package/dist/host/request-headers.d.ts +26 -0
- package/dist/host/request-headers.js +15 -0
- package/dist/host/server/call-api.d.ts +0 -13
- package/dist/host/server/call-api.js +0 -2
- package/dist/host/server/matrx-transport.d.ts +0 -1
- package/dist/host/server/matrx-transport.js +0 -2
- package/dist/store/root-state.d.ts +4 -21
- package/dist/surfaces/hooks/useSurfaceConfig.js +2 -1
- package/dist/surfaces/runtime/surface-feedback.js +2 -2
- package/dist/tool-call-visualization/components/ArtifactResultBar.js +4 -4
- package/dist/tool-call-visualization/components/ChatResultColumn.d.ts +1 -1
- package/dist/tool-call-visualization/components/ToolCallBatch.js +2 -2
- package/dist/tool-call-visualization/components/ToolCallVisualization.js +5 -5
- package/dist/tool-call-visualization/components/ToolTabBodies.js +12 -12
- package/dist/tool-call-visualization/components/ToolUpdatesOverlay.js +4 -4
- package/dist/tool-call-visualization/configured-rows/ConfiguredToolRow.js +8 -8
- package/dist/tool-call-visualization/configured-rows/CopyToolButton.js +1 -1
- package/dist/tool-call-visualization/configured-rows/ToolProgressView.js +7 -7
- package/dist/tool-call-visualization/configured-rows/field-components.js +6 -6
- package/dist/tool-call-visualization/registry/GenericRenderer.js +4 -4
- package/dist/tool-call-visualization/renderers/_shared-entity/EmptyResultCard.js +1 -1
- package/dist/tool-call-visualization/renderers/_shared-entity/EntityCard.js +5 -5
- package/dist/tool-call-visualization/renderers/_shared-entity/PartPeekPopover.js +2 -2
- package/dist/tool-call-visualization/renderers/_shared-entity/ToolGlyph.js +1 -1
- package/dist/tool-call-visualization/renderers/_shared-entity/ToolResultCard.js +6 -6
- package/dist/tool-call-visualization/renderers/agent-call/AgentCallInline.js +5 -5
- package/dist/tool-call-visualization/renderers/agent-call/CollabCallCard.js +4 -4
- package/dist/tool-call-visualization/renderers/agent-call/ImageGenerationResult.js +1 -1
- package/dist/tool-call-visualization/renderers/ask/AskInline.js +3 -3
- package/dist/tool-call-visualization/renderers/ask-person/AskPersonInline.js +2 -2
- package/dist/tool-call-visualization/renderers/cloud-browser/CloudBrowserRunCard.js +5 -5
- package/dist/tool-call-visualization/renderers/ctx/CtxBatchInline.js +3 -3
- package/dist/tool-call-visualization/renderers/ctx/CtxGetInline.js +2 -2
- package/dist/tool-call-visualization/renderers/ctx/CtxItemCard.js +3 -3
- package/dist/tool-call-visualization/renderers/ctx/CtxPatchInline.js +6 -6
- package/dist/tool-call-visualization/renderers/dictionary/DictEntryList.js +12 -12
- package/dist/tool-call-visualization/renderers/dictionary/DictionaryOverlay.js +5 -5
- package/dist/tool-call-visualization/renderers/fs/FsInline.js +7 -7
- package/dist/tool-call-visualization/renderers/news-api/NewsInline.js +17 -17
- package/dist/tool-call-visualization/renderers/news-api/NewsOverlay.js +12 -12
- package/dist/tool-call-visualization/renderers/random-wheel/RandomWheelInline.js +34 -34
- package/dist/tool-call-visualization/renderers/records/RecordsInline.js +1 -1
- package/dist/tool-call-visualization/renderers/research/ResearchInline.js +10 -10
- package/dist/tool-call-visualization/renderers/research/ResearchOverlay.js +19 -19
- package/dist/tool-call-visualization/renderers/research/SubagentReportBlock.js +11 -11
- package/dist/tool-call-visualization/renderers/scrape/ScrapeInline.js +18 -18
- package/dist/tool-call-visualization/renderers/scrape/ScrapeOverlay.js +17 -17
- package/dist/tool-call-visualization/renderers/search/SearchInline.js +30 -30
- package/dist/tool-call-visualization/renderers/search/SearchOverlay.js +40 -40
- package/dist/tool-call-visualization/renderers/shell/ShellInline.js +3 -3
- package/dist/tool-call-visualization/renderers/skill/SkillInline.js +5 -5
- package/dist/tool-call-visualization/renderers/sql/DbSchemaInline.js +7 -7
- package/dist/tool-call-visualization/renderers/sql/SqlInline.js +4 -4
- package/dist/tool-call-visualization/renderers/workbook/WorkbookGrid.js +4 -4
- package/dist/tool-call-visualization/renderers/workbook/WorkbookInline.js +2 -2
- package/dist/tool-call-visualization/renderers/workbook/WorkbookOverlay.js +7 -7
- package/dist/tool-call-visualization/renderers/working-document/PatchDiffInline.js +3 -3
- package/dist/tool-call-visualization/result-fields/EmptyResult.js +1 -1
- package/dist/tool-call-visualization/result-fields/KeyValueGrid.js +9 -9
- package/dist/tool-call-visualization/result-fields/ResultFile.js +4 -4
- package/dist/tool-call-visualization/result-fields/ResultJson.js +1 -1
- package/dist/tool-call-visualization/result-fields/ResultMedia.js +2 -2
- package/dist/tool-call-visualization/result-fields/ResultScalar.js +2 -2
- package/dist/tool-call-visualization/result-fields/ResultTable.js +10 -10
- package/dist/tool-call-visualization/result-fields/ResultValue.js +7 -7
- package/dist/tool-call-visualization/result-fields/ShortId.js +3 -3
- package/dist/tool-call-visualization/result-fields/ToolErrorCard.js +4 -4
- package/dist/tool-call-visualization/result-fields/UrlChips.js +3 -3
- package/dist/tool-call-visualization/surface-write/SurfaceWriteDiff.js +2 -2
- package/dist/tool-call-visualization/surface-write/SurfaceWriteStress.js +1 -1
- package/dist/tool-call-visualization/window-panel/ToolCallWindowPanel.js +9 -9
- package/dist/ui/mandates-storage/mandateStorage.d.ts +36 -0
- package/dist/ui/mandates-storage/shortcutStorage.d.ts +9 -0
- package/dist/ui/markdown-stream/EnhancedChatMarkdown.js +22 -0
- package/dist/ui/markdown-stream/MarkdownStreamImpl.js +3 -3
- package/dist/ui/markdown-stream/StreamTextFallback.d.ts +6 -0
- package/dist/ui/markdown-stream/StreamTextFallback.js +23 -0
- package/dist/ui/markdown-stream/merge-thinking-across-hidden.d.ts +19 -0
- package/dist/ui/markdown-stream/merge-thinking-across-hidden.js +21 -0
- package/package.json +12 -7
|
@@ -51,7 +51,7 @@ const NewsOverlay = ({ entry }) => {
|
|
|
51
51
|
] });
|
|
52
52
|
}
|
|
53
53
|
if (allArticles.length === 0) {
|
|
54
|
-
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center justify-center py-16 gap-3 text-muted-foreground", children: [
|
|
54
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center justify-center py-16 gap-3 text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", children: [
|
|
55
55
|
/* @__PURE__ */ jsx(Newspaper, { className: "w-10 h-10 opacity-40" }),
|
|
56
56
|
/* @__PURE__ */ jsxs("p", { className: "text-sm", children: [
|
|
57
57
|
"No news data available",
|
|
@@ -61,8 +61,8 @@ const NewsOverlay = ({ entry }) => {
|
|
|
61
61
|
] });
|
|
62
62
|
}
|
|
63
63
|
return /* @__PURE__ */ jsxs("div", { className: "w-full h-full overflow-y-auto bg-background p-4 space-y-4", children: [
|
|
64
|
-
/* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-2 bg-card rounded-lg p-3 border border-border", children: [
|
|
65
|
-
/* @__PURE__ */ jsx(Filter, { className: "w-4 h-4 text-muted-foreground flex-shrink-0" }),
|
|
64
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-2 bg-[var(--mx-chat-card,hsl(var(--card)))] rounded-lg p-3 border border-[color:var(--mx-chat-border,hsl(var(--border)))]", children: [
|
|
65
|
+
/* @__PURE__ */ jsx(Filter, { className: "w-4 h-4 text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))] flex-shrink-0" }),
|
|
66
66
|
/* @__PURE__ */ jsxs(
|
|
67
67
|
Button,
|
|
68
68
|
{
|
|
@@ -95,7 +95,7 @@ const NewsOverlay = ({ entry }) => {
|
|
|
95
95
|
);
|
|
96
96
|
}),
|
|
97
97
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 ml-auto", children: [
|
|
98
|
-
/* @__PURE__ */ jsx(SortAsc, { className: "w-4 h-4 text-muted-foreground flex-shrink-0" }),
|
|
98
|
+
/* @__PURE__ */ jsx(SortAsc, { className: "w-4 h-4 text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))] flex-shrink-0" }),
|
|
99
99
|
/* @__PURE__ */ jsx(
|
|
100
100
|
Button,
|
|
101
101
|
{
|
|
@@ -116,7 +116,7 @@ const NewsOverlay = ({ entry }) => {
|
|
|
116
116
|
)
|
|
117
117
|
] })
|
|
118
118
|
] }),
|
|
119
|
-
query && /* @__PURE__ */ jsxs("p", { className: "text-xs text-muted-foreground px-1", children: [
|
|
119
|
+
query && /* @__PURE__ */ jsxs("p", { className: "text-xs text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))] px-1", children: [
|
|
120
120
|
totalResults,
|
|
121
121
|
" result",
|
|
122
122
|
totalResults !== 1 ? "s" : "",
|
|
@@ -130,7 +130,7 @@ const NewsOverlay = ({ entry }) => {
|
|
|
130
130
|
/* @__PURE__ */ jsx("div", { className: "space-y-3", children: filteredArticles.map((article, index) => /* @__PURE__ */ jsx(
|
|
131
131
|
"div",
|
|
132
132
|
{
|
|
133
|
-
className: "bg-card rounded-lg border border-border overflow-hidden hover:border-primary/30 hover:shadow-md transition-all duration-200",
|
|
133
|
+
className: "bg-[var(--mx-chat-card,hsl(var(--card)))] rounded-lg border border-[color:var(--mx-chat-border,hsl(var(--border)))] overflow-hidden hover:border-primary/30 hover:shadow-md transition-all duration-200",
|
|
134
134
|
children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col md:flex-row gap-0 md:gap-4", children: [
|
|
135
135
|
article.url_to_image && /* @__PURE__ */ jsx("div", { className: "w-full md:w-56 flex-shrink-0", children: /* @__PURE__ */ jsx(
|
|
136
136
|
"img",
|
|
@@ -146,7 +146,7 @@ const NewsOverlay = ({ entry }) => {
|
|
|
146
146
|
/* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0 p-4 space-y-2", children: [
|
|
147
147
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-2 flex-wrap", children: [
|
|
148
148
|
/* @__PURE__ */ jsx(Badge, { variant: "secondary", className: "text-xs", children: article.source.name }),
|
|
149
|
-
article.published_at && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1 text-xs text-muted-foreground", children: [
|
|
149
|
+
article.published_at && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1 text-xs text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", children: [
|
|
150
150
|
/* @__PURE__ */ jsx(Calendar, { className: "w-3 h-3" }),
|
|
151
151
|
/* @__PURE__ */ jsx("span", { children: new Date(article.published_at).toLocaleDateString("en-US", {
|
|
152
152
|
month: "long",
|
|
@@ -164,25 +164,25 @@ const NewsOverlay = ({ entry }) => {
|
|
|
164
164
|
target: "_blank",
|
|
165
165
|
rel: "noopener noreferrer",
|
|
166
166
|
className: "group block",
|
|
167
|
-
children: /* @__PURE__ */ jsxs("h2", { className: "text-base font-semibold text-foreground group-hover:text-primary transition-colors flex items-start gap-2", children: [
|
|
167
|
+
children: /* @__PURE__ */ jsxs("h2", { className: "text-base font-semibold text-[color:var(--mx-chat-text,hsl(var(--foreground)))] group-hover:text-[color:var(--mx-chat-accent,hsl(var(--primary)))] transition-colors flex items-start gap-2", children: [
|
|
168
168
|
/* @__PURE__ */ jsx("span", { children: article.title }),
|
|
169
169
|
/* @__PURE__ */ jsx(ExternalLink, { className: "w-4 h-4 flex-shrink-0 mt-0.5 opacity-0 group-hover:opacity-100 transition-opacity" })
|
|
170
170
|
] })
|
|
171
171
|
}
|
|
172
172
|
),
|
|
173
|
-
article.author && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1 text-xs text-muted-foreground", children: [
|
|
173
|
+
article.author && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1 text-xs text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", children: [
|
|
174
174
|
/* @__PURE__ */ jsx(User, { className: "w-3 h-3" }),
|
|
175
175
|
/* @__PURE__ */ jsx("span", { children: article.author })
|
|
176
176
|
] }),
|
|
177
177
|
article.description && /* @__PURE__ */ jsx("p", { className: "text-sm text-foreground/80", children: article.description }),
|
|
178
|
-
article.content && /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground line-clamp-3", children: article.content }),
|
|
178
|
+
article.content && /* @__PURE__ */ jsx("p", { className: "text-sm text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))] line-clamp-3", children: article.content }),
|
|
179
179
|
/* @__PURE__ */ jsxs(
|
|
180
180
|
"a",
|
|
181
181
|
{
|
|
182
182
|
href: article.url,
|
|
183
183
|
target: "_blank",
|
|
184
184
|
rel: "noopener noreferrer",
|
|
185
|
-
className: "inline-flex items-center gap-1 text-sm font-medium text-primary hover:text-primary/80 transition-colors",
|
|
185
|
+
className: "inline-flex items-center gap-1 text-sm font-medium text-[color:var(--mx-chat-accent,hsl(var(--primary)))] hover:text-primary/80 transition-colors",
|
|
186
186
|
children: [
|
|
187
187
|
"Read full article",
|
|
188
188
|
/* @__PURE__ */ jsx(ExternalLink, { className: "w-3 h-3" })
|
|
@@ -194,7 +194,7 @@ const NewsOverlay = ({ entry }) => {
|
|
|
194
194
|
},
|
|
195
195
|
index
|
|
196
196
|
)) }),
|
|
197
|
-
filteredArticles.length === 0 && allArticles.length > 0 && /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center justify-center py-12 gap-3 text-muted-foreground", children: [
|
|
197
|
+
filteredArticles.length === 0 && allArticles.length > 0 && /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center justify-center py-12 gap-3 text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", children: [
|
|
198
198
|
/* @__PURE__ */ jsx(Newspaper, { className: "w-10 h-10 opacity-40" }),
|
|
199
199
|
/* @__PURE__ */ jsx("p", { className: "text-sm", children: "No articles match the selected source filter." }),
|
|
200
200
|
/* @__PURE__ */ jsx(Button, { variant: "outline", size: "sm", onClick: () => setSelectedSource("all"), children: "Clear filter" })
|
|
@@ -447,10 +447,10 @@ const ListResult = ({ result }) => {
|
|
|
447
447
|
const hasValue = text.trim().length > 0;
|
|
448
448
|
return /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
449
449
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
450
|
-
/* @__PURE__ */ jsx(Trophy, { className: "w-4 h-4 text-primary flex-shrink-0" }),
|
|
451
|
-
/* @__PURE__ */ jsx("span", { className: "text-base font-semibold text-foreground break-words", children: result.chosen.label || "(no label)" })
|
|
450
|
+
/* @__PURE__ */ jsx(Trophy, { className: "w-4 h-4 text-[color:var(--mx-chat-accent,hsl(var(--primary)))] flex-shrink-0" }),
|
|
451
|
+
/* @__PURE__ */ jsx("span", { className: "text-base font-semibold text-[color:var(--mx-chat-text,hsl(var(--foreground)))] break-words", children: result.chosen.label || "(no label)" })
|
|
452
452
|
] }),
|
|
453
|
-
hasValue && /* @__PURE__ */ jsx("div", { className: "rounded-lg border border-border bg-muted/30 p-3", children: isJson ? /* @__PURE__ */ jsx("pre", { className: "text-xs text-foreground/90 whitespace-pre-wrap break-words font-mono overflow-x-auto", children: text }) : /* @__PURE__ */ jsx("div", { className: "text-sm text-foreground/90 break-words", children: /* @__PURE__ */ jsx(BasicMarkdownContent, { imagePolicy: "ai", content: text, showCopyButton: false }) }) })
|
|
453
|
+
hasValue && /* @__PURE__ */ jsx("div", { className: "rounded-lg border border-[color:var(--mx-chat-border,hsl(var(--border)))] bg-muted/30 p-3", children: isJson ? /* @__PURE__ */ jsx("pre", { className: "text-xs text-foreground/90 whitespace-pre-wrap break-words font-mono overflow-x-auto", children: text }) : /* @__PURE__ */ jsx("div", { className: "text-sm text-foreground/90 break-words", children: /* @__PURE__ */ jsx(BasicMarkdownContent, { imagePolicy: "ai", content: text, showCopyButton: false }) }) })
|
|
454
454
|
] });
|
|
455
455
|
};
|
|
456
456
|
const WebResult = ({ result }) => {
|
|
@@ -458,12 +458,12 @@ const WebResult = ({ result }) => {
|
|
|
458
458
|
const sources = result.sources ?? [];
|
|
459
459
|
return /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
|
|
460
460
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
461
|
-
/* @__PURE__ */ jsx(Globe, { className: "w-4 h-4 text-primary flex-shrink-0" }),
|
|
462
|
-
/* @__PURE__ */ jsx("span", { className: "text-base font-semibold text-foreground break-words", children: result.chosen.label || result.seed || "(no seed)" })
|
|
461
|
+
/* @__PURE__ */ jsx(Globe, { className: "w-4 h-4 text-[color:var(--mx-chat-accent,hsl(var(--primary)))] flex-shrink-0" }),
|
|
462
|
+
/* @__PURE__ */ jsx("span", { className: "text-base font-semibold text-[color:var(--mx-chat-text,hsl(var(--foreground)))] break-words", children: result.chosen.label || result.seed || "(no seed)" })
|
|
463
463
|
] }),
|
|
464
|
-
text.trim().length > 0 && /* @__PURE__ */ jsx("div", { className: "rounded-lg border border-border bg-card p-3 text-sm text-foreground/90 break-words max-h-72 overflow-y-auto", children: /* @__PURE__ */ jsx(BasicMarkdownContent, { imagePolicy: "other", content: text, showCopyButton: false }) }),
|
|
464
|
+
text.trim().length > 0 && /* @__PURE__ */ jsx("div", { className: "rounded-lg border border-[color:var(--mx-chat-border,hsl(var(--border)))] bg-[var(--mx-chat-card,hsl(var(--card)))] p-3 text-sm text-foreground/90 break-words max-h-72 overflow-y-auto", children: /* @__PURE__ */ jsx(BasicMarkdownContent, { imagePolicy: "other", content: text, showCopyButton: false }) }),
|
|
465
465
|
sources.length > 0 && /* @__PURE__ */ jsxs("div", { className: "space-y-1.5", children: [
|
|
466
|
-
/* @__PURE__ */ jsxs("div", { className: "text-xs font-medium text-muted-foreground", children: [
|
|
466
|
+
/* @__PURE__ */ jsxs("div", { className: "text-xs font-medium text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", children: [
|
|
467
467
|
sources.length,
|
|
468
468
|
" ",
|
|
469
469
|
sources.length === 1 ? "source" : "sources"
|
|
@@ -475,11 +475,11 @@ const WebResult = ({ result }) => {
|
|
|
475
475
|
target: "_blank",
|
|
476
476
|
rel: "noopener noreferrer",
|
|
477
477
|
onClick: (e) => e.stopPropagation(),
|
|
478
|
-
className: "flex items-center gap-2 p-2 rounded-md border border-border bg-card hover:border-primary/30 transition-colors group",
|
|
478
|
+
className: "flex items-center gap-2 p-2 rounded-md border border-[color:var(--mx-chat-border,hsl(var(--border)))] bg-[var(--mx-chat-card,hsl(var(--card)))] hover:border-primary/30 transition-colors group",
|
|
479
479
|
children: [
|
|
480
|
-
/* @__PURE__ */ jsx(Globe, { className: "w-3.5 h-3.5 text-muted-foreground flex-shrink-0" }),
|
|
481
|
-
/* @__PURE__ */ jsx("span", { className: "flex-1 min-w-0 text-xs text-foreground truncate group-hover:text-primary", children: src.title || src.url }),
|
|
482
|
-
/* @__PURE__ */ jsx(ExternalLink, { className: "w-3 h-3 text-muted-foreground flex-shrink-0 opacity-0 group-hover:opacity-100 transition-opacity" })
|
|
480
|
+
/* @__PURE__ */ jsx(Globe, { className: "w-3.5 h-3.5 text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))] flex-shrink-0" }),
|
|
481
|
+
/* @__PURE__ */ jsx("span", { className: "flex-1 min-w-0 text-xs text-[color:var(--mx-chat-text,hsl(var(--foreground)))] truncate group-hover:text-[color:var(--mx-chat-accent,hsl(var(--primary)))]", children: src.title || src.url }),
|
|
482
|
+
/* @__PURE__ */ jsx(ExternalLink, { className: "w-3 h-3 text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))] flex-shrink-0 opacity-0 group-hover:opacity-100 transition-opacity" })
|
|
483
483
|
]
|
|
484
484
|
},
|
|
485
485
|
`${src.url}-${i}`
|
|
@@ -493,10 +493,10 @@ const ImageResult = ({ result }) => {
|
|
|
493
493
|
const [imgFailed, setImgFailed] = useState(false);
|
|
494
494
|
return /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
495
495
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
496
|
-
/* @__PURE__ */ jsx(ImageIcon, { className: "w-4 h-4 text-primary flex-shrink-0" }),
|
|
497
|
-
/* @__PURE__ */ jsx("span", { className: "text-base font-semibold text-foreground break-words", children: result.chosen.label || result.seed || "(no keyword)" })
|
|
496
|
+
/* @__PURE__ */ jsx(ImageIcon, { className: "w-4 h-4 text-[color:var(--mx-chat-accent,hsl(var(--primary)))] flex-shrink-0" }),
|
|
497
|
+
/* @__PURE__ */ jsx("span", { className: "text-base font-semibold text-[color:var(--mx-chat-text,hsl(var(--foreground)))] break-words", children: result.chosen.label || result.seed || "(no keyword)" })
|
|
498
498
|
] }),
|
|
499
|
-
image && !imgFailed ? /* @__PURE__ */ jsx("div", { className: "overflow-hidden rounded-lg border border-border bg-muted/30", children: /* @__PURE__ */ jsx(
|
|
499
|
+
image && !imgFailed ? /* @__PURE__ */ jsx("div", { className: "overflow-hidden rounded-lg border border-[color:var(--mx-chat-border,hsl(var(--border)))] bg-muted/30", children: /* @__PURE__ */ jsx(
|
|
500
500
|
"img",
|
|
501
501
|
{
|
|
502
502
|
src: image.url,
|
|
@@ -504,7 +504,7 @@ const ImageResult = ({ result }) => {
|
|
|
504
504
|
className: "w-full max-h-80 object-cover",
|
|
505
505
|
onError: () => setImgFailed(true)
|
|
506
506
|
}
|
|
507
|
-
) }) : /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 rounded-lg border border-border bg-muted/30 p-4 text-sm text-muted-foreground", children: [
|
|
507
|
+
) }) : /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 rounded-lg border border-[color:var(--mx-chat-border,hsl(var(--border)))] bg-muted/30 p-4 text-sm text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", children: [
|
|
508
508
|
/* @__PURE__ */ jsx(ImageIcon, { className: "w-4 h-4" }),
|
|
509
509
|
/* @__PURE__ */ jsxs("span", { children: [
|
|
510
510
|
imgFailed ? "Image failed to load." : "No image returned.",
|
|
@@ -512,7 +512,7 @@ const ImageResult = ({ result }) => {
|
|
|
512
512
|
] })
|
|
513
513
|
] }),
|
|
514
514
|
caption && /* @__PURE__ */ jsx("p", { className: "text-sm text-foreground/80 break-words", children: caption }),
|
|
515
|
-
image?.photographer_name && /* @__PURE__ */ jsxs("p", { className: "flex items-center gap-1 text-xs text-muted-foreground", children: [
|
|
515
|
+
image?.photographer_name && /* @__PURE__ */ jsxs("p", { className: "flex items-center gap-1 text-xs text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", children: [
|
|
516
516
|
/* @__PURE__ */ jsx(Camera, { className: "w-3 h-3 flex-shrink-0" }),
|
|
517
517
|
/* @__PURE__ */ jsxs("span", { children: [
|
|
518
518
|
"Photo by",
|
|
@@ -524,7 +524,7 @@ const ImageResult = ({ result }) => {
|
|
|
524
524
|
target: "_blank",
|
|
525
525
|
rel: "noopener noreferrer",
|
|
526
526
|
onClick: (e) => e.stopPropagation(),
|
|
527
|
-
className: "text-primary hover:underline",
|
|
527
|
+
className: "text-[color:var(--mx-chat-accent,hsl(var(--primary)))] hover:underline",
|
|
528
528
|
children: image.photographer_name
|
|
529
529
|
}
|
|
530
530
|
) : /* @__PURE__ */ jsx("span", { className: "text-foreground/80", children: image.photographer_name }),
|
|
@@ -538,7 +538,7 @@ const ImageResult = ({ result }) => {
|
|
|
538
538
|
target: "_blank",
|
|
539
539
|
rel: "noopener noreferrer",
|
|
540
540
|
onClick: (e) => e.stopPropagation(),
|
|
541
|
-
className: "text-primary hover:underline",
|
|
541
|
+
className: "text-[color:var(--mx-chat-accent,hsl(var(--primary)))] hover:underline",
|
|
542
542
|
children: "Unsplash"
|
|
543
543
|
}
|
|
544
544
|
)
|
|
@@ -613,16 +613,16 @@ const RandomWheelInline = ({
|
|
|
613
613
|
"Wheel spin failed",
|
|
614
614
|
/* @__PURE__ */ jsx(ErrorAlchemyMenu, {})
|
|
615
615
|
] }),
|
|
616
|
-
entry.errorMessage && /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground break-words mt-0.5", children: entry.errorMessage })
|
|
616
|
+
entry.errorMessage && /* @__PURE__ */ jsx("p", { className: "text-xs text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))] break-words mt-0.5", children: entry.errorMessage })
|
|
617
617
|
] })
|
|
618
618
|
] });
|
|
619
619
|
}
|
|
620
620
|
if (!wheel) {
|
|
621
|
-
return /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 rounded-lg border border-border bg-card p-4", children: [
|
|
622
|
-
/* @__PURE__ */ jsx(Dices, { className: "w-5 h-5 text-primary animate-pulse flex-shrink-0" }),
|
|
621
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 rounded-lg border border-[color:var(--mx-chat-border,hsl(var(--border)))] bg-[var(--mx-chat-card,hsl(var(--card)))] p-4", children: [
|
|
622
|
+
/* @__PURE__ */ jsx(Dices, { className: "w-5 h-5 text-[color:var(--mx-chat-accent,hsl(var(--primary)))] animate-pulse flex-shrink-0" }),
|
|
623
623
|
/* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0", children: [
|
|
624
|
-
/* @__PURE__ */ jsx("div", { className: "text-sm font-medium text-foreground", children: "Spinning up\u2026" }),
|
|
625
|
-
/* @__PURE__ */ jsx("div", { className: "mt-2 h-2 w-2/3 rounded-full bg-muted animate-pulse" })
|
|
624
|
+
/* @__PURE__ */ jsx("div", { className: "text-sm font-medium text-[color:var(--mx-chat-text,hsl(var(--foreground)))]", children: "Spinning up\u2026" }),
|
|
625
|
+
/* @__PURE__ */ jsx("div", { className: "mt-2 h-2 w-2/3 rounded-full bg-[var(--mx-chat-fill,hsl(var(--muted)))] animate-pulse" })
|
|
626
626
|
] })
|
|
627
627
|
] });
|
|
628
628
|
}
|
|
@@ -632,8 +632,8 @@ const RandomWheelInline = ({
|
|
|
632
632
|
const seedLabel = wheel.candidates[wheel.winnerIndex] ?? result?.seed ?? "";
|
|
633
633
|
return /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
|
|
634
634
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
635
|
-
/* @__PURE__ */ jsx(ModeIcon, { className: "w-4 h-4 text-primary flex-shrink-0" }),
|
|
636
|
-
/* @__PURE__ */ jsx("span", { className: "text-sm font-semibold text-foreground", children: title }),
|
|
635
|
+
/* @__PURE__ */ jsx(ModeIcon, { className: "w-4 h-4 text-[color:var(--mx-chat-accent,hsl(var(--primary)))] flex-shrink-0" }),
|
|
636
|
+
/* @__PURE__ */ jsx("span", { className: "text-sm font-semibold text-[color:var(--mx-chat-text,hsl(var(--foreground)))]", children: title }),
|
|
637
637
|
/* @__PURE__ */ jsx("span", { className: "ml-auto inline-flex items-center gap-1 rounded-full bg-secondary px-2 py-0.5 text-xs font-medium text-secondary-foreground", children: modeLabel })
|
|
638
638
|
] }),
|
|
639
639
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-3", children: [
|
|
@@ -651,15 +651,15 @@ const RandomWheelInline = ({
|
|
|
651
651
|
onUserPick: handleUserPick
|
|
652
652
|
}
|
|
653
653
|
),
|
|
654
|
-
settled && wheel.candidates.length > 1 && !isPersisted && /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground text-center", children: "Drag to explore options \u2014 your pick goes to the agent." }),
|
|
655
|
-
userPickLabel && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 rounded-lg border border-border bg-muted/30 px-3 py-2 text-sm", children: [
|
|
656
|
-
/* @__PURE__ */ jsx(Trophy, { className: "w-4 h-4 text-primary flex-shrink-0" }),
|
|
657
|
-
/* @__PURE__ */ jsxs("span", { className: "text-foreground break-words", children: [
|
|
654
|
+
settled && wheel.candidates.length > 1 && !isPersisted && /* @__PURE__ */ jsx("p", { className: "text-xs text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))] text-center", children: "Drag to explore options \u2014 your pick goes to the agent." }),
|
|
655
|
+
userPickLabel && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 rounded-lg border border-[color:var(--mx-chat-border,hsl(var(--border)))] bg-muted/30 px-3 py-2 text-sm", children: [
|
|
656
|
+
/* @__PURE__ */ jsx(Trophy, { className: "w-4 h-4 text-[color:var(--mx-chat-accent,hsl(var(--primary)))] flex-shrink-0" }),
|
|
657
|
+
/* @__PURE__ */ jsxs("span", { className: "text-[color:var(--mx-chat-text,hsl(var(--foreground)))] break-words", children: [
|
|
658
658
|
"Your pick: ",
|
|
659
659
|
/* @__PURE__ */ jsx("span", { className: "font-semibold", children: userPickLabel })
|
|
660
660
|
] })
|
|
661
661
|
] }),
|
|
662
|
-
/* @__PURE__ */ jsxs("div", { className: "text-xs text-muted-foreground", children: [
|
|
662
|
+
/* @__PURE__ */ jsxs("div", { className: "text-xs text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", children: [
|
|
663
663
|
wheel.candidates.length,
|
|
664
664
|
" ",
|
|
665
665
|
wheel.candidates.length === 1 ? "option" : "options",
|
|
@@ -668,19 +668,19 @@ const RandomWheelInline = ({
|
|
|
668
668
|
wheel.poolSize
|
|
669
669
|
] })
|
|
670
670
|
] }),
|
|
671
|
-
!settled && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 text-xs font-medium text-primary", children: [
|
|
671
|
+
!settled && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 text-xs font-medium text-[color:var(--mx-chat-accent,hsl(var(--primary)))]", children: [
|
|
672
672
|
/* @__PURE__ */ jsx(RefreshCw, { className: "w-3.5 h-3.5 animate-spin" }),
|
|
673
673
|
/* @__PURE__ */ jsx("span", { children: "Spinning\u2026" })
|
|
674
674
|
] })
|
|
675
675
|
] }),
|
|
676
|
-
awaitingFetch && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 rounded-lg border border-border bg-muted/20 p-3 text-sm text-muted-foreground", children: [
|
|
677
|
-
/* @__PURE__ */ jsx(Loader2, { className: "w-4 h-4 animate-spin text-primary flex-shrink-0" }),
|
|
676
|
+
awaitingFetch && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 rounded-lg border border-[color:var(--mx-chat-border,hsl(var(--border)))] bg-muted/20 p-3 text-sm text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", children: [
|
|
677
|
+
/* @__PURE__ */ jsx(Loader2, { className: "w-4 h-4 animate-spin text-[color:var(--mx-chat-accent,hsl(var(--primary)))] flex-shrink-0" }),
|
|
678
678
|
/* @__PURE__ */ jsxs("span", { className: "break-words", children: [
|
|
679
679
|
"Fetching fresh ",
|
|
680
680
|
mode === "image" ? "image" : "content",
|
|
681
681
|
" for",
|
|
682
682
|
" ",
|
|
683
|
-
/* @__PURE__ */ jsxs("span", { className: "font-medium text-foreground", children: [
|
|
683
|
+
/* @__PURE__ */ jsxs("span", { className: "font-medium text-[color:var(--mx-chat-text,hsl(var(--foreground)))]", children: [
|
|
684
684
|
"\u201C",
|
|
685
685
|
seedLabel,
|
|
686
686
|
"\u201D"
|
|
@@ -34,7 +34,7 @@ function RecordsInline({ entry }) {
|
|
|
34
34
|
if (!result) return null;
|
|
35
35
|
const sentence = sentenceFor(result);
|
|
36
36
|
if (!sentence) return null;
|
|
37
|
-
return /* @__PURE__ */ jsx("p", { className: "text-xs leading-relaxed text-muted-foreground", children: sentence });
|
|
37
|
+
return /* @__PURE__ */ jsx("p", { className: "text-xs leading-relaxed text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", children: sentence });
|
|
38
38
|
}
|
|
39
39
|
export {
|
|
40
40
|
RecordsInline
|
|
@@ -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
|
] }) })
|