@ai-matrx/chat 0.4.2 → 0.4.8
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 +60 -0
- package/dist/agent-copy/RichCopySplit.d.ts +17 -0
- package/dist/agent-copy/RichCopySplit.js +34 -0
- package/dist/agents/components/agent-widgets/chat-assistant/AssistantMessageCard.js +1 -1
- package/dist/agents/components/chat/ConversationRecordsChip.js +1 -1
- package/dist/agents/components/context-items/bodies/WorkingDocumentBody.d.ts +5 -2
- package/dist/agents/components/context-items/bodies/WorkingDocumentBody.js +6 -1
- package/dist/agents/components/context-policies-display/ContextValueBody.js +1 -1
- package/dist/agents/components/context-preview/ContextCompareView.js +1 -1
- package/dist/agents/components/custom-agent/CustomAgentWindow.js +1 -1
- package/dist/agents/components/inputs/smart-input/AgentTextarea.d.ts +6 -1
- package/dist/agents/components/inputs/smart-input/AgentTextarea.js +2 -2
- package/dist/agents/components/inputs/smart-input/ComposerToolsNotice.d.ts +1 -0
- package/dist/agents/components/inputs/smart-input/ComposerToolsNotice.js +5 -0
- package/dist/agents/components/inputs/smart-input/ConversationContextRail.d.ts +5 -1
- package/dist/agents/components/inputs/smart-input/ConversationContextRail.js +6 -1
- package/dist/agents/components/inputs/smart-input/InboxQueueStrip.d.ts +6 -1
- package/dist/agents/components/inputs/smart-input/InboxQueueStrip.js +6 -1
- package/dist/agents/components/inputs/smart-input/InputActionButtons.js +8 -6
- package/dist/agents/components/inputs/smart-input/SmartInputFileDropTarget.d.ts +5 -1
- package/dist/agents/components/inputs/smart-input/SmartInputFileDropTarget.js +8 -1
- package/dist/agents/components/inputs/smart-input/composer/ComposerAgentPill.js +2 -2
- package/dist/agents/components/inputs/smart-input/composer/ComposerChipsRow.d.ts +5 -2
- package/dist/agents/components/inputs/smart-input/composer/ComposerChipsRow.js +6 -1
- package/dist/agents/components/inputs/smart-input/composer/ComposerMetaRow.d.ts +6 -8
- package/dist/agents/components/inputs/smart-input/composer/ComposerMetaRow.js +13 -1
- package/dist/agents/components/inputs/smart-input/composer/useOutputShapeCatalog.d.ts +1 -1
- package/dist/agents/components/inputs/smart-input/composer/useOutputShapeCatalog.js +1 -1
- package/dist/agents/components/live-run/LiveRunDisplay.js +1 -1
- package/dist/agents/components/live-run/RunSetDisplay.js +1 -1
- package/dist/agents/components/memory/components/AgentMemoryAllView.js +1 -1
- package/dist/agents/components/messages-display/assistant/AgentAssistantMessage.d.ts +1 -0
- package/dist/agents/components/messages-display/assistant/AgentAssistantMessage.js +4 -3
- package/dist/agents/components/messages-display/assistant/AgentEmptyMessageDisplay.js +1 -1
- package/dist/agents/components/messages-display/assistant/AssistantMessageFooter.d.ts +2 -2
- package/dist/agents/components/messages-display/assistant/AssistantMessageFooter.js +4 -7
- package/dist/agents/components/messages-display/assistant/InPlaceAnswerEditor.js +2 -2
- package/dist/agents/components/messages-display/citations/MessageSourcesRow.js +1 -1
- package/dist/agents/components/messages-display/rich-document/chat-message-source.d.ts +2 -0
- package/dist/agents/components/messages-display/rich-document/chat-message-source.js +41 -0
- package/dist/agents/components/messages-display/rich-document/chatMessageActions.d.ts +31 -0
- package/dist/agents/components/messages-display/rich-document/chatMessageActions.js +39 -0
- package/dist/agents/components/messages-display/user/AgentUserMessage.d.ts +1 -0
- package/dist/agents/components/messages-display/user/AgentUserMessage.js +7 -4
- package/dist/agents/components/messages-display/user/CollabNoteMessage.js +1 -1
- package/dist/agents/components/messages-display/user/UserActionBar.js +49 -39
- package/dist/agents/components/working-document/WorkingDocumentEditor.d.ts +1 -1
- package/dist/agents/components/working-document/WorkingDocumentPanel.js +2 -1
- package/dist/agents/identity/run-tier-store.js +3 -0
- package/dist/agents/redux/agent-definition/cache-bust-middleware.js +2 -0
- package/dist/agents/redux/agent-settings/agentSettingsSlice.d.ts +0 -4
- package/dist/agents/redux/agent-settings/agentSettingsSlice.js +12 -5
- package/dist/agents/redux/execution-system/host-conversations/host-conversation.thunks.d.ts +4 -1
- package/dist/agents/redux/execution-system/host-conversations/host-conversation.thunks.js +45 -0
- package/dist/agents/redux/execution-system/inbox/inbox-turn-end.middleware.js +2 -1
- package/dist/agents/redux/execution-system/instance-ui-state/run-configuration-persist.js +2 -0
- package/dist/agents/redux/execution-system/messages/messages.selectors.js +1 -1
- package/dist/agents/redux/execution-system/thunks/execute-instance.thunk.js +6 -0
- package/dist/agents/redux/execution-system/thunks/process-stream.js +25 -12
- package/dist/agents/redux/execution-system/thunks/run-headless-agent-json.d.ts +2 -0
- package/dist/agents/redux/execution-system/thunks/run-headless-agent-json.js +25 -4
- package/dist/agents/redux/execution-system/utils/assemble-cx-content-blocks.js +2 -1
- package/dist/agents/redux/execution-system/utils/inbound-render-block.d.ts +8 -0
- package/dist/agents/redux/execution-system/utils/inbound-render-block.js +17 -2
- package/dist/agents/redux/execution-system/utils/normalize-content-blocks.js +1 -1
- package/dist/agents/redux/execution-system/utils/progress-data-block.d.ts +11 -0
- package/dist/agents/redux/execution-system/utils/progress-data-block.js +37 -0
- package/dist/agents/redux/execution-system/utils/stream-block-accumulator.js +10 -8
- package/dist/agents/redux/mcp/mcp.slice.js +15 -7
- package/dist/agents/redux/tools/tools.thunks.js +3 -0
- package/dist/agents/runtime-reconnect/ServerOperationBanner.d.ts +6 -1
- package/dist/agents/runtime-reconnect/ServerOperationBanner.js +6 -1
- package/dist/agents/runtime-reconnect/reconnect-server-operation.thunk.js +10 -6
- package/dist/agents/ui-first-tools/ui/ApprovalCard.js +1 -1
- package/dist/agents/ui-first-tools/ui/AskCard.js +1 -1
- package/dist/agents/ui-first-tools/ui/lists/TaskPanel.js +1 -1
- package/dist/conversation/hooks/useDomCapturePrint.js +1 -1
- package/dist/conversation/utils/markdown-print.js +1 -1
- package/dist/cx-chat/components/messages/AssistantMessage.js +3 -5
- package/dist/cx-conversation/AssistantMessage.js +3 -5
- package/dist/host/app-data-slots.d.ts +85 -0
- package/dist/host/app-data-slots.js +42 -0
- package/dist/host/bare-host-chrome.js +1 -0
- package/dist/host/defaults/prefs.d.ts +19 -0
- package/dist/host/defaults/prefs.js +52 -0
- package/dist/host/defaults/workspace-gate.js +2 -1
- package/dist/host/index.d.ts +1 -1
- package/dist/host/index.js +2 -1
- package/dist/host/react.js +16 -1
- package/dist/host/source.d.ts +21 -0
- package/dist/host/ui-slots.d.ts +1 -23
- package/dist/host/ui-slots.js +0 -34
- package/dist/public-chat/components/PublicMessageOptionsMenu.js +2 -1
- package/dist/surfaces/redux/surfaceConfigSlice.js +2 -0
- package/dist/surfaces/redux/userStateSlice.js +3 -1
- package/dist/surfaces/runtime/agent-offer.js +1 -1
- package/dist/surfaces/runtime/surface-writeback.js +1 -1
- package/dist/tool-call-visualization/db-renderer/fetchToolRendererRow.js +2 -0
- package/dist/tool-call-visualization/renderers/agent-call/AgentCallInline.js +1 -1
- package/dist/tool-call-visualization/renderers/agent-call/CollabCallCard.js +1 -1
- package/dist/tool-call-visualization/renderers/fs/FsInline.js +1 -1
- package/dist/tool-call-visualization/renderers/random-wheel/RandomWheelInline.js +1 -1
- package/dist/tool-call-visualization/renderers/research/ResearchOverlay.js +4 -4
- package/dist/tool-call-visualization/renderers/research/SubagentReportBlock.js +2 -2
- package/dist/tool-call-visualization/renderers/scrape/ScrapeOverlay.js +1 -1
- package/dist/tool-call-visualization/renderers/search/SearchInline.js +1 -1
- package/dist/tool-call-visualization/renderers/search/SearchOverlay.js +1 -1
- package/dist/tool-call-visualization/renderers/sql/SqlInline.js +1 -1
- package/dist/tool-call-visualization/result-fields/KeyValueGrid.js +1 -1
- package/dist/tool-call-visualization/result-fields/ResultMarkdown.js +1 -1
- package/dist/tool-call-visualization/result-fields/ResultValue.js +1 -1
- package/dist/tool-call-visualization/surface-write/SurfaceWriteDiff.js +1 -1
- package/dist/ui/AudioOutputBlockSkeleton.d.ts +17 -0
- package/dist/ui/AudioOutputBlockSkeleton.js +78 -0
- package/dist/ui/chat-protocol-from-stream.d.ts +60 -0
- package/dist/ui/chat-protocol-from-stream.js +135 -0
- package/dist/ui/markdown-stream/EnhancedChatMarkdown.d.ts +59 -0
- package/dist/ui/markdown-stream/EnhancedChatMarkdown.js +1108 -0
- package/dist/ui/markdown-stream/MarkdownStream.d.ts +88 -0
- package/dist/ui/markdown-stream/MarkdownStream.js +14 -0
- package/dist/ui/markdown-stream/MarkdownStreamImpl.d.ts +4 -0
- package/dist/ui/markdown-stream/MarkdownStreamImpl.js +86 -0
- package/dist/ui/markdown-stream/StreamAwareChatMarkdown.d.ts +58 -0
- package/dist/ui/markdown-stream/StreamAwareChatMarkdown.js +294 -0
- package/dist/ui/markdown-stream/internal-handlers/AgentCallChildTrace.d.ts +22 -0
- package/dist/ui/markdown-stream/internal-handlers/AgentCallChildTrace.js +128 -0
- package/dist/ui/markdown-stream/internal-handlers/InlineAssistantError.d.ts +3 -0
- package/dist/ui/markdown-stream/internal-handlers/InlineAssistantError.js +26 -0
- package/dist/ui/markdown-stream/internal-handlers/InlineThinkingSlot.d.ts +14 -0
- package/dist/ui/markdown-stream/internal-handlers/InlineThinkingSlot.js +23 -0
- package/dist/ui/markdown-stream/internal-handlers/ToolHandlers.d.ts +42 -0
- package/dist/ui/markdown-stream/internal-handlers/ToolHandlers.js +109 -0
- package/dist/ui/markdown-stream/useBoundAgentOutputSchema.d.ts +2 -0
- package/dist/ui/markdown-stream/useBoundAgentOutputSchema.js +33 -0
- package/dist/window-panels/windows/agents/AgentAssistantMarkdownDebugWindow.js +1 -1
- package/package.json +10 -8
- package/dist/host/content-ir-slots.d.ts +0 -235
- package/dist/host/content-ir-slots.js +0 -135
- package/dist/host/markdown-slots.d.ts +0 -53
- package/dist/host/markdown-slots.js +0 -32
- package/dist/host/rich-document-slots.d.ts +0 -123
- package/dist/host/rich-document-slots.js +0 -36
- package/dist/utils/content-ir/report-kind-at-raw-renderer.d.ts +0 -19
- package/dist/utils/content-ir/report-kind-at-raw-renderer.js +0 -32
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,65 @@
|
|
|
1
1
|
# @ai-matrx/chat
|
|
2
2
|
|
|
3
|
+
## 0.4.8
|
|
4
|
+
|
|
5
|
+
Automatic changed-only republish (docs/metadata drift since the last tag — see
|
|
6
|
+
`git diff npm/chat/v0.4.7..npm/chat/v0.4.8 -- apps/shared/chat`).
|
|
7
|
+
No source changes intended and no consumer action required.
|
|
8
|
+
|
|
9
|
+
## 0.4.7
|
|
10
|
+
|
|
11
|
+
- The host-source column test gets an explicit 120s budget: the column now renders the real text engine
|
|
12
|
+
(rich-content / rich-editor imported directly), and a cold CI transform exceeded jest's 30s default (0.4.6's gate).
|
|
13
|
+
|
|
14
|
+
## 0.4.6
|
|
15
|
+
### Unreleased
|
|
16
|
+
### Headless JSON: the server's `structured_output` wins; a one-typo document is recovered whole
|
|
17
|
+
|
|
18
|
+
- `processStream` records the server's successful `structured_output` payload as the first extracted JSON value at finalize (it outranks anything parsed from the answer text). Text parsing gets whole-document repair through kit `json-extract` (describe box, 2026-10-08: 8,363-char answer, `extractedCount` 0).
|
|
19
|
+
### Chat renders formatted text on any host (P29a): the engine is a direct dependency
|
|
20
|
+
|
|
21
|
+
- The message renderer now lives in chat: `ui/markdown-stream/MarkdownStream` (+ `MarkdownStreamImpl`,
|
|
22
|
+
`StreamAwareChatMarkdown`, `EnhancedChatMarkdown`, `internal-handlers/{ToolHandlers, AgentCallChildTrace,
|
|
23
|
+
InlineAssistantError, InlineThinkingSlot}`, `useBoundAgentOutputSchema`), `ui/chat-protocol-from-stream`,
|
|
24
|
+
`ui/AudioOutputBlockSkeleton`, `agent-copy/RichCopySplit`, `agents/redux/execution-system/utils/progress-data-block`,
|
|
25
|
+
`agents/components/messages-display/rich-document/{chatMessageActions, chat-message-source}` (chat registers its
|
|
26
|
+
own `chat-message` rich-document source adapter). Moved from matrx-frontend; the shell is client-only via
|
|
27
|
+
`React.lazy` (no `next/dynamic`), so a plain React host renders it.
|
|
28
|
+
- Removed `host/markdown-slots`, `host/content-ir-slots`, `host/rich-document-slots`: chat imports the kind and
|
|
29
|
+
component registries, envelope memo, kind correctors, splitter and rich-document bars/menus from
|
|
30
|
+
`@ai-matrx/rich-content` (its host capabilities carry the app's registries with honest bare defaults).
|
|
31
|
+
- New `host/app-data-slots`: only app data stays a slot — `contentIrKindValidator`, `AnchorRecordsList`,
|
|
32
|
+
`useAnchorRecords`, `fetchShapePage`, `fetchShapeByKind`, `useOpenCitationSource`, `FullScreenMarkdownEditor`.
|
|
33
|
+
- `<ChatProvider>` mounts a diagnostics-only `AlchemyActionsProvider` when the host has none (the message bars need it).
|
|
34
|
+
- A host with no database never reads stored tool renderers (the generic card draws).
|
|
35
|
+
- Host action: delete `chatMarkdownRegistration`, `chatContentIrRegistration`, `chatRichDocumentRegistration`;
|
|
36
|
+
register the app-data slots; import moved modules from their chat paths.
|
|
37
|
+
|
|
38
|
+
## 0.4.5
|
|
39
|
+
|
|
40
|
+
- 0.4.3's release gate stopped at the front-door canary: the host-source screen (`AgentConversationColumn`,
|
|
41
|
+
`host-conversations/useHostConversation`) is now in `FRONT_DOOR`. Carries 0.4.3 (chat imports rich-content /
|
|
42
|
+
rich-editor directly; package slots removed).
|
|
43
|
+
|
|
44
|
+
## 0.4.4
|
|
45
|
+
|
|
46
|
+
Automatic changed-only republish (docs/metadata drift since the last tag — see
|
|
47
|
+
`git diff npm/chat/v0.4.2..npm/chat/v0.4.4 -- apps/shared/chat`).
|
|
48
|
+
No source changes intended and no consumer action required.
|
|
49
|
+
|
|
50
|
+
## 0.4.3
|
|
51
|
+
### Chat reaches the text engine directly, never through a slot
|
|
52
|
+
|
|
53
|
+
- `RichContent`, `RichDocument`, `copyRichContent`, `copyContent`, `CopySplit`, `InPlaceEditor`, `EditInPlace`,
|
|
54
|
+
`useInPlaceTrigger`, `useTextareaFormatting` (ui-slots) and `BasicMarkdownContent`, `renderAllDiagrams`,
|
|
55
|
+
`drawMermaidForPrint` (markdown-slots) are no longer host slots: chat imports them from
|
|
56
|
+
`@ai-matrx/rich-content` / `@ai-matrx/rich-editor` (now a dependency). A host must stop registering them.
|
|
57
|
+
- `utils/content-ir/report-kind-at-raw-renderer` is gone: the one "already reported" list is
|
|
58
|
+
`@ai-matrx/rich-content/utils/report-kind-at-raw-renderer`.
|
|
59
|
+
- Guard: `pnpm check:no-package-slots` (`--self-test`; `--host <dir>` checks a host's registrations) fails when a
|
|
60
|
+
slot is named for a rich-content / rich-editor export or a host registers one. Shrink-only allowlist:
|
|
61
|
+
`scripts/package-slots.allowlist.json`.
|
|
62
|
+
|
|
3
63
|
## 0.4.2
|
|
4
64
|
### P29a round 2 (a bare host is a real app)
|
|
5
65
|
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { MatrxCopyMenuProps } from "@ai-matrx/alchemy/react/workspace";
|
|
3
|
+
export type RichCopySplitProps = MatrxCopyMenuProps & {
|
|
4
|
+
human: NonNullable<MatrxCopyMenuProps["human"]>;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* THE split Copy of a markdown host (Arman, 2026-10-04: "one click to get either the markdown
|
|
8
|
+
* version or the no-markup version"). One click copies the person's flavor (`copy.default_flavor`);
|
|
9
|
+
* the chevron offers exactly Copy markdown and Copy plain text (2026-10-07). The Alchemy palette
|
|
10
|
+
* (formatted, JSON, download, AI, the host's record copies) is "Export…" — ONE row under a divider
|
|
11
|
+
* at the bottom of the chevron menu, since these hosts have no rich-document ⋯ of their own. The
|
|
12
|
+
* split stays the one visible copy control. The button and the rows end in
|
|
13
|
+
* `copyRichContent` over the same `human` — they cannot disagree.
|
|
14
|
+
* Guard: matrx-frontend components/matrx/buttons/__tests__/rich-copy-hosts.census.test.ts. The Export…
|
|
15
|
+
* palette is the host's `CopyButtons` (chat ui-slot); a host without it still copies both flavors.
|
|
16
|
+
*/
|
|
17
|
+
export declare function RichCopySplit(props: RichCopySplitProps): React.JSX.Element;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { CopySplitButton } from "@ai-matrx/rich-content/copy/CopySplitButton";
|
|
5
|
+
import { copyRichContent } from "@ai-matrx/rich-content/copy/copy-commands";
|
|
6
|
+
import { ExportPaletteAnchor, openExportPalette, useExportPaletteKey } from "@ai-matrx/rich-content/copy/ExportPalette";
|
|
7
|
+
import { cn } from "@ai-matrx/design-system";
|
|
8
|
+
import { CopyButtons } from "../host/ui-slots.js";
|
|
9
|
+
function RichCopySplit(props) {
|
|
10
|
+
const { human, className, size } = props;
|
|
11
|
+
const palette = React.useRef(null);
|
|
12
|
+
const copy = React.useCallback(
|
|
13
|
+
(flavor) => copyRichContent(typeof human === "function" ? human() : human, flavor),
|
|
14
|
+
[human]
|
|
15
|
+
);
|
|
16
|
+
const splitSize = size === "xs" || size === "icon" ? "xs" : "sm";
|
|
17
|
+
const exportKey = useExportPaletteKey();
|
|
18
|
+
return /* @__PURE__ */ jsxs("span", { className: cn("inline-flex shrink-0 items-center", className), children: [
|
|
19
|
+
/* @__PURE__ */ jsx(
|
|
20
|
+
CopySplitButton,
|
|
21
|
+
{
|
|
22
|
+
copy,
|
|
23
|
+
size: splitSize,
|
|
24
|
+
label: `Copy ${props.label ?? ""}`.trim(),
|
|
25
|
+
onExport: () => void openExportPalette(exportKey)
|
|
26
|
+
}
|
|
27
|
+
),
|
|
28
|
+
/* @__PURE__ */ jsx(ExportPaletteAnchor, { exportKey, controllerRef: palette }),
|
|
29
|
+
/* @__PURE__ */ jsx(CopyButtons, { ...props, className: void 0, contentFlavor: "markdown", richCopyFlavors: [], triggerHidden: true, controllerRef: palette })
|
|
30
|
+
] });
|
|
31
|
+
}
|
|
32
|
+
export {
|
|
33
|
+
RichCopySplit
|
|
34
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { Webhook } from "lucide-react";
|
|
4
|
-
import { RichDocument } from "
|
|
4
|
+
import { RichDocument } from "@ai-matrx/rich-content/rich-document/RichDocument";
|
|
5
5
|
function AssistantMessageCard({
|
|
6
6
|
content,
|
|
7
7
|
timestamp,
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { type WorkingDocumentKind } from "../../../redux/execution-system/instance-working-document/instance-working-document.slice.js";
|
|
2
2
|
import type { ContextDrawerItem, ContextItemBodyProps } from "../types.js";
|
|
3
3
|
export declare function buildWorkingDocumentDrawerItem(conversationId: string, title?: string, kind?: WorkingDocumentKind): ContextDrawerItem;
|
|
4
|
-
|
|
4
|
+
type WorkingDocumentBodyProps = ContextItemBodyProps & {
|
|
5
5
|
initialKind?: WorkingDocumentKind;
|
|
6
|
-
}
|
|
6
|
+
};
|
|
7
|
+
/** Working documents are database rows: absent on a host-owned conversation with none (G-DOOR gate). */
|
|
8
|
+
export declare function WorkingDocumentBody(props: WorkingDocumentBodyProps): import("react").JSX.Element | null;
|
|
9
|
+
export {};
|
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
selectWorkingDocTitle
|
|
12
12
|
} from "../../../redux/execution-system/instance-working-document/instance-working-document.selectors.js";
|
|
13
13
|
import { DocumentsWorkspace } from "../../working-document/documents-workspace/DocumentsWorkspace.js";
|
|
14
|
+
import { useConversationAbilities } from "../../../redux/execution-system/host-conversations/conversation-abilities.js";
|
|
14
15
|
function buildWorkingDocumentDrawerItem(conversationId, title = "Working document", kind = "working") {
|
|
15
16
|
const isScratch = kind === "scratch";
|
|
16
17
|
return {
|
|
@@ -27,7 +28,11 @@ function buildWorkingDocumentDrawerItem(conversationId, title = "Working documen
|
|
|
27
28
|
raw: null
|
|
28
29
|
};
|
|
29
30
|
}
|
|
30
|
-
function WorkingDocumentBody({
|
|
31
|
+
function WorkingDocumentBody(props) {
|
|
32
|
+
const { database } = useConversationAbilities();
|
|
33
|
+
return database ? /* @__PURE__ */ jsx(WorkingDocumentBodyInner, { ...props }) : null;
|
|
34
|
+
}
|
|
35
|
+
function WorkingDocumentBodyInner({
|
|
31
36
|
item,
|
|
32
37
|
setTitle,
|
|
33
38
|
initialKind = "working"
|
|
@@ -15,8 +15,8 @@ import {
|
|
|
15
15
|
unwrapRichContextValue
|
|
16
16
|
} from "./contextValueUtils.js";
|
|
17
17
|
import { cn } from "@ai-matrx/design-system";
|
|
18
|
-
import { RichContent } from "../../../host/ui-slots.js";
|
|
19
18
|
import { JsonInspector } from "../../../host/ui-slots.js";
|
|
19
|
+
import { RichContent } from "@ai-matrx/rich-content/levels/RichContent";
|
|
20
20
|
function ContextValueBody({
|
|
21
21
|
type,
|
|
22
22
|
contextKey,
|
|
@@ -10,7 +10,6 @@ import { Badge, Button, Chip } from "@ai-matrx/design-system/controls";
|
|
|
10
10
|
import { Textarea } from "@ai-matrx/design-system";
|
|
11
11
|
import { Tabs, TabsContent, TabsList, TabsTrigger } from "../../../ui/tabs.js";
|
|
12
12
|
import { CopyButtons } from "../../../host/ui-slots.js";
|
|
13
|
-
import { RichContent } from "../../../host/ui-slots.js";
|
|
14
13
|
import { SystemItemsLine } from "./SystemItemsLine.js";
|
|
15
14
|
import { useAppDispatch } from "../../../store/hooks.js";
|
|
16
15
|
import { callApi } from "../../../host/server/call-api.js";
|
|
@@ -25,6 +24,7 @@ import { formatCount, formatDurationMs } from "@ai-matrx/kit/format";
|
|
|
25
24
|
import { getUserId } from "../../../host/identity.js";
|
|
26
25
|
import { humanizeIdentifier } from "@ai-matrx/kit/text-case";
|
|
27
26
|
import { useAgentName } from "../../identity/agent-identity.js";
|
|
27
|
+
import { RichContent } from "@ai-matrx/rich-content/levels/RichContent";
|
|
28
28
|
const CLASS_LOOK = {
|
|
29
29
|
defect: {
|
|
30
30
|
label: "Defect",
|
|
@@ -19,7 +19,7 @@ import { useAgentLauncher } from "../../hooks/useAgentLauncher.js";
|
|
|
19
19
|
import { fetchAgentExecutionMinimal } from "../../redux/agent-definition/thunks.js";
|
|
20
20
|
import { selectAgentVariableDefinitions } from "../../redux/agent-definition/selectors.js";
|
|
21
21
|
import { AgentPickerFrame } from "../../../window-panels/windows/agents/AgentPickerFrame.js";
|
|
22
|
-
import { bindConversationToApplyTarget } from "
|
|
22
|
+
import { bindConversationToApplyTarget } from "@ai-matrx/rich-content/rich-document/review/applyTargets";
|
|
23
23
|
import { ErrorAlchemyMenu } from "../../../host/ui-slots.js";
|
|
24
24
|
import {
|
|
25
25
|
SKIP,
|
|
@@ -58,7 +58,12 @@ interface AgentTextareaProps {
|
|
|
58
58
|
* of 16/28. Touch layouts still get 16px from THE iOS ZOOM FLOOR (globals.css).
|
|
59
59
|
*/
|
|
60
60
|
composerType?: boolean;
|
|
61
|
-
/**
|
|
61
|
+
/**
|
|
62
|
+
* With `composerType` (splash · page): the box holds two 32px composer rows
|
|
63
|
+
* empty and grows at the third line — but text keeps its normal 24px line
|
|
64
|
+
* (4px above, so the first line sits centred in the first row). A 32px LINE
|
|
65
|
+
* spaced every wrapped line like double spacing (Arman, 2026-10-07).
|
|
66
|
+
*/
|
|
62
67
|
composerRows?: boolean;
|
|
63
68
|
}
|
|
64
69
|
export declare function AgentTextarea({ conversationId, compact, singleRow, uploadRoot, uploadPath, surfaceKey, draftAlias, disableSend, initiallyExpanded, autoFocus, showExpandToggle, placeholder, minHeightPx, flush, composerType, composerRows, maxHeightPx, textMenu, }: AgentTextareaProps): React.JSX.Element;
|
|
@@ -33,13 +33,13 @@ import { useInstanceInputUndoRedo } from "../../../hooks/useInstanceInputUndoRed
|
|
|
33
33
|
import { ComposerDraftNotice } from "./ComposerDraftNotice.js";
|
|
34
34
|
import { ComposerToolsNotice } from "./ComposerToolsNotice.js";
|
|
35
35
|
import { EditableContextMenu } from "../../../../host/ui-slots.js";
|
|
36
|
-
import { useTextareaFormatting } from "../../../../host/ui-slots.js";
|
|
37
36
|
import {
|
|
38
37
|
smartExecute,
|
|
39
38
|
interruptAndSend
|
|
40
39
|
} from "../../../redux/execution-system/thunks/smart-execute.thunk.js";
|
|
41
40
|
import { selectUserVariableValues } from "../../../redux/execution-system/instance-variable-values/instance-variable-values.selectors.js";
|
|
42
41
|
import { Button } from "@ai-matrx/design-system/controls";
|
|
42
|
+
import { useTextareaFormatting } from "@ai-matrx/rich-editor/format/useTextareaFormatting";
|
|
43
43
|
function AgentTextarea({
|
|
44
44
|
conversationId,
|
|
45
45
|
compact = false,
|
|
@@ -307,7 +307,7 @@ ${insert}${base.slice(at)}`
|
|
|
307
307
|
onChange: (e) => handleTextChange(e.target.value),
|
|
308
308
|
onKeyDown: handleKeyDown,
|
|
309
309
|
placeholder: placeholderText,
|
|
310
|
-
className: `w-full bg-transparent border-none outline-none ${composerType ? composerRows ? "text-[15px] leading-
|
|
310
|
+
className: `w-full bg-transparent border-none outline-none ${composerType ? composerRows ? "text-[15px] leading-6 px-1.5 py-1" : "text-[15px] leading-6 px-2 py-1" : "text-base leading-7"} text-foreground placeholder:text-muted-foreground/60 resize-none overflow-y-auto scrollbar-hide ${// The height transition belongs to the expand/collapse toggles
|
|
311
311
|
// ONLY. While typing there is no transition class at all: a
|
|
312
312
|
// line-count change snaps instantly, and an unchanged line count
|
|
313
313
|
// writes nothing (see the auto-resize effect).
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { ChatRootState } from "../../../../store/root-state.js";
|
|
2
2
|
/** True when something attached needs a tool the switch is keeping out. */
|
|
3
3
|
export declare function selectAttachmentNeedsAutoTools(state: ChatRootState, conversationId: string): boolean;
|
|
4
|
+
/** Agent auto-tools are a database-backed run setting: absent on a host-owned conversation (G-DOOR gate). */
|
|
4
5
|
export declare function ComposerToolsNotice({ conversationId }: {
|
|
5
6
|
conversationId: string;
|
|
6
7
|
}): import("react").JSX.Element | null;
|
|
@@ -6,6 +6,7 @@ import { selectEffectiveAutoTools } from "../../../redux/execution-system/utils/
|
|
|
6
6
|
import { setBuilderAdvancedSettings } from "../../../redux/execution-system/instance-ui-state/instance-ui-state.slice.js";
|
|
7
7
|
import { selectAgentAutoToolsDisabled } from "../../../redux/agent-definition/selectors.js";
|
|
8
8
|
import { Button } from "@ai-matrx/design-system/controls";
|
|
9
|
+
import { useConversationAbilities } from "../../../redux/execution-system/host-conversations/conversation-abilities.js";
|
|
9
10
|
const TOOL_BACKED_RESOURCE_TYPES = /* @__PURE__ */ new Set([
|
|
10
11
|
"document",
|
|
11
12
|
"input_document",
|
|
@@ -26,6 +27,10 @@ function selectAttachmentNeedsAutoTools(state, conversationId) {
|
|
|
26
27
|
return Array.isArray(google) ? google.length > 0 : Boolean(google);
|
|
27
28
|
}
|
|
28
29
|
function ComposerToolsNotice({ conversationId }) {
|
|
30
|
+
const { database } = useConversationAbilities();
|
|
31
|
+
return database ? /* @__PURE__ */ jsx(ComposerToolsNoticeBody, { conversationId }) : null;
|
|
32
|
+
}
|
|
33
|
+
function ComposerToolsNoticeBody({ conversationId }) {
|
|
29
34
|
const dispatch = useAppDispatch();
|
|
30
35
|
const needsTools = useAppSelector(
|
|
31
36
|
(s) => selectAttachmentNeedsAutoTools(s, conversationId)
|
|
@@ -40,5 +40,9 @@ export interface AttachedContextRailItem {
|
|
|
40
40
|
*/
|
|
41
41
|
contextKey?: string;
|
|
42
42
|
}
|
|
43
|
-
|
|
43
|
+
/**
|
|
44
|
+
* Context entries, saved context rules, working documents and attachments all live in the
|
|
45
|
+
* database, so the rail is ABSENT on a host-owned conversation with none (G-DOOR gate).
|
|
46
|
+
*/
|
|
47
|
+
export declare function ConversationContextRail(props: ConversationContextRailProps): import("react").JSX.Element | null;
|
|
44
48
|
export {};
|
|
@@ -92,6 +92,7 @@ import { selectAgentContextPolicies } from "../../../redux/agent-definition/sele
|
|
|
92
92
|
import { ActiveContextLensChip } from "../../../../context/sources/scopes.js";
|
|
93
93
|
import { selectActiveScopeIdsByType } from "../../../../context/sources/scopes.js";
|
|
94
94
|
import { contextEntryLabel } from "../../context-policies-display/contextEntryLabel.js";
|
|
95
|
+
import { useConversationAbilities } from "../../../redux/execution-system/host-conversations/conversation-abilities.js";
|
|
95
96
|
function entryHasValue(e) {
|
|
96
97
|
const v = e.value;
|
|
97
98
|
if (v === void 0 || v === null) return false;
|
|
@@ -100,7 +101,11 @@ function entryHasValue(e) {
|
|
|
100
101
|
return false;
|
|
101
102
|
return true;
|
|
102
103
|
}
|
|
103
|
-
function ConversationContextRail({
|
|
104
|
+
function ConversationContextRail(props) {
|
|
105
|
+
const { database } = useConversationAbilities();
|
|
106
|
+
return database ? /* @__PURE__ */ jsx(ConversationContextRailBody, { ...props }) : null;
|
|
107
|
+
}
|
|
108
|
+
function ConversationContextRailBody({
|
|
104
109
|
conversationId,
|
|
105
110
|
className,
|
|
106
111
|
presentation = "default",
|
|
@@ -26,5 +26,10 @@ interface InboxQueueStripProps {
|
|
|
26
26
|
* for the card label so the user sees WHO left the note, not raw plumbing.
|
|
27
27
|
*/
|
|
28
28
|
export declare function parseCollabNoteAgent(text: string): string | null;
|
|
29
|
-
|
|
29
|
+
/**
|
|
30
|
+
* The platform's Turn-Boundary Inbox (server-held queued / steering messages). A host-owned
|
|
31
|
+
* conversation queues through its own source and shows its own queue, so the strip is absent
|
|
32
|
+
* there (G-DOOR gate).
|
|
33
|
+
*/
|
|
34
|
+
export declare function InboxQueueStrip(props: InboxQueueStripProps): React.JSX.Element | null;
|
|
30
35
|
export {};
|
|
@@ -32,6 +32,7 @@ import {
|
|
|
32
32
|
removeInboxItem
|
|
33
33
|
} from "../../../redux/execution-system/inbox/inbox.slice.js";
|
|
34
34
|
import { Button } from "@ai-matrx/design-system/controls";
|
|
35
|
+
import { useConversationAbilities } from "../../../redux/execution-system/host-conversations/conversation-abilities.js";
|
|
35
36
|
const queueActionClassName = "h-11 w-11 min-h-11 min-w-11 shrink-0 rounded p-0 text-muted-foreground hover:bg-muted hover:text-foreground lg:h-8 lg:w-8 lg:min-h-8 lg:min-w-8";
|
|
36
37
|
function statusLabel(item, running) {
|
|
37
38
|
if (item.status === "failed") return item.error ?? "Failed to send";
|
|
@@ -51,7 +52,11 @@ function parseCollabNoteAgent(text) {
|
|
|
51
52
|
const match = /^\[Collaboration note\]\s+Agent\s+'([^']+)'/.exec(text);
|
|
52
53
|
return match?.[1] ?? null;
|
|
53
54
|
}
|
|
54
|
-
function InboxQueueStrip(
|
|
55
|
+
function InboxQueueStrip(props) {
|
|
56
|
+
const { hosted } = useConversationAbilities();
|
|
57
|
+
return hosted ? null : /* @__PURE__ */ jsx(InboxQueueStripBody, { ...props });
|
|
58
|
+
}
|
|
59
|
+
function InboxQueueStripBody({ conversationId }) {
|
|
55
60
|
const dispatch = useAppDispatch();
|
|
56
61
|
const items = useAppSelector(selectInboxItems(conversationId));
|
|
57
62
|
const streamingHere = useAppSelector(selectIsExecuting(conversationId));
|
|
@@ -40,6 +40,7 @@ import { isMacLike } from "../../../utils/platform-keys.js";
|
|
|
40
40
|
import { MicDeviceMenu } from "../../../../host/ui-slots.js";
|
|
41
41
|
import { Button, SplitButton } from "@ai-matrx/design-system/controls";
|
|
42
42
|
import { cn } from "@ai-matrx/design-system";
|
|
43
|
+
import { useConversationAbilities } from "../../../redux/execution-system/host-conversations/conversation-abilities.js";
|
|
43
44
|
const INPUT_BUTTON_IDLE_TINT = "text-muted-foreground/60 hover:text-foreground hover:bg-muted/60";
|
|
44
45
|
function InputButton({
|
|
45
46
|
icon: Icon,
|
|
@@ -74,6 +75,7 @@ function InputActionButtons({
|
|
|
74
75
|
composer
|
|
75
76
|
}) {
|
|
76
77
|
const dispatch = useAppDispatch();
|
|
78
|
+
const { database } = useConversationAbilities();
|
|
77
79
|
const [voiceBusy, setVoiceBusy] = useState(false);
|
|
78
80
|
const [liveAudioOn, setLiveAudioOn] = useState(composer.liveAudioStartsOn ?? false);
|
|
79
81
|
const agentId = useAppSelector(selectAgentIdFromInstance(conversationId)) ?? null;
|
|
@@ -106,7 +108,7 @@ function InputActionButtons({
|
|
|
106
108
|
const handleStop = useCallback(() => {
|
|
107
109
|
dispatch(cancelExecution(executingConversationId ?? conversationId));
|
|
108
110
|
}, [executingConversationId, conversationId, dispatch]);
|
|
109
|
-
const liveAudioButton = showSendButton && agentId ? /* @__PURE__ */ jsx(
|
|
111
|
+
const liveAudioButton = database && showSendButton && agentId ? /* @__PURE__ */ jsx(
|
|
110
112
|
VoiceRelayBar,
|
|
111
113
|
{
|
|
112
114
|
variant: "composer",
|
|
@@ -127,7 +129,7 @@ function InputActionButtons({
|
|
|
127
129
|
active: showVariablePanel
|
|
128
130
|
}
|
|
129
131
|
) : null;
|
|
130
|
-
const plusMenu = /* @__PURE__ */ jsx(
|
|
132
|
+
const plusMenu = database ? /* @__PURE__ */ jsx(
|
|
131
133
|
RunControlsMenu,
|
|
132
134
|
{
|
|
133
135
|
conversationId,
|
|
@@ -145,8 +147,8 @@ function InputActionButtons({
|
|
|
145
147
|
onLiveAudio: () => setLiveAudioOn(true)
|
|
146
148
|
}
|
|
147
149
|
}
|
|
148
|
-
);
|
|
149
|
-
const micGroup = showMicrophone ? /* @__PURE__ */ jsxs(SplitButton, { className: "shrink-0", children: [
|
|
150
|
+
) : null;
|
|
151
|
+
const micGroup = database && showMicrophone ? /* @__PURE__ */ jsxs(SplitButton, { className: "shrink-0", children: [
|
|
150
152
|
/* @__PURE__ */ jsx(
|
|
151
153
|
AgentMicrophoneButton,
|
|
152
154
|
{
|
|
@@ -182,7 +184,7 @@ function InputActionButtons({
|
|
|
182
184
|
return /* @__PURE__ */ jsxs("div", { "data-composer-row": "", className: "flex min-w-0 items-center justify-between gap-1.5 shrink-0", children: [
|
|
183
185
|
/* @__PURE__ */ jsxs("div", { className: "flex min-w-0 shrink-0 items-center gap-1.5", children: [
|
|
184
186
|
plusMenu,
|
|
185
|
-
/* @__PURE__ */ jsx(DesktopPresenceIndicator, { conversationId }),
|
|
187
|
+
database ? /* @__PURE__ */ jsx(DesktopPresenceIndicator, { conversationId }) : null,
|
|
186
188
|
variablesToggle,
|
|
187
189
|
micGroup,
|
|
188
190
|
composer.folded && !liveAudioOn ? null : liveAudioButton,
|
|
@@ -199,7 +201,7 @@ function InputActionButtons({
|
|
|
199
201
|
/* @__PURE__ */ jsxs("div", { className: "flex min-w-0 items-center justify-between gap-1.5 shrink-0 lg:h-8", children: [
|
|
200
202
|
/* @__PURE__ */ jsxs("div", { className: "flex min-w-0 items-center gap-1.5", children: [
|
|
201
203
|
plusMenu,
|
|
202
|
-
/* @__PURE__ */ jsx(DesktopPresenceIndicator, { conversationId }),
|
|
204
|
+
database ? /* @__PURE__ */ jsx(DesktopPresenceIndicator, { conversationId }) : null,
|
|
203
205
|
variablesToggle
|
|
204
206
|
] }),
|
|
205
207
|
/* @__PURE__ */ jsxs("div", { className: "flex min-w-0 items-center gap-1.5", children: [
|
|
@@ -11,5 +11,9 @@ interface SmartInputFileDropTargetProps extends Omit<React.ComponentPropsWithout
|
|
|
11
11
|
pasteFiles?: boolean;
|
|
12
12
|
children: React.ReactNode;
|
|
13
13
|
}
|
|
14
|
-
|
|
14
|
+
/**
|
|
15
|
+
* Dropped and pasted files upload to the platform's file store. A host-owned conversation with
|
|
16
|
+
* no database has no store, so the card is a plain box there — no drop zone (G-DOOR gate).
|
|
17
|
+
*/
|
|
18
|
+
export declare function SmartInputFileDropTarget(props: SmartInputFileDropTargetProps): import("react").JSX.Element;
|
|
15
19
|
export {};
|
|
@@ -4,7 +4,14 @@ import { useDropzone } from "react-dropzone";
|
|
|
4
4
|
import { Loader2, Upload } from "lucide-react";
|
|
5
5
|
import { cn } from "@ai-matrx/design-system";
|
|
6
6
|
import { useUploadAgentResources } from "../resources/usePasteImageResource.js";
|
|
7
|
-
|
|
7
|
+
import { useConversationAbilities } from "../../../redux/execution-system/host-conversations/conversation-abilities.js";
|
|
8
|
+
function SmartInputFileDropTarget(props) {
|
|
9
|
+
const { database } = useConversationAbilities();
|
|
10
|
+
if (database) return /* @__PURE__ */ jsx(SmartInputFileDropTargetBody, { ...props });
|
|
11
|
+
const { conversationId: _c, uploadRoot: _r, uploadPath: _p, pasteFiles: _f, className, children, ...rootProps } = props;
|
|
12
|
+
return /* @__PURE__ */ jsx("div", { ...rootProps, className: cn("relative", className), "data-agent-input-shell": true, children });
|
|
13
|
+
}
|
|
14
|
+
function SmartInputFileDropTargetBody({
|
|
8
15
|
conversationId,
|
|
9
16
|
uploadRoot,
|
|
10
17
|
uploadPath,
|
|
@@ -280,13 +280,13 @@ function ChatPresetsPanel({
|
|
|
280
280
|
/* @__PURE__ */ jsx("div", { className: "px-1.5 pb-1", children: info.isCustom ? /* @__PURE__ */ jsx(
|
|
281
281
|
ModelListDropdown,
|
|
282
282
|
{
|
|
283
|
-
value: personalModelId,
|
|
283
|
+
value: personalModelId ?? info.effectiveModelId,
|
|
284
284
|
onValueChange: (modelId) => void setPersonalModel(modelId),
|
|
285
285
|
pinnedOfferingId,
|
|
286
286
|
onOfferingPinChange: setPersonalClass,
|
|
287
287
|
inputModalities: [],
|
|
288
288
|
outputModalities: ["text"],
|
|
289
|
-
placeholder: personalModelLabel ?? "Pick a model",
|
|
289
|
+
placeholder: personalModelLabel ?? info.effectiveModelLabel ?? "Pick a model",
|
|
290
290
|
"aria-label": "Model for Custom",
|
|
291
291
|
className: "w-full"
|
|
292
292
|
}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import type { ComposerMode } from "./composer-types.js";
|
|
2
|
-
|
|
2
|
+
type ComposerChipsRowProps = {
|
|
3
3
|
conversationId: string;
|
|
4
4
|
mode: ComposerMode;
|
|
5
5
|
menuSide: "top" | "bottom";
|
|
6
6
|
className?: string;
|
|
7
7
|
/** Corner option under comparison (Arman, 2026-10-03): `soft` = 8px corners. */
|
|
8
8
|
chipShape?: "md" | "soft";
|
|
9
|
-
}
|
|
9
|
+
};
|
|
10
|
+
/** Environment + connections: database- and server-backed, so absent on a host-owned conversation (G-DOOR gate). */
|
|
11
|
+
export declare function ComposerChipsRow(props: ComposerChipsRowProps): import("react").JSX.Element | null;
|
|
12
|
+
export {};
|
|
@@ -13,7 +13,12 @@ import { ComposerEnvironmentPanel } from "./ComposerPlusMenu.js";
|
|
|
13
13
|
import { COMPOSER_ROW_CLASS } from "./composer-chip.js";
|
|
14
14
|
import { ComposerChip } from "../ComposerChip.js";
|
|
15
15
|
import { composerShows } from "./composer-mode-visibility.js";
|
|
16
|
-
|
|
16
|
+
import { useConversationAbilities } from "../../../../redux/execution-system/host-conversations/conversation-abilities.js";
|
|
17
|
+
function ComposerChipsRow(props) {
|
|
18
|
+
const { database } = useConversationAbilities();
|
|
19
|
+
return database ? /* @__PURE__ */ jsx(ComposerChipsRowBody, { ...props }) : null;
|
|
20
|
+
}
|
|
21
|
+
function ComposerChipsRowBody({
|
|
17
22
|
conversationId,
|
|
18
23
|
mode,
|
|
19
24
|
menuSide,
|
|
@@ -1,8 +1,4 @@
|
|
|
1
1
|
import type { ComposerPresentation } from "./composer-types.js";
|
|
2
|
-
/**
|
|
3
|
-
* The value-group chip, in the meta row beside Output (Arman, 2026-10-03): the
|
|
4
|
-
* card never spends a whole row on this one chip. The rail is told not to draw it.
|
|
5
|
-
*/
|
|
6
2
|
export declare function ComposerValueGroupChip({ conversationId }: {
|
|
7
3
|
conversationId: string;
|
|
8
4
|
}): import("react").JSX.Element | null;
|
|
@@ -15,21 +11,23 @@ export declare function ComposerScopeCluster({ conversationId, composer, folded,
|
|
|
15
11
|
conversationId: string;
|
|
16
12
|
composer: ComposerPresentation;
|
|
17
13
|
folded?: boolean;
|
|
18
|
-
}): import("react").JSX.Element;
|
|
14
|
+
}): import("react").JSX.Element | null;
|
|
19
15
|
/**
|
|
20
16
|
* Agent · Output · Effort (Work+) — the right cluster of the meta row and of
|
|
21
17
|
* Compact's row. Narrow: Output and Effort ride the agent pill's menu.
|
|
22
18
|
*/
|
|
23
|
-
|
|
19
|
+
type ComposerPillsProps = {
|
|
24
20
|
conversationId: string;
|
|
25
21
|
composer: ComposerPresentation;
|
|
26
22
|
menuSide: "top" | "bottom";
|
|
27
23
|
folded?: boolean;
|
|
28
|
-
}
|
|
24
|
+
};
|
|
25
|
+
export declare function ComposerPills(props: ComposerPillsProps): import("react").JSX.Element | null;
|
|
29
26
|
export declare function ComposerMetaRow({ conversationId, composer, menuSide, folded, }: {
|
|
30
27
|
conversationId: string;
|
|
31
28
|
composer: ComposerPresentation;
|
|
32
29
|
menuSide: "top" | "bottom";
|
|
33
30
|
/** Under 480px of composer width (useComposerFold). */
|
|
34
31
|
folded?: boolean;
|
|
35
|
-
}): import("react").JSX.Element;
|
|
32
|
+
}): import("react").JSX.Element | null;
|
|
33
|
+
export {};
|
|
@@ -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/
|
|
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/
|
|
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 "../../../
|
|
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 "../../../
|
|
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",
|