@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 { useClipboard } from "@ai-matrx/kit/clipboard";
|
|
3
4
|
import { toast } from "../../../host/notify.js";
|
|
4
5
|
import { Chip, Button, DisclosureHeader } from "@ai-matrx/design-system/controls";
|
|
@@ -47,7 +48,7 @@ import { ErrorAlchemyMenu } from "../../../host/ui-slots.js";
|
|
|
47
48
|
import { humanizeIdentifier } from "@ai-matrx/kit/text-case";
|
|
48
49
|
const DEBUG_PANEL_SHELL = "flex flex-col flex-1 min-h-0 h-full w-full bg-background text-foreground";
|
|
49
50
|
function DebugTabScroll({ children }) {
|
|
50
|
-
return /* @__PURE__ */
|
|
51
|
+
return /* @__PURE__ */ jsx("div", { className: "flex flex-col flex-1 min-h-0 h-full", children: /* @__PURE__ */ jsx(ScrollArea, { className: "flex-1 min-h-0", children }) });
|
|
51
52
|
}
|
|
52
53
|
function useCopy() {
|
|
53
54
|
const { copyText } = useClipboard({
|
|
@@ -67,7 +68,7 @@ function CopyBtn({
|
|
|
67
68
|
className
|
|
68
69
|
}) {
|
|
69
70
|
const { copied, copy } = useCopy();
|
|
70
|
-
return /* @__PURE__ */
|
|
71
|
+
return /* @__PURE__ */ jsx(Button, { variant: "quiet", icon: copied === id ? /* @__PURE__ */ jsx(Check, {}) : /* @__PURE__ */ jsx(Copy, {}), glyphTone: copied === id ? "success" : void 0, "aria-label": "Copy", onClick: (e) => {
|
|
71
72
|
e.stopPropagation();
|
|
72
73
|
copy(text, id);
|
|
73
74
|
}, className });
|
|
@@ -83,26 +84,26 @@ function TimelineCopyChip({
|
|
|
83
84
|
const { copied, copy } = useCopy();
|
|
84
85
|
const done = copied === id;
|
|
85
86
|
const Leading = LeadingIcon ?? Copy;
|
|
86
|
-
return /* @__PURE__ */
|
|
87
|
+
return /* @__PURE__ */ jsx(
|
|
87
88
|
Chip,
|
|
88
89
|
{
|
|
89
90
|
asChild: true,
|
|
90
91
|
className: "shrink-0",
|
|
91
92
|
tone: done ? "success" : tone,
|
|
92
|
-
icon: done ? /* @__PURE__ */
|
|
93
|
+
icon: done ? /* @__PURE__ */ jsx(Check, {}) : /* @__PURE__ */ jsx(Leading, {}),
|
|
93
94
|
label,
|
|
94
|
-
title: tooltip
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
95
|
+
title: tooltip,
|
|
96
|
+
children: /* @__PURE__ */ jsx(
|
|
97
|
+
"button",
|
|
98
|
+
{
|
|
99
|
+
type: "button",
|
|
100
|
+
onClick: (e) => {
|
|
101
|
+
e.stopPropagation();
|
|
102
|
+
copy(text, id);
|
|
103
|
+
}
|
|
103
104
|
}
|
|
104
|
-
|
|
105
|
-
|
|
105
|
+
)
|
|
106
|
+
}
|
|
106
107
|
);
|
|
107
108
|
}
|
|
108
109
|
function JsonView({
|
|
@@ -116,18 +117,31 @@ function JsonView({
|
|
|
116
117
|
if (data === null || data === void 0) return null;
|
|
117
118
|
const isSimple = typeof data === "string" || typeof data === "number" || typeof data === "boolean";
|
|
118
119
|
if (isSimple) {
|
|
119
|
-
return /* @__PURE__ */
|
|
120
|
+
return /* @__PURE__ */ jsxs("span", { className: "inline-flex items-center gap-1 text-[10px]", children: [
|
|
121
|
+
label && /* @__PURE__ */ jsxs("span", { className: "text-muted-foreground", children: [
|
|
122
|
+
label,
|
|
123
|
+
":"
|
|
124
|
+
] }),
|
|
125
|
+
/* @__PURE__ */ jsx("code", { className: "text-foreground/80 bg-muted/50 px-1 rounded max-w-[300px] truncate inline-block", children: String(data) }),
|
|
126
|
+
/* @__PURE__ */ jsx(CopyBtn, { text: String(data), id })
|
|
127
|
+
] });
|
|
120
128
|
}
|
|
121
|
-
return /* @__PURE__ */
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
129
|
+
return /* @__PURE__ */ jsxs("div", { className: "text-[10px]", children: [
|
|
130
|
+
/* @__PURE__ */ jsx(
|
|
131
|
+
DisclosureHeader,
|
|
132
|
+
{
|
|
133
|
+
className: "w-full",
|
|
134
|
+
open,
|
|
135
|
+
onClick: () => setOpen(!open),
|
|
136
|
+
title: label ?? "Value",
|
|
137
|
+
meta: !open ? json.length > 100 ? `${json.length} chars` : json.slice(0, 60) : void 0
|
|
138
|
+
}
|
|
139
|
+
),
|
|
140
|
+
open && /* @__PURE__ */ jsxs("div", { className: "relative mt-0.5 ml-2", children: [
|
|
141
|
+
/* @__PURE__ */ jsx(CopyBtn, { text: json, id, className: "absolute top-0 right-0" }),
|
|
142
|
+
/* @__PURE__ */ jsx("pre", { className: "bg-muted/30 border border-border/50 rounded p-1 text-[9px] overflow-x-auto whitespace-pre-wrap break-all max-h-[300px] overflow-y-auto font-mono", children: json })
|
|
143
|
+
] })
|
|
144
|
+
] });
|
|
131
145
|
}
|
|
132
146
|
const EVENT_COLORS = {
|
|
133
147
|
chunk: "bg-blue-500/20 text-blue-400 border-blue-500/30",
|
|
@@ -150,24 +164,24 @@ const EVENT_COLORS = {
|
|
|
150
164
|
context_analysis: "bg-slate-500/20 text-slate-400 border-slate-500/30"
|
|
151
165
|
};
|
|
152
166
|
const EVENT_ICONS = {
|
|
153
|
-
chunk: /* @__PURE__ */
|
|
154
|
-
reasoning_chunk: /* @__PURE__ */
|
|
155
|
-
phase: /* @__PURE__ */
|
|
156
|
-
init: /* @__PURE__ */
|
|
157
|
-
warning: /* @__PURE__ */
|
|
158
|
-
info: /* @__PURE__ */
|
|
159
|
-
data: /* @__PURE__ */
|
|
160
|
-
completion: /* @__PURE__ */
|
|
161
|
-
error: /* @__PURE__ */
|
|
162
|
-
tool_event: /* @__PURE__ */
|
|
163
|
-
heartbeat: /* @__PURE__ */
|
|
164
|
-
end: /* @__PURE__ */
|
|
165
|
-
render_block: /* @__PURE__ */
|
|
166
|
-
record_reserved: /* @__PURE__ */
|
|
167
|
-
record_update: /* @__PURE__ */
|
|
168
|
-
resource_changed: /* @__PURE__ */
|
|
169
|
-
structured_output: /* @__PURE__ */
|
|
170
|
-
context_analysis: /* @__PURE__ */
|
|
167
|
+
chunk: /* @__PURE__ */ jsx(FileText, { className: "h-2.5 w-2.5" }),
|
|
168
|
+
reasoning_chunk: /* @__PURE__ */ jsx(Brain, { className: "h-2.5 w-2.5" }),
|
|
169
|
+
phase: /* @__PURE__ */ jsx(Activity, { className: "h-2.5 w-2.5" }),
|
|
170
|
+
init: /* @__PURE__ */ jsx(Zap, { className: "h-2.5 w-2.5" }),
|
|
171
|
+
warning: /* @__PURE__ */ jsx(ShieldAlert, { className: "h-2.5 w-2.5" }),
|
|
172
|
+
info: /* @__PURE__ */ jsx(Info, { className: "h-2.5 w-2.5" }),
|
|
173
|
+
data: /* @__PURE__ */ jsx(Database, { className: "h-2.5 w-2.5" }),
|
|
174
|
+
completion: /* @__PURE__ */ jsx(BarChart3, { className: "h-2.5 w-2.5" }),
|
|
175
|
+
error: /* @__PURE__ */ jsx(AlertTriangle, { className: "h-2.5 w-2.5" }),
|
|
176
|
+
tool_event: /* @__PURE__ */ jsx(Wrench, { className: "h-2.5 w-2.5" }),
|
|
177
|
+
heartbeat: /* @__PURE__ */ jsx(Heart, { className: "h-2.5 w-2.5" }),
|
|
178
|
+
end: /* @__PURE__ */ jsx(Square, { className: "h-2.5 w-2.5" }),
|
|
179
|
+
render_block: /* @__PURE__ */ jsx(Layers, { className: "h-2.5 w-2.5" }),
|
|
180
|
+
record_reserved: /* @__PURE__ */ jsx(BookmarkPlus, { className: "h-2.5 w-2.5" }),
|
|
181
|
+
record_update: /* @__PURE__ */ jsx(RefreshCw, { className: "h-2.5 w-2.5" }),
|
|
182
|
+
resource_changed: /* @__PURE__ */ jsx(FilePlus2, { className: "h-2.5 w-2.5" }),
|
|
183
|
+
structured_output: /* @__PURE__ */ jsx(ListChecks, { className: "h-2.5 w-2.5" }),
|
|
184
|
+
context_analysis: /* @__PURE__ */ jsx(ScanSearch, { className: "h-2.5 w-2.5" })
|
|
171
185
|
};
|
|
172
186
|
const STATUS_COLORS = {
|
|
173
187
|
pending: "bg-gray-500/20 text-gray-400",
|
|
@@ -191,62 +205,124 @@ function StatusBar({
|
|
|
191
205
|
request,
|
|
192
206
|
instanceStatus
|
|
193
207
|
}) {
|
|
194
|
-
return /* @__PURE__ */
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
208
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 flex-wrap px-2 py-1.5 border-b border-border/50 bg-muted/20", children: [
|
|
209
|
+
/* @__PURE__ */ jsx("span", { className: "text-[10px] text-muted-foreground font-mono", children: "REQ" }),
|
|
210
|
+
/* @__PURE__ */ jsx(
|
|
211
|
+
Badge,
|
|
212
|
+
{
|
|
213
|
+
variant: "outline",
|
|
214
|
+
className: cn(
|
|
215
|
+
"text-[10px] px-1.5 py-0 h-5 font-mono",
|
|
216
|
+
STATUS_COLORS[request.status] ?? ""
|
|
217
|
+
),
|
|
218
|
+
children: request.status
|
|
219
|
+
}
|
|
220
|
+
),
|
|
221
|
+
instanceStatus && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
222
|
+
/* @__PURE__ */ jsx("span", { className: "text-[10px] text-muted-foreground font-mono", children: "INST" }),
|
|
223
|
+
/* @__PURE__ */ jsx(
|
|
224
|
+
Badge,
|
|
225
|
+
{
|
|
226
|
+
variant: "outline",
|
|
227
|
+
className: cn(
|
|
228
|
+
"text-[10px] px-1.5 py-0 h-5 font-mono",
|
|
229
|
+
INSTANCE_STATUS_COLORS[instanceStatus] ?? ""
|
|
230
|
+
),
|
|
231
|
+
children: instanceStatus
|
|
232
|
+
}
|
|
201
233
|
)
|
|
202
|
-
},
|
|
203
|
-
request.
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
234
|
+
] }),
|
|
235
|
+
request.currentPhase && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
236
|
+
/* @__PURE__ */ jsx("span", { className: "text-[10px] text-muted-foreground", children: "|" }),
|
|
237
|
+
/* @__PURE__ */ jsx(
|
|
238
|
+
Badge,
|
|
239
|
+
{
|
|
240
|
+
variant: "outline",
|
|
241
|
+
className: "text-[10px] px-1.5 py-0 h-5 bg-yellow-500/10 text-yellow-400",
|
|
242
|
+
children: request.currentPhase
|
|
243
|
+
}
|
|
211
244
|
)
|
|
212
|
-
},
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
+
] }),
|
|
246
|
+
request.error && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
247
|
+
/* @__PURE__ */ jsx("span", { className: "text-[10px] text-muted-foreground", children: "|" }),
|
|
248
|
+
/* @__PURE__ */ jsx(
|
|
249
|
+
Badge,
|
|
250
|
+
{
|
|
251
|
+
variant: "destructive",
|
|
252
|
+
className: "text-[10px] px-1.5 py-0 h-5 max-w-[60ch] truncate",
|
|
253
|
+
title: [
|
|
254
|
+
`error_type: ${request.error.error_type}`,
|
|
255
|
+
request.error.code ? `code: ${request.error.code}` : null,
|
|
256
|
+
`message: ${request.error.message}`,
|
|
257
|
+
request.error.user_message ? `user_message: ${request.error.user_message}` : null
|
|
258
|
+
].filter(Boolean).join("\n"),
|
|
259
|
+
children: `ERR [${request.error.error_type}${request.error.code ? `:${request.error.code}` : ""}]: ${request.error.message}`.slice(0, 80)
|
|
260
|
+
}
|
|
261
|
+
)
|
|
262
|
+
] }),
|
|
263
|
+
request.conversationId && /* @__PURE__ */ jsxs("span", { className: "text-[10px] text-muted-foreground font-mono ml-auto flex items-center gap-0.5", children: [
|
|
264
|
+
"conv:",
|
|
265
|
+
/* @__PURE__ */ jsxs(
|
|
266
|
+
EntityRef,
|
|
267
|
+
{
|
|
268
|
+
token: "conversation",
|
|
269
|
+
id: request.conversationId,
|
|
270
|
+
name: request.conversationId,
|
|
271
|
+
showIcon: false,
|
|
272
|
+
children: [
|
|
273
|
+
request.conversationId.slice(0, 8),
|
|
274
|
+
"..."
|
|
275
|
+
]
|
|
276
|
+
}
|
|
277
|
+
),
|
|
278
|
+
/* @__PURE__ */ jsx(CopyBtn, { text: request.conversationId, id: "conv-id" })
|
|
279
|
+
] })
|
|
280
|
+
] });
|
|
245
281
|
}
|
|
246
282
|
function MetricsBar({ metrics }) {
|
|
247
|
-
return /* @__PURE__ */
|
|
248
|
-
|
|
249
|
-
|
|
283
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 flex-wrap px-2 py-1 border-b border-border/50 bg-muted/10 text-[10px]", children: [
|
|
284
|
+
/* @__PURE__ */ jsxs("span", { className: "flex items-center gap-0.5 text-muted-foreground", children: [
|
|
285
|
+
/* @__PURE__ */ jsx(Clock, { className: "h-3 w-3" }),
|
|
286
|
+
" TTFT:"
|
|
287
|
+
] }),
|
|
288
|
+
/* @__PURE__ */ jsx("span", { className: "font-mono text-foreground/80", children: formatDurationMs(metrics.ttftMs, { style: "compact" }) }),
|
|
289
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground/40", children: "|" }),
|
|
290
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: "Stream:" }),
|
|
291
|
+
/* @__PURE__ */ jsx("span", { className: "font-mono text-foreground/80", children: formatDurationMs(metrics.streamDurationMs, { style: "compact" }) }),
|
|
292
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground/40", children: "|" }),
|
|
293
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: "Total:" }),
|
|
294
|
+
/* @__PURE__ */ jsx("span", { className: "font-mono text-foreground/80", children: formatDurationMs(metrics.totalClientDurationMs, {
|
|
295
|
+
style: "compact"
|
|
296
|
+
}) }),
|
|
297
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground/40", children: "|" }),
|
|
298
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: "Events:" }),
|
|
299
|
+
/* @__PURE__ */ jsx("span", { className: "font-mono text-foreground/80", children: metrics.totalEvents }),
|
|
300
|
+
/* @__PURE__ */ jsxs("span", { className: "text-[9px] text-muted-foreground/60", children: [
|
|
301
|
+
"(chunk:",
|
|
302
|
+
metrics.chunkEvents,
|
|
303
|
+
metrics.reasoningChunkEvents > 0 && ` reason:${metrics.reasoningChunkEvents}`,
|
|
304
|
+
" ",
|
|
305
|
+
"phase:",
|
|
306
|
+
metrics.phaseEvents,
|
|
307
|
+
metrics.initEvents > 0 && ` init:${metrics.initEvents}`,
|
|
308
|
+
metrics.completionEvents > 0 && ` comp:${metrics.completionEvents}`,
|
|
309
|
+
metrics.warningEvents > 0 && ` warn:${metrics.warningEvents}`,
|
|
310
|
+
metrics.infoEvents > 0 && ` info:${metrics.infoEvents}`,
|
|
311
|
+
" tool:",
|
|
312
|
+
metrics.toolEvents,
|
|
313
|
+
" data:",
|
|
314
|
+
metrics.dataEvents,
|
|
315
|
+
" block:",
|
|
316
|
+
metrics.renderBlockEvents,
|
|
317
|
+
metrics.recordReservedEvents > 0 && ` reserved:${metrics.recordReservedEvents}`,
|
|
318
|
+
metrics.recordUpdateEvents > 0 && ` updated:${metrics.recordUpdateEvents}`,
|
|
319
|
+
metrics.resourceChangedEvents > 0 && ` fs:${metrics.resourceChangedEvents}`,
|
|
320
|
+
" ",
|
|
321
|
+
"other:",
|
|
322
|
+
metrics.otherEvents,
|
|
323
|
+
")"
|
|
324
|
+
] })
|
|
325
|
+
] });
|
|
250
326
|
}
|
|
251
327
|
function getTimelineColor(kind) {
|
|
252
328
|
const map = {
|
|
@@ -294,9 +370,9 @@ function getTimelineIcon(kind) {
|
|
|
294
370
|
record_update: EVENT_ICONS.record_update,
|
|
295
371
|
resource_changed: EVENT_ICONS.resource_changed,
|
|
296
372
|
structured_output: EVENT_ICONS.structured_output,
|
|
297
|
-
unknown: /* @__PURE__ */
|
|
373
|
+
unknown: /* @__PURE__ */ jsx(AlertTriangle, { className: "h-2.5 w-2.5" })
|
|
298
374
|
};
|
|
299
|
-
return map[kind] ?? /* @__PURE__ */
|
|
375
|
+
return map[kind] ?? /* @__PURE__ */ jsx(CircleDot, { className: "h-2.5 w-2.5" });
|
|
300
376
|
}
|
|
301
377
|
function timelineSummary(entry, renderBlocks, renderBlockOrder, reasoningChunks) {
|
|
302
378
|
switch (entry.kind) {
|
|
@@ -419,59 +495,74 @@ function TimelineRow({
|
|
|
419
495
|
renderBlockOrder,
|
|
420
496
|
reasoningChunks
|
|
421
497
|
);
|
|
422
|
-
return /* @__PURE__ */
|
|
498
|
+
return /* @__PURE__ */ jsxs(
|
|
423
499
|
"div",
|
|
424
500
|
{
|
|
425
501
|
className: cn(
|
|
426
502
|
"border-b border-border/20 hover:bg-muted/20 transition-colors",
|
|
427
503
|
expanded && "bg-muted/10"
|
|
428
|
-
)
|
|
429
|
-
},
|
|
430
|
-
/* @__PURE__ */ React.createElement(
|
|
431
|
-
"div",
|
|
432
|
-
{
|
|
433
|
-
role: "button",
|
|
434
|
-
tabIndex: 0,
|
|
435
|
-
onClick: () => setLocalExpanded(!localExpanded),
|
|
436
|
-
onKeyDown: (e) => e.key === "Enter" || e.key === " " ? setLocalExpanded(!localExpanded) : void 0,
|
|
437
|
-
className: "w-full flex items-center gap-1.5 px-2 py-1 text-left cursor-pointer"
|
|
438
|
-
},
|
|
439
|
-
/* @__PURE__ */ React.createElement("span", { className: "text-[10px] font-mono text-muted-foreground/60 w-7 shrink-0 text-right" }, entry.seq),
|
|
440
|
-
/* @__PURE__ */ React.createElement("span", { className: "text-[10px] font-mono text-muted-foreground/80 w-16 shrink-0 text-right" }, relativeMs.toFixed(0), "ms"),
|
|
441
|
-
/* @__PURE__ */ React.createElement(
|
|
442
|
-
Badge,
|
|
443
|
-
{
|
|
444
|
-
variant: "outline",
|
|
445
|
-
className: cn(
|
|
446
|
-
"text-[10px] px-1.5 py-0 h-5 gap-0.5 shrink-0 border",
|
|
447
|
-
colorClass
|
|
448
|
-
)
|
|
449
|
-
},
|
|
450
|
-
icon,
|
|
451
|
-
humanizeIdentifier(entry.kind)
|
|
452
|
-
),
|
|
453
|
-
entry.kind === "tool_event" && /* @__PURE__ */ React.createElement(
|
|
454
|
-
Badge,
|
|
455
|
-
{
|
|
456
|
-
variant: "outline",
|
|
457
|
-
className: cn(
|
|
458
|
-
"text-[10px] px-1.5 py-0 h-5 shrink-0 border",
|
|
459
|
-
colorClass
|
|
460
|
-
)
|
|
461
|
-
},
|
|
462
|
-
entry.data.event
|
|
463
504
|
),
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
505
|
+
children: [
|
|
506
|
+
/* @__PURE__ */ jsxs(
|
|
507
|
+
"div",
|
|
508
|
+
{
|
|
509
|
+
role: "button",
|
|
510
|
+
tabIndex: 0,
|
|
511
|
+
onClick: () => setLocalExpanded(!localExpanded),
|
|
512
|
+
onKeyDown: (e) => e.key === "Enter" || e.key === " " ? setLocalExpanded(!localExpanded) : void 0,
|
|
513
|
+
className: "w-full flex items-center gap-1.5 px-2 py-1 text-left cursor-pointer",
|
|
514
|
+
children: [
|
|
515
|
+
/* @__PURE__ */ jsx("span", { className: "text-[10px] font-mono text-muted-foreground/60 w-7 shrink-0 text-right", children: entry.seq }),
|
|
516
|
+
/* @__PURE__ */ jsxs("span", { className: "text-[10px] font-mono text-muted-foreground/80 w-16 shrink-0 text-right", children: [
|
|
517
|
+
relativeMs.toFixed(0),
|
|
518
|
+
"ms"
|
|
519
|
+
] }),
|
|
520
|
+
/* @__PURE__ */ jsxs(
|
|
521
|
+
Badge,
|
|
522
|
+
{
|
|
523
|
+
variant: "outline",
|
|
524
|
+
className: cn(
|
|
525
|
+
"text-[10px] px-1.5 py-0 h-5 gap-0.5 shrink-0 border",
|
|
526
|
+
colorClass
|
|
527
|
+
),
|
|
528
|
+
children: [
|
|
529
|
+
icon,
|
|
530
|
+
humanizeIdentifier(entry.kind)
|
|
531
|
+
]
|
|
532
|
+
}
|
|
533
|
+
),
|
|
534
|
+
entry.kind === "tool_event" && /* @__PURE__ */ jsx(
|
|
535
|
+
Badge,
|
|
536
|
+
{
|
|
537
|
+
variant: "outline",
|
|
538
|
+
className: cn(
|
|
539
|
+
"text-[10px] px-1.5 py-0 h-5 shrink-0 border",
|
|
540
|
+
colorClass
|
|
541
|
+
),
|
|
542
|
+
children: entry.data.event
|
|
543
|
+
}
|
|
544
|
+
),
|
|
545
|
+
/* @__PURE__ */ jsx("span", { className: "flex-1 text-[10px] text-muted-foreground/60 truncate font-mono", children: summary }),
|
|
546
|
+
/* @__PURE__ */ jsx(CopyBtn, { text: json, id: `tl-${entry.seq}` }),
|
|
547
|
+
expanded ? /* @__PURE__ */ jsx(ChevronDown, { className: "h-3 w-3 text-muted-foreground shrink-0" }) : /* @__PURE__ */ jsx(ChevronRight, { className: "h-3 w-3 text-muted-foreground shrink-0" })
|
|
548
|
+
]
|
|
549
|
+
}
|
|
550
|
+
),
|
|
551
|
+
expanded && /* @__PURE__ */ jsxs("div", { className: "px-1.5 pb-1 ml-[90px]", children: [
|
|
552
|
+
entry.kind === "text_end" && /* @__PURE__ */ jsxs("div", { className: "mb-1", children: [
|
|
553
|
+
/* @__PURE__ */ jsx("pre", { className: "text-[9px] font-mono bg-muted/30 border border-border/50 rounded p-1 whitespace-pre-wrap break-all max-h-[200px] overflow-y-auto", children: renderBlockOrder.slice(entry.blockStartIndex, entry.blockEndIndex).map((id) => renderBlocks[id]?.content ?? "").join("") }),
|
|
554
|
+
/* @__PURE__ */ jsx(
|
|
555
|
+
CopyBtn,
|
|
556
|
+
{
|
|
557
|
+
text: renderBlockOrder.slice(entry.blockStartIndex, entry.blockEndIndex).map((id) => renderBlocks[id]?.content ?? "").join(""),
|
|
558
|
+
id: `tl-text-${entry.seq}`
|
|
559
|
+
}
|
|
560
|
+
)
|
|
561
|
+
] }),
|
|
562
|
+
/* @__PURE__ */ jsx(JsonView, { data: entry, id: `tl-data-${entry.seq}` })
|
|
563
|
+
] })
|
|
564
|
+
]
|
|
565
|
+
}
|
|
475
566
|
);
|
|
476
567
|
}
|
|
477
568
|
function ToolLifecycleRow({ tool }) {
|
|
@@ -483,45 +574,66 @@ function ToolLifecycleRow({ tool }) {
|
|
|
483
574
|
completed: "bg-green-500/20 text-green-400",
|
|
484
575
|
error: "bg-red-500/20 text-red-400"
|
|
485
576
|
};
|
|
486
|
-
return /* @__PURE__ */
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
577
|
+
return /* @__PURE__ */ jsxs("div", { className: "border-b border-border/20 px-1.5 py-0.5", children: [
|
|
578
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1 flex-wrap", children: [
|
|
579
|
+
/* @__PURE__ */ jsx(
|
|
580
|
+
Badge,
|
|
581
|
+
{
|
|
582
|
+
variant: "outline",
|
|
583
|
+
className: cn(
|
|
584
|
+
"text-[9px] px-1 py-0 h-4",
|
|
585
|
+
statusColor[tool.status] ?? ""
|
|
586
|
+
),
|
|
587
|
+
children: tool.status
|
|
588
|
+
}
|
|
589
|
+
),
|
|
590
|
+
/* @__PURE__ */ jsx("span", { className: "text-[10px] font-medium text-foreground/80", children: humanizeIdentifier(tool.toolName) }),
|
|
591
|
+
/* @__PURE__ */ jsx("span", { className: "text-[8px] font-mono text-muted-foreground/60", children: tool.callId.slice(0, 12) }),
|
|
592
|
+
tool.isDelegated && /* @__PURE__ */ jsx(
|
|
593
|
+
Badge,
|
|
594
|
+
{
|
|
595
|
+
variant: "outline",
|
|
596
|
+
className: "text-[8px] px-0.5 py-0 h-3 bg-orange-500/10 text-orange-400",
|
|
597
|
+
children: "delegated"
|
|
598
|
+
}
|
|
599
|
+
),
|
|
600
|
+
/* @__PURE__ */ jsx(
|
|
601
|
+
CopyBtn,
|
|
602
|
+
{
|
|
603
|
+
text: JSON.stringify(tool, null, 2),
|
|
604
|
+
id: `tool-${tool.callId}`,
|
|
605
|
+
className: "ml-auto"
|
|
606
|
+
}
|
|
493
607
|
)
|
|
494
|
-
},
|
|
495
|
-
tool.
|
|
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
|
-
), tool.resultPreview && /* @__PURE__ */ React.createElement("div", { className: "text-[9px] text-muted-foreground ml-2" }, "Preview: ", tool.resultPreview), tool.errorMessage && /* @__PURE__ */ React.createElement("div", { className: "text-[9px] text-red-400 ml-2" }, tool.errorType, ": ", tool.errorMessage, /* @__PURE__ */ React.createElement(ErrorAlchemyMenu, { error: tool.errorType })));
|
|
608
|
+
] }),
|
|
609
|
+
tool.latestMessage && /* @__PURE__ */ jsx("p", { className: "text-[9px] text-muted-foreground ml-2 mt-0.5", children: tool.latestMessage }),
|
|
610
|
+
tool.arguments && Object.keys(tool.arguments).length > 0 && /* @__PURE__ */ jsx(
|
|
611
|
+
JsonView,
|
|
612
|
+
{
|
|
613
|
+
data: tool.arguments,
|
|
614
|
+
label: "args",
|
|
615
|
+
id: `tool-args-${tool.callId}`
|
|
616
|
+
}
|
|
617
|
+
),
|
|
618
|
+
tool.result !== null && /* @__PURE__ */ jsx(
|
|
619
|
+
JsonView,
|
|
620
|
+
{
|
|
621
|
+
data: tool.result,
|
|
622
|
+
label: "result",
|
|
623
|
+
id: `tool-result-${tool.callId}`
|
|
624
|
+
}
|
|
625
|
+
),
|
|
626
|
+
tool.resultPreview && /* @__PURE__ */ jsxs("div", { className: "text-[9px] text-muted-foreground ml-2", children: [
|
|
627
|
+
"Preview: ",
|
|
628
|
+
tool.resultPreview
|
|
629
|
+
] }),
|
|
630
|
+
tool.errorMessage && /* @__PURE__ */ jsxs("div", { className: "text-[9px] text-red-400 ml-2", children: [
|
|
631
|
+
tool.errorType,
|
|
632
|
+
": ",
|
|
633
|
+
tool.errorMessage,
|
|
634
|
+
/* @__PURE__ */ jsx(ErrorAlchemyMenu, { error: tool.errorType })
|
|
635
|
+
] })
|
|
636
|
+
] });
|
|
525
637
|
}
|
|
526
638
|
function ContentBlockRow({ block }) {
|
|
527
639
|
const statusColor = {
|
|
@@ -529,48 +641,67 @@ function ContentBlockRow({ block }) {
|
|
|
529
641
|
complete: "bg-green-500/20 text-green-400",
|
|
530
642
|
error: "bg-red-500/20 text-red-400"
|
|
531
643
|
};
|
|
532
|
-
return /* @__PURE__ */
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
644
|
+
return /* @__PURE__ */ jsxs("div", { className: "border-b border-border/20 px-1.5 py-0.5", children: [
|
|
645
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1", children: [
|
|
646
|
+
/* @__PURE__ */ jsx(
|
|
647
|
+
Badge,
|
|
648
|
+
{
|
|
649
|
+
variant: "outline",
|
|
650
|
+
className: cn(
|
|
651
|
+
"text-[9px] px-1 py-0 h-4",
|
|
652
|
+
statusColor[block.status] ?? ""
|
|
653
|
+
),
|
|
654
|
+
children: block.status
|
|
655
|
+
}
|
|
656
|
+
),
|
|
657
|
+
/* @__PURE__ */ jsx("span", { className: "text-[10px] font-medium text-foreground/80", children: block.type }),
|
|
658
|
+
/* @__PURE__ */ jsxs("span", { className: "text-[8px] font-mono text-muted-foreground/60", children: [
|
|
659
|
+
"#",
|
|
660
|
+
block.blockIndex,
|
|
661
|
+
" ",
|
|
662
|
+
block.blockId.slice(0, 12)
|
|
663
|
+
] }),
|
|
664
|
+
/* @__PURE__ */ jsx(
|
|
665
|
+
CopyBtn,
|
|
666
|
+
{
|
|
667
|
+
text: JSON.stringify(block, null, 2),
|
|
668
|
+
id: `block-${block.blockId}`,
|
|
669
|
+
className: "ml-auto"
|
|
670
|
+
}
|
|
539
671
|
)
|
|
540
|
-
},
|
|
541
|
-
block.
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
data: block.metadata,
|
|
560
|
-
label: "meta",
|
|
561
|
-
id: `block-meta-${block.blockId}`
|
|
562
|
-
}
|
|
563
|
-
));
|
|
672
|
+
] }),
|
|
673
|
+
block.content && /* @__PURE__ */ jsx("pre", { className: "text-[9px] text-muted-foreground ml-2 mt-0.5 whitespace-pre-wrap break-all max-h-[100px] overflow-y-auto font-mono", children: block.content }),
|
|
674
|
+
block.data && /* @__PURE__ */ jsx(
|
|
675
|
+
JsonView,
|
|
676
|
+
{
|
|
677
|
+
data: block.data,
|
|
678
|
+
label: "data",
|
|
679
|
+
id: `block-data-${block.blockId}`
|
|
680
|
+
}
|
|
681
|
+
),
|
|
682
|
+
block.metadata && /* @__PURE__ */ jsx(
|
|
683
|
+
JsonView,
|
|
684
|
+
{
|
|
685
|
+
data: block.metadata,
|
|
686
|
+
label: "meta",
|
|
687
|
+
id: `block-meta-${block.blockId}`
|
|
688
|
+
}
|
|
689
|
+
)
|
|
690
|
+
] });
|
|
564
691
|
}
|
|
565
692
|
function PhaseHistoryRow({ phase, idx }) {
|
|
566
|
-
return /* @__PURE__ */
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
693
|
+
return /* @__PURE__ */ jsxs("div", { className: "border-b border-border/20 px-1.5 py-0.5 flex items-center gap-1", children: [
|
|
694
|
+
/* @__PURE__ */ jsx("span", { className: "text-[9px] font-mono text-muted-foreground/60 w-4 text-right", children: idx + 1 }),
|
|
695
|
+
/* @__PURE__ */ jsx(
|
|
696
|
+
Badge,
|
|
697
|
+
{
|
|
698
|
+
variant: "outline",
|
|
699
|
+
className: "text-[9px] px-1 py-0 h-4 bg-yellow-500/10 text-yellow-400",
|
|
700
|
+
children: phase
|
|
701
|
+
}
|
|
702
|
+
),
|
|
703
|
+
/* @__PURE__ */ jsx(CopyBtn, { text: phase, id: `phase-${idx}`, className: "ml-auto" })
|
|
704
|
+
] });
|
|
574
705
|
}
|
|
575
706
|
const ALL_TIMELINE_KINDS = [
|
|
576
707
|
"text_start",
|
|
@@ -598,25 +729,30 @@ function TimelineFilterBar({
|
|
|
598
729
|
onToggle,
|
|
599
730
|
counts
|
|
600
731
|
}) {
|
|
601
|
-
return /* @__PURE__ */
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
732
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1 flex-wrap px-2 py-1 border-b border-border/50 shrink-0", children: [
|
|
733
|
+
/* @__PURE__ */ jsx(Filter, { className: "h-3.5 w-3.5 text-muted-foreground mr-0.5" }),
|
|
734
|
+
ALL_TIMELINE_KINDS.map((kind) => {
|
|
735
|
+
const active = activeFilters.has(kind);
|
|
736
|
+
const count = counts[kind] ?? 0;
|
|
737
|
+
return /* @__PURE__ */ jsxs(
|
|
738
|
+
"button",
|
|
739
|
+
{
|
|
740
|
+
type: "button",
|
|
741
|
+
onClick: () => onToggle(kind),
|
|
742
|
+
className: cn(
|
|
743
|
+
"inline-flex items-center gap-0.5 text-[10px] px-1.5 py-0 h-5 rounded border transition-colors",
|
|
744
|
+
active ? getTimelineColor(kind) : "bg-muted/20 text-muted-foreground/40 border-transparent hover:border-border/50"
|
|
745
|
+
),
|
|
746
|
+
children: [
|
|
747
|
+
getTimelineIcon(kind),
|
|
748
|
+
kind.replace("_", " "),
|
|
749
|
+
count > 0 && /* @__PURE__ */ jsx("span", { className: "font-mono ml-0.5", children: count })
|
|
750
|
+
]
|
|
751
|
+
},
|
|
752
|
+
kind
|
|
753
|
+
);
|
|
754
|
+
})
|
|
755
|
+
] });
|
|
620
756
|
}
|
|
621
757
|
function TimelineTab({ request }) {
|
|
622
758
|
const [filters, setFilters] = useState(
|
|
@@ -657,259 +793,469 @@ function TimelineTab({ request }) {
|
|
|
657
793
|
}
|
|
658
794
|
prevLengthRef.current = filtered.length;
|
|
659
795
|
}, [filtered.length, autoScroll]);
|
|
660
|
-
return /* @__PURE__ */
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
activeFilters: filters,
|
|
664
|
-
onToggle: toggleFilter,
|
|
665
|
-
counts
|
|
666
|
-
}
|
|
667
|
-
), /* @__PURE__ */ React.createElement("div", { className: "flex shrink-0 items-center gap-1.5 px-2 py-1 border-b border-border/30 text-[10px] text-muted-foreground flex-wrap" }, /* @__PURE__ */ React.createElement("span", null, filtered.length, " of ", request.timeline.length, " entries"), request.isTextStreaming && /* @__PURE__ */ React.createElement(
|
|
668
|
-
Badge,
|
|
669
|
-
{
|
|
670
|
-
variant: "outline",
|
|
671
|
-
className: "text-[9px] px-1.5 py-0 h-4 bg-blue-500/10 text-blue-400 animate-pulse"
|
|
672
|
-
},
|
|
673
|
-
"STREAMING TEXT"
|
|
674
|
-
), /* @__PURE__ */ React.createElement(
|
|
675
|
-
Chip,
|
|
676
|
-
{
|
|
677
|
-
asChild: true,
|
|
678
|
-
className: "ml-auto",
|
|
679
|
-
pressed: allExpanded,
|
|
680
|
-
tone: "violet",
|
|
681
|
-
label: allExpanded ? "collapse all" : "expand all"
|
|
682
|
-
},
|
|
683
|
-
/* @__PURE__ */ React.createElement("button", { type: "button", onClick: () => setAllExpanded(!allExpanded) })
|
|
684
|
-
), /* @__PURE__ */ React.createElement(
|
|
685
|
-
Chip,
|
|
686
|
-
{
|
|
687
|
-
asChild: true,
|
|
688
|
-
pressed: autoScroll,
|
|
689
|
-
tone: "blue",
|
|
690
|
-
label: `auto-scroll ${autoScroll ? "ON" : "OFF"}`
|
|
691
|
-
},
|
|
692
|
-
/* @__PURE__ */ React.createElement("button", { type: "button", onClick: () => setAutoScroll(!autoScroll) })
|
|
693
|
-
), /* @__PURE__ */ React.createElement("div", { className: "flex items-center gap-1 shrink-0 flex-wrap border-l border-border/40 pl-1.5 ml-1" }, /* @__PURE__ */ React.createElement(
|
|
694
|
-
TimelineCopyChip,
|
|
695
|
-
{
|
|
696
|
-
id: "full-timeline-proj",
|
|
697
|
-
label: "all \xB7 tl",
|
|
698
|
-
tooltip: "Copy full timeline (projection only \u2014 TimelineEntry[])",
|
|
699
|
-
LeadingIcon: FileText,
|
|
700
|
-
tone: "sky",
|
|
701
|
-
text: JSON.stringify(request.timeline, null, 2)
|
|
702
|
-
}
|
|
703
|
-
), /* @__PURE__ */ React.createElement(
|
|
704
|
-
TimelineCopyChip,
|
|
705
|
-
{
|
|
706
|
-
id: "full-timeline-paired",
|
|
707
|
-
label: "all \xB7 +raw",
|
|
708
|
-
tooltip: "Copy full timeline with paired raw stream rows per timestamp (where available)",
|
|
709
|
-
LeadingIcon: Layers,
|
|
710
|
-
tone: "sky",
|
|
711
|
-
text: JSON.stringify(
|
|
712
|
-
timelineWithRawPairs(request.timeline),
|
|
713
|
-
null,
|
|
714
|
-
2
|
|
715
|
-
)
|
|
716
|
-
}
|
|
717
|
-
), /* @__PURE__ */ React.createElement(
|
|
718
|
-
"span",
|
|
719
|
-
{
|
|
720
|
-
"aria-hidden": true,
|
|
721
|
-
className: "w-px h-4 shrink-0 bg-border/45 self-center"
|
|
722
|
-
}
|
|
723
|
-
), /* @__PURE__ */ React.createElement(
|
|
724
|
-
TimelineCopyChip,
|
|
725
|
-
{
|
|
726
|
-
id: "filtered-timeline-proj",
|
|
727
|
-
label: "view \xB7 tl",
|
|
728
|
-
tooltip: "Copy filtered/visible timeline projection only (TimelineEntry[])",
|
|
729
|
-
LeadingIcon: FileText,
|
|
730
|
-
tone: "violet",
|
|
731
|
-
text: JSON.stringify(filtered, null, 2)
|
|
732
|
-
}
|
|
733
|
-
), /* @__PURE__ */ React.createElement(
|
|
734
|
-
TimelineCopyChip,
|
|
735
|
-
{
|
|
736
|
-
id: "filtered-timeline-paired",
|
|
737
|
-
label: "view \xB7 +raw",
|
|
738
|
-
tooltip: "Copy filtered timeline rows paired with matching raw stream events",
|
|
739
|
-
LeadingIcon: Layers,
|
|
740
|
-
tone: "violet",
|
|
741
|
-
text: JSON.stringify(timelineWithRawPairs(filtered), null, 2)
|
|
742
|
-
}
|
|
743
|
-
), /* @__PURE__ */ React.createElement(
|
|
744
|
-
"span",
|
|
745
|
-
{
|
|
746
|
-
"aria-hidden": true,
|
|
747
|
-
className: "w-px h-4 shrink-0 bg-border/45 self-center"
|
|
748
|
-
}
|
|
749
|
-
), /* @__PURE__ */ React.createElement(
|
|
750
|
-
TimelineCopyChip,
|
|
751
|
-
{
|
|
752
|
-
id: "all-raw-events",
|
|
753
|
-
label: "raw \xB7 dump",
|
|
754
|
-
tooltip: "Copy full rawEvents array (unedited stream capture)",
|
|
755
|
-
LeadingIcon: Radio,
|
|
756
|
-
tone: "cyan",
|
|
757
|
-
text: JSON.stringify(request.rawEvents, null, 2)
|
|
758
|
-
}
|
|
759
|
-
))), /* @__PURE__ */ React.createElement(
|
|
760
|
-
"div",
|
|
761
|
-
{
|
|
762
|
-
ref: scrollRef,
|
|
763
|
-
className: "flex-1 overflow-y-auto overflow-x-hidden min-h-0 pb-2"
|
|
764
|
-
},
|
|
765
|
-
filtered.map((entry, idx) => /* @__PURE__ */ React.createElement(
|
|
766
|
-
TimelineRow,
|
|
796
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col flex-1 min-h-0 h-full", children: [
|
|
797
|
+
/* @__PURE__ */ jsx(
|
|
798
|
+
TimelineFilterBar,
|
|
767
799
|
{
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
renderBlocks: request.renderBlocks,
|
|
772
|
-
renderBlockOrder: request.renderBlockOrder,
|
|
773
|
-
reasoningChunks: request.reasoningChunks,
|
|
774
|
-
forceExpanded: allExpanded,
|
|
775
|
-
rawEvent: rawByTimestamp.get(entry.timestamp)
|
|
800
|
+
activeFilters: filters,
|
|
801
|
+
onToggle: toggleFilter,
|
|
802
|
+
counts
|
|
776
803
|
}
|
|
777
|
-
)),
|
|
778
|
-
filtered.length === 0 && /* @__PURE__ */ React.createElement("div", { className: "text-[11px] text-muted-foreground/60 text-center py-4" }, request.timeline.length === 0 ? "No events yet \u2014 waiting for stream..." : "No entries match current filters")
|
|
779
|
-
));
|
|
780
|
-
}
|
|
781
|
-
function ToolsTab({ request }) {
|
|
782
|
-
const tools = Object.values(request.toolLifecycle);
|
|
783
|
-
return /* @__PURE__ */ React.createElement(DebugTabScroll, null, tools.length === 0 && /* @__PURE__ */ React.createElement("div", { className: "text-[10px] text-muted-foreground/60 text-center py-4" }, "No tool events"), tools.map((tool) => /* @__PURE__ */ React.createElement(ToolLifecycleRow, { key: tool.callId, tool })), request.pendingToolCalls.length > 0 && /* @__PURE__ */ React.createElement("div", { className: "px-1.5 py-1 border-t border-border/30" }, /* @__PURE__ */ React.createElement("span", { className: "text-[9px] text-muted-foreground font-medium" }, "Pending Tool Calls (", request.pendingToolCalls.length, ")"), request.pendingToolCalls.map((tc) => /* @__PURE__ */ React.createElement(
|
|
784
|
-
"div",
|
|
785
|
-
{
|
|
786
|
-
key: tc.callId,
|
|
787
|
-
className: "flex items-center gap-1 ml-2 text-[9px]"
|
|
788
|
-
},
|
|
789
|
-
/* @__PURE__ */ React.createElement(
|
|
790
|
-
Badge,
|
|
791
|
-
{
|
|
792
|
-
variant: "outline",
|
|
793
|
-
className: cn(
|
|
794
|
-
"text-[8px] px-0.5 py-0 h-3",
|
|
795
|
-
tc.resolved ? "bg-green-500/10 text-green-400" : "bg-orange-500/10 text-orange-400"
|
|
796
|
-
)
|
|
797
|
-
},
|
|
798
|
-
tc.resolved ? "resolved" : "pending"
|
|
799
804
|
),
|
|
800
|
-
/* @__PURE__ */
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
805
|
+
/* @__PURE__ */ jsxs("div", { className: "flex shrink-0 items-center gap-1.5 px-2 py-1 border-b border-border/30 text-[10px] text-muted-foreground flex-wrap", children: [
|
|
806
|
+
/* @__PURE__ */ jsxs("span", { children: [
|
|
807
|
+
filtered.length,
|
|
808
|
+
" of ",
|
|
809
|
+
request.timeline.length,
|
|
810
|
+
" entries"
|
|
811
|
+
] }),
|
|
812
|
+
request.isTextStreaming && /* @__PURE__ */ jsx(
|
|
813
|
+
Badge,
|
|
814
|
+
{
|
|
815
|
+
variant: "outline",
|
|
816
|
+
className: "text-[9px] px-1.5 py-0 h-4 bg-blue-500/10 text-blue-400 animate-pulse",
|
|
817
|
+
children: "STREAMING TEXT"
|
|
818
|
+
}
|
|
819
|
+
),
|
|
820
|
+
/* @__PURE__ */ jsx(
|
|
821
|
+
Chip,
|
|
822
|
+
{
|
|
823
|
+
asChild: true,
|
|
824
|
+
className: "ml-auto",
|
|
825
|
+
pressed: allExpanded,
|
|
826
|
+
tone: "violet",
|
|
827
|
+
label: allExpanded ? "collapse all" : "expand all",
|
|
828
|
+
children: /* @__PURE__ */ jsx("button", { type: "button", onClick: () => setAllExpanded(!allExpanded) })
|
|
829
|
+
}
|
|
830
|
+
),
|
|
831
|
+
/* @__PURE__ */ jsx(
|
|
832
|
+
Chip,
|
|
833
|
+
{
|
|
834
|
+
asChild: true,
|
|
835
|
+
pressed: autoScroll,
|
|
836
|
+
tone: "blue",
|
|
837
|
+
label: `auto-scroll ${autoScroll ? "ON" : "OFF"}`,
|
|
838
|
+
children: /* @__PURE__ */ jsx("button", { type: "button", onClick: () => setAutoScroll(!autoScroll) })
|
|
839
|
+
}
|
|
840
|
+
),
|
|
841
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1 shrink-0 flex-wrap border-l border-border/40 pl-1.5 ml-1", children: [
|
|
842
|
+
/* @__PURE__ */ jsx(
|
|
843
|
+
TimelineCopyChip,
|
|
844
|
+
{
|
|
845
|
+
id: "full-timeline-proj",
|
|
846
|
+
label: "all \xB7 tl",
|
|
847
|
+
tooltip: "Copy full timeline (projection only \u2014 TimelineEntry[])",
|
|
848
|
+
LeadingIcon: FileText,
|
|
849
|
+
tone: "sky",
|
|
850
|
+
text: JSON.stringify(request.timeline, null, 2)
|
|
851
|
+
}
|
|
852
|
+
),
|
|
853
|
+
/* @__PURE__ */ jsx(
|
|
854
|
+
TimelineCopyChip,
|
|
855
|
+
{
|
|
856
|
+
id: "full-timeline-paired",
|
|
857
|
+
label: "all \xB7 +raw",
|
|
858
|
+
tooltip: "Copy full timeline with paired raw stream rows per timestamp (where available)",
|
|
859
|
+
LeadingIcon: Layers,
|
|
860
|
+
tone: "sky",
|
|
861
|
+
text: JSON.stringify(
|
|
862
|
+
timelineWithRawPairs(request.timeline),
|
|
863
|
+
null,
|
|
864
|
+
2
|
|
865
|
+
)
|
|
866
|
+
}
|
|
867
|
+
),
|
|
868
|
+
/* @__PURE__ */ jsx(
|
|
869
|
+
"span",
|
|
870
|
+
{
|
|
871
|
+
"aria-hidden": true,
|
|
872
|
+
className: "w-px h-4 shrink-0 bg-border/45 self-center"
|
|
873
|
+
}
|
|
874
|
+
),
|
|
875
|
+
/* @__PURE__ */ jsx(
|
|
876
|
+
TimelineCopyChip,
|
|
877
|
+
{
|
|
878
|
+
id: "filtered-timeline-proj",
|
|
879
|
+
label: "view \xB7 tl",
|
|
880
|
+
tooltip: "Copy filtered/visible timeline projection only (TimelineEntry[])",
|
|
881
|
+
LeadingIcon: FileText,
|
|
882
|
+
tone: "violet",
|
|
883
|
+
text: JSON.stringify(filtered, null, 2)
|
|
884
|
+
}
|
|
885
|
+
),
|
|
886
|
+
/* @__PURE__ */ jsx(
|
|
887
|
+
TimelineCopyChip,
|
|
888
|
+
{
|
|
889
|
+
id: "filtered-timeline-paired",
|
|
890
|
+
label: "view \xB7 +raw",
|
|
891
|
+
tooltip: "Copy filtered timeline rows paired with matching raw stream events",
|
|
892
|
+
LeadingIcon: Layers,
|
|
893
|
+
tone: "violet",
|
|
894
|
+
text: JSON.stringify(timelineWithRawPairs(filtered), null, 2)
|
|
895
|
+
}
|
|
896
|
+
),
|
|
897
|
+
/* @__PURE__ */ jsx(
|
|
898
|
+
"span",
|
|
899
|
+
{
|
|
900
|
+
"aria-hidden": true,
|
|
901
|
+
className: "w-px h-4 shrink-0 bg-border/45 self-center"
|
|
902
|
+
}
|
|
903
|
+
),
|
|
904
|
+
/* @__PURE__ */ jsx(
|
|
905
|
+
TimelineCopyChip,
|
|
906
|
+
{
|
|
907
|
+
id: "all-raw-events",
|
|
908
|
+
label: "raw \xB7 dump",
|
|
909
|
+
tooltip: "Copy full rawEvents array (unedited stream capture)",
|
|
910
|
+
LeadingIcon: Radio,
|
|
911
|
+
tone: "cyan",
|
|
912
|
+
text: JSON.stringify(request.rawEvents, null, 2)
|
|
913
|
+
}
|
|
914
|
+
)
|
|
915
|
+
] })
|
|
916
|
+
] }),
|
|
917
|
+
/* @__PURE__ */ jsxs(
|
|
918
|
+
"div",
|
|
804
919
|
{
|
|
805
|
-
|
|
806
|
-
|
|
920
|
+
ref: scrollRef,
|
|
921
|
+
className: "flex-1 overflow-y-auto overflow-x-hidden min-h-0 pb-2",
|
|
922
|
+
children: [
|
|
923
|
+
filtered.map((entry, idx) => /* @__PURE__ */ jsx(
|
|
924
|
+
TimelineRow,
|
|
925
|
+
{
|
|
926
|
+
entry,
|
|
927
|
+
baseTime,
|
|
928
|
+
renderBlocks: request.renderBlocks,
|
|
929
|
+
renderBlockOrder: request.renderBlockOrder,
|
|
930
|
+
reasoningChunks: request.reasoningChunks,
|
|
931
|
+
forceExpanded: allExpanded,
|
|
932
|
+
rawEvent: rawByTimestamp.get(entry.timestamp)
|
|
933
|
+
},
|
|
934
|
+
`${entry.seq}-${idx}`
|
|
935
|
+
)),
|
|
936
|
+
filtered.length === 0 && /* @__PURE__ */ jsx("div", { className: "text-[11px] text-muted-foreground/60 text-center py-4", children: request.timeline.length === 0 ? "No events yet \u2014 waiting for stream..." : "No entries match current filters" })
|
|
937
|
+
]
|
|
807
938
|
}
|
|
808
939
|
)
|
|
809
|
-
)
|
|
940
|
+
] });
|
|
941
|
+
}
|
|
942
|
+
function ToolsTab({ request }) {
|
|
943
|
+
const tools = Object.values(request.toolLifecycle);
|
|
944
|
+
return /* @__PURE__ */ jsxs(DebugTabScroll, { children: [
|
|
945
|
+
tools.length === 0 && /* @__PURE__ */ jsx("div", { className: "text-[10px] text-muted-foreground/60 text-center py-4", children: "No tool events" }),
|
|
946
|
+
tools.map((tool) => /* @__PURE__ */ jsx(ToolLifecycleRow, { tool }, tool.callId)),
|
|
947
|
+
request.pendingToolCalls.length > 0 && /* @__PURE__ */ jsxs("div", { className: "px-1.5 py-1 border-t border-border/30", children: [
|
|
948
|
+
/* @__PURE__ */ jsxs("span", { className: "text-[9px] text-muted-foreground font-medium", children: [
|
|
949
|
+
"Pending Tool Calls (",
|
|
950
|
+
request.pendingToolCalls.length,
|
|
951
|
+
")"
|
|
952
|
+
] }),
|
|
953
|
+
request.pendingToolCalls.map((tc) => /* @__PURE__ */ jsxs(
|
|
954
|
+
"div",
|
|
955
|
+
{
|
|
956
|
+
className: "flex items-center gap-1 ml-2 text-[9px]",
|
|
957
|
+
children: [
|
|
958
|
+
/* @__PURE__ */ jsx(
|
|
959
|
+
Badge,
|
|
960
|
+
{
|
|
961
|
+
variant: "outline",
|
|
962
|
+
className: cn(
|
|
963
|
+
"text-[8px] px-0.5 py-0 h-3",
|
|
964
|
+
tc.resolved ? "bg-green-500/10 text-green-400" : "bg-orange-500/10 text-orange-400"
|
|
965
|
+
),
|
|
966
|
+
children: tc.resolved ? "resolved" : "pending"
|
|
967
|
+
}
|
|
968
|
+
),
|
|
969
|
+
/* @__PURE__ */ jsx("span", { className: "font-mono text-muted-foreground/60", children: tc.callId.slice(0, 12) }),
|
|
970
|
+
/* @__PURE__ */ jsx("span", { className: "text-foreground/80", children: humanizeIdentifier(tc.toolName) }),
|
|
971
|
+
/* @__PURE__ */ jsx(
|
|
972
|
+
CopyBtn,
|
|
973
|
+
{
|
|
974
|
+
text: JSON.stringify(tc, null, 2),
|
|
975
|
+
id: `ptc-${tc.callId}`
|
|
976
|
+
}
|
|
977
|
+
)
|
|
978
|
+
]
|
|
979
|
+
},
|
|
980
|
+
tc.callId
|
|
981
|
+
))
|
|
982
|
+
] })
|
|
983
|
+
] });
|
|
810
984
|
}
|
|
811
985
|
function StatusTab({ request }) {
|
|
812
|
-
return /* @__PURE__ */
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
986
|
+
return /* @__PURE__ */ jsxs(DebugTabScroll, { children: [
|
|
987
|
+
/* @__PURE__ */ jsxs("div", { className: "px-1.5 py-1 border-b border-border/30", children: [
|
|
988
|
+
/* @__PURE__ */ jsx("span", { className: "text-[9px] text-muted-foreground font-medium", children: "Current Phase" }),
|
|
989
|
+
request.currentPhase ? /* @__PURE__ */ jsx("div", { className: "ml-2", children: /* @__PURE__ */ jsx(
|
|
990
|
+
Badge,
|
|
991
|
+
{
|
|
992
|
+
variant: "outline",
|
|
993
|
+
className: "text-[9px] px-1 py-0 h-4 bg-yellow-500/10 text-yellow-400",
|
|
994
|
+
children: request.currentPhase
|
|
995
|
+
}
|
|
996
|
+
) }) : /* @__PURE__ */ jsx("div", { className: "text-[9px] text-muted-foreground/50 ml-2", children: "No phase updates received" })
|
|
997
|
+
] }),
|
|
998
|
+
/* @__PURE__ */ jsx("div", { className: "px-1.5 py-0.5", children: /* @__PURE__ */ jsxs("span", { className: "text-[9px] text-muted-foreground font-medium", children: [
|
|
999
|
+
"History (",
|
|
1000
|
+
request.phaseHistory.length,
|
|
1001
|
+
")"
|
|
1002
|
+
] }) }),
|
|
1003
|
+
request.phaseHistory.length === 0 && /* @__PURE__ */ jsx("div", { className: "text-[10px] text-muted-foreground/60 text-center py-4", children: "No phase updates" }),
|
|
1004
|
+
request.phaseHistory.map((phase, idx) => /* @__PURE__ */ jsx(PhaseHistoryRow, { phase, idx }, idx))
|
|
1005
|
+
] });
|
|
820
1006
|
}
|
|
821
1007
|
function BlocksTab({ request }) {
|
|
822
1008
|
const blocks = request.renderBlockOrder.map((id) => request.renderBlocks[id]).filter(Boolean);
|
|
823
|
-
return /* @__PURE__ */
|
|
1009
|
+
return /* @__PURE__ */ jsxs(DebugTabScroll, { children: [
|
|
1010
|
+
blocks.length === 0 && /* @__PURE__ */ jsx("div", { className: "text-[10px] text-muted-foreground/60 text-center py-4", children: "No content blocks" }),
|
|
1011
|
+
blocks.map((block) => /* @__PURE__ */ jsx(ContentBlockRow, { block }, block.blockId))
|
|
1012
|
+
] });
|
|
824
1013
|
}
|
|
825
1014
|
function TextTab({ request }) {
|
|
826
1015
|
const text = request.renderBlockOrder.map((id) => request.renderBlocks[id]?.content ?? "").join("\n");
|
|
827
1016
|
const reasoning = request.reasoningChunks.length > 0 ? request.reasoningChunks.join("") : request.accumulatedReasoning;
|
|
828
|
-
return /* @__PURE__ */
|
|
1017
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col flex-1 min-h-0 h-full", children: [
|
|
1018
|
+
/* @__PURE__ */ jsxs("div", { className: "flex shrink-0 items-center gap-1 px-1.5 py-0.5 border-b border-border/30 text-[9px] text-muted-foreground", children: [
|
|
1019
|
+
/* @__PURE__ */ jsxs("span", { children: [
|
|
1020
|
+
request.chunkCount,
|
|
1021
|
+
" chunks"
|
|
1022
|
+
] }),
|
|
1023
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground/40", children: "|" }),
|
|
1024
|
+
/* @__PURE__ */ jsxs("span", { children: [
|
|
1025
|
+
new TextEncoder().encode(text).length,
|
|
1026
|
+
" bytes"
|
|
1027
|
+
] }),
|
|
1028
|
+
request.reasoningChunks.length > 0 && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1029
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground/40", children: "|" }),
|
|
1030
|
+
/* @__PURE__ */ jsxs("span", { className: "text-violet-400", children: [
|
|
1031
|
+
request.reasoningChunks.length,
|
|
1032
|
+
" reasoning chunks"
|
|
1033
|
+
] })
|
|
1034
|
+
] }),
|
|
1035
|
+
/* @__PURE__ */ jsx(CopyBtn, { text, id: "full-text", className: "ml-auto" })
|
|
1036
|
+
] }),
|
|
1037
|
+
reasoning && /* @__PURE__ */ jsxs("div", { className: "border-b border-border/30", children: [
|
|
1038
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1 px-1.5 py-0.5 text-[9px] text-violet-400/80 bg-violet-500/5", children: [
|
|
1039
|
+
/* @__PURE__ */ jsx(Brain, { className: "h-2.5 w-2.5" }),
|
|
1040
|
+
/* @__PURE__ */ jsxs("span", { children: [
|
|
1041
|
+
"Reasoning (",
|
|
1042
|
+
request.reasoningChunks.length,
|
|
1043
|
+
" chunks)"
|
|
1044
|
+
] }),
|
|
1045
|
+
/* @__PURE__ */ jsx(CopyBtn, { text: reasoning, id: "full-reasoning", className: "ml-auto" })
|
|
1046
|
+
] }),
|
|
1047
|
+
/* @__PURE__ */ jsx("pre", { className: "text-[10px] font-mono whitespace-pre-wrap break-all p-1.5 text-violet-400/70 max-h-40 overflow-y-auto", children: reasoning })
|
|
1048
|
+
] }),
|
|
1049
|
+
/* @__PURE__ */ jsx(ScrollArea, { className: "flex-1 min-h-0", children: /* @__PURE__ */ jsx("pre", { className: "text-[10px] font-mono whitespace-pre-wrap break-all p-1.5 text-foreground/80", children: text || /* @__PURE__ */ jsx("span", { className: "text-muted-foreground/40 italic", children: "No text yet..." }) }) })
|
|
1050
|
+
] });
|
|
829
1051
|
}
|
|
830
1052
|
function DataTab({ request }) {
|
|
831
|
-
return /* @__PURE__ */
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
}
|
|
844
|
-
|
|
1053
|
+
return /* @__PURE__ */ jsxs(DebugTabScroll, { children: [
|
|
1054
|
+
/* @__PURE__ */ jsxs("div", { className: "px-1.5 py-0.5 border-b border-border/30 text-[9px] text-muted-foreground", children: [
|
|
1055
|
+
request.dataPayloads.length,
|
|
1056
|
+
" data payloads",
|
|
1057
|
+
/* @__PURE__ */ jsx(
|
|
1058
|
+
CopyBtn,
|
|
1059
|
+
{
|
|
1060
|
+
text: JSON.stringify(request.dataPayloads, null, 2),
|
|
1061
|
+
id: "all-data",
|
|
1062
|
+
className: "ml-1"
|
|
1063
|
+
}
|
|
1064
|
+
)
|
|
1065
|
+
] }),
|
|
1066
|
+
request.dataPayloads.length === 0 && /* @__PURE__ */ jsx("div", { className: "text-[10px] text-muted-foreground/60 text-center py-4", children: "No data events" }),
|
|
1067
|
+
request.dataPayloads.map((payload, idx) => /* @__PURE__ */ jsxs("div", { className: "border-b border-border/20 px-1.5 py-0.5", children: [
|
|
1068
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1", children: [
|
|
1069
|
+
/* @__PURE__ */ jsx("span", { className: "text-[9px] font-mono text-muted-foreground/60", children: idx + 1 }),
|
|
1070
|
+
/* @__PURE__ */ jsx(
|
|
1071
|
+
CopyBtn,
|
|
1072
|
+
{
|
|
1073
|
+
text: JSON.stringify(payload, null, 2),
|
|
1074
|
+
id: `data-${idx}`
|
|
1075
|
+
}
|
|
1076
|
+
)
|
|
1077
|
+
] }),
|
|
1078
|
+
/* @__PURE__ */ jsx(JsonView, { data: payload, id: `data-body-${idx}` })
|
|
1079
|
+
] }, idx))
|
|
1080
|
+
] });
|
|
845
1081
|
}
|
|
846
1082
|
function CompletionTab({ request }) {
|
|
847
|
-
return /* @__PURE__ */
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
1083
|
+
return /* @__PURE__ */ jsxs(DebugTabScroll, { children: [
|
|
1084
|
+
request.completion ? /* @__PURE__ */ jsx("div", { className: "p-1.5", children: /* @__PURE__ */ jsx(
|
|
1085
|
+
JsonView,
|
|
1086
|
+
{
|
|
1087
|
+
data: request.completion,
|
|
1088
|
+
label: "Completion",
|
|
1089
|
+
id: "completion"
|
|
1090
|
+
}
|
|
1091
|
+
) }) : /* @__PURE__ */ jsx("div", { className: "text-[10px] text-muted-foreground/60 text-center py-4", children: "No completion event received" }),
|
|
1092
|
+
request.clientMetrics && /* @__PURE__ */ jsxs("div", { className: "p-1.5 border-t border-border/30", children: [
|
|
1093
|
+
/* @__PURE__ */ jsx("span", { className: "text-[9px] text-muted-foreground font-medium", children: "Client Metrics" }),
|
|
1094
|
+
/* @__PURE__ */ jsx(JsonView, { data: request.clientMetrics, id: "client-metrics" })
|
|
1095
|
+
] }),
|
|
1096
|
+
request.warnings.length > 0 && /* @__PURE__ */ jsxs("div", { className: "p-1.5 border-t border-border/30", children: [
|
|
1097
|
+
/* @__PURE__ */ jsxs("span", { className: "text-[9px] text-muted-foreground font-medium", children: [
|
|
1098
|
+
"Warnings (",
|
|
1099
|
+
request.warnings.length,
|
|
1100
|
+
")"
|
|
1101
|
+
] }),
|
|
1102
|
+
/* @__PURE__ */ jsx(JsonView, { data: request.warnings, id: "warnings" })
|
|
1103
|
+
] }),
|
|
1104
|
+
request.infoEvents.length > 0 && /* @__PURE__ */ jsxs("div", { className: "p-1.5 border-t border-border/30", children: [
|
|
1105
|
+
/* @__PURE__ */ jsxs("span", { className: "text-[9px] text-muted-foreground font-medium", children: [
|
|
1106
|
+
"Info Events (",
|
|
1107
|
+
request.infoEvents.length,
|
|
1108
|
+
")"
|
|
1109
|
+
] }),
|
|
1110
|
+
/* @__PURE__ */ jsx(JsonView, { data: request.infoEvents, id: "info-events" })
|
|
1111
|
+
] }),
|
|
1112
|
+
Object.keys(request.reservations).length > 0 && /* @__PURE__ */ jsxs("div", { className: "p-1.5 border-t border-border/30", children: [
|
|
1113
|
+
/* @__PURE__ */ jsxs("span", { className: "text-[9px] text-muted-foreground font-medium", children: [
|
|
1114
|
+
"Record Reservations (",
|
|
1115
|
+
Object.keys(request.reservations).length,
|
|
1116
|
+
")"
|
|
1117
|
+
] }),
|
|
1118
|
+
/* @__PURE__ */ jsx(JsonView, { data: request.reservations, id: "reservations" })
|
|
1119
|
+
] }),
|
|
1120
|
+
Object.keys(request.completedOperations).length > 0 && /* @__PURE__ */ jsxs("div", { className: "p-1.5 border-t border-border/30", children: [
|
|
1121
|
+
/* @__PURE__ */ jsxs("div", { className: "text-[10px] text-sky-400 font-medium flex items-center gap-1", children: [
|
|
1122
|
+
/* @__PURE__ */ jsx(Zap, { className: "h-2.5 w-2.5" }),
|
|
1123
|
+
" Completed Operations (",
|
|
1124
|
+
Object.keys(request.completedOperations).length,
|
|
1125
|
+
")"
|
|
1126
|
+
] }),
|
|
1127
|
+
/* @__PURE__ */ jsx(JsonView, { data: request.completedOperations, id: "completed-ops" })
|
|
1128
|
+
] })
|
|
1129
|
+
] });
|
|
855
1130
|
}
|
|
856
1131
|
function StateSnapshotTab({
|
|
857
1132
|
request,
|
|
858
1133
|
instanceStatus
|
|
859
1134
|
}) {
|
|
860
|
-
return /* @__PURE__ */
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
1135
|
+
return /* @__PURE__ */ jsx(DebugTabScroll, { children: /* @__PURE__ */ jsxs("div", { className: "p-1.5 space-y-1", children: [
|
|
1136
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1 text-[9px]", children: [
|
|
1137
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground font-medium w-24 shrink-0", children: "requestId:" }),
|
|
1138
|
+
/* @__PURE__ */ jsx("code", { className: "font-mono text-foreground/80", children: request.requestId }),
|
|
1139
|
+
/* @__PURE__ */ jsx(CopyBtn, { text: request.requestId, id: "req-id" })
|
|
1140
|
+
] }),
|
|
1141
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1 text-[9px]", children: [
|
|
1142
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground font-medium w-24 shrink-0", children: "conversationId:" }),
|
|
1143
|
+
/* @__PURE__ */ jsx(
|
|
1144
|
+
EntityRef,
|
|
1145
|
+
{
|
|
1146
|
+
token: "conversation",
|
|
1147
|
+
id: request.conversationId,
|
|
1148
|
+
name: request.conversationId,
|
|
1149
|
+
showIcon: false,
|
|
1150
|
+
wrap: true,
|
|
1151
|
+
className: "min-w-0 font-mono text-foreground/80"
|
|
1152
|
+
}
|
|
1153
|
+
),
|
|
1154
|
+
/* @__PURE__ */ jsx(CopyBtn, { text: request.conversationId, id: "conv-id-state" })
|
|
1155
|
+
] }),
|
|
1156
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1 text-[9px]", children: [
|
|
1157
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground font-medium w-24 shrink-0", children: "request.status:" }),
|
|
1158
|
+
/* @__PURE__ */ jsx(
|
|
1159
|
+
Badge,
|
|
1160
|
+
{
|
|
1161
|
+
variant: "outline",
|
|
1162
|
+
className: cn(
|
|
1163
|
+
"text-[9px] px-1 py-0 h-4",
|
|
1164
|
+
STATUS_COLORS[request.status] ?? ""
|
|
1165
|
+
),
|
|
1166
|
+
children: request.status
|
|
1167
|
+
}
|
|
877
1168
|
)
|
|
878
|
-
},
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
1169
|
+
] }),
|
|
1170
|
+
instanceStatus && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1 text-[9px]", children: [
|
|
1171
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground font-medium w-24 shrink-0", children: "instance.status:" }),
|
|
1172
|
+
/* @__PURE__ */ jsx(
|
|
1173
|
+
Badge,
|
|
1174
|
+
{
|
|
1175
|
+
variant: "outline",
|
|
1176
|
+
className: cn(
|
|
1177
|
+
"text-[9px] px-1 py-0 h-4",
|
|
1178
|
+
INSTANCE_STATUS_COLORS[instanceStatus] ?? ""
|
|
1179
|
+
),
|
|
1180
|
+
children: instanceStatus
|
|
1181
|
+
}
|
|
887
1182
|
)
|
|
888
|
-
},
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
className: "
|
|
903
|
-
}
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
}
|
|
912
|
-
|
|
1183
|
+
] }),
|
|
1184
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-start gap-1 text-[9px]", children: [
|
|
1185
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground font-medium w-24 shrink-0", children: "error:" }),
|
|
1186
|
+
request.error ? /* @__PURE__ */ jsx("div", { className: "flex-1 min-w-0", children: /* @__PURE__ */ jsx(
|
|
1187
|
+
JsonView,
|
|
1188
|
+
{
|
|
1189
|
+
data: request.error,
|
|
1190
|
+
id: "request-error-payload",
|
|
1191
|
+
defaultExpanded: true
|
|
1192
|
+
}
|
|
1193
|
+
) }) : /* @__PURE__ */ jsx("code", { className: "font-mono text-foreground/80", children: "null" })
|
|
1194
|
+
] }),
|
|
1195
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1 text-[9px]", children: [
|
|
1196
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground font-medium w-24 shrink-0", children: "startedAt:" }),
|
|
1197
|
+
/* @__PURE__ */ jsx("code", { className: "font-mono text-foreground/80", children: request.startedAt })
|
|
1198
|
+
] }),
|
|
1199
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1 text-[9px]", children: [
|
|
1200
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground font-medium w-24 shrink-0", children: "firstChunkAt:" }),
|
|
1201
|
+
/* @__PURE__ */ jsx("code", { className: "font-mono text-foreground/80", children: request.firstChunkAt ?? "null" })
|
|
1202
|
+
] }),
|
|
1203
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1 text-[9px]", children: [
|
|
1204
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground font-medium w-24 shrink-0", children: "completedAt:" }),
|
|
1205
|
+
/* @__PURE__ */ jsx("code", { className: "font-mono text-foreground/80", children: request.completedAt ?? "null" })
|
|
1206
|
+
] }),
|
|
1207
|
+
/* @__PURE__ */ jsxs("div", { className: "border-t border-border/30 pt-1 mt-1", children: [
|
|
1208
|
+
/* @__PURE__ */ jsx("span", { className: "text-[9px] text-muted-foreground font-medium", children: "Counts" }),
|
|
1209
|
+
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-x-3 gap-y-0.5 ml-2 text-[9px] mt-0.5", children: [
|
|
1210
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: "chunkCount:" }),
|
|
1211
|
+
/* @__PURE__ */ jsx("span", { className: "font-mono", children: request.chunkCount }),
|
|
1212
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: "reasoningChunks:" }),
|
|
1213
|
+
/* @__PURE__ */ jsx("span", { className: "font-mono", children: request.reasoningChunks.length }),
|
|
1214
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: "phaseHistory:" }),
|
|
1215
|
+
/* @__PURE__ */ jsx("span", { className: "font-mono", children: request.phaseHistory.length }),
|
|
1216
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: "activeOperations:" }),
|
|
1217
|
+
/* @__PURE__ */ jsx("span", { className: "font-mono", children: Object.keys(request.activeOperations).length }),
|
|
1218
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: "completedOperations:" }),
|
|
1219
|
+
/* @__PURE__ */ jsx("span", { className: "font-mono", children: Object.keys(request.completedOperations).length }),
|
|
1220
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: "renderBlocks:" }),
|
|
1221
|
+
/* @__PURE__ */ jsx("span", { className: "font-mono", children: request.renderBlockOrder.length }),
|
|
1222
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: "toolLifecycle:" }),
|
|
1223
|
+
/* @__PURE__ */ jsx("span", { className: "font-mono", children: Object.keys(request.toolLifecycle).length }),
|
|
1224
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: "pendingToolCalls:" }),
|
|
1225
|
+
/* @__PURE__ */ jsx("span", { className: "font-mono", children: request.pendingToolCalls.length }),
|
|
1226
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: "dataPayloads:" }),
|
|
1227
|
+
/* @__PURE__ */ jsx("span", { className: "font-mono", children: request.dataPayloads.length }),
|
|
1228
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: "timeline:" }),
|
|
1229
|
+
/* @__PURE__ */ jsx("span", { className: "font-mono", children: request.timeline.length }),
|
|
1230
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: "warnings:" }),
|
|
1231
|
+
/* @__PURE__ */ jsx("span", { className: "font-mono", children: request.warnings.length }),
|
|
1232
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: "infoEvents:" }),
|
|
1233
|
+
/* @__PURE__ */ jsx("span", { className: "font-mono", children: request.infoEvents.length }),
|
|
1234
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: "reservations:" }),
|
|
1235
|
+
/* @__PURE__ */ jsx("span", { className: "font-mono", children: Object.keys(request.reservations).length })
|
|
1236
|
+
] })
|
|
1237
|
+
] }),
|
|
1238
|
+
/* @__PURE__ */ jsxs("div", { className: "border-t border-border/30 pt-1 mt-1", children: [
|
|
1239
|
+
/* @__PURE__ */ jsx("span", { className: "text-[9px] text-muted-foreground font-medium", children: "Full State Dump" }),
|
|
1240
|
+
/* @__PURE__ */ jsx(
|
|
1241
|
+
CopyBtn,
|
|
1242
|
+
{
|
|
1243
|
+
text: JSON.stringify(request, null, 2),
|
|
1244
|
+
id: "full-dump",
|
|
1245
|
+
className: "ml-1"
|
|
1246
|
+
}
|
|
1247
|
+
),
|
|
1248
|
+
/* @__PURE__ */ jsx(
|
|
1249
|
+
JsonView,
|
|
1250
|
+
{
|
|
1251
|
+
data: request,
|
|
1252
|
+
label: "ActiveRequest",
|
|
1253
|
+
id: "full-state",
|
|
1254
|
+
defaultExpanded: false
|
|
1255
|
+
}
|
|
1256
|
+
)
|
|
1257
|
+
] })
|
|
1258
|
+
] }) });
|
|
913
1259
|
}
|
|
914
1260
|
function RawEventsTab({ request }) {
|
|
915
1261
|
const rawEvents = request.rawEvents ?? [];
|
|
@@ -931,106 +1277,130 @@ function RawEventsTab({ request }) {
|
|
|
931
1277
|
});
|
|
932
1278
|
};
|
|
933
1279
|
if (rawEvents.length === 0) {
|
|
934
|
-
return /* @__PURE__ */
|
|
1280
|
+
return /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center h-full text-muted-foreground text-xs", children: "No raw events captured yet" });
|
|
935
1281
|
}
|
|
936
|
-
return /* @__PURE__ */
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
label:
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
"button",
|
|
946
|
-
{
|
|
947
|
-
type: "button",
|
|
948
|
-
onClick: () => setFilterType(filterType === type ? null : type)
|
|
949
|
-
}
|
|
950
|
-
)
|
|
951
|
-
)), /* @__PURE__ */ React.createElement(
|
|
952
|
-
CopyBtn,
|
|
953
|
-
{
|
|
954
|
-
text: JSON.stringify(rawEvents, null, 2),
|
|
955
|
-
id: "raw-all",
|
|
956
|
-
className: "ml-auto"
|
|
957
|
-
}
|
|
958
|
-
)), /* @__PURE__ */ React.createElement(ScrollArea, { className: "flex-1 min-h-0", ref: scrollRef }, /* @__PURE__ */ React.createElement("div", { className: "divide-y divide-border/20" }, filtered.map((evt) => {
|
|
959
|
-
const isExpanded = expandedIdx.has(evt.idx);
|
|
960
|
-
const colorClass = EVENT_COLORS[evt.eventType] ?? "bg-gray-500/20 text-gray-400 border-gray-500/30";
|
|
961
|
-
const icon = EVENT_ICONS[evt.eventType] ?? /* @__PURE__ */ React.createElement(AlertTriangle, { className: "h-2.5 w-2.5" });
|
|
962
|
-
const dataPreview = (() => {
|
|
963
|
-
if (evt.data === null || evt.data === void 0) return "null";
|
|
964
|
-
if (typeof evt.data === "object") {
|
|
965
|
-
const d = evt.data;
|
|
966
|
-
if (evt.eventType === "structured_output") {
|
|
967
|
-
const schema = d.schema_name ? `schema: ${d.schema_name}` : "";
|
|
968
|
-
const items = Array.isArray(
|
|
969
|
-
d.data?.items
|
|
970
|
-
) ? `${d.data.items.length} item(s)` : "";
|
|
971
|
-
const ok = d.success ? "success" : "failed";
|
|
972
|
-
return [ok, schema, items].filter(Boolean).join(" \xB7 ");
|
|
973
|
-
}
|
|
974
|
-
if (d.event) return `event: ${d.event}`;
|
|
975
|
-
if (d.text !== void 0)
|
|
976
|
-
return `text: "${String(d.text).slice(0, 40)}..."`;
|
|
977
|
-
if (d.status) return `status: ${d.status}`;
|
|
978
|
-
if (d.tool_name) return `tool: ${d.tool_name}`;
|
|
979
|
-
const keys = Object.keys(d);
|
|
980
|
-
return keys.length <= 4 ? keys.join(", ") : `${keys.slice(0, 3).join(", ")} +${keys.length - 3}`;
|
|
981
|
-
}
|
|
982
|
-
return String(evt.data).slice(0, 60);
|
|
983
|
-
})();
|
|
984
|
-
return /* @__PURE__ */ React.createElement(
|
|
985
|
-
"div",
|
|
986
|
-
{
|
|
987
|
-
key: evt.idx,
|
|
988
|
-
className: cn(
|
|
989
|
-
"px-2 py-0.5 cursor-pointer hover:bg-muted/20 transition-colors",
|
|
990
|
-
isExpanded && "bg-muted/10"
|
|
991
|
-
),
|
|
992
|
-
onClick: () => toggleExpanded(evt.idx)
|
|
993
|
-
},
|
|
994
|
-
/* @__PURE__ */ React.createElement("div", { className: "flex items-center gap-1.5 min-h-[18px]" }, /* @__PURE__ */ React.createElement("span", { className: "text-[9px] text-muted-foreground/60 font-mono w-4 text-right flex-shrink-0" }, evt.idx), /* @__PURE__ */ React.createElement(
|
|
995
|
-
Badge,
|
|
1282
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col flex-1 min-h-0 h-full", children: [
|
|
1283
|
+
/* @__PURE__ */ jsxs("div", { className: "flex shrink-0 items-center gap-1 px-2 py-1 border-b border-border/30 bg-muted/10 flex-wrap", children: [
|
|
1284
|
+
/* @__PURE__ */ jsxs("span", { className: "text-[9px] text-muted-foreground font-medium mr-1", children: [
|
|
1285
|
+
rawEvents.length,
|
|
1286
|
+
" events"
|
|
1287
|
+
] }),
|
|
1288
|
+
/* @__PURE__ */ jsx(Chip, { asChild: true, pressed: !filterType, label: "All", children: /* @__PURE__ */ jsx("button", { type: "button", onClick: () => setFilterType(null) }) }),
|
|
1289
|
+
eventTypes.map((type) => /* @__PURE__ */ jsx(
|
|
1290
|
+
Chip,
|
|
996
1291
|
{
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1292
|
+
asChild: true,
|
|
1293
|
+
pressed: filterType === type,
|
|
1294
|
+
label: `${type} (${rawEvents.filter((e) => e.eventType === type).length})`,
|
|
1295
|
+
children: /* @__PURE__ */ jsx(
|
|
1296
|
+
"button",
|
|
1297
|
+
{
|
|
1298
|
+
type: "button",
|
|
1299
|
+
onClick: () => setFilterType(filterType === type ? null : type)
|
|
1300
|
+
}
|
|
1001
1301
|
)
|
|
1002
1302
|
},
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1303
|
+
type
|
|
1304
|
+
)),
|
|
1305
|
+
/* @__PURE__ */ jsx(
|
|
1006
1306
|
CopyBtn,
|
|
1007
1307
|
{
|
|
1008
|
-
text: JSON.stringify(
|
|
1009
|
-
id:
|
|
1010
|
-
className: "ml-auto
|
|
1308
|
+
text: JSON.stringify(rawEvents, null, 2),
|
|
1309
|
+
id: "raw-all",
|
|
1310
|
+
className: "ml-auto"
|
|
1011
1311
|
}
|
|
1012
|
-
)
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1312
|
+
)
|
|
1313
|
+
] }),
|
|
1314
|
+
/* @__PURE__ */ jsx(ScrollArea, { className: "flex-1 min-h-0", ref: scrollRef, children: /* @__PURE__ */ jsx("div", { className: "divide-y divide-border/20", children: filtered.map((evt) => {
|
|
1315
|
+
const isExpanded = expandedIdx.has(evt.idx);
|
|
1316
|
+
const colorClass = EVENT_COLORS[evt.eventType] ?? "bg-gray-500/20 text-gray-400 border-gray-500/30";
|
|
1317
|
+
const icon = EVENT_ICONS[evt.eventType] ?? /* @__PURE__ */ jsx(AlertTriangle, { className: "h-2.5 w-2.5" });
|
|
1318
|
+
const dataPreview = (() => {
|
|
1319
|
+
if (evt.data === null || evt.data === void 0) return "null";
|
|
1320
|
+
if (typeof evt.data === "object") {
|
|
1321
|
+
const d = evt.data;
|
|
1322
|
+
if (evt.eventType === "structured_output") {
|
|
1323
|
+
const schema = d.schema_name ? `schema: ${d.schema_name}` : "";
|
|
1324
|
+
const items = Array.isArray(
|
|
1325
|
+
d.data?.items
|
|
1326
|
+
) ? `${d.data.items.length} item(s)` : "";
|
|
1327
|
+
const ok = d.success ? "success" : "failed";
|
|
1328
|
+
return [ok, schema, items].filter(Boolean).join(" \xB7 ");
|
|
1329
|
+
}
|
|
1330
|
+
if (d.event) return `event: ${d.event}`;
|
|
1331
|
+
if (d.text !== void 0)
|
|
1332
|
+
return `text: "${String(d.text).slice(0, 40)}..."`;
|
|
1333
|
+
if (d.status) return `status: ${d.status}`;
|
|
1334
|
+
if (d.tool_name) return `tool: ${d.tool_name}`;
|
|
1335
|
+
const keys = Object.keys(d);
|
|
1336
|
+
return keys.length <= 4 ? keys.join(", ") : `${keys.slice(0, 3).join(", ")} +${keys.length - 3}`;
|
|
1019
1337
|
}
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1338
|
+
return String(evt.data).slice(0, 60);
|
|
1339
|
+
})();
|
|
1340
|
+
return /* @__PURE__ */ jsxs(
|
|
1341
|
+
"div",
|
|
1342
|
+
{
|
|
1343
|
+
className: cn(
|
|
1344
|
+
"px-2 py-0.5 cursor-pointer hover:bg-muted/20 transition-colors",
|
|
1345
|
+
isExpanded && "bg-muted/10"
|
|
1346
|
+
),
|
|
1347
|
+
onClick: () => toggleExpanded(evt.idx),
|
|
1348
|
+
children: [
|
|
1349
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5 min-h-[18px]", children: [
|
|
1350
|
+
/* @__PURE__ */ jsx("span", { className: "text-[9px] text-muted-foreground/60 font-mono w-4 text-right flex-shrink-0", children: evt.idx }),
|
|
1351
|
+
/* @__PURE__ */ jsxs(
|
|
1352
|
+
Badge,
|
|
1353
|
+
{
|
|
1354
|
+
variant: "outline",
|
|
1355
|
+
className: cn(
|
|
1356
|
+
"px-1 py-0 text-[8px] leading-[14px] h-[14px] inline-flex items-center gap-0.5 font-mono border rounded-sm flex-shrink-0",
|
|
1357
|
+
colorClass
|
|
1358
|
+
),
|
|
1359
|
+
children: [
|
|
1360
|
+
icon,
|
|
1361
|
+
evt.eventType
|
|
1362
|
+
]
|
|
1363
|
+
}
|
|
1364
|
+
),
|
|
1365
|
+
/* @__PURE__ */ jsxs("span", { className: "text-[9px] text-muted-foreground/60 font-mono flex-shrink-0", children: [
|
|
1366
|
+
evt.timestamp.toFixed(0),
|
|
1367
|
+
"ms"
|
|
1368
|
+
] }),
|
|
1369
|
+
!isExpanded && /* @__PURE__ */ jsx("span", { className: "text-[9px] text-muted-foreground truncate", children: dataPreview }),
|
|
1370
|
+
/* @__PURE__ */ jsx(
|
|
1371
|
+
CopyBtn,
|
|
1372
|
+
{
|
|
1373
|
+
text: JSON.stringify(evt, null, 2),
|
|
1374
|
+
id: `raw-${evt.idx}`,
|
|
1375
|
+
className: "ml-auto flex-shrink-0"
|
|
1376
|
+
}
|
|
1377
|
+
)
|
|
1378
|
+
] }),
|
|
1379
|
+
isExpanded && /* @__PURE__ */ jsx("div", { className: "ml-5 mt-0.5 mb-1", children: /* @__PURE__ */ jsx(
|
|
1380
|
+
JsonView,
|
|
1381
|
+
{
|
|
1382
|
+
data: evt.data,
|
|
1383
|
+
label: "data",
|
|
1384
|
+
id: `raw-data-${evt.idx}`
|
|
1385
|
+
}
|
|
1386
|
+
) })
|
|
1387
|
+
]
|
|
1388
|
+
},
|
|
1389
|
+
evt.idx
|
|
1390
|
+
);
|
|
1391
|
+
}) }) })
|
|
1392
|
+
] });
|
|
1023
1393
|
}
|
|
1024
1394
|
const TAB_DEFS = [
|
|
1025
|
-
{ id: "events", label: "Timeline", icon: /* @__PURE__ */
|
|
1026
|
-
{ id: "raw", label: "Raw", icon: /* @__PURE__ */
|
|
1027
|
-
{ id: "text", label: "Text", icon: /* @__PURE__ */
|
|
1028
|
-
{ id: "tools", label: "Tools", icon: /* @__PURE__ */
|
|
1029
|
-
{ id: "status", label: "Status", icon: /* @__PURE__ */
|
|
1030
|
-
{ id: "blocks", label: "Blocks", icon: /* @__PURE__ */
|
|
1031
|
-
{ id: "data", label: "Data", icon: /* @__PURE__ */
|
|
1032
|
-
{ id: "completion", label: "Stats", icon: /* @__PURE__ */
|
|
1033
|
-
{ id: "state", label: "State", icon: /* @__PURE__ */
|
|
1395
|
+
{ id: "events", label: "Timeline", icon: /* @__PURE__ */ jsx(Zap, { className: "h-3 w-3" }) },
|
|
1396
|
+
{ id: "raw", label: "Raw", icon: /* @__PURE__ */ jsx(Radio, { className: "h-3 w-3" }) },
|
|
1397
|
+
{ id: "text", label: "Text", icon: /* @__PURE__ */ jsx(FileText, { className: "h-3 w-3" }) },
|
|
1398
|
+
{ id: "tools", label: "Tools", icon: /* @__PURE__ */ jsx(Wrench, { className: "h-3 w-3" }) },
|
|
1399
|
+
{ id: "status", label: "Status", icon: /* @__PURE__ */ jsx(Activity, { className: "h-3 w-3" }) },
|
|
1400
|
+
{ id: "blocks", label: "Blocks", icon: /* @__PURE__ */ jsx(Layers, { className: "h-3 w-3" }) },
|
|
1401
|
+
{ id: "data", label: "Data", icon: /* @__PURE__ */ jsx(Database, { className: "h-3 w-3" }) },
|
|
1402
|
+
{ id: "completion", label: "Stats", icon: /* @__PURE__ */ jsx(BarChart3, { className: "h-3 w-3" }) },
|
|
1403
|
+
{ id: "state", label: "State", icon: /* @__PURE__ */ jsx(CircleDot, { className: "h-3 w-3" }) }
|
|
1034
1404
|
];
|
|
1035
1405
|
function InstanceDebugView({
|
|
1036
1406
|
conversationId,
|
|
@@ -1052,12 +1422,43 @@ function InstanceDebugView({
|
|
|
1052
1422
|
(state) => selectedRequestId ? state.activeRequests.byRequestId[selectedRequestId] : void 0
|
|
1053
1423
|
);
|
|
1054
1424
|
if (!request) {
|
|
1055
|
-
return /* @__PURE__ */
|
|
1425
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center justify-center h-full text-[11px] text-muted-foreground/60 p-4 gap-1", children: [
|
|
1426
|
+
/* @__PURE__ */ jsx("span", { children: "No active request for this instance. Run the agent to begin debugging." }),
|
|
1427
|
+
requestIds.length === 0 && /* @__PURE__ */ jsx("span", { className: "text-[10px]", children: "(0 requests found)" })
|
|
1428
|
+
] });
|
|
1056
1429
|
}
|
|
1057
1430
|
if (hideChrome) {
|
|
1058
|
-
return /* @__PURE__ */
|
|
1431
|
+
return /* @__PURE__ */ jsx(TimelineTab, { request });
|
|
1059
1432
|
}
|
|
1060
|
-
return /* @__PURE__ */
|
|
1433
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col flex-1 min-h-0 h-full", children: [
|
|
1434
|
+
/* @__PURE__ */ jsxs("div", { className: "shrink-0", children: [
|
|
1435
|
+
/* @__PURE__ */ jsx(StatusBar, { request, instanceStatus }),
|
|
1436
|
+
request.clientMetrics && /* @__PURE__ */ jsx(MetricsBar, { metrics: request.clientMetrics })
|
|
1437
|
+
] }),
|
|
1438
|
+
requestIds.length > 1 && /* @__PURE__ */ jsxs("div", { className: "flex shrink-0 items-center gap-1.5 px-2 py-1 border-b border-border/30 text-[10px]", children: [
|
|
1439
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground font-medium", children: "Request:" }),
|
|
1440
|
+
requestIds.map((id, idx) => /* @__PURE__ */ jsx(Chip, { asChild: true, pressed: idx === effectiveIdx, label: `#${idx + 1}`, children: /* @__PURE__ */ jsx("button", { type: "button", onClick: () => setSelectedRequestIdx(idx) }) }, id)),
|
|
1441
|
+
/* @__PURE__ */ jsxs("span", { className: "text-muted-foreground/60 text-[9px] ml-auto", children: [
|
|
1442
|
+
requestIds.length,
|
|
1443
|
+
" total"
|
|
1444
|
+
] })
|
|
1445
|
+
] }),
|
|
1446
|
+
/* @__PURE__ */ jsx("div", { className: "flex shrink-0 border-b border-border/50 bg-muted/10 overflow-x-auto scrollbar-none", children: TAB_DEFS.map((tab) => /* @__PURE__ */ jsxs(Button, { variant: "quiet", pressed: !!(activeTab === tab.id), onClick: () => setActiveTab(tab.id), children: [
|
|
1447
|
+
tab.icon,
|
|
1448
|
+
tab.label
|
|
1449
|
+
] }, tab.id)) }),
|
|
1450
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-1 min-h-0 flex-col overflow-hidden", children: [
|
|
1451
|
+
activeTab === "events" && /* @__PURE__ */ jsx(TimelineTab, { request }),
|
|
1452
|
+
activeTab === "raw" && /* @__PURE__ */ jsx(RawEventsTab, { request }),
|
|
1453
|
+
activeTab === "text" && /* @__PURE__ */ jsx(TextTab, { request }),
|
|
1454
|
+
activeTab === "tools" && /* @__PURE__ */ jsx(ToolsTab, { request }),
|
|
1455
|
+
activeTab === "status" && /* @__PURE__ */ jsx(StatusTab, { request }),
|
|
1456
|
+
activeTab === "blocks" && /* @__PURE__ */ jsx(BlocksTab, { request }),
|
|
1457
|
+
activeTab === "data" && /* @__PURE__ */ jsx(DataTab, { request }),
|
|
1458
|
+
activeTab === "completion" && /* @__PURE__ */ jsx(CompletionTab, { request }),
|
|
1459
|
+
activeTab === "state" && /* @__PURE__ */ jsx(StateSnapshotTab, { request, instanceStatus })
|
|
1460
|
+
] })
|
|
1461
|
+
] });
|
|
1061
1462
|
}
|
|
1062
1463
|
function StreamDebugPanel({
|
|
1063
1464
|
conversationId,
|
|
@@ -1079,26 +1480,26 @@ function StreamDebugPanel({
|
|
|
1079
1480
|
shallowEqual
|
|
1080
1481
|
);
|
|
1081
1482
|
if (hideChrome) {
|
|
1082
|
-
return /* @__PURE__ */
|
|
1483
|
+
return /* @__PURE__ */ jsx("div", { className: cn(DEBUG_PANEL_SHELL, className), children: /* @__PURE__ */ jsx(
|
|
1083
1484
|
InstanceDebugView,
|
|
1084
1485
|
{
|
|
1085
1486
|
conversationId,
|
|
1086
1487
|
hideChrome: true,
|
|
1087
1488
|
requestIdOverride
|
|
1088
1489
|
}
|
|
1089
|
-
));
|
|
1490
|
+
) });
|
|
1090
1491
|
}
|
|
1091
1492
|
if (allInstanceIds.length <= 1) {
|
|
1092
|
-
return /* @__PURE__ */
|
|
1493
|
+
return /* @__PURE__ */ jsx("div", { className: cn(DEBUG_PANEL_SHELL, className), children: /* @__PURE__ */ jsx(
|
|
1093
1494
|
InstanceDebugView,
|
|
1094
1495
|
{
|
|
1095
1496
|
conversationId,
|
|
1096
1497
|
hideChrome: false,
|
|
1097
1498
|
requestIdOverride
|
|
1098
1499
|
}
|
|
1099
|
-
));
|
|
1500
|
+
) });
|
|
1100
1501
|
}
|
|
1101
|
-
return /* @__PURE__ */
|
|
1502
|
+
return /* @__PURE__ */ jsx(
|
|
1102
1503
|
MultiInstanceDebugPanel,
|
|
1103
1504
|
{
|
|
1104
1505
|
activeInstanceId: conversationId,
|
|
@@ -1116,23 +1517,29 @@ function MultiInstanceDebugPanel({
|
|
|
1116
1517
|
}) {
|
|
1117
1518
|
const [selectedInstanceId, setSelectedInstanceId] = useState(activeInstanceId);
|
|
1118
1519
|
const effectiveInstanceId = allInstanceIds.includes(selectedInstanceId) ? selectedInstanceId : allInstanceIds[allInstanceIds.length - 1] ?? activeInstanceId;
|
|
1119
|
-
return /* @__PURE__ */
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1520
|
+
return /* @__PURE__ */ jsxs("div", { className: cn(DEBUG_PANEL_SHELL, className), children: [
|
|
1521
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-0 border-b border-border bg-muted/20 overflow-x-auto scrollbar-none shrink-0", children: [
|
|
1522
|
+
/* @__PURE__ */ jsx("span", { className: "text-[9px] text-muted-foreground font-medium px-2 py-1.5 whitespace-nowrap border-r border-border/50 shrink-0", children: "INSTANCE" }),
|
|
1523
|
+
allInstanceIds.map((id, idx) => /* @__PURE__ */ jsx(
|
|
1524
|
+
InstanceTab,
|
|
1525
|
+
{
|
|
1526
|
+
conversationId: id,
|
|
1527
|
+
idx,
|
|
1528
|
+
isActive: id === effectiveInstanceId,
|
|
1529
|
+
onSelect: () => setSelectedInstanceId(id)
|
|
1530
|
+
},
|
|
1531
|
+
id
|
|
1532
|
+
))
|
|
1533
|
+
] }),
|
|
1534
|
+
/* @__PURE__ */ jsx("div", { className: "flex flex-1 min-h-0 flex-col overflow-hidden", children: /* @__PURE__ */ jsx(
|
|
1535
|
+
InstanceDebugView,
|
|
1536
|
+
{
|
|
1537
|
+
conversationId: effectiveInstanceId,
|
|
1538
|
+
hideChrome: false,
|
|
1539
|
+
requestIdOverride: effectiveInstanceId === activeInstanceId ? requestIdOverride : void 0
|
|
1540
|
+
}
|
|
1541
|
+
) })
|
|
1542
|
+
] });
|
|
1136
1543
|
}
|
|
1137
1544
|
function InstanceTab({
|
|
1138
1545
|
conversationId,
|
|
@@ -1147,7 +1554,7 @@ function InstanceTab({
|
|
|
1147
1554
|
selectConversationRequestCount(conversationId)
|
|
1148
1555
|
);
|
|
1149
1556
|
const statusDot = status ? INSTANCE_STATUS_COLORS[status] ?? "bg-gray-500/20 text-gray-400" : "";
|
|
1150
|
-
return /* @__PURE__ */
|
|
1557
|
+
return /* @__PURE__ */ jsxs(
|
|
1151
1558
|
"button",
|
|
1152
1559
|
{
|
|
1153
1560
|
type: "button",
|
|
@@ -1155,19 +1562,27 @@ function InstanceTab({
|
|
|
1155
1562
|
className: cn(
|
|
1156
1563
|
"inline-flex items-center gap-1 px-2.5 py-1.5 text-[10px] whitespace-nowrap border-b-2 border-r border-border/30 transition-colors cursor-pointer font-mono",
|
|
1157
1564
|
isActive ? "border-b-primary text-primary-ink bg-primary/5" : "border-b-transparent text-muted-foreground hover:text-foreground hover:bg-muted/20"
|
|
1158
|
-
)
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1565
|
+
),
|
|
1566
|
+
children: [
|
|
1567
|
+
/* @__PURE__ */ jsxs("span", { className: "text-muted-foreground/60", children: [
|
|
1568
|
+
"#",
|
|
1569
|
+
idx + 1
|
|
1570
|
+
] }),
|
|
1571
|
+
/* @__PURE__ */ jsx("span", { className: "max-w-[80px] truncate", children: conversationId.slice(0, 8) }),
|
|
1572
|
+
status && /* @__PURE__ */ jsx(
|
|
1573
|
+
Badge,
|
|
1574
|
+
{
|
|
1575
|
+
variant: "outline",
|
|
1576
|
+
className: cn("text-[8px] px-1 py-0 h-3.5 border-0", statusDot),
|
|
1577
|
+
children: status
|
|
1578
|
+
}
|
|
1579
|
+
),
|
|
1580
|
+
requestCount > 0 && /* @__PURE__ */ jsxs("span", { className: "text-[9px] text-muted-foreground/60", children: [
|
|
1581
|
+
requestCount,
|
|
1582
|
+
"req"
|
|
1583
|
+
] })
|
|
1584
|
+
]
|
|
1585
|
+
}
|
|
1171
1586
|
);
|
|
1172
1587
|
}
|
|
1173
1588
|
var StreamDebugPanel_default = StreamDebugPanel;
|