mistagent 0.1.0
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/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +14 -0
- package/dist/index.js.map +1 -0
- package/dist/src/api/auth.d.ts +7 -0
- package/dist/src/api/auth.d.ts.map +1 -0
- package/dist/src/api/auth.js +16 -0
- package/dist/src/api/auth.js.map +1 -0
- package/dist/src/api/chat.d.ts +8 -0
- package/dist/src/api/chat.d.ts.map +1 -0
- package/dist/src/api/chat.js +14 -0
- package/dist/src/api/chat.js.map +1 -0
- package/dist/src/api/client.d.ts +22 -0
- package/dist/src/api/client.d.ts.map +1 -0
- package/dist/src/api/client.js +140 -0
- package/dist/src/api/client.js.map +1 -0
- package/dist/src/api/commands.d.ts +8 -0
- package/dist/src/api/commands.d.ts.map +1 -0
- package/dist/src/api/commands.js +13 -0
- package/dist/src/api/commands.js.map +1 -0
- package/dist/src/api/models.d.ts +9 -0
- package/dist/src/api/models.d.ts.map +1 -0
- package/dist/src/api/models.js +13 -0
- package/dist/src/api/models.js.map +1 -0
- package/dist/src/api/sessions.d.ts +25 -0
- package/dist/src/api/sessions.d.ts.map +1 -0
- package/dist/src/api/sessions.js +26 -0
- package/dist/src/api/sessions.js.map +1 -0
- package/dist/src/api/tools.d.ts +7 -0
- package/dist/src/api/tools.d.ts.map +1 -0
- package/dist/src/api/tools.js +8 -0
- package/dist/src/api/tools.js.map +1 -0
- package/dist/src/components/App.d.ts +22 -0
- package/dist/src/components/App.d.ts.map +1 -0
- package/dist/src/components/App.js +61 -0
- package/dist/src/components/App.js.map +1 -0
- package/dist/src/components/AppLayout.d.ts +8 -0
- package/dist/src/components/AppLayout.d.ts.map +1 -0
- package/dist/src/components/AppLayout.js +18 -0
- package/dist/src/components/AppLayout.js.map +1 -0
- package/dist/src/components/Composer.d.ts +8 -0
- package/dist/src/components/Composer.d.ts.map +1 -0
- package/dist/src/components/Composer.js +294 -0
- package/dist/src/components/Composer.js.map +1 -0
- package/dist/src/components/Footer.d.ts +10 -0
- package/dist/src/components/Footer.d.ts.map +1 -0
- package/dist/src/components/Footer.js +34 -0
- package/dist/src/components/Footer.js.map +1 -0
- package/dist/src/components/Header.d.ts +3 -0
- package/dist/src/components/Header.d.ts.map +1 -0
- package/dist/src/components/Header.js +99 -0
- package/dist/src/components/Header.js.map +1 -0
- package/dist/src/components/HistoryItemDisplay.d.ts +8 -0
- package/dist/src/components/HistoryItemDisplay.d.ts.map +1 -0
- package/dist/src/components/HistoryItemDisplay.js +32 -0
- package/dist/src/components/HistoryItemDisplay.js.map +1 -0
- package/dist/src/components/InputPrompt.d.ts +11 -0
- package/dist/src/components/InputPrompt.d.ts.map +1 -0
- package/dist/src/components/InputPrompt.js +12 -0
- package/dist/src/components/InputPrompt.js.map +1 -0
- package/dist/src/components/LoadingIndicator.d.ts +8 -0
- package/dist/src/components/LoadingIndicator.d.ts.map +1 -0
- package/dist/src/components/LoadingIndicator.js +17 -0
- package/dist/src/components/LoadingIndicator.js.map +1 -0
- package/dist/src/components/LoginPrompt.d.ts +8 -0
- package/dist/src/components/LoginPrompt.d.ts.map +1 -0
- package/dist/src/components/LoginPrompt.js +76 -0
- package/dist/src/components/LoginPrompt.js.map +1 -0
- package/dist/src/components/MainContent.d.ts +3 -0
- package/dist/src/components/MainContent.d.ts.map +1 -0
- package/dist/src/components/MainContent.js +22 -0
- package/dist/src/components/MainContent.js.map +1 -0
- package/dist/src/components/ModelPicker.d.ts +3 -0
- package/dist/src/components/ModelPicker.d.ts.map +1 -0
- package/dist/src/components/ModelPicker.js +119 -0
- package/dist/src/components/ModelPicker.js.map +1 -0
- package/dist/src/components/MultiLineInput.d.ts +19 -0
- package/dist/src/components/MultiLineInput.d.ts.map +1 -0
- package/dist/src/components/MultiLineInput.js +108 -0
- package/dist/src/components/MultiLineInput.js.map +1 -0
- package/dist/src/components/SessionPicker.d.ts +3 -0
- package/dist/src/components/SessionPicker.d.ts.map +1 -0
- package/dist/src/components/SessionPicker.js +131 -0
- package/dist/src/components/SessionPicker.js.map +1 -0
- package/dist/src/components/SuggestionsDisplay.d.ts +16 -0
- package/dist/src/components/SuggestionsDisplay.d.ts.map +1 -0
- package/dist/src/components/SuggestionsDisplay.js +34 -0
- package/dist/src/components/SuggestionsDisplay.js.map +1 -0
- package/dist/src/components/messages/AssistantMessage.d.ts +8 -0
- package/dist/src/components/messages/AssistantMessage.d.ts.map +1 -0
- package/dist/src/components/messages/AssistantMessage.js +9 -0
- package/dist/src/components/messages/AssistantMessage.js.map +1 -0
- package/dist/src/components/messages/CommandResult.d.ts +8 -0
- package/dist/src/components/messages/CommandResult.d.ts.map +1 -0
- package/dist/src/components/messages/CommandResult.js +7 -0
- package/dist/src/components/messages/CommandResult.js.map +1 -0
- package/dist/src/components/messages/ErrorMessage.d.ts +7 -0
- package/dist/src/components/messages/ErrorMessage.d.ts.map +1 -0
- package/dist/src/components/messages/ErrorMessage.js +7 -0
- package/dist/src/components/messages/ErrorMessage.js.map +1 -0
- package/dist/src/components/messages/InfoMessage.d.ts +9 -0
- package/dist/src/components/messages/InfoMessage.d.ts.map +1 -0
- package/dist/src/components/messages/InfoMessage.js +8 -0
- package/dist/src/components/messages/InfoMessage.js.map +1 -0
- package/dist/src/components/messages/ModelMessage.d.ts +8 -0
- package/dist/src/components/messages/ModelMessage.d.ts.map +1 -0
- package/dist/src/components/messages/ModelMessage.js +7 -0
- package/dist/src/components/messages/ModelMessage.js.map +1 -0
- package/dist/src/components/messages/SessionMessage.d.ts +8 -0
- package/dist/src/components/messages/SessionMessage.d.ts.map +1 -0
- package/dist/src/components/messages/SessionMessage.js +12 -0
- package/dist/src/components/messages/SessionMessage.js.map +1 -0
- package/dist/src/components/messages/ToolCallMessage.d.ts +9 -0
- package/dist/src/components/messages/ToolCallMessage.d.ts.map +1 -0
- package/dist/src/components/messages/ToolCallMessage.js +14 -0
- package/dist/src/components/messages/ToolCallMessage.js.map +1 -0
- package/dist/src/components/messages/UserMessage.d.ts +7 -0
- package/dist/src/components/messages/UserMessage.d.ts.map +1 -0
- package/dist/src/components/messages/UserMessage.js +9 -0
- package/dist/src/components/messages/UserMessage.js.map +1 -0
- package/dist/src/components/shared/HorizontalLine.d.ts +11 -0
- package/dist/src/components/shared/HorizontalLine.d.ts.map +1 -0
- package/dist/src/components/shared/HorizontalLine.js +10 -0
- package/dist/src/components/shared/HorizontalLine.js.map +1 -0
- package/dist/src/components/shared/MarkdownRenderer.d.ts +7 -0
- package/dist/src/components/shared/MarkdownRenderer.d.ts.map +1 -0
- package/dist/src/components/shared/MarkdownRenderer.js +33 -0
- package/dist/src/components/shared/MarkdownRenderer.js.map +1 -0
- package/dist/src/components/shared/Spinner.d.ts +8 -0
- package/dist/src/components/shared/Spinner.d.ts.map +1 -0
- package/dist/src/components/shared/Spinner.js +7 -0
- package/dist/src/components/shared/Spinner.js.map +1 -0
- package/dist/src/components/shared/TextInput.d.ts +10 -0
- package/dist/src/components/shared/TextInput.d.ts.map +1 -0
- package/dist/src/components/shared/TextInput.js +110 -0
- package/dist/src/components/shared/TextInput.js.map +1 -0
- package/dist/src/contexts/AppContext.d.ts +21 -0
- package/dist/src/contexts/AppContext.d.ts.map +1 -0
- package/dist/src/contexts/AppContext.js +16 -0
- package/dist/src/contexts/AppContext.js.map +1 -0
- package/dist/src/contexts/ChatContext.d.ts +68 -0
- package/dist/src/contexts/ChatContext.d.ts.map +1 -0
- package/dist/src/contexts/ChatContext.js +158 -0
- package/dist/src/contexts/ChatContext.js.map +1 -0
- package/dist/src/contexts/KeypressContext.d.ts +47 -0
- package/dist/src/contexts/KeypressContext.d.ts.map +1 -0
- package/dist/src/contexts/KeypressContext.js +792 -0
- package/dist/src/contexts/KeypressContext.js.map +1 -0
- package/dist/src/contexts/ModelContext.d.ts +20 -0
- package/dist/src/contexts/ModelContext.d.ts.map +1 -0
- package/dist/src/contexts/ModelContext.js +42 -0
- package/dist/src/contexts/ModelContext.js.map +1 -0
- package/dist/src/contexts/PasteContext.d.ts +8 -0
- package/dist/src/contexts/PasteContext.d.ts.map +1 -0
- package/dist/src/contexts/PasteContext.js +12 -0
- package/dist/src/contexts/PasteContext.js.map +1 -0
- package/dist/src/contexts/SessionContext.d.ts +19 -0
- package/dist/src/contexts/SessionContext.d.ts.map +1 -0
- package/dist/src/contexts/SessionContext.js +56 -0
- package/dist/src/contexts/SessionContext.js.map +1 -0
- package/dist/src/contexts/UIContext.d.ts +15 -0
- package/dist/src/contexts/UIContext.d.ts.map +1 -0
- package/dist/src/contexts/UIContext.js +16 -0
- package/dist/src/contexts/UIContext.js.map +1 -0
- package/dist/src/hooks/useChat.d.ts +11 -0
- package/dist/src/hooks/useChat.d.ts.map +1 -0
- package/dist/src/hooks/useChat.js +146 -0
- package/dist/src/hooks/useChat.js.map +1 -0
- package/dist/src/hooks/useFileCompletion.d.ts +8 -0
- package/dist/src/hooks/useFileCompletion.d.ts.map +1 -0
- package/dist/src/hooks/useFileCompletion.js +75 -0
- package/dist/src/hooks/useFileCompletion.js.map +1 -0
- package/dist/src/hooks/useInputHistory.d.ts +6 -0
- package/dist/src/hooks/useInputHistory.d.ts.map +1 -0
- package/dist/src/hooks/useInputHistory.js +46 -0
- package/dist/src/hooks/useInputHistory.js.map +1 -0
- package/dist/src/hooks/useKeypress.d.ts +16 -0
- package/dist/src/hooks/useKeypress.d.ts.map +1 -0
- package/dist/src/hooks/useKeypress.js +23 -0
- package/dist/src/hooks/useKeypress.js.map +1 -0
- package/dist/src/hooks/useLoadingIndicator.d.ts +5 -0
- package/dist/src/hooks/useLoadingIndicator.d.ts.map +1 -0
- package/dist/src/hooks/useLoadingIndicator.js +31 -0
- package/dist/src/hooks/useLoadingIndicator.js.map +1 -0
- package/dist/src/hooks/useMultiLineInput.d.ts +37 -0
- package/dist/src/hooks/useMultiLineInput.d.ts.map +1 -0
- package/dist/src/hooks/useMultiLineInput.js +202 -0
- package/dist/src/hooks/useMultiLineInput.js.map +1 -0
- package/dist/src/hooks/usePasteBuffer.d.ts +10 -0
- package/dist/src/hooks/usePasteBuffer.d.ts.map +1 -0
- package/dist/src/hooks/usePasteBuffer.js +90 -0
- package/dist/src/hooks/usePasteBuffer.js.map +1 -0
- package/dist/src/hooks/useSlashCommand.d.ts +6 -0
- package/dist/src/hooks/useSlashCommand.d.ts.map +1 -0
- package/dist/src/hooks/useSlashCommand.js +198 -0
- package/dist/src/hooks/useSlashCommand.js.map +1 -0
- package/dist/src/hooks/useStdinInterceptor.d.ts +2 -0
- package/dist/src/hooks/useStdinInterceptor.d.ts.map +1 -0
- package/dist/src/hooks/useStdinInterceptor.js +85 -0
- package/dist/src/hooks/useStdinInterceptor.js.map +1 -0
- package/dist/src/hooks/useSymbolCompletion.d.ts +10 -0
- package/dist/src/hooks/useSymbolCompletion.d.ts.map +1 -0
- package/dist/src/hooks/useSymbolCompletion.js +65 -0
- package/dist/src/hooks/useSymbolCompletion.js.map +1 -0
- package/dist/src/hooks/useTextBuffer.d.ts +37 -0
- package/dist/src/hooks/useTextBuffer.d.ts.map +1 -0
- package/dist/src/hooks/useTextBuffer.js +627 -0
- package/dist/src/hooks/useTextBuffer.js.map +1 -0
- package/dist/src/main.d.ts +2 -0
- package/dist/src/main.d.ts.map +1 -0
- package/dist/src/main.js +152 -0
- package/dist/src/main.js.map +1 -0
- package/dist/src/tools/code-analyzer/config/ignore-service.d.ts +2 -0
- package/dist/src/tools/code-analyzer/config/ignore-service.d.ts.map +1 -0
- package/dist/src/tools/code-analyzer/config/ignore-service.js +209 -0
- package/dist/src/tools/code-analyzer/config/ignore-service.js.map +1 -0
- package/dist/src/tools/code-analyzer/config/supported-languages.d.ts +13 -0
- package/dist/src/tools/code-analyzer/config/supported-languages.d.ts.map +1 -0
- package/dist/src/tools/code-analyzer/config/supported-languages.js +17 -0
- package/dist/src/tools/code-analyzer/config/supported-languages.js.map +1 -0
- package/dist/src/tools/code-analyzer/core/graph/graph.d.ts +3 -0
- package/dist/src/tools/code-analyzer/core/graph/graph.d.ts.map +1 -0
- package/dist/src/tools/code-analyzer/core/graph/graph.js +67 -0
- package/dist/src/tools/code-analyzer/core/graph/graph.js.map +1 -0
- package/dist/src/tools/code-analyzer/core/graph/types.d.ts +62 -0
- package/dist/src/tools/code-analyzer/core/graph/types.d.ts.map +1 -0
- package/dist/src/tools/code-analyzer/core/graph/types.js +2 -0
- package/dist/src/tools/code-analyzer/core/graph/types.js.map +1 -0
- package/dist/src/tools/code-analyzer/core/ingestion/ast-cache.d.ts +12 -0
- package/dist/src/tools/code-analyzer/core/ingestion/ast-cache.d.ts.map +1 -0
- package/dist/src/tools/code-analyzer/core/ingestion/ast-cache.js +35 -0
- package/dist/src/tools/code-analyzer/core/ingestion/ast-cache.js.map +1 -0
- package/dist/src/tools/code-analyzer/core/ingestion/call-processor.d.ts +16 -0
- package/dist/src/tools/code-analyzer/core/ingestion/call-processor.d.ts.map +1 -0
- package/dist/src/tools/code-analyzer/core/ingestion/call-processor.js +328 -0
- package/dist/src/tools/code-analyzer/core/ingestion/call-processor.js.map +1 -0
- package/dist/src/tools/code-analyzer/core/ingestion/community-processor.d.ts +40 -0
- package/dist/src/tools/code-analyzer/core/ingestion/community-processor.d.ts.map +1 -0
- package/dist/src/tools/code-analyzer/core/ingestion/community-processor.js +328 -0
- package/dist/src/tools/code-analyzer/core/ingestion/community-processor.js.map +1 -0
- package/dist/src/tools/code-analyzer/core/ingestion/entry-point-scoring.d.ts +40 -0
- package/dist/src/tools/code-analyzer/core/ingestion/entry-point-scoring.d.ts.map +1 -0
- package/dist/src/tools/code-analyzer/core/ingestion/entry-point-scoring.js +236 -0
- package/dist/src/tools/code-analyzer/core/ingestion/entry-point-scoring.js.map +1 -0
- package/dist/src/tools/code-analyzer/core/ingestion/filesystem-walker.d.ts +29 -0
- package/dist/src/tools/code-analyzer/core/ingestion/filesystem-walker.d.ts.map +1 -0
- package/dist/src/tools/code-analyzer/core/ingestion/filesystem-walker.js +81 -0
- package/dist/src/tools/code-analyzer/core/ingestion/filesystem-walker.js.map +1 -0
- package/dist/src/tools/code-analyzer/core/ingestion/framework-detection.d.ts +39 -0
- package/dist/src/tools/code-analyzer/core/ingestion/framework-detection.d.ts.map +1 -0
- package/dist/src/tools/code-analyzer/core/ingestion/framework-detection.js +184 -0
- package/dist/src/tools/code-analyzer/core/ingestion/framework-detection.js.map +1 -0
- package/dist/src/tools/code-analyzer/core/ingestion/heritage-processor.d.ts +21 -0
- package/dist/src/tools/code-analyzer/core/ingestion/heritage-processor.d.ts.map +1 -0
- package/dist/src/tools/code-analyzer/core/ingestion/heritage-processor.js +198 -0
- package/dist/src/tools/code-analyzer/core/ingestion/heritage-processor.js.map +1 -0
- package/dist/src/tools/code-analyzer/core/ingestion/import-processor.d.ts +39 -0
- package/dist/src/tools/code-analyzer/core/ingestion/import-processor.d.ts.map +1 -0
- package/dist/src/tools/code-analyzer/core/ingestion/import-processor.js +791 -0
- package/dist/src/tools/code-analyzer/core/ingestion/import-processor.js.map +1 -0
- package/dist/src/tools/code-analyzer/core/ingestion/parsing-processor.d.ts +16 -0
- package/dist/src/tools/code-analyzer/core/ingestion/parsing-processor.d.ts.map +1 -0
- package/dist/src/tools/code-analyzer/core/ingestion/parsing-processor.js +296 -0
- package/dist/src/tools/code-analyzer/core/ingestion/parsing-processor.js.map +1 -0
- package/dist/src/tools/code-analyzer/core/ingestion/pipeline.d.ts +3 -0
- package/dist/src/tools/code-analyzer/core/ingestion/pipeline.d.ts.map +1 -0
- package/dist/src/tools/code-analyzer/core/ingestion/pipeline.js +309 -0
- package/dist/src/tools/code-analyzer/core/ingestion/pipeline.js.map +1 -0
- package/dist/src/tools/code-analyzer/core/ingestion/process-processor.d.ts +52 -0
- package/dist/src/tools/code-analyzer/core/ingestion/process-processor.d.ts.map +1 -0
- package/dist/src/tools/code-analyzer/core/ingestion/process-processor.js +310 -0
- package/dist/src/tools/code-analyzer/core/ingestion/process-processor.js.map +1 -0
- package/dist/src/tools/code-analyzer/core/ingestion/structure-processor.d.ts +3 -0
- package/dist/src/tools/code-analyzer/core/ingestion/structure-processor.d.ts.map +1 -0
- package/dist/src/tools/code-analyzer/core/ingestion/structure-processor.js +37 -0
- package/dist/src/tools/code-analyzer/core/ingestion/structure-processor.js.map +1 -0
- package/dist/src/tools/code-analyzer/core/ingestion/symbol-table.d.ts +34 -0
- package/dist/src/tools/code-analyzer/core/ingestion/symbol-table.d.ts.map +1 -0
- package/dist/src/tools/code-analyzer/core/ingestion/symbol-table.js +39 -0
- package/dist/src/tools/code-analyzer/core/ingestion/symbol-table.js.map +1 -0
- package/dist/src/tools/code-analyzer/core/ingestion/tree-sitter-queries.d.ts +13 -0
- package/dist/src/tools/code-analyzer/core/ingestion/tree-sitter-queries.d.ts.map +1 -0
- package/dist/src/tools/code-analyzer/core/ingestion/tree-sitter-queries.js +355 -0
- package/dist/src/tools/code-analyzer/core/ingestion/tree-sitter-queries.js.map +1 -0
- package/dist/src/tools/code-analyzer/core/ingestion/utils.d.ts +11 -0
- package/dist/src/tools/code-analyzer/core/ingestion/utils.d.ts.map +1 -0
- package/dist/src/tools/code-analyzer/core/ingestion/utils.js +48 -0
- package/dist/src/tools/code-analyzer/core/ingestion/utils.js.map +1 -0
- package/dist/src/tools/code-analyzer/core/ingestion/workers/parse-worker.d.ts +59 -0
- package/dist/src/tools/code-analyzer/core/ingestion/workers/parse-worker.d.ts.map +1 -0
- package/dist/src/tools/code-analyzer/core/ingestion/workers/parse-worker.js +538 -0
- package/dist/src/tools/code-analyzer/core/ingestion/workers/parse-worker.js.map +1 -0
- package/dist/src/tools/code-analyzer/core/ingestion/workers/worker-pool.d.ts +17 -0
- package/dist/src/tools/code-analyzer/core/ingestion/workers/worker-pool.d.ts.map +1 -0
- package/dist/src/tools/code-analyzer/core/ingestion/workers/worker-pool.js +121 -0
- package/dist/src/tools/code-analyzer/core/ingestion/workers/worker-pool.js.map +1 -0
- package/dist/src/tools/code-analyzer/core/tree-sitter/parser-loader.d.ts +5 -0
- package/dist/src/tools/code-analyzer/core/tree-sitter/parser-loader.d.ts.map +1 -0
- package/dist/src/tools/code-analyzer/core/tree-sitter/parser-loader.js +45 -0
- package/dist/src/tools/code-analyzer/core/tree-sitter/parser-loader.js.map +1 -0
- package/dist/src/tools/code-analyzer/index.d.ts +17 -0
- package/dist/src/tools/code-analyzer/index.d.ts.map +1 -0
- package/dist/src/tools/code-analyzer/index.js +15 -0
- package/dist/src/tools/code-analyzer/index.js.map +1 -0
- package/dist/src/tools/code-analyzer/lib/utils.d.ts +2 -0
- package/dist/src/tools/code-analyzer/lib/utils.d.ts.map +1 -0
- package/dist/src/tools/code-analyzer/lib/utils.js +4 -0
- package/dist/src/tools/code-analyzer/lib/utils.js.map +1 -0
- package/dist/src/tools/code-analyzer/types/pipeline.d.ts +33 -0
- package/dist/src/tools/code-analyzer/types/pipeline.d.ts.map +1 -0
- package/dist/src/tools/code-analyzer/types/pipeline.js +19 -0
- package/dist/src/tools/code-analyzer/types/pipeline.js.map +1 -0
- package/dist/src/types/api.d.ts +124 -0
- package/dist/src/types/api.d.ts.map +1 -0
- package/dist/src/types/api.js +3 -0
- package/dist/src/types/api.js.map +1 -0
- package/dist/src/types/history.d.ts +49 -0
- package/dist/src/types/history.d.ts.map +1 -0
- package/dist/src/types/history.js +10 -0
- package/dist/src/types/history.js.map +1 -0
- package/dist/src/utils/colors.d.ts +40 -0
- package/dist/src/utils/colors.d.ts.map +1 -0
- package/dist/src/utils/colors.js +48 -0
- package/dist/src/utils/colors.js.map +1 -0
- package/dist/src/utils/config.d.ts +13 -0
- package/dist/src/utils/config.d.ts.map +1 -0
- package/dist/src/utils/config.js +74 -0
- package/dist/src/utils/config.js.map +1 -0
- package/dist/src/utils/constants.d.ts +8 -0
- package/dist/src/utils/constants.d.ts.map +1 -0
- package/dist/src/utils/constants.js +48 -0
- package/dist/src/utils/constants.js.map +1 -0
- package/dist/src/utils/fileRef.d.ts +26 -0
- package/dist/src/utils/fileRef.d.ts.map +1 -0
- package/dist/src/utils/fileRef.js +305 -0
- package/dist/src/utils/fileRef.js.map +1 -0
- package/dist/src/utils/formatters.d.ts +4 -0
- package/dist/src/utils/formatters.d.ts.map +1 -0
- package/dist/src/utils/formatters.js +18 -0
- package/dist/src/utils/formatters.js.map +1 -0
- package/dist/src/utils/pasteTransform.d.ts +37 -0
- package/dist/src/utils/pasteTransform.d.ts.map +1 -0
- package/dist/src/utils/pasteTransform.js +161 -0
- package/dist/src/utils/pasteTransform.js.map +1 -0
- package/dist/src/utils/pasteUtils.d.ts +7 -0
- package/dist/src/utils/pasteUtils.d.ts.map +1 -0
- package/dist/src/utils/pasteUtils.js +33 -0
- package/dist/src/utils/pasteUtils.js.map +1 -0
- package/dist/src/utils/textUtils.d.ts +25 -0
- package/dist/src/utils/textUtils.d.ts.map +1 -0
- package/dist/src/utils/textUtils.js +107 -0
- package/dist/src/utils/textUtils.js.map +1 -0
- package/package.json +71 -0
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Box, Text } from 'ink';
|
|
3
|
+
import { palette } from '../utils/colors.js';
|
|
4
|
+
export const MAX_SUGGESTIONS_TO_SHOW = 6;
|
|
5
|
+
export const SuggestionsDisplay = ({ suggestions, activeIndex, width, }) => {
|
|
6
|
+
if (suggestions.length === 0)
|
|
7
|
+
return null;
|
|
8
|
+
const visibleCount = Math.min(suggestions.length, MAX_SUGGESTIONS_TO_SHOW);
|
|
9
|
+
// Scroll window so active item is always visible
|
|
10
|
+
let startIndex = 0;
|
|
11
|
+
if (activeIndex >= visibleCount) {
|
|
12
|
+
startIndex = activeIndex - visibleCount + 1;
|
|
13
|
+
}
|
|
14
|
+
const endIndex = startIndex + visibleCount;
|
|
15
|
+
const visibleSuggestions = suggestions.slice(startIndex, endIndex);
|
|
16
|
+
// Calculate column width for names
|
|
17
|
+
const maxNameLen = Math.max(...suggestions.map((s) => (s.prefix + s.name).length));
|
|
18
|
+
const nameColWidth = Math.min(maxNameLen + 2, Math.floor(width * 0.5));
|
|
19
|
+
return (_jsxs(Box, { flexDirection: "column", paddingX: 1, children: [startIndex > 0 && _jsx(Text, { color: palette.textDim, children: ' ▲' }), visibleSuggestions.map((item, index) => {
|
|
20
|
+
const originalIndex = startIndex + index;
|
|
21
|
+
const isActive = originalIndex === activeIndex;
|
|
22
|
+
const nameColor = isActive ? palette.accent : palette.textMuted;
|
|
23
|
+
const descColor = isActive ? palette.text : palette.textDim;
|
|
24
|
+
// Truncate description to fit
|
|
25
|
+
const displayName = (item.icon ? item.icon + ' ' : '') + item.prefix + item.name;
|
|
26
|
+
const descMaxLen = Math.max(0, width - nameColWidth - 6);
|
|
27
|
+
let desc = item.description || '';
|
|
28
|
+
if (desc.length > descMaxLen) {
|
|
29
|
+
desc = desc.slice(0, descMaxLen - 1) + '…';
|
|
30
|
+
}
|
|
31
|
+
return (_jsxs(Box, { flexDirection: "row", children: [_jsx(Text, { color: isActive ? palette.accent : palette.textDim, children: isActive ? '▸ ' : ' ' }), _jsx(Box, { width: nameColWidth, children: _jsx(Text, { color: nameColor, bold: isActive, children: displayName }) }), _jsx(Text, { color: descColor, children: desc })] }, `${item.prefix}${item.name}:${originalIndex}`));
|
|
32
|
+
}), endIndex < suggestions.length && (_jsx(Text, { color: palette.textDim, children: ' ▼' })), suggestions.length > MAX_SUGGESTIONS_TO_SHOW && (_jsxs(Text, { color: palette.textDim, children: [' ', "(", activeIndex + 1, "/", suggestions.length, ")"] }))] }));
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=SuggestionsDisplay.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SuggestionsDisplay.js","sourceRoot":"","sources":["../../../src/components/SuggestionsDisplay.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAE7C,MAAM,CAAC,MAAM,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I,CAAC,MAAM,GAAG,IAAI,CAAC,IAAI,IAAI,aAAa,EAAE,CAUjD,CACP,CAAC;YACJ,CAAC,CAAC,EACD,QAAQ,GAAG,WAAW,CAAC,MAAM,IAAI,CAChC,KAAC,IAAI,IAAC,KAAK,EAAE,OAAO,CAAC,OAAO,YAAG,KAAK,GAAQ,CAC7C,EACA,WAAW,CAAC,MAAM,GAAG,uBAAuB,IAAI,CAC/C,MAAC,IAAI,IAAC,KAAK,EAAE,OAAO,CAAC,OAAO,aACzB,IAAI,OAAG,WAAW,GAAG,CAAC,OAAG,WAAW,CAAC,MAAM,SACvC,CACR,IACG,CACP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AssistantMessage.d.ts","sourceRoot":"","sources":["../../../../src/components/messages/AssistantMessage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,UAAU,qBAAqB;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CAsB5D,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Box, Text } from 'ink';
|
|
3
|
+
import { MarkdownRenderer } from '../shared/MarkdownRenderer.js';
|
|
4
|
+
import { Spinner } from '../shared/Spinner.js';
|
|
5
|
+
import { palette } from '../../utils/colors.js';
|
|
6
|
+
export const AssistantMessage = ({ text, isPending, }) => {
|
|
7
|
+
return (_jsx(Box, { flexDirection: "column", marginBottom: 1, paddingLeft: 1, children: _jsxs(Box, { children: [_jsx(Text, { color: palette.accent, children: "\u2503 " }), _jsx(Text, { color: palette.accent, bold: true, children: "\u2726 " }), _jsxs(Box, { flexDirection: "column", flexGrow: 1, children: [text ? (_jsx(MarkdownRenderer, { text: text })) : isPending ? (_jsx(Spinner, { color: palette.accent })) : null, isPending && text && (_jsx(Text, { color: palette.accent, children: "\u2588" }))] })] }) }));
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=AssistantMessage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AssistantMessage.js","sourceRoot":"","sources":["../../../../src/components/messages/AssistantMessage.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAOhD,MAAM,CAAC,MAAM,gBAAgB,GAAoC,CAAC,EAChE,IAAI,EACJ,SAAS,GACV,EAAE,EAAE;IACH,OAAO,CACL,KAAC,GAAG,IAAC,aAAa,EAAC,QAAQ,EAAC,YAAY,EAAE,CAAC,EAAE,WAAW,EAAE,CAAC,YACzD,MAAC,GAAG,eACF,KAAC,IAAI,IAAC,KAAK,EAAE,OAAO,CAAC,MAAM,wBAAW,EACtC,KAAC,IAAI,IAAC,KAAK,EAAE,OAAO,CAAC,MAAM,EAAE,IAAI,8BAAU,EAC3C,MAAC,GAAG,IAAC,aAAa,EAAC,QAAQ,EAAC,QAAQ,EAAE,CAAC,aACpC,IAAI,CAAC,CAAC,CAAC,CACN,KAAC,gBAAgB,IAAC,IAAI,EAAE,IAAI,GAAI,CACjC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CACd,KAAC,OAAO,IAAC,KAAK,EAAE,OAAO,CAAC,MAAM,GAAI,CACnC,CAAC,CAAC,CAAC,IAAI,EACP,SAAS,IAAI,IAAI,IAAI,CACpB,KAAC,IAAI,IAAC,KAAK,EAAE,OAAO,CAAC,MAAM,uBAAU,CACtC,IACG,IACF,GACF,CACP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CommandResult.d.ts","sourceRoot":"","sources":["../../../../src/components/messages/CommandResult.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,UAAU,kBAAkB;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAQtD,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Box } from 'ink';
|
|
3
|
+
import { MarkdownRenderer } from '../shared/MarkdownRenderer.js';
|
|
4
|
+
export const CommandResult = ({ result, }) => {
|
|
5
|
+
return (_jsx(Box, { flexDirection: "column", marginBottom: 1, paddingLeft: 1, children: _jsx(MarkdownRenderer, { text: result }) }));
|
|
6
|
+
};
|
|
7
|
+
//# sourceMappingURL=CommandResult.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CommandResult.js","sourceRoot":"","sources":["../../../../src/components/messages/CommandResult.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,GAAG,EAAQ,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAOjE,MAAM,CAAC,MAAM,aAAa,GAAiC,CAAC,EAC1D,MAAM,GACP,EAAE,EAAE;IACH,OAAO,CACL,KAAC,GAAG,IAAC,aAAa,EAAC,QAAQ,EAAC,YAAY,EAAE,CAAC,EAAE,WAAW,EAAE,CAAC,YACzD,KAAC,gBAAgB,IAAC,IAAI,EAAE,MAAM,GAAI,GAC9B,CACP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ErrorMessage.d.ts","sourceRoot":"","sources":["../../../../src/components/messages/ErrorMessage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,UAAU,iBAAiB;IACzB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAOpD,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Box, Text } from 'ink';
|
|
3
|
+
import { palette } from '../../utils/colors.js';
|
|
4
|
+
export const ErrorMessage = ({ text }) => {
|
|
5
|
+
return (_jsxs(Box, { marginBottom: 1, paddingLeft: 1, children: [_jsx(Text, { color: palette.error, bold: true, children: '✗ ' }), _jsx(Text, { color: palette.error, children: text })] }));
|
|
6
|
+
};
|
|
7
|
+
//# sourceMappingURL=ErrorMessage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ErrorMessage.js","sourceRoot":"","sources":["../../../../src/components/messages/ErrorMessage.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAMhD,MAAM,CAAC,MAAM,YAAY,GAAgC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE;IACpE,OAAO,CACL,MAAC,GAAG,IAAC,YAAY,EAAE,CAAC,EAAE,WAAW,EAAE,CAAC,aAClC,KAAC,IAAI,IAAC,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,IAAI,kBAAE,IAAI,GAAQ,EAC9C,KAAC,IAAI,IAAC,KAAK,EAAE,OAAO,CAAC,KAAK,YAAG,IAAI,GAAQ,IACrC,CACP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InfoMessage.d.ts","sourceRoot":"","sources":["../../../../src/components/messages/InfoMessage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,UAAU,gBAAgB;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAYlD,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Box, Text } from 'ink';
|
|
3
|
+
import { palette } from '../../utils/colors.js';
|
|
4
|
+
export const InfoMessage = ({ text, icon = 'ℹ', color, }) => {
|
|
5
|
+
const c = color ?? palette.info;
|
|
6
|
+
return (_jsxs(Box, { marginBottom: 1, paddingLeft: 1, children: [_jsxs(Text, { color: c, bold: true, children: [icon, " "] }), _jsx(Text, { color: palette.textMuted, children: text })] }));
|
|
7
|
+
};
|
|
8
|
+
//# sourceMappingURL=InfoMessage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InfoMessage.js","sourceRoot":"","sources":["../../../../src/components/messages/InfoMessage.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAQhD,MAAM,CAAC,MAAM,WAAW,GAA+B,CAAC,EACtD,IAAI,EACJ,IAAI,GAAG,GAAG,EACV,KAAK,GACN,EAAE,EAAE;IACH,MAAM,CAAC,GAAG,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAChC,OAAO,CACL,MAAC,GAAG,IAAC,YAAY,EAAE,CAAC,EAAE,WAAW,EAAE,CAAC,aAClC,MAAC,IAAI,IAAC,KAAK,EAAE,CAAC,EAAE,IAAI,mBAAE,IAAI,SAAS,EACnC,KAAC,IAAI,IAAC,KAAK,EAAE,OAAO,CAAC,SAAS,YAAG,IAAI,GAAQ,IACzC,CACP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ModelMessage.d.ts","sourceRoot":"","sources":["../../../../src/components/messages/ModelMessage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,UAAU,iBAAiB;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAYpD,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Box, Text } from 'ink';
|
|
3
|
+
import { palette } from '../../utils/colors.js';
|
|
4
|
+
export const ModelMessage = ({ model, provider, }) => {
|
|
5
|
+
return (_jsxs(Box, { marginBottom: 1, paddingLeft: 1, children: [_jsx(Text, { color: palette.textDim, children: '─ ' }), _jsx(Text, { color: palette.textMuted, children: "Model switched to " }), _jsx(Text, { color: palette.warning, bold: true, children: model }), _jsxs(Text, { color: palette.textDim, children: [" (", provider, ")"] })] }));
|
|
6
|
+
};
|
|
7
|
+
//# sourceMappingURL=ModelMessage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ModelMessage.js","sourceRoot":"","sources":["../../../../src/components/messages/ModelMessage.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAOhD,MAAM,CAAC,MAAM,YAAY,GAAgC,CAAC,EACxD,KAAK,EACL,QAAQ,GACT,EAAE,EAAE;IACH,OAAO,CACL,MAAC,GAAG,IAAC,YAAY,EAAE,CAAC,EAAE,WAAW,EAAE,CAAC,aAClC,KAAC,IAAI,IAAC,KAAK,EAAE,OAAO,CAAC,OAAO,YAAG,IAAI,GAAQ,EAC3C,KAAC,IAAI,IAAC,KAAK,EAAE,OAAO,CAAC,SAAS,mCAA2B,EACzD,KAAC,IAAI,IAAC,KAAK,EAAE,OAAO,CAAC,OAAO,EAAE,IAAI,kBAAE,KAAK,GAAQ,EACjD,MAAC,IAAI,IAAC,KAAK,EAAE,OAAO,CAAC,OAAO,mBAAK,QAAQ,SAAS,IAC9C,CACP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SessionMessage.d.ts","sourceRoot":"","sources":["../../../../src/components/messages/SessionMessage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,UAAU,mBAAmB;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,SAAS,GAAG,UAAU,GAAG,SAAS,CAAC;CAC5C;AAQD,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAWxD,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Box, Text } from 'ink';
|
|
3
|
+
import { palette } from '../../utils/colors.js';
|
|
4
|
+
const actionLabels = {
|
|
5
|
+
created: 'New session created',
|
|
6
|
+
switched: 'Switched to session',
|
|
7
|
+
cleared: 'Session cleared',
|
|
8
|
+
};
|
|
9
|
+
export const SessionMessage = ({ title, action, }) => {
|
|
10
|
+
return (_jsxs(Box, { marginBottom: 1, paddingLeft: 1, children: [_jsx(Text, { color: palette.textDim, children: '─ ' }), _jsxs(Text, { color: palette.textMuted, children: [actionLabels[action], ": "] }), _jsx(Text, { color: palette.accent, bold: true, children: title })] }));
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=SessionMessage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SessionMessage.js","sourceRoot":"","sources":["../../../../src/components/messages/SessionMessage.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAOhD,MAAM,YAAY,GAA2B;IAC3C,OAAO,EAAE,qBAAqB;IAC9B,QAAQ,EAAE,qBAAqB;IAC/B,OAAO,EAAE,iBAAiB;CAC3B,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAkC,CAAC,EAC5D,KAAK,EACL,MAAM,GACP,EAAE,EAAE;IACH,OAAO,CACL,MAAC,GAAG,IAAC,YAAY,EAAE,CAAC,EAAE,WAAW,EAAE,CAAC,aAClC,KAAC,IAAI,IAAC,KAAK,EAAE,OAAO,CAAC,OAAO,YAAG,IAAI,GAAQ,EAC3C,MAAC,IAAI,IAAC,KAAK,EAAE,OAAO,CAAC,SAAS,aAAG,YAAY,CAAC,MAAM,CAAC,UAAU,EAC/D,KAAC,IAAI,IAAC,KAAK,EAAE,OAAO,CAAC,MAAM,EAAE,IAAI,kBAAE,KAAK,GAAQ,IAC5C,CACP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface ToolCallMessageProps {
|
|
3
|
+
name: string;
|
|
4
|
+
status: 'pending' | 'running' | 'success' | 'error';
|
|
5
|
+
result?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const ToolCallMessage: React.FC<ToolCallMessageProps>;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=ToolCallMessage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ToolCallMessage.d.ts","sourceRoot":"","sources":["../../../../src/components/messages/ToolCallMessage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,UAAU,oBAAoB;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;IACpD,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AASD,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAwB1D,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Box, Text } from 'ink';
|
|
3
|
+
import { palette } from '../../utils/colors.js';
|
|
4
|
+
const statusConfig = {
|
|
5
|
+
pending: { icon: '○', color: palette.textDim, label: 'pending' },
|
|
6
|
+
running: { icon: '◐', color: palette.warning, label: 'running' },
|
|
7
|
+
success: { icon: '✓', color: palette.success, label: 'done' },
|
|
8
|
+
error: { icon: '✗', color: palette.error, label: 'failed' },
|
|
9
|
+
};
|
|
10
|
+
export const ToolCallMessage = ({ name, status, result, }) => {
|
|
11
|
+
const config = statusConfig[status] ?? statusConfig.pending;
|
|
12
|
+
return (_jsxs(Box, { flexDirection: "column", marginBottom: 1, paddingLeft: 3, children: [_jsxs(Box, { children: [_jsx(Text, { color: palette.warning, children: "\u2699 " }), _jsx(Text, { color: palette.textMuted, children: name }), _jsx(Text, { color: palette.textDim, children: " \u2014 " }), _jsxs(Text, { color: config.color, children: [config.icon, " ", config.label] })] }), result && (_jsx(Box, { paddingLeft: 4, children: _jsx(Text, { color: palette.textDim, children: result }) }))] }));
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=ToolCallMessage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ToolCallMessage.js","sourceRoot":"","sources":["../../../../src/components/messages/ToolCallMessage.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAQhD,MAAM,YAAY,GAAmE;IACnF,O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 -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UserMessage.d.ts","sourceRoot":"","sources":["../../../../src/components/messages/UserMessage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,UAAU,gBAAgB;IACxB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAmBlD,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Box, Text } from 'ink';
|
|
3
|
+
import { palette } from '../../utils/colors.js';
|
|
4
|
+
export const UserMessage = ({ text }) => {
|
|
5
|
+
// Split text to highlight @path references
|
|
6
|
+
const parts = text.split(/(@[^\s,;!?()[\]{}]+)/g);
|
|
7
|
+
return (_jsxs(Box, { marginBottom: 1, paddingLeft: 1, children: [_jsx(Text, { color: palette.success, children: "\u2503 " }), _jsx(Text, { color: palette.success, bold: true, children: "\u276F " }), _jsx(Text, { children: parts.map((part, i) => part.startsWith('@') ? (_jsx(Text, { color: palette.accent, bold: true, children: part }, i)) : (_jsx(Text, { color: palette.text, children: part }, i))) })] }));
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=UserMessage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UserMessage.js","sourceRoot":"","sources":["../../../../src/components/messages/UserMessage.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAMhD,MAAM,CAAC,MAAM,WAAW,GAA+B,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE;IAClE,2CAA2C;IAC3C,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,uBAAuB,CAAC,CAAC;IAElD,OAAO,CACL,MAAC,GAAG,IAAC,YAAY,EAAE,CAAC,EAAE,WAAW,EAAE,CAAC,aAClC,KAAC,IAAI,IAAC,KAAK,EAAE,OAAO,CAAC,OAAO,wBAAW,EACvC,KAAC,IAAI,IAAC,KAAK,EAAE,OAAO,CAAC,OAAO,EAAE,IAAI,8BAAU,EAC5C,KAAC,IAAI,cACF,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CACrB,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CACrB,KAAC,IAAI,IAAS,KAAK,EAAE,OAAO,CAAC,MAAM,EAAE,IAAI,kBAAE,IAAI,IAApC,CAAC,CAA2C,CACxD,CAAC,CAAC,CAAC,CACF,KAAC,IAAI,IAAS,KAAK,EAAE,OAAO,CAAC,IAAI,YAAG,IAAI,IAA7B,CAAC,CAAoC,CACjD,CACF,GACI,IACH,CACP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface HorizontalLineProps {
|
|
3
|
+
width?: number;
|
|
4
|
+
char?: string;
|
|
5
|
+
color?: string;
|
|
6
|
+
dimColor?: boolean;
|
|
7
|
+
marginX?: number;
|
|
8
|
+
}
|
|
9
|
+
export declare const HorizontalLine: React.FC<HorizontalLineProps>;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=HorizontalLine.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HorizontalLine.d.ts","sourceRoot":"","sources":["../../../../src/components/shared/HorizontalLine.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,UAAU,mBAAmB;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAgBxD,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Text } from 'ink';
|
|
3
|
+
import { useUIState } from '../../contexts/UIContext.js';
|
|
4
|
+
export const HorizontalLine = ({ width, char = '─', color, dimColor, marginX = 0, }) => {
|
|
5
|
+
const { terminalWidth } = useUIState();
|
|
6
|
+
const effectiveWidth = width ?? (terminalWidth - marginX * 2);
|
|
7
|
+
const clamped = Math.max(1, Math.min(effectiveWidth, terminalWidth));
|
|
8
|
+
return (_jsx(Text, { color: color, dimColor: dimColor ?? !color, children: char.repeat(clamped) }));
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=HorizontalLine.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HorizontalLine.js","sourceRoot":"","sources":["../../../../src/components/shared/HorizontalLine.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAC3B,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAUzD,MAAM,CAAC,MAAM,cAAc,GAAkC,CAAC,EAC5D,KAAK,EACL,IAAI,GAAG,GAAG,EACV,KAAK,EACL,QAAQ,EACR,OAAO,GAAG,CAAC,GACZ,EAAE,EAAE;IACH,MAAM,EAAE,aAAa,EAAE,GAAG,UAAU,EAAE,CAAC;IACvC,MAAM,cAAc,GAAG,KAAK,IAAI,CAAC,aAAa,GAAG,OAAO,GAAG,CAAC,CAAC,CAAC;IAC9D,MAAM,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,cAAc,EAAE,aAAa,CAAC,CAAC,CAAC;IAErE,OAAO,CACL,KAAC,IAAI,IAAC,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,IAAI,CAAC,KAAK,YAC7C,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,GAChB,CACR,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MarkdownRenderer.d.ts","sourceRoot":"","sources":["../../../../src/components/shared/MarkdownRenderer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AA6B1B,UAAU,qBAAqB;IAC7B,IAAI,EAAE,MAAM,CAAC;CACd;AAED,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CAa5D,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Text } from 'ink';
|
|
3
|
+
import { Marked } from 'marked';
|
|
4
|
+
import { markedTerminal } from 'marked-terminal';
|
|
5
|
+
import { supportsLanguage } from 'cli-highlight';
|
|
6
|
+
// Suppress highlight.js warnings for unsupported languages by stripping
|
|
7
|
+
// the language hint before marked-terminal tries to highlight it.
|
|
8
|
+
const originalParse = Marked.prototype.parse;
|
|
9
|
+
const marked = new Marked(markedTerminal({
|
|
10
|
+
reflowText: true,
|
|
11
|
+
width: 80,
|
|
12
|
+
showSectionPrefix: false,
|
|
13
|
+
tab: 2,
|
|
14
|
+
}));
|
|
15
|
+
// Wrap parse to silence "Could not find the language" console.warn from highlight.js
|
|
16
|
+
function silentParse(src) {
|
|
17
|
+
// Replace ```<unsupported-lang> with ``` to avoid console.warn
|
|
18
|
+
const cleaned = src.replace(/^```(\w+)/gm, (_match, lang) => supportsLanguage(lang) ? '```' + lang : '```');
|
|
19
|
+
return originalParse.call(marked, cleaned);
|
|
20
|
+
}
|
|
21
|
+
export const MarkdownRenderer = ({ text, }) => {
|
|
22
|
+
if (!text)
|
|
23
|
+
return null;
|
|
24
|
+
let rendered;
|
|
25
|
+
try {
|
|
26
|
+
rendered = silentParse(text).trimEnd();
|
|
27
|
+
}
|
|
28
|
+
catch {
|
|
29
|
+
rendered = text;
|
|
30
|
+
}
|
|
31
|
+
return _jsx(Text, { children: rendered });
|
|
32
|
+
};
|
|
33
|
+
//# sourceMappingURL=MarkdownRenderer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MarkdownRenderer.js","sourceRoot":"","sources":["../../../../src/components/shared/MarkdownRenderer.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAC3B,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEjD,wEAAwE;AACxE,kEAAkE;AAClE,MAAM,aAAa,GAAG,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC;AAE7C,MAAM,MAAM,GAAG,IAAI,MAAM,CACvB,cAAc,CAAC;IACb,UAAU,EAAE,IAAI;IAChB,KAAK,EAAE,EAAE;IACT,iBAAiB,EAAE,KAAK;IACxB,GAAG,EAAE,CAAC;CACP,CAA4B,CAC9B,CAAC;AAEF,qFAAqF;AACrF,SAAS,WAAW,CAAC,GAAW;IAC9B,+DAA+D;IAC/D,MAAM,OAAO,GAAG,GAAG,CAAC,OAAO,CACzB,aAAa,EACb,CAAC,MAAM,EAAE,IAAY,EAAE,EAAE,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,GAAG,IAAI,CAAC,CAAC,CAAC,KAAK,CACxE,CAAC;IACF,OAAO,aAAa,CAAC,IAAI,CAAC,MAAM,EAAE,OAAO,CAAW,CAAC;AACvD,CAAC;AAMD,MAAM,CAAC,MAAM,gBAAgB,GAAoC,CAAC,EAChE,IAAI,GACL,EAAE,EAAE;IACH,IAAI,CAAC,IAAI;QAAE,OAAO,IAAI,CAAC;IAEvB,IAAI,QAAgB,CAAC;IACrB,IAAI,CAAC;QACH,QAAQ,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,CAAC;IACzC,CAAC;IAAC,MAAM,CAAC;QACP,QAAQ,GAAG,IAAI,CAAC;IAClB,CAAC;IAED,OAAO,KAAC,IAAI,cAAE,QAAQ,GAAQ,CAAC;AACjC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Spinner.d.ts","sourceRoot":"","sources":["../../../../src/components/shared/Spinner.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,UAAU,YAAY;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CAc1C,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import InkSpinner from 'ink-spinner';
|
|
3
|
+
import { Text, Box } from 'ink';
|
|
4
|
+
export const Spinner = ({ label, color = 'cyan', }) => {
|
|
5
|
+
return (_jsxs(Box, { children: [_jsx(Text, { color: color, children: _jsx(InkSpinner, { type: "dots" }) }), label && (_jsxs(Text, { dimColor: true, children: [" ", label] }))] }));
|
|
6
|
+
};
|
|
7
|
+
//# sourceMappingURL=Spinner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Spinner.js","sourceRoot":"","sources":["../../../../src/components/shared/Spinner.tsx"],"names":[],"mappings":";AACA,OAAO,UAAU,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAOhC,MAAM,CAAC,MAAM,OAAO,GAA2B,CAAC,EAC9C,KAAK,EACL,KAAK,GAAG,MAAM,GACf,EAAE,EAAE;IACH,OAAO,CACL,MAAC,GAAG,eACF,KAAC,IAAI,IAAC,KAAK,EAAE,KAAK,YAChB,KAAC,UAAU,IAAC,IAAI,EAAC,MAAM,GAAG,GACrB,EACN,KAAK,IAAI,CACR,MAAC,IAAI,IAAC,QAAQ,wBAAG,KAAK,IAAQ,CAC/B,IACG,CACP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { TextBuffer } from '../../hooks/useTextBuffer.js';
|
|
3
|
+
interface TextInputProps {
|
|
4
|
+
buffer: TextBuffer;
|
|
5
|
+
placeholder?: string;
|
|
6
|
+
isActive: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare const TextInput: React.FC<TextInputProps>;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=TextInput.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextInput.d.ts","sourceRoot":"","sources":["../../../../src/components/shared/TextInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAG/D,UAAU,cAAc;IACtB,MAAM,EAAE,UAAU,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,OAAO,CAAC;CACnB;AA8GD,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CAmD9C,CAAC"}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Box, Text } from 'ink';
|
|
3
|
+
import chalk from 'chalk';
|
|
4
|
+
import { cpSlice, cpLen } from '../../utils/textUtils.js';
|
|
5
|
+
import { PASTE_PLACEHOLDER_REGEX } from '../../utils/pasteUtils.js';
|
|
6
|
+
import { palette } from '../../utils/colors.js';
|
|
7
|
+
/**
|
|
8
|
+
* Split a line into segments, marking paste placeholders for accent rendering.
|
|
9
|
+
* Returns array of { text, isPaste } segments.
|
|
10
|
+
*/
|
|
11
|
+
function segmentLine(line) {
|
|
12
|
+
const segments = [];
|
|
13
|
+
// Reset regex lastIndex since it uses the global flag
|
|
14
|
+
const regex = new RegExp(PASTE_PLACEHOLDER_REGEX.source, 'g');
|
|
15
|
+
let lastIndex = 0;
|
|
16
|
+
let match;
|
|
17
|
+
while ((match = regex.exec(line)) !== null) {
|
|
18
|
+
if (match.index > lastIndex) {
|
|
19
|
+
segments.push({ text: line.slice(lastIndex, match.index), isPaste: false });
|
|
20
|
+
}
|
|
21
|
+
segments.push({ text: match[0], isPaste: true });
|
|
22
|
+
lastIndex = regex.lastIndex;
|
|
23
|
+
}
|
|
24
|
+
if (lastIndex < line.length) {
|
|
25
|
+
segments.push({ text: line.slice(lastIndex), isPaste: false });
|
|
26
|
+
}
|
|
27
|
+
if (segments.length === 0) {
|
|
28
|
+
segments.push({ text: line, isPaste: false });
|
|
29
|
+
}
|
|
30
|
+
return segments;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Render a line with paste placeholders highlighted in accent color.
|
|
34
|
+
* If isCursorLine, the cursor is drawn as an inverted character at cursorCol.
|
|
35
|
+
*/
|
|
36
|
+
function renderLine(lineText, isCursorLine, cursorCol) {
|
|
37
|
+
if (!isCursorLine) {
|
|
38
|
+
// No cursor — just segment and colorize
|
|
39
|
+
const segments = segmentLine(lineText);
|
|
40
|
+
if (segments.length === 1 && !segments[0].isPaste) {
|
|
41
|
+
return lineText;
|
|
42
|
+
}
|
|
43
|
+
return segments.map((seg, i) => seg.isPaste
|
|
44
|
+
? _jsx(Text, { color: palette.accent, bold: true, children: seg.text }, i)
|
|
45
|
+
: _jsx(Text, { children: seg.text }, i));
|
|
46
|
+
}
|
|
47
|
+
// Cursor line: we need to split around the cursor position, then colorize each part.
|
|
48
|
+
// Strategy: build the full styled string with chalk (cursor = inverse char),
|
|
49
|
+
// then return it. But we also want paste placeholders in accent color.
|
|
50
|
+
//
|
|
51
|
+
// We split the line into three regions: before cursor, cursor char, after cursor.
|
|
52
|
+
// Within each region, we segment by paste placeholders.
|
|
53
|
+
const before = cpSlice(lineText, 0, cursorCol);
|
|
54
|
+
const cursorChar = cpSlice(lineText, cursorCol, cursorCol + 1) || ' ';
|
|
55
|
+
const after = cpSlice(lineText, cursorCol + 1);
|
|
56
|
+
const parts = [];
|
|
57
|
+
// Render "before" segments
|
|
58
|
+
for (const seg of segmentLine(before)) {
|
|
59
|
+
parts.push(seg.isPaste
|
|
60
|
+
? _jsx(Text, { color: palette.accent, bold: true, children: seg.text }, `b${parts.length}`)
|
|
61
|
+
: _jsx(Text, { children: seg.text }, `b${parts.length}`));
|
|
62
|
+
}
|
|
63
|
+
// Check if cursor is inside a paste placeholder by scanning matches on the full line
|
|
64
|
+
let cursorInPaste = false;
|
|
65
|
+
{
|
|
66
|
+
const regex = new RegExp(PASTE_PLACEHOLDER_REGEX.source, 'g');
|
|
67
|
+
let m;
|
|
68
|
+
while ((m = regex.exec(lineText)) !== null) {
|
|
69
|
+
const start = cpLen(lineText.slice(0, m.index));
|
|
70
|
+
const end = start + cpLen(m[0]);
|
|
71
|
+
if (cursorCol >= start && cursorCol < end) {
|
|
72
|
+
cursorInPaste = true;
|
|
73
|
+
break;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
// Render cursor char
|
|
78
|
+
if (cursorInPaste) {
|
|
79
|
+
parts.push(_jsx(Text, { color: palette.accent, bold: true, inverse: true, children: cursorChar }, "cursor"));
|
|
80
|
+
}
|
|
81
|
+
else {
|
|
82
|
+
parts.push(_jsx(Text, { inverse: true, children: cursorChar }, "cursor"));
|
|
83
|
+
}
|
|
84
|
+
// Render "after" segments
|
|
85
|
+
for (const seg of segmentLine(after)) {
|
|
86
|
+
parts.push(seg.isPaste
|
|
87
|
+
? _jsx(Text, { color: palette.accent, bold: true, children: seg.text }, `a${parts.length}`)
|
|
88
|
+
: _jsx(Text, { children: seg.text }, `a${parts.length}`));
|
|
89
|
+
}
|
|
90
|
+
return parts;
|
|
91
|
+
}
|
|
92
|
+
export const TextInput = ({ buffer, placeholder = 'Ask anything...', isActive, }) => {
|
|
93
|
+
const { viewportVisualLines, visualCursor } = buffer;
|
|
94
|
+
const [cursorRow, cursorCol] = visualCursor;
|
|
95
|
+
const showPlaceholder = buffer.text.length === 0;
|
|
96
|
+
if (showPlaceholder) {
|
|
97
|
+
return (_jsx(Box, { children: isActive ? (_jsxs(Text, { children: [chalk.inverse(placeholder[0] || ' '), _jsx(Text, { color: palette.textDim, children: placeholder.slice(1) })] })) : (_jsx(Text, { color: palette.textDim, children: placeholder })) }));
|
|
98
|
+
}
|
|
99
|
+
return (_jsx(Box, { flexDirection: "column", children: viewportVisualLines.map((lineText, idx) => {
|
|
100
|
+
const isCursorLine = isActive && idx === cursorRow;
|
|
101
|
+
// First line has no indent (follows ❯ prompt), subsequent lines indent 2 spaces
|
|
102
|
+
const indent = idx === 0 ? '' : ' ';
|
|
103
|
+
if (!lineText && isCursorLine) {
|
|
104
|
+
return (_jsx(Box, { height: 1, children: _jsxs(Text, { children: [indent, _jsx(Text, { inverse: true, children: ' ' })] }) }, idx));
|
|
105
|
+
}
|
|
106
|
+
const content = renderLine(lineText, isCursorLine, cursorCol);
|
|
107
|
+
return (_jsxs(Box, { height: 1, children: [_jsx(Text, { children: indent }), _jsx(Text, { children: content })] }, idx));
|
|
108
|
+
}) }));
|
|
109
|
+
};
|
|
110
|
+
//# sourceMappingURL=TextInput.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextInput.js","sourceRoot":"","sources":["../../../../src/components/shared/TextInput.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,0BAA0B,CA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AG,KAAK,SAAS,CAAC;YAEnD,gFAAgF;YAChF,MAAM,MAAM,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;YAErC,IAAI,CAAC,QAAQ,IAAI,YAAY,EAAE,CAAC;gBAC9B,OAAO,CACL,KAAC,GAAG,IAAW,MAAM,EAAE,CAAC,YACtB,MAAC,IAAI,eAAE,MAAM,EAAC,KAAC,IAAI,IAAC,OAAO,kBAAE,GAAG,GAAQ,IAAO,IADvC,GAAG,CAEP,CACP,CAAC;YACJ,CAAC;YAED,MAAM,OAAO,GAAG,UAAU,CAAC,QAAQ,EAAE,YAAY,EAAE,SAAS,CAAC,CAAC;YAE9D,OAAO,CACL,MAAC,GAAG,IAAW,MAAM,EAAE,CAAC,aACtB,KAAC,IAAI,cAAE,MAAM,GAAQ,EACrB,KAAC,IAAI,cAAE,OAAO,GAAQ,KAFd,GAAG,CAGP,CACP,CAAC;QACJ,CAAC,CAAC,GACE,CACP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { CommandDef, ToolInfo, HealthResponse } from '../types/api.js';
|
|
2
|
+
export interface AppState {
|
|
3
|
+
serverUrl: string;
|
|
4
|
+
token: string | null;
|
|
5
|
+
username: string | null;
|
|
6
|
+
authEnabled: boolean;
|
|
7
|
+
version: string;
|
|
8
|
+
healthData: HealthResponse | null;
|
|
9
|
+
availableCommands: CommandDef[];
|
|
10
|
+
availableTools: ToolInfo[];
|
|
11
|
+
}
|
|
12
|
+
export interface AppActions {
|
|
13
|
+
setToken: (token: string | null) => void;
|
|
14
|
+
setUsername: (username: string | null) => void;
|
|
15
|
+
logout: () => void;
|
|
16
|
+
}
|
|
17
|
+
export declare const AppStateContext: import("react").Context<AppState | null>;
|
|
18
|
+
export declare const AppActionsContext: import("react").Context<AppActions | null>;
|
|
19
|
+
export declare function useAppState(): AppState;
|
|
20
|
+
export declare function useAppActions(): AppActions;
|
|
21
|
+
//# sourceMappingURL=AppContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AppContext.d.ts","sourceRoot":"","sources":["../../../src/contexts/AppContext.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAE5E,MAAM,WAAW,QAAQ;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,WAAW,EAAE,OAAO,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,cAAc,GAAG,IAAI,CAAC;IAClC,iBAAiB,EAAE,UAAU,EAAE,CAAC;IAChC,cAAc,EAAE,QAAQ,EAAE,CAAC;CAC5B;AAED,MAAM,WAAW,UAAU;IACzB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IACzC,WAAW,EAAE,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IAC/C,MAAM,EAAE,MAAM,IAAI,CAAC;CACpB;AAED,eAAO,MAAM,eAAe,0CAAuC,CAAC;AACpE,eAAO,MAAM,iBAAiB,4CAAyC,CAAC;AAExE,wBAAgB,WAAW,IAAI,QAAQ,CAItC;AAED,wBAAgB,aAAa,IAAI,UAAU,CAK1C"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { createContext, useContext } from 'react';
|
|
2
|
+
export const AppStateContext = createContext(null);
|
|
3
|
+
export const AppActionsContext = createContext(null);
|
|
4
|
+
export function useAppState() {
|
|
5
|
+
const ctx = useContext(AppStateContext);
|
|
6
|
+
if (!ctx)
|
|
7
|
+
throw new Error('useAppState must be used within AppStateContext');
|
|
8
|
+
return ctx;
|
|
9
|
+
}
|
|
10
|
+
export function useAppActions() {
|
|
11
|
+
const ctx = useContext(AppActionsContext);
|
|
12
|
+
if (!ctx)
|
|
13
|
+
throw new Error('useAppActions must be used within AppActionsContext');
|
|
14
|
+
return ctx;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=AppContext.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AppContext.js","sourceRoot":"","sources":["../../../src/contexts/AppContext.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAoBlD,MAAM,CAAC,MAAM,eAAe,GAAG,aAAa,CAAkB,IAAI,CAAC,CAAC;AACpE,MAAM,CAAC,MAAM,iBAAiB,GAAG,aAAa,CAAoB,IAAI,CAAC,CAAC;AAExE,MAAM,UAAU,WAAW;IACzB,MAAM,GAAG,GAAG,UAAU,CAAC,eAAe,CAAC,CAAC;IACxC,IAAI,CAAC,GAAG;QAAE,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;IAC7E,OAAO,GAAG,CAAC;AACb,CAAC;AAED,MAAM,UAAU,aAAa;IAC3B,MAAM,GAAG,GAAG,UAAU,CAAC,iBAAiB,CAAC,CAAC;IAC1C,IAAI,CAAC,GAAG;QACN,MAAM,IAAI,KAAK,CAAC,qDAAqD,CAAC,CAAC;IACzE,OAAO,GAAG,CAAC;AACb,CAAC"}
|