@ai-matrx/chat 0.6.6 → 0.7.0
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 +34 -0
- package/README.md +1 -1
- package/dist/agents/components/agent-widgets/AgentChatHistorySidebar.js +16 -55
- package/dist/agents/components/chat/chat-door.d.ts +67 -0
- package/dist/agents/components/chat/chat-door.js +100 -0
- package/dist/agents/components/conversation-history/AgentConversationList.d.ts +83 -0
- package/dist/agents/components/conversation-history/AgentConversationList.js +252 -0
- package/dist/agents/components/conversation-history/ConversationArchiveSection.d.ts +5 -1
- package/dist/agents/components/conversation-history/ConversationArchiveSection.js +22 -4
- package/dist/agents/components/conversation-history/ConversationHistorySidebar.js +19 -65
- package/dist/agents/components/inputs/input-components/TextareaInput.js +2 -0
- package/dist/agents/components/inputs/input-components/VariableInputComponent.js +7 -6
- package/dist/agents/components/inputs/smart-input/ConversationCompanionPills.d.ts +3 -0
- package/dist/agents/components/inputs/smart-input/ConversationCompanionPills.js +40 -0
- package/dist/agents/components/inputs/smart-input/ConversationContextRail.js +6 -29
- package/dist/agents/components/inputs/smart-input/DeviceToolsModeRow.d.ts +3 -0
- package/dist/agents/components/inputs/smart-input/DeviceToolsModeRow.js +35 -0
- package/dist/agents/components/inputs/smart-input/InboxQueueStrip.js +0 -8
- package/dist/agents/components/inputs/smart-input/RunToolPicker.js +15 -11
- package/dist/agents/components/inputs/smart-input/composer/ComposerPlusMenu.js +22 -0
- package/dist/agents/components/inputs/smart-input/rail-pill.d.ts +35 -0
- package/dist/agents/components/inputs/smart-input/rail-pill.js +30 -0
- package/dist/agents/components/inputs/variable-input-variations/AgentVariableForm.js +52 -48
- package/dist/agents/components/run-controls/panels/shared.d.ts +1 -1
- package/dist/agents/components/shared/AgentModeController.js +3 -2
- package/dist/agents/components/shell/AgentRunSidebarMenu.js +15 -54
- package/dist/agents/components/working-document/documents-workspace/DocumentsListRail.js +1 -2
- package/dist/agents/engine.d.ts +15 -0
- package/dist/agents/engine.js +17 -0
- package/dist/agents/hooks/useModelControls.js +3 -175
- package/dist/agents/redux/agent-definition/selectors.d.ts +237 -237
- package/dist/agents/redux/agent-shortcut-categories/selectors.d.ts +50 -50
- package/dist/agents/redux/agent-shortcuts/selectors.d.ts +147 -147
- package/dist/agents/redux/conversation-history/thunks.js +6 -18
- package/dist/agents/redux/conversation-list/conversation-list.selectors.d.ts +1 -73
- package/dist/agents/redux/conversation-list/conversation-list.selectors.js +2 -36
- package/dist/agents/redux/conversation-list/conversation-list.slice.d.ts +7 -22
- package/dist/agents/redux/conversation-list/conversation-list.slice.js +7 -62
- package/dist/agents/redux/conversation-list/conversation-list.thunks.d.ts +0 -25
- package/dist/agents/redux/conversation-list/conversation-list.thunks.js +2 -58
- package/dist/agents/redux/conversation-list/conversation-list.types.d.ts +0 -5
- package/dist/agents/redux/conversation-list/conversation-rows.d.ts +16 -0
- package/dist/agents/redux/conversation-list/conversation-rows.js +24 -0
- package/dist/agents/redux/conversation-list/conversation-trash.thunks.d.ts +1 -0
- package/dist/agents/redux/conversation-list/conversation-trash.thunks.js +13 -18
- package/dist/agents/redux/execution-system/active-requests/active-requests.selectors.d.ts +54 -54
- package/dist/agents/redux/execution-system/context-state/context-state.selectors.d.ts +14 -14
- package/dist/agents/redux/execution-system/conversations/conversations.selectors.d.ts +5 -5
- package/dist/agents/redux/execution-system/instance-context/instance-context.selectors.d.ts +3 -3
- package/dist/agents/redux/execution-system/instance-resources/instance-resources.selectors.d.ts +8 -8
- package/dist/agents/redux/execution-system/instance-ui-state/instance-ui-state.selectors.d.ts +5 -5
- package/dist/agents/redux/execution-system/instance-variable-values/instance-variable-values.selectors.d.ts +7 -7
- package/dist/agents/redux/execution-system/messages/messages.selectors.d.ts +1 -1
- package/dist/agents/redux/execution-system/observability/observability.selectors.d.ts +7 -7
- package/dist/agents/redux/execution-system/observational-memory/observational-memory.selectors.d.ts +1 -1
- package/dist/agents/redux/execution-system/selectors/aggregate.selectors.d.ts +14 -14
- package/dist/agents/redux/execution-system/thunks/create-instance.thunk.d.ts +10 -1
- package/dist/agents/redux/execution-system/thunks/create-instance.thunk.js +114 -265
- package/dist/agents/redux/execution-system/thunks/dispatch-matrx-extend-tool.thunk.js +18 -2
- package/dist/agents/redux/execution-system/thunks/dispatch-surface-client-tool.thunk.js +10 -28
- package/dist/agents/redux/execution-system/thunks/dispatch-surface-write.thunk.js +10 -25
- package/dist/agents/redux/execution-system/thunks/execute-instance.thunk.js +20 -0
- package/dist/agents/redux/execution-system/thunks/execute-manual-instance.thunk.js +6 -1
- package/dist/agents/redux/execution-system/thunks/notify-and-play-dispatcher.d.ts +58 -0
- package/dist/agents/redux/execution-system/thunks/notify-and-play-dispatcher.js +62 -0
- package/dist/agents/redux/execution-system/thunks/post-delegated-tool-outcome.d.ts +23 -0
- package/dist/agents/redux/execution-system/thunks/post-delegated-tool-outcome.js +37 -0
- package/dist/agents/redux/execution-system/thunks/resume-instance.thunk.js +10 -2
- package/dist/agents/redux/execution-system/utils/build-tool-injection.d.ts +7 -0
- package/dist/agents/redux/execution-system/utils/build-tool-injection.js +18 -6
- package/dist/agents/redux/execution-system/utils/host-turn.d.ts +45 -0
- package/dist/agents/redux/execution-system/utils/host-turn.js +119 -0
- package/dist/agents/redux/proposed-directives/proposedDirectivesSlice.d.ts +1 -1
- package/dist/agents/scribe-tools/dispatcher/dispatch-scribe-tool.thunk.d.ts +50 -20
- package/dist/agents/scribe-tools/dispatcher/dispatch-scribe-tool.thunk.js +9 -101
- package/dist/agents/types/tool-injection.types.d.ts +18 -2
- package/dist/agents/ui-first-tools/redux/agent-lists.selectors.d.ts +2 -2
- package/dist/agents/ui-first-tools/redux/pending-asks.slice.d.ts +2 -1
- package/dist/agents/ui-first-tools/redux/resolve-asks-with-input.thunk.js +1 -1
- package/dist/agents/ui-first-tools/tools/ask-response.d.ts +29 -0
- package/dist/agents/ui-first-tools/tools/ask-response.js +15 -0
- package/dist/agents/ui-first-tools/tools/schemas.d.ts +3 -25
- package/dist/agents/ui-first-tools/tools/schemas.js +1 -12
- package/dist/agents/ui-first-tools/ui/ApprovalCard.js +1 -1
- package/dist/agents/ui-first-tools/ui/AskWizard.d.ts +1 -1
- package/dist/agents/ui-first-tools/ui/AskWizard.js +1 -1
- package/dist/cx-chat/_legacy-stubs.d.ts +5 -5
- package/dist/cx-chat/components/SsrSidebarChats.js +13 -15
- package/dist/cx-chat/components/messages/UserMessage.d.ts +2 -2
- package/dist/cx-chat/types/conversation.d.ts +6 -6
- package/dist/cx-chat/utils/buildContentBlocksForSave.d.ts +1 -1
- package/dist/cx-chat/utils/cx-content-converter.d.ts +1 -1
- package/dist/host/bare-host-chrome.js +9 -3
- package/dist/host/composer-extensions.d.ts +75 -0
- package/dist/host/composer-extensions.js +92 -0
- package/dist/host/configure.js +1 -0
- package/dist/host/contract.d.ts +105 -13
- package/dist/host/defaults/confirm.d.ts +15 -0
- package/dist/host/defaults/confirm.js +25 -0
- package/dist/host/defaults/files-ui.d.ts +85 -0
- package/dist/host/defaults/files-ui.js +158 -0
- package/dist/host/defaults/gates.d.ts +27 -0
- package/dist/host/defaults/gates.js +72 -0
- package/dist/host/defaults/media-client.d.ts +15 -0
- package/dist/host/defaults/media-client.js +40 -0
- package/dist/host/defaults/voice.d.ts +81 -0
- package/dist/host/defaults/voice.js +239 -0
- package/dist/host/device-tool-handoff.d.ts +26 -0
- package/dist/host/device-tool-handoff.js +45 -0
- package/dist/host/index.d.ts +1 -0
- package/dist/host/index.js +4 -1
- package/dist/host/microphone.d.ts +11 -0
- package/dist/host/microphone.js +17 -0
- package/dist/host/ui-slots.d.ts +29 -74
- package/dist/host/ui-slots.js +40 -42
- package/dist/store/create-chat-store.d.ts +2 -2
- package/dist/store/middlewares.d.ts +5 -5
- package/dist/store/slices.d.ts +1 -1
- package/dist/surfaces/redux/selectors.d.ts +2 -2
- package/dist/tool-call-visualization/components/ToolCallVisualization.js +3 -2
- package/dist/tool-call-visualization/configured-rows/ConfiguredRowRenderer.d.ts +15 -0
- package/dist/tool-call-visualization/configured-rows/ConfiguredRowRenderer.js +36 -0
- package/dist/tool-call-visualization/configured-rows/ConfiguredToolRow.d.ts +40 -0
- package/dist/tool-call-visualization/configured-rows/ConfiguredToolRow.js +296 -0
- package/dist/tool-call-visualization/configured-rows/CopyToolButton.d.ts +23 -0
- package/dist/tool-call-visualization/configured-rows/CopyToolButton.js +62 -0
- package/dist/tool-call-visualization/configured-rows/ToolProgressView.d.ts +23 -0
- package/dist/tool-call-visualization/configured-rows/ToolProgressView.js +147 -0
- package/dist/tool-call-visualization/configured-rows/field-components.d.ts +15 -0
- package/dist/tool-call-visualization/configured-rows/field-components.js +244 -0
- package/dist/tool-call-visualization/configured-rows/helpers.d.ts +39 -0
- package/dist/tool-call-visualization/configured-rows/helpers.js +110 -0
- package/dist/tool-call-visualization/configured-rows/register.d.ts +25 -0
- package/dist/tool-call-visualization/configured-rows/register.js +51 -0
- package/dist/tool-call-visualization/configured-rows/registries.d.ts +27 -0
- package/dist/tool-call-visualization/configured-rows/registries.js +14 -0
- package/dist/tool-call-visualization/configured-rows/to-row-entry.d.ts +8 -0
- package/dist/tool-call-visualization/configured-rows/to-row-entry.js +38 -0
- package/dist/tool-call-visualization/configured-rows/transforms.d.ts +14 -0
- package/dist/tool-call-visualization/configured-rows/transforms.js +30 -0
- package/dist/tool-call-visualization/configured-rows/types.d.ts +140 -0
- package/dist/tool-call-visualization/redux/selectors.d.ts +1 -1
- package/dist/tool-call-visualization/registry/registry.d.ts +1 -1
- package/dist/tool-call-visualization/registry/registry.js +8 -1
- package/dist/tool-call-visualization/types.d.ts +1 -1
- package/dist/ui/chat-protocol-types.d.ts +0 -1
- package/dist/ui/ownership.d.ts +25 -0
- package/dist/ui/ownership.js +18 -0
- package/dist/voice-agent/audio/audioCapture.js +11 -6
- package/dist/window-panels/windows/agents/AgentRunHistoryWindow.d.ts +1 -2
- package/dist/window-panels/windows/agents/AgentRunHistoryWindow.js +21 -181
- package/package.json +4585 -123
- package/dist/agents/components/agent-widgets/chat-assistant/AssistantMessageCard.d.ts +0 -7
- package/dist/agents/components/agent-widgets/chat-assistant/AssistantMessageCard.js +0 -33
- package/dist/agents/components/agent-widgets/chat-assistant/StatusCard.d.ts +0 -6
- package/dist/agents/components/agent-widgets/chat-assistant/StatusCard.js +0 -21
- package/dist/agents/components/agent-widgets/chat-assistant/UserMessageCard.d.ts +0 -6
- package/dist/agents/components/agent-widgets/chat-assistant/UserMessageCard.js +0 -11
- package/dist/agents/components/agent-widgets/chat-assistant/VariableInputCard.d.ts +0 -12
- package/dist/agents/components/agent-widgets/chat-assistant/VariableInputCard.js +0 -7
- package/dist/agents/components/agent-widgets/execution-gates/PreExecutionCard.d.ts +0 -4
- package/dist/agents/components/agent-widgets/execution-gates/PreExecutionCard.js +0 -81
- package/dist/agents/components/run/run-sidebar/SidebarHeader.d.ts +0 -21
- package/dist/agents/components/run/run-sidebar/SidebarHeader.js +0 -50
- package/dist/agents/components/run-controls/AdvancedRunSettings/index.d.ts +0 -6
- package/dist/agents/components/run-controls/AdvancedRunSettings/index.js +0 -32
- package/dist/agents/components/run-controls/RunSettingsModal.d.ts +0 -5
- package/dist/agents/components/run-controls/RunSettingsModal.js +0 -22
- package/dist/agents/components/shell/AgentBuildSidebarExtras.d.ts +0 -6
- package/dist/agents/components/shell/AgentBuildSidebarExtras.js +0 -30
- package/dist/agents/constants/agent-system-competitors.d.ts +0 -9
- package/dist/agents/constants/agent-system-competitors.js +0 -125
- package/dist/agents/hooks/message-crud/useMessageActions.d.ts +0 -29
- package/dist/agents/hooks/message-crud/useMessageActions.js +0 -119
- package/dist/agents/hooks/useConversationPendingCalls.d.ts +0 -30
- package/dist/agents/hooks/useConversationPendingCalls.js +0 -42
- package/dist/agents/model-registry/model-classes.d.ts +0 -1
- package/dist/agents/model-registry/model-classes.js +0 -1
- package/dist/agents/redux/conversation-history/index.d.ts +0 -18
- package/dist/agents/redux/conversation-history/index.js +0 -4
- package/dist/agents/redux/execution-system/instance-variable-values/instance-variable-values.thunks.d.ts +0 -38
- package/dist/agents/redux/execution-system/instance-variable-values/instance-variable-values.thunks.js +0 -42
- package/dist/agents/redux/execution-system/message-crud/server/compact-turns.thunk.d.ts +0 -58
- package/dist/agents/redux/execution-system/message-crud/server/compact-turns.thunk.js +0 -50
- package/dist/agents/redux/execution-system/message-crud/server/fork-and-run-server.thunk.d.ts +0 -76
- package/dist/agents/redux/execution-system/message-crud/server/fork-and-run-server.thunk.js +0 -101
- package/dist/agents/redux/execution-system/thunks/attach-workflow-run.d.ts +0 -38
- package/dist/agents/redux/execution-system/thunks/attach-workflow-run.js +0 -25
- package/dist/agents/redux/execution-system/utils/source-slice-helpers.d.ts +0 -45
- package/dist/agents/redux/execution-system/utils/source-slice-helpers.js +0 -50
- package/dist/agents/runtime/realtime/launchRealtimeSession.thunk.d.ts +0 -25
- package/dist/agents/runtime/realtime/launchRealtimeSession.thunk.js +0 -15
- package/dist/agents/services/agentService.d.ts +0 -12
- package/dist/agents/services/agentService.js +0 -92
- package/dist/agents/utils/escape-code-fences.d.ts +0 -15
- package/dist/agents/utils/escape-code-fences.js +0 -9
- package/dist/agents/utils/normalize-managed-options.d.ts +0 -30
- package/dist/agents/utils/normalize-managed-options.js +0 -29
- package/dist/agents/utils/processedDocumentContext.d.ts +0 -51
- package/dist/agents/utils/processedDocumentContext.js +0 -51
- package/dist/agents/utils/variable-validation.d.ts +0 -28
- package/dist/agents/utils/variable-validation.js +0 -54
- package/dist/cx-chat/components/ChatConversationSkeleton.d.ts +0 -9
- package/dist/cx-chat/components/ChatConversationSkeleton.js +0 -45
- package/dist/cx-chat/components/ChatPanelBackButton.d.ts +0 -1
- package/dist/cx-chat/components/ChatPanelBackButton.js +0 -26
- package/dist/cx-chat/components/messages/MessageErrorBoundary.d.ts +0 -20
- package/dist/cx-chat/components/messages/MessageErrorBoundary.js +0 -40
- package/dist/cx-chat/components/variable-inputs/CheckboxGroupInput.d.ts +0 -14
- package/dist/cx-chat/components/variable-inputs/CheckboxGroupInput.js +0 -160
- package/dist/cx-chat/components/variable-inputs/NumberInput.d.ts +0 -15
- package/dist/cx-chat/components/variable-inputs/NumberInput.js +0 -79
- package/dist/cx-chat/components/variable-inputs/RadioGroupInput.d.ts +0 -14
- package/dist/cx-chat/components/variable-inputs/RadioGroupInput.js +0 -125
- package/dist/cx-chat/components/variable-inputs/SelectInput.d.ts +0 -14
- package/dist/cx-chat/components/variable-inputs/SelectInput.js +0 -92
- package/dist/cx-chat/components/variable-inputs/TextareaInput.d.ts +0 -14
- package/dist/cx-chat/components/variable-inputs/TextareaInput.js +0 -46
- package/dist/cx-chat/components/variable-inputs/ToggleInput.d.ts +0 -14
- package/dist/cx-chat/components/variable-inputs/ToggleInput.js +0 -46
- package/dist/cx-chat/hooks/useChatPersistence.d.ts +0 -28
- package/dist/cx-chat/hooks/useChatPersistence.js +0 -180
- package/dist/cx-chat/hooks/useInstanceBootstrap.d.ts +0 -1
- package/dist/cx-chat/hooks/useInstanceBootstrap.js +0 -115
- package/dist/cx-chat/types/content.d.ts +0 -184
- package/dist/cx-chat/types/content.js +0 -91
- package/dist/cx-chat/types/cx-tables.d.ts +0 -176
- package/dist/cx-chat/utils/settings-diff.d.ts +0 -13
- package/dist/cx-chat/utils/settings-diff.js +0 -25
- package/dist/public-chat/components/AgentSelector.d.ts +0 -22
- package/dist/public-chat/components/AgentSelector.js +0 -80
- package/dist/public-chat/components/GuidedVariableInputs.d.ts +0 -25
- package/dist/public-chat/components/GuidedVariableInputs.js +0 -623
- package/dist/public-chat/components/PublicVariableInputs.d.ts +0 -29
- package/dist/public-chat/components/PublicVariableInputs.js +0 -172
- package/dist/public-chat/types/content.d.ts +0 -184
- package/dist/public-chat/types/content.js +0 -91
- package/dist/tool-call-visualization/renderers/_shared-entity/EntityOpenActions.d.ts +0 -15
- package/dist/tool-call-visualization/renderers/_shared-entity/EntityOpenActions.js +0 -31
- package/dist/tool-call-visualization/utils/toolCallBlockToLifecycleEntry.d.ts +0 -24
- package/dist/tool-call-visualization/utils/toolCallBlockToLifecycleEntry.js +0 -26
- package/dist/ui/AudioOutputBlockSkeleton.d.ts +0 -17
- package/dist/ui/AudioOutputBlockSkeleton.js +0 -78
- package/dist/ui/lazy/PublicChatVariableInputs.d.ts +0 -2
- package/dist/ui/lazy/PublicChatVariableInputs.js +0 -16
- package/dist/utils/xml/readXmlTag.d.ts +0 -12
- package/dist/utils/xml/readXmlTag.js +0 -66
- /package/dist/{cx-chat/types/cx-tables.js → tool-call-visualization/configured-rows/types.js} +0 -0
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
interface ConversationArchiveSectionProps {
|
|
2
2
|
/** `"consumer"` matches the comfortable /chat sidebar; `"dense"` the rest. */
|
|
3
3
|
variant?: "dense" | "consumer";
|
|
4
|
+
/** Only these agents' conversations (a per-agent list). Default: all of mine. */
|
|
5
|
+
agentIds?: string[];
|
|
6
|
+
/** Open a row (an archived conversation is readable). Omit = rows are not links. */
|
|
7
|
+
onOpen?: (conversationId: string) => void;
|
|
4
8
|
className?: string;
|
|
5
9
|
}
|
|
6
|
-
export declare function ConversationArchiveSection({ variant, className, }: ConversationArchiveSectionProps): import("react").JSX.Element;
|
|
10
|
+
export declare function ConversationArchiveSection({ variant, agentIds, onOpen, className, }: ConversationArchiveSectionProps): import("react").JSX.Element;
|
|
7
11
|
export default ConversationArchiveSection;
|
|
@@ -13,23 +13,29 @@ import { ErrorAlchemyMenu } from "../../../host/ui-slots.js";
|
|
|
13
13
|
import { Button, DisclosureHeader } from "@ai-matrx/design-system/controls";
|
|
14
14
|
function ConversationArchiveSection({
|
|
15
15
|
variant = "dense",
|
|
16
|
+
agentIds,
|
|
17
|
+
onOpen,
|
|
16
18
|
className
|
|
17
19
|
}) {
|
|
18
20
|
const dispatch = useAppDispatch();
|
|
19
21
|
const [open, setOpen] = useState(false);
|
|
20
22
|
const [restoringId, setRestoringId] = useState(null);
|
|
21
|
-
const
|
|
23
|
+
const allIds = useAppSelector(
|
|
22
24
|
(state) => state.conversationList.trashConversationIds
|
|
23
25
|
);
|
|
24
26
|
const bodies = useAppSelector(
|
|
25
27
|
(state) => state.conversationList.trashByConversationId
|
|
26
28
|
);
|
|
29
|
+
const ids = agentIds && agentIds.length > 0 ? allIds.filter((id) => {
|
|
30
|
+
const agentId = bodies[id]?.agentId;
|
|
31
|
+
return !!agentId && agentIds.includes(agentId);
|
|
32
|
+
}) : allIds;
|
|
27
33
|
const status = useAppSelector((state) => state.conversationList.trashStatus);
|
|
28
34
|
const error = useAppSelector((state) => state.conversationList.trashError);
|
|
29
35
|
const toggle = () => {
|
|
30
36
|
const next = !open;
|
|
31
37
|
setOpen(next);
|
|
32
|
-
if (next) void dispatch(fetchArchivedConversations());
|
|
38
|
+
if (next) void dispatch(fetchArchivedConversations({ agentIds }));
|
|
33
39
|
};
|
|
34
40
|
const handleRestore = useCallback(
|
|
35
41
|
async (conversationId) => {
|
|
@@ -79,7 +85,19 @@ function ConversationArchiveSection({
|
|
|
79
85
|
dense ? "h-6" : "h-8"
|
|
80
86
|
),
|
|
81
87
|
children: [
|
|
82
|
-
/* @__PURE__ */ jsx(
|
|
88
|
+
onOpen && !conv.deletedAt ? /* @__PURE__ */ jsx(
|
|
89
|
+
"button",
|
|
90
|
+
{
|
|
91
|
+
type: "button",
|
|
92
|
+
onClick: () => onOpen(id),
|
|
93
|
+
className: cn(
|
|
94
|
+
"min-w-0 flex-1 truncate text-left text-muted-foreground hover:text-foreground",
|
|
95
|
+
dense ? "text-[11px]" : "text-xs"
|
|
96
|
+
),
|
|
97
|
+
title,
|
|
98
|
+
children: title
|
|
99
|
+
}
|
|
100
|
+
) : /* @__PURE__ */ jsx(
|
|
83
101
|
"span",
|
|
84
102
|
{
|
|
85
103
|
className: cn(
|
|
@@ -90,7 +108,7 @@ function ConversationArchiveSection({
|
|
|
90
108
|
children: title
|
|
91
109
|
}
|
|
92
110
|
),
|
|
93
|
-
/* @__PURE__ */ jsx(Button, { variant: "quiet", icon: restoringId === id ? /* @__PURE__ */ jsx(Loader2, { className: "animate-spin" }) : /* @__PURE__ */ jsx(Undo2, {}), onClick: () => void handleRestore(id), disabled: restoringId === id, "aria-label": `Restore ${title}`,
|
|
111
|
+
/* @__PURE__ */ jsx(Button, { variant: "quiet", icon: restoringId === id ? /* @__PURE__ */ jsx(Loader2, { className: "animate-spin" }) : /* @__PURE__ */ jsx(Undo2, {}), onClick: () => void handleRestore(id), disabled: restoringId === id, "aria-label": `Restore ${title}`, title: "Restore", className: "shrink-0" })
|
|
94
112
|
]
|
|
95
113
|
},
|
|
96
114
|
id
|
|
@@ -54,20 +54,14 @@ import {
|
|
|
54
54
|
isLiveConversationRow
|
|
55
55
|
} from "../../redux/conversation-history/types.js";
|
|
56
56
|
import { useSurfaceSourceFilter } from "../../redux/conversation-history/useSurfaceSourceFilter.js";
|
|
57
|
-
import {
|
|
58
|
-
renameConversation,
|
|
59
|
-
setConversationFavorite
|
|
60
|
-
} from "../../redux/conversation-list/conversation-row-actions.thunks.js";
|
|
61
|
-
import {
|
|
62
|
-
buildConversationMenu
|
|
63
|
-
} from "../conversation-actions/conversationActionRegistry.js";
|
|
57
|
+
import { setConversationFavorite } from "../../redux/conversation-list/conversation-row-actions.thunks.js";
|
|
64
58
|
import { selectAgentById } from "../../redux/agent-definition/selectors.js";
|
|
65
59
|
import { EntityDoorControls } from "../../../host/ui-slots.js";
|
|
60
|
+
import { ConversationListRow } from "./AgentConversationList.js";
|
|
66
61
|
import { ConversationSourceFilterTree } from "./ConversationSourceFilterTree.js";
|
|
67
62
|
import { AllLanesOffNotice } from "./ConversationLaneToggles.js";
|
|
68
63
|
import { ConversationArchiveSection } from "./ConversationArchiveSection.js";
|
|
69
64
|
import { SegmentedControl, Button, DisclosureHeader, SearchField } from "@ai-matrx/design-system/controls";
|
|
70
|
-
import { ItemRow } from "../../../host/ui-slots.js";
|
|
71
65
|
import { toast } from "../../../host/notify.js";
|
|
72
66
|
import {
|
|
73
67
|
LoadingTapButton,
|
|
@@ -893,7 +887,6 @@ const Row = ({
|
|
|
893
887
|
getSourceMenuCtx,
|
|
894
888
|
showAgentHint = true
|
|
895
889
|
}) => {
|
|
896
|
-
const dispatch = useAppDispatch();
|
|
897
890
|
const title = conv.title?.trim() || untitled(conv);
|
|
898
891
|
const agentName = useAppSelector(
|
|
899
892
|
(s) => conv.agentId ? selectAgentById(s, conv.agentId)?.name ?? null : null
|
|
@@ -928,45 +921,28 @@ const Row = ({
|
|
|
928
921
|
star
|
|
929
922
|
] }) : star;
|
|
930
923
|
return /* @__PURE__ */ jsx(
|
|
931
|
-
|
|
924
|
+
ConversationListRow,
|
|
932
925
|
{
|
|
926
|
+
conv,
|
|
927
|
+
href: resolveHref(conv),
|
|
928
|
+
linkRow: true,
|
|
933
929
|
sourceFeature: "conversation",
|
|
934
930
|
entity: {
|
|
935
931
|
type: "conversation",
|
|
936
932
|
id: conv.conversationId,
|
|
937
933
|
title
|
|
938
934
|
},
|
|
939
|
-
label: title,
|
|
940
|
-
size: "sm",
|
|
941
935
|
active,
|
|
942
|
-
href: resolveHref(conv),
|
|
943
936
|
onOpen: onOpen ? () => onOpen(conv) : void 0,
|
|
944
937
|
openInPlace,
|
|
945
938
|
leading: /* @__PURE__ */ jsx(StreamingDot, { conversationId: conv.conversationId }),
|
|
946
939
|
secondaryLabel: meta || void 0,
|
|
947
940
|
trailing,
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
excludeFromKg: conv.excludeFromKg ?? false,
|
|
954
|
-
href: resolveHref(conv),
|
|
955
|
-
surfaceKey,
|
|
956
|
-
agent: conv.agentId ? { id: conv.agentId, name: agentName } : void 0,
|
|
957
|
-
source: getSourceMenuCtx?.(conv),
|
|
958
|
-
dispatch
|
|
959
|
-
}),
|
|
960
|
-
rename: {
|
|
961
|
-
value: conv.title ?? "",
|
|
962
|
-
emptyFallback: untitled(conv),
|
|
963
|
-
onCommit: (next) => void dispatch(
|
|
964
|
-
renameConversation({
|
|
965
|
-
conversationId: conv.conversationId,
|
|
966
|
-
title: next
|
|
967
|
-
})
|
|
968
|
-
)
|
|
969
|
-
},
|
|
941
|
+
surfaceKey,
|
|
942
|
+
isFavorite,
|
|
943
|
+
agent: conv.agentId ? { id: conv.agentId, name: agentName } : void 0,
|
|
944
|
+
source: getSourceMenuCtx?.(conv),
|
|
945
|
+
untitled: untitled(conv),
|
|
970
946
|
kebabAriaLabel: `Options for ${title}`
|
|
971
947
|
}
|
|
972
948
|
);
|
|
@@ -1030,12 +1006,14 @@ const ConsumerRow = ({
|
|
|
1030
1006
|
getSourceMenuCtx,
|
|
1031
1007
|
onMutationSuccess
|
|
1032
1008
|
}) => {
|
|
1033
|
-
const dispatch = useAppDispatch();
|
|
1034
1009
|
const title = conv.title?.trim() || untitled(conv);
|
|
1035
1010
|
const isStreaming = useAppSelector(selectIsStreaming(conv.conversationId));
|
|
1036
1011
|
return /* @__PURE__ */ jsx(
|
|
1037
|
-
|
|
1012
|
+
ConversationListRow,
|
|
1038
1013
|
{
|
|
1014
|
+
conv,
|
|
1015
|
+
href: resolveHref(conv),
|
|
1016
|
+
linkRow: true,
|
|
1039
1017
|
sourceFeature: "conversation",
|
|
1040
1018
|
entity: {
|
|
1041
1019
|
type: "conversation",
|
|
@@ -1043,37 +1021,13 @@ const ConsumerRow = ({
|
|
|
1043
1021
|
title
|
|
1044
1022
|
},
|
|
1045
1023
|
className: "mx-1",
|
|
1046
|
-
|
|
1024
|
+
size: "md",
|
|
1047
1025
|
active,
|
|
1048
|
-
href: resolveHref(conv),
|
|
1049
1026
|
onOpen: onOpen ? () => onOpen(conv) : void 0,
|
|
1050
1027
|
openInPlace,
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
isFavorite: conv.isFavorite ?? false,
|
|
1055
|
-
isArchived: conv.status === "archived",
|
|
1056
|
-
excludeFromKg: conv.excludeFromKg ?? false,
|
|
1057
|
-
href: resolveHref(conv),
|
|
1058
|
-
source: getSourceMenuCtx?.(conv),
|
|
1059
|
-
onMutationSuccess,
|
|
1060
|
-
dispatch
|
|
1061
|
-
}),
|
|
1062
|
-
rename: {
|
|
1063
|
-
value: conv.title ?? "",
|
|
1064
|
-
emptyFallback: untitled(conv),
|
|
1065
|
-
onCommit: async (next) => {
|
|
1066
|
-
const result = await dispatch(
|
|
1067
|
-
renameConversation({
|
|
1068
|
-
conversationId: conv.conversationId,
|
|
1069
|
-
title: next
|
|
1070
|
-
})
|
|
1071
|
-
);
|
|
1072
|
-
if (renameConversation.fulfilled.match(result)) {
|
|
1073
|
-
onMutationSuccess?.();
|
|
1074
|
-
}
|
|
1075
|
-
}
|
|
1076
|
-
},
|
|
1028
|
+
source: getSourceMenuCtx?.(conv),
|
|
1029
|
+
onMutationSuccess,
|
|
1030
|
+
untitled: untitled(conv),
|
|
1077
1031
|
trailing: isStreaming ? /* @__PURE__ */ jsxs("span", { className: "relative flex h-1.5 w-1.5", "aria-hidden": true, children: [
|
|
1078
1032
|
/* @__PURE__ */ jsx("span", { className: "absolute inline-flex h-full w-full animate-ping rounded-full bg-primary opacity-60" }),
|
|
1079
1033
|
/* @__PURE__ */ jsx("span", { className: "relative inline-flex h-1.5 w-1.5 rounded-full bg-primary" })
|
|
@@ -36,6 +36,8 @@ function TextareaInput({
|
|
|
36
36
|
className: isCompact ? "min-h-[60px] text-xs" : "min-h-[160px] text-sm",
|
|
37
37
|
rows: isCompact ? 2 : void 0,
|
|
38
38
|
appendTranscript: true,
|
|
39
|
+
expandable: true,
|
|
40
|
+
auxiliaryControlsLabel: variableName,
|
|
39
41
|
onEnterKey: onEnterAdvance ? () => onEnterAdvance() : void 0,
|
|
40
42
|
onRequestClose,
|
|
41
43
|
protectTranscription: true,
|
|
@@ -356,12 +356,13 @@ function VariableInputComponent({
|
|
|
356
356
|
/* @__PURE__ */ jsx(Label, { className: "text-sm font-medium", children: formattedName }),
|
|
357
357
|
shownHelpText && /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground mt-0.5", children: shownHelpText })
|
|
358
358
|
] }),
|
|
359
|
-
!hideLabel && compact &&
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
359
|
+
!hideLabel && compact && // The name stands on its own line; the help sits under it on ONE
|
|
360
|
+
// line (the whole sentence on hover). Side by side, a long help
|
|
361
|
+
// wrapped and centred the name against two lines after a "·"
|
|
362
|
+
// (Arman, 2026-10-08).
|
|
363
|
+
/* @__PURE__ */ jsxs("div", { className: "min-w-0 pb-1", children: [
|
|
364
|
+
/* @__PURE__ */ jsx(Label, { className: "block text-xs font-medium", children: formattedName }),
|
|
365
|
+
shownHelpText && /* @__PURE__ */ jsx("p", { className: "truncate text-[11px] text-muted-foreground", title: shownHelpText, children: shownHelpText })
|
|
365
366
|
] }),
|
|
366
367
|
inputComponent,
|
|
367
368
|
randomAssignmentEnabled && /* @__PURE__ */ jsx("div", { className: "flex justify-end pt-1", children: /* @__PURE__ */ jsxs(
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useState } from "react";
|
|
4
|
+
import {
|
|
5
|
+
useConversationCompanions
|
|
6
|
+
} from "../../../../host/composer-extensions.js";
|
|
7
|
+
import { RailPill } from "./rail-pill.js";
|
|
8
|
+
function ConversationCompanionPills({ conversationId }) {
|
|
9
|
+
const companions = useConversationCompanions();
|
|
10
|
+
return /* @__PURE__ */ jsx(Fragment, { children: companions.map((companion) => /* @__PURE__ */ jsx(CompanionPill, { companion, conversationId }, companion.id)) });
|
|
11
|
+
}
|
|
12
|
+
function CompanionPill({
|
|
13
|
+
companion,
|
|
14
|
+
conversationId
|
|
15
|
+
}) {
|
|
16
|
+
const [open, setOpen] = useState(false);
|
|
17
|
+
const pill = companion.usePill?.(conversationId);
|
|
18
|
+
const Panel = companion.Panel;
|
|
19
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
20
|
+
pill?.hidden ? null : /* @__PURE__ */ jsx(
|
|
21
|
+
RailPill,
|
|
22
|
+
{
|
|
23
|
+
item: {
|
|
24
|
+
id: `companion:${companion.id}`,
|
|
25
|
+
icon: companion.icon,
|
|
26
|
+
label: companion.label,
|
|
27
|
+
word: companion.word,
|
|
28
|
+
detail: pill?.detail,
|
|
29
|
+
hint: "Click: open or close the panel",
|
|
30
|
+
active: open,
|
|
31
|
+
onOpen: () => setOpen((o) => !o)
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
),
|
|
35
|
+
/* @__PURE__ */ jsx(Panel, { conversationId, open, onClose: () => setOpen(false) })
|
|
36
|
+
] });
|
|
37
|
+
}
|
|
38
|
+
export {
|
|
39
|
+
ConversationCompanionPills
|
|
40
|
+
};
|
|
@@ -22,11 +22,6 @@ import {
|
|
|
22
22
|
DropdownMenuTrigger
|
|
23
23
|
} from "@ai-matrx/design-system";
|
|
24
24
|
import { openAfterCurrentLayerCloses } from "../../../../ui/after-current-layer-closes.js";
|
|
25
|
-
import {
|
|
26
|
-
Tooltip,
|
|
27
|
-
TooltipContent,
|
|
28
|
-
TooltipTrigger
|
|
29
|
-
} from "@ai-matrx/design-system";
|
|
30
25
|
import { useChatCanvasOpeners, useChatCanvasView } from "../../../../host/canvas.js";
|
|
31
26
|
import {
|
|
32
27
|
conversationDocumentsTabId,
|
|
@@ -93,6 +88,9 @@ import { ActiveContextLensChip } from "../../../../context/sources/scopes.js";
|
|
|
93
88
|
import { selectActiveScopeIdsByType } from "../../../../context/sources/scopes.js";
|
|
94
89
|
import { contextEntryLabel } from "../../context-policies-display/contextEntryLabel.js";
|
|
95
90
|
import { useConversationAbilities } from "../../../redux/execution-system/host-conversations/conversation-abilities.js";
|
|
91
|
+
import { ComposerAttachmentSourceChips } from "../../../../host/composer-extensions.js";
|
|
92
|
+
import { ConversationCompanionPills } from "./ConversationCompanionPills.js";
|
|
93
|
+
import { RailPill } from "./rail-pill.js";
|
|
96
94
|
function entryHasValue(e) {
|
|
97
95
|
const v = e.value;
|
|
98
96
|
if (v === void 0 || v === null) return false;
|
|
@@ -370,9 +368,11 @@ function ConversationContextRailBody({
|
|
|
370
368
|
inline: true
|
|
371
369
|
}
|
|
372
370
|
),
|
|
373
|
-
/* @__PURE__ */ jsx(AttachedDocumentChips, { conversationId, inline: true })
|
|
371
|
+
/* @__PURE__ */ jsx(AttachedDocumentChips, { conversationId, inline: true }),
|
|
372
|
+
/* @__PURE__ */ jsx(ComposerAttachmentSourceChips, { conversationId })
|
|
374
373
|
] }) : null,
|
|
375
374
|
inline.map((item) => /* @__PURE__ */ jsx(RailPill, { item }, item.id)),
|
|
375
|
+
/* @__PURE__ */ jsx(ConversationCompanionPills, { conversationId }),
|
|
376
376
|
overflow.length > 0 && /* @__PURE__ */ jsxs(DropdownMenu, { children: [
|
|
377
377
|
/* @__PURE__ */ jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx(
|
|
378
378
|
ComposerChip,
|
|
@@ -426,29 +426,6 @@ function ConversationContextRailBody({
|
|
|
426
426
|
detailSurfaces
|
|
427
427
|
] });
|
|
428
428
|
}
|
|
429
|
-
function RailPill({ item }) {
|
|
430
|
-
const Icon = item.icon;
|
|
431
|
-
return /* @__PURE__ */ jsxs(Tooltip, { children: [
|
|
432
|
-
/* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx("span", { "data-rail-entry": "", className: "inline-flex shrink-0", children: /* @__PURE__ */ jsx(
|
|
433
|
-
ComposerChip,
|
|
434
|
-
{
|
|
435
|
-
tone: item.tone === "primary" ? "primary" : "neutral",
|
|
436
|
-
pressed: item.active ? true : void 0,
|
|
437
|
-
busy: item.busy,
|
|
438
|
-
icon: /* @__PURE__ */ jsx(Icon, {}),
|
|
439
|
-
label: item.word,
|
|
440
|
-
onClick: item.onOpen,
|
|
441
|
-
"aria-label": item.label,
|
|
442
|
-
remove: item.onRemove ? { label: `Remove ${item.label}`, onRemove: item.onRemove } : void 0
|
|
443
|
-
}
|
|
444
|
-
) }) }),
|
|
445
|
-
/* @__PURE__ */ jsxs(TooltipContent, { side: "top", className: "max-w-[16rem]", children: [
|
|
446
|
-
/* @__PURE__ */ jsx("div", { className: "font-medium text-popover-foreground", children: item.label }),
|
|
447
|
-
item.detail && /* @__PURE__ */ jsx("div", { className: "mt-0.5 text-muted-foreground", children: item.detail }),
|
|
448
|
-
item.hint && /* @__PURE__ */ jsx("div", { className: "mt-0.5 text-[10px] text-muted-foreground/80", children: item.hint })
|
|
449
|
-
] })
|
|
450
|
-
] });
|
|
451
|
-
}
|
|
452
429
|
function DetailSurfaces({ conversationId }) {
|
|
453
430
|
return /* @__PURE__ */ jsx(CloudBrowserHandoffCanvasOpener, { conversationId });
|
|
454
431
|
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { useSyncExternalStore } from "react";
|
|
4
|
+
import { useMaybeChatHost } from "../../../../host/react.js";
|
|
5
|
+
import {
|
|
6
|
+
devicePermissionModeKey,
|
|
7
|
+
readDevicePermissionMode,
|
|
8
|
+
writeDevicePermissionMode
|
|
9
|
+
} from "../../../redux/execution-system/utils/host-turn.js";
|
|
10
|
+
import { PicksSwitchRow } from "./RunPicksSurface.js";
|
|
11
|
+
function DeviceToolsModeRow({ agentId }) {
|
|
12
|
+
const host = useMaybeChatHost();
|
|
13
|
+
const key = devicePermissionModeKey(agentId);
|
|
14
|
+
const mode = useSyncExternalStore(
|
|
15
|
+
(listener) => host?.prefs.subscribe((changed) => {
|
|
16
|
+
if (changed.startsWith("chat.device-tools.permission-mode")) listener();
|
|
17
|
+
}) ?? (() => void 0),
|
|
18
|
+
() => host ? readDevicePermissionMode(agentId) : "ask",
|
|
19
|
+
() => "ask"
|
|
20
|
+
);
|
|
21
|
+
if (!host?.deviceTools) return null;
|
|
22
|
+
return /* @__PURE__ */ jsx(
|
|
23
|
+
PicksSwitchRow,
|
|
24
|
+
{
|
|
25
|
+
label: "Ask before acting",
|
|
26
|
+
detail: "This agent",
|
|
27
|
+
title: `Browser actions ${mode === "ask" ? "wait for your approval" : "run without asking"} (${key})`,
|
|
28
|
+
checked: mode === "ask",
|
|
29
|
+
onCheckedChange: (ask) => writeDevicePermissionMode(agentId, ask ? "ask" : "act")
|
|
30
|
+
}
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
export {
|
|
34
|
+
DeviceToolsModeRow
|
|
35
|
+
};
|
|
@@ -199,13 +199,11 @@ function InboxQueueStripBody({ conversationId }) {
|
|
|
199
199
|
{
|
|
200
200
|
type: "button",
|
|
201
201
|
icon: RotateCcw,
|
|
202
|
-
size: "xs",
|
|
203
202
|
variant: "ghost",
|
|
204
203
|
tooltip: "Retry \u2014 try saving this message to the queue again.",
|
|
205
204
|
tooltipSide: "top",
|
|
206
205
|
"aria-label": "Retry queued message",
|
|
207
206
|
className: queueActionClassName,
|
|
208
|
-
iconClassName: "h-4 w-4",
|
|
209
207
|
onClick: () => {
|
|
210
208
|
dispatch(
|
|
211
209
|
removeInboxItem({
|
|
@@ -228,13 +226,11 @@ function InboxQueueStripBody({ conversationId }) {
|
|
|
228
226
|
{
|
|
229
227
|
type: "button",
|
|
230
228
|
icon: Zap,
|
|
231
|
-
size: "xs",
|
|
232
229
|
variant: "ghost",
|
|
233
230
|
tooltip: "Deliver at the next pause \u2014 the agent keeps working, but receives this sooner.",
|
|
234
231
|
tooltipSide: "top",
|
|
235
232
|
"aria-label": "Deliver queued message at the agent's next pause",
|
|
236
233
|
className: queueActionClassName,
|
|
237
|
-
iconClassName: "h-4 w-4",
|
|
238
234
|
onClick: async () => {
|
|
239
235
|
setPromotingIds(
|
|
240
236
|
(ids) => new Set(ids).add(item.injectionId)
|
|
@@ -261,13 +257,11 @@ function InboxQueueStripBody({ conversationId }) {
|
|
|
261
257
|
{
|
|
262
258
|
type: "button",
|
|
263
259
|
icon: Pencil,
|
|
264
|
-
size: "xs",
|
|
265
260
|
variant: "ghost",
|
|
266
261
|
tooltip: "Edit \u2014 change this message before the agent receives it.",
|
|
267
262
|
tooltipSide: "top",
|
|
268
263
|
"aria-label": "Edit queued message",
|
|
269
264
|
className: queueActionClassName,
|
|
270
|
-
iconClassName: "h-4 w-4",
|
|
271
265
|
onClick: () => setEditing({
|
|
272
266
|
injectionId: item.injectionId,
|
|
273
267
|
mode: item.mode,
|
|
@@ -280,13 +274,11 @@ function InboxQueueStripBody({ conversationId }) {
|
|
|
280
274
|
{
|
|
281
275
|
type: "button",
|
|
282
276
|
icon: X,
|
|
283
|
-
size: "xs",
|
|
284
277
|
variant: "ghost",
|
|
285
278
|
tooltip: failed ? "Dismiss \u2014 remove this failed message." : "Withdraw \u2014 remove this message before the agent receives it.",
|
|
286
279
|
tooltipSide: "top",
|
|
287
280
|
"aria-label": failed ? "Dismiss failed message" : "Withdraw queued message",
|
|
288
281
|
className: queueActionClassName,
|
|
289
|
-
iconClassName: "h-4 w-4",
|
|
290
282
|
onClick: () => dispatch(
|
|
291
283
|
retractInboxItem({
|
|
292
284
|
conversationId,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { UntrustedCount } from "../../../../host/ui-slots.js";
|
|
4
4
|
import { readOf } from "../../../../host/ui-slots.js";
|
|
5
5
|
import { useEffect } from "react";
|
|
@@ -14,6 +14,7 @@ import {
|
|
|
14
14
|
PicksSkeletons,
|
|
15
15
|
PicksSwitchRow
|
|
16
16
|
} from "./RunPicksSurface.js";
|
|
17
|
+
import { DeviceToolsModeRow } from "./DeviceToolsModeRow.js";
|
|
17
18
|
import { ReadFailure } from "../../../../host/ui-slots.js";
|
|
18
19
|
import {
|
|
19
20
|
selectAgentError,
|
|
@@ -206,16 +207,19 @@ function RunToolPicker({ conversationId }) {
|
|
|
206
207
|
{
|
|
207
208
|
noun: "tools",
|
|
208
209
|
icon: Wrench,
|
|
209
|
-
topSlot: /* @__PURE__ */
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
210
|
+
topSlot: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
211
|
+
/* @__PURE__ */ jsx(
|
|
212
|
+
PicksSwitchRow,
|
|
213
|
+
{
|
|
214
|
+
label: "Auto tools",
|
|
215
|
+
detail: autoChoice === null ? "Agent default" : "This chat",
|
|
216
|
+
title: `Agent default: ${agentDefaultOn ? "on" : "off"}`,
|
|
217
|
+
checked: autoOn,
|
|
218
|
+
onCheckedChange: setAutoTools
|
|
219
|
+
}
|
|
220
|
+
),
|
|
221
|
+
/* @__PURE__ */ jsx(DeviceToolsModeRow, { agentId: agentId ?? null })
|
|
222
|
+
] }),
|
|
219
223
|
notice: modelSupportsTools ? null : /* @__PURE__ */ jsx(PicksNotice, { icon: AlertTriangle, children: "This model can't use tools; they're dropped" }),
|
|
220
224
|
agentCount: /* @__PURE__ */ jsx(
|
|
221
225
|
UntrustedCount,
|
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
Eye,
|
|
13
13
|
CornerDownLeft,
|
|
14
14
|
Cpu,
|
|
15
|
+
Crown,
|
|
15
16
|
FileText,
|
|
16
17
|
FolderOpen,
|
|
17
18
|
Globe,
|
|
@@ -30,6 +31,9 @@ import {
|
|
|
30
31
|
} from "lucide-react";
|
|
31
32
|
import { Popover, PopoverContent, PopoverTrigger } from "@ai-matrx/design-system";
|
|
32
33
|
import { useAppDispatch, useAppSelector } from "../../../../../store/hooks.js";
|
|
34
|
+
import { selectShowCreatorPanel, toggleShowCreatorPanel } from "../../../../../host/prefs.js";
|
|
35
|
+
import { selectIsSuperAdmin } from "../../../../../host/identity.js";
|
|
36
|
+
import { selectIsCreator } from "../../../../redux/execution-system/instance-ui-state/instance-ui-state.selectors.js";
|
|
33
37
|
import { ResourcePickerMenu } from "../../../../../host/ui-slots.js";
|
|
34
38
|
import { flattenResourcePickerItems } from "../../../../../host/ui-slots.js";
|
|
35
39
|
import { useKnowledgeAttachSearch } from "../../../../../host/ui-slots.js";
|
|
@@ -109,6 +113,10 @@ function ComposerPlusMenu({
|
|
|
109
113
|
onOpenChange
|
|
110
114
|
}) {
|
|
111
115
|
const dispatch = useAppDispatch();
|
|
116
|
+
const isCreator = useAppSelector(selectIsCreator(conversationId));
|
|
117
|
+
const isSystemAdmin = useAppSelector(selectIsSuperAdmin);
|
|
118
|
+
const showCreatorSwitch = isCreator || isSystemAdmin;
|
|
119
|
+
const showCreatorPanel = useAppSelector(selectShowCreatorPanel);
|
|
112
120
|
const touchOnly = useTouchOnlyDevice();
|
|
113
121
|
const [openState, setOpenState] = useState(false);
|
|
114
122
|
const open = openProp ?? openState;
|
|
@@ -345,6 +353,20 @@ function ComposerPlusMenu({
|
|
|
345
353
|
onCheckedChange: (value) => dispatch(setAutoClearMode({ conversationId, value, surfaceKey }))
|
|
346
354
|
}
|
|
347
355
|
) : null,
|
|
356
|
+
showCreatorSwitch ? (
|
|
357
|
+
// The agent's creator (or a system admin): the creator panel above
|
|
358
|
+
// the variables. The choice is saved to the person's preferences,
|
|
359
|
+
// so it opens the same way on the next load (Arman, 2026-10-08).
|
|
360
|
+
/* @__PURE__ */ jsx(
|
|
361
|
+
ComposerMenuSwitchRow,
|
|
362
|
+
{
|
|
363
|
+
icon: Crown,
|
|
364
|
+
label: "Creator panel",
|
|
365
|
+
checked: showCreatorPanel,
|
|
366
|
+
onCheckedChange: () => dispatch(toggleShowCreatorPanel())
|
|
367
|
+
}
|
|
368
|
+
)
|
|
369
|
+
) : null,
|
|
348
370
|
/* @__PURE__ */ jsx(ComposerMenuDivider, {}),
|
|
349
371
|
/* @__PURE__ */ jsx(
|
|
350
372
|
ComposerMenuRow,
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The composer rail's pill: icon + ONE word, the full name / detail / hint in the tooltip, and an
|
|
3
|
+
* optional floating X. Shared by `ConversationContextRail` and the host companion-panel pills
|
|
4
|
+
* (`ConversationCompanionPills`) so a pill looks and behaves the same wherever it sits.
|
|
5
|
+
*/
|
|
6
|
+
import type { LucideIcon } from "lucide-react";
|
|
7
|
+
export type RailTone = "default" | "primary";
|
|
8
|
+
export interface RailItem {
|
|
9
|
+
id: string;
|
|
10
|
+
icon: LucideIcon;
|
|
11
|
+
/** Full name — shown in the tooltip and the overflow menu, never on the pill. */
|
|
12
|
+
label: string;
|
|
13
|
+
/** ONE word for the pill face (chips stay tiny; the tooltip carries the rest). */
|
|
14
|
+
word: string;
|
|
15
|
+
/** Short trailing meta (e.g. "3/5", a count, a status word) — tooltip only. */
|
|
16
|
+
detail?: string;
|
|
17
|
+
/** One-line description of what clicking does, for the tooltip. */
|
|
18
|
+
hint?: string;
|
|
19
|
+
tone?: RailTone;
|
|
20
|
+
/** Tiny spinner instead of a static state (e.g. saving). */
|
|
21
|
+
busy?: boolean;
|
|
22
|
+
/** Pill's detail surface is currently open. */
|
|
23
|
+
active?: boolean;
|
|
24
|
+
onOpen: () => void;
|
|
25
|
+
/** Floating X — detaches the item from this conversation's context. */
|
|
26
|
+
onRemove?: () => void;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Tiny pill: icon + ONE word. Everything else (full name, status, click hint)
|
|
30
|
+
* lives in the tooltip; a floating X (hover/focus reveal, always visible on
|
|
31
|
+
* touch) detaches the item from this conversation's context.
|
|
32
|
+
*/
|
|
33
|
+
export declare function RailPill({ item }: {
|
|
34
|
+
item: RailItem;
|
|
35
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Tooltip, TooltipContent, TooltipTrigger } from "@ai-matrx/design-system";
|
|
4
|
+
import { ComposerChip } from "./ComposerChip.js";
|
|
5
|
+
function RailPill({ item }) {
|
|
6
|
+
const Icon = item.icon;
|
|
7
|
+
return /* @__PURE__ */ jsxs(Tooltip, { children: [
|
|
8
|
+
/* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx("span", { "data-rail-entry": "", className: "inline-flex shrink-0", children: /* @__PURE__ */ jsx(
|
|
9
|
+
ComposerChip,
|
|
10
|
+
{
|
|
11
|
+
tone: item.tone === "primary" ? "primary" : "neutral",
|
|
12
|
+
pressed: item.active ? true : void 0,
|
|
13
|
+
busy: item.busy,
|
|
14
|
+
icon: /* @__PURE__ */ jsx(Icon, {}),
|
|
15
|
+
label: item.word,
|
|
16
|
+
onClick: item.onOpen,
|
|
17
|
+
"aria-label": item.label,
|
|
18
|
+
remove: item.onRemove ? { label: `Remove ${item.label}`, onRemove: item.onRemove } : void 0
|
|
19
|
+
}
|
|
20
|
+
) }) }),
|
|
21
|
+
/* @__PURE__ */ jsxs(TooltipContent, { side: "top", className: "max-w-[16rem]", children: [
|
|
22
|
+
/* @__PURE__ */ jsx("div", { className: "font-medium text-popover-foreground", children: item.label }),
|
|
23
|
+
item.detail && /* @__PURE__ */ jsx("div", { className: "mt-0.5 text-muted-foreground", children: item.detail }),
|
|
24
|
+
item.hint && /* @__PURE__ */ jsx("div", { className: "mt-0.5 text-[10px] text-muted-foreground/80", children: item.hint })
|
|
25
|
+
] })
|
|
26
|
+
] });
|
|
27
|
+
}
|
|
28
|
+
export {
|
|
29
|
+
RailPill
|
|
30
|
+
};
|