@ai-matrx/chat 0.4.0 → 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 (226) hide show
  1. package/CHANGELOG.md +80 -0
  2. package/dist/agent-copy/RichCopySplit.d.ts +17 -0
  3. package/dist/agent-copy/RichCopySplit.js +34 -0
  4. package/dist/agents/addressing/useAgentHref.js +4 -1
  5. package/dist/agents/api/submit-tool-results.js +11 -1
  6. package/dist/agents/components/agent-widgets/chat-assistant/AssistantMessageCard.js +1 -1
  7. package/dist/agents/components/chat/ConversationRecordsChip.js +1 -1
  8. package/dist/agents/components/chat/useCanvasScopedToConversation.js +1 -1
  9. package/dist/agents/components/context-items/bodies/WorkingDocumentBody.d.ts +5 -2
  10. package/dist/agents/components/context-items/bodies/WorkingDocumentBody.js +6 -1
  11. package/dist/agents/components/context-policies-display/ContextValueBody.js +1 -1
  12. package/dist/agents/components/context-preview/ContextCompareView.js +1 -1
  13. package/dist/agents/components/custom-agent/CustomAgentWindow.js +1 -1
  14. package/dist/agents/components/inputs/smart-input/AgentTextarea.d.ts +6 -1
  15. package/dist/agents/components/inputs/smart-input/AgentTextarea.js +2 -2
  16. package/dist/agents/components/inputs/smart-input/ComposerToolsNotice.d.ts +1 -0
  17. package/dist/agents/components/inputs/smart-input/ComposerToolsNotice.js +5 -0
  18. package/dist/agents/components/inputs/smart-input/ConversationContextRail.d.ts +5 -1
  19. package/dist/agents/components/inputs/smart-input/ConversationContextRail.js +6 -1
  20. package/dist/agents/components/inputs/smart-input/InboxQueueStrip.d.ts +6 -1
  21. package/dist/agents/components/inputs/smart-input/InboxQueueStrip.js +6 -1
  22. package/dist/agents/components/inputs/smart-input/InputActionButtons.js +8 -6
  23. package/dist/agents/components/inputs/smart-input/SmartInputFileDropTarget.d.ts +5 -1
  24. package/dist/agents/components/inputs/smart-input/SmartInputFileDropTarget.js +8 -1
  25. package/dist/agents/components/inputs/smart-input/composer/ComposerAgentPill.js +2 -2
  26. package/dist/agents/components/inputs/smart-input/composer/ComposerChipsRow.d.ts +5 -2
  27. package/dist/agents/components/inputs/smart-input/composer/ComposerChipsRow.js +6 -1
  28. package/dist/agents/components/inputs/smart-input/composer/ComposerMetaRow.d.ts +6 -8
  29. package/dist/agents/components/inputs/smart-input/composer/ComposerMetaRow.js +13 -1
  30. package/dist/agents/components/inputs/smart-input/composer/useOutputShapeCatalog.d.ts +1 -1
  31. package/dist/agents/components/inputs/smart-input/composer/useOutputShapeCatalog.js +1 -1
  32. package/dist/agents/components/live-run/LiveRunDisplay.js +1 -1
  33. package/dist/agents/components/live-run/RunSetDisplay.js +1 -1
  34. package/dist/agents/components/memory/components/AgentMemoryAllView.js +1 -1
  35. package/dist/agents/components/messages-display/AgentConversationDisplay.js +4 -1
  36. package/dist/agents/components/messages-display/assistant/AgentAssistantMessage.d.ts +1 -0
  37. package/dist/agents/components/messages-display/assistant/AgentAssistantMessage.js +4 -3
  38. package/dist/agents/components/messages-display/assistant/AgentEmptyMessageDisplay.js +1 -1
  39. package/dist/agents/components/messages-display/assistant/AssistantMessageFooter.d.ts +2 -2
  40. package/dist/agents/components/messages-display/assistant/AssistantMessageFooter.js +4 -7
  41. package/dist/agents/components/messages-display/assistant/InPlaceAnswerEditor.js +2 -2
  42. package/dist/agents/components/messages-display/citations/MessageSourcesRow.js +1 -1
  43. package/dist/agents/components/messages-display/rich-document/chat-message-source.d.ts +2 -0
  44. package/dist/agents/components/messages-display/rich-document/chat-message-source.js +41 -0
  45. package/dist/agents/components/messages-display/rich-document/chatMessageActions.d.ts +31 -0
  46. package/dist/agents/components/messages-display/rich-document/chatMessageActions.js +39 -0
  47. package/dist/agents/components/messages-display/user/AgentUserMessage.d.ts +1 -0
  48. package/dist/agents/components/messages-display/user/AgentUserMessage.js +7 -4
  49. package/dist/agents/components/messages-display/user/CollabNoteMessage.js +1 -1
  50. package/dist/agents/components/messages-display/user/UserActionBar.js +49 -39
  51. package/dist/agents/components/run-controls/panels/shared.d.ts +1 -0
  52. package/dist/agents/components/shared/AgentConversationColumn.js +3 -2
  53. package/dist/agents/components/working-document/WorkingDocumentEditor.d.ts +1 -1
  54. package/dist/agents/components/working-document/WorkingDocumentPanel.js +2 -1
  55. package/dist/agents/components/working-document/workingDocumentSurface.d.ts +1 -1
  56. package/dist/agents/identity/model-catalog.js +5 -3
  57. package/dist/agents/identity/run-tier-store.js +3 -0
  58. package/dist/agents/redux/agent-definition/cache-bust-middleware.js +2 -0
  59. package/dist/agents/redux/agent-definition/selectors.d.ts +237 -0
  60. package/dist/agents/redux/agent-settings/agentSettingsSlice.d.ts +0 -4
  61. package/dist/agents/redux/agent-settings/agentSettingsSlice.js +12 -5
  62. package/dist/agents/redux/agent-settings/selectors.d.ts +12 -0
  63. package/dist/agents/redux/agent-shortcut-categories/selectors.d.ts +50 -0
  64. package/dist/agents/redux/agent-shortcuts/selectors.d.ts +147 -0
  65. package/dist/agents/redux/conversation-history/selectors.d.ts +16 -0
  66. package/dist/agents/redux/conversation-list/conversation-list.selectors.d.ts +2 -0
  67. package/dist/agents/redux/execution-system/active-requests/active-requests.selectors.d.ts +54 -0
  68. package/dist/agents/redux/execution-system/context-state/context-state.selectors.d.ts +14 -0
  69. package/dist/agents/redux/execution-system/conversations/conversations.selectors.d.ts +5 -0
  70. package/dist/agents/redux/execution-system/host-conversations/conversation-abilities.d.ts +12 -0
  71. package/dist/agents/redux/execution-system/host-conversations/conversation-abilities.js +25 -0
  72. package/dist/agents/redux/execution-system/host-conversations/host-conversation.thunks.d.ts +53 -0
  73. package/dist/agents/redux/execution-system/host-conversations/host-conversation.thunks.js +412 -0
  74. package/dist/agents/redux/execution-system/host-conversations/host-conversations.selectors.d.ts +28 -0
  75. package/dist/agents/redux/execution-system/host-conversations/host-conversations.selectors.js +41 -0
  76. package/dist/agents/redux/execution-system/host-conversations/host-conversations.slice.d.ts +43 -0
  77. package/dist/agents/redux/execution-system/host-conversations/host-conversations.slice.js +38 -0
  78. package/dist/agents/redux/execution-system/host-conversations/source-registry.d.ts +9 -0
  79. package/dist/agents/redux/execution-system/host-conversations/source-registry.js +15 -0
  80. package/dist/agents/redux/execution-system/host-conversations/useHostConversation.d.ts +4 -0
  81. package/dist/agents/redux/execution-system/host-conversations/useHostConversation.js +24 -0
  82. package/dist/agents/redux/execution-system/inbox/inbox-turn-end.middleware.js +2 -1
  83. package/dist/agents/redux/execution-system/instance-context/instance-context.selectors.d.ts +3 -0
  84. package/dist/agents/redux/execution-system/instance-resources/default-remark-durability.d.ts +22 -0
  85. package/dist/agents/redux/execution-system/instance-resources/default-remark-durability.js +164 -0
  86. package/dist/agents/redux/execution-system/instance-resources/instance-resources.selectors.d.ts +8 -0
  87. package/dist/agents/redux/execution-system/instance-ui-state/instance-ui-state.selectors.d.ts +5 -0
  88. package/dist/agents/redux/execution-system/instance-ui-state/run-configuration-persist.js +2 -0
  89. package/dist/agents/redux/execution-system/instance-user-input/composer-draft-store.js +20 -0
  90. package/dist/agents/redux/execution-system/instance-user-input/useComposerDraftRestore.js +2 -1
  91. package/dist/agents/redux/execution-system/instance-variable-values/instance-variable-values.selectors.d.ts +7 -0
  92. package/dist/agents/redux/execution-system/messages/messages.selectors.d.ts +1 -0
  93. package/dist/agents/redux/execution-system/messages/messages.selectors.js +1 -1
  94. package/dist/agents/redux/execution-system/observability/observability.selectors.d.ts +7 -0
  95. package/dist/agents/redux/execution-system/observational-memory/observational-memory.selectors.d.ts +1 -0
  96. package/dist/agents/redux/execution-system/selectors/aggregate.selectors.d.ts +14 -0
  97. package/dist/agents/redux/execution-system/thunks/execute-instance.thunk.js +8 -1
  98. package/dist/agents/redux/execution-system/thunks/execute-manual-instance.thunk.js +2 -1
  99. package/dist/agents/redux/execution-system/thunks/load-conversation.thunk.js +6 -0
  100. package/dist/agents/redux/execution-system/thunks/load-older-messages.thunk.js +12 -0
  101. package/dist/agents/redux/execution-system/thunks/process-stream.js +6 -4
  102. package/dist/agents/redux/execution-system/thunks/resolve-base-url.js +1 -1
  103. package/dist/agents/redux/execution-system/thunks/smart-execute.thunk.js +43 -0
  104. package/dist/agents/redux/execution-system/utils/assemble-cx-content-blocks.js +2 -1
  105. package/dist/agents/redux/execution-system/utils/continuation-body.d.ts +1 -0
  106. package/dist/agents/redux/execution-system/utils/continuation-body.js +2 -1
  107. package/dist/agents/redux/execution-system/utils/inbound-render-block.d.ts +8 -0
  108. package/dist/agents/redux/execution-system/utils/inbound-render-block.js +17 -2
  109. package/dist/agents/redux/execution-system/utils/normalize-content-blocks.js +1 -1
  110. package/dist/agents/redux/execution-system/utils/progress-data-block.d.ts +11 -0
  111. package/dist/agents/redux/execution-system/utils/progress-data-block.js +37 -0
  112. package/dist/agents/redux/execution-system/utils/stream-block-accumulator.js +10 -8
  113. package/dist/agents/redux/mcp/mcp.slice.js +15 -7
  114. package/dist/agents/redux/proposed-directives/proposedDirectivesSlice.d.ts +1 -0
  115. package/dist/agents/redux/tools/tools.selectors.d.ts +1 -0
  116. package/dist/agents/redux/tools/tools.thunks.js +3 -0
  117. package/dist/agents/resources/default-picker-items.d.ts +17 -0
  118. package/dist/agents/resources/default-picker-items.js +48 -0
  119. package/dist/agents/runtime-reconnect/ServerOperationBanner.d.ts +6 -1
  120. package/dist/agents/runtime-reconnect/ServerOperationBanner.js +6 -1
  121. package/dist/agents/types/instance.types.d.ts +2 -1
  122. package/dist/agents/ui-first-tools/redux/agent-lists.selectors.d.ts +2 -0
  123. package/dist/agents/ui-first-tools/ui/ApprovalCard.js +1 -1
  124. package/dist/agents/ui-first-tools/ui/AskCard.js +1 -1
  125. package/dist/agents/ui-first-tools/ui/lists/TaskPanel.js +1 -1
  126. package/dist/conversation/hooks/useDomCapturePrint.js +1 -1
  127. package/dist/conversation/utils/markdown-print.js +1 -1
  128. package/dist/cx-chat/components/SsrSidebarChats.js +1 -1
  129. package/dist/cx-chat/components/messages/AssistantMessage.js +3 -5
  130. package/dist/cx-chat/components/sidebar/SidebarUserFooter.js +1 -1
  131. package/dist/cx-conversation/AssistantMessage.js +3 -5
  132. package/dist/host/app-data-slots.d.ts +85 -0
  133. package/dist/host/app-data-slots.js +42 -0
  134. package/dist/host/app-identity.d.ts +20 -0
  135. package/dist/host/app-identity.js +21 -0
  136. package/dist/host/bare-host-chrome.d.ts +14 -0
  137. package/dist/host/bare-host-chrome.js +45 -0
  138. package/dist/host/configure.d.ts +9 -1
  139. package/dist/host/configure.js +44 -8
  140. package/dist/host/contract.d.ts +39 -2
  141. package/dist/host/db-types.d.ts +99 -1
  142. package/dist/host/defaults/navigation-hooks.d.ts +2 -0
  143. package/dist/host/defaults/navigation-hooks.js +7 -1
  144. package/dist/host/defaults/navigation.d.ts +4 -3
  145. package/dist/host/defaults/navigation.js +38 -7
  146. package/dist/host/defaults/org.d.ts +12 -4
  147. package/dist/host/defaults/org.js +39 -1
  148. package/dist/host/defaults/prefs.d.ts +11 -0
  149. package/dist/host/defaults/prefs.js +43 -0
  150. package/dist/host/defaults/workspace-gate.d.ts +16 -0
  151. package/dist/host/defaults/workspace-gate.js +89 -0
  152. package/dist/host/diagnostics.d.ts +7 -2
  153. package/dist/host/diagnostics.js +6 -0
  154. package/dist/host/identity.js +2 -1
  155. package/dist/host/index.d.ts +6 -3
  156. package/dist/host/index.js +23 -2
  157. package/dist/host/no-database.d.ts +38 -0
  158. package/dist/host/no-database.js +107 -0
  159. package/dist/host/react.d.ts +1 -0
  160. package/dist/host/react.js +40 -2
  161. package/dist/host/registered-source.js +2 -2
  162. package/dist/host/source.d.ts +130 -0
  163. package/dist/host/source.js +86 -0
  164. package/dist/host/ui-slots.d.ts +9 -31
  165. package/dist/host/ui-slots.js +5 -37
  166. package/dist/mandates/useMandate.js +13 -0
  167. package/dist/public-chat/components/PublicMessageOptionsMenu.js +3 -2
  168. package/dist/store/create-chat-store.d.ts +4 -2
  169. package/dist/store/middlewares.d.ts +5 -0
  170. package/dist/store/slices.d.ts +1 -0
  171. package/dist/store/slices.js +4 -1
  172. package/dist/surfaces/redux/selectors.d.ts +2 -0
  173. package/dist/surfaces/redux/surfaceConfigSlice.js +2 -0
  174. package/dist/surfaces/redux/userStateSlice.js +3 -1
  175. package/dist/surfaces/runtime/agent-offer.js +1 -1
  176. package/dist/surfaces/runtime/surface-writeback.js +1 -1
  177. package/dist/testing/turn-harness.d.ts +35 -0
  178. package/dist/testing/turn-harness.js +85 -0
  179. package/dist/tool-call-visualization/db-renderer/fetchToolRendererRow.js +2 -0
  180. package/dist/tool-call-visualization/redux/selectors.d.ts +1 -0
  181. package/dist/tool-call-visualization/renderers/agent-call/AgentCallInline.js +1 -1
  182. package/dist/tool-call-visualization/renderers/agent-call/CollabCallCard.js +1 -1
  183. package/dist/tool-call-visualization/renderers/fs/FsInline.js +1 -1
  184. package/dist/tool-call-visualization/renderers/random-wheel/RandomWheelInline.js +1 -1
  185. package/dist/tool-call-visualization/renderers/research/ResearchOverlay.js +4 -4
  186. package/dist/tool-call-visualization/renderers/research/SubagentReportBlock.js +2 -2
  187. package/dist/tool-call-visualization/renderers/scrape/ScrapeOverlay.js +1 -1
  188. package/dist/tool-call-visualization/renderers/search/SearchInline.js +1 -1
  189. package/dist/tool-call-visualization/renderers/search/SearchOverlay.js +1 -1
  190. package/dist/tool-call-visualization/renderers/sql/SqlInline.js +1 -1
  191. package/dist/tool-call-visualization/result-fields/KeyValueGrid.js +1 -1
  192. package/dist/tool-call-visualization/result-fields/ResultMarkdown.js +1 -1
  193. package/dist/tool-call-visualization/result-fields/ResultValue.js +1 -1
  194. package/dist/tool-call-visualization/surface-write/SurfaceWriteDiff.js +1 -1
  195. package/dist/ui/AudioOutputBlockSkeleton.d.ts +17 -0
  196. package/dist/ui/AudioOutputBlockSkeleton.js +78 -0
  197. package/dist/ui/chat-protocol-from-stream.d.ts +60 -0
  198. package/dist/ui/chat-protocol-from-stream.js +135 -0
  199. package/dist/ui/markdown-stream/EnhancedChatMarkdown.d.ts +59 -0
  200. package/dist/ui/markdown-stream/EnhancedChatMarkdown.js +1108 -0
  201. package/dist/ui/markdown-stream/MarkdownStream.d.ts +88 -0
  202. package/dist/ui/markdown-stream/MarkdownStream.js +14 -0
  203. package/dist/ui/markdown-stream/MarkdownStreamImpl.d.ts +4 -0
  204. package/dist/ui/markdown-stream/MarkdownStreamImpl.js +86 -0
  205. package/dist/ui/markdown-stream/StreamAwareChatMarkdown.d.ts +58 -0
  206. package/dist/ui/markdown-stream/StreamAwareChatMarkdown.js +294 -0
  207. package/dist/ui/markdown-stream/internal-handlers/AgentCallChildTrace.d.ts +22 -0
  208. package/dist/ui/markdown-stream/internal-handlers/AgentCallChildTrace.js +128 -0
  209. package/dist/ui/markdown-stream/internal-handlers/InlineAssistantError.d.ts +3 -0
  210. package/dist/ui/markdown-stream/internal-handlers/InlineAssistantError.js +26 -0
  211. package/dist/ui/markdown-stream/internal-handlers/InlineThinkingSlot.d.ts +14 -0
  212. package/dist/ui/markdown-stream/internal-handlers/InlineThinkingSlot.js +23 -0
  213. package/dist/ui/markdown-stream/internal-handlers/ToolHandlers.d.ts +42 -0
  214. package/dist/ui/markdown-stream/internal-handlers/ToolHandlers.js +109 -0
  215. package/dist/ui/markdown-stream/useBoundAgentOutputSchema.d.ts +2 -0
  216. package/dist/ui/markdown-stream/useBoundAgentOutputSchema.js +33 -0
  217. package/dist/window-panels/windows/agents/AgentAssistantMarkdownDebugWindow.js +1 -1
  218. package/package.json +10 -5
  219. package/dist/host/content-ir-slots.d.ts +0 -231
  220. package/dist/host/content-ir-slots.js +0 -131
  221. package/dist/host/markdown-slots.d.ts +0 -53
  222. package/dist/host/markdown-slots.js +0 -32
  223. package/dist/host/rich-document-slots.d.ts +0 -123
  224. package/dist/host/rich-document-slots.js +0 -36
  225. package/dist/utils/content-ir/report-kind-at-raw-renderer.d.ts +0 -19
  226. package/dist/utils/content-ir/report-kind-at-raw-renderer.js +0 -32
@@ -10,11 +10,18 @@ import { cn } from "@ai-matrx/design-system";
10
10
  import { useEffectiveModelId } from "./useComposerAgent.js";
11
11
  import { useAppSelector } from "../../../../../store/hooks.js";
12
12
  import { selectAgentIdFromInstance } from "../../../../redux/execution-system/conversations/conversations.selectors.js";
13
+ import { useConversationAbilities } from "../../../../redux/execution-system/host-conversations/conversation-abilities.js";
13
14
  import {
14
15
  ConversationContextChip,
15
16
  useConversationContextChipShown
16
17
  } from "../ConversationContextChip.js";
18
+ function useDatabaseBacked() {
19
+ return useConversationAbilities().database;
20
+ }
17
21
  function ComposerValueGroupChip({ conversationId }) {
22
+ return useDatabaseBacked() ? /* @__PURE__ */ jsx(ComposerValueGroupChipBody, { conversationId }) : null;
23
+ }
24
+ function ComposerValueGroupChipBody({ conversationId }) {
18
25
  const shown = useConversationContextChipShown(conversationId);
19
26
  const agentId = useAppSelector(selectAgentIdFromInstance(conversationId));
20
27
  if (!shown) return null;
@@ -29,6 +36,7 @@ function ComposerScopeCluster({
29
36
  composer,
30
37
  folded = false
31
38
  }) {
39
+ if (!useDatabaseBacked()) return null;
32
40
  return /* @__PURE__ */ jsxs("div", { className: "flex shrink-0 items-center gap-1.5", children: [
33
41
  folded ? null : /* @__PURE__ */ jsx(
34
42
  ActiveContextLensChip,
@@ -40,7 +48,10 @@ function ComposerScopeCluster({
40
48
  /* @__PURE__ */ jsx(ComposerValueGroupChip, { conversationId })
41
49
  ] });
42
50
  }
43
- function ComposerPills({
51
+ function ComposerPills(props) {
52
+ return useDatabaseBacked() ? /* @__PURE__ */ jsx(ComposerPillsBody, { ...props }) : null;
53
+ }
54
+ function ComposerPillsBody({
44
55
  conversationId,
45
56
  composer,
46
57
  menuSide,
@@ -86,6 +97,7 @@ function ComposerMetaRow({
86
97
  menuSide,
87
98
  folded = false
88
99
  }) {
100
+ if (!useDatabaseBacked()) return null;
89
101
  return (
90
102
  // One line, always: a narrow column scrolls the row sideways, never wraps it.
91
103
  // Every gap is the tap-target 6px; the clusters sit at the two ends.
@@ -1,4 +1,4 @@
1
- import { type ShapeBrowseRow } from "../../../../../host/content-ir-slots.js";
1
+ import { type ShapeBrowseRow } from "../../../../../host/app-data-slots.js";
2
2
  export type ShapeSource = "system" | "org" | "mine";
3
3
  export declare const SHAPE_SOURCES: readonly {
4
4
  id: ShapeSource;
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  import { useEffect, useState } from "react";
3
- import { fetchShapeByKind, fetchShapePage } from "../../../../../host/content-ir-slots.js";
3
+ import { fetchShapeByKind, fetchShapePage } from "../../../../../host/app-data-slots.js";
4
4
  const SHAPE_SOURCES = [
5
5
  { id: "system", label: "System" },
6
6
  { id: "org", label: "Organization" },
@@ -4,7 +4,7 @@ import { useEffect, useRef } from "react";
4
4
  import { Loader2, TriangleAlert, X } from "lucide-react";
5
5
  import { cn } from "@ai-matrx/design-system";
6
6
  import { useAppSelector } from "../../../store/hooks.js";
7
- import { MarkdownStream } from "../../../host/markdown-slots.js";
7
+ import { MarkdownStream } from "../../../ui/markdown-stream/MarkdownStream.js";
8
8
  import { AgentAssistantMessage } from "../messages-display/assistant/AgentAssistantMessage.js";
9
9
  import { useRetainRequestForViewer } from "../../redux/execution-system/active-requests/useRetainRequestForViewer.js";
10
10
  import {
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { jsx, jsxs } from "react/jsx-runtime";
3
3
  import { useAppDispatch, useAppSelector } from "../../../store/hooks.js";
4
- import { MarkdownStream } from "../../../host/markdown-slots.js";
4
+ import { MarkdownStream } from "../../../ui/markdown-stream/MarkdownStream.js";
5
5
  import { cn } from "@ai-matrx/design-system";
6
6
  import { LiveRunDisplay } from "./LiveRunDisplay.js";
7
7
  import { selectRunSetEntries } from "../../redux/execution-system/run-sets/run-sets.slice.js";
@@ -1,7 +1,6 @@
1
1
  "use client";
2
2
  import { jsx, jsxs } from "react/jsx-runtime";
3
3
  import { Loader2 } from "lucide-react";
4
- import { RichContent } from "../../../../host/ui-slots.js";
5
4
  import { Badge } from "@ai-matrx/design-system";
6
5
  import { cn } from "@ai-matrx/design-system";
7
6
  import {
@@ -10,6 +9,7 @@ import {
10
9
  importanceTier
11
10
  } from "../types.js";
12
11
  import { ErrorAlchemyMenu } from "../../../../host/ui-slots.js";
12
+ import { RichContent } from "@ai-matrx/rich-content/levels/RichContent";
13
13
  const TIER_BADGE_CLASS = {
14
14
  high: "bg-primary/15 text-primary-ink",
15
15
  medium: "bg-muted text-foreground",
@@ -1,5 +1,6 @@
1
1
  "use client";
2
2
  import { jsx, jsxs } from "react/jsx-runtime";
3
+ import { useConversationAbilities } from "../../redux/execution-system/host-conversations/conversation-abilities.js";
3
4
  import { useEffect, useMemo, useRef, useState } from "react";
4
5
  import { useAppDispatch, useAppSelector } from "../../../store/hooks.js";
5
6
  import { loadConversation } from "../../redux/execution-system/thunks/load-conversation.thunk.js";
@@ -101,9 +102,11 @@ function AgentConversationDisplay({
101
102
  () => setFindOpen(true),
102
103
  displayGroups.length > 0
103
104
  );
105
+ const { database: canPin } = useConversationAbilities();
104
106
  useEffect(() => {
107
+ if (!canPin) return;
105
108
  void hydratePinnedMessages(messages.map((m) => m.id));
106
- }, [messages]);
109
+ }, [messages, canPin]);
107
110
  const [findHistory, setFindHistory] = useState({
108
111
  state: "loading",
109
112
  loaded: 0
@@ -1,3 +1,4 @@
1
+ import "../rich-document/chat-message-source.js";
1
2
  export interface AgentAssistantMessageProps {
2
3
  conversationId: string;
3
4
  requestId?: string;
@@ -7,8 +7,9 @@ import {
7
7
  useState,
8
8
  useEffect
9
9
  } from "react";
10
- import { MarkdownStream } from "../../../../host/markdown-slots.js";
11
- import { RecordAnnotations, annotationRecordOf } from "../../../../host/rich-document-slots.js";
10
+ import { MarkdownStream } from "../../../../ui/markdown-stream/MarkdownStream.js";
11
+ import "../rich-document/chat-message-source.js";
12
+ import { RecordAnnotations, annotationRecordOf } from "@ai-matrx/rich-content/host/app-bindings";
12
13
  import { useAppDispatch, useAppSelector } from "../../../../store/hooks.js";
13
14
  import { PrefillNote } from "../../../message-flags/PrefillNote.js";
14
15
  import { StoppedNote } from "../../../message-flags/StoppedNote.js";
@@ -74,7 +75,6 @@ import { retryConversationTurn } from "../../../redux/execution-system/message-c
74
75
  import { commitInlineContentEdit } from "../../../redux/execution-system/message-crud/commit-inline-edit.thunk.js";
75
76
  import { InPlaceAnswerEditor } from "./InPlaceAnswerEditor.js";
76
77
  import { updateMessageRecord } from "../../../redux/execution-system/messages/messages.slice.js";
77
- import { useInPlaceTrigger } from "../../../../host/ui-slots.js";
78
78
  import { handInPlaceCaret } from "../../../../utils/rich-editor/in-place/caret-handoff.js";
79
79
  import { toast } from "../../../../host/notify.js";
80
80
  import { useDomCapturePrint } from "../../../../conversation/hooks/useDomCapturePrint.js";
@@ -88,6 +88,7 @@ import {
88
88
  traceWarRoomRenderPath
89
89
  } from "../../../../host/ui-slots.js";
90
90
  import { ErrorAlchemyMenu } from "../../../../host/ui-slots.js";
91
+ import { useInPlaceTrigger } from "@ai-matrx/rich-editor/in-place/EditInPlace";
91
92
  const _NO_LIVE_SOURCES = [];
92
93
  const _selectNoLiveSources = () => _NO_LIVE_SOURCES;
93
94
  function retryErrorMessage(err) {
@@ -4,10 +4,10 @@ import { selectInstanceAgentName } from "../../../redux/execution-system/instanc
4
4
  import { selectInstanceAgentDescription } from "../../../redux/execution-system/instance-ui-state/instance-ui-state.selectors.js";
5
5
  import { Webhook } from "lucide-react";
6
6
  import { IconResolver } from "../../../../next/lazy/IconResolver.js";
7
- import { RichContent } from "../../../../host/ui-slots.js";
8
7
  import { selectVisibleInputDefinitions } from "../../../redux/execution-system/instance-variable-values/bound-variable.selectors.js";
9
8
  import { selectIsVariableFormShown } from "../../../redux/execution-system/selectors/aggregate.selectors.js";
10
9
  import { emptyStateInstruction } from "./empty-state-instruction.js";
10
+ import { RichContent } from "@ai-matrx/rich-content/levels/RichContent";
11
11
  const LONG_DESCRIPTION_CHAR_THRESHOLD = 1e3;
12
12
  function AgentEmptyMessageDisplay({
13
13
  conversationId
@@ -39,8 +39,8 @@ export interface AssistantMessageFooterProps {
39
39
  * same actions over the same facts.
40
40
  */
41
41
  export declare function useAssistantMessageActions({ messageId, conversationId, onFullPrint, isCapturing, surfaceKey, groupMessageIds, }: AssistantMessageFooterProps): {
42
- config: import("../../../../host/rich-document-slots.js").ChatMessageActionConfig;
43
- dialogsHost: import("../../../../host/rich-document-slots.js").DocumentDialogsHost;
42
+ config: import("../rich-document/chatMessageActions.js").ChatMessageActionConfig;
43
+ dialogsHost: any;
44
44
  record: import("../../../redux/execution-system/messages/messages.slice.js").MessageRecord | undefined;
45
45
  content: string;
46
46
  turnText: string;
@@ -3,13 +3,10 @@ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
3
3
  import { useEffect, useRef, useState } from "react";
4
4
  import { useAppSelector } from "../../../../store/hooks.js";
5
5
  import { cn } from "@ai-matrx/design-system";
6
- import {
7
- RichDocumentActions,
8
- RegistryContextMenu,
9
- buildChatMessageActions,
10
- convertOriginForSource,
11
- useDocumentDialogsHost
12
- } from "../../../../host/rich-document-slots.js";
6
+ import { RichDocumentActions } from "@ai-matrx/rich-content/rich-document/RichDocumentActions";
7
+ import { RegistryContextMenu } from "@ai-matrx/rich-content/rich-document/RegistryContextMenu";
8
+ import { convertOriginForSource, useDocumentDialogsHost } from "@ai-matrx/rich-content/host/app-bindings";
9
+ import { buildChatMessageActions } from "../rich-document/chatMessageActions.js";
13
10
  import { useOutputFeedback } from "../../../../host/ui-slots.js";
14
11
  import { NegativeVerdictFollowUp } from "../../../../host/ui-slots.js";
15
12
  import { RulebookNudge } from "../../../../host/ui-slots.js";
@@ -2,7 +2,6 @@
2
2
  import { jsx, jsxs } from "react/jsx-runtime";
3
3
  import { useEffect, useState } from "react";
4
4
  import { Loader2 } from "lucide-react";
5
- import { InPlaceEditor } from "../../../../host/ui-slots.js";
6
5
  import { takeInPlaceCaret } from "../../../../utils/rich-editor/in-place/caret-handoff.js";
7
6
  import { useAppDispatch } from "../../../../store/hooks.js";
8
7
  import { updateMessageRecord } from "../../../redux/execution-system/messages/messages.slice.js";
@@ -12,7 +11,8 @@ import {
12
11
  } from "../../../redux/execution-system/message-crud/save-answer-edit.thunk.js";
13
12
  import { toast } from "../../../../host/notify.js";
14
13
  import { rebaseEdit } from "../../../redux/execution-system/message-crud/answer-text-splice.js";
15
- import { copyRichContent } from "../../../../host/ui-slots.js";
14
+ import { InPlaceEditor } from "@ai-matrx/rich-editor/in-place/InPlaceEditor";
15
+ import { copyRichContent } from "@ai-matrx/rich-content/copy/copy-commands";
16
16
  function InPlaceAnswerEditor({ conversationId, messageId, startExpanded = false }) {
17
17
  const dispatch = useAppDispatch();
18
18
  const [openedOn, setOpenedOn] = useState(null);
@@ -7,7 +7,7 @@ import {
7
7
  citationSourceDisplayKind
8
8
  } from "../../../redux/execution-system/messages/message-citations.js";
9
9
  import { citationSourceIsOpenable, citationSourceLabel, citationSourceLocator } from "./citation-source.js";
10
- import { useOpenCitationSource } from "../../../../host/markdown-slots.js";
10
+ import { useOpenCitationSource } from "../../../../host/app-data-slots.js";
11
11
  function MessageSourcesRow({
12
12
  sources,
13
13
  className
@@ -0,0 +1,2 @@
1
+ import type { ContentSourceAdapter } from "@ai-matrx/rich-content/rich-document/types";
2
+ export declare const chatMessageAdapter: ContentSourceAdapter;
@@ -0,0 +1,41 @@
1
+ import { registerSourceAdapter } from "@ai-matrx/rich-content/rich-document/actions/sources/index";
2
+ const chatMessageAdapter = {
3
+ instanceKeyPrefix: (source) => {
4
+ if (source.type !== "chat-message") {
5
+ throw new Error(
6
+ `chatMessageAdapter received non-chat source: ${source.type}`
7
+ );
8
+ }
9
+ return `msg-${source.messageId}`;
10
+ },
11
+ edit: async ({ newContent, previousContent, source, dispatch }) => {
12
+ if (source.type !== "chat-message") {
13
+ throw new Error(
14
+ `chatMessageAdapter.edit received non-chat source: ${source.type}`
15
+ );
16
+ }
17
+ const { conversationId, messageId } = source;
18
+ if (!conversationId || !messageId) {
19
+ throw new Error("chat-message edit requires conversationId + messageId");
20
+ }
21
+ const { saveAnswerEdit } = await import("../../../redux/execution-system/message-crud/save-answer-edit.thunk.js");
22
+ if (previousContent === void 0) {
23
+ throw new Error(
24
+ "This editor did not say what text it opened on, so the answer was not saved (it could drop hidden reasoning). Edit the answer in place instead."
25
+ );
26
+ }
27
+ const result = await dispatch(
28
+ saveAnswerEdit({ conversationId, messageId, displayEdit: { previous: previousContent, next: newContent } })
29
+ ).unwrap();
30
+ return {
31
+ kind: "chat-answer",
32
+ written: result.written,
33
+ changedSpans: result.changedSpans,
34
+ mostlyRewritten: result.mostlyRewritten
35
+ };
36
+ }
37
+ };
38
+ registerSourceAdapter("chat-message", chatMessageAdapter);
39
+ export {
40
+ chatMessageAdapter
41
+ };
@@ -0,0 +1,31 @@
1
+ import type { ChatMessageExtensions, ContentSource, RichDocumentActionContextCallbacks, RichDocumentActionsProp } from "@ai-matrx/rich-content/rich-document/types";
2
+ import "./chat-message-source.js";
3
+ export interface ChatMessageActionFacts {
4
+ conversationId: string;
5
+ messageId: string;
6
+ role: "assistant" | "user";
7
+ /** Inspectable text of THIS cx_message row (the write-back target). */
8
+ messageContent: string;
9
+ /** True when `messageContent` is the JSON raw view of a structured payload. */
10
+ contentIsStructuredRaw?: boolean;
11
+ /** Aggregated text of the whole multi-iteration turn, when the host groups one. */
12
+ turnContent?: string | null;
13
+ /** Text-bearing row the assistant editor saves to (defaults to this row). */
14
+ editTarget?: ChatMessageExtensions["editTarget"];
15
+ metadata?: Record<string, unknown> | null;
16
+ streamRequestId?: string | null;
17
+ contentHistoryCount?: number;
18
+ groupMessageIds?: string[];
19
+ isCreator?: boolean;
20
+ surfaceKey?: string | null;
21
+ showFullPrint?: boolean;
22
+ isCapturing?: boolean;
23
+ callbacks?: RichDocumentActionContextCallbacks;
24
+ }
25
+ export interface ChatMessageActionConfig {
26
+ /** What the reader sees — the turn when grouped, else the message. */
27
+ content: string;
28
+ source: ContentSource;
29
+ actions: RichDocumentActionsProp;
30
+ }
31
+ export declare function buildChatMessageActions(facts: ChatMessageActionFacts): ChatMessageActionConfig;
@@ -0,0 +1,39 @@
1
+ import "./chat-message-source.js";
2
+ function buildChatMessageActions(facts) {
3
+ const isStructuredRaw = facts.contentIsStructuredRaw ?? false;
4
+ const editTarget = facts.role === "assistant" ? facts.editTarget ?? {
5
+ messageId: facts.messageId,
6
+ content: facts.messageContent,
7
+ isStructuredRaw
8
+ } : null;
9
+ return {
10
+ content: facts.turnContent ?? facts.messageContent,
11
+ source: {
12
+ type: "chat-message",
13
+ messageId: facts.messageId,
14
+ conversationId: facts.conversationId,
15
+ streamRequestId: facts.streamRequestId ?? null
16
+ },
17
+ actions: {
18
+ metadata: facts.metadata ?? null,
19
+ isCreator: facts.isCreator ?? false,
20
+ surfaceKey: facts.surfaceKey ?? null,
21
+ callbacks: facts.callbacks,
22
+ extensions: {
23
+ type: "chat-message",
24
+ role: facts.role,
25
+ messageContent: facts.messageContent,
26
+ contentIsStructuredRaw: isStructuredRaw,
27
+ editTarget,
28
+ streamRequestId: facts.streamRequestId ?? null,
29
+ contentHistoryCount: facts.contentHistoryCount ?? 0,
30
+ showFullPrint: facts.showFullPrint ?? false,
31
+ isCapturing: facts.isCapturing ?? false,
32
+ groupMessageIds: facts.groupMessageIds ?? [facts.messageId]
33
+ }
34
+ }
35
+ };
36
+ }
37
+ export {
38
+ buildChatMessageActions
39
+ };
@@ -1,3 +1,4 @@
1
+ import "../rich-document/chat-message-source.js";
1
2
  import type { MessagePart, RenderBlockPayload } from "@ai-matrx/agents/generated/stream-events";
2
3
  export declare function AgentUserMessageContent({ conversationId, text, attachmentParts, bodyBlocks, variables, }: {
3
4
  conversationId: string;
@@ -4,7 +4,6 @@ import { useEffect, useMemo, useState } from "react";
4
4
  import { ChevronDown, ChevronUp } from "lucide-react";
5
5
  import { cn } from "@ai-matrx/design-system";
6
6
  import { useAppDispatch, useAppSelector } from "../../../../store/hooks.js";
7
- import { EditInPlace } from "../../../../host/ui-slots.js";
8
7
  import { USER_EDIT_ACTIONS, routeUserEditAction } from "../message-options/userEditActions.js";
9
8
  import {
10
9
  selectMessageById,
@@ -37,7 +36,8 @@ import {
37
36
  } from "../../../redux/execution-system/instance-variable-values/instance-variable-values.selectors.js";
38
37
  import { MessageAttachmentStrip } from "../MessageAttachmentStrip.js";
39
38
  import { isAttachmentMessagePart } from "../../context-items/normalize.js";
40
- import { MarkdownStream } from "../../../../host/markdown-slots.js";
39
+ import { MarkdownStream } from "../../../../ui/markdown-stream/MarkdownStream.js";
40
+ import "../rich-document/chat-message-source.js";
41
41
  import { literalUserText } from "./literal-user-text.js";
42
42
  import { buildVariableDisplayLines } from "../../../utils/variable-display-lines.js";
43
43
  import {
@@ -46,6 +46,8 @@ import {
46
46
  } from "../../../redux/execution-system/messages/transcript-journal.js";
47
47
  import { selectIsSuperAdmin } from "../../../../host/identity.js";
48
48
  import { Button } from "@ai-matrx/design-system/controls";
49
+ import { useConversationAbilities } from "../../../redux/execution-system/host-conversations/conversation-abilities.js";
50
+ import { EditInPlace } from "@ai-matrx/rich-editor/in-place/EditInPlace";
49
51
  function AgentUserMessageContent({
50
52
  conversationId,
51
53
  text,
@@ -128,6 +130,7 @@ function AgentUserMessage({
128
130
  const [isHovered, setIsHovered] = useState(false);
129
131
  const dispatch = useAppDispatch();
130
132
  const [editingText, setEditingText] = useState(false);
133
+ const { database } = useConversationAbilities();
131
134
  const content = extractFlatText(record);
132
135
  const inspectable = extractInspectableText(record);
133
136
  const attachmentParts = extractContentBlocks(record).filter(
@@ -140,7 +143,7 @@ function AgentUserMessage({
140
143
  [record]
141
144
  );
142
145
  const trimmedText = content.trim();
143
- const canEditText = !inspectable.isStructuredRaw && trimmedText.length > 0;
146
+ const canEditText = database && !inspectable.isStructuredRaw && trimmedText.length > 0;
144
147
  const metadata = record?.metadata && typeof record.metadata === "object" ? record.metadata : null;
145
148
  const contextReceipt = useAppSelector(
146
149
  useMemo(() => selectMessageContextReceipt(conversationId, messageId), [conversationId, messageId])
@@ -301,7 +304,7 @@ function AgentUserMessage({
301
304
  }
302
305
  }
303
306
  ),
304
- machineFramesVisible && contextReceipt && (contextReceipt.rows?.length ?? 0) > 0 ? /* @__PURE__ */ jsx("div", { className: "flex flex-wrap items-center gap-1.5", children: /* @__PURE__ */ jsx(
307
+ !database ? null : machineFramesVisible && contextReceipt && (contextReceipt.rows?.length ?? 0) > 0 ? /* @__PURE__ */ jsx("div", { className: "flex flex-wrap items-center gap-1.5", children: /* @__PURE__ */ jsx(
305
308
  MessageContextReceipt,
306
309
  {
307
310
  conversationId,
@@ -7,7 +7,7 @@ import {
7
7
  extractFlatText,
8
8
  selectMessageById
9
9
  } from "../../../redux/execution-system/messages/messages.selectors.js";
10
- import { BasicMarkdownContent } from "../../../../host/markdown-slots.js";
10
+ import { BasicMarkdownContent } from "@ai-matrx/rich-content/display/chat-markdown/BasicMarkdownContent";
11
11
  const PREFIX_RE = /^\[Collaboration note\]\s+Agent\s+'([^']+)'[^\n]*(?:\n|$)/;
12
12
  function CollabNoteMessage({
13
13
  conversationId,
@@ -1,7 +1,11 @@
1
1
  "use client";
2
2
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
3
- import { RegistryActionMenu, buildChatMessageActions, useDocumentDialogsHost } from "../../../../host/rich-document-slots.js";
4
- import { useState, Suspense, useCallback } from "react";
3
+ import { useDocumentDialogsHost } from "@ai-matrx/rich-content/host/app-bindings";
4
+ import { buildChatMessageActions } from "../rich-document/chatMessageActions.js";
5
+ import { useState, Suspense, useCallback, lazy } from "react";
6
+ const RegistryActionMenu = lazy(
7
+ () => import("@ai-matrx/rich-content/rich-document/variants/RegistryActionMenu").then((m) => ({ default: m.RegistryActionMenu }))
8
+ );
5
9
  import { Edit, Send, MoreHorizontal, Pin, PinOff, Loader2 } from "lucide-react";
6
10
  import {
7
11
  togglePinnedMessage,
@@ -12,7 +16,9 @@ import {
12
16
  TapTargetButtonForGroup,
13
17
  TapTargetButtonGroup
14
18
  } from "@ai-matrx/tap-target";
15
- import { CopySplit, SpeakerButton } from "../../../../host/ui-slots.js";
19
+ import { SpeakerButton } from "../../../../host/ui-slots.js";
20
+ import { CopySplitButton } from "@ai-matrx/rich-content/copy/CopySplitButton";
21
+ import { copyRichContent } from "@ai-matrx/rich-content/copy/copy-commands";
16
22
  import { useAppDispatch, useAppSelector, useAppStore } from "../../../../store/hooks.js";
17
23
  import { useOpenFullScreenMarkdownEditorBridge } from "../../../../host/window-openers.js";
18
24
  import { selectMessagePosition } from "../../../redux/execution-system/messages/messages.selectors.js";
@@ -21,6 +27,7 @@ import { toast } from "../../../../host/notify.js";
21
27
  import { DeleteMessageDialog } from "../message-options/DeleteMessageDialog.js";
22
28
  import { openStructuredRawViewer } from "../message-options/openAssistantMessageEditor.js";
23
29
  import { extractErrorMessage } from "@ai-matrx/data/net";
30
+ import { useConversationAbilities } from "../../../redux/execution-system/host-conversations/conversation-abilities.js";
24
31
  import {
25
32
  USER_EDIT_ACTIONS,
26
33
  routeUserEditAction
@@ -68,6 +75,7 @@ function UserActionBar({
68
75
  const dispatch = useAppDispatch();
69
76
  const store = useAppStore();
70
77
  const openEditor = useOpenFullScreenMarkdownEditorBridge();
78
+ const { database } = useConversationAbilities();
71
79
  const isPinned = usePinnedMessageIds().has(messageId);
72
80
  const pinPending = usePendingPinMessageIds().has(messageId);
73
81
  const [showOptionsMenu, setShowOptionsMenu] = useState(false);
@@ -175,44 +183,46 @@ function UserActionBar({
175
183
  const canFork = (messagePosition ?? 0) > 0;
176
184
  return /* @__PURE__ */ jsxs(Fragment, { children: [
177
185
  /* @__PURE__ */ jsxs(TapTargetButtonGroup, { surface: "solid", children: [
178
- /* @__PURE__ */ jsx(CopySplit, { text: content, label: "Copy message" }),
186
+ /* @__PURE__ */ jsx(CopySplitButton, { copy: (flavor) => copyRichContent(content, flavor), label: "Copy message" }),
179
187
  /* @__PURE__ */ jsx(SpeakerButton, { text: content, variant: "group" }),
180
- /* @__PURE__ */ jsx(
181
- TapTargetButtonForGroup,
182
- {
183
- onClick: handleEdit,
184
- ariaLabel: "Edit message",
185
- icon: /* @__PURE__ */ jsx(Edit, { className: "w-4 h-4 text-muted-foreground" })
186
- }
187
- ),
188
- /* @__PURE__ */ jsx(
189
- TapTargetButtonForGroup,
190
- {
191
- onClick: handleEdit,
192
- ariaLabel: "Edit and resubmit",
193
- icon: /* @__PURE__ */ jsx(Send, { className: "w-4 h-4 text-cyan-500 dark:text-cyan-400" })
194
- }
195
- ),
196
- /* @__PURE__ */ jsx(
197
- TapTargetButtonForGroup,
198
- {
199
- onClick: () => void togglePinnedMessage(messageId),
200
- ariaLabel: pinPending ? isPinned ? "Unpinning\u2026" : "Pinning\u2026" : isPinned ? "Unpin message" : "Pin message",
201
- disabled: pinPending,
202
- 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" })
203
- }
204
- ),
205
- showOptions && /* @__PURE__ */ jsx(
206
- TapTargetButtonForGroup,
207
- {
208
- ref: setMoreOptionsAnchor,
209
- onClick: () => setShowOptionsMenu(true),
210
- ariaLabel: "More options",
211
- icon: /* @__PURE__ */ jsx(MoreHorizontal, { className: "w-4 h-4 text-muted-foreground" })
212
- }
213
- )
188
+ database ? /* @__PURE__ */ jsxs(Fragment, { children: [
189
+ /* @__PURE__ */ jsx(
190
+ TapTargetButtonForGroup,
191
+ {
192
+ onClick: handleEdit,
193
+ ariaLabel: "Edit message",
194
+ icon: /* @__PURE__ */ jsx(Edit, { className: "w-4 h-4 text-muted-foreground" })
195
+ }
196
+ ),
197
+ /* @__PURE__ */ jsx(
198
+ TapTargetButtonForGroup,
199
+ {
200
+ onClick: handleEdit,
201
+ ariaLabel: "Edit and resubmit",
202
+ icon: /* @__PURE__ */ jsx(Send, { className: "w-4 h-4 text-cyan-500 dark:text-cyan-400" })
203
+ }
204
+ ),
205
+ /* @__PURE__ */ jsx(
206
+ TapTargetButtonForGroup,
207
+ {
208
+ onClick: () => void togglePinnedMessage(messageId),
209
+ ariaLabel: pinPending ? isPinned ? "Unpinning\u2026" : "Pinning\u2026" : isPinned ? "Unpin message" : "Pin message",
210
+ disabled: pinPending,
211
+ 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
+ }
213
+ ),
214
+ showOptions && /* @__PURE__ */ jsx(
215
+ TapTargetButtonForGroup,
216
+ {
217
+ ref: setMoreOptionsAnchor,
218
+ onClick: () => setShowOptionsMenu(true),
219
+ ariaLabel: "More options",
220
+ icon: /* @__PURE__ */ jsx(MoreHorizontal, { className: "w-4 h-4 text-muted-foreground" })
221
+ }
222
+ )
223
+ ] }) : null
214
224
  ] }),
215
- showOptions && showOptionsMenu && /* @__PURE__ */ jsx(Suspense, { fallback: null, children: /* @__PURE__ */ jsx(
225
+ database && showOptions && showOptionsMenu && /* @__PURE__ */ jsx(Suspense, { fallback: null, children: /* @__PURE__ */ jsx(
216
226
  RegistryActionMenu,
217
227
  {
218
228
  isOpen: showOptionsMenu,
@@ -65,6 +65,7 @@ export declare function makeSelectConversationRequests(conversationId: string):
65
65
  agentSettings: import("../../../redux/agent-settings/types.js").AgentSettingsState;
66
66
  conversationAttachments: import("../../../connectors/attachments.slice.js").AttachmentsSliceState;
67
67
  chatHost: import("../../../../store/chat-host.slice.js").ChatHostState;
68
+ hostConversations: import("../../../redux/execution-system/host-conversations/host-conversations.slice.js").HostConversationsState;
68
69
  } & import("../../../../store/root-state.js").ChatHostReadSlices) => ActiveRequest[]) & {
69
70
  clearCache: () => void;
70
71
  resultsCount: () => number;
@@ -26,6 +26,7 @@ import {
26
26
  } from "../../redux/execution-system/messages/messages.slice.js";
27
27
  import { selectStreamPhase } from "../../redux/execution-system/selectors/aggregate.selectors.js";
28
28
  import { selectShowCreatorPanel } from "../../../host/prefs.js";
29
+ import { ConversationAbilitiesProvider } from "../../redux/execution-system/host-conversations/conversation-abilities.js";
29
30
  import {
30
31
  TranscriptAudienceProvider
31
32
  } from "./transcript-audience.js";
@@ -202,7 +203,7 @@ function AgentConversationColumn({
202
203
  }, []);
203
204
  const edgeScroll = constrainWidth && edgeToEdgeScroll;
204
205
  const centerWrap = edgeScroll ? cn(ASSISTANT_MESSAGE_COLUMN_CLASS, ASSISTANT_MESSAGE_COLUMN_INSET_CLASS) : "contents";
205
- return /* @__PURE__ */ jsx(TranscriptAudienceProvider, { audience, children: /* @__PURE__ */ jsxs(
206
+ return /* @__PURE__ */ jsx(ConversationAbilitiesProvider, { conversationId: displayId, children: /* @__PURE__ */ jsx(TranscriptAudienceProvider, { audience, children: /* @__PURE__ */ jsxs(
206
207
  "div",
207
208
  {
208
209
  className: cn(
@@ -347,7 +348,7 @@ function AgentConversationColumn({
347
348
  )
348
349
  ]
349
350
  }
350
- ) });
351
+ ) }) });
351
352
  }
352
353
  export {
353
354
  AgentConversationColumn
@@ -1,4 +1,4 @@
1
- import type { RichDocumentSource } from "../../../host/rich-document-slots.js";
1
+ import type { ContentSource as RichDocumentSource } from "@ai-matrx/rich-content/rich-document/types";
2
2
  import type { WorkingDocumentKind } from "../../redux/execution-system/instance-working-document/instance-working-document.slice.js";
3
3
  import { type WorkingDocumentSurfaceContext } from "./workingDocumentSurface.js";
4
4
  interface WorkingDocumentEditorProps {
@@ -31,7 +31,8 @@ import {
31
31
  detachScratchpadFromConversationThunk,
32
32
  setScratchpadGateThunk
33
33
  } from "../../redux/execution-system/instance-working-document/scratchpad.thunks.js";
34
- import { RichDocumentActionProvider, RichDocumentActionSurface } from "../../../host/rich-document-slots.js";
34
+ import { RichDocumentActionProvider } from "@ai-matrx/rich-content/rich-document/RichDocumentActionProvider";
35
+ import { RichDocumentActionSurface } from "@ai-matrx/rich-content/rich-document/RichDocumentActionSurface";
35
36
  import { WorkingDocumentEditor } from "./WorkingDocumentEditor.js";
36
37
  import {
37
38
  sourceFeatureForKind