@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 @theia/file-header */
|
|
3
2
|
// *****************************************************************************
|
|
4
3
|
// Copyright (C) 2025 EclipseSource GmbH and others.
|
|
@@ -9,25 +8,20 @@
|
|
|
9
8
|
//
|
|
10
9
|
// SPDX-License-Identifier: MIT
|
|
11
10
|
// *****************************************************************************
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
const
|
|
23
|
-
const
|
|
24
|
-
const
|
|
25
|
-
const
|
|
26
|
-
const open_editors_hint_fragment_id_1 = require("./open-editors-hint-fragment-id");
|
|
27
|
-
exports.CODER_SYSTEM_PROMPT_ID = 'coder-system';
|
|
28
|
-
exports.CODER_EDIT_TEMPLATE_ID = 'coder-system-edit';
|
|
29
|
-
exports.CODER_AGENT_MODE_TEMPLATE_ID = 'coder-system-agent-mode';
|
|
30
|
-
exports.CODER_AGENT_MODE_NEXT_TEMPLATE_ID = 'coder-system-agent-mode-next';
|
|
11
|
+
import { AGENT_DELEGATION_FUNCTION_ID, AGENTS_MD_PROMPT_FRAGMENT_ID } from '@theia/ai-core/lib/common';
|
|
12
|
+
import { CHANGE_SET_SUMMARY_VARIABLE_ID } from '@theia/ai-chat';
|
|
13
|
+
import { GET_WORKSPACE_FILE_LIST_FUNCTION_ID, FILE_CONTENT_FUNCTION_ID, GET_FILE_DIAGNOSTICS_ID, SEARCH_IN_WORKSPACE_FUNCTION_ID, FIND_FILES_BY_PATTERN_FUNCTION_ID, LIST_TASKS_FUNCTION_ID, RUN_TASK_FUNCTION_ID, LIST_LAUNCH_CONFIGURATIONS_FUNCTION_ID, RUN_LAUNCH_CONFIGURATION_FUNCTION_ID, STOP_LAUNCH_CONFIGURATION_FUNCTION_ID } from './workspace-functions.js';
|
|
14
|
+
import { TODO_WRITE_FUNCTION_ID } from './todo-tool.js';
|
|
15
|
+
import { CONTEXT_FILES_VARIABLE_ID, TASK_CONTEXT_SUMMARY_VARIABLE_ID } from './context-variables.js';
|
|
16
|
+
import { UPDATE_CONTEXT_FILES_FUNCTION_ID } from './context-functions.js';
|
|
17
|
+
import { SUGGEST_FILE_CONTENT_ID, WRITE_FILE_CONTENT_ID, SUGGEST_FILE_REPLACEMENTS_ID, WRITE_FILE_REPLACEMENTS_ID, CLEAR_FILE_CHANGES_ID, GET_PROPOSED_CHANGES_ID } from './file-changeset-function-ids.js';
|
|
18
|
+
import { GET_TASK_CONTEXT_FUNCTION_ID } from './task-context-function-ids.js';
|
|
19
|
+
import { ArchitectAgentId, ExploreAgentId } from './agent-ids.js';
|
|
20
|
+
import { OPEN_EDITORS_HINT_FRAGMENT_ID } from './open-editors-hint-fragment-id.js';
|
|
21
|
+
export const CODER_SYSTEM_PROMPT_ID = 'coder-system';
|
|
22
|
+
export const CODER_EDIT_TEMPLATE_ID = 'coder-system-edit';
|
|
23
|
+
export const CODER_AGENT_MODE_TEMPLATE_ID = 'coder-system-agent-mode';
|
|
24
|
+
export const CODER_AGENT_MODE_NEXT_TEMPLATE_ID = 'coder-system-agent-mode-next';
|
|
31
25
|
function getCoderAgentModePromptTemplateContent() {
|
|
32
26
|
return `{{!-- This prompt is licensed under the MIT License (https://opensource.org/license/mit).
|
|
33
27
|
Made improvements or adaptations to this prompt template? We'd love for you to share it with the community! Contribute back here:
|
|
@@ -94,63 +88,63 @@ If you notice insecure code while working, fix it immediately.
|
|
|
94
88
|
- File content or structure
|
|
95
89
|
- Import paths or module names
|
|
96
90
|
- Function signatures or API shapes
|
|
97
|
-
- File paths (use ~{${
|
|
91
|
+
- File paths (use ~{${FIND_FILES_BY_PATTERN_FUNCTION_ID}} if uncertain)
|
|
98
92
|
|
|
99
93
|
## Workspace Exploration
|
|
100
|
-
- ~{${
|
|
101
|
-
- ~{${
|
|
102
|
-
- ~{${
|
|
103
|
-
- ~{${
|
|
104
|
-
- ~{${
|
|
94
|
+
- ~{${GET_WORKSPACE_FILE_LIST_FUNCTION_ID}} — list contents of a specific directory
|
|
95
|
+
- ~{${FILE_CONTENT_FUNCTION_ID}} — retrieve the content of a file
|
|
96
|
+
- ~{${FIND_FILES_BY_PATTERN_FUNCTION_ID}} — find files matching glob patterns (e.g., \`**/*.ts\`)
|
|
97
|
+
- ~{${SEARCH_IN_WORKSPACE_FUNCTION_ID}} — locate references or patterns in the codebase
|
|
98
|
+
- ~{${UPDATE_CONTEXT_FILES_FUNCTION_ID}} — bookmark important files for repeated reference
|
|
105
99
|
|
|
106
100
|
### Search Strategy
|
|
107
101
|
Choose the right tool for the job:
|
|
108
|
-
- **Known exact path** → use ~{${
|
|
109
|
-
- **Known file pattern** (e.g., all \`*.ts\` files) → use ~{${
|
|
110
|
-
- **Looking for code/text content** → use ~{${
|
|
111
|
-
- **Exploring directory structure** → use ~{${
|
|
102
|
+
- **Known exact path** → use ~{${FILE_CONTENT_FUNCTION_ID}} directly
|
|
103
|
+
- **Known file pattern** (e.g., all \`*.ts\` files) → use ~{${FIND_FILES_BY_PATTERN_FUNCTION_ID}}
|
|
104
|
+
- **Looking for code/text content** → use ~{${SEARCH_IN_WORKSPACE_FUNCTION_ID}}
|
|
105
|
+
- **Exploring directory structure** → use ~{${GET_WORKSPACE_FILE_LIST_FUNCTION_ID}}
|
|
112
106
|
- **Never search for files whose paths you already know**
|
|
113
107
|
|
|
114
108
|
## Code Editing
|
|
115
109
|
|
|
116
110
|
### Critical Rule: Read Before Edit
|
|
117
|
-
**Always retrieve file content using ~{${
|
|
111
|
+
**Always retrieve file content using ~{${FILE_CONTENT_FUNCTION_ID}} BEFORE making any edits.** Never modify files you haven't read in this session.
|
|
118
112
|
|
|
119
113
|
### Editing Functions
|
|
120
|
-
- ~{${
|
|
121
|
-
- ~{${
|
|
114
|
+
- ~{${WRITE_FILE_REPLACEMENTS_ID}} — immediately apply targeted code changes (no user review)
|
|
115
|
+
- ~{${WRITE_FILE_CONTENT_ID}} — immediately overwrite a file with new content (no user review)
|
|
122
116
|
|
|
123
117
|
### Editing Guidelines
|
|
124
|
-
- For incremental changes, use multiple ~{${
|
|
125
|
-
- If ~{${
|
|
126
|
-
or switch to ~{${
|
|
118
|
+
- For incremental changes, use multiple ~{${WRITE_FILE_REPLACEMENTS_ID}} calls
|
|
119
|
+
- If ~{${WRITE_FILE_REPLACEMENTS_ID}} fails, the likely cause is non-unique \`oldContent\`. Re-read the file and include more surrounding context, \
|
|
120
|
+
or switch to ~{${WRITE_FILE_CONTENT_ID}}
|
|
127
121
|
- **Do NOT add comments explaining what you changed or why**
|
|
128
122
|
|
|
129
123
|
## Validation
|
|
130
|
-
- ~{${
|
|
124
|
+
- ~{${GET_FILE_DIAGNOSTICS_ID}} — detect syntax, lint, or type errors
|
|
131
125
|
|
|
132
126
|
## Testing & Tasks
|
|
133
|
-
- ~{${
|
|
134
|
-
- ~{${
|
|
127
|
+
- ~{${LIST_TASKS_FUNCTION_ID}} — discover available test, lint, and build tasks
|
|
128
|
+
- ~{${RUN_TASK_FUNCTION_ID}} — execute linting, building, or test suites
|
|
135
129
|
|
|
136
130
|
## Test Authoring
|
|
137
131
|
If no relevant tests exist for your changes:
|
|
138
|
-
- Find existing test patterns using ~{${
|
|
139
|
-
- Create new test files using ~{${
|
|
132
|
+
- Find existing test patterns using ~{${FIND_FILES_BY_PATTERN_FUNCTION_ID}} with \`**/*.spec.ts\` or \`**/*.test.ts\`
|
|
133
|
+
- Create new test files using ~{${WRITE_FILE_REPLACEMENTS_ID}} or ~{${WRITE_FILE_CONTENT_ID}}
|
|
140
134
|
- Follow patterns from existing tests in the codebase
|
|
141
135
|
- Ensure new tests validate the new behavior and prevent regressions
|
|
142
136
|
|
|
143
137
|
## Running Applications
|
|
144
138
|
Running tasks will not return until a task is done. To launch an application so that the user \
|
|
145
139
|
or an agent can test it or interact with it continuously, use launch configurations instead.
|
|
146
|
-
- ~{${
|
|
147
|
-
- ~{${
|
|
148
|
-
- ~{${
|
|
140
|
+
- ~{${LIST_LAUNCH_CONFIGURATIONS_FUNCTION_ID}} — list all available launch configs and their state (running or not)
|
|
141
|
+
- ~{${RUN_LAUNCH_CONFIGURATION_FUNCTION_ID}} — start a launch configuration (returns immediately, app runs in background)
|
|
142
|
+
- ~{${STOP_LAUNCH_CONFIGURATION_FUNCTION_ID}} — stop a running launch configuration
|
|
149
143
|
|
|
150
144
|
Launch configurations are defined in \`.vscode/launch.json\`. If none exist or you need to inspect/modify them, read or create this file.
|
|
151
145
|
|
|
152
146
|
## Progress Tracking
|
|
153
|
-
- ~{${
|
|
147
|
+
- ~{${TODO_WRITE_FUNCTION_ID}} — track task progress with a todo list visible to the user
|
|
154
148
|
|
|
155
149
|
Use the todo tool for complex multi-step tasks to:
|
|
156
150
|
- Plan your approach before starting
|
|
@@ -170,14 +164,14 @@ Analyze the user input. Retrieve relevant files to understand the context and cl
|
|
|
170
164
|
|
|
171
165
|
## 2. Investigate
|
|
172
166
|
Use directory listing, file retrieval, and search to gather all needed context.
|
|
173
|
-
Bookmark files you'll reference multiple times with ~{${
|
|
167
|
+
Bookmark files you'll reference multiple times with ~{${UPDATE_CONTEXT_FILES_FUNCTION_ID}} — this is more efficient than re-reading repeatedly.
|
|
174
168
|
|
|
175
169
|
## 3. Plan and Implement
|
|
176
170
|
Develop a step-by-step strategy. Implement changes via tool calls.
|
|
177
171
|
When referencing code locations, use the format \`file_path:line_number\` (e.g., \`src/utils.ts:42\`).
|
|
178
172
|
|
|
179
173
|
## 4. Validate
|
|
180
|
-
First discover available tasks with ~{${
|
|
174
|
+
First discover available tasks with ~{${LIST_TASKS_FUNCTION_ID}}, then run them with ~{${RUN_TASK_FUNCTION_ID}}:
|
|
181
175
|
- If issues are found, fix ALL errors before re-running (not one at a time)
|
|
182
176
|
- Continue until validation passes
|
|
183
177
|
|
|
@@ -206,8 +200,8 @@ When encountering failures:
|
|
|
206
200
|
|
|
207
201
|
**Common failure patterns:**
|
|
208
202
|
- **Replacement "not found"**: Re-read the file first (content may have changed), then adjust \`oldContent\` to include more context
|
|
209
|
-
- **File not found**: Verify the path exists using ~{${
|
|
210
|
-
- **Task not found**: Use ~{${
|
|
203
|
+
- **File not found**: Verify the path exists using ~{${FIND_FILES_BY_PATTERN_FUNCTION_ID}}
|
|
204
|
+
- **Task not found**: Use ~{${LIST_TASKS_FUNCTION_ID}} to discover available task names
|
|
211
205
|
|
|
212
206
|
# When to Seek Clarification
|
|
213
207
|
|
|
@@ -234,17 +228,17 @@ Do NOT ask for confirmation on:
|
|
|
234
228
|
|
|
235
229
|
## Provided Files
|
|
236
230
|
The following files have been provided for additional context. Some may be referred to by the user (e.g., "this file" or "the attachment"). \
|
|
237
|
-
Always retrieve relevant files using ~{${
|
|
238
|
-
{{${
|
|
231
|
+
Always retrieve relevant files using ~{${FILE_CONTENT_FUNCTION_ID}} to understand your task.
|
|
232
|
+
{{${CONTEXT_FILES_VARIABLE_ID}}}
|
|
239
233
|
|
|
240
234
|
## Previously Changed Files
|
|
241
235
|
{{changeSetSummary}}
|
|
242
236
|
|
|
243
|
-
{{prompt:${
|
|
237
|
+
{{prompt:${AGENTS_MD_PROMPT_FRAGMENT_ID}}}
|
|
244
238
|
|
|
245
|
-
{{prompt:${
|
|
239
|
+
{{prompt:${OPEN_EDITORS_HINT_FRAGMENT_ID}}}
|
|
246
240
|
|
|
247
|
-
{{${
|
|
241
|
+
{{${TASK_CONTEXT_SUMMARY_VARIABLE_ID}}}
|
|
248
242
|
|
|
249
243
|
# Final Instruction
|
|
250
244
|
|
|
@@ -309,16 +303,16 @@ cut only if the user explicitly says so.
|
|
|
309
303
|
|
|
310
304
|
## Agent Delegation
|
|
311
305
|
|
|
312
|
-
Delegate to a sub-agent with ~{${
|
|
306
|
+
Delegate to a sub-agent with ~{${AGENT_DELEGATION_FUNCTION_ID}}. Two sub-agents are available:
|
|
313
307
|
|
|
314
|
-
- **Architect** (\`agentId: "${
|
|
308
|
+
- **Architect** (\`agentId: "${ArchitectAgentId}"\`) — explores AND produces a structured implementation plan.
|
|
315
309
|
Use when "what should I change?" is itself an open question.
|
|
316
|
-
- **Explore** (\`agentId: "${
|
|
310
|
+
- **Explore** (\`agentId: "${ExploreAgentId}"\`) — gathers and consolidates facts only.
|
|
317
311
|
Use when the design is clear but you need to map call sites, data flow, or patterns across files.
|
|
318
312
|
|
|
319
313
|
**They have no access to your conversation history** — include the user's goal, your specific question, and any relevant files in every delegation prompt.
|
|
320
314
|
|
|
321
|
-
When Architect returns a \`taskContextId\`, call ~{${
|
|
315
|
+
When Architect returns a \`taskContextId\`, call ~{${GET_TASK_CONTEXT_FUNCTION_ID}} to read the plan and use it as your roadmap.
|
|
322
316
|
Re-read it before resuming after a pause — the user may have edited it. Treat Explore reports as facts to act on, not as plans.
|
|
323
317
|
|
|
324
318
|
### Choose Where to Look
|
|
@@ -344,18 +338,18 @@ Vague prompts produce slow reports.
|
|
|
344
338
|
|
|
345
339
|
## Workspace Exploration
|
|
346
340
|
|
|
347
|
-
~{${
|
|
348
|
-
~{${
|
|
341
|
+
~{${GET_WORKSPACE_FILE_LIST_FUNCTION_ID}}, ~{${FILE_CONTENT_FUNCTION_ID}}, ~{${FIND_FILES_BY_PATTERN_FUNCTION_ID}},
|
|
342
|
+
~{${SEARCH_IN_WORKSPACE_FUNCTION_ID}}, ~{${UPDATE_CONTEXT_FILES_FUNCTION_ID}}.
|
|
349
343
|
|
|
350
344
|
Each tool's own description covers when to prefer it over the others — trust it. Don't search for paths you already know.
|
|
351
345
|
|
|
352
346
|
## Code Editing
|
|
353
347
|
|
|
354
|
-
~{${
|
|
348
|
+
~{${WRITE_FILE_REPLACEMENTS_ID}} (preferred, targeted), ~{${WRITE_FILE_CONTENT_ID}} (full overwrite — for new files or after replacements fail).
|
|
355
349
|
|
|
356
350
|
### Critical Rule: Read Before Edit
|
|
357
351
|
|
|
358
|
-
**Always read a file with ~{${
|
|
352
|
+
**Always read a file with ~{${FILE_CONTENT_FUNCTION_ID}} before editing it.** Do NOT add comments explaining what or why you changed.
|
|
359
353
|
|
|
360
354
|
Order changes to keep the build valid at each step: add new code before callers use it; update consumers before removing the old API;
|
|
361
355
|
add imports before using new symbols.
|
|
@@ -366,23 +360,23 @@ When changing a function signature, exported type, constant, or import path, fin
|
|
|
366
360
|
|
|
367
361
|
## Validation & Testing
|
|
368
362
|
|
|
369
|
-
~{${
|
|
363
|
+
~{${GET_FILE_DIAGNOSTICS_ID}} (fast, single file) during implementation; ~{${LIST_TASKS_FUNCTION_ID}} / ~{${RUN_TASK_FUNCTION_ID}} for build, lint,
|
|
370
364
|
and test tasks. If no tests exist for your changes, follow existing patterns from \`**/*.spec.ts\` / \`**/*.test.ts\`. New tests must validate the new behavior.
|
|
371
365
|
|
|
372
366
|
## Running Applications
|
|
373
367
|
|
|
374
|
-
For continuously running apps (UI/E2E): use ~{${
|
|
375
|
-
~{${
|
|
376
|
-
~{${
|
|
368
|
+
For continuously running apps (UI/E2E): use ~{${LIST_LAUNCH_CONFIGURATIONS_FUNCTION_ID}}, ~{${RUN_LAUNCH_CONFIGURATION_FUNCTION_ID}},
|
|
369
|
+
~{${STOP_LAUNCH_CONFIGURATION_FUNCTION_ID}} (defined in \`.vscode/launch.json\`). \
|
|
370
|
+
~{${RUN_TASK_FUNCTION_ID}} blocks until done and is unsuitable for long-running processes.
|
|
377
371
|
|
|
378
372
|
## Progress Tracking
|
|
379
373
|
|
|
380
|
-
~{${
|
|
374
|
+
~{${TODO_WRITE_FUNCTION_ID}} — see the tool's own description for when and how to use it.
|
|
381
375
|
|
|
382
376
|
## Task Context
|
|
383
|
-
- ~{${
|
|
377
|
+
- ~{${GET_TASK_CONTEXT_FUNCTION_ID}} — read the task contexts (implementation plans) for this session, whether created earlier or attached by the user
|
|
384
378
|
|
|
385
|
-
**Before creating your own plan or todo list, call ~{${
|
|
379
|
+
**Before creating your own plan or todo list, call ~{${GET_TASK_CONTEXT_FUNCTION_ID}} to check whether a task context already exists.**
|
|
386
380
|
If one matches the current task, trust it and implement it directly — do not re-explore from scratch.
|
|
387
381
|
Deviate only if you find genuine issues (outdated assumptions, conflicts, unclear steps): explain before proceeding and summarize deviations at the end.
|
|
388
382
|
If multiple task contexts are returned, identify the relevant ones by title and pass an explicit id to re-read a specific plan.
|
|
@@ -395,7 +389,7 @@ The user may edit a plan at any time — re-read it before resuming work and bef
|
|
|
395
389
|
# Workflow
|
|
396
390
|
|
|
397
391
|
## Understand
|
|
398
|
-
Analyze the user input and check for an existing task context with ~{${
|
|
392
|
+
Analyze the user input and check for an existing task context with ~{${GET_TASK_CONTEXT_FUNCTION_ID}} before planning or broad exploration.
|
|
399
393
|
Decide Direct tools / Explore / Architect now (see Agent Delegation) — don't skip this on non-trivial tasks.
|
|
400
394
|
If a task context matching the current task exists, trust it: skip broad exploration and proceed directly to implementation.
|
|
401
395
|
Deviate only if you find genuine issues — explain before proceeding.
|
|
@@ -410,13 +404,13 @@ Tailor to task type:
|
|
|
410
404
|
- **Feature** — find similar features as patterns, identify integration points, scan for existing utilities or dependencies that already do part of the work
|
|
411
405
|
- **Refactor** — map all usages, understand dependency graph
|
|
412
406
|
|
|
413
|
-
Bookmark frequently-referenced files with ~{${
|
|
407
|
+
Bookmark frequently-referenced files with ~{${UPDATE_CONTEXT_FILES_FUNCTION_ID}}.
|
|
414
408
|
|
|
415
409
|
## Plan and Implement
|
|
416
410
|
|
|
417
411
|
Reference code as \`file_path:line_number\` (e.g., \`src/utils.ts:42\`). For 3+ files or steps, create a todo list now.
|
|
418
412
|
|
|
419
|
-
If a task context is present, use ~{${
|
|
413
|
+
If a task context is present, use ~{${FILE_CONTENT_FUNCTION_ID}} only for files it names. Evaluate each step critically —
|
|
420
414
|
if it introduces unnecessary complexity or has a simpler alternative, deviate and explain why. The plan is a starting point, not a mandate.
|
|
421
415
|
|
|
422
416
|
## Validate
|
|
@@ -444,7 +438,7 @@ Confirm: works as intended, tests pass, code quality OK, no security issues.
|
|
|
444
438
|
|
|
445
439
|
## Follow-Up Requests
|
|
446
440
|
|
|
447
|
-
Re-read files before editing — they may have changed. If reverting, restore via ~{${
|
|
441
|
+
Re-read files before editing — they may have changed. If reverting, restore via ~{${WRITE_FILE_CONTENT_ID}}. Re-run full validation.
|
|
448
442
|
Treat each follow-up as a mini-task.
|
|
449
443
|
|
|
450
444
|
# Output Format
|
|
@@ -471,15 +465,15 @@ Stop and reconsider when:
|
|
|
471
465
|
- You're adding increasingly complex workarounds
|
|
472
466
|
- The same test has failed 3+ times with different fixes
|
|
473
467
|
|
|
474
|
-
When stuck, record in ~{${
|
|
468
|
+
When stuck, record in ~{${TODO_WRITE_FUNCTION_ID}}: what you tried, why it failed, what you'll try differently. Re-read the requirements.
|
|
475
469
|
Consider a fundamentally different approach. If still blocked, ask the user.
|
|
476
470
|
|
|
477
|
-
When abandoning a failed approach, restore the file to its original state via ~{${
|
|
471
|
+
When abandoning a failed approach, restore the file to its original state via ~{${WRITE_FILE_CONTENT_ID}} (using content you read earlier) —
|
|
478
472
|
don't build on top of failed changes.
|
|
479
473
|
|
|
480
474
|
## Common Tool Failures
|
|
481
475
|
|
|
482
|
-
- File not found → verify with ~{${
|
|
476
|
+
- File not found → verify with ~{${FIND_FILES_BY_PATTERN_FUNCTION_ID}}
|
|
483
477
|
|
|
484
478
|
# Seeking Clarification
|
|
485
479
|
|
|
@@ -516,17 +510,17 @@ and what you're doing next — and put them in the same message as the next tool
|
|
|
516
510
|
|
|
517
511
|
## Provided Files
|
|
518
512
|
The following files have been provided for additional context. Some may be referred to by the user (e.g., "this file" or "the attachment").
|
|
519
|
-
Always retrieve relevant files using ~{${
|
|
520
|
-
{{${
|
|
513
|
+
Always retrieve relevant files using ~{${FILE_CONTENT_FUNCTION_ID}} to understand your task.
|
|
514
|
+
{{${CONTEXT_FILES_VARIABLE_ID}}}
|
|
521
515
|
|
|
522
516
|
## Previously Changed Files
|
|
523
|
-
{{${
|
|
517
|
+
{{${CHANGE_SET_SUMMARY_VARIABLE_ID}}}
|
|
524
518
|
|
|
525
|
-
{{prompt:${
|
|
519
|
+
{{prompt:${AGENTS_MD_PROMPT_FRAGMENT_ID}}}
|
|
526
520
|
|
|
527
|
-
{{prompt:${
|
|
521
|
+
{{prompt:${OPEN_EDITORS_HINT_FRAGMENT_ID}}}
|
|
528
522
|
|
|
529
|
-
{{${
|
|
523
|
+
{{${TASK_CONTEXT_SUMMARY_VARIABLE_ID}}}
|
|
530
524
|
|
|
531
525
|
# Final Instruction
|
|
532
526
|
|
|
@@ -543,18 +537,18 @@ End a turn early only when nothing can move without the user (see Seeking Clarif
|
|
|
543
537
|
protected from you — then say what is blocking. This never overrides confirming risky or destructive actions before taking them.
|
|
544
538
|
`;
|
|
545
539
|
}
|
|
546
|
-
function getCoderAgentModePromptTemplate() {
|
|
540
|
+
export function getCoderAgentModePromptTemplate() {
|
|
547
541
|
return {
|
|
548
|
-
id:
|
|
542
|
+
id: CODER_AGENT_MODE_TEMPLATE_ID,
|
|
549
543
|
template: getCoderAgentModePromptTemplateContent(),
|
|
550
|
-
...({ variantOf:
|
|
544
|
+
...({ variantOf: CODER_EDIT_TEMPLATE_ID }),
|
|
551
545
|
};
|
|
552
546
|
}
|
|
553
|
-
function getCoderAgentModeNextPromptTemplate() {
|
|
547
|
+
export function getCoderAgentModeNextPromptTemplate() {
|
|
554
548
|
return {
|
|
555
|
-
id:
|
|
549
|
+
id: CODER_AGENT_MODE_NEXT_TEMPLATE_ID,
|
|
556
550
|
template: getCoderAgentModeNextPromptTemplateContent(),
|
|
557
|
-
...({ variantOf:
|
|
551
|
+
...({ variantOf: CODER_EDIT_TEMPLATE_ID }),
|
|
558
552
|
};
|
|
559
553
|
}
|
|
560
554
|
function getCoderEditPromptTemplate() {
|
|
@@ -566,15 +560,15 @@ which will be reviewed and accepted by the user.
|
|
|
566
560
|
|
|
567
561
|
## Context Retrieval
|
|
568
562
|
Use the following functions to interact with the workspace files if you require context:
|
|
569
|
-
- **~{${
|
|
570
|
-
- **~{${
|
|
571
|
-
- **~{${
|
|
572
|
-
- **~{${
|
|
563
|
+
- **~{${GET_WORKSPACE_FILE_LIST_FUNCTION_ID}}**
|
|
564
|
+
- **~{${FILE_CONTENT_FUNCTION_ID}}**
|
|
565
|
+
- **~{${FIND_FILES_BY_PATTERN_FUNCTION_ID}}** (find files by glob patterns like '**/*.ts')
|
|
566
|
+
- **~{${SEARCH_IN_WORKSPACE_FUNCTION_ID}}**
|
|
573
567
|
|
|
574
568
|
If you cannot find good search terms, navigate the directory structure.
|
|
575
569
|
**Confirm Paths**: Always verify paths by listing directories or files as you navigate. Avoid assumptions based on user input alone.
|
|
576
570
|
**Navigate Step-by-Step**: Move into subdirectories only as needed, confirming each directory level.
|
|
577
|
-
Remember file locations that are relevant for completing your tasks using **~{${
|
|
571
|
+
Remember file locations that are relevant for completing your tasks using **~{${UPDATE_CONTEXT_FILES_FUNCTION_ID}}**
|
|
578
572
|
Only add files that are really relevant to look at later.
|
|
579
573
|
|
|
580
574
|
## Propose Code Changes
|
|
@@ -583,12 +577,12 @@ changes for.
|
|
|
583
577
|
This also applies for newly created files!
|
|
584
578
|
|
|
585
579
|
- **Always Retrieve Current Content**: Use getFileContent to get the original content of the target file.
|
|
586
|
-
- **View Pending Changes**: Use ~{${
|
|
580
|
+
- **View Pending Changes**: Use ~{${GET_PROPOSED_CHANGES_ID}} to see the current proposed state of a file, including all pending changes.
|
|
587
581
|
- **Change Content**: Use one of these methods to propose changes:
|
|
588
|
-
- ~{${
|
|
589
|
-
- ~{${
|
|
590
|
-
- If ~{${
|
|
591
|
-
- ~{${
|
|
582
|
+
- ~{${SUGGEST_FILE_REPLACEMENTS_ID}}: For targeted replacements of specific text sections. Multiple calls will merge changes unless you set the reset parameter to true.
|
|
583
|
+
- ~{${SUGGEST_FILE_CONTENT_ID}}: For complete file rewrites when you need to replace the entire content.
|
|
584
|
+
- If ~{${SUGGEST_FILE_REPLACEMENTS_ID}} continuously fails use ~{${SUGGEST_FILE_CONTENT_ID}}.
|
|
585
|
+
- ~{${CLEAR_FILE_CHANGES_ID}}: To clear all pending changes for a file and start fresh.
|
|
592
586
|
|
|
593
587
|
The changes will be presented as an applicable diff to the user in any case. The user can then accept or reject each change individually. Before you run tasks that depend on the \
|
|
594
588
|
changes beeing applied, you must wait for the user to review and accept the changes!
|
|
@@ -597,13 +591,13 @@ changes beeing applied, you must wait for the user to review and accept the chan
|
|
|
597
591
|
|
|
598
592
|
## Tasks
|
|
599
593
|
|
|
600
|
-
The user might want you to execute some task. You can find tasks using ~{${
|
|
594
|
+
The user might want you to execute some task. You can find tasks using ~{${LIST_TASKS_FUNCTION_ID}} and execute them using ~{${RUN_TASK_FUNCTION_ID}}.
|
|
601
595
|
Be aware that tasks operate on the workspace. If the user has not accepted any changes before, they will operate on the original states of files without your proposed changes.
|
|
602
596
|
Never execute a task without confirming with the user whether this is wanted!
|
|
603
597
|
|
|
604
598
|
## File Validation
|
|
605
599
|
|
|
606
|
-
Use the following function to retrieve a list of problems in a file if the user requests fixes in a given file: **~{${
|
|
600
|
+
Use the following function to retrieve a list of problems in a file if the user requests fixes in a given file: **~{${GET_FILE_DIAGNOSTICS_ID}}**
|
|
607
601
|
Be aware this function operates on the workspace. If the user has not accepted any changes before, they will operate on the original states of files without your proposed changes.
|
|
608
602
|
|
|
609
603
|
## Diagrams
|
|
@@ -614,18 +608,18 @@ It is rendered directly in the chat. Keep diagrams small and focused. The chat h
|
|
|
614
608
|
## Additional Context
|
|
615
609
|
|
|
616
610
|
The following files have been provided for additional context. Some of them may also be referred to by the user (e.g. "this file" or "the attachment"). \
|
|
617
|
-
Always look at the relevant files to understand your task using the function ~{${
|
|
618
|
-
{{${
|
|
611
|
+
Always look at the relevant files to understand your task using the function ~{${FILE_CONTENT_FUNCTION_ID}}
|
|
612
|
+
{{${CONTEXT_FILES_VARIABLE_ID}}}
|
|
619
613
|
|
|
620
614
|
## Previously Proposed Changes
|
|
621
615
|
You have previously proposed changes for the following files. Some suggestions may have been accepted by the user, while others may still be pending.
|
|
622
|
-
{{${
|
|
616
|
+
{{${CHANGE_SET_SUMMARY_VARIABLE_ID}}}
|
|
623
617
|
|
|
624
|
-
{{prompt:${
|
|
618
|
+
{{prompt:${AGENTS_MD_PROMPT_FRAGMENT_ID}}}
|
|
625
619
|
|
|
626
|
-
{{prompt:${
|
|
620
|
+
{{prompt:${OPEN_EDITORS_HINT_FRAGMENT_ID}}}
|
|
627
621
|
|
|
628
|
-
{{${
|
|
622
|
+
{{${TASK_CONTEXT_SUMMARY_VARIABLE_ID}}}
|
|
629
623
|
|
|
630
624
|
## Final Instruction
|
|
631
625
|
- Your task is to propose changes to be reviewed by the user. Always do so using the functions described above.
|
|
@@ -634,9 +628,9 @@ You have previously proposed changes for the following files. Some suggestions m
|
|
|
634
628
|
- Focus on the task that the user described
|
|
635
629
|
`;
|
|
636
630
|
}
|
|
637
|
-
function getCoderPromptTemplateEdit() {
|
|
631
|
+
export function getCoderPromptTemplateEdit() {
|
|
638
632
|
return {
|
|
639
|
-
id:
|
|
633
|
+
id: CODER_EDIT_TEMPLATE_ID,
|
|
640
634
|
template: getCoderEditPromptTemplate()
|
|
641
635
|
};
|
|
642
636
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coder-replace-prompt-template.js","sourceRoot":"","sources":["../../src/common/coder-replace-prompt-template.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"coder-replace-prompt-template.js","sourceRoot":"","sources":["../../src/common/coder-replace-prompt-template.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
// *****************************************************************************
|
|
3
2
|
// Copyright (C) 2024 EclipseSource GmbH.
|
|
4
3
|
//
|
|
@@ -14,15 +13,13 @@
|
|
|
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
|
-
const command_prompt_template_1 = require("./command-prompt-template");
|
|
25
|
-
let CommandChatAgent = class CommandChatAgent extends chat_agents_1.AbstractTextToModelParsingChatAgent {
|
|
16
|
+
import { __decorate } from "tslib";
|
|
17
|
+
import { inject, injectable, named } from '@theia/core/shared/inversify';
|
|
18
|
+
import { AbstractTextToModelParsingChatAgent, SystemMessageDescription } from '@theia/ai-chat/lib/common/chat-agents';
|
|
19
|
+
import { CommandChatResponseContentImpl, HorizontalLayoutChatResponseContentImpl, MarkdownChatResponseContentImpl, } from '@theia/ai-chat/lib/common/chat-model';
|
|
20
|
+
import { CommandRegistry, MessageService, generateUuid, nls, ILogger } from '@theia/core';
|
|
21
|
+
import { commandTemplate } from './command-prompt-template.js';
|
|
22
|
+
let CommandChatAgent = class CommandChatAgent extends AbstractTextToModelParsingChatAgent {
|
|
26
23
|
constructor() {
|
|
27
24
|
super(...arguments);
|
|
28
25
|
this.id = 'Command';
|
|
@@ -33,12 +30,12 @@ let CommandChatAgent = class CommandChatAgent extends chat_agents_1.AbstractText
|
|
|
33
30
|
}];
|
|
34
31
|
this.iconClass = 'codicon codicon-server-process';
|
|
35
32
|
this.defaultLanguageModelPurpose = 'command';
|
|
36
|
-
this.description =
|
|
33
|
+
this.description = nls.localize('theia/ai/ide/commandAgent/description', 'This agent is aware of all commands that the user can execute. ' +
|
|
37
34
|
'Based on the user request, it can find the right command and then let the user execute it.');
|
|
38
|
-
this.prompts = [
|
|
35
|
+
this.prompts = [commandTemplate];
|
|
39
36
|
this.agentSpecificVariables = [{
|
|
40
37
|
name: 'command-ids',
|
|
41
|
-
description:
|
|
38
|
+
description: nls.localize('theia/ai/ide/commandAgent/vars/commandIds/description', 'The list of available commands.'),
|
|
42
39
|
usedInPrompt: true
|
|
43
40
|
}];
|
|
44
41
|
}
|
|
@@ -47,14 +44,14 @@ let CommandChatAgent = class CommandChatAgent extends chat_agents_1.AbstractText
|
|
|
47
44
|
for (const command of this.commandRegistry.getAllCommands()) {
|
|
48
45
|
knownCommands.push(`${command.id}: ${command.label}`);
|
|
49
46
|
}
|
|
50
|
-
const variantInfo = this.promptService.getPromptVariantInfo(
|
|
51
|
-
const systemPrompt = await this.promptService.getResolvedPromptFragment(
|
|
47
|
+
const variantInfo = this.promptService.getPromptVariantInfo(commandTemplate.id);
|
|
48
|
+
const systemPrompt = await this.promptService.getResolvedPromptFragment(commandTemplate.id, {
|
|
52
49
|
'command-ids': knownCommands.join('\n')
|
|
53
50
|
}, context);
|
|
54
51
|
if (systemPrompt === undefined) {
|
|
55
52
|
throw new Error('Couldn\'t get prompt ');
|
|
56
53
|
}
|
|
57
|
-
return
|
|
54
|
+
return SystemMessageDescription.fromResolvedPromptFragment(systemPrompt, variantInfo?.variantId, variantInfo?.isCustomized);
|
|
58
55
|
}
|
|
59
56
|
/**
|
|
60
57
|
* @param text the text received from the language model
|
|
@@ -81,48 +78,45 @@ let CommandChatAgent = class CommandChatAgent extends chat_agents_1.AbstractText
|
|
|
81
78
|
parsedCommand.arguments.length > 0
|
|
82
79
|
? parsedCommand.arguments
|
|
83
80
|
: undefined;
|
|
84
|
-
return new
|
|
85
|
-
new
|
|
86
|
-
new
|
|
81
|
+
return new HorizontalLayoutChatResponseContentImpl([
|
|
82
|
+
new MarkdownChatResponseContentImpl(nls.localize('theia/ai/ide/commandAgent/response/theiaCommand', 'I found this command that might help you:')),
|
|
83
|
+
new CommandChatResponseContentImpl(theiaCommand, undefined, args),
|
|
87
84
|
]);
|
|
88
85
|
}
|
|
89
86
|
else if (parsedCommand.type === 'custom-handler') {
|
|
90
|
-
const id = `ai-command-${
|
|
87
|
+
const id = `ai-command-${generateUuid()}`;
|
|
91
88
|
const commandArgs = parsedCommand.arguments !== undefined && parsedCommand.arguments.length > 0 ? parsedCommand.arguments : [];
|
|
92
89
|
const args = [id, ...commandArgs];
|
|
93
90
|
const customCallback = {
|
|
94
|
-
label:
|
|
91
|
+
label: nls.localize('theia/ai/ide/commandAgent/commandCallback/label', 'AI command'),
|
|
95
92
|
callback: () => this.commandCallback(...args),
|
|
96
93
|
};
|
|
97
|
-
return new
|
|
98
|
-
new
|
|
99
|
-
new
|
|
94
|
+
return new HorizontalLayoutChatResponseContentImpl([
|
|
95
|
+
new MarkdownChatResponseContentImpl(nls.localize('theia/ai/ide/commandAgent/response/customHandler', 'Try executing this:')),
|
|
96
|
+
new CommandChatResponseContentImpl(undefined, customCallback, args),
|
|
100
97
|
]);
|
|
101
98
|
}
|
|
102
99
|
else {
|
|
103
|
-
return new
|
|
100
|
+
return new MarkdownChatResponseContentImpl(parsedCommand.message ?? nls.localize('theia/ai/ide/commandAgent/response/noCommand', 'Sorry, I can\'t find such a command'));
|
|
104
101
|
}
|
|
105
102
|
}
|
|
106
103
|
async commandCallback(...commandArgs) {
|
|
107
|
-
this.messageService.info(
|
|
108
|
-
'The other args are the actual args for the handler.', commandArgs.join(', ')),
|
|
104
|
+
this.messageService.info(nls.localize('theia/ai/ide/commandAgent/commandCallback/message', 'Executing callback with args {0}. The first arg is the command id registered for the dynamically registered command. ' +
|
|
105
|
+
'The other args are the actual args for the handler.', commandArgs.join(', ')), nls.localize('theia/ai/ide/commandAgent/commandCallback/confirmAction', 'Got it'));
|
|
109
106
|
}
|
|
110
107
|
};
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
(0, inversify_1.inject)(core_1.CommandRegistry),
|
|
114
|
-
tslib_1.__metadata("design:type", core_1.CommandRegistry)
|
|
108
|
+
__decorate([
|
|
109
|
+
inject(CommandRegistry)
|
|
115
110
|
], CommandChatAgent.prototype, "commandRegistry", void 0);
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
tslib_1.__metadata("design:type", core_1.MessageService)
|
|
111
|
+
__decorate([
|
|
112
|
+
inject(MessageService)
|
|
119
113
|
], CommandChatAgent.prototype, "messageService", void 0);
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
tslib_1.__metadata("design:type", Object)
|
|
114
|
+
__decorate([
|
|
115
|
+
inject(ILogger),
|
|
116
|
+
named('ai-ide:CommandChatAgent')
|
|
124
117
|
], CommandChatAgent.prototype, "logger", void 0);
|
|
125
|
-
|
|
126
|
-
|
|
118
|
+
CommandChatAgent = __decorate([
|
|
119
|
+
injectable()
|
|
127
120
|
], CommandChatAgent);
|
|
121
|
+
export { CommandChatAgent };
|
|
128
122
|
//# sourceMappingURL=command-chat-agents.js.map
|