@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,8 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.PromptSnippetsConfigurationCategory = exports.PromptSnippetsConfiguration = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const jsx_runtime_1 = require("@theia/core/shared/react/jsx-runtime");
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "@theia/core/shared/react/jsx-runtime";
|
|
6
3
|
// *****************************************************************************
|
|
7
4
|
// Copyright (C) 2026 EclipseSource and others.
|
|
8
5
|
//
|
|
@@ -18,19 +15,19 @@ const jsx_runtime_1 = require("@theia/core/shared/react/jsx-runtime");
|
|
|
18
15
|
//
|
|
19
16
|
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
20
17
|
// *****************************************************************************
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
18
|
+
import { AgentService } from '@theia/ai-core';
|
|
19
|
+
import { CAPABILITY_TYPE_PROMPT_MAP, parseCapabilitiesFromTemplate } from '@theia/ai-core/lib/common';
|
|
20
|
+
import { isCustomizedPromptFragment, PromptService } from '@theia/ai-core/lib/common/prompt-service';
|
|
21
|
+
import { Emitter, nls } from '@theia/core';
|
|
22
|
+
import { codicon, ConfirmDialog } from '@theia/core/lib/browser';
|
|
23
|
+
import { DisposableCollection } from '@theia/core/lib/common';
|
|
24
|
+
import { inject, injectable, postConstruct } from '@theia/core/shared/inversify';
|
|
25
|
+
import { AiConfigurationCategoryId, AiConfigurationCategoryOrder } from '@theia/ai-core-ui/lib/browser/ai-configuration/ai-configuration-category';
|
|
26
|
+
import { SinglePageCategoryRenderer } from '@theia/ai-core-ui/lib/browser/ai-configuration/renderers/single-page-category-renderer';
|
|
27
|
+
import { CollapsibleList, CollapsibleRowAction } from '@theia/ai-core-ui/lib/browser/ai-configuration/components/collapsible-list';
|
|
28
|
+
import { PromptCustomizationDialogs } from '@theia/ai-core-ui/lib/browser/ai-configuration/components/prompt-customization-dialogs';
|
|
29
|
+
import { AiConfigurationCallout } from '@theia/ai-core-ui/lib/browser/ai-configuration/components/ai-configuration-primitives';
|
|
30
|
+
import { AgentChips } from './agent-chips.js';
|
|
34
31
|
/**
|
|
35
32
|
* Fragments generated per running MCP server, named after `McpFrontendService.getPromptTemplateId`.
|
|
36
33
|
* Excluded from this page: they are rebuilt from the live tool list whenever a server starts, so a
|
|
@@ -38,7 +35,7 @@ const agent_chips_1 = require("./agent-chips");
|
|
|
38
35
|
* list is visible on the MCP Servers page instead.
|
|
39
36
|
*/
|
|
40
37
|
const MCP_TOOL_LIST_FRAGMENT_PATTERN = /^mcp_.+_tools$/;
|
|
41
|
-
var PromptSnippetsConfiguration;
|
|
38
|
+
export var PromptSnippetsConfiguration;
|
|
42
39
|
(function (PromptSnippetsConfiguration) {
|
|
43
40
|
/**
|
|
44
41
|
* Prefix of the `data-ai-config-row-id` of every row on this page, regardless of its group, so that
|
|
@@ -49,12 +46,12 @@ var PromptSnippetsConfiguration;
|
|
|
49
46
|
/** Navigation target that scrolls to and flashes `fragmentId`'s row on this page. */
|
|
50
47
|
function selectionFor(fragmentId) {
|
|
51
48
|
return {
|
|
52
|
-
categoryId:
|
|
49
|
+
categoryId: AiConfigurationCategoryId.PROMPT_SNIPPETS,
|
|
53
50
|
highlight: { rowId: PromptSnippetsConfiguration.ROW_ID_PREFIX + fragmentId }
|
|
54
51
|
};
|
|
55
52
|
}
|
|
56
53
|
PromptSnippetsConfiguration.selectionFor = selectionFor;
|
|
57
|
-
})(PromptSnippetsConfiguration || (
|
|
54
|
+
})(PromptSnippetsConfiguration || (PromptSnippetsConfiguration = {}));
|
|
58
55
|
/**
|
|
59
56
|
* The "Prompt Snippets" category: every prompt fragment that has no other home in this view, as a
|
|
60
57
|
* filterable list of expandable rows in three groups — user-authored snippets, agent capabilities and
|
|
@@ -65,18 +62,18 @@ var PromptSnippetsConfiguration;
|
|
|
65
62
|
* Capability fragments are global: editing one affects every agent that references it, which is why
|
|
66
63
|
* each row lists the agents using it rather than pretending the text belongs to one of them.
|
|
67
64
|
*/
|
|
68
|
-
let PromptSnippetsConfigurationCategory = class PromptSnippetsConfigurationCategory extends
|
|
65
|
+
let PromptSnippetsConfigurationCategory = class PromptSnippetsConfigurationCategory extends SinglePageCategoryRenderer {
|
|
69
66
|
constructor() {
|
|
70
67
|
super(...arguments);
|
|
71
|
-
this.id =
|
|
72
|
-
this.label =
|
|
73
|
-
this.description =
|
|
74
|
-
this.iconClass =
|
|
75
|
-
this.order =
|
|
68
|
+
this.id = AiConfigurationCategoryId.PROMPT_SNIPPETS;
|
|
69
|
+
this.label = nls.localize('theia/ai/ide/promptSnippetsConfiguration/label', 'Prompt Snippets');
|
|
70
|
+
this.description = nls.localize('theia/ai/ide/promptSnippetsConfiguration/description', 'Reusable prompt text: your own snippets plus the capability snippets agents pull in. Editing a snippet affects every agent that uses it.');
|
|
71
|
+
this.iconClass = codicon('file-code');
|
|
72
|
+
this.order = AiConfigurationCategoryOrder.PROMPT_SNIPPETS;
|
|
76
73
|
this.kind = 'single-page';
|
|
77
|
-
this.onDidChangeEmitter = new
|
|
74
|
+
this.onDidChangeEmitter = new Emitter();
|
|
78
75
|
this.onDidChange = this.onDidChangeEmitter.event;
|
|
79
|
-
this.toDispose = new
|
|
76
|
+
this.toDispose = new DisposableCollection(this.onDidChangeEmitter);
|
|
80
77
|
this.entries = [];
|
|
81
78
|
this.availableAgents = [];
|
|
82
79
|
}
|
|
@@ -112,7 +109,7 @@ let PromptSnippetsConfigurationCategory = class PromptSnippetsConfigurationCateg
|
|
|
112
109
|
*/
|
|
113
110
|
loadEntries() {
|
|
114
111
|
const capabilityAgents = this.collectCapabilityReferences();
|
|
115
|
-
const genericCapabilityIds = new Set(
|
|
112
|
+
const genericCapabilityIds = new Set(CAPABILITY_TYPE_PROMPT_MAP.map(({ promptId }) => promptId));
|
|
116
113
|
const ownedElsewhere = this.collectFragmentIdsOwnedElsewhere();
|
|
117
114
|
const entries = [];
|
|
118
115
|
for (const [id, fragments] of this.promptService.getAllPromptFragments()) {
|
|
@@ -132,8 +129,8 @@ let PromptSnippetsConfigurationCategory = class PromptSnippetsConfigurationCateg
|
|
|
132
129
|
kind: this.classify(id, effective, genericCapabilityIds, agentIds.length > 0),
|
|
133
130
|
name: effective.name,
|
|
134
131
|
description: effective.description,
|
|
135
|
-
customized: fragments.some(fragment =>
|
|
136
|
-
hasBuiltIn: fragments.some(fragment => !
|
|
132
|
+
customized: fragments.some(fragment => isCustomizedPromptFragment(fragment)),
|
|
133
|
+
hasBuiltIn: fragments.some(fragment => !isCustomizedPromptFragment(fragment)),
|
|
137
134
|
agentIds
|
|
138
135
|
});
|
|
139
136
|
}
|
|
@@ -169,7 +166,7 @@ let PromptSnippetsConfigurationCategory = class PromptSnippetsConfigurationCateg
|
|
|
169
166
|
if (!template) {
|
|
170
167
|
continue;
|
|
171
168
|
}
|
|
172
|
-
for (const capability of
|
|
169
|
+
for (const capability of parseCapabilitiesFromTemplate(template)) {
|
|
173
170
|
const agents = references.get(capability.fragmentId) ?? [];
|
|
174
171
|
if (!agents.includes(agent.id)) {
|
|
175
172
|
agents.push(agent.id);
|
|
@@ -196,28 +193,28 @@ let PromptSnippetsConfigurationCategory = class PromptSnippetsConfigurationCateg
|
|
|
196
193
|
return entry.name ?? entry.id;
|
|
197
194
|
}
|
|
198
195
|
renderSections(ctx) {
|
|
199
|
-
const onOpenAgent = (agentId) => ctx.navigate({ categoryId:
|
|
196
|
+
const onOpenAgent = (agentId) => ctx.navigate({ categoryId: AiConfigurationCategoryId.AGENTS, itemId: agentId });
|
|
200
197
|
const groups = [
|
|
201
198
|
{
|
|
202
199
|
id: 'snippets',
|
|
203
|
-
title:
|
|
204
|
-
description:
|
|
200
|
+
title: nls.localizeByDefault('Snippets'),
|
|
201
|
+
description: nls.localize('theia/ai/ide/promptSnippetsConfiguration/snippetsGroupDescription', 'Prompt text you maintain yourself, referenced from other prompts with {{prompt:id}}.'),
|
|
205
202
|
rows: this.buildRows('snippet', ctx, onOpenAgent)
|
|
206
203
|
},
|
|
207
204
|
{
|
|
208
205
|
id: 'capabilities',
|
|
209
|
-
title:
|
|
210
|
-
description:
|
|
206
|
+
title: nls.localizeByDefault('Capabilities'),
|
|
207
|
+
description: nls.localize('theia/ai/ide/promptSnippetsConfiguration/capabilitiesGroupDescription', 'Instructions an agent adds to its prompt when enabled. They are shared, so an edit affects every agent using them.'),
|
|
211
208
|
rows: this.buildRows('capability', ctx, onOpenAgent)
|
|
212
209
|
},
|
|
213
210
|
{
|
|
214
211
|
id: 'generic-capabilities',
|
|
215
|
-
title:
|
|
216
|
-
description:
|
|
212
|
+
title: nls.localize('theia/ai/ide/promptSnippetsConfiguration/genericCapabilitiesGroup', 'Generic Capabilities'),
|
|
213
|
+
description: nls.localize('theia/ai/ide/promptSnippetsConfiguration/genericCapabilitiesGroupDescription', 'Basic instructions to integrate the selected capabilities into the agent\'s prompt. They are shared, so an edit affects every agent using them.'),
|
|
217
214
|
rows: this.buildRows('generic-capability', ctx, onOpenAgent)
|
|
218
215
|
}
|
|
219
216
|
];
|
|
220
|
-
return (
|
|
217
|
+
return _jsxs(_Fragment, { children: [this.renderResetAllCallout(ctx), _jsx(CollapsibleList, { groups: groups, filterPlaceholder: nls.localize('theia/ai/ide/promptSnippetsConfiguration/filterPlaceholder', 'Filter prompt snippets by name, id or description'), emptyMessage: nls.localize('theia/ai/ide/promptSnippetsConfiguration/empty', 'No prompt snippets are available.'), filterEmptyMessage: query => nls.localize('theia/ai/ide/promptSnippetsConfiguration/noMatches', 'No prompt snippets match "{0}".', query) })] });
|
|
221
218
|
}
|
|
222
219
|
/**
|
|
223
220
|
* Page-level reset, as the prompt fragments page it replaces had. Shown only while something is
|
|
@@ -228,8 +225,8 @@ let PromptSnippetsConfigurationCategory = class PromptSnippetsConfigurationCateg
|
|
|
228
225
|
if (!this.hasResettableCustomizations()) {
|
|
229
226
|
return undefined;
|
|
230
227
|
}
|
|
231
|
-
return (
|
|
232
|
-
+ 'including the agents\' prompt templates. Snippets that have no built-in version are kept.'), action: (
|
|
228
|
+
return _jsx(AiConfigurationCallout, { message: nls.localize('theia/ai/ide/promptSnippetsConfiguration/resetAllMessage', 'Some prompt fragments are customized. Resetting reverts every one of them to its built-in version, '
|
|
229
|
+
+ 'including the agents\' prompt templates. Snippets that have no built-in version are kept.'), action: _jsx("button", { className: 'theia-button secondary', onClick: () => this.resetAllCustomizations(ctx), children: nls.localize('theia/ai/ide/promptSnippetsConfiguration/resetAll', 'Reset All Customizations') }) });
|
|
233
230
|
}
|
|
234
231
|
/**
|
|
235
232
|
* Whether anything would actually be reset. Deliberately not limited to this page's entries: the action
|
|
@@ -238,20 +235,20 @@ let PromptSnippetsConfigurationCategory = class PromptSnippetsConfigurationCateg
|
|
|
238
235
|
*/
|
|
239
236
|
hasResettableCustomizations() {
|
|
240
237
|
for (const fragments of this.promptService.getAllPromptFragments().values()) {
|
|
241
|
-
if (fragments.some(fragment =>
|
|
238
|
+
if (fragments.some(fragment => isCustomizedPromptFragment(fragment)) && fragments.some(fragment => !isCustomizedPromptFragment(fragment))) {
|
|
242
239
|
return true;
|
|
243
240
|
}
|
|
244
241
|
}
|
|
245
242
|
return false;
|
|
246
243
|
}
|
|
247
244
|
async resetAllCustomizations(ctx) {
|
|
248
|
-
const dialog = new
|
|
249
|
-
title:
|
|
250
|
-
msg:
|
|
245
|
+
const dialog = new ConfirmDialog({
|
|
246
|
+
title: nls.localize('theia/ai/ide/promptSnippetsConfiguration/resetAllDialogTitle', 'Reset All Customizations'),
|
|
247
|
+
msg: nls.localize('theia/ai/ide/promptSnippetsConfiguration/resetAllDialogMsg', 'Are you sure you want to reset every customized prompt fragment to its built-in version? '
|
|
251
248
|
+ 'This includes the agents\' prompt templates, not only the snippets listed here. '
|
|
252
249
|
+ 'Snippets that have no built-in version are kept.'),
|
|
253
|
-
ok:
|
|
254
|
-
cancel:
|
|
250
|
+
ok: nls.localizeByDefault('Reset'),
|
|
251
|
+
cancel: nls.localizeByDefault('Cancel')
|
|
255
252
|
});
|
|
256
253
|
if (await dialog.open()) {
|
|
257
254
|
await this.promptService.resetAllToBuiltIn();
|
|
@@ -265,10 +262,10 @@ let PromptSnippetsConfigurationCategory = class PromptSnippetsConfigurationCateg
|
|
|
265
262
|
const agents = this.availableAgents.filter(agent => entry.agentIds.includes(agent.id));
|
|
266
263
|
const pills = [];
|
|
267
264
|
if (entry.customized) {
|
|
268
|
-
pills.push(
|
|
265
|
+
pills.push(nls.localize('theia/ai/ide/promptSnippetsConfiguration/customized', 'Customized'));
|
|
269
266
|
}
|
|
270
267
|
if (agents.length > 0) {
|
|
271
|
-
pills.push(agents.length === 1 ?
|
|
268
|
+
pills.push(agents.length === 1 ? nls.localizeByDefault('1 agent') : nls.localizeByDefault('{0} agents', agents.length));
|
|
272
269
|
}
|
|
273
270
|
return {
|
|
274
271
|
id: PromptSnippetsConfiguration.ROW_ID_PREFIX + entry.id,
|
|
@@ -276,14 +273,14 @@ let PromptSnippetsConfigurationCategory = class PromptSnippetsConfigurationCateg
|
|
|
276
273
|
description: entry.description,
|
|
277
274
|
pills,
|
|
278
275
|
filterText: `${entry.id} ${entry.name ?? ''} ${entry.description ?? ''}`.toLocaleLowerCase(),
|
|
279
|
-
actions: (
|
|
280
|
-
body: (
|
|
276
|
+
actions: _jsxs(_Fragment, { children: [_jsx(CollapsibleRowAction, { iconClass: codicon('edit'), label: nls.localize('theia/ai/ide/promptSnippetsConfiguration/editSnippet', 'Edit snippet'), onActivate: () => this.editEntry(entry) }), entry.customized && entry.hasBuiltIn && _jsx(CollapsibleRowAction, { iconClass: codicon('discard'), label: nls.localize('theia/ai/ide/promptSnippetsConfiguration/resetSnippet', 'Reset snippet to built-in'), onActivate: () => this.resetEntry(entry, ctx) }), entry.customized && !entry.hasBuiltIn && _jsx(CollapsibleRowAction, { iconClass: codicon('trash'), label: nls.localize('theia/ai/ide/promptSnippetsConfiguration/removeSnippet', 'Remove snippet'), onActivate: () => this.removeEntry(entry, ctx) })] }),
|
|
277
|
+
body: _jsxs(_Fragment, { children: [_jsxs("div", { className: 'ai-variable-id-row', children: [_jsx("span", { className: 'ai-variable-id-label', children: nls.localizeByDefault('ID') }), _jsx("code", { className: 'ai-variable-id-value', children: entry.id })] }), agents.length > 0 && _jsxs("div", { className: 'ai-variable-section', children: [_jsx("div", { className: 'ai-variable-section-label', children: nls.localize('theia/ai/ide/promptSnippetsConfiguration/usedByAgents', 'Used by Agents') }), _jsx(AgentChips, { agents: agents, onOpenAgent: onOpenAgent })] })] })
|
|
281
278
|
};
|
|
282
279
|
}
|
|
283
280
|
/** Opens the effective text: the customization if there is one, otherwise a fresh copy of the built-in. */
|
|
284
281
|
editEntry(entry) {
|
|
285
282
|
const fragment = this.promptService.getRawPromptFragment(entry.id);
|
|
286
|
-
if (fragment &&
|
|
283
|
+
if (fragment && isCustomizedPromptFragment(fragment)) {
|
|
287
284
|
this.promptService.editCustomization(fragment.id, fragment.customizationId);
|
|
288
285
|
}
|
|
289
286
|
else {
|
|
@@ -292,24 +289,24 @@ let PromptSnippetsConfigurationCategory = class PromptSnippetsConfigurationCateg
|
|
|
292
289
|
}
|
|
293
290
|
/** Drops all customizations so the built-in text applies again. */
|
|
294
291
|
async resetEntry(entry, ctx) {
|
|
295
|
-
await
|
|
292
|
+
await PromptCustomizationDialogs.confirmAndReset(this.promptService, entry.id, nls.localize('theia/ai/ide/promptSnippetsConfiguration/resetDialogTitle', 'Reset Snippet to Built-in'), nls.localize('theia/ai/ide/promptSnippetsConfiguration/resetDialogMsg', 'Are you sure you want to reset the snippet "{0}" to its built-in version? This will remove all customizations.', entry.id));
|
|
296
293
|
ctx.update();
|
|
297
294
|
}
|
|
298
295
|
/** Deletes a snippet that has no built-in behind it, naming the file, since it is gone afterwards. */
|
|
299
296
|
async removeEntry(entry, ctx) {
|
|
300
|
-
await
|
|
301
|
-
title:
|
|
297
|
+
await PromptCustomizationDialogs.confirmAndRemove(this.promptService, entry.id, {
|
|
298
|
+
title: nls.localize('theia/ai/ide/promptSnippetsConfiguration/removeDialogTitle', 'Remove Snippet'),
|
|
302
299
|
message: ({ type, description }) => description
|
|
303
|
-
?
|
|
304
|
-
:
|
|
300
|
+
? nls.localize('theia/ai/ide/promptSnippetsConfiguration/removeWithDescDialogMsg', 'Are you sure you want to remove the {0} customization for snippet "{1}" ({2})? It has no built-in version, so it will be gone entirely.', type ?? '', entry.id, description)
|
|
301
|
+
: nls.localize('theia/ai/ide/promptSnippetsConfiguration/removeDialogMsg', 'Are you sure you want to remove the {0} customization for snippet "{1}"? It has no built-in version, so it will be gone entirely.', type ?? '', entry.id)
|
|
305
302
|
});
|
|
306
303
|
ctx.update();
|
|
307
304
|
}
|
|
308
305
|
getSearchItems() {
|
|
309
306
|
const typeLabels = {
|
|
310
|
-
'snippet':
|
|
311
|
-
'capability':
|
|
312
|
-
'generic-capability':
|
|
307
|
+
'snippet': nls.localizeByDefault('Snippet'),
|
|
308
|
+
'capability': nls.localize('theia/ai/ide/promptSnippetsConfiguration/capabilityTypeLabel', 'Capability'),
|
|
309
|
+
'generic-capability': nls.localize('theia/ai/ide/promptSnippetsConfiguration/genericCapabilityTypeLabel', 'Generic capability')
|
|
313
310
|
};
|
|
314
311
|
return this.entries.map(entry => ({
|
|
315
312
|
label: this.displayName(entry),
|
|
@@ -320,22 +317,17 @@ let PromptSnippetsConfigurationCategory = class PromptSnippetsConfigurationCateg
|
|
|
320
317
|
}));
|
|
321
318
|
}
|
|
322
319
|
};
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
(0, inversify_1.inject)(prompt_service_1.PromptService),
|
|
326
|
-
tslib_1.__metadata("design:type", Object)
|
|
320
|
+
__decorate([
|
|
321
|
+
inject(PromptService)
|
|
327
322
|
], PromptSnippetsConfigurationCategory.prototype, "promptService", void 0);
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
tslib_1.__metadata("design:type", Object)
|
|
323
|
+
__decorate([
|
|
324
|
+
inject(AgentService)
|
|
331
325
|
], PromptSnippetsConfigurationCategory.prototype, "agentService", void 0);
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
tslib_1.__metadata("design:type", Function),
|
|
335
|
-
tslib_1.__metadata("design:paramtypes", []),
|
|
336
|
-
tslib_1.__metadata("design:returntype", void 0)
|
|
326
|
+
__decorate([
|
|
327
|
+
postConstruct()
|
|
337
328
|
], PromptSnippetsConfigurationCategory.prototype, "init", null);
|
|
338
|
-
|
|
339
|
-
|
|
329
|
+
PromptSnippetsConfigurationCategory = __decorate([
|
|
330
|
+
injectable()
|
|
340
331
|
], PromptSnippetsConfigurationCategory);
|
|
332
|
+
export { PromptSnippetsConfigurationCategory };
|
|
341
333
|
//# sourceMappingURL=prompt-snippets-configuration-category.js.map
|
package/lib/browser/ai-configuration/categories/prompt-snippets-configuration-category.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompt-snippets-configuration-category.js","sourceRoot":"","sources":["../../../../src/browser/ai-configuration/categories/prompt-snippets-configuration-category.tsx"],"names":[],"mappings":";;;;;AAAA,gFAAgF;AAChF,+CAA+C;AAC/C,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;AAEhF,4CAAqD;AACrD,sDAAsG;AACtG,6EAAqH;AACrH,sCAAkD;AAClD,qDAAiE;AACjE,mDAA8D;AAC9D,4DAAiF;AAEjF,wHAQkF;AAClF,0IAAoI;AACpI,iHAKoF;AACpF,yIAAoI;AACpI,uIAA+H;AAC/H,+CAA2C;AAE3C;;;;;GAKG;AACH,MAAM,8BAA8B,GAAG,gBAAgB,CAAC;AAqBxD,IAAiB,2BAA2B,CAe3C;AAfD,WAAiB,2BAA2B;IACxC;;;;OAIG;IACU,yCAAa,GAAG,WAAW,CAAC;IAEzC,qFAAqF;IACrF,SAAgB,YAAY,CAAC,UAAkB;QAC3C,OAAO;YACH,UAAU,EAAE,qDAAyB,CAAC,eAAe;YACrD,SAAS,EAAE,EAAE,KAAK,EAAE,4BAAA,aAAa,GAAG,UAAU,EAAE;SACnD,CAAC;IACN,CAAC;IALe,wCAAY,eAK3B,CAAA;AACL,CAAC,EAfgB,2BAA2B,2CAA3B,2BAA2B,QAe3C;AAED;;;;;;;;;GASG;AAEI,IAAM,mCAAmC,GAAzC,MAAM,mCAAoC,SAAQ,0DAA0B;IAA5E;;QA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0EAC0B;AAG7B;IADlB,IAAA,kBAAM,EAAC,sBAAY,CAAC;;yEACyB;AAkBpC;IADT,IAAA,yBAAa,GAAE;;;;+DAaf;8CA5CQ,mCAAmC;IAD/C,IAAA,sBAAU,GAAE;GACA,mCAAmC,CAkV/C"}
|
|
1
|
+
{"version":3,"file":"prompt-snippets-configuration-category.js","sourceRoot":"","sources":["../../../../src/browser/ai-configuration/categories/prompt-snippets-configuration-category.tsx"],"names":[],"mappings":";;AAAA,gFAAgF;AAChF,+CAA+C;AAC/C,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;AAEhF,OAAO,EAAS,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,EAAE,0BAA0B,EAAE,6BAA6B,EAAE,MAAM,2BAA2B,CAAC;AACtG,OAAO,EAAE,0BAA0B,EAAkB,aAAa,EAAE,MAAM,0CAA0C,CAAC;AACrH,OAAO,EAAE,OAAO,EAAS,GAAG,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAEjF,OAAO,EAEH,yBAAyB,EACzB,4BAA4B,EAK/B,MAAM,0EAA0E,CAAC;AAClF,OAAO,EAAE,0BAA0B,EAAE,MAAM,wFAAwF,CAAC;AACpI,OAAO,EAEH,eAAe,EAEf,oBAAoB,EACvB,MAAM,4EAA4E,CAAC;AACpF,OAAO,EAAE,0BAA0B,EAAE,MAAM,wFAAwF,CAAC;AACpI,OAAO,EAAE,sBAAsB,EAAE,MAAM,uFAAuF,CA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F,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;YAC9B,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC;YAC9B,SAAS,EAAE,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC;YACjC,UAAU,EAAE,IAAI,CAAC,EAAE;YACnB,MAAM,EAAE,2BAA2B,CAAC,YAAY,CAAC,KAAK,CAAC,EAAE,CAAC;YAC1D,QAAQ,EAAE,GAAG,KAAK,CAAC,EAAE,IAAI,KAAK,CAAC,WAAW,IAAI,EAAE,EAAE;SACrD,CAAC,CAAC,CAAC;IACR,CAAC;CACJ,CAAA;AAvUsB;IADlB,MAAM,CAAC,aAAa,CAAC;0EAC0B;AAG7B;IADlB,MAAM,CAAC,YAAY,CAAC;yEACyB;AAkBpC;IADT,aAAa,EAAE;+DAaf;AA5CQ,mCAAmC;IAD/C,UAAU,EAAE;GACA,mCAAmC,CAkV/C"}
|
package/lib/browser/ai-configuration/categories/prompt-snippets-configuration-category.spec.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
// *****************************************************************************
|
|
3
2
|
// Copyright (C) 2026 EclipseSource and others.
|
|
4
3
|
//
|
|
@@ -14,23 +13,22 @@
|
|
|
14
13
|
//
|
|
15
14
|
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
16
15
|
// *****************************************************************************
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
const prompt_snippets_configuration_category_1 = require("./prompt-snippets-configuration-category");
|
|
16
|
+
import { enableJSDOM } from '@theia/core/lib/browser/test/jsdom';
|
|
17
|
+
let disableJSDOM = enableJSDOM();
|
|
18
|
+
import { FrontendApplicationConfigProvider } from '@theia/core/lib/browser/frontend-application-config-provider';
|
|
19
|
+
FrontendApplicationConfigProvider.set({});
|
|
20
|
+
import { expect } from 'chai';
|
|
21
|
+
import { createRoot } from '@theia/core/shared/react-dom/client';
|
|
22
|
+
import { flushSync } from '@theia/core/shared/react-dom';
|
|
23
|
+
import { GENERIC_CAPABILITIES_AGENT_DELEGATION_PROMPT_ID } from '@theia/ai-core/lib/common';
|
|
24
|
+
import { AiConfigurationCategoryId } from '@theia/ai-core-ui/lib/browser/ai-configuration/ai-configuration-category';
|
|
25
|
+
import { PromptSnippetsConfiguration, PromptSnippetsConfigurationCategory } from './prompt-snippets-configuration-category.js';
|
|
28
26
|
disableJSDOM();
|
|
29
27
|
describe('PromptSnippetsConfigurationCategory', () => {
|
|
30
|
-
before(() => disableJSDOM =
|
|
28
|
+
before(() => disableJSDOM = enableJSDOM());
|
|
31
29
|
after(() => disableJSDOM());
|
|
32
30
|
function loadEntries({ fragments = {}, variantSets = {}, agentTemplates = {} }) {
|
|
33
|
-
const category = new
|
|
31
|
+
const category = new PromptSnippetsConfigurationCategory();
|
|
34
32
|
const withIds = new Map(Object.entries(fragments).map(([id, list]) => [id, list.map(fragment => ({ id, template: '', ...fragment }))]));
|
|
35
33
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
36
34
|
category.promptService = {
|
|
@@ -52,9 +50,9 @@ describe('PromptSnippetsConfigurationCategory', () => {
|
|
|
52
50
|
return category.loadEntries();
|
|
53
51
|
}
|
|
54
52
|
it('declares the prompt snippets single-page metadata', () => {
|
|
55
|
-
const category = new
|
|
56
|
-
|
|
57
|
-
|
|
53
|
+
const category = new PromptSnippetsConfigurationCategory();
|
|
54
|
+
expect(category.id).to.equal(AiConfigurationCategoryId.PROMPT_SNIPPETS);
|
|
55
|
+
expect(category.kind).to.equal('single-page');
|
|
58
56
|
});
|
|
59
57
|
it('groups a fragment referenced as a capability under capabilities, and records the agents using it', () => {
|
|
60
58
|
const entries = loadEntries({
|
|
@@ -62,33 +60,33 @@ describe('PromptSnippetsConfigurationCategory', () => {
|
|
|
62
60
|
agentTemplates: { coder: 'do work {{capability:github default on}}', architect: 'plan {{capability:github}}' }
|
|
63
61
|
});
|
|
64
62
|
const github = entries.find(entry => entry.id === 'github');
|
|
65
|
-
|
|
66
|
-
|
|
63
|
+
expect(github?.kind).to.equal('capability');
|
|
64
|
+
expect(github?.agentIds).to.deep.equal(['coder', 'architect']);
|
|
67
65
|
});
|
|
68
66
|
it('groups the fixed generic capability ids as generic, even when an agent references one as a capability', () => {
|
|
69
67
|
const entries = loadEntries({
|
|
70
|
-
fragments: { [
|
|
71
|
-
agentTemplates: { coder: `x {{capability:${
|
|
68
|
+
fragments: { [GENERIC_CAPABILITIES_AGENT_DELEGATION_PROMPT_ID]: [{}] },
|
|
69
|
+
agentTemplates: { coder: `x {{capability:${GENERIC_CAPABILITIES_AGENT_DELEGATION_PROMPT_ID}}}` }
|
|
72
70
|
});
|
|
73
|
-
|
|
71
|
+
expect(entries.find(entry => entry.id === GENERIC_CAPABILITIES_AGENT_DELEGATION_PROMPT_ID)?.kind).to.equal('generic-capability');
|
|
74
72
|
});
|
|
75
73
|
it('treats declared frontmatter as a capability even when no agent references it yet', () => {
|
|
76
74
|
const entries = loadEntries({ fragments: { 'shell-execution': [{ name: 'Shell Execution' }] } });
|
|
77
|
-
|
|
75
|
+
expect(entries.find(entry => entry.id === 'shell-execution')?.kind).to.equal('capability');
|
|
78
76
|
});
|
|
79
77
|
it('groups a plain fragment without frontmatter as a snippet', () => {
|
|
80
78
|
const entries = loadEntries({ fragments: { 'project-info': [{ customizationId: 'workspace', priority: 1 }] } });
|
|
81
79
|
const snippet = entries.find(entry => entry.id === 'project-info');
|
|
82
|
-
|
|
80
|
+
expect(snippet?.kind).to.equal('snippet');
|
|
83
81
|
// Only a workspace file backs it, so resetting has nothing to fall back to: the row offers Remove.
|
|
84
|
-
|
|
85
|
-
|
|
82
|
+
expect(snippet?.customized).to.equal(true);
|
|
83
|
+
expect(snippet?.hasBuiltIn).to.equal(false);
|
|
86
84
|
});
|
|
87
85
|
it('reports a customized built-in as customized while keeping its built-in fallback', () => {
|
|
88
86
|
const entries = loadEntries({ fragments: { github: [{ customizationId: 'user', priority: 1, name: 'GitHub' }, { name: 'GitHub' }] } });
|
|
89
87
|
const github = entries.find(entry => entry.id === 'github');
|
|
90
|
-
|
|
91
|
-
|
|
88
|
+
expect(github?.customized).to.equal(true);
|
|
89
|
+
expect(github?.hasBuiltIn).to.equal(true);
|
|
92
90
|
});
|
|
93
91
|
it('excludes what other pages own: variant sets and their variants, slash commands, and generated MCP tool lists', () => {
|
|
94
92
|
const entries = loadEntries({
|
|
@@ -103,50 +101,50 @@ describe('PromptSnippetsConfigurationCategory', () => {
|
|
|
103
101
|
},
|
|
104
102
|
variantSets: { 'coder-system': ['coder-system-edit'] }
|
|
105
103
|
});
|
|
106
|
-
|
|
104
|
+
expect(entries.map(entry => entry.id)).to.deep.equal(['project-info']);
|
|
107
105
|
});
|
|
108
106
|
it('counts the agents using a fragment in its pills, after the customization state', () => {
|
|
109
|
-
const category = new
|
|
107
|
+
const category = new PromptSnippetsConfigurationCategory();
|
|
110
108
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
111
109
|
category.availableAgents = [{ id: 'coder', name: 'Coder' }, { id: 'architect', name: 'Architect' }];
|
|
112
110
|
const build = (agentIds, customized) =>
|
|
113
111
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
114
112
|
category.buildRow({ id: 'github', kind: 'capability', agentIds, customized, hasBuiltIn: true }, { scope: 'user', navigate: () => { }, update: () => { } }, () => { });
|
|
115
|
-
|
|
116
|
-
|
|
113
|
+
expect(build(['coder'], false).pills).to.deep.equal(['1 agent']);
|
|
114
|
+
expect(build(['coder', 'architect'], false).pills).to.deep.equal(['2 agents']);
|
|
117
115
|
// The customization state leads, so it reads before the agent count and the actions.
|
|
118
|
-
|
|
116
|
+
expect(build(['coder'], true).pills).to.deep.equal(['Customized', '1 agent']);
|
|
119
117
|
});
|
|
120
118
|
it('offers its actions in the row header, whether or not the row is expanded', () => {
|
|
121
|
-
const category = new
|
|
119
|
+
const category = new PromptSnippetsConfigurationCategory();
|
|
122
120
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
123
121
|
category.availableAgents = [];
|
|
124
122
|
const build = (customized, hasBuiltIn) =>
|
|
125
123
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
126
124
|
category.buildRow({ id: 'github', kind: 'capability', agentIds: [], customized, hasBuiltIn }, { scope: 'user', navigate: () => { }, update: () => { } }, () => { });
|
|
127
|
-
|
|
128
|
-
|
|
125
|
+
expect(build(false, true).actions).to.not.equal(undefined);
|
|
126
|
+
expect(build(true, false).actions).to.not.equal(undefined);
|
|
129
127
|
});
|
|
130
128
|
it('indexes every entry for search under one row-id scheme, so a deep link only needs the fragment id', () => {
|
|
131
|
-
const category = new
|
|
129
|
+
const category = new PromptSnippetsConfigurationCategory();
|
|
132
130
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
133
131
|
category.entries = [
|
|
134
132
|
{ id: 'project-info', kind: 'snippet', agentIds: [], customized: false, hasBuiltIn: true },
|
|
135
133
|
{ id: 'github', kind: 'capability', name: 'GitHub', agentIds: ['coder'], customized: false, hasBuiltIn: true },
|
|
136
|
-
{ id:
|
|
134
|
+
{ id: GENERIC_CAPABILITIES_AGENT_DELEGATION_PROMPT_ID, kind: 'generic-capability', agentIds: [], customized: false, hasBuiltIn: true }
|
|
137
135
|
];
|
|
138
136
|
const items = category.getSearchItems();
|
|
139
|
-
|
|
137
|
+
expect(items.map(item => item.target.highlight?.rowId)).to.deep.equal([
|
|
140
138
|
'fragment:project-info',
|
|
141
139
|
'fragment:github',
|
|
142
|
-
`fragment:${
|
|
140
|
+
`fragment:${GENERIC_CAPABILITIES_AGENT_DELEGATION_PROMPT_ID}`
|
|
143
141
|
]);
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
142
|
+
expect(items.map(item => item.label)).to.deep.equal(['project-info', 'GitHub', GENERIC_CAPABILITIES_AGENT_DELEGATION_PROMPT_ID]);
|
|
143
|
+
expect(new Set(items.map(item => item.typeLabel)).size).to.equal(3);
|
|
144
|
+
expect(items.every(item => item.target.categoryId === AiConfigurationCategoryId.PROMPT_SNIPPETS)).to.equal(true);
|
|
147
145
|
});
|
|
148
146
|
it('anchors each rendered row with the id the search item and the agent capability link navigate to', () => {
|
|
149
|
-
const category = new
|
|
147
|
+
const category = new PromptSnippetsConfigurationCategory();
|
|
150
148
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
151
149
|
category.availableAgents = [];
|
|
152
150
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -159,22 +157,22 @@ describe('PromptSnippetsConfigurationCategory', () => {
|
|
|
159
157
|
category.promptService = { getAllPromptFragments: () => new Map() };
|
|
160
158
|
const container = document.createElement('div');
|
|
161
159
|
document.body.appendChild(container);
|
|
162
|
-
const root =
|
|
160
|
+
const root = createRoot(container);
|
|
163
161
|
try {
|
|
164
|
-
|
|
162
|
+
flushSync(() => root.render(category.renderPage({ scope: 'user', navigate: () => { }, update: () => { } })));
|
|
165
163
|
const anchored = Array.from(container.querySelectorAll('[data-ai-config-row-id]'))
|
|
166
164
|
.map(element => element.getAttribute('data-ai-config-row-id'));
|
|
167
165
|
// Without the anchor the scroll-and-flash silently does nothing when navigated to from an agent.
|
|
168
|
-
|
|
169
|
-
|
|
166
|
+
expect(anchored).to.include(PromptSnippetsConfiguration.selectionFor('github').highlight.rowId);
|
|
167
|
+
expect(anchored).to.include(PromptSnippetsConfiguration.selectionFor('project-info').highlight.rowId);
|
|
170
168
|
}
|
|
171
169
|
finally {
|
|
172
|
-
|
|
170
|
+
flushSync(() => root.unmount());
|
|
173
171
|
container.remove();
|
|
174
172
|
}
|
|
175
173
|
});
|
|
176
174
|
it('offers the page-level reset whenever a customized fragment has a built-in to fall back to', () => {
|
|
177
|
-
const category = new
|
|
175
|
+
const category = new PromptSnippetsConfigurationCategory();
|
|
178
176
|
const withFragments = (fragments) => {
|
|
179
177
|
const map = new Map(Object.entries(fragments).map(([id, list]) => [id, list.map(f => ({ id, template: '', ...f }))]));
|
|
180
178
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -183,17 +181,17 @@ describe('PromptSnippetsConfigurationCategory', () => {
|
|
|
183
181
|
return category.hasResettableCustomizations();
|
|
184
182
|
};
|
|
185
183
|
// A customized built-in: resetting reverts it.
|
|
186
|
-
|
|
184
|
+
expect(withFragments({ github: [{ customizationId: 'user', priority: 1 }, {}] })).to.equal(true);
|
|
187
185
|
// Also true for a prompt variant the page itself does not list, since the reset covers those too.
|
|
188
|
-
|
|
186
|
+
expect(withFragments({ 'coder-system-agent-mode': [{ customizationId: 'user', priority: 1 }, {}] })).to.equal(true);
|
|
189
187
|
// A user-authored snippet has no built-in, so a reset would do nothing to it.
|
|
190
|
-
|
|
191
|
-
|
|
188
|
+
expect(withFragments({ 'project-info': [{ customizationId: 'workspace', priority: 1 }] })).to.equal(false);
|
|
189
|
+
expect(withFragments({ github: [{}] })).to.equal(false);
|
|
192
190
|
});
|
|
193
191
|
it('builds the same row id the agent capability deep link navigates to', () => {
|
|
194
|
-
const selection =
|
|
195
|
-
|
|
196
|
-
|
|
192
|
+
const selection = PromptSnippetsConfiguration.selectionFor('github');
|
|
193
|
+
expect(selection.categoryId).to.equal(AiConfigurationCategoryId.PROMPT_SNIPPETS);
|
|
194
|
+
expect(selection.highlight?.rowId).to.equal('fragment:github');
|
|
197
195
|
});
|
|
198
196
|
});
|
|
199
197
|
//# sourceMappingURL=prompt-snippets-configuration-category.spec.js.map
|