@theia/ai-ide 1.77.0-next.95 → 1.77.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/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/agents-md-agent.js +15 -19
- package/lib/browser/agents-md-agent.js.map +1 -1
- 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 -7
- 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 +3 -0
- package/lib/browser/ai-configuration/categories/agent-capabilities-settings.d.ts.map +1 -1
- package/lib/browser/ai-configuration/categories/agent-capabilities-settings.js +34 -40
- package/lib/browser/ai-configuration/categories/agent-capabilities-settings.js.map +1 -1
- package/lib/browser/ai-configuration/categories/agent-capabilities-settings.spec.js +135 -140
- 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.js +7 -10
- package/lib/browser/ai-configuration/categories/agent-detail-model.js.map +1 -1
- package/lib/browser/ai-configuration/categories/agent-detail-model.spec.js +13 -15
- package/lib/browser/ai-configuration/categories/agent-detail-model.spec.js.map +1 -1
- 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 -34
- package/lib/browser/ai-configuration/categories/agent-detail-view.js.map +1 -1
- package/lib/browser/ai-configuration/categories/agents-configuration-category.d.ts +1 -1
- package/lib/browser/ai-configuration/categories/agents-configuration-category.d.ts.map +1 -1
- package/lib/browser/ai-configuration/categories/agents-configuration-category.js +106 -128
- 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.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 -49
- 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 -74
- 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.js +101 -112
- package/lib/browser/ai-configuration/categories/tools-configuration-category.js.map +1 -1
- package/lib/browser/ai-configuration/categories/tools-configuration-category.spec.js +46 -48
- 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.js +25 -31
- package/lib/browser/ai-configuration/language-model-renderer.js.map +1 -1
- package/lib/browser/ai-configuration/language-model-renderer.spec.js +29 -32
- 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.js +42 -45
- 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.js +84 -87
- 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 -29
- 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.js +5 -8
- 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 -28
- 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 -68
- 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 -79
- 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.js +5 -8
- 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 +1 -1
- package/lib/browser/file-changeset-functions.d.ts.map +1 -1
- package/lib/browser/file-changeset-functions.js +134 -164
- package/lib/browser/file-changeset-functions.js.map +1 -1
- package/lib/browser/file-changeset-functions.spec.js +136 -138
- package/lib/browser/file-changeset-functions.spec.js.map +1 -1
- package/lib/browser/frontend-module.js +293 -295
- package/lib/browser/frontend-module.js.map +1 -1
- package/lib/browser/git-changes-tool.js +22 -26
- package/lib/browser/git-changes-tool.js.map +1 -1
- package/lib/browser/git-changes-tool.spec.js +52 -55
- 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.js +86 -88
- package/lib/browser/multi-root-paths.spec.js.map +1 -1
- 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.js +17 -21
- 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.js +48 -51
- 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.js +27 -33
- package/lib/browser/skill-file-functions.js.map +1 -1
- package/lib/browser/skill-file-functions.spec.js +19 -21
- package/lib/browser/skill-file-functions.spec.js.map +1 -1
- 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.js +39 -51
- package/lib/browser/task-context-file-storage-service.js.map +1 -1
- package/lib/browser/task-context-file-storage-service.spec.js +41 -43
- package/lib/browser/task-context-file-storage-service.spec.js.map +1 -1
- 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 +2 -2
- package/lib/browser/user-interaction-tool.d.ts.map +1 -1
- package/lib/browser/user-interaction-tool.js +56 -65
- package/lib/browser/user-interaction-tool.js.map +1 -1
- package/lib/browser/user-interaction-tool.spec.js +118 -121
- package/lib/browser/user-interaction-tool.spec.js.map +1 -1
- package/lib/browser/workspace-functions.d.ts +1 -1
- package/lib/browser/workspace-functions.d.ts.map +1 -1
- package/lib/browser/workspace-functions.js +126 -155
- package/lib/browser/workspace-functions.js.map +1 -1
- package/lib/browser/workspace-functions.spec.js +607 -600
- 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 -122
- 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 -38
- 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 -105
- 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.js +38 -41
- package/lib/common/agents-md-prompt-template.js.map +1 -1
- 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.js +102 -108
- 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 +1 -4
- 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 +1 -4
- 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 +6 -9
- 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.js +13 -16
- package/lib/common/workspace-functions.js.map +1 -1
- package/lib/common/workspace-preferences.js +41 -44
- 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 -1
- package/lib/package.spec.js.map +1 -1
- package/package.json +33 -25
- package/src/browser/address-pr-review-command-contribution.ts +1 -1
- package/src/browser/agent-mode-confirmation-service.ts +1 -1
- package/src/browser/agents-md-agent.ts +1 -1
- 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 +9 -9
- package/src/browser/ai-configuration/categories/agent-capabilities-settings.tsx +5 -2
- package/src/browser/ai-configuration/categories/agent-chips.tsx +1 -1
- package/src/browser/ai-configuration/categories/agent-detail-model.spec.ts +1 -1
- package/src/browser/ai-configuration/categories/agent-detail-view.tsx +6 -6
- package/src/browser/ai-configuration/categories/agents-configuration-category.spec.ts +1 -1
- package/src/browser/ai-configuration/categories/agents-configuration-category.tsx +5 -5
- package/src/browser/ai-configuration/categories/general-configuration-category.spec.ts +2 -2
- package/src/browser/ai-configuration/categories/general-configuration-category.tsx +1 -1
- 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 +1 -1
- 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 +1 -1
- package/src/browser/ai-configuration/categories/tools-configuration-category.spec.ts +1 -1
- 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 +1 -1
- 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 +2 -2
- package/src/browser/app-tester-chat-functions.ts +2 -2
- package/src/browser/app-tester-prompt-template.ts +2 -2
- package/src/browser/apptester-capability-contribution.ts +1 -1
- package/src/browser/architect-agent.ts +4 -4
- package/src/browser/architect-prompt-template.ts +6 -6
- 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/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 +2 -2
- 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/file-changeset-function.spec.ts +1 -1
- package/src/browser/file-changeset-functions.spec.ts +3 -3
- package/src/browser/file-changeset-functions.ts +3 -3
- package/src/browser/frontend-module.ts +89 -89
- package/src/browser/git-changes-tool.spec.ts +1 -1
- package/src/browser/github-capability-contribution.ts +1 -1
- package/src/browser/github-chat-agent.ts +3 -3
- 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 +2 -2
- package/src/browser/open-editors-hint-contribution.ts +2 -1
- package/src/browser/remember-command-contribution.ts +2 -2
- package/src/browser/review/pr-review-agent.ts +1 -1
- package/src/browser/review/pr-review-capability-contribution.ts +6 -6
- package/src/browser/review/pr-review-prompt-template.ts +4 -4
- package/src/browser/shell-execution-capability-contribution.ts +1 -1
- package/src/browser/skill-file-functions.spec.ts +1 -1
- package/src/browser/skill-file-functions.ts +1 -1
- 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 +1 -1
- package/src/browser/task-context-file-storage-service.ts +1 -1
- 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 +3 -3
- package/src/browser/user-interaction-tool.spec.ts +3 -3
- package/src/browser/user-interaction-tool.ts +2 -2
- package/src/browser/workspace-functions.spec.ts +16 -7
- package/src/browser/workspace-functions.ts +7 -6
- package/src/browser/workspace-launch-provider.spec.ts +2 -2
- 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 +2 -2
- package/src/browser/workspace-task-provider.ts +2 -2
- package/src/common/agents-md-prompt-template.ts +4 -4
- package/src/common/coder-replace-prompt-template.ts +8 -8
- package/src/common/command-chat-agents.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/universal-chat-agent.ts +1 -1
- package/src/common/universal-prompt-template.ts +1 -1
- package/src/common/user-interaction-tool.spec.ts +1 -1
- 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
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
/* eslint-disable max-len */
|
|
3
2
|
// *****************************************************************************
|
|
4
3
|
// Copyright (C) 2026 EclipseSource GmbH.
|
|
@@ -15,44 +14,42 @@
|
|
|
15
14
|
//
|
|
16
15
|
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
17
16
|
// *****************************************************************************
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
const explore_agent_1 = require("../explore-agent");
|
|
29
|
-
const pr_review_prompt_template_1 = require("./pr-review-prompt-template");
|
|
17
|
+
import { __decorate } from "tslib";
|
|
18
|
+
import { AGENT_DELEGATION_FUNCTION_ID, PromptService } from '@theia/ai-core';
|
|
19
|
+
import { nls } from '@theia/core';
|
|
20
|
+
import { inject, injectable } from '@theia/core/shared/inversify';
|
|
21
|
+
import { SHELL_EXECUTION_FUNCTION_ID } from '@theia/ai-terminal/lib/common/shell-execution-server';
|
|
22
|
+
import { LIST_TASKS_FUNCTION_ID, RUN_TASK_FUNCTION_ID } from '../../common/workspace-functions.js';
|
|
23
|
+
import { USER_INTERACTION_FUNCTION_ID } from '../../common/user-interaction-tool.js';
|
|
24
|
+
import { GitHubChatAgentId } from '../github-chat-agent.js';
|
|
25
|
+
import { ExploreAgentId } from '../explore-agent.js';
|
|
26
|
+
import { PR_REVIEW_CODEBASE_EXPLORATION_CAPABILITY_ID, PR_REVIEW_GITHUB_INFORMATION_CAPABILITY_ID, PR_REVIEW_LOCAL_CHECKOUT_CAPABILITY_ID, PR_REVIEW_LOCAL_VALIDATION_CAPABILITY_ID, PR_REVIEW_PENDING_GITHUB_REVIEW_CAPABILITY_ID } from './pr-review-prompt-template.js';
|
|
30
27
|
let PRReviewCapabilityContribution = class PRReviewCapabilityContribution {
|
|
31
28
|
onStart() {
|
|
32
29
|
this.promptService.addBuiltInPromptFragment({
|
|
33
|
-
id:
|
|
30
|
+
id: PR_REVIEW_GITHUB_INFORMATION_CAPABILITY_ID,
|
|
34
31
|
template: this.buildGitHubInformationTemplate()
|
|
35
32
|
});
|
|
36
33
|
this.promptService.addBuiltInPromptFragment({
|
|
37
|
-
id:
|
|
34
|
+
id: PR_REVIEW_LOCAL_CHECKOUT_CAPABILITY_ID,
|
|
38
35
|
template: this.buildLocalCheckoutTemplate()
|
|
39
36
|
});
|
|
40
37
|
this.promptService.addBuiltInPromptFragment({
|
|
41
|
-
id:
|
|
38
|
+
id: PR_REVIEW_LOCAL_VALIDATION_CAPABILITY_ID,
|
|
42
39
|
template: this.buildLocalValidationTemplate()
|
|
43
40
|
});
|
|
44
41
|
this.promptService.addBuiltInPromptFragment({
|
|
45
|
-
id:
|
|
42
|
+
id: PR_REVIEW_CODEBASE_EXPLORATION_CAPABILITY_ID,
|
|
46
43
|
template: this.buildCodebaseExplorationTemplate()
|
|
47
44
|
});
|
|
48
45
|
this.promptService.addBuiltInPromptFragment({
|
|
49
|
-
id:
|
|
46
|
+
id: PR_REVIEW_PENDING_GITHUB_REVIEW_CAPABILITY_ID,
|
|
50
47
|
template: this.buildPendingGitHubReviewTemplate()
|
|
51
48
|
});
|
|
52
49
|
}
|
|
53
50
|
buildGitHubInformationTemplate() {
|
|
54
|
-
const name =
|
|
55
|
-
const description =
|
|
51
|
+
const name = nls.localize('theia/ai/ide/prReview/capability/githubInfo/name', 'GH PR Info');
|
|
52
|
+
const description = nls.localize('theia/ai/ide/prReview/capability/githubInfo/description', 'Delegates to the GitHub agent to retrieve pull request metadata, diffs, comments, checks, and linked issues.');
|
|
56
53
|
return `---
|
|
57
54
|
name: ${name}
|
|
58
55
|
description: ${description}
|
|
@@ -61,7 +58,7 @@ description: ${description}
|
|
|
61
58
|
|
|
62
59
|
**GH PR Info is ENABLED.** Use it to retrieve complete pull request information through delegation to the GitHub agent.
|
|
63
60
|
|
|
64
|
-
Use ~{${
|
|
61
|
+
Use ~{${AGENT_DELEGATION_FUNCTION_ID}} with agent ID '${GitHubChatAgentId}' for every GitHub read.
|
|
65
62
|
|
|
66
63
|
Ask the GitHub agent to retrieve:
|
|
67
64
|
- PR title, description, author, source branch, target branch, head SHA, state, and URL
|
|
@@ -82,8 +79,8 @@ Completeness is critical. Every review comment and every changed file must be in
|
|
|
82
79
|
\`\`\``;
|
|
83
80
|
}
|
|
84
81
|
buildLocalCheckoutTemplate() {
|
|
85
|
-
const name =
|
|
86
|
-
const description =
|
|
82
|
+
const name = nls.localizeByDefault('Checkout');
|
|
83
|
+
const description = nls.localize('theia/ai/ide/prReview/capability/localCheckout/description', 'Checks out the pull request locally and protects existing worktree changes.');
|
|
87
84
|
return `---
|
|
88
85
|
name: ${name}
|
|
89
86
|
description: ${description}
|
|
@@ -94,12 +91,12 @@ description: ${description}
|
|
|
94
91
|
|
|
95
92
|
### Available tools
|
|
96
93
|
|
|
97
|
-
- ~{${
|
|
94
|
+
- ~{${SHELL_EXECUTION_FUNCTION_ID}} - run git and fallback shell commands for checkout, cleanup, merge-base lookup, and target-branch line lookup.
|
|
98
95
|
- Use this shell access only for current-branch PR number inference, checkout, cleanup, merge-base lookup, and target-branch line lookup.
|
|
99
96
|
|
|
100
97
|
### Checkout workflow
|
|
101
98
|
|
|
102
|
-
Before modifying the working tree, inform the user via ~{${
|
|
99
|
+
Before modifying the working tree, inform the user via ~{${USER_INTERACTION_FUNCTION_ID}} (single-step, options "Proceed" and "Abort") that you need to switch branches and may stash uncommitted changes.
|
|
103
100
|
|
|
104
101
|
Create the review plan only after this checkout workflow is complete. This avoids creating a plan, stashing it, and popping it again just to switch branches.
|
|
105
102
|
|
|
@@ -117,8 +114,8 @@ Store these values for the review plan and cleanup:
|
|
|
117
114
|
- Merge base SHA`;
|
|
118
115
|
}
|
|
119
116
|
buildLocalValidationTemplate() {
|
|
120
|
-
const name =
|
|
121
|
-
const description =
|
|
117
|
+
const name = nls.localizeByDefault('Build');
|
|
118
|
+
const description = nls.localize('theia/ai/ide/prReview/capability/localValidation/description', 'Runs local install, build, lint, test, or comparable validation tasks for the pull request.');
|
|
122
119
|
return `---
|
|
123
120
|
name: ${name}
|
|
124
121
|
description: ${description}
|
|
@@ -129,15 +126,15 @@ description: ${description}
|
|
|
129
126
|
|
|
130
127
|
### Available tools
|
|
131
128
|
|
|
132
|
-
- ~{${
|
|
133
|
-
- ~{${
|
|
134
|
-
- ~{${
|
|
129
|
+
- ~{${SHELL_EXECUTION_FUNCTION_ID}} - run fallback shell commands when no suitable task exists
|
|
130
|
+
- ~{${LIST_TASKS_FUNCTION_ID}} - list available workspace tasks
|
|
131
|
+
- ~{${RUN_TASK_FUNCTION_ID}} - run install, build, lint, or test tasks when available
|
|
135
132
|
|
|
136
133
|
### Build and validation workflow
|
|
137
134
|
|
|
138
|
-
1. Use ~{${
|
|
139
|
-
2. Prefer ~{${
|
|
140
|
-
3. Use ~{${
|
|
135
|
+
1. Use ~{${LIST_TASKS_FUNCTION_ID}} to check whether install/build/test/lint tasks exist.
|
|
136
|
+
2. Prefer ~{${RUN_TASK_FUNCTION_ID}} for task-backed validation.
|
|
137
|
+
3. Use ~{${SHELL_EXECUTION_FUNCTION_ID}} only when no suitable task exists or task execution fails in a way that requires a fallback command.
|
|
141
138
|
4. If dependencies are missing, identify the correct install task or command before building.
|
|
142
139
|
5. Build the project or run the closest available validation for the changed area.
|
|
143
140
|
6. If validation fails, record the failure as a critical finding and continue the review.
|
|
@@ -146,8 +143,8 @@ Store this value for the review plan:
|
|
|
146
143
|
- Build/validation status`;
|
|
147
144
|
}
|
|
148
145
|
buildCodebaseExplorationTemplate() {
|
|
149
|
-
const name =
|
|
150
|
-
const description =
|
|
146
|
+
const name = nls.localize('theia/ai/ide/prReview/capability/codebaseExploration/name', 'Delegated Exploration');
|
|
147
|
+
const description = nls.localize('theia/ai/ide/prReview/capability/codebaseExploration/description', 'Delegates focused architecture, usage, convention, and tests exploration to the Explore agent. When disabled, the PR reviewer explores with its own tools.');
|
|
151
148
|
return `---
|
|
152
149
|
name: ${name}
|
|
153
150
|
description: ${description}
|
|
@@ -156,7 +153,7 @@ description: ${description}
|
|
|
156
153
|
|
|
157
154
|
**Delegated Exploration is ENABLED.** Delegate broad exploration to the Explore agent before performing the detailed review yourself. If this capability is disabled, perform the exploration yourself with your file, diagnostics, and workspace search tools.
|
|
158
155
|
|
|
159
|
-
Use ~{${
|
|
156
|
+
Use ~{${AGENT_DELEGATION_FUNCTION_ID}} with agent ID '${ExploreAgentId}' to investigate:
|
|
160
157
|
- The architecture relevant to the changed files
|
|
161
158
|
- Related files that might be affected by the changes
|
|
162
159
|
- Existing patterns and conventions in the modified areas
|
|
@@ -179,8 +176,8 @@ Example delegation prompts:
|
|
|
179
176
|
\`\`\``;
|
|
180
177
|
}
|
|
181
178
|
buildPendingGitHubReviewTemplate() {
|
|
182
|
-
const name =
|
|
183
|
-
const description =
|
|
179
|
+
const name = nls.localize('theia/ai/ide/prReview/capability/pendingGitHubReview/name', 'Pending GH Review');
|
|
180
|
+
const description = nls.localize('theia/ai/ide/prReview/capability/pendingGitHubReview/description', 'Delegates to the GitHub agent to create or update a pending pull request review with prepared inline comments after explicit user confirmation.');
|
|
184
181
|
return `---
|
|
185
182
|
name: ${name}
|
|
186
183
|
description: ${description}
|
|
@@ -189,7 +186,7 @@ description: ${description}
|
|
|
189
186
|
|
|
190
187
|
**Pending GH Review is ENABLED.** Use it to create or update a pending GitHub review through delegation to the GitHub agent, only after the prepared comments are stored in the review plan and the user explicitly chooses to create the pending review.
|
|
191
188
|
|
|
192
|
-
Use ~{${
|
|
189
|
+
Use ~{${AGENT_DELEGATION_FUNCTION_ID}} with agent ID '${GitHubChatAgentId}' for every GitHub write.
|
|
193
190
|
|
|
194
191
|
When the user chooses to create the pending review:
|
|
195
192
|
1. Read the "Prepared GitHub Review Comments" section from the review plan.
|
|
@@ -202,12 +199,11 @@ When the user chooses to create the pending review:
|
|
|
202
199
|
Tell the user that the pending review is only visible to them until they submit it in the GitHub UI, and that they can edit the comments there before submission.`;
|
|
203
200
|
}
|
|
204
201
|
};
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
(0, inversify_1.inject)(ai_core_1.PromptService),
|
|
208
|
-
tslib_1.__metadata("design:type", Object)
|
|
202
|
+
__decorate([
|
|
203
|
+
inject(PromptService)
|
|
209
204
|
], PRReviewCapabilityContribution.prototype, "promptService", void 0);
|
|
210
|
-
|
|
211
|
-
|
|
205
|
+
PRReviewCapabilityContribution = __decorate([
|
|
206
|
+
injectable()
|
|
212
207
|
], PRReviewCapabilityContribution);
|
|
208
|
+
export { PRReviewCapabilityContribution };
|
|
213
209
|
//# sourceMappingURL=pr-review-capability-contribution.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pr-review-capability-contribution.js","sourceRoot":"","sources":["../../../src/browser/review/pr-review-capability-contribution.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"pr-review-capability-contribution.js","sourceRoot":"","sources":["../../../src/browser/review/pr-review-capability-contribution.ts"],"names":[],"mappings":"AAAA,4BAA4B;AAC5B,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;;AAEhF,OAAO,EAAE,4BAA4B,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAE7E,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAClC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,EAAE,2BAA2B,EAAE,MAAM,sDAAsD,CAAC;AACnG,OAAO,EACH,sBAAsB,EACtB,oBAAoB,EACvB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,4BAA4B,EAAE,MAAM,uCAAuC,CAAC;AACrF,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EACH,4CAA4C,EAC5C,0CAA0C,EAC1C,sCAAsC,EACtC,wCAAwC,EACxC,6CAA6C,EAChD,MAAM,gCAAgC,CAAC;AAGjC,IAAM,8BAA8B,GAApC,MAAM,8BAA8B;IAKvC,OAAO;QACH,IAAI,CAAC,aAAa,CAAC,wBAAwB,CAAC;YACxC,EAAE,EAAE,0CAA0C;YAC9C,QAAQ,EAAE,IAAI,CAAC,8BAA8B,EAAE;SAClD,CAAC,CAAC;QACH,IAAI,CAAC,aAAa,CAAC,wBAAwB,CAAC;YACxC,EAAE,EAAE,sCAAsC;YAC1C,QAAQ,EAAE,IAAI,CAAC,0BAA0B,EAAE;SAC9C,CAAC,CAAC;QACH,IAAI,CAAC,aAAa,CAAC,wBAAwB,CAAC;YACxC,EAAE,EAAE,wCAAwC;YAC5C,QAAQ,EAAE,IAAI,CAAC,4BAA4B,EAAE;SAChD,CAAC,CAAC;QACH,IAAI,CAAC,aAAa,CAAC,wBAAwB,CAAC;YACxC,EAAE,EAAE,4CAA4C;YAChD,QAAQ,EAAE,IAAI,CAAC,gCAAgC,EAAE;SACpD,CAAC,CAAC;QACH,IAAI,CAAC,aAAa,CAAC,wBAAwB,CAAC;YACxC,EAAE,EAAE,6CAA6C;YACjD,QAAQ,EAAE,IAAI,CAAC,gCAAgC,EAAE;SACpD,CAAC,CAAC;IACP,CAAC;IAES,8BAA8B;QACpC,MAAM,IAAI,GAAG,GAAG,CAAC,QAAQ,CAAC,kDAAkD,EAAE,YAAY,CAAC,CAAC;QAC5F,MAAM,WAAW,GAAG,GAAG,CAAC,QAAQ,CAAC,yDAAyD,EACtF,8GAA8G,CAAC,CAAC;QAEpH,OAAO;QACP,IAAI;eACG,WAAW;;;;;;QAMlB,4BAA4B,oBAAoB,iBAAiB;;;;;;;;;;;;;;;;;;OAkBlE,CAAC;IACJ,CAAC;IAES,0BAA0B;QAChC,MAAM,IAAI,GAAG,GAAG,CAAC,iBAAiB,CAAC,UAAU,CAAC,CAAC;QAC/C,MAAM,WAAW,GAAG,GAAG,CAAC,QAAQ,CAAC,4DAA4D,EACzF,6EAA6E,CAAC,CAAC;QAEnF,OAAO;QACP,IAAI;eACG,WAAW;;;;;;;;MAQpB,2BAA2B;;;;;2DAK0B,4BAA4B;;;;;;;;;;;;;;;iBAetE,CAAC;IACd,CAAC;IAES,4BAA4B;QAClC,MAAM,IAAI,GAAG,GAAG,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC;QAC5C,MAAM,WAAW,GAAG,GAAG,CAAC,QAAQ,CAAC,8DAA8D,EAC3F,6FAA6F,CAAC,CAAC;QAEnG,OAAO;QACP,IAAI;eACG,WAAW;;;;;;;;MAQpB,2BAA2B;MAC3B,sBAAsB;MACtB,oBAAoB;;;;WAIf,sBAAsB;cACnB,oBAAoB;WACvB,2BAA2B;;;;;;0BAMZ,CAAC;IACvB,CAAC;IAES,gCAAgC;QACtC,MAAM,IAAI,GAAG,GAAG,CAAC,QAAQ,CAAC,2DAA2D,EAAE,uBAAuB,CAAC,CAAC;QAChH,MAAM,WAAW,GAAG,GAAG,CAAC,QAAQ,CAAC,kEAAkE,EAC/F,4JAA4J,CAAC,CAAC;QAElK,OAAO;QACP,IAAI;eACG,WAAW;;;;;;QAMlB,4BAA4B,oBAAoB,cAAc;;;;;;;;;;;;;;;;;;;;OAoB/D,CAAC;IACJ,CAAC;IAES,gCAAgC;QACtC,MAAM,IAAI,GAAG,GAAG,CAAC,QAAQ,CAAC,2DAA2D,EAAE,mBAAmB,CAAC,CAAC;QAC5G,MAAM,WAAW,GAAG,GAAG,CAAC,QAAQ,CAAC,kEAAkE,EAC/F,iJAAiJ,CAAC,CAAC;QAEvJ,OAAO;QACP,IAAI;eACG,WAAW;;;;;;QAMlB,4BAA4B,oBAAoB,iBAAiB;;;;;;;;;;kKAUyF,CAAC;IAC/J,CAAC;CACJ,CAAA;AA9LsB;IADlB,MAAM,CAAC,aAAa,CAAC;qEAC0B;AAHvC,8BAA8B;IAD1C,UAAU,EAAE;GACA,8BAA8B,CAiM1C"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
/* eslint-disable max-len */
|
|
3
2
|
// *****************************************************************************
|
|
4
3
|
// Copyright (C) 2026 EclipseSource GmbH.
|
|
@@ -15,21 +14,19 @@
|
|
|
15
14
|
//
|
|
16
15
|
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
17
16
|
// *****************************************************************************
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
const
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
exports.prReviewSystemPrompt = {
|
|
32
|
-
id: exports.PR_REVIEW_SYSTEM_PROMPT_ID,
|
|
17
|
+
import { AGENTS_MD_FILE_NAME, AGENTS_MD_PROMPT_FRAGMENT_ID } from '@theia/ai-core/lib/common';
|
|
18
|
+
import { CONTEXT_FILES_VARIABLE_ID, TASK_CONTEXT_SUMMARY_VARIABLE_ID } from '../../common/context-variables.js';
|
|
19
|
+
import { FILE_CONTENT_FUNCTION_ID, GET_FILE_DIAGNOSTICS_ID, SEARCH_IN_WORKSPACE_FUNCTION_ID } from '../../common/workspace-functions.js';
|
|
20
|
+
import { CREATE_TASK_CONTEXT_FUNCTION_ID, GET_TASK_CONTEXT_FUNCTION_ID, EDIT_TASK_CONTEXT_FUNCTION_ID, LIST_TASK_CONTEXTS_FUNCTION_ID, REWRITE_TASK_CONTEXT_FUNCTION_ID } from '../../common/task-context-function-ids.js';
|
|
21
|
+
import { USER_INTERACTION_FUNCTION_ID } from '../../common/user-interaction-tool.js';
|
|
22
|
+
export const PR_REVIEW_SYSTEM_PROMPT_ID = 'pr-review-system';
|
|
23
|
+
export const PR_REVIEW_GITHUB_INFORMATION_CAPABILITY_ID = 'pr-review-github-information';
|
|
24
|
+
export const PR_REVIEW_LOCAL_CHECKOUT_CAPABILITY_ID = 'pr-review-local-checkout';
|
|
25
|
+
export const PR_REVIEW_LOCAL_VALIDATION_CAPABILITY_ID = 'pr-review-local-validation';
|
|
26
|
+
export const PR_REVIEW_CODEBASE_EXPLORATION_CAPABILITY_ID = 'pr-review-codebase-exploration';
|
|
27
|
+
export const PR_REVIEW_PENDING_GITHUB_REVIEW_CAPABILITY_ID = 'pr-review-pending-github-review';
|
|
28
|
+
export const prReviewSystemPrompt = {
|
|
29
|
+
id: PR_REVIEW_SYSTEM_PROMPT_ID,
|
|
33
30
|
template: `{{!-- This prompt is licensed under the MIT License (https://opensource.org/license/mit).
|
|
34
31
|
Made improvements or adaptations to this prompt template? We'd love for you to share it with the community! Contribute back here:
|
|
35
32
|
https://github.com/eclipse-theia/theia/discussions/new?category=prompt-template-contribution --}}
|
|
@@ -44,32 +41,32 @@ Your job is twofold: **orient** the reviewer and **surface issues**. Orientation
|
|
|
44
41
|
|
|
45
42
|
The sections below are configurable capabilities. A capability is enabled only when its section appears in this prompt. If a capability section is absent, treat that capability as disabled, skip the corresponding workflow phase, and record the limitation in the review plan. Some tools, such as shell execution and agent delegation, can appear in more than one capability; use them only for the work described by the enabled capability section.
|
|
46
43
|
|
|
47
|
-
{{capability:${
|
|
44
|
+
{{capability:${PR_REVIEW_GITHUB_INFORMATION_CAPABILITY_ID} default on}}
|
|
48
45
|
|
|
49
|
-
{{capability:${
|
|
46
|
+
{{capability:${PR_REVIEW_LOCAL_CHECKOUT_CAPABILITY_ID} default on}}
|
|
50
47
|
|
|
51
|
-
{{capability:${
|
|
48
|
+
{{capability:${PR_REVIEW_LOCAL_VALIDATION_CAPABILITY_ID} default on}}
|
|
52
49
|
|
|
53
|
-
{{capability:${
|
|
50
|
+
{{capability:${PR_REVIEW_CODEBASE_EXPLORATION_CAPABILITY_ID} default on}}
|
|
54
51
|
|
|
55
|
-
{{capability:${
|
|
52
|
+
{{capability:${PR_REVIEW_PENDING_GITHUB_REVIEW_CAPABILITY_ID} default on}}
|
|
56
53
|
|
|
57
54
|
# Always Available Tools
|
|
58
55
|
|
|
59
56
|
## Code Review
|
|
60
|
-
- ~{${
|
|
61
|
-
- ~{${
|
|
62
|
-
- ~{${
|
|
57
|
+
- ~{${FILE_CONTENT_FUNCTION_ID}} - read file contents during detailed review
|
|
58
|
+
- ~{${GET_FILE_DIAGNOSTICS_ID}} - check lint/type errors for reviewed files
|
|
59
|
+
- ~{${SEARCH_IN_WORKSPACE_FUNCTION_ID}} - search for narrowly scoped usages during detailed review
|
|
63
60
|
|
|
64
61
|
## Task Context Management
|
|
65
|
-
- ~{${
|
|
66
|
-
- ~{${
|
|
67
|
-
- ~{${
|
|
68
|
-
- ~{${
|
|
69
|
-
- ~{${
|
|
62
|
+
- ~{${CREATE_TASK_CONTEXT_FUNCTION_ID}} — create the review plan
|
|
63
|
+
- ~{${GET_TASK_CONTEXT_FUNCTION_ID}} — read the review plan
|
|
64
|
+
- ~{${EDIT_TASK_CONTEXT_FUNCTION_ID}} — update the review plan (targeted replacement of specific sections)
|
|
65
|
+
- ~{${LIST_TASK_CONTEXTS_FUNCTION_ID}} — list all review plans for the current session
|
|
66
|
+
- ~{${REWRITE_TASK_CONTEXT_FUNCTION_ID}} — rewrite the review plan entirely (use as fallback when edits fail)
|
|
70
67
|
|
|
71
68
|
## User Interaction
|
|
72
|
-
- ~{${
|
|
69
|
+
- ~{${USER_INTERACTION_FUNCTION_ID}} — present findings to the user. See the tool description for behavior and return shape; this prompt only describes the PR-review specifics on top of it.
|
|
73
70
|
|
|
74
71
|
# Critical Rules
|
|
75
72
|
|
|
@@ -105,7 +102,7 @@ Never batch all updates to the end. The user should see the plan evolve in real-
|
|
|
105
102
|
|
|
106
103
|
## Review Comment Style
|
|
107
104
|
|
|
108
|
-
These rules apply to **inline comment text written into the GitHub review** (Phase 8 and Phase 9). They do **not** apply to the user walkthrough messages — there you may use emojis (🔴 / 🟡 / 🔵 / 💡) for criticality and substantiate claims with the link/diff mechanic of ~{${
|
|
105
|
+
These rules apply to **inline comment text written into the GitHub review** (Phase 8 and Phase 9). They do **not** apply to the user walkthrough messages — there you may use emojis (🔴 / 🟡 / 🔵 / 💡) for criticality and substantiate claims with the link/diff mechanic of ~{${USER_INTERACTION_FUNCTION_ID}}.
|
|
109
106
|
|
|
110
107
|
- Write like a human maintainer, not an AI. Short, direct, slightly informal.
|
|
111
108
|
- **Never** use em dashes. Use commas, periods, or parentheses instead.
|
|
@@ -209,19 +206,19 @@ If Build is disabled, update "Build Status" with "Skipped because Build is disab
|
|
|
209
206
|
|
|
210
207
|
Use the "Local Code Source" field before exploring local code:
|
|
211
208
|
- If it is a checked-out PR branch or the current workspace and Delegated Exploration is enabled, follow that capability and delegate focused exploration.
|
|
212
|
-
- If it is a checked-out PR branch or the current workspace and Delegated Exploration is disabled, perform the same focused exploration yourself with ~{${
|
|
209
|
+
- If it is a checked-out PR branch or the current workspace and Delegated Exploration is disabled, perform the same focused exploration yourself with ~{${FILE_CONTENT_FUNCTION_ID}}, ~{${GET_FILE_DIAGNOSTICS_ID}}, and ~{${SEARCH_IN_WORKSPACE_FUNCTION_ID}}. Investigate architecture, related consumers, conventions, and tests for the changed areas. Disabling delegation does **not** mean skipping exploration.
|
|
213
210
|
- If there is no local source, continue with GitHub PR information or user-provided diffs when they are sufficient, and record that local exploration was skipped. Ask the user only if the available remote/user-provided information is insufficient for review or if they requested local exploration specifically.
|
|
214
211
|
|
|
215
|
-
After receiving delegated exploration findings or completing self exploration, use ~{${
|
|
212
|
+
After receiving delegated exploration findings or completing self exploration, use ~{${EDIT_TASK_CONTEXT_FUNCTION_ID}} to fill in the "Exploration Findings" section. If local exploration was skipped, record the reason and the review limitation there.
|
|
216
213
|
|
|
217
214
|
## Phase 6: Perform Code Review & Prepare Walkthrough
|
|
218
215
|
|
|
219
216
|
Now you perform the detailed review yourself.
|
|
220
217
|
|
|
221
218
|
If the Local Code Source is a checked-out PR branch or the current workspace, for each changed file:
|
|
222
|
-
1. Read the file with ~{${
|
|
223
|
-
2. Check diagnostics with ~{${
|
|
224
|
-
3. Search for related usages with ~{${
|
|
219
|
+
1. Read the file with ~{${FILE_CONTENT_FUNCTION_ID}}
|
|
220
|
+
2. Check diagnostics with ~{${GET_FILE_DIAGNOSTICS_ID}}
|
|
221
|
+
3. Search for related usages with ~{${SEARCH_IN_WORKSPACE_FUNCTION_ID}} as needed
|
|
225
222
|
|
|
226
223
|
If there is no local source, review from GitHub PR information, user-provided diffs, and existing context. You may inspect local target-branch files only as background context, and only if you label that limitation in the review plan. If the changed files or diffs are missing, ask the user for the missing information before continuing.
|
|
227
224
|
|
|
@@ -236,7 +233,7 @@ Review with both goals in mind.
|
|
|
236
233
|
**Second, surface issues (this drives the Findings):**
|
|
237
234
|
- **Correctness:** Does the code do what it claims?
|
|
238
235
|
- **Style consistency:** Does it follow existing patterns from the exploration findings (Phase 5)?
|
|
239
|
-
- **Project guidelines:** Does it adhere to the rules in the project's \`${
|
|
236
|
+
- **Project guidelines:** Does it adhere to the rules in the project's \`${AGENTS_MD_FILE_NAME}\`, if the Project Context section lists one (e.g., coding conventions, preferred APIs, DI patterns)?
|
|
240
237
|
- **Potential bugs:** Race conditions, edge cases, error handling
|
|
241
238
|
- **Missing tests:** Are behavior changes covered by tests?
|
|
242
239
|
- **Security:** Any vulnerabilities introduced?
|
|
@@ -245,7 +242,7 @@ Cross-reference your findings with the exploration results from Phase 5 when ava
|
|
|
245
242
|
|
|
246
243
|
### Update the review plan with walkthrough content
|
|
247
244
|
|
|
248
|
-
Use ~{${
|
|
245
|
+
Use ~{${EDIT_TASK_CONTEXT_FUNCTION_ID}} to write the complete walkthrough into the review plan:
|
|
249
246
|
|
|
250
247
|
**Overview section:** Brief the reviewer. Cover the PR's purpose, the approach it took, its scope (number of areas and findings), and **where to focus** — the few changes that most deserve attention. Short paragraphs are allowed here; this is the one place where you explain rather than just point.
|
|
251
248
|
|
|
@@ -316,19 +313,19 @@ For renamed or moved files, use the old path on the left and the new path on the
|
|
|
316
313
|
\`\`\`
|
|
317
314
|
This also works for files that were both renamed and modified — the diff will show content changes alongside the path change.
|
|
318
315
|
|
|
319
|
-
Build the **complete** list of walkthrough steps in advance and pass them in a **single** ~{${
|
|
316
|
+
Build the **complete** list of walkthrough steps in advance and pass them in a **single** ~{${USER_INTERACTION_FUNCTION_ID}} call. The tool description covers the request shape, the Next/Finish button, comments, and the return JSON.
|
|
320
317
|
|
|
321
318
|
Do not set \`autoOpen: true\` on walkthrough links unless the user explicitly asks for files to open automatically. Links should be available for manual inspection without opening a large number of editors by default.
|
|
322
319
|
|
|
323
320
|
### Step 7a: Build the wizard
|
|
324
321
|
|
|
325
|
-
1. Read the review plan with ~{${
|
|
322
|
+
1. Read the review plan with ~{${GET_TASK_CONTEXT_FUNCTION_ID}}.
|
|
326
323
|
2. Build the step list in plan order:
|
|
327
324
|
- Prepend one "Overview" step.
|
|
328
325
|
- For each area, emit **one step per finding** the area contains.
|
|
329
326
|
- Additionally, emit a **highlight step** (informational, no vote) **only for noteworthy areas** — changes that genuinely warrant the reviewer's attention, such as core logic, high-risk code, or non-obvious design decisions. Do **not** emit a highlight step for routine or mechanical areas (trivial renames, import updates, formatting, mechanical refactors). Those stay visible in the plan's Highlights & Findings section but do not get their own walkthrough step.
|
|
330
327
|
- A noteworthy area with findings gets both its highlight step (first) and its finding steps. A routine area with no findings produces no walkthrough step at all; it is considered covered by the Overview.
|
|
331
|
-
3. Call ~{${
|
|
328
|
+
3. Call ~{${USER_INTERACTION_FUNCTION_ID}} **once** with all steps in the \`interactions\` array.
|
|
332
329
|
|
|
333
330
|
**Message format rules** (apply to every step's \`message\`):
|
|
334
331
|
- Keep finding-step messages **terse**: just enough context to vote. Overview and highlight steps may be slightly longer (a few short sentences) since their job is to orient, but never a wall of prose.
|
|
@@ -363,7 +360,7 @@ Step shape rules:
|
|
|
363
360
|
### Step 7b: Process the result
|
|
364
361
|
|
|
365
362
|
After the wizard returns:
|
|
366
|
-
1. Use ~{${
|
|
363
|
+
1. Use ~{${EDIT_TASK_CONTEXT_FUNCTION_ID}} to update the review plan. Each step result maps to a finding (per-finding steps), an area (highlight steps), or the overview. Match by step \`title\` and update its status:
|
|
367
364
|
- \`value === "confirm"\` → ✅ Confirmed (per-finding step)
|
|
368
365
|
- \`value === "reject"\` → ❌ Rejected (per-finding step)
|
|
369
366
|
- \`value === undefined\` and the step had no options → ✅ Reviewed (overview or area highlight). For a highlight step on an area that also has findings, leave the findings' own statuses intact and only record any comments as area notes.
|
|
@@ -402,7 +399,7 @@ If there are no confirmed findings, update the section to "No GitHub review comm
|
|
|
402
399
|
|
|
403
400
|
### Step 8a: Ask How To Proceed
|
|
404
401
|
|
|
405
|
-
Once the prepared comments are stored in the review plan, call ~{${
|
|
402
|
+
Once the prepared comments are stored in the review plan, call ~{${USER_INTERACTION_FUNCTION_ID}} with a **single-step** wizard:
|
|
406
403
|
- \`title\`: "Prepared Review Comments"
|
|
407
404
|
- \`message\`: Markdown summary of prepared comments. Explain that a GitHub review created by this workflow is **pending**, visible only to the user, and can be edited in the GitHub UI before the user submits it.
|
|
408
405
|
- If pending GitHub review is enabled and all comments to publish are marked "Ready", use \`options\`: \`[{"text": "Guide me through the prepared comments first", "buttonLabel": "Review comments", "value": "guide"}, {"text": "Create the pending review on GitHub now", "buttonLabel": "Create pending review", "value": "submit"}, {"text": "Keep the review plan only", "buttonLabel": "Keep plan only", "value": "cancel"}]\`
|
|
@@ -415,7 +412,7 @@ Once the prepared comments are stored in the review plan, call ~{${user_interact
|
|
|
415
412
|
|
|
416
413
|
### Step 8b: Guide Through Final Comments
|
|
417
414
|
|
|
418
|
-
Use ~{${
|
|
415
|
+
Use ~{${USER_INTERACTION_FUNCTION_ID}} with one step per prepared review comment:
|
|
419
416
|
- \`title\`: "[Area] — [Finding headline]"
|
|
420
417
|
- \`message\`: The exact comment text plus exact location.
|
|
421
418
|
- \`options\`: \`[{"text": "Keep this comment in the pending review", "buttonLabel": "Keep comment", "value": "keep"}, {"text": "Drop this comment from the pending review", "buttonLabel": "Drop comment", "value": "drop"}]\`
|
|
@@ -437,7 +434,7 @@ After successful creation, update the prepared comment statuses to "Added to pen
|
|
|
437
434
|
|
|
438
435
|
## Phase 10: Cleanup
|
|
439
436
|
|
|
440
|
-
If Checkout was enabled and recorded an original branch, ask the user whether to restore their original working tree state before switching branches. Use ~{${
|
|
437
|
+
If Checkout was enabled and recorded an original branch, ask the user whether to restore their original working tree state before switching branches. Use ~{${USER_INTERACTION_FUNCTION_ID}} with a **single-step** wizard:
|
|
441
438
|
- \`title\`: "Restore Workspace"
|
|
442
439
|
- \`message\`: Explain that the PR review is complete and that restoring will switch back to the original branch. Mention that staying on the PR branch keeps the workspace available for inspection.
|
|
443
440
|
- \`options\`: \`[{"text": "Restore the original branch and any stashed user changes now", "buttonLabel": "Restore workspace", "value": "restore"}, {"text": "Stay on the PR branch so I can keep inspecting it", "buttonLabel": "Stay on PR branch", "value": "stay"}]\`
|
|
@@ -458,7 +455,7 @@ If any cleanup step fails, inform the user with the exact commands they can run
|
|
|
458
455
|
|
|
459
456
|
# User Interaction Rules
|
|
460
457
|
|
|
461
|
-
Use ~{${
|
|
458
|
+
Use ~{${USER_INTERACTION_FUNCTION_ID}} whenever you need the user to make a choice or walk through pre-determined items. Beyond what the tool description already covers, follow these PR-review specifics:
|
|
462
459
|
- Always provide a meaningful **title** and a detailed markdown **message** for every step.
|
|
463
460
|
- Add **links** for any file or diff the step references. Do not auto-open links unless the user explicitly opted into that behavior.
|
|
464
461
|
- Batch all known steps into a single \`interactions\` array to avoid per-step round trips.
|
|
@@ -469,10 +466,10 @@ Use ~{${user_interaction_tool_1.USER_INTERACTION_FUNCTION_ID}} whenever you need
|
|
|
469
466
|
When encountering failures, handle them gracefully instead of stopping:
|
|
470
467
|
|
|
471
468
|
- **GitHub agent delegation fails** (e.g., authentication error, missing configuration, rate limit): Inform the user that the GitHub integration is unavailable with the specific error. Suggest they check their GitHub agent configuration and authentication. Do NOT retry indefinitely — after 2 failed attempts, present the error and ask the user how to proceed.
|
|
472
|
-
- **Explore agent delegation fails**: Fall back to using ~{${
|
|
469
|
+
- **Explore agent delegation fails**: Fall back to using ~{${FILE_CONTENT_FUNCTION_ID}} and ~{${SEARCH_IN_WORKSPACE_FUNCTION_ID}} directly for lightweight exploration. Note in the review plan that exploration was limited.
|
|
473
470
|
- **\`gh\` CLI not available during Checkout**: Fall back to raw git commands. If git operations also fail, inform the user and ask them to check out the PR branch manually, then continue after checkout is complete.
|
|
474
471
|
- **Build fails**: Record the failure as a critical finding in the review plan. Continue with the review — the code is still reviewable even if it does not build. Note which findings may be related to the build failure.
|
|
475
|
-
- **Task context edit fails repeatedly**: Use ~{${
|
|
472
|
+
- **Task context edit fails repeatedly**: Use ~{${REWRITE_TASK_CONTEXT_FUNCTION_ID}} as a fallback to replace the entire review plan content.
|
|
476
473
|
- **Shell command fails**: Read the error output carefully. If it is a transient issue (e.g., network timeout), retry once. If it is a permanent issue (e.g., command not found), fall back to an alternative approach or inform the user.
|
|
477
474
|
|
|
478
475
|
# Diagrams
|
|
@@ -481,11 +478,11 @@ Where a Mermaid diagram is genuinely useful, use one, for example to explain arc
|
|
|
481
478
|
|
|
482
479
|
# Context
|
|
483
480
|
|
|
484
|
-
{{${
|
|
481
|
+
{{${CONTEXT_FILES_VARIABLE_ID}}}
|
|
485
482
|
|
|
486
|
-
{{prompt:${
|
|
483
|
+
{{prompt:${AGENTS_MD_PROMPT_FRAGMENT_ID}}}
|
|
487
484
|
|
|
488
|
-
{{${
|
|
485
|
+
{{${TASK_CONTEXT_SUMMARY_VARIABLE_ID}}}
|
|
489
486
|
`
|
|
490
487
|
};
|
|
491
488
|
//# sourceMappingURL=pr-review-prompt-template.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pr-review-prompt-template.js","sourceRoot":"","sources":["../../../src/browser/review/pr-review-prompt-template.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"pr-review-prompt-template.js","sourceRoot":"","sources":["../../../src/browser/review/pr-review-prompt-template.ts"],"names":[],"mappings":"AAAA,4BAA4B;AAC5B,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;AAEhF,OAAO,EAAE,mBAAmB,EAAE,4BAA4B,EAAsB,MAAM,2BAA2B,CAAC;AAClH,OAAO,EAAE,yBAAyB,EAAE,gCAAgC,EAAE,MAAM,mCAAmC,CAAC;AAChH,OAAO,EACH,wBAAwB,EACxB,uBAAuB,EACvB,+BAA+B,EAClC,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EACH,+BAA+B,EAC/B,4BAA4B,EAC5B,6BAA6B,EAC7B,8BAA8B,EAC9B,gCAAgC,EACnC,MAAM,2CAA2C,CAAC;AACnD,OAAO,EAAE,4BAA4B,EAAE,MAAM,uCAAuC,CAAC;AAErF,MAAM,CAAC,MAAM,0BAA0B,GAAG,kBAAkB,CAAC;AAC7D,MAAM,CAAC,MAAM,0CAA0C,GAAG,8BAA8B,CAAC;AACzF,MAAM,CAAC,MAAM,sCAAsC,GAAG,0BAA0B,CAAC;AACjF,MAAM,CAAC,MAAM,wCAAwC,GAAG,4BAA4B,CAAC;AACrF,MAAM,CAAC,MAAM,4CAA4C,GAAG,gCAAgC,CAAC;AAC7F,MAAM,CAAC,MAAM,6CAA6C,GAAG,iCAAiC,CAAC;AAE/F,MAAM,CAAC,MAAM,oBAAoB,GAAuB;IACpD,EAAE,EAAE,0BAA0B;IAC9B,QAAQ,EAAE;;;;;;;;;;;;;;eAcC,0CAA0C;;eAE1C,sCAAsC;;eAEtC,wCAAwC;;eAExC,4CAA4C;;eAE5C,6CAA6C;;;;;MAKtD,wBAAwB;MACxB,uBAAuB;MACvB,+BAA+B;;;MAG/B,+BAA+B;MAC/B,4BAA4B;MAC5B,6BAA6B;MAC7B,8BAA8B;MAC9B,gCAAgC;;;MAGhC,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oRAoCkP,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0JAwGtJ,wBAAwB,QAAQ,uBAAuB,YAAY,+BAA+B;;;uFAGrK,6BAA6B;;;;;;;0BAO1F,wBAAwB;8BACpB,uBAAuB;sCACf,+BAA+B;;;;;;;;;;;;;;;2EAeM,mBAAmB;;;;;;;;;QAStF,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8FAuEyD,4BAA4B;;;;;;iCAMzF,4BAA4B;;;;;;YAMjD,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WAmC7B,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mEAuC2B,4BAA4B;;;;;;;;;;;;;QAavF,4BAA4B;;;;;;;;;;;;;;;;;;;;;;8JAsB0H,4BAA4B;;;;;;;;;;;;;;;;;;;;;QAqBlL,4BAA4B;;;;;;;;;;;6DAWyB,wBAAwB,WAAW,+BAA+B;;;kDAG7E,gCAAgC;;;;;;;;;IAS9E,yBAAyB;;WAElB,4BAA4B;;IAEnC,gCAAgC;CACnC;CACA,CAAC"}
|
|
@@ -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 workspace_functions_1 = require("../common/workspace-functions");
|
|
24
|
-
const core_1 = require("@theia/core");
|
|
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 { SHELL_EXECUTION_FUNCTION_ID } from '@theia/ai-terminal/lib/common/shell-execution-server';
|
|
20
|
+
import { LIST_TASKS_FUNCTION_ID, RUN_TASK_FUNCTION_ID } from '../common/workspace-functions.js';
|
|
21
|
+
import { nls } from '@theia/core';
|
|
25
22
|
let ShellExecutionCapabilityContribution = class ShellExecutionCapabilityContribution {
|
|
26
23
|
onStart() {
|
|
27
24
|
this.promptService.addBuiltInPromptFragment({
|
|
@@ -30,8 +27,8 @@ let ShellExecutionCapabilityContribution = class ShellExecutionCapabilityContrib
|
|
|
30
27
|
});
|
|
31
28
|
}
|
|
32
29
|
buildTemplate() {
|
|
33
|
-
const label =
|
|
34
|
-
const description =
|
|
30
|
+
const label = nls.localize('theia/ai/ide/shellExecutionCapability/name', 'Shell Execution');
|
|
31
|
+
const description = nls.localize('theia/ai/ide/shellExecutionCapability/description', 'Allows the agent to run arbitrary shell commands on the host system. The agent can then delegate to execute scripts \
|
|
35
32
|
that are not available as tasks, query system information, and perform operations for which no dedicated tool exists.');
|
|
36
33
|
return `---
|
|
37
34
|
name: ${label}
|
|
@@ -39,17 +36,17 @@ description: ${description}
|
|
|
39
36
|
---
|
|
40
37
|
## Shell Execution
|
|
41
38
|
|
|
42
|
-
You have access to the ~{${
|
|
39
|
+
You have access to the ~{${SHELL_EXECUTION_FUNCTION_ID}} tool, which lets you run arbitrary shell commands on the host system and capture their output.
|
|
43
40
|
|
|
44
41
|
### When to use shell execution
|
|
45
42
|
|
|
46
|
-
Use ~{${
|
|
43
|
+
Use ~{${SHELL_EXECUTION_FUNCTION_ID}} **only when no better-suited tool exists** for the task:
|
|
47
44
|
|
|
48
45
|
- **Prefer tasks over shell execution** for compiling, building, linting, testing, or any operation that has a corresponding workspace task. \
|
|
49
|
-
Always check available tasks with ~{${
|
|
46
|
+
Always check available tasks with ~{${LIST_TASKS_FUNCTION_ID}} first and run them with ~{${RUN_TASK_FUNCTION_ID}} instead of invoking the build tool directly.
|
|
50
47
|
- **Prefer dedicated tools** for file reading, searching, or editing — use the file and search tools provided rather than \`cat\`, \`grep\`, or \`sed\` for workspace files.
|
|
51
48
|
|
|
52
|
-
Appropriate use cases for ~{${
|
|
49
|
+
Appropriate use cases for ~{${SHELL_EXECUTION_FUNCTION_ID}}:
|
|
53
50
|
- Running a command for which no workspace task exists (e.g., a one-off script, \`git\` operations, installing a dependency)
|
|
54
51
|
- Efficient bulk operations that are impractical with the file editing tools (e.g., \`sed\`/\`awk\` for mass search-and-replace across many files)
|
|
55
52
|
- Querying system or environment information (e.g., checking installed tool versions, environment variables)
|
|
@@ -62,12 +59,11 @@ Appropriate use cases for ~{${shell_execution_server_1.SHELL_EXECUTION_FUNCTION_
|
|
|
62
59
|
- Output is truncated for large results; use filters (\`grep\`, \`head\`, \`tail\`) to keep output focused.`;
|
|
63
60
|
}
|
|
64
61
|
};
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
(0, inversify_1.inject)(common_1.PromptService),
|
|
68
|
-
tslib_1.__metadata("design:type", Object)
|
|
62
|
+
__decorate([
|
|
63
|
+
inject(PromptService)
|
|
69
64
|
], ShellExecutionCapabilityContribution.prototype, "promptService", void 0);
|
|
70
|
-
|
|
71
|
-
|
|
65
|
+
ShellExecutionCapabilityContribution = __decorate([
|
|
66
|
+
injectable()
|
|
72
67
|
], ShellExecutionCapabilityContribution);
|
|
68
|
+
export { ShellExecutionCapabilityContribution };
|
|
73
69
|
//# sourceMappingURL=shell-execution-capability-contribution.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shell-execution-capability-contribution.js","sourceRoot":"","sources":["../../src/browser/shell-execution-capability-contribution.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"shell-execution-capability-contribution.js","sourceRoot":"","sources":["../../src/browser/shell-execution-capability-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,2BAA2B,EAAE,MAAM,sDAAsD,CAAC;AACnG,OAAO,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AAChG,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAG3B,IAAM,oCAAoC,GAA1C,MAAM,oCAAoC;IAK7C,OAAO;QACH,IAAI,CAAC,aAAa,CAAC,wBAAwB,CAAC;YACxC,EAAE,EAAE,iBAAiB;YACrB,QAAQ,EAAE,IAAI,CAAC,aAAa,EAAE;SACjC,CAAC,CAAC;IACP,CAAC;IAES,aAAa;QACnB,MAAM,KAAK,GAAG,GAAG,CAAC,QAAQ,CAAC,4CAA4C,EAAE,iBAAiB,CAAC,CAAC;QAC5F,MAAM,WAAW,GAAG,GAAG,CAAC,QAAQ,CAAC,mDAAmD,EAChF;kIACsH,CAAC,CAAC;QAE5H,OAAO;QACP,KAAK;eACE,WAAW;;;;2BAIC,2BAA2B;;;;QAI9C,2BAA2B;;;sCAGG,sBAAsB,+BAA+B,oBAAoB;;;8BAGjF,2BAA2B;;;;;;;;;;4GAUmD,CAAC;IACzG,CAAC;CACJ,CAAA;AA3CsB;IADlB,MAAM,CAAC,aAAa,CAAC;2EAC0B;AAHvC,oCAAoC;IADhD,UAAU,EAAE;GACA,oCAAoC,CA8ChD"}
|