orquesta-cli 0.1.12
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/.eslintrc.json +26 -0
- package/.prettierrc.json +10 -0
- package/CLAUDE.md +199 -0
- package/LICENSE +21 -0
- package/README.md +280 -0
- package/SECURITY.md +290 -0
- package/TEST_LOCAL.md +245 -0
- package/dist/agents/base/base-agent.d.ts +38 -0
- package/dist/agents/base/base-agent.d.ts.map +1 -0
- package/dist/agents/base/base-agent.js +69 -0
- package/dist/agents/base/base-agent.js.map +1 -0
- package/dist/agents/docs-search/index.d.ts +33 -0
- package/dist/agents/docs-search/index.d.ts.map +1 -0
- package/dist/agents/docs-search/index.js +244 -0
- package/dist/agents/docs-search/index.js.map +1 -0
- package/dist/agents/index.d.ts +4 -0
- package/dist/agents/index.d.ts.map +1 -0
- package/dist/agents/index.js +4 -0
- package/dist/agents/index.js.map +1 -0
- package/dist/agents/planner/index.d.ts +17 -0
- package/dist/agents/planner/index.d.ts.map +1 -0
- package/dist/agents/planner/index.js +250 -0
- package/dist/agents/planner/index.js.map +1 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +144 -0
- package/dist/cli.js.map +1 -0
- package/dist/constants.d.ts +8 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +10 -0
- package/dist/constants.js.map +1 -0
- package/dist/core/compact/compact-manager.d.ts +22 -0
- package/dist/core/compact/compact-manager.d.ts.map +1 -0
- package/dist/core/compact/compact-manager.js +75 -0
- package/dist/core/compact/compact-manager.js.map +1 -0
- package/dist/core/compact/compact-prompts.d.ts +11 -0
- package/dist/core/compact/compact-prompts.d.ts.map +1 -0
- package/dist/core/compact/compact-prompts.js +90 -0
- package/dist/core/compact/compact-prompts.js.map +1 -0
- package/dist/core/compact/context-tracker.d.ts +28 -0
- package/dist/core/compact/context-tracker.d.ts.map +1 -0
- package/dist/core/compact/context-tracker.js +71 -0
- package/dist/core/compact/context-tracker.js.map +1 -0
- package/dist/core/compact/index.d.ts +4 -0
- package/dist/core/compact/index.d.ts.map +1 -0
- package/dist/core/compact/index.js +4 -0
- package/dist/core/compact/index.js.map +1 -0
- package/dist/core/config/config-manager.d.ts +44 -0
- package/dist/core/config/config-manager.d.ts.map +1 -0
- package/dist/core/config/config-manager.js +259 -0
- package/dist/core/config/config-manager.js.map +1 -0
- package/dist/core/config/index.d.ts +2 -0
- package/dist/core/config/index.d.ts.map +1 -0
- package/dist/core/config/index.js +2 -0
- package/dist/core/config/index.js.map +1 -0
- package/dist/core/docs-manager.d.ts +46 -0
- package/dist/core/docs-manager.d.ts.map +1 -0
- package/dist/core/docs-manager.js +475 -0
- package/dist/core/docs-manager.js.map +1 -0
- package/dist/core/git-auto-updater.d.ts +58 -0
- package/dist/core/git-auto-updater.d.ts.map +1 -0
- package/dist/core/git-auto-updater.js +374 -0
- package/dist/core/git-auto-updater.js.map +1 -0
- package/dist/core/llm/index.d.ts +2 -0
- package/dist/core/llm/index.d.ts.map +1 -0
- package/dist/core/llm/index.js +2 -0
- package/dist/core/llm/index.js.map +1 -0
- package/dist/core/llm/llm-client.d.ts +97 -0
- package/dist/core/llm/llm-client.d.ts.map +1 -0
- package/dist/core/llm/llm-client.js +1000 -0
- package/dist/core/llm/llm-client.js.map +1 -0
- package/dist/core/session/index.d.ts +2 -0
- package/dist/core/session/index.d.ts.map +1 -0
- package/dist/core/session/index.js +2 -0
- package/dist/core/session/index.js.map +1 -0
- package/dist/core/session/session-manager.d.ts +71 -0
- package/dist/core/session/session-manager.d.ts.map +1 -0
- package/dist/core/session/session-manager.js +250 -0
- package/dist/core/session/session-manager.js.map +1 -0
- package/dist/core/slash-command-handler.d.ts +31 -0
- package/dist/core/slash-command-handler.d.ts.map +1 -0
- package/dist/core/slash-command-handler.js +302 -0
- package/dist/core/slash-command-handler.js.map +1 -0
- package/dist/core/usage-tracker.d.ts +70 -0
- package/dist/core/usage-tracker.d.ts.map +1 -0
- package/dist/core/usage-tracker.js +251 -0
- package/dist/core/usage-tracker.js.map +1 -0
- package/dist/errors/base.d.ts +22 -0
- package/dist/errors/base.d.ts.map +1 -0
- package/dist/errors/base.js +43 -0
- package/dist/errors/base.js.map +1 -0
- package/dist/errors/file.d.ts +31 -0
- package/dist/errors/file.d.ts.map +1 -0
- package/dist/errors/file.js +110 -0
- package/dist/errors/file.js.map +1 -0
- package/dist/errors/index.d.ts +10 -0
- package/dist/errors/index.d.ts.map +1 -0
- package/dist/errors/index.js +41 -0
- package/dist/errors/index.js.map +1 -0
- package/dist/errors/llm.d.ts +26 -0
- package/dist/errors/llm.d.ts.map +1 -0
- package/dist/errors/llm.js +86 -0
- package/dist/errors/llm.js.map +1 -0
- package/dist/errors/network.d.ts +19 -0
- package/dist/errors/network.d.ts.map +1 -0
- package/dist/errors/network.js +82 -0
- package/dist/errors/network.js.map +1 -0
- package/dist/errors/validation.d.ts +19 -0
- package/dist/errors/validation.d.ts.map +1 -0
- package/dist/errors/validation.js +62 -0
- package/dist/errors/validation.js.map +1 -0
- package/dist/eval/eval-runner.d.ts +24 -0
- package/dist/eval/eval-runner.d.ts.map +1 -0
- package/dist/eval/eval-runner.js +309 -0
- package/dist/eval/eval-runner.js.map +1 -0
- package/dist/eval/index.d.ts +3 -0
- package/dist/eval/index.d.ts.map +1 -0
- package/dist/eval/index.js +3 -0
- package/dist/eval/index.js.map +1 -0
- package/dist/eval/types.d.ts +77 -0
- package/dist/eval/types.d.ts.map +1 -0
- package/dist/eval/types.js +2 -0
- package/dist/eval/types.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -0
- package/dist/orchestration/index.d.ts +4 -0
- package/dist/orchestration/index.d.ts.map +1 -0
- package/dist/orchestration/index.js +3 -0
- package/dist/orchestration/index.js.map +1 -0
- package/dist/orchestration/plan-executor.d.ts +28 -0
- package/dist/orchestration/plan-executor.d.ts.map +1 -0
- package/dist/orchestration/plan-executor.js +382 -0
- package/dist/orchestration/plan-executor.js.map +1 -0
- package/dist/orchestration/types.d.ts +66 -0
- package/dist/orchestration/types.d.ts.map +1 -0
- package/dist/orchestration/types.js +2 -0
- package/dist/orchestration/types.js.map +1 -0
- package/dist/orchestration/utils.d.ts +13 -0
- package/dist/orchestration/utils.d.ts.map +1 -0
- package/dist/orchestration/utils.js +78 -0
- package/dist/orchestration/utils.js.map +1 -0
- package/dist/orquesta/connection.d.ts +35 -0
- package/dist/orquesta/connection.d.ts.map +1 -0
- package/dist/orquesta/connection.js +189 -0
- package/dist/orquesta/connection.js.map +1 -0
- package/dist/prompts/agents/docs-search-decision.d.ts +6 -0
- package/dist/prompts/agents/docs-search-decision.d.ts.map +1 -0
- package/dist/prompts/agents/docs-search-decision.js +46 -0
- package/dist/prompts/agents/docs-search-decision.js.map +1 -0
- package/dist/prompts/agents/docs-search.d.ts +4 -0
- package/dist/prompts/agents/docs-search.d.ts.map +1 -0
- package/dist/prompts/agents/docs-search.js +70 -0
- package/dist/prompts/agents/docs-search.js.map +1 -0
- package/dist/prompts/agents/planning.d.ts +4 -0
- package/dist/prompts/agents/planning.d.ts.map +1 -0
- package/dist/prompts/agents/planning.js +119 -0
- package/dist/prompts/agents/planning.js.map +1 -0
- package/dist/prompts/index.d.ts +10 -0
- package/dist/prompts/index.d.ts.map +1 -0
- package/dist/prompts/index.js +10 -0
- package/dist/prompts/index.js.map +1 -0
- package/dist/prompts/shared/codebase-rules.d.ts +4 -0
- package/dist/prompts/shared/codebase-rules.d.ts.map +1 -0
- package/dist/prompts/shared/codebase-rules.js +16 -0
- package/dist/prompts/shared/codebase-rules.js.map +1 -0
- package/dist/prompts/shared/git-rules.d.ts +2 -0
- package/dist/prompts/shared/git-rules.d.ts.map +1 -0
- package/dist/prompts/shared/git-rules.js +87 -0
- package/dist/prompts/shared/git-rules.js.map +1 -0
- package/dist/prompts/shared/language-rules.d.ts +4 -0
- package/dist/prompts/shared/language-rules.d.ts.map +1 -0
- package/dist/prompts/shared/language-rules.js +22 -0
- package/dist/prompts/shared/language-rules.js.map +1 -0
- package/dist/prompts/shared/tool-usage.d.ts +12 -0
- package/dist/prompts/shared/tool-usage.d.ts.map +1 -0
- package/dist/prompts/shared/tool-usage.js +51 -0
- package/dist/prompts/shared/tool-usage.js.map +1 -0
- package/dist/prompts/system/compact.d.ts +3 -0
- package/dist/prompts/system/compact.d.ts.map +1 -0
- package/dist/prompts/system/compact.js +73 -0
- package/dist/prompts/system/compact.js.map +1 -0
- package/dist/prompts/system/plan-execute.d.ts +3 -0
- package/dist/prompts/system/plan-execute.d.ts.map +1 -0
- package/dist/prompts/system/plan-execute.js +83 -0
- package/dist/prompts/system/plan-execute.js.map +1 -0
- package/dist/tools/browser/browser-client.d.ts +107 -0
- package/dist/tools/browser/browser-client.d.ts.map +1 -0
- package/dist/tools/browser/browser-client.js +958 -0
- package/dist/tools/browser/browser-client.js.map +1 -0
- package/dist/tools/browser/browser-tools.d.ts +17 -0
- package/dist/tools/browser/browser-tools.d.ts.map +1 -0
- package/dist/tools/browser/browser-tools.js +972 -0
- package/dist/tools/browser/browser-tools.js.map +1 -0
- package/dist/tools/browser/index.d.ts +7 -0
- package/dist/tools/browser/index.d.ts.map +1 -0
- package/dist/tools/browser/index.js +17 -0
- package/dist/tools/browser/index.js.map +1 -0
- package/dist/tools/index.d.ts +4 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +4 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/llm/agents/docs-search-tools.d.ts +17 -0
- package/dist/tools/llm/agents/docs-search-tools.d.ts.map +1 -0
- package/dist/tools/llm/agents/docs-search-tools.js +265 -0
- package/dist/tools/llm/agents/docs-search-tools.js.map +1 -0
- package/dist/tools/llm/agents/index.d.ts +4 -0
- package/dist/tools/llm/agents/index.d.ts.map +1 -0
- package/dist/tools/llm/agents/index.js +3 -0
- package/dist/tools/llm/agents/index.js.map +1 -0
- package/dist/tools/llm/index.d.ts +3 -0
- package/dist/tools/llm/index.d.ts.map +1 -0
- package/dist/tools/llm/index.js +3 -0
- package/dist/tools/llm/index.js.map +1 -0
- package/dist/tools/llm/simple/ask-user-tool.d.ts +5 -0
- package/dist/tools/llm/simple/ask-user-tool.d.ts.map +1 -0
- package/dist/tools/llm/simple/ask-user-tool.js +7 -0
- package/dist/tools/llm/simple/ask-user-tool.js.map +1 -0
- package/dist/tools/llm/simple/background-bash-tool.d.ts +30 -0
- package/dist/tools/llm/simple/background-bash-tool.d.ts.map +1 -0
- package/dist/tools/llm/simple/background-bash-tool.js +323 -0
- package/dist/tools/llm/simple/background-bash-tool.js.map +1 -0
- package/dist/tools/llm/simple/background-powershell-tool.d.ts +30 -0
- package/dist/tools/llm/simple/background-powershell-tool.d.ts.map +1 -0
- package/dist/tools/llm/simple/background-powershell-tool.js +305 -0
- package/dist/tools/llm/simple/background-powershell-tool.js.map +1 -0
- package/dist/tools/llm/simple/bash-tool.d.ts +4 -0
- package/dist/tools/llm/simple/bash-tool.d.ts.map +1 -0
- package/dist/tools/llm/simple/bash-tool.js +178 -0
- package/dist/tools/llm/simple/bash-tool.js.map +1 -0
- package/dist/tools/llm/simple/docs-search-agent-tool.d.ts +6 -0
- package/dist/tools/llm/simple/docs-search-agent-tool.d.ts.map +1 -0
- package/dist/tools/llm/simple/docs-search-agent-tool.js +104 -0
- package/dist/tools/llm/simple/docs-search-agent-tool.js.map +1 -0
- package/dist/tools/llm/simple/file-tools.d.ts +13 -0
- package/dist/tools/llm/simple/file-tools.d.ts.map +1 -0
- package/dist/tools/llm/simple/file-tools.js +785 -0
- package/dist/tools/llm/simple/file-tools.js.map +1 -0
- package/dist/tools/llm/simple/final-response-tool.d.ts +12 -0
- package/dist/tools/llm/simple/final-response-tool.d.ts.map +1 -0
- package/dist/tools/llm/simple/final-response-tool.js +107 -0
- package/dist/tools/llm/simple/final-response-tool.js.map +1 -0
- package/dist/tools/llm/simple/index.d.ts +11 -0
- package/dist/tools/llm/simple/index.d.ts.map +1 -0
- package/dist/tools/llm/simple/index.js +20 -0
- package/dist/tools/llm/simple/index.js.map +1 -0
- package/dist/tools/llm/simple/planning-tools.d.ts +5 -0
- package/dist/tools/llm/simple/planning-tools.d.ts.map +1 -0
- package/dist/tools/llm/simple/planning-tools.js +117 -0
- package/dist/tools/llm/simple/planning-tools.js.map +1 -0
- package/dist/tools/llm/simple/powershell-tool.d.ts +4 -0
- package/dist/tools/llm/simple/powershell-tool.d.ts.map +1 -0
- package/dist/tools/llm/simple/powershell-tool.js +178 -0
- package/dist/tools/llm/simple/powershell-tool.js.map +1 -0
- package/dist/tools/llm/simple/simple-tool-executor.d.ts +38 -0
- package/dist/tools/llm/simple/simple-tool-executor.d.ts.map +1 -0
- package/dist/tools/llm/simple/simple-tool-executor.js +134 -0
- package/dist/tools/llm/simple/simple-tool-executor.js.map +1 -0
- package/dist/tools/llm/simple/todo-tools.d.ts +15 -0
- package/dist/tools/llm/simple/todo-tools.d.ts.map +1 -0
- package/dist/tools/llm/simple/todo-tools.js +145 -0
- package/dist/tools/llm/simple/todo-tools.js.map +1 -0
- package/dist/tools/llm/simple/user-interaction-tools.d.ts +22 -0
- package/dist/tools/llm/simple/user-interaction-tools.d.ts.map +1 -0
- package/dist/tools/llm/simple/user-interaction-tools.js +168 -0
- package/dist/tools/llm/simple/user-interaction-tools.js.map +1 -0
- package/dist/tools/office/common/constants.d.ts +194 -0
- package/dist/tools/office/common/constants.d.ts.map +1 -0
- package/dist/tools/office/common/constants.js +169 -0
- package/dist/tools/office/common/constants.js.map +1 -0
- package/dist/tools/office/common/index.d.ts +4 -0
- package/dist/tools/office/common/index.d.ts.map +1 -0
- package/dist/tools/office/common/index.js +3 -0
- package/dist/tools/office/common/index.js.map +1 -0
- package/dist/tools/office/common/types.d.ts +82 -0
- package/dist/tools/office/common/types.d.ts.map +1 -0
- package/dist/tools/office/common/types.js +2 -0
- package/dist/tools/office/common/types.js.map +1 -0
- package/dist/tools/office/common/utils.d.ts +14 -0
- package/dist/tools/office/common/utils.d.ts.map +1 -0
- package/dist/tools/office/common/utils.js +58 -0
- package/dist/tools/office/common/utils.js.map +1 -0
- package/dist/tools/office/excel-client.d.ts +123 -0
- package/dist/tools/office/excel-client.d.ts.map +1 -0
- package/dist/tools/office/excel-client.js +1037 -0
- package/dist/tools/office/excel-client.js.map +1 -0
- package/dist/tools/office/excel-tools/cells.d.ts +10 -0
- package/dist/tools/office/excel-tools/cells.d.ts.map +1 -0
- package/dist/tools/office/excel-tools/cells.js +279 -0
- package/dist/tools/office/excel-tools/cells.js.map +1 -0
- package/dist/tools/office/excel-tools/charts.d.ts +6 -0
- package/dist/tools/office/excel-tools/charts.d.ts.map +1 -0
- package/dist/tools/office/excel-tools/charts.js +124 -0
- package/dist/tools/office/excel-tools/charts.js.map +1 -0
- package/dist/tools/office/excel-tools/comments.d.ts +6 -0
- package/dist/tools/office/excel-tools/comments.d.ts.map +1 -0
- package/dist/tools/office/excel-tools/comments.js +114 -0
- package/dist/tools/office/excel-tools/comments.js.map +1 -0
- package/dist/tools/office/excel-tools/data-ops.d.ts +10 -0
- package/dist/tools/office/excel-tools/data-ops.d.ts.map +1 -0
- package/dist/tools/office/excel-tools/data-ops.js +266 -0
- package/dist/tools/office/excel-tools/data-ops.js.map +1 -0
- package/dist/tools/office/excel-tools/export.d.ts +5 -0
- package/dist/tools/office/excel-tools/export.d.ts.map +1 -0
- package/dist/tools/office/excel-tools/export.js +75 -0
- package/dist/tools/office/excel-tools/export.js.map +1 -0
- package/dist/tools/office/excel-tools/formatting.d.ts +10 -0
- package/dist/tools/office/excel-tools/formatting.d.ts.map +1 -0
- package/dist/tools/office/excel-tools/formatting.js +276 -0
- package/dist/tools/office/excel-tools/formatting.js.map +1 -0
- package/dist/tools/office/excel-tools/index.d.ts +16 -0
- package/dist/tools/office/excel-tools/index.d.ts.map +1 -0
- package/dist/tools/office/excel-tools/index.js +42 -0
- package/dist/tools/office/excel-tools/index.js.map +1 -0
- package/dist/tools/office/excel-tools/launch.d.ts +10 -0
- package/dist/tools/office/excel-tools/launch.d.ts.map +1 -0
- package/dist/tools/office/excel-tools/launch.js +248 -0
- package/dist/tools/office/excel-tools/launch.js.map +1 -0
- package/dist/tools/office/excel-tools/media.d.ts +5 -0
- package/dist/tools/office/excel-tools/media.d.ts.map +1 -0
- package/dist/tools/office/excel-tools/media.js +84 -0
- package/dist/tools/office/excel-tools/media.js.map +1 -0
- package/dist/tools/office/excel-tools/named-ranges.d.ts +6 -0
- package/dist/tools/office/excel-tools/named-ranges.d.ts.map +1 -0
- package/dist/tools/office/excel-tools/named-ranges.js +113 -0
- package/dist/tools/office/excel-tools/named-ranges.js.map +1 -0
- package/dist/tools/office/excel-tools/protection.d.ts +5 -0
- package/dist/tools/office/excel-tools/protection.d.ts.map +1 -0
- package/dist/tools/office/excel-tools/protection.js +75 -0
- package/dist/tools/office/excel-tools/protection.js.map +1 -0
- package/dist/tools/office/excel-tools/rows-columns.d.ts +11 -0
- package/dist/tools/office/excel-tools/rows-columns.d.ts.map +1 -0
- package/dist/tools/office/excel-tools/rows-columns.js +293 -0
- package/dist/tools/office/excel-tools/rows-columns.js.map +1 -0
- package/dist/tools/office/excel-tools/sheets.d.ts +8 -0
- package/dist/tools/office/excel-tools/sheets.d.ts.map +1 -0
- package/dist/tools/office/excel-tools/sheets.js +177 -0
- package/dist/tools/office/excel-tools/sheets.js.map +1 -0
- package/dist/tools/office/excel-tools/validation.d.ts +7 -0
- package/dist/tools/office/excel-tools/validation.d.ts.map +1 -0
- package/dist/tools/office/excel-tools/validation.js +175 -0
- package/dist/tools/office/excel-tools/validation.js.map +1 -0
- package/dist/tools/office/excel-tools.d.ts +3 -0
- package/dist/tools/office/excel-tools.d.ts.map +1 -0
- package/dist/tools/office/excel-tools.js +3 -0
- package/dist/tools/office/excel-tools.js.map +1 -0
- package/dist/tools/office/index.d.ts +6 -0
- package/dist/tools/office/index.d.ts.map +1 -0
- package/dist/tools/office/index.js +9 -0
- package/dist/tools/office/index.js.map +1 -0
- package/dist/tools/office/office-client-base.d.ts +31 -0
- package/dist/tools/office/office-client-base.d.ts.map +1 -0
- package/dist/tools/office/office-client-base.js +154 -0
- package/dist/tools/office/office-client-base.js.map +1 -0
- package/dist/tools/office/office-client.d.ts +196 -0
- package/dist/tools/office/office-client.d.ts.map +1 -0
- package/dist/tools/office/office-client.js +200 -0
- package/dist/tools/office/office-client.js.map +1 -0
- package/dist/tools/office/powerpoint-client.d.ts +135 -0
- package/dist/tools/office/powerpoint-client.d.ts.map +1 -0
- package/dist/tools/office/powerpoint-client.js +1136 -0
- package/dist/tools/office/powerpoint-client.js.map +1 -0
- package/dist/tools/office/powerpoint-tools/effects.d.ts +9 -0
- package/dist/tools/office/powerpoint-tools/effects.d.ts.map +1 -0
- package/dist/tools/office/powerpoint-tools/effects.js +246 -0
- package/dist/tools/office/powerpoint-tools/effects.js.map +1 -0
- package/dist/tools/office/powerpoint-tools/export.d.ts +6 -0
- package/dist/tools/office/powerpoint-tools/export.d.ts.map +1 -0
- package/dist/tools/office/powerpoint-tools/export.js +108 -0
- package/dist/tools/office/powerpoint-tools/export.js.map +1 -0
- package/dist/tools/office/powerpoint-tools/index.d.ts +13 -0
- package/dist/tools/office/powerpoint-tools/index.d.ts.map +1 -0
- package/dist/tools/office/powerpoint-tools/index.js +33 -0
- package/dist/tools/office/powerpoint-tools/index.js.map +1 -0
- package/dist/tools/office/powerpoint-tools/launch.d.ts +9 -0
- package/dist/tools/office/powerpoint-tools/launch.d.ts.map +1 -0
- package/dist/tools/office/powerpoint-tools/launch.js +214 -0
- package/dist/tools/office/powerpoint-tools/launch.js.map +1 -0
- package/dist/tools/office/powerpoint-tools/media.d.ts +8 -0
- package/dist/tools/office/powerpoint-tools/media.d.ts.map +1 -0
- package/dist/tools/office/powerpoint-tools/media.js +211 -0
- package/dist/tools/office/powerpoint-tools/media.js.map +1 -0
- package/dist/tools/office/powerpoint-tools/notes.d.ts +8 -0
- package/dist/tools/office/powerpoint-tools/notes.d.ts.map +1 -0
- package/dist/tools/office/powerpoint-tools/notes.js +171 -0
- package/dist/tools/office/powerpoint-tools/notes.js.map +1 -0
- package/dist/tools/office/powerpoint-tools/sections.d.ts +6 -0
- package/dist/tools/office/powerpoint-tools/sections.d.ts.map +1 -0
- package/dist/tools/office/powerpoint-tools/sections.js +104 -0
- package/dist/tools/office/powerpoint-tools/sections.js.map +1 -0
- package/dist/tools/office/powerpoint-tools/shapes.d.ts +22 -0
- package/dist/tools/office/powerpoint-tools/shapes.d.ts.map +1 -0
- package/dist/tools/office/powerpoint-tools/shapes.js +681 -0
- package/dist/tools/office/powerpoint-tools/shapes.js.map +1 -0
- package/dist/tools/office/powerpoint-tools/slides.d.ts +11 -0
- package/dist/tools/office/powerpoint-tools/slides.d.ts.map +1 -0
- package/dist/tools/office/powerpoint-tools/slides.js +283 -0
- package/dist/tools/office/powerpoint-tools/slides.js.map +1 -0
- package/dist/tools/office/powerpoint-tools/tables.d.ts +6 -0
- package/dist/tools/office/powerpoint-tools/tables.d.ts.map +1 -0
- package/dist/tools/office/powerpoint-tools/tables.js +132 -0
- package/dist/tools/office/powerpoint-tools/tables.js.map +1 -0
- package/dist/tools/office/powerpoint-tools/text.d.ts +12 -0
- package/dist/tools/office/powerpoint-tools/text.d.ts.map +1 -0
- package/dist/tools/office/powerpoint-tools/text.js +366 -0
- package/dist/tools/office/powerpoint-tools/text.js.map +1 -0
- package/dist/tools/office/powerpoint-tools.d.ts +3 -0
- package/dist/tools/office/powerpoint-tools.d.ts.map +1 -0
- package/dist/tools/office/powerpoint-tools.js +3 -0
- package/dist/tools/office/powerpoint-tools.js.map +1 -0
- package/dist/tools/office/word-client.d.ts +147 -0
- package/dist/tools/office/word-client.d.ts.map +1 -0
- package/dist/tools/office/word-client.js +1341 -0
- package/dist/tools/office/word-client.js.map +1 -0
- package/dist/tools/office/word-tools/bookmarks.d.ts +7 -0
- package/dist/tools/office/word-tools/bookmarks.d.ts.map +1 -0
- package/dist/tools/office/word-tools/bookmarks.js +146 -0
- package/dist/tools/office/word-tools/bookmarks.js.map +1 -0
- package/dist/tools/office/word-tools/comments.d.ts +7 -0
- package/dist/tools/office/word-tools/comments.d.ts.map +1 -0
- package/dist/tools/office/word-tools/comments.js +146 -0
- package/dist/tools/office/word-tools/comments.js.map +1 -0
- package/dist/tools/office/word-tools/content.d.ts +7 -0
- package/dist/tools/office/word-tools/content.d.ts.map +1 -0
- package/dist/tools/office/word-tools/content.js +168 -0
- package/dist/tools/office/word-tools/content.js.map +1 -0
- package/dist/tools/office/word-tools/export.d.ts +5 -0
- package/dist/tools/office/word-tools/export.d.ts.map +1 -0
- package/dist/tools/office/word-tools/export.js +73 -0
- package/dist/tools/office/word-tools/export.js.map +1 -0
- package/dist/tools/office/word-tools/formatting.d.ts +6 -0
- package/dist/tools/office/word-tools/formatting.d.ts.map +1 -0
- package/dist/tools/office/word-tools/formatting.js +129 -0
- package/dist/tools/office/word-tools/formatting.js.map +1 -0
- package/dist/tools/office/word-tools/headers-footers.d.ts +6 -0
- package/dist/tools/office/word-tools/headers-footers.d.ts.map +1 -0
- package/dist/tools/office/word-tools/headers-footers.js +117 -0
- package/dist/tools/office/word-tools/headers-footers.js.map +1 -0
- package/dist/tools/office/word-tools/index.d.ts +16 -0
- package/dist/tools/office/word-tools/index.d.ts.map +1 -0
- package/dist/tools/office/word-tools/index.js +45 -0
- package/dist/tools/office/word-tools/index.js.map +1 -0
- package/dist/tools/office/word-tools/launch.d.ts +10 -0
- package/dist/tools/office/word-tools/launch.d.ts.map +1 -0
- package/dist/tools/office/word-tools/launch.js +255 -0
- package/dist/tools/office/word-tools/launch.js.map +1 -0
- package/dist/tools/office/word-tools/lists.d.ts +5 -0
- package/dist/tools/office/word-tools/lists.d.ts.map +1 -0
- package/dist/tools/office/word-tools/lists.js +73 -0
- package/dist/tools/office/word-tools/lists.js.map +1 -0
- package/dist/tools/office/word-tools/navigation.d.ts +5 -0
- package/dist/tools/office/word-tools/navigation.d.ts.map +1 -0
- package/dist/tools/office/word-tools/navigation.js +85 -0
- package/dist/tools/office/word-tools/navigation.js.map +1 -0
- package/dist/tools/office/word-tools/page-setup.d.ts +7 -0
- package/dist/tools/office/word-tools/page-setup.d.ts.map +1 -0
- package/dist/tools/office/word-tools/page-setup.js +152 -0
- package/dist/tools/office/word-tools/page-setup.js.map +1 -0
- package/dist/tools/office/word-tools/tables.d.ts +8 -0
- package/dist/tools/office/word-tools/tables.d.ts.map +1 -0
- package/dist/tools/office/word-tools/tables.js +197 -0
- package/dist/tools/office/word-tools/tables.js.map +1 -0
- package/dist/tools/office/word-tools/text.d.ts +9 -0
- package/dist/tools/office/word-tools/text.d.ts.map +1 -0
- package/dist/tools/office/word-tools/text.js +235 -0
- package/dist/tools/office/word-tools/text.js.map +1 -0
- package/dist/tools/office/word-tools/undo-redo.d.ts +5 -0
- package/dist/tools/office/word-tools/undo-redo.d.ts.map +1 -0
- package/dist/tools/office/word-tools/undo-redo.js +73 -0
- package/dist/tools/office/word-tools/undo-redo.js.map +1 -0
- package/dist/tools/office/word-tools/watermarks.d.ts +5 -0
- package/dist/tools/office/word-tools/watermarks.d.ts.map +1 -0
- package/dist/tools/office/word-tools/watermarks.js +81 -0
- package/dist/tools/office/word-tools/watermarks.js.map +1 -0
- package/dist/tools/office/word-tools.d.ts +3 -0
- package/dist/tools/office/word-tools.d.ts.map +1 -0
- package/dist/tools/office/word-tools.js +3 -0
- package/dist/tools/office/word-tools.js.map +1 -0
- package/dist/tools/registry.d.ts +53 -0
- package/dist/tools/registry.d.ts.map +1 -0
- package/dist/tools/registry.js +278 -0
- package/dist/tools/registry.js.map +1 -0
- package/dist/tools/types.d.ts +88 -0
- package/dist/tools/types.d.ts.map +1 -0
- package/dist/tools/types.js +19 -0
- package/dist/tools/types.js.map +1 -0
- package/dist/types/index.d.ts +126 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +2 -0
- package/dist/types/index.js.map +1 -0
- package/dist/ui/PlanExecuteView.d.ts +11 -0
- package/dist/ui/PlanExecuteView.d.ts.map +1 -0
- package/dist/ui/PlanExecuteView.js +29 -0
- package/dist/ui/PlanExecuteView.js.map +1 -0
- package/dist/ui/TodoPanel.d.ts +13 -0
- package/dist/ui/TodoPanel.d.ts.map +1 -0
- package/dist/ui/TodoPanel.js +135 -0
- package/dist/ui/TodoPanel.js.map +1 -0
- package/dist/ui/UpdateNotification.d.ts +13 -0
- package/dist/ui/UpdateNotification.d.ts.map +1 -0
- package/dist/ui/UpdateNotification.js +42 -0
- package/dist/ui/UpdateNotification.js.map +1 -0
- package/dist/ui/components/ActivityIndicator.d.ts +25 -0
- package/dist/ui/components/ActivityIndicator.d.ts.map +1 -0
- package/dist/ui/components/ActivityIndicator.js +115 -0
- package/dist/ui/components/ActivityIndicator.js.map +1 -0
- package/dist/ui/components/CommandBrowser.d.ts +10 -0
- package/dist/ui/components/CommandBrowser.d.ts.map +1 -0
- package/dist/ui/components/CommandBrowser.js +53 -0
- package/dist/ui/components/CommandBrowser.js.map +1 -0
- package/dist/ui/components/CustomTextInput.d.ts +13 -0
- package/dist/ui/components/CustomTextInput.d.ts.map +1 -0
- package/dist/ui/components/CustomTextInput.js +245 -0
- package/dist/ui/components/CustomTextInput.js.map +1 -0
- package/dist/ui/components/DocsSearchProgress.d.ts +13 -0
- package/dist/ui/components/DocsSearchProgress.d.ts.map +1 -0
- package/dist/ui/components/DocsSearchProgress.js +37 -0
- package/dist/ui/components/DocsSearchProgress.js.map +1 -0
- package/dist/ui/components/FileBrowser.d.ts +11 -0
- package/dist/ui/components/FileBrowser.d.ts.map +1 -0
- package/dist/ui/components/FileBrowser.js +45 -0
- package/dist/ui/components/FileBrowser.js.map +1 -0
- package/dist/ui/components/LLMSetupWizard.d.ts +8 -0
- package/dist/ui/components/LLMSetupWizard.d.ts.map +1 -0
- package/dist/ui/components/LLMSetupWizard.js +192 -0
- package/dist/ui/components/LLMSetupWizard.js.map +1 -0
- package/dist/ui/components/Logo.d.ts +19 -0
- package/dist/ui/components/Logo.d.ts.map +1 -0
- package/dist/ui/components/Logo.js +55 -0
- package/dist/ui/components/Logo.js.map +1 -0
- package/dist/ui/components/MarkdownRenderer.d.ts +9 -0
- package/dist/ui/components/MarkdownRenderer.d.ts.map +1 -0
- package/dist/ui/components/MarkdownRenderer.js +198 -0
- package/dist/ui/components/MarkdownRenderer.js.map +1 -0
- package/dist/ui/components/ModelSelector.d.ts +8 -0
- package/dist/ui/components/ModelSelector.d.ts.map +1 -0
- package/dist/ui/components/ModelSelector.js +111 -0
- package/dist/ui/components/ModelSelector.js.map +1 -0
- package/dist/ui/components/PlanExecuteApp.d.ts +23 -0
- package/dist/ui/components/PlanExecuteApp.d.ts.map +1 -0
- package/dist/ui/components/PlanExecuteApp.js +1324 -0
- package/dist/ui/components/PlanExecuteApp.js.map +1 -0
- package/dist/ui/components/ProgressBar.d.ts +10 -0
- package/dist/ui/components/ProgressBar.d.ts.map +1 -0
- package/dist/ui/components/ProgressBar.js +26 -0
- package/dist/ui/components/ProgressBar.js.map +1 -0
- package/dist/ui/components/StatusBar.d.ts +23 -0
- package/dist/ui/components/StatusBar.d.ts.map +1 -0
- package/dist/ui/components/StatusBar.js +162 -0
- package/dist/ui/components/StatusBar.js.map +1 -0
- package/dist/ui/components/ThinkingIndicator.d.ts +14 -0
- package/dist/ui/components/ThinkingIndicator.d.ts.map +1 -0
- package/dist/ui/components/ThinkingIndicator.js +63 -0
- package/dist/ui/components/ThinkingIndicator.js.map +1 -0
- package/dist/ui/components/TodoListView.d.ts +11 -0
- package/dist/ui/components/TodoListView.d.ts.map +1 -0
- package/dist/ui/components/TodoListView.js +69 -0
- package/dist/ui/components/TodoListView.js.map +1 -0
- package/dist/ui/components/ToolSelector.d.ts +7 -0
- package/dist/ui/components/ToolSelector.d.ts.map +1 -0
- package/dist/ui/components/ToolSelector.js +111 -0
- package/dist/ui/components/ToolSelector.js.map +1 -0
- package/dist/ui/components/dialogs/ApprovalDialog.d.ts +13 -0
- package/dist/ui/components/dialogs/ApprovalDialog.d.ts.map +1 -0
- package/dist/ui/components/dialogs/ApprovalDialog.js +173 -0
- package/dist/ui/components/dialogs/ApprovalDialog.js.map +1 -0
- package/dist/ui/components/dialogs/AskUserDialog.d.ts +9 -0
- package/dist/ui/components/dialogs/AskUserDialog.d.ts.map +1 -0
- package/dist/ui/components/dialogs/AskUserDialog.js +111 -0
- package/dist/ui/components/dialogs/AskUserDialog.js.map +1 -0
- package/dist/ui/components/dialogs/DocsBrowser.d.ts +8 -0
- package/dist/ui/components/dialogs/DocsBrowser.d.ts.map +1 -0
- package/dist/ui/components/dialogs/DocsBrowser.js +127 -0
- package/dist/ui/components/dialogs/DocsBrowser.js.map +1 -0
- package/dist/ui/components/dialogs/SettingsDialog.d.ts +10 -0
- package/dist/ui/components/dialogs/SettingsDialog.d.ts.map +1 -0
- package/dist/ui/components/dialogs/SettingsDialog.js +563 -0
- package/dist/ui/components/dialogs/SettingsDialog.js.map +1 -0
- package/dist/ui/components/dialogs/index.d.ts +4 -0
- package/dist/ui/components/dialogs/index.d.ts.map +1 -0
- package/dist/ui/components/dialogs/index.js +4 -0
- package/dist/ui/components/dialogs/index.js.map +1 -0
- package/dist/ui/components/index.d.ts +12 -0
- package/dist/ui/components/index.d.ts.map +1 -0
- package/dist/ui/components/index.js +9 -0
- package/dist/ui/components/index.js.map +1 -0
- package/dist/ui/components/panels/LogPanel.d.ts +7 -0
- package/dist/ui/components/panels/LogPanel.d.ts.map +1 -0
- package/dist/ui/components/panels/LogPanel.js +280 -0
- package/dist/ui/components/panels/LogPanel.js.map +1 -0
- package/dist/ui/components/panels/SessionPanel.d.ts +8 -0
- package/dist/ui/components/panels/SessionPanel.d.ts.map +1 -0
- package/dist/ui/components/panels/SessionPanel.js +81 -0
- package/dist/ui/components/panels/SessionPanel.js.map +1 -0
- package/dist/ui/components/panels/index.d.ts +4 -0
- package/dist/ui/components/panels/index.d.ts.map +1 -0
- package/dist/ui/components/panels/index.js +4 -0
- package/dist/ui/components/panels/index.js.map +1 -0
- package/dist/ui/components/views/ChatView.d.ts +12 -0
- package/dist/ui/components/views/ChatView.d.ts.map +1 -0
- package/dist/ui/components/views/ChatView.js +289 -0
- package/dist/ui/components/views/ChatView.js.map +1 -0
- package/dist/ui/components/views/index.d.ts +2 -0
- package/dist/ui/components/views/index.d.ts.map +1 -0
- package/dist/ui/components/views/index.js +2 -0
- package/dist/ui/components/views/index.js.map +1 -0
- package/dist/ui/contexts/TokenContext.d.ts +29 -0
- package/dist/ui/contexts/TokenContext.d.ts.map +1 -0
- package/dist/ui/contexts/TokenContext.js +79 -0
- package/dist/ui/contexts/TokenContext.js.map +1 -0
- package/dist/ui/hooks/atFileProcessor.d.ts +15 -0
- package/dist/ui/hooks/atFileProcessor.d.ts.map +1 -0
- package/dist/ui/hooks/atFileProcessor.js +88 -0
- package/dist/ui/hooks/atFileProcessor.js.map +1 -0
- package/dist/ui/hooks/index.d.ts +8 -0
- package/dist/ui/hooks/index.d.ts.map +1 -0
- package/dist/ui/hooks/index.js +8 -0
- package/dist/ui/hooks/index.js.map +1 -0
- package/dist/ui/hooks/slashCommandProcessor.d.ts +21 -0
- package/dist/ui/hooks/slashCommandProcessor.d.ts.map +1 -0
- package/dist/ui/hooks/slashCommandProcessor.js +100 -0
- package/dist/ui/hooks/slashCommandProcessor.js.map +1 -0
- package/dist/ui/hooks/useCommandBrowserState.d.ts +12 -0
- package/dist/ui/hooks/useCommandBrowserState.d.ts.map +1 -0
- package/dist/ui/hooks/useCommandBrowserState.js +66 -0
- package/dist/ui/hooks/useCommandBrowserState.js.map +1 -0
- package/dist/ui/hooks/useFileBrowserState.d.ts +15 -0
- package/dist/ui/hooks/useFileBrowserState.d.ts.map +1 -0
- package/dist/ui/hooks/useFileBrowserState.js +80 -0
- package/dist/ui/hooks/useFileBrowserState.js.map +1 -0
- package/dist/ui/hooks/useFileList.d.ts +20 -0
- package/dist/ui/hooks/useFileList.d.ts.map +1 -0
- package/dist/ui/hooks/useFileList.js +57 -0
- package/dist/ui/hooks/useFileList.js.map +1 -0
- package/dist/ui/hooks/useInputHistory.d.ts +9 -0
- package/dist/ui/hooks/useInputHistory.d.ts.map +1 -0
- package/dist/ui/hooks/useInputHistory.js +68 -0
- package/dist/ui/hooks/useInputHistory.js.map +1 -0
- package/dist/ui/hooks/usePlanExecution.d.ts +8 -0
- package/dist/ui/hooks/usePlanExecution.d.ts.map +1 -0
- package/dist/ui/hooks/usePlanExecution.js +214 -0
- package/dist/ui/hooks/usePlanExecution.js.map +1 -0
- package/dist/ui/index.d.ts +7 -0
- package/dist/ui/index.d.ts.map +1 -0
- package/dist/ui/index.js +7 -0
- package/dist/ui/index.js.map +1 -0
- package/dist/ui/ink-entry.d.ts +3 -0
- package/dist/ui/ink-entry.d.ts.map +1 -0
- package/dist/ui/ink-entry.js +22 -0
- package/dist/ui/ink-entry.js.map +1 -0
- package/dist/utils/env-filter.d.ts +4 -0
- package/dist/utils/env-filter.d.ts.map +1 -0
- package/dist/utils/env-filter.js +101 -0
- package/dist/utils/env-filter.js.map +1 -0
- package/dist/utils/file-system.d.ts +9 -0
- package/dist/utils/file-system.d.ts.map +1 -0
- package/dist/utils/file-system.js +99 -0
- package/dist/utils/file-system.js.map +1 -0
- package/dist/utils/git-utils.d.ts +2 -0
- package/dist/utils/git-utils.d.ts.map +1 -0
- package/dist/utils/git-utils.js +16 -0
- package/dist/utils/git-utils.js.map +1 -0
- package/dist/utils/json-stream-logger.d.ts +74 -0
- package/dist/utils/json-stream-logger.d.ts.map +1 -0
- package/dist/utils/json-stream-logger.js +808 -0
- package/dist/utils/json-stream-logger.js.map +1 -0
- package/dist/utils/logger.d.ts +152 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +1672 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/utils/platform-utils.d.ts +19 -0
- package/dist/utils/platform-utils.d.ts.map +1 -0
- package/dist/utils/platform-utils.js +134 -0
- package/dist/utils/platform-utils.js.map +1 -0
- package/dist/utils/wsl-utils.d.ts +4 -0
- package/dist/utils/wsl-utils.d.ts.map +1 -0
- package/dist/utils/wsl-utils.js +72 -0
- package/dist/utils/wsl-utils.js.map +1 -0
- package/electron.vite.config.ts +63 -0
- package/google374b9eba0c52b043.html +1 -0
- package/package.json +122 -0
- package/src/agents/base/base-agent.ts +159 -0
- package/src/agents/docs-search/index.ts +365 -0
- package/src/agents/index.ts +34 -0
- package/src/agents/planner/index.ts +544 -0
- package/src/cli.ts +201 -0
- package/src/constants.ts +47 -0
- package/src/core/compact/compact-manager.ts +160 -0
- package/src/core/compact/compact-prompts.ts +150 -0
- package/src/core/compact/context-tracker.ts +164 -0
- package/src/core/compact/index.ts +25 -0
- package/src/core/config/config-manager.ts +460 -0
- package/src/core/config/index.ts +5 -0
- package/src/core/docs-manager.ts +678 -0
- package/src/core/llm/index.ts +7 -0
- package/src/core/llm/llm-client.ts +1550 -0
- package/src/core/session/index.ts +5 -0
- package/src/core/session/session-manager.ts +464 -0
- package/src/core/slash-command-handler.ts +410 -0
- package/src/core/usage-tracker.ts +438 -0
- package/src/errors/base.ts +81 -0
- package/src/errors/file.ts +183 -0
- package/src/errors/index.ts +95 -0
- package/src/errors/llm.ts +151 -0
- package/src/errors/network.ts +124 -0
- package/src/errors/validation.ts +111 -0
- package/src/eval/eval-runner.ts +456 -0
- package/src/eval/index.ts +8 -0
- package/src/eval/types.ts +139 -0
- package/src/index.ts +22 -0
- package/src/orchestration/index.ts +30 -0
- package/src/orchestration/plan-executor.ts +652 -0
- package/src/orchestration/types.ts +127 -0
- package/src/orchestration/utils.ts +119 -0
- package/src/orquesta/connection.ts +291 -0
- package/src/prompts/agents/docs-search-decision.ts +74 -0
- package/src/prompts/agents/docs-search.ts +84 -0
- package/src/prompts/agents/planning.ts +143 -0
- package/src/prompts/index.ts +31 -0
- package/src/prompts/shared/codebase-rules.ts +29 -0
- package/src/prompts/shared/git-rules.ts +94 -0
- package/src/prompts/shared/language-rules.ts +36 -0
- package/src/prompts/shared/tool-usage.ts +72 -0
- package/src/prompts/system/compact.ts +80 -0
- package/src/prompts/system/plan-execute.ts +89 -0
- package/src/tools/browser/browser-client.ts +1363 -0
- package/src/tools/browser/browser-tools.ts +1139 -0
- package/src/tools/browser/index.ts +65 -0
- package/src/tools/index.ts +23 -0
- package/src/tools/llm/agents/docs-search-tools.ts +368 -0
- package/src/tools/llm/agents/index.ts +22 -0
- package/src/tools/llm/index.ts +11 -0
- package/src/tools/llm/simple/ask-user-tool.ts +25 -0
- package/src/tools/llm/simple/background-bash-tool.ts +443 -0
- package/src/tools/llm/simple/background-powershell-tool.ts +421 -0
- package/src/tools/llm/simple/bash-tool.ts +238 -0
- package/src/tools/llm/simple/docs-search-agent-tool.ts +146 -0
- package/src/tools/llm/simple/file-tools.ts +1051 -0
- package/src/tools/llm/simple/final-response-tool.ts +180 -0
- package/src/tools/llm/simple/index.ts +42 -0
- package/src/tools/llm/simple/planning-tools.ts +143 -0
- package/src/tools/llm/simple/powershell-tool.ts +241 -0
- package/src/tools/llm/simple/simple-tool-executor.ts +279 -0
- package/src/tools/llm/simple/todo-tools.ts +207 -0
- package/src/tools/llm/simple/user-interaction-tools.ts +277 -0
- package/src/tools/office/common/constants.ts +335 -0
- package/src/tools/office/common/index.ts +133 -0
- package/src/tools/office/common/types.ts +286 -0
- package/src/tools/office/common/utils.ts +116 -0
- package/src/tools/office/excel-client.ts +1336 -0
- package/src/tools/office/excel-tools/cells.ts +359 -0
- package/src/tools/office/excel-tools/charts.ts +166 -0
- package/src/tools/office/excel-tools/comments.ts +155 -0
- package/src/tools/office/excel-tools/data-ops.ts +349 -0
- package/src/tools/office/excel-tools/export.ts +105 -0
- package/src/tools/office/excel-tools/formatting.ts +357 -0
- package/src/tools/office/excel-tools/index.ts +55 -0
- package/src/tools/office/excel-tools/launch.ts +303 -0
- package/src/tools/office/excel-tools/media.ts +117 -0
- package/src/tools/office/excel-tools/named-ranges.ts +148 -0
- package/src/tools/office/excel-tools/protection.ts +105 -0
- package/src/tools/office/excel-tools/rows-columns.ts +386 -0
- package/src/tools/office/excel-tools/sheets.ts +228 -0
- package/src/tools/office/excel-tools/validation.ts +226 -0
- package/src/tools/office/excel-tools.ts +9 -0
- package/src/tools/office/index.ts +259 -0
- package/src/tools/office/office-client-base.ts +242 -0
- package/src/tools/office/office-client.ts +377 -0
- package/src/tools/office/powerpoint-client.ts +1498 -0
- package/src/tools/office/powerpoint-tools/effects.ts +315 -0
- package/src/tools/office/powerpoint-tools/export.ts +138 -0
- package/src/tools/office/powerpoint-tools/index.ts +45 -0
- package/src/tools/office/powerpoint-tools/launch.ts +263 -0
- package/src/tools/office/powerpoint-tools/media.ts +291 -0
- package/src/tools/office/powerpoint-tools/notes.ts +220 -0
- package/src/tools/office/powerpoint-tools/sections.ts +140 -0
- package/src/tools/office/powerpoint-tools/shapes.ts +870 -0
- package/src/tools/office/powerpoint-tools/slides.ts +350 -0
- package/src/tools/office/powerpoint-tools/tables.ts +182 -0
- package/src/tools/office/powerpoint-tools/text.ts +473 -0
- package/src/tools/office/powerpoint-tools.ts +9 -0
- package/src/tools/office/word-client.ts +1697 -0
- package/src/tools/office/word-tools/bookmarks.ts +186 -0
- package/src/tools/office/word-tools/comments.ts +185 -0
- package/src/tools/office/word-tools/content.ts +229 -0
- package/src/tools/office/word-tools/export.ts +97 -0
- package/src/tools/office/word-tools/formatting.ts +161 -0
- package/src/tools/office/word-tools/headers-footers.ts +155 -0
- package/src/tools/office/word-tools/index.ts +57 -0
- package/src/tools/office/word-tools/launch.ts +312 -0
- package/src/tools/office/word-tools/lists.ts +97 -0
- package/src/tools/office/word-tools/navigation.ts +114 -0
- package/src/tools/office/word-tools/page-setup.ts +195 -0
- package/src/tools/office/word-tools/tables.ts +262 -0
- package/src/tools/office/word-tools/text.ts +294 -0
- package/src/tools/office/word-tools/undo-redo.ts +97 -0
- package/src/tools/office/word-tools/watermarks.ts +105 -0
- package/src/tools/office/word-tools.ts +9 -0
- package/src/tools/registry.ts +527 -0
- package/src/tools/types.ts +231 -0
- package/src/types/index.ts +181 -0
- package/src/ui/PlanExecuteView.tsx +119 -0
- package/src/ui/TodoPanel.tsx +240 -0
- package/src/ui/UpdateNotification.tsx +105 -0
- package/src/ui/components/ActivityIndicator.tsx +234 -0
- package/src/ui/components/CommandBrowser.tsx +114 -0
- package/src/ui/components/CustomTextInput.tsx +389 -0
- package/src/ui/components/DocsSearchProgress.tsx +85 -0
- package/src/ui/components/FileBrowser.tsx +93 -0
- package/src/ui/components/LLMSetupWizard.tsx +333 -0
- package/src/ui/components/Logo.tsx +125 -0
- package/src/ui/components/MarkdownRenderer.tsx +358 -0
- package/src/ui/components/ModelSelector.tsx +203 -0
- package/src/ui/components/PlanExecuteApp.tsx +2007 -0
- package/src/ui/components/ProgressBar.tsx +51 -0
- package/src/ui/components/StatusBar.tsx +302 -0
- package/src/ui/components/ThinkingIndicator.tsx +120 -0
- package/src/ui/components/TodoListView.tsx +140 -0
- package/src/ui/components/ToolSelector.tsx +215 -0
- package/src/ui/components/dialogs/ApprovalDialog.tsx +259 -0
- package/src/ui/components/dialogs/AskUserDialog.tsx +159 -0
- package/src/ui/components/dialogs/DocsBrowser.tsx +222 -0
- package/src/ui/components/dialogs/SettingsDialog.tsx +939 -0
- package/src/ui/components/dialogs/index.ts +13 -0
- package/src/ui/components/index.ts +27 -0
- package/src/ui/components/panels/LogPanel.tsx +385 -0
- package/src/ui/components/panels/SessionPanel.tsx +146 -0
- package/src/ui/components/panels/index.ts +13 -0
- package/src/ui/components/views/ChatView.tsx +447 -0
- package/src/ui/components/views/index.ts +5 -0
- package/src/ui/contexts/TokenContext.tsx +139 -0
- package/src/ui/hooks/atFileProcessor.ts +167 -0
- package/src/ui/hooks/index.ts +11 -0
- package/src/ui/hooks/slashCommandProcessor.ts +174 -0
- package/src/ui/hooks/useCommandBrowserState.ts +97 -0
- package/src/ui/hooks/useFileBrowserState.ts +116 -0
- package/src/ui/hooks/useFileList.ts +132 -0
- package/src/ui/hooks/useInputHistory.ts +89 -0
- package/src/ui/hooks/usePlanExecution.ts +339 -0
- package/src/ui/index.ts +10 -0
- package/src/ui/ink-entry.tsx +36 -0
- package/src/utils/env-filter.ts +164 -0
- package/src/utils/file-system.ts +133 -0
- package/src/utils/git-utils.ts +30 -0
- package/src/utils/json-stream-logger.ts +1259 -0
- package/src/utils/logger.ts +2767 -0
- package/src/utils/platform-utils.ts +256 -0
- package/src/utils/wsl-utils.ts +113 -0
- package/tsconfig.electron.json +39 -0
- package/tsconfig.json +64 -0
|
@@ -0,0 +1,939 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Settings Browser Component
|
|
3
|
+
*
|
|
4
|
+
* Displays settings menu for interactive selection
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import React, { useState, useEffect, useCallback } from 'react';
|
|
8
|
+
import { Box, Text, useInput } from 'ink';
|
|
9
|
+
import TextInput from 'ink-text-input';
|
|
10
|
+
import SelectInput from 'ink-select-input';
|
|
11
|
+
import { PlanningMode } from '../../../core/slash-command-handler.js';
|
|
12
|
+
import { configManager } from '../../../core/config/config-manager.js';
|
|
13
|
+
import { sessionManager } from '../../../core/session/session-manager.js';
|
|
14
|
+
import { LLMClient } from '../../../core/llm/llm-client.js';
|
|
15
|
+
import { EndpointConfig } from '../../../types/index.js';
|
|
16
|
+
|
|
17
|
+
interface SettingsBrowserProps {
|
|
18
|
+
currentPlanningMode: PlanningMode;
|
|
19
|
+
onPlanningModeChange: (mode: PlanningMode) => void;
|
|
20
|
+
onClose: () => void;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
interface SelectItem {
|
|
24
|
+
label: string;
|
|
25
|
+
value: string;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
interface SystemStatus {
|
|
29
|
+
version: string;
|
|
30
|
+
sessionId: string;
|
|
31
|
+
workingDir: string;
|
|
32
|
+
endpointUrl: string;
|
|
33
|
+
llmModel: string;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
interface EndpointHealthStatus {
|
|
37
|
+
endpointId: string;
|
|
38
|
+
modelId: string;
|
|
39
|
+
healthy: boolean;
|
|
40
|
+
latency?: number;
|
|
41
|
+
error?: string;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
interface LLMFormData {
|
|
45
|
+
name: string;
|
|
46
|
+
baseUrl: string;
|
|
47
|
+
apiKey: string;
|
|
48
|
+
modelId: string;
|
|
49
|
+
modelName: string;
|
|
50
|
+
maxContextLength: string;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
type SettingsView =
|
|
54
|
+
| 'main'
|
|
55
|
+
| 'status'
|
|
56
|
+
| 'planning-mode'
|
|
57
|
+
| 'llms'
|
|
58
|
+
| 'llm-add'
|
|
59
|
+
| 'llm-detail'
|
|
60
|
+
| 'llm-edit'
|
|
61
|
+
| 'llm-delete-confirm';
|
|
62
|
+
|
|
63
|
+
type FormField = 'name' | 'baseUrl' | 'apiKey' | 'modelId' | 'modelName' | 'maxContextLength' | 'buttons';
|
|
64
|
+
|
|
65
|
+
export const SettingsBrowser: React.FC<SettingsBrowserProps> = ({
|
|
66
|
+
currentPlanningMode: _currentPlanningMode, // Kept for backward compatibility but not used (always auto)
|
|
67
|
+
onPlanningModeChange: _onPlanningModeChange, // Kept for backward compatibility but not used
|
|
68
|
+
onClose,
|
|
69
|
+
}) => {
|
|
70
|
+
// Note: currentPlanningMode and onPlanningModeChange are kept for interface compatibility
|
|
71
|
+
// but are not used since planning mode is always 'auto'
|
|
72
|
+
void _currentPlanningMode;
|
|
73
|
+
void _onPlanningModeChange;
|
|
74
|
+
const [view, setView] = useState<SettingsView>('main');
|
|
75
|
+
const [systemStatus, setSystemStatus] = useState<SystemStatus | null>(null);
|
|
76
|
+
|
|
77
|
+
// LLMs state
|
|
78
|
+
const [endpoints, setEndpoints] = useState<EndpointConfig[]>([]);
|
|
79
|
+
const [healthStatus, setHealthStatus] = useState<EndpointHealthStatus[]>([]);
|
|
80
|
+
const [isHealthChecking, setIsHealthChecking] = useState(false);
|
|
81
|
+
const [selectedEndpoint, setSelectedEndpoint] = useState<EndpointConfig | null>(null);
|
|
82
|
+
|
|
83
|
+
// Form state
|
|
84
|
+
const [formData, setFormData] = useState<LLMFormData>({
|
|
85
|
+
name: '',
|
|
86
|
+
baseUrl: '',
|
|
87
|
+
apiKey: '',
|
|
88
|
+
modelId: '',
|
|
89
|
+
modelName: '',
|
|
90
|
+
maxContextLength: '128000',
|
|
91
|
+
});
|
|
92
|
+
const [formField, setFormField] = useState<FormField>('name');
|
|
93
|
+
const [formButtonIndex, setFormButtonIndex] = useState(0);
|
|
94
|
+
const [formError, setFormError] = useState<string | null>(null);
|
|
95
|
+
const [isTesting, setIsTesting] = useState(false);
|
|
96
|
+
|
|
97
|
+
// Load endpoints
|
|
98
|
+
const loadEndpoints = useCallback(() => {
|
|
99
|
+
setEndpoints(configManager.getAllEndpoints());
|
|
100
|
+
}, []);
|
|
101
|
+
|
|
102
|
+
// Run health check
|
|
103
|
+
const runHealthCheck = useCallback(async () => {
|
|
104
|
+
setIsHealthChecking(true);
|
|
105
|
+
try {
|
|
106
|
+
const results = await LLMClient.healthCheckAll();
|
|
107
|
+
const statusList: EndpointHealthStatus[] = [];
|
|
108
|
+
|
|
109
|
+
for (const [endpointId, modelResults] of results) {
|
|
110
|
+
for (const result of modelResults) {
|
|
111
|
+
statusList.push({
|
|
112
|
+
endpointId,
|
|
113
|
+
modelId: result.modelId,
|
|
114
|
+
healthy: result.healthy,
|
|
115
|
+
latency: result.latency,
|
|
116
|
+
error: result.error,
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
setHealthStatus(statusList);
|
|
122
|
+
|
|
123
|
+
// Update config with health status
|
|
124
|
+
await configManager.updateAllHealthStatus(results);
|
|
125
|
+
} catch {
|
|
126
|
+
// Ignore health check errors
|
|
127
|
+
} finally {
|
|
128
|
+
setIsHealthChecking(false);
|
|
129
|
+
}
|
|
130
|
+
}, []);
|
|
131
|
+
|
|
132
|
+
// Load system status when status view is shown
|
|
133
|
+
useEffect(() => {
|
|
134
|
+
if (view === 'status') {
|
|
135
|
+
const loadStatus = async () => {
|
|
136
|
+
const endpoint = configManager.getCurrentEndpoint();
|
|
137
|
+
const model = configManager.getCurrentModel();
|
|
138
|
+
const cwd = process.cwd();
|
|
139
|
+
|
|
140
|
+
// Read package.json for version
|
|
141
|
+
let version = '0.1.0';
|
|
142
|
+
try {
|
|
143
|
+
const { readFile } = await import('fs/promises');
|
|
144
|
+
const { fileURLToPath } = await import('url');
|
|
145
|
+
const { dirname, join } = await import('path');
|
|
146
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
147
|
+
const __dirname = dirname(__filename);
|
|
148
|
+
const packageJsonPath = join(__dirname, '../../../package.json');
|
|
149
|
+
const packageJson = JSON.parse(await readFile(packageJsonPath, 'utf-8'));
|
|
150
|
+
version = packageJson.version;
|
|
151
|
+
} catch {
|
|
152
|
+
// Use default version
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
setSystemStatus({
|
|
156
|
+
version,
|
|
157
|
+
sessionId: sessionManager.getCurrentSessionId() || 'No active session',
|
|
158
|
+
workingDir: cwd,
|
|
159
|
+
endpointUrl: endpoint?.baseUrl || 'Not configured',
|
|
160
|
+
llmModel: model ? `${model.name} (${model.id})` : 'Not configured',
|
|
161
|
+
});
|
|
162
|
+
};
|
|
163
|
+
|
|
164
|
+
loadStatus();
|
|
165
|
+
}
|
|
166
|
+
}, [view]);
|
|
167
|
+
|
|
168
|
+
// Load endpoints and run health check when LLMs view is shown
|
|
169
|
+
useEffect(() => {
|
|
170
|
+
if (view === 'llms') {
|
|
171
|
+
loadEndpoints();
|
|
172
|
+
runHealthCheck();
|
|
173
|
+
}
|
|
174
|
+
}, [view, loadEndpoints, runHealthCheck]);
|
|
175
|
+
|
|
176
|
+
// Get health status for endpoint
|
|
177
|
+
const getEndpointHealth = useCallback(
|
|
178
|
+
(endpointId: string): 'healthy' | 'degraded' | 'unhealthy' | 'unknown' => {
|
|
179
|
+
const statuses = healthStatus.filter((s) => s.endpointId === endpointId);
|
|
180
|
+
if (statuses.length === 0) return 'unknown';
|
|
181
|
+
|
|
182
|
+
const healthyCount = statuses.filter((s) => s.healthy).length;
|
|
183
|
+
if (healthyCount === statuses.length) return 'healthy';
|
|
184
|
+
if (healthyCount > 0) return 'degraded';
|
|
185
|
+
return 'unhealthy';
|
|
186
|
+
},
|
|
187
|
+
[healthStatus]
|
|
188
|
+
);
|
|
189
|
+
|
|
190
|
+
// Get health icon
|
|
191
|
+
const getHealthIcon = (status: 'healthy' | 'degraded' | 'unhealthy' | 'unknown'): string => {
|
|
192
|
+
switch (status) {
|
|
193
|
+
case 'healthy':
|
|
194
|
+
return '✓';
|
|
195
|
+
case 'degraded':
|
|
196
|
+
return '⚠';
|
|
197
|
+
case 'unhealthy':
|
|
198
|
+
return '✗';
|
|
199
|
+
default:
|
|
200
|
+
return '?';
|
|
201
|
+
}
|
|
202
|
+
};
|
|
203
|
+
|
|
204
|
+
// Get health color
|
|
205
|
+
const getHealthColor = (
|
|
206
|
+
status: 'healthy' | 'degraded' | 'unhealthy' | 'unknown'
|
|
207
|
+
): string => {
|
|
208
|
+
switch (status) {
|
|
209
|
+
case 'healthy':
|
|
210
|
+
return 'green';
|
|
211
|
+
case 'degraded':
|
|
212
|
+
return 'yellow';
|
|
213
|
+
case 'unhealthy':
|
|
214
|
+
return 'red';
|
|
215
|
+
default:
|
|
216
|
+
return 'gray';
|
|
217
|
+
}
|
|
218
|
+
};
|
|
219
|
+
|
|
220
|
+
// Handle form field navigation with Tab, Arrow keys, and Enter
|
|
221
|
+
const handleFormNavigation = useCallback(
|
|
222
|
+
(key: { tab?: boolean; shift?: boolean; return?: boolean; upArrow?: boolean; downArrow?: boolean }) => {
|
|
223
|
+
const fields: FormField[] = ['name', 'baseUrl', 'apiKey', 'modelId', 'modelName', 'maxContextLength', 'buttons'];
|
|
224
|
+
const currentIndex = fields.indexOf(formField);
|
|
225
|
+
|
|
226
|
+
// Tab or Enter to move to next field (except on buttons where Enter submits)
|
|
227
|
+
if (key.tab || (key.return && formField !== 'buttons')) {
|
|
228
|
+
if (key.shift) {
|
|
229
|
+
// Previous field
|
|
230
|
+
const prevIndex = currentIndex > 0 ? currentIndex - 1 : fields.length - 1;
|
|
231
|
+
setFormField(fields[prevIndex]!);
|
|
232
|
+
} else {
|
|
233
|
+
// Next field
|
|
234
|
+
const nextIndex = currentIndex < fields.length - 1 ? currentIndex + 1 : 0;
|
|
235
|
+
setFormField(fields[nextIndex]!);
|
|
236
|
+
}
|
|
237
|
+
return true; // Handled
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
// Arrow keys for navigation
|
|
241
|
+
if (key.upArrow) {
|
|
242
|
+
const prevIndex = currentIndex > 0 ? currentIndex - 1 : fields.length - 1;
|
|
243
|
+
if (formField === 'buttons') {
|
|
244
|
+
// In buttons, up/down toggles between buttons
|
|
245
|
+
setFormButtonIndex((prev) => (prev === 0 ? 1 : 0));
|
|
246
|
+
} else {
|
|
247
|
+
setFormField(fields[prevIndex]!);
|
|
248
|
+
}
|
|
249
|
+
return true;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
if (key.downArrow) {
|
|
253
|
+
const nextIndex = currentIndex < fields.length - 1 ? currentIndex + 1 : 0;
|
|
254
|
+
if (formField === 'buttons') {
|
|
255
|
+
// In buttons, up/down toggles between buttons
|
|
256
|
+
setFormButtonIndex((prev) => (prev === 0 ? 1 : 0));
|
|
257
|
+
} else {
|
|
258
|
+
setFormField(fields[nextIndex]!);
|
|
259
|
+
}
|
|
260
|
+
return true;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
return false;
|
|
264
|
+
},
|
|
265
|
+
[formField]
|
|
266
|
+
);
|
|
267
|
+
|
|
268
|
+
// Handle form submit
|
|
269
|
+
const handleFormSubmit = useCallback(async () => {
|
|
270
|
+
if (formButtonIndex === 1) {
|
|
271
|
+
// Cancel
|
|
272
|
+
setView('llms');
|
|
273
|
+
return;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
// Validate
|
|
277
|
+
if (!formData.name.trim()) {
|
|
278
|
+
setFormError('Name is required');
|
|
279
|
+
return;
|
|
280
|
+
}
|
|
281
|
+
if (!formData.baseUrl.trim()) {
|
|
282
|
+
setFormError('Base URL is required');
|
|
283
|
+
return;
|
|
284
|
+
}
|
|
285
|
+
if (!formData.modelId.trim()) {
|
|
286
|
+
setFormError('Model ID is required');
|
|
287
|
+
return;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
// Check for duplicate: same provider name AND same model ID
|
|
291
|
+
const isDuplicate = endpoints.some((ep) => {
|
|
292
|
+
// Skip the current endpoint when editing
|
|
293
|
+
if (view === 'llm-edit' && selectedEndpoint && ep.id === selectedEndpoint.id) {
|
|
294
|
+
return false;
|
|
295
|
+
}
|
|
296
|
+
// Check if provider name AND model ID both match
|
|
297
|
+
return ep.name === formData.name.trim() && ep.models.some((m) => m.id === formData.modelId.trim());
|
|
298
|
+
});
|
|
299
|
+
|
|
300
|
+
if (isDuplicate) {
|
|
301
|
+
setFormError(`Duplicate: Provider "${formData.name}" with Model ID "${formData.modelId}" already exists`);
|
|
302
|
+
return;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
// Test connection
|
|
306
|
+
setIsTesting(true);
|
|
307
|
+
setFormError(null);
|
|
308
|
+
|
|
309
|
+
try {
|
|
310
|
+
const result = await LLMClient.testConnection(
|
|
311
|
+
formData.baseUrl,
|
|
312
|
+
formData.apiKey,
|
|
313
|
+
formData.modelId
|
|
314
|
+
);
|
|
315
|
+
|
|
316
|
+
if (!result.success) {
|
|
317
|
+
setFormError(result.error || 'Connection failed');
|
|
318
|
+
setIsTesting(false);
|
|
319
|
+
return;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
// Save endpoint
|
|
323
|
+
const modelDisplayName = formData.modelName.trim() || formData.modelId;
|
|
324
|
+
const maxTokens = parseInt(formData.maxContextLength, 10) || 128000;
|
|
325
|
+
const newEndpoint: EndpointConfig = {
|
|
326
|
+
id: `ep-${Date.now()}`,
|
|
327
|
+
name: formData.name,
|
|
328
|
+
baseUrl: formData.baseUrl,
|
|
329
|
+
apiKey: formData.apiKey || undefined,
|
|
330
|
+
models: [
|
|
331
|
+
{
|
|
332
|
+
id: formData.modelId,
|
|
333
|
+
name: modelDisplayName,
|
|
334
|
+
maxTokens: maxTokens,
|
|
335
|
+
enabled: true,
|
|
336
|
+
healthStatus: 'healthy',
|
|
337
|
+
lastHealthCheck: new Date(),
|
|
338
|
+
},
|
|
339
|
+
],
|
|
340
|
+
createdAt: new Date(),
|
|
341
|
+
updatedAt: new Date(),
|
|
342
|
+
};
|
|
343
|
+
|
|
344
|
+
if (view === 'llm-edit' && selectedEndpoint) {
|
|
345
|
+
// Update existing
|
|
346
|
+
await configManager.updateEndpoint(selectedEndpoint.id, {
|
|
347
|
+
name: formData.name,
|
|
348
|
+
baseUrl: formData.baseUrl,
|
|
349
|
+
apiKey: formData.apiKey || undefined,
|
|
350
|
+
models: [
|
|
351
|
+
{
|
|
352
|
+
id: formData.modelId,
|
|
353
|
+
name: modelDisplayName,
|
|
354
|
+
maxTokens: maxTokens,
|
|
355
|
+
enabled: true,
|
|
356
|
+
healthStatus: 'healthy',
|
|
357
|
+
lastHealthCheck: new Date(),
|
|
358
|
+
},
|
|
359
|
+
],
|
|
360
|
+
});
|
|
361
|
+
} else {
|
|
362
|
+
// Add new
|
|
363
|
+
await configManager.addEndpoint(newEndpoint);
|
|
364
|
+
|
|
365
|
+
// If this is the first endpoint, set it as current
|
|
366
|
+
if (endpoints.length === 0) {
|
|
367
|
+
await configManager.setCurrentEndpoint(newEndpoint.id);
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
setIsTesting(false);
|
|
372
|
+
setView('llms');
|
|
373
|
+
loadEndpoints();
|
|
374
|
+
} catch (error) {
|
|
375
|
+
setFormError(error instanceof Error ? error.message : 'Unknown error');
|
|
376
|
+
setIsTesting(false);
|
|
377
|
+
}
|
|
378
|
+
}, [formData, formButtonIndex, view, selectedEndpoint, endpoints.length, loadEndpoints]);
|
|
379
|
+
|
|
380
|
+
// Custom keyboard handling
|
|
381
|
+
useInput((_inputChar, key) => {
|
|
382
|
+
if (key.escape) {
|
|
383
|
+
if (view === 'llm-add' || view === 'llm-edit') {
|
|
384
|
+
setView('llms');
|
|
385
|
+
setFormError(null);
|
|
386
|
+
} else if (view === 'llm-detail' || view === 'llm-delete-confirm') {
|
|
387
|
+
setView('llms');
|
|
388
|
+
} else if (view === 'llms' || view === 'planning-mode' || view === 'status') {
|
|
389
|
+
setView('main');
|
|
390
|
+
} else {
|
|
391
|
+
onClose();
|
|
392
|
+
}
|
|
393
|
+
return;
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
// Form navigation for add/edit views
|
|
397
|
+
if (view === 'llm-add' || view === 'llm-edit') {
|
|
398
|
+
// Handle Tab, Arrow keys, and Enter for navigation
|
|
399
|
+
if (key.tab || key.upArrow || key.downArrow) {
|
|
400
|
+
handleFormNavigation({
|
|
401
|
+
tab: key.tab,
|
|
402
|
+
shift: key.shift,
|
|
403
|
+
upArrow: key.upArrow,
|
|
404
|
+
downArrow: key.downArrow
|
|
405
|
+
});
|
|
406
|
+
return;
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
// Enter key handling
|
|
410
|
+
if (key.return) {
|
|
411
|
+
if (formField === 'buttons') {
|
|
412
|
+
// Submit form when on buttons
|
|
413
|
+
handleFormSubmit();
|
|
414
|
+
} else {
|
|
415
|
+
// Move to next field when on text inputs
|
|
416
|
+
handleFormNavigation({ return: true });
|
|
417
|
+
}
|
|
418
|
+
return;
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
});
|
|
422
|
+
|
|
423
|
+
// Main menu items (Planning Mode removed - always auto)
|
|
424
|
+
const mainMenuItems: SelectItem[] = [
|
|
425
|
+
{
|
|
426
|
+
label: '0. Status',
|
|
427
|
+
value: 'status',
|
|
428
|
+
},
|
|
429
|
+
{
|
|
430
|
+
label: '1. LLMs',
|
|
431
|
+
value: 'llms',
|
|
432
|
+
},
|
|
433
|
+
];
|
|
434
|
+
|
|
435
|
+
// Planning mode options - kept for backward compatibility but not used
|
|
436
|
+
// Planning mode is always 'auto'
|
|
437
|
+
const planningModeItems: SelectItem[] = [
|
|
438
|
+
{
|
|
439
|
+
label: 'auto ✓',
|
|
440
|
+
value: 'auto',
|
|
441
|
+
},
|
|
442
|
+
];
|
|
443
|
+
|
|
444
|
+
// LLMs menu items
|
|
445
|
+
const llmsMenuItems: SelectItem[] = [
|
|
446
|
+
{ label: '+ Add new endpoint...', value: 'add' },
|
|
447
|
+
...endpoints.map((ep) => {
|
|
448
|
+
const health = getEndpointHealth(ep.id);
|
|
449
|
+
const icon = getHealthIcon(health);
|
|
450
|
+
const currentEndpoint = configManager.getCurrentEndpoint();
|
|
451
|
+
const isCurrent = currentEndpoint?.id === ep.id;
|
|
452
|
+
const modelName = ep.models[0]?.id || ep.models[0]?.name || 'unknown';
|
|
453
|
+
return {
|
|
454
|
+
label: ` ${modelName} (${ep.name})${isCurrent ? ' *' : ''} ${icon}`,
|
|
455
|
+
value: ep.id,
|
|
456
|
+
};
|
|
457
|
+
}),
|
|
458
|
+
];
|
|
459
|
+
|
|
460
|
+
// Detail menu items
|
|
461
|
+
const detailMenuItems: SelectItem[] = [
|
|
462
|
+
{ label: 'Edit', value: 'edit' },
|
|
463
|
+
{ label: 'Delete', value: 'delete' },
|
|
464
|
+
{ label: 'Set as Current', value: 'set-current' },
|
|
465
|
+
{ label: 'Refresh Health', value: 'refresh' },
|
|
466
|
+
];
|
|
467
|
+
|
|
468
|
+
// Delete confirm items
|
|
469
|
+
const deleteConfirmItems: SelectItem[] = [
|
|
470
|
+
{ label: 'Yes, delete', value: 'confirm' },
|
|
471
|
+
{ label: 'Cancel', value: 'cancel' },
|
|
472
|
+
];
|
|
473
|
+
|
|
474
|
+
// Handle main menu selection
|
|
475
|
+
const handleMainSelect = (item: SelectItem) => {
|
|
476
|
+
if (item.value === 'status') {
|
|
477
|
+
setView('status');
|
|
478
|
+
} else if (item.value === 'llms') {
|
|
479
|
+
setView('llms');
|
|
480
|
+
}
|
|
481
|
+
};
|
|
482
|
+
|
|
483
|
+
// Handle planning mode selection (kept for backward compatibility but not used)
|
|
484
|
+
// Planning mode is always 'auto'
|
|
485
|
+
const handlePlanningModeSelect = (_item: SelectItem) => {
|
|
486
|
+
// No-op: planning mode is always 'auto'
|
|
487
|
+
onClose();
|
|
488
|
+
};
|
|
489
|
+
|
|
490
|
+
// Handle LLMs menu selection
|
|
491
|
+
const handleLLMsSelect = (item: SelectItem) => {
|
|
492
|
+
if (item.value === 'add') {
|
|
493
|
+
setFormData({ name: '', baseUrl: '', apiKey: '', modelId: '', modelName: '', maxContextLength: '128000' });
|
|
494
|
+
setFormField('name');
|
|
495
|
+
setFormButtonIndex(0);
|
|
496
|
+
setFormError(null);
|
|
497
|
+
setView('llm-add');
|
|
498
|
+
} else {
|
|
499
|
+
const endpoint = endpoints.find((ep) => ep.id === item.value);
|
|
500
|
+
if (endpoint) {
|
|
501
|
+
setSelectedEndpoint(endpoint);
|
|
502
|
+
setView('llm-detail');
|
|
503
|
+
}
|
|
504
|
+
}
|
|
505
|
+
};
|
|
506
|
+
|
|
507
|
+
// Handle detail menu selection
|
|
508
|
+
const handleDetailSelect = async (item: SelectItem) => {
|
|
509
|
+
if (!selectedEndpoint) return;
|
|
510
|
+
|
|
511
|
+
switch (item.value) {
|
|
512
|
+
case 'edit':
|
|
513
|
+
setFormData({
|
|
514
|
+
name: selectedEndpoint.name,
|
|
515
|
+
baseUrl: selectedEndpoint.baseUrl,
|
|
516
|
+
apiKey: selectedEndpoint.apiKey || '',
|
|
517
|
+
modelId: selectedEndpoint.models[0]?.id || '',
|
|
518
|
+
modelName: selectedEndpoint.models[0]?.name || '',
|
|
519
|
+
maxContextLength: String(selectedEndpoint.models[0]?.maxTokens || 128000),
|
|
520
|
+
});
|
|
521
|
+
setFormField('name');
|
|
522
|
+
setFormButtonIndex(0);
|
|
523
|
+
setFormError(null);
|
|
524
|
+
setView('llm-edit');
|
|
525
|
+
break;
|
|
526
|
+
case 'delete':
|
|
527
|
+
setView('llm-delete-confirm');
|
|
528
|
+
break;
|
|
529
|
+
case 'set-current':
|
|
530
|
+
await configManager.setCurrentEndpoint(selectedEndpoint.id);
|
|
531
|
+
setView('llms');
|
|
532
|
+
loadEndpoints();
|
|
533
|
+
break;
|
|
534
|
+
case 'refresh':
|
|
535
|
+
await runHealthCheck();
|
|
536
|
+
break;
|
|
537
|
+
}
|
|
538
|
+
};
|
|
539
|
+
|
|
540
|
+
// Handle delete confirm
|
|
541
|
+
const handleDeleteConfirm = async (item: SelectItem) => {
|
|
542
|
+
if (item.value === 'confirm' && selectedEndpoint) {
|
|
543
|
+
await configManager.removeEndpoint(selectedEndpoint.id);
|
|
544
|
+
setSelectedEndpoint(null);
|
|
545
|
+
setView('llms');
|
|
546
|
+
loadEndpoints();
|
|
547
|
+
} else {
|
|
548
|
+
setView('llm-detail');
|
|
549
|
+
}
|
|
550
|
+
};
|
|
551
|
+
|
|
552
|
+
// Main settings menu view
|
|
553
|
+
if (view === 'main') {
|
|
554
|
+
return (
|
|
555
|
+
<Box flexDirection="column">
|
|
556
|
+
{/* Header */}
|
|
557
|
+
<Box borderStyle="single" borderColor="cyan" paddingX={1} marginBottom={1}>
|
|
558
|
+
<Text color="cyan" bold>
|
|
559
|
+
Settings
|
|
560
|
+
</Text>
|
|
561
|
+
</Box>
|
|
562
|
+
|
|
563
|
+
{/* Menu List */}
|
|
564
|
+
<Box borderStyle="single" borderColor="gray" paddingX={1}>
|
|
565
|
+
<SelectInput items={mainMenuItems} onSelect={handleMainSelect} />
|
|
566
|
+
</Box>
|
|
567
|
+
|
|
568
|
+
{/* Footer */}
|
|
569
|
+
<Box marginTop={1}>
|
|
570
|
+
<Text dimColor>↑↓: move | Enter: select | ESC: close</Text>
|
|
571
|
+
</Box>
|
|
572
|
+
</Box>
|
|
573
|
+
);
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
// Status view
|
|
577
|
+
if (view === 'status') {
|
|
578
|
+
return (
|
|
579
|
+
<Box flexDirection="column">
|
|
580
|
+
{/* Header */}
|
|
581
|
+
<Box borderStyle="single" borderColor="cyan" paddingX={1} marginBottom={1}>
|
|
582
|
+
<Text color="cyan" bold>
|
|
583
|
+
Settings > Status
|
|
584
|
+
</Text>
|
|
585
|
+
</Box>
|
|
586
|
+
|
|
587
|
+
{/* Status Information */}
|
|
588
|
+
<Box borderStyle="single" borderColor="gray" paddingX={1} flexDirection="column">
|
|
589
|
+
{systemStatus ? (
|
|
590
|
+
<>
|
|
591
|
+
<Box>
|
|
592
|
+
<Text color="yellow">Version: </Text>
|
|
593
|
+
<Text>{systemStatus.version}</Text>
|
|
594
|
+
</Box>
|
|
595
|
+
<Box>
|
|
596
|
+
<Text color="yellow">Session ID: </Text>
|
|
597
|
+
<Text>{systemStatus.sessionId}</Text>
|
|
598
|
+
</Box>
|
|
599
|
+
<Box>
|
|
600
|
+
<Text color="yellow">Working Dir: </Text>
|
|
601
|
+
<Text>{systemStatus.workingDir}</Text>
|
|
602
|
+
</Box>
|
|
603
|
+
<Box>
|
|
604
|
+
<Text color="yellow">Endpoint URL: </Text>
|
|
605
|
+
<Text>{systemStatus.endpointUrl}</Text>
|
|
606
|
+
</Box>
|
|
607
|
+
<Box>
|
|
608
|
+
<Text color="yellow">LLM Model: </Text>
|
|
609
|
+
<Text>{systemStatus.llmModel}</Text>
|
|
610
|
+
</Box>
|
|
611
|
+
</>
|
|
612
|
+
) : (
|
|
613
|
+
<Text color="gray">Loading status...</Text>
|
|
614
|
+
)}
|
|
615
|
+
</Box>
|
|
616
|
+
|
|
617
|
+
{/* Footer */}
|
|
618
|
+
<Box marginTop={1}>
|
|
619
|
+
<Text dimColor>ESC: back</Text>
|
|
620
|
+
</Box>
|
|
621
|
+
</Box>
|
|
622
|
+
);
|
|
623
|
+
}
|
|
624
|
+
|
|
625
|
+
// Planning mode selection view
|
|
626
|
+
if (view === 'planning-mode') {
|
|
627
|
+
return (
|
|
628
|
+
<Box flexDirection="column">
|
|
629
|
+
{/* Header */}
|
|
630
|
+
<Box borderStyle="single" borderColor="cyan" paddingX={1} marginBottom={1}>
|
|
631
|
+
<Text color="cyan" bold>
|
|
632
|
+
Settings > Planning Mode
|
|
633
|
+
</Text>
|
|
634
|
+
</Box>
|
|
635
|
+
|
|
636
|
+
{/* Description */}
|
|
637
|
+
<Box paddingX={1} marginBottom={1}>
|
|
638
|
+
<Text color="gray">Select the planning mode for task execution:</Text>
|
|
639
|
+
</Box>
|
|
640
|
+
|
|
641
|
+
{/* Mode descriptions */}
|
|
642
|
+
<Box paddingX={1} marginBottom={1} flexDirection="column">
|
|
643
|
+
<Text color="yellow">• planning: </Text>
|
|
644
|
+
<Text color="gray"> Always create TODO list before execution</Text>
|
|
645
|
+
<Text color="yellow">• no-planning: </Text>
|
|
646
|
+
<Text color="gray"> Execute directly without planning</Text>
|
|
647
|
+
<Text color="yellow">• auto: </Text>
|
|
648
|
+
<Text color="gray"> Automatically decide based on task complexity</Text>
|
|
649
|
+
</Box>
|
|
650
|
+
|
|
651
|
+
{/* Options List */}
|
|
652
|
+
<Box borderStyle="single" borderColor="gray" paddingX={1}>
|
|
653
|
+
<SelectInput items={planningModeItems} onSelect={handlePlanningModeSelect} />
|
|
654
|
+
</Box>
|
|
655
|
+
|
|
656
|
+
{/* Footer */}
|
|
657
|
+
<Box marginTop={1}>
|
|
658
|
+
<Text dimColor>↑↓: move | Enter: select | ESC: back</Text>
|
|
659
|
+
</Box>
|
|
660
|
+
</Box>
|
|
661
|
+
);
|
|
662
|
+
}
|
|
663
|
+
|
|
664
|
+
// LLMs list view
|
|
665
|
+
if (view === 'llms') {
|
|
666
|
+
return (
|
|
667
|
+
<Box flexDirection="column">
|
|
668
|
+
{/* Header */}
|
|
669
|
+
<Box borderStyle="single" borderColor="cyan" paddingX={1} marginBottom={1}>
|
|
670
|
+
<Text color="cyan" bold>
|
|
671
|
+
Settings > LLM Endpoints
|
|
672
|
+
</Text>
|
|
673
|
+
{isHealthChecking && (
|
|
674
|
+
<Text color="yellow"> (checking health...)</Text>
|
|
675
|
+
)}
|
|
676
|
+
</Box>
|
|
677
|
+
|
|
678
|
+
{/* Endpoints List */}
|
|
679
|
+
<Box borderStyle="single" borderColor="gray" paddingX={1}>
|
|
680
|
+
{endpoints.length === 0 && !llmsMenuItems.find((i) => i.value === 'add') ? (
|
|
681
|
+
<Text color="gray">No endpoints configured</Text>
|
|
682
|
+
) : (
|
|
683
|
+
<SelectInput items={llmsMenuItems} onSelect={handleLLMsSelect} />
|
|
684
|
+
)}
|
|
685
|
+
</Box>
|
|
686
|
+
|
|
687
|
+
{/* Health Legend */}
|
|
688
|
+
<Box marginTop={1} paddingX={1}>
|
|
689
|
+
<Text color="green">✓ healthy </Text>
|
|
690
|
+
<Text color="yellow">⚠ degraded </Text>
|
|
691
|
+
<Text color="red">✗ unhealthy</Text>
|
|
692
|
+
</Box>
|
|
693
|
+
|
|
694
|
+
{/* Footer */}
|
|
695
|
+
<Box marginTop={1}>
|
|
696
|
+
<Text dimColor>↑↓: move | Enter: select | ESC: back</Text>
|
|
697
|
+
</Box>
|
|
698
|
+
</Box>
|
|
699
|
+
);
|
|
700
|
+
}
|
|
701
|
+
|
|
702
|
+
// LLM Detail view
|
|
703
|
+
if (view === 'llm-detail' && selectedEndpoint) {
|
|
704
|
+
const health = getEndpointHealth(selectedEndpoint.id);
|
|
705
|
+
const healthColor = getHealthColor(health);
|
|
706
|
+
const healthIcon = getHealthIcon(health);
|
|
707
|
+
const modelStatus = healthStatus.find(
|
|
708
|
+
(s) => s.endpointId === selectedEndpoint.id
|
|
709
|
+
);
|
|
710
|
+
|
|
711
|
+
return (
|
|
712
|
+
<Box flexDirection="column">
|
|
713
|
+
{/* Header */}
|
|
714
|
+
<Box borderStyle="single" borderColor="cyan" paddingX={1} marginBottom={1}>
|
|
715
|
+
<Text color="cyan" bold>
|
|
716
|
+
{selectedEndpoint.name}
|
|
717
|
+
</Text>
|
|
718
|
+
<Text> </Text>
|
|
719
|
+
<Text color={healthColor}>{healthIcon} {health}</Text>
|
|
720
|
+
</Box>
|
|
721
|
+
|
|
722
|
+
{/* Endpoint Info */}
|
|
723
|
+
<Box borderStyle="single" borderColor="gray" paddingX={1} flexDirection="column" marginBottom={1}>
|
|
724
|
+
<Box>
|
|
725
|
+
<Text color="yellow">URL: </Text>
|
|
726
|
+
<Text>{selectedEndpoint.baseUrl}</Text>
|
|
727
|
+
</Box>
|
|
728
|
+
<Box>
|
|
729
|
+
<Text color="yellow">Model: </Text>
|
|
730
|
+
<Text>{selectedEndpoint.models[0]?.id || 'N/A'}</Text>
|
|
731
|
+
</Box>
|
|
732
|
+
<Box>
|
|
733
|
+
<Text color="yellow">API Key: </Text>
|
|
734
|
+
<Text>{selectedEndpoint.apiKey ? '••••••••' : '(not set)'}</Text>
|
|
735
|
+
</Box>
|
|
736
|
+
{modelStatus?.latency && (
|
|
737
|
+
<Box>
|
|
738
|
+
<Text color="yellow">Latency: </Text>
|
|
739
|
+
<Text>{modelStatus.latency}ms</Text>
|
|
740
|
+
</Box>
|
|
741
|
+
)}
|
|
742
|
+
</Box>
|
|
743
|
+
|
|
744
|
+
{/* Actions */}
|
|
745
|
+
<Box borderStyle="single" borderColor="gray" paddingX={1}>
|
|
746
|
+
<SelectInput items={detailMenuItems} onSelect={handleDetailSelect} />
|
|
747
|
+
</Box>
|
|
748
|
+
|
|
749
|
+
{/* Footer */}
|
|
750
|
+
<Box marginTop={1}>
|
|
751
|
+
<Text dimColor>↑↓: move | Enter: select | ESC: back</Text>
|
|
752
|
+
</Box>
|
|
753
|
+
</Box>
|
|
754
|
+
);
|
|
755
|
+
}
|
|
756
|
+
|
|
757
|
+
// Delete confirm view
|
|
758
|
+
if (view === 'llm-delete-confirm' && selectedEndpoint) {
|
|
759
|
+
return (
|
|
760
|
+
<Box flexDirection="column">
|
|
761
|
+
{/* Header */}
|
|
762
|
+
<Box borderStyle="single" borderColor="red" paddingX={1} marginBottom={1}>
|
|
763
|
+
<Text color="red" bold>
|
|
764
|
+
Delete Endpoint
|
|
765
|
+
</Text>
|
|
766
|
+
</Box>
|
|
767
|
+
|
|
768
|
+
{/* Confirmation */}
|
|
769
|
+
<Box paddingX={1} marginBottom={1}>
|
|
770
|
+
<Text>
|
|
771
|
+
Are you sure you want to delete <Text color="yellow">{selectedEndpoint.name}</Text>?
|
|
772
|
+
</Text>
|
|
773
|
+
</Box>
|
|
774
|
+
|
|
775
|
+
{/* Options */}
|
|
776
|
+
<Box borderStyle="single" borderColor="gray" paddingX={1}>
|
|
777
|
+
<SelectInput items={deleteConfirmItems} onSelect={handleDeleteConfirm} />
|
|
778
|
+
</Box>
|
|
779
|
+
|
|
780
|
+
{/* Footer */}
|
|
781
|
+
<Box marginTop={1}>
|
|
782
|
+
<Text dimColor>↑↓: move | Enter: select | ESC: cancel</Text>
|
|
783
|
+
</Box>
|
|
784
|
+
</Box>
|
|
785
|
+
);
|
|
786
|
+
}
|
|
787
|
+
|
|
788
|
+
// LLM Add/Edit form view
|
|
789
|
+
if (view === 'llm-add' || view === 'llm-edit') {
|
|
790
|
+
const isEdit = view === 'llm-edit';
|
|
791
|
+
|
|
792
|
+
return (
|
|
793
|
+
<Box flexDirection="column">
|
|
794
|
+
{/* Header */}
|
|
795
|
+
<Box borderStyle="single" borderColor="cyan" paddingX={1} marginBottom={1}>
|
|
796
|
+
<Text color="cyan" bold>
|
|
797
|
+
{isEdit ? 'Edit Endpoint' : 'Add New Endpoint'}
|
|
798
|
+
</Text>
|
|
799
|
+
</Box>
|
|
800
|
+
|
|
801
|
+
{/* Form */}
|
|
802
|
+
<Box borderStyle="single" borderColor="gray" paddingX={1} flexDirection="column">
|
|
803
|
+
{/* Name Field */}
|
|
804
|
+
<Box>
|
|
805
|
+
<Text color={formField === 'name' ? 'cyan' : 'yellow'}>
|
|
806
|
+
{formField === 'name' ? '> ' : ' '}Name:
|
|
807
|
+
</Text>
|
|
808
|
+
{formField === 'name' ? (
|
|
809
|
+
<TextInput
|
|
810
|
+
value={formData.name}
|
|
811
|
+
onChange={(value) => setFormData({ ...formData, name: value })}
|
|
812
|
+
placeholder="My LLM Endpoint"
|
|
813
|
+
/>
|
|
814
|
+
) : (
|
|
815
|
+
<Text>{formData.name || '(empty)'}</Text>
|
|
816
|
+
)}
|
|
817
|
+
</Box>
|
|
818
|
+
|
|
819
|
+
{/* Base URL Field */}
|
|
820
|
+
<Box>
|
|
821
|
+
<Text color={formField === 'baseUrl' ? 'cyan' : 'yellow'}>
|
|
822
|
+
{formField === 'baseUrl' ? '> ' : ' '}Base URL:
|
|
823
|
+
</Text>
|
|
824
|
+
{formField === 'baseUrl' ? (
|
|
825
|
+
<TextInput
|
|
826
|
+
value={formData.baseUrl}
|
|
827
|
+
onChange={(value) => setFormData({ ...formData, baseUrl: value })}
|
|
828
|
+
placeholder="http://localhost:11434/v1"
|
|
829
|
+
/>
|
|
830
|
+
) : (
|
|
831
|
+
<Text>{formData.baseUrl || '(empty)'}</Text>
|
|
832
|
+
)}
|
|
833
|
+
</Box>
|
|
834
|
+
|
|
835
|
+
{/* API Key Field */}
|
|
836
|
+
<Box>
|
|
837
|
+
<Text color={formField === 'apiKey' ? 'cyan' : 'yellow'}>
|
|
838
|
+
{formField === 'apiKey' ? '> ' : ' '}API Key:
|
|
839
|
+
</Text>
|
|
840
|
+
{formField === 'apiKey' ? (
|
|
841
|
+
<TextInput
|
|
842
|
+
value={formData.apiKey}
|
|
843
|
+
onChange={(value) => setFormData({ ...formData, apiKey: value })}
|
|
844
|
+
placeholder="(optional)"
|
|
845
|
+
/>
|
|
846
|
+
) : (
|
|
847
|
+
<Text>{formData.apiKey ? '••••••••' : '(optional)'}</Text>
|
|
848
|
+
)}
|
|
849
|
+
</Box>
|
|
850
|
+
|
|
851
|
+
{/* Model ID Field */}
|
|
852
|
+
<Box>
|
|
853
|
+
<Text color={formField === 'modelId' ? 'cyan' : 'yellow'}>
|
|
854
|
+
{formField === 'modelId' ? '> ' : ' '}Model ID:
|
|
855
|
+
</Text>
|
|
856
|
+
{formField === 'modelId' ? (
|
|
857
|
+
<TextInput
|
|
858
|
+
value={formData.modelId}
|
|
859
|
+
onChange={(value) => setFormData({ ...formData, modelId: value })}
|
|
860
|
+
placeholder="qwen2.5-coder:32b"
|
|
861
|
+
/>
|
|
862
|
+
) : (
|
|
863
|
+
<Text>{formData.modelId || '(empty)'}</Text>
|
|
864
|
+
)}
|
|
865
|
+
</Box>
|
|
866
|
+
|
|
867
|
+
{/* Model Name Field (Display Name) */}
|
|
868
|
+
<Box>
|
|
869
|
+
<Text color={formField === 'modelName' ? 'cyan' : 'yellow'}>
|
|
870
|
+
{formField === 'modelName' ? '> ' : ' '}Model Name:
|
|
871
|
+
</Text>
|
|
872
|
+
{formField === 'modelName' ? (
|
|
873
|
+
<TextInput
|
|
874
|
+
value={formData.modelName}
|
|
875
|
+
onChange={(value) => setFormData({ ...formData, modelName: value })}
|
|
876
|
+
placeholder="(optional, defaults to Model ID)"
|
|
877
|
+
/>
|
|
878
|
+
) : (
|
|
879
|
+
<Text>{formData.modelName || '(uses Model ID)'}</Text>
|
|
880
|
+
)}
|
|
881
|
+
</Box>
|
|
882
|
+
|
|
883
|
+
{/* Max Context Length Field */}
|
|
884
|
+
<Box>
|
|
885
|
+
<Text color={formField === 'maxContextLength' ? 'cyan' : 'yellow'}>
|
|
886
|
+
{formField === 'maxContextLength' ? '> ' : ' '}Max Context:
|
|
887
|
+
</Text>
|
|
888
|
+
{formField === 'maxContextLength' ? (
|
|
889
|
+
<TextInput
|
|
890
|
+
value={formData.maxContextLength}
|
|
891
|
+
onChange={(value) => setFormData({ ...formData, maxContextLength: value.replace(/[^0-9]/g, '') })}
|
|
892
|
+
placeholder="128000"
|
|
893
|
+
/>
|
|
894
|
+
) : (
|
|
895
|
+
<Text>{formData.maxContextLength || '128000'}</Text>
|
|
896
|
+
)}
|
|
897
|
+
</Box>
|
|
898
|
+
</Box>
|
|
899
|
+
|
|
900
|
+
{/* Error Message */}
|
|
901
|
+
{formError && (
|
|
902
|
+
<Box marginTop={1} paddingX={1}>
|
|
903
|
+
<Text color="red">Error: {formError}</Text>
|
|
904
|
+
</Box>
|
|
905
|
+
)}
|
|
906
|
+
|
|
907
|
+
{/* Buttons */}
|
|
908
|
+
<Box marginTop={1} flexDirection="column" paddingX={1}>
|
|
909
|
+
<Box>
|
|
910
|
+
<Text
|
|
911
|
+
color={formField === 'buttons' && formButtonIndex === 0 ? 'cyan' : undefined}
|
|
912
|
+
bold={formField === 'buttons' && formButtonIndex === 0}
|
|
913
|
+
>
|
|
914
|
+
{formField === 'buttons' && formButtonIndex === 0 ? '> ' : ' '}
|
|
915
|
+
{isTesting ? 'Testing...' : 'Test & Save'}
|
|
916
|
+
</Text>
|
|
917
|
+
</Box>
|
|
918
|
+
<Box>
|
|
919
|
+
<Text
|
|
920
|
+
color={formField === 'buttons' && formButtonIndex === 1 ? 'cyan' : undefined}
|
|
921
|
+
bold={formField === 'buttons' && formButtonIndex === 1}
|
|
922
|
+
>
|
|
923
|
+
{formField === 'buttons' && formButtonIndex === 1 ? '> ' : ' '}
|
|
924
|
+
Cancel
|
|
925
|
+
</Text>
|
|
926
|
+
</Box>
|
|
927
|
+
</Box>
|
|
928
|
+
|
|
929
|
+
{/* Footer */}
|
|
930
|
+
<Box marginTop={1}>
|
|
931
|
+
<Text dimColor>↑↓/Tab: move | Enter: next/submit | ESC: cancel</Text>
|
|
932
|
+
</Box>
|
|
933
|
+
</Box>
|
|
934
|
+
);
|
|
935
|
+
}
|
|
936
|
+
|
|
937
|
+
// Fallback
|
|
938
|
+
return null;
|
|
939
|
+
};
|