@ai-matrx/chat 0.6.6 → 0.7.1
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 +42 -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 +20 -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/dist/window-panels/windows/agents/AgentRunWindow.js +26 -13
- package/package.json +4627 -125
- 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,176 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* cx_ Database Table Types
|
|
3
|
-
*
|
|
4
|
-
* Canonical row/insert/update shapes come from `types/database.types.ts`.
|
|
5
|
-
* Content-block helpers below are for parsing JSON columns in the UI.
|
|
6
|
-
*/
|
|
7
|
-
import type { Database } from "../../host/db-types.js";
|
|
8
|
-
import type { PermissionLevel } from "../../ui/permission-levels.js";
|
|
9
|
-
type ChatSchema = Database["chat"];
|
|
10
|
-
export type CxConversation = ChatSchema["Tables"]["conversation"]["Row"];
|
|
11
|
-
export type CxConversationInsert = ChatSchema["Tables"]["conversation"]["Insert"];
|
|
12
|
-
export type CxConversationUpdate = ChatSchema["Tables"]["conversation"]["Update"];
|
|
13
|
-
/** Common status values (DB column is unconstrained string) */
|
|
14
|
-
export type CxConversationStatus = "active" | "completed" | "archived";
|
|
15
|
-
/** Canonical row shape — 1:1 with `public.cx_message` (see types/database.types.ts). */
|
|
16
|
-
export type CxMessage = ChatSchema["Tables"]["message"]["Row"];
|
|
17
|
-
export type CxMessageInsert = ChatSchema["Tables"]["message"]["Insert"];
|
|
18
|
-
export type CxMessageUpdate = ChatSchema["Tables"]["message"]["Update"];
|
|
19
|
-
/**
|
|
20
|
-
* One entry in cx_message.content_history JSON — snapshot before an edit.
|
|
21
|
-
* At rest the column is Json; narrow when reading known-good rows.
|
|
22
|
-
*/
|
|
23
|
-
export interface CxContentHistoryEntry {
|
|
24
|
-
content: CxContentBlock[];
|
|
25
|
-
saved_at: string;
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Roles used in cx_message.role.
|
|
29
|
-
* - user/assistant/system: standard roles
|
|
30
|
-
* - tool: tool-result placeholder row (content is usually [])
|
|
31
|
-
* - output: OpenAI-style intermediate thinking/reasoning output (content is thinking blocks only)
|
|
32
|
-
*/
|
|
33
|
-
export type CxMessageRole = "user" | "assistant" | "output" | "system" | "tool";
|
|
34
|
-
/** DB status — NOT the same as UI streaming status */
|
|
35
|
-
export type CxMessageDbStatus = "active" | "condensed" | "summary" | "deleted";
|
|
36
|
-
/** Plain text content — the main display body */
|
|
37
|
-
export interface CxTextContent {
|
|
38
|
-
type: "text";
|
|
39
|
-
text: string;
|
|
40
|
-
id?: string;
|
|
41
|
-
citations?: unknown[];
|
|
42
|
-
}
|
|
43
|
-
export interface CxThinkingSummaryItem {
|
|
44
|
-
type: string;
|
|
45
|
-
text: string;
|
|
46
|
-
}
|
|
47
|
-
/** AI thinking/reasoning — collapsible section */
|
|
48
|
-
export interface CxThinkingContent {
|
|
49
|
-
type: "thinking";
|
|
50
|
-
text: string;
|
|
51
|
-
provider?: string;
|
|
52
|
-
signature?: string;
|
|
53
|
-
signature_encoding?: string;
|
|
54
|
-
summary?: CxThinkingSummaryItem[];
|
|
55
|
-
metadata?: Record<string, unknown>;
|
|
56
|
-
}
|
|
57
|
-
/** Media attachments — images, audio, video, documents */
|
|
58
|
-
export interface CxMediaContent {
|
|
59
|
-
type: "media";
|
|
60
|
-
kind: "image" | "audio" | "video" | "document" | "youtube";
|
|
61
|
-
url?: string;
|
|
62
|
-
mime_type?: string;
|
|
63
|
-
base64_data?: string;
|
|
64
|
-
metadata?: Record<string, unknown>;
|
|
65
|
-
}
|
|
66
|
-
/**
|
|
67
|
-
* Tool call — AI requests a tool (assistant/output messages).
|
|
68
|
-
* `id` is the join key to cx_tool_call.call_id for all providers.
|
|
69
|
-
*/
|
|
70
|
-
export interface CxToolCallContent {
|
|
71
|
-
type: "tool_call";
|
|
72
|
-
id: string;
|
|
73
|
-
name: string;
|
|
74
|
-
arguments: Record<string, unknown>;
|
|
75
|
-
}
|
|
76
|
-
/**
|
|
77
|
-
* Tool result — response from a tool.
|
|
78
|
-
* In V2, role="tool" messages always have content: [] (empty).
|
|
79
|
-
* Tool output lives in cx_tool_call.output, joined via cx_tool_call.call_id.
|
|
80
|
-
*/
|
|
81
|
-
export interface CxToolResultContent {
|
|
82
|
-
type: "tool_result";
|
|
83
|
-
call_id?: string;
|
|
84
|
-
tool_use_id?: string;
|
|
85
|
-
name: string;
|
|
86
|
-
content: unknown;
|
|
87
|
-
is_error?: boolean;
|
|
88
|
-
}
|
|
89
|
-
export interface CxCodeExecContent {
|
|
90
|
-
type: "code_exec";
|
|
91
|
-
language: string;
|
|
92
|
-
code: string;
|
|
93
|
-
}
|
|
94
|
-
export interface CxCodeResultContent {
|
|
95
|
-
type: "code_result";
|
|
96
|
-
output: string;
|
|
97
|
-
outcome: string;
|
|
98
|
-
}
|
|
99
|
-
export interface CxWebSearchContent {
|
|
100
|
-
type: "web_search";
|
|
101
|
-
id?: string;
|
|
102
|
-
status?: string;
|
|
103
|
-
metadata?: {
|
|
104
|
-
action?: Record<string, unknown>;
|
|
105
|
-
};
|
|
106
|
-
}
|
|
107
|
-
/** Union of all content block types stored in cx_message.content */
|
|
108
|
-
export type CxContentBlock = CxTextContent | CxThinkingContent | CxMediaContent | CxToolCallContent | CxToolResultContent | CxCodeExecContent | CxCodeResultContent | CxWebSearchContent;
|
|
109
|
-
/**
|
|
110
|
-
* @deprecated Use CxContentBlock instead. Kept for backward compatibility.
|
|
111
|
-
* Content is stored as a jsonb array of parts.
|
|
112
|
-
*/
|
|
113
|
-
export interface CxMessageContent {
|
|
114
|
-
type: string;
|
|
115
|
-
text?: string;
|
|
116
|
-
url?: string;
|
|
117
|
-
language?: string;
|
|
118
|
-
[key: string]: unknown;
|
|
119
|
-
}
|
|
120
|
-
export interface CxMedia {
|
|
121
|
-
id: string;
|
|
122
|
-
conversation_id: string | null;
|
|
123
|
-
created_by: string | null;
|
|
124
|
-
kind: CxMediaKind;
|
|
125
|
-
url: string;
|
|
126
|
-
mime_type: string | null;
|
|
127
|
-
file_size_bytes: number | null;
|
|
128
|
-
created_at: string;
|
|
129
|
-
deleted_at: string | null;
|
|
130
|
-
metadata: Record<string, unknown>;
|
|
131
|
-
}
|
|
132
|
-
export type CxMediaKind = "image" | "file" | "audio" | "video" | "youtube" | "webpage";
|
|
133
|
-
export interface CxMediaInsert {
|
|
134
|
-
id?: string;
|
|
135
|
-
conversation_id?: string | null;
|
|
136
|
-
kind: CxMediaKind;
|
|
137
|
-
url: string;
|
|
138
|
-
mime_type?: string | null;
|
|
139
|
-
file_size_bytes?: number | null;
|
|
140
|
-
metadata?: Record<string, unknown>;
|
|
141
|
-
}
|
|
142
|
-
/** Lifecycle event stored in cx_tool_call.execution_events */
|
|
143
|
-
export interface CxToolExecutionEvent {
|
|
144
|
-
event: "tool_started" | "tool_progress" | "tool_step" | "tool_result_preview" | "tool_completed" | "tool_error";
|
|
145
|
-
call_id: string;
|
|
146
|
-
tool_name: string;
|
|
147
|
-
timestamp: number;
|
|
148
|
-
message: string;
|
|
149
|
-
show_spinner: boolean;
|
|
150
|
-
data: Record<string, unknown>;
|
|
151
|
-
}
|
|
152
|
-
export type CxToolCallStatus = "pending" | "running" | "completed" | "error";
|
|
153
|
-
export type CxToolType = "local" | "external_mcp" | "agent";
|
|
154
|
-
export type CxToolCall = ChatSchema["Tables"]["tool_call"]["Row"];
|
|
155
|
-
/** A conversation summary for the sidebar history list */
|
|
156
|
-
export interface CxConversationSummary {
|
|
157
|
-
id: string;
|
|
158
|
-
title: string | null;
|
|
159
|
-
status: CxConversationStatus;
|
|
160
|
-
message_count: number;
|
|
161
|
-
created_at: string;
|
|
162
|
-
updated_at: string;
|
|
163
|
-
}
|
|
164
|
-
/** A shared conversation summary for the sidebar "Shared with Me" section */
|
|
165
|
-
export interface SharedCxConversationSummary extends CxConversationSummary {
|
|
166
|
-
permission_level: PermissionLevel;
|
|
167
|
-
owner_email: string | null;
|
|
168
|
-
}
|
|
169
|
-
/** A full conversation with all its messages and tool calls, used when loading a chat */
|
|
170
|
-
export interface CxConversationWithMessages {
|
|
171
|
-
conversation: CxConversation;
|
|
172
|
-
messages: CxMessage[];
|
|
173
|
-
/** Tool call records for this conversation, keyed by call_id for fast lookup */
|
|
174
|
-
toolCalls?: CxToolCall[];
|
|
175
|
-
}
|
|
176
|
-
export {};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { LLMParams } from "../../host/server/types.js";
|
|
2
|
-
/**
|
|
3
|
-
* Compare user settings against agent defaults and return ONLY the overrides.
|
|
4
|
-
*
|
|
5
|
-
* Rules:
|
|
6
|
-
* - If a key exists in userSettings with a different value → include as override
|
|
7
|
-
* - If a key exists in userSettings but not in defaults → include (new key added)
|
|
8
|
-
* - If a key was removed from defaults by the user → include as explicit null
|
|
9
|
-
* - If a key has the same value in both → exclude (not an override)
|
|
10
|
-
*
|
|
11
|
-
* @returns An object containing only the changed/added settings, or null if no overrides.
|
|
12
|
-
*/
|
|
13
|
-
export declare function computeSettingsOverrides(agentDefaults: LLMParams | undefined, userSettings: LLMParams): LLMParams | null;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { deepEqual } from "../../utils/deep-equal.js";
|
|
2
|
-
function computeSettingsOverrides(agentDefaults, userSettings) {
|
|
3
|
-
const defaults = agentDefaults ?? {};
|
|
4
|
-
const user = userSettings;
|
|
5
|
-
const overrides = {};
|
|
6
|
-
let hasOverrides = false;
|
|
7
|
-
for (const key of Object.keys(user)) {
|
|
8
|
-
const userVal = user[key];
|
|
9
|
-
const defaultVal = defaults[key];
|
|
10
|
-
if (!deepEqual(userVal, defaultVal)) {
|
|
11
|
-
overrides[key] = userVal;
|
|
12
|
-
hasOverrides = true;
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
for (const key of Object.keys(defaults)) {
|
|
16
|
-
if (!(key in user) && defaults[key] !== void 0 && defaults[key] !== null) {
|
|
17
|
-
overrides[key] = null;
|
|
18
|
-
hasOverrides = true;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
return hasOverrides ? overrides : null;
|
|
22
|
-
}
|
|
23
|
-
export {
|
|
24
|
-
computeSettingsOverrides
|
|
25
|
-
};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Public-chat response-mode controls.
|
|
3
|
-
*
|
|
4
|
-
* The retired AgentSelector that previously lived here was an unused,
|
|
5
|
-
* hardcoded second agent roster. Agent choice now belongs exclusively to the
|
|
6
|
-
* canonical AgentListDropdown / AgentListInlinePicker family.
|
|
7
|
-
*/
|
|
8
|
-
import React from "react";
|
|
9
|
-
interface ResponseModeButtonsProps {
|
|
10
|
-
disabled?: boolean;
|
|
11
|
-
/** The currently selected agent's promptId — used to derive active mode. */
|
|
12
|
-
selectedAgentId?: string | null;
|
|
13
|
-
/** Called with the mode id and the mandate-resolved agent id. */
|
|
14
|
-
onModeSelect?: (modeId: string, agentId: string | null) => void;
|
|
15
|
-
}
|
|
16
|
-
export declare function ResponseModeButtons({ disabled, selectedAgentId, onModeSelect, }: ResponseModeButtonsProps): React.JSX.Element;
|
|
17
|
-
interface BackToStartButtonProps {
|
|
18
|
-
onBack: () => void;
|
|
19
|
-
agentName?: string;
|
|
20
|
-
}
|
|
21
|
-
export declare function BackToStartButton({ onBack, agentName, }: BackToStartButtonProps): React.JSX.Element;
|
|
22
|
-
export {};
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
import { Chip, ChipSet, Button } from "@ai-matrx/design-system/controls";
|
|
4
|
-
import {
|
|
5
|
-
BarChart,
|
|
6
|
-
ChefHat,
|
|
7
|
-
ChevronLeft,
|
|
8
|
-
Code,
|
|
9
|
-
Image,
|
|
10
|
-
Lightbulb,
|
|
11
|
-
MessageCircle,
|
|
12
|
-
Search,
|
|
13
|
-
Video
|
|
14
|
-
} from "lucide-react";
|
|
15
|
-
import { useResponseModeAgents } from "../../cx-chat/components/agent/useResponseModeAgents.js";
|
|
16
|
-
const RESPONSE_MODE_ICONS = {
|
|
17
|
-
text: /* @__PURE__ */ jsx(MessageCircle, { size: 16 }),
|
|
18
|
-
images: /* @__PURE__ */ jsx(Image, { size: 16 }),
|
|
19
|
-
videos: /* @__PURE__ */ jsx(Video, { size: 16 }),
|
|
20
|
-
research: /* @__PURE__ */ jsx(Search, { size: 16 }),
|
|
21
|
-
brainstorm: /* @__PURE__ */ jsx(Lightbulb, { size: 16 }),
|
|
22
|
-
data: /* @__PURE__ */ jsx(BarChart, { size: 16 }),
|
|
23
|
-
recipe: /* @__PURE__ */ jsx(ChefHat, { size: 16 }),
|
|
24
|
-
code: /* @__PURE__ */ jsx(Code, { size: 16 })
|
|
25
|
-
};
|
|
26
|
-
const RESPONSE_MODE_LABELS = {
|
|
27
|
-
text: "Text",
|
|
28
|
-
images: "Images",
|
|
29
|
-
videos: "Videos",
|
|
30
|
-
research: "Research",
|
|
31
|
-
brainstorm: "Brainstorm",
|
|
32
|
-
data: "Data",
|
|
33
|
-
recipe: "Recipe",
|
|
34
|
-
code: "Code"
|
|
35
|
-
};
|
|
36
|
-
function ResponseModeButtons({
|
|
37
|
-
disabled,
|
|
38
|
-
selectedAgentId,
|
|
39
|
-
onModeSelect
|
|
40
|
-
}) {
|
|
41
|
-
const { modes, modeForAgent } = useResponseModeAgents();
|
|
42
|
-
const activeMode = selectedAgentId ? modeForAgent(selectedAgentId) : "text";
|
|
43
|
-
return /* @__PURE__ */ jsx(ChipSet, { className: "justify-center", children: modes.map((entry) => {
|
|
44
|
-
const isActive = activeMode === entry.mode;
|
|
45
|
-
const isMapped = entry.agentId !== null;
|
|
46
|
-
const unresolved = entry.mandateKey !== null && entry.error !== null;
|
|
47
|
-
return /* @__PURE__ */ jsx(
|
|
48
|
-
Chip,
|
|
49
|
-
{
|
|
50
|
-
asChild: true,
|
|
51
|
-
pressed: isActive,
|
|
52
|
-
label: RESPONSE_MODE_LABELS[entry.mode],
|
|
53
|
-
icon: RESPONSE_MODE_ICONS[entry.mode],
|
|
54
|
-
title: unresolved ? `Not available yet \u2014 no agent is assigned (${entry.mandateKey})` : void 0,
|
|
55
|
-
children: /* @__PURE__ */ jsx(
|
|
56
|
-
"button",
|
|
57
|
-
{
|
|
58
|
-
type: "button",
|
|
59
|
-
onClick: () => {
|
|
60
|
-
if (disabled || !entry.agentId) return;
|
|
61
|
-
onModeSelect?.(entry.mode, entry.agentId);
|
|
62
|
-
},
|
|
63
|
-
disabled: disabled || !isMapped
|
|
64
|
-
}
|
|
65
|
-
)
|
|
66
|
-
},
|
|
67
|
-
entry.mode
|
|
68
|
-
);
|
|
69
|
-
}) });
|
|
70
|
-
}
|
|
71
|
-
function BackToStartButton({
|
|
72
|
-
onBack,
|
|
73
|
-
agentName
|
|
74
|
-
}) {
|
|
75
|
-
return /* @__PURE__ */ jsx(Button, { variant: "quiet", icon: /* @__PURE__ */ jsx(ChevronLeft, {}), onClick: onBack, title: "Back to agent selection", children: agentName || "Back" });
|
|
76
|
-
}
|
|
77
|
-
export {
|
|
78
|
-
BackToStartButton,
|
|
79
|
-
ResponseModeButtons
|
|
80
|
-
};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import type { VariableDefinition as PromptVariable } from "../../agents/types/agent-definition.types.js";
|
|
3
|
-
export interface GuidedVariableInputsProps {
|
|
4
|
-
variableDefaults: PromptVariable[];
|
|
5
|
-
values: Record<string, string>;
|
|
6
|
-
onChange: (name: string, value: string) => void;
|
|
7
|
-
disabled?: boolean;
|
|
8
|
-
onSubmit?: (content: string, resources?: any[]) => Promise<boolean>;
|
|
9
|
-
submitOnEnter?: boolean;
|
|
10
|
-
textInputRef?: React.RefObject<HTMLTextAreaElement | HTMLInputElement | null>;
|
|
11
|
-
/** When true, renders with flat bottom (no bottom border-radius) for seamless join with chat input */
|
|
12
|
-
seamless?: boolean;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* The nothing-to-ask guard is its OWN component, above the hooked body.
|
|
16
|
-
*
|
|
17
|
-
* It used to be `if (total === 0) return null;` sitting between the effects and
|
|
18
|
-
* six `useCallback`s below, which made those six CONDITIONAL — an agent whose
|
|
19
|
-
* variable list arrives a beat after mount took the component from 5 hooks to
|
|
20
|
-
* 11 in one render, and React throws "rendered more hooks than during the
|
|
21
|
-
* previous render". Splitting it out also lets the body assume a non-empty
|
|
22
|
-
* list, which every line below the old guard already did.
|
|
23
|
-
*/
|
|
24
|
-
export declare function GuidedVariableInputs(props: GuidedVariableInputsProps): React.JSX.Element | null;
|
|
25
|
-
export default GuidedVariableInputs;
|