@dexto/tui 1.14.6 → 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 +41 -86
- package/dist/components/Footer.d.ts +2 -2
- package/dist/components/Footer.d.ts.map +1 -1
- package/dist/components/Footer.js +44 -92
- package/dist/components/Footer.test.cjs +44 -0
- package/dist/components/Footer.test.js +44 -0
- 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 +25 -9
- package/dist/components/overlays/InsufficientCreditsOverlay.d.ts +2 -0
- package/dist/components/overlays/InsufficientCreditsOverlay.d.ts.map +1 -1
- package/dist/components/overlays/InsufficientCreditsOverlay.js +25 -9
- 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 +31 -66
- package/dist/components/overlays/LoginOverlay.d.ts +1 -3
- package/dist/components/overlays/LoginOverlay.d.ts.map +1 -1
- package/dist/components/overlays/LoginOverlay.js +32 -71
- package/dist/components/overlays/LogoutOverlay.cjs +16 -24
- package/dist/components/overlays/LogoutOverlay.d.ts +1 -0
- package/dist/components/overlays/LogoutOverlay.d.ts.map +1 -1
- package/dist/components/overlays/LogoutOverlay.js +18 -38
- 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/provider-config.cjs +4 -4
- package/dist/components/overlays/custom-model-wizard/provider-config.js +4 -4
- 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 +32 -44
- package/dist/containers/OverlayContainer.d.ts.map +1 -1
- package/dist/containers/OverlayContainer.js +32 -44
- 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/host/index.cjs +22 -49
- package/dist/host/index.d.ts +18 -72
- package/dist/host/index.d.ts.map +1 -1
- package/dist/host/index.js +18 -42
- package/dist/host/index.test.cjs +21 -35
- package/dist/host/index.test.js +22 -40
- package/dist/index.d.cts +13 -52
- 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 +33 -21
- package/dist/services/processStream.d.ts.map +1 -1
- package/dist/services/processStream.js +34 -22
- package/dist/services/processStream.test.cjs +52 -4
- package/dist/services/processStream.test.js +52 -4
- 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/llm-provider-display.cjs +1 -1
- package/dist/utils/llm-provider-display.js +1 -1
- 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 +9 -5
- 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
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Box, Text } from "ink";
|
|
3
|
+
import { tone } from "../../../../signal/index.js";
|
|
3
4
|
function WizardStepInput({
|
|
4
5
|
step,
|
|
5
6
|
currentInput,
|
|
@@ -14,17 +15,17 @@ function WizardStepInput({
|
|
|
14
15
|
step.label,
|
|
15
16
|
":"
|
|
16
17
|
] }),
|
|
17
|
-
/* @__PURE__ */ jsx(Text, { color: "
|
|
18
|
+
/* @__PURE__ */ jsx(Text, { color: tone("dim"), children: step.placeholder }),
|
|
18
19
|
additionalContent
|
|
19
20
|
] }),
|
|
20
21
|
/* @__PURE__ */ jsxs(Box, { marginTop: 1, children: [
|
|
21
|
-
/* @__PURE__ */ jsx(Text, { color: "
|
|
22
|
+
/* @__PURE__ */ jsx(Text, { color: tone("teal"), children: "> " }),
|
|
22
23
|
/* @__PURE__ */ jsx(Text, { children: currentInput }),
|
|
23
|
-
/* @__PURE__ */ jsx(Text, { color: "
|
|
24
|
+
/* @__PURE__ */ jsx(Text, { color: tone("teal"), children: "_" })
|
|
24
25
|
] }),
|
|
25
|
-
error && /* @__PURE__ */ jsx(Box, { marginTop: 1, children: /* @__PURE__ */ jsx(Text, { color: "red", children: error }) }),
|
|
26
|
-
isValidating && /* @__PURE__ */ jsx(Box, { marginTop: 1, children: /* @__PURE__ */ jsx(Text, { color: "
|
|
27
|
-
isSaving && /* @__PURE__ */ jsx(Box, { marginTop: 1, children: /* @__PURE__ */ jsx(Text, { color: "
|
|
26
|
+
error && /* @__PURE__ */ jsx(Box, { marginTop: 1, children: /* @__PURE__ */ jsx(Text, { color: tone("red"), children: error }) }),
|
|
27
|
+
isValidating && /* @__PURE__ */ jsx(Box, { marginTop: 1, children: /* @__PURE__ */ jsx(Text, { color: tone("amber"), children: "Validating model..." }) }),
|
|
28
|
+
isSaving && /* @__PURE__ */ jsx(Box, { marginTop: 1, children: /* @__PURE__ */ jsx(Text, { color: tone("amber"), children: "Saving..." }) })
|
|
28
29
|
] });
|
|
29
30
|
}
|
|
30
31
|
var WizardStepInput_default = WizardStepInput;
|
|
@@ -36,6 +36,7 @@ var import_react = __toESM(require("react"), 1);
|
|
|
36
36
|
var import_ink = require("ink");
|
|
37
37
|
var import_messageFormatting = require("../../utils/messageFormatting.js");
|
|
38
38
|
var import_diff_shared = require("./diff-shared.js");
|
|
39
|
+
var import_signal = require("../../signal/index.js");
|
|
39
40
|
function DiffRenderer({ data, maxLines = Infinity }) {
|
|
40
41
|
const { unified, filename, additions, deletions } = data;
|
|
41
42
|
const hunks = (0, import_diff_shared.parseUnifiedDiff)(unified);
|
|
@@ -55,13 +56,13 @@ function DiffRenderer({ data, maxLines = Infinity }) {
|
|
|
55
56
|
let linesRendered = 0;
|
|
56
57
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Box, { flexDirection: "column", children: [
|
|
57
58
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Box, { children: [
|
|
58
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Text, { color: "
|
|
59
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Text, { color: (0, import_signal.tone)("dim"), children: " \u23BF " }),
|
|
59
60
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Text, { children: (0, import_messageFormatting.makeRelativePath)(filename) }),
|
|
60
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Text, { color: "
|
|
61
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Text, { color: (0, import_signal.tone)("add"), children: [
|
|
61
62
|
" +",
|
|
62
63
|
additions
|
|
63
64
|
] }),
|
|
64
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Text, { color: "red", children: [
|
|
65
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Text, { color: (0, import_signal.tone)("red"), children: [
|
|
65
66
|
" -",
|
|
66
67
|
deletions
|
|
67
68
|
] })
|
|
@@ -131,7 +132,7 @@ function DiffRenderer({ data, maxLines = Infinity }) {
|
|
|
131
132
|
})
|
|
132
133
|
] }, hunkIndex);
|
|
133
134
|
}),
|
|
134
|
-
shouldTruncate && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Text, { color: "
|
|
135
|
+
shouldTruncate && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Text, { color: (0, import_signal.tone)("dim"), children: [
|
|
135
136
|
"... +",
|
|
136
137
|
totalLines - maxLines,
|
|
137
138
|
" lines"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DiffRenderer.d.ts","sourceRoot":"","sources":["../../../src/components/renderers/DiffRenderer.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"DiffRenderer.d.ts","sourceRoot":"","sources":["../../../src/components/renderers/DiffRenderer.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAYnD,UAAU,iBAAiB;IACvB,yCAAyC;IACzC,IAAI,EAAE,eAAe,CAAC;IACtB,iDAAiD;IACjD,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,EAAE,IAAI,EAAE,QAAmB,EAAE,EAAE,iBAAiB,2CAoH5E"}
|
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
DiffLine,
|
|
11
11
|
HunkSeparator
|
|
12
12
|
} from "./diff-shared.js";
|
|
13
|
+
import { tone } from "../../signal/index.js";
|
|
13
14
|
function DiffRenderer({ data, maxLines = Infinity }) {
|
|
14
15
|
const { unified, filename, additions, deletions } = data;
|
|
15
16
|
const hunks = parseUnifiedDiff(unified);
|
|
@@ -29,13 +30,13 @@ function DiffRenderer({ data, maxLines = Infinity }) {
|
|
|
29
30
|
let linesRendered = 0;
|
|
30
31
|
return /* @__PURE__ */ jsxs(Box, { flexDirection: "column", children: [
|
|
31
32
|
/* @__PURE__ */ jsxs(Box, { children: [
|
|
32
|
-
/* @__PURE__ */ jsx(Text, { color: "
|
|
33
|
+
/* @__PURE__ */ jsx(Text, { color: tone("dim"), children: " \u23BF " }),
|
|
33
34
|
/* @__PURE__ */ jsx(Text, { children: makeRelativePath(filename) }),
|
|
34
|
-
/* @__PURE__ */ jsxs(Text, { color: "
|
|
35
|
+
/* @__PURE__ */ jsxs(Text, { color: tone("add"), children: [
|
|
35
36
|
" +",
|
|
36
37
|
additions
|
|
37
38
|
] }),
|
|
38
|
-
/* @__PURE__ */ jsxs(Text, { color: "red", children: [
|
|
39
|
+
/* @__PURE__ */ jsxs(Text, { color: tone("red"), children: [
|
|
39
40
|
" -",
|
|
40
41
|
deletions
|
|
41
42
|
] })
|
|
@@ -105,7 +106,7 @@ function DiffRenderer({ data, maxLines = Infinity }) {
|
|
|
105
106
|
})
|
|
106
107
|
] }, hunkIndex);
|
|
107
108
|
}),
|
|
108
|
-
shouldTruncate && /* @__PURE__ */ jsxs(Text, { color: "
|
|
109
|
+
shouldTruncate && /* @__PURE__ */ jsxs(Text, { color: tone("dim"), children: [
|
|
109
110
|
"... +",
|
|
110
111
|
totalLines - maxLines,
|
|
111
112
|
" lines"
|
|
@@ -37,6 +37,7 @@ var import_react = __toESM(require("react"), 1);
|
|
|
37
37
|
var import_ink = require("ink");
|
|
38
38
|
var import_messageFormatting = require("../../utils/messageFormatting.js");
|
|
39
39
|
var import_diff_shared = require("./diff-shared.js");
|
|
40
|
+
var import_signal = require("../../signal/index.js");
|
|
40
41
|
function DiffPreview({ data, header }) {
|
|
41
42
|
const { unified, filename } = data;
|
|
42
43
|
const hunks = (0, import_diff_shared.parseUnifiedDiff)(unified);
|
|
@@ -50,8 +51,8 @@ function DiffPreview({ data, header }) {
|
|
|
50
51
|
const allLinePairs = hunks.map((hunk) => (0, import_diff_shared.findLinePairs)(hunk.lines));
|
|
51
52
|
const headerText = header ?? data.title ?? "Update file";
|
|
52
53
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Box, { flexDirection: "column", marginBottom: 1, children: [
|
|
53
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Box, { marginBottom: 0, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Text, { color: "
|
|
54
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Box, { flexDirection: "column", borderStyle: "round", borderColor: "
|
|
54
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Box, { marginBottom: 0, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Text, { color: (0, import_signal.tone)("teal"), bold: true, children: headerText }) }),
|
|
55
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Box, { flexDirection: "column", borderStyle: "round", borderColor: (0, import_signal.tone)("dim"), paddingX: 1, children: [
|
|
55
56
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Box, { marginBottom: 0, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Text, { children: (0, import_messageFormatting.makeRelativePath)(filename) }) }),
|
|
56
57
|
hunks.map((hunk, hunkIndex) => {
|
|
57
58
|
const linePairs = allLinePairs[hunkIndex];
|
|
@@ -113,24 +114,33 @@ function CreateFilePreview({ data, header }) {
|
|
|
113
114
|
const headerText = header ?? data.title ?? "Create file";
|
|
114
115
|
if (!content) {
|
|
115
116
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Box, { flexDirection: "column", marginBottom: 1, children: [
|
|
116
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Box, { marginBottom: 0, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Text, { color: "
|
|
117
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
117
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Box, { marginBottom: 0, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Text, { color: (0, import_signal.tone)("teal"), bold: true, children: headerText }) }),
|
|
118
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
119
|
+
import_ink.Box,
|
|
120
|
+
{
|
|
121
|
+
flexDirection: "column",
|
|
122
|
+
borderStyle: "round",
|
|
123
|
+
borderColor: (0, import_signal.tone)("dim"),
|
|
124
|
+
paddingX: 1,
|
|
125
|
+
children: [
|
|
126
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Text, { children: (0, import_messageFormatting.makeRelativePath)(path) }),
|
|
127
|
+
lineCount && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Text, { color: (0, import_signal.tone)("dim"), children: [
|
|
128
|
+
lineCount,
|
|
129
|
+
" lines"
|
|
130
|
+
] })
|
|
131
|
+
]
|
|
132
|
+
}
|
|
133
|
+
)
|
|
124
134
|
] });
|
|
125
135
|
}
|
|
126
136
|
const lines = content.split("\n");
|
|
127
137
|
const lineNumWidth = (0, import_diff_shared.getLineNumWidth)(lines.length);
|
|
128
138
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Box, { flexDirection: "column", marginBottom: 1, children: [
|
|
129
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Box, { marginBottom: 0, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Text, { color: "
|
|
130
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Box, { flexDirection: "column", borderStyle: "round", borderColor: "
|
|
139
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Box, { marginBottom: 0, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Text, { color: (0, import_signal.tone)("teal"), bold: true, children: headerText }) }),
|
|
140
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Box, { flexDirection: "column", borderStyle: "round", borderColor: (0, import_signal.tone)("dim"), paddingX: 1, children: [
|
|
131
141
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Box, { marginBottom: 0, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Text, { children: (0, import_messageFormatting.makeRelativePath)(path) }) }),
|
|
132
142
|
lines.map((line, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Box, { children: [
|
|
133
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Text, { color: "
|
|
143
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Text, { color: (0, import_signal.tone)("dim"), children: (0, import_diff_shared.formatLineNum)(index + 1, lineNumWidth) }),
|
|
134
144
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Text, { children: [
|
|
135
145
|
" ",
|
|
136
146
|
line
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FilePreviewRenderer.d.ts","sourceRoot":"","sources":["../../../src/components/renderers/FilePreviewRenderer.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"FilePreviewRenderer.d.ts","sourceRoot":"","sources":["../../../src/components/renderers/FilePreviewRenderer.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAiBpE,UAAU,gBAAgB;IACtB,IAAI,EAAE,eAAe,CAAC;IACtB,6DAA6D;IAC7D,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,gBAAgB,2CAiG7D;AAMD,UAAU,sBAAsB;IAC5B,IAAI,EAAE,eAAe,CAAC;IACtB,qDAAqD;IACrD,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,sBAAsB,2CA0DzE"}
|
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
DiffLine,
|
|
12
12
|
HunkSeparator
|
|
13
13
|
} from "./diff-shared.js";
|
|
14
|
+
import { tone } from "../../signal/index.js";
|
|
14
15
|
function DiffPreview({ data, header }) {
|
|
15
16
|
const { unified, filename } = data;
|
|
16
17
|
const hunks = parseUnifiedDiff(unified);
|
|
@@ -24,8 +25,8 @@ function DiffPreview({ data, header }) {
|
|
|
24
25
|
const allLinePairs = hunks.map((hunk) => findLinePairs(hunk.lines));
|
|
25
26
|
const headerText = header ?? data.title ?? "Update file";
|
|
26
27
|
return /* @__PURE__ */ jsxs(Box, { flexDirection: "column", marginBottom: 1, children: [
|
|
27
|
-
/* @__PURE__ */ jsx(Box, { marginBottom: 0, children: /* @__PURE__ */ jsx(Text, { color: "
|
|
28
|
-
/* @__PURE__ */ jsxs(Box, { flexDirection: "column", borderStyle: "round", borderColor: "
|
|
28
|
+
/* @__PURE__ */ jsx(Box, { marginBottom: 0, children: /* @__PURE__ */ jsx(Text, { color: tone("teal"), bold: true, children: headerText }) }),
|
|
29
|
+
/* @__PURE__ */ jsxs(Box, { flexDirection: "column", borderStyle: "round", borderColor: tone("dim"), paddingX: 1, children: [
|
|
29
30
|
/* @__PURE__ */ jsx(Box, { marginBottom: 0, children: /* @__PURE__ */ jsx(Text, { children: makeRelativePath(filename) }) }),
|
|
30
31
|
hunks.map((hunk, hunkIndex) => {
|
|
31
32
|
const linePairs = allLinePairs[hunkIndex];
|
|
@@ -87,24 +88,33 @@ function CreateFilePreview({ data, header }) {
|
|
|
87
88
|
const headerText = header ?? data.title ?? "Create file";
|
|
88
89
|
if (!content) {
|
|
89
90
|
return /* @__PURE__ */ jsxs(Box, { flexDirection: "column", marginBottom: 1, children: [
|
|
90
|
-
/* @__PURE__ */ jsx(Box, { marginBottom: 0, children: /* @__PURE__ */ jsx(Text, { color: "
|
|
91
|
-
/* @__PURE__ */ jsxs(
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
91
|
+
/* @__PURE__ */ jsx(Box, { marginBottom: 0, children: /* @__PURE__ */ jsx(Text, { color: tone("teal"), bold: true, children: headerText }) }),
|
|
92
|
+
/* @__PURE__ */ jsxs(
|
|
93
|
+
Box,
|
|
94
|
+
{
|
|
95
|
+
flexDirection: "column",
|
|
96
|
+
borderStyle: "round",
|
|
97
|
+
borderColor: tone("dim"),
|
|
98
|
+
paddingX: 1,
|
|
99
|
+
children: [
|
|
100
|
+
/* @__PURE__ */ jsx(Text, { children: makeRelativePath(path) }),
|
|
101
|
+
lineCount && /* @__PURE__ */ jsxs(Text, { color: tone("dim"), children: [
|
|
102
|
+
lineCount,
|
|
103
|
+
" lines"
|
|
104
|
+
] })
|
|
105
|
+
]
|
|
106
|
+
}
|
|
107
|
+
)
|
|
98
108
|
] });
|
|
99
109
|
}
|
|
100
110
|
const lines = content.split("\n");
|
|
101
111
|
const lineNumWidth = getLineNumWidth(lines.length);
|
|
102
112
|
return /* @__PURE__ */ jsxs(Box, { flexDirection: "column", marginBottom: 1, children: [
|
|
103
|
-
/* @__PURE__ */ jsx(Box, { marginBottom: 0, children: /* @__PURE__ */ jsx(Text, { color: "
|
|
104
|
-
/* @__PURE__ */ jsxs(Box, { flexDirection: "column", borderStyle: "round", borderColor: "
|
|
113
|
+
/* @__PURE__ */ jsx(Box, { marginBottom: 0, children: /* @__PURE__ */ jsx(Text, { color: tone("teal"), bold: true, children: headerText }) }),
|
|
114
|
+
/* @__PURE__ */ jsxs(Box, { flexDirection: "column", borderStyle: "round", borderColor: tone("dim"), paddingX: 1, children: [
|
|
105
115
|
/* @__PURE__ */ jsx(Box, { marginBottom: 0, children: /* @__PURE__ */ jsx(Text, { children: makeRelativePath(path) }) }),
|
|
106
116
|
lines.map((line, index) => /* @__PURE__ */ jsxs(Box, { children: [
|
|
107
|
-
/* @__PURE__ */ jsx(Text, { color: "
|
|
117
|
+
/* @__PURE__ */ jsx(Text, { color: tone("dim"), children: formatLineNum(index + 1, lineNumWidth) }),
|
|
108
118
|
/* @__PURE__ */ jsxs(Text, { children: [
|
|
109
119
|
" ",
|
|
110
120
|
line
|
|
@@ -25,12 +25,13 @@ var import_jsx_runtime = require("react/jsx-runtime");
|
|
|
25
25
|
var import_ink = require("ink");
|
|
26
26
|
var import_messageFormatting = require("../../utils/messageFormatting.js");
|
|
27
27
|
var import_diff_shared = require("./diff-shared.js");
|
|
28
|
+
var import_signal = require("../../signal/index.js");
|
|
28
29
|
function FileRenderer({ data, maxLines = 20 }) {
|
|
29
30
|
const { operation, lineCount, path, content } = data;
|
|
30
31
|
const relativePath = (0, import_messageFormatting.makeRelativePath)(path);
|
|
31
32
|
if (operation === "read") {
|
|
32
33
|
const lineText = lineCount !== void 0 ? `${lineCount} lines` : "file";
|
|
33
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Text, { color: "
|
|
34
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Text, { color: (0, import_signal.tone)("dim"), children: [
|
|
34
35
|
" \u23BF ",
|
|
35
36
|
"Read ",
|
|
36
37
|
lineText,
|
|
@@ -47,19 +48,19 @@ function FileRenderer({ data, maxLines = 20 }) {
|
|
|
47
48
|
const lineNumWidth = (0, import_diff_shared.getLineNumWidth)(lines.length);
|
|
48
49
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Box, { flexDirection: "column", children: [
|
|
49
50
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Box, { children: [
|
|
50
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Text, { color: "
|
|
51
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Text, { color: (0, import_signal.tone)("dim"), children: " \u23BF " }),
|
|
51
52
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Text, { children: relativePath }),
|
|
52
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Text, { color: "
|
|
53
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Text, { color: (0, import_signal.tone)("add"), children: " (created)" })
|
|
53
54
|
] }),
|
|
54
55
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Box, { flexDirection: "column", paddingLeft: 2, children: [
|
|
55
56
|
displayLines.map((line, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Box, { children: [
|
|
56
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Text, { color: "
|
|
57
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Text, { color: (0, import_signal.tone)("dim"), children: (0, import_diff_shared.formatLineNum)(index + 1, lineNumWidth) }),
|
|
57
58
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Text, { wrap: "wrap", children: [
|
|
58
59
|
" ",
|
|
59
60
|
line
|
|
60
61
|
] })
|
|
61
62
|
] }, index)),
|
|
62
|
-
truncatedCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Text, { color: "
|
|
63
|
+
truncatedCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Text, { color: (0, import_signal.tone)("dim"), children: [
|
|
63
64
|
"... +",
|
|
64
65
|
truncatedCount,
|
|
65
66
|
" lines"
|
|
@@ -68,7 +69,7 @@ function FileRenderer({ data, maxLines = 20 }) {
|
|
|
68
69
|
] });
|
|
69
70
|
}
|
|
70
71
|
const lineText = lineCount !== void 0 ? `${lineCount} lines` : "content";
|
|
71
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Text, { color: "
|
|
72
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Text, { color: (0, import_signal.tone)("dim"), children: [
|
|
72
73
|
" \u23BF ",
|
|
73
74
|
verb,
|
|
74
75
|
" ",
|
|
@@ -78,13 +79,13 @@ function FileRenderer({ data, maxLines = 20 }) {
|
|
|
78
79
|
] });
|
|
79
80
|
}
|
|
80
81
|
if (operation === "delete") {
|
|
81
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Text, { color: "
|
|
82
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Text, { color: (0, import_signal.tone)("dim"), children: [
|
|
82
83
|
" \u23BF ",
|
|
83
84
|
"Deleted ",
|
|
84
85
|
relativePath
|
|
85
86
|
] });
|
|
86
87
|
}
|
|
87
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Text, { color: "
|
|
88
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Text, { color: (0, import_signal.tone)("dim"), children: [
|
|
88
89
|
" \u23BF ",
|
|
89
90
|
operation
|
|
90
91
|
] });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileRenderer.d.ts","sourceRoot":"","sources":["../../../src/components/renderers/FileRenderer.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"FileRenderer.d.ts","sourceRoot":"","sources":["../../../src/components/renderers/FileRenderer.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAKnD,UAAU,iBAAiB;IACvB,yCAAyC;IACzC,IAAI,EAAE,eAAe,CAAC;IACtB,wDAAwD;IACxD,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,EAAE,IAAI,EAAE,QAAa,EAAE,EAAE,iBAAiB,2CA6EtE"}
|
|
@@ -2,12 +2,13 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { Box, Text } from "ink";
|
|
3
3
|
import { makeRelativePath } from "../../utils/messageFormatting.js";
|
|
4
4
|
import { formatLineNum, getLineNumWidth } from "./diff-shared.js";
|
|
5
|
+
import { tone } from "../../signal/index.js";
|
|
5
6
|
function FileRenderer({ data, maxLines = 20 }) {
|
|
6
7
|
const { operation, lineCount, path, content } = data;
|
|
7
8
|
const relativePath = makeRelativePath(path);
|
|
8
9
|
if (operation === "read") {
|
|
9
10
|
const lineText = lineCount !== void 0 ? `${lineCount} lines` : "file";
|
|
10
|
-
return /* @__PURE__ */ jsxs(Text, { color: "
|
|
11
|
+
return /* @__PURE__ */ jsxs(Text, { color: tone("dim"), children: [
|
|
11
12
|
" \u23BF ",
|
|
12
13
|
"Read ",
|
|
13
14
|
lineText,
|
|
@@ -24,19 +25,19 @@ function FileRenderer({ data, maxLines = 20 }) {
|
|
|
24
25
|
const lineNumWidth = getLineNumWidth(lines.length);
|
|
25
26
|
return /* @__PURE__ */ jsxs(Box, { flexDirection: "column", children: [
|
|
26
27
|
/* @__PURE__ */ jsxs(Box, { children: [
|
|
27
|
-
/* @__PURE__ */ jsx(Text, { color: "
|
|
28
|
+
/* @__PURE__ */ jsx(Text, { color: tone("dim"), children: " \u23BF " }),
|
|
28
29
|
/* @__PURE__ */ jsx(Text, { children: relativePath }),
|
|
29
|
-
/* @__PURE__ */ jsx(Text, { color: "
|
|
30
|
+
/* @__PURE__ */ jsx(Text, { color: tone("add"), children: " (created)" })
|
|
30
31
|
] }),
|
|
31
32
|
/* @__PURE__ */ jsxs(Box, { flexDirection: "column", paddingLeft: 2, children: [
|
|
32
33
|
displayLines.map((line, index) => /* @__PURE__ */ jsxs(Box, { children: [
|
|
33
|
-
/* @__PURE__ */ jsx(Text, { color: "
|
|
34
|
+
/* @__PURE__ */ jsx(Text, { color: tone("dim"), children: formatLineNum(index + 1, lineNumWidth) }),
|
|
34
35
|
/* @__PURE__ */ jsxs(Text, { wrap: "wrap", children: [
|
|
35
36
|
" ",
|
|
36
37
|
line
|
|
37
38
|
] })
|
|
38
39
|
] }, index)),
|
|
39
|
-
truncatedCount > 0 && /* @__PURE__ */ jsxs(Text, { color: "
|
|
40
|
+
truncatedCount > 0 && /* @__PURE__ */ jsxs(Text, { color: tone("dim"), children: [
|
|
40
41
|
"... +",
|
|
41
42
|
truncatedCount,
|
|
42
43
|
" lines"
|
|
@@ -45,7 +46,7 @@ function FileRenderer({ data, maxLines = 20 }) {
|
|
|
45
46
|
] });
|
|
46
47
|
}
|
|
47
48
|
const lineText = lineCount !== void 0 ? `${lineCount} lines` : "content";
|
|
48
|
-
return /* @__PURE__ */ jsxs(Text, { color: "
|
|
49
|
+
return /* @__PURE__ */ jsxs(Text, { color: tone("dim"), children: [
|
|
49
50
|
" \u23BF ",
|
|
50
51
|
verb,
|
|
51
52
|
" ",
|
|
@@ -55,13 +56,13 @@ function FileRenderer({ data, maxLines = 20 }) {
|
|
|
55
56
|
] });
|
|
56
57
|
}
|
|
57
58
|
if (operation === "delete") {
|
|
58
|
-
return /* @__PURE__ */ jsxs(Text, { color: "
|
|
59
|
+
return /* @__PURE__ */ jsxs(Text, { color: tone("dim"), children: [
|
|
59
60
|
" \u23BF ",
|
|
60
61
|
"Deleted ",
|
|
61
62
|
relativePath
|
|
62
63
|
] });
|
|
63
64
|
}
|
|
64
|
-
return /* @__PURE__ */ jsxs(Text, { color: "
|
|
65
|
+
return /* @__PURE__ */ jsxs(Text, { color: tone("dim"), children: [
|
|
65
66
|
" \u23BF ",
|
|
66
67
|
operation
|
|
67
68
|
] });
|
|
@@ -23,6 +23,7 @@ __export(GenericRenderer_exports, {
|
|
|
23
23
|
module.exports = __toCommonJS(GenericRenderer_exports);
|
|
24
24
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
25
25
|
var import_ink = require("ink");
|
|
26
|
+
var import_signal = require("../../signal/index.js");
|
|
26
27
|
function GenericRenderer({ content, maxLines = 15 }) {
|
|
27
28
|
const text = content.filter((part) => part.type === "text").map((part) => part.text).join("\n");
|
|
28
29
|
if (!text) {
|
|
@@ -33,23 +34,23 @@ function GenericRenderer({ content, maxLines = 15 }) {
|
|
|
33
34
|
const truncated = lines.length > maxLines;
|
|
34
35
|
if (lines.length === 1 && lines[0]) {
|
|
35
36
|
const line = lines[0];
|
|
36
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Text, { color: "
|
|
37
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Text, { color: (0, import_signal.tone)("dim"), children: [
|
|
37
38
|
" \u23BF ",
|
|
38
39
|
line.slice(0, 80),
|
|
39
40
|
line.length > 80 ? "..." : ""
|
|
40
41
|
] });
|
|
41
42
|
}
|
|
42
43
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Box, { flexDirection: "column", children: [
|
|
43
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Text, { color: "
|
|
44
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Text, { color: (0, import_signal.tone)("dim"), children: [
|
|
44
45
|
" \u23BF ",
|
|
45
46
|
displayLines.length,
|
|
46
47
|
" lines"
|
|
47
48
|
] }),
|
|
48
|
-
displayLines.map((line, i) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Text, { color: "
|
|
49
|
+
displayLines.map((line, i) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Text, { color: (0, import_signal.tone)("dim"), wrap: "truncate", children: [
|
|
49
50
|
" \u23BF ",
|
|
50
51
|
line
|
|
51
52
|
] }, i)),
|
|
52
|
-
truncated && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Text, { color: "
|
|
53
|
+
truncated && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Text, { color: (0, import_signal.tone)("dim"), children: [
|
|
53
54
|
" \u23BF ",
|
|
54
55
|
"... ",
|
|
55
56
|
lines.length - maxLines,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GenericRenderer.d.ts","sourceRoot":"","sources":["../../../src/components/renderers/GenericRenderer.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"GenericRenderer.d.ts","sourceRoot":"","sources":["../../../src/components/renderers/GenericRenderer.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAG/C,UAAU,oBAAoB;IAC1B,6CAA6C;IAC7C,OAAO,EAAE,WAAW,EAAE,CAAC;IACvB,iDAAiD;IACjD,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,EAAE,OAAO,EAAE,QAAa,EAAE,EAAE,oBAAoB,kDA8C/E"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Box, Text } from "ink";
|
|
3
|
+
import { tone } from "../../signal/index.js";
|
|
3
4
|
function GenericRenderer({ content, maxLines = 15 }) {
|
|
4
5
|
const text = content.filter((part) => part.type === "text").map((part) => part.text).join("\n");
|
|
5
6
|
if (!text) {
|
|
@@ -10,23 +11,23 @@ function GenericRenderer({ content, maxLines = 15 }) {
|
|
|
10
11
|
const truncated = lines.length > maxLines;
|
|
11
12
|
if (lines.length === 1 && lines[0]) {
|
|
12
13
|
const line = lines[0];
|
|
13
|
-
return /* @__PURE__ */ jsxs(Text, { color: "
|
|
14
|
+
return /* @__PURE__ */ jsxs(Text, { color: tone("dim"), children: [
|
|
14
15
|
" \u23BF ",
|
|
15
16
|
line.slice(0, 80),
|
|
16
17
|
line.length > 80 ? "..." : ""
|
|
17
18
|
] });
|
|
18
19
|
}
|
|
19
20
|
return /* @__PURE__ */ jsxs(Box, { flexDirection: "column", children: [
|
|
20
|
-
/* @__PURE__ */ jsxs(Text, { color: "
|
|
21
|
+
/* @__PURE__ */ jsxs(Text, { color: tone("dim"), children: [
|
|
21
22
|
" \u23BF ",
|
|
22
23
|
displayLines.length,
|
|
23
24
|
" lines"
|
|
24
25
|
] }),
|
|
25
|
-
displayLines.map((line, i) => /* @__PURE__ */ jsxs(Text, { color: "
|
|
26
|
+
displayLines.map((line, i) => /* @__PURE__ */ jsxs(Text, { color: tone("dim"), wrap: "truncate", children: [
|
|
26
27
|
" \u23BF ",
|
|
27
28
|
line
|
|
28
29
|
] }, i)),
|
|
29
|
-
truncated && /* @__PURE__ */ jsxs(Text, { color: "
|
|
30
|
+
truncated && /* @__PURE__ */ jsxs(Text, { color: tone("dim"), children: [
|
|
30
31
|
" \u23BF ",
|
|
31
32
|
"... ",
|
|
32
33
|
lines.length - maxLines,
|
|
@@ -34,6 +34,7 @@ module.exports = __toCommonJS(SearchRenderer_exports);
|
|
|
34
34
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
35
35
|
var import_path = __toESM(require("path"), 1);
|
|
36
36
|
var import_ink = require("ink");
|
|
37
|
+
var import_signal = require("../../signal/index.js");
|
|
37
38
|
function toRelativePath(absolutePath) {
|
|
38
39
|
const cwd = process.cwd();
|
|
39
40
|
const relative = import_path.default.relative(cwd, absolutePath);
|
|
@@ -48,7 +49,7 @@ function SearchRenderer({ data, maxMatches = 5 }) {
|
|
|
48
49
|
const displayMatches = matches.slice(0, maxMatches);
|
|
49
50
|
const truncated = dataTruncated || matches.length > maxMatches;
|
|
50
51
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Box, { flexDirection: "column", children: [
|
|
51
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Text, { color: "
|
|
52
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Text, { color: (0, import_signal.tone)("dim"), children: [
|
|
52
53
|
" \u23BF ",
|
|
53
54
|
totalMatches,
|
|
54
55
|
" match",
|
|
@@ -58,12 +59,12 @@ function SearchRenderer({ data, maxMatches = 5 }) {
|
|
|
58
59
|
'"',
|
|
59
60
|
truncated && " (truncated)"
|
|
60
61
|
] }),
|
|
61
|
-
displayMatches.map((match, i) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Text, { color: "
|
|
62
|
+
displayMatches.map((match, i) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Text, { color: (0, import_signal.tone)("dim"), wrap: "truncate", children: [
|
|
62
63
|
" \u23BF ",
|
|
63
64
|
toRelativePath(match.file),
|
|
64
65
|
match.line > 0 && `:${match.line}`
|
|
65
66
|
] }, i)),
|
|
66
|
-
matches.length > maxMatches && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Text, { color: "
|
|
67
|
+
matches.length > maxMatches && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Text, { color: (0, import_signal.tone)("dim"), children: [
|
|
67
68
|
" \u23BF ",
|
|
68
69
|
"... ",
|
|
69
70
|
matches.length - maxMatches,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchRenderer.d.ts","sourceRoot":"","sources":["../../../src/components/renderers/SearchRenderer.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"SearchRenderer.d.ts","sourceRoot":"","sources":["../../../src/components/renderers/SearchRenderer.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAgBrD,UAAU,mBAAmB;IACzB,2CAA2C;IAC3C,IAAI,EAAE,iBAAiB,CAAC;IACxB,mDAAmD;IACnD,UAAU,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,EAAE,IAAI,EAAE,UAAc,EAAE,EAAE,mBAAmB,2CA8B3E"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsxs } from "react/jsx-runtime";
|
|
2
2
|
import path from "path";
|
|
3
3
|
import { Box, Text } from "ink";
|
|
4
|
+
import { tone } from "../../signal/index.js";
|
|
4
5
|
function toRelativePath(absolutePath) {
|
|
5
6
|
const cwd = process.cwd();
|
|
6
7
|
const relative = path.relative(cwd, absolutePath);
|
|
@@ -15,7 +16,7 @@ function SearchRenderer({ data, maxMatches = 5 }) {
|
|
|
15
16
|
const displayMatches = matches.slice(0, maxMatches);
|
|
16
17
|
const truncated = dataTruncated || matches.length > maxMatches;
|
|
17
18
|
return /* @__PURE__ */ jsxs(Box, { flexDirection: "column", children: [
|
|
18
|
-
/* @__PURE__ */ jsxs(Text, { color: "
|
|
19
|
+
/* @__PURE__ */ jsxs(Text, { color: tone("dim"), children: [
|
|
19
20
|
" \u23BF ",
|
|
20
21
|
totalMatches,
|
|
21
22
|
" match",
|
|
@@ -25,12 +26,12 @@ function SearchRenderer({ data, maxMatches = 5 }) {
|
|
|
25
26
|
'"',
|
|
26
27
|
truncated && " (truncated)"
|
|
27
28
|
] }),
|
|
28
|
-
displayMatches.map((match, i) => /* @__PURE__ */ jsxs(Text, { color: "
|
|
29
|
+
displayMatches.map((match, i) => /* @__PURE__ */ jsxs(Text, { color: tone("dim"), wrap: "truncate", children: [
|
|
29
30
|
" \u23BF ",
|
|
30
31
|
toRelativePath(match.file),
|
|
31
32
|
match.line > 0 && `:${match.line}`
|
|
32
33
|
] }, i)),
|
|
33
|
-
matches.length > maxMatches && /* @__PURE__ */ jsxs(Text, { color: "
|
|
34
|
+
matches.length > maxMatches && /* @__PURE__ */ jsxs(Text, { color: tone("dim"), children: [
|
|
34
35
|
" \u23BF ",
|
|
35
36
|
"... ",
|
|
36
37
|
matches.length - maxMatches,
|
|
@@ -23,32 +23,33 @@ __export(ShellRenderer_exports, {
|
|
|
23
23
|
module.exports = __toCommonJS(ShellRenderer_exports);
|
|
24
24
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
25
25
|
var import_ink = require("ink");
|
|
26
|
+
var import_signal = require("../../signal/index.js");
|
|
26
27
|
function ShellRenderer({ data, maxLines = 5 }) {
|
|
27
28
|
const output = data.stdout && data.stdout.length > 0 ? data.stdout : data.stderr || "";
|
|
28
29
|
const outputLines = output.split("\n").filter((line) => line.length > 0);
|
|
29
30
|
const displayLines = outputLines.slice(0, maxLines);
|
|
30
31
|
const truncatedCount = outputLines.length - displayLines.length;
|
|
31
32
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Box, { flexDirection: "column", children: [
|
|
32
|
-
data.isBackground && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Text, { color: "
|
|
33
|
+
data.isBackground && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Text, { color: (0, import_signal.tone)("dim"), children: [
|
|
33
34
|
" ",
|
|
34
35
|
"(background)"
|
|
35
36
|
] }),
|
|
36
|
-
outputLines.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Text, { color: "
|
|
37
|
+
outputLines.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Text, { color: (0, import_signal.tone)("dim"), children: [
|
|
37
38
|
" ",
|
|
38
39
|
"(No output)"
|
|
39
40
|
] }) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
40
|
-
displayLines.map((line, i) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Text, { color: "
|
|
41
|
+
displayLines.map((line, i) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Text, { color: (0, import_signal.tone)("dim"), wrap: "truncate", children: [
|
|
41
42
|
" ",
|
|
42
43
|
line
|
|
43
44
|
] }, i)),
|
|
44
|
-
truncatedCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Text, { color: "
|
|
45
|
+
truncatedCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Text, { color: (0, import_signal.tone)("dim"), children: [
|
|
45
46
|
" ",
|
|
46
47
|
"+",
|
|
47
48
|
truncatedCount,
|
|
48
49
|
" lines"
|
|
49
50
|
] })
|
|
50
51
|
] }),
|
|
51
|
-
data.exitCode !== 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Text, { color: "red", children: [
|
|
52
|
+
data.exitCode !== 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Text, { color: (0, import_signal.tone)("red"), children: [
|
|
52
53
|
" ",
|
|
53
54
|
"exit code: ",
|
|
54
55
|
data.exitCode
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ShellRenderer.d.ts","sourceRoot":"","sources":["../../../src/components/renderers/ShellRenderer.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"ShellRenderer.d.ts","sourceRoot":"","sources":["../../../src/components/renderers/ShellRenderer.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAGpD,UAAU,kBAAkB;IACxB,0CAA0C;IAC1C,IAAI,EAAE,gBAAgB,CAAC;IACvB,+DAA+D;IAC/D,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,EAAE,IAAI,EAAE,QAAY,EAAE,EAAE,kBAAkB,2CAqCvE"}
|
|
@@ -1,31 +1,32 @@
|
|
|
1
1
|
import { Fragment, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Box, Text } from "ink";
|
|
3
|
+
import { tone } from "../../signal/index.js";
|
|
3
4
|
function ShellRenderer({ data, maxLines = 5 }) {
|
|
4
5
|
const output = data.stdout && data.stdout.length > 0 ? data.stdout : data.stderr || "";
|
|
5
6
|
const outputLines = output.split("\n").filter((line) => line.length > 0);
|
|
6
7
|
const displayLines = outputLines.slice(0, maxLines);
|
|
7
8
|
const truncatedCount = outputLines.length - displayLines.length;
|
|
8
9
|
return /* @__PURE__ */ jsxs(Box, { flexDirection: "column", children: [
|
|
9
|
-
data.isBackground && /* @__PURE__ */ jsxs(Text, { color: "
|
|
10
|
+
data.isBackground && /* @__PURE__ */ jsxs(Text, { color: tone("dim"), children: [
|
|
10
11
|
" ",
|
|
11
12
|
"(background)"
|
|
12
13
|
] }),
|
|
13
|
-
outputLines.length === 0 ? /* @__PURE__ */ jsxs(Text, { color: "
|
|
14
|
+
outputLines.length === 0 ? /* @__PURE__ */ jsxs(Text, { color: tone("dim"), children: [
|
|
14
15
|
" ",
|
|
15
16
|
"(No output)"
|
|
16
17
|
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
17
|
-
displayLines.map((line, i) => /* @__PURE__ */ jsxs(Text, { color: "
|
|
18
|
+
displayLines.map((line, i) => /* @__PURE__ */ jsxs(Text, { color: tone("dim"), wrap: "truncate", children: [
|
|
18
19
|
" ",
|
|
19
20
|
line
|
|
20
21
|
] }, i)),
|
|
21
|
-
truncatedCount > 0 && /* @__PURE__ */ jsxs(Text, { color: "
|
|
22
|
+
truncatedCount > 0 && /* @__PURE__ */ jsxs(Text, { color: tone("dim"), children: [
|
|
22
23
|
" ",
|
|
23
24
|
"+",
|
|
24
25
|
truncatedCount,
|
|
25
26
|
" lines"
|
|
26
27
|
] })
|
|
27
28
|
] }),
|
|
28
|
-
data.exitCode !== 0 && /* @__PURE__ */ jsxs(Text, { color: "red", children: [
|
|
29
|
+
data.exitCode !== 0 && /* @__PURE__ */ jsxs(Text, { color: tone("red"), children: [
|
|
29
30
|
" ",
|
|
30
31
|
"exit code: ",
|
|
31
32
|
data.exitCode
|