@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
|
@@ -30,7 +30,7 @@ const ResultMedia = ({
|
|
|
30
30
|
"div",
|
|
31
31
|
{
|
|
32
32
|
className: cn(
|
|
33
|
-
"overflow-hidden rounded-md border border-border bg-card",
|
|
33
|
+
"overflow-hidden rounded-md border border-[color:var(--mx-chat-border,hsl(var(--border)))] bg-[var(--mx-chat-card,hsl(var(--card)))]",
|
|
34
34
|
density === "full" ? "w-full max-w-2xl" : "w-fit max-w-full",
|
|
35
35
|
className
|
|
36
36
|
),
|
|
@@ -44,7 +44,7 @@ const ResultMedia = ({
|
|
|
44
44
|
rel: "noopener noreferrer",
|
|
45
45
|
onClick: (event) => event.stopPropagation(),
|
|
46
46
|
"aria-label": "View in Files",
|
|
47
|
-
className: "flex items-center justify-center gap-1.5 border-t border-border px-2 py-1.5 text-xs font-medium text-muted-foreground hover:bg-accent hover:text-foreground",
|
|
47
|
+
className: "flex items-center justify-center gap-1.5 border-t border-[color:var(--mx-chat-border,hsl(var(--border)))] px-2 py-1.5 text-xs font-medium text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))] hover:bg-accent hover:text-[color:var(--mx-chat-text,hsl(var(--foreground)))]",
|
|
48
48
|
children: [
|
|
49
49
|
/* @__PURE__ */ jsx(ExternalLink, { className: "h-3.5 w-3.5", "aria-hidden": "true" }),
|
|
50
50
|
/* @__PURE__ */ jsx("span", { children: "Open" })
|
|
@@ -7,9 +7,9 @@ const ResultScalar = ({ value, type, className }) => {
|
|
|
7
7
|
return /* @__PURE__ */ jsx(Badge, { variant: value ? "success" : "neutral", className, children: value ? "Yes" : "No" });
|
|
8
8
|
}
|
|
9
9
|
if (type === "number") {
|
|
10
|
-
return /* @__PURE__ */ jsx("span", { className: cn("font-mono tabular-nums text-foreground", className), children: String(value) });
|
|
10
|
+
return /* @__PURE__ */ jsx("span", { className: cn("font-mono tabular-nums text-[color:var(--mx-chat-text,hsl(var(--foreground)))]", className), children: String(value) });
|
|
11
11
|
}
|
|
12
|
-
return /* @__PURE__ */ jsx("span", { className: cn("text-foreground break-words", className), children: String(value) });
|
|
12
|
+
return /* @__PURE__ */ jsx("span", { className: cn("text-[color:var(--mx-chat-text,hsl(var(--foreground)))] break-words", className), children: String(value) });
|
|
13
13
|
};
|
|
14
14
|
export {
|
|
15
15
|
ResultScalar
|
|
@@ -111,7 +111,7 @@ const Cell = ({
|
|
|
111
111
|
}) => {
|
|
112
112
|
const mediaElementHint = mediaElementHintForKey(fieldKey);
|
|
113
113
|
if (value === null || value === void 0) {
|
|
114
|
-
return /* @__PURE__ */ jsx("span", { className: "italic text-muted-foreground", children: "\u2014" });
|
|
114
|
+
return /* @__PURE__ */ jsx("span", { className: "italic text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", children: "\u2014" });
|
|
115
115
|
}
|
|
116
116
|
if (typeof value === "string" && detectResultShape(value, { embedMedia }).kind === "media") {
|
|
117
117
|
return /* @__PURE__ */ jsx(
|
|
@@ -150,7 +150,7 @@ const Cell = ({
|
|
|
150
150
|
return /* @__PURE__ */ jsx("span", { className: "flex flex-wrap gap-1", children: value.map((item, i) => /* @__PURE__ */ jsx(
|
|
151
151
|
"span",
|
|
152
152
|
{
|
|
153
|
-
className: "rounded bg-muted px-1 py-px text-[11px] leading-tight text-muted-foreground",
|
|
153
|
+
className: "rounded bg-[var(--mx-chat-fill,hsl(var(--muted)))] px-1 py-px text-[11px] leading-tight text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]",
|
|
154
154
|
children: String(item)
|
|
155
155
|
},
|
|
156
156
|
i
|
|
@@ -240,9 +240,9 @@ const ResultTable = ({
|
|
|
240
240
|
onChange: (e) => setFilter(e.target.value),
|
|
241
241
|
onClick: (e) => e.stopPropagation(),
|
|
242
242
|
placeholder: `Filter ${rows.length} rows\u2026`,
|
|
243
|
-
className: "h-9 w-full max-w-xs rounded-md border border-border bg-background px-3 text-base text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring sm:text-sm"
|
|
243
|
+
className: "h-9 w-full max-w-xs rounded-md border border-[color:var(--mx-chat-border,hsl(var(--border)))] bg-background px-3 text-base text-[color:var(--mx-chat-text,hsl(var(--foreground)))] placeholder:text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))] focus:outline-none focus:ring-2 focus:ring-ring sm:text-sm"
|
|
244
244
|
}
|
|
245
|
-
) : /* @__PURE__ */ jsxs("span", { className: "text-xs text-muted-foreground", children: [
|
|
245
|
+
) : /* @__PURE__ */ jsxs("span", { className: "text-xs text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", children: [
|
|
246
246
|
rows.length,
|
|
247
247
|
" ",
|
|
248
248
|
rows.length === 1 ? "row" : "rows"
|
|
@@ -255,7 +255,7 @@ const ResultTable = ({
|
|
|
255
255
|
"th",
|
|
256
256
|
{
|
|
257
257
|
className: cn(
|
|
258
|
-
"border-b border-border/60 px-2.5 py-1.5 text-left align-bottom text-[11px] font-medium text-muted-foreground",
|
|
258
|
+
"border-b border-border/60 px-2.5 py-1.5 text-left align-bottom text-[11px] font-medium text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]",
|
|
259
259
|
colIdx === 0 && MOBILE_TABLE_FROZEN_HEAD
|
|
260
260
|
),
|
|
261
261
|
children: /* @__PURE__ */ jsxs(
|
|
@@ -266,7 +266,7 @@ const ResultTable = ({
|
|
|
266
266
|
e.stopPropagation();
|
|
267
267
|
cycleSort(col.key);
|
|
268
268
|
},
|
|
269
|
-
className: "inline-flex items-center gap-1 hover:text-foreground",
|
|
269
|
+
className: "inline-flex items-center gap-1 hover:text-[color:var(--mx-chat-text,hsl(var(--foreground)))]",
|
|
270
270
|
title: `Sort by ${col.label}`,
|
|
271
271
|
children: [
|
|
272
272
|
/* @__PURE__ */ jsx("span", { className: "break-words", children: col.label }),
|
|
@@ -278,13 +278,13 @@ const ResultTable = ({
|
|
|
278
278
|
col.key
|
|
279
279
|
);
|
|
280
280
|
}),
|
|
281
|
-
collapseTechnicalColumns ? /* @__PURE__ */ jsx("th", { className: "border-b border-border/60 px-2.5 py-1.5 text-left align-bottom text-[11px] font-medium text-muted-foreground", children: "Details" }) : null
|
|
281
|
+
collapseTechnicalColumns ? /* @__PURE__ */ jsx("th", { className: "border-b border-border/60 px-2.5 py-1.5 text-left align-bottom text-[11px] font-medium text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", children: "Details" }) : null
|
|
282
282
|
] }) }),
|
|
283
283
|
/* @__PURE__ */ jsx("tbody", { children: shown.length === 0 ? /* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsx(
|
|
284
284
|
"td",
|
|
285
285
|
{
|
|
286
286
|
colSpan: visibleColumns.length + (collapseTechnicalColumns ? 1 : 0),
|
|
287
|
-
className: "px-3 py-4 text-center text-xs text-muted-foreground",
|
|
287
|
+
className: "px-3 py-4 text-center text-xs text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]",
|
|
288
288
|
children: "No rows match the filter"
|
|
289
289
|
}
|
|
290
290
|
) }) : shown.map((row, ri) => /* @__PURE__ */ jsxs("tr", { className: "border-b border-border/60 last:border-0 hover:bg-muted/30", children: [
|
|
@@ -292,7 +292,7 @@ const ResultTable = ({
|
|
|
292
292
|
"td",
|
|
293
293
|
{
|
|
294
294
|
className: cn(
|
|
295
|
-
"px-2.5 py-1.5 align-top text-foreground",
|
|
295
|
+
"px-2.5 py-1.5 align-top text-[color:var(--mx-chat-text,hsl(var(--foreground)))]",
|
|
296
296
|
colIdx === 0 && MOBILE_TABLE_FROZEN_CELL
|
|
297
297
|
),
|
|
298
298
|
children: /* @__PURE__ */ jsx(
|
|
@@ -307,7 +307,7 @@ const ResultTable = ({
|
|
|
307
307
|
},
|
|
308
308
|
col.key
|
|
309
309
|
)),
|
|
310
|
-
collapseTechnicalColumns ? /* @__PURE__ */ jsx("td", { className: "px-2.5 py-1.5 align-top text-foreground", children: /* @__PURE__ */ jsx(
|
|
310
|
+
collapseTechnicalColumns ? /* @__PURE__ */ jsx("td", { className: "px-2.5 py-1.5 align-top text-[color:var(--mx-chat-text,hsl(var(--foreground)))]", children: /* @__PURE__ */ jsx(
|
|
311
311
|
TechnicalDetailsCell,
|
|
312
312
|
{
|
|
313
313
|
row,
|
|
@@ -27,11 +27,11 @@ const InlineText = ({ value }) => {
|
|
|
27
27
|
const lines = value.split("\n");
|
|
28
28
|
const isLong = lines.length > INLINE_TEXT_LINES || value.length > 600;
|
|
29
29
|
if (!isLong) {
|
|
30
|
-
return /* @__PURE__ */ jsx("p", { className: "whitespace-pre-wrap break-words text-sm text-foreground", children: value });
|
|
30
|
+
return /* @__PURE__ */ jsx("p", { className: "whitespace-pre-wrap break-words text-sm text-[color:var(--mx-chat-text,hsl(var(--foreground)))]", children: value });
|
|
31
31
|
}
|
|
32
32
|
const shown = expanded ? value : lines.slice(0, INLINE_TEXT_LINES).join("\n");
|
|
33
33
|
return /* @__PURE__ */ jsxs("div", { children: [
|
|
34
|
-
/* @__PURE__ */ jsx("p", { className: "whitespace-pre-wrap break-words text-sm text-foreground", children: shown }),
|
|
34
|
+
/* @__PURE__ */ jsx("p", { className: "whitespace-pre-wrap break-words text-sm text-[color:var(--mx-chat-text,hsl(var(--foreground)))]", children: shown }),
|
|
35
35
|
/* @__PURE__ */ jsx(Button, { variant: "quiet", tone: "primary", onClick: (e) => {
|
|
36
36
|
e.stopPropagation();
|
|
37
37
|
setExpanded((v) => !v);
|
|
@@ -44,9 +44,9 @@ const ScalarList = ({ items, density }) => {
|
|
|
44
44
|
const shown = items.slice(0, cap);
|
|
45
45
|
const remaining = items.length - shown.length;
|
|
46
46
|
return /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
|
|
47
|
-
/* @__PURE__ */ jsx("ul", { className: "space-y-0.5", children: shown.map((item, i) => /* @__PURE__ */ jsxs("li", { className: "flex gap-2 text-sm text-foreground", children: [
|
|
48
|
-
/* @__PURE__ */ jsx("span", { className: "select-none text-muted-foreground", children: "\u2022" }),
|
|
49
|
-
/* @__PURE__ */ jsx("div", { className: "min-w-0 flex-1 break-words", children: typeof item === "string" && looksLikeMarkdown(item) ? /* @__PURE__ */ jsx(ResultMarkdown, { content: item, density }) : item === null ? /* @__PURE__ */ jsx("span", { className: "italic text-muted-foreground", children: "null" }) : String(item) })
|
|
47
|
+
/* @__PURE__ */ jsx("ul", { className: "space-y-0.5", children: shown.map((item, i) => /* @__PURE__ */ jsxs("li", { className: "flex gap-2 text-sm text-[color:var(--mx-chat-text,hsl(var(--foreground)))]", children: [
|
|
48
|
+
/* @__PURE__ */ jsx("span", { className: "select-none text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", children: "\u2022" }),
|
|
49
|
+
/* @__PURE__ */ jsx("div", { className: "min-w-0 flex-1 break-words", children: typeof item === "string" && looksLikeMarkdown(item) ? /* @__PURE__ */ jsx(ResultMarkdown, { content: item, density }) : item === null ? /* @__PURE__ */ jsx("span", { className: "italic text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", children: "null" }) : String(item) })
|
|
50
50
|
] }, i)) }),
|
|
51
51
|
remaining > 0 && /* @__PURE__ */ jsxs(Button, { variant: "quiet", tone: "primary", onClick: (e) => {
|
|
52
52
|
e.stopPropagation();
|
|
@@ -129,7 +129,7 @@ const ResultValue = ({
|
|
|
129
129
|
) : null
|
|
130
130
|
] });
|
|
131
131
|
case "text":
|
|
132
|
-
return shape.markdown ? /* @__PURE__ */ jsx(ResultMarkdown, { content: shape.value, density }) : density === "full" ? /* @__PURE__ */ jsx("p", { className: "whitespace-pre-wrap break-words text-sm text-foreground", children: shape.value }) : /* @__PURE__ */ jsx(InlineText, { value: shape.value });
|
|
132
|
+
return shape.markdown ? /* @__PURE__ */ jsx(ResultMarkdown, { content: shape.value, density }) : density === "full" ? /* @__PURE__ */ jsx("p", { className: "whitespace-pre-wrap break-words text-sm text-[color:var(--mx-chat-text,hsl(var(--foreground)))]", children: shape.value }) : /* @__PURE__ */ jsx(InlineText, { value: shape.value });
|
|
133
133
|
case "list":
|
|
134
134
|
return /* @__PURE__ */ jsx(ScalarList, { items: shape.items, density });
|
|
135
135
|
case "idList":
|
|
@@ -161,7 +161,7 @@ const ResultValue = ({
|
|
|
161
161
|
case "recordRef":
|
|
162
162
|
return /* @__PURE__ */ jsx(ResultRecordRef, { token: shape.token, id: shape.id, label: shape.label });
|
|
163
163
|
case "textWithRecordRefs":
|
|
164
|
-
return /* @__PURE__ */ jsx("p", { className: "whitespace-pre-wrap break-words text-sm text-foreground", children: shape.segments.map(
|
|
164
|
+
return /* @__PURE__ */ jsx("p", { className: "whitespace-pre-wrap break-words text-sm text-[color:var(--mx-chat-text,hsl(var(--foreground)))]", children: shape.segments.map(
|
|
165
165
|
(segment, index) => segment.type === "text" ? (
|
|
166
166
|
// Position is the identity: a deterministic split of one string.
|
|
167
167
|
/* @__PURE__ */ jsx(TextWithDoors, { text: segment.text }, `t${index}`)
|
|
@@ -28,9 +28,9 @@ const ShortId = ({
|
|
|
28
28
|
timer.current = setTimeout(() => setCopied(false), 1500);
|
|
29
29
|
});
|
|
30
30
|
};
|
|
31
|
-
const display = variant === "full" ? /* @__PURE__ */ jsx("span", { className: "break-all font-mono text-xs text-foreground", children: value }) : /* @__PURE__ */ jsxs("span", { className: "font-mono text-xs text-foreground", children: [
|
|
31
|
+
const display = variant === "full" ? /* @__PURE__ */ jsx("span", { className: "break-all font-mono text-xs text-[color:var(--mx-chat-text,hsl(var(--foreground)))]", children: value }) : /* @__PURE__ */ jsxs("span", { className: "font-mono text-xs text-[color:var(--mx-chat-text,hsl(var(--foreground)))]", children: [
|
|
32
32
|
value.slice(0, 8),
|
|
33
|
-
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: "\u2026" })
|
|
33
|
+
/* @__PURE__ */ jsx("span", { className: "text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", children: "\u2026" })
|
|
34
34
|
] });
|
|
35
35
|
return /* @__PURE__ */ jsxs(
|
|
36
36
|
"span",
|
|
@@ -74,7 +74,7 @@ const IdListChip = ({
|
|
|
74
74
|
"span",
|
|
75
75
|
{
|
|
76
76
|
className: cn(
|
|
77
|
-
"inline-flex items-center gap-1 text-xs text-muted-foreground",
|
|
77
|
+
"inline-flex items-center gap-1 text-xs text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]",
|
|
78
78
|
className
|
|
79
79
|
),
|
|
80
80
|
children: [
|
|
@@ -48,21 +48,21 @@ const ToolErrorCard = ({
|
|
|
48
48
|
className: cn(
|
|
49
49
|
// Calm, not alarming: a quiet bordered row, muted icon — NOT red.
|
|
50
50
|
// A tool error is a routine retry signal, not an app failure.
|
|
51
|
-
"flex items-center gap-2 rounded-md border border-border bg-muted/30 px-3 py-2",
|
|
51
|
+
"flex items-center gap-2 rounded-md border border-[color:var(--mx-chat-border,hsl(var(--border)))] bg-muted/30 px-3 py-2",
|
|
52
52
|
className
|
|
53
53
|
),
|
|
54
54
|
children: [
|
|
55
|
-
/* @__PURE__ */ jsx(Icon, { className: "h-3.5 w-3.5 flex-shrink-0 text-muted-foreground" }),
|
|
55
|
+
/* @__PURE__ */ jsx(Icon, { className: "h-3.5 w-3.5 flex-shrink-0 text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]" }),
|
|
56
56
|
/* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-1 items-baseline gap-2", children: [
|
|
57
57
|
/* @__PURE__ */ jsx(
|
|
58
58
|
"span",
|
|
59
59
|
{
|
|
60
|
-
className: "flex-shrink-0 text-xs font-medium text-foreground",
|
|
60
|
+
className: "flex-shrink-0 text-xs font-medium text-[color:var(--mx-chat-text,hsl(var(--foreground)))]",
|
|
61
61
|
title: routed?.tooltip,
|
|
62
62
|
children: label
|
|
63
63
|
}
|
|
64
64
|
),
|
|
65
|
-
detail && /* @__PURE__ */ jsx("span", { className: "min-w-0 truncate text-xs text-muted-foreground", children: detail })
|
|
65
|
+
detail && /* @__PURE__ */ jsx("span", { className: "min-w-0 truncate text-xs text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", children: detail })
|
|
66
66
|
] }),
|
|
67
67
|
onOpenOverlay && /* @__PURE__ */ jsx(Button, { variant: "quiet", onClick: (e) => {
|
|
68
68
|
e.stopPropagation();
|
|
@@ -47,16 +47,16 @@ const UrlChip = ({ url, label, className }) => {
|
|
|
47
47
|
onClick: (e) => e.stopPropagation(),
|
|
48
48
|
title: href,
|
|
49
49
|
className: cn(
|
|
50
|
-
"inline-flex max-w-full items-center gap-1.5 rounded-md border border-border bg-muted/50 px-2 py-1 text-xs text-foreground transition-colors hover:bg-accent",
|
|
50
|
+
"inline-flex max-w-full items-center gap-1.5 rounded-md border border-[color:var(--mx-chat-border,hsl(var(--border)))] bg-muted/50 px-2 py-1 text-xs text-[color:var(--mx-chat-text,hsl(var(--foreground)))] transition-colors hover:bg-accent",
|
|
51
51
|
className
|
|
52
52
|
),
|
|
53
53
|
children: [
|
|
54
54
|
favicon ? (
|
|
55
55
|
// eslint-disable-next-line @next/next/no-img-element -- tiny external favicon, not app media
|
|
56
56
|
/* @__PURE__ */ jsx("img", { src: favicon, alt: "", width: 14, height: 14, className: "h-3.5 w-3.5 flex-shrink-0 rounded-sm" })
|
|
57
|
-
) : /* @__PURE__ */ jsx(ExternalLink, { className: "h-3.5 w-3.5 flex-shrink-0 text-muted-foreground" }),
|
|
57
|
+
) : /* @__PURE__ */ jsx(ExternalLink, { className: "h-3.5 w-3.5 flex-shrink-0 text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]" }),
|
|
58
58
|
/* @__PURE__ */ jsx("span", { className: "truncate", children: label ?? derived }),
|
|
59
|
-
/* @__PURE__ */ jsx(ExternalLink, { className: "h-3 w-3 flex-shrink-0 text-muted-foreground opacity-60" })
|
|
59
|
+
/* @__PURE__ */ jsx(ExternalLink, { className: "h-3 w-3 flex-shrink-0 text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))] opacity-60" })
|
|
60
60
|
]
|
|
61
61
|
}
|
|
62
62
|
);
|
|
@@ -44,7 +44,7 @@ function SurfaceWriteDiff({
|
|
|
44
44
|
const language = diffLanguageOf(receipt);
|
|
45
45
|
const heavy = !!language && !isMobile || receipt.before.length + receipt.after.length > LARGE_INPUT_CHARS;
|
|
46
46
|
const canPreview = receipt.contentFormat === "markdown" || receipt.contentFormat === "text";
|
|
47
|
-
const slot = /* @__PURE__ */ jsxs("span", { className: "ml-1 inline-flex items-center gap-1.5 text-[11px] text-muted-foreground", children: [
|
|
47
|
+
const slot = /* @__PURE__ */ jsxs("span", { className: "ml-1 inline-flex items-center gap-1.5 text-[11px] text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", children: [
|
|
48
48
|
/* @__PURE__ */ jsx("span", { children: MODE_LABEL[receipt.mode] ?? "Changed" }),
|
|
49
49
|
receipt.truncated ? /* @__PURE__ */ jsx(
|
|
50
50
|
Badge,
|
|
@@ -62,7 +62,7 @@ function SurfaceWriteDiff({
|
|
|
62
62
|
"data-surface-write-diff": "",
|
|
63
63
|
"data-surface-write-mode": receipt.mode,
|
|
64
64
|
className: cn(
|
|
65
|
-
"w-full overflow-hidden rounded-lg border border-border/60 bg-card text-[13px]",
|
|
65
|
+
"w-full overflow-hidden rounded-lg border border-border/60 bg-[var(--mx-chat-card,hsl(var(--card)))] text-[13px]",
|
|
66
66
|
className
|
|
67
67
|
),
|
|
68
68
|
children: preview ? /* @__PURE__ */ jsxs("div", { children: [
|
|
@@ -159,7 +159,7 @@ function SurfaceWriteStress() {
|
|
|
159
159
|
return /* @__PURE__ */ jsxs("div", { className: "mx-auto flex h-full max-w-3xl flex-col gap-3 overflow-auto px-2 py-4", children: [
|
|
160
160
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
161
161
|
/* @__PURE__ */ jsx(Button, { variant: "primary", onClick: run, children: "Run 200 KB write" }),
|
|
162
|
-
/* @__PURE__ */ jsx("span", { className: "text-xs text-muted-foreground", children: "Streams 2 s, then the receipt lands (\u2248200 KB before and after)." })
|
|
162
|
+
/* @__PURE__ */ jsx("span", { className: "text-xs text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", children: "Streams 2 s, then the receipt lands (\u2248200 KB before and after)." })
|
|
163
163
|
] }),
|
|
164
164
|
/* @__PURE__ */ jsx("div", { ref: hostRef, "data-stress-host": "", children: entry ? /* @__PURE__ */ jsx(ToolCallVisualization, { entries: [entry], hasContent: true }) : null })
|
|
165
165
|
] });
|
|
@@ -53,7 +53,7 @@ const EntrySidebar = ({
|
|
|
53
53
|
onLoadMore
|
|
54
54
|
}) => {
|
|
55
55
|
return /* @__PURE__ */ jsxs("div", { className: "flex h-full flex-col overflow-hidden", children: [
|
|
56
|
-
conversationScopeAvailable && /* @__PURE__ */ jsx("div", { className: "flex-shrink-0 border-b border-border p-2", children: /* @__PURE__ */ jsxs(
|
|
56
|
+
conversationScopeAvailable && /* @__PURE__ */ jsx("div", { className: "flex-shrink-0 border-b border-[color:var(--mx-chat-border,hsl(var(--border)))] p-2", children: /* @__PURE__ */ jsxs(
|
|
57
57
|
ToggleGroup,
|
|
58
58
|
{
|
|
59
59
|
type: "single",
|
|
@@ -90,7 +90,7 @@ const EntrySidebar = ({
|
|
|
90
90
|
className: "m-2",
|
|
91
91
|
onRetry
|
|
92
92
|
}
|
|
93
|
-
) : entries.length === 0 ? /* @__PURE__ */ jsx("div", { className: "px-3 py-4 text-xs italic text-muted-foreground", children: loadingMore ? "Loading tool calls\u2026" : "No tool entries" }) : entries.map((entry, idx) => {
|
|
93
|
+
) : entries.length === 0 ? /* @__PURE__ */ jsx("div", { className: "px-3 py-4 text-xs italic text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", children: loadingMore ? "Loading tool calls\u2026" : "No tool entries" }) : entries.map((entry, idx) => {
|
|
94
94
|
const isActive = entry.callId === selectedCallId;
|
|
95
95
|
const label = getToolDisplayName(entry.toolName);
|
|
96
96
|
const isError = entry.status === "error";
|
|
@@ -103,7 +103,7 @@ const EntrySidebar = ({
|
|
|
103
103
|
onClick: () => onSelect(entry.callId),
|
|
104
104
|
className: cn(
|
|
105
105
|
"mx-1 flex items-center gap-2 rounded-md border px-2 py-1.5 text-left text-xs transition-colors",
|
|
106
|
-
isActive ? "border-primary/30 bg-primary/10 text-foreground" : "border-transparent text-muted-foreground hover:bg-muted hover:text-foreground"
|
|
106
|
+
isActive ? "border-primary/30 bg-primary/10 text-[color:var(--mx-chat-text,hsl(var(--foreground)))]" : "border-transparent text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))] hover:bg-[var(--mx-chat-fill,hsl(var(--muted)))] hover:text-[color:var(--mx-chat-text,hsl(var(--foreground)))]"
|
|
107
107
|
),
|
|
108
108
|
title: `${label} \u2014 ${entry.status}`,
|
|
109
109
|
children: [
|
|
@@ -112,7 +112,7 @@ const EntrySidebar = ({
|
|
|
112
112
|
"."
|
|
113
113
|
] }),
|
|
114
114
|
/* @__PURE__ */ jsx("span", { className: "flex-1 truncate font-medium", children: label }),
|
|
115
|
-
/* @__PURE__ */ jsx("span", { className: "flex-shrink-0", children: isError ? /* @__PURE__ */ jsx(AlertTriangle, { className: "h-3 w-3 text-destructive" }) : isRunning ? /* @__PURE__ */ jsx(Loader2, { className: "h-3 w-3 animate-spin text-primary" }) : isComplete ? /* @__PURE__ */ jsx(CheckCircle, { className: "h-3 w-3 text-success" }) : /* @__PURE__ */ jsx("span", { className: "block h-2 w-2 rounded-full bg-muted-foreground/40" }) })
|
|
115
|
+
/* @__PURE__ */ jsx("span", { className: "flex-shrink-0", children: isError ? /* @__PURE__ */ jsx(AlertTriangle, { className: "h-3 w-3 text-destructive" }) : isRunning ? /* @__PURE__ */ jsx(Loader2, { className: "h-3 w-3 animate-spin text-[color:var(--mx-chat-accent,hsl(var(--primary)))]" }) : isComplete ? /* @__PURE__ */ jsx(CheckCircle, { className: "h-3 w-3 text-success" }) : /* @__PURE__ */ jsx("span", { className: "block h-2 w-2 rounded-full bg-muted-foreground/40" }) })
|
|
116
116
|
]
|
|
117
117
|
},
|
|
118
118
|
entry.callId
|
|
@@ -127,7 +127,7 @@ const EntrySidebar = ({
|
|
|
127
127
|
onRetry: hasMore ? onLoadMore : onRetry
|
|
128
128
|
}
|
|
129
129
|
),
|
|
130
|
-
scope === "conversation" && (hasMore || loadingMore) && /* @__PURE__ */ jsx("div", { className: "flex-shrink-0 border-t border-border p-1.5", children: /* @__PURE__ */ jsx(
|
|
130
|
+
scope === "conversation" && (hasMore || loadingMore) && /* @__PURE__ */ jsx("div", { className: "flex-shrink-0 border-t border-[color:var(--mx-chat-border,hsl(var(--border)))] p-1.5", children: /* @__PURE__ */ jsx(
|
|
131
131
|
Button,
|
|
132
132
|
{
|
|
133
133
|
variant: "quiet",
|
|
@@ -161,7 +161,7 @@ const ToolBrowserTabBar = ({ tabs, activeTabId, onTabClick }) => {
|
|
|
161
161
|
ref: scrollRef,
|
|
162
162
|
role: "tablist",
|
|
163
163
|
"aria-label": "Tool result views",
|
|
164
|
-
className: "flex h-[34px] min-h-[34px] shrink-0 items-stretch overflow-x-auto overflow-y-hidden border-b border-border bg-muted/40",
|
|
164
|
+
className: "flex h-[34px] min-h-[34px] shrink-0 items-stretch overflow-x-auto overflow-y-hidden border-b border-[color:var(--mx-chat-border,hsl(var(--border)))] bg-muted/40",
|
|
165
165
|
style: { scrollbarWidth: "none" },
|
|
166
166
|
children: [
|
|
167
167
|
tabs.map((tab) => {
|
|
@@ -174,8 +174,8 @@ const ToolBrowserTabBar = ({ tabs, activeTabId, onTabClick }) => {
|
|
|
174
174
|
"data-active": isActive,
|
|
175
175
|
onClick: () => onTabClick(tab.id),
|
|
176
176
|
className: cn(
|
|
177
|
-
"relative flex h-full shrink-0 cursor-pointer select-none items-center gap-1.5 border-r border-border px-3 transition-colors",
|
|
178
|
-
isActive ? "bg-background text-foreground" : "bg-transparent text-muted-foreground hover:bg-muted/60 hover:text-foreground"
|
|
177
|
+
"relative flex h-full shrink-0 cursor-pointer select-none items-center gap-1.5 border-r border-[color:var(--mx-chat-border,hsl(var(--border)))] px-3 transition-colors",
|
|
178
|
+
isActive ? "bg-background text-[color:var(--mx-chat-text,hsl(var(--foreground)))]" : "bg-transparent text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))] hover:bg-muted/60 hover:text-[color:var(--mx-chat-text,hsl(var(--foreground)))]"
|
|
179
179
|
),
|
|
180
180
|
children: [
|
|
181
181
|
isActive && /* @__PURE__ */ jsx("span", { className: "absolute inset-x-0 top-0 h-[2px] bg-primary" }),
|
|
@@ -352,7 +352,7 @@ const ToolCallWindowPanelBody = ({
|
|
|
352
352
|
what: "this conversation's tool calls",
|
|
353
353
|
onRetry: retryConversationEntries
|
|
354
354
|
}
|
|
355
|
-
) : /* @__PURE__ */ jsx("div", { className: "p-8 text-center text-muted-foreground", children: /* @__PURE__ */ jsx("p", { className: "text-sm", children: "No tool data available" }) });
|
|
355
|
+
) : /* @__PURE__ */ jsx("div", { className: "p-8 text-center text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", children: /* @__PURE__ */ jsx("p", { className: "text-sm", children: "No tool data available" }) });
|
|
356
356
|
const adminTabs = [
|
|
357
357
|
{
|
|
358
358
|
id: "input",
|
|
@@ -955,6 +955,7 @@ declare const definitionTable: (supabase: Client) => import("@supabase/supabase-
|
|
|
955
955
|
last_seen_revision: string | null;
|
|
956
956
|
last_seen_scan_id: string | null;
|
|
957
957
|
line: number | null;
|
|
958
|
+
line_end: number | null;
|
|
958
959
|
mandate_id: string | null;
|
|
959
960
|
mandate_key: string;
|
|
960
961
|
metadata: Json;
|
|
@@ -997,6 +998,7 @@ declare const definitionTable: (supabase: Client) => import("@supabase/supabase-
|
|
|
997
998
|
last_seen_revision?: string | null;
|
|
998
999
|
last_seen_scan_id?: string | null;
|
|
999
1000
|
line?: number | null;
|
|
1001
|
+
line_end?: number | null;
|
|
1000
1002
|
mandate_id?: string | null;
|
|
1001
1003
|
mandate_key: string;
|
|
1002
1004
|
metadata?: Json;
|
|
@@ -1039,6 +1041,7 @@ declare const definitionTable: (supabase: Client) => import("@supabase/supabase-
|
|
|
1039
1041
|
last_seen_revision?: string | null;
|
|
1040
1042
|
last_seen_scan_id?: string | null;
|
|
1041
1043
|
line?: number | null;
|
|
1044
|
+
line_end?: number | null;
|
|
1042
1045
|
mandate_id?: string | null;
|
|
1043
1046
|
mandate_key?: string;
|
|
1044
1047
|
metadata?: Json;
|
|
@@ -1833,6 +1836,12 @@ declare const definitionTable: (supabase: Client) => import("@supabase/supabase-
|
|
|
1833
1836
|
};
|
|
1834
1837
|
Returns: boolean;
|
|
1835
1838
|
};
|
|
1839
|
+
code_locations: {
|
|
1840
|
+
Args: {
|
|
1841
|
+
p_keys?: string[];
|
|
1842
|
+
};
|
|
1843
|
+
Returns: Json;
|
|
1844
|
+
};
|
|
1836
1845
|
definition_restore: {
|
|
1837
1846
|
Args: {
|
|
1838
1847
|
p_mandate_id: string;
|
|
@@ -3108,6 +3117,7 @@ declare const provisionTable: (supabase: Client) => import("@supabase/supabase-j
|
|
|
3108
3117
|
last_seen_revision: string | null;
|
|
3109
3118
|
last_seen_scan_id: string | null;
|
|
3110
3119
|
line: number | null;
|
|
3120
|
+
line_end: number | null;
|
|
3111
3121
|
mandate_id: string | null;
|
|
3112
3122
|
mandate_key: string;
|
|
3113
3123
|
metadata: Json;
|
|
@@ -3150,6 +3160,7 @@ declare const provisionTable: (supabase: Client) => import("@supabase/supabase-j
|
|
|
3150
3160
|
last_seen_revision?: string | null;
|
|
3151
3161
|
last_seen_scan_id?: string | null;
|
|
3152
3162
|
line?: number | null;
|
|
3163
|
+
line_end?: number | null;
|
|
3153
3164
|
mandate_id?: string | null;
|
|
3154
3165
|
mandate_key: string;
|
|
3155
3166
|
metadata?: Json;
|
|
@@ -3192,6 +3203,7 @@ declare const provisionTable: (supabase: Client) => import("@supabase/supabase-j
|
|
|
3192
3203
|
last_seen_revision?: string | null;
|
|
3193
3204
|
last_seen_scan_id?: string | null;
|
|
3194
3205
|
line?: number | null;
|
|
3206
|
+
line_end?: number | null;
|
|
3195
3207
|
mandate_id?: string | null;
|
|
3196
3208
|
mandate_key?: string;
|
|
3197
3209
|
metadata?: Json;
|
|
@@ -3986,6 +3998,12 @@ declare const provisionTable: (supabase: Client) => import("@supabase/supabase-j
|
|
|
3986
3998
|
};
|
|
3987
3999
|
Returns: boolean;
|
|
3988
4000
|
};
|
|
4001
|
+
code_locations: {
|
|
4002
|
+
Args: {
|
|
4003
|
+
p_keys?: string[];
|
|
4004
|
+
};
|
|
4005
|
+
Returns: Json;
|
|
4006
|
+
};
|
|
3989
4007
|
definition_restore: {
|
|
3990
4008
|
Args: {
|
|
3991
4009
|
p_mandate_id: string;
|
|
@@ -5156,6 +5174,7 @@ declare const bindingTable: (supabase: Client) => import("@supabase/supabase-js"
|
|
|
5156
5174
|
last_seen_revision: string | null;
|
|
5157
5175
|
last_seen_scan_id: string | null;
|
|
5158
5176
|
line: number | null;
|
|
5177
|
+
line_end: number | null;
|
|
5159
5178
|
mandate_id: string | null;
|
|
5160
5179
|
mandate_key: string;
|
|
5161
5180
|
metadata: Json;
|
|
@@ -5198,6 +5217,7 @@ declare const bindingTable: (supabase: Client) => import("@supabase/supabase-js"
|
|
|
5198
5217
|
last_seen_revision?: string | null;
|
|
5199
5218
|
last_seen_scan_id?: string | null;
|
|
5200
5219
|
line?: number | null;
|
|
5220
|
+
line_end?: number | null;
|
|
5201
5221
|
mandate_id?: string | null;
|
|
5202
5222
|
mandate_key: string;
|
|
5203
5223
|
metadata?: Json;
|
|
@@ -5240,6 +5260,7 @@ declare const bindingTable: (supabase: Client) => import("@supabase/supabase-js"
|
|
|
5240
5260
|
last_seen_revision?: string | null;
|
|
5241
5261
|
last_seen_scan_id?: string | null;
|
|
5242
5262
|
line?: number | null;
|
|
5263
|
+
line_end?: number | null;
|
|
5243
5264
|
mandate_id?: string | null;
|
|
5244
5265
|
mandate_key?: string;
|
|
5245
5266
|
metadata?: Json;
|
|
@@ -6034,6 +6055,12 @@ declare const bindingTable: (supabase: Client) => import("@supabase/supabase-js"
|
|
|
6034
6055
|
};
|
|
6035
6056
|
Returns: boolean;
|
|
6036
6057
|
};
|
|
6058
|
+
code_locations: {
|
|
6059
|
+
Args: {
|
|
6060
|
+
p_keys?: string[];
|
|
6061
|
+
};
|
|
6062
|
+
Returns: Json;
|
|
6063
|
+
};
|
|
6037
6064
|
definition_restore: {
|
|
6038
6065
|
Args: {
|
|
6039
6066
|
p_mandate_id: string;
|
|
@@ -7252,6 +7279,7 @@ declare const treatmentTable: (supabase: Client) => import("@supabase/supabase-j
|
|
|
7252
7279
|
last_seen_revision: string | null;
|
|
7253
7280
|
last_seen_scan_id: string | null;
|
|
7254
7281
|
line: number | null;
|
|
7282
|
+
line_end: number | null;
|
|
7255
7283
|
mandate_id: string | null;
|
|
7256
7284
|
mandate_key: string;
|
|
7257
7285
|
metadata: Json;
|
|
@@ -7294,6 +7322,7 @@ declare const treatmentTable: (supabase: Client) => import("@supabase/supabase-j
|
|
|
7294
7322
|
last_seen_revision?: string | null;
|
|
7295
7323
|
last_seen_scan_id?: string | null;
|
|
7296
7324
|
line?: number | null;
|
|
7325
|
+
line_end?: number | null;
|
|
7297
7326
|
mandate_id?: string | null;
|
|
7298
7327
|
mandate_key: string;
|
|
7299
7328
|
metadata?: Json;
|
|
@@ -7336,6 +7365,7 @@ declare const treatmentTable: (supabase: Client) => import("@supabase/supabase-j
|
|
|
7336
7365
|
last_seen_revision?: string | null;
|
|
7337
7366
|
last_seen_scan_id?: string | null;
|
|
7338
7367
|
line?: number | null;
|
|
7368
|
+
line_end?: number | null;
|
|
7339
7369
|
mandate_id?: string | null;
|
|
7340
7370
|
mandate_key?: string;
|
|
7341
7371
|
metadata?: Json;
|
|
@@ -8130,6 +8160,12 @@ declare const treatmentTable: (supabase: Client) => import("@supabase/supabase-j
|
|
|
8130
8160
|
};
|
|
8131
8161
|
Returns: boolean;
|
|
8132
8162
|
};
|
|
8163
|
+
code_locations: {
|
|
8164
|
+
Args: {
|
|
8165
|
+
p_keys?: string[];
|
|
8166
|
+
};
|
|
8167
|
+
Returns: Json;
|
|
8168
|
+
};
|
|
8133
8169
|
definition_restore: {
|
|
8134
8170
|
Args: {
|
|
8135
8171
|
p_mandate_id: string;
|
|
@@ -5185,6 +5185,7 @@ declare const mandateContextMenuView: (supabase: Client) => import("@supabase/su
|
|
|
5185
5185
|
last_seen_revision: string | null;
|
|
5186
5186
|
last_seen_scan_id: string | null;
|
|
5187
5187
|
line: number | null;
|
|
5188
|
+
line_end: number | null;
|
|
5188
5189
|
mandate_id: string | null;
|
|
5189
5190
|
mandate_key: string;
|
|
5190
5191
|
metadata: import("@ai-matrx/data/types").Json;
|
|
@@ -5227,6 +5228,7 @@ declare const mandateContextMenuView: (supabase: Client) => import("@supabase/su
|
|
|
5227
5228
|
last_seen_revision?: string | null;
|
|
5228
5229
|
last_seen_scan_id?: string | null;
|
|
5229
5230
|
line?: number | null;
|
|
5231
|
+
line_end?: number | null;
|
|
5230
5232
|
mandate_id?: string | null;
|
|
5231
5233
|
mandate_key: string;
|
|
5232
5234
|
metadata?: import("@ai-matrx/data/types").Json;
|
|
@@ -5269,6 +5271,7 @@ declare const mandateContextMenuView: (supabase: Client) => import("@supabase/su
|
|
|
5269
5271
|
last_seen_revision?: string | null;
|
|
5270
5272
|
last_seen_scan_id?: string | null;
|
|
5271
5273
|
line?: number | null;
|
|
5274
|
+
line_end?: number | null;
|
|
5272
5275
|
mandate_id?: string | null;
|
|
5273
5276
|
mandate_key?: string;
|
|
5274
5277
|
metadata?: import("@ai-matrx/data/types").Json;
|
|
@@ -6063,6 +6066,12 @@ declare const mandateContextMenuView: (supabase: Client) => import("@supabase/su
|
|
|
6063
6066
|
};
|
|
6064
6067
|
Returns: boolean;
|
|
6065
6068
|
};
|
|
6069
|
+
code_locations: {
|
|
6070
|
+
Args: {
|
|
6071
|
+
p_keys?: string[];
|
|
6072
|
+
};
|
|
6073
|
+
Returns: import("@ai-matrx/data/types").Json;
|
|
6074
|
+
};
|
|
6066
6075
|
definition_restore: {
|
|
6067
6076
|
Args: {
|
|
6068
6077
|
p_mandate_id: string;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { mergeThinkingAcrossHidden } from "./merge-thinking-across-hidden.js";
|
|
3
4
|
import { useState, useEffect, useLayoutEffect, useMemo, useCallback, useRef } from "react";
|
|
4
5
|
import { cn } from "@ai-matrx/design-system";
|
|
5
6
|
import { WIDE_FIGURE_HOST_CLASS, WIDE_FIGURE_PROSE_CLIP_CLASS } from "../../agents/components/shared/assistant-message-layout.js";
|
|
@@ -370,6 +371,18 @@ const EnhancedChatMarkdownInternal = ({
|
|
|
370
371
|
);
|
|
371
372
|
const isSettled = !isStreamActive;
|
|
372
373
|
const workGroupedSlots = useMemo(() => {
|
|
374
|
+
if (!machineFramesVisible) {
|
|
375
|
+
return mergeThinkingAcrossHidden(groupedSlots, {
|
|
376
|
+
isThinking: (slot) => slot.kind === "thinking",
|
|
377
|
+
isHidden: (slot) => {
|
|
378
|
+
if (slot.kind === "tool_batch") return true;
|
|
379
|
+
if (slot.kind !== "tool") return false;
|
|
380
|
+
const status = toolLifecycleMap?.[slot.callId]?.status;
|
|
381
|
+
return status === "completed" || status === "error";
|
|
382
|
+
},
|
|
383
|
+
merge: (first, next) => first.kind === "thinking" && next.kind === "thinking" ? next.chunkEndIndex === void 0 ? { kind: "thinking", chunkStartIndex: first.chunkStartIndex, seq: first.seq, ...first.timelineIndex !== void 0 ? { timelineIndex: first.timelineIndex } : {} } : { ...first, chunkEndIndex: next.chunkEndIndex } : first
|
|
384
|
+
});
|
|
385
|
+
}
|
|
373
386
|
if (!isSettled) return groupedSlots;
|
|
374
387
|
if (messageId && !settledFromRecord) return groupedSlots;
|
|
375
388
|
if (!machineFramesVisible) return groupedSlots;
|
|
@@ -412,6 +425,15 @@ const EnhancedChatMarkdownInternal = ({
|
|
|
412
425
|
machineFramesVisible
|
|
413
426
|
]);
|
|
414
427
|
const workGroupedSegments = useMemo(() => {
|
|
428
|
+
if (!machineFramesVisible) {
|
|
429
|
+
return mergeThinkingAcrossHidden(groupedSegments, {
|
|
430
|
+
isThinking: (seg) => seg.type === "thinking",
|
|
431
|
+
isHidden: (seg) => seg.type === "db_tool" || seg.type === "db_tool_batch",
|
|
432
|
+
merge: (first, next) => first.type === "thinking" && next.type === "thinking" ? { ...first, content: `${first.content}
|
|
433
|
+
|
|
434
|
+
${next.content}` } : first
|
|
435
|
+
});
|
|
436
|
+
}
|
|
415
437
|
if (!isSettled) return groupedSegments;
|
|
416
438
|
if (!machineFramesVisible) return groupedSegments;
|
|
417
439
|
const dbToolSpan = (seg) => toolSpan(seg.record?.startedAt, seg.record?.completedAt);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { Fragment, jsx } from "react/jsx-runtime";
|
|
3
3
|
import { RichContentHostGate } from "@ai-matrx/rich-content/host";
|
|
4
|
-
import {
|
|
4
|
+
import { StreamTextFallback } from "./StreamTextFallback.js";
|
|
5
5
|
import { MarkdownErrorBoundary } from "@ai-matrx/rich-content/display/chat-markdown/internal-handlers/MarkdownErrorBoundary";
|
|
6
6
|
import { StreamAwareChatMarkdown } from "./StreamAwareChatMarkdown.js";
|
|
7
7
|
import { BlockRenderingProvider } from "@ai-matrx/rich-content/display/chat-markdown/BlockRenderingContext";
|
|
@@ -37,11 +37,11 @@ const MarkdownStreamImpl = ({
|
|
|
37
37
|
const rendered = /* @__PURE__ */ jsx(
|
|
38
38
|
RichContentHostGate,
|
|
39
39
|
{
|
|
40
|
-
fallback: /* @__PURE__ */ jsx(
|
|
40
|
+
fallback: /* @__PURE__ */ jsx(StreamTextFallback, { content, requestId, className }),
|
|
41
41
|
children: /* @__PURE__ */ jsx(BlockRenderingProvider, { strictServerData, children: /* @__PURE__ */ jsx(
|
|
42
42
|
MarkdownErrorBoundary,
|
|
43
43
|
{
|
|
44
|
-
fallback: /* @__PURE__ */ jsx(
|
|
44
|
+
fallback: /* @__PURE__ */ jsx(StreamTextFallback, { content, requestId, className }),
|
|
45
45
|
onError: (error, errorInfo) => {
|
|
46
46
|
console.error(
|
|
47
47
|
"[MarkdownStream] Top-level error boundary caught:",
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import React from "react";
|
|
4
|
+
import { PlainTextFallback } from "@ai-matrx/rich-content/display/chat-markdown/internal-handlers/PlainTextFallback";
|
|
5
|
+
import { useAppSelector } from "../../store/hooks.js";
|
|
6
|
+
import { selectAnswerText } from "../../agents/redux/execution-system/active-requests/active-requests.selectors.js";
|
|
7
|
+
const selectNoText = () => "";
|
|
8
|
+
function StreamTextFallback({
|
|
9
|
+
content,
|
|
10
|
+
requestId,
|
|
11
|
+
className
|
|
12
|
+
}) {
|
|
13
|
+
const selector = React.useMemo(() => requestId ? selectAnswerText(requestId) : selectNoText, [requestId]);
|
|
14
|
+
const requestText = useAppSelector(selector);
|
|
15
|
+
const text = content.trim() ? content : requestText;
|
|
16
|
+
if (!text.trim() && requestId) {
|
|
17
|
+
return /* @__PURE__ */ jsx(PlainTextFallback, { content: "Loading\u2026", className });
|
|
18
|
+
}
|
|
19
|
+
return /* @__PURE__ */ jsx(PlainTextFallback, { content: text, className });
|
|
20
|
+
}
|
|
21
|
+
export {
|
|
22
|
+
StreamTextFallback
|
|
23
|
+
};
|