@dexto/tui 1.15.0-beta.0 → 1.15.0-beta.1
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/InkCLIRefactored.cjs +30 -24
- package/dist/InkCLIRefactored.d.ts.map +1 -1
- package/dist/InkCLIRefactored.js +30 -24
- package/dist/components/ApprovalPrompt.cjs +128 -40
- package/dist/components/ApprovalPrompt.d.ts +2 -0
- package/dist/components/ApprovalPrompt.d.ts.map +1 -1
- package/dist/components/ApprovalPrompt.js +128 -41
- package/dist/components/CustomInput.cjs +4 -3
- package/dist/components/CustomInput.d.ts.map +1 -1
- package/dist/components/CustomInput.js +4 -3
- package/dist/components/DeckArea.cjs +43 -0
- package/dist/components/DeckArea.d.ts +14 -0
- package/dist/components/DeckArea.d.ts.map +1 -0
- package/dist/components/DeckArea.js +19 -0
- package/dist/components/EditableMultiLineInput.cjs +9 -8
- package/dist/components/EditableMultiLineInput.d.ts.map +1 -1
- package/dist/components/EditableMultiLineInput.js +9 -8
- package/dist/components/ElicitationForm.cjs +78 -18
- package/dist/components/ElicitationForm.d.ts.map +1 -1
- package/dist/components/ElicitationForm.js +78 -18
- package/dist/components/ErrorBoundary.cjs +15 -5
- package/dist/components/ErrorBoundary.d.ts.map +1 -1
- package/dist/components/ErrorBoundary.js +15 -5
- package/dist/components/Footer.cjs +37 -113
- package/dist/components/Footer.d.ts +2 -2
- package/dist/components/Footer.d.ts.map +1 -1
- package/dist/components/Footer.js +40 -119
- package/dist/components/HistorySearchBar.cjs +6 -5
- package/dist/components/HistorySearchBar.d.ts.map +1 -1
- package/dist/components/HistorySearchBar.js +6 -5
- package/dist/components/MultiLineInput.cjs +6 -5
- package/dist/components/MultiLineInput.d.ts.map +1 -1
- package/dist/components/MultiLineInput.js +6 -5
- package/dist/components/ResourceAutocomplete.cjs +5 -4
- package/dist/components/ResourceAutocomplete.d.ts.map +1 -1
- package/dist/components/ResourceAutocomplete.js +5 -4
- package/dist/components/SignalGates.test.cjs +215 -0
- package/dist/components/SignalGates.test.d.ts +2 -0
- package/dist/components/SignalGates.test.d.ts.map +1 -0
- package/dist/components/SignalGates.test.js +217 -0
- package/dist/components/SlashCommandAutocomplete.cjs +4 -3
- package/dist/components/SlashCommandAutocomplete.d.ts.map +1 -1
- package/dist/components/SlashCommandAutocomplete.js +4 -3
- package/dist/components/StatusBar.cjs +13 -30
- package/dist/components/StatusBar.d.ts +1 -3
- package/dist/components/StatusBar.d.ts.map +1 -1
- package/dist/components/StatusBar.js +13 -30
- package/dist/components/TextBufferInput.cjs +13 -12
- package/dist/components/TextBufferInput.d.ts.map +1 -1
- package/dist/components/TextBufferInput.js +13 -12
- package/dist/components/TodoPanel.cjs +23 -16
- package/dist/components/TodoPanel.d.ts.map +1 -1
- package/dist/components/TodoPanel.js +23 -16
- package/dist/components/base/BaseAutocomplete.cjs +7 -6
- package/dist/components/base/BaseAutocomplete.d.ts.map +1 -1
- package/dist/components/base/BaseAutocomplete.js +7 -6
- package/dist/components/base/BaseSelector.cjs +5 -4
- package/dist/components/base/BaseSelector.d.ts.map +1 -1
- package/dist/components/base/BaseSelector.js +5 -4
- package/dist/components/chat/Footer.cjs +2 -1
- package/dist/components/chat/Footer.d.ts.map +1 -1
- package/dist/components/chat/Footer.js +2 -1
- package/dist/components/chat/Header.cjs +20 -16
- package/dist/components/chat/Header.d.ts.map +1 -1
- package/dist/components/chat/Header.js +20 -16
- package/dist/components/chat/MessageItem.cjs +47 -30
- package/dist/components/chat/MessageItem.d.ts.map +1 -1
- package/dist/components/chat/MessageItem.js +52 -29
- package/dist/components/chat/MessageList.cjs +3 -2
- package/dist/components/chat/MessageList.d.ts.map +1 -1
- package/dist/components/chat/MessageList.js +3 -2
- package/dist/components/chat/QueuedMessagesDisplay.cjs +17 -5
- package/dist/components/chat/QueuedMessagesDisplay.d.ts.map +1 -1
- package/dist/components/chat/QueuedMessagesDisplay.js +18 -6
- package/dist/components/chat/SignalMessage.cjs +116 -0
- package/dist/components/chat/SignalMessage.d.ts +18 -0
- package/dist/components/chat/SignalMessage.d.ts.map +1 -0
- package/dist/components/chat/SignalMessage.js +96 -0
- package/dist/components/chat/SignalMessage.test.cjs +112 -0
- package/dist/components/chat/SignalMessage.test.d.ts +2 -0
- package/dist/components/chat/SignalMessage.test.d.ts.map +1 -0
- package/dist/components/chat/SignalMessage.test.js +116 -0
- package/dist/components/chat/ToolIcon.cjs +6 -5
- package/dist/components/chat/ToolIcon.d.ts.map +1 -1
- package/dist/components/chat/ToolIcon.js +6 -5
- package/dist/components/chat/styled-boxes/ConfigBox.cjs +8 -7
- package/dist/components/chat/styled-boxes/ConfigBox.d.ts.map +1 -1
- package/dist/components/chat/styled-boxes/ConfigBox.js +8 -7
- package/dist/components/chat/styled-boxes/HelpBox.cjs +4 -3
- package/dist/components/chat/styled-boxes/HelpBox.d.ts.map +1 -1
- package/dist/components/chat/styled-boxes/HelpBox.js +4 -3
- package/dist/components/chat/styled-boxes/LogConfigBox.cjs +11 -3
- package/dist/components/chat/styled-boxes/LogConfigBox.d.ts.map +1 -1
- package/dist/components/chat/styled-boxes/LogConfigBox.js +11 -3
- package/dist/components/chat/styled-boxes/SessionHistoryBox.cjs +8 -7
- package/dist/components/chat/styled-boxes/SessionHistoryBox.d.ts.map +1 -1
- package/dist/components/chat/styled-boxes/SessionHistoryBox.js +8 -7
- package/dist/components/chat/styled-boxes/SessionListBox.cjs +19 -11
- package/dist/components/chat/styled-boxes/SessionListBox.d.ts.map +1 -1
- package/dist/components/chat/styled-boxes/SessionListBox.js +19 -11
- package/dist/components/chat/styled-boxes/ShortcutsBox.cjs +4 -3
- package/dist/components/chat/styled-boxes/ShortcutsBox.d.ts.map +1 -1
- package/dist/components/chat/styled-boxes/ShortcutsBox.js +4 -3
- package/dist/components/chat/styled-boxes/StatsBox.cjs +13 -5
- package/dist/components/chat/styled-boxes/StatsBox.d.ts.map +1 -1
- package/dist/components/chat/styled-boxes/StatsBox.js +13 -5
- package/dist/components/chat/styled-boxes/StyledBox.cjs +7 -6
- package/dist/components/chat/styled-boxes/StyledBox.d.ts.map +1 -1
- package/dist/components/chat/styled-boxes/StyledBox.js +7 -6
- package/dist/components/chat/styled-boxes/SyspromptBox.cjs +2 -1
- package/dist/components/chat/styled-boxes/SyspromptBox.d.ts.map +1 -1
- package/dist/components/chat/styled-boxes/SyspromptBox.js +2 -1
- package/dist/components/modes/AlternateBufferCLI.cjs +53 -43
- package/dist/components/modes/AlternateBufferCLI.d.ts.map +1 -1
- package/dist/components/modes/AlternateBufferCLI.js +53 -43
- package/dist/components/modes/StaticCLI.cjs +53 -42
- package/dist/components/modes/StaticCLI.d.ts.map +1 -1
- package/dist/components/modes/StaticCLI.js +53 -42
- package/dist/components/overlays/ApiKeyInput.cjs +12 -11
- package/dist/components/overlays/ApiKeyInput.d.ts.map +1 -1
- package/dist/components/overlays/ApiKeyInput.js +12 -11
- package/dist/components/overlays/ChatGPTUsageCapOverlay.cjs +7 -6
- package/dist/components/overlays/ChatGPTUsageCapOverlay.d.ts.map +1 -1
- package/dist/components/overlays/ChatGPTUsageCapOverlay.js +7 -6
- package/dist/components/overlays/CommandOutputOverlay.cjs +2 -1
- package/dist/components/overlays/CommandOutputOverlay.d.ts.map +1 -1
- package/dist/components/overlays/CommandOutputOverlay.js +2 -1
- package/dist/components/overlays/ConnectOverlay.cjs +10 -9
- package/dist/components/overlays/ConnectOverlay.d.ts.map +1 -1
- package/dist/components/overlays/ConnectOverlay.js +10 -9
- package/dist/components/overlays/ContextStatsOverlay.cjs +48 -37
- package/dist/components/overlays/ContextStatsOverlay.d.ts.map +1 -1
- package/dist/components/overlays/ContextStatsOverlay.js +48 -37
- package/dist/components/overlays/CustomModelWizard.cjs +5 -4
- package/dist/components/overlays/CustomModelWizard.d.ts.map +1 -1
- package/dist/components/overlays/CustomModelWizard.js +5 -4
- package/dist/components/overlays/ExportWizard.cjs +28 -27
- package/dist/components/overlays/ExportWizard.d.ts.map +1 -1
- package/dist/components/overlays/ExportWizard.js +28 -27
- package/dist/components/overlays/InsufficientCreditsOverlay.cjs +8 -7
- package/dist/components/overlays/InsufficientCreditsOverlay.d.ts.map +1 -1
- package/dist/components/overlays/InsufficientCreditsOverlay.js +8 -7
- package/dist/components/overlays/LogLevelSelector.cjs +6 -5
- package/dist/components/overlays/LogLevelSelector.d.ts.map +1 -1
- package/dist/components/overlays/LogLevelSelector.js +6 -5
- package/dist/components/overlays/LoginOverlay.cjs +7 -6
- package/dist/components/overlays/LoginOverlay.d.ts.map +1 -1
- package/dist/components/overlays/LoginOverlay.js +7 -6
- package/dist/components/overlays/LogoutOverlay.cjs +10 -9
- package/dist/components/overlays/LogoutOverlay.d.ts.map +1 -1
- package/dist/components/overlays/LogoutOverlay.js +10 -9
- package/dist/components/overlays/MarketplaceAddPrompt.cjs +12 -11
- package/dist/components/overlays/MarketplaceAddPrompt.d.ts.map +1 -1
- package/dist/components/overlays/MarketplaceAddPrompt.js +12 -11
- package/dist/components/overlays/MarketplaceBrowser.cjs +27 -26
- package/dist/components/overlays/MarketplaceBrowser.d.ts.map +1 -1
- package/dist/components/overlays/MarketplaceBrowser.js +27 -26
- package/dist/components/overlays/McpAddChoice.cjs +4 -3
- package/dist/components/overlays/McpAddChoice.d.ts.map +1 -1
- package/dist/components/overlays/McpAddChoice.js +4 -3
- package/dist/components/overlays/McpAddSelector.cjs +4 -3
- package/dist/components/overlays/McpAddSelector.d.ts.map +1 -1
- package/dist/components/overlays/McpAddSelector.js +4 -3
- package/dist/components/overlays/McpCustomTypeSelector.cjs +4 -3
- package/dist/components/overlays/McpCustomTypeSelector.d.ts.map +1 -1
- package/dist/components/overlays/McpCustomTypeSelector.js +4 -3
- package/dist/components/overlays/McpCustomWizard.cjs +9 -8
- package/dist/components/overlays/McpCustomWizard.d.ts.map +1 -1
- package/dist/components/overlays/McpCustomWizard.js +9 -8
- package/dist/components/overlays/McpRemoveSelector.cjs +5 -4
- package/dist/components/overlays/McpRemoveSelector.d.ts.map +1 -1
- package/dist/components/overlays/McpRemoveSelector.js +5 -4
- package/dist/components/overlays/McpSelector.cjs +4 -3
- package/dist/components/overlays/McpSelector.d.ts.map +1 -1
- package/dist/components/overlays/McpSelector.js +4 -3
- package/dist/components/overlays/McpServerActions.cjs +7 -6
- package/dist/components/overlays/McpServerActions.d.ts.map +1 -1
- package/dist/components/overlays/McpServerActions.js +7 -6
- package/dist/components/overlays/McpServerList.cjs +6 -5
- package/dist/components/overlays/McpServerList.d.ts.map +1 -1
- package/dist/components/overlays/McpServerList.js +6 -5
- package/dist/components/overlays/ModelSelectorRefactored.cjs +32 -17
- package/dist/components/overlays/ModelSelectorRefactored.d.ts.map +1 -1
- package/dist/components/overlays/ModelSelectorRefactored.js +32 -17
- package/dist/components/overlays/PermissionsSelector.cjs +6 -5
- package/dist/components/overlays/PermissionsSelector.d.ts.map +1 -1
- package/dist/components/overlays/PermissionsSelector.js +6 -5
- package/dist/components/overlays/PluginActions.cjs +7 -6
- package/dist/components/overlays/PluginActions.d.ts.map +1 -1
- package/dist/components/overlays/PluginActions.js +7 -6
- package/dist/components/overlays/PluginList.cjs +12 -11
- package/dist/components/overlays/PluginList.d.ts.map +1 -1
- package/dist/components/overlays/PluginList.js +12 -11
- package/dist/components/overlays/PluginManager.cjs +13 -5
- package/dist/components/overlays/PluginManager.d.ts.map +1 -1
- package/dist/components/overlays/PluginManager.js +13 -5
- package/dist/components/overlays/PromptAddChoice.cjs +5 -4
- package/dist/components/overlays/PromptAddChoice.d.ts.map +1 -1
- package/dist/components/overlays/PromptAddChoice.js +5 -4
- package/dist/components/overlays/PromptAddWizard.cjs +10 -9
- package/dist/components/overlays/PromptAddWizard.d.ts.map +1 -1
- package/dist/components/overlays/PromptAddWizard.js +10 -9
- package/dist/components/overlays/PromptDeleteSelector.cjs +6 -5
- package/dist/components/overlays/PromptDeleteSelector.d.ts.map +1 -1
- package/dist/components/overlays/PromptDeleteSelector.js +6 -5
- package/dist/components/overlays/PromptList.cjs +10 -9
- package/dist/components/overlays/PromptList.d.ts.map +1 -1
- package/dist/components/overlays/PromptList.js +10 -9
- package/dist/components/overlays/ReasoningOverlay.cjs +30 -23
- package/dist/components/overlays/ReasoningOverlay.d.ts.map +1 -1
- package/dist/components/overlays/ReasoningOverlay.js +30 -23
- package/dist/components/overlays/SearchOverlay.cjs +15 -14
- package/dist/components/overlays/SearchOverlay.d.ts.map +1 -1
- package/dist/components/overlays/SearchOverlay.js +15 -14
- package/dist/components/overlays/SessionRenameOverlay.cjs +9 -8
- package/dist/components/overlays/SessionRenameOverlay.d.ts.map +1 -1
- package/dist/components/overlays/SessionRenameOverlay.js +9 -8
- package/dist/components/overlays/SessionSelectorRefactored.cjs +4 -3
- package/dist/components/overlays/SessionSelectorRefactored.d.ts.map +1 -1
- package/dist/components/overlays/SessionSelectorRefactored.js +4 -3
- package/dist/components/overlays/SessionSubcommandSelector.cjs +4 -3
- package/dist/components/overlays/SessionSubcommandSelector.d.ts.map +1 -1
- package/dist/components/overlays/SessionSubcommandSelector.js +4 -3
- package/dist/components/overlays/SoundsSelector.cjs +15 -7
- package/dist/components/overlays/SoundsSelector.d.ts.map +1 -1
- package/dist/components/overlays/SoundsSelector.js +15 -7
- package/dist/components/overlays/StreamSelector.cjs +5 -4
- package/dist/components/overlays/StreamSelector.d.ts.map +1 -1
- package/dist/components/overlays/StreamSelector.js +5 -4
- package/dist/components/overlays/ToolBrowser.cjs +73 -56
- package/dist/components/overlays/ToolBrowser.d.ts.map +1 -1
- package/dist/components/overlays/ToolBrowser.js +73 -56
- package/dist/components/overlays/custom-model-wizard/LocalModelWizard.cjs +103 -69
- package/dist/components/overlays/custom-model-wizard/LocalModelWizard.d.ts.map +1 -1
- package/dist/components/overlays/custom-model-wizard/LocalModelWizard.js +103 -69
- package/dist/components/overlays/custom-model-wizard/shared/ApiKeyStep.cjs +3 -2
- package/dist/components/overlays/custom-model-wizard/shared/ApiKeyStep.d.ts.map +1 -1
- package/dist/components/overlays/custom-model-wizard/shared/ApiKeyStep.js +3 -2
- package/dist/components/overlays/custom-model-wizard/shared/ProviderSelector.cjs +5 -4
- package/dist/components/overlays/custom-model-wizard/shared/ProviderSelector.d.ts.map +1 -1
- package/dist/components/overlays/custom-model-wizard/shared/ProviderSelector.js +5 -4
- package/dist/components/overlays/custom-model-wizard/shared/SetupInfoBanner.cjs +4 -3
- package/dist/components/overlays/custom-model-wizard/shared/SetupInfoBanner.d.ts.map +1 -1
- package/dist/components/overlays/custom-model-wizard/shared/SetupInfoBanner.js +4 -3
- package/dist/components/overlays/custom-model-wizard/shared/WizardStepInput.cjs +7 -6
- package/dist/components/overlays/custom-model-wizard/shared/WizardStepInput.d.ts.map +1 -1
- package/dist/components/overlays/custom-model-wizard/shared/WizardStepInput.js +7 -6
- package/dist/components/renderers/DiffRenderer.cjs +5 -4
- package/dist/components/renderers/DiffRenderer.d.ts.map +1 -1
- package/dist/components/renderers/DiffRenderer.js +5 -4
- package/dist/components/renderers/FilePreviewRenderer.cjs +23 -13
- package/dist/components/renderers/FilePreviewRenderer.d.ts.map +1 -1
- package/dist/components/renderers/FilePreviewRenderer.js +23 -13
- package/dist/components/renderers/FileRenderer.cjs +9 -8
- package/dist/components/renderers/FileRenderer.d.ts.map +1 -1
- package/dist/components/renderers/FileRenderer.js +9 -8
- package/dist/components/renderers/GenericRenderer.cjs +5 -4
- package/dist/components/renderers/GenericRenderer.d.ts.map +1 -1
- package/dist/components/renderers/GenericRenderer.js +5 -4
- package/dist/components/renderers/SearchRenderer.cjs +4 -3
- package/dist/components/renderers/SearchRenderer.d.ts.map +1 -1
- package/dist/components/renderers/SearchRenderer.js +4 -3
- package/dist/components/renderers/ShellRenderer.cjs +6 -5
- package/dist/components/renderers/ShellRenderer.d.ts.map +1 -1
- package/dist/components/renderers/ShellRenderer.js +6 -5
- package/dist/components/renderers/SignalDiff.cjs +139 -0
- package/dist/components/renderers/SignalDiff.d.ts +21 -0
- package/dist/components/renderers/SignalDiff.d.ts.map +1 -0
- package/dist/components/renderers/SignalDiff.js +106 -0
- package/dist/components/renderers/SignalDiff.test.cjs +78 -0
- package/dist/components/renderers/SignalDiff.test.d.ts +2 -0
- package/dist/components/renderers/SignalDiff.test.d.ts.map +1 -0
- package/dist/components/renderers/SignalDiff.test.js +77 -0
- package/dist/components/renderers/diff-shared.cjs +13 -7
- package/dist/components/renderers/diff-shared.d.ts +5 -0
- package/dist/components/renderers/diff-shared.d.ts.map +1 -1
- package/dist/components/renderers/diff-shared.js +12 -7
- package/dist/components/shared/FocusOverlayFrame.cjs +3 -2
- package/dist/components/shared/FocusOverlayFrame.d.ts.map +1 -1
- package/dist/components/shared/FocusOverlayFrame.js +3 -2
- package/dist/components/shared/HintBar.cjs +2 -1
- package/dist/components/shared/HintBar.d.ts.map +1 -1
- package/dist/components/shared/HintBar.js +2 -1
- package/dist/components/shared/MarkdownText.cjs +36 -53
- package/dist/components/shared/MarkdownText.d.ts +2 -0
- package/dist/components/shared/MarkdownText.d.ts.map +1 -1
- package/dist/components/shared/MarkdownText.js +36 -54
- package/dist/components/shared/VirtualizedList.cjs +2 -1
- package/dist/components/shared/VirtualizedList.d.ts.map +1 -1
- package/dist/components/shared/VirtualizedList.js +2 -1
- package/dist/containers/OverlayContainer.cjs +2 -4
- package/dist/containers/OverlayContainer.d.ts.map +1 -1
- package/dist/containers/OverlayContainer.js +2 -4
- package/dist/contexts/KeypressContext.cjs +7 -1
- package/dist/contexts/KeypressContext.d.ts.map +1 -1
- package/dist/contexts/KeypressContext.js +7 -1
- package/dist/contexts/KeypressContext.test.cjs +82 -0
- package/dist/contexts/KeypressContext.test.d.ts +2 -0
- package/dist/contexts/KeypressContext.test.d.ts.map +1 -0
- package/dist/contexts/KeypressContext.test.js +81 -0
- package/dist/hooks/useAgentEvents.cjs +1 -74
- package/dist/hooks/useAgentEvents.d.ts.map +1 -1
- package/dist/hooks/useAgentEvents.js +1 -74
- package/dist/hooks/useCLIState.cjs +0 -3
- package/dist/hooks/useCLIState.d.ts.map +1 -1
- package/dist/hooks/useCLIState.js +0 -3
- package/dist/hooks/useContextStats.cjs +91 -0
- package/dist/hooks/useContextStats.d.ts +13 -0
- package/dist/hooks/useContextStats.d.ts.map +1 -0
- package/dist/hooks/useContextStats.js +67 -0
- package/dist/hooks/useDeckState.cjs +140 -0
- package/dist/hooks/useDeckState.d.ts +20 -0
- package/dist/hooks/useDeckState.d.ts.map +1 -0
- package/dist/hooks/useDeckState.js +123 -0
- package/dist/hooks/useDextoCredits.cjs +81 -0
- package/dist/hooks/useDextoCredits.d.ts +14 -0
- package/dist/hooks/useDextoCredits.d.ts.map +1 -0
- package/dist/hooks/useDextoCredits.js +56 -0
- package/dist/hooks/useDextoCredits.test.cjs +73 -0
- package/dist/hooks/useDextoCredits.test.d.ts +2 -0
- package/dist/hooks/useDextoCredits.test.d.ts.map +1 -0
- package/dist/hooks/useDextoCredits.test.js +72 -0
- package/dist/hooks/useElapsedTime.cjs +13 -24
- package/dist/hooks/useElapsedTime.d.ts +3 -1
- package/dist/hooks/useElapsedTime.d.ts.map +1 -1
- package/dist/hooks/useElapsedTime.js +13 -24
- package/dist/hooks/useElapsedTime.test.cjs +35 -0
- package/dist/hooks/useElapsedTime.test.d.ts +2 -0
- package/dist/hooks/useElapsedTime.test.d.ts.map +1 -0
- package/dist/hooks/useElapsedTime.test.js +34 -0
- package/dist/hooks/useGitDirtyFiles.cjs +59 -0
- package/dist/hooks/useGitDirtyFiles.d.ts +5 -0
- package/dist/hooks/useGitDirtyFiles.d.ts.map +1 -0
- package/dist/hooks/useGitDirtyFiles.js +34 -0
- package/dist/hooks/useGitDirtyFiles.test.cjs +9 -0
- package/dist/hooks/useGitDirtyFiles.test.d.ts +2 -0
- package/dist/hooks/useGitDirtyFiles.test.d.ts.map +1 -0
- package/dist/hooks/useGitDirtyFiles.test.js +8 -0
- package/dist/hooks/useHeldValue.cjs +33 -0
- package/dist/hooks/useHeldValue.d.ts +3 -0
- package/dist/hooks/useHeldValue.d.ts.map +1 -0
- package/dist/hooks/useHeldValue.js +9 -0
- package/dist/hooks/useHeldValue.test.cjs +31 -0
- package/dist/hooks/useHeldValue.test.d.ts +2 -0
- package/dist/hooks/useHeldValue.test.d.ts.map +1 -0
- package/dist/hooks/useHeldValue.test.js +30 -0
- package/dist/hooks/useInputOrchestrator.cjs +22 -30
- package/dist/hooks/useInputOrchestrator.d.ts +2 -0
- package/dist/hooks/useInputOrchestrator.d.ts.map +1 -1
- package/dist/hooks/useInputOrchestrator.js +21 -30
- package/dist/hooks/useInputOrchestrator.test.cjs +24 -0
- package/dist/hooks/useInputOrchestrator.test.d.ts +2 -0
- package/dist/hooks/useInputOrchestrator.test.d.ts.map +1 -0
- package/dist/hooks/useInputOrchestrator.test.js +23 -0
- package/dist/interactive-commands/command-parser.cjs +13 -21
- package/dist/interactive-commands/command-parser.d.ts.map +1 -1
- package/dist/interactive-commands/command-parser.js +13 -11
- package/dist/interactive-commands/general-commands.cjs +8 -7
- package/dist/interactive-commands/general-commands.d.ts.map +1 -1
- package/dist/interactive-commands/general-commands.js +8 -7
- package/dist/services/processStream.cjs +31 -19
- package/dist/services/processStream.d.ts.map +1 -1
- package/dist/services/processStream.js +32 -20
- package/dist/services/processStream.test.cjs +51 -3
- package/dist/services/processStream.test.js +51 -3
- package/dist/signal/background.cjs +154 -0
- package/dist/signal/background.d.ts +43 -0
- package/dist/signal/background.d.ts.map +1 -0
- package/dist/signal/background.js +124 -0
- package/dist/signal/background.test.cjs +186 -0
- package/dist/signal/background.test.d.ts +2 -0
- package/dist/signal/background.test.d.ts.map +1 -0
- package/dist/signal/background.test.js +192 -0
- package/dist/signal/caps.cjs +100 -0
- package/dist/signal/caps.d.ts +23 -0
- package/dist/signal/caps.d.ts.map +1 -0
- package/dist/signal/caps.js +73 -0
- package/dist/signal/caps.test.cjs +56 -0
- package/dist/signal/caps.test.d.ts +2 -0
- package/dist/signal/caps.test.d.ts.map +1 -0
- package/dist/signal/caps.test.js +55 -0
- package/dist/signal/components.cjs +257 -0
- package/dist/signal/components.d.ts +120 -0
- package/dist/signal/components.d.ts.map +1 -0
- package/dist/signal/components.js +226 -0
- package/dist/signal/components.test.cjs +156 -0
- package/dist/signal/components.test.d.ts +2 -0
- package/dist/signal/components.test.d.ts.map +1 -0
- package/dist/signal/components.test.js +133 -0
- package/dist/signal/cut.cjs +103 -0
- package/dist/signal/cut.d.ts +11 -0
- package/dist/signal/cut.d.ts.map +1 -0
- package/dist/signal/cut.js +77 -0
- package/dist/signal/cut.test.cjs +20 -0
- package/dist/signal/cut.test.d.ts +2 -0
- package/dist/signal/cut.test.d.ts.map +1 -0
- package/dist/signal/cut.test.js +19 -0
- package/dist/signal/deck-layout.cjs +57 -0
- package/dist/signal/deck-layout.d.ts +29 -0
- package/dist/signal/deck-layout.d.ts.map +1 -0
- package/dist/signal/deck-layout.js +30 -0
- package/dist/signal/deck-parts.cjs +243 -0
- package/dist/signal/deck-parts.d.ts +55 -0
- package/dist/signal/deck-parts.d.ts.map +1 -0
- package/dist/signal/deck-parts.js +205 -0
- package/dist/signal/deck.test.cjs +311 -0
- package/dist/signal/deck.test.d.ts +2 -0
- package/dist/signal/deck.test.d.ts.map +1 -0
- package/dist/signal/deck.test.js +288 -0
- package/dist/signal/glyphs.cjs +195 -0
- package/dist/signal/glyphs.d.ts +8 -0
- package/dist/signal/glyphs.d.ts.map +1 -0
- package/dist/signal/glyphs.js +171 -0
- package/dist/signal/glyphs.test.cjs +17 -0
- package/dist/signal/glyphs.test.d.ts +2 -0
- package/dist/signal/glyphs.test.d.ts.map +1 -0
- package/dist/signal/glyphs.test.js +16 -0
- package/dist/signal/harness.cjs +103 -0
- package/dist/signal/harness.d.ts +70 -0
- package/dist/signal/harness.d.ts.map +1 -0
- package/dist/signal/harness.js +67 -0
- package/dist/signal/harness.test.cjs +84 -0
- package/dist/signal/harness.test.d.ts +2 -0
- package/dist/signal/harness.test.d.ts.map +1 -0
- package/dist/signal/harness.test.js +61 -0
- package/dist/signal/index.cjs +76 -0
- package/dist/signal/index.d.ts +8 -0
- package/dist/signal/index.d.ts.map +1 -0
- package/dist/signal/index.js +45 -0
- package/dist/signal/kit.snapshot.test.cjs +56 -0
- package/dist/signal/kit.snapshot.test.d.ts +2 -0
- package/dist/signal/kit.snapshot.test.d.ts.map +1 -0
- package/dist/signal/kit.snapshot.test.js +55 -0
- package/dist/signal/no-raw-colours.test.cjs +32 -0
- package/dist/signal/no-raw-colours.test.d.ts +2 -0
- package/dist/signal/no-raw-colours.test.d.ts.map +1 -0
- package/dist/signal/no-raw-colours.test.js +30 -0
- package/dist/signal/paint.cjs +76 -0
- package/dist/signal/paint.d.ts +15 -0
- package/dist/signal/paint.d.ts.map +1 -0
- package/dist/signal/paint.js +41 -0
- package/dist/signal/paint.test.cjs +98 -0
- package/dist/signal/paint.test.d.ts +2 -0
- package/dist/signal/paint.test.d.ts.map +1 -0
- package/dist/signal/paint.test.js +75 -0
- package/dist/signal/tone.cjs +109 -0
- package/dist/signal/tone.d.ts +17 -0
- package/dist/signal/tone.d.ts.map +1 -0
- package/dist/signal/tone.js +83 -0
- package/dist/signal/tone.test.cjs +70 -0
- package/dist/signal/tone.test.d.ts +2 -0
- package/dist/signal/tone.test.d.ts.map +1 -0
- package/dist/signal/tone.test.js +69 -0
- package/dist/signal/trace.cjs +142 -0
- package/dist/signal/trace.d.ts +41 -0
- package/dist/signal/trace.d.ts.map +1 -0
- package/dist/signal/trace.js +113 -0
- package/dist/signal/trace.test.cjs +50 -0
- package/dist/signal/trace.test.d.ts +2 -0
- package/dist/signal/trace.test.d.ts.map +1 -0
- package/dist/signal/trace.test.js +49 -0
- package/dist/signal/use-trace.cjs +73 -0
- package/dist/signal/use-trace.d.ts +5 -0
- package/dist/signal/use-trace.d.ts.map +1 -0
- package/dist/signal/use-trace.js +48 -0
- package/dist/signal/wordmark-art.generated.cjs +375 -0
- package/dist/signal/wordmark-art.generated.d.ts +3 -0
- package/dist/signal/wordmark-art.generated.d.ts.map +1 -0
- package/dist/signal/wordmark-art.generated.js +351 -0
- package/dist/signal/wordmark.cjs +60 -0
- package/dist/signal/wordmark.d.ts +23 -0
- package/dist/signal/wordmark.d.ts.map +1 -0
- package/dist/signal/wordmark.js +34 -0
- package/dist/signal/wordmark.test.cjs +71 -0
- package/dist/signal/wordmark.test.d.ts +2 -0
- package/dist/signal/wordmark.test.d.ts.map +1 -0
- package/dist/signal/wordmark.test.js +70 -0
- package/dist/state/initialState.cjs +0 -3
- package/dist/state/initialState.d.ts.map +1 -1
- package/dist/state/initialState.js +0 -3
- package/dist/state/types.d.ts +13 -7
- package/dist/state/types.d.ts.map +1 -1
- package/dist/utils/approval-response.cjs +45 -0
- package/dist/utils/approval-response.d.ts +14 -0
- package/dist/utils/approval-response.d.ts.map +1 -0
- package/dist/utils/approval-response.js +21 -0
- package/dist/utils/approval-response.test.cjs +49 -0
- package/dist/utils/approval-response.test.d.ts +2 -0
- package/dist/utils/approval-response.test.d.ts.map +1 -0
- package/dist/utils/approval-response.test.js +55 -0
- package/dist/utils/approvalScope.cjs +12 -0
- package/dist/utils/approvalScope.d.ts.map +1 -1
- package/dist/utils/approvalScope.js +12 -0
- package/dist/utils/approvalScope.test.cjs +23 -0
- package/dist/utils/approvalScope.test.d.ts +2 -0
- package/dist/utils/approvalScope.test.d.ts.map +1 -0
- package/dist/utils/approvalScope.test.js +22 -0
- package/dist/utils/background-failure.cjs +51 -0
- package/dist/utils/background-failure.d.ts +12 -0
- package/dist/utils/background-failure.d.ts.map +1 -0
- package/dist/utils/background-failure.js +26 -0
- package/dist/utils/chatgpt-rate-limit.cjs +10 -0
- package/dist/utils/chatgpt-rate-limit.d.ts +9 -0
- package/dist/utils/chatgpt-rate-limit.d.ts.map +1 -1
- package/dist/utils/chatgpt-rate-limit.js +9 -0
- package/dist/utils/chatgpt-rate-limit.test.cjs +10 -0
- package/dist/utils/chatgpt-rate-limit.test.js +11 -0
- package/dist/utils/deck-state.cjs +107 -0
- package/dist/utils/deck-state.d.ts +79 -0
- package/dist/utils/deck-state.d.ts.map +1 -0
- package/dist/utils/deck-state.js +76 -0
- package/dist/utils/deck-state.test.cjs +208 -0
- package/dist/utils/deck-state.test.d.ts +2 -0
- package/dist/utils/deck-state.test.d.ts.map +1 -0
- package/dist/utils/deck-state.test.js +216 -0
- package/dist/utils/fault-block.cjs +37 -0
- package/dist/utils/fault-block.d.ts +13 -0
- package/dist/utils/fault-block.d.ts.map +1 -0
- package/dist/utils/fault-block.js +13 -0
- package/dist/utils/fault-block.test.cjs +23 -0
- package/dist/utils/fault-block.test.d.ts +2 -0
- package/dist/utils/fault-block.test.d.ts.map +1 -0
- package/dist/utils/fault-block.test.js +22 -0
- package/dist/utils/messageFormatting.cjs +26 -23
- package/dist/utils/messageFormatting.d.ts +5 -2
- package/dist/utils/messageFormatting.d.ts.map +1 -1
- package/dist/utils/messageFormatting.js +25 -21
- package/dist/utils/messageFormatting.test.cjs +34 -0
- package/dist/utils/messageFormatting.test.js +35 -1
- package/dist/utils/reasoning-variant.cjs +35 -0
- package/dist/utils/reasoning-variant.d.ts +13 -0
- package/dist/utils/reasoning-variant.d.ts.map +1 -0
- package/dist/utils/reasoning-variant.js +11 -0
- package/dist/utils/resize-reflow.cjs +119 -0
- package/dist/utils/resize-reflow.d.ts +18 -0
- package/dist/utils/resize-reflow.d.ts.map +1 -0
- package/dist/utils/resize-reflow.js +83 -0
- package/dist/utils/resize-reflow.test.cjs +100 -0
- package/dist/utils/resize-reflow.test.d.ts +2 -0
- package/dist/utils/resize-reflow.test.d.ts.map +1 -0
- package/dist/utils/resize-reflow.test.js +99 -0
- package/dist/utils/tool-step.cjs +183 -0
- package/dist/utils/tool-step.d.ts +28 -0
- package/dist/utils/tool-step.d.ts.map +1 -0
- package/dist/utils/tool-step.js +156 -0
- package/dist/utils/tool-step.test.cjs +263 -0
- package/dist/utils/tool-step.test.d.ts +2 -0
- package/dist/utils/tool-step.test.d.ts.map +1 -0
- package/dist/utils/tool-step.test.js +262 -0
- package/package.json +7 -3
- package/dist/components/BackgroundTasksPanel.cjs +0 -117
- package/dist/components/BackgroundTasksPanel.d.ts +0 -18
- package/dist/components/BackgroundTasksPanel.d.ts.map +0 -1
- package/dist/components/BackgroundTasksPanel.js +0 -93
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var import_react = require("react");
|
|
3
|
+
var import_vitest = require("vitest");
|
|
4
|
+
var import_harness = require("../../signal/harness.js");
|
|
5
|
+
var import_SignalMessage = require("./SignalMessage.js");
|
|
6
|
+
function message(overrides) {
|
|
7
|
+
return {
|
|
8
|
+
id: "m",
|
|
9
|
+
role: "tool",
|
|
10
|
+
content: "",
|
|
11
|
+
timestamp: /* @__PURE__ */ new Date(0),
|
|
12
|
+
...overrides
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
const TEXT_ONLY = { columns: 72, terminal: "no-color" };
|
|
16
|
+
(0, import_vitest.describe)("Signal transcript", () => {
|
|
17
|
+
(0, import_vitest.it)("puts the user and the agent in the margin, and wraps the agent inside it", () => {
|
|
18
|
+
const user = (0, import_react.createElement)(import_SignalMessage.SignalUserMessage, { content: "Fix the auth tests." });
|
|
19
|
+
(0, import_vitest.expect)((0, import_harness.renderFrame)(user, TEXT_ONLY)).toBe("\n YOU Fix the auth tests.");
|
|
20
|
+
const prose = "word ".repeat(30).trim();
|
|
21
|
+
const agent = (0, import_react.createElement)(import_SignalMessage.SignalAgentMessage, {
|
|
22
|
+
message: message({ role: "assistant", content: prose }),
|
|
23
|
+
showReasoning: true
|
|
24
|
+
});
|
|
25
|
+
const lines = (0, import_harness.renderFrame)(agent, TEXT_ONLY).split("\n").slice(1);
|
|
26
|
+
(0, import_vitest.expect)(lines[0]?.startsWith(" AGENT word")).toBe(true);
|
|
27
|
+
(0, import_vitest.expect)(lines.length).toBe(3);
|
|
28
|
+
for (const line of lines.slice(1)) (0, import_vitest.expect)(line.startsWith(" word")).toBe(true);
|
|
29
|
+
});
|
|
30
|
+
(0, import_vitest.it)("keeps the margin but drops the label on a continuation", () => {
|
|
31
|
+
const agent = (0, import_react.createElement)(import_SignalMessage.SignalAgentMessage, {
|
|
32
|
+
message: message({ role: "assistant", content: "more", isContinuation: true }),
|
|
33
|
+
showReasoning: true
|
|
34
|
+
});
|
|
35
|
+
(0, import_vitest.expect)((0, import_harness.renderFrame)(agent, TEXT_ONLY)).toBe(" more");
|
|
36
|
+
});
|
|
37
|
+
(0, import_vitest.it)("draws a tool call as one row, and a failure with its reason", () => {
|
|
38
|
+
const ok = (0, import_react.createElement)(import_SignalMessage.SignalToolMessage, {
|
|
39
|
+
message: message({
|
|
40
|
+
content: "Bash(make lint)",
|
|
41
|
+
toolName: "bash_exec",
|
|
42
|
+
toolArgs: "make lint",
|
|
43
|
+
toolStatus: "finished",
|
|
44
|
+
toolDisplayData: {
|
|
45
|
+
type: "shell",
|
|
46
|
+
command: "make lint",
|
|
47
|
+
exitCode: 0,
|
|
48
|
+
duration: 4200
|
|
49
|
+
}
|
|
50
|
+
})
|
|
51
|
+
});
|
|
52
|
+
const okFrame = (0, import_harness.renderFrame)(ok, TEXT_ONLY);
|
|
53
|
+
(0, import_vitest.expect)(okFrame.split("\n")).toHaveLength(1);
|
|
54
|
+
(0, import_vitest.expect)(okFrame).toMatch(/^ {8}▪ RUN {5}make lint +4\.2s$/);
|
|
55
|
+
const failed = (0, import_react.createElement)(import_SignalMessage.SignalToolMessage, {
|
|
56
|
+
message: message({
|
|
57
|
+
content: "Read(a.ts)",
|
|
58
|
+
toolName: "read_file",
|
|
59
|
+
toolArgs: "a.ts",
|
|
60
|
+
toolStatus: "finished",
|
|
61
|
+
isError: true,
|
|
62
|
+
toolResult: "ENOENT: a.ts"
|
|
63
|
+
})
|
|
64
|
+
});
|
|
65
|
+
const lines = (0, import_harness.renderFrame)(failed, TEXT_ONLY).split("\n");
|
|
66
|
+
(0, import_vitest.expect)(lines[0]).toMatch(/READ {4}a\.ts +FAIL$/);
|
|
67
|
+
(0, import_vitest.expect)(lines[1]).toBe(" \u250A ENOENT: a.ts");
|
|
68
|
+
});
|
|
69
|
+
(0, import_vitest.it)("keeps a diff inside the terminal, under the margin", () => {
|
|
70
|
+
const row = (0, import_react.createElement)(import_SignalMessage.SignalToolMessage, {
|
|
71
|
+
message: message({
|
|
72
|
+
content: "Edit(a.ts)",
|
|
73
|
+
toolName: "edit_file",
|
|
74
|
+
toolArgs: "a.ts",
|
|
75
|
+
toolStatus: "finished",
|
|
76
|
+
toolDisplayData: {
|
|
77
|
+
type: "diff",
|
|
78
|
+
unified: `@@ -1 +1 @@
|
|
79
|
+
+${"x ".repeat(200)}`,
|
|
80
|
+
filename: "a.ts",
|
|
81
|
+
additions: 1,
|
|
82
|
+
deletions: 0
|
|
83
|
+
}
|
|
84
|
+
})
|
|
85
|
+
});
|
|
86
|
+
const lines = (0, import_harness.renderFrame)(row, { columns: 80, terminal: "no-color" }).split("\n");
|
|
87
|
+
(0, import_vitest.expect)(lines.join("").match(/x/g)).toHaveLength(200);
|
|
88
|
+
for (const line of lines) (0, import_vitest.expect)(line.trimEnd().length).toBeLessThanOrEqual(80);
|
|
89
|
+
});
|
|
90
|
+
(0, import_vitest.it)("draws an error as a fault block with what to try next", () => {
|
|
91
|
+
const fault = (0, import_react.createElement)(import_SignalMessage.SignalNote, {
|
|
92
|
+
message: message({
|
|
93
|
+
role: "system",
|
|
94
|
+
systemKind: "fault",
|
|
95
|
+
content: "Error: Rate limited\n\n\u{1F4A1} Switch model"
|
|
96
|
+
})
|
|
97
|
+
});
|
|
98
|
+
const lines = (0, import_harness.renderFrame)(fault, TEXT_ONLY).split("\n").slice(1);
|
|
99
|
+
(0, import_vitest.expect)(lines[0]).toBe(" \u258C FAULT Rate limited");
|
|
100
|
+
(0, import_vitest.expect)(lines[1]).toBe(" \u258C next Switch model");
|
|
101
|
+
});
|
|
102
|
+
(0, import_vitest.it)("marks where the user stopped the run, and keeps other notes quiet", () => {
|
|
103
|
+
const stopped = (0, import_react.createElement)(import_SignalMessage.SignalNote, {
|
|
104
|
+
message: message({ role: "system", systemKind: "stopped", content: "x" })
|
|
105
|
+
});
|
|
106
|
+
(0, import_vitest.expect)((0, import_harness.renderFrame)(stopped, TEXT_ONLY)).toMatch(/■ STOPPED by you at .* type what to do/);
|
|
107
|
+
const note = (0, import_react.createElement)(import_SignalMessage.SignalNote, {
|
|
108
|
+
message: message({ role: "system", content: "Model switched" })
|
|
109
|
+
});
|
|
110
|
+
(0, import_vitest.expect)((0, import_harness.renderFrame)(note, TEXT_ONLY)).toBe(" \xB7 Model switched");
|
|
111
|
+
});
|
|
112
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SignalMessage.test.d.ts","sourceRoot":"","sources":["../../../src/components/chat/SignalMessage.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { createElement } from "react";
|
|
2
|
+
import { describe, expect, it } from "vitest";
|
|
3
|
+
import { renderFrame } from "../../signal/harness.js";
|
|
4
|
+
import {
|
|
5
|
+
SignalAgentMessage,
|
|
6
|
+
SignalNote,
|
|
7
|
+
SignalToolMessage,
|
|
8
|
+
SignalUserMessage
|
|
9
|
+
} from "./SignalMessage.js";
|
|
10
|
+
function message(overrides) {
|
|
11
|
+
return {
|
|
12
|
+
id: "m",
|
|
13
|
+
role: "tool",
|
|
14
|
+
content: "",
|
|
15
|
+
timestamp: /* @__PURE__ */ new Date(0),
|
|
16
|
+
...overrides
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
const TEXT_ONLY = { columns: 72, terminal: "no-color" };
|
|
20
|
+
describe("Signal transcript", () => {
|
|
21
|
+
it("puts the user and the agent in the margin, and wraps the agent inside it", () => {
|
|
22
|
+
const user = createElement(SignalUserMessage, { content: "Fix the auth tests." });
|
|
23
|
+
expect(renderFrame(user, TEXT_ONLY)).toBe("\n YOU Fix the auth tests.");
|
|
24
|
+
const prose = "word ".repeat(30).trim();
|
|
25
|
+
const agent = createElement(SignalAgentMessage, {
|
|
26
|
+
message: message({ role: "assistant", content: prose }),
|
|
27
|
+
showReasoning: true
|
|
28
|
+
});
|
|
29
|
+
const lines = renderFrame(agent, TEXT_ONLY).split("\n").slice(1);
|
|
30
|
+
expect(lines[0]?.startsWith(" AGENT word")).toBe(true);
|
|
31
|
+
expect(lines.length).toBe(3);
|
|
32
|
+
for (const line of lines.slice(1)) expect(line.startsWith(" word")).toBe(true);
|
|
33
|
+
});
|
|
34
|
+
it("keeps the margin but drops the label on a continuation", () => {
|
|
35
|
+
const agent = createElement(SignalAgentMessage, {
|
|
36
|
+
message: message({ role: "assistant", content: "more", isContinuation: true }),
|
|
37
|
+
showReasoning: true
|
|
38
|
+
});
|
|
39
|
+
expect(renderFrame(agent, TEXT_ONLY)).toBe(" more");
|
|
40
|
+
});
|
|
41
|
+
it("draws a tool call as one row, and a failure with its reason", () => {
|
|
42
|
+
const ok = createElement(SignalToolMessage, {
|
|
43
|
+
message: message({
|
|
44
|
+
content: "Bash(make lint)",
|
|
45
|
+
toolName: "bash_exec",
|
|
46
|
+
toolArgs: "make lint",
|
|
47
|
+
toolStatus: "finished",
|
|
48
|
+
toolDisplayData: {
|
|
49
|
+
type: "shell",
|
|
50
|
+
command: "make lint",
|
|
51
|
+
exitCode: 0,
|
|
52
|
+
duration: 4200
|
|
53
|
+
}
|
|
54
|
+
})
|
|
55
|
+
});
|
|
56
|
+
const okFrame = renderFrame(ok, TEXT_ONLY);
|
|
57
|
+
expect(okFrame.split("\n")).toHaveLength(1);
|
|
58
|
+
expect(okFrame).toMatch(/^ {8}▪ RUN {5}make lint +4\.2s$/);
|
|
59
|
+
const failed = createElement(SignalToolMessage, {
|
|
60
|
+
message: message({
|
|
61
|
+
content: "Read(a.ts)",
|
|
62
|
+
toolName: "read_file",
|
|
63
|
+
toolArgs: "a.ts",
|
|
64
|
+
toolStatus: "finished",
|
|
65
|
+
isError: true,
|
|
66
|
+
toolResult: "ENOENT: a.ts"
|
|
67
|
+
})
|
|
68
|
+
});
|
|
69
|
+
const lines = renderFrame(failed, TEXT_ONLY).split("\n");
|
|
70
|
+
expect(lines[0]).toMatch(/READ {4}a\.ts +FAIL$/);
|
|
71
|
+
expect(lines[1]).toBe(" \u250A ENOENT: a.ts");
|
|
72
|
+
});
|
|
73
|
+
it("keeps a diff inside the terminal, under the margin", () => {
|
|
74
|
+
const row = createElement(SignalToolMessage, {
|
|
75
|
+
message: message({
|
|
76
|
+
content: "Edit(a.ts)",
|
|
77
|
+
toolName: "edit_file",
|
|
78
|
+
toolArgs: "a.ts",
|
|
79
|
+
toolStatus: "finished",
|
|
80
|
+
toolDisplayData: {
|
|
81
|
+
type: "diff",
|
|
82
|
+
unified: `@@ -1 +1 @@
|
|
83
|
+
+${"x ".repeat(200)}`,
|
|
84
|
+
filename: "a.ts",
|
|
85
|
+
additions: 1,
|
|
86
|
+
deletions: 0
|
|
87
|
+
}
|
|
88
|
+
})
|
|
89
|
+
});
|
|
90
|
+
const lines = renderFrame(row, { columns: 80, terminal: "no-color" }).split("\n");
|
|
91
|
+
expect(lines.join("").match(/x/g)).toHaveLength(200);
|
|
92
|
+
for (const line of lines) expect(line.trimEnd().length).toBeLessThanOrEqual(80);
|
|
93
|
+
});
|
|
94
|
+
it("draws an error as a fault block with what to try next", () => {
|
|
95
|
+
const fault = createElement(SignalNote, {
|
|
96
|
+
message: message({
|
|
97
|
+
role: "system",
|
|
98
|
+
systemKind: "fault",
|
|
99
|
+
content: "Error: Rate limited\n\n\u{1F4A1} Switch model"
|
|
100
|
+
})
|
|
101
|
+
});
|
|
102
|
+
const lines = renderFrame(fault, TEXT_ONLY).split("\n").slice(1);
|
|
103
|
+
expect(lines[0]).toBe(" \u258C FAULT Rate limited");
|
|
104
|
+
expect(lines[1]).toBe(" \u258C next Switch model");
|
|
105
|
+
});
|
|
106
|
+
it("marks where the user stopped the run, and keeps other notes quiet", () => {
|
|
107
|
+
const stopped = createElement(SignalNote, {
|
|
108
|
+
message: message({ role: "system", systemKind: "stopped", content: "x" })
|
|
109
|
+
});
|
|
110
|
+
expect(renderFrame(stopped, TEXT_ONLY)).toMatch(/■ STOPPED by you at .* type what to do/);
|
|
111
|
+
const note = createElement(SignalNote, {
|
|
112
|
+
message: message({ role: "system", content: "Model switched" })
|
|
113
|
+
});
|
|
114
|
+
expect(renderFrame(note, TEXT_ONLY)).toBe(" \xB7 Model switched");
|
|
115
|
+
});
|
|
116
|
+
});
|
|
@@ -25,31 +25,32 @@ var import_jsx_runtime = require("react/jsx-runtime");
|
|
|
25
25
|
var import_ink = require("ink");
|
|
26
26
|
var import_useAnimationTick = require("../../hooks/useAnimationTick.js");
|
|
27
27
|
var import_spinnerFrames = require("../../constants/spinnerFrames.js");
|
|
28
|
+
var import_signal = require("../../signal/index.js");
|
|
28
29
|
function ToolIcon({ status, isError }) {
|
|
29
30
|
const tick = (0, import_useAnimationTick.useAnimationTick)({ enabled: status === "running", intervalMs: 80 });
|
|
30
31
|
const frame = tick % import_spinnerFrames.BRAILLE_SPINNER_FRAMES.length;
|
|
31
32
|
if (status === "pending") {
|
|
32
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Text, { color: "
|
|
33
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Text, { color: (0, import_signal.tone)("dim"), children: "\u25CF " });
|
|
33
34
|
}
|
|
34
35
|
if (status === "pending_approval") {
|
|
35
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Text, { color: "
|
|
36
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Text, { color: (0, import_signal.tone)("amber"), bold: true, children: [
|
|
36
37
|
"\u25CF",
|
|
37
38
|
" "
|
|
38
39
|
] });
|
|
39
40
|
}
|
|
40
41
|
if (status === "finished") {
|
|
41
42
|
if (isError) {
|
|
42
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Text, { color: "red", bold: true, children: [
|
|
43
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Text, { color: (0, import_signal.tone)("red"), bold: true, children: [
|
|
43
44
|
"\u25CF",
|
|
44
45
|
" "
|
|
45
46
|
] });
|
|
46
47
|
}
|
|
47
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Text, { color: "
|
|
48
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Text, { color: (0, import_signal.tone)("add"), bold: true, children: [
|
|
48
49
|
"\u25CF",
|
|
49
50
|
" "
|
|
50
51
|
] });
|
|
51
52
|
}
|
|
52
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Text, { color: "
|
|
53
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Text, { color: (0, import_signal.tone)("add"), bold: true, children: [
|
|
53
54
|
import_spinnerFrames.BRAILLE_SPINNER_FRAMES[frame],
|
|
54
55
|
" "
|
|
55
56
|
] });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToolIcon.d.ts","sourceRoot":"","sources":["../../../src/components/chat/ToolIcon.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"ToolIcon.d.ts","sourceRoot":"","sources":["../../../src/components/chat/ToolIcon.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAKvD,UAAU,aAAa;IACnB,MAAM,EAAE,UAAU,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;CACrB;AAED;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,aAAa,2CAyC1D"}
|
|
@@ -2,31 +2,32 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { Text } from "ink";
|
|
3
3
|
import { useAnimationTick } from "../../hooks/useAnimationTick.js";
|
|
4
4
|
import { BRAILLE_SPINNER_FRAMES } from "../../constants/spinnerFrames.js";
|
|
5
|
+
import { tone } from "../../signal/index.js";
|
|
5
6
|
function ToolIcon({ status, isError }) {
|
|
6
7
|
const tick = useAnimationTick({ enabled: status === "running", intervalMs: 80 });
|
|
7
8
|
const frame = tick % BRAILLE_SPINNER_FRAMES.length;
|
|
8
9
|
if (status === "pending") {
|
|
9
|
-
return /* @__PURE__ */ jsx(Text, { color: "
|
|
10
|
+
return /* @__PURE__ */ jsx(Text, { color: tone("dim"), children: "\u25CF " });
|
|
10
11
|
}
|
|
11
12
|
if (status === "pending_approval") {
|
|
12
|
-
return /* @__PURE__ */ jsxs(Text, { color: "
|
|
13
|
+
return /* @__PURE__ */ jsxs(Text, { color: tone("amber"), bold: true, children: [
|
|
13
14
|
"\u25CF",
|
|
14
15
|
" "
|
|
15
16
|
] });
|
|
16
17
|
}
|
|
17
18
|
if (status === "finished") {
|
|
18
19
|
if (isError) {
|
|
19
|
-
return /* @__PURE__ */ jsxs(Text, { color: "red", bold: true, children: [
|
|
20
|
+
return /* @__PURE__ */ jsxs(Text, { color: tone("red"), bold: true, children: [
|
|
20
21
|
"\u25CF",
|
|
21
22
|
" "
|
|
22
23
|
] });
|
|
23
24
|
}
|
|
24
|
-
return /* @__PURE__ */ jsxs(Text, { color: "
|
|
25
|
+
return /* @__PURE__ */ jsxs(Text, { color: tone("add"), bold: true, children: [
|
|
25
26
|
"\u25CF",
|
|
26
27
|
" "
|
|
27
28
|
] });
|
|
28
29
|
}
|
|
29
|
-
return /* @__PURE__ */ jsxs(Text, { color: "
|
|
30
|
+
return /* @__PURE__ */ jsxs(Text, { color: tone("add"), bold: true, children: [
|
|
30
31
|
BRAILLE_SPINNER_FRAMES[frame],
|
|
31
32
|
" "
|
|
32
33
|
] });
|
|
@@ -24,11 +24,12 @@ module.exports = __toCommonJS(ConfigBox_exports);
|
|
|
24
24
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
25
25
|
var import_ink = require("ink");
|
|
26
26
|
var import_StyledBox = require("./StyledBox.js");
|
|
27
|
+
var import_signal = require("../../../signal/index.js");
|
|
27
28
|
function ConfigBox({ data }) {
|
|
28
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_StyledBox.StyledBox, { title: "Runtime Configuration", titleColor: "
|
|
29
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_StyledBox.StyledBox, { title: "Runtime Configuration", titleColor: (0, import_signal.tone)("teal"), children: [
|
|
29
30
|
data.configFilePath && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Box, { children: [
|
|
30
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Text, { color: "
|
|
31
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Text, { color: "
|
|
31
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Text, { color: (0, import_signal.tone)("dim"), children: "Agent config: " }),
|
|
32
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Text, { color: (0, import_signal.tone)("fg"), children: data.configFilePath })
|
|
32
33
|
] }),
|
|
33
34
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_StyledBox.StyledSection, { title: "LLM", children: [
|
|
34
35
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_StyledBox.StyledRow, { label: "Provider", value: data.provider }),
|
|
@@ -41,13 +42,13 @@ function ConfigBox({ data }) {
|
|
|
41
42
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_StyledBox.StyledRow, { label: "Max Sessions", value: data.maxSessions }),
|
|
42
43
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_StyledBox.StyledRow, { label: "Session TTL", value: data.sessionTTL })
|
|
43
44
|
] }),
|
|
44
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_StyledBox.StyledSection, { title: "MCP Servers", children: data.mcpServers.length > 0 ? data.mcpServers.map((server) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Box, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Text, { color: "
|
|
45
|
-
data.promptsCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_StyledBox.StyledSection, { title: "Prompts", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Text, { color: "
|
|
45
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_StyledBox.StyledSection, { title: "MCP Servers", children: data.mcpServers.length > 0 ? data.mcpServers.map((server) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Box, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Text, { color: (0, import_signal.tone)("teal"), children: server }) }, server)) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Text, { color: (0, import_signal.tone)("dim"), children: "No MCP servers configured" }) }),
|
|
46
|
+
data.promptsCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_StyledBox.StyledSection, { title: "Prompts", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Text, { color: (0, import_signal.tone)("dim"), children: [
|
|
46
47
|
data.promptsCount,
|
|
47
48
|
" prompt(s) configured"
|
|
48
49
|
] }) }),
|
|
49
|
-
data.hooksEnabled.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_StyledBox.StyledSection, { title: "Hooks", children: data.hooksEnabled.map((hook) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Box, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Text, { color: "
|
|
50
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Box, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Text, { color: "
|
|
50
|
+
data.hooksEnabled.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_StyledBox.StyledSection, { title: "Hooks", children: data.hooksEnabled.map((hook) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Box, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Text, { color: (0, import_signal.tone)("add"), children: hook }) }, hook)) }),
|
|
51
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Box, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Text, { color: (0, import_signal.tone)("dim"), italic: true, children: "Note: Some fields (logs, database paths) are auto-populated by the CLI." }) })
|
|
51
52
|
] });
|
|
52
53
|
}
|
|
53
54
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConfigBox.d.ts","sourceRoot":"","sources":["../../../../src/components/chat/styled-boxes/ConfigBox.tsx"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"ConfigBox.d.ts","sourceRoot":"","sources":["../../../../src/components/chat/styled-boxes/ConfigBox.tsx"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAIhE,UAAU,cAAc;IACpB,IAAI,EAAE,gBAAgB,CAAC;CAC1B;AAED,wBAAgB,SAAS,CAAC,EAAE,IAAI,EAAE,EAAE,cAAc,2CAmEjD"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Box, Text } from "ink";
|
|
3
3
|
import { StyledBox, StyledSection, StyledRow } from "./StyledBox.js";
|
|
4
|
+
import { tone } from "../../../signal/index.js";
|
|
4
5
|
function ConfigBox({ data }) {
|
|
5
|
-
return /* @__PURE__ */ jsxs(StyledBox, { title: "Runtime Configuration", titleColor: "
|
|
6
|
+
return /* @__PURE__ */ jsxs(StyledBox, { title: "Runtime Configuration", titleColor: tone("teal"), children: [
|
|
6
7
|
data.configFilePath && /* @__PURE__ */ jsxs(Box, { children: [
|
|
7
|
-
/* @__PURE__ */ jsx(Text, { color: "
|
|
8
|
-
/* @__PURE__ */ jsx(Text, { color: "
|
|
8
|
+
/* @__PURE__ */ jsx(Text, { color: tone("dim"), children: "Agent config: " }),
|
|
9
|
+
/* @__PURE__ */ jsx(Text, { color: tone("fg"), children: data.configFilePath })
|
|
9
10
|
] }),
|
|
10
11
|
/* @__PURE__ */ jsxs(StyledSection, { title: "LLM", children: [
|
|
11
12
|
/* @__PURE__ */ jsx(StyledRow, { label: "Provider", value: data.provider }),
|
|
@@ -18,13 +19,13 @@ function ConfigBox({ data }) {
|
|
|
18
19
|
/* @__PURE__ */ jsx(StyledRow, { label: "Max Sessions", value: data.maxSessions }),
|
|
19
20
|
/* @__PURE__ */ jsx(StyledRow, { label: "Session TTL", value: data.sessionTTL })
|
|
20
21
|
] }),
|
|
21
|
-
/* @__PURE__ */ jsx(StyledSection, { title: "MCP Servers", children: data.mcpServers.length > 0 ? data.mcpServers.map((server) => /* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsx(Text, { color: "
|
|
22
|
-
data.promptsCount > 0 && /* @__PURE__ */ jsx(StyledSection, { title: "Prompts", children: /* @__PURE__ */ jsxs(Text, { color: "
|
|
22
|
+
/* @__PURE__ */ jsx(StyledSection, { title: "MCP Servers", children: data.mcpServers.length > 0 ? data.mcpServers.map((server) => /* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsx(Text, { color: tone("teal"), children: server }) }, server)) : /* @__PURE__ */ jsx(Text, { color: tone("dim"), children: "No MCP servers configured" }) }),
|
|
23
|
+
data.promptsCount > 0 && /* @__PURE__ */ jsx(StyledSection, { title: "Prompts", children: /* @__PURE__ */ jsxs(Text, { color: tone("dim"), children: [
|
|
23
24
|
data.promptsCount,
|
|
24
25
|
" prompt(s) configured"
|
|
25
26
|
] }) }),
|
|
26
|
-
data.hooksEnabled.length > 0 && /* @__PURE__ */ jsx(StyledSection, { title: "Hooks", children: data.hooksEnabled.map((hook) => /* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsx(Text, { color: "
|
|
27
|
-
/* @__PURE__ */ jsx(Box, { marginTop: 1, children: /* @__PURE__ */ jsx(Text, { color: "
|
|
27
|
+
data.hooksEnabled.length > 0 && /* @__PURE__ */ jsx(StyledSection, { title: "Hooks", children: data.hooksEnabled.map((hook) => /* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsx(Text, { color: tone("add"), children: hook }) }, hook)) }),
|
|
28
|
+
/* @__PURE__ */ jsx(Box, { marginTop: 1, children: /* @__PURE__ */ jsx(Text, { color: tone("dim"), italic: true, children: "Note: Some fields (logs, database paths) are auto-populated by the CLI." }) })
|
|
28
29
|
] });
|
|
29
30
|
}
|
|
30
31
|
export {
|
|
@@ -24,6 +24,7 @@ module.exports = __toCommonJS(HelpBox_exports);
|
|
|
24
24
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
25
25
|
var import_ink = require("ink");
|
|
26
26
|
var import_StyledBox = require("./StyledBox.js");
|
|
27
|
+
var import_signal = require("../../../signal/index.js");
|
|
27
28
|
function HelpBox({ data }) {
|
|
28
29
|
const categories = data.commands.reduce(
|
|
29
30
|
(acc, cmd) => {
|
|
@@ -37,13 +38,13 @@ function HelpBox({ data }) {
|
|
|
37
38
|
{}
|
|
38
39
|
);
|
|
39
40
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_StyledBox.StyledBox, { title: "Available Commands", children: Object.entries(categories).map(([category, commands]) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Box, { flexDirection: "column", marginTop: 1, children: [
|
|
40
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Text, { bold: true, color: "
|
|
41
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Text, { bold: true, color: (0, import_signal.tone)("dim"), children: category }),
|
|
41
42
|
commands.map((cmd) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Box, { marginLeft: 2, children: [
|
|
42
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Box, { width: 16, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Text, { color: "
|
|
43
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Box, { width: 16, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Text, { color: (0, import_signal.tone)("teal"), children: [
|
|
43
44
|
"/",
|
|
44
45
|
cmd.name
|
|
45
46
|
] }) }),
|
|
46
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Text, { color: "
|
|
47
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Text, { color: (0, import_signal.tone)("dim"), children: cmd.description })
|
|
47
48
|
] }, cmd.name))
|
|
48
49
|
] }, category)) });
|
|
49
50
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HelpBox.d.ts","sourceRoot":"","sources":["../../../../src/components/chat/styled-boxes/HelpBox.tsx"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"HelpBox.d.ts","sourceRoot":"","sources":["../../../../src/components/chat/styled-boxes/HelpBox.tsx"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAI9D,UAAU,YAAY;IAClB,IAAI,EAAE,cAAc,CAAC;CACxB;AAED,wBAAgB,OAAO,CAAC,EAAE,IAAI,EAAE,EAAE,YAAY,2CAiC7C"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Box, Text } from "ink";
|
|
3
3
|
import { StyledBox } from "./StyledBox.js";
|
|
4
|
+
import { tone } from "../../../signal/index.js";
|
|
4
5
|
function HelpBox({ data }) {
|
|
5
6
|
const categories = data.commands.reduce(
|
|
6
7
|
(acc, cmd) => {
|
|
@@ -14,13 +15,13 @@ function HelpBox({ data }) {
|
|
|
14
15
|
{}
|
|
15
16
|
);
|
|
16
17
|
return /* @__PURE__ */ jsx(StyledBox, { title: "Available Commands", children: Object.entries(categories).map(([category, commands]) => /* @__PURE__ */ jsxs(Box, { flexDirection: "column", marginTop: 1, children: [
|
|
17
|
-
/* @__PURE__ */ jsx(Text, { bold: true, color: "
|
|
18
|
+
/* @__PURE__ */ jsx(Text, { bold: true, color: tone("dim"), children: category }),
|
|
18
19
|
commands.map((cmd) => /* @__PURE__ */ jsxs(Box, { marginLeft: 2, children: [
|
|
19
|
-
/* @__PURE__ */ jsx(Box, { width: 16, children: /* @__PURE__ */ jsxs(Text, { color: "
|
|
20
|
+
/* @__PURE__ */ jsx(Box, { width: 16, children: /* @__PURE__ */ jsxs(Text, { color: tone("teal"), children: [
|
|
20
21
|
"/",
|
|
21
22
|
cmd.name
|
|
22
23
|
] }) }),
|
|
23
|
-
/* @__PURE__ */ jsx(Text, { color: "
|
|
24
|
+
/* @__PURE__ */ jsx(Text, { color: tone("dim"), children: cmd.description })
|
|
24
25
|
] }, cmd.name))
|
|
25
26
|
] }, category)) });
|
|
26
27
|
}
|
|
@@ -24,14 +24,22 @@ module.exports = __toCommonJS(LogConfigBox_exports);
|
|
|
24
24
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
25
25
|
var import_ink = require("ink");
|
|
26
26
|
var import_StyledBox = require("./StyledBox.js");
|
|
27
|
+
var import_signal = require("../../../signal/index.js");
|
|
27
28
|
function LogConfigBox({ data }) {
|
|
28
29
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_StyledBox.StyledBox, { title: "Logging Configuration", children: [
|
|
29
30
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Box, { marginTop: 1, flexDirection: "column", children: [
|
|
30
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
31
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
32
|
+
import_StyledBox.StyledRow,
|
|
33
|
+
{
|
|
34
|
+
label: "Current level",
|
|
35
|
+
value: data.currentLevel,
|
|
36
|
+
valueColor: (0, import_signal.tone)("add")
|
|
37
|
+
}
|
|
38
|
+
),
|
|
31
39
|
data.logFile ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_StyledBox.StyledRow, { label: "Log file", value: data.logFile }) : null
|
|
32
40
|
] }),
|
|
33
41
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Box, { marginTop: 1, flexDirection: "column", children: [
|
|
34
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Text, { color: "
|
|
42
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Text, { color: (0, import_signal.tone)("dim"), children: "Available levels (least to most verbose):" }),
|
|
35
43
|
data.availableLevels.map((level) => {
|
|
36
44
|
const isCurrent = level === data.currentLevel;
|
|
37
45
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
@@ -45,7 +53,7 @@ function LogConfigBox({ data }) {
|
|
|
45
53
|
);
|
|
46
54
|
})
|
|
47
55
|
] }),
|
|
48
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Box, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Text, { color: "
|
|
56
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Box, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Text, { color: (0, import_signal.tone)("dim"), children: "Use /log <level> to change level" }) })
|
|
49
57
|
] });
|
|
50
58
|
}
|
|
51
59
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LogConfigBox.d.ts","sourceRoot":"","sources":["../../../../src/components/chat/styled-boxes/LogConfigBox.tsx"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"LogConfigBox.d.ts","sourceRoot":"","sources":["../../../../src/components/chat/styled-boxes/LogConfigBox.tsx"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAInE,UAAU,iBAAiB;IACvB,IAAI,EAAE,mBAAmB,CAAC;CAC7B;AAED,wBAAgB,YAAY,CAAC,EAAE,IAAI,EAAE,EAAE,iBAAiB,2CAgCvD"}
|
|
@@ -1,14 +1,22 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Box, Text } from "ink";
|
|
3
3
|
import { StyledBox, StyledRow, StyledListItem } from "./StyledBox.js";
|
|
4
|
+
import { tone } from "../../../signal/index.js";
|
|
4
5
|
function LogConfigBox({ data }) {
|
|
5
6
|
return /* @__PURE__ */ jsxs(StyledBox, { title: "Logging Configuration", children: [
|
|
6
7
|
/* @__PURE__ */ jsxs(Box, { marginTop: 1, flexDirection: "column", children: [
|
|
7
|
-
/* @__PURE__ */ jsx(
|
|
8
|
+
/* @__PURE__ */ jsx(
|
|
9
|
+
StyledRow,
|
|
10
|
+
{
|
|
11
|
+
label: "Current level",
|
|
12
|
+
value: data.currentLevel,
|
|
13
|
+
valueColor: tone("add")
|
|
14
|
+
}
|
|
15
|
+
),
|
|
8
16
|
data.logFile ? /* @__PURE__ */ jsx(StyledRow, { label: "Log file", value: data.logFile }) : null
|
|
9
17
|
] }),
|
|
10
18
|
/* @__PURE__ */ jsxs(Box, { marginTop: 1, flexDirection: "column", children: [
|
|
11
|
-
/* @__PURE__ */ jsx(Text, { color: "
|
|
19
|
+
/* @__PURE__ */ jsx(Text, { color: tone("dim"), children: "Available levels (least to most verbose):" }),
|
|
12
20
|
data.availableLevels.map((level) => {
|
|
13
21
|
const isCurrent = level === data.currentLevel;
|
|
14
22
|
return /* @__PURE__ */ jsx(
|
|
@@ -22,7 +30,7 @@ function LogConfigBox({ data }) {
|
|
|
22
30
|
);
|
|
23
31
|
})
|
|
24
32
|
] }),
|
|
25
|
-
/* @__PURE__ */ jsx(Box, { marginTop: 1, children: /* @__PURE__ */ jsx(Text, { color: "
|
|
33
|
+
/* @__PURE__ */ jsx(Box, { marginTop: 1, children: /* @__PURE__ */ jsx(Text, { color: tone("dim"), children: "Use /log <level> to change level" }) })
|
|
26
34
|
] });
|
|
27
35
|
}
|
|
28
36
|
export {
|
|
@@ -24,6 +24,7 @@ module.exports = __toCommonJS(SessionHistoryBox_exports);
|
|
|
24
24
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
25
25
|
var import_ink = require("ink");
|
|
26
26
|
var import_StyledBox = require("./StyledBox.js");
|
|
27
|
+
var import_signal = require("../../../signal/index.js");
|
|
27
28
|
function truncateContent(content, maxLength = 100) {
|
|
28
29
|
if (content.length <= maxLength) return content;
|
|
29
30
|
return content.slice(0, maxLength) + "...";
|
|
@@ -31,20 +32,20 @@ function truncateContent(content, maxLength = 100) {
|
|
|
31
32
|
function getRoleStyle(role) {
|
|
32
33
|
switch (role) {
|
|
33
34
|
case "user":
|
|
34
|
-
return { color: "
|
|
35
|
+
return { color: (0, import_signal.tone)("fg"), icon: ">" };
|
|
35
36
|
case "assistant":
|
|
36
|
-
return { color: "
|
|
37
|
+
return { color: (0, import_signal.tone)("add"), icon: "|" };
|
|
37
38
|
case "system":
|
|
38
39
|
return { color: "orange", icon: "#" };
|
|
39
40
|
case "tool":
|
|
40
|
-
return { color: "
|
|
41
|
+
return { color: (0, import_signal.tone)("add"), icon: "*" };
|
|
41
42
|
default:
|
|
42
|
-
return { color: "
|
|
43
|
+
return { color: (0, import_signal.tone)("hi"), icon: "-" };
|
|
43
44
|
}
|
|
44
45
|
}
|
|
45
46
|
function SessionHistoryBox({ data }) {
|
|
46
47
|
if (data.messages.length === 0) {
|
|
47
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_StyledBox.StyledBox, { title: `Session History: ${data.sessionId.slice(0, 8)}`, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Box, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Text, { color: "
|
|
48
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_StyledBox.StyledBox, { title: `Session History: ${data.sessionId.slice(0, 8)}`, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Box, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Text, { color: (0, import_signal.tone)("dim"), children: "No messages in this session yet." }) }) });
|
|
48
49
|
}
|
|
49
50
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_StyledBox.StyledBox, { title: `Session History: ${data.sessionId.slice(0, 8)}`, children: [
|
|
50
51
|
data.messages.map((msg, index) => {
|
|
@@ -60,7 +61,7 @@ function SessionHistoryBox({ data }) {
|
|
|
60
61
|
msg.role,
|
|
61
62
|
"]"
|
|
62
63
|
] }),
|
|
63
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Text, { color: "
|
|
64
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Text, { color: (0, import_signal.tone)("dim"), children: [
|
|
64
65
|
" ",
|
|
65
66
|
msg.timestamp
|
|
66
67
|
] })
|
|
@@ -68,7 +69,7 @@ function SessionHistoryBox({ data }) {
|
|
|
68
69
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Box, { marginLeft: 2, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Text, { children: truncateContent(msg.content) }) })
|
|
69
70
|
] }, index);
|
|
70
71
|
}),
|
|
71
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Box, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Text, { color: "
|
|
72
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Box, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Text, { color: (0, import_signal.tone)("dim"), children: [
|
|
72
73
|
"Total: ",
|
|
73
74
|
data.total,
|
|
74
75
|
" messages"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SessionHistoryBox.d.ts","sourceRoot":"","sources":["../../../../src/components/chat/styled-boxes/SessionHistoryBox.tsx"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"SessionHistoryBox.d.ts","sourceRoot":"","sources":["../../../../src/components/chat/styled-boxes/SessionHistoryBox.tsx"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AAIxE,UAAU,sBAAsB;IAC5B,IAAI,EAAE,wBAAwB,CAAC;CAClC;AA4BD,wBAAgB,iBAAiB,CAAC,EAAE,IAAI,EAAE,EAAE,sBAAsB,2CAmCjE"}
|