@ai-matrx/chat 0.6.5 → 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 +89 -0
- package/README.md +1 -1
- package/dist/agents/components/agent-widgets/AgentChatHistorySidebar.js +16 -55
- package/dist/agents/components/chat/ChatHistorySidebar.d.ts +4 -4
- package/dist/agents/components/chat/ChatHistorySidebar.js +2 -2
- package/dist/agents/components/chat/ChatSidebarMenu.js +1 -1
- 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-actions/conversationActionRegistry.d.ts +8 -0
- package/dist/agents/components/conversation-actions/conversationActionRegistry.js +11 -4
- 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 +11 -0
- package/dist/agents/components/conversation-history/{ConversationTrashSection.js → ConversationArchiveSection.js} +41 -23
- package/dist/agents/components/conversation-history/ConversationHistorySidebar.d.ts +29 -10
- package/dist/agents/components/conversation-history/ConversationHistorySidebar.js +94 -141
- package/dist/agents/components/conversation-history/ConversationPickerWindow.js +1 -2
- 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/RunControlsTabPanel.d.ts +2 -0
- package/dist/agents/components/inputs/smart-input/RunControlsTabPanel.js +8 -1
- package/dist/agents/components/inputs/smart-input/RunToolPicker.js +17 -12
- 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/AgentRunHeader.js +11 -5
- package/dist/agents/components/run-controls/panels/shared.d.ts +1 -1
- package/dist/agents/components/shared/AgentHeaderMobile.js +1 -0
- package/dist/agents/components/shared/AgentModeController.js +91 -27
- package/dist/agents/components/shared/AgentSelectorIsland.js +2 -1
- 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/run-tier-record.js +1 -0
- 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/history-filters.d.ts +6 -0
- package/dist/agents/redux/conversation-history/history-filters.js +4 -1
- package/dist/agents/redux/conversation-history/selectors.js +2 -3
- package/dist/agents/redux/conversation-history/slice.d.ts +6 -9
- package/dist/agents/redux/conversation-history/slice.js +14 -23
- package/dist/agents/redux/conversation-history/thunks.js +7 -41
- package/dist/agents/redux/conversation-history/types.d.ts +12 -12
- package/dist/agents/redux/conversation-history/types.js +4 -6
- package/dist/agents/redux/conversation-list/conversation-list.selectors.d.ts +7 -73
- package/dist/agents/redux/conversation-list/conversation-list.selectors.js +12 -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 +6 -5
- package/dist/agents/redux/conversation-list/conversation-row-actions.thunks.js +11 -2
- 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 +12 -4
- package/dist/agents/redux/conversation-list/conversation-trash.thunks.js +52 -36
- 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/message-crud/soft-delete-conversation.thunk.js +5 -2
- 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/dist/window-panels/windows/agents/AgentRunWindow.d.ts +1 -1
- package/dist/window-panels/windows/agents/AgentRunWindow.js +27 -21
- package/dist/window-panels/windows/agents/RunControlsWindow.js +1 -0
- package/package.json +4583 -121
- 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/conversation-history/ConversationTrashSection.d.ts +0 -7
- 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
|
@@ -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,
|
|
@@ -22,6 +22,8 @@ export declare function useRunControlsState(conversationId: string, includeAttac
|
|
|
22
22
|
resolveTab: (tab: RunControlsTab) => RunControlsTab;
|
|
23
23
|
tabTrailing: (tabId: RunControlsTab) => ReactNode;
|
|
24
24
|
addedCount: number;
|
|
25
|
+
addedToolsCount: number;
|
|
26
|
+
addedSkillsCount: number;
|
|
25
27
|
hasModelOverride: boolean;
|
|
26
28
|
hasActiveContext: boolean;
|
|
27
29
|
anyDocActive: boolean;
|
|
@@ -153,6 +153,9 @@ function useRunControlsState(conversationId, includeAttach) {
|
|
|
153
153
|
if (tabId === "tools" && addedCount > 0) {
|
|
154
154
|
return /* @__PURE__ */ jsx(Badge, { tone: "primary", children: addedCount });
|
|
155
155
|
}
|
|
156
|
+
if (tabId === "skills" && addedSkillsCount > 0) {
|
|
157
|
+
return /* @__PURE__ */ jsx(Badge, { tone: "primary", children: addedSkillsCount });
|
|
158
|
+
}
|
|
156
159
|
if (tabId === "model" && hasModelOverride) {
|
|
157
160
|
return /* @__PURE__ */ jsx(TabStatusDot, { label: "overridden" });
|
|
158
161
|
}
|
|
@@ -169,7 +172,11 @@ function useRunControlsState(conversationId, includeAttach) {
|
|
|
169
172
|
defaultTab,
|
|
170
173
|
resolveTab,
|
|
171
174
|
tabTrailing,
|
|
172
|
-
|
|
175
|
+
// EVERYTHING the person added to this run (tools + skills): the + control's
|
|
176
|
+
// label and tint read this one number, so Skills count exactly like Tools.
|
|
177
|
+
addedCount: addedCount + addedSkillsCount,
|
|
178
|
+
addedToolsCount: addedCount,
|
|
179
|
+
addedSkillsCount,
|
|
173
180
|
hasModelOverride,
|
|
174
181
|
hasActiveContext,
|
|
175
182
|
anyDocActive,
|
|
@@ -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,
|
|
@@ -38,6 +39,7 @@ import { DEFAULT_BUILDER_ADVANCED_SETTINGS } from "../../../types/instance.types
|
|
|
38
39
|
import { filterAndSortBySearch } from "@ai-matrx/kit/search-scoring";
|
|
39
40
|
import { getToolDisplayName } from "../../../../tool-call-visualization/registry/registry.js";
|
|
40
41
|
import { groupToolCatalog, toolCategoryLabel } from "./run-tool-catalog.js";
|
|
42
|
+
import { isBundleListerName } from "@ai-matrx/agents/tools";
|
|
41
43
|
import { loadAvailableTools, selectAllTools, selectToolsError, selectToolsStatus, useToolCatalog } from "../../../identity/tool-catalog.js";
|
|
42
44
|
function RunToolPicker({ conversationId }) {
|
|
43
45
|
const dispatch = useAppDispatch();
|
|
@@ -123,7 +125,7 @@ function RunToolPicker({ conversationId }) {
|
|
|
123
125
|
}
|
|
124
126
|
})
|
|
125
127
|
);
|
|
126
|
-
const list = tools ?? [];
|
|
128
|
+
const list = (tools ?? []).filter((t) => !isBundleListerName(t.name));
|
|
127
129
|
const toolMap = new Map(list.map((t) => [t.id, t]));
|
|
128
130
|
const builtInIds = Array.isArray(agentToolIds) ? agentToolIds : [];
|
|
129
131
|
const agentOwned = new Set(builtInIds);
|
|
@@ -205,16 +207,19 @@ function RunToolPicker({ conversationId }) {
|
|
|
205
207
|
{
|
|
206
208
|
noun: "tools",
|
|
207
209
|
icon: Wrench,
|
|
208
|
-
topSlot: /* @__PURE__ */
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
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
|
+
] }),
|
|
218
223
|
notice: modelSupportsTools ? null : /* @__PURE__ */ jsx(PicksNotice, { icon: AlertTriangle, children: "This model can't use tools; they're dropped" }),
|
|
219
224
|
agentCount: /* @__PURE__ */ jsx(
|
|
220
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
|
+
};
|
|
@@ -262,6 +262,40 @@ function VariableField({ conversationId, def, value, onChange }) {
|
|
|
262
262
|
)
|
|
263
263
|
] });
|
|
264
264
|
}
|
|
265
|
+
function OtherAnswerBox({
|
|
266
|
+
otherText,
|
|
267
|
+
onTextChange
|
|
268
|
+
}) {
|
|
269
|
+
return /* @__PURE__ */ jsx("div", { className: "mt-1 pl-6", children: /* @__PURE__ */ jsx(
|
|
270
|
+
VoiceTextarea,
|
|
271
|
+
{
|
|
272
|
+
value: otherText === "__other__" ? "" : otherText,
|
|
273
|
+
placeholder: "Enter your answer...",
|
|
274
|
+
onChange: (e) => onTextChange(e.target.value),
|
|
275
|
+
autoGrow: true,
|
|
276
|
+
minHeight: 28,
|
|
277
|
+
maxHeight: 80,
|
|
278
|
+
className: "text-xs bg-transparent",
|
|
279
|
+
style: IOS_INPUT_STYLE
|
|
280
|
+
}
|
|
281
|
+
) });
|
|
282
|
+
}
|
|
283
|
+
function OptionsFrame({
|
|
284
|
+
needsScroll,
|
|
285
|
+
otherInput,
|
|
286
|
+
children
|
|
287
|
+
}) {
|
|
288
|
+
if (needsScroll) {
|
|
289
|
+
return /* @__PURE__ */ jsxs("div", { className: "max-h-36 overflow-y-auto", children: [
|
|
290
|
+
children,
|
|
291
|
+
otherInput
|
|
292
|
+
] });
|
|
293
|
+
}
|
|
294
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
295
|
+
children,
|
|
296
|
+
otherInput
|
|
297
|
+
] });
|
|
298
|
+
}
|
|
265
299
|
function RadioField({
|
|
266
300
|
cc,
|
|
267
301
|
value,
|
|
@@ -312,32 +346,17 @@ function RadioField({
|
|
|
312
346
|
]
|
|
313
347
|
}
|
|
314
348
|
);
|
|
315
|
-
const otherInput = isOtherSelected && /* @__PURE__ */ jsx(
|
|
316
|
-
|
|
349
|
+
const otherInput = isOtherSelected && /* @__PURE__ */ jsx(
|
|
350
|
+
OtherAnswerBox,
|
|
317
351
|
{
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
},
|
|
324
|
-
autoGrow: true,
|
|
325
|
-
minHeight: 28,
|
|
326
|
-
maxHeight: 80,
|
|
327
|
-
className: "text-xs bg-transparent",
|
|
328
|
-
style: IOS_INPUT_STYLE
|
|
352
|
+
otherText,
|
|
353
|
+
onTextChange: (text) => {
|
|
354
|
+
setOtherText(text);
|
|
355
|
+
onChange(text || "__other__");
|
|
356
|
+
}
|
|
329
357
|
}
|
|
330
|
-
)
|
|
331
|
-
|
|
332
|
-
return /* @__PURE__ */ jsxs("div", { className: "max-h-36 overflow-y-auto", children: [
|
|
333
|
-
content,
|
|
334
|
-
otherInput
|
|
335
|
-
] });
|
|
336
|
-
}
|
|
337
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
338
|
-
content,
|
|
339
|
-
otherInput
|
|
340
|
-
] });
|
|
358
|
+
);
|
|
359
|
+
return /* @__PURE__ */ jsx(OptionsFrame, { needsScroll, otherInput, children: content });
|
|
341
360
|
}
|
|
342
361
|
function CheckboxField({
|
|
343
362
|
cc,
|
|
@@ -405,35 +424,20 @@ function CheckboxField({
|
|
|
405
424
|
]
|
|
406
425
|
}
|
|
407
426
|
);
|
|
408
|
-
const otherInput = isOtherChecked && /* @__PURE__ */ jsx(
|
|
409
|
-
|
|
427
|
+
const otherInput = isOtherChecked && /* @__PURE__ */ jsx(
|
|
428
|
+
OtherAnswerBox,
|
|
410
429
|
{
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
setOtherText(e.target.value);
|
|
430
|
+
otherText,
|
|
431
|
+
onTextChange: (text) => {
|
|
432
|
+
setOtherText(text);
|
|
415
433
|
const knownSelected = selected.filter((s) => options.includes(s));
|
|
416
434
|
onChange(
|
|
417
|
-
|
|
435
|
+
text ? [...knownSelected, text] : knownSelected
|
|
418
436
|
);
|
|
419
|
-
}
|
|
420
|
-
autoGrow: true,
|
|
421
|
-
minHeight: 28,
|
|
422
|
-
maxHeight: 80,
|
|
423
|
-
className: "text-xs bg-transparent",
|
|
424
|
-
style: IOS_INPUT_STYLE
|
|
437
|
+
}
|
|
425
438
|
}
|
|
426
|
-
)
|
|
427
|
-
|
|
428
|
-
return /* @__PURE__ */ jsxs("div", { className: "max-h-36 overflow-y-auto", children: [
|
|
429
|
-
content,
|
|
430
|
-
otherInput
|
|
431
|
-
] });
|
|
432
|
-
}
|
|
433
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
434
|
-
content,
|
|
435
|
-
otherInput
|
|
436
|
-
] });
|
|
439
|
+
);
|
|
440
|
+
return /* @__PURE__ */ jsx(OptionsFrame, { needsScroll, otherInput, children: content });
|
|
437
441
|
}
|
|
438
442
|
export {
|
|
439
443
|
AgentVariableForm
|
|
@@ -15,7 +15,7 @@ function AgentRunHeader({
|
|
|
15
15
|
currentPath
|
|
16
16
|
}) {
|
|
17
17
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
18
|
-
/* @__PURE__ */ jsx("div", { className: "
|
|
18
|
+
/* @__PURE__ */ jsx("div", { className: "w-full @min-[44rem]/shell-header:hidden", children: /* @__PURE__ */ jsx(
|
|
19
19
|
AgentHeaderMobile,
|
|
20
20
|
{
|
|
21
21
|
agentId,
|
|
@@ -24,8 +24,8 @@ function AgentRunHeader({
|
|
|
24
24
|
extraActions: /* @__PURE__ */ jsx(AgentNewRunButton, { surfaceKey })
|
|
25
25
|
}
|
|
26
26
|
) }),
|
|
27
|
-
/* @__PURE__ */ jsxs("div", { className: "@container/agent-header hidden
|
|
28
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center", children: [
|
|
27
|
+
/* @__PURE__ */ jsxs("div", { className: "@container/agent-header hidden @min-[44rem]/shell-header:flex items-center justify-between w-full min-w-0 gap-2", children: [
|
|
28
|
+
/* @__PURE__ */ jsxs("div", { className: "flex min-w-0 shrink items-center", children: [
|
|
29
29
|
/* @__PURE__ */ jsx(ChevronLeftTapButton, { variant: "transparent", href: backHref, "aria-label": "Back to Agents" }),
|
|
30
30
|
/* @__PURE__ */ jsx("div", { className: "flex min-w-0 items-center ps-[calc(var(--matrx-tap-gap)/2)]", children: /* @__PURE__ */ jsx(
|
|
31
31
|
AgentSelectorIsland,
|
|
@@ -42,7 +42,7 @@ function AgentRunHeader({
|
|
|
42
42
|
/* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "w-[calc(var(--matrx-tap-gap)/2)] shrink-0" }),
|
|
43
43
|
/* @__PURE__ */ jsx(AgentNewRunButton, { surfaceKey })
|
|
44
44
|
] }),
|
|
45
|
-
/* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
|
|
45
|
+
/* @__PURE__ */ jsx("div", { className: "shrink-0", children: /* @__PURE__ */ jsx(
|
|
46
46
|
AgentModeController,
|
|
47
47
|
{
|
|
48
48
|
agentId,
|
|
@@ -51,7 +51,13 @@ function AgentRunHeader({
|
|
|
51
51
|
}
|
|
52
52
|
) }),
|
|
53
53
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5 pt-0.5 shrink-0", children: [
|
|
54
|
-
/* @__PURE__ */ jsx(
|
|
54
|
+
/* @__PURE__ */ jsx(
|
|
55
|
+
AgentSaveStatus,
|
|
56
|
+
{
|
|
57
|
+
agentId,
|
|
58
|
+
versionClassName: "hidden @min-[40rem]/agent-header:inline"
|
|
59
|
+
}
|
|
60
|
+
),
|
|
55
61
|
basePath === "/agents" && /* @__PURE__ */ jsx(ReviewAnswersLink, { agentId }),
|
|
56
62
|
/* @__PURE__ */ jsx(AgentOptionsMenu, { agentId, basePath })
|
|
57
63
|
] })
|
|
@@ -26,7 +26,7 @@ export declare function makeSelectConversationRequests(conversationId: string):
|
|
|
26
26
|
voiceAgent: import("../../../../voice-agent/types.js").VoiceAgentState;
|
|
27
27
|
agentDefinition: import("../../../types/agent-definition.types.js").AgentDefinitionSliceState;
|
|
28
28
|
conversationList: import("../../../redux/conversation-list/conversation-list.types.js").ConversationListState;
|
|
29
|
-
conversationHistory: import("../../../redux/conversation-history/
|
|
29
|
+
conversationHistory: import("../../../redux/conversation-history/types.js").ConversationHistoryState;
|
|
30
30
|
agentShortcut: import("../../../redux/agent-shortcuts/types.js").AgentShortcutSliceState;
|
|
31
31
|
agentShortcutCategory: import("../../../redux/agent-shortcut-categories/types.js").AgentShortcutCategorySliceState;
|
|
32
32
|
surfaceUserState: import("../../../../surfaces/redux/userStateSlice.js").SurfaceUserStateSlice;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { useState, useTransition } from "react";
|
|
3
|
+
import { useRef, useState, useTransition } from "react";
|
|
4
4
|
import { useRouter, usePathname, Link } from "../../../host/navigation.js";
|
|
5
5
|
import {
|
|
6
6
|
Activity,
|
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
History,
|
|
10
10
|
Layers,
|
|
11
11
|
LayoutGrid,
|
|
12
|
+
MoreHorizontal,
|
|
12
13
|
Pencil,
|
|
13
14
|
Play,
|
|
14
15
|
Plus,
|
|
@@ -26,7 +27,11 @@ import {
|
|
|
26
27
|
AlertDialogDescription,
|
|
27
28
|
AlertDialogFooter,
|
|
28
29
|
AlertDialogHeader,
|
|
29
|
-
AlertDialogTitle
|
|
30
|
+
AlertDialogTitle,
|
|
31
|
+
DropdownMenu,
|
|
32
|
+
DropdownMenuContent,
|
|
33
|
+
DropdownMenuItem,
|
|
34
|
+
DropdownMenuTrigger
|
|
30
35
|
} from "@ai-matrx/design-system";
|
|
31
36
|
import {
|
|
32
37
|
NavItemTooltip,
|
|
@@ -46,6 +51,20 @@ const MODES = [
|
|
|
46
51
|
{ id: "widgets", label: "Widgets", icon: LayoutGrid },
|
|
47
52
|
{ id: "new", label: "New", icon: Plus }
|
|
48
53
|
];
|
|
54
|
+
const INLINE_FROM = {
|
|
55
|
+
run: "",
|
|
56
|
+
edit: "hidden @min-[500px]/agent-header:flex",
|
|
57
|
+
view: "hidden @min-[540px]/agent-header:flex",
|
|
58
|
+
runs: "hidden @min-[580px]/agent-header:flex",
|
|
59
|
+
versions: "hidden @min-[620px]/agent-header:flex",
|
|
60
|
+
hindsight: "hidden @min-[660px]/agent-header:flex",
|
|
61
|
+
shortcuts: "hidden @min-[700px]/agent-header:flex",
|
|
62
|
+
apps: "hidden @min-[740px]/agent-header:flex",
|
|
63
|
+
surfaces: "hidden @min-[780px]/agent-header:flex",
|
|
64
|
+
widgets: "hidden @min-[820px]/agent-header:flex",
|
|
65
|
+
new: "hidden @min-[860px]/agent-header:flex"
|
|
66
|
+
};
|
|
67
|
+
const MORE_HIDDEN_FROM = "@min-[860px]/agent-header:hidden";
|
|
49
68
|
function getAgentModeHref(mode, agentId, basePath) {
|
|
50
69
|
if (mode === "new") return `${basePath}/new`;
|
|
51
70
|
const map = {
|
|
@@ -112,32 +131,77 @@ function AgentModeController({
|
|
|
112
131
|
navigateTo(getAgentModeHref(next, agentId, basePath));
|
|
113
132
|
};
|
|
114
133
|
const getModeHref = (id) => getAgentModeHref(id, agentId, basePath);
|
|
134
|
+
const inlineRefs = useRef({});
|
|
135
|
+
const [folded, setFolded] = useState([]);
|
|
136
|
+
const readFolded = () => setFolded(
|
|
137
|
+
MODES.map((m) => m.id).filter((id) => {
|
|
138
|
+
const el = inlineRefs.current[id];
|
|
139
|
+
return !el || el.getClientRects().length === 0;
|
|
140
|
+
})
|
|
141
|
+
);
|
|
115
142
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
116
|
-
/* @__PURE__ */ jsx(NavTooltipProvider, { children: /* @__PURE__ */
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
"
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
143
|
+
/* @__PURE__ */ jsx(NavTooltipProvider, { children: /* @__PURE__ */ jsxs("div", { className: "matrx-glass-thin-border flex items-center gap-0 rounded-full p-0.5", children: [
|
|
144
|
+
MODES.map(({ id, label, icon: Icon }) => {
|
|
145
|
+
const isActive = id === mode;
|
|
146
|
+
return /* @__PURE__ */ jsx(NavItemTooltip, { label, children: /* @__PURE__ */ jsxs(
|
|
147
|
+
Link,
|
|
148
|
+
{
|
|
149
|
+
ref: (el) => {
|
|
150
|
+
inlineRefs.current[id] = el;
|
|
151
|
+
},
|
|
152
|
+
href: getModeHref(id),
|
|
153
|
+
onClick: (e) => {
|
|
154
|
+
if (e.metaKey || e.ctrlKey) return;
|
|
155
|
+
e.preventDefault();
|
|
156
|
+
handleModeChange(id);
|
|
157
|
+
},
|
|
158
|
+
"aria-label": label,
|
|
159
|
+
className: cn(
|
|
160
|
+
"flex items-center justify-center gap-1 py-0.5 text-[0.6875rem] font-medium rounded-full transition-colors cursor-pointer",
|
|
161
|
+
"px-2.5",
|
|
162
|
+
"[&_svg]:w-3.5 [&_svg]:h-3.5",
|
|
163
|
+
isActive ? NAV_ITEM_SELECTED : NAV_ITEM_UNSELECTED,
|
|
164
|
+
!isActive && INLINE_FROM[id]
|
|
165
|
+
),
|
|
166
|
+
children: [
|
|
167
|
+
/* @__PURE__ */ jsx(Icon, {}),
|
|
168
|
+
/* @__PURE__ */ jsx("span", { className: "hidden @min-[1240px]/agent-header:inline", children: label })
|
|
169
|
+
]
|
|
170
|
+
}
|
|
171
|
+
) }, id);
|
|
172
|
+
}),
|
|
173
|
+
/* @__PURE__ */ jsxs(DropdownMenu, { onOpenChange: (open) => open && readFolded(), children: [
|
|
174
|
+
/* @__PURE__ */ jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx(
|
|
175
|
+
"button",
|
|
176
|
+
{
|
|
177
|
+
type: "button",
|
|
178
|
+
"aria-label": "More modes",
|
|
179
|
+
title: "More",
|
|
180
|
+
className: cn(
|
|
181
|
+
"flex items-center justify-center py-0.5 px-2.5 rounded-full transition-colors cursor-pointer",
|
|
182
|
+
"[&_svg]:w-3.5 [&_svg]:h-3.5",
|
|
183
|
+
NAV_ITEM_UNSELECTED,
|
|
184
|
+
MORE_HIDDEN_FROM
|
|
185
|
+
),
|
|
186
|
+
children: /* @__PURE__ */ jsx(MoreHorizontal, {})
|
|
187
|
+
}
|
|
188
|
+
) }),
|
|
189
|
+
/* @__PURE__ */ jsx(DropdownMenuContent, { align: "end", className: "min-w-40", children: MODES.filter((m) => folded.includes(m.id)).map(
|
|
190
|
+
({ id, label, icon: Icon }) => /* @__PURE__ */ jsxs(
|
|
191
|
+
DropdownMenuItem,
|
|
192
|
+
{
|
|
193
|
+
onSelect: () => handleModeChange(id),
|
|
194
|
+
className: "gap-2",
|
|
195
|
+
children: [
|
|
196
|
+
/* @__PURE__ */ jsx(Icon, { className: "h-4 w-4 text-muted-foreground" }),
|
|
197
|
+
label
|
|
198
|
+
]
|
|
199
|
+
},
|
|
200
|
+
id
|
|
201
|
+
)
|
|
202
|
+
) })
|
|
203
|
+
] })
|
|
204
|
+
] }) }),
|
|
141
205
|
/* @__PURE__ */ jsx(AlertDialog, { open: showDirtyDialog, onOpenChange: setShowDirtyDialog, children: /* @__PURE__ */ jsxs(AlertDialogContent, { children: [
|
|
142
206
|
/* @__PURE__ */ jsxs(AlertDialogHeader, { children: [
|
|
143
207
|
/* @__PURE__ */ jsx(AlertDialogTitle, { children: "Unsaved Changes" }),
|
|
@@ -44,7 +44,8 @@ function AgentSelectorIsland({
|
|
|
44
44
|
label: displayName,
|
|
45
45
|
activeAgentId: agentId,
|
|
46
46
|
triggerSlot,
|
|
47
|
-
noBorder: true
|
|
47
|
+
noBorder: true,
|
|
48
|
+
className: "min-w-0 shrink"
|
|
48
49
|
}
|
|
49
50
|
),
|
|
50
51
|
showVersion && /* @__PURE__ */ jsxs("span", { className: "text-[0.625rem] font-medium text-[var(--shell-nav-text)] tabular-nums shrink-0", children: [
|