@theia/ai-ide 1.75.0-next.8 → 1.75.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/browser/ai-allow-all-mode-chat-banner.js +2 -20
- package/lib/browser/ai-allow-all-mode-chat-banner.js.map +1 -1
- package/lib/browser/ai-configuration/agent-icon.d.ts +16 -0
- package/lib/browser/ai-configuration/agent-icon.d.ts.map +1 -0
- package/lib/browser/ai-configuration/agent-icon.js +38 -0
- package/lib/browser/ai-configuration/agent-icon.js.map +1 -0
- package/lib/browser/ai-configuration/ai-configuration-breadcrumbs-contribution.d.ts +36 -0
- package/lib/browser/ai-configuration/ai-configuration-breadcrumbs-contribution.d.ts.map +1 -0
- package/lib/browser/ai-configuration/ai-configuration-breadcrumbs-contribution.js +163 -0
- package/lib/browser/ai-configuration/ai-configuration-breadcrumbs-contribution.js.map +1 -0
- package/lib/browser/ai-configuration/ai-configuration-detail-widget.d.ts +50 -0
- package/lib/browser/ai-configuration/ai-configuration-detail-widget.d.ts.map +1 -0
- package/lib/browser/ai-configuration/ai-configuration-detail-widget.js +208 -0
- package/lib/browser/ai-configuration/ai-configuration-detail-widget.js.map +1 -0
- package/lib/browser/ai-configuration/ai-configuration-detail-widget.spec.d.ts +2 -0
- package/lib/browser/ai-configuration/ai-configuration-detail-widget.spec.d.ts.map +1 -0
- package/lib/browser/ai-configuration/ai-configuration-detail-widget.spec.js +139 -0
- package/lib/browser/ai-configuration/ai-configuration-detail-widget.spec.js.map +1 -0
- package/lib/browser/ai-configuration/ai-configuration-label-provider-contribution.d.ts +13 -0
- package/lib/browser/ai-configuration/ai-configuration-label-provider-contribution.d.ts.map +1 -0
- package/lib/browser/ai-configuration/ai-configuration-label-provider-contribution.js +48 -0
- package/lib/browser/ai-configuration/ai-configuration-label-provider-contribution.js.map +1 -0
- package/lib/browser/ai-configuration/ai-configuration-open-preference-renderer.d.ts +22 -0
- package/lib/browser/ai-configuration/ai-configuration-open-preference-renderer.d.ts.map +1 -0
- package/lib/browser/ai-configuration/ai-configuration-open-preference-renderer.js +72 -0
- package/lib/browser/ai-configuration/ai-configuration-open-preference-renderer.js.map +1 -0
- package/lib/browser/ai-configuration/ai-configuration-preference-ownership.spec.d.ts +2 -0
- package/lib/browser/ai-configuration/ai-configuration-preference-ownership.spec.d.ts.map +1 -0
- package/lib/browser/ai-configuration/ai-configuration-preference-ownership.spec.js +126 -0
- package/lib/browser/ai-configuration/ai-configuration-preference-ownership.spec.js.map +1 -0
- package/lib/browser/ai-configuration/ai-configuration-resource.d.ts +10 -0
- package/lib/browser/ai-configuration/ai-configuration-resource.d.ts.map +1 -0
- package/lib/browser/ai-configuration/{components/configuration-section.js → ai-configuration-resource.js} +11 -11
- package/lib/browser/ai-configuration/ai-configuration-resource.js.map +1 -0
- package/lib/browser/ai-configuration/ai-configuration-search-widget.d.ts +29 -0
- package/lib/browser/ai-configuration/ai-configuration-search-widget.d.ts.map +1 -0
- package/lib/browser/ai-configuration/ai-configuration-search-widget.js +106 -0
- package/lib/browser/ai-configuration/ai-configuration-search-widget.js.map +1 -0
- package/lib/browser/ai-configuration/ai-configuration-search.d.ts +18 -0
- package/lib/browser/ai-configuration/ai-configuration-search.d.ts.map +1 -0
- package/lib/browser/ai-configuration/ai-configuration-search.js +45 -0
- package/lib/browser/ai-configuration/ai-configuration-search.js.map +1 -0
- package/lib/browser/ai-configuration/ai-configuration-search.spec.d.ts +2 -0
- package/lib/browser/ai-configuration/ai-configuration-search.spec.d.ts.map +1 -0
- package/lib/browser/ai-configuration/ai-configuration-search.spec.js +79 -0
- package/lib/browser/ai-configuration/ai-configuration-search.spec.js.map +1 -0
- package/lib/browser/ai-configuration/ai-configuration-tree-model.d.ts +8 -0
- package/lib/browser/ai-configuration/ai-configuration-tree-model.d.ts.map +1 -0
- package/lib/browser/ai-configuration/{base/ai-configuration-base-widget.js → ai-configuration-tree-model.js} +11 -14
- package/lib/browser/ai-configuration/ai-configuration-tree-model.js.map +1 -0
- package/lib/browser/ai-configuration/ai-configuration-tree-nodes.d.ts +57 -0
- package/lib/browser/ai-configuration/ai-configuration-tree-nodes.d.ts.map +1 -0
- package/lib/browser/ai-configuration/ai-configuration-tree-nodes.js +134 -0
- package/lib/browser/ai-configuration/ai-configuration-tree-nodes.js.map +1 -0
- package/lib/browser/ai-configuration/ai-configuration-tree-nodes.spec.d.ts +2 -0
- package/lib/browser/ai-configuration/ai-configuration-tree-nodes.spec.d.ts.map +1 -0
- package/lib/browser/ai-configuration/ai-configuration-tree-nodes.spec.js +134 -0
- package/lib/browser/ai-configuration/ai-configuration-tree-nodes.spec.js.map +1 -0
- package/lib/browser/ai-configuration/ai-configuration-tree-widget.d.ts +96 -0
- package/lib/browser/ai-configuration/ai-configuration-tree-widget.d.ts.map +1 -0
- package/lib/browser/ai-configuration/ai-configuration-tree-widget.js +407 -0
- package/lib/browser/ai-configuration/ai-configuration-tree-widget.js.map +1 -0
- package/lib/browser/ai-configuration/ai-configuration-view-contribution.d.ts +38 -4
- package/lib/browser/ai-configuration/ai-configuration-view-contribution.d.ts.map +1 -1
- package/lib/browser/ai-configuration/ai-configuration-view-contribution.js +151 -19
- package/lib/browser/ai-configuration/ai-configuration-view-contribution.js.map +1 -1
- package/lib/browser/ai-configuration/ai-configuration-widget.d.ts +21 -23
- package/lib/browser/ai-configuration/ai-configuration-widget.d.ts.map +1 -1
- package/lib/browser/ai-configuration/ai-configuration-widget.js +102 -70
- package/lib/browser/ai-configuration/ai-configuration-widget.js.map +1 -1
- package/lib/browser/ai-configuration/categories/agent-capabilities-settings.d.ts +56 -0
- package/lib/browser/ai-configuration/categories/agent-capabilities-settings.d.ts.map +1 -0
- package/lib/browser/ai-configuration/categories/agent-capabilities-settings.js +195 -0
- package/lib/browser/ai-configuration/categories/agent-capabilities-settings.js.map +1 -0
- package/lib/browser/ai-configuration/categories/agent-capabilities-settings.spec.d.ts +2 -0
- package/lib/browser/ai-configuration/categories/agent-capabilities-settings.spec.d.ts.map +1 -0
- package/lib/browser/ai-configuration/categories/agent-capabilities-settings.spec.js +140 -0
- package/lib/browser/ai-configuration/categories/agent-capabilities-settings.spec.js.map +1 -0
- package/lib/browser/ai-configuration/categories/agent-chips.d.ts +15 -0
- package/lib/browser/ai-configuration/categories/agent-chips.d.ts.map +1 -0
- package/lib/browser/ai-configuration/categories/agent-chips.js +19 -0
- package/lib/browser/ai-configuration/categories/agent-chips.js.map +1 -0
- package/lib/browser/ai-configuration/categories/agent-detail-model.d.ts +37 -0
- package/lib/browser/ai-configuration/categories/agent-detail-model.d.ts.map +1 -0
- package/lib/browser/ai-configuration/categories/agent-detail-model.js +99 -0
- package/lib/browser/ai-configuration/categories/agent-detail-model.js.map +1 -0
- package/lib/browser/ai-configuration/categories/agent-detail-view.d.ts +28 -0
- package/lib/browser/ai-configuration/categories/agent-detail-view.d.ts.map +1 -0
- package/lib/browser/ai-configuration/categories/agent-detail-view.js +135 -0
- package/lib/browser/ai-configuration/categories/agent-detail-view.js.map +1 -0
- package/lib/browser/ai-configuration/categories/agents-configuration-category.d.ts +78 -0
- package/lib/browser/ai-configuration/categories/agents-configuration-category.d.ts.map +1 -0
- package/lib/browser/ai-configuration/categories/agents-configuration-category.js +352 -0
- package/lib/browser/ai-configuration/categories/agents-configuration-category.js.map +1 -0
- package/lib/browser/ai-configuration/categories/agents-configuration-category.spec.d.ts +2 -0
- package/lib/browser/ai-configuration/categories/agents-configuration-category.spec.d.ts.map +1 -0
- package/lib/browser/ai-configuration/categories/agents-configuration-category.spec.js +99 -0
- package/lib/browser/ai-configuration/categories/agents-configuration-category.spec.js.map +1 -0
- package/lib/browser/ai-configuration/categories/general-configuration-category.d.ts +93 -0
- package/lib/browser/ai-configuration/categories/general-configuration-category.d.ts.map +1 -0
- package/lib/browser/ai-configuration/categories/general-configuration-category.js +313 -0
- package/lib/browser/ai-configuration/categories/general-configuration-category.js.map +1 -0
- package/lib/browser/ai-configuration/categories/general-configuration-category.spec.d.ts +2 -0
- package/lib/browser/ai-configuration/categories/general-configuration-category.spec.d.ts.map +1 -0
- package/lib/browser/ai-configuration/categories/general-configuration-category.spec.js +213 -0
- package/lib/browser/ai-configuration/categories/general-configuration-category.spec.js.map +1 -0
- package/lib/browser/ai-configuration/categories/model-aliases-configuration-category.d.ts +53 -0
- package/lib/browser/ai-configuration/categories/model-aliases-configuration-category.d.ts.map +1 -0
- package/lib/browser/ai-configuration/categories/model-aliases-configuration-category.js +241 -0
- package/lib/browser/ai-configuration/categories/model-aliases-configuration-category.js.map +1 -0
- package/lib/browser/ai-configuration/categories/model-aliases-configuration-category.spec.d.ts +2 -0
- package/lib/browser/ai-configuration/categories/model-aliases-configuration-category.spec.d.ts.map +1 -0
- package/lib/browser/ai-configuration/categories/model-aliases-configuration-category.spec.js +75 -0
- package/lib/browser/ai-configuration/categories/model-aliases-configuration-category.spec.js.map +1 -0
- package/lib/browser/ai-configuration/categories/models-configuration-category.d.ts +72 -0
- package/lib/browser/ai-configuration/categories/models-configuration-category.d.ts.map +1 -0
- package/lib/browser/ai-configuration/categories/models-configuration-category.js +227 -0
- package/lib/browser/ai-configuration/categories/models-configuration-category.js.map +1 -0
- package/lib/browser/ai-configuration/categories/models-configuration-category.spec.d.ts +2 -0
- package/lib/browser/ai-configuration/categories/models-configuration-category.spec.d.ts.map +1 -0
- package/lib/browser/ai-configuration/categories/models-configuration-category.spec.js +145 -0
- package/lib/browser/ai-configuration/categories/models-configuration-category.spec.js.map +1 -0
- package/lib/browser/ai-configuration/categories/prompt-snippets-configuration-category.d.ts +114 -0
- package/lib/browser/ai-configuration/categories/prompt-snippets-configuration-category.d.ts.map +1 -0
- package/lib/browser/ai-configuration/categories/prompt-snippets-configuration-category.js +341 -0
- package/lib/browser/ai-configuration/categories/prompt-snippets-configuration-category.js.map +1 -0
- package/lib/browser/ai-configuration/categories/prompt-snippets-configuration-category.spec.d.ts +2 -0
- package/lib/browser/ai-configuration/categories/prompt-snippets-configuration-category.spec.d.ts.map +1 -0
- package/lib/browser/ai-configuration/categories/prompt-snippets-configuration-category.spec.js +199 -0
- package/lib/browser/ai-configuration/categories/prompt-snippets-configuration-category.spec.js.map +1 -0
- package/lib/browser/ai-configuration/categories/prompts-and-skills-configuration-category.d.ts +84 -0
- package/lib/browser/ai-configuration/categories/prompts-and-skills-configuration-category.d.ts.map +1 -0
- package/lib/browser/ai-configuration/categories/prompts-and-skills-configuration-category.js +341 -0
- package/lib/browser/ai-configuration/categories/prompts-and-skills-configuration-category.js.map +1 -0
- package/lib/browser/ai-configuration/categories/prompts-and-skills-configuration-category.spec.d.ts +2 -0
- package/lib/browser/ai-configuration/categories/prompts-and-skills-configuration-category.spec.d.ts.map +1 -0
- package/lib/browser/ai-configuration/categories/prompts-and-skills-configuration-category.spec.js +184 -0
- package/lib/browser/ai-configuration/categories/prompts-and-skills-configuration-category.spec.js.map +1 -0
- package/lib/browser/ai-configuration/categories/token-usage-configuration-category.d.ts +38 -0
- package/lib/browser/ai-configuration/categories/token-usage-configuration-category.d.ts.map +1 -0
- package/lib/browser/ai-configuration/categories/token-usage-configuration-category.js +130 -0
- package/lib/browser/ai-configuration/categories/token-usage-configuration-category.js.map +1 -0
- package/lib/browser/ai-configuration/categories/token-usage-configuration-category.spec.d.ts +2 -0
- package/lib/browser/ai-configuration/categories/token-usage-configuration-category.spec.d.ts.map +1 -0
- package/lib/browser/ai-configuration/categories/token-usage-configuration-category.spec.js +51 -0
- package/lib/browser/ai-configuration/categories/token-usage-configuration-category.spec.js.map +1 -0
- package/lib/browser/ai-configuration/categories/tools-configuration-category.d.ts +60 -0
- package/lib/browser/ai-configuration/categories/tools-configuration-category.d.ts.map +1 -0
- package/lib/browser/ai-configuration/categories/tools-configuration-category.js +302 -0
- package/lib/browser/ai-configuration/categories/tools-configuration-category.js.map +1 -0
- package/lib/browser/ai-configuration/categories/tools-configuration-category.spec.d.ts +2 -0
- package/lib/browser/ai-configuration/categories/tools-configuration-category.spec.d.ts.map +1 -0
- package/lib/browser/ai-configuration/categories/tools-configuration-category.spec.js +111 -0
- package/lib/browser/ai-configuration/categories/tools-configuration-category.spec.js.map +1 -0
- package/lib/browser/ai-configuration/categories/variables-configuration-category.d.ts +72 -0
- package/lib/browser/ai-configuration/categories/variables-configuration-category.d.ts.map +1 -0
- package/lib/browser/ai-configuration/categories/variables-configuration-category.js +245 -0
- package/lib/browser/ai-configuration/categories/variables-configuration-category.js.map +1 -0
- package/lib/browser/ai-configuration/categories/variables-configuration-category.spec.d.ts +2 -0
- package/lib/browser/ai-configuration/categories/variables-configuration-category.spec.d.ts.map +1 -0
- package/lib/browser/ai-configuration/categories/variables-configuration-category.spec.js +131 -0
- package/lib/browser/ai-configuration/categories/variables-configuration-category.spec.js.map +1 -0
- package/lib/browser/ai-configuration/components/agent-notification-settings.d.ts +6 -2
- package/lib/browser/ai-configuration/components/agent-notification-settings.d.ts.map +1 -1
- package/lib/browser/ai-configuration/components/agent-notification-settings.js +15 -21
- package/lib/browser/ai-configuration/components/agent-notification-settings.js.map +1 -1
- package/lib/browser/ai-configuration/language-model-renderer.d.ts +25 -1
- package/lib/browser/ai-configuration/language-model-renderer.d.ts.map +1 -1
- package/lib/browser/ai-configuration/language-model-renderer.js +159 -63
- package/lib/browser/ai-configuration/language-model-renderer.js.map +1 -1
- package/lib/browser/ai-configuration/language-model-renderer.spec.d.ts +2 -0
- package/lib/browser/ai-configuration/language-model-renderer.spec.d.ts.map +1 -0
- package/lib/browser/ai-configuration/language-model-renderer.spec.js +93 -0
- package/lib/browser/ai-configuration/language-model-renderer.spec.js.map +1 -0
- package/lib/browser/ai-sessions-widget.js +12 -16
- package/lib/browser/ai-sessions-widget.js.map +1 -1
- package/lib/browser/app-tester-chat-agent.d.ts +2 -0
- package/lib/browser/app-tester-chat-agent.d.ts.map +1 -1
- package/lib/browser/app-tester-chat-agent.js +5 -0
- package/lib/browser/app-tester-chat-agent.js.map +1 -1
- package/lib/browser/architect-agent.d.ts +2 -0
- package/lib/browser/architect-agent.d.ts.map +1 -1
- package/lib/browser/architect-agent.js +5 -0
- package/lib/browser/architect-agent.js.map +1 -1
- package/lib/browser/architect-prompt-template.d.ts.map +1 -1
- package/lib/browser/architect-prompt-template.js +7 -0
- package/lib/browser/architect-prompt-template.js.map +1 -1
- package/lib/browser/chat-session-item.d.ts.map +1 -1
- package/lib/browser/chat-session-item.js +17 -30
- package/lib/browser/chat-session-item.js.map +1 -1
- package/lib/browser/chat-session-list-components.js +7 -30
- package/lib/browser/chat-session-list-components.js.map +1 -1
- package/lib/browser/chat-session-list-service.d.ts +2 -1
- package/lib/browser/chat-session-list-service.d.ts.map +1 -1
- package/lib/browser/chat-session-list-service.js +6 -1
- package/lib/browser/chat-session-list-service.js.map +1 -1
- package/lib/browser/chat-sessions-welcome-message-provider.js +3 -21
- package/lib/browser/chat-sessions-welcome-message-provider.js.map +1 -1
- package/lib/browser/code-reviewer-agent.d.ts +2 -0
- package/lib/browser/code-reviewer-agent.d.ts.map +1 -1
- package/lib/browser/code-reviewer-agent.js +5 -0
- package/lib/browser/code-reviewer-agent.js.map +1 -1
- package/lib/browser/coder-agent.d.ts +2 -0
- package/lib/browser/coder-agent.d.ts.map +1 -1
- package/lib/browser/coder-agent.js +6 -1
- package/lib/browser/coder-agent.js.map +1 -1
- package/lib/browser/context-file-validation-service-impl.spec.js +2 -0
- package/lib/browser/context-file-validation-service-impl.spec.js.map +1 -1
- package/lib/browser/create-skill-agent.d.ts +2 -0
- package/lib/browser/create-skill-agent.d.ts.map +1 -1
- package/lib/browser/create-skill-agent.js +5 -0
- package/lib/browser/create-skill-agent.js.map +1 -1
- package/lib/browser/explore-agent.d.ts +2 -0
- package/lib/browser/explore-agent.d.ts.map +1 -1
- package/lib/browser/explore-agent.js +5 -0
- package/lib/browser/explore-agent.js.map +1 -1
- package/lib/browser/file-changeset-functions.d.ts +7 -1
- package/lib/browser/file-changeset-functions.d.ts.map +1 -1
- package/lib/browser/file-changeset-functions.js +62 -20
- package/lib/browser/file-changeset-functions.js.map +1 -1
- package/lib/browser/file-changeset-functions.spec.js +130 -1
- package/lib/browser/file-changeset-functions.spec.js.map +1 -1
- package/lib/browser/frontend-module.d.ts.map +1 -1
- package/lib/browser/frontend-module.js +65 -59
- package/lib/browser/frontend-module.js.map +1 -1
- package/lib/browser/github-chat-agent.d.ts +2 -1
- package/lib/browser/github-chat-agent.d.ts.map +1 -1
- package/lib/browser/github-chat-agent.js +5 -0
- package/lib/browser/github-chat-agent.js.map +1 -1
- package/lib/browser/github-repo-variable-contribution.d.ts +2 -1
- package/lib/browser/github-repo-variable-contribution.d.ts.map +1 -1
- package/lib/browser/github-repo-variable-contribution.js +6 -1
- package/lib/browser/github-repo-variable-contribution.js.map +1 -1
- package/lib/browser/ide-chat-welcome-message-provider.d.ts.map +1 -1
- package/lib/browser/ide-chat-welcome-message-provider.js +31 -118
- package/lib/browser/ide-chat-welcome-message-provider.js.map +1 -1
- package/lib/browser/memory-capability-contribution.d.ts +8 -0
- package/lib/browser/memory-capability-contribution.d.ts.map +1 -0
- package/lib/browser/memory-capability-contribution.js +88 -0
- package/lib/browser/memory-capability-contribution.js.map +1 -0
- package/lib/browser/memory-capability-contribution.spec.d.ts +2 -0
- package/lib/browser/memory-capability-contribution.spec.d.ts.map +1 -0
- package/lib/browser/memory-capability-contribution.spec.js +74 -0
- package/lib/browser/memory-capability-contribution.spec.js.map +1 -0
- package/lib/browser/memory-directory-variable-contribution.d.ts +41 -0
- package/lib/browser/memory-directory-variable-contribution.d.ts.map +1 -0
- package/lib/browser/memory-directory-variable-contribution.js +107 -0
- package/lib/browser/memory-directory-variable-contribution.js.map +1 -0
- package/lib/browser/memory-directory-variable-contribution.spec.d.ts +2 -0
- package/lib/browser/memory-directory-variable-contribution.spec.d.ts.map +1 -0
- package/lib/browser/memory-directory-variable-contribution.spec.js +98 -0
- package/lib/browser/memory-directory-variable-contribution.spec.js.map +1 -0
- package/lib/browser/open-editors-hint-contribution.d.ts +7 -0
- package/lib/browser/open-editors-hint-contribution.d.ts.map +1 -0
- package/lib/browser/open-editors-hint-contribution.js +43 -0
- package/lib/browser/open-editors-hint-contribution.js.map +1 -0
- package/lib/browser/project-info-agent.d.ts +2 -0
- package/lib/browser/project-info-agent.d.ts.map +1 -1
- package/lib/browser/project-info-agent.js +5 -0
- package/lib/browser/project-info-agent.js.map +1 -1
- package/lib/browser/review/pr-review-agent.d.ts +2 -0
- package/lib/browser/review/pr-review-agent.d.ts.map +1 -1
- package/lib/browser/review/pr-review-agent.js +5 -0
- package/lib/browser/review/pr-review-agent.js.map +1 -1
- package/lib/browser/summarize-session-command-contribution.d.ts +2 -1
- package/lib/browser/summarize-session-command-contribution.d.ts.map +1 -1
- package/lib/browser/summarize-session-command-contribution.js +6 -1
- package/lib/browser/summarize-session-command-contribution.js.map +1 -1
- package/lib/browser/task-context-file-storage-service.d.ts.map +1 -1
- package/lib/browser/task-context-file-storage-service.js +1 -0
- package/lib/browser/task-context-file-storage-service.js.map +1 -1
- package/lib/browser/todo-tool-renderer.js +11 -19
- package/lib/browser/todo-tool-renderer.js.map +1 -1
- package/lib/browser/user-interaction-tool-renderer.js +39 -83
- package/lib/browser/user-interaction-tool-renderer.js.map +1 -1
- package/lib/browser/user-interaction-tool.d.ts +2 -0
- package/lib/browser/user-interaction-tool.d.ts.map +1 -1
- package/lib/browser/user-interaction-tool.js +7 -1
- package/lib/browser/user-interaction-tool.js.map +1 -1
- package/lib/browser/user-interaction-tool.spec.js +4 -2
- package/lib/browser/user-interaction-tool.spec.js.map +1 -1
- package/lib/browser/workspace-functions.d.ts +45 -7
- package/lib/browser/workspace-functions.d.ts.map +1 -1
- package/lib/browser/workspace-functions.js +108 -70
- package/lib/browser/workspace-functions.js.map +1 -1
- package/lib/browser/workspace-functions.spec.js +139 -9
- package/lib/browser/workspace-functions.spec.js.map +1 -1
- package/lib/browser/workspace-launch-provider.spec.js +3 -0
- package/lib/browser/workspace-launch-provider.spec.js.map +1 -1
- package/lib/browser/workspace-search-provider.d.ts.map +1 -1
- package/lib/browser/workspace-search-provider.js +4 -7
- package/lib/browser/workspace-search-provider.js.map +1 -1
- package/lib/browser/workspace-search-provider.spec.js +1 -2
- package/lib/browser/workspace-search-provider.spec.js.map +1 -1
- package/lib/browser/workspace-task-provider.spec.js +4 -0
- package/lib/browser/workspace-task-provider.spec.js.map +1 -1
- package/lib/common/coder-replace-prompt-template.d.ts +0 -2
- package/lib/common/coder-replace-prompt-template.d.ts.map +1 -1
- package/lib/common/coder-replace-prompt-template.js +10 -11
- package/lib/common/coder-replace-prompt-template.js.map +1 -1
- package/lib/common/command-chat-agents.d.ts +2 -1
- package/lib/common/command-chat-agents.d.ts.map +1 -1
- package/lib/common/command-chat-agents.js +6 -1
- package/lib/common/command-chat-agents.js.map +1 -1
- package/lib/common/open-editors-hint-fragment-id.d.ts +2 -0
- package/lib/common/open-editors-hint-fragment-id.d.ts.map +1 -0
- package/lib/{browser/ai-configuration/components/empty-state.js → common/open-editors-hint-fragment-id.js} +5 -11
- package/lib/common/open-editors-hint-fragment-id.js.map +1 -0
- package/lib/common/orchestrator-chat-agent.d.ts +2 -1
- package/lib/common/orchestrator-chat-agent.d.ts.map +1 -1
- package/lib/common/orchestrator-chat-agent.js +5 -0
- package/lib/common/orchestrator-chat-agent.js.map +1 -1
- package/lib/common/universal-chat-agent.d.ts +2 -0
- package/lib/common/universal-chat-agent.d.ts.map +1 -1
- package/lib/common/universal-chat-agent.js +5 -0
- package/lib/common/universal-chat-agent.js.map +1 -1
- package/lib/common/universal-prompt-template.d.ts.map +1 -1
- package/lib/common/universal-prompt-template.js +3 -0
- package/lib/common/universal-prompt-template.js.map +1 -1
- package/lib/common/workspace-preferences.js +2 -2
- package/lib/common/workspace-preferences.js.map +1 -1
- package/lib/common/workspace-search-provider-util.d.ts +2 -1
- package/lib/common/workspace-search-provider-util.d.ts.map +1 -1
- package/lib/common/workspace-search-provider-util.js +3 -2
- package/lib/common/workspace-search-provider-util.js.map +1 -1
- package/lib/common/workspace-search-provider-util.spec.d.ts +2 -0
- package/lib/common/workspace-search-provider-util.spec.d.ts.map +1 -0
- package/lib/common/workspace-search-provider-util.spec.js +55 -0
- package/lib/common/workspace-search-provider-util.spec.js.map +1 -0
- package/lib/node/github-repo-service-impl.d.ts +2 -0
- package/lib/node/github-repo-service-impl.d.ts.map +1 -1
- package/lib/node/github-repo-service-impl.js +7 -1
- package/lib/node/github-repo-service-impl.js.map +1 -1
- package/package.json +26 -25
- package/src/browser/ai-configuration/agent-icon.ts +37 -0
- package/src/browser/ai-configuration/ai-configuration-breadcrumbs-contribution.ts +164 -0
- package/src/browser/ai-configuration/ai-configuration-detail-widget.spec.ts +165 -0
- package/src/browser/ai-configuration/ai-configuration-detail-widget.tsx +237 -0
- package/src/browser/ai-configuration/ai-configuration-label-provider-contribution.ts +47 -0
- package/src/browser/ai-configuration/ai-configuration-open-preference-renderer.ts +64 -0
- package/src/browser/ai-configuration/ai-configuration-preference-ownership.spec.ts +135 -0
- package/src/browser/ai-configuration/{components/configuration-section.tsx → ai-configuration-resource.ts} +9 -19
- package/src/browser/ai-configuration/ai-configuration-search-widget.tsx +135 -0
- package/src/browser/ai-configuration/ai-configuration-search.spec.ts +91 -0
- package/src/browser/ai-configuration/ai-configuration-search.ts +43 -0
- package/src/browser/ai-configuration/{components/empty-state.tsx → ai-configuration-tree-model.ts} +7 -11
- package/src/browser/ai-configuration/ai-configuration-tree-nodes.spec.ts +150 -0
- package/src/browser/ai-configuration/ai-configuration-tree-nodes.ts +167 -0
- package/src/browser/ai-configuration/ai-configuration-tree-widget.tsx +457 -0
- package/src/browser/ai-configuration/ai-configuration-view-contribution.ts +156 -18
- package/src/browser/ai-configuration/ai-configuration-widget.tsx +107 -75
- package/src/browser/ai-configuration/categories/agent-capabilities-settings.spec.ts +161 -0
- package/src/browser/ai-configuration/categories/agent-capabilities-settings.tsx +340 -0
- package/src/browser/ai-configuration/categories/agent-chips.tsx +51 -0
- package/src/browser/ai-configuration/categories/agent-detail-model.ts +152 -0
- package/src/browser/ai-configuration/categories/agent-detail-view.tsx +329 -0
- package/src/browser/ai-configuration/categories/agents-configuration-category.spec.ts +119 -0
- package/src/browser/ai-configuration/categories/agents-configuration-category.tsx +431 -0
- package/src/browser/ai-configuration/categories/general-configuration-category.spec.ts +225 -0
- package/src/browser/ai-configuration/categories/general-configuration-category.tsx +465 -0
- package/src/browser/ai-configuration/categories/model-aliases-configuration-category.spec.ts +87 -0
- package/src/browser/ai-configuration/categories/model-aliases-configuration-category.tsx +286 -0
- package/src/browser/ai-configuration/categories/models-configuration-category.spec.ts +167 -0
- package/src/browser/ai-configuration/categories/models-configuration-category.tsx +264 -0
- package/src/browser/ai-configuration/categories/prompt-snippets-configuration-category.spec.ts +250 -0
- package/src/browser/ai-configuration/categories/prompt-snippets-configuration-category.tsx +438 -0
- package/src/browser/ai-configuration/categories/prompts-and-skills-configuration-category.spec.ts +226 -0
- package/src/browser/ai-configuration/categories/prompts-and-skills-configuration-category.tsx +419 -0
- package/src/browser/ai-configuration/categories/token-usage-configuration-category.spec.ts +57 -0
- package/src/browser/ai-configuration/categories/token-usage-configuration-category.tsx +185 -0
- package/src/browser/ai-configuration/categories/tools-configuration-category.spec.ts +130 -0
- package/src/browser/ai-configuration/categories/tools-configuration-category.tsx +421 -0
- package/src/browser/ai-configuration/categories/variables-configuration-category.spec.ts +154 -0
- package/src/browser/ai-configuration/categories/variables-configuration-category.tsx +322 -0
- package/src/browser/ai-configuration/components/agent-notification-settings.tsx +38 -33
- package/src/browser/ai-configuration/language-model-renderer.spec.ts +100 -0
- package/src/browser/ai-configuration/language-model-renderer.tsx +244 -100
- package/src/browser/app-tester-chat-agent.ts +5 -2
- package/src/browser/architect-agent.ts +5 -2
- package/src/browser/architect-prompt-template.ts +7 -0
- package/src/browser/chat-session-item.tsx +2 -4
- package/src/browser/chat-session-list-service.ts +6 -3
- package/src/browser/code-reviewer-agent.ts +5 -2
- package/src/browser/coder-agent.ts +7 -5
- package/src/browser/context-file-validation-service-impl.spec.ts +3 -2
- package/src/browser/create-skill-agent.ts +5 -2
- package/src/browser/explore-agent.ts +5 -2
- package/src/browser/file-changeset-functions.spec.ts +158 -5
- package/src/browser/file-changeset-functions.ts +61 -23
- package/src/browser/frontend-module.ts +76 -63
- package/src/browser/github-chat-agent.ts +5 -2
- package/src/browser/github-repo-variable-contribution.ts +6 -3
- package/src/browser/ide-chat-welcome-message-provider.tsx +11 -11
- package/src/browser/memory-capability-contribution.spec.ts +85 -0
- package/src/browser/memory-capability-contribution.ts +86 -0
- package/src/browser/memory-directory-variable-contribution.spec.ts +113 -0
- package/src/browser/memory-directory-variable-contribution.ts +113 -0
- package/src/browser/open-editors-hint-contribution.ts +38 -0
- package/src/browser/project-info-agent.ts +5 -2
- package/src/browser/review/pr-review-agent.ts +5 -2
- package/src/browser/style/ai-configuration-base.css +0 -6
- package/src/browser/style/ai-configuration-shell.css +416 -0
- package/src/browser/style/ai-configuration-table.css +2 -15
- package/src/browser/style/index.css +220 -276
- package/src/browser/summarize-session-command-contribution.ts +6 -3
- package/src/browser/task-context-file-storage-service.ts +5 -2
- package/src/browser/user-interaction-tool.spec.ts +5 -2
- package/src/browser/user-interaction-tool.ts +6 -2
- package/src/browser/workspace-functions.spec.ts +163 -10
- package/src/browser/workspace-functions.ts +121 -72
- package/src/browser/workspace-launch-provider.spec.ts +4 -1
- package/src/browser/workspace-search-provider.spec.ts +1 -2
- package/src/browser/workspace-search-provider.ts +4 -7
- package/src/browser/workspace-task-provider.spec.ts +5 -1
- package/src/common/coder-replace-prompt-template.ts +9 -9
- package/src/common/command-chat-agents.ts +6 -2
- package/src/{browser/ai-configuration/base/ai-configuration-base-widget.tsx → common/open-editors-hint-fragment-id.ts} +2 -22
- package/src/common/orchestrator-chat-agent.ts +5 -2
- package/src/common/universal-chat-agent.ts +5 -2
- package/src/common/universal-prompt-template.ts +3 -0
- package/src/common/workspace-preferences.ts +2 -2
- package/src/common/workspace-search-provider-util.spec.ts +61 -0
- package/src/common/workspace-search-provider-util.ts +3 -2
- package/src/node/github-repo-service-impl.ts +6 -2
- package/lib/browser/ai-configuration/agent-configuration-widget.d.ts +0 -72
- package/lib/browser/ai-configuration/agent-configuration-widget.d.ts.map +0 -1
- package/lib/browser/ai-configuration/agent-configuration-widget.js +0 -620
- package/lib/browser/ai-configuration/agent-configuration-widget.js.map +0 -1
- package/lib/browser/ai-configuration/agent-configuration-widget.spec.d.ts +0 -2
- package/lib/browser/ai-configuration/agent-configuration-widget.spec.d.ts.map +0 -1
- package/lib/browser/ai-configuration/agent-configuration-widget.spec.js +0 -56
- package/lib/browser/ai-configuration/agent-configuration-widget.spec.js.map +0 -1
- package/lib/browser/ai-configuration/base/ai-card-grid-configuration-widget.d.ts +0 -31
- package/lib/browser/ai-configuration/base/ai-card-grid-configuration-widget.d.ts.map +0 -1
- package/lib/browser/ai-configuration/base/ai-card-grid-configuration-widget.js +0 -55
- package/lib/browser/ai-configuration/base/ai-card-grid-configuration-widget.js.map +0 -1
- package/lib/browser/ai-configuration/base/ai-configuration-base-widget.d.ts +0 -13
- package/lib/browser/ai-configuration/base/ai-configuration-base-widget.d.ts.map +0 -1
- package/lib/browser/ai-configuration/base/ai-configuration-base-widget.js.map +0 -1
- package/lib/browser/ai-configuration/base/ai-hierarchical-configuration-widget.d.ts +0 -23
- package/lib/browser/ai-configuration/base/ai-hierarchical-configuration-widget.d.ts.map +0 -1
- package/lib/browser/ai-configuration/base/ai-hierarchical-configuration-widget.js +0 -60
- package/lib/browser/ai-configuration/base/ai-hierarchical-configuration-widget.js.map +0 -1
- package/lib/browser/ai-configuration/base/ai-list-detail-configuration-widget.d.ts +0 -55
- package/lib/browser/ai-configuration/base/ai-list-detail-configuration-widget.d.ts.map +0 -1
- package/lib/browser/ai-configuration/base/ai-list-detail-configuration-widget.js +0 -96
- package/lib/browser/ai-configuration/base/ai-list-detail-configuration-widget.js.map +0 -1
- package/lib/browser/ai-configuration/base/ai-table-configuration-widget.d.ts +0 -44
- package/lib/browser/ai-configuration/base/ai-table-configuration-widget.d.ts.map +0 -1
- package/lib/browser/ai-configuration/base/ai-table-configuration-widget.js +0 -66
- package/lib/browser/ai-configuration/base/ai-table-configuration-widget.js.map +0 -1
- package/lib/browser/ai-configuration/components/configuration-section.d.ts +0 -12
- package/lib/browser/ai-configuration/components/configuration-section.d.ts.map +0 -1
- package/lib/browser/ai-configuration/components/configuration-section.js.map +0 -1
- package/lib/browser/ai-configuration/components/empty-state.d.ts +0 -10
- package/lib/browser/ai-configuration/components/empty-state.d.ts.map +0 -1
- package/lib/browser/ai-configuration/components/empty-state.js.map +0 -1
- package/lib/browser/ai-configuration/components/expandable-section.d.ts +0 -13
- package/lib/browser/ai-configuration/components/expandable-section.d.ts.map +0 -1
- package/lib/browser/ai-configuration/components/expandable-section.js +0 -31
- package/lib/browser/ai-configuration/components/expandable-section.js.map +0 -1
- package/lib/browser/ai-configuration/model-aliases-configuration-widget.d.ts +0 -26
- package/lib/browser/ai-configuration/model-aliases-configuration-widget.d.ts.map +0 -1
- package/lib/browser/ai-configuration/model-aliases-configuration-widget.js +0 -198
- package/lib/browser/ai-configuration/model-aliases-configuration-widget.js.map +0 -1
- package/lib/browser/ai-configuration/prompt-fragments-configuration-widget.d.ts +0 -140
- package/lib/browser/ai-configuration/prompt-fragments-configuration-widget.d.ts.map +0 -1
- package/lib/browser/ai-configuration/prompt-fragments-configuration-widget.js +0 -508
- package/lib/browser/ai-configuration/prompt-fragments-configuration-widget.js.map +0 -1
- package/lib/browser/ai-configuration/skills-configuration-widget.d.ts +0 -29
- package/lib/browser/ai-configuration/skills-configuration-widget.d.ts.map +0 -1
- package/lib/browser/ai-configuration/skills-configuration-widget.js +0 -166
- package/lib/browser/ai-configuration/skills-configuration-widget.js.map +0 -1
- package/lib/browser/ai-configuration/skills-configuration-widget.spec.d.ts +0 -2
- package/lib/browser/ai-configuration/skills-configuration-widget.spec.d.ts.map +0 -1
- package/lib/browser/ai-configuration/skills-configuration-widget.spec.js +0 -191
- package/lib/browser/ai-configuration/skills-configuration-widget.spec.js.map +0 -1
- package/lib/browser/ai-configuration/template-settings-renderer.d.ts +0 -9
- package/lib/browser/ai-configuration/template-settings-renderer.d.ts.map +0 -1
- package/lib/browser/ai-configuration/template-settings-renderer.js +0 -78
- package/lib/browser/ai-configuration/template-settings-renderer.js.map +0 -1
- package/lib/browser/ai-configuration/token-usage-configuration-widget.d.ts +0 -20
- package/lib/browser/ai-configuration/token-usage-configuration-widget.d.ts.map +0 -1
- package/lib/browser/ai-configuration/token-usage-configuration-widget.js +0 -170
- package/lib/browser/ai-configuration/token-usage-configuration-widget.js.map +0 -1
- package/lib/browser/ai-configuration/tools-configuration-widget.d.ts +0 -52
- package/lib/browser/ai-configuration/tools-configuration-widget.d.ts.map +0 -1
- package/lib/browser/ai-configuration/tools-configuration-widget.js +0 -357
- package/lib/browser/ai-configuration/tools-configuration-widget.js.map +0 -1
- package/lib/browser/ai-configuration/variable-configuration-widget.d.ts +0 -22
- package/lib/browser/ai-configuration/variable-configuration-widget.d.ts.map +0 -1
- package/lib/browser/ai-configuration/variable-configuration-widget.js +0 -133
- package/lib/browser/ai-configuration/variable-configuration-widget.js.map +0 -1
- package/src/browser/ai-configuration/agent-configuration-widget.spec.ts +0 -71
- package/src/browser/ai-configuration/agent-configuration-widget.tsx +0 -928
- package/src/browser/ai-configuration/base/ai-card-grid-configuration-widget.tsx +0 -72
- package/src/browser/ai-configuration/base/ai-hierarchical-configuration-widget.tsx +0 -51
- package/src/browser/ai-configuration/base/ai-list-detail-configuration-widget.tsx +0 -140
- package/src/browser/ai-configuration/base/ai-table-configuration-widget.tsx +0 -107
- package/src/browser/ai-configuration/components/expandable-section.tsx +0 -51
- package/src/browser/ai-configuration/model-aliases-configuration-widget.tsx +0 -270
- package/src/browser/ai-configuration/prompt-fragments-configuration-widget.tsx +0 -736
- package/src/browser/ai-configuration/skills-configuration-widget.spec.ts +0 -248
- package/src/browser/ai-configuration/skills-configuration-widget.tsx +0 -229
- package/src/browser/ai-configuration/template-settings-renderer.tsx +0 -125
- package/src/browser/ai-configuration/token-usage-configuration-widget.tsx +0 -214
- package/src/browser/ai-configuration/tools-configuration-widget.tsx +0 -544
- package/src/browser/ai-configuration/variable-configuration-widget.tsx +0 -159
- package/src/browser/style/ai-configuration-cards.css +0 -60
|
@@ -1,544 +0,0 @@
|
|
|
1
|
-
// *****************************************************************************
|
|
2
|
-
// Copyright (C) 2025 EclipseSource GmbH.
|
|
3
|
-
//
|
|
4
|
-
// This program and the accompanying materials are made available under the
|
|
5
|
-
// terms of the Eclipse Public License v. 2.0 which is available at
|
|
6
|
-
// http://www.eclipse.org/legal/epl-2.0.
|
|
7
|
-
//
|
|
8
|
-
// This Source Code may also be made available under the following Secondary
|
|
9
|
-
// Licenses when the conditions for such availability set forth in the Eclipse
|
|
10
|
-
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
11
|
-
// with the GNU Classpath Exception which is available at
|
|
12
|
-
// https://www.gnu.org/software/classpath/license.html.
|
|
13
|
-
//
|
|
14
|
-
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
15
|
-
// *****************************************************************************
|
|
16
|
-
|
|
17
|
-
import { ConfirmDialog } from '@theia/core/lib/browser';
|
|
18
|
-
import { inject, injectable, postConstruct } from '@theia/core/shared/inversify';
|
|
19
|
-
import * as React from '@theia/core/shared/react';
|
|
20
|
-
import { AiConfigurationService, ToolInvocationRegistry, ToolRequest } from '@theia/ai-core';
|
|
21
|
-
import { nls } from '@theia/core';
|
|
22
|
-
import { ToolConfirmationManager } from '@theia/ai-chat/lib/browser/chat-tool-preference-bindings';
|
|
23
|
-
import { ShellCommandPermissionService } from '@theia/ai-terminal/lib/browser/shell-command-permission-service';
|
|
24
|
-
import {
|
|
25
|
-
DEFAULT_TOOL_CONFIRMATION_PREFERENCE,
|
|
26
|
-
TOOL_CONFIRMATION_PREFERENCE,
|
|
27
|
-
ToolConfirmationMode
|
|
28
|
-
} from '@theia/ai-chat/lib/common/chat-tool-preferences';
|
|
29
|
-
import { SHELL_COMMAND_ALLOWLIST_PREFERENCE, SHELL_COMMAND_DENYLIST_PREFERENCE } from '@theia/ai-terminal/lib/common/shell-command-preferences';
|
|
30
|
-
import { AITableConfigurationWidget, TableColumn } from './base/ai-table-configuration-widget';
|
|
31
|
-
|
|
32
|
-
const TOOL_OPTIONS: { value: ToolConfirmationMode, label: string, icon: string }[] = [
|
|
33
|
-
{ value: ToolConfirmationMode.DISABLED, label: nls.localizeByDefault('Disabled'), icon: 'close' },
|
|
34
|
-
{ value: ToolConfirmationMode.CONFIRM, label: nls.localize('theia/ai/ide/toolsConfiguration/toolOptions/confirm/label', 'Confirm'), icon: 'question' },
|
|
35
|
-
{ value: ToolConfirmationMode.ALWAYS_ALLOW, label: nls.localizeByDefault('Always Allow'), icon: 'thumbsup' },
|
|
36
|
-
];
|
|
37
|
-
|
|
38
|
-
interface ToolItem {
|
|
39
|
-
name: string;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
@injectable()
|
|
43
|
-
export class AIToolsConfigurationWidget extends AITableConfigurationWidget<ToolItem> {
|
|
44
|
-
static readonly ID = 'ai-tools-configuration-widget';
|
|
45
|
-
static readonly LABEL = nls.localizeByDefault('Tools');
|
|
46
|
-
|
|
47
|
-
@inject(ToolConfirmationManager)
|
|
48
|
-
protected readonly confirmationManager: ToolConfirmationManager;
|
|
49
|
-
|
|
50
|
-
@inject(AiConfigurationService)
|
|
51
|
-
protected readonly aiConfigurationService: AiConfigurationService;
|
|
52
|
-
|
|
53
|
-
@inject(ToolInvocationRegistry)
|
|
54
|
-
protected readonly toolInvocationRegistry: ToolInvocationRegistry;
|
|
55
|
-
|
|
56
|
-
@inject(ShellCommandPermissionService)
|
|
57
|
-
protected readonly shellCommandPermissionService: ShellCommandPermissionService;
|
|
58
|
-
|
|
59
|
-
protected toolConfirmationModes: Record<string, ToolConfirmationMode> = {};
|
|
60
|
-
protected defaultState: ToolConfirmationMode;
|
|
61
|
-
protected allowlistPatterns: string[] = [];
|
|
62
|
-
protected allowlistInputRef = React.createRef<HTMLInputElement>();
|
|
63
|
-
protected allowlistError: string | undefined;
|
|
64
|
-
protected denylistPatterns: string[] = [];
|
|
65
|
-
protected denylistInputRef = React.createRef<HTMLInputElement>();
|
|
66
|
-
protected denylistError: string | undefined;
|
|
67
|
-
|
|
68
|
-
@postConstruct()
|
|
69
|
-
protected init(): void {
|
|
70
|
-
this.id = AIToolsConfigurationWidget.ID;
|
|
71
|
-
this.title.label = AIToolsConfigurationWidget.LABEL;
|
|
72
|
-
this.title.closable = false;
|
|
73
|
-
this.addClass('ai-configuration-widget');
|
|
74
|
-
|
|
75
|
-
this.loadData().then(() => this.update());
|
|
76
|
-
this.toDispose.pushAll([
|
|
77
|
-
this.aiConfigurationService.onDidChange(async e => {
|
|
78
|
-
if (e.affectsPreference(TOOL_CONFIRMATION_PREFERENCE)
|
|
79
|
-
|| e.affectsPreference(DEFAULT_TOOL_CONFIRMATION_PREFERENCE)) {
|
|
80
|
-
this.defaultState = await this.loadDefaultConfirmation();
|
|
81
|
-
this.toolConfirmationModes = await this.loadToolConfigurationModes();
|
|
82
|
-
this.update();
|
|
83
|
-
}
|
|
84
|
-
if (e.affectsPreference(SHELL_COMMAND_ALLOWLIST_PREFERENCE)) {
|
|
85
|
-
this.allowlistPatterns = this.shellCommandPermissionService.getAllowlistPatterns();
|
|
86
|
-
this.update();
|
|
87
|
-
}
|
|
88
|
-
if (e.affectsPreference(SHELL_COMMAND_DENYLIST_PREFERENCE)) {
|
|
89
|
-
this.denylistPatterns = this.shellCommandPermissionService.getDenylistPatterns();
|
|
90
|
-
this.update();
|
|
91
|
-
}
|
|
92
|
-
}),
|
|
93
|
-
this.toolInvocationRegistry.onDidChange(async () => {
|
|
94
|
-
await this.loadItems();
|
|
95
|
-
this.update();
|
|
96
|
-
})
|
|
97
|
-
]);
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
protected async loadData(): Promise<void> {
|
|
101
|
-
await this.aiConfigurationService.ready;
|
|
102
|
-
await this.loadItems();
|
|
103
|
-
this.defaultState = await this.loadDefaultConfirmation();
|
|
104
|
-
this.toolConfirmationModes = await this.loadToolConfigurationModes();
|
|
105
|
-
this.allowlistPatterns = this.shellCommandPermissionService.getAllowlistPatterns();
|
|
106
|
-
this.denylistPatterns = this.shellCommandPermissionService.getDenylistPatterns();
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
protected async loadItems(): Promise<void> {
|
|
110
|
-
const toolNames = this.toolInvocationRegistry.getAllFunctions()
|
|
111
|
-
.map(func => func.name)
|
|
112
|
-
.sort((a, b) => {
|
|
113
|
-
const aIsMcp = a.startsWith('mcp_');
|
|
114
|
-
const bIsMcp = b.startsWith('mcp_');
|
|
115
|
-
if (aIsMcp !== bIsMcp) {
|
|
116
|
-
// Place names starting with "mcp_" after non-mcp names
|
|
117
|
-
return aIsMcp ? 1 : -1;
|
|
118
|
-
}
|
|
119
|
-
return a.localeCompare(b);
|
|
120
|
-
});
|
|
121
|
-
this.items = toolNames.map(name => ({ name }));
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
protected getItemId(item: ToolItem): string {
|
|
125
|
-
return item.name;
|
|
126
|
-
}
|
|
127
|
-
protected async loadDefaultConfirmation(): Promise<ToolConfirmationMode> {
|
|
128
|
-
return this.confirmationManager.getDefaultConfirmationMode();
|
|
129
|
-
}
|
|
130
|
-
protected async loadToolConfigurationModes(): Promise<Record<string, ToolConfirmationMode>> {
|
|
131
|
-
return this.confirmationManager.getAllConfirmationSettings();
|
|
132
|
-
}
|
|
133
|
-
protected async updateToolConfirmationMode(tool: string, state: ToolConfirmationMode, toolRequest?: ToolRequest): Promise<void> {
|
|
134
|
-
await this.confirmationManager.setConfirmationMode(tool, state, toolRequest);
|
|
135
|
-
}
|
|
136
|
-
protected async updateDefaultConfirmation(state: ToolConfirmationMode): Promise<void> {
|
|
137
|
-
await this.confirmationManager.setDefaultConfirmationMode(state);
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
protected handleToolConfirmationModeChange = async (toolName: string, event: React.ChangeEvent<HTMLSelectElement>): Promise<void> => {
|
|
141
|
-
const newState = event.target.value as ToolConfirmationMode;
|
|
142
|
-
const toolRequest = this.toolInvocationRegistry.getFunction(toolName);
|
|
143
|
-
|
|
144
|
-
// Check if we need extra confirmation for ALWAYS_ALLOW on confirmAlwaysAllow tools
|
|
145
|
-
if (newState === ToolConfirmationMode.ALWAYS_ALLOW) {
|
|
146
|
-
if (toolRequest?.confirmAlwaysAllow) {
|
|
147
|
-
const confirmed = await this.showConfirmAlwaysAllowDialog(toolName, toolRequest);
|
|
148
|
-
if (!confirmed) {
|
|
149
|
-
// Revert selection by triggering a re-render
|
|
150
|
-
this.update();
|
|
151
|
-
return;
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
await this.updateToolConfirmationMode(toolName, newState, toolRequest);
|
|
157
|
-
// Reload from preferences to ensure consistency (setConfirmationMode may remove entries that match default)
|
|
158
|
-
this.toolConfirmationModes = await this.loadToolConfigurationModes();
|
|
159
|
-
this.update();
|
|
160
|
-
};
|
|
161
|
-
|
|
162
|
-
protected async showConfirmAlwaysAllowDialog(toolName: string, toolRequest: ToolRequest): Promise<boolean> {
|
|
163
|
-
const warningMessage = typeof toolRequest.confirmAlwaysAllow === 'string'
|
|
164
|
-
? toolRequest.confirmAlwaysAllow
|
|
165
|
-
: nls.localize(
|
|
166
|
-
'theia/ai/ide/toolsConfiguration/confirmAlwaysAllow/genericWarning',
|
|
167
|
-
'This tool requires confirmation before auto-approval can be enabled. ' +
|
|
168
|
-
'Once enabled, all future invocations will execute without confirmation. ' +
|
|
169
|
-
'Only enable this if you trust this tool and understand the potential risks.'
|
|
170
|
-
);
|
|
171
|
-
|
|
172
|
-
const dialog = new ConfirmDialog({
|
|
173
|
-
title: nls.localize('theia/ai/ide/toolsConfiguration/confirmAlwaysAllow/title', 'Enable Auto-Approval for "{0}"?', toolName),
|
|
174
|
-
msg: warningMessage,
|
|
175
|
-
ok: nls.localize('theia/ai/ide/toolsConfiguration/confirmAlwaysAllow/confirm', 'I understand, enable auto-approval'),
|
|
176
|
-
cancel: nls.localizeByDefault('Cancel')
|
|
177
|
-
});
|
|
178
|
-
return !!await dialog.open();
|
|
179
|
-
}
|
|
180
|
-
protected handleDefaultStateChange = async (event: React.ChangeEvent<HTMLSelectElement>) => {
|
|
181
|
-
const newState = event.target.value as ToolConfirmationMode;
|
|
182
|
-
await this.updateDefaultConfirmation(newState);
|
|
183
|
-
};
|
|
184
|
-
|
|
185
|
-
protected async resetAllToolsToDefault(): Promise<void> {
|
|
186
|
-
const dialog = new ConfirmDialog({
|
|
187
|
-
title: nls.localize('theia/ai/ide/toolsConfiguration/resetAllConfirmDialog/title', 'Reset All Tool Confirmation Modes'),
|
|
188
|
-
msg: nls.localize('theia/ai/ide/toolsConfiguration/resetAllConfirmDialog/msg',
|
|
189
|
-
'Are you sure you want to reset all tool confirmation modes to the default? This will remove all custom settings.'),
|
|
190
|
-
ok: nls.localize('theia/ai/ide/toolsConfiguration/resetAll', 'Reset All'),
|
|
191
|
-
cancel: nls.localizeByDefault('Cancel')
|
|
192
|
-
});
|
|
193
|
-
const shouldReset = await dialog.open();
|
|
194
|
-
if (shouldReset) {
|
|
195
|
-
await this.confirmationManager.resetAllConfirmationModeSettings();
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
protected override renderHeader(): React.ReactNode {
|
|
200
|
-
return (
|
|
201
|
-
<>
|
|
202
|
-
<div className="ai-tools-configuration-header">
|
|
203
|
-
<div style={{ fontWeight: 500 }}>
|
|
204
|
-
{nls.localize('theia/ai/ide/toolsConfiguration/default/label', 'Default Tool Confirmation Mode:')}
|
|
205
|
-
</div>
|
|
206
|
-
<select
|
|
207
|
-
className="theia-select"
|
|
208
|
-
value={this.defaultState}
|
|
209
|
-
onChange={this.handleDefaultStateChange}
|
|
210
|
-
>
|
|
211
|
-
{TOOL_OPTIONS.map(opt => (
|
|
212
|
-
<option key={opt.value} value={opt.value}>{opt.label}</option>
|
|
213
|
-
))}
|
|
214
|
-
</select>
|
|
215
|
-
<button
|
|
216
|
-
className='theia-button secondary ai-tools-reset-button'
|
|
217
|
-
style={{ marginLeft: 'auto' }}
|
|
218
|
-
title={nls.localize('theia/ai/ide/toolsConfiguration/resetAllTooltip', 'Reset all tools to default')}
|
|
219
|
-
onClick={() => this.resetAllToolsToDefault()}
|
|
220
|
-
>
|
|
221
|
-
{nls.localize('theia/ai/ide/toolsConfiguration/resetAll', 'Reset All')}
|
|
222
|
-
</button>
|
|
223
|
-
</div>
|
|
224
|
-
{this.renderRecommendedDefaultsBanner()}
|
|
225
|
-
</>
|
|
226
|
-
);
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
protected renderRecommendedDefaultsBanner(): React.ReactNode {
|
|
230
|
-
if (this.defaultState !== ToolConfirmationMode.CONFIRM) {
|
|
231
|
-
return undefined;
|
|
232
|
-
}
|
|
233
|
-
return (
|
|
234
|
-
<div className="ai-tools-recommended-defaults-banner">
|
|
235
|
-
<span className="ai-tools-recommended-defaults-text">
|
|
236
|
-
{nls.localize(
|
|
237
|
-
'theia/ai/ide/toolsConfiguration/recommendedDefaults/message',
|
|
238
|
-
'Tool calls currently require approval. Auto-allow all built-in tools at once.' +
|
|
239
|
-
' Tools that require extra confirmation (e.g. shell execution), MCP tools,' +
|
|
240
|
-
' and any tools added later will still ask before running.'
|
|
241
|
-
)}
|
|
242
|
-
</span>
|
|
243
|
-
<button
|
|
244
|
-
className='theia-button main'
|
|
245
|
-
onClick={() => this.allowCurrentTools()}
|
|
246
|
-
>
|
|
247
|
-
{nls.localize('theia/ai/ide/toolsConfiguration/recommendedDefaults/apply', 'Allow Default Tools')}
|
|
248
|
-
</button>
|
|
249
|
-
</div>
|
|
250
|
-
);
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
protected async allowCurrentTools(): Promise<void> {
|
|
254
|
-
const dialog = new ConfirmDialog({
|
|
255
|
-
title: nls.localize('theia/ai/ide/toolsConfiguration/recommendedDefaults/dialogTitle', 'Allow Default Tools?'),
|
|
256
|
-
msg: this.buildAllowCurrentToolsMessage(),
|
|
257
|
-
ok: nls.localize('theia/ai/ide/toolsConfiguration/recommendedDefaults/dialogConfirm', 'I understand, allow'),
|
|
258
|
-
cancel: nls.localizeByDefault('Cancel')
|
|
259
|
-
});
|
|
260
|
-
const confirmed = await dialog.open();
|
|
261
|
-
if (!confirmed) {
|
|
262
|
-
return;
|
|
263
|
-
}
|
|
264
|
-
// Leave the global default at CONFIRM so any tool added later still requires confirmation.
|
|
265
|
-
// Skip tools that require extra consent (confirmAlwaysAllow), MCP tools (third-party code
|
|
266
|
-
// that should require informed per-tool consent), and tools the user has explicitly disabled.
|
|
267
|
-
const updates: Array<{ toolId: string; mode: ToolConfirmationMode; toolRequest: ToolRequest }> = [];
|
|
268
|
-
for (const tool of this.toolInvocationRegistry.getAllFunctions()) {
|
|
269
|
-
if (tool.confirmAlwaysAllow) {
|
|
270
|
-
continue;
|
|
271
|
-
}
|
|
272
|
-
if (tool.name.startsWith('mcp_')) {
|
|
273
|
-
continue;
|
|
274
|
-
}
|
|
275
|
-
if (this.toolConfirmationModes[tool.name] === ToolConfirmationMode.DISABLED) {
|
|
276
|
-
continue;
|
|
277
|
-
}
|
|
278
|
-
updates.push({ toolId: tool.name, mode: ToolConfirmationMode.ALWAYS_ALLOW, toolRequest: tool });
|
|
279
|
-
}
|
|
280
|
-
await this.confirmationManager.setConfirmationModes(updates);
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
protected buildAllowCurrentToolsMessage(): HTMLElement {
|
|
284
|
-
const container = document.createElement('div');
|
|
285
|
-
const lines = [
|
|
286
|
-
nls.localize(
|
|
287
|
-
'theia/ai/ide/toolsConfiguration/recommendedDefaults/msg/line1',
|
|
288
|
-
'This sets all currently registered built-in tools to "Always Allow".'
|
|
289
|
-
),
|
|
290
|
-
nls.localize(
|
|
291
|
-
'theia/ai/ide/toolsConfiguration/recommendedDefaults/msg/line2',
|
|
292
|
-
'Tools that require extra confirmation (such as shell execution) will still ask before running.'
|
|
293
|
-
),
|
|
294
|
-
nls.localize(
|
|
295
|
-
'theia/ai/ide/toolsConfiguration/recommendedDefaults/msg/line3',
|
|
296
|
-
'MCP tools are third-party and are not included. You can allow them individually in this view.'
|
|
297
|
-
),
|
|
298
|
-
nls.localize(
|
|
299
|
-
'theia/ai/ide/toolsConfiguration/recommendedDefaults/msg/line4',
|
|
300
|
-
'Tools added later will still default to "Confirm" so you can review them.'
|
|
301
|
-
),
|
|
302
|
-
nls.localize(
|
|
303
|
-
'theia/ai/ide/toolsConfiguration/recommendedDefaults/msg/line5',
|
|
304
|
-
'You can change this later in this view.'
|
|
305
|
-
)
|
|
306
|
-
];
|
|
307
|
-
for (const line of lines) {
|
|
308
|
-
const p = document.createElement('p');
|
|
309
|
-
p.textContent = line;
|
|
310
|
-
container.appendChild(p);
|
|
311
|
-
}
|
|
312
|
-
return container;
|
|
313
|
-
}
|
|
314
|
-
|
|
315
|
-
protected getEffectiveState(toolName: string): ToolConfirmationMode {
|
|
316
|
-
// If there's an explicit setting for this tool, use it
|
|
317
|
-
const explicitSetting = this.toolConfirmationModes[toolName];
|
|
318
|
-
if (explicitSetting !== undefined) {
|
|
319
|
-
return explicitSetting;
|
|
320
|
-
}
|
|
321
|
-
// Otherwise, apply confirmAlwaysAllow logic to the default
|
|
322
|
-
const toolRequest = this.toolInvocationRegistry.getFunction(toolName);
|
|
323
|
-
if (toolRequest?.confirmAlwaysAllow && this.defaultState === ToolConfirmationMode.ALWAYS_ALLOW) {
|
|
324
|
-
return ToolConfirmationMode.CONFIRM;
|
|
325
|
-
}
|
|
326
|
-
return this.defaultState;
|
|
327
|
-
}
|
|
328
|
-
|
|
329
|
-
protected getColumns(): TableColumn<ToolItem>[] {
|
|
330
|
-
return [
|
|
331
|
-
{
|
|
332
|
-
id: 'tool-name',
|
|
333
|
-
label: nls.localizeByDefault('Tool'),
|
|
334
|
-
className: 'tool-name-column',
|
|
335
|
-
renderCell: (item: ToolItem) => <span>{item.name}</span>
|
|
336
|
-
},
|
|
337
|
-
{
|
|
338
|
-
id: 'confirmation-mode',
|
|
339
|
-
label: nls.localize('theia/ai/ide/toolsConfiguration/confirmationMode/label', 'Confirmation Mode'),
|
|
340
|
-
className: 'confirmation-mode-column',
|
|
341
|
-
renderCell: (item: ToolItem) => {
|
|
342
|
-
const effectiveState = this.getEffectiveState(item.name);
|
|
343
|
-
return (
|
|
344
|
-
<select
|
|
345
|
-
className="theia-select"
|
|
346
|
-
value={effectiveState}
|
|
347
|
-
onChange={e => this.handleToolConfirmationModeChange(item.name, e)}
|
|
348
|
-
>
|
|
349
|
-
{TOOL_OPTIONS.map(opt => (
|
|
350
|
-
<option key={opt.value} value={opt.value}>
|
|
351
|
-
{opt.label}
|
|
352
|
-
</option>
|
|
353
|
-
))}
|
|
354
|
-
</select>
|
|
355
|
-
);
|
|
356
|
-
}
|
|
357
|
-
}
|
|
358
|
-
];
|
|
359
|
-
}
|
|
360
|
-
|
|
361
|
-
protected override getRowClassName(item: ToolItem): string {
|
|
362
|
-
const effectiveState = this.getEffectiveState(item.name);
|
|
363
|
-
const isDefault = effectiveState === this.defaultState;
|
|
364
|
-
return isDefault ? 'default-mode' : 'custom-mode';
|
|
365
|
-
}
|
|
366
|
-
|
|
367
|
-
protected handleAddAllowlistPattern(): void {
|
|
368
|
-
this.handleAddPatternToList(
|
|
369
|
-
this.allowlistInputRef,
|
|
370
|
-
pattern => this.shellCommandPermissionService.addAllowlistPatterns(pattern),
|
|
371
|
-
() => this.shellCommandPermissionService.getAllowlistPatterns(),
|
|
372
|
-
patterns => { this.allowlistPatterns = patterns; },
|
|
373
|
-
error => { this.allowlistError = error; }
|
|
374
|
-
);
|
|
375
|
-
}
|
|
376
|
-
|
|
377
|
-
protected handleRemoveAllowlistPattern(pattern: string): void {
|
|
378
|
-
this.shellCommandPermissionService.removeAllowlistPattern(pattern)
|
|
379
|
-
.catch(error => console.error('Failed to remove allowlist pattern:', error));
|
|
380
|
-
}
|
|
381
|
-
|
|
382
|
-
protected handleAddDenylistPattern(): void {
|
|
383
|
-
this.handleAddPatternToList(
|
|
384
|
-
this.denylistInputRef,
|
|
385
|
-
pattern => this.shellCommandPermissionService.addDenylistPatterns(pattern),
|
|
386
|
-
() => this.shellCommandPermissionService.getDenylistPatterns(),
|
|
387
|
-
patterns => { this.denylistPatterns = patterns; },
|
|
388
|
-
error => { this.denylistError = error; }
|
|
389
|
-
);
|
|
390
|
-
}
|
|
391
|
-
|
|
392
|
-
protected handleRemoveDenylistPattern(pattern: string): void {
|
|
393
|
-
this.shellCommandPermissionService.removeDenylistPattern(pattern)
|
|
394
|
-
.catch(error => console.error('Failed to remove denylist pattern:', error));
|
|
395
|
-
}
|
|
396
|
-
|
|
397
|
-
protected handleAddPatternToList(
|
|
398
|
-
inputRef: React.RefObject<HTMLInputElement | null>,
|
|
399
|
-
addFn: (pattern: string) => Promise<void>,
|
|
400
|
-
getFn: () => string[],
|
|
401
|
-
setPatterns: (patterns: string[]) => void,
|
|
402
|
-
setError: (error: string | undefined) => void
|
|
403
|
-
): void {
|
|
404
|
-
const input = inputRef.current;
|
|
405
|
-
if (!input) {
|
|
406
|
-
return;
|
|
407
|
-
}
|
|
408
|
-
|
|
409
|
-
const trimmed = input.value.trim();
|
|
410
|
-
if (trimmed.length === 0) {
|
|
411
|
-
return;
|
|
412
|
-
}
|
|
413
|
-
|
|
414
|
-
try {
|
|
415
|
-
// Validation throws synchronously; a failed write rejects the returned promise.
|
|
416
|
-
addFn(trimmed).catch(error => {
|
|
417
|
-
setError(error instanceof Error ? error.message : 'Failed to save pattern');
|
|
418
|
-
this.update();
|
|
419
|
-
});
|
|
420
|
-
input.value = '';
|
|
421
|
-
setError(undefined);
|
|
422
|
-
setPatterns(getFn());
|
|
423
|
-
this.update();
|
|
424
|
-
} catch (error) {
|
|
425
|
-
setError(error instanceof Error ? error.message : 'Invalid pattern');
|
|
426
|
-
this.update();
|
|
427
|
-
}
|
|
428
|
-
}
|
|
429
|
-
|
|
430
|
-
protected override renderFooter(): React.ReactNode {
|
|
431
|
-
return (
|
|
432
|
-
<>
|
|
433
|
-
<div className="ai-shell-permission-list-section">
|
|
434
|
-
<div className="settings-section-title settings-section-category-title">
|
|
435
|
-
{nls.localize('theia/ai/ide/toolsConfiguration/shellAllowlist/title', 'Shell Execute Allowlist')}
|
|
436
|
-
</div>
|
|
437
|
-
<p className="ai-shell-permission-list-description">
|
|
438
|
-
{nls.localize(
|
|
439
|
-
'theia/ai/ide/toolsConfiguration/shellAllowlist/description',
|
|
440
|
-
'Commands matching these patterns will be automatically allowed without confirmation. ' +
|
|
441
|
-
'Use * as wildcard: "git log" (exact match), "git log *" (with any arguments). ' +
|
|
442
|
-
'Wildcard must be preceded by a space.'
|
|
443
|
-
)}
|
|
444
|
-
</p>
|
|
445
|
-
<div className="ai-shell-permission-list-input-row">
|
|
446
|
-
<input
|
|
447
|
-
ref={this.allowlistInputRef}
|
|
448
|
-
type="text"
|
|
449
|
-
className="theia-input"
|
|
450
|
-
placeholder={nls.localize(
|
|
451
|
-
'theia/ai/ide/shellAllowlist/placeholder',
|
|
452
|
-
'e.g., "git log" (exact) or "git log *" (with args)'
|
|
453
|
-
)}
|
|
454
|
-
onKeyDown={e => e.key === 'Enter' && this.handleAddAllowlistPattern()}
|
|
455
|
-
/>
|
|
456
|
-
<button className="theia-button main" onClick={() => this.handleAddAllowlistPattern()}>
|
|
457
|
-
{nls.localizeByDefault('Add')}
|
|
458
|
-
</button>
|
|
459
|
-
</div>
|
|
460
|
-
{this.allowlistError && (
|
|
461
|
-
<p className="ai-shell-permission-list-error">
|
|
462
|
-
{this.allowlistError}
|
|
463
|
-
</p>
|
|
464
|
-
)}
|
|
465
|
-
<ul className="ai-shell-permission-list-patterns">
|
|
466
|
-
{[...this.allowlistPatterns].sort((a, b) => a.localeCompare(b)).map(pattern => (
|
|
467
|
-
<li key={pattern} className="ai-shell-permission-list-pattern-item">
|
|
468
|
-
<code>{pattern}</code>
|
|
469
|
-
<button
|
|
470
|
-
className="theia-button secondary"
|
|
471
|
-
onClick={() => this.handleRemoveAllowlistPattern(pattern)}
|
|
472
|
-
>
|
|
473
|
-
{nls.localizeByDefault('Remove')}
|
|
474
|
-
</button>
|
|
475
|
-
</li>
|
|
476
|
-
))}
|
|
477
|
-
</ul>
|
|
478
|
-
{this.allowlistPatterns.length === 0 && (
|
|
479
|
-
<p className="ai-shell-permission-list-empty">
|
|
480
|
-
{nls.localize(
|
|
481
|
-
'theia/ai/ide/toolsConfiguration/shellAllowlist/empty',
|
|
482
|
-
'No patterns configured. All shell commands will require confirmation.'
|
|
483
|
-
)}
|
|
484
|
-
</p>
|
|
485
|
-
)}
|
|
486
|
-
</div>
|
|
487
|
-
<div className="ai-shell-permission-list-section">
|
|
488
|
-
<div className="settings-section-title settings-section-category-title">
|
|
489
|
-
{nls.localize('theia/ai/ide/toolsConfiguration/shellDenylist/title', 'Shell Execute Denylist')}
|
|
490
|
-
</div>
|
|
491
|
-
<p className="ai-shell-permission-list-description">
|
|
492
|
-
{nls.localize(
|
|
493
|
-
'theia/ai/ide/toolsConfiguration/shellDenylist/description',
|
|
494
|
-
'Commands matching these patterns will be automatically denied without confirmation. ' +
|
|
495
|
-
"Use this to block dangerous commands like 'git push *' or 'rm -rf /'."
|
|
496
|
-
)}
|
|
497
|
-
</p>
|
|
498
|
-
<div className="ai-shell-permission-list-input-row">
|
|
499
|
-
<input
|
|
500
|
-
ref={this.denylistInputRef}
|
|
501
|
-
type="text"
|
|
502
|
-
className="theia-input"
|
|
503
|
-
placeholder={nls.localize(
|
|
504
|
-
'theia/ai/ide/shellDenylist/placeholder',
|
|
505
|
-
'e.g., "git push *" or "rm -rf /"'
|
|
506
|
-
)}
|
|
507
|
-
onKeyDown={e => e.key === 'Enter' && this.handleAddDenylistPattern()}
|
|
508
|
-
/>
|
|
509
|
-
<button className="theia-button main" onClick={() => this.handleAddDenylistPattern()}>
|
|
510
|
-
{nls.localizeByDefault('Add')}
|
|
511
|
-
</button>
|
|
512
|
-
</div>
|
|
513
|
-
{this.denylistError && (
|
|
514
|
-
<p className="ai-shell-permission-list-error">
|
|
515
|
-
{this.denylistError}
|
|
516
|
-
</p>
|
|
517
|
-
)}
|
|
518
|
-
<ul className="ai-shell-permission-list-patterns">
|
|
519
|
-
{[...this.denylistPatterns].sort((a, b) => a.localeCompare(b)).map(pattern => (
|
|
520
|
-
<li key={pattern} className="ai-shell-permission-list-pattern-item">
|
|
521
|
-
<code>{pattern}</code>
|
|
522
|
-
<button
|
|
523
|
-
className="theia-button secondary"
|
|
524
|
-
onClick={() => this.handleRemoveDenylistPattern(pattern)}
|
|
525
|
-
>
|
|
526
|
-
{nls.localizeByDefault('Remove')}
|
|
527
|
-
</button>
|
|
528
|
-
</li>
|
|
529
|
-
))}
|
|
530
|
-
</ul>
|
|
531
|
-
{this.denylistPatterns.length === 0 && (
|
|
532
|
-
<p className="ai-shell-permission-list-empty">
|
|
533
|
-
{nls.localize(
|
|
534
|
-
'theia/ai/ide/toolsConfiguration/shellDenylist/empty',
|
|
535
|
-
'No patterns configured. No shell commands will be automatically denied.'
|
|
536
|
-
)}
|
|
537
|
-
</p>
|
|
538
|
-
)}
|
|
539
|
-
</div>
|
|
540
|
-
</>
|
|
541
|
-
);
|
|
542
|
-
}
|
|
543
|
-
|
|
544
|
-
}
|