@parhelia/core 0.1.12785 → 0.1.12787
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/dist/config/config.js +8 -0
- package/dist/config/config.js.map +1 -1
- package/dist/config/types.d.ts +8 -3
- package/dist/config/types.js.map +1 -1
- package/dist/editor/ContentTree.js +4 -0
- package/dist/editor/ContentTree.js.map +1 -1
- package/dist/editor/Editor.d.ts +1 -1
- package/dist/editor/Editor.js +10 -5
- package/dist/editor/Editor.js.map +1 -1
- package/dist/editor/ai/AgentTerminal.d.ts +2 -38
- package/dist/editor/ai/AgentTerminal.js +6 -6503
- package/dist/editor/ai/AgentTerminal.js.map +1 -1
- package/dist/editor/ai/Agents.js +37 -17
- package/dist/editor/ai/Agents.js.map +1 -1
- package/dist/editor/ai/HeartbeatDiagnosticsPanel.d.ts +2 -2
- package/dist/editor/ai/HeartbeatDiagnosticsPanel.js +11 -7
- package/dist/editor/ai/HeartbeatDiagnosticsPanel.js.map +1 -1
- package/dist/editor/ai/agentDiagnostics.d.ts +26 -0
- package/dist/editor/ai/agentDiagnostics.js +39 -0
- package/dist/editor/ai/agentDiagnostics.js.map +1 -1
- package/dist/editor/ai/agentDiagnostics.test.js +118 -1
- package/dist/editor/ai/agentDiagnostics.test.js.map +1 -1
- package/dist/editor/ai/agentWatchdogStatusRegistry.d.ts +1 -0
- package/dist/editor/ai/agentWatchdogStatusRegistry.js.map +1 -1
- package/dist/editor/ai/terminal/agentOptimisticMessage.d.ts +1 -0
- package/dist/editor/ai/terminal/agentOptimisticMessage.js +4 -0
- package/dist/editor/ai/terminal/agentOptimisticMessage.js.map +1 -0
- package/dist/editor/ai/terminal/agentPromptPlaceholders.d.ts +5 -0
- package/dist/editor/ai/terminal/agentPromptPlaceholders.js +8 -0
- package/dist/editor/ai/terminal/agentPromptPlaceholders.js.map +1 -0
- package/dist/editor/ai/terminal/agentQuestionnaireTranscriptRecovery.d.ts +10 -0
- package/dist/editor/ai/terminal/agentQuestionnaireTranscriptRecovery.js +87 -0
- package/dist/editor/ai/terminal/agentQuestionnaireTranscriptRecovery.js.map +1 -0
- package/dist/editor/ai/terminal/agentQuestionnaireTranscriptRecovery.test.d.ts +1 -0
- package/dist/editor/ai/terminal/agentQuestionnaireTranscriptRecovery.test.js +109 -0
- package/dist/editor/ai/terminal/agentQuestionnaireTranscriptRecovery.test.js.map +1 -0
- package/dist/editor/ai/terminal/agentSessionCostLimit.d.ts +7 -0
- package/dist/editor/ai/terminal/agentSessionCostLimit.js +27 -0
- package/dist/editor/ai/terminal/agentSessionCostLimit.js.map +1 -0
- package/dist/editor/ai/terminal/agentSessionLiveTotals.d.ts +6 -0
- package/dist/editor/ai/terminal/agentSessionLiveTotals.js +112 -0
- package/dist/editor/ai/terminal/agentSessionLiveTotals.js.map +1 -0
- package/dist/editor/ai/terminal/agentSessionMetadata.d.ts +2 -0
- package/dist/editor/ai/terminal/agentSessionMetadata.js +24 -0
- package/dist/editor/ai/terminal/agentSessionMetadata.js.map +1 -0
- package/dist/editor/ai/terminal/agentSessionSelectors.d.ts +65 -0
- package/dist/editor/ai/terminal/agentSessionSelectors.js +232 -0
- package/dist/editor/ai/terminal/agentSessionSelectors.js.map +1 -0
- package/dist/editor/ai/terminal/agentSessionSelectors.test.d.ts +1 -0
- package/dist/editor/ai/terminal/agentSessionSelectors.test.js +219 -0
- package/dist/editor/ai/terminal/agentSessionSelectors.test.js.map +1 -0
- package/dist/editor/ai/terminal/agentSessionSnapshot.d.ts +16 -0
- package/dist/editor/ai/terminal/agentSessionSnapshot.js +75 -0
- package/dist/editor/ai/terminal/agentSessionSnapshot.js.map +1 -0
- package/dist/editor/ai/terminal/agentSessionSnapshot.test.d.ts +1 -0
- package/dist/editor/ai/terminal/agentSessionSnapshot.test.js +136 -0
- package/dist/editor/ai/terminal/agentSessionSnapshot.test.js.map +1 -0
- package/dist/editor/ai/terminal/agentSessionState.d.ts +130 -0
- package/dist/editor/ai/terminal/agentSessionState.js +738 -0
- package/dist/editor/ai/terminal/agentSessionState.js.map +1 -0
- package/dist/editor/ai/terminal/agentSessionState.test.d.ts +1 -0
- package/dist/editor/ai/terminal/agentSessionState.test.js +456 -0
- package/dist/editor/ai/terminal/agentSessionState.test.js.map +1 -0
- package/dist/editor/ai/terminal/agentStartRequest.d.ts +14 -0
- package/dist/editor/ai/terminal/agentStartRequest.js +16 -0
- package/dist/editor/ai/terminal/agentStartRequest.js.map +1 -0
- package/dist/editor/ai/terminal/agentSubmitErrors.d.ts +1 -0
- package/dist/editor/ai/terminal/agentSubmitErrors.js +9 -0
- package/dist/editor/ai/terminal/agentSubmitErrors.js.map +1 -0
- package/dist/editor/ai/terminal/components/AgentBanners.js.map +1 -0
- package/dist/editor/ai/terminal/components/AgentBrowserClaimBanner.d.ts +10 -0
- package/dist/editor/ai/terminal/components/AgentBrowserClaimBanner.js +24 -0
- package/dist/editor/ai/terminal/components/AgentBrowserClaimBanner.js.map +1 -0
- package/dist/editor/ai/{AgentCostDisplay.js → terminal/components/AgentCostDisplay.js} +2 -2
- package/dist/editor/ai/terminal/components/AgentCostDisplay.js.map +1 -0
- package/dist/editor/ai/{AgentDocumentList.js → terminal/components/AgentDocumentList.js} +4 -4
- package/dist/editor/ai/terminal/components/AgentDocumentList.js.map +1 -0
- package/dist/editor/ai/terminal/components/AgentFullPromptControls.d.ts +36 -0
- package/dist/editor/ai/terminal/components/AgentFullPromptControls.js +34 -0
- package/dist/editor/ai/terminal/components/AgentFullPromptControls.js.map +1 -0
- package/dist/editor/ai/{AgentGreeting.d.ts → terminal/components/AgentGreeting.d.ts} +1 -1
- package/dist/editor/ai/{AgentGreeting.js → terminal/components/AgentGreeting.js} +3 -3
- package/dist/editor/ai/terminal/components/AgentGreeting.js.map +1 -0
- package/dist/editor/ai/terminal/components/AgentLoadingContent.d.ts +1 -0
- package/dist/editor/ai/terminal/components/AgentLoadingContent.js +6 -0
- package/dist/editor/ai/terminal/components/AgentLoadingContent.js.map +1 -0
- package/dist/editor/ai/terminal/components/AgentMobileStatusPopover.d.ts +7 -0
- package/dist/editor/ai/terminal/components/AgentMobileStatusPopover.js +8 -0
- package/dist/editor/ai/terminal/components/AgentMobileStatusPopover.js.map +1 -0
- package/dist/editor/ai/terminal/components/AgentModeSelector.d.ts +8 -0
- package/dist/editor/ai/terminal/components/AgentModeSelector.js +13 -0
- package/dist/editor/ai/terminal/components/AgentModeSelector.js.map +1 -0
- package/dist/editor/ai/terminal/components/AgentParentLink.d.ts +6 -0
- package/dist/editor/ai/terminal/components/AgentParentLink.js +9 -0
- package/dist/editor/ai/terminal/components/AgentParentLink.js.map +1 -0
- package/dist/editor/ai/terminal/components/AgentPredefinedPromptsButton.d.ts +8 -0
- package/dist/editor/ai/terminal/components/AgentPredefinedPromptsButton.js +10 -0
- package/dist/editor/ai/terminal/components/AgentPredefinedPromptsButton.js.map +1 -0
- package/dist/editor/ai/terminal/components/AgentProfileModelSettingsSection.d.ts +15 -0
- package/dist/editor/ai/terminal/components/AgentProfileModelSettingsSection.js +18 -0
- package/dist/editor/ai/terminal/components/AgentProfileModelSettingsSection.js.map +1 -0
- package/dist/editor/ai/terminal/components/AgentPromptActionButtons.d.ts +14 -0
- package/dist/editor/ai/terminal/components/AgentPromptActionButtons.js +17 -0
- package/dist/editor/ai/terminal/components/AgentPromptActionButtons.js.map +1 -0
- package/dist/editor/ai/terminal/components/AgentPromptComposer.d.ts +7 -0
- package/dist/editor/ai/terminal/components/AgentPromptComposer.js +7 -0
- package/dist/editor/ai/terminal/components/AgentPromptComposer.js.map +1 -0
- package/dist/editor/ai/terminal/components/AgentPromptInputArea.d.ts +29 -0
- package/dist/editor/ai/terminal/components/AgentPromptInputArea.js +20 -0
- package/dist/editor/ai/terminal/components/AgentPromptInputArea.js.map +1 -0
- package/dist/editor/ai/terminal/components/AgentReadOnlyNotice.d.ts +5 -0
- package/dist/editor/ai/terminal/components/AgentReadOnlyNotice.js +7 -0
- package/dist/editor/ai/terminal/components/AgentReadOnlyNotice.js.map +1 -0
- package/dist/editor/ai/terminal/components/AgentRunStatusBanners.d.ts +8 -0
- package/dist/editor/ai/terminal/components/AgentRunStatusBanners.js +32 -0
- package/dist/editor/ai/terminal/components/AgentRunStatusBanners.js.map +1 -0
- package/dist/editor/ai/terminal/components/AgentSettingsContent.d.ts +52 -0
- package/dist/editor/ai/terminal/components/AgentSettingsContent.js +9 -0
- package/dist/editor/ai/terminal/components/AgentSettingsContent.js.map +1 -0
- package/dist/editor/ai/terminal/components/AgentSettingsPopover.d.ts +7 -0
- package/dist/editor/ai/terminal/components/AgentSettingsPopover.js +14 -0
- package/dist/editor/ai/terminal/components/AgentSettingsPopover.js.map +1 -0
- package/dist/editor/ai/terminal/components/AgentSettingsSections.d.ts +43 -0
- package/dist/editor/ai/terminal/components/AgentSettingsSections.js +33 -0
- package/dist/editor/ai/terminal/components/AgentSettingsSections.js.map +1 -0
- package/dist/editor/ai/terminal/components/AgentSkillSettingsSection.d.ts +21 -0
- package/dist/editor/ai/terminal/components/AgentSkillSettingsSection.js +46 -0
- package/dist/editor/ai/terminal/components/AgentSkillSettingsSection.js.map +1 -0
- package/dist/editor/ai/terminal/components/AgentSummaryAssistantResponse.d.ts +26 -0
- package/dist/editor/ai/terminal/components/AgentSummaryAssistantResponse.js +10 -0
- package/dist/editor/ai/terminal/components/AgentSummaryAssistantResponse.js.map +1 -0
- package/dist/editor/ai/terminal/components/AgentSummaryErrorNotice.d.ts +6 -0
- package/dist/editor/ai/terminal/components/AgentSummaryErrorNotice.js +10 -0
- package/dist/editor/ai/terminal/components/AgentSummaryErrorNotice.js.map +1 -0
- package/dist/editor/ai/terminal/components/AgentSummaryPlaceholder.d.ts +10 -0
- package/dist/editor/ai/terminal/components/AgentSummaryPlaceholder.js +13 -0
- package/dist/editor/ai/terminal/components/AgentSummaryPlaceholder.js.map +1 -0
- package/dist/editor/ai/terminal/components/AgentSummaryPromptActions.d.ts +12 -0
- package/dist/editor/ai/terminal/components/AgentSummaryPromptActions.js +21 -0
- package/dist/editor/ai/terminal/components/AgentSummaryPromptActions.js.map +1 -0
- package/dist/editor/ai/terminal/components/AgentTerminalContextChrome.d.ts +21 -0
- package/dist/editor/ai/terminal/components/AgentTerminalContextChrome.js +13 -0
- package/dist/editor/ai/terminal/components/AgentTerminalContextChrome.js.map +1 -0
- package/dist/editor/ai/terminal/components/AgentTerminalContextPanels.d.ts +23 -0
- package/dist/editor/ai/terminal/components/AgentTerminalContextPanels.js +64 -0
- package/dist/editor/ai/terminal/components/AgentTerminalContextPanels.js.map +1 -0
- package/dist/editor/ai/terminal/components/AgentTerminalDialogHost.d.ts +13 -0
- package/dist/editor/ai/terminal/components/AgentTerminalDialogHost.js +10 -0
- package/dist/editor/ai/terminal/components/AgentTerminalDialogHost.js.map +1 -0
- package/dist/editor/ai/terminal/components/AgentTerminalFullLayout.d.ts +20 -0
- package/dist/editor/ai/terminal/components/AgentTerminalFullLayout.js +27 -0
- package/dist/editor/ai/terminal/components/AgentTerminalFullLayout.js.map +1 -0
- package/dist/editor/ai/terminal/components/AgentTerminalFullPromptControls.d.ts +5 -0
- package/dist/editor/ai/terminal/components/AgentTerminalFullPromptControls.js +7 -0
- package/dist/editor/ai/terminal/components/AgentTerminalFullPromptControls.js.map +1 -0
- package/dist/editor/ai/terminal/components/AgentTerminalFullUpperContent.d.ts +48 -0
- package/dist/editor/ai/terminal/components/AgentTerminalFullUpperContent.js +13 -0
- package/dist/editor/ai/terminal/components/AgentTerminalFullUpperContent.js.map +1 -0
- package/dist/editor/ai/terminal/components/AgentTerminalMessageGroups.d.ts +20 -0
- package/dist/editor/ai/terminal/components/AgentTerminalMessageGroups.js +41 -0
- package/dist/editor/ai/terminal/components/AgentTerminalMessageGroups.js.map +1 -0
- package/dist/editor/ai/{AgentTerminalStatusBar.d.ts → terminal/components/AgentTerminalStatusBar.d.ts} +11 -5
- package/dist/editor/ai/{AgentTerminalStatusBar.js → terminal/components/AgentTerminalStatusBar.js} +12 -13
- package/dist/editor/ai/terminal/components/AgentTerminalStatusBar.js.map +1 -0
- package/dist/editor/ai/terminal/components/AgentTerminalSummaryLayout.d.ts +45 -0
- package/dist/editor/ai/terminal/components/AgentTerminalSummaryLayout.js +17 -0
- package/dist/editor/ai/terminal/components/AgentTerminalSummaryLayout.js.map +1 -0
- package/dist/editor/ai/terminal/components/AgentTerminalView.d.ts +15 -0
- package/dist/editor/ai/terminal/components/AgentTerminalView.js +15 -0
- package/dist/editor/ai/terminal/components/AgentTerminalView.js.map +1 -0
- package/dist/editor/ai/terminal/components/AgentThinkingDots.d.ts +5 -0
- package/dist/editor/ai/terminal/components/AgentThinkingDots.js +13 -0
- package/dist/editor/ai/terminal/components/AgentThinkingDots.js.map +1 -0
- package/dist/editor/ai/{AiResponseMessage.d.ts → terminal/components/AiResponseMessage.d.ts} +2 -2
- package/dist/editor/ai/{AiResponseMessage.js → terminal/components/AiResponseMessage.js} +9 -9
- package/dist/editor/ai/terminal/components/AiResponseMessage.js.map +1 -0
- package/dist/editor/ai/{ContextInfoBar.d.ts → terminal/components/ContextInfoBar.d.ts} +1 -1
- package/dist/editor/ai/{ContextInfoBar.js → terminal/components/ContextInfoBar.js} +5 -5
- package/dist/editor/ai/terminal/components/ContextInfoBar.js.map +1 -0
- package/dist/editor/ai/{EditOperationsPanel.d.ts → terminal/components/EditOperationsPanel.d.ts} +1 -1
- package/dist/editor/ai/{EditOperationsPanel.js → terminal/components/EditOperationsPanel.js} +2 -2
- package/dist/editor/ai/terminal/components/EditOperationsPanel.js.map +1 -0
- package/dist/editor/ai/{HeartbeatMessage.d.ts → terminal/components/HeartbeatMessage.d.ts} +1 -1
- package/dist/editor/ai/{HeartbeatMessage.js → terminal/components/HeartbeatMessage.js} +1 -1
- package/dist/editor/ai/terminal/components/HeartbeatMessage.js.map +1 -0
- package/dist/editor/ai/{InitialThinkingSplash.js → terminal/components/InitialThinkingSplash.js} +2 -2
- package/dist/editor/ai/terminal/components/InitialThinkingSplash.js.map +1 -0
- package/dist/editor/ai/{QueuedPromptsPanel.d.ts → terminal/components/QueuedPromptsPanel.d.ts} +1 -1
- package/dist/editor/ai/{QueuedPromptsPanel.js → terminal/components/QueuedPromptsPanel.js} +2 -2
- package/dist/editor/ai/terminal/components/QueuedPromptsPanel.js.map +1 -0
- package/dist/editor/ai/{SpawnedAgentsPanel.d.ts → terminal/components/SpawnedAgentsPanel.d.ts} +1 -1
- package/dist/editor/ai/{SpawnedAgentsPanel.js → terminal/components/SpawnedAgentsPanel.js} +2 -2
- package/dist/editor/ai/terminal/components/SpawnedAgentsPanel.js.map +1 -0
- package/dist/editor/ai/{TodoListPanel.d.ts → terminal/components/TodoListPanel.d.ts} +1 -1
- package/dist/editor/ai/{TodoListPanel.js → terminal/components/TodoListPanel.js} +1 -1
- package/dist/editor/ai/terminal/components/TodoListPanel.js.map +1 -0
- package/dist/editor/ai/{ToolCallDisplay.js → terminal/components/ToolCallDisplay.js} +6 -6
- package/dist/editor/ai/terminal/components/ToolCallDisplay.js.map +1 -0
- package/dist/editor/ai/{UserMessage.d.ts → terminal/components/UserMessage.d.ts} +1 -1
- package/dist/editor/ai/{UserMessage.js → terminal/components/UserMessage.js} +3 -3
- package/dist/editor/ai/terminal/components/UserMessage.js.map +1 -0
- package/dist/editor/ai/terminal/types.d.ts +135 -0
- package/dist/editor/ai/terminal/types.js +2 -0
- package/dist/editor/ai/terminal/types.js.map +1 -0
- package/dist/editor/ai/terminal/useAgentActiveStreaming.d.ts +6 -0
- package/dist/editor/ai/terminal/useAgentActiveStreaming.js +9 -0
- package/dist/editor/ai/terminal/useAgentActiveStreaming.js.map +1 -0
- package/dist/editor/ai/terminal/useAgentAssignedSkillsSync.d.ts +5 -0
- package/dist/editor/ai/terminal/useAgentAssignedSkillsSync.js +19 -0
- package/dist/editor/ai/terminal/useAgentAssignedSkillsSync.js.map +1 -0
- package/dist/editor/ai/terminal/useAgentBrowserCapture.d.ts +24 -0
- package/dist/editor/ai/terminal/useAgentBrowserCapture.js +147 -0
- package/dist/editor/ai/terminal/useAgentBrowserCapture.js.map +1 -0
- package/dist/editor/ai/terminal/useAgentBrowserCapturePanel.d.ts +29 -0
- package/dist/editor/ai/terminal/useAgentBrowserCapturePanel.js +36 -0
- package/dist/editor/ai/terminal/useAgentBrowserCapturePanel.js.map +1 -0
- package/dist/editor/ai/terminal/useAgentBrowserCaptureUi.d.ts +18 -0
- package/dist/editor/ai/terminal/useAgentBrowserCaptureUi.js +36 -0
- package/dist/editor/ai/terminal/useAgentBrowserCaptureUi.js.map +1 -0
- package/dist/editor/ai/terminal/useAgentContentChunkHandler.d.ts +15 -0
- package/dist/editor/ai/terminal/useAgentContentChunkHandler.js +95 -0
- package/dist/editor/ai/terminal/useAgentContentChunkHandler.js.map +1 -0
- package/dist/editor/ai/terminal/useAgentContextDisplayNames.d.ts +9 -0
- package/dist/editor/ai/terminal/useAgentContextDisplayNames.js +98 -0
- package/dist/editor/ai/terminal/useAgentContextDisplayNames.js.map +1 -0
- package/dist/editor/ai/terminal/useAgentContextUpdateHandler.d.ts +7 -0
- package/dist/editor/ai/terminal/useAgentContextUpdateHandler.js +29 -0
- package/dist/editor/ai/terminal/useAgentContextUpdateHandler.js.map +1 -0
- package/dist/editor/ai/terminal/useAgentCostLimitActions.d.ts +15 -0
- package/dist/editor/ai/terminal/useAgentCostLimitActions.js +43 -0
- package/dist/editor/ai/terminal/useAgentCostLimitActions.js.map +1 -0
- package/dist/editor/ai/terminal/useAgentCostLimitWatcher.d.ts +11 -0
- package/dist/editor/ai/terminal/useAgentCostLimitWatcher.js +58 -0
- package/dist/editor/ai/terminal/useAgentCostLimitWatcher.js.map +1 -0
- package/dist/editor/ai/terminal/useAgentDraftInitializer.d.ts +25 -0
- package/dist/editor/ai/terminal/useAgentDraftInitializer.js +161 -0
- package/dist/editor/ai/terminal/useAgentDraftInitializer.js.map +1 -0
- package/dist/editor/ai/terminal/useAgentEditorContext.d.ts +16 -0
- package/dist/editor/ai/terminal/useAgentEditorContext.js +135 -0
- package/dist/editor/ai/terminal/useAgentEditorContext.js.map +1 -0
- package/dist/editor/ai/terminal/useAgentEditorContextPipeline.d.ts +23 -0
- package/dist/editor/ai/terminal/useAgentEditorContextPipeline.js +22 -0
- package/dist/editor/ai/terminal/useAgentEditorContextPipeline.js.map +1 -0
- package/dist/editor/ai/terminal/useAgentEditorContextSync.d.ts +19 -0
- package/dist/editor/ai/terminal/useAgentEditorContextSync.js +142 -0
- package/dist/editor/ai/terminal/useAgentEditorContextSync.js.map +1 -0
- package/dist/editor/ai/terminal/useAgentEffectiveModelName.d.ts +7 -0
- package/dist/editor/ai/terminal/useAgentEffectiveModelName.js +10 -0
- package/dist/editor/ai/terminal/useAgentEffectiveModelName.js.map +1 -0
- package/dist/editor/ai/terminal/useAgentHeartbeatMessages.d.ts +16 -0
- package/dist/editor/ai/terminal/useAgentHeartbeatMessages.js +55 -0
- package/dist/editor/ai/terminal/useAgentHeartbeatMessages.js.map +1 -0
- package/dist/editor/ai/terminal/useAgentInfoSocketHandler.d.ts +12 -0
- package/dist/editor/ai/terminal/useAgentInfoSocketHandler.js +55 -0
- package/dist/editor/ai/terminal/useAgentInfoSocketHandler.js.map +1 -0
- package/dist/editor/ai/terminal/useAgentInitialMetadataMerge.d.ts +6 -0
- package/dist/editor/ai/terminal/useAgentInitialMetadataMerge.js +18 -0
- package/dist/editor/ai/terminal/useAgentInitialMetadataMerge.js.map +1 -0
- package/dist/editor/ai/terminal/useAgentInitialPrompt.d.ts +16 -0
- package/dist/editor/ai/terminal/useAgentInitialPrompt.js +48 -0
- package/dist/editor/ai/terminal/useAgentInitialPrompt.js.map +1 -0
- package/dist/editor/ai/terminal/useAgentInitialPrompt.test.d.ts +1 -0
- package/dist/editor/ai/terminal/useAgentInitialPrompt.test.js +63 -0
- package/dist/editor/ai/terminal/useAgentInitialPrompt.test.js.map +1 -0
- package/dist/editor/ai/terminal/useAgentInlineDialogEvents.d.ts +23 -0
- package/dist/editor/ai/terminal/useAgentInlineDialogEvents.js +191 -0
- package/dist/editor/ai/terminal/useAgentInlineDialogEvents.js.map +1 -0
- package/dist/editor/ai/terminal/useAgentInlineDialogPipeline.d.ts +23 -0
- package/dist/editor/ai/terminal/useAgentInlineDialogPipeline.js +28 -0
- package/dist/editor/ai/terminal/useAgentInlineDialogPipeline.js.map +1 -0
- package/dist/editor/ai/terminal/useAgentInlineDialogState.d.ts +15 -0
- package/dist/editor/ai/terminal/useAgentInlineDialogState.js +49 -0
- package/dist/editor/ai/terminal/useAgentInlineDialogState.js.map +1 -0
- package/dist/editor/ai/terminal/useAgentLoadErrorHandler.d.ts +11 -0
- package/dist/editor/ai/terminal/useAgentLoadErrorHandler.js +24 -0
- package/dist/editor/ai/terminal/useAgentLoadErrorHandler.js.map +1 -0
- package/dist/editor/ai/terminal/useAgentLoadLifecycle.d.ts +7 -0
- package/dist/editor/ai/terminal/useAgentLoadLifecycle.js +21 -0
- package/dist/editor/ai/terminal/useAgentLoadLifecycle.js.map +1 -0
- package/dist/editor/ai/terminal/useAgentLoadPipeline.d.ts +39 -0
- package/dist/editor/ai/terminal/useAgentLoadPipeline.js +73 -0
- package/dist/editor/ai/terminal/useAgentLoadPipeline.js.map +1 -0
- package/dist/editor/ai/terminal/useAgentLoadedRunStateSync.d.ts +13 -0
- package/dist/editor/ai/terminal/useAgentLoadedRunStateSync.js +31 -0
- package/dist/editor/ai/terminal/useAgentLoadedRunStateSync.js.map +1 -0
- package/dist/editor/ai/terminal/useAgentLoader.d.ts +27 -0
- package/dist/editor/ai/terminal/useAgentLoader.js +77 -0
- package/dist/editor/ai/terminal/useAgentLoader.js.map +1 -0
- package/dist/editor/ai/terminal/useAgentMessageCompletionNotifier.d.ts +6 -0
- package/dist/editor/ai/terminal/useAgentMessageCompletionNotifier.js +23 -0
- package/dist/editor/ai/terminal/useAgentMessageCompletionNotifier.js.map +1 -0
- package/dist/editor/ai/terminal/useAgentModeState.d.ts +13 -0
- package/dist/editor/ai/terminal/useAgentModeState.js +52 -0
- package/dist/editor/ai/terminal/useAgentModeState.js.map +1 -0
- package/dist/editor/ai/terminal/useAgentOperationHistoryLoader.d.ts +8 -0
- package/dist/editor/ai/terminal/useAgentOperationHistoryLoader.js +26 -0
- package/dist/editor/ai/terminal/useAgentOperationHistoryLoader.js.map +1 -0
- package/dist/editor/ai/terminal/useAgentOperationSocketHandler.d.ts +6 -0
- package/dist/editor/ai/terminal/useAgentOperationSocketHandler.js +19 -0
- package/dist/editor/ai/terminal/useAgentOperationSocketHandler.js.map +1 -0
- package/dist/editor/ai/terminal/useAgentPendingApprovals.d.ts +6 -0
- package/dist/editor/ai/terminal/useAgentPendingApprovals.js +35 -0
- package/dist/editor/ai/terminal/useAgentPendingApprovals.js.map +1 -0
- package/dist/editor/ai/terminal/useAgentPendingDialogRecovery.d.ts +18 -0
- package/dist/editor/ai/terminal/useAgentPendingDialogRecovery.js +108 -0
- package/dist/editor/ai/terminal/useAgentPendingDialogRecovery.js.map +1 -0
- package/dist/editor/ai/terminal/useAgentPendingDialogRecovery.test.d.ts +1 -0
- package/dist/editor/ai/terminal/useAgentPendingDialogRecovery.test.js +80 -0
- package/dist/editor/ai/terminal/useAgentPendingDialogRecovery.test.js.map +1 -0
- package/dist/editor/ai/terminal/useAgentPendingInitialPrompt.d.ts +19 -0
- package/dist/editor/ai/terminal/useAgentPendingInitialPrompt.js +60 -0
- package/dist/editor/ai/terminal/useAgentPendingInitialPrompt.js.map +1 -0
- package/dist/editor/ai/terminal/useAgentProfileSelection.d.ts +17 -0
- package/dist/editor/ai/terminal/useAgentProfileSelection.js +61 -0
- package/dist/editor/ai/terminal/useAgentProfileSelection.js.map +1 -0
- package/dist/editor/ai/terminal/useAgentPromptComposerHandlers.d.ts +37 -0
- package/dist/editor/ai/terminal/useAgentPromptComposerHandlers.js +205 -0
- package/dist/editor/ai/terminal/useAgentPromptComposerHandlers.js.map +1 -0
- package/dist/editor/ai/terminal/useAgentPromptComposerProps.d.ts +26 -0
- package/dist/editor/ai/terminal/useAgentPromptComposerProps.js +51 -0
- package/dist/editor/ai/terminal/useAgentPromptComposerProps.js.map +1 -0
- package/dist/editor/ai/terminal/useAgentPromptComposerSurface.d.ts +26 -0
- package/dist/editor/ai/terminal/useAgentPromptComposerSurface.js +29 -0
- package/dist/editor/ai/terminal/useAgentPromptComposerSurface.js.map +1 -0
- package/dist/editor/ai/terminal/useAgentPromptDraft.d.ts +11 -0
- package/dist/editor/ai/terminal/useAgentPromptDraft.js +39 -0
- package/dist/editor/ai/terminal/useAgentPromptDraft.js.map +1 -0
- package/dist/editor/ai/terminal/useAgentPromptQueueSocketHandler.d.ts +6 -0
- package/dist/editor/ai/terminal/useAgentPromptQueueSocketHandler.js +22 -0
- package/dist/editor/ai/terminal/useAgentPromptQueueSocketHandler.js.map +1 -0
- package/dist/editor/ai/terminal/useAgentQuestionnaireDialogRecovery.d.ts +12 -0
- package/dist/editor/ai/terminal/useAgentQuestionnaireDialogRecovery.js +49 -0
- package/dist/editor/ai/terminal/useAgentQuestionnaireDialogRecovery.js.map +1 -0
- package/dist/editor/ai/terminal/useAgentQuestionnaireDialogRecovery.test.d.ts +1 -0
- package/dist/editor/ai/terminal/useAgentQuestionnaireDialogRecovery.test.js +135 -0
- package/dist/editor/ai/terminal/useAgentQuestionnaireDialogRecovery.test.js.map +1 -0
- package/dist/editor/ai/terminal/useAgentQueuedPromptReset.d.ts +5 -0
- package/dist/editor/ai/terminal/useAgentQueuedPromptReset.js +10 -0
- package/dist/editor/ai/terminal/useAgentQueuedPromptReset.js.map +1 -0
- package/dist/editor/ai/terminal/useAgentQuickActions.d.ts +15 -0
- package/dist/editor/ai/terminal/useAgentQuickActions.js +57 -0
- package/dist/editor/ai/terminal/useAgentQuickActions.js.map +1 -0
- package/dist/editor/ai/terminal/useAgentRunCompletionSocketHandler.d.ts +22 -0
- package/dist/editor/ai/terminal/useAgentRunCompletionSocketHandler.js +67 -0
- package/dist/editor/ai/terminal/useAgentRunCompletionSocketHandler.js.map +1 -0
- package/dist/editor/ai/terminal/useAgentRunDeltaRouter.d.ts +18 -0
- package/dist/editor/ai/terminal/useAgentRunDeltaRouter.js +53 -0
- package/dist/editor/ai/terminal/useAgentRunDeltaRouter.js.map +1 -0
- package/dist/editor/ai/terminal/useAgentRunDeltaSocketHandler.d.ts +24 -0
- package/dist/editor/ai/terminal/useAgentRunDeltaSocketHandler.js +66 -0
- package/dist/editor/ai/terminal/useAgentRunDeltaSocketHandler.js.map +1 -0
- package/dist/editor/ai/terminal/useAgentRunDiagnostics.d.ts +22 -0
- package/dist/editor/ai/terminal/useAgentRunDiagnostics.js +70 -0
- package/dist/editor/ai/terminal/useAgentRunDiagnostics.js.map +1 -0
- package/dist/editor/ai/terminal/useAgentRunMessagePipeline.d.ts +42 -0
- package/dist/editor/ai/terminal/useAgentRunMessagePipeline.js +39 -0
- package/dist/editor/ai/terminal/useAgentRunMessagePipeline.js.map +1 -0
- package/dist/editor/ai/terminal/useAgentRunRefs.d.ts +17 -0
- package/dist/editor/ai/terminal/useAgentRunRefs.js +44 -0
- package/dist/editor/ai/terminal/useAgentRunRefs.js.map +1 -0
- package/dist/editor/ai/terminal/useAgentRunResyncSocketHandler.d.ts +15 -0
- package/dist/editor/ai/terminal/useAgentRunResyncSocketHandler.js +101 -0
- package/dist/editor/ai/terminal/useAgentRunResyncSocketHandler.js.map +1 -0
- package/dist/editor/ai/terminal/useAgentRunSequenceGuard.d.ts +11 -0
- package/dist/editor/ai/terminal/useAgentRunSequenceGuard.js +22 -0
- package/dist/editor/ai/terminal/useAgentRunSequenceGuard.js.map +1 -0
- package/dist/editor/ai/terminal/useAgentRunStartSocketHandler.d.ts +25 -0
- package/dist/editor/ai/terminal/useAgentRunStartSocketHandler.js +74 -0
- package/dist/editor/ai/terminal/useAgentRunStartSocketHandler.js.map +1 -0
- package/dist/editor/ai/terminal/useAgentRunStatusSocketHandler.d.ts +38 -0
- package/dist/editor/ai/terminal/useAgentRunStatusSocketHandler.js +366 -0
- package/dist/editor/ai/terminal/useAgentRunStatusSocketHandler.js.map +1 -0
- package/dist/editor/ai/terminal/useAgentRuntimeStatus.d.ts +11 -0
- package/dist/editor/ai/terminal/useAgentRuntimeStatus.js +9 -0
- package/dist/editor/ai/terminal/useAgentRuntimeStatus.js.map +1 -0
- package/dist/editor/ai/terminal/useAgentServerReconciler.d.ts +5 -0
- package/dist/editor/ai/terminal/useAgentServerReconciler.js +22 -0
- package/dist/editor/ai/terminal/useAgentServerReconciler.js.map +1 -0
- package/dist/editor/ai/terminal/useAgentSession.d.ts +51 -0
- package/dist/editor/ai/terminal/useAgentSession.js +175 -0
- package/dist/editor/ai/terminal/useAgentSession.js.map +1 -0
- package/dist/editor/ai/terminal/useAgentSession.test.d.ts +1 -0
- package/dist/editor/ai/terminal/useAgentSession.test.js +181 -0
- package/dist/editor/ai/terminal/useAgentSession.test.js.map +1 -0
- package/dist/editor/ai/terminal/useAgentSessionCommandBindings.d.ts +15 -0
- package/dist/editor/ai/terminal/useAgentSessionCommandBindings.js +30 -0
- package/dist/editor/ai/terminal/useAgentSessionCommandBindings.js.map +1 -0
- package/dist/editor/ai/terminal/useAgentSessionErrorBridge.d.ts +10 -0
- package/dist/editor/ai/terminal/useAgentSessionErrorBridge.js +14 -0
- package/dist/editor/ai/terminal/useAgentSessionErrorBridge.js.map +1 -0
- package/dist/editor/ai/terminal/useAgentSessionFacade.d.ts +51 -0
- package/dist/editor/ai/terminal/useAgentSessionFacade.js +130 -0
- package/dist/editor/ai/terminal/useAgentSessionFacade.js.map +1 -0
- package/dist/editor/ai/terminal/useAgentSessionSocketSource.d.ts +8 -0
- package/dist/editor/ai/terminal/useAgentSessionSocketSource.js +17 -0
- package/dist/editor/ai/terminal/useAgentSessionSocketSource.js.map +1 -0
- package/dist/editor/ai/terminal/useAgentSessionSync.d.ts +98 -0
- package/dist/editor/ai/terminal/useAgentSessionSync.js +187 -0
- package/dist/editor/ai/terminal/useAgentSessionSync.js.map +1 -0
- package/dist/editor/ai/terminal/useAgentSettingsCommands.d.ts +49 -0
- package/dist/editor/ai/terminal/useAgentSettingsCommands.js +210 -0
- package/dist/editor/ai/terminal/useAgentSettingsCommands.js.map +1 -0
- package/dist/editor/ai/terminal/useAgentSettingsData.d.ts +46 -0
- package/dist/editor/ai/terminal/useAgentSettingsData.js +380 -0
- package/dist/editor/ai/terminal/useAgentSettingsData.js.map +1 -0
- package/dist/editor/ai/terminal/useAgentSettingsNavigation.d.ts +9 -0
- package/dist/editor/ai/terminal/useAgentSettingsNavigation.js +51 -0
- package/dist/editor/ai/terminal/useAgentSettingsNavigation.js.map +1 -0
- package/dist/editor/ai/terminal/useAgentSettingsPanel.d.ts +86 -0
- package/dist/editor/ai/terminal/useAgentSettingsPanel.js +93 -0
- package/dist/editor/ai/terminal/useAgentSettingsPanel.js.map +1 -0
- package/dist/editor/ai/terminal/useAgentSettingsSelectOptions.d.ts +15 -0
- package/dist/editor/ai/terminal/useAgentSettingsSelectOptions.js +45 -0
- package/dist/editor/ai/terminal/useAgentSettingsSelectOptions.js.map +1 -0
- package/dist/editor/ai/terminal/useAgentSettleCompletedRun.d.ts +35 -0
- package/dist/editor/ai/terminal/useAgentSettleCompletedRun.js +51 -0
- package/dist/editor/ai/terminal/useAgentSettleCompletedRun.js.map +1 -0
- package/dist/editor/ai/terminal/useAgentSkillActions.d.ts +34 -0
- package/dist/editor/ai/terminal/useAgentSkillActions.js +222 -0
- package/dist/editor/ai/terminal/useAgentSkillActions.js.map +1 -0
- package/dist/editor/ai/terminal/useAgentSocketMessageRouter.d.ts +15 -0
- package/dist/editor/ai/terminal/useAgentSocketMessageRouter.js +52 -0
- package/dist/editor/ai/terminal/useAgentSocketMessageRouter.js.map +1 -0
- package/dist/editor/ai/terminal/useAgentStatusBarContent.d.ts +36 -0
- package/dist/editor/ai/terminal/useAgentStatusBarContent.js +70 -0
- package/dist/editor/ai/terminal/useAgentStatusBarContent.js.map +1 -0
- package/dist/editor/ai/terminal/useAgentStopCommand.d.ts +28 -0
- package/dist/editor/ai/terminal/useAgentStopCommand.js +55 -0
- package/dist/editor/ai/terminal/useAgentStopCommand.js.map +1 -0
- package/dist/editor/ai/terminal/useAgentStopGuardState.d.ts +7 -0
- package/dist/editor/ai/terminal/useAgentStopGuardState.js +40 -0
- package/dist/editor/ai/terminal/useAgentStopGuardState.js.map +1 -0
- package/dist/editor/ai/terminal/useAgentStreamMessageFactory.d.ts +5 -0
- package/dist/editor/ai/terminal/useAgentStreamMessageFactory.js +31 -0
- package/dist/editor/ai/terminal/useAgentStreamMessageFactory.js.map +1 -0
- package/dist/editor/ai/terminal/useAgentStreamPipeline.d.ts +66 -0
- package/dist/editor/ai/terminal/useAgentStreamPipeline.js +165 -0
- package/dist/editor/ai/terminal/useAgentStreamPipeline.js.map +1 -0
- package/dist/editor/ai/terminal/useAgentStreamSubscription.d.ts +27 -0
- package/dist/editor/ai/terminal/useAgentStreamSubscription.js +70 -0
- package/dist/editor/ai/terminal/useAgentStreamSubscription.js.map +1 -0
- package/dist/editor/ai/terminal/useAgentStreamWatchdog.d.ts +38 -0
- package/dist/editor/ai/terminal/useAgentStreamWatchdog.js +232 -0
- package/dist/editor/ai/terminal/useAgentStreamWatchdog.js.map +1 -0
- package/dist/editor/ai/terminal/useAgentSubmitContextBuilder.d.ts +14 -0
- package/dist/editor/ai/terminal/useAgentSubmitContextBuilder.js +56 -0
- package/dist/editor/ai/terminal/useAgentSubmitContextBuilder.js.map +1 -0
- package/dist/editor/ai/terminal/useAgentSubmitHandlers.d.ts +52 -0
- package/dist/editor/ai/terminal/useAgentSubmitHandlers.js +267 -0
- package/dist/editor/ai/terminal/useAgentSubmitHandlers.js.map +1 -0
- package/dist/editor/ai/terminal/useAgentSubmitLifecycle.d.ts +27 -0
- package/dist/editor/ai/terminal/useAgentSubmitLifecycle.js +39 -0
- package/dist/editor/ai/terminal/useAgentSubmitLifecycle.js.map +1 -0
- package/dist/editor/ai/terminal/useAgentSubmitResponseHandler.d.ts +20 -0
- package/dist/editor/ai/terminal/useAgentSubmitResponseHandler.js +56 -0
- package/dist/editor/ai/terminal/useAgentSubmitResponseHandler.js.map +1 -0
- package/dist/editor/ai/terminal/useAgentSummaryQuestionnaireScroll.d.ts +5 -0
- package/dist/editor/ai/terminal/useAgentSummaryQuestionnaireScroll.js +32 -0
- package/dist/editor/ai/terminal/useAgentSummaryQuestionnaireScroll.js.map +1 -0
- package/dist/editor/ai/terminal/useAgentTerminalActions.d.ts +22 -0
- package/dist/editor/ai/terminal/useAgentTerminalActions.js +59 -0
- package/dist/editor/ai/terminal/useAgentTerminalActions.js.map +1 -0
- package/dist/editor/ai/terminal/useAgentTerminalBackgroundEvents.d.ts +15 -0
- package/dist/editor/ai/terminal/useAgentTerminalBackgroundEvents.js +16 -0
- package/dist/editor/ai/terminal/useAgentTerminalBackgroundEvents.js.map +1 -0
- package/dist/editor/ai/terminal/useAgentTerminalChrome.d.ts +29 -0
- package/dist/editor/ai/terminal/useAgentTerminalChrome.js +12 -0
- package/dist/editor/ai/terminal/useAgentTerminalChrome.js.map +1 -0
- package/dist/editor/ai/terminal/useAgentTerminalController.d.ts +2 -0
- package/dist/editor/ai/terminal/useAgentTerminalController.js +775 -0
- package/dist/editor/ai/terminal/useAgentTerminalController.js.map +1 -0
- package/dist/editor/ai/terminal/useAgentTerminalControls.d.ts +19 -0
- package/dist/editor/ai/terminal/useAgentTerminalControls.js +21 -0
- package/dist/editor/ai/terminal/useAgentTerminalControls.js.map +1 -0
- package/dist/editor/ai/terminal/useAgentTerminalElementRefs.d.ts +11 -0
- package/dist/editor/ai/terminal/useAgentTerminalElementRefs.js +13 -0
- package/dist/editor/ai/terminal/useAgentTerminalElementRefs.js.map +1 -0
- package/dist/editor/ai/terminal/useAgentTerminalNotices.d.ts +10 -0
- package/dist/editor/ai/terminal/useAgentTerminalNotices.js +11 -0
- package/dist/editor/ai/terminal/useAgentTerminalNotices.js.map +1 -0
- package/dist/editor/ai/terminal/useAgentTerminalReadyEvents.d.ts +7 -0
- package/dist/editor/ai/terminal/useAgentTerminalReadyEvents.js +29 -0
- package/dist/editor/ai/terminal/useAgentTerminalReadyEvents.js.map +1 -0
- package/dist/editor/ai/terminal/useAgentTerminalScroll.d.ts +15 -0
- package/dist/editor/ai/terminal/useAgentTerminalScroll.js +63 -0
- package/dist/editor/ai/terminal/useAgentTerminalScroll.js.map +1 -0
- package/dist/editor/ai/terminal/useAgentTerminalUiState.d.ts +27 -0
- package/dist/editor/ai/terminal/useAgentTerminalUiState.js +43 -0
- package/dist/editor/ai/terminal/useAgentTerminalUiState.js.map +1 -0
- package/dist/editor/ai/terminal/useAgentTerminalViewProps.d.ts +17 -0
- package/dist/editor/ai/terminal/useAgentTerminalViewProps.js +20 -0
- package/dist/editor/ai/terminal/useAgentTerminalViewProps.js.map +1 -0
- package/dist/editor/ai/terminal/useAgentTerminalViewState.d.ts +38 -0
- package/dist/editor/ai/terminal/useAgentTerminalViewState.js +58 -0
- package/dist/editor/ai/terminal/useAgentTerminalViewState.js.map +1 -0
- package/dist/editor/ai/terminal/useAgentToolApprovalResolvedEvents.d.ts +14 -0
- package/dist/editor/ai/terminal/useAgentToolApprovalResolvedEvents.js +65 -0
- package/dist/editor/ai/terminal/useAgentToolApprovalResolvedEvents.js.map +1 -0
- package/dist/editor/ai/terminal/useAgentToolApprovalSupersede.d.ts +8 -0
- package/dist/editor/ai/terminal/useAgentToolApprovalSupersede.js +41 -0
- package/dist/editor/ai/terminal/useAgentToolApprovalSupersede.js.map +1 -0
- package/dist/editor/ai/terminal/useAgentToolCallHandler.d.ts +12 -0
- package/dist/editor/ai/terminal/useAgentToolCallHandler.js +72 -0
- package/dist/editor/ai/terminal/useAgentToolCallHandler.js.map +1 -0
- package/dist/editor/ai/terminal/useAgentToolResultHandler.d.ts +12 -0
- package/dist/editor/ai/terminal/useAgentToolResultHandler.js +84 -0
- package/dist/editor/ai/terminal/useAgentToolResultHandler.js.map +1 -0
- package/dist/editor/ai/terminal/useAgentToolUiEvents.d.ts +5 -0
- package/dist/editor/ai/terminal/useAgentToolUiEvents.js +24 -0
- package/dist/editor/ai/terminal/useAgentToolUiEvents.js.map +1 -0
- package/dist/editor/ai/terminal/useAgentUserMessageSocketHandler.d.ts +9 -0
- package/dist/editor/ai/terminal/useAgentUserMessageSocketHandler.js +40 -0
- package/dist/editor/ai/terminal/useAgentUserMessageSocketHandler.js.map +1 -0
- package/dist/editor/ai/terminal/useAgentVoiceInput.d.ts +16 -0
- package/dist/editor/ai/terminal/useAgentVoiceInput.js +231 -0
- package/dist/editor/ai/terminal/useAgentVoiceInput.js.map +1 -0
- package/dist/editor/ai/terminal/useSuppressedQueuedPrompts.d.ts +6 -0
- package/dist/editor/ai/terminal/useSuppressedQueuedPrompts.js +57 -0
- package/dist/editor/ai/terminal/useSuppressedQueuedPrompts.js.map +1 -0
- package/dist/editor/client/EditorShell.js +2 -2
- package/dist/editor/client/EditorShell.js.map +1 -1
- package/dist/editor/client/editContext.d.ts +2 -2
- package/dist/editor/client/editContext.js.map +1 -1
- package/dist/editor/client/hooks/useEditorWebSocket.js +48 -1
- package/dist/editor/client/hooks/useEditorWebSocket.js.map +1 -1
- package/dist/editor/client/hooks/useSocketMessageHandler.js +30 -0
- package/dist/editor/client/hooks/useSocketMessageHandler.js.map +1 -1
- package/dist/editor/client/operations.js +4 -2
- package/dist/editor/client/operations.js.map +1 -1
- package/dist/editor/client/pageModelBuilder.js +2 -2
- package/dist/editor/client/pageModelBuilder.js.map +1 -1
- package/dist/editor/commands/componentCommands.d.ts +11 -3
- package/dist/editor/commands/componentCommands.js +35 -3
- package/dist/editor/commands/componentCommands.js.map +1 -1
- package/dist/editor/commands/placeholderCommands.d.ts +17 -0
- package/dist/editor/commands/placeholderCommands.js +37 -0
- package/dist/editor/commands/placeholderCommands.js.map +1 -0
- package/dist/editor/debugSessionLog.d.ts +9 -0
- package/dist/editor/debugSessionLog.js +19 -0
- package/dist/editor/debugSessionLog.js.map +1 -0
- package/dist/editor/field-types/DropLinkEditor.js +30 -15
- package/dist/editor/field-types/DropLinkEditor.js.map +1 -1
- package/dist/editor/menubar/VersionSelector.js +7 -1
- package/dist/editor/menubar/VersionSelector.js.map +1 -1
- package/dist/editor/menubar/toolbar-sections/ViewportControls.js +7 -9
- package/dist/editor/menubar/toolbar-sections/ViewportControls.js.map +1 -1
- package/dist/editor/pageModel.d.ts +1 -0
- package/dist/editor/services/agentService.d.ts +9 -0
- package/dist/editor/services/agentService.js +12 -0
- package/dist/editor/services/agentService.js.map +1 -1
- package/dist/editor/services/editService.d.ts +1 -0
- package/dist/editor/services/editService.js.map +1 -1
- package/dist/editor/services/serviceHelper.js +14 -0
- package/dist/editor/services/serviceHelper.js.map +1 -1
- package/dist/editor/services/systemService.js +16 -0
- package/dist/editor/services/systemService.js.map +1 -1
- package/dist/editor/settings/panels/ProjectTemplatesPanel.js +4 -1
- package/dist/editor/settings/panels/ProjectTemplatesPanel.js.map +1 -1
- package/dist/editor/sidebar/ComponentTree.js +88 -5
- package/dist/editor/sidebar/ComponentTree.js.map +1 -1
- package/dist/editor/ui/DragPreview.d.ts +7 -0
- package/dist/editor/ui/DragPreview.js +96 -0
- package/dist/editor/ui/DragPreview.js.map +1 -1
- package/dist/index.d.ts +6 -3
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/revision.d.ts +2 -2
- package/dist/revision.js +2 -2
- package/package.json +1 -1
- package/dist/editor/ai/AgentBanners.js.map +0 -1
- package/dist/editor/ai/AgentCostDisplay.js.map +0 -1
- package/dist/editor/ai/AgentDocumentList.js.map +0 -1
- package/dist/editor/ai/AgentGreeting.js.map +0 -1
- package/dist/editor/ai/AgentTerminalStatusBar.js.map +0 -1
- package/dist/editor/ai/AiResponseMessage.js.map +0 -1
- package/dist/editor/ai/ContextInfoBar.js.map +0 -1
- package/dist/editor/ai/DancingDots.d.ts +0 -1
- package/dist/editor/ai/DancingDots.js +0 -6
- package/dist/editor/ai/DancingDots.js.map +0 -1
- package/dist/editor/ai/EditOperationsPanel.js.map +0 -1
- package/dist/editor/ai/HeartbeatMessage.js.map +0 -1
- package/dist/editor/ai/InitialThinkingSplash.js.map +0 -1
- package/dist/editor/ai/QueuedPromptsPanel.js.map +0 -1
- package/dist/editor/ai/SpawnedAgentsPanel.js.map +0 -1
- package/dist/editor/ai/TodoListPanel.js.map +0 -1
- package/dist/editor/ai/ToolCallDisplay.js.map +0 -1
- package/dist/editor/ai/UserMessage.js.map +0 -1
- /package/dist/editor/ai/{AgentBanners.d.ts → terminal/components/AgentBanners.d.ts} +0 -0
- /package/dist/editor/ai/{AgentBanners.js → terminal/components/AgentBanners.js} +0 -0
- /package/dist/editor/ai/{AgentCostDisplay.d.ts → terminal/components/AgentCostDisplay.d.ts} +0 -0
- /package/dist/editor/ai/{AgentDocumentList.d.ts → terminal/components/AgentDocumentList.d.ts} +0 -0
- /package/dist/editor/ai/{InitialThinkingSplash.d.ts → terminal/components/InitialThinkingSplash.d.ts} +0 -0
- /package/dist/editor/ai/{ToolCallDisplay.d.ts → terminal/components/ToolCallDisplay.d.ts} +0 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { AgentDetails } from "../../services/agentService";
|
|
2
|
+
export declare function useAgentStreamSubscription(input: {
|
|
3
|
+
effectiveIsVisible: boolean;
|
|
4
|
+
editContext?: {
|
|
5
|
+
addSocketMessageListener?: any;
|
|
6
|
+
} | null;
|
|
7
|
+
agentStubId: string;
|
|
8
|
+
agent: AgentDetails | undefined;
|
|
9
|
+
onMessage: (message: any) => void;
|
|
10
|
+
subscribedAgentIdRef: {
|
|
11
|
+
current: string | null;
|
|
12
|
+
};
|
|
13
|
+
seenMessageIdsRef: {
|
|
14
|
+
current: Set<string>;
|
|
15
|
+
};
|
|
16
|
+
lastSeqRef: {
|
|
17
|
+
current: number;
|
|
18
|
+
};
|
|
19
|
+
setIsWaitingForResponse: (next: boolean) => void;
|
|
20
|
+
isWaitingRef: {
|
|
21
|
+
current: boolean;
|
|
22
|
+
};
|
|
23
|
+
shouldCreateNewMessage: {
|
|
24
|
+
current: boolean;
|
|
25
|
+
};
|
|
26
|
+
setIsAgentThinking: (next: boolean) => void;
|
|
27
|
+
}): void;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { useEffect, useRef } from "react";
|
|
2
|
+
import { subscribeAgentSessionStream } from "./useAgentSessionSync";
|
|
3
|
+
export function useAgentStreamSubscription(input) {
|
|
4
|
+
const { effectiveIsVisible, editContext, agentStubId, agent, onMessage, subscribedAgentIdRef, seenMessageIdsRef, lastSeqRef, setIsWaitingForResponse, isWaitingRef, shouldCreateNewMessage, setIsAgentThinking, } = input;
|
|
5
|
+
const addSocketMessageListener = editContext?.addSocketMessageListener;
|
|
6
|
+
const agentRef = useRef(agent);
|
|
7
|
+
const onMessageRef = useRef(onMessage);
|
|
8
|
+
useEffect(() => {
|
|
9
|
+
agentRef.current = agent;
|
|
10
|
+
}, [agent]);
|
|
11
|
+
useEffect(() => {
|
|
12
|
+
onMessageRef.current = onMessage;
|
|
13
|
+
}, [onMessage]);
|
|
14
|
+
useEffect(() => {
|
|
15
|
+
if (!effectiveIsVisible || !addSocketMessageListener) {
|
|
16
|
+
subscribedAgentIdRef.current = null;
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
const stableHandler = (message) => {
|
|
20
|
+
onMessageRef.current(message);
|
|
21
|
+
};
|
|
22
|
+
const unsubscribe = subscribeAgentSessionStream({
|
|
23
|
+
agentId: agentStubId,
|
|
24
|
+
addSocketMessageListener,
|
|
25
|
+
onMessage: stableHandler,
|
|
26
|
+
});
|
|
27
|
+
subscribedAgentIdRef.current = agentStubId;
|
|
28
|
+
seenMessageIdsRef.current.clear();
|
|
29
|
+
lastSeqRef.current = 0;
|
|
30
|
+
const currentAgent = agentRef.current;
|
|
31
|
+
if (currentAgent) {
|
|
32
|
+
const isRunning = currentAgent.status === "running" || currentAgent.status === 1;
|
|
33
|
+
const isWaitingForApproval = currentAgent.status === "waitingForApproval" ||
|
|
34
|
+
currentAgent.status === 2;
|
|
35
|
+
const isWaitingForInput = currentAgent.status === "waitingForInput";
|
|
36
|
+
if (isRunning) {
|
|
37
|
+
setIsWaitingForResponse(true);
|
|
38
|
+
isWaitingRef.current = true;
|
|
39
|
+
shouldCreateNewMessage.current = false;
|
|
40
|
+
setIsAgentThinking(true);
|
|
41
|
+
}
|
|
42
|
+
else if (isWaitingForApproval || isWaitingForInput) {
|
|
43
|
+
setIsWaitingForResponse(false);
|
|
44
|
+
isWaitingRef.current = false;
|
|
45
|
+
setIsAgentThinking(false);
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
setIsWaitingForResponse(false);
|
|
49
|
+
isWaitingRef.current = false;
|
|
50
|
+
setIsAgentThinking(false);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
return () => {
|
|
54
|
+
unsubscribe();
|
|
55
|
+
subscribedAgentIdRef.current = null;
|
|
56
|
+
};
|
|
57
|
+
}, [
|
|
58
|
+
addSocketMessageListener,
|
|
59
|
+
agentStubId,
|
|
60
|
+
effectiveIsVisible,
|
|
61
|
+
isWaitingRef,
|
|
62
|
+
lastSeqRef,
|
|
63
|
+
seenMessageIdsRef,
|
|
64
|
+
setIsAgentThinking,
|
|
65
|
+
setIsWaitingForResponse,
|
|
66
|
+
shouldCreateNewMessage,
|
|
67
|
+
subscribedAgentIdRef,
|
|
68
|
+
]);
|
|
69
|
+
}
|
|
70
|
+
//# sourceMappingURL=useAgentStreamSubscription.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAgentStreamSubscription.js","sourceRoot":"","sources":["../../../../src/editor/ai/terminal/useAgentStreamSubscription.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAE1C,OAAO,EAAE,2BAA2B,EAAE,MAAM,uBAAuB,CAAC;AAEpE,MAAM,UAAU,0BAA0B,CAAC,KAa1C;IACC,MAAM,EACJ,kBAAkB,EAClB,WAAW,EACX,WAAW,EACX,KAAK,EACL,SAAS,EACT,oBAAoB,EACpB,iBAA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Y,CAAC,MAAM,KAAK,oBAAoB;gBAC3C,YAAY,CAAC,MAAc,KAAK,CAAC,CAAC;YACrC,MAAM,iBAAiB,GAAG,YAAY,CAAC,MAAM,KAAK,iBAAiB,CAAC;YAEpE,IAAI,SAAS,EAAE,CAAC;gBACd,uBAAuB,CAAC,IAAI,CAAC,CAAC;gBAC9B,YAAY,CAAC,OAAO,GAAG,IAAI,CAAC;gBAC5B,sBAAsB,CAAC,OAAO,GAAG,KAAK,CAAC;gBACvC,kBAAkB,CAAC,IAAI,CAAC,CAAC;YAC3B,CAAC;iBAAM,IAAI,oBAAoB,IAAI,iBAAiB,EAAE,CAAC;gBACrD,uBAAuB,CAAC,KAAK,CAAC,CAAC;gBAC/B,YAAY,CAAC,OAAO,GAAG,KAAK,CAAC;gBAC7B,kBAAkB,CAAC,KAAK,CAAC,CAAC;YAC5B,CAAC;iBAAM,CAAC;gBACN,uBAAuB,CAAC,KAAK,CAAC,CAAC;gBAC/B,YAAY,CAAC,OAAO,GAAG,KAAK,CAAC;gBAC7B,kBAAkB,CAAC,KAAK,CAAC,CAAC;YAC5B,CAAC;QACH,CAAC;QAED,OAAO,GAAG,EAAE;YACV,WAAW,EAAE,CAAC;YACd,oBAAoB,CAAC,OAAO,GAAG,IAAI,CAAC;QACtC,CAAC,CAAC;IACJ,CAAC,EAAE;QACD,wBAAwB;QACxB,WAAW;QACX,kBAAkB;QAClB,YAAY;QACZ,UAAU;QACV,iBAAiB;QACjB,kBAAkB;QAClB,uBAAuB;QACvB,sBAAsB;QACtB,oBAAoB;KACrB,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export declare function useAgentStreamWatchdog(input: {
|
|
2
|
+
currentAgentId: string | undefined;
|
|
3
|
+
sessionId: string | undefined;
|
|
4
|
+
socketConnectionVersion: unknown;
|
|
5
|
+
effectiveIsVisible: boolean;
|
|
6
|
+
isExecuting: boolean;
|
|
7
|
+
isStopGuardActive: boolean;
|
|
8
|
+
isAgentThinking: boolean;
|
|
9
|
+
isSubmitting: boolean;
|
|
10
|
+
isConnecting: boolean;
|
|
11
|
+
isWaitingForResponse: boolean;
|
|
12
|
+
hasActiveStreaming: boolean;
|
|
13
|
+
lastRunStatusReason: string | null | undefined;
|
|
14
|
+
isStoppingRef: {
|
|
15
|
+
current: boolean;
|
|
16
|
+
};
|
|
17
|
+
lastNonHeartbeatUpdateAtRef: {
|
|
18
|
+
current: number;
|
|
19
|
+
};
|
|
20
|
+
lastStallReloadAtRef: {
|
|
21
|
+
current: number;
|
|
22
|
+
};
|
|
23
|
+
lastSeqRef: {
|
|
24
|
+
current: number;
|
|
25
|
+
};
|
|
26
|
+
currentRunIdRef: {
|
|
27
|
+
current: string | null;
|
|
28
|
+
};
|
|
29
|
+
seenMessageIdsRef: {
|
|
30
|
+
current: {
|
|
31
|
+
clear: () => void;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
appendToolUiEvent: (eventType: string, detail?: string) => void;
|
|
35
|
+
loadAgent: () => Promise<void>;
|
|
36
|
+
normalizeRunId: (value: unknown) => string | null;
|
|
37
|
+
settleCompletedRun: (finalStatus?: "completed" | "cancelled", runId?: string | null) => void;
|
|
38
|
+
}): void;
|
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
import { useEffect, useRef } from "react";
|
|
2
|
+
import { getBackendLatestSeq, isStreamStalled, shouldReloadAfterDiagnostics, STREAM_STALLED_AFTER_MS, } from "../agentDiagnostics";
|
|
3
|
+
import { emitAgentRecoveryEvent } from "../agentRecoveryEventBus";
|
|
4
|
+
import { MACHINE_CAPACITY_REASON, isInactiveServerExecutionStatus, normalizeServerExecutionStatus, } from "../agentMessageHelpers";
|
|
5
|
+
import { updateAgentWatchdogStatus } from "../agentWatchdogStatusRegistry";
|
|
6
|
+
import { forceEditorSocketReconnect } from "../../client/hooks/useEditorWebSocket";
|
|
7
|
+
import { selectIsWatchdogActive } from "./agentSessionSelectors";
|
|
8
|
+
import { loadAgentRunDiagnostics } from "./useAgentSessionSync";
|
|
9
|
+
export function useAgentStreamWatchdog(input) {
|
|
10
|
+
const { currentAgentId, sessionId, socketConnectionVersion, effectiveIsVisible, isExecuting, isStopGuardActive, isAgentThinking, isSubmitting, isConnecting, isWaitingForResponse, hasActiveStreaming, lastRunStatusReason, isStoppingRef, lastNonHeartbeatUpdateAtRef, lastStallReloadAtRef, lastSeqRef, currentRunIdRef, seenMessageIdsRef, appendToolUiEvent, loadAgent, normalizeRunId, settleCompletedRun, } = input;
|
|
11
|
+
const previousWatchdogActiveRef = useRef(false);
|
|
12
|
+
const isWatchdogActive = selectIsWatchdogActive({
|
|
13
|
+
isStopGuardActive,
|
|
14
|
+
isExecuting,
|
|
15
|
+
isAgentThinking,
|
|
16
|
+
isSubmitting,
|
|
17
|
+
isConnecting,
|
|
18
|
+
isWaitingForResponse,
|
|
19
|
+
hasActiveStreaming,
|
|
20
|
+
});
|
|
21
|
+
useEffect(() => {
|
|
22
|
+
if (isWatchdogActive && !previousWatchdogActiveRef.current) {
|
|
23
|
+
lastNonHeartbeatUpdateAtRef.current = Date.now();
|
|
24
|
+
}
|
|
25
|
+
previousWatchdogActiveRef.current = isWatchdogActive;
|
|
26
|
+
}, [isWatchdogActive, lastNonHeartbeatUpdateAtRef]);
|
|
27
|
+
useEffect(() => {
|
|
28
|
+
if (isWatchdogActive) {
|
|
29
|
+
lastNonHeartbeatUpdateAtRef.current = Date.now();
|
|
30
|
+
}
|
|
31
|
+
}, [
|
|
32
|
+
socketConnectionVersion,
|
|
33
|
+
isWatchdogActive,
|
|
34
|
+
lastNonHeartbeatUpdateAtRef,
|
|
35
|
+
]);
|
|
36
|
+
useEffect(() => {
|
|
37
|
+
lastNonHeartbeatUpdateAtRef.current = 0;
|
|
38
|
+
lastStallReloadAtRef.current = 0;
|
|
39
|
+
}, [currentAgentId, lastNonHeartbeatUpdateAtRef, lastStallReloadAtRef]);
|
|
40
|
+
useEffect(() => {
|
|
41
|
+
if (!currentAgentId)
|
|
42
|
+
return;
|
|
43
|
+
updateAgentWatchdogStatus(currentAgentId, {
|
|
44
|
+
isExecuting,
|
|
45
|
+
isWatchdogActive,
|
|
46
|
+
isVisible: effectiveIsVisible,
|
|
47
|
+
isStopping: isStoppingRef.current,
|
|
48
|
+
isWaitingForCapacity: lastRunStatusReason === MACHINE_CAPACITY_REASON,
|
|
49
|
+
stalledThresholdMs: STREAM_STALLED_AFTER_MS,
|
|
50
|
+
});
|
|
51
|
+
}, [
|
|
52
|
+
currentAgentId,
|
|
53
|
+
isExecuting,
|
|
54
|
+
isWatchdogActive,
|
|
55
|
+
effectiveIsVisible,
|
|
56
|
+
lastRunStatusReason,
|
|
57
|
+
isStoppingRef,
|
|
58
|
+
]);
|
|
59
|
+
useEffect(() => {
|
|
60
|
+
if (!effectiveIsVisible || !isWatchdogActive || !currentAgentId) {
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
let disposed = false;
|
|
64
|
+
const agentIdAtMount = currentAgentId;
|
|
65
|
+
lastNonHeartbeatUpdateAtRef.current = Date.now();
|
|
66
|
+
updateAgentWatchdogStatus(agentIdAtMount, {
|
|
67
|
+
running: true,
|
|
68
|
+
startedAt: Date.now(),
|
|
69
|
+
stalledThresholdMs: STREAM_STALLED_AFTER_MS,
|
|
70
|
+
});
|
|
71
|
+
const logRecoveryEvent = (kind, payload) => {
|
|
72
|
+
try {
|
|
73
|
+
appendToolUiEvent(`recovery:${kind}`, JSON.stringify({ agentId: agentIdAtMount, ...payload }));
|
|
74
|
+
}
|
|
75
|
+
catch {
|
|
76
|
+
// Telemetry must never throw out of the watchdog path.
|
|
77
|
+
}
|
|
78
|
+
try {
|
|
79
|
+
emitAgentRecoveryEvent({
|
|
80
|
+
agentId: agentIdAtMount,
|
|
81
|
+
kind,
|
|
82
|
+
payload,
|
|
83
|
+
timestamp: new Date().toISOString(),
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
catch {
|
|
87
|
+
// Telemetry must never throw out of the watchdog path.
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
const tick = async () => {
|
|
91
|
+
updateAgentWatchdogStatus(agentIdAtMount, {
|
|
92
|
+
running: true,
|
|
93
|
+
lastTickAt: Date.now(),
|
|
94
|
+
isExecuting,
|
|
95
|
+
isWatchdogActive: true,
|
|
96
|
+
isVisible: true,
|
|
97
|
+
isStopping: isStoppingRef.current,
|
|
98
|
+
isWaitingForCapacity: lastRunStatusReason === MACHINE_CAPACITY_REASON,
|
|
99
|
+
lastNonHeartbeatUpdateAt: lastNonHeartbeatUpdateAtRef.current,
|
|
100
|
+
stalledThresholdMs: STREAM_STALLED_AFTER_MS,
|
|
101
|
+
});
|
|
102
|
+
if (!isStreamStalled({
|
|
103
|
+
isExecuting: true,
|
|
104
|
+
isVisible: true,
|
|
105
|
+
isStopping: isStoppingRef.current,
|
|
106
|
+
isWaitingForCapacity: lastRunStatusReason === MACHINE_CAPACITY_REASON,
|
|
107
|
+
lastUpdateAt: lastNonHeartbeatUpdateAtRef.current,
|
|
108
|
+
now: Date.now(),
|
|
109
|
+
})) {
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
logRecoveryEvent("stall-check", {
|
|
113
|
+
silentMs: Date.now() - lastNonHeartbeatUpdateAtRef.current,
|
|
114
|
+
localSeq: lastSeqRef.current,
|
|
115
|
+
});
|
|
116
|
+
let diagnostics;
|
|
117
|
+
try {
|
|
118
|
+
diagnostics = await loadAgentRunDiagnostics(agentIdAtMount, sessionId);
|
|
119
|
+
}
|
|
120
|
+
catch (error) {
|
|
121
|
+
console.warn("[AgentTerminal] Stall watchdog failed to fetch diagnostics", error);
|
|
122
|
+
logRecoveryEvent("diagnostics-failed", {
|
|
123
|
+
message: error instanceof Error ? error.message : String(error),
|
|
124
|
+
});
|
|
125
|
+
lastNonHeartbeatUpdateAtRef.current = Date.now();
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
128
|
+
if (disposed || agentIdAtMount !== currentAgentId) {
|
|
129
|
+
return;
|
|
130
|
+
}
|
|
131
|
+
const backendSeq = getBackendLatestSeq(diagnostics);
|
|
132
|
+
const localSeq = lastSeqRef.current;
|
|
133
|
+
if (isInactiveServerExecutionStatus(diagnostics.execution?.status)) {
|
|
134
|
+
const diagnosticRunId = diagnostics.execution?.runId ?? null;
|
|
135
|
+
const normalizedDiagnosticRunId = normalizeRunId(diagnosticRunId);
|
|
136
|
+
if (currentRunIdRef.current !== null &&
|
|
137
|
+
normalizedDiagnosticRunId !== null &&
|
|
138
|
+
currentRunIdRef.current !== normalizedDiagnosticRunId) {
|
|
139
|
+
logRecoveryEvent("finished-run-stale", {
|
|
140
|
+
status: diagnostics.execution?.status,
|
|
141
|
+
diagnosticRunId,
|
|
142
|
+
currentRunId: currentRunIdRef.current,
|
|
143
|
+
backendSeq,
|
|
144
|
+
localSeq,
|
|
145
|
+
});
|
|
146
|
+
lastNonHeartbeatUpdateAtRef.current = Date.now();
|
|
147
|
+
return;
|
|
148
|
+
}
|
|
149
|
+
logRecoveryEvent("finished-run-reconcile", {
|
|
150
|
+
status: diagnostics.execution?.status,
|
|
151
|
+
backendSeq,
|
|
152
|
+
localSeq,
|
|
153
|
+
});
|
|
154
|
+
try {
|
|
155
|
+
await loadAgent();
|
|
156
|
+
}
|
|
157
|
+
catch (error) {
|
|
158
|
+
console.warn("[AgentTerminal] Finished-run reconcile loadAgent() failed", error);
|
|
159
|
+
}
|
|
160
|
+
if (disposed || agentIdAtMount !== currentAgentId) {
|
|
161
|
+
return;
|
|
162
|
+
}
|
|
163
|
+
settleCompletedRun(normalizeServerExecutionStatus(diagnostics.execution?.status) ===
|
|
164
|
+
"cancelled"
|
|
165
|
+
? "cancelled"
|
|
166
|
+
: "completed", diagnosticRunId);
|
|
167
|
+
lastNonHeartbeatUpdateAtRef.current = Date.now();
|
|
168
|
+
return;
|
|
169
|
+
}
|
|
170
|
+
if (!shouldReloadAfterDiagnostics({ localSeq, backendSeq })) {
|
|
171
|
+
lastNonHeartbeatUpdateAtRef.current = Date.now();
|
|
172
|
+
return;
|
|
173
|
+
}
|
|
174
|
+
const sinceLastReload = Date.now() - lastStallReloadAtRef.current;
|
|
175
|
+
if (lastStallReloadAtRef.current > 0 && sinceLastReload < 30_000) {
|
|
176
|
+
logRecoveryEvent("reload-cooldown", { sinceLastReload });
|
|
177
|
+
lastNonHeartbeatUpdateAtRef.current = Date.now();
|
|
178
|
+
return;
|
|
179
|
+
}
|
|
180
|
+
lastStallReloadAtRef.current = Date.now();
|
|
181
|
+
logRecoveryEvent("reload-fired", { backendSeq, localSeq });
|
|
182
|
+
lastSeqRef.current = 0;
|
|
183
|
+
seenMessageIdsRef.current.clear();
|
|
184
|
+
try {
|
|
185
|
+
await loadAgent();
|
|
186
|
+
}
|
|
187
|
+
catch (error) {
|
|
188
|
+
console.warn("[AgentTerminal] Stall reload loadAgent() failed", error);
|
|
189
|
+
}
|
|
190
|
+
if (disposed || agentIdAtMount !== currentAgentId) {
|
|
191
|
+
return;
|
|
192
|
+
}
|
|
193
|
+
forceEditorSocketReconnect("agent-stream-stalled");
|
|
194
|
+
lastNonHeartbeatUpdateAtRef.current = Date.now();
|
|
195
|
+
};
|
|
196
|
+
const intervalId = window.setInterval(() => {
|
|
197
|
+
void tick();
|
|
198
|
+
}, 5_000);
|
|
199
|
+
return () => {
|
|
200
|
+
disposed = true;
|
|
201
|
+
window.clearInterval(intervalId);
|
|
202
|
+
updateAgentWatchdogStatus(agentIdAtMount, {
|
|
203
|
+
running: false,
|
|
204
|
+
stoppedAt: Date.now(),
|
|
205
|
+
});
|
|
206
|
+
};
|
|
207
|
+
}, [
|
|
208
|
+
appendToolUiEvent,
|
|
209
|
+
currentAgentId,
|
|
210
|
+
currentRunIdRef,
|
|
211
|
+
effectiveIsVisible,
|
|
212
|
+
hasActiveStreaming,
|
|
213
|
+
isAgentThinking,
|
|
214
|
+
isConnecting,
|
|
215
|
+
isExecuting,
|
|
216
|
+
isStoppingRef,
|
|
217
|
+
isStopGuardActive,
|
|
218
|
+
isSubmitting,
|
|
219
|
+
isWaitingForResponse,
|
|
220
|
+
isWatchdogActive,
|
|
221
|
+
lastNonHeartbeatUpdateAtRef,
|
|
222
|
+
lastRunStatusReason,
|
|
223
|
+
lastSeqRef,
|
|
224
|
+
lastStallReloadAtRef,
|
|
225
|
+
loadAgent,
|
|
226
|
+
normalizeRunId,
|
|
227
|
+
seenMessageIdsRef,
|
|
228
|
+
sessionId,
|
|
229
|
+
settleCompletedRun,
|
|
230
|
+
]);
|
|
231
|
+
}
|
|
232
|
+
//# sourceMappingURL=useAgentStreamWatchdog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAgentStreamWatchdog.js","sourceRoot":"","sources":["../../../../src/editor/ai/terminal/useAgentStreamWatchdog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EACL,mBAAmB,EACnB,eAAe,EACf,4BAA4B,EAC5B,uBAAuB,GACxB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EACL,uBAAuB,EACvB,+BAA+B,EAC/B,8BAA8B,GAC/B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,0BAA0B,EAAE,MAAM,uCAAuC,CAAC;AACnF,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAEhE,MAAM,UAAU,sBAAsB,CAAC,KA0BtC;IACC,MAAM,EACJ,cAAc,EACd,SAAS,EACT,uBAAuB,EACvB,kBAAkB,EAClB,WAAW,EACX,iBAAiB,EACjB,eAAe,EACf,YAAY,EACZ,YAAY,EACZ,oBAAoB,EACpB,kBAAkB,EAClB,mBAAmB,EACnB,aAAa,EACb,2BAA2B,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AAE;YACzC,KAAK,IAAI,EAAE,CAAC;QACd,CAAC,EAAE,KAAK,CAAC,CAAC;QAEV,OAAO,GAAG,EAAE;YACV,QAAQ,GAAG,IAAI,CAAC;YAChB,MAAM,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;YACjC,yBAAyB,CAAC,cAAc,EAAE;gBACxC,OAAO,EAAE,KAAK;gBACd,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE;aACtB,CAAC,CAAC;QACL,CAAC,CAAC;IACJ,CAAC,EAAE;QACD,iBAAiB;QACjB,cAAc;QACd,eAAe;QACf,kBAAkB;QAClB,kBAAkB;QAClB,eAAe;QACf,YAAY;QACZ,WAAW;QACX,aAAa;QACb,iBAAiB;QACjB,YAAY;QACZ,oBAAoB;QACpB,gBAAgB;QAChB,2BAA2B;QAC3B,mBAAmB;QACnB,UAAU;QACV,oBAAoB;QACpB,SAAS;QACT,cAAc;QACd,iBAAiB;QACjB,SAAS;QACT,kBAAkB;KACnB,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { AgentDetails, AgentMetadata } from "../../services/agentService";
|
|
2
|
+
import type { AiProfile } from "../../services/aiService";
|
|
3
|
+
export declare function useAgentSubmitContextBuilder(input: {
|
|
4
|
+
agent: AgentDetails | undefined;
|
|
5
|
+
agentMetadata: AgentMetadata | null;
|
|
6
|
+
activeProfile: AiProfile | undefined;
|
|
7
|
+
profiles: AiProfile[];
|
|
8
|
+
editContext: any;
|
|
9
|
+
buildCurrentContext: () => AgentMetadata | null;
|
|
10
|
+
addVisibleTestIdsToContext: (context: AgentMetadata | null, profileName: string) => AgentMetadata | null;
|
|
11
|
+
}): (options: {
|
|
12
|
+
profileName: string;
|
|
13
|
+
liveContextWarning: string;
|
|
14
|
+
}) => Promise<AgentMetadata | null>;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { useCallback } from "react";
|
|
2
|
+
export function useAgentSubmitContextBuilder(input) {
|
|
3
|
+
const { agent, agentMetadata, activeProfile, profiles, editContext, buildCurrentContext, addVisibleTestIdsToContext, } = input;
|
|
4
|
+
return useCallback(async (options) => {
|
|
5
|
+
const factoryName = agentMetadata?.additionalData
|
|
6
|
+
?.contextFactory;
|
|
7
|
+
if (factoryName) {
|
|
8
|
+
const factory = editContext?.getContextFactory?.(factoryName);
|
|
9
|
+
if (factory) {
|
|
10
|
+
try {
|
|
11
|
+
await Promise.resolve(factory());
|
|
12
|
+
}
|
|
13
|
+
catch (error) {
|
|
14
|
+
console.warn(`Context factory '${factoryName}' failed: ${error?.message || String(error)}`);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
else {
|
|
18
|
+
console.warn(`Context factory not found: ${factoryName}. Proceeding without it.`);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
let effectiveContext = agentMetadata;
|
|
22
|
+
try {
|
|
23
|
+
const normalizedAgentProfileId = agent?.profileId?.toLowerCase();
|
|
24
|
+
const profile = activeProfile ||
|
|
25
|
+
profiles.find((candidate) => candidate.id?.toLowerCase() === normalizedAgentProfileId);
|
|
26
|
+
const isLiveMode = profile?.editorContextMode === "live";
|
|
27
|
+
if (isLiveMode && typeof buildCurrentContext === "function") {
|
|
28
|
+
const freshContext = buildCurrentContext();
|
|
29
|
+
if (freshContext) {
|
|
30
|
+
effectiveContext = {
|
|
31
|
+
...(agentMetadata || {}),
|
|
32
|
+
items: freshContext.items,
|
|
33
|
+
currentItemId: freshContext.currentItemId,
|
|
34
|
+
components: freshContext.components,
|
|
35
|
+
field: freshContext.field,
|
|
36
|
+
activeWorkspace: freshContext.activeWorkspace,
|
|
37
|
+
hasPageLoaded: freshContext.hasPageLoaded,
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
catch (error) {
|
|
43
|
+
console.warn(options.liveContextWarning, error);
|
|
44
|
+
}
|
|
45
|
+
return addVisibleTestIdsToContext(effectiveContext, options.profileName);
|
|
46
|
+
}, [
|
|
47
|
+
activeProfile,
|
|
48
|
+
addVisibleTestIdsToContext,
|
|
49
|
+
agent?.profileId,
|
|
50
|
+
agentMetadata,
|
|
51
|
+
buildCurrentContext,
|
|
52
|
+
editContext,
|
|
53
|
+
profiles,
|
|
54
|
+
]);
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=useAgentSubmitContextBuilder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAgentSubmitContextBuilder.js","sourceRoot":"","sources":["../../../../src/editor/ai/terminal/useAgentSubmitContextBuilder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAIpC,MAAM,UAAU,4BAA4B,CAAC,KAW5C;IACC,MAAM,EACJ,KAAK,EACL,aAAa,EACb,aAAa,EACb,QAAQ,EACR,WAAW,EACX,mBAAmB,EACnB,0BAA0B,GAC3B,GAAG,KAAK,CAAC;IAEV,OAAO,WAAW,CAChB,KAAK,EAAE,OAGN,EAAiC,EAAE;QAClC,MAAM,WAAW,GAAI,aAAqB,EAAE,cAAc;YACxD,EAAE,cAAoC,CAAC;QACzC,IAAI,WAAW,EAAE,CAAC;YAChB,MAAM,OAAO,GAAG,WAAW,EAAE,iBAAiB,EAAE,CAAC,WAAW,CAAC,CAAC;YAC9D,IAAI,OAAO,EAAE,CAAC;gBACZ,IAAI,CAAC;oBACH,MAAM,OAAO,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC;gBACnC,CAAC;gBAAC,OAAO,KAAU,EAAE,CAAC;oBACpB,OAAO,CAAC,IAAI,CACV,oBAAoB,WAAW,aAAa,KAAK,EAAE,OAAO,IAAI,MAAM,CAAC,KAAK,CAAC,EAAE,CAC9E,CAAC;gBACJ,CAAC;YACH,CAAC;iBAAM,CAAC;gBACN,OAAO,CAAC,IAAI,CACV,8BAA8B,WAAW,0BAA0B,CACpE,CAAC;YACJ,CAAC;QACH,CAAC;QAED,IAAI,gBAAgB,GAAG,aAAa,CAAC;QACrC,IAAI,CAAC;YACH,MAAM,wBAAwB,GAAG,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,CAAC;YACjE,MAAM,OAAO,GACX,aAAa;gBACb,QAAQ,CAAC,IAAI,CACX,CAAC,SAAS,EAAE,EAAE,CACZ,SAAS,CAAC,EAAE,EAAE,WAAW,EAAE,KAAK,wBAAwB,CAC3D,CAAC;YACJ,MAAM,UAAU,GAAG,OAAO,EAAE,iBAAiB,KAAK,MAAM,CAAC;YACzD,IAAI,UAAU,IAAI,OAAO,mBAAmB,KAAK,UAAU,EAAE,CAAC;gBAC5D,MAAM,YAAY,GAAG,mBAAmB,EAAE,CAAC;gBAC3C,IAAI,YAAY,EAAE,CAAC;oBACjB,gBAAgB,GAAG;wBACjB,GAAG,CAAC,aAAa,IAAI,EAAE,CAAC;wBACxB,KAAK,EAAE,YAAY,CAAC,KAAK;wBACzB,aAAa,EAAE,YAAY,CAAC,aAAa;wBACzC,UAAU,EAAE,YAAY,CAAC,UAAU;wBACnC,KAAK,EAAE,YAAY,CAAC,KAAK;wBACzB,eAAe,EAAE,YAAY,CAAC,eAAe;wBAC7C,aAAa,EAAE,YAAY,CAAC,aAAa;qBACzB,CAAC;gBACrB,CAAC;YACH,CAAC;QACH,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,kBAAkB,EAAE,KAAK,CAAC,CAAC;QAClD,CAAC;QAED,OAAO,0BAA0B,CAAC,gBAAgB,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC;IAC3E,CAAC,EACD;QACE,aAAa;QACb,0BAA0B;QAC1B,KAAK,EAAE,SAAS;QAChB,aAAa;QACb,mBAAmB;QACnB,WAAW;QACX,QAAQ;KACT,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { type MutableRefObject, type SetStateAction } from "react";
|
|
2
|
+
import type { AgentDetails } from "../../services/agentService";
|
|
3
|
+
import type { ActivePlaceholderInput } from "./useAgentPromptComposerHandlers";
|
|
4
|
+
type StateSetter<T> = (next: SetStateAction<T>) => void;
|
|
5
|
+
export declare function useAgentSubmitHandlers(input: {
|
|
6
|
+
readOnly: boolean;
|
|
7
|
+
isSubmitting: boolean;
|
|
8
|
+
editContext: any;
|
|
9
|
+
agent: AgentDetails | undefined;
|
|
10
|
+
agentStub: Pick<AgentDetails, "id" | "status">;
|
|
11
|
+
prompt: string;
|
|
12
|
+
activePlaceholderInput: ActivePlaceholderInput | null;
|
|
13
|
+
allPlaceholdersFilled: boolean;
|
|
14
|
+
placeholderInputRef: MutableRefObject<any>;
|
|
15
|
+
promptPlaceholderInputRef: MutableRefObject<any>;
|
|
16
|
+
shouldSubmitFilledPlaceholderInputRef: MutableRefObject<boolean>;
|
|
17
|
+
activeInlineDialogRef: MutableRefObject<any>;
|
|
18
|
+
isWaitingRef: MutableRefObject<boolean>;
|
|
19
|
+
lastNonHeartbeatUpdateAtRef: MutableRefObject<number>;
|
|
20
|
+
clearStopGuard: () => void;
|
|
21
|
+
supersedePendingApprovals: () => Promise<boolean>;
|
|
22
|
+
hasPendingApprovals: () => boolean;
|
|
23
|
+
registerSuppressedQueuedPrompt: (agentId: string, prompt: string) => string | null;
|
|
24
|
+
clearSuppressedQueuedPrompt: (token: string | null) => void;
|
|
25
|
+
cancelActiveInlineDialog: () => void;
|
|
26
|
+
addOptimisticTranscriptMessage: (message: any) => void;
|
|
27
|
+
removeOptimisticTranscriptMessage: (messageId: string) => void;
|
|
28
|
+
getPendingRequestSettings: () => any;
|
|
29
|
+
buildSubmitContext: (input: {
|
|
30
|
+
profileName: string;
|
|
31
|
+
liveContextWarning: string;
|
|
32
|
+
}) => Promise<any>;
|
|
33
|
+
handleSubmitResponse: (input: {
|
|
34
|
+
response: any;
|
|
35
|
+
tempMessageId: string;
|
|
36
|
+
suppressedQueuedPromptToken: string | null;
|
|
37
|
+
}) => void;
|
|
38
|
+
persistPendingSettingsIfNeeded: () => Promise<void>;
|
|
39
|
+
onInteractionSubmitted?: () => void | Promise<void>;
|
|
40
|
+
setError: StateSetter<string | null>;
|
|
41
|
+
setPrompt: (prompt: string) => void;
|
|
42
|
+
setIsSubmitting: (isSubmitting: boolean) => void;
|
|
43
|
+
setIsWaitingForResponse: (isWaitingForResponse: boolean) => void;
|
|
44
|
+
setIsAgentThinking: (isAgentThinking: boolean) => void;
|
|
45
|
+
setShouldAutoScroll: (shouldAutoScroll: boolean) => void;
|
|
46
|
+
setPromptHistory: StateSetter<string[]>;
|
|
47
|
+
setCurrentHistoryIndex: (index: number) => void;
|
|
48
|
+
}): {
|
|
49
|
+
handleSubmit: (promptOverride?: string) => Promise<void>;
|
|
50
|
+
sendQuickMessage: (text: string) => Promise<void>;
|
|
51
|
+
};
|
|
52
|
+
export {};
|