@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,6 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import
|
|
2
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import {
|
|
3
4
|
useCallback,
|
|
4
5
|
useEffect,
|
|
5
6
|
useMemo,
|
|
@@ -335,9 +336,9 @@ function useConversationHistoryController(props) {
|
|
|
335
336
|
const ConversationHistorySidebar = (props) => {
|
|
336
337
|
const ctl = useConversationHistoryController(props);
|
|
337
338
|
if (props.variant === "consumer") {
|
|
338
|
-
return /* @__PURE__ */
|
|
339
|
+
return /* @__PURE__ */ jsx(ConsumerView, { ctl, ...props });
|
|
339
340
|
}
|
|
340
|
-
return /* @__PURE__ */
|
|
341
|
+
return /* @__PURE__ */ jsx(DenseView, { ctl, ...props });
|
|
341
342
|
};
|
|
342
343
|
const DenseView = ({
|
|
343
344
|
ctl,
|
|
@@ -386,181 +387,218 @@ const DenseView = ({
|
|
|
386
387
|
) : cachedSearchItems;
|
|
387
388
|
const empty = !allLanesOff && status !== "loading" && status !== "idle" && !error && count === 0 && !searchTerm.trim() && emptyState;
|
|
388
389
|
const showControls = showSearch || showGroupingToggle || !!headerActions || !!surfaceId;
|
|
389
|
-
return /* @__PURE__ */
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
className: "
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
390
|
+
return /* @__PURE__ */ jsxs("div", { className: cn("flex h-full min-h-0 flex-col", className), children: [
|
|
391
|
+
headerSlot,
|
|
392
|
+
topSlot,
|
|
393
|
+
showControls && /* @__PURE__ */ jsxs("div", { className: "flex shrink-0 items-center gap-1 border-b border-border px-2 py-1", children: [
|
|
394
|
+
showSearch && /* @__PURE__ */ jsxs("div", { className: "relative flex min-w-0 flex-1 items-center", children: [
|
|
395
|
+
/* @__PURE__ */ jsx(
|
|
396
|
+
Search,
|
|
397
|
+
{
|
|
398
|
+
size: 12,
|
|
399
|
+
className: "absolute left-1.5 text-muted-foreground",
|
|
400
|
+
"aria-hidden": true
|
|
401
|
+
}
|
|
402
|
+
),
|
|
403
|
+
/* @__PURE__ */ jsx(
|
|
404
|
+
"input",
|
|
405
|
+
{
|
|
406
|
+
type: "search",
|
|
407
|
+
value: searchTerm,
|
|
408
|
+
onChange: (e) => onSearchChange(e.target.value),
|
|
409
|
+
placeholder: "Search conversations",
|
|
410
|
+
className: cn(
|
|
411
|
+
"h-6 w-full rounded-sm border border-border bg-background pl-5 pr-1.5 text-[11px] text-foreground placeholder:text-muted-foreground focus:border-ring focus:outline-none",
|
|
412
|
+
searchInputClassName
|
|
413
|
+
),
|
|
414
|
+
"aria-label": "Search conversations"
|
|
415
|
+
}
|
|
416
|
+
)
|
|
417
|
+
] }),
|
|
418
|
+
/* @__PURE__ */ jsxs("div", { className: "flex shrink-0 items-center", children: [
|
|
419
|
+
status === "loading" ? /* @__PURE__ */ jsx(
|
|
420
|
+
LoadingTapButton,
|
|
421
|
+
{
|
|
422
|
+
variant: "transparent",
|
|
423
|
+
disabled: true,
|
|
424
|
+
ariaLabel: "Refreshing conversations",
|
|
425
|
+
className: "text-muted-foreground",
|
|
426
|
+
tooltipSide: "bottom"
|
|
427
|
+
}
|
|
428
|
+
) : /* @__PURE__ */ jsx(
|
|
429
|
+
RefreshCwTapButton,
|
|
430
|
+
{
|
|
431
|
+
variant: "transparent",
|
|
432
|
+
onClick: onRefresh,
|
|
433
|
+
ariaLabel: "Refresh conversations",
|
|
434
|
+
className: "text-muted-foreground",
|
|
435
|
+
tooltipSide: "bottom"
|
|
436
|
+
}
|
|
437
|
+
),
|
|
438
|
+
surfaceId && /* @__PURE__ */ jsx(
|
|
439
|
+
ConversationSourceFilterTree,
|
|
440
|
+
{
|
|
441
|
+
scopeId,
|
|
442
|
+
triggerClassName: "ml-[3px]",
|
|
443
|
+
surfaceId,
|
|
444
|
+
align: "end"
|
|
445
|
+
}
|
|
446
|
+
),
|
|
447
|
+
showGroupingToggle && /* @__PURE__ */ jsx(GroupingToggle, { value: grouping, onChange: onGroupingChange }),
|
|
448
|
+
headerActions
|
|
449
|
+
] })
|
|
450
|
+
] }),
|
|
451
|
+
/* @__PURE__ */ jsxs("div", { className: "min-h-0 flex-1 overflow-y-auto", children: [
|
|
452
|
+
error && /* @__PURE__ */ jsx(ReadFailure, { error, what: "your conversations", onRetry: onRefresh, className: "m-2" }),
|
|
453
|
+
status === "loading" && count === 0 && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 px-3 py-3 text-[11px] text-muted-foreground", children: [
|
|
454
|
+
/* @__PURE__ */ jsx(Loader2, { size: 12, className: "animate-spin" }),
|
|
455
|
+
"Loading conversations\u2026"
|
|
456
|
+
] }),
|
|
457
|
+
allLanesOff && /* @__PURE__ */ jsx(AllLanesOffNotice, {}),
|
|
458
|
+
empty && /* @__PURE__ */ jsx("div", { className: "px-1 py-2", children: empty }),
|
|
459
|
+
searchActive && /* @__PURE__ */ jsx(
|
|
460
|
+
ConversationSearchStatus,
|
|
461
|
+
{
|
|
462
|
+
state: serverSearchState,
|
|
463
|
+
cachedCount: cachedSearchItems.length,
|
|
464
|
+
pageSize: ctl.scope.pageSize
|
|
465
|
+
}
|
|
406
466
|
),
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
)), /* @__PURE__ */ React.createElement("div", { className: "flex shrink-0 items-center" }, status === "loading" ? /* @__PURE__ */ React.createElement(
|
|
410
|
-
LoadingTapButton,
|
|
411
|
-
{
|
|
412
|
-
variant: "transparent",
|
|
413
|
-
disabled: true,
|
|
414
|
-
ariaLabel: "Refreshing conversations",
|
|
415
|
-
className: "text-muted-foreground",
|
|
416
|
-
tooltipSide: "bottom"
|
|
417
|
-
}
|
|
418
|
-
) : /* @__PURE__ */ React.createElement(
|
|
419
|
-
RefreshCwTapButton,
|
|
420
|
-
{
|
|
421
|
-
variant: "transparent",
|
|
422
|
-
onClick: onRefresh,
|
|
423
|
-
ariaLabel: "Refresh conversations",
|
|
424
|
-
className: "text-muted-foreground",
|
|
425
|
-
tooltipSide: "bottom"
|
|
426
|
-
}
|
|
427
|
-
), surfaceId && /* @__PURE__ */ React.createElement(
|
|
428
|
-
ConversationSourceFilterTree,
|
|
429
|
-
{
|
|
430
|
-
scopeId,
|
|
431
|
-
triggerClassName: "ml-[3px]",
|
|
432
|
-
surfaceId,
|
|
433
|
-
align: "end"
|
|
434
|
-
}
|
|
435
|
-
), showGroupingToggle && /* @__PURE__ */ React.createElement(GroupingToggle, { value: grouping, onChange: onGroupingChange }), headerActions)), /* @__PURE__ */ React.createElement("div", { className: "min-h-0 flex-1 overflow-y-auto" }, error && /* @__PURE__ */ React.createElement(ReadFailure, { error, what: "your conversations", onRetry: onRefresh, className: "m-2" }), status === "loading" && count === 0 && /* @__PURE__ */ React.createElement("div", { className: "flex items-center gap-2 px-3 py-3 text-[11px] text-muted-foreground" }, /* @__PURE__ */ React.createElement(Loader2, { size: 12, className: "animate-spin" }), "Loading conversations\u2026"), allLanesOff && /* @__PURE__ */ React.createElement(AllLanesOffNotice, null), empty && /* @__PURE__ */ React.createElement("div", { className: "px-1 py-2" }, empty), searchActive && /* @__PURE__ */ React.createElement(
|
|
436
|
-
ConversationSearchStatus,
|
|
437
|
-
{
|
|
438
|
-
state: serverSearchState,
|
|
439
|
-
cachedCount: cachedSearchItems.length,
|
|
440
|
-
pageSize: ctl.scope.pageSize
|
|
441
|
-
}
|
|
442
|
-
), searchActive && searchItems.length > 0 && /* @__PURE__ */ React.createElement(
|
|
443
|
-
Section,
|
|
444
|
-
{
|
|
445
|
-
id: "search",
|
|
446
|
-
label: hasAuthoritativeResults ? "Best matches" : "Loaded matches",
|
|
447
|
-
count: searchItems.length,
|
|
448
|
-
icon: /* @__PURE__ */ React.createElement(Search, { size: 11 }),
|
|
449
|
-
defaultOpen: true,
|
|
450
|
-
headerClassName: sectionHeaderClassName
|
|
451
|
-
},
|
|
452
|
-
searchItems.map((conv) => /* @__PURE__ */ React.createElement(
|
|
453
|
-
Row,
|
|
454
|
-
{
|
|
455
|
-
key: `search-${conv.conversationId}`,
|
|
456
|
-
conv,
|
|
457
|
-
active: conv.conversationId === activeConversationId,
|
|
458
|
-
onOpen: onOpenConversation,
|
|
459
|
-
openInPlace,
|
|
460
|
-
isFavorite: isFavoriteResolved(conv.conversationId),
|
|
461
|
-
onToggleFavorite: onToggleFavoriteResolved,
|
|
462
|
-
resolveHref,
|
|
463
|
-
surfaceKey,
|
|
464
|
-
getSourceMenuCtx
|
|
465
|
-
}
|
|
466
|
-
))
|
|
467
|
-
), favorites.length > 0 && !searchActive && /* @__PURE__ */ React.createElement(
|
|
468
|
-
Section,
|
|
469
|
-
{
|
|
470
|
-
id: "favorites",
|
|
471
|
-
label: "Favorites",
|
|
472
|
-
count: favorites.length,
|
|
473
|
-
icon: /* @__PURE__ */ React.createElement(Star, { size: 11, className: "text-amber-500" }),
|
|
474
|
-
defaultOpen: true,
|
|
475
|
-
headerClassName: sectionHeaderClassName
|
|
476
|
-
},
|
|
477
|
-
favorites.map((conv) => /* @__PURE__ */ React.createElement(
|
|
478
|
-
Row,
|
|
479
|
-
{
|
|
480
|
-
key: `fav-${conv.conversationId}`,
|
|
481
|
-
conv,
|
|
482
|
-
active: conv.conversationId === activeConversationId,
|
|
483
|
-
onOpen: onOpenConversation,
|
|
484
|
-
openInPlace,
|
|
485
|
-
isFavorite: isFavoriteResolved(conv.conversationId),
|
|
486
|
-
onToggleFavorite: onToggleFavoriteResolved,
|
|
487
|
-
resolveHref,
|
|
488
|
-
surfaceKey,
|
|
489
|
-
getSourceMenuCtx
|
|
490
|
-
}
|
|
491
|
-
))
|
|
492
|
-
), grouping === "date" && !searchActive && byDate.map((bucket) => /* @__PURE__ */ React.createElement(
|
|
493
|
-
Section,
|
|
494
|
-
{
|
|
495
|
-
key: bucket.key,
|
|
496
|
-
id: bucket.key,
|
|
497
|
-
label: bucket.label,
|
|
498
|
-
count: bucket.items.length,
|
|
499
|
-
icon: /* @__PURE__ */ React.createElement(CalendarDays, { size: 11 }),
|
|
500
|
-
defaultOpen: true,
|
|
501
|
-
headerClassName: sectionHeaderClassName
|
|
502
|
-
},
|
|
503
|
-
bucket.items.map((conv) => /* @__PURE__ */ React.createElement(
|
|
504
|
-
Row,
|
|
505
|
-
{
|
|
506
|
-
key: conv.conversationId,
|
|
507
|
-
conv,
|
|
508
|
-
active: conv.conversationId === activeConversationId,
|
|
509
|
-
onOpen: onOpenConversation,
|
|
510
|
-
openInPlace,
|
|
511
|
-
isFavorite: isFavoriteResolved(conv.conversationId),
|
|
512
|
-
onToggleFavorite: onToggleFavoriteResolved,
|
|
513
|
-
resolveHref,
|
|
514
|
-
surfaceKey,
|
|
515
|
-
getSourceMenuCtx
|
|
516
|
-
}
|
|
517
|
-
))
|
|
518
|
-
)), grouping === "agent" && !searchActive && byAgent.map((bucket) => /* @__PURE__ */ React.createElement(
|
|
519
|
-
Section,
|
|
520
|
-
{
|
|
521
|
-
key: bucket.agentId ?? "unknown",
|
|
522
|
-
id: bucket.agentId ?? "unknown",
|
|
523
|
-
label: bucket.label,
|
|
524
|
-
count: bucket.items.length,
|
|
525
|
-
icon: /* @__PURE__ */ React.createElement(Cpu, { size: 11 }),
|
|
526
|
-
defaultOpen: true,
|
|
527
|
-
headerClassName: sectionHeaderClassName,
|
|
528
|
-
action: bucket.agentId ? /* @__PURE__ */ React.createElement(
|
|
529
|
-
EntityDoorControls,
|
|
467
|
+
searchActive && searchItems.length > 0 && /* @__PURE__ */ jsx(
|
|
468
|
+
Section,
|
|
530
469
|
{
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
470
|
+
id: "search",
|
|
471
|
+
label: hasAuthoritativeResults ? "Best matches" : "Loaded matches",
|
|
472
|
+
count: searchItems.length,
|
|
473
|
+
icon: /* @__PURE__ */ jsx(Search, { size: 11 }),
|
|
474
|
+
defaultOpen: true,
|
|
475
|
+
headerClassName: sectionHeaderClassName,
|
|
476
|
+
children: searchItems.map((conv) => /* @__PURE__ */ jsx(
|
|
477
|
+
Row,
|
|
478
|
+
{
|
|
479
|
+
conv,
|
|
480
|
+
active: conv.conversationId === activeConversationId,
|
|
481
|
+
onOpen: onOpenConversation,
|
|
482
|
+
openInPlace,
|
|
483
|
+
isFavorite: isFavoriteResolved(conv.conversationId),
|
|
484
|
+
onToggleFavorite: onToggleFavoriteResolved,
|
|
485
|
+
resolveHref,
|
|
486
|
+
surfaceKey,
|
|
487
|
+
getSourceMenuCtx
|
|
488
|
+
},
|
|
489
|
+
`search-${conv.conversationId}`
|
|
490
|
+
))
|
|
534
491
|
}
|
|
535
|
-
)
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
492
|
+
),
|
|
493
|
+
favorites.length > 0 && !searchActive && /* @__PURE__ */ jsx(
|
|
494
|
+
Section,
|
|
495
|
+
{
|
|
496
|
+
id: "favorites",
|
|
497
|
+
label: "Favorites",
|
|
498
|
+
count: favorites.length,
|
|
499
|
+
icon: /* @__PURE__ */ jsx(Star, { size: 11, className: "text-amber-500" }),
|
|
500
|
+
defaultOpen: true,
|
|
501
|
+
headerClassName: sectionHeaderClassName,
|
|
502
|
+
children: favorites.map((conv) => /* @__PURE__ */ jsx(
|
|
503
|
+
Row,
|
|
504
|
+
{
|
|
505
|
+
conv,
|
|
506
|
+
active: conv.conversationId === activeConversationId,
|
|
507
|
+
onOpen: onOpenConversation,
|
|
508
|
+
openInPlace,
|
|
509
|
+
isFavorite: isFavoriteResolved(conv.conversationId),
|
|
510
|
+
onToggleFavorite: onToggleFavoriteResolved,
|
|
511
|
+
resolveHref,
|
|
512
|
+
surfaceKey,
|
|
513
|
+
getSourceMenuCtx
|
|
514
|
+
},
|
|
515
|
+
`fav-${conv.conversationId}`
|
|
516
|
+
))
|
|
517
|
+
}
|
|
518
|
+
),
|
|
519
|
+
grouping === "date" && !searchActive && byDate.map((bucket) => /* @__PURE__ */ jsx(
|
|
520
|
+
Section,
|
|
521
|
+
{
|
|
522
|
+
id: bucket.key,
|
|
523
|
+
label: bucket.label,
|
|
524
|
+
count: bucket.items.length,
|
|
525
|
+
icon: /* @__PURE__ */ jsx(CalendarDays, { size: 11 }),
|
|
526
|
+
defaultOpen: true,
|
|
527
|
+
headerClassName: sectionHeaderClassName,
|
|
528
|
+
children: bucket.items.map((conv) => /* @__PURE__ */ jsx(
|
|
529
|
+
Row,
|
|
530
|
+
{
|
|
531
|
+
conv,
|
|
532
|
+
active: conv.conversationId === activeConversationId,
|
|
533
|
+
onOpen: onOpenConversation,
|
|
534
|
+
openInPlace,
|
|
535
|
+
isFavorite: isFavoriteResolved(conv.conversationId),
|
|
536
|
+
onToggleFavorite: onToggleFavoriteResolved,
|
|
537
|
+
resolveHref,
|
|
538
|
+
surfaceKey,
|
|
539
|
+
getSourceMenuCtx
|
|
540
|
+
},
|
|
541
|
+
conv.conversationId
|
|
542
|
+
))
|
|
543
|
+
},
|
|
544
|
+
bucket.key
|
|
545
|
+
)),
|
|
546
|
+
grouping === "agent" && !searchActive && byAgent.map((bucket) => /* @__PURE__ */ jsx(
|
|
547
|
+
Section,
|
|
548
|
+
{
|
|
549
|
+
id: bucket.agentId ?? "unknown",
|
|
550
|
+
label: bucket.label,
|
|
551
|
+
count: bucket.items.length,
|
|
552
|
+
icon: /* @__PURE__ */ jsx(Cpu, { size: 11 }),
|
|
553
|
+
defaultOpen: true,
|
|
554
|
+
headerClassName: sectionHeaderClassName,
|
|
555
|
+
action: bucket.agentId ? /* @__PURE__ */ jsx(
|
|
556
|
+
EntityDoorControls,
|
|
557
|
+
{
|
|
558
|
+
token: "agent",
|
|
559
|
+
id: bucket.agentId,
|
|
560
|
+
name: bucket.label
|
|
561
|
+
}
|
|
562
|
+
) : void 0,
|
|
563
|
+
children: bucket.items.map((conv) => /* @__PURE__ */ jsx(
|
|
564
|
+
Row,
|
|
565
|
+
{
|
|
566
|
+
conv,
|
|
567
|
+
active: conv.conversationId === activeConversationId,
|
|
568
|
+
onOpen: onOpenConversation,
|
|
569
|
+
openInPlace,
|
|
570
|
+
isFavorite: isFavoriteResolved(conv.conversationId),
|
|
571
|
+
onToggleFavorite: onToggleFavoriteResolved,
|
|
572
|
+
resolveHref,
|
|
573
|
+
surfaceKey,
|
|
574
|
+
getSourceMenuCtx,
|
|
575
|
+
showAgentHint: false
|
|
576
|
+
},
|
|
577
|
+
conv.conversationId
|
|
578
|
+
))
|
|
579
|
+
},
|
|
580
|
+
bucket.agentId ?? "unknown"
|
|
581
|
+
)),
|
|
582
|
+
hasMore && !searchActive && /* @__PURE__ */ jsx("div", { className: "px-2 py-2", children: /* @__PURE__ */ jsx(
|
|
583
|
+
Button,
|
|
584
|
+
{
|
|
585
|
+
variant: "outline",
|
|
586
|
+
onClick: onLoadMore,
|
|
587
|
+
disabled: status === "loading-more",
|
|
588
|
+
icon: status === "loading-more" ? /* @__PURE__ */ jsx(Loader2, { className: "animate-spin" }) : void 0,
|
|
589
|
+
className: "w-full",
|
|
590
|
+
children: status === "loading-more" ? "Loading\u2026" : "Load more"
|
|
591
|
+
}
|
|
592
|
+
) }),
|
|
593
|
+
!hasMore && count > 0 && !searchActive && /* @__PURE__ */ jsxs("div", { className: "px-3 py-2 text-center text-[10px] text-muted-foreground", children: [
|
|
594
|
+
count,
|
|
595
|
+
" conversation",
|
|
596
|
+
count === 1 ? "" : "s"
|
|
597
|
+
] })
|
|
598
|
+
] }),
|
|
599
|
+
/* @__PURE__ */ jsx(ConversationArchivedToggle, { ctl }),
|
|
600
|
+
/* @__PURE__ */ jsx(ConversationTrashSection, { variant: "dense" })
|
|
601
|
+
] });
|
|
564
602
|
};
|
|
565
603
|
const ConsumerView = ({
|
|
566
604
|
ctl,
|
|
@@ -619,129 +657,153 @@ const ConsumerView = ({
|
|
|
619
657
|
setSearchOpen(false);
|
|
620
658
|
dispatch(setScopeSearch({ scopeId, searchTerm: "" }));
|
|
621
659
|
}, [dispatch, scopeId]);
|
|
622
|
-
return /* @__PURE__ */
|
|
660
|
+
return /* @__PURE__ */ jsxs(
|
|
623
661
|
"div",
|
|
624
662
|
{
|
|
625
663
|
className: cn(
|
|
626
664
|
"matrx-touch-targets flex h-full min-h-0 flex-col bg-card",
|
|
627
665
|
className
|
|
628
|
-
)
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
666
|
+
),
|
|
667
|
+
children: [
|
|
668
|
+
headerSlot,
|
|
669
|
+
surfaceId && /* @__PURE__ */ jsxs("div", { className: "flex h-8 shrink-0 items-center gap-1 px-2", children: [
|
|
670
|
+
/* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 truncate text-[11px] font-semibold uppercase tracking-wide text-muted-foreground/70", children: historyLabel }),
|
|
671
|
+
/* @__PURE__ */ jsxs("div", { className: "flex shrink-0 items-center", children: [
|
|
672
|
+
status === "loading" ? /* @__PURE__ */ jsx(
|
|
673
|
+
LoadingTapButton,
|
|
674
|
+
{
|
|
675
|
+
variant: "transparent",
|
|
676
|
+
disabled: true,
|
|
677
|
+
ariaLabel: "Refreshing conversations",
|
|
678
|
+
className: "text-muted-foreground",
|
|
679
|
+
tooltipSide: "bottom"
|
|
680
|
+
}
|
|
681
|
+
) : /* @__PURE__ */ jsx(
|
|
682
|
+
RefreshCwTapButton,
|
|
683
|
+
{
|
|
684
|
+
variant: "transparent",
|
|
685
|
+
onClick: onRefresh,
|
|
686
|
+
ariaLabel: "Refresh conversations",
|
|
687
|
+
className: "text-muted-foreground",
|
|
688
|
+
tooltipSide: "bottom"
|
|
689
|
+
}
|
|
690
|
+
),
|
|
691
|
+
/* @__PURE__ */ jsx(
|
|
692
|
+
ConversationSourceFilterTree,
|
|
693
|
+
{
|
|
694
|
+
scopeId,
|
|
695
|
+
triggerClassName: "ml-[3px]",
|
|
696
|
+
surfaceId,
|
|
697
|
+
align: "end"
|
|
698
|
+
}
|
|
699
|
+
)
|
|
700
|
+
] })
|
|
701
|
+
] }),
|
|
702
|
+
!hideSearchAffordance && /* @__PURE__ */ jsx("div", { className: "flex shrink-0 items-center gap-1 px-1 pb-1", children: searchOpen ? /* @__PURE__ */ jsxs("div", { className: "relative flex flex-1 items-center", children: [
|
|
703
|
+
/* @__PURE__ */ jsx(Search, { className: "absolute left-2.5 h-3.5 w-3.5 text-muted-foreground" }),
|
|
704
|
+
/* @__PURE__ */ jsx(
|
|
705
|
+
"input",
|
|
706
|
+
{
|
|
707
|
+
ref: searchInputRef,
|
|
708
|
+
type: "search",
|
|
709
|
+
value: searchTerm,
|
|
710
|
+
onChange: (e) => onSearchChange(e.target.value),
|
|
711
|
+
onKeyDown: (e) => {
|
|
712
|
+
if (e.key === "Escape") closeSearch();
|
|
713
|
+
},
|
|
714
|
+
placeholder: "Search chats",
|
|
715
|
+
className: "h-8 w-full rounded-lg border border-border bg-background pl-8 pr-8 text-sm text-foreground placeholder:text-muted-foreground/70 outline-none focus:border-ring/40",
|
|
716
|
+
"aria-label": "Search conversations"
|
|
717
|
+
}
|
|
718
|
+
),
|
|
719
|
+
/* @__PURE__ */ jsx(Button, { variant: "quiet", icon: /* @__PURE__ */ jsx(X, {}), onClick: closeSearch, "aria-label": "Close search", className: "absolute right-1.5" })
|
|
720
|
+
] }) : /* @__PURE__ */ jsx(Button, { variant: "quiet", icon: /* @__PURE__ */ jsx(Search, {}), onClick: openSearch, "aria-label": "Search conversations", className: "flex-1", children: "Search chats" }) }),
|
|
721
|
+
topSlot,
|
|
722
|
+
/* @__PURE__ */ jsxs("div", { className: "min-h-0 flex-1 overflow-y-auto pt-1", children: [
|
|
723
|
+
error && !searchActive && /* @__PURE__ */ jsx(ReadFailure, { error, what: "your conversations", onRetry: onRefresh, className: "m-2" }),
|
|
724
|
+
status === "loading" && count === 0 && !searchActive && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 px-3 py-3 text-xs text-muted-foreground", children: [
|
|
725
|
+
/* @__PURE__ */ jsx(Loader2, { className: "h-3 w-3 animate-spin" }),
|
|
726
|
+
"Loading conversations\u2026"
|
|
727
|
+
] }),
|
|
728
|
+
allLanesOff ? /* @__PURE__ */ jsx(AllLanesOffNotice, {}) : status !== "loading" && status !== "idle" && !error && count === 0 && !searchActive && /* @__PURE__ */ jsx("div", { className: "px-3 py-6 text-center text-xs text-muted-foreground", children: "No conversations yet." }),
|
|
729
|
+
searchActive && !allLanesOff && /* @__PURE__ */ jsx(
|
|
730
|
+
ConversationSearchStatus,
|
|
731
|
+
{
|
|
732
|
+
state: serverSearchState,
|
|
733
|
+
cachedCount: cachedSearchItems.length,
|
|
734
|
+
pageSize
|
|
735
|
+
}
|
|
736
|
+
),
|
|
737
|
+
searchActive && !allLanesOff && searchItems.length > 0 && /* @__PURE__ */ jsx(
|
|
738
|
+
ConsumerSection,
|
|
739
|
+
{
|
|
740
|
+
label: hasAuthoritativeResults ? "Best matches" : "Matches in loaded chats",
|
|
741
|
+
children: searchItems.map((conv) => /* @__PURE__ */ jsx(
|
|
742
|
+
ConsumerRow,
|
|
743
|
+
{
|
|
744
|
+
conv,
|
|
745
|
+
active: conv.conversationId === activeConversationId,
|
|
746
|
+
onOpen: onOpenConversation,
|
|
747
|
+
openInPlace,
|
|
748
|
+
resolveHref,
|
|
749
|
+
getSourceMenuCtx,
|
|
750
|
+
onMutationSuccess: serverSearchState.retry
|
|
751
|
+
},
|
|
752
|
+
conv.conversationId
|
|
753
|
+
))
|
|
754
|
+
}
|
|
755
|
+
),
|
|
756
|
+
favorites.length > 0 && !searchActive && /* @__PURE__ */ jsx(
|
|
757
|
+
PinnedChatsSection,
|
|
758
|
+
{
|
|
759
|
+
pinned: favorites,
|
|
760
|
+
activeConversationId,
|
|
761
|
+
onOpen: onOpenConversation,
|
|
762
|
+
openInPlace,
|
|
763
|
+
resolveHref,
|
|
764
|
+
getSourceMenuCtx
|
|
765
|
+
}
|
|
766
|
+
),
|
|
767
|
+
!searchActive && byDate.map((bucket) => {
|
|
768
|
+
const items = bucket.items.filter(
|
|
769
|
+
(conv) => !favoriteIds.has(conv.conversationId)
|
|
770
|
+
);
|
|
771
|
+
if (items.length === 0) return null;
|
|
772
|
+
return /* @__PURE__ */ jsx(ConsumerSection, { label: bucket.label, children: items.map((conv) => /* @__PURE__ */ jsx(
|
|
773
|
+
ConsumerRow,
|
|
774
|
+
{
|
|
775
|
+
conv,
|
|
776
|
+
active: conv.conversationId === activeConversationId,
|
|
777
|
+
onOpen: onOpenConversation,
|
|
778
|
+
openInPlace,
|
|
779
|
+
resolveHref,
|
|
780
|
+
getSourceMenuCtx
|
|
781
|
+
},
|
|
782
|
+
conv.conversationId
|
|
783
|
+
)) }, bucket.key);
|
|
784
|
+
}),
|
|
785
|
+
hasMore && !searchActive && /* @__PURE__ */ jsx("div", { className: "px-3 py-2", children: /* @__PURE__ */ jsx(
|
|
786
|
+
Button,
|
|
787
|
+
{
|
|
788
|
+
variant: "quiet",
|
|
789
|
+
onClick: onLoadMore,
|
|
790
|
+
disabled: status === "loading-more",
|
|
791
|
+
icon: status === "loading-more" ? /* @__PURE__ */ jsx(Loader2, { className: "animate-spin" }) : void 0,
|
|
792
|
+
className: "w-full",
|
|
793
|
+
children: status === "loading-more" ? "Loading\u2026" : "Load more"
|
|
794
|
+
}
|
|
795
|
+
) })
|
|
796
|
+
] }),
|
|
797
|
+
/* @__PURE__ */ jsx(ConversationArchivedToggle, { ctl }),
|
|
798
|
+
/* @__PURE__ */ jsx(ConversationTrashSection, { variant: "consumer" })
|
|
799
|
+
]
|
|
800
|
+
}
|
|
739
801
|
);
|
|
740
802
|
};
|
|
741
803
|
function ConversationArchivedToggle({ ctl }) {
|
|
742
804
|
const open = ctl.scope.archiveView === "archived";
|
|
743
805
|
const count = ctl.scope.archivedCount;
|
|
744
|
-
return /* @__PURE__ */
|
|
806
|
+
return /* @__PURE__ */ jsx(
|
|
745
807
|
ArchivedDisclosure,
|
|
746
808
|
{
|
|
747
809
|
count: count ?? 0,
|
|
@@ -753,15 +815,15 @@ function ConversationArchivedToggle({ ctl }) {
|
|
|
753
815
|
}
|
|
754
816
|
);
|
|
755
817
|
}
|
|
756
|
-
const GroupingToggle = ({ value, onChange }) => /* @__PURE__ */
|
|
818
|
+
const GroupingToggle = ({ value, onChange }) => /* @__PURE__ */ jsx(
|
|
757
819
|
SegmentedControl,
|
|
758
820
|
{
|
|
759
821
|
"aria-label": "Group conversations by",
|
|
760
822
|
value,
|
|
761
823
|
onValueChange: onChange,
|
|
762
824
|
data: [
|
|
763
|
-
{ value: "date", label: /* @__PURE__ */
|
|
764
|
-
{ value: "agent", label: /* @__PURE__ */
|
|
825
|
+
{ value: "date", label: /* @__PURE__ */ jsx(CalendarDays, {}), ariaLabel: "Group by date", title: "Group by date" },
|
|
826
|
+
{ value: "agent", label: /* @__PURE__ */ jsx(Cpu, {}), ariaLabel: "Group by agent", title: "Group by agent" }
|
|
765
827
|
]
|
|
766
828
|
}
|
|
767
829
|
);
|
|
@@ -775,38 +837,49 @@ const Section = ({
|
|
|
775
837
|
children
|
|
776
838
|
}) => {
|
|
777
839
|
const [open, setOpen] = useState(defaultOpen);
|
|
778
|
-
return /* @__PURE__ */
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
840
|
+
return /* @__PURE__ */ jsxs("div", { className: "mb-1", children: [
|
|
841
|
+
/* @__PURE__ */ jsxs(
|
|
842
|
+
"div",
|
|
843
|
+
{
|
|
844
|
+
className: cn(
|
|
845
|
+
"group/entity-ref sticky top-0 z-[1] flex w-full items-center bg-card",
|
|
846
|
+
headerClassName
|
|
847
|
+
),
|
|
848
|
+
children: [
|
|
849
|
+
/* @__PURE__ */ jsxs(Button, { variant: "quiet", icon: open ? /* @__PURE__ */ jsx(ChevronDown, { size: 10 }) : /* @__PURE__ */ jsx(ChevronRight, { size: 10 }), onClick: () => setOpen((v) => !v), className: "min-w-0", children: [
|
|
850
|
+
icon,
|
|
851
|
+
/* @__PURE__ */ jsx("span", { className: "truncate", children: label }),
|
|
852
|
+
/* @__PURE__ */ jsx("span", { className: "ml-auto shrink-0 text-muted-foreground", children: count })
|
|
853
|
+
] }),
|
|
854
|
+
action != null && /* @__PURE__ */ jsx("span", { className: "shrink-0 pr-1.5", children: action })
|
|
855
|
+
]
|
|
856
|
+
}
|
|
857
|
+
),
|
|
858
|
+
open && /* @__PURE__ */ jsx("div", { children })
|
|
859
|
+
] });
|
|
789
860
|
};
|
|
790
861
|
const StreamingDot = ({
|
|
791
862
|
conversationId
|
|
792
863
|
}) => {
|
|
793
864
|
const isStreaming = useAppSelector(selectIsStreaming(conversationId));
|
|
794
|
-
return /* @__PURE__ */
|
|
865
|
+
return /* @__PURE__ */ jsxs(
|
|
795
866
|
"span",
|
|
796
867
|
{
|
|
797
868
|
className: "relative flex h-2 w-2 shrink-0 items-center justify-center",
|
|
798
|
-
"aria-hidden": true
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
869
|
+
"aria-hidden": true,
|
|
870
|
+
children: [
|
|
871
|
+
isStreaming && /* @__PURE__ */ jsx("span", { className: "absolute inline-flex h-full w-full animate-ping rounded-full bg-primary opacity-60" }),
|
|
872
|
+
/* @__PURE__ */ jsx(
|
|
873
|
+
"span",
|
|
874
|
+
{
|
|
875
|
+
className: cn(
|
|
876
|
+
"relative inline-flex h-1.5 w-1.5 rounded-full transition-colors",
|
|
877
|
+
isStreaming ? "bg-primary" : "bg-muted-foreground/40"
|
|
878
|
+
)
|
|
879
|
+
}
|
|
807
880
|
)
|
|
808
|
-
|
|
809
|
-
|
|
881
|
+
]
|
|
882
|
+
}
|
|
810
883
|
);
|
|
811
884
|
};
|
|
812
885
|
const Row = ({
|
|
@@ -826,29 +899,36 @@ const Row = ({
|
|
|
826
899
|
const agentName = useAppSelector(
|
|
827
900
|
(s) => conv.agentId ? selectAgentById(s, conv.agentId)?.name ?? null : null
|
|
828
901
|
);
|
|
829
|
-
const star = onToggleFavorite ? /* @__PURE__ */
|
|
902
|
+
const star = onToggleFavorite ? /* @__PURE__ */ jsx(Button, { variant: "quiet", icon: isFavorite ? /* @__PURE__ */ jsx(Star, { fill: "currentColor" }) : /* @__PURE__ */ jsx(StarOff, {}), onClick: (e) => {
|
|
830
903
|
e.stopPropagation();
|
|
831
904
|
e.preventDefault();
|
|
832
905
|
onToggleFavorite(conv);
|
|
833
906
|
}, "aria-label": isFavorite ? "Remove from favorites" : "Add to favorites", title: isFavorite ? "Remove from favorites" : "Add to favorites" }) : null;
|
|
834
907
|
const meta = formatRelative(conv.updatedAt);
|
|
835
|
-
const originBadge = conv.originClass && conv.originClass !== "human" ? /* @__PURE__ */
|
|
908
|
+
const originBadge = conv.originClass && conv.originClass !== "human" ? /* @__PURE__ */ jsx(
|
|
836
909
|
"span",
|
|
837
910
|
{
|
|
838
911
|
className: "inline-flex h-4 shrink-0 items-center rounded-full border border-border px-1.5 text-[9px] font-medium text-muted-foreground",
|
|
839
|
-
title: `Started by: ${originClassLabel(conv.originClass)}
|
|
840
|
-
|
|
841
|
-
|
|
912
|
+
title: `Started by: ${originClassLabel(conv.originClass)}`,
|
|
913
|
+
children: originClassLabel(conv.originClass)
|
|
914
|
+
}
|
|
842
915
|
) : null;
|
|
843
|
-
const trailing = showAgentHint && conv.agentId ? /* @__PURE__ */
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
916
|
+
const trailing = showAgentHint && conv.agentId ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
917
|
+
originBadge,
|
|
918
|
+
/* @__PURE__ */ jsx(
|
|
919
|
+
"span",
|
|
920
|
+
{
|
|
921
|
+
className: "max-w-[7rem] truncate text-[10px] text-muted-foreground",
|
|
922
|
+
title: agentName ? `Agent: ${agentName}` : void 0,
|
|
923
|
+
children: agentName ?? /* @__PURE__ */ jsx("span", { className: "sr-only", children: `agent ${conv.agentId.slice(0, 8)}` })
|
|
924
|
+
}
|
|
925
|
+
),
|
|
926
|
+
star
|
|
927
|
+
] }) : originBadge ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
928
|
+
originBadge,
|
|
929
|
+
star
|
|
930
|
+
] }) : star;
|
|
931
|
+
return /* @__PURE__ */ jsx(
|
|
852
932
|
ItemRow,
|
|
853
933
|
{
|
|
854
934
|
sourceFeature: "conversation",
|
|
@@ -863,7 +943,7 @@ const Row = ({
|
|
|
863
943
|
href: resolveHref(conv),
|
|
864
944
|
onOpen: onOpen ? () => onOpen(conv) : void 0,
|
|
865
945
|
openInPlace,
|
|
866
|
-
leading: /* @__PURE__ */
|
|
946
|
+
leading: /* @__PURE__ */ jsx(StreamingDot, { conversationId: conv.conversationId }),
|
|
867
947
|
secondaryLabel: meta || void 0,
|
|
868
948
|
trailing,
|
|
869
949
|
menu: () => buildConversationMenu({
|
|
@@ -905,34 +985,43 @@ const PinnedChatsSection = ({
|
|
|
905
985
|
const [showAll, setShowAll] = useState(false);
|
|
906
986
|
const hasMorePins = pinned.length > PINNED_CHATS_COLLAPSED_LIMIT;
|
|
907
987
|
const visiblePins = showAll || !hasMorePins ? pinned : pinned.slice(0, PINNED_CHATS_COLLAPSED_LIMIT);
|
|
908
|
-
return /* @__PURE__ */
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
{
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
988
|
+
return /* @__PURE__ */ jsxs("div", { className: "mb-2", children: [
|
|
989
|
+
/* @__PURE__ */ jsx(
|
|
990
|
+
DisclosureHeader,
|
|
991
|
+
{
|
|
992
|
+
className: "w-full",
|
|
993
|
+
open,
|
|
994
|
+
onClick: () => setOpen((v) => !v),
|
|
995
|
+
variant: "label",
|
|
996
|
+
chevron: "end",
|
|
997
|
+
"aria-label": "Toggle pinned chats",
|
|
998
|
+
title: "Pinned",
|
|
999
|
+
meta: pinned.length
|
|
1000
|
+
}
|
|
1001
|
+
),
|
|
1002
|
+
open && /* @__PURE__ */ jsxs("div", { children: [
|
|
1003
|
+
visiblePins.map((conv) => /* @__PURE__ */ jsx(
|
|
1004
|
+
ConsumerRow,
|
|
1005
|
+
{
|
|
1006
|
+
conv,
|
|
1007
|
+
active: conv.conversationId === activeConversationId,
|
|
1008
|
+
onOpen,
|
|
1009
|
+
openInPlace,
|
|
1010
|
+
resolveHref,
|
|
1011
|
+
getSourceMenuCtx
|
|
1012
|
+
},
|
|
1013
|
+
`pinned-${conv.conversationId}`
|
|
1014
|
+
)),
|
|
1015
|
+
hasMorePins && /* @__PURE__ */ jsx(Button, { variant: "quiet", onClick: () => setShowAll((v) => !v), "aria-expanded": showAll, className: "mx-1", children: showAll ? "Show less" : "Show all" })
|
|
1016
|
+
] })
|
|
1017
|
+
] });
|
|
932
1018
|
};
|
|
933
|
-
const ConversationHistorySection = ({ label, children }) => /* @__PURE__ */
|
|
934
|
-
const ConsumerSection = ({ label, children }) => /* @__PURE__ */
|
|
935
|
-
|
|
1019
|
+
const ConversationHistorySection = ({ label, children }) => /* @__PURE__ */ jsx(ConsumerSection, { label, children });
|
|
1020
|
+
const ConsumerSection = ({ label, children }) => /* @__PURE__ */ jsxs("div", { className: "mb-2", children: [
|
|
1021
|
+
/* @__PURE__ */ jsx("div", { className: "px-3 pb-1 pt-3 text-[11px] font-semibold uppercase tracking-wide text-muted-foreground/70", children: label }),
|
|
1022
|
+
/* @__PURE__ */ jsx("div", { children })
|
|
1023
|
+
] });
|
|
1024
|
+
const ConversationHistoryRow = (props) => /* @__PURE__ */ jsx(ConsumerRow, { ...props });
|
|
936
1025
|
const ConsumerRow = ({
|
|
937
1026
|
conv,
|
|
938
1027
|
active,
|
|
@@ -945,7 +1034,7 @@ const ConsumerRow = ({
|
|
|
945
1034
|
const dispatch = useAppDispatch();
|
|
946
1035
|
const title = conv.title?.trim() || untitled(conv);
|
|
947
1036
|
const isStreaming = useAppSelector(selectIsStreaming(conv.conversationId));
|
|
948
|
-
return /* @__PURE__ */
|
|
1037
|
+
return /* @__PURE__ */ jsx(
|
|
949
1038
|
ItemRow,
|
|
950
1039
|
{
|
|
951
1040
|
sourceFeature: "conversation",
|
|
@@ -986,7 +1075,10 @@ const ConsumerRow = ({
|
|
|
986
1075
|
}
|
|
987
1076
|
}
|
|
988
1077
|
},
|
|
989
|
-
trailing: isStreaming ? /* @__PURE__ */
|
|
1078
|
+
trailing: isStreaming ? /* @__PURE__ */ jsxs("span", { className: "relative flex h-1.5 w-1.5", "aria-hidden": true, children: [
|
|
1079
|
+
/* @__PURE__ */ jsx("span", { className: "absolute inline-flex h-full w-full animate-ping rounded-full bg-primary opacity-60" }),
|
|
1080
|
+
/* @__PURE__ */ jsx("span", { className: "relative inline-flex h-1.5 w-1.5 rounded-full bg-primary" })
|
|
1081
|
+
] }) : conv.isFavorite ? /* @__PURE__ */ jsx(
|
|
990
1082
|
Star,
|
|
991
1083
|
{
|
|
992
1084
|
className: "h-3 w-3 text-amber-500",
|