@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
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# @ai-matrx/chat
|
|
2
2
|
|
|
3
|
+
## 0.7.7
|
|
4
|
+
### Unreleased
|
|
5
|
+
|
|
6
|
+
- **`continueAgentJson`** (`agents/redux/execution-system/thunks/continue-agent-json`): the NEXT turn of a
|
|
7
|
+
conversation whose first turn ran headlessly, waited on like the first (`adoptHeadlessAgentJson`). A turn is
|
|
8
|
+
the person's words (`userInput`) or a turn the HOST writes (`hostTurn` — sent as `host_turn`, never
|
|
9
|
+
`user_input`); per-turn structured content rides `context` (`null` removes a key). A conversation not in the
|
|
10
|
+
tab yet is read first. `executeInstance` takes `hostTurn` (continuations only; the empty-turn rule lets it
|
|
11
|
+
through). Lane F6b: the Applet builder's build, fix rounds, changes and replies are one conversation. Test:
|
|
12
|
+
`a-host-turn-continues-the-conversation.test.ts`. **Consumer action:** none.
|
|
13
|
+
- `MarkdownStream`'s stand-in (shown while the app's lazy rich-content host loads, and after a render error)
|
|
14
|
+
reads the request's own answer text when no `content` was passed, and says "Loading…" while it has none —
|
|
15
|
+
it used to print "No content available" over a finished answer, so an Applet run read "Done — No content
|
|
16
|
+
available" on a slow network (lane F8, live Applet audit 2026-10-09). `StreamTextFallback`. Test:
|
|
17
|
+
`the-fallback-never-hides-a-finished-answer.test.tsx` (red on the old stand-in). **Consumer action:** none.
|
|
18
|
+
- Where machine frames are hidden (an Expert, an Applet visitor), thinking runs separated only by settled
|
|
19
|
+
tool calls render as ONE thinking block — live slots and reloaded segments alike
|
|
20
|
+
(`mergeThinkingAcrossHidden`). A research run used to stack ~40 identical "Thought process" rows above the
|
|
21
|
+
answer (live Applet audit, 2026-10-09). Test: `merge-thinking-across-hidden.test.ts`.
|
|
22
|
+
- `LiveRunDisplay` takes `errorText`: the host's own sentence for a failed run, shown instead of the
|
|
23
|
+
request's (an Applet shows visitors a plain sentence; the server's words stay in the error inspector).
|
|
24
|
+
**Consumer action:** none required; Applet hosts pass it.
|
|
25
|
+
|
|
3
26
|
## 0.7.6
|
|
4
27
|
### Unreleased
|
|
5
28
|
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { callApi } from "../../host/server/call-api.js";
|
|
2
|
+
import { callConversationApi } from "../redux/execution-system/thunks/call-conversation-api.js";
|
|
2
3
|
const inFlightConversationReads = /* @__PURE__ */ new Map();
|
|
3
4
|
function readConversationPendingCalls(conversationId, dispatch) {
|
|
4
5
|
const joined = inFlightConversationReads.get(conversationId);
|
|
5
6
|
if (joined) return joined;
|
|
6
7
|
const tracked = dispatch(
|
|
7
|
-
|
|
8
|
+
// THE CONVERSATION DOOR: the turn's own server, credential and organization.
|
|
9
|
+
callConversationApi(conversationId, {
|
|
8
10
|
path: "/ai/conversation/{conversation_id}/pending_calls",
|
|
9
|
-
method: "GET"
|
|
10
|
-
pathParams: { conversation_id: conversationId }
|
|
11
|
+
method: "GET"
|
|
11
12
|
})
|
|
12
13
|
).finally(() => {
|
|
13
14
|
if (inFlightConversationReads.get(conversationId) === tracked) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { selectHostConversation } from "../redux/execution-system/host-conversations/host-conversations.selectors.js";
|
|
2
2
|
import { answerHostAsk } from "../redux/execution-system/host-conversations/host-conversation.thunks.js";
|
|
3
|
-
import {
|
|
3
|
+
import { callConversationApi } from "../redux/execution-system/thunks/call-conversation-api.js";
|
|
4
4
|
import { toast } from "../../host/notify.js";
|
|
5
5
|
import { formatDurationMs } from "@ai-matrx/kit/format";
|
|
6
6
|
import { setInstanceStatus } from "../redux/execution-system/conversations/conversations.slice.js";
|
|
@@ -92,17 +92,14 @@ function isRetryableError(err) {
|
|
|
92
92
|
function postToolResults(conversationId, results) {
|
|
93
93
|
return async (dispatch, getState) => {
|
|
94
94
|
const callIds = results.map((r) => r.call_id).join(", ");
|
|
95
|
-
const conversationOrganizationId = getState().conversations?.byConversationId?.[conversationId]?.organizationId ?? void 0;
|
|
96
95
|
let lastError = null;
|
|
97
96
|
for (let attempt = 0; attempt <= MAX_RETRIES; attempt++) {
|
|
98
97
|
try {
|
|
99
98
|
const result = await dispatch(
|
|
100
|
-
|
|
99
|
+
callConversationApi(conversationId, {
|
|
101
100
|
path: "/ai/conversations/{conversation_id}/tool_results",
|
|
102
101
|
method: "POST",
|
|
103
|
-
|
|
104
|
-
body: { results },
|
|
105
|
-
scopeOverrides: conversationOrganizationId ? { organization_id: conversationOrganizationId } : void 0
|
|
102
|
+
body: { results }
|
|
106
103
|
})
|
|
107
104
|
);
|
|
108
105
|
if (result.error) {
|
|
@@ -8,6 +8,7 @@ import {
|
|
|
8
8
|
stageDraftHandoff
|
|
9
9
|
} from "../../redux/chat/chat-route.slice.js";
|
|
10
10
|
import { DEFAULT_NEW_CHAT_MANDATE_KEY } from "./chat-quick-actions.config.js";
|
|
11
|
+
import { selectIsAuthenticated } from "../../../host/identity.js";
|
|
11
12
|
function parseChatPath(pathname) {
|
|
12
13
|
const agentMatch = pathname.match(/^\/chat\/a\/([^/]+)/);
|
|
13
14
|
if (agentMatch) {
|
|
@@ -116,8 +117,7 @@ async function beginFreshChat({
|
|
|
116
117
|
}) {
|
|
117
118
|
const state = getState();
|
|
118
119
|
let defaultAgentId = null;
|
|
119
|
-
|
|
120
|
-
if (auth && auth.id !== null && !auth.isAnonymous) {
|
|
120
|
+
if (selectIsAuthenticated(state)) {
|
|
121
121
|
try {
|
|
122
122
|
defaultAgentId = await resolveDefaultAgentBounded();
|
|
123
123
|
} catch (error) {
|
|
@@ -15,6 +15,7 @@ import { useSessionKnob } from "../../../../../host/prefs-react.js";
|
|
|
15
15
|
import { cn } from "@ai-matrx/design-system";
|
|
16
16
|
import { COMPOSER_KNOBS } from "./composer-mode-cookie.js";
|
|
17
17
|
import { Button } from "@ai-matrx/design-system/controls";
|
|
18
|
+
import { selectOrganizationId } from "../../../../../host/org.js";
|
|
18
19
|
function timeOfDayGreeting(hour) {
|
|
19
20
|
if (hour < 5) return "Evening";
|
|
20
21
|
if (hour < 12) return "Morning";
|
|
@@ -69,9 +70,7 @@ function ComposerQuickActions({
|
|
|
69
70
|
className
|
|
70
71
|
}) {
|
|
71
72
|
const knob = useSessionKnob(COMPOSER_KNOBS.quickActions);
|
|
72
|
-
const organizationId = useAppSelector(
|
|
73
|
-
(state) => state.appContext?.organization_id ?? null
|
|
74
|
-
);
|
|
73
|
+
const organizationId = useAppSelector(selectOrganizationId);
|
|
75
74
|
const actions = parseQuickActions(knob);
|
|
76
75
|
const quickActionKeys = actions.map((a) => a.mandateKey);
|
|
77
76
|
const mandates = useMandateSet(quickActionKeys, {
|
|
@@ -13,13 +13,15 @@ import {
|
|
|
13
13
|
readComposerModeCookieClient,
|
|
14
14
|
writeComposerModeCookie
|
|
15
15
|
} from "./composer-mode-cookie.js";
|
|
16
|
+
import { selectUserId } from "../../../../../host/identity.js";
|
|
17
|
+
import { selectOrganizationId } from "../../../../../host/org.js";
|
|
16
18
|
let knobsAppliedThisTab = false;
|
|
17
19
|
let choseModeThisTab = false;
|
|
18
20
|
function useComposerMode(initialMode, { enabled = true } = {}) {
|
|
19
21
|
const dispatch = useAppDispatch();
|
|
20
22
|
const stored = useAppSelector(selectComposerMode);
|
|
21
|
-
const organizationId = useAppSelector(
|
|
22
|
-
const userId = useAppSelector(
|
|
23
|
+
const organizationId = useAppSelector(selectOrganizationId);
|
|
24
|
+
const userId = useAppSelector(selectUserId);
|
|
23
25
|
const knobOrganization = enabled ? organizationId : null;
|
|
24
26
|
const defaultModeKnob = useEffectiveKnob(knobOrganization, userId, COMPOSER_KNOBS.defaultMode);
|
|
25
27
|
const rememberKnob = useEffectiveKnob(knobOrganization, userId, COMPOSER_KNOBS.rememberLastMode);
|
|
@@ -25,6 +25,12 @@ export interface LiveRunDisplayProps {
|
|
|
25
25
|
* so a refused launch never reads as a run still on its way.
|
|
26
26
|
*/
|
|
27
27
|
failure?: string | null;
|
|
28
|
+
/**
|
|
29
|
+
* The host's own sentence for a failed run, shown INSTEAD of the request's. A host whose viewers did not
|
|
30
|
+
* build the agent (an Applet's visitors) shows a plain sentence; the server's words stay in the error
|
|
31
|
+
* inspector (Applet audit 2026-10-09).
|
|
32
|
+
*/
|
|
33
|
+
errorText?: string | null;
|
|
28
34
|
/** Renders a dismiss (X) affordance; caller tears the run down. */
|
|
29
35
|
onDismiss?: () => void;
|
|
30
36
|
className?: string;
|
|
@@ -42,4 +48,4 @@ export interface LiveRunDisplayProps {
|
|
|
42
48
|
*/
|
|
43
49
|
variant?: "card" | "bare";
|
|
44
50
|
}
|
|
45
|
-
export declare function LiveRunDisplay({ conversationId, requestId: requestIdProp, label, pending, failure, onDismiss, className, bodyClassName, variant, }: LiveRunDisplayProps): import("react").JSX.Element | null;
|
|
51
|
+
export declare function LiveRunDisplay({ conversationId, requestId: requestIdProp, label, pending, failure, errorText, onDismiss, className, bodyClassName, variant, }: LiveRunDisplayProps): import("react").JSX.Element | null;
|
|
@@ -21,6 +21,7 @@ function LiveRunDisplay({
|
|
|
21
21
|
label,
|
|
22
22
|
pending = false,
|
|
23
23
|
failure = null,
|
|
24
|
+
errorText = null,
|
|
24
25
|
onDismiss,
|
|
25
26
|
className,
|
|
26
27
|
bodyClassName,
|
|
@@ -32,7 +33,8 @@ function LiveRunDisplay({
|
|
|
32
33
|
pending && !failure
|
|
33
34
|
);
|
|
34
35
|
const { requestId, isActive, statusText, chunkCount } = status;
|
|
35
|
-
const
|
|
36
|
+
const rawError = status.errorMessage ?? (failure || null);
|
|
37
|
+
const errorMessage = rawError && errorText ? errorText : rawError;
|
|
36
38
|
const conversationMessages = useAppSelector(
|
|
37
39
|
conversationId ? selectConversationMessages(conversationId) : selectNoConversationMessages
|
|
38
40
|
);
|
|
@@ -399,7 +399,7 @@ function AgentConversationDisplay({
|
|
|
399
399
|
visibleGroups.map(
|
|
400
400
|
(group, index) => wrapGroup(group, index, renderGroupBody(group))
|
|
401
401
|
),
|
|
402
|
-
pinnedOnly && visibleGroups.length === 0 && /* @__PURE__ */ jsxs("div", { className: "py-10 text-center text-sm text-muted-foreground", children: [
|
|
402
|
+
pinnedOnly && visibleGroups.length === 0 && /* @__PURE__ */ jsxs("div", { className: "py-10 text-center text-sm text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", children: [
|
|
403
403
|
"Nothing pinned in this conversation.",
|
|
404
404
|
" ",
|
|
405
405
|
/* @__PURE__ */ jsx(Button, { variant: "quiet", tone: "primary", onClick: () => setPinnedOnly(false), children: "Show all messages" })
|
|
@@ -40,7 +40,7 @@ function AgentEmptyMessageDisplay({
|
|
|
40
40
|
if (isLongDescription && displayDescription) {
|
|
41
41
|
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col h-full justify-start text-left px-6 py-8 max-w-3xl mx-auto w-full", children: [
|
|
42
42
|
/* @__PURE__ */ jsx(RichContent, { level: "full", imagePolicy: "other", source: displayDescription, hideCopyButton: true }),
|
|
43
|
-
instruction && /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground mt-3", children: instruction })
|
|
43
|
+
instruction && /* @__PURE__ */ jsx("p", { className: "text-sm text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))] mt-3", children: instruction })
|
|
44
44
|
] });
|
|
45
45
|
}
|
|
46
46
|
return (
|
|
@@ -53,14 +53,14 @@ function AgentEmptyMessageDisplay({
|
|
|
53
53
|
IconResolver,
|
|
54
54
|
{
|
|
55
55
|
iconName: iconNameOverride,
|
|
56
|
-
className: "w-12 h-12 text-primary",
|
|
56
|
+
className: "w-12 h-12 text-[color:var(--mx-chat-accent,hsl(var(--primary)))]",
|
|
57
57
|
fallbackIcon: "Webhook"
|
|
58
58
|
}
|
|
59
|
-
) : /* @__PURE__ */ jsx(Webhook, { className: "w-12 h-12 text-primary" }) }),
|
|
59
|
+
) : /* @__PURE__ */ jsx(Webhook, { className: "w-12 h-12 text-[color:var(--mx-chat-accent,hsl(var(--primary)))]" }) }),
|
|
60
60
|
/* @__PURE__ */ jsxs("div", { className: "space-y-3 mx-auto", children: [
|
|
61
61
|
/* @__PURE__ */ jsx("p", { className: "text-lg font-medium", children: displayName ?? "Ready to run" }),
|
|
62
62
|
displayDescription && /* @__PURE__ */ jsx(RichContent, { level: "full", imagePolicy: "other", source: displayDescription, hideCopyButton: true }),
|
|
63
|
-
instruction && /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground mt-1", children: instruction })
|
|
63
|
+
instruction && /* @__PURE__ */ jsx("p", { className: "text-sm text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))] mt-1", children: instruction })
|
|
64
64
|
] })
|
|
65
65
|
] })
|
|
66
66
|
);
|
|
@@ -11,7 +11,7 @@ function AssistantNoAnswer({
|
|
|
11
11
|
const isAdmin = useAppSelector(selectIsSuperAdmin);
|
|
12
12
|
return /* @__PURE__ */ jsxs("div", { className: "mt-1 text-xs", "data-assistant-no-answer": true, children: [
|
|
13
13
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-x-2.5 gap-y-1", children: [
|
|
14
|
-
/* @__PURE__ */ jsxs("span", { className: "inline-flex items-center gap-1.5 text-muted-foreground", children: [
|
|
14
|
+
/* @__PURE__ */ jsxs("span", { className: "inline-flex items-center gap-1.5 text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", children: [
|
|
15
15
|
/* @__PURE__ */ jsx(CircleSlash, { className: "h-3.5 w-3.5 shrink-0" }),
|
|
16
16
|
"This run finished without writing an answer."
|
|
17
17
|
] }),
|
|
@@ -5,7 +5,7 @@ function BreathingOrb({ className, size = 28 }) {
|
|
|
5
5
|
return /* @__PURE__ */ jsx(
|
|
6
6
|
"output",
|
|
7
7
|
{
|
|
8
|
-
className: cn("inline-flex items-center text-primary", className),
|
|
8
|
+
className: cn("inline-flex items-center text-[color:var(--mx-chat-accent,hsl(var(--primary)))]", className),
|
|
9
9
|
"aria-label": "Working",
|
|
10
10
|
children: /* @__PURE__ */ jsxs(
|
|
11
11
|
"svg",
|
|
@@ -37,7 +37,7 @@ function InPlaceAnswerEditor({ conversationId, messageId, startExpanded = false
|
|
|
37
37
|
};
|
|
38
38
|
}, [conversationId, messageId, dispatch]);
|
|
39
39
|
if (openedOn === null) {
|
|
40
|
-
return /* @__PURE__ */ jsxs("div", { className: "flex min-h-40 items-center justify-center gap-2 rounded-lg border border-border text-sm text-muted-foreground", children: [
|
|
40
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex min-h-40 items-center justify-center gap-2 rounded-lg border border-[color:var(--mx-chat-border,hsl(var(--border)))] text-sm text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", children: [
|
|
41
41
|
/* @__PURE__ */ jsx(Loader2, { className: "h-4 w-4 animate-spin" }),
|
|
42
42
|
" Opening the answer\u2026"
|
|
43
43
|
] });
|
|
@@ -15,7 +15,7 @@ function MessageSourcesRow({
|
|
|
15
15
|
const openSource = useOpenCitationSource();
|
|
16
16
|
if (sources.length === 0) return null;
|
|
17
17
|
return /* @__PURE__ */ jsxs("div", { className: cn("flex flex-col gap-1", className), children: [
|
|
18
|
-
/* @__PURE__ */ jsx("span", { className: "text-xs font-medium text-muted-foreground", children: "Sources" }),
|
|
18
|
+
/* @__PURE__ */ jsx("span", { className: "text-xs font-medium text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", children: "Sources" }),
|
|
19
19
|
/* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-1", children: sources.map((source) => {
|
|
20
20
|
const label = citationSourceLabel(source);
|
|
21
21
|
const openable = citationSourceIsOpenable(source);
|
|
@@ -80,13 +80,13 @@ function ConversationFindBar({
|
|
|
80
80
|
return /* @__PURE__ */ jsxs(
|
|
81
81
|
"div",
|
|
82
82
|
{
|
|
83
|
-
className: "flex items-center gap-1 rounded-lg border border-border bg-card px-2 py-1 shadow-sm",
|
|
83
|
+
className: "flex items-center gap-1 rounded-lg border border-[color:var(--mx-chat-border,hsl(var(--border)))] bg-[var(--mx-chat-card,hsl(var(--card)))] px-2 py-1 shadow-sm",
|
|
84
84
|
role: "search",
|
|
85
85
|
"aria-label": "Find in this conversation",
|
|
86
86
|
"data-find-ignore": "",
|
|
87
87
|
children: [
|
|
88
88
|
/* @__PURE__ */ jsx("style", { children: HIGHLIGHT_CSS }),
|
|
89
|
-
/* @__PURE__ */ jsx(Search, { className: "h-3.5 w-3.5 shrink-0 text-muted-foreground", "aria-hidden": "true" }),
|
|
89
|
+
/* @__PURE__ */ jsx(Search, { className: "h-3.5 w-3.5 shrink-0 text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", "aria-hidden": "true" }),
|
|
90
90
|
/* @__PURE__ */ jsx(
|
|
91
91
|
"input",
|
|
92
92
|
{
|
|
@@ -107,7 +107,7 @@ function ConversationFindBar({
|
|
|
107
107
|
},
|
|
108
108
|
placeholder: "Find in conversation",
|
|
109
109
|
"aria-label": "Find in conversation",
|
|
110
|
-
className: "min-w-0 flex-1 bg-transparent text-base outline-none placeholder:text-muted-foreground md:text-sm"
|
|
110
|
+
className: "min-w-0 flex-1 bg-transparent text-base outline-none placeholder:text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))] md:text-sm"
|
|
111
111
|
}
|
|
112
112
|
),
|
|
113
113
|
/* @__PURE__ */ jsx(
|
|
@@ -115,7 +115,7 @@ function ConversationFindBar({
|
|
|
115
115
|
{
|
|
116
116
|
className: cn(
|
|
117
117
|
"min-w-0 max-w-[55%] truncate text-xs tabular-nums",
|
|
118
|
-
ranges.length === 0 && query.trim() && history.state !== "loading" && settled ? "text-destructive" : "text-muted-foreground"
|
|
118
|
+
ranges.length === 0 && query.trim() && history.state !== "loading" && settled ? "text-destructive" : "text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]"
|
|
119
119
|
),
|
|
120
120
|
"aria-live": "polite",
|
|
121
121
|
title: status,
|
|
@@ -69,7 +69,7 @@ function HistoryEntryCard({
|
|
|
69
69
|
const truncated = preview.length > 400 ? `${preview.slice(0, 400)}\u2026` : preview || "(empty)";
|
|
70
70
|
const savedAt = new Date(entry.saved_at);
|
|
71
71
|
const versionLabel = total > 1 ? `Version ${total - index}` : "Previous version";
|
|
72
|
-
return /* @__PURE__ */ jsxs("div", { className: "border border-border rounded-md overflow-hidden bg-card", children: [
|
|
72
|
+
return /* @__PURE__ */ jsxs("div", { className: "border border-[color:var(--mx-chat-border,hsl(var(--border)))] rounded-md overflow-hidden bg-[var(--mx-chat-card,hsl(var(--card)))]", children: [
|
|
73
73
|
/* @__PURE__ */ jsxs(
|
|
74
74
|
"button",
|
|
75
75
|
{
|
|
@@ -78,22 +78,22 @@ function HistoryEntryCard({
|
|
|
78
78
|
onClick: () => setExpanded(!expanded),
|
|
79
79
|
children: [
|
|
80
80
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 min-w-0", children: [
|
|
81
|
-
/* @__PURE__ */ jsx(Clock, { className: "w-3.5 h-3.5 text-muted-foreground flex-shrink-0" }),
|
|
81
|
+
/* @__PURE__ */ jsx(Clock, { className: "w-3.5 h-3.5 text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))] flex-shrink-0" }),
|
|
82
82
|
/* @__PURE__ */ jsxs("div", { className: "min-w-0 flex flex-col", children: [
|
|
83
|
-
/* @__PURE__ */ jsx("span", { className: "text-xs font-medium text-foreground", children: versionLabel }),
|
|
84
|
-
/* @__PURE__ */ jsx("span", { className: "text-[10px] text-muted-foreground", children: savedAt.toLocaleString() })
|
|
83
|
+
/* @__PURE__ */ jsx("span", { className: "text-xs font-medium text-[color:var(--mx-chat-text,hsl(var(--foreground)))]", children: versionLabel }),
|
|
84
|
+
/* @__PURE__ */ jsx("span", { className: "text-[10px] text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", children: savedAt.toLocaleString() })
|
|
85
85
|
] })
|
|
86
86
|
] }),
|
|
87
87
|
/* @__PURE__ */ jsx(
|
|
88
88
|
ChevronRight,
|
|
89
89
|
{
|
|
90
|
-
className: `w-3.5 h-3.5 text-muted-foreground transition-transform ${expanded ? "rotate-90" : ""}`
|
|
90
|
+
className: `w-3.5 h-3.5 text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))] transition-transform ${expanded ? "rotate-90" : ""}`
|
|
91
91
|
}
|
|
92
92
|
)
|
|
93
93
|
]
|
|
94
94
|
}
|
|
95
95
|
),
|
|
96
|
-
expanded && /* @__PURE__ */ jsxs("div", { className: "px-3 pb-3 border-t border-border", children: [
|
|
96
|
+
expanded && /* @__PURE__ */ jsxs("div", { className: "px-3 pb-3 border-t border-[color:var(--mx-chat-border,hsl(var(--border)))]", children: [
|
|
97
97
|
/* @__PURE__ */ jsx("div", { className: "mt-2 text-xs text-foreground/80 whitespace-pre-wrap leading-relaxed max-h-48 overflow-y-auto bg-muted/30 rounded p-2 font-mono", children: truncated }),
|
|
98
98
|
/* @__PURE__ */ jsxs("div", { className: "mt-2 flex justify-end gap-2", children: [
|
|
99
99
|
/* @__PURE__ */ jsx(
|
|
@@ -177,7 +177,7 @@ function HistoryContent({
|
|
|
177
177
|
}
|
|
178
178
|
};
|
|
179
179
|
if (ordered.length === 0) {
|
|
180
|
-
return /* @__PURE__ */ jsx("div", { className: "py-8 text-center text-sm text-muted-foreground", children: "No edit history yet. Inline edits and saves will appear here." });
|
|
180
|
+
return /* @__PURE__ */ jsx("div", { className: "py-8 text-center text-sm text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", children: "No edit history yet. Inline edits and saves will appear here." });
|
|
181
181
|
}
|
|
182
182
|
return /* @__PURE__ */ jsx(ScrollArea, { className: "max-h-[60dvh]", children: /* @__PURE__ */ jsx("div", { className: "space-y-2 p-1", children: ordered.map((entry, i) => /* @__PURE__ */ jsx(
|
|
183
183
|
HistoryEntryCard,
|
|
@@ -80,7 +80,7 @@ function AgentUserMessageContent({
|
|
|
80
80
|
imagePolicy: "other",
|
|
81
81
|
content: literalUserText(trimmedText),
|
|
82
82
|
serverProcessedBlocks: hasBodyBlocks ? bodyBlocks : void 0,
|
|
83
|
-
className: "text-xs text-foreground",
|
|
83
|
+
className: "text-xs text-[color:var(--mx-chat-text,hsl(var(--foreground)))]",
|
|
84
84
|
hideCopyButton: true,
|
|
85
85
|
allowFullScreenEditor: false
|
|
86
86
|
}
|
|
@@ -245,7 +245,7 @@ function AgentUserMessage({
|
|
|
245
245
|
{
|
|
246
246
|
className: cn("group relative", compact ? "" : "ml-12"),
|
|
247
247
|
"data-testid": "user-message-empty",
|
|
248
|
-
children: /* @__PURE__ */ jsxs("div", { className: "rounded-lg border border-dashed border-border bg-muted/40 px-3 py-2 text-xs text-muted-foreground", children: [
|
|
248
|
+
children: /* @__PURE__ */ jsxs("div", { className: "rounded-lg border border-dashed border-[color:var(--mx-chat-border,hsl(var(--border)))] bg-muted/40 px-3 py-2 text-xs text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", children: [
|
|
249
249
|
"This message has no displayable text.",
|
|
250
250
|
isSuperAdmin && /* @__PURE__ */ jsxs("span", { className: "ml-1 font-mono", children: [
|
|
251
251
|
"[",
|
|
@@ -294,8 +294,8 @@ function AgentUserMessage({
|
|
|
294
294
|
{
|
|
295
295
|
className: compactUserMessage ? (
|
|
296
296
|
// Tight: no inset from the left, and the markdown paragraph's own margins dropped.
|
|
297
|
-
"bg-muted rounded-md px-3 py-2 [&_.math-content-wrapper]:my-0 [&_p:last-child]:mb-0"
|
|
298
|
-
) : "bg-muted border border-border rounded-lg px-2 py-2",
|
|
297
|
+
"bg-[var(--mx-chat-fill,hsl(var(--muted)))] rounded-md px-3 py-2 [&_.math-content-wrapper]:my-0 [&_p:last-child]:mb-0"
|
|
298
|
+
) : "bg-[var(--mx-chat-fill,hsl(var(--muted)))] border border-[color:var(--mx-chat-border,hsl(var(--border)))] rounded-lg px-2 py-2",
|
|
299
299
|
"data-user-message-style": compactUserMessage ? "compact" : "card",
|
|
300
300
|
children: /* @__PURE__ */ jsxs("div", { className: "relative min-w-0", children: [
|
|
301
301
|
/* @__PURE__ */ jsxs(
|
|
@@ -37,11 +37,11 @@ function CollabNoteMessage({
|
|
|
37
37
|
children: [
|
|
38
38
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5 border-b border-violet-500/15 px-2.5 py-1.5", children: [
|
|
39
39
|
/* @__PURE__ */ jsx(Handshake, { className: "h-3.5 w-3.5 shrink-0 text-violet-600 dark:text-violet-400" }),
|
|
40
|
-
/* @__PURE__ */ jsxs("span", { className: "text-xs font-medium text-foreground", children: [
|
|
40
|
+
/* @__PURE__ */ jsxs("span", { className: "text-xs font-medium text-[color:var(--mx-chat-text,hsl(var(--foreground)))]", children: [
|
|
41
41
|
"Collaboration note",
|
|
42
42
|
agentName ? ` \u2014 ${agentName}` : ""
|
|
43
43
|
] }),
|
|
44
|
-
/* @__PURE__ */ jsx("span", { className: "text-[11px] text-muted-foreground", children: "left after reviewing this conversation" })
|
|
44
|
+
/* @__PURE__ */ jsx("span", { className: "text-[11px] text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", children: "left after reviewing this conversation" })
|
|
45
45
|
] }),
|
|
46
46
|
/* @__PURE__ */ jsx("div", { className: "px-2.5 py-2 text-sm", children: /* @__PURE__ */ jsx(BasicMarkdownContent, { imagePolicy: "ai", content: body, showCopyButton: false }) })
|
|
47
47
|
]
|
|
@@ -35,7 +35,7 @@ function UserMessageVariables({
|
|
|
35
35
|
{
|
|
36
36
|
className: "text-xs leading-snug text-foreground/90",
|
|
37
37
|
children: [
|
|
38
|
-
/* @__PURE__ */ jsxs("span", { className: "font-medium text-foreground", children: [
|
|
38
|
+
/* @__PURE__ */ jsxs("span", { className: "font-medium text-[color:var(--mx-chat-text,hsl(var(--foreground)))]", children: [
|
|
39
39
|
l.label,
|
|
40
40
|
":"
|
|
41
41
|
] }),
|
|
@@ -84,14 +84,14 @@ function FirstTurnLaunchInputs({
|
|
|
84
84
|
},
|
|
85
85
|
"aria-expanded": open,
|
|
86
86
|
title: open ? "Hide the inputs" : "Show the inputs this run started with",
|
|
87
|
-
className: "flex flex-wrap items-center gap-1 rounded text-left text-xs text-muted-foreground hover:text-foreground",
|
|
87
|
+
className: "flex flex-wrap items-center gap-1 rounded text-left text-xs text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))] hover:text-[color:var(--mx-chat-text,hsl(var(--foreground)))]",
|
|
88
88
|
children: [
|
|
89
89
|
/* @__PURE__ */ jsx(Chevron, { className: "h-3 w-3 shrink-0" }),
|
|
90
90
|
/* @__PURE__ */ jsx("span", { className: "font-medium", children: "Started with:" }),
|
|
91
91
|
lines.map((l) => /* @__PURE__ */ jsx(
|
|
92
92
|
"span",
|
|
93
93
|
{
|
|
94
|
-
className: "rounded-full border border-border bg-background px-1.5 py-px text-xs text-foreground",
|
|
94
|
+
className: "rounded-full border border-[color:var(--mx-chat-border,hsl(var(--border)))] bg-background px-1.5 py-px text-xs text-[color:var(--mx-chat-text,hsl(var(--foreground)))]",
|
|
95
95
|
children: l.label
|
|
96
96
|
},
|
|
97
97
|
l.key
|
|
@@ -48,7 +48,7 @@ function PendingSendMessage({
|
|
|
48
48
|
{
|
|
49
49
|
className: cn(
|
|
50
50
|
"w-full rounded-lg border px-3 py-2 text-sm whitespace-pre-wrap break-words",
|
|
51
|
-
failed ? "border-destructive/40 bg-destructive/5 text-foreground" : "border-border bg-muted text-foreground/80"
|
|
51
|
+
failed ? "border-destructive/40 bg-destructive/5 text-[color:var(--mx-chat-text,hsl(var(--foreground)))]" : "border-[color:var(--mx-chat-border,hsl(var(--border)))] bg-[var(--mx-chat-fill,hsl(var(--muted)))] text-foreground/80"
|
|
52
52
|
),
|
|
53
53
|
children: preSend.text || "(no text)"
|
|
54
54
|
}
|
|
@@ -59,7 +59,7 @@ function PendingSendMessage({
|
|
|
59
59
|
/* @__PURE__ */ jsxs("span", { children: [
|
|
60
60
|
preSend.error ?? "This message could not be prepared. Nothing was sent.",
|
|
61
61
|
" ",
|
|
62
|
-
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: "Your text is still in the box below." })
|
|
62
|
+
/* @__PURE__ */ jsx("span", { className: "text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", children: "Your text is still in the box below." })
|
|
63
63
|
] })
|
|
64
64
|
] }),
|
|
65
65
|
/* @__PURE__ */ jsxs(
|
|
@@ -83,13 +83,13 @@ function PendingSendMessage({
|
|
|
83
83
|
{
|
|
84
84
|
size: "sm",
|
|
85
85
|
variant: "ghost",
|
|
86
|
-
className: "h-7 gap-1 px-2 text-xs text-muted-foreground",
|
|
86
|
+
className: "h-7 gap-1 px-2 text-xs text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]",
|
|
87
87
|
"aria-label": "Dismiss",
|
|
88
88
|
onClick: () => dispatch(setPreSend({ conversationId, preSend: null })),
|
|
89
89
|
children: /* @__PURE__ */ jsx(X, { className: "h-3 w-3" })
|
|
90
90
|
}
|
|
91
91
|
)
|
|
92
|
-
] }) : /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5 text-xs text-muted-foreground", children: [
|
|
92
|
+
] }) : /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5 text-xs text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", children: [
|
|
93
93
|
/* @__PURE__ */ jsx(Loader2, { className: "h-3 w-3 animate-spin" }),
|
|
94
94
|
/* @__PURE__ */ jsxs("span", { children: [
|
|
95
95
|
preSend.label,
|
|
@@ -51,7 +51,7 @@ function readRows(payload) {
|
|
|
51
51
|
function RemarkDiff({ diff }) {
|
|
52
52
|
const parts = splitRemarkDiff(diff);
|
|
53
53
|
if (!parts) {
|
|
54
|
-
return /* @__PURE__ */ jsx("pre", { className: "overflow-x-auto whitespace-pre-wrap font-mono text-[11px] text-foreground", children: diff });
|
|
54
|
+
return /* @__PURE__ */ jsx("pre", { className: "overflow-x-auto whitespace-pre-wrap font-mono text-[11px] text-[color:var(--mx-chat-text,hsl(var(--foreground)))]", children: diff });
|
|
55
55
|
}
|
|
56
56
|
return /* @__PURE__ */ jsx("div", { className: "text-[11px] leading-snug", "data-remark-diff": true, children: /* @__PURE__ */ jsx(InlineTextDiff, { view: "inline", original: parts.before, modified: parts.after }) });
|
|
57
57
|
}
|
|
@@ -60,14 +60,14 @@ function RemarksTranscriptView({ payload }) {
|
|
|
60
60
|
if (rows.length === 0) return null;
|
|
61
61
|
return /* @__PURE__ */ jsx("div", { className: "my-1 grid gap-1", children: rows.map((row, i) => {
|
|
62
62
|
const { icon: Icon, label } = remarkKindDisplay(row.kind);
|
|
63
|
-
return /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 items-start gap-1.5 rounded-md border border-border bg-card px-2 py-1 text-xs", "data-remark-handle": row.handle ?? void 0, children: [
|
|
63
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 items-start gap-1.5 rounded-md border border-[color:var(--mx-chat-border,hsl(var(--border)))] bg-[var(--mx-chat-card,hsl(var(--card)))] px-2 py-1 text-xs", "data-remark-handle": row.handle ?? void 0, children: [
|
|
64
64
|
/* @__PURE__ */ jsx(Icon, { className: "mt-0.5 h-3.5 w-3.5 shrink-0 text-amber-600 dark:text-amber-400", "aria-label": label }),
|
|
65
65
|
/* @__PURE__ */ jsxs("div", { className: "grid min-w-0 gap-0.5", children: [
|
|
66
|
-
row.quote || row.title ? /* @__PURE__ */ jsx("div", { className: "truncate border-l-2 border-primary/40 pl-1.5 text-muted-foreground", children: row.quote ?? row.title }) : null,
|
|
67
|
-
row.body ? /* @__PURE__ */ jsx("div", { className: "whitespace-pre-wrap text-foreground", children: row.body }) : null,
|
|
66
|
+
row.quote || row.title ? /* @__PURE__ */ jsx("div", { className: "truncate border-l-2 border-primary/40 pl-1.5 text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", children: row.quote ?? row.title }) : null,
|
|
67
|
+
row.body ? /* @__PURE__ */ jsx("div", { className: "whitespace-pre-wrap text-[color:var(--mx-chat-text,hsl(var(--foreground)))]", children: row.body }) : null,
|
|
68
68
|
row.diff ? /* @__PURE__ */ jsx(RemarkDiff, { diff: row.diff }) : null,
|
|
69
|
-
row.answers.length ? /* @__PURE__ */ jsx("ul", { className: "grid gap-0.5 text-foreground", children: row.answers.map((a, j) => /* @__PURE__ */ jsxs("li", { className: "truncate", children: [
|
|
70
|
-
/* @__PURE__ */ jsxs("span", { className: "text-muted-foreground", children: [
|
|
69
|
+
row.answers.length ? /* @__PURE__ */ jsx("ul", { className: "grid gap-0.5 text-[color:var(--mx-chat-text,hsl(var(--foreground)))]", children: row.answers.map((a, j) => /* @__PURE__ */ jsxs("li", { className: "truncate", children: [
|
|
70
|
+
/* @__PURE__ */ jsxs("span", { className: "text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", children: [
|
|
71
71
|
a.question,
|
|
72
72
|
":"
|
|
73
73
|
] }),
|
|
@@ -75,7 +75,7 @@ function RemarksTranscriptView({ payload }) {
|
|
|
75
75
|
a.answer
|
|
76
76
|
] }, j)) }) : null
|
|
77
77
|
] }),
|
|
78
|
-
row.handle ? /* @__PURE__ */ jsx("span", { className: "ml-auto shrink-0 font-mono text-[10px] text-muted-foreground", title: `Remark ${row.handle}`, children: row.handle }) : null
|
|
78
|
+
row.handle ? /* @__PURE__ */ jsx("span", { className: "ml-auto shrink-0 font-mono text-[10px] text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", title: `Remark ${row.handle}`, children: row.handle }) : null
|
|
79
79
|
] }, i);
|
|
80
80
|
}) });
|
|
81
81
|
}
|
|
@@ -134,7 +134,7 @@ function ResourceAttachmentTile({
|
|
|
134
134
|
}
|
|
135
135
|
) }),
|
|
136
136
|
/* @__PURE__ */ jsxs(TooltipContent, { side: "top", className: "max-w-[16rem]", children: [
|
|
137
|
-
/* @__PURE__ */ jsx("div", { className: "text-[10px] uppercase tracking-wide text-muted-foreground", children: typeLabel }),
|
|
137
|
+
/* @__PURE__ */ jsx("div", { className: "text-[10px] uppercase tracking-wide text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", children: typeLabel }),
|
|
138
138
|
/* @__PURE__ */ jsx("div", { className: "font-medium text-popover-foreground", children: title }),
|
|
139
139
|
showToggle && /* @__PURE__ */ jsx("div", { className: "mt-0.5 text-[10px] text-muted-foreground/80", children: editable ? "Agent can edit" : "Read-only to agent" })
|
|
140
140
|
] })
|
|
@@ -143,8 +143,8 @@ function ResourceAttachmentTile({
|
|
|
143
143
|
) }),
|
|
144
144
|
hasControls ? /* @__PURE__ */ jsxs(PopoverContent, { sizing: "content", side: "top", align: "end", sideOffset: 6, className: "p-1", children: [
|
|
145
145
|
/* @__PURE__ */ jsxs("div", { className: "px-2 py-1.5", children: [
|
|
146
|
-
/* @__PURE__ */ jsx("p", { className: "truncate text-xs font-semibold text-foreground", children: title }),
|
|
147
|
-
/* @__PURE__ */ jsx("p", { className: "text-[10px] uppercase tracking-wide text-muted-foreground", children: typeLabel })
|
|
146
|
+
/* @__PURE__ */ jsx("p", { className: "truncate text-xs font-semibold text-[color:var(--mx-chat-text,hsl(var(--foreground)))]", children: title }),
|
|
147
|
+
/* @__PURE__ */ jsx("p", { className: "text-[10px] uppercase tracking-wide text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", children: typeLabel })
|
|
148
148
|
] }),
|
|
149
149
|
onClick ? /* @__PURE__ */ jsx(Tile, { variant: "quiet", icon: /* @__PURE__ */ jsx(ExternalLink, {}), title: "Open", onClick: (e) => {
|
|
150
150
|
stop(e);
|
|
@@ -203,9 +203,9 @@ function ResourceAttachmentTile({
|
|
|
203
203
|
) : error ? /* @__PURE__ */ jsx(AlertCircle, { className: "h-3.5 w-3.5 shrink-0 text-destructive" }) : createElement(Icon, {
|
|
204
204
|
className: cn("h-3.5 w-3.5 shrink-0", theme.icon)
|
|
205
205
|
}) }),
|
|
206
|
-
/* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 truncate whitespace-nowrap text-[9px] font-semibold leading-none text-muted-foreground uppercase tracking-wide", children: typeLabel })
|
|
206
|
+
/* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 truncate whitespace-nowrap text-[9px] font-semibold leading-none text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))] uppercase tracking-wide", children: typeLabel })
|
|
207
207
|
] }),
|
|
208
|
-
/* @__PURE__ */ jsx("span", { className: "block w-full min-w-0 truncate whitespace-nowrap text-[10px] leading-none text-foreground font-medium", children: title })
|
|
208
|
+
/* @__PURE__ */ jsx("span", { className: "block w-full min-w-0 truncate whitespace-nowrap text-[10px] leading-none text-[color:var(--mx-chat-text,hsl(var(--foreground)))] font-medium", children: title })
|
|
209
209
|
]
|
|
210
210
|
}
|
|
211
211
|
),
|
|
@@ -228,7 +228,7 @@ function ResourceAttachmentTile({
|
|
|
228
228
|
},
|
|
229
229
|
className: cn(
|
|
230
230
|
"inline-flex items-center justify-center rounded-full p-0.5",
|
|
231
|
-
"text-muted-foreground/80 hover:bg-black/10 hover:text-foreground",
|
|
231
|
+
"text-muted-foreground/80 hover:bg-black/10 hover:text-[color:var(--mx-chat-text,hsl(var(--foreground)))]",
|
|
232
232
|
"dark:hover:bg-white/10 transition-colors"
|
|
233
233
|
),
|
|
234
234
|
children: /* @__PURE__ */ jsx(X, { className: "h-2.5 w-2.5" })
|
|
@@ -252,7 +252,7 @@ function ResourceAttachmentTile({
|
|
|
252
252
|
toggleEditable();
|
|
253
253
|
}
|
|
254
254
|
},
|
|
255
|
-
className: "inline-flex items-center justify-center rounded-full p-0.5 text-foreground",
|
|
255
|
+
className: "inline-flex items-center justify-center rounded-full p-0.5 text-[color:var(--mx-chat-text,hsl(var(--foreground)))]",
|
|
256
256
|
children: editable ? /* @__PURE__ */ jsx(Pencil, { className: "h-2.5 w-2.5" }) : /* @__PURE__ */ jsx(Lock, { className: "h-2.5 w-2.5" })
|
|
257
257
|
}
|
|
258
258
|
) }),
|
|
@@ -272,8 +272,8 @@ function ResourceAttachmentTile({
|
|
|
272
272
|
className: "p-1",
|
|
273
273
|
children: [
|
|
274
274
|
/* @__PURE__ */ jsxs("div", { className: "px-2 py-1.5", children: [
|
|
275
|
-
/* @__PURE__ */ jsx("p", { className: "truncate text-xs font-semibold text-foreground", children: title }),
|
|
276
|
-
/* @__PURE__ */ jsx("p", { className: "text-[10px] uppercase tracking-wide text-muted-foreground", children: typeLabel })
|
|
275
|
+
/* @__PURE__ */ jsx("p", { className: "truncate text-xs font-semibold text-[color:var(--mx-chat-text,hsl(var(--foreground)))]", children: title }),
|
|
276
|
+
/* @__PURE__ */ jsx("p", { className: "text-[10px] uppercase tracking-wide text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]", children: typeLabel })
|
|
277
277
|
] }),
|
|
278
278
|
showToggle ? /* @__PURE__ */ jsx(Tile, { variant: "quiet", icon: editable ? /* @__PURE__ */ jsx(Lock, {}) : /* @__PURE__ */ jsx(Pencil, {}), title: editable ? "Make read-only" : "Allow agent editing", onClick: (e) => {
|
|
279
279
|
stop(e);
|
|
@@ -46,9 +46,9 @@ function ResourceEditableToggleSamples() {
|
|
|
46
46
|
}
|
|
47
47
|
}, [dispatch]);
|
|
48
48
|
return /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
|
|
49
|
-
/* @__PURE__ */ jsxs("div", { className: "space-y-1 border-b border-border pb-2", children: [
|
|
50
|
-
/* @__PURE__ */ jsx("h2", { className: "text-base font-semibold text-foreground", children: "All attachment chips together" }),
|
|
51
|
-
/* @__PURE__ */ jsxs("p", { className: "text-xs text-muted-foreground max-w-3xl", children: [
|
|
49
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-1 border-b border-[color:var(--mx-chat-border,hsl(var(--border)))] pb-2", children: [
|
|
50
|
+
/* @__PURE__ */ jsx("h2", { className: "text-base font-semibold text-[color:var(--mx-chat-text,hsl(var(--foreground)))]", children: "All attachment chips together" }),
|
|
51
|
+
/* @__PURE__ */ jsxs("p", { className: "text-xs text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))] max-w-3xl", children: [
|
|
52
52
|
"The real ",
|
|
53
53
|
/* @__PURE__ */ jsx("code", { className: "text-[10px]", children: "SmartAgentResourceChips" }),
|
|
54
54
|
" ",
|
|
@@ -59,7 +59,7 @@ function ResourceEditableToggleSamples() {
|
|
|
59
59
|
" when unlocked."
|
|
60
60
|
] })
|
|
61
61
|
] }),
|
|
62
|
-
/* @__PURE__ */ jsx("div", { className: "bg-muted border border-border rounded-lg py-2 max-w-3xl", children: /* @__PURE__ */ jsx(SmartAgentResourceChips, { conversationId: DEMO_CONV_ALL_RESOURCES }) })
|
|
62
|
+
/* @__PURE__ */ jsx("div", { className: "bg-[var(--mx-chat-fill,hsl(var(--muted)))] border border-[color:var(--mx-chat-border,hsl(var(--border)))] rounded-lg py-2 max-w-3xl", children: /* @__PURE__ */ jsx(SmartAgentResourceChips, { conversationId: DEMO_CONV_ALL_RESOURCES }) })
|
|
63
63
|
] });
|
|
64
64
|
}
|
|
65
65
|
export {
|
|
@@ -192,7 +192,7 @@ function UserActionBar({
|
|
|
192
192
|
{
|
|
193
193
|
onClick: handleEdit,
|
|
194
194
|
ariaLabel: "Edit message",
|
|
195
|
-
icon: /* @__PURE__ */ jsx(Edit, { className: "w-4 h-4 text-muted-foreground" })
|
|
195
|
+
icon: /* @__PURE__ */ jsx(Edit, { className: "w-4 h-4 text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]" })
|
|
196
196
|
}
|
|
197
197
|
),
|
|
198
198
|
/* @__PURE__ */ jsx(
|
|
@@ -209,7 +209,7 @@ function UserActionBar({
|
|
|
209
209
|
onClick: () => void togglePinnedMessage(messageId),
|
|
210
210
|
ariaLabel: pinPending ? isPinned ? "Unpinning\u2026" : "Pinning\u2026" : isPinned ? "Unpin message" : "Pin message",
|
|
211
211
|
disabled: pinPending,
|
|
212
|
-
icon: pinPending ? /* @__PURE__ */ jsx(Loader2, { className: "w-4 h-4 animate-spin text-muted-foreground" }) : isPinned ? /* @__PURE__ */ jsx(PinOff, { className: "w-4 h-4 text-amber-500 dark:text-amber-400" }) : /* @__PURE__ */ jsx(Pin, { className: "w-4 h-4 text-muted-foreground" })
|
|
212
|
+
icon: pinPending ? /* @__PURE__ */ jsx(Loader2, { className: "w-4 h-4 animate-spin text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]" }) : isPinned ? /* @__PURE__ */ jsx(PinOff, { className: "w-4 h-4 text-amber-500 dark:text-amber-400" }) : /* @__PURE__ */ jsx(Pin, { className: "w-4 h-4 text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]" })
|
|
213
213
|
}
|
|
214
214
|
),
|
|
215
215
|
showOptions && /* @__PURE__ */ jsx(
|
|
@@ -218,7 +218,7 @@ function UserActionBar({
|
|
|
218
218
|
ref: setMoreOptionsAnchor,
|
|
219
219
|
onClick: () => setShowOptionsMenu(true),
|
|
220
220
|
ariaLabel: "More options",
|
|
221
|
-
icon: /* @__PURE__ */ jsx(MoreHorizontal, { className: "w-4 h-4 text-muted-foreground" })
|
|
221
|
+
icon: /* @__PURE__ */ jsx(MoreHorizontal, { className: "w-4 h-4 text-[color:var(--mx-chat-text-secondary,hsl(var(--muted-foreground)))]" })
|
|
222
222
|
}
|
|
223
223
|
)
|
|
224
224
|
] }) : null
|