@ai-matrx/chat 0.5.0 → 0.5.3
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 +26 -0
- package/dist/action-requests/components/ActionRequestAnswerForm.js +313 -209
- package/dist/action-requests/components/ActionRequestInlineAnswer.js +9 -2
- package/dist/action-requests/components/ParkedOnPersonCard.js +17 -4
- package/dist/action-requests/hooks/useToolAction.js +25 -15
- package/dist/agent-copy/AlchemySurfaceBridge.js +2 -1
- package/dist/agent-copy/RichCopySplit.js +20 -15
- package/dist/agents/coding-session-reply/CodingReplyNotice.js +39 -14
- package/dist/agents/components/AutoSubmitForm.js +2 -1
- package/dist/agents/components/agent-widgets/AgentChatBubble.js +44 -32
- package/dist/agents/components/agent-widgets/AgentChatHistorySidebar.js +46 -27
- package/dist/agents/components/agent-widgets/AgentCompactModal.js +16 -13
- package/dist/agents/components/agent-widgets/AgentFlexiblePanel.js +11 -10
- package/dist/agents/components/agent-widgets/AgentFloatingChat.js +6 -5
- package/dist/agents/components/agent-widgets/AgentFullModal.js +15 -12
- package/dist/agents/components/agent-widgets/AgentInlineOverlay.js +40 -32
- package/dist/agents/components/agent-widgets/AgentPanelOverlay.js +11 -10
- package/dist/agents/components/agent-widgets/AgentSidebarOverlay.js +11 -10
- package/dist/agents/components/agent-widgets/AgentToastOverlay.js +107 -86
- package/dist/agents/components/agent-widgets/ChatCollapsible.js +51 -42
- package/dist/agents/components/agent-widgets/chat-assistant/AgentChatAssistant.js +43 -30
- package/dist/agents/components/agent-widgets/chat-assistant/AssistantCardStack.js +49 -41
- package/dist/agents/components/agent-widgets/chat-assistant/AssistantControlBar.js +59 -45
- package/dist/agents/components/agent-widgets/chat-assistant/AssistantMessageCard.js +21 -14
- package/dist/agents/components/agent-widgets/chat-assistant/ChatAssistantVariableInputs.js +87 -67
- package/dist/agents/components/agent-widgets/chat-assistant/CompactAssistantInput.js +91 -73
- package/dist/agents/components/agent-widgets/chat-assistant/StatusCard.js +8 -1
- package/dist/agents/components/agent-widgets/chat-assistant/UserMessageCard.js +5 -1
- package/dist/agents/components/agent-widgets/execution-gates/AgentGateInput.js +36 -35
- package/dist/agents/components/agent-widgets/execution-gates/PreExecutionCard.js +39 -27
- package/dist/agents/components/ambient-assistant/ScrollAssistantLauncher.js +3 -2
- package/dist/agents/components/ambient-assistant/ScrollAssistantLauncherImpl.js +117 -105
- package/dist/agents/components/ambient-assistant/ScrollVoiceAssistantLauncherImpl.js +193 -155
- package/dist/agents/components/chat/ChatConversationRoom.js +8 -7
- package/dist/agents/components/chat/ChatConversationSurface.js +5 -4
- package/dist/agents/components/chat/ChatHistorySidebar.js +2 -2
- package/dist/agents/components/chat/ChatIncognitoHeaderButton.js +3 -2
- package/dist/agents/components/chat/ChatIncognitoProvider.js +2 -1
- package/dist/agents/components/chat/ChatNewClient.js +37 -22
- package/dist/agents/components/chat/ChatNewHeader.js +4 -3
- package/dist/agents/components/chat/ChatRoomClient.js +36 -33
- package/dist/agents/components/chat/ChatRoomSkeleton.js +49 -32
- package/dist/agents/components/chat/ChatRunHeader.js +26 -18
- package/dist/agents/components/chat/ChatSidebarMenu.js +204 -183
- package/dist/agents/components/chat/ConversationAttachmentsChip.js +53 -29
- package/dist/agents/components/chat/ConversationPageMenu.js +39 -35
- package/dist/agents/components/chat/ConversationRecordsChip.js +28 -19
- package/dist/agents/components/chat/ConversationRoomNotice.js +18 -14
- package/dist/agents/components/chat/NewChatGreeting.js +29 -23
- package/dist/agents/components/chat/PinnedAgentsSection.js +58 -49
- package/dist/agents/components/chat/SandboxPanel.js +203 -147
- package/dist/agents/components/chat/sandbox-insight/SandboxActivityFeed.js +70 -39
- package/dist/agents/components/chat/sandbox-insight/SandboxCanvasBody.js +87 -67
- package/dist/agents/components/coming-soon/AgentComingSoonContent.js +22 -9
- package/dist/agents/components/context-items/ContextItemViewer.js +43 -12
- package/dist/agents/components/context-items/bodies/BookmarkReferenceBody.js +6 -5
- package/dist/agents/components/context-items/bodies/ContextInputBody.js +15 -5
- package/dist/agents/components/context-items/bodies/ContextLayerBodies.js +100 -61
- package/dist/agents/components/context-items/bodies/DataBody.js +3 -2
- package/dist/agents/components/context-items/bodies/EntityReferenceBody.js +26 -19
- package/dist/agents/components/context-items/bodies/GenericBody.js +7 -6
- package/dist/agents/components/context-items/bodies/MediaBody.js +39 -32
- package/dist/agents/components/context-items/bodies/NoteBody.js +2 -1
- package/dist/agents/components/context-items/bodies/ProcessedDocumentBody.js +7 -3
- package/dist/agents/components/context-items/bodies/ProcessedDocumentTitle.js +2 -1
- package/dist/agents/components/context-items/bodies/RemarkBody.js +3 -2
- package/dist/agents/components/context-items/bodies/ResourceSnapshotView.js +10 -3
- package/dist/agents/components/context-items/bodies/TaskBody.js +2 -1
- package/dist/agents/components/context-items/bodies/UnregisteredBody.js +2 -1
- package/dist/agents/components/context-items/bodies/WebpageBody.js +38 -24
- package/dist/agents/components/context-items/bodies/WorkingDocumentBody.js +3 -2
- package/dist/agents/components/context-policies-display/ContextPolicyChip.js +2 -1
- package/dist/agents/components/context-policies-display/ContextPolicyChipStrip.js +23 -16
- package/dist/agents/components/context-policies-display/ContextPolicyDetail.js +54 -29
- package/dist/agents/components/context-policies-display/ContextPolicyItemsPopover.js +51 -41
- package/dist/agents/components/context-policies-display/ContextPolicyTile.js +13 -7
- package/dist/agents/components/context-policies-display/ContextRulesPanel.js +19 -12
- package/dist/agents/components/context-policies-display/ContextValueBody.js +20 -17
- package/dist/agents/components/context-policies-display/MessageContextReceipt.js +71 -30
- package/dist/agents/components/context-policies-display/ValueCountPill.js +6 -5
- package/dist/agents/components/context-policies-display/knownContextValues.js +20 -16
- package/dist/agents/components/context-preview/AttachedContextSection.js +169 -85
- package/dist/agents/components/context-preview/ContextCompareView.js +413 -196
- package/dist/agents/components/context-preview/ContextPreviewPanel.js +220 -105
- package/dist/agents/components/context-preview/SystemItemsLine.js +27 -13
- package/dist/agents/components/context-preview/inspector/ContextInspector.js +63 -31
- package/dist/agents/components/context-preview/inspector/ContextParityLastRun.js +48 -12
- package/dist/agents/components/conversation-actions/conversationActionRegistry.js +6 -1
- package/dist/agents/components/conversation-actions/rename/ConversationRenameDialogHost.js +2 -1
- package/dist/agents/components/conversation-actions/rename/ConversationRenameDialogHostImpl.js +4 -3
- package/dist/agents/components/conversation-history/ConversationHistorySidebar.js +450 -358
- package/dist/agents/components/conversation-history/ConversationLaneToggles.js +30 -28
- package/dist/agents/components/conversation-history/ConversationPickerWindow.js +20 -19
- package/dist/agents/components/conversation-history/ConversationSearchStatus.js +19 -5
- package/dist/agents/components/conversation-history/ConversationSourceFilterTree.js +242 -184
- package/dist/agents/components/conversation-history/ConversationTrashSection.js +53 -36
- package/dist/agents/components/custom-agent/CustomAgentWindow.js +97 -62
- package/dist/agents/components/debug/RoutingPanel.js +58 -15
- package/dist/agents/components/debug/SandboxFileViewer.js +56 -38
- package/dist/agents/components/debug/SandboxInsightPanel.js +27 -2
- package/dist/agents/components/debug/StreamDebugFloating.js +12 -12
- package/dist/agents/components/debug/StreamDebugPanel.js +1012 -597
- package/dist/agents/components/inputs/AgentVariablesInline.js +200 -177
- package/dist/agents/components/inputs/BoundVariableChips.js +117 -76
- package/dist/agents/components/inputs/DataBoundVariableChips.js +36 -23
- package/dist/agents/components/inputs/PreExecutionAgentInput.js +20 -9
- package/dist/agents/components/inputs/RowChoicesButton.js +27 -21
- package/dist/agents/components/inputs/input-components/AudioVariableInput.js +2 -1
- package/dist/agents/components/inputs/input-components/CheckboxGroupInput.js +72 -63
- package/dist/agents/components/inputs/input-components/CurrencyVariableInput.js +36 -30
- package/dist/agents/components/inputs/input-components/DocumentVariableInput.js +2 -1
- package/dist/agents/components/inputs/input-components/ImageVariableInput.js +2 -1
- package/dist/agents/components/inputs/input-components/MediaVariableInput.js +177 -126
- package/dist/agents/components/inputs/input-components/NumberInput.js +52 -47
- package/dist/agents/components/inputs/input-components/PicklistVariableInput.js +11 -11
- package/dist/agents/components/inputs/input-components/PillToggleInput.js +2 -2
- package/dist/agents/components/inputs/input-components/RadioGroupInput.js +53 -43
- package/dist/agents/components/inputs/input-components/ScalarVariableInput.js +46 -39
- package/dist/agents/components/inputs/input-components/SelectInput.js +91 -74
- package/dist/agents/components/inputs/input-components/SliderInput.js +37 -30
- package/dist/agents/components/inputs/input-components/TableVariableInput.js +29 -23
- package/dist/agents/components/inputs/input-components/TextareaInput.js +3 -2
- package/dist/agents/components/inputs/input-components/ToggleInput.js +24 -22
- package/dist/agents/components/inputs/input-components/VariableInputComponent.js +53 -40
- package/dist/agents/components/inputs/input-components/VideoVariableInput.js +2 -1
- package/dist/agents/components/inputs/input-components/YoutubeVariableInput.js +29 -17
- package/dist/agents/components/inputs/resources/AttachedDocumentChip.js +83 -57
- package/dist/agents/components/inputs/resources/AttachedDocumentChips.js +68 -62
- package/dist/agents/components/inputs/resources/ResourceFamilyPolicyEditor.js +214 -144
- package/dist/agents/components/inputs/resources/SmartAgentResourceChips.js +70 -69
- package/dist/agents/components/inputs/resources/SmartAgentResourcePickerButton.js +22 -18
- package/dist/agents/components/inputs/smart-input/AgentMicrophoneButton.js +3 -2
- package/dist/agents/components/inputs/smart-input/AgentTextarea.js +70 -58
- package/dist/agents/components/inputs/smart-input/ChatConnectionsStrip.js +172 -142
- package/dist/agents/components/inputs/smart-input/ComposerChip.js +30 -22
- package/dist/agents/components/inputs/smart-input/ComposerDraftNotice.js +15 -2
- package/dist/agents/components/inputs/smart-input/ComposerToolsNotice.js +12 -7
- package/dist/agents/components/inputs/smart-input/ComputeLensBar.js +141 -106
- package/dist/agents/components/inputs/smart-input/ContextDocsMenu.js +139 -91
- package/dist/agents/components/inputs/smart-input/ConversationContextChip.js +9 -6
- package/dist/agents/components/inputs/smart-input/ConversationContextRail.js +106 -80
- package/dist/agents/components/inputs/smart-input/DesktopPresenceIndicator.js +58 -37
- package/dist/agents/components/inputs/smart-input/InboxQueueStrip.js +227 -190
- package/dist/agents/components/inputs/smart-input/InputActionButtons.js +80 -36
- package/dist/agents/components/inputs/smart-input/PlusAttachMenu.js +163 -118
- package/dist/agents/components/inputs/smart-input/QuicksetPanel.js +147 -110
- package/dist/agents/components/inputs/smart-input/RunControlsMenu.js +105 -90
- package/dist/agents/components/inputs/smart-input/RunControlsTabPanel.js +86 -62
- package/dist/agents/components/inputs/smart-input/RunPicksSurface.js +157 -110
- package/dist/agents/components/inputs/smart-input/RunSkillPicker.js +12 -11
- package/dist/agents/components/inputs/smart-input/RunToolPicker.js +42 -38
- package/dist/agents/components/inputs/smart-input/ShapeChipsRow.js +20 -16
- package/dist/agents/components/inputs/smart-input/SmartAgentInput.js +40 -33
- package/dist/agents/components/inputs/smart-input/SmartAgentInputStacked.js +203 -177
- package/dist/agents/components/inputs/smart-input/SmartInputFileDropTarget.js +30 -21
- package/dist/agents/components/inputs/smart-input/UninitializedShell.js +22 -19
- package/dist/agents/components/inputs/smart-input/ViewOnlyComposerBar.js +8 -5
- package/dist/agents/components/inputs/smart-input/composer/ComposerAgentPeek.js +3 -2
- package/dist/agents/components/inputs/smart-input/composer/ComposerAgentPill.js +129 -99
- package/dist/agents/components/inputs/smart-input/composer/ComposerChipsRow.js +53 -47
- package/dist/agents/components/inputs/smart-input/composer/ComposerConnectPromo.js +25 -21
- package/dist/agents/components/inputs/smart-input/composer/ComposerConnectorsPanel.js +91 -55
- package/dist/agents/components/inputs/smart-input/composer/ComposerEffortPill.js +51 -42
- package/dist/agents/components/inputs/smart-input/composer/ComposerMenu.js +143 -115
- package/dist/agents/components/inputs/smart-input/composer/ComposerMenuSheet.js +26 -23
- package/dist/agents/components/inputs/smart-input/composer/ComposerMetaRow.js +41 -30
- package/dist/agents/components/inputs/smart-input/composer/ComposerModeSwitch.js +38 -26
- package/dist/agents/components/inputs/smart-input/composer/ComposerOutput.js +150 -101
- package/dist/agents/components/inputs/smart-input/composer/ComposerPlusMenu.js +264 -198
- package/dist/agents/components/inputs/smart-input/composer/ComposerSplash.js +54 -38
- package/dist/agents/components/inputs/variable-input-variations/AgentVariableCards.js +144 -127
- package/dist/agents/components/inputs/variable-input-variations/AgentVariableForm.js +247 -165
- package/dist/agents/components/inputs/variable-input-variations/AgentVariablesGuided.js +323 -244
- package/dist/agents/components/inputs/variable-input-variations/AgentVariablesStacked.js +32 -28
- package/dist/agents/components/inputs/variable-input-variations/AgentVariablesWizard.js +43 -16
- package/dist/agents/components/inputs/variable-input-variations/SmartAgentVariables.js +7 -6
- package/dist/agents/components/live-run/LiveRunDisplay.js +81 -53
- package/dist/agents/components/live-run/LiveRunProgress.js +72 -48
- package/dist/agents/components/live-run/RunSetDisplay.js +20 -17
- package/dist/agents/components/memory/components/AgentMemoryAllView.js +45 -27
- package/dist/agents/components/memory/components/AgentMemoryBody.js +4 -3
- package/dist/agents/components/memory/components/AgentMemoryEditor.js +52 -36
- package/dist/agents/components/memory/components/AgentMemoryFooter.js +66 -44
- package/dist/agents/components/memory/components/AgentMemoryInlinePanel.js +10 -2
- package/dist/agents/components/memory/components/AgentMemorySidebar.js +125 -89
- package/dist/agents/components/messages-display/AgentConversationDisplay.js +130 -119
- package/dist/agents/components/messages-display/MessageAttachmentStrip.js +8 -7
- package/dist/agents/components/messages-display/MessageTimestamp.js +8 -5
- package/dist/agents/components/messages-display/TranscriptIntegrityCopyButton.js +4 -3
- package/dist/agents/components/messages-display/assistant/AgentAssistantMessage.js +135 -108
- package/dist/agents/components/messages-display/assistant/AgentEmptyMessageDisplay.js +20 -9
- package/dist/agents/components/messages-display/assistant/AssistantMessageFooter.js +76 -65
- package/dist/agents/components/messages-display/assistant/AssistantNoAnswer.js +28 -17
- package/dist/agents/components/messages-display/assistant/AssistantTurnGroup.js +65 -62
- package/dist/agents/components/messages-display/assistant/BreathingOrb.js +70 -57
- package/dist/agents/components/messages-display/assistant/InPlaceAnswerEditor.js +7 -3
- package/dist/agents/components/messages-display/assistant/ProviderRetryCard.js +61 -36
- package/dist/agents/components/messages-display/citations/MessageCitationsContext.js +2 -1
- package/dist/agents/components/messages-display/citations/MessageSourcesRow.js +25 -21
- package/dist/agents/components/messages-display/conversation-tools/ConversationFindBar.js +46 -43
- package/dist/agents/components/messages-display/conversation-tools/FollowUpSuggestions.js +2 -2
- package/dist/agents/components/messages-display/message-options/DeleteMessageDialog.js +61 -40
- package/dist/agents/components/messages-display/message-options/EditHistoryDialog.js +91 -56
- package/dist/agents/components/messages-display/message-options/shareMessageAsWebpage.js +1 -1
- package/dist/agents/components/messages-display/user/AgentUserMessage.js +180 -144
- package/dist/agents/components/messages-display/user/CollabNoteMessage.js +16 -6
- package/dist/agents/components/messages-display/user/FirstTurnVariables.js +51 -40
- package/dist/agents/components/messages-display/user/PendingSendMessage.js +60 -37
- package/dist/agents/components/messages-display/user/RemarksTranscriptView.js +22 -5
- package/dist/agents/components/messages-display/user/ResourceAttachmentTile.js +187 -147
- package/dist/agents/components/messages-display/user/ResourceEditableToggleSamples.js +17 -1
- package/dist/agents/components/messages-display/user/UserActionBar.js +77 -62
- package/dist/agents/components/messages-display/user/UserMessageAttachmentStyleComparison.js +82 -39
- package/dist/agents/components/messages-display/user/UserMessageChipsDemo.js +189 -105
- package/dist/agents/components/messages-display/user/UserMessageHybridTileSamples.js +212 -130
- package/dist/agents/components/model/AgentModelPanel.js +2 -1
- package/dist/agents/components/model-tiers/ModelTierIdentityList.js +18 -15
- package/dist/agents/components/notifications/ImageArrivalPeek.js +45 -34
- package/dist/agents/components/notifications/ImageArrivalPeekHost.js +14 -13
- package/dist/agents/components/observational-memory/ObservationalMemoryCore.js +46 -31
- package/dist/agents/components/observational-memory/components/MemoryControls.js +84 -48
- package/dist/agents/components/observational-memory/components/MemoryCostCard.js +136 -84
- package/dist/agents/components/observational-memory/components/MemoryEventTimeline.js +127 -78
- package/dist/agents/components/observational-memory/components/MemoryOverviewCard.js +113 -72
- package/dist/agents/components/observational-memory/components/MemoryStateInspector.js +384 -216
- package/dist/agents/components/run/AgentRunHeader.js +44 -27
- package/dist/agents/components/run/AgentRunnerPage.js +47 -31
- package/dist/agents/components/run/AgentStatusIndicator.js +2 -1
- package/dist/agents/components/run/AssistantError.js +61 -27
- package/dist/agents/components/run/AssistantWarning.js +18 -2
- package/dist/agents/components/run/GenerationJobCard.js +19 -6
- package/dist/agents/components/run/IncompleteNote.js +11 -1
- package/dist/agents/components/run/RunJobWorkingLine.js +14 -11
- package/dist/agents/components/run/run-sidebar/SidebarHeader.js +25 -18
- package/dist/agents/components/run-controls/AdvancedRunSettings/AdvancedRunSettings.js +72 -56
- package/dist/agents/components/run-controls/AdvancedRunSettings/ComplexityBadge.js +10 -8
- package/dist/agents/components/run-controls/AdvancedRunSettings/primitives.js +84 -66
- package/dist/agents/components/run-controls/ContextPoliciesTab.js +194 -130
- package/dist/agents/components/run-controls/RunConfigOverrides.js +245 -179
- package/dist/agents/components/run-controls/RunInputCapabilities.js +24 -20
- package/dist/agents/components/run-controls/RunModelPicker.js +35 -25
- package/dist/agents/components/run-controls/RunSettingsEditor.js +356 -267
- package/dist/agents/components/run-controls/RunSettingsModal.js +8 -1
- package/dist/agents/components/run-controls/SimpleRunSettings/CapabilityGrid.js +25 -20
- package/dist/agents/components/run-controls/SimpleRunSettings/ReasoningLevelSelector.js +14 -11
- package/dist/agents/components/run-controls/SimpleRunSettings/SimpleRunSettings.js +32 -21
- package/dist/agents/components/run-controls/SimpleRunSettings/SimpleRunSettingsButton.js +41 -35
- package/dist/agents/components/run-controls/StoredModelOverridesField.js +38 -27
- package/dist/agents/components/run-controls/SurfaceSimulatorSelect.js +117 -69
- package/dist/agents/components/run-controls/panels/BackendTargetPanel.js +81 -35
- package/dist/agents/components/run-controls/panels/ClientMetricsPanel.js +65 -33
- package/dist/agents/components/run-controls/panels/ModelContextPanel.js +94 -46
- package/dist/agents/components/run-controls/panels/RequestStatsPanel.js +82 -53
- package/dist/agents/components/run-controls/panels/SessionStatsPanel.js +33 -9
- package/dist/agents/components/run-controls/panels/shared.js +10 -4
- package/dist/agents/components/send-to-agent/SendToAgentWindow.js +89 -57
- package/dist/agents/components/shared/AgentConversationColumn.js +135 -123
- package/dist/agents/components/shared/AgentHeader.js +47 -29
- package/dist/agents/components/shared/AgentHeaderMobile.js +173 -133
- package/dist/agents/components/shared/AgentModeController.js +58 -43
- package/dist/agents/components/shared/AgentNewRunButton.js +2 -1
- package/dist/agents/components/shared/AgentPlanningIndicator.js +2 -1
- package/dist/agents/components/shared/AgentReferenceCopyButton.js +2 -1
- package/dist/agents/components/shared/AgentSelectorIsland.js +26 -18
- package/dist/agents/components/shared/AutoInjectionSwitch.js +66 -55
- package/dist/agents/components/shared/DesktopFilterPanel.js +183 -140
- package/dist/agents/components/shared/OlderMessagesSentinel.js +2 -1
- package/dist/agents/components/shared/StreamProfilerOverlay.js +64 -5
- package/dist/agents/components/shared/transcript-audience.js +2 -1
- package/dist/agents/components/shell/AgentBuildSidebarExtras.js +14 -3
- package/dist/agents/components/shell/AgentRunSidebarMenu.js +82 -58
- package/dist/agents/components/smart/AgentRunWrapper.js +2 -1
- package/dist/agents/components/smart/AgentRunner.js +45 -40
- package/dist/agents/components/smart/CreateWithAiTabs.js +88 -73
- package/dist/agents/components/working-document/DocumentLinkPicker.js +74 -47
- package/dist/agents/components/working-document/ScratchpadQuickPanel.js +3 -2
- package/dist/agents/components/working-document/ScratchpadSwitcherMenu.js +58 -35
- package/dist/agents/components/working-document/WorkingDocumentAgentDiff.js +8 -4
- package/dist/agents/components/working-document/WorkingDocumentEditor.js +35 -34
- package/dist/agents/components/working-document/WorkingDocumentLatestVersionDiff.js +15 -5
- package/dist/agents/components/working-document/WorkingDocumentPanel.js +250 -174
- package/dist/agents/components/working-document/WorkingDocumentVersionHistory.js +82 -46
- package/dist/agents/components/working-document/WorkingDocumentViewControls.js +64 -52
- package/dist/agents/components/working-document/documents-workspace/DocumentsListRail.js +127 -106
- package/dist/agents/components/working-document/documents-workspace/DocumentsWorkspace.js +116 -103
- package/dist/agents/decision-answers/DecisionAnswers.js +164 -107
- package/dist/agents/image-roles/ImageRoleSelector.js +60 -50
- package/dist/agents/image-roles/ReferenceRoleCaption.js +5 -4
- package/dist/agents/message-flags/ExampleTurnsGroup.js +8 -1
- package/dist/agents/message-flags/MessageFlagToggles.js +72 -56
- package/dist/agents/message-flags/MessageFlagsPreview.js +35 -10
- package/dist/agents/message-flags/PrefillNote.js +5 -4
- package/dist/agents/message-flags/StoppedNote.js +8 -5
- package/dist/agents/prompt-preview/PromptPreviewContent.js +72 -34
- package/dist/agents/redux/execution-system/host-conversations/conversation-abilities.js +2 -1
- package/dist/agents/redux/execution-system/inbox/inbox.thunks.js +19 -10
- package/dist/agents/redux/execution-system/instance-ui-state/components/InstanceUIStateCore.js +430 -313
- package/dist/agents/redux/execution-system/instance-ui-state/components/InstanceUIStateList.js +120 -104
- package/dist/agents/redux/execution-system/instance-variable-values/instance-variable-values.persistence.d.ts +6 -0
- package/dist/agents/redux/execution-system/instance-variable-values/instance-variable-values.persistence.js +4 -2
- package/dist/agents/redux/execution-system/thunks/execute-instance.thunk.js +24 -8
- package/dist/agents/resources/ResourceChips.js +37 -34
- package/dist/agents/resources/ResourceDisplay.js +51 -32
- package/dist/agents/route/AgentHydratorServer.js +2 -1
- package/dist/agents/routing/ConfidentialToggle.js +8 -6
- package/dist/agents/runtime-reconnect/ServerOperationBanner.js +33 -28
- package/dist/agents/speech-script/SpeechScriptTranscriptView.js +20 -1
- package/dist/agents/ui-first-tools/ui/AgentCardShell.js +78 -67
- package/dist/agents/ui-first-tools/ui/ApprovalCard.js +136 -102
- package/dist/agents/ui-first-tools/ui/AskCard.js +383 -293
- package/dist/agents/ui-first-tools/ui/AskCardCountdown.js +10 -9
- package/dist/agents/ui-first-tools/ui/AskWizard.js +91 -70
- package/dist/agents/ui-first-tools/ui/BatchAskCard.js +2 -1
- package/dist/agents/ui-first-tools/ui/CredentialCaptureCard.js +54 -33
- package/dist/agents/ui-first-tools/ui/PendingAsksZone.js +66 -55
- package/dist/agents/ui-first-tools/ui/QuestionsAskForm.js +2 -1
- package/dist/agents/ui-first-tools/ui/lists/ListsHubView.js +112 -63
- package/dist/agents/ui-first-tools/ui/lists/TaskPanel.js +209 -140
- package/dist/agents/ui-first-tools/ui/lists/TaskPanelChip.js +7 -6
- package/dist/canvas/workspace/CanvasChatColumn.js +28 -17
- package/dist/canvas/workspace/CanvasPropertiesPanel.js +38 -32
- package/dist/canvas/workspace/ChatCanvasWorkspace.js +87 -53
- package/dist/canvas/workspace/ChatPanelTitleMenu.js +56 -44
- package/dist/canvas/workspace/ShellChatDock.js +71 -54
- package/dist/context-menu/types.d.ts +12 -6
- package/dist/cx-chat/components/ChatConversationSkeleton.js +35 -2
- package/dist/cx-chat/components/ChatHeaderControls.js +35 -23
- package/dist/cx-chat/components/ChatInstanceManager.js +3 -2
- package/dist/cx-chat/components/ChatMobileAdminToggles.js +16 -11
- package/dist/cx-chat/components/ChatMobileAgentName.js +13 -9
- package/dist/cx-chat/components/ChatMobileHeaderBar.js +25 -22
- package/dist/cx-chat/components/ChatPanelBackButton.js +2 -1
- package/dist/cx-chat/components/ChatSidebarClient.js +164 -135
- package/dist/cx-chat/components/ChatWelcomeClient.js +27 -17
- package/dist/cx-chat/components/ChatWelcomeServer.js +3 -2
- package/dist/cx-chat/components/ContextGaugeWidget.js +22 -13
- package/dist/cx-chat/components/SsrSidebarAgents.js +4 -3
- package/dist/cx-chat/components/SsrSidebarChats.js +159 -105
- package/dist/cx-chat/components/agent/AgentPickerSheet.js +16 -3
- package/dist/cx-chat/components/core/ChatConversationClient.js +47 -32
- package/dist/cx-chat/components/messages/MessageErrorBoundary.js +8 -1
- package/dist/cx-chat/components/messages/UserMessage.js +142 -116
- package/dist/cx-chat/components/sidebar/SidebarActions.js +24 -16
- package/dist/cx-chat/components/sidebar/SidebarUserFooter.js +43 -30
- package/dist/cx-chat/components/user-input/ConversationInput.js +157 -136
- package/dist/cx-chat/components/user-input/InpuControlButtons.js +18 -17
- package/dist/cx-chat/components/user-input/InputActionButtons.js +33 -28
- package/dist/cx-chat/components/user-input/StackedVariableInputs.js +79 -65
- package/dist/cx-chat/components/variable-inputs/CheckboxGroupInput.js +90 -63
- package/dist/cx-chat/components/variable-inputs/NumberInput.js +41 -30
- package/dist/cx-chat/components/variable-inputs/RadioGroupInput.js +64 -46
- package/dist/cx-chat/components/variable-inputs/SelectInput.js +32 -15
- package/dist/cx-chat/components/variable-inputs/TextareaInput.js +3 -2
- package/dist/cx-chat/components/variable-inputs/ToggleInput.js +28 -8
- package/dist/host/bare-host-chrome.js +2 -1
- package/dist/host/chrome.js +10 -9
- package/dist/host/configure.js +7 -1
- package/dist/host/conversation-hooks-react.d.ts +7 -0
- package/dist/host/conversation-hooks-react.js +15 -2
- package/dist/host/conversation-hooks.d.ts +10 -0
- package/dist/host/conversation-hooks.js +7 -0
- package/dist/host/defaults/memory-navigation.js +5 -4
- package/dist/host/defaults/resource-picker-menu.js +30 -25
- package/dist/host/defaults/setting-control-input.js +13 -10
- package/dist/host/defaults/window-panel.js +38 -17
- package/dist/host/defaults/workspace-gate.js +31 -20
- package/dist/host/navigation.js +2 -1
- package/dist/host/react.js +3 -2
- package/dist/host/ui-slots.d.ts +3 -2
- package/dist/mandates/RunFailureCard.js +27 -16
- package/dist/public-chat/components/AgentSelector.js +26 -26
- package/dist/public-chat/components/GuidedVariableInputs.js +282 -216
- package/dist/public-chat/components/PublicMessageOptionsMenu.js +36 -31
- package/dist/public-chat/components/PublicVariableInputs.js +79 -65
- package/dist/quick-actions/components/QuickChatSheet.js +83 -59
- package/dist/surfaces/components/chrome/PageIntelligenceSection.js +36 -22
- package/dist/surfaces/components/chrome/SurfaceAgentsHeaderButton.js +31 -21
- package/dist/surfaces/components/chrome/SurfaceAgentsPanelImpl.js +109 -64
- package/dist/surfaces/components/chrome/SurfaceConversationsSection.js +87 -41
- package/dist/surfaces/components/chrome/SurfaceMandatesSection.js +118 -75
- package/dist/surfaces/components/chrome/SurfaceRoleAgentButton.js +8 -5
- package/dist/surfaces/runtime/StaticSurfaceRuntimeProvider.js +2 -1
- package/dist/surfaces/runtime/SurfaceRuntimeContext.js +8 -7
- package/dist/surfaces/runtime/intelligence.js +2 -1
- package/dist/testing/chat-host-test-provider.js +2 -1
- package/dist/testing/render-hook.js +2 -2
- package/dist/tool-call-visualization/components/AgentWorkGroup.js +15 -11
- package/dist/tool-call-visualization/components/ArtifactResultBar.js +78 -51
- package/dist/tool-call-visualization/components/ChatResultColumn.js +2 -2
- package/dist/tool-call-visualization/components/LiveToolCallCard.js +2 -1
- package/dist/tool-call-visualization/components/ToolCallBatch.js +35 -29
- package/dist/tool-call-visualization/components/ToolCallVisualization.js +217 -200
- package/dist/tool-call-visualization/components/ToolConversationContext.js +3 -2
- package/dist/tool-call-visualization/components/ToolTabBodies.js +122 -70
- package/dist/tool-call-visualization/components/ToolUpdatesOverlay.js +68 -50
- package/dist/tool-call-visualization/components/agentWorkTurn.js +8 -8
- package/dist/tool-call-visualization/db-renderer/DbToolRenderer.js +2 -2
- package/dist/tool-call-visualization/db-renderer/DbToolRendererImpl.js +7 -6
- package/dist/tool-call-visualization/grouping/foldAgentWork.js +10 -3
- package/dist/tool-call-visualization/registry/GenericRenderer.js +68 -51
- package/dist/tool-call-visualization/registry/registry.js +62 -10
- package/dist/tool-call-visualization/renderers/_shared-entity/EmptyResultCard.js +9 -4
- package/dist/tool-call-visualization/renderers/_shared-entity/EntityCard.js +116 -85
- package/dist/tool-call-visualization/renderers/_shared-entity/EntityOpenActions.js +16 -9
- package/dist/tool-call-visualization/renderers/_shared-entity/PartPeekPopover.js +24 -18
- package/dist/tool-call-visualization/renderers/_shared-entity/ToolGlyph.js +2 -1
- package/dist/tool-call-visualization/renderers/_shared-entity/ToolResultCard.js +89 -65
- package/dist/tool-call-visualization/renderers/agent-call/AgentCallInline.js +71 -54
- package/dist/tool-call-visualization/renderers/agent-call/CollabCallCard.js +90 -54
- package/dist/tool-call-visualization/renderers/agent-call/ImageGenerationResult.js +39 -31
- package/dist/tool-call-visualization/renderers/ask/AskInline.js +20 -15
- package/dist/tool-call-visualization/renderers/ask-person/AskPersonInline.js +17 -8
- package/dist/tool-call-visualization/renderers/cloud-browser/CloudBrowserRunCard.js +89 -55
- package/dist/tool-call-visualization/renderers/ctx/ContextActionInline.js +4 -4
- package/dist/tool-call-visualization/renderers/ctx/CtxBatchInline.js +50 -18
- package/dist/tool-call-visualization/renderers/ctx/CtxGetInline.js +13 -5
- package/dist/tool-call-visualization/renderers/ctx/CtxItemCard.js +22 -13
- package/dist/tool-call-visualization/renderers/ctx/CtxPatchInline.js +25 -6
- package/dist/tool-call-visualization/renderers/dictionary/DictEntryList.js +37 -5
- package/dist/tool-call-visualization/renderers/dictionary/DictionaryInline.js +5 -4
- package/dist/tool-call-visualization/renderers/dictionary/DictionaryOverlay.js +18 -2
- package/dist/tool-call-visualization/renderers/fs/FsInline.js +73 -55
- package/dist/tool-call-visualization/renderers/news-api/NewsInline.js +90 -41
- package/dist/tool-call-visualization/renderers/news-api/NewsOverlay.js +152 -84
- package/dist/tool-call-visualization/renderers/random-wheel/RandomWheelInline.js +297 -180
- package/dist/tool-call-visualization/renderers/records/RecordsInline.js +7 -2
- package/dist/tool-call-visualization/renderers/research/ResearchInline.js +88 -45
- package/dist/tool-call-visualization/renderers/research/ResearchOverlay.js +102 -54
- package/dist/tool-call-visualization/renderers/research/SubagentReportBlock.js +95 -65
- package/dist/tool-call-visualization/renderers/scrape/ScrapeInline.js +170 -100
- package/dist/tool-call-visualization/renderers/scrape/ScrapeOverlay.js +109 -55
- package/dist/tool-call-visualization/renderers/search/SearchInline.js +297 -186
- package/dist/tool-call-visualization/renderers/search/SearchOverlay.js +240 -105
- package/dist/tool-call-visualization/renderers/shell/ShellInline.js +52 -33
- package/dist/tool-call-visualization/renderers/skill/SkillInline.js +44 -36
- package/dist/tool-call-visualization/renderers/sql/DbSchemaInline.js +33 -7
- package/dist/tool-call-visualization/renderers/sql/SqlInline.js +46 -14
- package/dist/tool-call-visualization/renderers/web/WebInline.js +4 -4
- package/dist/tool-call-visualization/renderers/web/WebOverlay.js +4 -4
- package/dist/tool-call-visualization/renderers/workbook/WorkbookGrid.js +25 -15
- package/dist/tool-call-visualization/renderers/workbook/WorkbookInline.js +24 -15
- package/dist/tool-call-visualization/renderers/workbook/WorkbookOverlay.js +25 -11
- package/dist/tool-call-visualization/renderers/working-document/PatchDiffInline.js +11 -10
- package/dist/tool-call-visualization/result-fields/EmptyResult.js +8 -6
- package/dist/tool-call-visualization/result-fields/KeyValueGrid.js +121 -78
- package/dist/tool-call-visualization/result-fields/KindValueNode.js +4 -3
- package/dist/tool-call-visualization/result-fields/ResultFile.js +28 -19
- package/dist/tool-call-visualization/result-fields/ResultJson.js +2 -2
- package/dist/tool-call-visualization/result-fields/ResultMarkdown.js +31 -24
- package/dist/tool-call-visualization/result-fields/ResultMedia.js +23 -19
- package/dist/tool-call-visualization/result-fields/ResultRecordRef.js +3 -2
- package/dist/tool-call-visualization/result-fields/ResultScalar.js +4 -4
- package/dist/tool-call-visualization/result-fields/ResultTable.js +144 -107
- package/dist/tool-call-visualization/result-fields/ResultValue.js +78 -61
- package/dist/tool-call-visualization/result-fields/ShortId.js +21 -13
- package/dist/tool-call-visualization/result-fields/ToolErrorCard.js +22 -17
- package/dist/tool-call-visualization/result-fields/ToolResultValue.js +3 -3
- package/dist/tool-call-visualization/result-fields/UrlChips.js +13 -11
- package/dist/tool-call-visualization/result-fields/document-presentation.js +3 -2
- package/dist/tool-call-visualization/surface-write/SurfaceWriteDiff.js +69 -55
- package/dist/tool-call-visualization/surface-write/SurfaceWriteStress.js +8 -1
- package/dist/tool-call-visualization/surface-write/withSurfaceWriteDiff.js +3 -2
- package/dist/tool-call-visualization/window-panel/ToolCallWindowPanel.js +140 -120
- package/dist/ui/AudioOutputBlockSkeleton.js +61 -21
- package/dist/ui/chat-panel/ChatPanel.js +61 -45
- package/dist/ui/checkbox.js +2 -1
- package/dist/ui/html-preview/HtmlPreviewBridge.js +3 -2
- package/dist/ui/lazy/SurfaceAgentsPanelImpl.js +5 -1
- package/dist/ui/markdown-stream/EnhancedChatMarkdown.js +141 -131
- package/dist/ui/markdown-stream/MarkdownStreamImpl.js +42 -42
- package/dist/ui/markdown-stream/StreamAwareChatMarkdown.js +19 -18
- package/dist/ui/markdown-stream/internal-handlers/AgentCallChildTrace.js +59 -56
- package/dist/ui/markdown-stream/internal-handlers/InlineAssistantError.js +2 -1
- package/dist/ui/markdown-stream/internal-handlers/InlineThinkingSlot.js +3 -3
- package/dist/ui/markdown-stream/internal-handlers/ToolHandlers.js +34 -31
- package/dist/ui/scroll-fade.js +5 -4
- package/dist/ui/tabs.js +2 -1
- package/dist/ui/usages/DriftSeverityBadge.js +9 -6
- package/dist/utils/connectors/marks.js +122 -59
- package/dist/utils/resource-picker/ResourcePickerSubViewHeader.js +66 -40
- package/dist/voice-agent/components/GoogleLiveSurface.js +127 -90
- package/dist/voice-agent/components/LiveVoiceDoor.js +10 -7
- package/dist/voice-agent/components/VoiceAgentSurface.js +114 -92
- package/dist/voice-agent/components/VoiceControlCluster.js +5 -1
- package/dist/voice-agent/components/VoiceDebugPanel.js +212 -107
- package/dist/voice-agent/components/VoiceEdgeRibbon.js +63 -60
- package/dist/voice-agent/components/VoiceErrorBanner.js +20 -17
- package/dist/voice-agent/components/VoiceMicButton.js +5 -4
- package/dist/voice-agent/components/VoiceMuteButton.js +5 -4
- package/dist/voice-agent/components/VoiceOrb.js +84 -81
- package/dist/voice-agent/components/VoiceStatusPill.js +12 -11
- package/dist/voice-agent/components/VoiceTranscriptStream.js +8 -5
- package/dist/voice-agent/components/VoiceTranscriptTurn.js +20 -17
- package/dist/voice-agent/components/playground/InstructionsEditor.js +34 -27
- package/dist/voice-agent/components/playground/PlaygroundSettingsSheet.js +27 -15
- package/dist/voice-agent/components/playground/ToolToggleList.js +34 -25
- package/dist/voice-agent/components/playground/VoicePicker.js +17 -10
- package/dist/voice-agent/relay/VoiceChatClient.js +3 -2
- package/dist/voice-agent/relay/VoiceRelayBar.js +60 -53
- package/dist/voice-agent/relay/VoiceRelayDock.js +26 -14
- package/dist/voice-agent/relay/VoiceRelayPanel.js +21 -10
- package/dist/window-panels/windows/agents/AgentAssistantMarkdownDebugWindow.js +74 -59
- package/dist/window-panels/windows/agents/AgentMemoryWindow.js +24 -20
- package/dist/window-panels/windows/agents/AgentPickerFrame.js +14 -13
- package/dist/window-panels/windows/agents/AgentRunHistoryWindow.js +151 -112
- package/dist/window-panels/windows/agents/AgentRunWindow.js +118 -78
- package/dist/window-panels/windows/agents/ChatHistoryWindow.js +49 -38
- package/dist/window-panels/windows/agents/LiveRunWindow.js +34 -31
- package/dist/window-panels/windows/agents/MessageAnalysisWindow.js +39 -34
- package/dist/window-panels/windows/agents/ObservationalMemoryWindow.js +189 -137
- package/dist/window-panels/windows/agents/RunControlsWindow.js +50 -49
- package/package.json +9 -9
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { useSyncExternalStore } from "react";
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
getConversationHooks,
|
|
4
|
+
readConversationHeld,
|
|
5
|
+
subscribeConversationHeld,
|
|
6
|
+
subscribeConversationHooks
|
|
7
|
+
} from "./conversation-hooks.js";
|
|
3
8
|
function useConversationHeld(conversationId) {
|
|
4
9
|
return useSyncExternalStore(
|
|
5
10
|
(listener) => subscribeConversationHeld(conversationId, listener),
|
|
@@ -7,6 +12,14 @@ function useConversationHeld(conversationId) {
|
|
|
7
12
|
() => null
|
|
8
13
|
);
|
|
9
14
|
}
|
|
15
|
+
function useConversationHooks(conversationId) {
|
|
16
|
+
return useSyncExternalStore(
|
|
17
|
+
subscribeConversationHooks,
|
|
18
|
+
() => conversationId ? getConversationHooks(conversationId) : void 0,
|
|
19
|
+
() => void 0
|
|
20
|
+
);
|
|
21
|
+
}
|
|
10
22
|
export {
|
|
11
|
-
useConversationHeld
|
|
23
|
+
useConversationHeld,
|
|
24
|
+
useConversationHooks
|
|
12
25
|
};
|
|
@@ -49,10 +49,20 @@ export interface ConversationHostHooks {
|
|
|
49
49
|
everyTurnThroughMandate?: boolean;
|
|
50
50
|
/** How a stored user turn reads on screen (display only; the record is unchanged). */
|
|
51
51
|
displayUserText?: (text: string) => string;
|
|
52
|
+
/**
|
|
53
|
+
* The host hands every turn its context itself (the gate's `context`): what
|
|
54
|
+
* the person's bubble would list as "N sent" is the host's frame, not
|
|
55
|
+
* something she attached — so her bubble shows only what she typed and
|
|
56
|
+
* attached. Display only; the context still ships and the server's receipt
|
|
57
|
+
* is unchanged.
|
|
58
|
+
*/
|
|
59
|
+
hostSuppliesContext?: boolean;
|
|
52
60
|
}
|
|
53
61
|
/** Register a conversation's hooks. Returns the release; a newer registration for the same id wins. */
|
|
54
62
|
export declare function registerConversationHooks(conversationId: string, hooks: ConversationHostHooks): () => void;
|
|
55
63
|
export declare function getConversationHooks(conversationId: string): ConversationHostHooks | undefined;
|
|
64
|
+
/** Be told whenever any conversation's hooks are registered or released. */
|
|
65
|
+
export declare function subscribeConversationHooks(listener: () => void): () => void;
|
|
56
66
|
export type BeforeSendOutcome = {
|
|
57
67
|
ok: true;
|
|
58
68
|
} | {
|
|
@@ -18,6 +18,12 @@ function registerConversationHooks(conversationId, hooks) {
|
|
|
18
18
|
function getConversationHooks(conversationId) {
|
|
19
19
|
return hooksByConversation.get(conversationId);
|
|
20
20
|
}
|
|
21
|
+
function subscribeConversationHooks(listener) {
|
|
22
|
+
registryListeners.add(listener);
|
|
23
|
+
return () => {
|
|
24
|
+
registryListeners.delete(listener);
|
|
25
|
+
};
|
|
26
|
+
}
|
|
21
27
|
async function runBeforeSend(conversationId, text) {
|
|
22
28
|
const hooks = hooksByConversation.get(conversationId);
|
|
23
29
|
if (!hooks) return { ok: true };
|
|
@@ -88,6 +94,7 @@ export {
|
|
|
88
94
|
runBeforeSend,
|
|
89
95
|
startHostConversation,
|
|
90
96
|
subscribeConversationHeld,
|
|
97
|
+
subscribeConversationHooks,
|
|
91
98
|
takeTurnExtras,
|
|
92
99
|
tapStreamEvent
|
|
93
100
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
3
|
import { useSyncExternalStore } from "react";
|
|
3
4
|
const LOCAL_ORIGIN = "https://chat.memory.local";
|
|
4
5
|
function defaultOpenExternal(href) {
|
|
@@ -70,7 +71,7 @@ function createMemoryNavigation(options = {}) {
|
|
|
70
71
|
function MemoryLink({ href, children, onClick, prefetch, replace, scroll, ...anchor }) {
|
|
71
72
|
void prefetch;
|
|
72
73
|
void scroll;
|
|
73
|
-
return /* @__PURE__ */
|
|
74
|
+
return /* @__PURE__ */ jsx(
|
|
74
75
|
"a",
|
|
75
76
|
{
|
|
76
77
|
...anchor,
|
|
@@ -80,9 +81,9 @@ function createMemoryNavigation(options = {}) {
|
|
|
80
81
|
if (event.defaultPrevented || event.metaKey || event.ctrlKey || event.shiftKey) return;
|
|
81
82
|
event.preventDefault();
|
|
82
83
|
go(href, replace ? "replace" : "push");
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
|
|
84
|
+
},
|
|
85
|
+
children
|
|
86
|
+
}
|
|
86
87
|
);
|
|
87
88
|
}
|
|
88
89
|
return {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
3
|
import { useEffect, useRef, useState } from "react";
|
|
3
4
|
import { Button, Input } from "@ai-matrx/design-system";
|
|
4
5
|
import { useUploadAgentResources } from "../../agents/components/inputs/resources/usePasteImageResource.js";
|
|
@@ -18,7 +19,7 @@ function FilesView({ conversationId, initialUploadFiles, done }) {
|
|
|
18
19
|
started.current = true;
|
|
19
20
|
send([...initialUploadFiles]);
|
|
20
21
|
});
|
|
21
|
-
return /* @__PURE__ */
|
|
22
|
+
return /* @__PURE__ */ jsxs(
|
|
22
23
|
"div",
|
|
23
24
|
{
|
|
24
25
|
className: `m-2 flex flex-col items-center gap-2 rounded-md border border-dashed p-4 text-sm ${dragging ? "border-primary bg-primary/5" : "border-border"}`,
|
|
@@ -32,23 +33,25 @@ function FilesView({ conversationId, initialUploadFiles, done }) {
|
|
|
32
33
|
event.preventDefault();
|
|
33
34
|
setDragging(false);
|
|
34
35
|
send(Array.from(event.dataTransfer.files));
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
36
|
+
},
|
|
37
|
+
children: [
|
|
38
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: "Drop files here" }),
|
|
39
|
+
/* @__PURE__ */ jsx(Button, { type: "button", size: "sm", onClick: () => input.current?.click(), children: "Choose files" }),
|
|
40
|
+
/* @__PURE__ */ jsx(
|
|
41
|
+
"input",
|
|
42
|
+
{
|
|
43
|
+
ref: input,
|
|
44
|
+
type: "file",
|
|
45
|
+
multiple: true,
|
|
46
|
+
hidden: true,
|
|
47
|
+
onChange: (event) => {
|
|
48
|
+
send(Array.from(event.target.files ?? []));
|
|
49
|
+
event.target.value = "";
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
)
|
|
53
|
+
]
|
|
54
|
+
}
|
|
52
55
|
);
|
|
53
56
|
}
|
|
54
57
|
function normalizeUrl(raw) {
|
|
@@ -64,7 +67,7 @@ function normalizeUrl(raw) {
|
|
|
64
67
|
function LinkView({ select }) {
|
|
65
68
|
const [text, setText] = useState("");
|
|
66
69
|
const url = normalizeUrl(text);
|
|
67
|
-
return /* @__PURE__ */
|
|
70
|
+
return /* @__PURE__ */ jsxs(
|
|
68
71
|
"form",
|
|
69
72
|
{
|
|
70
73
|
className: "flex items-center gap-2 p-2",
|
|
@@ -72,10 +75,12 @@ function LinkView({ select }) {
|
|
|
72
75
|
onSubmit: (event) => {
|
|
73
76
|
event.preventDefault();
|
|
74
77
|
if (url) select(url);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
78
|
+
},
|
|
79
|
+
children: [
|
|
80
|
+
/* @__PURE__ */ jsx(Input, { autoFocus: true, className: "h-8 text-sm", placeholder: "https://", value: text, onChange: (event) => setText(event.target.value) }),
|
|
81
|
+
/* @__PURE__ */ jsx(Button, { type: "submit", size: "sm", disabled: !url, children: "Attach" })
|
|
82
|
+
]
|
|
83
|
+
}
|
|
79
84
|
);
|
|
80
85
|
}
|
|
81
86
|
function DefaultResourcePickerMenu({
|
|
@@ -91,10 +96,10 @@ function DefaultResourcePickerMenu({
|
|
|
91
96
|
onClose?.();
|
|
92
97
|
};
|
|
93
98
|
if (initialView === "files") {
|
|
94
|
-
return /* @__PURE__ */
|
|
99
|
+
return /* @__PURE__ */ jsx(FilesView, { conversationId, initialUploadFiles, done });
|
|
95
100
|
}
|
|
96
101
|
if (initialView === "webpage") {
|
|
97
|
-
return /* @__PURE__ */
|
|
102
|
+
return /* @__PURE__ */ jsx(
|
|
98
103
|
LinkView,
|
|
99
104
|
{
|
|
100
105
|
select: (url) => {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
3
|
import { useEffect, useState } from "react";
|
|
3
4
|
import { Input, Switch, Textarea } from "@ai-matrx/design-system";
|
|
4
5
|
const FIELD = "h-8 w-full text-sm";
|
|
@@ -7,7 +8,7 @@ function JsonField({ id, value, disabled, onChange }) {
|
|
|
7
8
|
const [draft, setDraft] = useState(text);
|
|
8
9
|
const [invalid, setInvalid] = useState(false);
|
|
9
10
|
useEffect(() => setDraft(text), [text]);
|
|
10
|
-
return /* @__PURE__ */
|
|
11
|
+
return /* @__PURE__ */ jsx(
|
|
11
12
|
Textarea,
|
|
12
13
|
{
|
|
13
14
|
id,
|
|
@@ -33,23 +34,25 @@ function DefaultSettingControlInput({ settingKey, control, value, onChange, disa
|
|
|
33
34
|
const fieldId = id ?? `setting-${settingKey}`;
|
|
34
35
|
switch (control.type) {
|
|
35
36
|
case "boolean":
|
|
36
|
-
return /* @__PURE__ */
|
|
37
|
+
return /* @__PURE__ */ jsx(Switch, { id: fieldId, checked: value === true, disabled, onCheckedChange: (checked) => onChange(checked) });
|
|
37
38
|
case "enum":
|
|
38
|
-
return /* @__PURE__ */
|
|
39
|
+
return /* @__PURE__ */ jsxs(
|
|
39
40
|
"select",
|
|
40
41
|
{
|
|
41
42
|
id: fieldId,
|
|
42
43
|
className: `${FIELD} rounded-md border border-input bg-background px-2`,
|
|
43
44
|
value: typeof value === "string" ? value : "",
|
|
44
45
|
disabled,
|
|
45
|
-
onChange: (event) => onChange(event.target.value === "" ? void 0 : event.target.value)
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
46
|
+
onChange: (event) => onChange(event.target.value === "" ? void 0 : event.target.value),
|
|
47
|
+
children: [
|
|
48
|
+
/* @__PURE__ */ jsx("option", { value: "", children: "Default" }),
|
|
49
|
+
(control.enum ?? []).map((option) => /* @__PURE__ */ jsx("option", { value: option, children: option }, option))
|
|
50
|
+
]
|
|
51
|
+
}
|
|
49
52
|
);
|
|
50
53
|
case "number":
|
|
51
54
|
case "integer":
|
|
52
|
-
return /* @__PURE__ */
|
|
55
|
+
return /* @__PURE__ */ jsx(
|
|
53
56
|
Input,
|
|
54
57
|
{
|
|
55
58
|
id: fieldId,
|
|
@@ -69,7 +72,7 @@ function DefaultSettingControlInput({ settingKey, control, value, onChange, disa
|
|
|
69
72
|
}
|
|
70
73
|
);
|
|
71
74
|
case "string":
|
|
72
|
-
return /* @__PURE__ */
|
|
75
|
+
return /* @__PURE__ */ jsx(
|
|
73
76
|
Input,
|
|
74
77
|
{
|
|
75
78
|
id: fieldId,
|
|
@@ -80,7 +83,7 @@ function DefaultSettingControlInput({ settingKey, control, value, onChange, disa
|
|
|
80
83
|
}
|
|
81
84
|
);
|
|
82
85
|
default:
|
|
83
|
-
return /* @__PURE__ */
|
|
86
|
+
return /* @__PURE__ */ jsx(JsonField, { id: fieldId, value, disabled, onChange });
|
|
84
87
|
}
|
|
85
88
|
}
|
|
86
89
|
export {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
3
|
import { useState } from "react";
|
|
3
4
|
import { Button } from "@ai-matrx/design-system/controls";
|
|
4
5
|
function DefaultWindowPanel({
|
|
@@ -30,21 +31,35 @@ function DefaultWindowPanel({
|
|
|
30
31
|
maxWidth: "calc(100vw - 16px)",
|
|
31
32
|
maxHeight: "calc(100vh - 16px)"
|
|
32
33
|
};
|
|
33
|
-
return /* @__PURE__ */
|
|
34
|
+
return /* @__PURE__ */ jsxs(
|
|
34
35
|
"div",
|
|
35
36
|
{
|
|
36
37
|
role: "dialog",
|
|
37
38
|
"aria-label": title,
|
|
38
39
|
"data-chat-slot-fallback": "WindowPanel",
|
|
39
40
|
style,
|
|
40
|
-
className: "flex flex-col overflow-hidden rounded-lg border bg-background shadow-xl"
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
41
|
+
className: "flex flex-col overflow-hidden rounded-lg border bg-background shadow-xl",
|
|
42
|
+
children: [
|
|
43
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-2 border-b px-3 py-1.5 text-sm font-medium", children: [
|
|
44
|
+
/* @__PURE__ */ jsx("div", { className: "min-w-0 truncate", children: titleNode ?? title }),
|
|
45
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1", children: [
|
|
46
|
+
actionsRight,
|
|
47
|
+
/* @__PURE__ */ jsx(Button, { variant: "quiet", "aria-label": "Close", onClick: () => {
|
|
48
|
+
setOpen(false);
|
|
49
|
+
onClose?.();
|
|
50
|
+
}, children: "\xD7" })
|
|
51
|
+
] })
|
|
52
|
+
] }),
|
|
53
|
+
/* @__PURE__ */ jsxs("div", { className: "flex min-h-0 flex-1", children: [
|
|
54
|
+
sidebar ? /* @__PURE__ */ jsx("div", { className: "w-56 shrink-0 overflow-auto border-r", children: sidebar }) : null,
|
|
55
|
+
/* @__PURE__ */ jsx("div", { className: `min-h-0 min-w-0 flex-1 overflow-auto ${bodyClassName ?? ""}`, children })
|
|
56
|
+
] }),
|
|
57
|
+
footerLeft || footerRight ? /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between border-t px-3 py-1.5", children: [
|
|
58
|
+
/* @__PURE__ */ jsx("div", { children: footerLeft }),
|
|
59
|
+
/* @__PURE__ */ jsx("div", { children: footerRight })
|
|
60
|
+
] }) : null
|
|
61
|
+
]
|
|
62
|
+
}
|
|
48
63
|
);
|
|
49
64
|
}
|
|
50
65
|
function DefaultFullScreenOverlay({
|
|
@@ -58,19 +73,25 @@ function DefaultFullScreenOverlay({
|
|
|
58
73
|
const [active, setActive] = useState(initialTab ?? tabs[0]?.id);
|
|
59
74
|
if (!isOpen) return null;
|
|
60
75
|
const current = tabs.find((t) => t.id === active) ?? tabs[0];
|
|
61
|
-
return /* @__PURE__ */
|
|
76
|
+
return /* @__PURE__ */ jsxs(
|
|
62
77
|
"div",
|
|
63
78
|
{
|
|
64
79
|
role: "dialog",
|
|
65
80
|
"aria-label": title,
|
|
66
81
|
"data-chat-slot-fallback": "FullScreenOverlay",
|
|
67
|
-
className: "fixed inset-0 z-[70] flex flex-col bg-background"
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
82
|
+
className: "fixed inset-0 z-[70] flex flex-col bg-background",
|
|
83
|
+
children: [
|
|
84
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 border-b px-3 py-2 text-sm", children: [
|
|
85
|
+
/* @__PURE__ */ jsx("span", { className: "font-medium", children: title }),
|
|
86
|
+
tabs.map((t) => /* @__PURE__ */ jsx(Button, { variant: "quiet", pressed: t.id === current?.id, onClick: () => {
|
|
87
|
+
setActive(t.id);
|
|
88
|
+
onTabChange?.(t.id);
|
|
89
|
+
}, children: t.label }, t.id)),
|
|
90
|
+
/* @__PURE__ */ jsx(Button, { variant: "quiet", "aria-label": "Close", onClick: onClose, className: "ml-auto", children: "\xD7" })
|
|
91
|
+
] }),
|
|
92
|
+
/* @__PURE__ */ jsx("div", { className: `min-h-0 flex-1 overflow-auto ${current?.className ?? ""}`, children: current?.content })
|
|
93
|
+
]
|
|
94
|
+
}
|
|
74
95
|
);
|
|
75
96
|
}
|
|
76
97
|
export {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
3
|
import { useEffect, useMemo, useState, useSyncExternalStore } from "react";
|
|
3
4
|
import { useChatHost } from "../react.js";
|
|
4
5
|
import { chatHostHasDatabase } from "../configure.js";
|
|
@@ -8,8 +9,8 @@ const CHUNK = 100;
|
|
|
8
9
|
function DefaultWorkspaceGate({ blocked, sentence, description, children, className }) {
|
|
9
10
|
const host = useChatHost();
|
|
10
11
|
const active = useSyncExternalStore(host.org.subscribe, host.org.active, () => null);
|
|
11
|
-
if (!blocked || active || !host.org.choose || !chatHostHasDatabase()) return /* @__PURE__ */
|
|
12
|
-
return /* @__PURE__ */
|
|
12
|
+
if (!blocked || active || !host.org.choose || !chatHostHasDatabase()) return /* @__PURE__ */ jsx(Fragment, { children });
|
|
13
|
+
return /* @__PURE__ */ jsx(WorkspacePicker, { sentence, description, className });
|
|
13
14
|
}
|
|
14
15
|
function WorkspacePicker({ sentence, description, className }) {
|
|
15
16
|
const host = useChatHost();
|
|
@@ -54,24 +55,34 @@ function WorkspacePicker({ sentence, description, className }) {
|
|
|
54
55
|
host.org.choose?.(org);
|
|
55
56
|
invalidateMandateCache();
|
|
56
57
|
};
|
|
57
|
-
return /* @__PURE__ */
|
|
58
|
-
"
|
|
59
|
-
{
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
58
|
+
return /* @__PURE__ */ jsx("div", { "data-testid": "workspace-gate", className: className ?? "flex h-full min-h-0 w-full flex-col items-center overflow-y-auto p-6", children: /* @__PURE__ */ jsxs("div", { className: "w-full max-w-sm space-y-2", children: [
|
|
59
|
+
/* @__PURE__ */ jsx("p", { className: "text-sm font-medium", children: sentence }),
|
|
60
|
+
description ? /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground", children: description }) : null,
|
|
61
|
+
error ? /* @__PURE__ */ jsxs("p", { className: "text-xs text-destructive", children: [
|
|
62
|
+
"Couldn't list your organizations: ",
|
|
63
|
+
error
|
|
64
|
+
] }) : orgs === null ? /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground", children: "Loading your organizations\u2026" }) : orgs.length === 0 ? /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground", children: "You are not a member of any organization." }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
65
|
+
orgs.length > 8 ? /* @__PURE__ */ jsx(
|
|
66
|
+
"input",
|
|
67
|
+
{
|
|
68
|
+
value: filter,
|
|
69
|
+
onChange: (e) => setFilter(e.target.value),
|
|
70
|
+
placeholder: "Find an organization",
|
|
71
|
+
className: "w-full rounded-md border border-border bg-background px-2 py-1 text-sm"
|
|
72
|
+
}
|
|
73
|
+
) : null,
|
|
74
|
+
/* @__PURE__ */ jsx("ul", { className: "divide-y divide-border rounded-md border border-border", children: shown.map((org) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(
|
|
75
|
+
"button",
|
|
76
|
+
{
|
|
77
|
+
type: "button",
|
|
78
|
+
"data-workspace-choice": org.id,
|
|
79
|
+
onClick: () => choose(org),
|
|
80
|
+
className: "w-full px-3 py-2 text-left text-sm hover:bg-muted",
|
|
81
|
+
children: org.name ?? org.id
|
|
82
|
+
}
|
|
83
|
+
) }, org.id)) })
|
|
84
|
+
] })
|
|
85
|
+
] }) });
|
|
75
86
|
}
|
|
76
87
|
export {
|
|
77
88
|
DefaultWorkspaceGate
|
package/dist/host/navigation.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
3
|
import { getChatHost, isChatHostConfigured } from "./configure.js";
|
|
3
4
|
import { createWindowNavigation } from "./defaults/navigation.js";
|
|
4
5
|
import { useMaybeChatHost } from "./react.js";
|
|
@@ -25,7 +26,7 @@ function useSearchParams() {
|
|
|
25
26
|
}
|
|
26
27
|
function Link(props) {
|
|
27
28
|
const { Link: HostLink } = useChatNavigation();
|
|
28
|
-
return /* @__PURE__ */
|
|
29
|
+
return /* @__PURE__ */ jsx(HostLink, { ...props });
|
|
29
30
|
}
|
|
30
31
|
export {
|
|
31
32
|
Link,
|
package/dist/host/react.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
3
|
import { createContext, useContext, useState } from "react";
|
|
3
4
|
import { Provider, ReactReduxContext } from "react-redux";
|
|
4
5
|
import { configureChat, resolveChatHost } from "./configure.js";
|
|
@@ -41,8 +42,8 @@ function ChatProvider({ host, store, children }) {
|
|
|
41
42
|
if (typeof window !== "undefined") setStoreSingleton(chatStore);
|
|
42
43
|
useChatHostSync(chatStore, resolved);
|
|
43
44
|
const outerAlchemy = useOptionalAlchemyActions();
|
|
44
|
-
const body = privateStore ? /* @__PURE__ */
|
|
45
|
-
return /* @__PURE__ */
|
|
45
|
+
const body = privateStore ? /* @__PURE__ */ jsx(BareHostChrome, { host: resolved, children }) : children;
|
|
46
|
+
return /* @__PURE__ */ jsx(ChatHostContext.Provider, { value: resolved, children: /* @__PURE__ */ jsx(Provider, { store: chatStore, context: ChatStoreContext, serverState, children: outerAlchemy ? body : /* @__PURE__ */ jsx(AlchemyActionsProvider, { ports: BARE_ALCHEMY_PORTS, children: body }) }) });
|
|
46
47
|
}
|
|
47
48
|
const BARE_ALCHEMY_PORTS = {
|
|
48
49
|
diagnostics: {
|
package/dist/host/ui-slots.d.ts
CHANGED
|
@@ -283,7 +283,8 @@ export interface ChatUiSlots {
|
|
|
283
283
|
createSandboxFilesystemAdapter: AnyFn;
|
|
284
284
|
notesGetById: AnyFn;
|
|
285
285
|
createHtmlPage: AnyFn;
|
|
286
|
-
|
|
286
|
+
/** May answer with a promise: a host loads its markdown renderer on first use (0.5.2). */
|
|
287
|
+
convertMarkdownToHtml: (markdown: string) => string | Promise<string>;
|
|
287
288
|
sklActions: Record<string, AnyFn>;
|
|
288
289
|
selectAllContentBlocksArray: AnyFn;
|
|
289
290
|
selectContentBlocksByScope: AnyFn;
|
|
@@ -692,7 +693,7 @@ export declare const canvasGetById: (canvasId: string) => Promise<CanvasItemRow
|
|
|
692
693
|
export declare const createSandboxFilesystemAdapter: AnyFn;
|
|
693
694
|
export declare const notesGetById: AnyFn;
|
|
694
695
|
export declare const createHtmlPage: AnyFn;
|
|
695
|
-
export declare const convertMarkdownToHtml:
|
|
696
|
+
export declare const convertMarkdownToHtml: (markdown: string) => string | Promise<string>;
|
|
696
697
|
/** The host's skill-library action creators (`sklActions.x(...)`); resolved at call time, a bare host throws naming the slot. */
|
|
697
698
|
export declare const sklActions: Record<string, AnyFn>;
|
|
698
699
|
export declare const selectAllContentBlocksArray: AnyFn;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
3
|
import { AlertTriangle } from "lucide-react";
|
|
3
4
|
import { Badge } from "@ai-matrx/design-system";
|
|
4
5
|
import { ServerNotes } from "../host/ui-slots.js";
|
|
@@ -11,25 +12,35 @@ function RunFailureCard({
|
|
|
11
12
|
failure,
|
|
12
13
|
testId = "mandate-run-failure"
|
|
13
14
|
}) {
|
|
14
|
-
return /* @__PURE__ */
|
|
15
|
+
return /* @__PURE__ */ jsxs(
|
|
15
16
|
"div",
|
|
16
17
|
{
|
|
17
18
|
"data-testid": testId,
|
|
18
|
-
className: "space-y-2 rounded-lg border border-destructive/60 bg-destructive/5 p-3"
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
19
|
+
className: "space-y-2 rounded-lg border border-destructive/60 bg-destructive/5 p-3",
|
|
20
|
+
children: [
|
|
21
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-1.5 text-[12px]", children: [
|
|
22
|
+
/* @__PURE__ */ jsx(AlertTriangle, { className: "h-3.5 w-3.5 text-destructive" }),
|
|
23
|
+
/* @__PURE__ */ jsx("span", { className: "font-semibold text-foreground", children: mandateRefusalHeadline(failure) }),
|
|
24
|
+
failure.status != null ? /* @__PURE__ */ jsx(Badge, { variant: "destructive", className: "py-0 font-mono text-[10px]", children: failure.status }) : null,
|
|
25
|
+
failure.code ? /* @__PURE__ */ jsx(Badge, { variant: "outline", className: "py-0 font-mono text-[10px]", children: failure.code }) : null
|
|
26
|
+
] }),
|
|
27
|
+
/* @__PURE__ */ jsx("pre", { className: "max-h-56 overflow-auto whitespace-pre-wrap break-words rounded bg-destructive/10 p-2 text-[11.5px] text-destructive-ink", children: /* @__PURE__ */ jsx(TextWithDoors, { text: failure.sentence }) }),
|
|
28
|
+
failure.status == null ? /* @__PURE__ */ jsx("p", { className: "text-[11.5px] text-muted-foreground", children: "Nothing ran or was charged; check your connection and retry." }) : null,
|
|
29
|
+
/* @__PURE__ */ jsx(
|
|
30
|
+
ServerNotes,
|
|
31
|
+
{
|
|
32
|
+
heading: "What the server also said",
|
|
33
|
+
notes: failure.notes,
|
|
34
|
+
testId: `${testId}-notes`
|
|
35
|
+
}
|
|
36
|
+
),
|
|
37
|
+
failure.requestId ? /* @__PURE__ */ jsxs("p", { className: "font-mono text-[10px] text-muted-foreground", children: [
|
|
38
|
+
"request ",
|
|
39
|
+
failure.requestId
|
|
40
|
+
] }) : null,
|
|
41
|
+
/* @__PURE__ */ jsx(ErrorAlchemyMenu, { error: failure.status })
|
|
42
|
+
]
|
|
43
|
+
}
|
|
33
44
|
);
|
|
34
45
|
}
|
|
35
46
|
export {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
import { Chip, ChipSet, Button } from "@ai-matrx/design-system/controls";
|
|
4
4
|
import {
|
|
5
5
|
BarChart,
|
|
@@ -14,14 +14,14 @@ import {
|
|
|
14
14
|
} from "lucide-react";
|
|
15
15
|
import { useResponseModeAgents } from "../../cx-chat/components/agent/useResponseModeAgents.js";
|
|
16
16
|
const RESPONSE_MODE_ICONS = {
|
|
17
|
-
text: /* @__PURE__ */
|
|
18
|
-
images: /* @__PURE__ */
|
|
19
|
-
videos: /* @__PURE__ */
|
|
20
|
-
research: /* @__PURE__ */
|
|
21
|
-
brainstorm: /* @__PURE__ */
|
|
22
|
-
data: /* @__PURE__ */
|
|
23
|
-
recipe: /* @__PURE__ */
|
|
24
|
-
code: /* @__PURE__ */
|
|
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
25
|
};
|
|
26
26
|
const RESPONSE_MODE_LABELS = {
|
|
27
27
|
text: "Text",
|
|
@@ -40,39 +40,39 @@ function ResponseModeButtons({
|
|
|
40
40
|
}) {
|
|
41
41
|
const { modes, modeForAgent } = useResponseModeAgents();
|
|
42
42
|
const activeMode = selectedAgentId ? modeForAgent(selectedAgentId) : "text";
|
|
43
|
-
return /* @__PURE__ */
|
|
43
|
+
return /* @__PURE__ */ jsx(ChipSet, { className: "justify-center", children: modes.map((entry) => {
|
|
44
44
|
const isActive = activeMode === entry.mode;
|
|
45
45
|
const isMapped = entry.agentId !== null;
|
|
46
46
|
const unresolved = entry.mandateKey !== null && entry.error !== null;
|
|
47
|
-
return /* @__PURE__ */
|
|
47
|
+
return /* @__PURE__ */ jsx(
|
|
48
48
|
Chip,
|
|
49
49
|
{
|
|
50
|
-
key: entry.mode,
|
|
51
50
|
asChild: true,
|
|
52
51
|
pressed: isActive,
|
|
53
52
|
label: RESPONSE_MODE_LABELS[entry.mode],
|
|
54
53
|
icon: RESPONSE_MODE_ICONS[entry.mode],
|
|
55
|
-
title: unresolved ? `Not available yet \u2014 no agent is assigned (${entry.mandateKey})` : void 0
|
|
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
|
+
)
|
|
56
66
|
},
|
|
57
|
-
|
|
58
|
-
"button",
|
|
59
|
-
{
|
|
60
|
-
type: "button",
|
|
61
|
-
onClick: () => {
|
|
62
|
-
if (disabled || !entry.agentId) return;
|
|
63
|
-
onModeSelect?.(entry.mode, entry.agentId);
|
|
64
|
-
},
|
|
65
|
-
disabled: disabled || !isMapped
|
|
66
|
-
}
|
|
67
|
-
)
|
|
67
|
+
entry.mode
|
|
68
68
|
);
|
|
69
|
-
}));
|
|
69
|
+
}) });
|
|
70
70
|
}
|
|
71
71
|
function BackToStartButton({
|
|
72
72
|
onBack,
|
|
73
73
|
agentName
|
|
74
74
|
}) {
|
|
75
|
-
return /* @__PURE__ */
|
|
75
|
+
return /* @__PURE__ */ jsx(Button, { variant: "quiet", icon: /* @__PURE__ */ jsx(ChevronLeft, {}), onClick: onBack, title: "Back to agent selection", children: agentName || "Back" });
|
|
76
76
|
}
|
|
77
77
|
export {
|
|
78
78
|
BackToStartButton,
|