orquesta-cli 0.1.13 → 0.1.14
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/README.md +30 -4
- package/dist/cli.js +65 -4
- package/dist/core/config/config-manager.d.ts +13 -1
- package/dist/core/config/config-manager.js +83 -0
- package/dist/core/slash-command-handler.d.ts +1 -0
- package/dist/core/slash-command-handler.js +129 -0
- package/dist/orquesta/config-sync.d.ts +73 -0
- package/dist/orquesta/config-sync.js +230 -0
- package/dist/orquesta/prompt-reporter.d.ts +16 -0
- package/dist/orquesta/prompt-reporter.js +85 -0
- package/dist/setup/first-run-setup.d.ts +15 -0
- package/dist/setup/first-run-setup.js +238 -0
- package/dist/types/index.d.ts +11 -2
- package/dist/ui/TodoPanel.d.ts +1 -0
- package/dist/ui/TodoPanel.js +6 -1
- package/dist/ui/components/LLMSetupWizard.js +373 -7
- package/dist/ui/components/Logo.d.ts +2 -0
- package/dist/ui/components/Logo.js +10 -3
- package/dist/ui/components/OpenRouterModelBrowser.d.ts +13 -0
- package/dist/ui/components/OpenRouterModelBrowser.js +221 -0
- package/dist/ui/components/PlanExecuteApp.js +30 -4
- package/dist/ui/components/ProjectSelector.d.ts +8 -0
- package/dist/ui/components/ProjectSelector.js +119 -0
- package/dist/ui/components/StatusBar.d.ts +2 -0
- package/dist/ui/components/StatusBar.js +6 -1
- package/dist/ui/hooks/slashCommandProcessor.js +8 -4
- package/package.json +11 -5
- package/.eslintrc.json +0 -26
- package/.prettierrc.json +0 -10
- package/CLAUDE.md +0 -199
- package/SECURITY.md +0 -290
- package/TEST_LOCAL.md +0 -245
- package/dist/agents/base/base-agent.d.ts.map +0 -1
- package/dist/agents/base/base-agent.js.map +0 -1
- package/dist/agents/docs-search/index.d.ts.map +0 -1
- package/dist/agents/docs-search/index.js.map +0 -1
- package/dist/agents/index.d.ts.map +0 -1
- package/dist/agents/index.js.map +0 -1
- package/dist/agents/planner/index.d.ts.map +0 -1
- package/dist/agents/planner/index.js.map +0 -1
- package/dist/cli.d.ts.map +0 -1
- package/dist/cli.js.map +0 -1
- package/dist/constants.d.ts.map +0 -1
- package/dist/constants.js.map +0 -1
- package/dist/core/compact/compact-manager.d.ts.map +0 -1
- package/dist/core/compact/compact-manager.js.map +0 -1
- package/dist/core/compact/compact-prompts.d.ts.map +0 -1
- package/dist/core/compact/compact-prompts.js.map +0 -1
- package/dist/core/compact/context-tracker.d.ts.map +0 -1
- package/dist/core/compact/context-tracker.js.map +0 -1
- package/dist/core/compact/index.d.ts.map +0 -1
- package/dist/core/compact/index.js.map +0 -1
- package/dist/core/config/config-manager.d.ts.map +0 -1
- package/dist/core/config/config-manager.js.map +0 -1
- package/dist/core/config/index.d.ts.map +0 -1
- package/dist/core/config/index.js.map +0 -1
- package/dist/core/docs-manager.d.ts.map +0 -1
- package/dist/core/docs-manager.js.map +0 -1
- package/dist/core/git-auto-updater.d.ts.map +0 -1
- package/dist/core/git-auto-updater.js.map +0 -1
- package/dist/core/llm/index.d.ts.map +0 -1
- package/dist/core/llm/index.js.map +0 -1
- package/dist/core/llm/llm-client.d.ts.map +0 -1
- package/dist/core/llm/llm-client.js.map +0 -1
- package/dist/core/session/index.d.ts.map +0 -1
- package/dist/core/session/index.js.map +0 -1
- package/dist/core/session/session-manager.d.ts.map +0 -1
- package/dist/core/session/session-manager.js.map +0 -1
- package/dist/core/slash-command-handler.d.ts.map +0 -1
- package/dist/core/slash-command-handler.js.map +0 -1
- package/dist/core/usage-tracker.d.ts.map +0 -1
- package/dist/core/usage-tracker.js.map +0 -1
- package/dist/errors/base.d.ts.map +0 -1
- package/dist/errors/base.js.map +0 -1
- package/dist/errors/file.d.ts.map +0 -1
- package/dist/errors/file.js.map +0 -1
- package/dist/errors/index.d.ts.map +0 -1
- package/dist/errors/index.js.map +0 -1
- package/dist/errors/llm.d.ts.map +0 -1
- package/dist/errors/llm.js.map +0 -1
- package/dist/errors/network.d.ts.map +0 -1
- package/dist/errors/network.js.map +0 -1
- package/dist/errors/validation.d.ts.map +0 -1
- package/dist/errors/validation.js.map +0 -1
- package/dist/eval/eval-runner.d.ts.map +0 -1
- package/dist/eval/eval-runner.js.map +0 -1
- package/dist/eval/index.d.ts.map +0 -1
- package/dist/eval/index.js.map +0 -1
- package/dist/eval/types.d.ts.map +0 -1
- package/dist/eval/types.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/orchestration/index.d.ts.map +0 -1
- package/dist/orchestration/index.js.map +0 -1
- package/dist/orchestration/plan-executor.d.ts.map +0 -1
- package/dist/orchestration/plan-executor.js.map +0 -1
- package/dist/orchestration/types.d.ts.map +0 -1
- package/dist/orchestration/types.js.map +0 -1
- package/dist/orchestration/utils.d.ts.map +0 -1
- package/dist/orchestration/utils.js.map +0 -1
- package/dist/orquesta/connection.d.ts.map +0 -1
- package/dist/orquesta/connection.js.map +0 -1
- package/dist/prompts/agents/docs-search-decision.d.ts.map +0 -1
- package/dist/prompts/agents/docs-search-decision.js.map +0 -1
- package/dist/prompts/agents/docs-search.d.ts.map +0 -1
- package/dist/prompts/agents/docs-search.js.map +0 -1
- package/dist/prompts/agents/planning.d.ts.map +0 -1
- package/dist/prompts/agents/planning.js.map +0 -1
- package/dist/prompts/index.d.ts.map +0 -1
- package/dist/prompts/index.js.map +0 -1
- package/dist/prompts/shared/codebase-rules.d.ts.map +0 -1
- package/dist/prompts/shared/codebase-rules.js.map +0 -1
- package/dist/prompts/shared/git-rules.d.ts.map +0 -1
- package/dist/prompts/shared/git-rules.js.map +0 -1
- package/dist/prompts/shared/language-rules.d.ts.map +0 -1
- package/dist/prompts/shared/language-rules.js.map +0 -1
- package/dist/prompts/shared/tool-usage.d.ts.map +0 -1
- package/dist/prompts/shared/tool-usage.js.map +0 -1
- package/dist/prompts/system/compact.d.ts.map +0 -1
- package/dist/prompts/system/compact.js.map +0 -1
- package/dist/prompts/system/plan-execute.d.ts.map +0 -1
- package/dist/prompts/system/plan-execute.js.map +0 -1
- package/dist/tools/browser/browser-client.d.ts.map +0 -1
- package/dist/tools/browser/browser-client.js.map +0 -1
- package/dist/tools/browser/browser-tools.d.ts.map +0 -1
- package/dist/tools/browser/browser-tools.js.map +0 -1
- package/dist/tools/browser/index.d.ts.map +0 -1
- package/dist/tools/browser/index.js.map +0 -1
- package/dist/tools/index.d.ts.map +0 -1
- package/dist/tools/index.js.map +0 -1
- package/dist/tools/llm/agents/docs-search-tools.d.ts.map +0 -1
- package/dist/tools/llm/agents/docs-search-tools.js.map +0 -1
- package/dist/tools/llm/agents/index.d.ts.map +0 -1
- package/dist/tools/llm/agents/index.js.map +0 -1
- package/dist/tools/llm/index.d.ts.map +0 -1
- package/dist/tools/llm/index.js.map +0 -1
- package/dist/tools/llm/simple/ask-user-tool.d.ts.map +0 -1
- package/dist/tools/llm/simple/ask-user-tool.js.map +0 -1
- package/dist/tools/llm/simple/background-bash-tool.d.ts.map +0 -1
- package/dist/tools/llm/simple/background-bash-tool.js.map +0 -1
- package/dist/tools/llm/simple/background-powershell-tool.d.ts.map +0 -1
- package/dist/tools/llm/simple/background-powershell-tool.js.map +0 -1
- package/dist/tools/llm/simple/bash-tool.d.ts.map +0 -1
- package/dist/tools/llm/simple/bash-tool.js.map +0 -1
- package/dist/tools/llm/simple/docs-search-agent-tool.d.ts.map +0 -1
- package/dist/tools/llm/simple/docs-search-agent-tool.js.map +0 -1
- package/dist/tools/llm/simple/file-tools.d.ts.map +0 -1
- package/dist/tools/llm/simple/file-tools.js.map +0 -1
- package/dist/tools/llm/simple/final-response-tool.d.ts.map +0 -1
- package/dist/tools/llm/simple/final-response-tool.js.map +0 -1
- package/dist/tools/llm/simple/index.d.ts.map +0 -1
- package/dist/tools/llm/simple/index.js.map +0 -1
- package/dist/tools/llm/simple/planning-tools.d.ts.map +0 -1
- package/dist/tools/llm/simple/planning-tools.js.map +0 -1
- package/dist/tools/llm/simple/powershell-tool.d.ts.map +0 -1
- package/dist/tools/llm/simple/powershell-tool.js.map +0 -1
- package/dist/tools/llm/simple/simple-tool-executor.d.ts.map +0 -1
- package/dist/tools/llm/simple/simple-tool-executor.js.map +0 -1
- package/dist/tools/llm/simple/todo-tools.d.ts.map +0 -1
- package/dist/tools/llm/simple/todo-tools.js.map +0 -1
- package/dist/tools/llm/simple/user-interaction-tools.d.ts.map +0 -1
- package/dist/tools/llm/simple/user-interaction-tools.js.map +0 -1
- package/dist/tools/office/common/constants.d.ts.map +0 -1
- package/dist/tools/office/common/constants.js.map +0 -1
- package/dist/tools/office/common/index.d.ts.map +0 -1
- package/dist/tools/office/common/index.js.map +0 -1
- package/dist/tools/office/common/types.d.ts.map +0 -1
- package/dist/tools/office/common/types.js.map +0 -1
- package/dist/tools/office/common/utils.d.ts.map +0 -1
- package/dist/tools/office/common/utils.js.map +0 -1
- package/dist/tools/office/excel-client.d.ts.map +0 -1
- package/dist/tools/office/excel-client.js.map +0 -1
- package/dist/tools/office/excel-tools/cells.d.ts.map +0 -1
- package/dist/tools/office/excel-tools/cells.js.map +0 -1
- package/dist/tools/office/excel-tools/charts.d.ts.map +0 -1
- package/dist/tools/office/excel-tools/charts.js.map +0 -1
- package/dist/tools/office/excel-tools/comments.d.ts.map +0 -1
- package/dist/tools/office/excel-tools/comments.js.map +0 -1
- package/dist/tools/office/excel-tools/data-ops.d.ts.map +0 -1
- package/dist/tools/office/excel-tools/data-ops.js.map +0 -1
- package/dist/tools/office/excel-tools/export.d.ts.map +0 -1
- package/dist/tools/office/excel-tools/export.js.map +0 -1
- package/dist/tools/office/excel-tools/formatting.d.ts.map +0 -1
- package/dist/tools/office/excel-tools/formatting.js.map +0 -1
- package/dist/tools/office/excel-tools/index.d.ts.map +0 -1
- package/dist/tools/office/excel-tools/index.js.map +0 -1
- package/dist/tools/office/excel-tools/launch.d.ts.map +0 -1
- package/dist/tools/office/excel-tools/launch.js.map +0 -1
- package/dist/tools/office/excel-tools/media.d.ts.map +0 -1
- package/dist/tools/office/excel-tools/media.js.map +0 -1
- package/dist/tools/office/excel-tools/named-ranges.d.ts.map +0 -1
- package/dist/tools/office/excel-tools/named-ranges.js.map +0 -1
- package/dist/tools/office/excel-tools/protection.d.ts.map +0 -1
- package/dist/tools/office/excel-tools/protection.js.map +0 -1
- package/dist/tools/office/excel-tools/rows-columns.d.ts.map +0 -1
- package/dist/tools/office/excel-tools/rows-columns.js.map +0 -1
- package/dist/tools/office/excel-tools/sheets.d.ts.map +0 -1
- package/dist/tools/office/excel-tools/sheets.js.map +0 -1
- package/dist/tools/office/excel-tools/validation.d.ts.map +0 -1
- package/dist/tools/office/excel-tools/validation.js.map +0 -1
- package/dist/tools/office/excel-tools.d.ts.map +0 -1
- package/dist/tools/office/excel-tools.js.map +0 -1
- package/dist/tools/office/index.d.ts.map +0 -1
- package/dist/tools/office/index.js.map +0 -1
- package/dist/tools/office/office-client-base.d.ts.map +0 -1
- package/dist/tools/office/office-client-base.js.map +0 -1
- package/dist/tools/office/office-client.d.ts.map +0 -1
- package/dist/tools/office/office-client.js.map +0 -1
- package/dist/tools/office/powerpoint-client.d.ts.map +0 -1
- package/dist/tools/office/powerpoint-client.js.map +0 -1
- package/dist/tools/office/powerpoint-tools/effects.d.ts.map +0 -1
- package/dist/tools/office/powerpoint-tools/effects.js.map +0 -1
- package/dist/tools/office/powerpoint-tools/export.d.ts.map +0 -1
- package/dist/tools/office/powerpoint-tools/export.js.map +0 -1
- package/dist/tools/office/powerpoint-tools/index.d.ts.map +0 -1
- package/dist/tools/office/powerpoint-tools/index.js.map +0 -1
- package/dist/tools/office/powerpoint-tools/launch.d.ts.map +0 -1
- package/dist/tools/office/powerpoint-tools/launch.js.map +0 -1
- package/dist/tools/office/powerpoint-tools/media.d.ts.map +0 -1
- package/dist/tools/office/powerpoint-tools/media.js.map +0 -1
- package/dist/tools/office/powerpoint-tools/notes.d.ts.map +0 -1
- package/dist/tools/office/powerpoint-tools/notes.js.map +0 -1
- package/dist/tools/office/powerpoint-tools/sections.d.ts.map +0 -1
- package/dist/tools/office/powerpoint-tools/sections.js.map +0 -1
- package/dist/tools/office/powerpoint-tools/shapes.d.ts.map +0 -1
- package/dist/tools/office/powerpoint-tools/shapes.js.map +0 -1
- package/dist/tools/office/powerpoint-tools/slides.d.ts.map +0 -1
- package/dist/tools/office/powerpoint-tools/slides.js.map +0 -1
- package/dist/tools/office/powerpoint-tools/tables.d.ts.map +0 -1
- package/dist/tools/office/powerpoint-tools/tables.js.map +0 -1
- package/dist/tools/office/powerpoint-tools/text.d.ts.map +0 -1
- package/dist/tools/office/powerpoint-tools/text.js.map +0 -1
- package/dist/tools/office/powerpoint-tools.d.ts.map +0 -1
- package/dist/tools/office/powerpoint-tools.js.map +0 -1
- package/dist/tools/office/word-client.d.ts.map +0 -1
- package/dist/tools/office/word-client.js.map +0 -1
- package/dist/tools/office/word-tools/bookmarks.d.ts.map +0 -1
- package/dist/tools/office/word-tools/bookmarks.js.map +0 -1
- package/dist/tools/office/word-tools/comments.d.ts.map +0 -1
- package/dist/tools/office/word-tools/comments.js.map +0 -1
- package/dist/tools/office/word-tools/content.d.ts.map +0 -1
- package/dist/tools/office/word-tools/content.js.map +0 -1
- package/dist/tools/office/word-tools/export.d.ts.map +0 -1
- package/dist/tools/office/word-tools/export.js.map +0 -1
- package/dist/tools/office/word-tools/formatting.d.ts.map +0 -1
- package/dist/tools/office/word-tools/formatting.js.map +0 -1
- package/dist/tools/office/word-tools/headers-footers.d.ts.map +0 -1
- package/dist/tools/office/word-tools/headers-footers.js.map +0 -1
- package/dist/tools/office/word-tools/index.d.ts.map +0 -1
- package/dist/tools/office/word-tools/index.js.map +0 -1
- package/dist/tools/office/word-tools/launch.d.ts.map +0 -1
- package/dist/tools/office/word-tools/launch.js.map +0 -1
- package/dist/tools/office/word-tools/lists.d.ts.map +0 -1
- package/dist/tools/office/word-tools/lists.js.map +0 -1
- package/dist/tools/office/word-tools/navigation.d.ts.map +0 -1
- package/dist/tools/office/word-tools/navigation.js.map +0 -1
- package/dist/tools/office/word-tools/page-setup.d.ts.map +0 -1
- package/dist/tools/office/word-tools/page-setup.js.map +0 -1
- package/dist/tools/office/word-tools/tables.d.ts.map +0 -1
- package/dist/tools/office/word-tools/tables.js.map +0 -1
- package/dist/tools/office/word-tools/text.d.ts.map +0 -1
- package/dist/tools/office/word-tools/text.js.map +0 -1
- package/dist/tools/office/word-tools/undo-redo.d.ts.map +0 -1
- package/dist/tools/office/word-tools/undo-redo.js.map +0 -1
- package/dist/tools/office/word-tools/watermarks.d.ts.map +0 -1
- package/dist/tools/office/word-tools/watermarks.js.map +0 -1
- package/dist/tools/office/word-tools.d.ts.map +0 -1
- package/dist/tools/office/word-tools.js.map +0 -1
- package/dist/tools/registry.d.ts.map +0 -1
- package/dist/tools/registry.js.map +0 -1
- package/dist/tools/types.d.ts.map +0 -1
- package/dist/tools/types.js.map +0 -1
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/index.js.map +0 -1
- package/dist/ui/PlanExecuteView.d.ts.map +0 -1
- package/dist/ui/PlanExecuteView.js.map +0 -1
- package/dist/ui/TodoPanel.d.ts.map +0 -1
- package/dist/ui/TodoPanel.js.map +0 -1
- package/dist/ui/UpdateNotification.d.ts.map +0 -1
- package/dist/ui/UpdateNotification.js.map +0 -1
- package/dist/ui/components/ActivityIndicator.d.ts.map +0 -1
- package/dist/ui/components/ActivityIndicator.js.map +0 -1
- package/dist/ui/components/CommandBrowser.d.ts.map +0 -1
- package/dist/ui/components/CommandBrowser.js.map +0 -1
- package/dist/ui/components/CustomTextInput.d.ts.map +0 -1
- package/dist/ui/components/CustomTextInput.js.map +0 -1
- package/dist/ui/components/DocsSearchProgress.d.ts.map +0 -1
- package/dist/ui/components/DocsSearchProgress.js.map +0 -1
- package/dist/ui/components/FileBrowser.d.ts.map +0 -1
- package/dist/ui/components/FileBrowser.js.map +0 -1
- package/dist/ui/components/LLMSetupWizard.d.ts.map +0 -1
- package/dist/ui/components/LLMSetupWizard.js.map +0 -1
- package/dist/ui/components/Logo.d.ts.map +0 -1
- package/dist/ui/components/Logo.js.map +0 -1
- package/dist/ui/components/MarkdownRenderer.d.ts.map +0 -1
- package/dist/ui/components/MarkdownRenderer.js.map +0 -1
- package/dist/ui/components/ModelSelector.d.ts.map +0 -1
- package/dist/ui/components/ModelSelector.js.map +0 -1
- package/dist/ui/components/PlanExecuteApp.d.ts.map +0 -1
- package/dist/ui/components/PlanExecuteApp.js.map +0 -1
- package/dist/ui/components/ProgressBar.d.ts.map +0 -1
- package/dist/ui/components/ProgressBar.js.map +0 -1
- package/dist/ui/components/StatusBar.d.ts.map +0 -1
- package/dist/ui/components/StatusBar.js.map +0 -1
- package/dist/ui/components/ThinkingIndicator.d.ts.map +0 -1
- package/dist/ui/components/ThinkingIndicator.js.map +0 -1
- package/dist/ui/components/TodoListView.d.ts.map +0 -1
- package/dist/ui/components/TodoListView.js.map +0 -1
- package/dist/ui/components/ToolSelector.d.ts.map +0 -1
- package/dist/ui/components/ToolSelector.js.map +0 -1
- package/dist/ui/components/dialogs/ApprovalDialog.d.ts.map +0 -1
- package/dist/ui/components/dialogs/ApprovalDialog.js.map +0 -1
- package/dist/ui/components/dialogs/AskUserDialog.d.ts.map +0 -1
- package/dist/ui/components/dialogs/AskUserDialog.js.map +0 -1
- package/dist/ui/components/dialogs/DocsBrowser.d.ts.map +0 -1
- package/dist/ui/components/dialogs/DocsBrowser.js.map +0 -1
- package/dist/ui/components/dialogs/SettingsDialog.d.ts.map +0 -1
- package/dist/ui/components/dialogs/SettingsDialog.js.map +0 -1
- package/dist/ui/components/dialogs/index.d.ts.map +0 -1
- package/dist/ui/components/dialogs/index.js.map +0 -1
- package/dist/ui/components/index.d.ts.map +0 -1
- package/dist/ui/components/index.js.map +0 -1
- package/dist/ui/components/panels/LogPanel.d.ts.map +0 -1
- package/dist/ui/components/panels/LogPanel.js.map +0 -1
- package/dist/ui/components/panels/SessionPanel.d.ts.map +0 -1
- package/dist/ui/components/panels/SessionPanel.js.map +0 -1
- package/dist/ui/components/panels/index.d.ts.map +0 -1
- package/dist/ui/components/panels/index.js.map +0 -1
- package/dist/ui/components/views/ChatView.d.ts.map +0 -1
- package/dist/ui/components/views/ChatView.js.map +0 -1
- package/dist/ui/components/views/index.d.ts.map +0 -1
- package/dist/ui/components/views/index.js.map +0 -1
- package/dist/ui/contexts/TokenContext.d.ts.map +0 -1
- package/dist/ui/contexts/TokenContext.js.map +0 -1
- package/dist/ui/hooks/atFileProcessor.d.ts.map +0 -1
- package/dist/ui/hooks/atFileProcessor.js.map +0 -1
- package/dist/ui/hooks/index.d.ts.map +0 -1
- package/dist/ui/hooks/index.js.map +0 -1
- package/dist/ui/hooks/slashCommandProcessor.d.ts.map +0 -1
- package/dist/ui/hooks/slashCommandProcessor.js.map +0 -1
- package/dist/ui/hooks/useCommandBrowserState.d.ts.map +0 -1
- package/dist/ui/hooks/useCommandBrowserState.js.map +0 -1
- package/dist/ui/hooks/useFileBrowserState.d.ts.map +0 -1
- package/dist/ui/hooks/useFileBrowserState.js.map +0 -1
- package/dist/ui/hooks/useFileList.d.ts.map +0 -1
- package/dist/ui/hooks/useFileList.js.map +0 -1
- package/dist/ui/hooks/useInputHistory.d.ts.map +0 -1
- package/dist/ui/hooks/useInputHistory.js.map +0 -1
- package/dist/ui/hooks/usePlanExecution.d.ts.map +0 -1
- package/dist/ui/hooks/usePlanExecution.js.map +0 -1
- package/dist/ui/index.d.ts.map +0 -1
- package/dist/ui/index.js.map +0 -1
- package/dist/ui/ink-entry.d.ts.map +0 -1
- package/dist/ui/ink-entry.js.map +0 -1
- package/dist/utils/env-filter.d.ts.map +0 -1
- package/dist/utils/env-filter.js.map +0 -1
- package/dist/utils/file-system.d.ts.map +0 -1
- package/dist/utils/file-system.js.map +0 -1
- package/dist/utils/git-utils.d.ts.map +0 -1
- package/dist/utils/git-utils.js.map +0 -1
- package/dist/utils/json-stream-logger.d.ts.map +0 -1
- package/dist/utils/json-stream-logger.js.map +0 -1
- package/dist/utils/logger.d.ts.map +0 -1
- package/dist/utils/logger.js.map +0 -1
- package/dist/utils/platform-utils.d.ts.map +0 -1
- package/dist/utils/platform-utils.js.map +0 -1
- package/dist/utils/wsl-utils.d.ts.map +0 -1
- package/dist/utils/wsl-utils.js.map +0 -1
- package/electron.vite.config.ts +0 -63
- package/google374b9eba0c52b043.html +0 -1
- package/src/agents/base/base-agent.ts +0 -159
- package/src/agents/docs-search/index.ts +0 -365
- package/src/agents/index.ts +0 -34
- package/src/agents/planner/index.ts +0 -544
- package/src/cli.ts +0 -201
- package/src/constants.ts +0 -47
- package/src/core/compact/compact-manager.ts +0 -160
- package/src/core/compact/compact-prompts.ts +0 -150
- package/src/core/compact/context-tracker.ts +0 -164
- package/src/core/compact/index.ts +0 -25
- package/src/core/config/config-manager.ts +0 -460
- package/src/core/config/index.ts +0 -5
- package/src/core/docs-manager.ts +0 -678
- package/src/core/llm/index.ts +0 -7
- package/src/core/llm/llm-client.ts +0 -1550
- package/src/core/session/index.ts +0 -5
- package/src/core/session/session-manager.ts +0 -464
- package/src/core/slash-command-handler.ts +0 -410
- package/src/core/usage-tracker.ts +0 -438
- package/src/errors/base.ts +0 -81
- package/src/errors/file.ts +0 -183
- package/src/errors/index.ts +0 -95
- package/src/errors/llm.ts +0 -151
- package/src/errors/network.ts +0 -124
- package/src/errors/validation.ts +0 -111
- package/src/eval/eval-runner.ts +0 -456
- package/src/eval/index.ts +0 -8
- package/src/eval/types.ts +0 -139
- package/src/index.ts +0 -22
- package/src/orchestration/index.ts +0 -30
- package/src/orchestration/plan-executor.ts +0 -652
- package/src/orchestration/types.ts +0 -127
- package/src/orchestration/utils.ts +0 -119
- package/src/orquesta/connection.ts +0 -291
- package/src/prompts/agents/docs-search-decision.ts +0 -74
- package/src/prompts/agents/docs-search.ts +0 -84
- package/src/prompts/agents/planning.ts +0 -143
- package/src/prompts/index.ts +0 -31
- package/src/prompts/shared/codebase-rules.ts +0 -29
- package/src/prompts/shared/git-rules.ts +0 -94
- package/src/prompts/shared/language-rules.ts +0 -36
- package/src/prompts/shared/tool-usage.ts +0 -72
- package/src/prompts/system/compact.ts +0 -80
- package/src/prompts/system/plan-execute.ts +0 -89
- package/src/tools/browser/browser-client.ts +0 -1363
- package/src/tools/browser/browser-tools.ts +0 -1139
- package/src/tools/browser/index.ts +0 -65
- package/src/tools/index.ts +0 -23
- package/src/tools/llm/agents/docs-search-tools.ts +0 -368
- package/src/tools/llm/agents/index.ts +0 -22
- package/src/tools/llm/index.ts +0 -11
- package/src/tools/llm/simple/ask-user-tool.ts +0 -25
- package/src/tools/llm/simple/background-bash-tool.ts +0 -443
- package/src/tools/llm/simple/background-powershell-tool.ts +0 -421
- package/src/tools/llm/simple/bash-tool.ts +0 -238
- package/src/tools/llm/simple/docs-search-agent-tool.ts +0 -146
- package/src/tools/llm/simple/file-tools.ts +0 -1051
- package/src/tools/llm/simple/final-response-tool.ts +0 -180
- package/src/tools/llm/simple/index.ts +0 -42
- package/src/tools/llm/simple/planning-tools.ts +0 -143
- package/src/tools/llm/simple/powershell-tool.ts +0 -241
- package/src/tools/llm/simple/simple-tool-executor.ts +0 -279
- package/src/tools/llm/simple/todo-tools.ts +0 -207
- package/src/tools/llm/simple/user-interaction-tools.ts +0 -277
- package/src/tools/office/common/constants.ts +0 -335
- package/src/tools/office/common/index.ts +0 -133
- package/src/tools/office/common/types.ts +0 -286
- package/src/tools/office/common/utils.ts +0 -116
- package/src/tools/office/excel-client.ts +0 -1336
- package/src/tools/office/excel-tools/cells.ts +0 -359
- package/src/tools/office/excel-tools/charts.ts +0 -166
- package/src/tools/office/excel-tools/comments.ts +0 -155
- package/src/tools/office/excel-tools/data-ops.ts +0 -349
- package/src/tools/office/excel-tools/export.ts +0 -105
- package/src/tools/office/excel-tools/formatting.ts +0 -357
- package/src/tools/office/excel-tools/index.ts +0 -55
- package/src/tools/office/excel-tools/launch.ts +0 -303
- package/src/tools/office/excel-tools/media.ts +0 -117
- package/src/tools/office/excel-tools/named-ranges.ts +0 -148
- package/src/tools/office/excel-tools/protection.ts +0 -105
- package/src/tools/office/excel-tools/rows-columns.ts +0 -386
- package/src/tools/office/excel-tools/sheets.ts +0 -228
- package/src/tools/office/excel-tools/validation.ts +0 -226
- package/src/tools/office/excel-tools.ts +0 -9
- package/src/tools/office/index.ts +0 -259
- package/src/tools/office/office-client-base.ts +0 -242
- package/src/tools/office/office-client.ts +0 -377
- package/src/tools/office/powerpoint-client.ts +0 -1498
- package/src/tools/office/powerpoint-tools/effects.ts +0 -315
- package/src/tools/office/powerpoint-tools/export.ts +0 -138
- package/src/tools/office/powerpoint-tools/index.ts +0 -45
- package/src/tools/office/powerpoint-tools/launch.ts +0 -263
- package/src/tools/office/powerpoint-tools/media.ts +0 -291
- package/src/tools/office/powerpoint-tools/notes.ts +0 -220
- package/src/tools/office/powerpoint-tools/sections.ts +0 -140
- package/src/tools/office/powerpoint-tools/shapes.ts +0 -870
- package/src/tools/office/powerpoint-tools/slides.ts +0 -350
- package/src/tools/office/powerpoint-tools/tables.ts +0 -182
- package/src/tools/office/powerpoint-tools/text.ts +0 -473
- package/src/tools/office/powerpoint-tools.ts +0 -9
- package/src/tools/office/word-client.ts +0 -1697
- package/src/tools/office/word-tools/bookmarks.ts +0 -186
- package/src/tools/office/word-tools/comments.ts +0 -185
- package/src/tools/office/word-tools/content.ts +0 -229
- package/src/tools/office/word-tools/export.ts +0 -97
- package/src/tools/office/word-tools/formatting.ts +0 -161
- package/src/tools/office/word-tools/headers-footers.ts +0 -155
- package/src/tools/office/word-tools/index.ts +0 -57
- package/src/tools/office/word-tools/launch.ts +0 -312
- package/src/tools/office/word-tools/lists.ts +0 -97
- package/src/tools/office/word-tools/navigation.ts +0 -114
- package/src/tools/office/word-tools/page-setup.ts +0 -195
- package/src/tools/office/word-tools/tables.ts +0 -262
- package/src/tools/office/word-tools/text.ts +0 -294
- package/src/tools/office/word-tools/undo-redo.ts +0 -97
- package/src/tools/office/word-tools/watermarks.ts +0 -105
- package/src/tools/office/word-tools.ts +0 -9
- package/src/tools/registry.ts +0 -527
- package/src/tools/types.ts +0 -231
- package/src/types/index.ts +0 -181
- package/src/ui/PlanExecuteView.tsx +0 -119
- package/src/ui/TodoPanel.tsx +0 -240
- package/src/ui/UpdateNotification.tsx +0 -105
- package/src/ui/components/ActivityIndicator.tsx +0 -234
- package/src/ui/components/CommandBrowser.tsx +0 -114
- package/src/ui/components/CustomTextInput.tsx +0 -389
- package/src/ui/components/DocsSearchProgress.tsx +0 -85
- package/src/ui/components/FileBrowser.tsx +0 -93
- package/src/ui/components/LLMSetupWizard.tsx +0 -333
- package/src/ui/components/Logo.tsx +0 -125
- package/src/ui/components/MarkdownRenderer.tsx +0 -358
- package/src/ui/components/ModelSelector.tsx +0 -203
- package/src/ui/components/PlanExecuteApp.tsx +0 -2007
- package/src/ui/components/ProgressBar.tsx +0 -51
- package/src/ui/components/StatusBar.tsx +0 -302
- package/src/ui/components/ThinkingIndicator.tsx +0 -120
- package/src/ui/components/TodoListView.tsx +0 -140
- package/src/ui/components/ToolSelector.tsx +0 -215
- package/src/ui/components/dialogs/ApprovalDialog.tsx +0 -259
- package/src/ui/components/dialogs/AskUserDialog.tsx +0 -159
- package/src/ui/components/dialogs/DocsBrowser.tsx +0 -222
- package/src/ui/components/dialogs/SettingsDialog.tsx +0 -939
- package/src/ui/components/dialogs/index.ts +0 -13
- package/src/ui/components/index.ts +0 -27
- package/src/ui/components/panels/LogPanel.tsx +0 -385
- package/src/ui/components/panels/SessionPanel.tsx +0 -146
- package/src/ui/components/panels/index.ts +0 -13
- package/src/ui/components/views/ChatView.tsx +0 -447
- package/src/ui/components/views/index.ts +0 -5
- package/src/ui/contexts/TokenContext.tsx +0 -139
- package/src/ui/hooks/atFileProcessor.ts +0 -167
- package/src/ui/hooks/index.ts +0 -11
- package/src/ui/hooks/slashCommandProcessor.ts +0 -174
- package/src/ui/hooks/useCommandBrowserState.ts +0 -97
- package/src/ui/hooks/useFileBrowserState.ts +0 -116
- package/src/ui/hooks/useFileList.ts +0 -132
- package/src/ui/hooks/useInputHistory.ts +0 -89
- package/src/ui/hooks/usePlanExecution.ts +0 -339
- package/src/ui/index.ts +0 -10
- package/src/ui/ink-entry.tsx +0 -36
- package/src/utils/env-filter.ts +0 -164
- package/src/utils/file-system.ts +0 -133
- package/src/utils/git-utils.ts +0 -30
- package/src/utils/json-stream-logger.ts +0 -1259
- package/src/utils/logger.ts +0 -2767
- package/src/utils/platform-utils.ts +0 -256
- package/src/utils/wsl-utils.ts +0 -113
- package/tsconfig.electron.json +0 -39
- package/tsconfig.json +0 -64
|
@@ -1,389 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Custom Text Input Component
|
|
3
|
-
*
|
|
4
|
-
* Replaces ink-text-input with full control over cursor positioning and keyboard shortcuts
|
|
5
|
-
* Supports multi-line paste detection and display
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
import React, { useState, useEffect, useRef } from 'react';
|
|
9
|
-
import { Box, Text, useStdin } from 'ink';
|
|
10
|
-
|
|
11
|
-
// Threshold for collapsing multi-line content
|
|
12
|
-
const MULTILINE_COLLAPSE_THRESHOLD = 10;
|
|
13
|
-
|
|
14
|
-
interface CustomTextInputProps {
|
|
15
|
-
value: string;
|
|
16
|
-
onChange: (value: string) => void;
|
|
17
|
-
onSubmit?: (value: string) => void;
|
|
18
|
-
onHistoryPrev?: () => void;
|
|
19
|
-
onHistoryNext?: () => void;
|
|
20
|
-
placeholder?: string;
|
|
21
|
-
focus?: boolean;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export const CustomTextInput: React.FC<CustomTextInputProps> = ({
|
|
25
|
-
value,
|
|
26
|
-
onChange,
|
|
27
|
-
onSubmit,
|
|
28
|
-
onHistoryPrev,
|
|
29
|
-
onHistoryNext,
|
|
30
|
-
placeholder = '',
|
|
31
|
-
focus = true,
|
|
32
|
-
}) => {
|
|
33
|
-
const { stdin, setRawMode } = useStdin();
|
|
34
|
-
const [cursorPosition, setCursorPosition] = useState(value.length);
|
|
35
|
-
const previousValueLength = useRef<number>(value.length);
|
|
36
|
-
|
|
37
|
-
// Track if we should show collapsed view (only after paste, cleared on any edit)
|
|
38
|
-
const [isCollapsedView, setIsCollapsedView] = useState(false);
|
|
39
|
-
|
|
40
|
-
// Use refs to access latest values without recreating handleData
|
|
41
|
-
const valueRef = useRef(value);
|
|
42
|
-
const cursorPositionRef = useRef(cursorPosition);
|
|
43
|
-
const onChangeRef = useRef(onChange);
|
|
44
|
-
const onSubmitRef = useRef(onSubmit);
|
|
45
|
-
const onHistoryPrevRef = useRef(onHistoryPrev);
|
|
46
|
-
const onHistoryNextRef = useRef(onHistoryNext);
|
|
47
|
-
const setIsCollapsedViewRef = useRef(setIsCollapsedView);
|
|
48
|
-
|
|
49
|
-
// Flag to distinguish internal input from external value changes
|
|
50
|
-
const isInternalChangeRef = useRef(false);
|
|
51
|
-
|
|
52
|
-
// Keep refs in sync
|
|
53
|
-
useEffect(() => {
|
|
54
|
-
valueRef.current = value;
|
|
55
|
-
cursorPositionRef.current = cursorPosition;
|
|
56
|
-
onChangeRef.current = onChange;
|
|
57
|
-
onSubmitRef.current = onSubmit;
|
|
58
|
-
onHistoryPrevRef.current = onHistoryPrev;
|
|
59
|
-
onHistoryNextRef.current = onHistoryNext;
|
|
60
|
-
setIsCollapsedViewRef.current = setIsCollapsedView;
|
|
61
|
-
});
|
|
62
|
-
|
|
63
|
-
// Synchronize cursor position when value changes externally
|
|
64
|
-
useEffect(() => {
|
|
65
|
-
// When value is cleared, reset cursor to start and clear collapsed view
|
|
66
|
-
if (value.length === 0) {
|
|
67
|
-
setCursorPosition(0);
|
|
68
|
-
previousValueLength.current = 0;
|
|
69
|
-
setIsCollapsedView(false);
|
|
70
|
-
isInternalChangeRef.current = false;
|
|
71
|
-
return;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
// When value increases (e.g., file inserted), move cursor to end
|
|
75
|
-
// But only if it's an external change, not internal typing
|
|
76
|
-
if (value.length > previousValueLength.current) {
|
|
77
|
-
if (!isInternalChangeRef.current) {
|
|
78
|
-
// External change (e.g., file inserted) - move cursor to end
|
|
79
|
-
setCursorPosition(value.length);
|
|
80
|
-
}
|
|
81
|
-
// Reset the flag after processing
|
|
82
|
-
isInternalChangeRef.current = false;
|
|
83
|
-
previousValueLength.current = value.length;
|
|
84
|
-
return;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
// When value decreases (e.g., external deletion), adjust cursor if needed
|
|
88
|
-
if (value.length < cursorPosition) {
|
|
89
|
-
setCursorPosition(value.length);
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
isInternalChangeRef.current = false;
|
|
93
|
-
previousValueLength.current = value.length;
|
|
94
|
-
}, [value, cursorPosition]);
|
|
95
|
-
|
|
96
|
-
// Store handleData in a ref so it doesn't cause useEffect re-runs
|
|
97
|
-
const handleDataRef = useRef((data: Buffer) => {
|
|
98
|
-
const str = data.toString();
|
|
99
|
-
const currentValue = valueRef.current;
|
|
100
|
-
const currentCursor = cursorPositionRef.current;
|
|
101
|
-
|
|
102
|
-
// Helper: Delete word before cursor (shared by Alt+Backspace, Ctrl+Backspace, Ctrl+W)
|
|
103
|
-
const deleteWordBeforeCursor = (value: string, cursor: number) => {
|
|
104
|
-
if (cursor > 0) {
|
|
105
|
-
const beforeCursor = value.slice(0, cursor);
|
|
106
|
-
const afterCursor = value.slice(cursor);
|
|
107
|
-
|
|
108
|
-
// Find start of current word
|
|
109
|
-
let newPos = cursor - 1;
|
|
110
|
-
// Skip trailing spaces
|
|
111
|
-
while (newPos > 0 && beforeCursor[newPos] === ' ') {
|
|
112
|
-
newPos--;
|
|
113
|
-
}
|
|
114
|
-
// Delete until space or start
|
|
115
|
-
while (newPos > 0 && beforeCursor[newPos - 1] !== ' ') {
|
|
116
|
-
newPos--;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
const newValue = beforeCursor.slice(0, newPos) + afterCursor;
|
|
120
|
-
isInternalChangeRef.current = true;
|
|
121
|
-
onChangeRef.current(newValue);
|
|
122
|
-
setCursorPosition(newPos);
|
|
123
|
-
}
|
|
124
|
-
};
|
|
125
|
-
|
|
126
|
-
// Handle different key sequences
|
|
127
|
-
// Check for special escape sequences first
|
|
128
|
-
if (str.startsWith('\x1b')) {
|
|
129
|
-
// Alt+Enter or Shift+Enter - insert newline (multi-line input)
|
|
130
|
-
// Alt+Enter: ESC + CR (\x1b\r) or ESC + LF (\x1b\n)
|
|
131
|
-
// Shift+Enter: Kitty/modern terminals send \x1b[13;2u or \x1b[27;2;13~
|
|
132
|
-
if (str === '\x1b\r' || str === '\x1b\n' || str === '\x1b[13;2u' || str === '\x1b[27;2;13~') {
|
|
133
|
-
const newValue = currentValue.slice(0, currentCursor) + '\n' + currentValue.slice(currentCursor);
|
|
134
|
-
isInternalChangeRef.current = true;
|
|
135
|
-
onChangeRef.current(newValue);
|
|
136
|
-
setCursorPosition(currentCursor + 1);
|
|
137
|
-
return;
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
// ESC sequences (arrow keys, home, end, etc.)
|
|
141
|
-
if (str === '\x1b[H' || str === '\x1b[1~') {
|
|
142
|
-
// Home key
|
|
143
|
-
setCursorPosition(0);
|
|
144
|
-
return;
|
|
145
|
-
}
|
|
146
|
-
if (str === '\x1b[F' || str === '\x1b[4~') {
|
|
147
|
-
// End key
|
|
148
|
-
setCursorPosition(currentValue.length);
|
|
149
|
-
return;
|
|
150
|
-
}
|
|
151
|
-
if (str === '\x1b[3~') {
|
|
152
|
-
// Delete key - delete character after cursor
|
|
153
|
-
if (currentCursor < currentValue.length) {
|
|
154
|
-
const newValue = currentValue.slice(0, currentCursor) + currentValue.slice(currentCursor + 1);
|
|
155
|
-
isInternalChangeRef.current = true;
|
|
156
|
-
onChangeRef.current(newValue);
|
|
157
|
-
}
|
|
158
|
-
return;
|
|
159
|
-
}
|
|
160
|
-
if (str === '\x1b[D') {
|
|
161
|
-
// Left arrow
|
|
162
|
-
setCursorPosition(Math.max(0, currentCursor - 1));
|
|
163
|
-
return;
|
|
164
|
-
}
|
|
165
|
-
if (str === '\x1b[C') {
|
|
166
|
-
// Right arrow
|
|
167
|
-
setCursorPosition(Math.min(currentValue.length, currentCursor + 1));
|
|
168
|
-
return;
|
|
169
|
-
}
|
|
170
|
-
if (str === '\x1b[A') {
|
|
171
|
-
// Up arrow - navigate to previous history entry
|
|
172
|
-
if (onHistoryPrevRef.current) {
|
|
173
|
-
onHistoryPrevRef.current();
|
|
174
|
-
}
|
|
175
|
-
return;
|
|
176
|
-
}
|
|
177
|
-
if (str === '\x1b[B') {
|
|
178
|
-
// Down arrow - navigate to next history entry
|
|
179
|
-
if (onHistoryNextRef.current) {
|
|
180
|
-
onHistoryNextRef.current();
|
|
181
|
-
}
|
|
182
|
-
return;
|
|
183
|
-
}
|
|
184
|
-
if (str === '\x1b\x7f' || str === '\x1b\x08') {
|
|
185
|
-
// Alt + Backspace - delete word before cursor (handled below with Ctrl+Backspace)
|
|
186
|
-
deleteWordBeforeCursor(currentValue, currentCursor);
|
|
187
|
-
return;
|
|
188
|
-
}
|
|
189
|
-
// Ignore other escape sequences
|
|
190
|
-
return;
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
// Ctrl+A - move to start of line (like Home)
|
|
194
|
-
if (str === '\x01') {
|
|
195
|
-
setCursorPosition(0);
|
|
196
|
-
return;
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
// Ctrl+E - move to end of line (like End)
|
|
200
|
-
if (str === '\x05') {
|
|
201
|
-
setCursorPosition(currentValue.length);
|
|
202
|
-
return;
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
// Ctrl+C is handled by parent component's useInput hook
|
|
206
|
-
if (str === '\x03') {
|
|
207
|
-
// Ignore Ctrl+C in custom input, let parent handle it
|
|
208
|
-
return;
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
// Ctrl+W / Ctrl+Backspace - delete word before cursor
|
|
212
|
-
if (str === '\x17') {
|
|
213
|
-
deleteWordBeforeCursor(currentValue, currentCursor);
|
|
214
|
-
return;
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
// Regular backspace
|
|
218
|
-
if (str === '\x7f' || str === '\x08') {
|
|
219
|
-
if (currentCursor > 0) {
|
|
220
|
-
const newValue = currentValue.slice(0, currentCursor - 1) + currentValue.slice(currentCursor);
|
|
221
|
-
isInternalChangeRef.current = true;
|
|
222
|
-
onChangeRef.current(newValue);
|
|
223
|
-
setCursorPosition(currentCursor - 1);
|
|
224
|
-
}
|
|
225
|
-
return;
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
// Enter key - submit (only if single character, not part of paste)
|
|
229
|
-
if ((str === '\r' || str === '\n') && str.length === 1) {
|
|
230
|
-
if (onSubmitRef.current) {
|
|
231
|
-
onSubmitRef.current(currentValue);
|
|
232
|
-
}
|
|
233
|
-
return;
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
// Multi-character paste detection:
|
|
237
|
-
// When pasting, terminal sends multiple characters at once.
|
|
238
|
-
// If str.length > 1 and contains newlines, it's a paste operation.
|
|
239
|
-
// Also handle single-character input that's part of rapid paste (detected by length > 1).
|
|
240
|
-
const isPaste = str.length > 1;
|
|
241
|
-
|
|
242
|
-
if (isPaste) {
|
|
243
|
-
// Paste detected - allow all characters including newlines
|
|
244
|
-
// Filter out only truly problematic control characters (not newlines)
|
|
245
|
-
// Keep tab (\x09) and newline (\x0A, \x0D), remove other control characters
|
|
246
|
-
const sanitized = str.replace(/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F]/g, '');
|
|
247
|
-
if (sanitized.length > 0) {
|
|
248
|
-
const newValue = currentValue.slice(0, currentCursor) + sanitized + currentValue.slice(currentCursor);
|
|
249
|
-
isInternalChangeRef.current = true;
|
|
250
|
-
onChangeRef.current(newValue);
|
|
251
|
-
setCursorPosition(currentCursor + sanitized.length);
|
|
252
|
-
|
|
253
|
-
// Show collapsed view if pasted content has many lines
|
|
254
|
-
const lineCount = sanitized.split('\n').length;
|
|
255
|
-
if (lineCount > MULTILINE_COLLAPSE_THRESHOLD) {
|
|
256
|
-
setIsCollapsedViewRef.current(true);
|
|
257
|
-
}
|
|
258
|
-
}
|
|
259
|
-
return;
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
// Any other edit clears collapsed view
|
|
263
|
-
setIsCollapsedViewRef.current(false);
|
|
264
|
-
|
|
265
|
-
// Regular character input (printable characters including multi-byte UTF-8 like Korean)
|
|
266
|
-
// Filter out control characters (0x00-0x1F and 0x7F) but allow everything else
|
|
267
|
-
// This allows ASCII printable chars, extended ASCII, and multi-byte UTF-8 characters
|
|
268
|
-
const charCode = str.charCodeAt(0);
|
|
269
|
-
if (charCode >= 0x20 && charCode !== 0x7F) {
|
|
270
|
-
const newValue = currentValue.slice(0, currentCursor) + str + currentValue.slice(currentCursor);
|
|
271
|
-
isInternalChangeRef.current = true;
|
|
272
|
-
onChangeRef.current(newValue);
|
|
273
|
-
setCursorPosition(currentCursor + str.length);
|
|
274
|
-
}
|
|
275
|
-
});
|
|
276
|
-
|
|
277
|
-
useEffect(() => {
|
|
278
|
-
if (!focus || !stdin) {
|
|
279
|
-
return;
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
// Set raw mode to capture all keystrokes
|
|
283
|
-
setRawMode?.(true);
|
|
284
|
-
|
|
285
|
-
const handler = handleDataRef.current;
|
|
286
|
-
stdin.on('data', handler);
|
|
287
|
-
|
|
288
|
-
return () => {
|
|
289
|
-
stdin.off('data', handler);
|
|
290
|
-
// Note: Don't call setRawMode(false) here - other components (SelectInput) may still need raw mode
|
|
291
|
-
};
|
|
292
|
-
}, [focus, stdin, setRawMode]); // handleDataRef.current is stable
|
|
293
|
-
|
|
294
|
-
// Render the input with cursor (supports multi-line)
|
|
295
|
-
const renderValue = () => {
|
|
296
|
-
if (value.length === 0) {
|
|
297
|
-
return (
|
|
298
|
-
<Text>
|
|
299
|
-
{focus && <Text inverse> </Text>}
|
|
300
|
-
<Text dimColor>{placeholder}</Text>
|
|
301
|
-
</Text>
|
|
302
|
-
);
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
const beforeCursor = value.slice(0, cursorPosition);
|
|
306
|
-
const atCursor = value[cursorPosition] || ' ';
|
|
307
|
-
const afterCursor = value.slice(cursorPosition + 1);
|
|
308
|
-
|
|
309
|
-
// Check if content has multiple lines
|
|
310
|
-
const hasNewlines = value.includes('\n');
|
|
311
|
-
|
|
312
|
-
if (!hasNewlines) {
|
|
313
|
-
// Single line rendering (original behavior)
|
|
314
|
-
return (
|
|
315
|
-
<Text>
|
|
316
|
-
{beforeCursor}
|
|
317
|
-
{focus && <Text inverse>{atCursor}</Text>}
|
|
318
|
-
{!focus && atCursor !== ' ' && <Text>{atCursor}</Text>}
|
|
319
|
-
{afterCursor}
|
|
320
|
-
</Text>
|
|
321
|
-
);
|
|
322
|
-
}
|
|
323
|
-
|
|
324
|
-
// Multi-line rendering
|
|
325
|
-
// Split by newlines and render each line, placing cursor correctly
|
|
326
|
-
const lines = value.split('\n');
|
|
327
|
-
const lineCount = lines.length;
|
|
328
|
-
|
|
329
|
-
// Show collapsed view only when isCollapsedView is true (set after paste, cleared on edit)
|
|
330
|
-
if (lineCount > MULTILINE_COLLAPSE_THRESHOLD && isCollapsedView) {
|
|
331
|
-
const firstLine = lines[0] || '';
|
|
332
|
-
const truncatedFirstLine = firstLine.length > 40 ? firstLine.slice(0, 40) + '...' : firstLine;
|
|
333
|
-
return (
|
|
334
|
-
<Box>
|
|
335
|
-
<Text color="cyan">{lineCount} lines pasted</Text>
|
|
336
|
-
<Text color="gray"> │ </Text>
|
|
337
|
-
<Text dimColor>{truncatedFirstLine}</Text>
|
|
338
|
-
{focus && <Text inverse> </Text>}
|
|
339
|
-
</Box>
|
|
340
|
-
);
|
|
341
|
-
}
|
|
342
|
-
|
|
343
|
-
let charCount = 0;
|
|
344
|
-
let cursorLineIndex = 0;
|
|
345
|
-
let cursorPosInLine = 0;
|
|
346
|
-
|
|
347
|
-
// Find which line the cursor is on
|
|
348
|
-
for (let i = 0; i < lines.length; i++) {
|
|
349
|
-
const line = lines[i] ?? '';
|
|
350
|
-
const lineLength = line.length;
|
|
351
|
-
if (charCount + lineLength >= cursorPosition) {
|
|
352
|
-
cursorLineIndex = i;
|
|
353
|
-
cursorPosInLine = cursorPosition - charCount;
|
|
354
|
-
break;
|
|
355
|
-
}
|
|
356
|
-
charCount += lineLength + 1; // +1 for the newline character
|
|
357
|
-
}
|
|
358
|
-
|
|
359
|
-
return (
|
|
360
|
-
<Box flexDirection="column">
|
|
361
|
-
{lines.map((line, lineIndex) => {
|
|
362
|
-
const isCursorLine = lineIndex === cursorLineIndex;
|
|
363
|
-
|
|
364
|
-
if (!isCursorLine) {
|
|
365
|
-
return <Text key={lineIndex}>{line || ' '}</Text>;
|
|
366
|
-
}
|
|
367
|
-
|
|
368
|
-
// Render line with cursor
|
|
369
|
-
const beforeCursorInLine = line.slice(0, cursorPosInLine);
|
|
370
|
-
const atCursorChar = line[cursorPosInLine] || ' ';
|
|
371
|
-
const afterCursorInLine = line.slice(cursorPosInLine + 1);
|
|
372
|
-
|
|
373
|
-
return (
|
|
374
|
-
<Text key={lineIndex}>
|
|
375
|
-
{beforeCursorInLine}
|
|
376
|
-
{focus && <Text inverse>{atCursorChar}</Text>}
|
|
377
|
-
{!focus && atCursorChar !== ' ' && <Text>{atCursorChar}</Text>}
|
|
378
|
-
{afterCursorInLine}
|
|
379
|
-
</Text>
|
|
380
|
-
);
|
|
381
|
-
})}
|
|
382
|
-
</Box>
|
|
383
|
-
);
|
|
384
|
-
};
|
|
385
|
-
|
|
386
|
-
return renderValue();
|
|
387
|
-
};
|
|
388
|
-
|
|
389
|
-
export default CustomTextInput;
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Docs Search Progress Component
|
|
3
|
-
*
|
|
4
|
-
* Shows real-time progress of documentation search in the chat area.
|
|
5
|
-
* Displays up to 8 most recent log lines.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
import React from 'react';
|
|
9
|
-
import { Box, Text } from 'ink';
|
|
10
|
-
import Spinner from 'ink-spinner';
|
|
11
|
-
|
|
12
|
-
export interface DocsSearchLog {
|
|
13
|
-
type: 'command' | 'file' | 'info' | 'result';
|
|
14
|
-
message: string;
|
|
15
|
-
timestamp: number;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
interface DocsSearchProgressProps {
|
|
19
|
-
logs: DocsSearchLog[];
|
|
20
|
-
isSearching: boolean;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* Format log entry with appropriate icon
|
|
25
|
-
*/
|
|
26
|
-
function formatLogEntry(log: DocsSearchLog): { icon: string; color: string } {
|
|
27
|
-
switch (log.type) {
|
|
28
|
-
case 'command':
|
|
29
|
-
return { icon: '⚡', color: 'yellow' };
|
|
30
|
-
case 'file':
|
|
31
|
-
return { icon: '📄', color: 'cyan' };
|
|
32
|
-
case 'result':
|
|
33
|
-
return { icon: '✓', color: 'green' };
|
|
34
|
-
case 'info':
|
|
35
|
-
default:
|
|
36
|
-
return { icon: '→', color: 'gray' };
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
export const DocsSearchProgress: React.FC<DocsSearchProgressProps> = ({
|
|
41
|
-
logs,
|
|
42
|
-
isSearching,
|
|
43
|
-
}) => {
|
|
44
|
-
// Show only last 8 logs
|
|
45
|
-
const visibleLogs = logs.slice(-8);
|
|
46
|
-
|
|
47
|
-
if (!isSearching && logs.length === 0) {
|
|
48
|
-
return null;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
return (
|
|
52
|
-
<Box flexDirection="column" marginY={1} paddingLeft={1}>
|
|
53
|
-
{/* Header */}
|
|
54
|
-
<Box>
|
|
55
|
-
{isSearching ? (
|
|
56
|
-
<>
|
|
57
|
-
<Text color="yellow">
|
|
58
|
-
<Spinner type="dots" />
|
|
59
|
-
</Text>
|
|
60
|
-
<Text color="yellow" bold> 📚 Searching Local Documents...</Text>
|
|
61
|
-
</>
|
|
62
|
-
) : (
|
|
63
|
-
<Text color="green" bold>📚 Document Search Complete</Text>
|
|
64
|
-
)}
|
|
65
|
-
</Box>
|
|
66
|
-
|
|
67
|
-
{/* Progress logs */}
|
|
68
|
-
<Box flexDirection="column" paddingLeft={2} marginTop={0}>
|
|
69
|
-
{visibleLogs.map((log, index) => {
|
|
70
|
-
const { icon, color } = formatLogEntry(log);
|
|
71
|
-
return (
|
|
72
|
-
<Box key={`${log.timestamp}-${index}`}>
|
|
73
|
-
<Text color={color}>{icon} </Text>
|
|
74
|
-
<Text color={color} dimColor={log.type === 'info'}>
|
|
75
|
-
{log.message}
|
|
76
|
-
</Text>
|
|
77
|
-
</Box>
|
|
78
|
-
);
|
|
79
|
-
})}
|
|
80
|
-
</Box>
|
|
81
|
-
</Box>
|
|
82
|
-
);
|
|
83
|
-
};
|
|
84
|
-
|
|
85
|
-
export default DocsSearchProgress;
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* File Browser Component
|
|
3
|
-
*
|
|
4
|
-
* Displays a file list for @ file inclusion
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
import React from 'react';
|
|
8
|
-
import { Box, Text, useInput } from 'ink';
|
|
9
|
-
import SelectInput from 'ink-select-input';
|
|
10
|
-
import { useFileList, FileItem } from '../hooks/useFileList.js';
|
|
11
|
-
|
|
12
|
-
interface FileBrowserProps {
|
|
13
|
-
filter: string;
|
|
14
|
-
onSelect: (filePaths: string[]) => void;
|
|
15
|
-
onCancel: () => void;
|
|
16
|
-
cachedFiles?: FileItem[]; // Pre-loaded file list for instant display
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
interface SelectItem {
|
|
20
|
-
label: string;
|
|
21
|
-
value: string;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export const FileBrowser: React.FC<FileBrowserProps> = ({
|
|
25
|
-
filter,
|
|
26
|
-
onSelect,
|
|
27
|
-
onCancel,
|
|
28
|
-
cachedFiles = [],
|
|
29
|
-
}) => {
|
|
30
|
-
const { files } = useFileList({
|
|
31
|
-
filter,
|
|
32
|
-
maxResults: 100, // Get more files for scrolling, but display limit is 10
|
|
33
|
-
cachedFiles, // Pass cached files for instant filtering
|
|
34
|
-
});
|
|
35
|
-
|
|
36
|
-
// Convert FileItem to SelectItem format
|
|
37
|
-
const items: SelectItem[] = files.map((file) => {
|
|
38
|
-
// TODO: When directory navigation is enabled, uncomment the line below
|
|
39
|
-
// const icon = file.type === 'directory' ? '📁' : '📄';
|
|
40
|
-
const icon = '📄'; // Currently only files are shown (directories are filtered out)
|
|
41
|
-
return {
|
|
42
|
-
label: `${icon} ${file.path}`,
|
|
43
|
-
value: file.path,
|
|
44
|
-
};
|
|
45
|
-
});
|
|
46
|
-
|
|
47
|
-
// Custom keyboard handling
|
|
48
|
-
useInput((_inputChar, key) => {
|
|
49
|
-
if (key.escape) {
|
|
50
|
-
onCancel();
|
|
51
|
-
return;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
// Tab key for autocomplete (select first file)
|
|
55
|
-
if (key.tab && items.length > 0) {
|
|
56
|
-
const firstFile = items[0];
|
|
57
|
-
if (firstFile) {
|
|
58
|
-
onSelect([firstFile.value]);
|
|
59
|
-
}
|
|
60
|
-
return;
|
|
61
|
-
}
|
|
62
|
-
});
|
|
63
|
-
|
|
64
|
-
// Handle Enter key from SelectInput
|
|
65
|
-
const handleSelect = (item: SelectItem) => {
|
|
66
|
-
onSelect([item.value]);
|
|
67
|
-
};
|
|
68
|
-
|
|
69
|
-
// No loading state needed - files are pre-loaded externally
|
|
70
|
-
// Error state is also not relevant as loading happens at app startup
|
|
71
|
-
|
|
72
|
-
if (items.length === 0) {
|
|
73
|
-
return (
|
|
74
|
-
<Box borderStyle="single" borderColor="yellow" paddingX={1} flexDirection="column">
|
|
75
|
-
<Text color="yellow">No files found matching: {filter || '(all files)'}</Text>
|
|
76
|
-
<Text dimColor>Press ESC to cancel</Text>
|
|
77
|
-
</Box>
|
|
78
|
-
);
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
return (
|
|
82
|
-
<Box flexDirection="column">
|
|
83
|
-
{/* File List */}
|
|
84
|
-
<Box borderStyle="single" borderColor="gray" paddingX={1}>
|
|
85
|
-
<SelectInput
|
|
86
|
-
items={items}
|
|
87
|
-
onSelect={handleSelect}
|
|
88
|
-
limit={10}
|
|
89
|
-
/>
|
|
90
|
-
</Box>
|
|
91
|
-
</Box>
|
|
92
|
-
);
|
|
93
|
-
};
|