@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,4 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
3
|
import { useState } from "react";
|
|
3
4
|
import { DiffViewer } from "@ai-matrx/diff/react";
|
|
4
5
|
import { AlertTriangle, ChevronDown, GitCompareArrows, MessageSquareText, RefreshCw } from "lucide-react";
|
|
@@ -87,37 +88,72 @@ function Block({
|
|
|
87
88
|
const fullBlock = side.block ?? "";
|
|
88
89
|
const focused = focus ? focusLines(fullBlock, focus.key) : null;
|
|
89
90
|
const block = focused ? focused.join("\n") : fullBlock;
|
|
90
|
-
return /* @__PURE__ */
|
|
91
|
-
"div",
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
91
|
+
return /* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", "data-compare-side": side.path, children: [
|
|
92
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-baseline gap-2", children: [
|
|
93
|
+
/* @__PURE__ */ jsx("h4", { className: "text-[11px] font-semibold uppercase tracking-wider text-primary", children: title }),
|
|
94
|
+
/* @__PURE__ */ jsxs("span", { className: "text-[10px] tabular-nums text-muted-foreground", children: [
|
|
95
|
+
side.scope_ids?.length ?? 0,
|
|
96
|
+
" scope",
|
|
97
|
+
(side.scope_ids?.length ?? 0) === 1 ? "" : "s",
|
|
98
|
+
typeof side.resolve_ms === "number" ? ` \xB7 ${Math.round(side.resolve_ms)} ms` : ""
|
|
99
|
+
] })
|
|
100
|
+
] }),
|
|
101
|
+
!side.available ? /* @__PURE__ */ jsx("div", { className: "mt-1.5 rounded-md border border-border bg-muted/30 px-2.5 py-2 text-xs text-foreground", children: side.unavailable_reason ?? "This side did not answer." }) : focus && focused && focused.length === 0 ? /* @__PURE__ */ jsx(
|
|
102
|
+
"div",
|
|
103
|
+
{
|
|
104
|
+
className: "mt-1.5 rounded-md border border-border bg-muted/30 px-2.5 py-2 text-xs text-foreground",
|
|
105
|
+
"data-focus-absent": true,
|
|
106
|
+
children: notInBlockSentence(side, focus)
|
|
107
|
+
}
|
|
108
|
+
) : block ? /* @__PURE__ */ jsxs("div", { className: "group/block relative mt-1.5", children: [
|
|
109
|
+
/* @__PURE__ */ jsx("pre", { "data-kind-source": "explicit", className: "whitespace-pre-wrap break-words rounded-md border border-border bg-muted/40 px-2.5 py-2 font-mono text-[11px] leading-relaxed text-foreground", children: block }),
|
|
110
|
+
/* @__PURE__ */ jsx(
|
|
111
|
+
CopyButtons,
|
|
112
|
+
{
|
|
113
|
+
label: "Copy",
|
|
114
|
+
human: block,
|
|
115
|
+
size: "sm",
|
|
116
|
+
className: "absolute top-1 right-1 z-10 opacity-0 transition-opacity pointer-coarse:opacity-100 group-hover/block:opacity-100"
|
|
117
|
+
}
|
|
118
|
+
)
|
|
119
|
+
] }) : /* @__PURE__ */ jsx("div", { className: "mt-1.5 rounded-md border border-border bg-muted/30 px-2.5 py-2 text-xs italic text-muted-foreground", children: "No block \u2014 this side delivers no context for this selection." }),
|
|
120
|
+
/* @__PURE__ */ jsx("p", { className: "mt-1 text-[11px] leading-snug text-muted-foreground", "data-provenance-values": side.path, children: VALUES_PROVENANCE[side.path] })
|
|
121
|
+
] });
|
|
106
122
|
}
|
|
107
123
|
function ProvenanceLine({ stamp }) {
|
|
108
124
|
if (!stamp) return null;
|
|
109
|
-
return /* @__PURE__ */
|
|
125
|
+
return /* @__PURE__ */ jsxs("p", { className: "text-[11px] leading-snug text-muted-foreground", "data-provenance": stamp.resolver, children: [
|
|
126
|
+
stamp.says,
|
|
127
|
+
" ",
|
|
128
|
+
/* @__PURE__ */ jsxs("span", { className: "font-mono text-foreground/70", children: [
|
|
129
|
+
stamp.module,
|
|
130
|
+
".",
|
|
131
|
+
stamp.function,
|
|
132
|
+
" @ ",
|
|
133
|
+
stamp.git_sha.slice(0, 10)
|
|
134
|
+
] })
|
|
135
|
+
] });
|
|
110
136
|
}
|
|
111
137
|
function FedBlock({ label, text, slot }) {
|
|
112
|
-
return /* @__PURE__ */
|
|
113
|
-
|
|
114
|
-
{
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
138
|
+
return /* @__PURE__ */ jsxs("div", { className: "min-w-0", "data-fed-block": slot, children: [
|
|
139
|
+
/* @__PURE__ */ jsx("div", { className: "text-[10px] font-medium uppercase tracking-wider text-muted-foreground", children: label }),
|
|
140
|
+
text ? /* @__PURE__ */ jsxs("div", { className: "group/block relative mt-1", children: [
|
|
141
|
+
/* @__PURE__ */ jsx("pre", { "data-kind-source": "explicit", className: "max-h-[28rem] overflow-auto whitespace-pre-wrap break-words rounded-md border border-border bg-muted/40 px-2.5 py-2 font-mono text-[11px] leading-relaxed text-foreground", children: text }),
|
|
142
|
+
/* @__PURE__ */ jsx(
|
|
143
|
+
CopyButtons,
|
|
144
|
+
{
|
|
145
|
+
label: "Copy",
|
|
146
|
+
human: text,
|
|
147
|
+
size: "sm",
|
|
148
|
+
className: "absolute top-1 right-1 z-10 opacity-0 transition-opacity pointer-coarse:opacity-100 group-hover/block:opacity-100"
|
|
149
|
+
}
|
|
150
|
+
)
|
|
151
|
+
] }) : /* @__PURE__ */ jsxs("p", { className: "mt-1 rounded-md border border-border bg-muted/30 px-2.5 py-2 text-xs italic text-muted-foreground", children: [
|
|
152
|
+
"Nothing \u2014 this turn is fed no ",
|
|
153
|
+
slot === "intro" ? "intro" : "selection block",
|
|
154
|
+
"."
|
|
155
|
+
] })
|
|
156
|
+
] });
|
|
121
157
|
}
|
|
122
158
|
function bytesLine(side) {
|
|
123
159
|
if (!side.available) return side.unavailable_reason ?? "This side did not answer.";
|
|
@@ -131,10 +167,21 @@ function FedSide({
|
|
|
131
167
|
says,
|
|
132
168
|
focus
|
|
133
169
|
}) {
|
|
134
|
-
return /* @__PURE__ */
|
|
170
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-3 px-4 pt-3", "data-fed-side": side?.path ?? "missing", children: [
|
|
171
|
+
side ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
172
|
+
/* @__PURE__ */ jsx(ProvenanceLine, { stamp: side.provenance }),
|
|
173
|
+
/* @__PURE__ */ jsx("p", { className: "text-xs tabular-nums text-foreground", "data-fed-bytes": true, children: bytesLine(side) }),
|
|
174
|
+
side.available && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
175
|
+
/* @__PURE__ */ jsx(FedBlock, { label: "System prompt \u2014 the first turn only", text: side.intro, slot: "intro" }),
|
|
176
|
+
/* @__PURE__ */ jsx(FedBlock, { label: "Every message \u2014 the selection", text: side.active, slot: "active" })
|
|
177
|
+
] }),
|
|
178
|
+
says && /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground", children: says })
|
|
179
|
+
] }) : /* @__PURE__ */ jsx(NoDelivered, {}),
|
|
180
|
+
/* @__PURE__ */ jsx(Block, { side: values, title: valuesTitle, focus })
|
|
181
|
+
] });
|
|
135
182
|
}
|
|
136
183
|
function NoDelivered() {
|
|
137
|
-
return /* @__PURE__ */
|
|
184
|
+
return /* @__PURE__ */ jsx("p", { className: "rounded-md border border-border bg-muted/30 px-3 py-2 text-xs text-foreground", "data-fed-missing": true, children: "This server version doesn't report what the model is fed yet" });
|
|
138
185
|
}
|
|
139
186
|
function DiffTab({
|
|
140
187
|
compare,
|
|
@@ -155,133 +202,214 @@ function DiffTab({
|
|
|
155
202
|
fedVerdict = `Byte-identical \u2014 both systems feed the model the same ${formatCount(today.block_byte_length)} bytes (sha256 ${(today.block_sha256 ?? "").slice(0, 12)}).`;
|
|
156
203
|
else
|
|
157
204
|
fedVerdict = `Different \u2014 ${formatCount(today.block_byte_length)} bytes today, ${formatCount(store.block_byte_length)} bytes from the record store.`;
|
|
158
|
-
return /* @__PURE__ */
|
|
159
|
-
|
|
160
|
-
{
|
|
161
|
-
className:
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
205
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col", "data-compare-diff": true, "data-kind-source": "explicit", children: [
|
|
206
|
+
/* @__PURE__ */ jsx(Summary, { compare }),
|
|
207
|
+
/* @__PURE__ */ jsxs("section", { className: "px-4 pt-4", "data-diff-fed": true, children: [
|
|
208
|
+
/* @__PURE__ */ jsx("h3", { className: "text-[11px] font-semibold uppercase tracking-wider text-primary", children: "What the model is fed" }),
|
|
209
|
+
today ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
210
|
+
/* @__PURE__ */ jsx(
|
|
211
|
+
"p",
|
|
212
|
+
{
|
|
213
|
+
className: cn(
|
|
214
|
+
"mt-1 text-sm font-medium",
|
|
215
|
+
delivered?.identical ? "text-foreground" : "text-amber-700 dark:text-amber-300"
|
|
216
|
+
),
|
|
217
|
+
"data-fed-identical": String(Boolean(delivered?.identical)),
|
|
218
|
+
children: fedVerdict
|
|
219
|
+
}
|
|
220
|
+
),
|
|
221
|
+
/* @__PURE__ */ jsxs("div", { className: "mt-1 space-y-0.5", children: [
|
|
222
|
+
/* @__PURE__ */ jsx(ProvenanceLine, { stamp: today.provenance }),
|
|
223
|
+
store?.available && /* @__PURE__ */ jsx(ProvenanceLine, { stamp: store.provenance })
|
|
224
|
+
] }),
|
|
225
|
+
store?.available && /* @__PURE__ */ jsx("div", { className: "mt-2 overflow-hidden rounded-md border border-border", "data-diff-viewer": "fed", children: /* @__PURE__ */ jsx(
|
|
226
|
+
DiffViewer,
|
|
227
|
+
{
|
|
228
|
+
original: today.injected_block ?? "",
|
|
229
|
+
modified: store.injected_block ?? "",
|
|
230
|
+
originalLabel: "What the model gets today",
|
|
231
|
+
modifiedLabel: "Record store",
|
|
232
|
+
engine: "light",
|
|
233
|
+
defaultView: "inline",
|
|
234
|
+
showLineNumbers: true,
|
|
235
|
+
wrap: true,
|
|
236
|
+
readOnly: true
|
|
237
|
+
}
|
|
238
|
+
) })
|
|
239
|
+
] }) : /* @__PURE__ */ jsx("div", { className: "mt-1", children: /* @__PURE__ */ jsx(NoDelivered, {}) })
|
|
240
|
+
] }),
|
|
241
|
+
/* @__PURE__ */ jsxs("section", { className: "px-4 pt-4", "data-diff-values": true, children: [
|
|
242
|
+
/* @__PURE__ */ jsx("h3", { className: "text-[11px] font-semibold uppercase tracking-wider text-primary", children: "The values each system answered" }),
|
|
243
|
+
/* @__PURE__ */ jsxs("p", { className: "mt-1 text-xs text-muted-foreground", children: [
|
|
244
|
+
focus ? `${focus.label} only. ` : "",
|
|
245
|
+
"With an organization, agents fetch these with tools"
|
|
246
|
+
] }),
|
|
247
|
+
compare.old.available && compare.new.available ? shownOld === shownNew ? /* @__PURE__ */ jsxs("div", { className: "mt-1.5 rounded-md border border-border bg-muted/30 px-2.5 py-2 text-xs text-foreground", "data-values-identical": true, children: [
|
|
248
|
+
shownOld ? "Identical on both systems:" : "Neither system delivers a value here.",
|
|
249
|
+
shownOld && /* @__PURE__ */ jsx("pre", { className: "mt-1 whitespace-pre-wrap break-words font-mono text-[11px] leading-relaxed", children: shownOld })
|
|
250
|
+
] }) : /* @__PURE__ */ jsx("div", { className: "mt-2 overflow-hidden rounded-md border border-border", "data-diff-viewer": "values", children: /* @__PURE__ */ jsx(
|
|
251
|
+
DiffViewer,
|
|
252
|
+
{
|
|
253
|
+
original: shownOld,
|
|
254
|
+
modified: shownNew,
|
|
255
|
+
originalLabel: "Current system",
|
|
256
|
+
modifiedLabel: "Record store",
|
|
257
|
+
engine: "light",
|
|
258
|
+
defaultView: "inline",
|
|
259
|
+
showLineNumbers: true,
|
|
260
|
+
wrap: true,
|
|
261
|
+
readOnly: true
|
|
262
|
+
}
|
|
263
|
+
) }) : /* @__PURE__ */ jsx("p", { className: "mt-1.5 rounded-md border border-border bg-muted/30 px-2.5 py-2 text-xs text-foreground", children: (!compare.old.available ? compare.old.unavailable_reason : compare.new.unavailable_reason) ?? "One side did not answer." })
|
|
264
|
+
] }),
|
|
265
|
+
/* @__PURE__ */ jsx(
|
|
266
|
+
Differences,
|
|
267
|
+
{
|
|
268
|
+
differences: focus ? (compare.differences ?? []).filter((d) => d.item_id === focus.itemId) : compare.differences ?? []
|
|
269
|
+
}
|
|
270
|
+
)
|
|
271
|
+
] });
|
|
200
272
|
}
|
|
201
273
|
function JsonBlock({ label, value, slot }) {
|
|
202
274
|
const text = JSON.stringify(value ?? null, null, 2);
|
|
203
|
-
return /* @__PURE__ */
|
|
204
|
-
|
|
205
|
-
{
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
275
|
+
return /* @__PURE__ */ jsxs("div", { className: "min-w-0", "data-selection-block": slot, children: [
|
|
276
|
+
/* @__PURE__ */ jsx("div", { className: "text-[10px] font-medium uppercase tracking-wider text-muted-foreground", children: label }),
|
|
277
|
+
/* @__PURE__ */ jsxs("div", { className: "group/block relative mt-1", children: [
|
|
278
|
+
/* @__PURE__ */ jsx("pre", { "data-kind-source": "explicit", className: "overflow-auto whitespace-pre-wrap break-all rounded-md border border-border bg-muted/40 px-2.5 py-2 font-mono text-[11px] leading-relaxed text-foreground", children: text }),
|
|
279
|
+
/* @__PURE__ */ jsx(
|
|
280
|
+
CopyButtons,
|
|
281
|
+
{
|
|
282
|
+
label: "Copy",
|
|
283
|
+
human: text,
|
|
284
|
+
size: "sm",
|
|
285
|
+
className: "absolute top-1 right-1 z-10 opacity-0 transition-opacity pointer-coarse:opacity-100 group-hover/block:opacity-100"
|
|
286
|
+
}
|
|
287
|
+
)
|
|
288
|
+
] })
|
|
289
|
+
] });
|
|
212
290
|
}
|
|
213
291
|
function SelectionTab({
|
|
214
292
|
sent,
|
|
215
293
|
compare,
|
|
216
294
|
delivered
|
|
217
295
|
}) {
|
|
218
|
-
return /* @__PURE__ */
|
|
296
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-3 px-4 pt-3", "data-compare-selection": true, children: [
|
|
297
|
+
sent && /* @__PURE__ */ jsx(JsonBlock, { label: "What this page sent", value: sent, slot: "sent" }),
|
|
298
|
+
/* @__PURE__ */ jsx(JsonBlock, { label: "The scopes the values compare read", value: compare.selection, slot: "expanded" }),
|
|
299
|
+
delivered ? /* @__PURE__ */ jsx(JsonBlock, { label: "The assembler's arguments (both sides)", value: delivered.arguments, slot: "arguments" }) : /* @__PURE__ */ jsx(NoDelivered, {})
|
|
300
|
+
] });
|
|
219
301
|
}
|
|
220
302
|
function Summary({ compare }) {
|
|
221
303
|
const counts = compare.counts ?? {};
|
|
222
304
|
const total = (compare.differences ?? []).length;
|
|
223
|
-
return /* @__PURE__ */
|
|
305
|
+
return /* @__PURE__ */ jsx("section", { className: "px-4 pt-3", children: /* @__PURE__ */ jsxs(
|
|
224
306
|
"div",
|
|
225
307
|
{
|
|
226
308
|
className: cn(
|
|
227
309
|
"rounded-md border px-3 py-2",
|
|
228
310
|
(compare.defects ?? 0) > 0 ? "border-destructive/40 bg-destructive/5" : "border-primary/20 bg-primary/5"
|
|
229
311
|
),
|
|
230
|
-
"data-compare-summary": true
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
312
|
+
"data-compare-summary": true,
|
|
313
|
+
children: [
|
|
314
|
+
/* @__PURE__ */ jsx("p", { className: "text-sm font-medium text-foreground", children: (compare.defects ?? 0) > 0 ? `${compare.defects} defect${compare.defects === 1 ? "" : "s"} \u2014 the two systems disagree where they should not.` : total === 0 ? "Identical \u2014 both systems hand the agent the same values." : "No defects \u2014 every difference below has a known reason." }),
|
|
315
|
+
/* @__PURE__ */ jsxs("p", { className: "mt-0.5 text-xs tabular-nums text-muted-foreground", children: [
|
|
316
|
+
compare.identical_cells ?? 0,
|
|
317
|
+
" identical value",
|
|
318
|
+
compare.identical_cells === 1 ? "" : "s",
|
|
319
|
+
CLASS_ORDER.filter((c) => counts[c]).map((c) => ` \xB7 ${counts[c]} ${CLASS_LOOK[c].label.toLowerCase()}`)
|
|
320
|
+
] }),
|
|
321
|
+
/* @__PURE__ */ jsx("p", { className: "mt-1.5 text-xs text-foreground/90", children: compare.ruling }),
|
|
322
|
+
/* @__PURE__ */ jsx(
|
|
323
|
+
"p",
|
|
324
|
+
{
|
|
325
|
+
className: cn(
|
|
326
|
+
"mt-1 text-xs",
|
|
327
|
+
compare.follow.alert ? "font-medium text-destructive" : "text-muted-foreground"
|
|
328
|
+
),
|
|
329
|
+
"data-follow-alert": compare.follow.alert ? "true" : void 0,
|
|
330
|
+
children: compare.follow.says
|
|
331
|
+
}
|
|
241
332
|
),
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
/* @__PURE__ */ React.createElement(SystemItemsLine, { items: compare.system_items })
|
|
248
|
-
));
|
|
333
|
+
(compare.excluded ?? []).map((e) => /* @__PURE__ */ jsx("p", { className: "mt-1 text-xs text-muted-foreground", children: e }, e)),
|
|
334
|
+
/* @__PURE__ */ jsx(SystemItemsLine, { items: compare.system_items })
|
|
335
|
+
]
|
|
336
|
+
}
|
|
337
|
+
) });
|
|
249
338
|
}
|
|
250
339
|
function Differences({ differences }) {
|
|
251
340
|
if (differences.length === 0) return null;
|
|
252
341
|
const sorted = [...differences].sort(
|
|
253
342
|
(a, b) => CLASS_ORDER.indexOf(a.difference_class) - CLASS_ORDER.indexOf(b.difference_class)
|
|
254
343
|
);
|
|
255
|
-
return /* @__PURE__ */
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
344
|
+
return /* @__PURE__ */ jsxs("section", { className: "px-4 pt-4", children: [
|
|
345
|
+
/* @__PURE__ */ jsx("h3", { className: "text-[11px] font-semibold uppercase tracking-wider text-primary", children: "Every difference" }),
|
|
346
|
+
/* @__PURE__ */ jsx("ul", { className: "mt-1.5 divide-y divide-border/60 rounded-md border border-border", children: sorted.map((d, i) => {
|
|
347
|
+
const look = CLASS_LOOK[d.difference_class];
|
|
348
|
+
return /* @__PURE__ */ jsxs(
|
|
349
|
+
"li",
|
|
350
|
+
{
|
|
351
|
+
className: "px-2.5 py-2",
|
|
352
|
+
"data-difference-class": d.difference_class,
|
|
353
|
+
children: [
|
|
354
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
355
|
+
/* @__PURE__ */ jsx("span", { className: "min-w-0 truncate font-mono text-xs font-semibold text-foreground", children: humanizeIdentifier(d.key) }),
|
|
356
|
+
d.scope_name && /* @__PURE__ */ jsxs("span", { className: "text-[11px] text-muted-foreground", children: [
|
|
357
|
+
"on ",
|
|
358
|
+
d.scope_name
|
|
359
|
+
] }),
|
|
360
|
+
/* @__PURE__ */ jsx("span", { className: "flex-1" }),
|
|
361
|
+
/* @__PURE__ */ jsx("span", { className: cn("shrink-0 rounded-full border px-1.5 py-0.5 text-[10px] font-medium", look.className), children: look.label })
|
|
362
|
+
] }),
|
|
363
|
+
/* @__PURE__ */ jsx("p", { className: "mt-1 text-xs leading-relaxed text-foreground/90", children: d.why }),
|
|
364
|
+
(d.old_value !== void 0 || d.new_value !== void 0) && show(d.old_value) !== show(d.new_value) && /* @__PURE__ */ jsx("div", { className: "mt-1.5 grid gap-1.5 sm:grid-cols-2", children: ["old", "new"].map((p) => {
|
|
365
|
+
const v = show(p === "old" ? d.old_value : d.new_value);
|
|
366
|
+
return /* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
|
|
367
|
+
/* @__PURE__ */ jsx("div", { className: "text-[10px] font-medium uppercase tracking-wider text-muted-foreground", children: p === "old" ? "Current system" : "Record store" }),
|
|
368
|
+
/* @__PURE__ */ jsx("div", { "data-kind-source": "explicit", className: "whitespace-pre-wrap break-words rounded bg-muted/40 px-2 py-1 font-mono text-[11px] text-foreground/90", children: v || /* @__PURE__ */ jsx("span", { className: "italic text-muted-foreground", children: "(not delivered)" }) })
|
|
369
|
+
] }, p);
|
|
370
|
+
}) })
|
|
371
|
+
]
|
|
372
|
+
},
|
|
373
|
+
`${d.item_id}:${d.scope_id ?? ""}:${i}`
|
|
374
|
+
);
|
|
375
|
+
}) })
|
|
376
|
+
] });
|
|
272
377
|
}
|
|
273
378
|
function Checks({ side }) {
|
|
274
379
|
const checks = side.checks ?? [];
|
|
275
380
|
const withheld = side.withheld ?? [];
|
|
276
381
|
if (checks.length === 0 && withheld.length === 0) return null;
|
|
277
|
-
return /* @__PURE__ */
|
|
382
|
+
return /* @__PURE__ */ jsxs("section", { className: "px-4 pt-4", children: [
|
|
383
|
+
/* @__PURE__ */ jsx("h3", { className: "text-[11px] font-semibold uppercase tracking-wider text-primary", children: "Checked for you on the new side" }),
|
|
384
|
+
/* @__PURE__ */ jsxs("ul", { className: "mt-1.5 divide-y divide-border/60 rounded-md border border-border", children: [
|
|
385
|
+
checks.map((c, i) => /* @__PURE__ */ jsxs("li", { className: "px-2.5 py-2 text-xs", "data-check-admitted": c.admitted, children: [
|
|
386
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
387
|
+
/* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 truncate font-medium text-foreground", children: c.name || "A scope you were given" }),
|
|
388
|
+
/* @__PURE__ */ jsx("span", { className: "shrink-0 text-[10px] text-muted-foreground", children: c.via === "selection" ? "you selected it" : c.via === "entity_tag" ? "tagged to this chat" : c.via === "project_tag" ? "tagged to its project" : c.via }),
|
|
389
|
+
/* @__PURE__ */ jsx(Badge, { className: "shrink-0", tone: c.admitted ? "primary" : "neutral", children: c.admitted ? "you may read it" : "not delivered" })
|
|
390
|
+
] }),
|
|
391
|
+
c.says && /* @__PURE__ */ jsx("p", { className: "mt-1 text-muted-foreground", children: c.says })
|
|
392
|
+
] }, `${c.record_id}:${c.via}:${i}`)),
|
|
393
|
+
withheld.map((w, i) => /* @__PURE__ */ jsxs("li", { className: "px-2.5 py-2 text-xs", children: [
|
|
394
|
+
/* @__PURE__ */ jsx("span", { className: "font-mono font-semibold text-foreground", children: show(w.key) }),
|
|
395
|
+
w.record_name ? /* @__PURE__ */ jsxs("span", { className: "text-muted-foreground", children: [
|
|
396
|
+
" on ",
|
|
397
|
+
show(w.record_name)
|
|
398
|
+
] }) : null,
|
|
399
|
+
/* @__PURE__ */ jsxs("span", { className: "text-muted-foreground", children: [
|
|
400
|
+
" \u2014 withheld: ",
|
|
401
|
+
show(w.reason)
|
|
402
|
+
] })
|
|
403
|
+
] }, `w:${i}`))
|
|
404
|
+
] })
|
|
405
|
+
] });
|
|
278
406
|
}
|
|
279
407
|
function AnswerAgentPicker({
|
|
280
408
|
agentId,
|
|
281
409
|
onAgentChange
|
|
282
410
|
}) {
|
|
283
411
|
const chosenName = useAgentName(agentId) ?? null;
|
|
284
|
-
return /* @__PURE__ */
|
|
412
|
+
return /* @__PURE__ */ jsx("div", { "data-answer-agent": agentId ?? "", children: /* @__PURE__ */ jsx(
|
|
285
413
|
AgentListDropdown,
|
|
286
414
|
{
|
|
287
415
|
consumerId: "context-inspector-answer-both",
|
|
@@ -289,9 +417,12 @@ function AnswerAgentPicker({
|
|
|
289
417
|
onSelect: (id) => onAgentChange(id || null),
|
|
290
418
|
label: chosenName ?? "Choose an agent",
|
|
291
419
|
showPinnedAgent: Boolean(agentId),
|
|
292
|
-
triggerSlot: /* @__PURE__ */
|
|
420
|
+
triggerSlot: /* @__PURE__ */ jsx(Button, { iconEnd: /* @__PURE__ */ jsx(ChevronDown, { className: "text-muted-foreground" }), type: "button", variant: "outline", className: "max-w-full justify-between", children: /* @__PURE__ */ jsxs("span", { className: "flex min-w-0 items-center gap-1.5", children: [
|
|
421
|
+
/* @__PURE__ */ jsx(AGENT_ICON, { className: "h-3 w-3 shrink-0 text-muted-foreground" }),
|
|
422
|
+
/* @__PURE__ */ jsx("span", { className: "truncate", children: chosenName ?? (agentId ? "This agent" : "Choose an agent") })
|
|
423
|
+
] }) })
|
|
293
424
|
}
|
|
294
|
-
));
|
|
425
|
+
) });
|
|
295
426
|
}
|
|
296
427
|
function AnswerBoth({
|
|
297
428
|
agentId,
|
|
@@ -324,10 +455,17 @@ function AnswerBoth({
|
|
|
324
455
|
],
|
|
325
456
|
`${agentId}|${agentName}|${running}|${error}|${result ? "r" : ""}|${question.length}`
|
|
326
457
|
);
|
|
327
|
-
const heading = /* @__PURE__ */
|
|
328
|
-
|
|
458
|
+
const heading = /* @__PURE__ */ jsxs("h3", { className: "flex items-center gap-1.5 text-[11px] font-semibold uppercase tracking-wider text-primary", children: [
|
|
459
|
+
/* @__PURE__ */ jsx(MessageSquareText, { className: "h-3 w-3" }),
|
|
460
|
+
"Answer on both paths"
|
|
461
|
+
] });
|
|
462
|
+
const picker = onAgentChange ? /* @__PURE__ */ jsx(AnswerAgentPicker, { agentId, onAgentChange }) : null;
|
|
329
463
|
if (!agentId) {
|
|
330
|
-
return /* @__PURE__ */
|
|
464
|
+
return /* @__PURE__ */ jsxs("section", { className: "px-4 pt-4", "data-answer-both-needs-agent": true, children: [
|
|
465
|
+
heading,
|
|
466
|
+
/* @__PURE__ */ jsx("p", { className: "mt-1 text-xs text-muted-foreground", children: picker ? "Choose the agent to compare" : "Open this from a chat with the agent to compare" }),
|
|
467
|
+
picker && /* @__PURE__ */ jsx("div", { className: "mt-1.5", children: picker })
|
|
468
|
+
] });
|
|
331
469
|
}
|
|
332
470
|
const run = () => {
|
|
333
471
|
const q = question.trim();
|
|
@@ -360,32 +498,64 @@ function AnswerBoth({
|
|
|
360
498
|
setResult(res.data ?? null);
|
|
361
499
|
});
|
|
362
500
|
};
|
|
363
|
-
return /* @__PURE__ */
|
|
364
|
-
|
|
365
|
-
{
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
className: "mt-1.5 min-h-[64px] text-base md:text-sm"
|
|
370
|
-
}
|
|
371
|
-
), /* @__PURE__ */ React.createElement("div", { className: "mt-1.5 flex items-center gap-2" }, /* @__PURE__ */ React.createElement(Button, { icon: running ? /* @__PURE__ */ React.createElement(RefreshCw, { className: "animate-spin" }) : /* @__PURE__ */ React.createElement(GitCompareArrows, null), variant: "primary", onClick: run, disabled: running || !question.trim() }, running ? "Answering twice\u2026" : "Answer on both paths")), error && /* @__PURE__ */ React.createElement("div", { className: "mt-2 rounded-md border border-destructive/40 bg-destructive/10 px-3 py-2 text-xs text-destructive-ink" }, error, /* @__PURE__ */ React.createElement(ErrorAlchemyMenu, { error })), result && /* @__PURE__ */ React.createElement("div", { className: "mt-2" }, /* @__PURE__ */ React.createElement("p", { className: "text-xs text-muted-foreground" }, result.says), /* @__PURE__ */ React.createElement("div", { className: "mt-1.5 grid gap-2 sm:grid-cols-2" }, ["old", "new"].map((p) => {
|
|
372
|
-
const a = result.answers.find((x) => x.path === p);
|
|
373
|
-
return /* @__PURE__ */ React.createElement("div", { key: p, className: "min-w-0 rounded-md border border-border px-2.5 py-2", "data-answer-path": p }, /* @__PURE__ */ React.createElement("div", { className: "flex items-baseline gap-2" }, /* @__PURE__ */ React.createElement("span", { className: "text-[11px] font-semibold uppercase tracking-wider text-primary" }, p === "old" ? "Current system" : "Record store"), /* @__PURE__ */ React.createElement("span", { className: "text-[10px] tabular-nums text-muted-foreground" }, a?.model && !/^[0-9a-f-]{36}$/i.test(a.model) ? a.model : "", typeof a?.duration_ms === "number" ? ` ${formatDurationMs(a.duration_ms, { style: "compact" })}` : "", typeof a?.input_tokens === "number" ? ` \xB7 ${formatCount(a.input_tokens)} tokens in` : "")), a?.error ? /* @__PURE__ */ React.createElement("p", { className: "mt-1 text-xs text-destructive" }, a.error, " ", /* @__PURE__ */ React.createElement(ErrorAlchemyMenu, { error: a.error })) : (
|
|
374
|
-
// The platform's markdown renderer — the one a chat answer goes through — so an
|
|
375
|
-
// answer reads as it would in chat, never as raw text with asterisks.
|
|
376
|
-
/* @__PURE__ */ React.createElement("div", { className: "mt-1 min-w-0 break-words text-sm text-foreground", "data-answer-markdown": true }, /* @__PURE__ */ React.createElement(RichContent, { level: "full", imagePolicy: "ai", source: a?.answer ?? "", hideCopyButton: true }))
|
|
377
|
-
), typeof a?.system_byte_length === "number" && /* @__PURE__ */ React.createElement(
|
|
378
|
-
"p",
|
|
501
|
+
return /* @__PURE__ */ jsxs("section", { className: "px-4 pt-4", "data-answer-both": true, children: [
|
|
502
|
+
heading,
|
|
503
|
+
picker && /* @__PURE__ */ jsx("div", { className: "mt-1.5", children: picker }),
|
|
504
|
+
/* @__PURE__ */ jsx("p", { className: "mt-1 text-xs text-muted-foreground", children: "One real turn per system, tools off, nothing saved" }),
|
|
505
|
+
/* @__PURE__ */ jsx(
|
|
506
|
+
Textarea,
|
|
379
507
|
{
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
508
|
+
value: question,
|
|
509
|
+
onChange: (e) => setQuestion(e.target.value),
|
|
510
|
+
placeholder: "Ask the question you want both systems to answer",
|
|
511
|
+
className: "mt-1.5 min-h-[64px] text-base md:text-sm"
|
|
512
|
+
}
|
|
513
|
+
),
|
|
514
|
+
/* @__PURE__ */ jsx("div", { className: "mt-1.5 flex items-center gap-2", children: /* @__PURE__ */ jsx(Button, { icon: running ? /* @__PURE__ */ jsx(RefreshCw, { className: "animate-spin" }) : /* @__PURE__ */ jsx(GitCompareArrows, {}), variant: "primary", onClick: run, disabled: running || !question.trim(), children: running ? "Answering twice\u2026" : "Answer on both paths" }) }),
|
|
515
|
+
error && /* @__PURE__ */ jsxs("div", { className: "mt-2 rounded-md border border-destructive/40 bg-destructive/10 px-3 py-2 text-xs text-destructive-ink", children: [
|
|
516
|
+
error,
|
|
517
|
+
/* @__PURE__ */ jsx(ErrorAlchemyMenu, { error })
|
|
518
|
+
] }),
|
|
519
|
+
result && /* @__PURE__ */ jsxs("div", { className: "mt-2", children: [
|
|
520
|
+
/* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground", children: result.says }),
|
|
521
|
+
/* @__PURE__ */ jsx("div", { className: "mt-1.5 grid gap-2 sm:grid-cols-2", children: ["old", "new"].map((p) => {
|
|
522
|
+
const a = result.answers.find((x) => x.path === p);
|
|
523
|
+
return /* @__PURE__ */ jsxs("div", { className: "min-w-0 rounded-md border border-border px-2.5 py-2", "data-answer-path": p, children: [
|
|
524
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-baseline gap-2", children: [
|
|
525
|
+
/* @__PURE__ */ jsx("span", { className: "text-[11px] font-semibold uppercase tracking-wider text-primary", children: p === "old" ? "Current system" : "Record store" }),
|
|
526
|
+
/* @__PURE__ */ jsxs("span", { className: "text-[10px] tabular-nums text-muted-foreground", children: [
|
|
527
|
+
a?.model && !/^[0-9a-f-]{36}$/i.test(a.model) ? a.model : "",
|
|
528
|
+
typeof a?.duration_ms === "number" ? ` ${formatDurationMs(a.duration_ms, { style: "compact" })}` : "",
|
|
529
|
+
typeof a?.input_tokens === "number" ? ` \xB7 ${formatCount(a.input_tokens)} tokens in` : ""
|
|
530
|
+
] })
|
|
531
|
+
] }),
|
|
532
|
+
a?.error ? /* @__PURE__ */ jsxs("p", { className: "mt-1 text-xs text-destructive", children: [
|
|
533
|
+
a.error,
|
|
534
|
+
" ",
|
|
535
|
+
/* @__PURE__ */ jsx(ErrorAlchemyMenu, { error: a.error })
|
|
536
|
+
] }) : (
|
|
537
|
+
// The platform's markdown renderer — the one a chat answer goes through — so an
|
|
538
|
+
// answer reads as it would in chat, never as raw text with asterisks.
|
|
539
|
+
/* @__PURE__ */ jsx("div", { className: "mt-1 min-w-0 break-words text-sm text-foreground", "data-answer-markdown": true, children: /* @__PURE__ */ jsx(RichContent, { level: "full", imagePolicy: "ai", source: a?.answer ?? "", hideCopyButton: true }) })
|
|
540
|
+
),
|
|
541
|
+
typeof a?.system_byte_length === "number" && /* @__PURE__ */ jsxs(
|
|
542
|
+
"p",
|
|
543
|
+
{
|
|
544
|
+
className: "mt-1.5 text-[10px] tabular-nums text-muted-foreground",
|
|
545
|
+
"data-answer-bytes": p,
|
|
546
|
+
children: [
|
|
547
|
+
"Ran on ",
|
|
548
|
+
a.system_byte_length.toLocaleString(),
|
|
549
|
+
" bytes of system text",
|
|
550
|
+
a.context_sha256 ? ` \xB7 context sha ${a.context_sha256.slice(0, 12)}` : ""
|
|
551
|
+
]
|
|
552
|
+
}
|
|
553
|
+
),
|
|
554
|
+
/* @__PURE__ */ jsx("div", { className: "mt-1", "data-answer-provenance": p, children: /* @__PURE__ */ jsx(ProvenanceLine, { stamp: a?.provenance }) })
|
|
555
|
+
] }, p);
|
|
556
|
+
}) })
|
|
557
|
+
] })
|
|
558
|
+
] });
|
|
389
559
|
}
|
|
390
560
|
function ContextCompareView({
|
|
391
561
|
conversationId,
|
|
@@ -475,54 +645,101 @@ function ContextCompareView({
|
|
|
475
645
|
},
|
|
476
646
|
`${status}|${error}|${compare ? `${compare.defects}:${(compare.differences ?? []).length}:${compare.old.block?.length}:${compare.new.block?.length}` : ""}|${focus?.key ?? ""}`
|
|
477
647
|
);
|
|
478
|
-
return /* @__PURE__ */
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
648
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex min-h-0 flex-1 flex-col", "data-context-compare": true, children: [
|
|
649
|
+
/* @__PURE__ */ jsxs("div", { className: "flex shrink-0 items-center gap-2 border-b border-border px-4 py-1.5", children: [
|
|
650
|
+
/* @__PURE__ */ jsx(
|
|
651
|
+
Chip,
|
|
652
|
+
{
|
|
653
|
+
tone: "primary",
|
|
654
|
+
icon: /* @__PURE__ */ jsx(GitCompareArrows, {}),
|
|
655
|
+
label: status === "loading" ? "Resolving both\u2026" : "Current system \xB7 Record store"
|
|
656
|
+
}
|
|
657
|
+
),
|
|
658
|
+
/* @__PURE__ */ jsx("span", { className: "flex-1" }),
|
|
659
|
+
/* @__PURE__ */ jsx(
|
|
660
|
+
Button,
|
|
661
|
+
{
|
|
662
|
+
icon: /* @__PURE__ */ jsx(RefreshCw, { className: cn("h-3 w-3", status === "loading" && "animate-spin") }),
|
|
663
|
+
variant: "quiet",
|
|
664
|
+
onClick: refresh,
|
|
665
|
+
disabled: status === "loading",
|
|
666
|
+
children: "Refresh"
|
|
667
|
+
}
|
|
668
|
+
)
|
|
669
|
+
] }),
|
|
670
|
+
/* @__PURE__ */ jsxs("div", { className: "min-h-0 flex-1 overflow-y-auto pb-4 scrollbar-thin-auto", children: [
|
|
671
|
+
status === "loading" && !data && /* @__PURE__ */ jsxs("div", { className: "space-y-2.5 px-4 py-4", children: [
|
|
672
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-10 w-full" }),
|
|
673
|
+
/* @__PURE__ */ jsxs("div", { className: "flex gap-3", children: [
|
|
674
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-40 flex-1" }),
|
|
675
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-40 flex-1" })
|
|
676
|
+
] })
|
|
677
|
+
] }),
|
|
678
|
+
status === "error" && /* @__PURE__ */ jsxs("div", { className: "mx-4 mt-4 rounded-md border border-destructive/40 bg-destructive/10 px-3 py-2.5", children: [
|
|
679
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 text-sm font-medium text-destructive", children: [
|
|
680
|
+
/* @__PURE__ */ jsx(AlertTriangle, { className: "h-4 w-4 shrink-0" }),
|
|
681
|
+
"Comparison unavailable"
|
|
682
|
+
] }),
|
|
683
|
+
/* @__PURE__ */ jsx("div", { className: "mt-1 break-words text-xs text-destructive/90", children: error }),
|
|
684
|
+
/* @__PURE__ */ jsx(ErrorAlchemyMenu, { error })
|
|
685
|
+
] }),
|
|
686
|
+
data && !compare && /* @__PURE__ */ jsx("div", { className: "mx-4 mt-4 rounded-md border border-border bg-muted/30 px-3 py-2.5 text-xs text-foreground", children: "This server version has no compare mode yet" }),
|
|
687
|
+
compare && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
688
|
+
/* @__PURE__ */ jsxs(Tabs, { value: activeTab, onValueChange: chooseTab, className: "pt-2", "data-compare-tabs": activeTab, children: [
|
|
689
|
+
/* @__PURE__ */ jsx("div", { className: "overflow-x-auto px-4 scrollbar-none", children: /* @__PURE__ */ jsxs(TabsList, { className: "w-max flex-nowrap", children: [
|
|
690
|
+
/* @__PURE__ */ jsx(TabsTrigger, { value: "diff", className: "shrink-0 whitespace-nowrap", "data-compare-tab": "diff", children: "Diff" }),
|
|
691
|
+
/* @__PURE__ */ jsx(TabsTrigger, { value: "today", className: "shrink-0 whitespace-nowrap", "data-compare-tab": "today", children: "What the model gets today" }),
|
|
692
|
+
/* @__PURE__ */ jsx(TabsTrigger, { value: "store", className: "shrink-0 whitespace-nowrap", "data-compare-tab": "store", children: "Record store" }),
|
|
693
|
+
/* @__PURE__ */ jsx(TabsTrigger, { value: "selection", className: "shrink-0 whitespace-nowrap", "data-compare-tab": "selection", children: "Selection" })
|
|
694
|
+
] }) }),
|
|
695
|
+
focus && /* @__PURE__ */ jsxs("p", { className: "px-4 pt-2 text-xs text-muted-foreground", "data-compare-focus": focus.key, children: [
|
|
696
|
+
"Showing ",
|
|
697
|
+
focus.label,
|
|
698
|
+
" only; the model always gets the whole turn"
|
|
699
|
+
] }),
|
|
700
|
+
/* @__PURE__ */ jsx(TabsContent, { value: "diff", className: "mt-0", children: /* @__PURE__ */ jsx(DiffTab, { compare, delivered, focus }) }),
|
|
701
|
+
/* @__PURE__ */ jsx(TabsContent, { value: "today", className: "mt-0", children: /* @__PURE__ */ jsx(
|
|
702
|
+
FedSide,
|
|
703
|
+
{
|
|
704
|
+
side: delivered?.today,
|
|
705
|
+
values: compare.old,
|
|
706
|
+
valuesTitle: "Values the current system answered",
|
|
707
|
+
says: delivered?.says,
|
|
708
|
+
focus
|
|
709
|
+
}
|
|
710
|
+
) }),
|
|
711
|
+
/* @__PURE__ */ jsxs(TabsContent, { value: "store", className: "mt-0", children: [
|
|
712
|
+
/* @__PURE__ */ jsx(
|
|
713
|
+
FedSide,
|
|
714
|
+
{
|
|
715
|
+
side: delivered ? delivered.record_store ?? {
|
|
716
|
+
path: "record_store",
|
|
717
|
+
available: false,
|
|
718
|
+
unavailable_reason: "The server ran no record-store side for this preview."
|
|
719
|
+
} : void 0,
|
|
720
|
+
values: compare.new,
|
|
721
|
+
valuesTitle: "Values the record store answered",
|
|
722
|
+
says: delivered?.says,
|
|
723
|
+
focus
|
|
724
|
+
}
|
|
725
|
+
),
|
|
726
|
+
/* @__PURE__ */ jsx(Checks, { side: compare.new })
|
|
727
|
+
] }),
|
|
728
|
+
/* @__PURE__ */ jsx(TabsContent, { value: "selection", className: "mt-0", children: /* @__PURE__ */ jsx(SelectionTab, { sent: selection, compare, delivered }) })
|
|
729
|
+
] }),
|
|
730
|
+
/* @__PURE__ */ jsx(
|
|
731
|
+
AnswerBoth,
|
|
732
|
+
{
|
|
733
|
+
agentId,
|
|
734
|
+
onAgentChange,
|
|
735
|
+
conversationId,
|
|
736
|
+
selection
|
|
737
|
+
},
|
|
738
|
+
agentId ?? "no-agent"
|
|
739
|
+
)
|
|
740
|
+
] })
|
|
741
|
+
] })
|
|
742
|
+
] });
|
|
526
743
|
}
|
|
527
744
|
export {
|
|
528
745
|
ContextCompareView,
|