@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
|
@@ -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
|
|
@@ -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;
|
|
@@ -171,11 +171,12 @@ function AgentModeController({
|
|
|
171
171
|
) }, id);
|
|
172
172
|
}),
|
|
173
173
|
/* @__PURE__ */ jsxs(DropdownMenu, { onOpenChange: (open) => open && readFolded(), children: [
|
|
174
|
-
/* @__PURE__ */ jsx(
|
|
174
|
+
/* @__PURE__ */ jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx(
|
|
175
175
|
"button",
|
|
176
176
|
{
|
|
177
177
|
type: "button",
|
|
178
178
|
"aria-label": "More modes",
|
|
179
|
+
title: "More",
|
|
179
180
|
className: cn(
|
|
180
181
|
"flex items-center justify-center py-0.5 px-2.5 rounded-full transition-colors cursor-pointer",
|
|
181
182
|
"[&_svg]:w-3.5 [&_svg]:h-3.5",
|
|
@@ -184,7 +185,7 @@ function AgentModeController({
|
|
|
184
185
|
),
|
|
185
186
|
children: /* @__PURE__ */ jsx(MoreHorizontal, {})
|
|
186
187
|
}
|
|
187
|
-
) })
|
|
188
|
+
) }),
|
|
188
189
|
/* @__PURE__ */ jsx(DropdownMenuContent, { align: "end", className: "min-w-40", children: MODES.filter((m) => folded.includes(m.id)).map(
|
|
189
190
|
({ id, label, icon: Icon }) => /* @__PURE__ */ jsxs(
|
|
190
191
|
DropdownMenuItem,
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { ArchivedDisclosure } from "@ai-matrx/design-system";
|
|
4
3
|
import { useEffect, useMemo, useState } from "react";
|
|
5
4
|
import { useRouter, usePathname, useSearchParams } from "../../../host/navigation.js";
|
|
6
5
|
import { Loader2, ChevronRight, ChevronDown } from "lucide-react";
|
|
@@ -9,10 +8,9 @@ import { useAppDispatch, useAppSelector } from "../../../store/hooks.js";
|
|
|
9
8
|
import { selectAgentById } from "../../redux/agent-definition/selectors.js";
|
|
10
9
|
import { fetchAgentConversations } from "../../redux/conversation-list/conversation-list.thunks.js";
|
|
11
10
|
import { makeSelectAgentConversations } from "../../redux/conversation-list/conversation-list.selectors.js";
|
|
12
|
-
import {
|
|
11
|
+
import { ConversationArchiveSection } from "../conversation-history/ConversationArchiveSection.js";
|
|
12
|
+
import { ConversationListRow } from "../conversation-history/AgentConversationList.js";
|
|
13
13
|
import { Button } from "@ai-matrx/design-system/controls";
|
|
14
|
-
import { buildConversationMenu } from "../conversation-actions/conversationActionRegistry.js";
|
|
15
|
-
import { renameConversation } from "../../redux/conversation-list/conversation-row-actions.thunks.js";
|
|
16
14
|
import {
|
|
17
15
|
buildAgentRunUrl,
|
|
18
16
|
resolveAgentRunRoute
|
|
@@ -68,7 +66,6 @@ function AgentRunSidebarMenu({
|
|
|
68
66
|
archived,
|
|
69
67
|
error: convError
|
|
70
68
|
} = useAppSelector(selectConversations);
|
|
71
|
-
const [showArchived, setShowArchived] = useState(false);
|
|
72
69
|
useEffect(() => {
|
|
73
70
|
if (canonicalAgentId && convStatus === "idle") {
|
|
74
71
|
dispatch(
|
|
@@ -83,7 +80,6 @@ function AgentRunSidebarMenu({
|
|
|
83
80
|
() => groupByVersion(conversations),
|
|
84
81
|
[conversations]
|
|
85
82
|
);
|
|
86
|
-
const archivedGroups = useMemo(() => groupByVersion(archived), [archived]);
|
|
87
83
|
const handleConversationSelect = (convId) => {
|
|
88
84
|
if (!runRoute) return;
|
|
89
85
|
router.push(buildAgentRunUrl(runRoute, convId));
|
|
@@ -142,28 +138,15 @@ function AgentRunSidebarMenu({
|
|
|
142
138
|
onSelect: handleConversationSelect
|
|
143
139
|
},
|
|
144
140
|
version
|
|
145
|
-
))
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
VersionGroup,
|
|
155
|
-
{
|
|
156
|
-
version,
|
|
157
|
-
items,
|
|
158
|
-
runRoute,
|
|
159
|
-
activeConversationId: conversationIdFromUrl,
|
|
160
|
-
onSelect: handleConversationSelect
|
|
161
|
-
},
|
|
162
|
-
version
|
|
163
|
-
))
|
|
164
|
-
}
|
|
165
|
-
)
|
|
166
|
-
] })
|
|
141
|
+
))
|
|
142
|
+
] }),
|
|
143
|
+
canonicalAgentId && /* @__PURE__ */ jsx(
|
|
144
|
+
ConversationArchiveSection,
|
|
145
|
+
{
|
|
146
|
+
agentIds: [canonicalAgentId],
|
|
147
|
+
onOpen: handleConversationSelect
|
|
148
|
+
}
|
|
149
|
+
)
|
|
167
150
|
] });
|
|
168
151
|
}
|
|
169
152
|
function VersionGroup({
|
|
@@ -208,39 +191,17 @@ function ConversationRow({
|
|
|
208
191
|
isActive,
|
|
209
192
|
onSelect
|
|
210
193
|
}) {
|
|
211
|
-
const dispatch = useAppDispatch();
|
|
212
|
-
const title = conv.title?.trim() || "Untitled";
|
|
213
|
-
const href = buildAgentRunUrl(runRoute, conv.conversationId);
|
|
214
194
|
return /* @__PURE__ */ jsx(
|
|
215
|
-
|
|
195
|
+
ConversationListRow,
|
|
216
196
|
{
|
|
197
|
+
conv,
|
|
198
|
+
href: buildAgentRunUrl(runRoute, conv.conversationId),
|
|
217
199
|
sourceFeature: "agent-runner",
|
|
200
|
+
surfaceKey: `agent-run:${runRoute.agentId}`,
|
|
218
201
|
className: "mx-1",
|
|
219
|
-
size: "sm",
|
|
220
|
-
label: title,
|
|
221
202
|
secondaryLabel: conv.updatedAt ? formatRelativeDate(conv.updatedAt) : void 0,
|
|
222
203
|
active: isActive,
|
|
223
204
|
onOpen: onSelect,
|
|
224
|
-
menu: () => buildConversationMenu({
|
|
225
|
-
conversationId: conv.conversationId,
|
|
226
|
-
title: conv.title,
|
|
227
|
-
isFavorite: conv.isFavorite ?? false,
|
|
228
|
-
isArchived: conv.status === "archived",
|
|
229
|
-
excludeFromKg: conv.excludeFromKg ?? false,
|
|
230
|
-
href,
|
|
231
|
-
surfaceKey: `agent-run:${runRoute.agentId}`,
|
|
232
|
-
dispatch
|
|
233
|
-
}),
|
|
234
|
-
rename: {
|
|
235
|
-
value: conv.title ?? "",
|
|
236
|
-
emptyFallback: "Untitled",
|
|
237
|
-
onCommit: (next) => void dispatch(
|
|
238
|
-
renameConversation({
|
|
239
|
-
conversationId: conv.conversationId,
|
|
240
|
-
title: next
|
|
241
|
-
})
|
|
242
|
-
)
|
|
243
|
-
},
|
|
244
205
|
trailing: isActive ? /* @__PURE__ */ jsx(ChevronRight, { className: "w-3 h-3 shrink-0" }) : void 0
|
|
245
206
|
}
|
|
246
207
|
);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* THE ENGINE DOOR — the few operations a host that drives ONE conversation by hand (outside the
|
|
3
|
+
* chat screens) needs: create an instance, load a saved conversation, send, cancel, write the draft,
|
|
4
|
+
* and ask whether a turn is running. workflow-studio's launcher-agent chat is the first caller.
|
|
5
|
+
*
|
|
6
|
+
* A stable public subpath (`@ai-matrx/chat/agents/engine`, in FRONT_DOOR): the modules behind it may
|
|
7
|
+
* move; a host never deep-imports them. Add to this list when a host legitimately needs another
|
|
8
|
+
* operation — never hand a host the redux internals.
|
|
9
|
+
*/
|
|
10
|
+
export { createInstanceFull } from "./redux/execution-system/create-instance-full.js";
|
|
11
|
+
export { destroyInstance, patchConversation } from "./redux/execution-system/conversations/conversations.slice.js";
|
|
12
|
+
export { loadConversation } from "./redux/execution-system/thunks/load-conversation.thunk.js";
|
|
13
|
+
export { cancelExecution, smartExecute } from "./redux/execution-system/thunks/smart-execute.thunk.js";
|
|
14
|
+
export { setUserInputText } from "./redux/execution-system/instance-user-input/instance-user-input.slice.js";
|
|
15
|
+
export { selectIsExecuting, selectLatestRequestStatus } from "./redux/execution-system/selectors/aggregate.selectors.js";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { createInstanceFull } from "./redux/execution-system/create-instance-full.js";
|
|
2
|
+
import { destroyInstance, patchConversation } from "./redux/execution-system/conversations/conversations.slice.js";
|
|
3
|
+
import { loadConversation } from "./redux/execution-system/thunks/load-conversation.thunk.js";
|
|
4
|
+
import { cancelExecution, smartExecute } from "./redux/execution-system/thunks/smart-execute.thunk.js";
|
|
5
|
+
import { setUserInputText } from "./redux/execution-system/instance-user-input/instance-user-input.slice.js";
|
|
6
|
+
import { selectIsExecuting, selectLatestRequestStatus } from "./redux/execution-system/selectors/aggregate.selectors.js";
|
|
7
|
+
export {
|
|
8
|
+
cancelExecution,
|
|
9
|
+
createInstanceFull,
|
|
10
|
+
destroyInstance,
|
|
11
|
+
loadConversation,
|
|
12
|
+
patchConversation,
|
|
13
|
+
selectIsExecuting,
|
|
14
|
+
selectLatestRequestStatus,
|
|
15
|
+
setUserInputText,
|
|
16
|
+
smartExecute
|
|
17
|
+
};
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import { UI_GATE_KEYS } from "../redux/agent-settings/ui-gates.js";
|
|
2
|
+
import { extractModelDefaults, parseModelControls } from "@ai-matrx/agents/settings";
|
|
4
3
|
import { isJsonObject } from "@ai-matrx/rich-content/utils/json";
|
|
5
|
-
import { outputFormatControlKey } from "@ai-matrx/agents/models";
|
|
6
4
|
function supportsTools(normalizedControls) {
|
|
7
5
|
const normalizedTools = normalizedControls?.tools;
|
|
8
6
|
const rawTools = normalizedControls?.rawControls?.tools;
|
|
@@ -91,148 +89,7 @@ function resolveModelControls(models, selectedModelId, classControls) {
|
|
|
91
89
|
error: null
|
|
92
90
|
};
|
|
93
91
|
}
|
|
94
|
-
const normalized =
|
|
95
|
-
rawControls: controls,
|
|
96
|
-
unmappedControls: {}
|
|
97
|
-
};
|
|
98
|
-
const knownKeys = /* @__PURE__ */ new Set([
|
|
99
|
-
...LLM_PARAMS_KEYS,
|
|
100
|
-
// Pre-canonical-rename DB keys — Python's LLMParams._remap_aliases
|
|
101
|
-
// normalises these at the API boundary. Recognized here so the FE
|
|
102
|
-
// renders them when a model's controls JSONB declares them.
|
|
103
|
-
"max_tokens",
|
|
104
|
-
"output_format",
|
|
105
|
-
"n",
|
|
106
|
-
// Provider-native aliases LLMParams._FIELD_ALIASES accepts (gpt-image-*
|
|
107
|
-
// `quality` → render_quality, Together `output_quality` → encode_quality,
|
|
108
|
-
// `seconds` → duration_seconds). Unlisted, a model declaring them had its
|
|
109
|
-
// control silently dropped into unmappedControls — gpt-image-2's Quality
|
|
110
|
-
// never rendered in the builder and a saved value read as "unknown key".
|
|
111
|
-
"quality",
|
|
112
|
-
"output_quality",
|
|
113
|
-
"seconds",
|
|
114
|
-
// Model-gated UI flags from model controls (e.g. { allowed: true }). These
|
|
115
|
-
// indicate what a model supports — they live in agent.uiGates, not in
|
|
116
|
-
// LLMParams. Recognized here (via the canonical UI_GATE_KEYS) so the parser
|
|
117
|
-
// surfaces them in NormalizedControls, which the UI-gates editor reads to
|
|
118
|
-
// know which gates to offer. Actual tool definitions are assembled
|
|
119
|
-
// separately via client_tools.
|
|
120
|
-
...UI_GATE_KEYS,
|
|
121
|
-
"multi_speaker",
|
|
122
|
-
// ── Media-gen provider-native names (May 2026) ────────────────────
|
|
123
|
-
// Each model's controls JSONB carries the EXACT field names the
|
|
124
|
-
// provider's API accepts. Python normalises aliases (`seconds` →
|
|
125
|
-
// `duration_seconds`, `quality` → `render_quality`, `n` /
|
|
126
|
-
// `num_outputs` / `number_of_images` → `count`, etc.). The FE just
|
|
127
|
-
// needs to recognize these as valid control keys so the parser
|
|
128
|
-
// surfaces them in NormalizedControls instead of dumping to
|
|
129
|
-
// unmappedControls.
|
|
130
|
-
// Dimensions
|
|
131
|
-
"aspect_ratio",
|
|
132
|
-
"ratio",
|
|
133
|
-
// Together video / Replicate Runway
|
|
134
|
-
"resolution",
|
|
135
|
-
"image_size",
|
|
136
|
-
// Imagen / Gemini-image
|
|
137
|
-
"num_outputs",
|
|
138
|
-
// Replicate
|
|
139
|
-
"number_of_images",
|
|
140
|
-
// Imagen direct
|
|
141
|
-
// Image quality / encoding
|
|
142
|
-
"render_quality",
|
|
143
|
-
"background",
|
|
144
|
-
"input_fidelity",
|
|
145
|
-
"output_compression",
|
|
146
|
-
"moderation",
|
|
147
|
-
"partial_images",
|
|
148
|
-
"output_mime_type",
|
|
149
|
-
// Imagen direct
|
|
150
|
-
"include_rai_reason",
|
|
151
|
-
"person_generation",
|
|
152
|
-
"image_format",
|
|
153
|
-
// xAI base64/url
|
|
154
|
-
"style",
|
|
155
|
-
"reference_strength",
|
|
156
|
-
// Video
|
|
157
|
-
"duration_seconds",
|
|
158
|
-
"duration",
|
|
159
|
-
// xAI / Replicate native
|
|
160
|
-
"generate_audio",
|
|
161
|
-
"encode_quality",
|
|
162
|
-
"enhance_prompt",
|
|
163
|
-
"video_action",
|
|
164
|
-
// MediaRef-shaped inputs
|
|
165
|
-
"image_input",
|
|
166
|
-
"image_inputs",
|
|
167
|
-
"input_images",
|
|
168
|
-
// Replicate gpt-image-*
|
|
169
|
-
"image",
|
|
170
|
-
// Replicate Seedream/Veo/Wan/Seedance
|
|
171
|
-
"image_url",
|
|
172
|
-
// Together image i2i singular (separate from FE flag image_urls)
|
|
173
|
-
"start_image",
|
|
174
|
-
// Replicate Kling
|
|
175
|
-
"end_image",
|
|
176
|
-
// Replicate Kling
|
|
177
|
-
"prompt_image",
|
|
178
|
-
// Replicate Runway
|
|
179
|
-
"first_frame_image",
|
|
180
|
-
// Replicate Hailuo
|
|
181
|
-
"start_image_url",
|
|
182
|
-
// Replicate Luma Ray-3
|
|
183
|
-
"last_frame",
|
|
184
|
-
// Google Veo SDK
|
|
185
|
-
"last_frame_image",
|
|
186
|
-
// canonical + Replicate Veo
|
|
187
|
-
"mask",
|
|
188
|
-
"video_input",
|
|
189
|
-
"media"
|
|
190
|
-
// Together Wan I2V
|
|
191
|
-
]);
|
|
192
|
-
Object.entries(controls).forEach(([key, value]) => {
|
|
193
|
-
if (!knownKeys.has(key)) {
|
|
194
|
-
normalized.unmappedControls[key] = value;
|
|
195
|
-
return;
|
|
196
|
-
}
|
|
197
|
-
const normalizedKey = outputFormatControlKey(key, value);
|
|
198
|
-
if (!isJsonObject(value)) {
|
|
199
|
-
console.warn(
|
|
200
|
-
`Skipping malformed control "${key}" for model \u2014 expected object, got:`,
|
|
201
|
-
typeof value
|
|
202
|
-
);
|
|
203
|
-
return;
|
|
204
|
-
}
|
|
205
|
-
const rawDefault = value.default;
|
|
206
|
-
const flatDefault = rawDefault !== null && typeof rawDefault === "object" && !Array.isArray(rawDefault) && "type" in rawDefault ? String(rawDefault.type) : rawDefault;
|
|
207
|
-
const controlDef = {
|
|
208
|
-
type: value.type || "string",
|
|
209
|
-
min: value.min,
|
|
210
|
-
max: value.max,
|
|
211
|
-
default: flatDefault,
|
|
212
|
-
required: value.required
|
|
213
|
-
};
|
|
214
|
-
if (value.enum && Array.isArray(value.enum)) {
|
|
215
|
-
controlDef.enum = value.enum.map((option) => {
|
|
216
|
-
if (option !== null && typeof option === "object" && "type" in option) {
|
|
217
|
-
return String(option.type);
|
|
218
|
-
}
|
|
219
|
-
return String(option);
|
|
220
|
-
});
|
|
221
|
-
controlDef.type = "enum";
|
|
222
|
-
} else if ("allowed" in value) {
|
|
223
|
-
controlDef.type = "boolean";
|
|
224
|
-
controlDef.default = value.allowed;
|
|
225
|
-
} else if (typeof value.default === "boolean") {
|
|
226
|
-
controlDef.type = "boolean";
|
|
227
|
-
} else if (value.type === void 0 && (value.min !== void 0 || value.max !== void 0)) {
|
|
228
|
-
if (value.default && Number.isInteger(value.default)) {
|
|
229
|
-
controlDef.type = "integer";
|
|
230
|
-
} else {
|
|
231
|
-
controlDef.type = "number";
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
normalized[normalizedKey] = controlDef;
|
|
235
|
-
});
|
|
92
|
+
const normalized = parseModelControls(controls);
|
|
236
93
|
return {
|
|
237
94
|
normalizedControls: normalized,
|
|
238
95
|
selectedModel,
|
|
@@ -243,7 +100,6 @@ function getModelDefaults(model) {
|
|
|
243
100
|
if (!isJsonObject(model) || !model.controls) {
|
|
244
101
|
return {};
|
|
245
102
|
}
|
|
246
|
-
const defaults = {};
|
|
247
103
|
let controls = model.controls;
|
|
248
104
|
if (typeof controls === "string") {
|
|
249
105
|
try {
|
|
@@ -259,35 +115,7 @@ function getModelDefaults(model) {
|
|
|
259
115
|
if (!isJsonObject(controls)) {
|
|
260
116
|
return {};
|
|
261
117
|
}
|
|
262
|
-
|
|
263
|
-
Object.entries(controls).forEach(([key, value]) => {
|
|
264
|
-
const normalizedKey = outputFormatControlKey(key, value);
|
|
265
|
-
if (!isJsonObject(value)) {
|
|
266
|
-
return;
|
|
267
|
-
}
|
|
268
|
-
if (uiOnlyKeys.has(normalizedKey)) {
|
|
269
|
-
if (normalizedKey === "tools" && value.allowed) {
|
|
270
|
-
defaults[normalizedKey] = [];
|
|
271
|
-
}
|
|
272
|
-
return;
|
|
273
|
-
}
|
|
274
|
-
let defaultValue = void 0;
|
|
275
|
-
if (value.default !== void 0 && value.default !== null) {
|
|
276
|
-
defaultValue = value.default;
|
|
277
|
-
} else if ("allowed" in value && !uiOnlyKeys.has(normalizedKey)) {
|
|
278
|
-
defaultValue = value.allowed;
|
|
279
|
-
} else if (value.enum && Array.isArray(value.enum) && value.enum.length > 0) {
|
|
280
|
-
defaultValue = value.enum[0];
|
|
281
|
-
}
|
|
282
|
-
if (defaultValue === void 0) return;
|
|
283
|
-
if (normalizedKey === "response_format" && typeof defaultValue === "string") {
|
|
284
|
-
if (defaultValue === "text" || defaultValue === "") return;
|
|
285
|
-
defaults[normalizedKey] = { type: defaultValue };
|
|
286
|
-
return;
|
|
287
|
-
}
|
|
288
|
-
defaults[normalizedKey] = defaultValue;
|
|
289
|
-
});
|
|
290
|
-
return defaults;
|
|
118
|
+
return extractModelDefaults(controls);
|
|
291
119
|
}
|
|
292
120
|
export {
|
|
293
121
|
getModelDefaults,
|