@ai-matrx/chat 0.4.2 → 0.4.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (141) hide show
  1. package/CHANGELOG.md +54 -0
  2. package/dist/agent-copy/RichCopySplit.d.ts +17 -0
  3. package/dist/agent-copy/RichCopySplit.js +34 -0
  4. package/dist/agents/components/agent-widgets/chat-assistant/AssistantMessageCard.js +1 -1
  5. package/dist/agents/components/chat/ConversationRecordsChip.js +1 -1
  6. package/dist/agents/components/context-items/bodies/WorkingDocumentBody.d.ts +5 -2
  7. package/dist/agents/components/context-items/bodies/WorkingDocumentBody.js +6 -1
  8. package/dist/agents/components/context-policies-display/ContextValueBody.js +1 -1
  9. package/dist/agents/components/context-preview/ContextCompareView.js +1 -1
  10. package/dist/agents/components/custom-agent/CustomAgentWindow.js +1 -1
  11. package/dist/agents/components/inputs/smart-input/AgentTextarea.d.ts +6 -1
  12. package/dist/agents/components/inputs/smart-input/AgentTextarea.js +2 -2
  13. package/dist/agents/components/inputs/smart-input/ComposerToolsNotice.d.ts +1 -0
  14. package/dist/agents/components/inputs/smart-input/ComposerToolsNotice.js +5 -0
  15. package/dist/agents/components/inputs/smart-input/ConversationContextRail.d.ts +5 -1
  16. package/dist/agents/components/inputs/smart-input/ConversationContextRail.js +6 -1
  17. package/dist/agents/components/inputs/smart-input/InboxQueueStrip.d.ts +6 -1
  18. package/dist/agents/components/inputs/smart-input/InboxQueueStrip.js +6 -1
  19. package/dist/agents/components/inputs/smart-input/InputActionButtons.js +8 -6
  20. package/dist/agents/components/inputs/smart-input/SmartInputFileDropTarget.d.ts +5 -1
  21. package/dist/agents/components/inputs/smart-input/SmartInputFileDropTarget.js +8 -1
  22. package/dist/agents/components/inputs/smart-input/composer/ComposerAgentPill.js +2 -2
  23. package/dist/agents/components/inputs/smart-input/composer/ComposerChipsRow.d.ts +5 -2
  24. package/dist/agents/components/inputs/smart-input/composer/ComposerChipsRow.js +6 -1
  25. package/dist/agents/components/inputs/smart-input/composer/ComposerMetaRow.d.ts +6 -8
  26. package/dist/agents/components/inputs/smart-input/composer/ComposerMetaRow.js +13 -1
  27. package/dist/agents/components/inputs/smart-input/composer/useOutputShapeCatalog.d.ts +1 -1
  28. package/dist/agents/components/inputs/smart-input/composer/useOutputShapeCatalog.js +1 -1
  29. package/dist/agents/components/live-run/LiveRunDisplay.js +1 -1
  30. package/dist/agents/components/live-run/RunSetDisplay.js +1 -1
  31. package/dist/agents/components/memory/components/AgentMemoryAllView.js +1 -1
  32. package/dist/agents/components/messages-display/assistant/AgentAssistantMessage.d.ts +1 -0
  33. package/dist/agents/components/messages-display/assistant/AgentAssistantMessage.js +4 -3
  34. package/dist/agents/components/messages-display/assistant/AgentEmptyMessageDisplay.js +1 -1
  35. package/dist/agents/components/messages-display/assistant/AssistantMessageFooter.d.ts +2 -2
  36. package/dist/agents/components/messages-display/assistant/AssistantMessageFooter.js +4 -7
  37. package/dist/agents/components/messages-display/assistant/InPlaceAnswerEditor.js +2 -2
  38. package/dist/agents/components/messages-display/citations/MessageSourcesRow.js +1 -1
  39. package/dist/agents/components/messages-display/rich-document/chat-message-source.d.ts +2 -0
  40. package/dist/agents/components/messages-display/rich-document/chat-message-source.js +41 -0
  41. package/dist/agents/components/messages-display/rich-document/chatMessageActions.d.ts +31 -0
  42. package/dist/agents/components/messages-display/rich-document/chatMessageActions.js +39 -0
  43. package/dist/agents/components/messages-display/user/AgentUserMessage.d.ts +1 -0
  44. package/dist/agents/components/messages-display/user/AgentUserMessage.js +7 -4
  45. package/dist/agents/components/messages-display/user/CollabNoteMessage.js +1 -1
  46. package/dist/agents/components/messages-display/user/UserActionBar.js +49 -39
  47. package/dist/agents/components/working-document/WorkingDocumentEditor.d.ts +1 -1
  48. package/dist/agents/components/working-document/WorkingDocumentPanel.js +2 -1
  49. package/dist/agents/identity/run-tier-store.js +3 -0
  50. package/dist/agents/redux/agent-definition/cache-bust-middleware.js +2 -0
  51. package/dist/agents/redux/agent-settings/agentSettingsSlice.d.ts +0 -4
  52. package/dist/agents/redux/agent-settings/agentSettingsSlice.js +12 -5
  53. package/dist/agents/redux/execution-system/host-conversations/host-conversation.thunks.d.ts +4 -1
  54. package/dist/agents/redux/execution-system/host-conversations/host-conversation.thunks.js +45 -0
  55. package/dist/agents/redux/execution-system/inbox/inbox-turn-end.middleware.js +2 -1
  56. package/dist/agents/redux/execution-system/instance-ui-state/run-configuration-persist.js +2 -0
  57. package/dist/agents/redux/execution-system/messages/messages.selectors.js +1 -1
  58. package/dist/agents/redux/execution-system/thunks/execute-instance.thunk.js +6 -0
  59. package/dist/agents/redux/execution-system/thunks/process-stream.js +1 -1
  60. package/dist/agents/redux/execution-system/utils/assemble-cx-content-blocks.js +2 -1
  61. package/dist/agents/redux/execution-system/utils/inbound-render-block.d.ts +8 -0
  62. package/dist/agents/redux/execution-system/utils/inbound-render-block.js +17 -2
  63. package/dist/agents/redux/execution-system/utils/normalize-content-blocks.js +1 -1
  64. package/dist/agents/redux/execution-system/utils/progress-data-block.d.ts +11 -0
  65. package/dist/agents/redux/execution-system/utils/progress-data-block.js +37 -0
  66. package/dist/agents/redux/execution-system/utils/stream-block-accumulator.js +10 -8
  67. package/dist/agents/redux/mcp/mcp.slice.js +15 -7
  68. package/dist/agents/redux/tools/tools.thunks.js +3 -0
  69. package/dist/agents/runtime-reconnect/ServerOperationBanner.d.ts +6 -1
  70. package/dist/agents/runtime-reconnect/ServerOperationBanner.js +6 -1
  71. package/dist/agents/ui-first-tools/ui/ApprovalCard.js +1 -1
  72. package/dist/agents/ui-first-tools/ui/AskCard.js +1 -1
  73. package/dist/agents/ui-first-tools/ui/lists/TaskPanel.js +1 -1
  74. package/dist/conversation/hooks/useDomCapturePrint.js +1 -1
  75. package/dist/conversation/utils/markdown-print.js +1 -1
  76. package/dist/cx-chat/components/messages/AssistantMessage.js +3 -5
  77. package/dist/cx-conversation/AssistantMessage.js +3 -5
  78. package/dist/host/app-data-slots.d.ts +85 -0
  79. package/dist/host/app-data-slots.js +42 -0
  80. package/dist/host/bare-host-chrome.js +1 -0
  81. package/dist/host/defaults/prefs.d.ts +11 -0
  82. package/dist/host/defaults/prefs.js +43 -0
  83. package/dist/host/defaults/workspace-gate.js +2 -1
  84. package/dist/host/index.d.ts +1 -1
  85. package/dist/host/index.js +2 -1
  86. package/dist/host/react.js +16 -1
  87. package/dist/host/source.d.ts +21 -0
  88. package/dist/host/ui-slots.d.ts +1 -23
  89. package/dist/host/ui-slots.js +0 -34
  90. package/dist/public-chat/components/PublicMessageOptionsMenu.js +2 -1
  91. package/dist/surfaces/redux/surfaceConfigSlice.js +2 -0
  92. package/dist/surfaces/redux/userStateSlice.js +3 -1
  93. package/dist/surfaces/runtime/agent-offer.js +1 -1
  94. package/dist/surfaces/runtime/surface-writeback.js +1 -1
  95. package/dist/tool-call-visualization/db-renderer/fetchToolRendererRow.js +2 -0
  96. package/dist/tool-call-visualization/renderers/agent-call/AgentCallInline.js +1 -1
  97. package/dist/tool-call-visualization/renderers/agent-call/CollabCallCard.js +1 -1
  98. package/dist/tool-call-visualization/renderers/fs/FsInline.js +1 -1
  99. package/dist/tool-call-visualization/renderers/random-wheel/RandomWheelInline.js +1 -1
  100. package/dist/tool-call-visualization/renderers/research/ResearchOverlay.js +4 -4
  101. package/dist/tool-call-visualization/renderers/research/SubagentReportBlock.js +2 -2
  102. package/dist/tool-call-visualization/renderers/scrape/ScrapeOverlay.js +1 -1
  103. package/dist/tool-call-visualization/renderers/search/SearchInline.js +1 -1
  104. package/dist/tool-call-visualization/renderers/search/SearchOverlay.js +1 -1
  105. package/dist/tool-call-visualization/renderers/sql/SqlInline.js +1 -1
  106. package/dist/tool-call-visualization/result-fields/KeyValueGrid.js +1 -1
  107. package/dist/tool-call-visualization/result-fields/ResultMarkdown.js +1 -1
  108. package/dist/tool-call-visualization/result-fields/ResultValue.js +1 -1
  109. package/dist/tool-call-visualization/surface-write/SurfaceWriteDiff.js +1 -1
  110. package/dist/ui/AudioOutputBlockSkeleton.d.ts +17 -0
  111. package/dist/ui/AudioOutputBlockSkeleton.js +78 -0
  112. package/dist/ui/chat-protocol-from-stream.d.ts +60 -0
  113. package/dist/ui/chat-protocol-from-stream.js +135 -0
  114. package/dist/ui/markdown-stream/EnhancedChatMarkdown.d.ts +59 -0
  115. package/dist/ui/markdown-stream/EnhancedChatMarkdown.js +1108 -0
  116. package/dist/ui/markdown-stream/MarkdownStream.d.ts +88 -0
  117. package/dist/ui/markdown-stream/MarkdownStream.js +14 -0
  118. package/dist/ui/markdown-stream/MarkdownStreamImpl.d.ts +4 -0
  119. package/dist/ui/markdown-stream/MarkdownStreamImpl.js +86 -0
  120. package/dist/ui/markdown-stream/StreamAwareChatMarkdown.d.ts +58 -0
  121. package/dist/ui/markdown-stream/StreamAwareChatMarkdown.js +294 -0
  122. package/dist/ui/markdown-stream/internal-handlers/AgentCallChildTrace.d.ts +22 -0
  123. package/dist/ui/markdown-stream/internal-handlers/AgentCallChildTrace.js +128 -0
  124. package/dist/ui/markdown-stream/internal-handlers/InlineAssistantError.d.ts +3 -0
  125. package/dist/ui/markdown-stream/internal-handlers/InlineAssistantError.js +26 -0
  126. package/dist/ui/markdown-stream/internal-handlers/InlineThinkingSlot.d.ts +14 -0
  127. package/dist/ui/markdown-stream/internal-handlers/InlineThinkingSlot.js +23 -0
  128. package/dist/ui/markdown-stream/internal-handlers/ToolHandlers.d.ts +42 -0
  129. package/dist/ui/markdown-stream/internal-handlers/ToolHandlers.js +109 -0
  130. package/dist/ui/markdown-stream/useBoundAgentOutputSchema.d.ts +2 -0
  131. package/dist/ui/markdown-stream/useBoundAgentOutputSchema.js +33 -0
  132. package/dist/window-panels/windows/agents/AgentAssistantMarkdownDebugWindow.js +1 -1
  133. package/package.json +7 -5
  134. package/dist/host/content-ir-slots.d.ts +0 -235
  135. package/dist/host/content-ir-slots.js +0 -135
  136. package/dist/host/markdown-slots.d.ts +0 -53
  137. package/dist/host/markdown-slots.js +0 -32
  138. package/dist/host/rich-document-slots.d.ts +0 -123
  139. package/dist/host/rich-document-slots.js +0 -36
  140. package/dist/utils/content-ir/report-kind-at-raw-renderer.d.ts +0 -19
  141. package/dist/utils/content-ir/report-kind-at-raw-renderer.js +0 -32
@@ -168,11 +168,54 @@ function createWebPrefs() {
168
168
  };
169
169
  return port;
170
170
  }
171
+ function createHostKeptPrefs(options) {
172
+ const memory = new Map(Object.entries(options.initial));
173
+ const listeners = /* @__PURE__ */ new Set();
174
+ const emit = (key) => {
175
+ for (const listener of listeners) listener(key);
176
+ };
177
+ const write = (key, value) => {
178
+ try {
179
+ options.persist(key, value);
180
+ } catch (error) {
181
+ announceOnce(
182
+ "prefs-host-write-failed",
183
+ `The host could not save a chat preference or draft (${error instanceof Error ? error.message : String(error)}); it is kept for this session.`
184
+ );
185
+ }
186
+ };
187
+ const port = {
188
+ get: (key) => memory.get(key) ?? null,
189
+ set(key, value) {
190
+ if (memory.get(key) === value) return;
191
+ memory.set(key, value);
192
+ write(key, value);
193
+ emit(key);
194
+ },
195
+ remove(key) {
196
+ if (!memory.has(key)) return;
197
+ memory.delete(key);
198
+ write(key, null);
199
+ emit(key);
200
+ },
201
+ subscribe(listener) {
202
+ listeners.add(listener);
203
+ return () => {
204
+ listeners.delete(listener);
205
+ };
206
+ },
207
+ knob: (key, fallback) => parseKnob(memory.get(key) ?? null, fallback),
208
+ knobs: createUnhostedKnobs(),
209
+ snapshot: () => Object.fromEntries(memory)
210
+ };
211
+ return port;
212
+ }
171
213
  export {
172
214
  CHAT_PREFS_PREFIX,
173
215
  DEFAULT_CHAT_PREFERENCES,
174
216
  PREFERENCE_FIELDS,
175
217
  applyPreferenceWrite,
218
+ createHostKeptPrefs,
176
219
  createUnhostedKnobs,
177
220
  createWebPrefs
178
221
  };
@@ -2,13 +2,14 @@
2
2
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
3
3
  import { useEffect, useMemo, useState, useSyncExternalStore } from "react";
4
4
  import { useChatHost } from "../react.js";
5
+ import { chatHostHasDatabase } from "../configure.js";
5
6
  import { invalidateMandateCache } from "../../mandates/service.js";
6
7
  const PAGE = 500;
7
8
  const CHUNK = 100;
8
9
  function DefaultWorkspaceGate({ blocked, sentence, description, children, className }) {
9
10
  const host = useChatHost();
10
11
  const active = useSyncExternalStore(host.org.subscribe, host.org.active, () => null);
11
- if (!blocked || active || !host.org.choose) return /* @__PURE__ */ jsx(Fragment, { children });
12
+ if (!blocked || active || !host.org.choose || !chatHostHasDatabase()) return /* @__PURE__ */ jsx(Fragment, { children });
12
13
  return /* @__PURE__ */ jsx(WorkspacePicker, { sentence, description, className });
13
14
  }
14
15
  function WorkspacePicker({ sentence, description, className }) {
@@ -10,7 +10,7 @@ export { createDbIdentity, SIGNED_OUT_IDENTITY } from "./defaults/identity.js";
10
10
  export { createNoPickerOrg, createStoredOrg, CHAT_ACTIVE_ORG_STORAGE_KEY } from "./defaults/org.js";
11
11
  export { createDefaultServer, DEFAULT_CHAT_SERVER_URL, } from "./defaults/server.js";
12
12
  export { createDomNotifier } from "./defaults/notify.js";
13
- export { createWebPrefs, CHAT_PREFS_PREFIX } from "./defaults/prefs.js";
13
+ export { createWebPrefs, createHostKeptPrefs, CHAT_PREFS_PREFIX } from "./defaults/prefs.js";
14
14
  export { createWindowNavigation } from "./defaults/navigation.js";
15
15
  export { createUnhostedWindows } from "./defaults/windows.js";
16
16
  export { CHAT_WINDOWS, CHAT_WINDOW_IDS, DEFAULT_WINDOW_INSTANCE_ID, isChatWindowId, type ChatWindowId, } from "./windows.js";
@@ -27,7 +27,7 @@ import {
27
27
  DEFAULT_CHAT_SERVER_URL
28
28
  } from "./defaults/server.js";
29
29
  import { createDomNotifier } from "./defaults/notify.js";
30
- import { createWebPrefs, CHAT_PREFS_PREFIX } from "./defaults/prefs.js";
30
+ import { createWebPrefs, createHostKeptPrefs, CHAT_PREFS_PREFIX } from "./defaults/prefs.js";
31
31
  import { createWindowNavigation } from "./defaults/navigation.js";
32
32
  import { createUnhostedWindows } from "./defaults/windows.js";
33
33
  import {
@@ -85,6 +85,7 @@ export {
85
85
  createDefaultChrome,
86
86
  createDefaultServer,
87
87
  createDomNotifier,
88
+ createHostKeptPrefs,
88
89
  createLogClientErrorDiagnostics,
89
90
  createNoDatabaseStandIn,
90
91
  createNoPickerOrg,
@@ -9,6 +9,8 @@ import { createChatStore } from "../store/create-chat-store.js";
9
9
  import { useChatHostSync } from "../store/chat-host-sync.js";
10
10
  import { setStoreSingleton } from "../store/store-singleton.js";
11
11
  import { BareHostChrome } from "./bare-host-chrome.js";
12
+ import { AlchemyActionsProvider, useOptionalAlchemyActions } from "@ai-matrx/alchemy/react/host";
13
+ import { captureError } from "./diagnostics.js";
12
14
  import {
13
15
  isRemarkDurabilityRegistered,
14
16
  registerRemarkDurability
@@ -39,8 +41,21 @@ function ChatProvider({ host, store, children }) {
39
41
  const serverState = privateStore?.snapshot ?? (parent && parent.store === store ? parent.getServerState?.() : void 0);
40
42
  if (typeof window !== "undefined") setStoreSingleton(chatStore);
41
43
  useChatHostSync(chatStore, resolved);
42
- return /* @__PURE__ */ jsx(ChatHostContext.Provider, { value: resolved, children: /* @__PURE__ */ jsx(Provider, { store: chatStore, context: ChatStoreContext, serverState, children: privateStore ? /* @__PURE__ */ jsx(BareHostChrome, { host: resolved, children }) : children }) });
44
+ const outerAlchemy = useOptionalAlchemyActions();
45
+ const body = privateStore ? /* @__PURE__ */ jsx(BareHostChrome, { host: resolved, children }) : children;
46
+ return /* @__PURE__ */ jsx(ChatHostContext.Provider, { value: resolved, children: /* @__PURE__ */ jsx(Provider, { store: chatStore, context: ChatStoreContext, serverState, children: outerAlchemy ? body : /* @__PURE__ */ jsx(AlchemyActionsProvider, { ports: BARE_ALCHEMY_PORTS, children: body }) }) });
43
47
  }
48
+ const BARE_ALCHEMY_PORTS = {
49
+ diagnostics: {
50
+ capture: (error, context) => {
51
+ captureError({
52
+ source: "chat",
53
+ message: `Alchemy ${context.area}: ${error instanceof Error ? error.message : String(error)}`,
54
+ raw: context.detail
55
+ });
56
+ }
57
+ }
58
+ };
44
59
  function useMaybeChatHost() {
45
60
  return useContext(ChatHostContext);
46
61
  }
@@ -24,8 +24,29 @@ export interface HostMessageRecord {
24
24
  code?: string | null;
25
25
  } | null;
26
26
  }
27
+ /**
28
+ * One finished (or still running) tool call in the host's history: what a saved `tool_call` part's
29
+ * card shows — its result, its failure, its display name. A database-backed conversation reads
30
+ * these from its tool-call rows; a host hands them over with the page.
31
+ */
32
+ export interface HostToolCall {
33
+ /** The `call_id` of the `tool_call` part it belongs to. */
34
+ callId: string;
35
+ name: string;
36
+ /** What the card's title says ("Run a command"), when the host has a friendlier name. */
37
+ displayName?: string | null;
38
+ arguments: Record<string, unknown>;
39
+ /** The tool's output as text (JSON text renders structured); null while it runs. */
40
+ output: string | null;
41
+ isError: boolean;
42
+ status: "running" | "completed" | "failed";
43
+ /** The assistant message it belongs to. */
44
+ messageId?: string | null;
45
+ }
27
46
  export interface HostHistoryPage {
28
47
  records: HostMessageRecord[];
48
+ /** The tool calls the records' `tool_call` parts refer to. */
49
+ toolCalls?: HostToolCall[];
29
50
  hasMoreOlder: boolean;
30
51
  /** The host's sentence when its history could not be read ("This chat's file could not be read"). */
31
52
  unavailable?: string | null;
@@ -90,7 +90,6 @@ type SlotComponent<P> = ComponentType<P> | {
90
90
  }["bivarianceHack"];
91
91
  type AnyFn = (...args: any[]) => any;
92
92
  export interface ChatUiSlots {
93
- RichContent: AnyComponent;
94
93
  CopyButtons: AnyComponent;
95
94
  InfoHint: AnyComponent;
96
95
  AnswerValueView: AnyComponent;
@@ -105,14 +104,10 @@ export interface ChatUiSlots {
105
104
  TableChooser: AnyComponent;
106
105
  FileResourceChip: AnyComponent;
107
106
  ConnectorMark: AnyComponent;
108
- InPlaceEditor: AnyComponent;
109
- EditInPlace: AnyComponent;
110
107
  MessageFilesStrip: AnyComponent;
111
108
  RulebookNudge: AnyComponent;
112
109
  NegativeVerdictFollowUp: AnyComponent;
113
110
  SpeakerButton: AnyComponent;
114
- /** The split Copy (one click = the person's flavor; the chevron offers markdown or plain text) over one markdown string: `{ text, label?, size? }`. */
115
- CopySplit: AnyComponent;
116
111
  GmailReviewCard: AnyComponent;
117
112
  ShareButton: AnyComponent;
118
113
  ShareModal: AnyComponent;
@@ -128,16 +123,11 @@ export interface ChatUiSlots {
128
123
  NoteFooter: AnyComponent;
129
124
  NoteTitleActions: AnyComponent;
130
125
  TaskBody: AnyComponent;
131
- RichDocument: AnyComponent;
132
126
  SystemInstructionModal: AnyComponent;
133
127
  confirm: AnyFn;
134
- copyRichContent: AnyFn;
135
- copyContent: AnyFn;
136
128
  useTablesEverywhere: AnyFn;
137
- useTextareaFormatting: AnyFn;
138
129
  useClipboardPaste: AnyFn;
139
130
  useCenterControlFit: AnyFn;
140
- useInPlaceTrigger: AnyFn;
141
131
  connectorDefinitionFromMcp: AnyFn;
142
132
  notesCreate: AnyFn;
143
133
  useKnowledgeAttachSearch: AnyFn;
@@ -435,8 +425,6 @@ export declare function resetChatUiForTests(): void;
435
425
  * unregistered -> the stand-in, reported once.
436
426
  */
437
427
  export declare function hostSlot<K extends keyof ChatUiSlots>(name: K, Fallback?: AnyComponent): ChatUiSlots[K];
438
- /** A host with no rich renderer shows the text as it is. */
439
- export declare const RichContent: AnyComponent;
440
428
  export declare const CopyButtons: AnyComponent;
441
429
  export declare const InfoHint: AnyComponent;
442
430
  export declare const AnswerValueView: AnyComponent;
@@ -454,14 +442,10 @@ export declare const NonEditableContextMenu: ComponentType<import("../context-me
454
442
  export declare const TableChooser: AnyComponent;
455
443
  export declare const FileResourceChip: AnyComponent;
456
444
  export declare const ConnectorMark: AnyComponent;
457
- export declare const InPlaceEditor: AnyComponent;
458
- /** A host with no in-place editor shows the text and offers no edit. */
459
- export declare const EditInPlace: AnyComponent;
460
445
  export declare const MessageFilesStrip: AnyComponent;
461
446
  export declare const RulebookNudge: AnyComponent;
462
447
  export declare const NegativeVerdictFollowUp: AnyComponent;
463
448
  export declare const SpeakerButton: AnyComponent;
464
- export declare const CopySplit: AnyComponent;
465
449
  export declare const GmailReviewCard: AnyComponent;
466
450
  export declare const ShareButton: AnyComponent;
467
451
  export declare const ShareModal: AnyComponent;
@@ -473,17 +457,13 @@ export declare const ConnectorPromptHost: AnyComponent;
473
457
  export declare const WebpageSnapshotView: AnyComponent;
474
458
  /**
475
459
  * A named function or hook slot declared outside this file (by `ChatUiSlots` augmentation, e.g.
476
- * host/markdown-slots), with its stand-in. Same contract as the slots below.
460
+ * host/app-data-slots), with its stand-in. Same contract as the slots below.
477
461
  */
478
462
  export declare function hostFn<K extends keyof ChatUiSlots>(name: K, fallback?: AnyFn): ChatUiSlots[K];
479
463
  export declare const confirm: AnyFn;
480
- export declare const copyRichContent: AnyFn;
481
- export declare const copyContent: AnyFn;
482
464
  export declare const useTablesEverywhere: AnyFn;
483
- export declare const useTextareaFormatting: AnyFn;
484
465
  export declare const useClipboardPaste: AnyFn;
485
466
  export declare const useCenterControlFit: AnyFn;
486
- export declare const useInPlaceTrigger: AnyFn;
487
467
  export declare const connectorDefinitionFromMcp: AnyFn;
488
468
  export declare const notesCreate: AnyFn;
489
469
  export declare const useKnowledgeAttachSearch: AnyFn;
@@ -509,8 +489,6 @@ export declare const traceWarRoomRenderPath: AnyFn;
509
489
  export declare const isWarRoomThreadAgentSurface: AnyFn;
510
490
  /** A host with no cloud browser opens nothing; the opener is a reported no-op. */
511
491
  export declare const useOpenCloudBrowserCanvas: AnyFn;
512
- /** A host with no rich document viewer shows the text as it is, marked as the stand-in. */
513
- export declare const RichDocument: AnyComponent;
514
492
  /** The canvas identity of one chat's cloud browser (the host's own scheme; a bare host just keys by chat). */
515
493
  export declare const cloudBrowserCanvasSourceId: AnyFn;
516
494
  /** Builder doors: a host without the agent builder shows one labelled line where the editor would be. */
@@ -7,7 +7,6 @@ import { reportUnregisteredHostSlot as reportUnregistered } from "./diagnostics.
7
7
  import { DefaultWebpageSnapshotView } from "./defaults/webpage-snapshot-view.js";
8
8
  import { DefaultWorkspaceGate } from "./defaults/workspace-gate.js";
9
9
  import { DefaultFullScreenOverlay, DefaultWindowPanel } from "./defaults/window-panel.js";
10
- import { copyText } from "@ai-matrx/kit/clipboard";
11
10
  const slots = {};
12
11
  function registerChatUi(next) {
13
12
  Object.assign(slots, next);
@@ -67,15 +66,6 @@ const failingThunk = (name) => () => () => {
67
66
  };
68
67
  const STAND_INS = {
69
68
  confirm: async () => false,
70
- copyRichContent: async () => false,
71
- // Content-shaped like the host's `copyContent(content, options)`: a string copies as text, anything
72
- // else as JSON. A failed copy is reported through `onError` and returns false, never swallowed.
73
- copyContent: async (content, options) => {
74
- const text = typeof content === "string" ? content : JSON.stringify(content, null, 2);
75
- const landed = await copyText(text ?? "");
76
- if (!landed) options?.onError?.(new Error("Failed to copy"));
77
- return landed;
78
- },
79
69
  useTablesEverywhere: () => NONE,
80
70
  useCenterControlFit: () => true,
81
71
  connectorDefinitionFromMcp: () => null,
@@ -167,10 +157,6 @@ function slotFn(name, declared) {
167
157
  };
168
158
  return fn;
169
159
  }
170
- const RichContent = slotComponent(
171
- "RichContent",
172
- ({ source, className }) => createElement("div", { className, "data-chat-slot-fallback": "RichContent" }, typeof source === "string" ? source : "")
173
- );
174
160
  const CopyButtons = slotComponent("CopyButtons");
175
161
  const InfoHint = slotComponent("InfoHint");
176
162
  const AnswerValueView = slotComponent("AnswerValueView");
@@ -201,13 +187,10 @@ const NonEditableContextMenu = slotComponent("NonEditableContextMenu", contentWi
201
187
  const TableChooser = slotComponent("TableChooser");
202
188
  const FileResourceChip = slotComponent("FileResourceChip");
203
189
  const ConnectorMark = slotComponent("ConnectorMark");
204
- const InPlaceEditor = slotComponent("InPlaceEditor");
205
- const EditInPlace = slotComponent("EditInPlace", ({ children }) => children ?? null);
206
190
  const MessageFilesStrip = slotComponent("MessageFilesStrip", unregisteredWidget("MessageFilesStrip"));
207
191
  const RulebookNudge = slotComponent("RulebookNudge", unregisteredWidget("RulebookNudge"));
208
192
  const NegativeVerdictFollowUp = slotComponent("NegativeVerdictFollowUp", unregisteredWidget("NegativeVerdictFollowUp"));
209
193
  const SpeakerButton = slotComponent("SpeakerButton", unregisteredWidget("SpeakerButton"));
210
- const CopySplit = slotComponent("CopySplit", unregisteredWidget("CopySplit"));
211
194
  const GmailReviewCard = slotComponent("GmailReviewCard", unregisteredWidget("GmailReviewCard"));
212
195
  const ShareButton = slotComponent("ShareButton", unregisteredWidget("ShareButton"));
213
196
  const ShareModal = slotComponent("ShareModal", unregisteredWidget("ShareModal"));
@@ -220,13 +203,9 @@ function hostFn(name, fallback) {
220
203
  return slotFn(name, fallback);
221
204
  }
222
205
  const confirm = slotFn("confirm");
223
- const copyRichContent = slotFn("copyRichContent");
224
- const copyContent = slotFn("copyContent");
225
206
  const useTablesEverywhere = slotFn("useTablesEverywhere");
226
- const useTextareaFormatting = slotFn("useTextareaFormatting", () => void 0);
227
207
  const useClipboardPaste = slotFn("useClipboardPaste", () => void 0);
228
208
  const useCenterControlFit = slotFn("useCenterControlFit");
229
- const useInPlaceTrigger = slotFn("useInPlaceTrigger", () => ({ readProps: {} }));
230
209
  const connectorDefinitionFromMcp = slotFn("connectorDefinitionFromMcp");
231
210
  const notesCreate = slotFn("notesCreate");
232
211
  const useKnowledgeAttachSearch = slotFn("useKnowledgeAttachSearch");
@@ -250,10 +229,6 @@ const loadedSkills = slotFn("loadedSkills", () => ({ status: "idle", skills: []
250
229
  const traceWarRoomRenderPath = slotFn("traceWarRoomRenderPath", () => void 0);
251
230
  const isWarRoomThreadAgentSurface = slotFn("isWarRoomThreadAgentSurface", () => false);
252
231
  const useOpenCloudBrowserCanvas = slotFn("useOpenCloudBrowserCanvas", () => () => void 0);
253
- const RichDocument = slotComponent(
254
- "RichDocument",
255
- ({ content, className }) => createElement("div", { className: `whitespace-pre-wrap text-sm ${className ?? ""}`, "data-chat-slot-fallback": "RichDocument" }, typeof content === "string" ? content : "")
256
- );
257
232
  const cloudBrowserCanvasSourceId = slotFn("cloudBrowserCanvasSourceId", (conversationId) => `cloud-browser:${conversationId}`);
258
233
  const SystemInstructionModal = slotComponent("SystemInstructionModal", unregisteredWidget("SystemInstructionModal"));
259
234
  const WindowPanel = slotComponent("WindowPanel", DefaultWindowPanel);
@@ -506,14 +481,12 @@ export {
506
481
  ConnectorPromptHost,
507
482
  ConversationHoverPreview,
508
483
  CopyButtons,
509
- CopySplit,
510
484
  Cost,
511
485
  CreatorRunPanel,
512
486
  CustomDataBindingPreview,
513
487
  CustomDataBindingSummary,
514
488
  DataRefPreviewContent,
515
489
  DockedSidePanel,
516
- EditInPlace,
517
490
  EditableContextMenu,
518
491
  EmailInputDialog,
519
492
  EntityCommentPopover,
@@ -531,7 +504,6 @@ export {
531
504
  GmailReviewCard,
532
505
  HtmlPreviewFullScreenEditor,
533
506
  IconButton,
534
- InPlaceEditor,
535
507
  InfoHint,
536
508
  InputCapabilitiesEditor,
537
509
  ItemMenu,
@@ -569,8 +541,6 @@ export {
569
541
  ResourcePickerMenu,
570
542
  ResourcePickerWindow,
571
543
  ReviewAnswersLink,
572
- RichContent,
573
- RichDocument,
574
544
  RulebookNudge,
575
545
  SearchGroup,
576
546
  SearchGroupTrigger,
@@ -611,8 +581,6 @@ export {
611
581
  confirm,
612
582
  connectorDefinitionFromMcp,
613
583
  convertMarkdownToHtml,
614
- copyContent,
615
- copyRichContent,
616
584
  createHtmlPage,
617
585
  createSandboxFilesystemAdapter,
618
586
  currentCostUnit,
@@ -711,7 +679,6 @@ export {
711
679
  useGitHubConnection,
712
680
  useHeldWriteTableName,
713
681
  useHtmlPreviewState,
714
- useInPlaceTrigger,
715
682
  useKnowledgeAttachSearch,
716
683
  useLoginHref,
717
684
  useModelFull,
@@ -729,6 +696,5 @@ export {
729
696
  useRunControlCounts,
730
697
  useSkills,
731
698
  useTablesEverywhere,
732
- useTextareaFormatting,
733
699
  useUrlSync
734
700
  };
@@ -17,7 +17,7 @@ import {
17
17
  Share2
18
18
  } from "lucide-react";
19
19
  import { getMarkdownStylesheet } from "@ai-matrx/print/markdown";
20
- import { AdvancedMenu, copyContent } from "../../host/ui-slots.js";
20
+ import { AdvancedMenu } from "../../host/ui-slots.js";
21
21
  import { EmailInputDialog } from "../../host/ui-slots.js";
22
22
  import { AuthGateDialog } from "../../host/ui-slots.js";
23
23
  import { notesCreate } from "../../host/ui-slots.js";
@@ -30,6 +30,7 @@ import { kindTextToMarkdown } from "../../utils/content-ir/surfaces/kind-text-to
30
30
  import { removeCodeSpans, replaceFences } from "@ai-matrx/content-ir/source";
31
31
  import { selectOrganizationId, ensureOrganizationContext, isOrganizationSelectionCancelled } from "../../host/org.js";
32
32
  import { downloadFile } from "@ai-matrx/kit/download";
33
+ import { copyContent } from "@ai-matrx/rich-content/copy/copy-commands";
33
34
  const PENDING_ACTION_KEY = "matrx_pending_post_auth_action";
34
35
  const PublicMessageOptionsMenu = ({
35
36
  content: answerContent,
@@ -6,6 +6,7 @@ import {
6
6
  fetchSurfaceConfigBundle,
7
7
  resolveSurfaceConfig
8
8
  } from "../services/surface-config.service.js";
9
+ import { chatHostHasDatabase } from "../../host/configure.js";
9
10
  const initialState = { bySurfaceName: {} };
10
11
  const inflight = /* @__PURE__ */ new Map();
11
12
  const ensureSurfaceConfig = createAsyncThunk(
@@ -22,6 +23,7 @@ const ensureSurfaceConfig = createAsyncThunk(
22
23
  },
23
24
  {
24
25
  condition: ({ surfaceName, force }, { getState }) => {
26
+ if (!chatHostHasDatabase()) return false;
25
27
  if (force) return true;
26
28
  const entry = getState().surfaceConfig?.bySurfaceName[surfaceName];
27
29
  return !entry || entry.status === "idle" || entry.status === "error";
@@ -3,6 +3,7 @@ import {
3
3
  surfaceUserStateService
4
4
  } from "../user-state/service.js";
5
5
  import { requireUserId } from "../../host/identity.js";
6
+ import { chatHostHasDatabase } from "../../host/configure.js";
6
7
  const initialState = { byFeature: {} };
7
8
  function ensureFeature(state, feature) {
8
9
  if (!state.byFeature[feature]) {
@@ -50,7 +51,7 @@ function ensureSurfaceFeatureLoaded(feature, force = false) {
50
51
  const p = (async () => {
51
52
  dispatch(surfaceUserStateActions.featureLoading(feature));
52
53
  try {
53
- const rows = await surfaceUserStateService.loadFeature(requireUserId(), feature);
54
+ const rows = !chatHostHasDatabase() ? {} : await surfaceUserStateService.loadFeature(requireUserId(), feature);
54
55
  dispatch(surfaceUserStateActions.featureReceived({ feature, rows }));
55
56
  } catch (e) {
56
57
  dispatch(
@@ -67,6 +68,7 @@ function ensureSurfaceFeatureLoaded(feature, force = false) {
67
68
  function saveSurfaceState(feature, surfaceKey, state) {
68
69
  return async (dispatch) => {
69
70
  dispatch(surfaceUserStateActions.rowSet({ feature, surfaceKey, state }));
71
+ if (!chatHostHasDatabase()) return;
70
72
  try {
71
73
  await surfaceUserStateService.save(requireUserId(), feature, surfaceKey, state);
72
74
  } catch (e) {
@@ -1,5 +1,5 @@
1
1
  import { KIND_KEY } from "@ai-matrx/content-ir";
2
- import { contentIrKindValidator } from "../../host/content-ir-slots.js";
2
+ import { contentIrKindValidator } from "../../host/app-data-slots.js";
3
3
  function summarizeKindSchema(schema) {
4
4
  if (typeof schema !== "object" || schema === null) return null;
5
5
  const s = schema;
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { contentIrKindValidator } from "../../host/content-ir-slots.js";
2
+ import { contentIrKindValidator } from "../../host/app-data-slots.js";
3
3
  import { getManifest } from "./registry.js";
4
4
  import {
5
5
  BASELINE_SURFACE_NAME,
@@ -1,6 +1,8 @@
1
1
  import { supabase } from "../../host/db.js";
2
+ import { chatHostHasDatabase } from "../../host/configure.js";
2
3
  import { WEB_TOOL_UI_SURFACE } from "./surface.js";
3
4
  async function fetchToolRendererRow(toolName) {
5
+ if (!chatHostHasDatabase()) return null;
4
6
  const { data, error } = await supabase.schema("tool").from("ui").select(
5
7
  "inline_code, allowed_imports, display_name, results_label, header_subtitle_code, keep_expanded_on_stream"
6
8
  ).is("deleted_at", null).eq("tool_name", toolName).eq("surface_name", WEB_TOOL_UI_SURFACE).eq("is_active", true).maybeSingle();
@@ -2,7 +2,7 @@
2
2
  import { jsx, jsxs } from "react/jsx-runtime";
3
3
  import { useMemo } from "react";
4
4
  import { Aperture, ImageIcon } from "lucide-react";
5
- import { MarkdownStream } from "../../../host/markdown-slots.js";
5
+ import { MarkdownStream } from "../../../ui/markdown-stream/MarkdownStream.js";
6
6
  import { useAppSelector } from "../../../store/hooks.js";
7
7
  import { selectAgentCallChildStream } from "../../../agents/redux/execution-system/active-requests/active-requests.selectors.js";
8
8
  import { GenericRenderer } from "../../registry/GenericRenderer.js";
@@ -7,7 +7,7 @@ import { useAppSelector } from "../../../store/hooks.js";
7
7
  import { selectAgentCallChildStream } from "../../../agents/redux/execution-system/active-requests/active-requests.selectors.js";
8
8
  import { useConversationTitle } from "../../../agents/hooks/useConversationTitle.js";
9
9
  import { EntityRef } from "../../../host/ui-slots.js";
10
- import { MarkdownStream } from "../../../host/markdown-slots.js";
10
+ import { MarkdownStream } from "../../../ui/markdown-stream/MarkdownStream.js";
11
11
  import { AnswerValueView } from "../../../host/ui-slots.js";
12
12
  import { stripThinkingStreaming } from "@ai-matrx/kit/text";
13
13
  import { cn } from "@ai-matrx/design-system";
@@ -4,7 +4,7 @@ import React from "react";
4
4
  import { ChevronRight, File, Folder, FolderOpen } from "lucide-react";
5
5
  import { formatFileSize } from "@ai-matrx/kit/format";
6
6
  import { cn } from "@ai-matrx/design-system";
7
- import { BasicMarkdownContent } from "../../../host/markdown-slots.js";
7
+ import { BasicMarkdownContent } from "@ai-matrx/rich-content/display/chat-markdown/BasicMarkdownContent";
8
8
  import { getArg, isTerminal, resultAsObject } from "../_shared.js";
9
9
  import { GenericRenderer } from "../../registry/GenericRenderer.js";
10
10
  import { ToolErrorCard } from "../../result-fields/ToolErrorCard.js";
@@ -22,7 +22,7 @@ import {
22
22
  import { useAppDispatch } from "../../../store/hooks.js";
23
23
  import { cn } from "@ai-matrx/design-system";
24
24
  import { setContextEntry } from "../../../agents/redux/execution-system/instance-context/instance-context.slice.js";
25
- import { BasicMarkdownContent } from "../../../host/markdown-slots.js";
25
+ import { BasicMarkdownContent } from "@ai-matrx/rich-content/display/chat-markdown/BasicMarkdownContent";
26
26
  import { filterStepEvents, isTerminal, resultAsObject } from "../_shared.js";
27
27
  import { ErrorAlchemyMenu } from "../../../host/ui-slots.js";
28
28
  const SPIN_FULL_TURNS = 6;
@@ -12,10 +12,7 @@ import {
12
12
  Link2
13
13
  } from "lucide-react";
14
14
  import { cn } from "@ai-matrx/design-system";
15
- import { RichContent } from "../../../host/ui-slots.js";
16
- import { copyRichContent } from "../../../host/ui-slots.js";
17
- import { RichDocument } from "../../../host/ui-slots.js";
18
- import { BasicMarkdownContent } from "../../../host/markdown-slots.js";
15
+ import { BasicMarkdownContent } from "@ai-matrx/rich-content/display/chat-markdown/BasicMarkdownContent";
19
16
  import { resultAsString } from "../_shared.js";
20
17
  import {
21
18
  parseSearch,
@@ -23,6 +20,9 @@ import {
23
20
  getDomain
24
21
  } from "../search/parseSearch.js";
25
22
  import { Button } from "@ai-matrx/design-system/controls";
23
+ import { RichContent } from "@ai-matrx/rich-content/levels/RichContent";
24
+ import { copyRichContent } from "@ai-matrx/rich-content/copy/copy-commands";
25
+ import { RichDocument } from "@ai-matrx/rich-content/rich-document/RichDocument";
26
26
  const Favicon = ({ url, className }) => {
27
27
  const [failed, setFailed] = useState(false);
28
28
  const src = url ? getFaviconUrl(url) : "";
@@ -10,10 +10,10 @@ import {
10
10
  Minimize2
11
11
  } from "lucide-react";
12
12
  import { cn } from "@ai-matrx/design-system";
13
- import { RichContent } from "../../../host/ui-slots.js";
14
- import { RichDocument } from "../../../host/ui-slots.js";
15
13
  import { useAutoScrollOnStream } from "../useAutoScrollOnStream.js";
16
14
  import { AGENT_ICON } from "@ai-matrx/icons/domain";
15
+ import { RichContent } from "@ai-matrx/rich-content/levels/RichContent";
16
+ import { RichDocument } from "@ai-matrx/rich-content/rich-document/RichDocument";
17
17
  const PARTIAL_MAX_PX = 400;
18
18
  const SubagentReportBlock = ({
19
19
  report,
@@ -10,7 +10,7 @@ import {
10
10
  } from "lucide-react";
11
11
  import { cn } from "@ai-matrx/design-system";
12
12
  import { InlineMediaRef } from "@ai-matrx/media/react";
13
- import { BasicMarkdownContent } from "../../../host/markdown-slots.js";
13
+ import { BasicMarkdownContent } from "@ai-matrx/rich-content/display/chat-markdown/BasicMarkdownContent";
14
14
  import { getFaviconUrl } from "../search/parseSearch.js";
15
15
  import { parseScrape } from "./parseScrape.js";
16
16
  import { AGENT_ICON } from "@ai-matrx/icons/domain";
@@ -10,7 +10,7 @@ import {
10
10
  BookOpen
11
11
  } from "lucide-react";
12
12
  import { cn } from "@ai-matrx/design-system";
13
- import { BasicMarkdownContent } from "../../../host/markdown-slots.js";
13
+ import { BasicMarkdownContent } from "@ai-matrx/rich-content/display/chat-markdown/BasicMarkdownContent";
14
14
  import { useAppSelector } from "../../../store/hooks.js";
15
15
  import { useOpenScraperWindow } from "../../../host/window-openers.js";
16
16
  import { selectIsLatestToolActivity } from "../../../agents/redux/execution-system/active-requests/active-requests.selectors.js";
@@ -12,7 +12,7 @@ import {
12
12
  Lightbulb
13
13
  } from "lucide-react";
14
14
  import { cn } from "@ai-matrx/design-system";
15
- import { BasicMarkdownContent } from "../../../host/markdown-slots.js";
15
+ import { BasicMarkdownContent } from "@ai-matrx/rich-content/display/chat-markdown/BasicMarkdownContent";
16
16
  import { PartPeekPopover } from "../_shared-entity/PartPeekPopover.js";
17
17
  import { resultAsString } from "../_shared.js";
18
18
  import {
@@ -7,7 +7,7 @@ import {
7
7
  CollapsibleContent,
8
8
  CollapsibleTrigger
9
9
  } from "@ai-matrx/design-system";
10
- import { BasicMarkdownContent } from "../../../host/markdown-slots.js";
10
+ import { BasicMarkdownContent } from "@ai-matrx/rich-content/display/chat-markdown/BasicMarkdownContent";
11
11
  import { getArg, isTerminal, resultAsObject } from "../_shared.js";
12
12
  import { ResultValue } from "../../result-fields/ResultValue.js";
13
13
  import { ToolResultValue } from "../../result-fields/ToolResultValue.js";
@@ -16,7 +16,7 @@ import {
16
16
  } from "./document-presentation.js";
17
17
  import { KindValueNode } from "./KindValueNode.js";
18
18
  import { rootKindSlug } from "../../utils/content-ir/surfaces/json-kind-signal.js";
19
- import { useReportKindAtRawRenderer } from "../../utils/content-ir/report-kind-at-raw-renderer.js";
19
+ import { useReportKindAtRawRenderer } from "@ai-matrx/rich-content/utils/report-kind-at-raw-renderer";
20
20
  import { humanizeIdentifier } from "@ai-matrx/kit/text-case";
21
21
  import { Button } from "@ai-matrx/design-system/controls";
22
22
  const INLINE_ENTRY_CAP = 8;
@@ -2,7 +2,7 @@
2
2
  import { jsx, jsxs } from "react/jsx-runtime";
3
3
  import React from "react";
4
4
  import { ChevronDown, ChevronUp } from "lucide-react";
5
- import { BasicMarkdownContent } from "../../host/markdown-slots.js";
5
+ import { BasicMarkdownContent } from "@ai-matrx/rich-content/display/chat-markdown/BasicMarkdownContent";
6
6
  import { Collapsible, CollapsibleContent } from "@ai-matrx/design-system";
7
7
  import { cn } from "@ai-matrx/design-system";
8
8
  import { Button } from "@ai-matrx/design-system/controls";
@@ -17,7 +17,7 @@ import { KindValueNode } from "./KindValueNode.js";
17
17
  import { ResultRecordRef } from "./ResultRecordRef.js";
18
18
  import { TextWithDoors } from "../../host/ui-slots.js";
19
19
  import { valueCarriesKind } from "../../utils/content-ir/surfaces/json-kind-signal.js";
20
- import { useReportKindAtRawRenderer } from "../../utils/content-ir/report-kind-at-raw-renderer.js";
20
+ import { useReportKindAtRawRenderer } from "@ai-matrx/rich-content/utils/report-kind-at-raw-renderer";
21
21
  import { Button } from "@ai-matrx/design-system/controls";
22
22
  const INLINE_MAX_DEPTH = 2;
23
23
  const INLINE_ROW_CAP = 3;
@@ -7,7 +7,6 @@ import {
7
7
  LARGE_INPUT_CHARS,
8
8
  TextDiff
9
9
  } from "@ai-matrx/diff/react";
10
- import { RichContent } from "../../host/ui-slots.js";
11
10
  import { useIsMobile } from "@ai-matrx/kit/media-query";
12
11
  import { useSessionKnob } from "../../host/prefs-react.js";
13
12
  import { cn } from "@ai-matrx/design-system";
@@ -16,6 +15,7 @@ import {
16
15
  diffLanguageOf
17
16
  } from "./readSurfaceWrite.js";
18
17
  import { formatCount } from "@ai-matrx/kit/format";
18
+ import { RichContent } from "@ai-matrx/rich-content/levels/RichContent";
19
19
  function viewFromKnob(value) {
20
20
  if (value === "split") return "split";
21
21
  if (value === "changes") return "highlight";