@theia/ai-ide 1.77.0-next.1 → 1.77.0-next.101
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/address-pr-review-command-contribution.js +15 -19
- package/lib/browser/address-pr-review-command-contribution.js.map +1 -1
- package/lib/browser/agent-mode-confirmation-service.js +20 -24
- package/lib/browser/agent-mode-confirmation-service.js.map +1 -1
- package/lib/browser/{project-info-agent.d.ts → agents-md-agent.d.ts} +2 -2
- package/lib/browser/agents-md-agent.d.ts.map +1 -0
- package/lib/browser/agents-md-agent.js +47 -0
- package/lib/browser/agents-md-agent.js.map +1 -0
- package/lib/browser/ai-allow-all-mode-chat-banner.js +32 -39
- package/lib/browser/ai-allow-all-mode-chat-banner.js.map +1 -1
- package/lib/browser/ai-allow-all-mode-chat-banner.spec.js +49 -51
- package/lib/browser/ai-allow-all-mode-chat-banner.spec.js.map +1 -1
- package/lib/browser/ai-aware-scm-commit-widget.d.ts +1 -1
- package/lib/browser/ai-aware-scm-commit-widget.d.ts.map +1 -1
- package/lib/browser/ai-aware-scm-commit-widget.js +36 -47
- package/lib/browser/ai-aware-scm-commit-widget.js.map +1 -1
- package/lib/browser/ai-configuration/agent-icon.js +5 -9
- package/lib/browser/ai-configuration/agent-icon.js.map +1 -1
- package/lib/browser/ai-configuration/ai-configuration-breadcrumbs-contribution.js +28 -37
- package/lib/browser/ai-configuration/ai-configuration-breadcrumbs-contribution.js.map +1 -1
- package/lib/browser/ai-configuration/ai-configuration-detail-widget.js +29 -39
- package/lib/browser/ai-configuration/ai-configuration-detail-widget.js.map +1 -1
- package/lib/browser/ai-configuration/ai-configuration-detail-widget.spec.js +22 -24
- package/lib/browser/ai-configuration/ai-configuration-detail-widget.spec.js.map +1 -1
- package/lib/browser/ai-configuration/ai-configuration-label-provider-contribution.js +12 -15
- package/lib/browser/ai-configuration/ai-configuration-label-provider-contribution.js.map +1 -1
- package/lib/browser/ai-configuration/ai-configuration-open-preference-renderer.js +20 -24
- package/lib/browser/ai-configuration/ai-configuration-open-preference-renderer.js.map +1 -1
- package/lib/browser/ai-configuration/ai-configuration-preference-ownership.spec.js +37 -39
- package/lib/browser/ai-configuration/ai-configuration-preference-ownership.spec.js.map +1 -1
- package/lib/browser/ai-configuration/ai-configuration-resource.js +3 -6
- package/lib/browser/ai-configuration/ai-configuration-resource.js.map +1 -1
- package/lib/browser/ai-configuration/ai-configuration-search-widget.js +20 -26
- package/lib/browser/ai-configuration/ai-configuration-search-widget.js.map +1 -1
- package/lib/browser/ai-configuration/ai-configuration-search.js +2 -5
- package/lib/browser/ai-configuration/ai-configuration-search.js.map +1 -1
- package/lib/browser/ai-configuration/ai-configuration-search.spec.js +15 -17
- package/lib/browser/ai-configuration/ai-configuration-search.spec.js.map +1 -1
- package/lib/browser/ai-configuration/ai-configuration-service.js +9 -12
- package/lib/browser/ai-configuration/ai-configuration-service.js.map +1 -1
- package/lib/browser/ai-configuration/ai-configuration-tree-model.js +7 -10
- package/lib/browser/ai-configuration/ai-configuration-tree-model.js.map +1 -1
- package/lib/browser/ai-configuration/ai-configuration-tree-nodes.js +14 -17
- package/lib/browser/ai-configuration/ai-configuration-tree-nodes.js.map +1 -1
- package/lib/browser/ai-configuration/ai-configuration-tree-nodes.spec.js +47 -49
- package/lib/browser/ai-configuration/ai-configuration-tree-nodes.spec.js.map +1 -1
- package/lib/browser/ai-configuration/ai-configuration-tree-widget.d.ts +1 -1
- package/lib/browser/ai-configuration/ai-configuration-tree-widget.d.ts.map +1 -1
- package/lib/browser/ai-configuration/ai-configuration-tree-widget.js +68 -79
- package/lib/browser/ai-configuration/ai-configuration-tree-widget.js.map +1 -1
- package/lib/browser/ai-configuration/ai-configuration-view-contribution.d.ts +2 -2
- package/lib/browser/ai-configuration/ai-configuration-view-contribution.d.ts.map +1 -1
- package/lib/browser/ai-configuration/ai-configuration-view-contribution.js +47 -54
- package/lib/browser/ai-configuration/ai-configuration-view-contribution.js.map +1 -1
- package/lib/browser/ai-configuration/ai-configuration-widget.d.ts +4 -4
- package/lib/browser/ai-configuration/ai-configuration-widget.d.ts.map +1 -1
- package/lib/browser/ai-configuration/ai-configuration-widget.js +45 -57
- package/lib/browser/ai-configuration/ai-configuration-widget.js.map +1 -1
- package/lib/browser/ai-configuration/categories/agent-capabilities-settings.d.ts +14 -3
- package/lib/browser/ai-configuration/categories/agent-capabilities-settings.d.ts.map +1 -1
- package/lib/browser/ai-configuration/categories/agent-capabilities-settings.js +88 -59
- package/lib/browser/ai-configuration/categories/agent-capabilities-settings.js.map +1 -1
- package/lib/browser/ai-configuration/categories/agent-capabilities-settings.spec.js +504 -30
- package/lib/browser/ai-configuration/categories/agent-capabilities-settings.spec.js.map +1 -1
- package/lib/browser/ai-configuration/categories/agent-chips.js +8 -13
- package/lib/browser/ai-configuration/categories/agent-chips.js.map +1 -1
- package/lib/browser/ai-configuration/categories/agent-detail-model.d.ts +10 -0
- package/lib/browser/ai-configuration/categories/agent-detail-model.d.ts.map +1 -1
- package/lib/browser/ai-configuration/categories/agent-detail-model.js +13 -8
- package/lib/browser/ai-configuration/categories/agent-detail-model.js.map +1 -1
- package/lib/browser/ai-configuration/categories/agent-detail-model.spec.d.ts +2 -0
- package/lib/browser/ai-configuration/categories/agent-detail-model.spec.d.ts.map +1 -0
- package/lib/browser/ai-configuration/categories/agent-detail-model.spec.js +72 -0
- package/lib/browser/ai-configuration/categories/agent-detail-model.spec.js.map +1 -0
- package/lib/browser/ai-configuration/categories/agent-detail-view.d.ts +1 -1
- package/lib/browser/ai-configuration/categories/agent-detail-view.d.ts.map +1 -1
- package/lib/browser/ai-configuration/categories/agent-detail-view.js +29 -33
- package/lib/browser/ai-configuration/categories/agent-detail-view.js.map +1 -1
- package/lib/browser/ai-configuration/categories/agents-configuration-category.d.ts +7 -2
- package/lib/browser/ai-configuration/categories/agents-configuration-category.d.ts.map +1 -1
- package/lib/browser/ai-configuration/categories/agents-configuration-category.js +115 -119
- package/lib/browser/ai-configuration/categories/agents-configuration-category.js.map +1 -1
- package/lib/browser/ai-configuration/categories/agents-configuration-category.spec.js +32 -34
- package/lib/browser/ai-configuration/categories/agents-configuration-category.spec.js.map +1 -1
- package/lib/browser/ai-configuration/categories/general-configuration-category.d.ts.map +1 -1
- package/lib/browser/ai-configuration/categories/general-configuration-category.js +91 -101
- package/lib/browser/ai-configuration/categories/general-configuration-category.js.map +1 -1
- package/lib/browser/ai-configuration/categories/general-configuration-category.spec.js +38 -40
- package/lib/browser/ai-configuration/categories/general-configuration-category.spec.js.map +1 -1
- package/lib/browser/ai-configuration/categories/model-aliases-configuration-category.js +53 -63
- package/lib/browser/ai-configuration/categories/model-aliases-configuration-category.js.map +1 -1
- package/lib/browser/ai-configuration/categories/model-aliases-configuration-category.spec.js +25 -27
- package/lib/browser/ai-configuration/categories/model-aliases-configuration-category.spec.js.map +1 -1
- package/lib/browser/ai-configuration/categories/models-configuration-category.js +45 -56
- package/lib/browser/ai-configuration/categories/models-configuration-category.js.map +1 -1
- package/lib/browser/ai-configuration/categories/models-configuration-category.spec.js +31 -33
- package/lib/browser/ai-configuration/categories/models-configuration-category.spec.js.map +1 -1
- package/lib/browser/ai-configuration/categories/prompt-snippets-configuration-category.js +68 -76
- package/lib/browser/ai-configuration/categories/prompt-snippets-configuration-category.js.map +1 -1
- package/lib/browser/ai-configuration/categories/prompt-snippets-configuration-category.spec.js +55 -57
- package/lib/browser/ai-configuration/categories/prompt-snippets-configuration-category.spec.js.map +1 -1
- package/lib/browser/ai-configuration/categories/prompts-and-skills-configuration-category.js +85 -100
- package/lib/browser/ai-configuration/categories/prompts-and-skills-configuration-category.js.map +1 -1
- package/lib/browser/ai-configuration/categories/prompts-and-skills-configuration-category.spec.js +39 -41
- package/lib/browser/ai-configuration/categories/prompts-and-skills-configuration-category.spec.js.map +1 -1
- package/lib/browser/ai-configuration/categories/provider-model-discovery-section.js +44 -48
- package/lib/browser/ai-configuration/categories/provider-model-discovery-section.js.map +1 -1
- package/lib/browser/ai-configuration/categories/provider-model-discovery-section.spec.js +71 -73
- package/lib/browser/ai-configuration/categories/provider-model-discovery-section.spec.js.map +1 -1
- package/lib/browser/ai-configuration/categories/token-usage-configuration-category.js +34 -42
- package/lib/browser/ai-configuration/categories/token-usage-configuration-category.js.map +1 -1
- package/lib/browser/ai-configuration/categories/token-usage-configuration-category.spec.js +16 -18
- package/lib/browser/ai-configuration/categories/token-usage-configuration-category.spec.js.map +1 -1
- package/lib/browser/ai-configuration/categories/tools-configuration-category.d.ts +10 -0
- package/lib/browser/ai-configuration/categories/tools-configuration-category.d.ts.map +1 -1
- package/lib/browser/ai-configuration/categories/tools-configuration-category.js +119 -106
- package/lib/browser/ai-configuration/categories/tools-configuration-category.js.map +1 -1
- package/lib/browser/ai-configuration/categories/tools-configuration-category.spec.js +68 -35
- package/lib/browser/ai-configuration/categories/tools-configuration-category.spec.js.map +1 -1
- package/lib/browser/ai-configuration/categories/variables-configuration-category.js +54 -63
- package/lib/browser/ai-configuration/categories/variables-configuration-category.js.map +1 -1
- package/lib/browser/ai-configuration/categories/variables-configuration-category.spec.js +27 -29
- package/lib/browser/ai-configuration/categories/variables-configuration-category.spec.js.map +1 -1
- package/lib/browser/ai-configuration/components/agent-notification-settings.js +12 -16
- package/lib/browser/ai-configuration/components/agent-notification-settings.js.map +1 -1
- package/lib/browser/ai-configuration/language-model-renderer.d.ts.map +1 -1
- package/lib/browser/ai-configuration/language-model-renderer.js +27 -40
- package/lib/browser/ai-configuration/language-model-renderer.js.map +1 -1
- package/lib/browser/ai-configuration/language-model-renderer.spec.js +58 -22
- package/lib/browser/ai-configuration/language-model-renderer.spec.js.map +1 -1
- package/lib/browser/ai-first-perspective-contribution.js +18 -21
- package/lib/browser/ai-first-perspective-contribution.js.map +1 -1
- package/lib/browser/ai-getting-started-commands.js +3 -6
- package/lib/browser/ai-getting-started-commands.js.map +1 -1
- package/lib/browser/ai-getting-started-contribution.js +24 -30
- package/lib/browser/ai-getting-started-contribution.js.map +1 -1
- package/lib/browser/ai-getting-started-walkthrough.js +54 -58
- package/lib/browser/ai-getting-started-walkthrough.js.map +1 -1
- package/lib/browser/ai-getting-started-walkthrough.spec.js +32 -34
- package/lib/browser/ai-getting-started-walkthrough.spec.js.map +1 -1
- package/lib/browser/ai-ide-activation-service.js +25 -34
- package/lib/browser/ai-ide-activation-service.js.map +1 -1
- package/lib/browser/ai-sessions-view-contribution.d.ts +1 -1
- package/lib/browser/ai-sessions-view-contribution.d.ts.map +1 -1
- package/lib/browser/ai-sessions-view-contribution.js +28 -33
- package/lib/browser/ai-sessions-view-contribution.js.map +1 -1
- package/lib/browser/ai-sessions-widget.d.ts +3 -3
- package/lib/browser/ai-sessions-widget.d.ts.map +1 -1
- package/lib/browser/ai-sessions-widget.js +42 -55
- package/lib/browser/ai-sessions-widget.js.map +1 -1
- package/lib/browser/ai-terminal-functions.js +18 -24
- package/lib/browser/ai-terminal-functions.js.map +1 -1
- package/lib/browser/ai-walkthrough-context-keys.js +35 -45
- package/lib/browser/ai-walkthrough-context-keys.js.map +1 -1
- package/lib/browser/ai-walkthrough-context-keys.spec.js +34 -36
- package/lib/browser/ai-walkthrough-context-keys.spec.js.map +1 -1
- package/lib/browser/ai-workspace-restriction-contribution.js +11 -15
- package/lib/browser/ai-workspace-restriction-contribution.js.map +1 -1
- package/lib/browser/analyze-gh-ticket-command-contribution.js +19 -23
- package/lib/browser/analyze-gh-ticket-command-contribution.js.map +1 -1
- package/lib/browser/app-tester-chat-agent.js +45 -51
- package/lib/browser/app-tester-chat-agent.js.map +1 -1
- package/lib/browser/app-tester-chat-functions.d.ts +1 -1
- package/lib/browser/app-tester-chat-functions.d.ts.map +1 -1
- package/lib/browser/app-tester-chat-functions.js +29 -34
- package/lib/browser/app-tester-chat-functions.js.map +1 -1
- package/lib/browser/app-tester-prompt-template.d.ts.map +1 -1
- package/lib/browser/app-tester-prompt-template.js +43 -48
- package/lib/browser/app-tester-prompt-template.js.map +1 -1
- package/lib/browser/apptester-capability-contribution.js +13 -17
- package/lib/browser/apptester-capability-contribution.js.map +1 -1
- package/lib/browser/architect-agent.d.ts +2 -2
- package/lib/browser/architect-agent.d.ts.map +1 -1
- package/lib/browser/architect-agent.js +38 -44
- 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 +100 -86
- package/lib/browser/architect-prompt-template.js.map +1 -1
- package/lib/browser/chat-session-item-action-contribution.js +15 -18
- package/lib/browser/chat-session-item-action-contribution.js.map +1 -1
- package/lib/browser/chat-session-item.d.ts +1 -1
- package/lib/browser/chat-session-item.d.ts.map +1 -1
- package/lib/browser/chat-session-item.js +25 -28
- package/lib/browser/chat-session-item.js.map +1 -1
- package/lib/browser/chat-session-list-components.js +9 -14
- package/lib/browser/chat-session-list-components.js.map +1 -1
- package/lib/browser/chat-session-list-service.d.ts +2 -2
- package/lib/browser/chat-session-list-service.d.ts.map +1 -1
- package/lib/browser/chat-session-list-service.js +33 -43
- package/lib/browser/chat-session-list-service.js.map +1 -1
- package/lib/browser/chat-session-list-service.spec.js +56 -58
- package/lib/browser/chat-session-list-service.spec.js.map +1 -1
- package/lib/browser/chat-session-tooltip.js +31 -35
- package/lib/browser/chat-session-tooltip.js.map +1 -1
- package/lib/browser/chat-sessions-welcome-message-provider.d.ts +3 -3
- package/lib/browser/chat-sessions-welcome-message-provider.d.ts.map +1 -1
- package/lib/browser/chat-sessions-welcome-message-provider.js +54 -70
- package/lib/browser/chat-sessions-welcome-message-provider.js.map +1 -1
- package/lib/browser/code-review-capability-contribution.js +13 -17
- package/lib/browser/code-review-capability-contribution.js.map +1 -1
- package/lib/browser/code-reviewer-agent.js +17 -21
- package/lib/browser/code-reviewer-agent.js.map +1 -1
- package/lib/browser/code-reviewer-prompt-template.d.ts.map +1 -1
- package/lib/browser/code-reviewer-prompt-template.js +5 -7
- package/lib/browser/code-reviewer-prompt-template.js.map +1 -1
- package/lib/browser/coder-agent.d.ts +2 -2
- package/lib/browser/coder-agent.d.ts.map +1 -1
- package/lib/browser/coder-agent.js +44 -50
- package/lib/browser/coder-agent.js.map +1 -1
- package/lib/browser/commit-message-agent.js +26 -32
- package/lib/browser/commit-message-agent.js.map +1 -1
- package/lib/browser/commit-message-agent.spec.js +25 -27
- package/lib/browser/commit-message-agent.spec.js.map +1 -1
- package/lib/browser/commit-message-command-contribution.d.ts +1 -1
- package/lib/browser/commit-message-command-contribution.d.ts.map +1 -1
- package/lib/browser/commit-message-command-contribution.js +21 -28
- package/lib/browser/commit-message-command-contribution.js.map +1 -1
- package/lib/browser/commit-message-commands.js +4 -7
- package/lib/browser/commit-message-commands.js.map +1 -1
- package/lib/browser/commit-message-prompt-template.js +9 -12
- package/lib/browser/commit-message-prompt-template.js.map +1 -1
- package/lib/browser/commit-message-runner.d.ts +2 -2
- package/lib/browser/commit-message-runner.d.ts.map +1 -1
- package/lib/browser/commit-message-runner.js +33 -41
- package/lib/browser/commit-message-runner.js.map +1 -1
- package/lib/browser/commit-message-runner.spec.js +65 -67
- package/lib/browser/commit-message-runner.spec.js.map +1 -1
- package/lib/browser/context-file-validation-service-impl.d.ts +1 -1
- package/lib/browser/context-file-validation-service-impl.d.ts.map +1 -1
- package/lib/browser/context-file-validation-service-impl.js +20 -26
- package/lib/browser/context-file-validation-service-impl.js.map +1 -1
- package/lib/browser/context-file-validation-service-impl.spec.js +77 -78
- package/lib/browser/context-file-validation-service-impl.spec.js.map +1 -1
- package/lib/browser/context-functions.js +27 -31
- package/lib/browser/context-functions.js.map +1 -1
- package/lib/browser/context-functions.spec.js +64 -66
- package/lib/browser/context-functions.spec.js.map +1 -1
- package/lib/browser/create-skill-agent.d.ts +1 -1
- package/lib/browser/create-skill-agent.d.ts.map +1 -1
- package/lib/browser/create-skill-agent.js +19 -23
- package/lib/browser/create-skill-agent.js.map +1 -1
- package/lib/browser/default-chat-agent-recommendation-service.js +16 -19
- package/lib/browser/default-chat-agent-recommendation-service.js.map +1 -1
- package/lib/browser/explore-agent.d.ts +1 -1
- package/lib/browser/explore-agent.d.ts.map +1 -1
- package/lib/browser/explore-agent.js +18 -22
- package/lib/browser/explore-agent.js.map +1 -1
- package/lib/browser/explore-prompt-template.d.ts.map +1 -1
- package/lib/browser/explore-prompt-template.js +5 -7
- package/lib/browser/explore-prompt-template.js.map +1 -1
- package/lib/browser/file-changeset-function.spec.js +12 -14
- package/lib/browser/file-changeset-function.spec.js.map +1 -1
- package/lib/browser/file-changeset-functions.d.ts +4 -2
- package/lib/browser/file-changeset-functions.d.ts.map +1 -1
- package/lib/browser/file-changeset-functions.js +183 -159
- package/lib/browser/file-changeset-functions.js.map +1 -1
- package/lib/browser/file-changeset-functions.spec.js +174 -112
- 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 +293 -294
- package/lib/browser/frontend-module.js.map +1 -1
- package/lib/browser/git-changes-tool.d.ts +3 -3
- package/lib/browser/git-changes-tool.d.ts.map +1 -1
- package/lib/browser/git-changes-tool.js +28 -36
- package/lib/browser/git-changes-tool.js.map +1 -1
- package/lib/browser/git-changes-tool.spec.js +59 -49
- package/lib/browser/git-changes-tool.spec.js.map +1 -1
- package/lib/browser/github-capability-contribution.js +14 -18
- package/lib/browser/github-capability-contribution.js.map +1 -1
- package/lib/browser/github-chat-agent.js +58 -67
- package/lib/browser/github-chat-agent.js.map +1 -1
- package/lib/browser/github-prompt-template.js +6 -9
- package/lib/browser/github-prompt-template.js.map +1 -1
- package/lib/browser/github-repo-variable-contribution.d.ts +1 -1
- package/lib/browser/github-repo-variable-contribution.d.ts.map +1 -1
- package/lib/browser/github-repo-variable-contribution.js +23 -30
- package/lib/browser/github-repo-variable-contribution.js.map +1 -1
- package/lib/browser/ide-chat-welcome-message-provider.js +59 -71
- package/lib/browser/ide-chat-welcome-message-provider.js.map +1 -1
- package/lib/browser/implement-gh-ticket-command-contribution.js +15 -19
- package/lib/browser/implement-gh-ticket-command-contribution.js.map +1 -1
- package/lib/browser/memory-capability-contribution.d.ts.map +1 -1
- package/lib/browser/memory-capability-contribution.js +21 -25
- package/lib/browser/memory-capability-contribution.js.map +1 -1
- package/lib/browser/memory-capability-contribution.spec.js +30 -32
- package/lib/browser/memory-capability-contribution.spec.js.map +1 -1
- package/lib/browser/memory-directory-variable-contribution.d.ts +1 -1
- package/lib/browser/memory-directory-variable-contribution.d.ts.map +1 -1
- package/lib/browser/memory-directory-variable-contribution.js +19 -24
- package/lib/browser/memory-directory-variable-contribution.js.map +1 -1
- package/lib/browser/memory-directory-variable-contribution.spec.js +28 -30
- package/lib/browser/memory-directory-variable-contribution.spec.js.map +1 -1
- package/lib/browser/mode-aware-chat-agent.js +9 -12
- package/lib/browser/mode-aware-chat-agent.js.map +1 -1
- package/lib/browser/multi-root-paths.spec.d.ts +2 -0
- package/lib/browser/multi-root-paths.spec.d.ts.map +1 -0
- package/lib/browser/multi-root-paths.spec.js +291 -0
- package/lib/browser/multi-root-paths.spec.js.map +1 -0
- package/lib/browser/open-editors-hint-contribution.d.ts.map +1 -1
- package/lib/browser/open-editors-hint-contribution.js +11 -14
- package/lib/browser/open-editors-hint-contribution.js.map +1 -1
- package/lib/browser/remember-command-contribution.d.ts +2 -2
- package/lib/browser/remember-command-contribution.js +21 -25
- package/lib/browser/remember-command-contribution.js.map +1 -1
- package/lib/browser/review/pr-review-agent.js +17 -21
- package/lib/browser/review/pr-review-agent.js.map +1 -1
- package/lib/browser/review/pr-review-capability-contribution.js +41 -45
- package/lib/browser/review/pr-review-capability-contribution.js.map +1 -1
- package/lib/browser/review/pr-review-prompt-template.d.ts.map +1 -1
- package/lib/browser/review/pr-review-prompt-template.js +48 -50
- package/lib/browser/review/pr-review-prompt-template.js.map +1 -1
- package/lib/browser/shell-execution-capability-contribution.js +17 -21
- package/lib/browser/shell-execution-capability-contribution.js.map +1 -1
- package/lib/browser/skill-file-functions.d.ts +6 -0
- package/lib/browser/skill-file-functions.d.ts.map +1 -1
- package/lib/browser/skill-file-functions.js +61 -24
- package/lib/browser/skill-file-functions.js.map +1 -1
- package/lib/browser/skill-file-functions.spec.d.ts +2 -0
- package/lib/browser/skill-file-functions.spec.d.ts.map +1 -0
- package/lib/browser/skill-file-functions.spec.js +65 -0
- package/lib/browser/skill-file-functions.spec.js.map +1 -0
- package/lib/browser/summarize-session-command-contribution.d.ts +1 -1
- package/lib/browser/summarize-session-command-contribution.d.ts.map +1 -1
- package/lib/browser/summarize-session-command-contribution.js +38 -50
- package/lib/browser/summarize-session-command-contribution.js.map +1 -1
- package/lib/browser/task-background-summary-variable.js +17 -20
- package/lib/browser/task-background-summary-variable.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 +39 -52
- package/lib/browser/task-context-file-storage-service.js.map +1 -1
- package/lib/browser/task-context-file-storage-service.spec.d.ts +2 -0
- package/lib/browser/task-context-file-storage-service.spec.d.ts.map +1 -0
- package/lib/browser/task-context-file-storage-service.spec.js +109 -0
- package/lib/browser/task-context-file-storage-service.spec.js.map +1 -0
- package/lib/browser/task-context-functions.js +44 -52
- package/lib/browser/task-context-functions.js.map +1 -1
- package/lib/browser/template-preference-contribution.js +30 -37
- package/lib/browser/template-preference-contribution.js.map +1 -1
- package/lib/browser/test/tool-provider-cancellation-test-util.spec.js +8 -10
- package/lib/browser/test/tool-provider-cancellation-test-util.spec.js.map +1 -1
- package/lib/browser/todo-tool-renderer.d.ts +1 -1
- package/lib/browser/todo-tool-renderer.d.ts.map +1 -1
- package/lib/browser/todo-tool-renderer.js +42 -51
- package/lib/browser/todo-tool-renderer.js.map +1 -1
- package/lib/browser/todo-tool.js +8 -11
- package/lib/browser/todo-tool.js.map +1 -1
- package/lib/browser/todo-tool.spec.js +14 -16
- package/lib/browser/todo-tool.spec.js.map +1 -1
- package/lib/browser/user-interaction-tool-renderer.d.ts +1 -1
- package/lib/browser/user-interaction-tool-renderer.d.ts.map +1 -1
- package/lib/browser/user-interaction-tool-renderer.js +81 -95
- package/lib/browser/user-interaction-tool-renderer.js.map +1 -1
- package/lib/browser/user-interaction-tool.d.ts +14 -3
- package/lib/browser/user-interaction-tool.d.ts.map +1 -1
- package/lib/browser/user-interaction-tool.js +90 -73
- package/lib/browser/user-interaction-tool.js.map +1 -1
- package/lib/browser/user-interaction-tool.spec.js +127 -117
- package/lib/browser/user-interaction-tool.spec.js.map +1 -1
- package/lib/browser/workspace-functions.d.ts +21 -18
- package/lib/browser/workspace-functions.d.ts.map +1 -1
- package/lib/browser/workspace-functions.js +198 -265
- package/lib/browser/workspace-functions.js.map +1 -1
- package/lib/browser/workspace-functions.spec.js +607 -615
- package/lib/browser/workspace-functions.spec.js.map +1 -1
- package/lib/browser/workspace-launch-provider.d.ts +1 -1
- package/lib/browser/workspace-launch-provider.d.ts.map +1 -1
- package/lib/browser/workspace-launch-provider.js +46 -57
- package/lib/browser/workspace-launch-provider.js.map +1 -1
- package/lib/browser/workspace-launch-provider.spec.js +119 -120
- package/lib/browser/workspace-launch-provider.spec.js.map +1 -1
- package/lib/browser/workspace-search-provider.d.ts +1 -1
- package/lib/browser/workspace-search-provider.d.ts.map +1 -1
- package/lib/browser/workspace-search-provider.js +25 -32
- package/lib/browser/workspace-search-provider.js.map +1 -1
- package/lib/browser/workspace-search-provider.spec.js +35 -37
- package/lib/browser/workspace-search-provider.spec.js.map +1 -1
- package/lib/browser/workspace-task-provider.d.ts +1 -1
- package/lib/browser/workspace-task-provider.d.ts.map +1 -1
- package/lib/browser/workspace-task-provider.js +42 -51
- package/lib/browser/workspace-task-provider.js.map +1 -1
- package/lib/browser/workspace-task-provider.spec.js +102 -103
- package/lib/browser/workspace-task-provider.spec.js.map +1 -1
- package/lib/common/agent-ids.js +2 -5
- package/lib/common/agent-ids.js.map +1 -1
- package/lib/common/agents-md-prompt-template.d.ts +6 -0
- package/lib/common/agents-md-prompt-template.d.ts.map +1 -0
- package/lib/common/agents-md-prompt-template.js +162 -0
- package/lib/common/agents-md-prompt-template.js.map +1 -0
- package/lib/common/ai-configuration-preferences.js +5 -8
- package/lib/common/ai-configuration-preferences.js.map +1 -1
- package/lib/common/ai-ide-preferences.js +16 -19
- package/lib/common/ai-ide-preferences.js.map +1 -1
- package/lib/common/ai-terminal-functions.js +1 -4
- package/lib/common/ai-terminal-functions.js.map +1 -1
- package/lib/common/app-tester-chat-functions.js +4 -7
- package/lib/common/app-tester-chat-functions.js.map +1 -1
- package/lib/common/browser-automation-protocol.js +3 -6
- package/lib/common/browser-automation-protocol.js.map +1 -1
- package/lib/common/coder-replace-prompt-template.d.ts.map +1 -1
- package/lib/common/coder-replace-prompt-template.js +103 -111
- package/lib/common/coder-replace-prompt-template.js.map +1 -1
- package/lib/common/command-chat-agents.js +34 -40
- package/lib/common/command-chat-agents.js.map +1 -1
- package/lib/common/command-prompt-template.js +2 -5
- package/lib/common/command-prompt-template.js.map +1 -1
- package/lib/common/context-files-variable.js +17 -20
- package/lib/common/context-files-variable.js.map +1 -1
- package/lib/common/context-functions.js +3 -6
- package/lib/common/context-functions.js.map +1 -1
- package/lib/common/context-variables.js +2 -5
- package/lib/common/context-variables.js.map +1 -1
- package/lib/common/create-skill-prompt-template.js +22 -25
- package/lib/common/create-skill-prompt-template.js.map +1 -1
- package/lib/common/file-changeset-function-ids.js +8 -11
- package/lib/common/file-changeset-function-ids.js.map +1 -1
- package/lib/common/github-repo-protocol.js +2 -5
- package/lib/common/github-repo-protocol.js.map +1 -1
- package/lib/common/open-editors-hint-fragment-id.js +1 -4
- package/lib/common/open-editors-hint-fragment-id.js.map +1 -1
- package/lib/common/orchestrator-chat-agent.js +36 -42
- package/lib/common/orchestrator-chat-agent.js.map +1 -1
- package/lib/common/orchestrator-prompt-template.js +2 -5
- package/lib/common/orchestrator-prompt-template.js.map +1 -1
- package/lib/common/summarize-session-commands.js +2 -5
- package/lib/common/summarize-session-commands.js.map +1 -1
- package/lib/common/task-context-function-ids.js +5 -8
- package/lib/common/task-context-function-ids.js.map +1 -1
- package/lib/common/todo-tool.js +2 -6
- package/lib/common/todo-tool.js.map +1 -1
- package/lib/common/universal-chat-agent.js +17 -21
- package/lib/common/universal-chat-agent.js.map +1 -1
- package/lib/common/universal-prompt-template.js +7 -10
- package/lib/common/universal-prompt-template.js.map +1 -1
- package/lib/common/user-interaction-tool.js +11 -21
- package/lib/common/user-interaction-tool.js.map +1 -1
- package/lib/common/user-interaction-tool.spec.js +52 -54
- package/lib/common/user-interaction-tool.spec.js.map +1 -1
- package/lib/common/workspace-functions.d.ts +1 -0
- package/lib/common/workspace-functions.d.ts.map +1 -1
- package/lib/common/workspace-functions.js +13 -15
- package/lib/common/workspace-functions.js.map +1 -1
- package/lib/common/workspace-preferences.d.ts +1 -0
- package/lib/common/workspace-preferences.d.ts.map +1 -1
- package/lib/common/workspace-preferences.js +46 -40
- package/lib/common/workspace-preferences.js.map +1 -1
- package/lib/common/workspace-search-provider-util.js +3 -6
- package/lib/common/workspace-search-provider-util.js.map +1 -1
- package/lib/common/workspace-search-provider-util.spec.js +13 -15
- package/lib/common/workspace-search-provider-util.spec.js.map +1 -1
- package/lib/node/app-tester-agent/browser-automation-impl.d.ts +1 -1
- package/lib/node/app-tester-agent/browser-automation-impl.d.ts.map +1 -1
- package/lib/node/app-tester-agent/browser-automation-impl.js +7 -10
- package/lib/node/app-tester-agent/browser-automation-impl.js.map +1 -1
- package/lib/node/backend-module.js +21 -23
- package/lib/node/backend-module.js.map +1 -1
- package/lib/node/github-repo-service-impl.d.ts +1 -1
- package/lib/node/github-repo-service-impl.d.ts.map +1 -1
- package/lib/node/github-repo-service-impl.js +11 -15
- package/lib/node/github-repo-service-impl.js.map +1 -1
- package/lib/package.spec.d.ts +1 -0
- package/lib/package.spec.js +1 -0
- package/package.json +35 -28
- package/src/browser/address-pr-review-command-contribution.ts +1 -1
- package/src/browser/agent-mode-confirmation-service.ts +1 -1
- package/src/browser/{project-info-agent.ts → agents-md-agent.ts} +11 -10
- package/src/browser/ai-allow-all-mode-chat-banner.spec.ts +1 -1
- package/src/browser/ai-aware-scm-commit-widget.tsx +3 -3
- package/src/browser/ai-configuration/ai-configuration-breadcrumbs-contribution.ts +2 -2
- package/src/browser/ai-configuration/ai-configuration-detail-widget.spec.ts +1 -1
- package/src/browser/ai-configuration/ai-configuration-label-provider-contribution.ts +1 -1
- package/src/browser/ai-configuration/ai-configuration-open-preference-renderer.ts +1 -1
- package/src/browser/ai-configuration/ai-configuration-preference-ownership.spec.ts +6 -6
- package/src/browser/ai-configuration/ai-configuration-search.spec.ts +1 -1
- package/src/browser/ai-configuration/ai-configuration-tree-nodes.spec.ts +1 -1
- package/src/browser/ai-configuration/ai-configuration-tree-widget.tsx +3 -3
- package/src/browser/ai-configuration/ai-configuration-view-contribution.ts +2 -2
- package/src/browser/ai-configuration/ai-configuration-widget.tsx +5 -5
- package/src/browser/ai-configuration/categories/agent-capabilities-settings.spec.ts +508 -2
- package/src/browser/ai-configuration/categories/agent-capabilities-settings.tsx +95 -33
- package/src/browser/ai-configuration/categories/agent-chips.tsx +1 -1
- package/src/browser/ai-configuration/categories/agent-detail-model.spec.ts +78 -0
- package/src/browser/ai-configuration/categories/agent-detail-model.ts +18 -0
- package/src/browser/ai-configuration/categories/agent-detail-view.tsx +21 -18
- package/src/browser/ai-configuration/categories/agents-configuration-category.spec.ts +1 -1
- package/src/browser/ai-configuration/categories/agents-configuration-category.tsx +23 -8
- package/src/browser/ai-configuration/categories/general-configuration-category.spec.ts +2 -2
- package/src/browser/ai-configuration/categories/general-configuration-category.tsx +4 -2
- package/src/browser/ai-configuration/categories/model-aliases-configuration-category.spec.ts +1 -1
- package/src/browser/ai-configuration/categories/model-aliases-configuration-category.tsx +1 -1
- package/src/browser/ai-configuration/categories/models-configuration-category.spec.ts +1 -1
- package/src/browser/ai-configuration/categories/models-configuration-category.tsx +1 -1
- package/src/browser/ai-configuration/categories/prompt-snippets-configuration-category.spec.ts +1 -1
- package/src/browser/ai-configuration/categories/prompt-snippets-configuration-category.tsx +1 -1
- package/src/browser/ai-configuration/categories/prompts-and-skills-configuration-category.spec.ts +1 -1
- package/src/browser/ai-configuration/categories/prompts-and-skills-configuration-category.tsx +1 -1
- package/src/browser/ai-configuration/categories/provider-model-discovery-section.spec.tsx +1 -1
- package/src/browser/ai-configuration/categories/provider-model-discovery-section.tsx +3 -3
- package/src/browser/ai-configuration/categories/token-usage-configuration-category.spec.ts +1 -1
- package/src/browser/ai-configuration/categories/token-usage-configuration-category.tsx +2 -2
- package/src/browser/ai-configuration/categories/tools-configuration-category.spec.ts +36 -1
- package/src/browser/ai-configuration/categories/tools-configuration-category.tsx +38 -3
- package/src/browser/ai-configuration/categories/variables-configuration-category.spec.ts +1 -1
- package/src/browser/ai-configuration/categories/variables-configuration-category.tsx +1 -1
- package/src/browser/ai-configuration/language-model-renderer.spec.ts +39 -1
- package/src/browser/ai-configuration/language-model-renderer.tsx +6 -15
- package/src/browser/ai-first-perspective-contribution.ts +1 -1
- package/src/browser/ai-getting-started-contribution.ts +2 -2
- package/src/browser/ai-getting-started-walkthrough.spec.ts +2 -2
- package/src/browser/ai-getting-started-walkthrough.ts +3 -3
- package/src/browser/ai-ide-activation-service.ts +1 -1
- package/src/browser/ai-sessions-view-contribution.ts +1 -1
- package/src/browser/ai-sessions-widget.tsx +4 -4
- package/src/browser/ai-terminal-functions.ts +1 -1
- package/src/browser/ai-walkthrough-context-keys.spec.ts +1 -1
- package/src/browser/analyze-gh-ticket-command-contribution.ts +3 -3
- package/src/browser/app-tester-chat-agent.ts +1 -1
- package/src/browser/app-tester-chat-functions.ts +2 -2
- package/src/browser/app-tester-prompt-template.ts +6 -9
- package/src/browser/apptester-capability-contribution.ts +1 -1
- package/src/browser/architect-agent.ts +4 -4
- package/src/browser/architect-prompt-template.ts +10 -10
- package/src/browser/chat-session-item.tsx +2 -2
- package/src/browser/chat-session-list-service.spec.ts +2 -2
- package/src/browser/chat-session-list-service.ts +2 -2
- package/src/browser/chat-sessions-welcome-message-provider.tsx +5 -5
- package/src/browser/code-review-capability-contribution.ts +1 -1
- package/src/browser/code-reviewer-agent.ts +1 -1
- package/src/browser/code-reviewer-prompt-template.ts +2 -2
- package/src/browser/coder-agent.ts +3 -3
- package/src/browser/commit-message-agent.spec.ts +2 -2
- package/src/browser/commit-message-agent.ts +1 -1
- package/src/browser/commit-message-command-contribution.ts +3 -3
- package/src/browser/commit-message-runner.spec.ts +3 -3
- package/src/browser/commit-message-runner.ts +2 -2
- package/src/browser/context-file-validation-service-impl.spec.ts +4 -3
- package/src/browser/context-file-validation-service-impl.ts +1 -1
- package/src/browser/context-functions.spec.ts +1 -1
- package/src/browser/context-functions.ts +1 -1
- package/src/browser/create-skill-agent.ts +2 -2
- package/src/browser/default-chat-agent-recommendation-service.ts +2 -2
- package/src/browser/explore-agent.ts +2 -2
- package/src/browser/explore-prompt-template.ts +2 -2
- package/src/browser/file-changeset-function.spec.ts +1 -1
- package/src/browser/file-changeset-functions.spec.ts +93 -11
- package/src/browser/file-changeset-functions.ts +64 -9
- package/src/browser/frontend-module.ts +93 -92
- package/src/browser/git-changes-tool.spec.ts +17 -2
- package/src/browser/git-changes-tool.ts +6 -10
- package/src/browser/github-capability-contribution.ts +1 -1
- package/src/browser/github-chat-agent.ts +1 -1
- package/src/browser/github-repo-variable-contribution.ts +1 -1
- package/src/browser/ide-chat-welcome-message-provider.tsx +3 -3
- package/src/browser/implement-gh-ticket-command-contribution.ts +1 -1
- package/src/browser/memory-capability-contribution.spec.ts +4 -4
- package/src/browser/memory-capability-contribution.ts +5 -3
- package/src/browser/memory-directory-variable-contribution.spec.ts +1 -1
- package/src/browser/memory-directory-variable-contribution.ts +1 -1
- package/src/browser/multi-root-paths.spec.ts +340 -0
- package/src/browser/open-editors-hint-contribution.ts +2 -1
- package/src/browser/remember-command-contribution.ts +9 -9
- package/src/browser/review/pr-review-agent.ts +1 -1
- package/src/browser/review/pr-review-capability-contribution.ts +5 -5
- package/src/browser/review/pr-review-prompt-template.ts +7 -7
- package/src/browser/shell-execution-capability-contribution.ts +1 -1
- package/src/browser/skill-file-functions.spec.ts +83 -0
- package/src/browser/skill-file-functions.ts +43 -3
- package/src/browser/style/index.css +15 -0
- package/src/browser/summarize-session-command-contribution.ts +2 -2
- package/src/browser/task-background-summary-variable.ts +1 -1
- package/src/browser/task-context-file-storage-service.spec.ts +125 -0
- package/src/browser/task-context-file-storage-service.ts +4 -5
- package/src/browser/task-context-functions.ts +1 -1
- package/src/browser/template-preference-contribution.ts +1 -1
- package/src/browser/todo-tool-renderer.tsx +1 -1
- package/src/browser/todo-tool.spec.ts +1 -1
- package/src/browser/todo-tool.ts +1 -1
- package/src/browser/user-interaction-tool-renderer.tsx +2 -2
- package/src/browser/user-interaction-tool.spec.ts +21 -4
- package/src/browser/user-interaction-tool.ts +36 -11
- package/src/browser/workspace-functions.spec.ts +55 -61
- package/src/browser/workspace-functions.ts +87 -131
- package/src/browser/workspace-launch-provider.spec.ts +5 -4
- package/src/browser/workspace-launch-provider.ts +2 -2
- package/src/browser/workspace-search-provider.spec.ts +2 -2
- package/src/browser/workspace-search-provider.ts +4 -4
- package/src/browser/workspace-task-provider.spec.ts +6 -5
- package/src/browser/workspace-task-provider.ts +2 -2
- package/src/common/{project-info-prompt-template.ts → agents-md-prompt-template.ts} +58 -50
- package/src/common/coder-replace-prompt-template.ts +13 -15
- package/src/common/command-chat-agents.ts +1 -1
- package/src/common/command-prompt-template.ts +1 -1
- package/src/common/context-files-variable.ts +1 -1
- package/src/common/create-skill-prompt-template.ts +4 -4
- package/src/common/orchestrator-chat-agent.ts +2 -2
- package/src/common/orchestrator-prompt-template.ts +1 -1
- package/src/common/universal-chat-agent.ts +1 -1
- package/src/common/universal-prompt-template.ts +2 -2
- package/src/common/user-interaction-tool.spec.ts +1 -1
- package/src/common/workspace-functions.ts +1 -0
- package/src/common/workspace-preferences.ts +10 -0
- package/src/common/workspace-search-provider-util.spec.ts +1 -1
- package/src/node/app-tester-agent/browser-automation-impl.ts +1 -1
- package/src/node/backend-module.ts +7 -7
- package/src/node/github-repo-service-impl.ts +1 -1
- package/lib/browser/project-info-agent.d.ts.map +0 -1
- package/lib/browser/project-info-agent.js +0 -50
- package/lib/browser/project-info-agent.js.map +0 -1
- package/lib/common/project-info-prompt-template.d.ts +0 -6
- package/lib/common/project-info-prompt-template.d.ts.map +0 -1
- package/lib/common/project-info-prompt-template.js +0 -146
- package/lib/common/project-info-prompt-template.js.map +0 -1
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
// *****************************************************************************
|
|
3
2
|
// Copyright (C) 2025 EclipseSource GmbH.
|
|
4
3
|
//
|
|
@@ -14,14 +13,12 @@
|
|
|
14
13
|
//
|
|
15
14
|
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
16
15
|
// *****************************************************************************
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
const ai_core_1 = require("@theia/ai-core");
|
|
24
|
-
const github_chat_agent_1 = require("./github-chat-agent");
|
|
16
|
+
import { __decorate } from "tslib";
|
|
17
|
+
import { inject, injectable } from '@theia/core/shared/inversify';
|
|
18
|
+
import { PromptService } from '@theia/ai-core/lib/common';
|
|
19
|
+
import { nls } from '@theia/core';
|
|
20
|
+
import { AGENT_DELEGATION_FUNCTION_ID } from '@theia/ai-core';
|
|
21
|
+
import { GitHubChatAgentId } from './github-chat-agent.js';
|
|
25
22
|
let AddressGhReviewCommandContribution = class AddressGhReviewCommandContribution {
|
|
26
23
|
onStart() {
|
|
27
24
|
this.registerAddressGhReviewCommand();
|
|
@@ -33,8 +30,8 @@ let AddressGhReviewCommandContribution = class AddressGhReviewCommandContributio
|
|
|
33
30
|
template: commandTemplate,
|
|
34
31
|
isCommand: true,
|
|
35
32
|
commandName: 'address-gh-review',
|
|
36
|
-
commandDescription:
|
|
37
|
-
commandArgumentHint:
|
|
33
|
+
commandDescription: nls.localize('theia/ai-ide/addressGhReviewCommand/description', 'Address review comments on a GitHub pull request'),
|
|
34
|
+
commandArgumentHint: nls.localize('theia/ai-ide/addressGhReviewCommand/argumentHint', '<pr-number>'),
|
|
38
35
|
commandAgents: ['Coder']
|
|
39
36
|
});
|
|
40
37
|
}
|
|
@@ -49,9 +46,9 @@ You need to retrieve all details about the specified pull request, especially th
|
|
|
49
46
|
implement the requested changes.
|
|
50
47
|
|
|
51
48
|
## Step 1: Retrieve Pull Request Information
|
|
52
|
-
Use the ~{${
|
|
49
|
+
Use the ~{${AGENT_DELEGATION_FUNCTION_ID}} tool to delegate to the GitHub agent and retrieve comprehensive information about the pull request.
|
|
53
50
|
|
|
54
|
-
**Agent ID:** '${
|
|
51
|
+
**Agent ID:** '${GitHubChatAgentId}'
|
|
55
52
|
**Prompt:** Ask the GitHub agent to retrieve ALL details about PR #$ARGUMENTS, specifically requesting:
|
|
56
53
|
- The PR title and description
|
|
57
54
|
- The current state of the PR (open, closed, merged)
|
|
@@ -165,12 +162,11 @@ All review comments can be safely addressed. Proceeding with implementation.
|
|
|
165
162
|
Remember: It's better to ask for clarification than to make assumptions that could introduce bugs or go against the reviewer's intent.`;
|
|
166
163
|
}
|
|
167
164
|
};
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
(0, inversify_1.inject)(common_1.PromptService),
|
|
171
|
-
tslib_1.__metadata("design:type", Object)
|
|
165
|
+
__decorate([
|
|
166
|
+
inject(PromptService)
|
|
172
167
|
], AddressGhReviewCommandContribution.prototype, "promptService", void 0);
|
|
173
|
-
|
|
174
|
-
|
|
168
|
+
AddressGhReviewCommandContribution = __decorate([
|
|
169
|
+
injectable()
|
|
175
170
|
], AddressGhReviewCommandContribution);
|
|
171
|
+
export { AddressGhReviewCommandContribution };
|
|
176
172
|
//# sourceMappingURL=address-pr-review-command-contribution.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"address-pr-review-command-contribution.js","sourceRoot":"","sources":["../../src/browser/address-pr-review-command-contribution.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"address-pr-review-command-contribution.js","sourceRoot":"","sources":["../../src/browser/address-pr-review-command-contribution.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;AAGhF,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAClC,OAAO,EAAE,4BAA4B,EAAE,MAAM,gBAAgB,CAAC;AAC9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAGpD,IAAM,kCAAkC,GAAxC,MAAM,kCAAkC;IAK3C,OAAO;QACH,IAAI,CAAC,8BAA8B,EAAE,CAAC;IAC1C,CAAC;IAES,8BAA8B;QACpC,MAAM,eAAe,GAAG,IAAI,CAAC,oBAAoB,EAAE,CAAC;QAEpD,IAAI,CAAC,aAAa,CAAC,wBAAwB,CAAC;YACxC,EAAE,EAAE,mBAAmB;YACvB,QAAQ,EAAE,eAAe;YACzB,SAAS,EAAE,IAAI;YACf,WAAW,EAAE,mBAAmB;YAChC,kBAAkB,EAAE,GAAG,CAAC,QAAQ,CAC5B,iDAAiD,EACjD,kDAAkD,CACrD;YACD,mBAAmB,EAAE,GAAG,CAAC,QAAQ,CAC7B,kDAAkD,EAClD,aAAa,CAChB;YACD,aAAa,EAAE,CAAC,OAAO,CAAC;SAC3B,CAAC,CAAC;IACP,CAAC;IAES,oBAAoB;QAC1B,OAAO;;;;;;;;;;YAUH,4BAA4B;;iBAEvB,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uIA+GqG,CAAC;IACpI,CAAC;CACJ,CAAA;AAxJsB;IADlB,MAAM,CAAC,aAAa,CAAC;yEAC0B;AAHvC,kCAAkC;IAD9C,UAAU,EAAE;GACA,kCAAkC,CA2J9C"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
// *****************************************************************************
|
|
3
2
|
// Copyright (C) 2026 EclipseSource and others.
|
|
4
3
|
//
|
|
@@ -14,34 +13,32 @@
|
|
|
14
13
|
//
|
|
15
14
|
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
16
15
|
// *****************************************************************************
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
const
|
|
24
|
-
const ai_ide_preferences_1 = require("../common/ai-ide-preferences");
|
|
25
|
-
exports.AgentModeConfirmationService = Symbol('AgentModeConfirmationService');
|
|
16
|
+
import { __decorate } from "tslib";
|
|
17
|
+
import { MarkdownChatResponseContentImpl, QuestionResponseContentImpl } from '@theia/ai-chat/lib/common';
|
|
18
|
+
import { inject, injectable } from '@theia/core/shared/inversify';
|
|
19
|
+
import { nls, PreferenceScope, PreferenceService } from '@theia/core';
|
|
20
|
+
import { Deferred } from '@theia/core/lib/common/promise-util';
|
|
21
|
+
import { PREFERENCE_NAME_AGENT_MODE_ENABLED } from '../common/ai-ide-preferences.js';
|
|
22
|
+
export const AgentModeConfirmationService = Symbol('AgentModeConfirmationService');
|
|
26
23
|
let AgentModeConfirmationServiceImpl = class AgentModeConfirmationServiceImpl {
|
|
27
24
|
isAcknowledged() {
|
|
28
|
-
return !!this.preferenceService.get(
|
|
25
|
+
return !!this.preferenceService.get(PREFERENCE_NAME_AGENT_MODE_ENABLED, false);
|
|
29
26
|
}
|
|
30
27
|
async requestConfirmation(request) {
|
|
31
|
-
const deferred = new
|
|
32
|
-
const agentModeLabel =
|
|
33
|
-
const editModeLabel =
|
|
34
|
-
request.response.response.addContent(new
|
|
28
|
+
const deferred = new Deferred();
|
|
29
|
+
const agentModeLabel = nls.localize('theia/ai/ide/agentModeConfirmation/continueAgentMode', 'Continue with Agent Mode');
|
|
30
|
+
const editModeLabel = nls.localize('theia/ai/ide/agentModeConfirmation/continueEditMode', 'Continue with Edit Mode');
|
|
31
|
+
request.response.response.addContent(new MarkdownChatResponseContentImpl(nls.localize('theia/ai/ide/agentModeConfirmation/msg', 'You are about to use **Agent Mode**. In this mode, the agent can **read, create, and modify files** '
|
|
35
32
|
+ 'in your workspace autonomously, without asking for confirmation on each change.\n\n'
|
|
36
33
|
+ 'We recommend using **version control** (e.g. Git) so you can easily review and revert any changes.\n\n'
|
|
37
34
|
+ 'If you prefer more control, you can continue with **Edit Mode** instead, '
|
|
38
35
|
+ 'where changes are presented as suggestions for you to apply.\n\n'
|
|
39
36
|
+ 'How would you like to proceed?')));
|
|
40
|
-
request.response.response.addContent(new
|
|
37
|
+
request.response.response.addContent(new QuestionResponseContentImpl(nls.localize('theia/ai/ide/agentModeConfirmation/info', 'Continuing with Agent Mode saves your confirmation. You can revoke this later again via the `ai-features.agentMode.enabled` setting.\n\n'
|
|
41
38
|
+ 'Continuing with Edit Mode changes your default mode to Edit Mode.\n\n'
|
|
42
39
|
+ 'You can change modes anytime via the mode selector or in the AI Configuration.'), [{ text: agentModeLabel }, { text: editModeLabel }], request, async (selectedOption) => {
|
|
43
40
|
if (selectedOption.text === agentModeLabel) {
|
|
44
|
-
await this.preferenceService.set(
|
|
41
|
+
await this.preferenceService.set(PREFERENCE_NAME_AGENT_MODE_ENABLED, true, PreferenceScope.User);
|
|
45
42
|
request.response.stopWaitingForInput();
|
|
46
43
|
deferred.resolve(true);
|
|
47
44
|
}
|
|
@@ -51,7 +48,7 @@ let AgentModeConfirmationServiceImpl = class AgentModeConfirmationServiceImpl {
|
|
|
51
48
|
}
|
|
52
49
|
}));
|
|
53
50
|
const progressMessage = request.response.addProgressMessage({
|
|
54
|
-
content:
|
|
51
|
+
content: nls.localize('theia/ai/ide/agentModeConfirmation/waiting', 'Waiting for confirmation...'),
|
|
55
52
|
show: 'whileIncomplete'
|
|
56
53
|
});
|
|
57
54
|
request.response.waitForInput();
|
|
@@ -62,12 +59,11 @@ let AgentModeConfirmationServiceImpl = class AgentModeConfirmationServiceImpl {
|
|
|
62
59
|
});
|
|
63
60
|
}
|
|
64
61
|
};
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
(0, inversify_1.inject)(core_1.PreferenceService),
|
|
68
|
-
tslib_1.__metadata("design:type", Object)
|
|
62
|
+
__decorate([
|
|
63
|
+
inject(PreferenceService)
|
|
69
64
|
], AgentModeConfirmationServiceImpl.prototype, "preferenceService", void 0);
|
|
70
|
-
|
|
71
|
-
|
|
65
|
+
AgentModeConfirmationServiceImpl = __decorate([
|
|
66
|
+
injectable()
|
|
72
67
|
], AgentModeConfirmationServiceImpl);
|
|
68
|
+
export { AgentModeConfirmationServiceImpl };
|
|
73
69
|
//# sourceMappingURL=agent-mode-confirmation-service.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-mode-confirmation-service.js","sourceRoot":"","sources":["../../src/browser/agent-mode-confirmation-service.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"agent-mode-confirmation-service.js","sourceRoot":"","sources":["../../src/browser/agent-mode-confirmation-service.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,+CAA+C;AAC/C,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;AAEhF,OAAO,EACH,+BAA+B,EAE/B,2BAA2B,EAC9B,MAAM,2BAA2B,CAAC;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ement } from '@theia/ai-core';
|
|
3
3
|
import { ILogger } from '@theia/core';
|
|
4
|
-
export declare class
|
|
4
|
+
export declare class AgentsMdAgent extends AbstractStreamParsingChatAgent {
|
|
5
5
|
protected readonly logger: ILogger;
|
|
6
6
|
name: string;
|
|
7
7
|
id: string;
|
|
@@ -12,4 +12,4 @@ export declare class ProjectInfoAgent extends AbstractStreamParsingChatAgent {
|
|
|
12
12
|
protected systemPromptId: string | undefined;
|
|
13
13
|
iconClass: string;
|
|
14
14
|
}
|
|
15
|
-
//# sourceMappingURL=
|
|
15
|
+
//# sourceMappingURL=agents-md-agent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agents-md-agent.d.ts","sourceRoot":"","sources":["../../src/browser/agents-md-agent.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,8BAA8B,EAAE,MAAM,gBAAgB,CAAC;AAChE,OAAO,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;AAG1D,OAAO,EAAE,OAAO,EAAO,MAAM,aAAa,CAAC;AAE3C,qBACa,aAAc,SAAQ,8BAA8B;IAE7D,mBAC4B,MAAM,EAAE,OAAO,CAAC;IAE5C,IAAI,SAAc;IAClB,EAAE,SAAc;IAChB,yBAAyB,EAAE,wBAAwB,EAAE,CAGlD;IACH,SAAS,CAAC,2BAA2B,EAAE,MAAM,CAAU;IAE9C,WAAW,SAGuH;IAElI,OAAO,8CAAsD;IACtE,UAAmB,cAAc,EAAE,MAAM,GAAG,SAAS,CAA6B;IACzE,SAAS,EAAE,MAAM,CAA0B;CACvD"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
// *****************************************************************************
|
|
3
|
+
// Copyright (C) 2024 EclipseSource GmbH.
|
|
4
|
+
//
|
|
5
|
+
// This program and the accompanying materials are made available under the
|
|
6
|
+
// terms of the Eclipse Public License v. 2.0 which is available at
|
|
7
|
+
// http://www.eclipse.org/legal/epl-2.0.
|
|
8
|
+
//
|
|
9
|
+
// This Source Code may also be made available under the following Secondary
|
|
10
|
+
// Licenses when the conditions for such availability set forth in the Eclipse
|
|
11
|
+
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
12
|
+
// with the GNU Classpath Exception which is available at
|
|
13
|
+
// https://www.gnu.org/software/classpath/license.html.
|
|
14
|
+
//
|
|
15
|
+
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
16
|
+
// *****************************************************************************
|
|
17
|
+
import { AbstractStreamParsingChatAgent } from '@theia/ai-chat';
|
|
18
|
+
import { inject, injectable, named } from '@theia/core/shared/inversify';
|
|
19
|
+
import { agentsMdSystemVariants, agentsMdTemplateVariants } from '../common/agents-md-prompt-template.js';
|
|
20
|
+
import { ILogger, nls } from '@theia/core';
|
|
21
|
+
let AgentsMdAgent = class AgentsMdAgent extends AbstractStreamParsingChatAgent {
|
|
22
|
+
constructor() {
|
|
23
|
+
super(...arguments);
|
|
24
|
+
this.name = 'AgentsMd';
|
|
25
|
+
this.id = 'AgentsMd';
|
|
26
|
+
this.languageModelRequirements = [{
|
|
27
|
+
purpose: 'chat',
|
|
28
|
+
identifier: 'default/fast',
|
|
29
|
+
}];
|
|
30
|
+
this.defaultLanguageModelPurpose = 'chat';
|
|
31
|
+
this.description = nls.localize('theia/ai/workspace/agentsMdAgent/description', 'An AI assistant for managing the project context that other AI agents use. This agent helps create, update and review the AGENTS.md file at the root of your ' +
|
|
32
|
+
'workspace, following the open AGENTS.md standard that other agentic tools read as well. It can analyze your workspace to suggest project information, ' +
|
|
33
|
+
'consolidate existing instruction files such as CLAUDE.md or copilot-instructions.md, or update the file based on your requirements.');
|
|
34
|
+
this.prompts = [agentsMdSystemVariants, agentsMdTemplateVariants];
|
|
35
|
+
this.systemPromptId = agentsMdSystemVariants.id;
|
|
36
|
+
this.iconClass = 'codicon codicon-repo';
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
__decorate([
|
|
40
|
+
inject(ILogger),
|
|
41
|
+
named('ai-ide:AgentsMdAgent')
|
|
42
|
+
], AgentsMdAgent.prototype, "logger", void 0);
|
|
43
|
+
AgentsMdAgent = __decorate([
|
|
44
|
+
injectable()
|
|
45
|
+
], AgentsMdAgent);
|
|
46
|
+
export { AgentsMdAgent };
|
|
47
|
+
//# sourceMappingURL=agents-md-agent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agents-md-agent.js","sourceRoot":"","sources":["../../src/browser/agents-md-agent.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;AAChF,OAAO,EAAE,8BAA8B,EAAE,MAAM,gBAAgB,CAAC;AAEhE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;AACzE,OAAO,EAAE,sBAAsB,EAAE,wBAAwB,EAAE,MAAM,wCAAwC,CAAC;AAC1G,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAGpC,IAAM,aAAa,GAAnB,MAAM,aAAc,SAAQ,8BAA8B;IAA1D;;QAKH,SAAI,GAAG,UAAU,CAAC;QAClB,OAAE,GAAG,UAAU,CAAC;QAChB,8BAAyB,GAA+B,CAAC;gBACrD,OAAO,EAAE,MAAM;gBACf,UAAU,EAAE,cAAc;aAC7B,CAAC,CAAC;QACO,gCAA2B,GAAW,MAAM,CAAC;QAE9C,gBAAW,GAAG,GAAG,CAAC,QAAQ,CAAC,8CAA8C,EAC9E,+JAA+J;YAC/J,wJAAwJ;YACxJ,qIAAqI,CAAC,CAAC;QAElI,YAAO,GAAG,CAAC,sBAAsB,EAAE,wBAAwB,CAAC,CAAC;QACnD,mBAAc,GAAuB,sBAAsB,CAAC,EAAE,CAAC;QACzE,cAAS,GAAW,sBAAsB,CAAC;IACxD,CAAC;CAAA,CAAA;AAlB+B;IAD3B,MAAM,CAAC,OAAO,CAAC;IAAE,KAAK,CAAC,sBAAsB,CAAC;6CACH;AAHnC,aAAa;IADzB,UAAU,EAAE;GACA,aAAa,CAqBzB"}
|
|
@@ -1,14 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
const nls_1 = require("@theia/core/lib/common/nls");
|
|
10
|
-
const common_1 = require("@theia/core/lib/common");
|
|
11
|
-
const chat_tool_preferences_1 = require("@theia/ai-chat/lib/common/chat-tool-preferences");
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "@theia/core/shared/react/jsx-runtime";
|
|
3
|
+
import { inject, injectable, postConstruct } from '@theia/core/shared/inversify';
|
|
4
|
+
import { codicon } from '@theia/core/lib/browser';
|
|
5
|
+
import { DisposableCollection, Emitter } from '@theia/core';
|
|
6
|
+
import { nls } from '@theia/core/lib/common/nls';
|
|
7
|
+
import { PreferenceService } from '@theia/core/lib/common';
|
|
8
|
+
import { DEFAULT_TOOL_CONFIRMATION_PREFERENCE, TOOL_CONFIRMATION_PREFERENCE, ToolConfirmationMode } from '@theia/ai-chat/lib/common/chat-tool-preferences';
|
|
12
9
|
/**
|
|
13
10
|
* Persistent strip rendered above the chat content whenever an AI tool confirmation
|
|
14
11
|
* preference (`ai-features.chat.defaultToolConfirmation` or `ai-features.chat.toolConfirmation`)
|
|
@@ -23,8 +20,8 @@ const chat_tool_preferences_1 = require("@theia/ai-chat/lib/common/chat-tool-pre
|
|
|
23
20
|
let AiAllowAllModeChatBanner = class AiAllowAllModeChatBanner {
|
|
24
21
|
constructor() {
|
|
25
22
|
this.priority = 1000;
|
|
26
|
-
this.toDispose = new
|
|
27
|
-
this.onDidChangeEmitter = new
|
|
23
|
+
this.toDispose = new DisposableCollection();
|
|
24
|
+
this.onDidChangeEmitter = new Emitter();
|
|
28
25
|
this.onDidChange = this.onDidChangeEmitter.event;
|
|
29
26
|
/**
|
|
30
27
|
* Only tool confirmation preferences are watched here. Other AI session overrides
|
|
@@ -32,8 +29,8 @@ let AiAllowAllModeChatBanner = class AiAllowAllModeChatBanner {
|
|
|
32
29
|
* Session Preferences status bar item to keep the banner from duplicating the list.
|
|
33
30
|
*/
|
|
34
31
|
this.watchedKeys = [
|
|
35
|
-
|
|
36
|
-
|
|
32
|
+
DEFAULT_TOOL_CONFIRMATION_PREFERENCE,
|
|
33
|
+
TOOL_CONFIRMATION_PREFERENCE
|
|
37
34
|
];
|
|
38
35
|
/**
|
|
39
36
|
* Process-lifetime dismissal flag. Reset on the next launch so the user is
|
|
@@ -88,18 +85,18 @@ let AiAllowAllModeChatBanner = class AiAllowAllModeChatBanner {
|
|
|
88
85
|
const isAllowAll = overrides.some(override => override.bypass);
|
|
89
86
|
const className = `theia-ai-allow-all-mode-strip ${isAllowAll ? 'is-allow-all' : 'is-overrides'}`;
|
|
90
87
|
const title = isAllowAll
|
|
91
|
-
?
|
|
92
|
-
:
|
|
88
|
+
? nls.localize('theia/ai/ide/allowAllMode/title', 'Theia AI Allow-All Mode')
|
|
89
|
+
: nls.localize('theia/ai/ide/toolConfirmationOverrides/title', 'AI Tool Confirmation Overrides');
|
|
93
90
|
const tooltipLines = [
|
|
94
91
|
isAllowAll
|
|
95
|
-
?
|
|
96
|
-
:
|
|
92
|
+
? nls.localize('theia/ai/ide/allowAllMode/stripTooltip', 'AI tool calls run without confirmation in this session. Only enable in environments you trust.')
|
|
93
|
+
: nls.localize('theia/ai/ide/toolConfirmationOverrides/stripTooltip', 'One or more AI tools are auto-approved for this session via command-line flags.'),
|
|
97
94
|
'',
|
|
98
95
|
...overrides.map(override => `• ${override.label}`),
|
|
99
96
|
'',
|
|
100
|
-
|
|
97
|
+
nls.localize('theia/ai/ide/allowAllMode/stripTooltipFooter', 'Set via --session-preference. Restart without the flag to restore your saved settings.')
|
|
101
98
|
];
|
|
102
|
-
return (
|
|
99
|
+
return _jsxs("div", { className: className, title: tooltipLines.join('\n'), role: 'status', "aria-live": 'polite', children: [_jsx("span", { className: `theia-ai-allow-all-mode-strip-icon ${codicon('warning')}` }), _jsx("span", { className: 'theia-ai-allow-all-mode-strip-title', children: title }), _jsx("button", { type: 'button', className: `theia-ai-allow-all-mode-strip-dismiss ${codicon('close')}`, title: nls.localize('theia/ai/ide/allowAllMode/hideForThisSession', 'Hide for this session'), "aria-label": nls.localize('theia/ai/ide/allowAllMode/hideForThisSession', 'Hide for this session'), onClick: this.handleDismiss })] });
|
|
103
100
|
}
|
|
104
101
|
/** AI-relevant preferences currently coming from the session scope. */
|
|
105
102
|
collectOverrides() {
|
|
@@ -123,23 +120,23 @@ let AiAllowAllModeChatBanner = class AiAllowAllModeChatBanner {
|
|
|
123
120
|
* the whole strip to the red "Allow-All Mode" treatment.
|
|
124
121
|
*/
|
|
125
122
|
isBypassValue(key, value) {
|
|
126
|
-
if (key ===
|
|
127
|
-
return value ===
|
|
123
|
+
if (key === DEFAULT_TOOL_CONFIRMATION_PREFERENCE) {
|
|
124
|
+
return value === ToolConfirmationMode.ALWAYS_ALLOW;
|
|
128
125
|
}
|
|
129
126
|
return false;
|
|
130
127
|
}
|
|
131
128
|
describe(key, value) {
|
|
132
129
|
switch (key) {
|
|
133
|
-
case
|
|
134
|
-
return
|
|
135
|
-
case
|
|
130
|
+
case DEFAULT_TOOL_CONFIRMATION_PREFERENCE:
|
|
131
|
+
return nls.localize('theia/ai/ide/sessionOverride/defaultToolConfirmation', 'Default tool confirmation: {0}', String(value));
|
|
132
|
+
case TOOL_CONFIRMATION_PREFERENCE: {
|
|
136
133
|
if (value && typeof value === 'object') {
|
|
137
134
|
const entries = Object.entries(value)
|
|
138
135
|
.map(([tool, mode]) => `${tool}=${mode}`)
|
|
139
136
|
.join(', ');
|
|
140
|
-
return
|
|
137
|
+
return nls.localize('theia/ai/ide/sessionOverride/toolConfirmation', 'Per-tool confirmation overrides: {0}', entries);
|
|
141
138
|
}
|
|
142
|
-
return
|
|
139
|
+
return nls.localize('theia/ai/ide/sessionOverride/toolConfirmationGeneric', 'Per-tool confirmation overrides set');
|
|
143
140
|
}
|
|
144
141
|
default:
|
|
145
142
|
return `${key} = ${JSON.stringify(value)}`;
|
|
@@ -149,18 +146,14 @@ let AiAllowAllModeChatBanner = class AiAllowAllModeChatBanner {
|
|
|
149
146
|
this.toDispose.dispose();
|
|
150
147
|
}
|
|
151
148
|
};
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
(0, inversify_1.inject)(common_1.PreferenceService),
|
|
155
|
-
tslib_1.__metadata("design:type", Object)
|
|
149
|
+
__decorate([
|
|
150
|
+
inject(PreferenceService)
|
|
156
151
|
], AiAllowAllModeChatBanner.prototype, "preferenceService", void 0);
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
tslib_1.__metadata("design:type", Function),
|
|
160
|
-
tslib_1.__metadata("design:paramtypes", []),
|
|
161
|
-
tslib_1.__metadata("design:returntype", void 0)
|
|
152
|
+
__decorate([
|
|
153
|
+
postConstruct()
|
|
162
154
|
], AiAllowAllModeChatBanner.prototype, "init", null);
|
|
163
|
-
|
|
164
|
-
|
|
155
|
+
AiAllowAllModeChatBanner = __decorate([
|
|
156
|
+
injectable()
|
|
165
157
|
], AiAllowAllModeChatBanner);
|
|
158
|
+
export { AiAllowAllModeChatBanner };
|
|
166
159
|
//# sourceMappingURL=ai-allow-all-mode-chat-banner.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ai-allow-all-mode-chat-banner.js","sourceRoot":"","sources":["../../src/browser/ai-allow-all-mode-chat-banner.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ai-allow-all-mode-chat-banner.js","sourceRoot":"","sources":["../../src/browser/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C;YACD;gBACI,OAAO,GAAG,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,CAAC;QACnD,CAAC;IACL,CAAC;IAWD,OAAO;QACH,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,CAAC;IAC7B,CAAC;CACJ,CAAA;AAnKsB;IADlB,MAAM,CAAC,iBAAiB,CAAC;mEAC8B;AA+B9C;IADT,aAAa,EAAE;oDAgBf;AAnDQ,wBAAwB;IADpC,UAAU,EAAE;GACA,wBAAwB,CAwKpC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
// *****************************************************************************
|
|
3
2
|
// Copyright (C) 2026 EclipseSource and others.
|
|
4
3
|
//
|
|
@@ -14,15 +13,14 @@
|
|
|
14
13
|
//
|
|
15
14
|
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
16
15
|
// *****************************************************************************
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
const ai_allow_all_mode_chat_banner_1 = require("./ai-allow-all-mode-chat-banner");
|
|
16
|
+
import { enableJSDOM } from '@theia/core/lib/browser/test/jsdom';
|
|
17
|
+
let disableJSDOM = enableJSDOM();
|
|
18
|
+
import { FrontendApplicationConfigProvider } from '@theia/core/lib/browser/frontend-application-config-provider';
|
|
19
|
+
FrontendApplicationConfigProvider.set({});
|
|
20
|
+
import { expect } from 'chai';
|
|
21
|
+
import { Emitter } from '@theia/core';
|
|
22
|
+
import { DEFAULT_TOOL_CONFIRMATION_PREFERENCE, TOOL_CONFIRMATION_PREFERENCE, ToolConfirmationMode } from '@theia/ai-chat/lib/common/chat-tool-preferences';
|
|
23
|
+
import { AiAllowAllModeChatBanner } from './ai-allow-all-mode-chat-banner.js';
|
|
26
24
|
disableJSDOM();
|
|
27
25
|
/**
|
|
28
26
|
* Test double for the subset of `PreferenceService` the banner actually uses.
|
|
@@ -32,7 +30,7 @@ disableJSDOM();
|
|
|
32
30
|
class FakePreferenceService {
|
|
33
31
|
constructor() {
|
|
34
32
|
this.sessionValues = new Map();
|
|
35
|
-
this.changeEmitter = new
|
|
33
|
+
this.changeEmitter = new Emitter();
|
|
36
34
|
this.onPreferenceChanged = this.changeEmitter.event;
|
|
37
35
|
}
|
|
38
36
|
inspect(key) {
|
|
@@ -54,14 +52,14 @@ class FakePreferenceService {
|
|
|
54
52
|
}
|
|
55
53
|
describe('AiAllowAllModeChatBanner', () => {
|
|
56
54
|
before(() => {
|
|
57
|
-
disableJSDOM =
|
|
55
|
+
disableJSDOM = enableJSDOM();
|
|
58
56
|
});
|
|
59
57
|
after(() => {
|
|
60
58
|
disableJSDOM();
|
|
61
59
|
});
|
|
62
60
|
function createBanner(prefService) {
|
|
63
61
|
const prefs = prefService ?? new FakePreferenceService();
|
|
64
|
-
const banner = new
|
|
62
|
+
const banner = new AiAllowAllModeChatBanner();
|
|
65
63
|
// Wire the fake preference service into the private inject site, then run the
|
|
66
64
|
// `@postConstruct` init manually. Doing this without a full DI container keeps the
|
|
67
65
|
// test focused on the banner's own logic.
|
|
@@ -72,98 +70,98 @@ describe('AiAllowAllModeChatBanner', () => {
|
|
|
72
70
|
describe('isBypassValue', () => {
|
|
73
71
|
it('flags Allow-All only when the global default is forced to ALWAYS_ALLOW', () => {
|
|
74
72
|
const { banner } = createBanner();
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
73
|
+
expect(banner.isBypassValue(DEFAULT_TOOL_CONFIRMATION_PREFERENCE, ToolConfirmationMode.ALWAYS_ALLOW)).to.be.true;
|
|
74
|
+
expect(banner.isBypassValue(DEFAULT_TOOL_CONFIRMATION_PREFERENCE, ToolConfirmationMode.CONFIRM)).to.be.false;
|
|
75
|
+
expect(banner.isBypassValue(DEFAULT_TOOL_CONFIRMATION_PREFERENCE, ToolConfirmationMode.DISABLED)).to.be.false;
|
|
78
76
|
});
|
|
79
77
|
it('does not flag Allow-All for per-tool ALWAYS_ALLOW entries', () => {
|
|
80
78
|
// Per-tool overrides are scoped exceptions and stay informational rather than
|
|
81
79
|
// escalating the strip to the red Allow-All treatment.
|
|
82
80
|
const { banner } = createBanner();
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
shellExecute:
|
|
86
|
-
writeFile:
|
|
81
|
+
expect(banner.isBypassValue(TOOL_CONFIRMATION_PREFERENCE, { shellExecute: ToolConfirmationMode.ALWAYS_ALLOW })).to.be.false;
|
|
82
|
+
expect(banner.isBypassValue(TOOL_CONFIRMATION_PREFERENCE, {
|
|
83
|
+
shellExecute: ToolConfirmationMode.ALWAYS_ALLOW,
|
|
84
|
+
writeFile: ToolConfirmationMode.CONFIRM
|
|
87
85
|
})).to.be.false;
|
|
88
|
-
|
|
86
|
+
expect(banner.isBypassValue(TOOL_CONFIRMATION_PREFERENCE, {})).to.be.false;
|
|
89
87
|
});
|
|
90
88
|
it('returns false for unrelated keys', () => {
|
|
91
89
|
const { banner } = createBanner();
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
90
|
+
expect(banner.isBypassValue('ai-features.AiEnable.enableAI', true)).to.be.false;
|
|
91
|
+
expect(banner.isBypassValue('ai-features.agentMode.enabled', true)).to.be.false;
|
|
92
|
+
expect(banner.isBypassValue('ai-features.chat.defaultChatAgent', 'Coder')).to.be.false;
|
|
95
93
|
});
|
|
96
94
|
});
|
|
97
95
|
describe('collectOverrides', () => {
|
|
98
96
|
it('is empty when no watched preference has a session value', () => {
|
|
99
97
|
const { banner } = createBanner();
|
|
100
|
-
|
|
98
|
+
expect(banner.collectOverrides()).to.deep.equal([]);
|
|
101
99
|
});
|
|
102
100
|
it('reports the default tool confirmation with bypass=true when forced to ALWAYS_ALLOW', () => {
|
|
103
101
|
const { banner, prefs } = createBanner();
|
|
104
|
-
prefs.setSession(
|
|
102
|
+
prefs.setSession(DEFAULT_TOOL_CONFIRMATION_PREFERENCE, ToolConfirmationMode.ALWAYS_ALLOW);
|
|
105
103
|
const overrides = banner.collectOverrides();
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
104
|
+
expect(overrides).to.have.lengthOf(1);
|
|
105
|
+
expect(overrides[0].bypass).to.be.true;
|
|
106
|
+
expect(overrides[0].label).to.contain(ToolConfirmationMode.ALWAYS_ALLOW);
|
|
109
107
|
});
|
|
110
108
|
it('reports per-tool entries with bypass=false', () => {
|
|
111
109
|
const { banner, prefs } = createBanner();
|
|
112
|
-
prefs.setSession(
|
|
110
|
+
prefs.setSession(TOOL_CONFIRMATION_PREFERENCE, { shellExecute: ToolConfirmationMode.ALWAYS_ALLOW });
|
|
113
111
|
const overrides = banner.collectOverrides();
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
112
|
+
expect(overrides).to.have.lengthOf(1);
|
|
113
|
+
expect(overrides[0].bypass).to.be.false;
|
|
114
|
+
expect(overrides[0].label).to.contain('shellExecute');
|
|
117
115
|
});
|
|
118
116
|
});
|
|
119
117
|
describe('renderBanner', () => {
|
|
120
118
|
it('returns undefined when there are no overrides', () => {
|
|
121
119
|
const { banner } = createBanner();
|
|
122
|
-
|
|
120
|
+
expect(banner.renderBanner()).to.equal(undefined);
|
|
123
121
|
});
|
|
124
122
|
it('returns undefined once the strip has been dismissed', () => {
|
|
125
123
|
const { banner, prefs } = createBanner();
|
|
126
|
-
prefs.setSession(
|
|
127
|
-
|
|
124
|
+
prefs.setSession(DEFAULT_TOOL_CONFIRMATION_PREFERENCE, ToolConfirmationMode.ALWAYS_ALLOW);
|
|
125
|
+
expect(banner.renderBanner()).to.not.equal(undefined);
|
|
128
126
|
banner.dismissed = true;
|
|
129
|
-
|
|
127
|
+
expect(banner.renderBanner()).to.equal(undefined);
|
|
130
128
|
});
|
|
131
129
|
it('returns a rendered node when at least one override is active', () => {
|
|
132
130
|
const { banner, prefs } = createBanner();
|
|
133
|
-
prefs.setSession(
|
|
134
|
-
|
|
131
|
+
prefs.setSession(TOOL_CONFIRMATION_PREFERENCE, { shellExecute: ToolConfirmationMode.ALWAYS_ALLOW });
|
|
132
|
+
expect(banner.renderBanner()).to.not.equal(undefined);
|
|
135
133
|
});
|
|
136
134
|
});
|
|
137
135
|
describe('dismissal reset', () => {
|
|
138
136
|
it('un-dismisses the strip when the override set escalates into a bypass state', () => {
|
|
139
137
|
const { banner, prefs } = createBanner();
|
|
140
|
-
prefs.setSession(
|
|
138
|
+
prefs.setSession(TOOL_CONFIRMATION_PREFERENCE, { shellExecute: ToolConfirmationMode.ALWAYS_ALLOW });
|
|
141
139
|
banner.dismissed = true;
|
|
142
140
|
banner.dismissedSignature = banner.overrideSignature();
|
|
143
|
-
prefs.setSession(
|
|
144
|
-
|
|
145
|
-
|
|
141
|
+
prefs.setSession(DEFAULT_TOOL_CONFIRMATION_PREFERENCE, ToolConfirmationMode.ALWAYS_ALLOW);
|
|
142
|
+
expect(banner.dismissed).to.be.false;
|
|
143
|
+
expect(banner.dismissedSignature).to.equal(undefined);
|
|
146
144
|
});
|
|
147
145
|
it('un-dismisses the strip when a new override is added while the strip was dismissed', () => {
|
|
148
146
|
const { banner, prefs } = createBanner();
|
|
149
|
-
prefs.setSession(
|
|
147
|
+
prefs.setSession(TOOL_CONFIRMATION_PREFERENCE, { shellExecute: ToolConfirmationMode.ALWAYS_ALLOW });
|
|
150
148
|
banner.dismissed = true;
|
|
151
149
|
banner.dismissedSignature = banner.overrideSignature();
|
|
152
150
|
// Broaden the per-tool override set. Same key, added tool entry; the signature must differ.
|
|
153
|
-
prefs.setSession(
|
|
154
|
-
shellExecute:
|
|
155
|
-
writeFile:
|
|
151
|
+
prefs.setSession(TOOL_CONFIRMATION_PREFERENCE, {
|
|
152
|
+
shellExecute: ToolConfirmationMode.ALWAYS_ALLOW,
|
|
153
|
+
writeFile: ToolConfirmationMode.ALWAYS_ALLOW
|
|
156
154
|
});
|
|
157
|
-
|
|
155
|
+
expect(banner.dismissed).to.be.false;
|
|
158
156
|
});
|
|
159
157
|
it('leaves the dismissal alone when a change event fires with the same override set', () => {
|
|
160
158
|
const { banner, prefs } = createBanner();
|
|
161
|
-
prefs.setSession(
|
|
159
|
+
prefs.setSession(TOOL_CONFIRMATION_PREFERENCE, { shellExecute: ToolConfirmationMode.ALWAYS_ALLOW });
|
|
162
160
|
banner.dismissed = true;
|
|
163
161
|
banner.dismissedSignature = banner.overrideSignature();
|
|
164
162
|
// Fire a change event without actually changing the underlying value.
|
|
165
|
-
prefs.changeEmitter.fire({ preferenceName:
|
|
166
|
-
|
|
163
|
+
prefs.changeEmitter.fire({ preferenceName: TOOL_CONFIRMATION_PREFERENCE });
|
|
164
|
+
expect(banner.dismissed).to.be.true;
|
|
167
165
|
});
|
|
168
166
|
});
|
|
169
167
|
});
|