@theia/ai-ide 1.77.0-next.99 → 1.78.0-next.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.js +10 -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 +1 -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
|
// *****************************************************************************
|
|
3
2
|
// Copyright (C) 2026 EclipseSource and others.
|
|
4
3
|
//
|
|
@@ -14,24 +13,20 @@
|
|
|
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
|
-
|
|
28
|
-
const react_dom_1 = require("@theia/core/shared/react-dom");
|
|
29
|
-
const client_1 = require("@theia/core/shared/react-dom/client");
|
|
30
|
-
const GenericCapabilitiesTreeModule = tslib_1.__importStar(require("@theia/ai-chat-ui/lib/browser/generic-capabilities-tree"));
|
|
31
|
-
const agent_capabilities_settings_1 = require("./agent-capabilities-settings");
|
|
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 { PreferenceUtils } from '@theia/core/lib/common/preferences/preference-provider';
|
|
22
|
+
import { Deferred } from '@theia/core/lib/common/promise-util';
|
|
23
|
+
import * as React from '@theia/core/shared/react';
|
|
24
|
+
import { flushSync } from '@theia/core/shared/react-dom';
|
|
25
|
+
import { createRoot } from '@theia/core/shared/react-dom/client';
|
|
26
|
+
import { AgentGenericCapabilitiesSettings, AgentServerToolsSettings } from './agent-capabilities-settings.js';
|
|
32
27
|
disableJSDOM();
|
|
33
28
|
describe('AgentServerToolsSettings', () => {
|
|
34
|
-
before(() => disableJSDOM =
|
|
29
|
+
before(() => disableJSDOM = enableJSDOM());
|
|
35
30
|
after(() => disableJSDOM());
|
|
36
31
|
const tools = [
|
|
37
32
|
{ id: 'web_search', name: 'Web Search', description: 'Search the web' },
|
|
@@ -48,8 +43,8 @@ describe('AgentServerToolsSettings', () => {
|
|
|
48
43
|
};
|
|
49
44
|
const container = document.createElement('div');
|
|
50
45
|
document.body.appendChild(container);
|
|
51
|
-
const root =
|
|
52
|
-
|
|
46
|
+
const root = createRoot(container);
|
|
47
|
+
flushSync(() => root.render(React.createElement(AgentServerToolsSettings, {
|
|
53
48
|
agentId: 'coder',
|
|
54
49
|
tools,
|
|
55
50
|
vendor: 'anthropic',
|
|
@@ -57,15 +52,15 @@ describe('AgentServerToolsSettings', () => {
|
|
|
57
52
|
aiSettingsService,
|
|
58
53
|
settingsRowService
|
|
59
54
|
})));
|
|
60
|
-
return { container, updates, resets, dispose: () => {
|
|
55
|
+
return { container, updates, resets, dispose: () => { flushSync(() => root.unmount()); container.remove(); } };
|
|
61
56
|
}
|
|
62
57
|
it('lists one toggle per tool the model offers, checked for the enabled ones', () => {
|
|
63
58
|
const { container, dispose } = render({ anthropic: ['web_search'] });
|
|
64
59
|
try {
|
|
65
60
|
const checkboxes = Array.from(container.querySelectorAll('input[type=checkbox]'));
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
61
|
+
expect(checkboxes.map(checkbox => checkbox.checked)).to.deep.equal([true, false]);
|
|
62
|
+
expect(container.textContent).to.include('Web Search');
|
|
63
|
+
expect(container.textContent).to.include('Search the web');
|
|
69
64
|
}
|
|
70
65
|
finally {
|
|
71
66
|
dispose();
|
|
@@ -75,7 +70,7 @@ describe('AgentServerToolsSettings', () => {
|
|
|
75
70
|
const { container, dispose } = render({ anthropic: ['web_search'] });
|
|
76
71
|
try {
|
|
77
72
|
const rows = Array.from(container.querySelectorAll('.ai-configuration-item-row'));
|
|
78
|
-
|
|
73
|
+
expect(rows.map(row => row.classList.contains('modified'))).to.deep.equal([true, false]);
|
|
79
74
|
}
|
|
80
75
|
finally {
|
|
81
76
|
dispose();
|
|
@@ -84,9 +79,9 @@ describe('AgentServerToolsSettings', () => {
|
|
|
84
79
|
it('stores the enabled ids under the model vendor when a tool is switched on', async () => {
|
|
85
80
|
const { container, updates, dispose } = render();
|
|
86
81
|
try {
|
|
87
|
-
|
|
82
|
+
flushSync(() => container.querySelectorAll('input[type=checkbox]')[0].click());
|
|
88
83
|
await new Promise(resolve => setTimeout(resolve, 0));
|
|
89
|
-
|
|
84
|
+
expect(updates).to.deep.equal([{ serverToolSelections: { anthropic: ['web_search'] } }]);
|
|
90
85
|
}
|
|
91
86
|
finally {
|
|
92
87
|
dispose();
|
|
@@ -95,10 +90,10 @@ describe('AgentServerToolsSettings', () => {
|
|
|
95
90
|
it('drops the vendor entry instead of storing an empty list when the last tool is switched off', async () => {
|
|
96
91
|
const { container, updates, dispose } = render({ anthropic: ['web_search'] });
|
|
97
92
|
try {
|
|
98
|
-
|
|
93
|
+
flushSync(() => container.querySelectorAll('input[type=checkbox]')[0].click());
|
|
99
94
|
await new Promise(resolve => setTimeout(resolve, 0));
|
|
100
95
|
// The whole setting goes when no vendor has a selection left, so no stale keys accumulate.
|
|
101
|
-
|
|
96
|
+
expect(updates).to.deep.equal([{ serverToolSelections: undefined }]);
|
|
102
97
|
}
|
|
103
98
|
finally {
|
|
104
99
|
dispose();
|
|
@@ -107,7 +102,7 @@ describe('AgentServerToolsSettings', () => {
|
|
|
107
102
|
it('offers a reset on the section header only while something is enabled, and leaves other vendors alone', async () => {
|
|
108
103
|
const nothingEnabled = render();
|
|
109
104
|
try {
|
|
110
|
-
|
|
105
|
+
expect(Boolean(nothingEnabled.container.querySelector('.ai-agent-section-header-action'))).to.equal(false);
|
|
111
106
|
}
|
|
112
107
|
finally {
|
|
113
108
|
nothingEnabled.dispose();
|
|
@@ -116,9 +111,9 @@ describe('AgentServerToolsSettings', () => {
|
|
|
116
111
|
try {
|
|
117
112
|
// On the header line, not in a row of its own above the list.
|
|
118
113
|
const reset = container.querySelector('.ai-agent-section-header .ai-agent-section-header-action');
|
|
119
|
-
|
|
114
|
+
flushSync(() => reset.click());
|
|
120
115
|
await new Promise(resolve => setTimeout(resolve, 0));
|
|
121
|
-
|
|
116
|
+
expect(updates).to.deep.equal([{ serverToolSelections: { openai: ['code_execution'] } }]);
|
|
122
117
|
}
|
|
123
118
|
finally {
|
|
124
119
|
dispose();
|
|
@@ -129,13 +124,13 @@ describe('AgentServerToolsSettings', () => {
|
|
|
129
124
|
try {
|
|
130
125
|
const gears = Array.from(container.querySelectorAll('.ai-configuration-item-row-actions'));
|
|
131
126
|
// Only the enabled row deviates from the default, so only it offers a reset.
|
|
132
|
-
|
|
127
|
+
expect(gears).to.have.lengthOf(1);
|
|
133
128
|
const gear = container.querySelector('.ai-settings-row-gear');
|
|
134
|
-
|
|
135
|
-
|
|
129
|
+
flushSync(() => gear.click());
|
|
130
|
+
expect(resets).to.have.lengthOf(1);
|
|
136
131
|
resets[0]();
|
|
137
132
|
await new Promise(resolve => setTimeout(resolve, 0));
|
|
138
|
-
|
|
133
|
+
expect(updates).to.deep.equal([{ serverToolSelections: undefined }]);
|
|
139
134
|
}
|
|
140
135
|
finally {
|
|
141
136
|
dispose();
|
|
@@ -144,9 +139,9 @@ describe('AgentServerToolsSettings', () => {
|
|
|
144
139
|
});
|
|
145
140
|
describe('AgentGenericCapabilitiesSettings', () => {
|
|
146
141
|
before(() => {
|
|
147
|
-
disableJSDOM =
|
|
142
|
+
disableJSDOM = enableJSDOM();
|
|
148
143
|
// The tree's root tooltips read the application name; the config lives on the fresh window.
|
|
149
|
-
|
|
144
|
+
FrontendApplicationConfigProvider.set({});
|
|
150
145
|
});
|
|
151
146
|
after(() => disableJSDOM());
|
|
152
147
|
const available = {
|
|
@@ -157,14 +152,14 @@ describe('AgentGenericCapabilitiesSettings', () => {
|
|
|
157
152
|
agentDelegation: [],
|
|
158
153
|
variables: []
|
|
159
154
|
};
|
|
160
|
-
function render(savedSelections, availableCapabilities, deferWrites = false) {
|
|
155
|
+
function render(savedSelections, availableCapabilities, deferWrites = false, capabilitiesTree) {
|
|
161
156
|
const updates = [];
|
|
162
157
|
let stored = savedSelections;
|
|
163
158
|
const writes = [];
|
|
164
159
|
const reads = [];
|
|
165
160
|
const aiSettingsService = {
|
|
166
161
|
getAgentSettings: async (agentId) => {
|
|
167
|
-
|
|
162
|
+
expect(agentId).to.equal('coder');
|
|
168
163
|
const deferred = reads.shift();
|
|
169
164
|
return { genericCapabilitySelections: deferred ? await deferred.promise : stored };
|
|
170
165
|
},
|
|
@@ -172,7 +167,7 @@ describe('AgentGenericCapabilitiesSettings', () => {
|
|
|
172
167
|
updates.push(settings);
|
|
173
168
|
const next = settings.genericCapabilitySelections;
|
|
174
169
|
// PreferenceServiceImpl skips a write if it equals the value currently stored, not a pending value.
|
|
175
|
-
if (
|
|
170
|
+
if (PreferenceUtils.deepEqual(stored, next)) {
|
|
176
171
|
return;
|
|
177
172
|
}
|
|
178
173
|
if (deferWrites) {
|
|
@@ -196,8 +191,8 @@ describe('AgentGenericCapabilitiesSettings', () => {
|
|
|
196
191
|
};
|
|
197
192
|
const container = document.createElement('div');
|
|
198
193
|
document.body.appendChild(container);
|
|
199
|
-
const root =
|
|
200
|
-
const reload = (saved) =>
|
|
194
|
+
const root = createRoot(container);
|
|
195
|
+
const reload = (saved) => flushSync(() => root.render(React.createElement(AgentGenericCapabilitiesSettings, {
|
|
201
196
|
agentId: 'coder',
|
|
202
197
|
savedSelections: saved,
|
|
203
198
|
availableCapabilities,
|
|
@@ -205,7 +200,8 @@ describe('AgentGenericCapabilitiesSettings', () => {
|
|
|
205
200
|
aiSettingsService,
|
|
206
201
|
settingsRowService: { openResetMenu: () => { } },
|
|
207
202
|
hoverService: { requestHover: () => { } },
|
|
208
|
-
onOpenPromptSnippet: () => { }
|
|
203
|
+
onOpenPromptSnippet: () => { },
|
|
204
|
+
capabilitiesTree
|
|
209
205
|
})));
|
|
210
206
|
reload(savedSelections);
|
|
211
207
|
return {
|
|
@@ -221,18 +217,18 @@ describe('AgentGenericCapabilitiesSettings', () => {
|
|
|
221
217
|
writes[index](error);
|
|
222
218
|
},
|
|
223
219
|
deferRead: () => {
|
|
224
|
-
const deferred = new
|
|
220
|
+
const deferred = new Deferred();
|
|
225
221
|
reads.push(deferred);
|
|
226
222
|
return deferred;
|
|
227
223
|
},
|
|
228
|
-
dispose: () => {
|
|
224
|
+
dispose: () => { flushSync(() => root.unmount()); container.remove(); }
|
|
229
225
|
};
|
|
230
226
|
}
|
|
231
227
|
function openEditorAndExpand(container, rootName) {
|
|
232
|
-
|
|
228
|
+
flushSync(() => container.querySelector('button[aria-label="Edit generic capabilities"]').click());
|
|
233
229
|
const header = Array.from(container.querySelectorAll('.theia-GenericCapabilities-TreeNodeHeader'))
|
|
234
230
|
.find(candidate => candidate.textContent === rootName);
|
|
235
|
-
|
|
231
|
+
flushSync(() => header.click());
|
|
236
232
|
}
|
|
237
233
|
function item(container, name) {
|
|
238
234
|
return Array.from(container.querySelectorAll('.theia-GenericCapabilities-TreeItem')).find(candidate => candidate.textContent === name);
|
|
@@ -253,8 +249,8 @@ describe('AgentGenericCapabilitiesSettings', () => {
|
|
|
253
249
|
it('offers no editor when there is nothing to choose from', () => {
|
|
254
250
|
const { container, dispose } = render({ skills: ['skill-a'] }, undefined);
|
|
255
251
|
try {
|
|
256
|
-
|
|
257
|
-
|
|
252
|
+
expect(Boolean(container.querySelector('button[aria-label="Edit generic capabilities"]'))).to.equal(false);
|
|
253
|
+
expect(container.textContent).to.include('skill-a');
|
|
258
254
|
}
|
|
259
255
|
finally {
|
|
260
256
|
dispose();
|
|
@@ -264,15 +260,15 @@ describe('AgentGenericCapabilitiesSettings', () => {
|
|
|
264
260
|
const { container, updates, dispose } = render(undefined, available);
|
|
265
261
|
try {
|
|
266
262
|
openEditorAndExpand(container, 'Skills');
|
|
267
|
-
|
|
268
|
-
|
|
263
|
+
flushSync(() => item(container, 'skill-a').click());
|
|
264
|
+
flushSync(() => item(container, 'skill-b').click());
|
|
269
265
|
await new Promise(resolve => setTimeout(resolve, 0));
|
|
270
|
-
|
|
266
|
+
expect(updates).to.deep.equal([
|
|
271
267
|
{ genericCapabilitySelections: { skills: ['skill-a'] } },
|
|
272
268
|
{ genericCapabilitySelections: { skills: ['skill-a', 'skill-b'] } }
|
|
273
269
|
]);
|
|
274
270
|
// The summary row reflects the edit without waiting for the saved value to be reloaded.
|
|
275
|
-
|
|
271
|
+
expect(container.querySelector('.ai-configuration-item-list').textContent).to.include('skill-a, skill-b');
|
|
276
272
|
}
|
|
277
273
|
finally {
|
|
278
274
|
dispose();
|
|
@@ -282,15 +278,15 @@ describe('AgentGenericCapabilitiesSettings', () => {
|
|
|
282
278
|
const { container, updates, reload, dispose } = render(undefined, available);
|
|
283
279
|
try {
|
|
284
280
|
openEditorAndExpand(container, 'Skills');
|
|
285
|
-
|
|
286
|
-
|
|
281
|
+
flushSync(() => item(container, 'skill-a').click());
|
|
282
|
+
flushSync(() => item(container, 'skill-b').click());
|
|
287
283
|
await new Promise(resolve => setTimeout(resolve, 0));
|
|
288
284
|
reload({ skills: ['skill-a'] });
|
|
289
285
|
await new Promise(resolve => setTimeout(resolve, 0));
|
|
290
|
-
|
|
291
|
-
|
|
286
|
+
expect(item(container, 'skill-b').querySelector('input').checked).to.equal(true);
|
|
287
|
+
flushSync(() => item(container, 'skill-a').click());
|
|
292
288
|
await new Promise(resolve => setTimeout(resolve, 0));
|
|
293
|
-
|
|
289
|
+
expect(updates[2]).to.deep.equal({ genericCapabilitySelections: { skills: ['skill-b'] } });
|
|
294
290
|
}
|
|
295
291
|
finally {
|
|
296
292
|
dispose();
|
|
@@ -300,17 +296,17 @@ describe('AgentGenericCapabilitiesSettings', () => {
|
|
|
300
296
|
const { container, updates, reload, dispose } = render(undefined, available);
|
|
301
297
|
try {
|
|
302
298
|
openEditorAndExpand(container, 'Skills');
|
|
303
|
-
|
|
304
|
-
|
|
299
|
+
flushSync(() => item(container, 'skill-a').click());
|
|
300
|
+
flushSync(() => item(container, 'skill-b').click());
|
|
305
301
|
await new Promise(resolve => setTimeout(resolve, 0));
|
|
306
302
|
reload({ skills: ['skill-a', 'skill-b'] });
|
|
307
303
|
await new Promise(resolve => setTimeout(resolve, 0));
|
|
308
304
|
reload({ skills: ['skill-a'] });
|
|
309
305
|
await new Promise(resolve => setTimeout(resolve, 0));
|
|
310
|
-
|
|
311
|
-
|
|
306
|
+
expect(item(container, 'skill-b').querySelector('input').checked).to.equal(true);
|
|
307
|
+
flushSync(() => item(container, 'skill-a').click());
|
|
312
308
|
await new Promise(resolve => setTimeout(resolve, 0));
|
|
313
|
-
|
|
309
|
+
expect(updates[2]).to.deep.equal({ genericCapabilitySelections: { skills: ['skill-b'] } });
|
|
314
310
|
}
|
|
315
311
|
finally {
|
|
316
312
|
dispose();
|
|
@@ -320,15 +316,15 @@ describe('AgentGenericCapabilitiesSettings', () => {
|
|
|
320
316
|
const { container, updates, reload, dispose } = render(undefined, available);
|
|
321
317
|
try {
|
|
322
318
|
openEditorAndExpand(container, 'Skills');
|
|
323
|
-
|
|
324
|
-
|
|
319
|
+
flushSync(() => item(container, 'skill-a').click());
|
|
320
|
+
flushSync(() => container.querySelector('button[aria-label="Reset all generic capability selections"]').click());
|
|
325
321
|
await new Promise(resolve => setTimeout(resolve, 0));
|
|
326
322
|
reload({ skills: ['skill-a'] });
|
|
327
323
|
await new Promise(resolve => setTimeout(resolve, 0));
|
|
328
|
-
|
|
329
|
-
|
|
324
|
+
expect(item(container, 'skill-a').querySelector('input').checked).to.equal(false);
|
|
325
|
+
flushSync(() => item(container, 'skill-b').click());
|
|
330
326
|
await new Promise(resolve => setTimeout(resolve, 0));
|
|
331
|
-
|
|
327
|
+
expect(updates[2]).to.deep.equal({ genericCapabilitySelections: { skills: ['skill-b'] } });
|
|
332
328
|
}
|
|
333
329
|
finally {
|
|
334
330
|
dispose();
|
|
@@ -338,20 +334,20 @@ describe('AgentGenericCapabilitiesSettings', () => {
|
|
|
338
334
|
const { container, updates, finishWrite, getStored, dispose } = render(undefined, available, true);
|
|
339
335
|
try {
|
|
340
336
|
openEditorAndExpand(container, 'Skills');
|
|
341
|
-
|
|
342
|
-
|
|
337
|
+
flushSync(() => item(container, 'skill-a').click());
|
|
338
|
+
flushSync(() => item(container, 'skill-b').click());
|
|
343
339
|
await new Promise(resolve => setTimeout(resolve, 0));
|
|
344
|
-
|
|
345
|
-
|
|
340
|
+
expect(updates).to.have.lengthOf(1);
|
|
341
|
+
expect(item(container, 'skill-b').querySelector('input').checked).to.equal(true);
|
|
346
342
|
await finishWrite(0);
|
|
347
343
|
await new Promise(resolve => setTimeout(resolve, 0));
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
344
|
+
expect(updates).to.have.lengthOf(2);
|
|
345
|
+
expect(getStored()).to.deep.equal({ skills: ['skill-a'] });
|
|
346
|
+
expect(item(container, 'skill-b').querySelector('input').checked).to.equal(true);
|
|
351
347
|
await finishWrite(1);
|
|
352
348
|
await new Promise(resolve => setTimeout(resolve, 0));
|
|
353
|
-
|
|
354
|
-
|
|
349
|
+
expect(getStored()).to.deep.equal({ skills: ['skill-a', 'skill-b'] });
|
|
350
|
+
expect(item(container, 'skill-b').querySelector('input').checked).to.equal(true);
|
|
355
351
|
}
|
|
356
352
|
finally {
|
|
357
353
|
dispose();
|
|
@@ -361,21 +357,21 @@ describe('AgentGenericCapabilitiesSettings', () => {
|
|
|
361
357
|
const { container, updates, finishWrite, getStored, dispose } = render({ skills: ['skill-a'] }, available, true);
|
|
362
358
|
try {
|
|
363
359
|
openEditorAndExpand(container, 'Skills');
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
360
|
+
flushSync(() => item(container, 'skill-b').click());
|
|
361
|
+
flushSync(() => item(container, 'skill-b').click());
|
|
362
|
+
expect(item(container, 'skill-b').querySelector('input').checked).to.equal(false);
|
|
367
363
|
await new Promise(resolve => setTimeout(resolve, 0));
|
|
368
|
-
|
|
364
|
+
expect(updates).to.have.lengthOf(1);
|
|
369
365
|
await finishWrite(0);
|
|
370
366
|
await new Promise(resolve => setTimeout(resolve, 0));
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
367
|
+
expect(getStored()).to.deep.equal({ skills: ['skill-a', 'skill-b'] });
|
|
368
|
+
expect(updates).to.have.lengthOf(2);
|
|
369
|
+
expect(item(container, 'skill-b').querySelector('input').checked).to.equal(false);
|
|
374
370
|
await finishWrite(1);
|
|
375
371
|
await new Promise(resolve => setTimeout(resolve, 0));
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
372
|
+
expect(getStored()).to.deep.equal({ skills: ['skill-a'] });
|
|
373
|
+
expect(item(container, 'skill-a').querySelector('input').checked).to.equal(true);
|
|
374
|
+
expect(item(container, 'skill-b').querySelector('input').checked).to.equal(false);
|
|
379
375
|
}
|
|
380
376
|
finally {
|
|
381
377
|
dispose();
|
|
@@ -383,47 +379,46 @@ describe('AgentGenericCapabilitiesSettings', () => {
|
|
|
383
379
|
});
|
|
384
380
|
it('preserves a rejected save promise without poisoning later queued writes', async () => {
|
|
385
381
|
let change;
|
|
386
|
-
const tree =
|
|
382
|
+
const tree = (props) => {
|
|
387
383
|
change = props.onGenericCapabilityChange;
|
|
388
384
|
return React.createElement('div');
|
|
389
|
-
}
|
|
390
|
-
const { container, updates, rejectWrite, finishWrite, getStored, dispose } = render(undefined, available, true);
|
|
385
|
+
};
|
|
386
|
+
const { container, updates, rejectWrite, finishWrite, getStored, dispose } = render(undefined, available, true, tree);
|
|
391
387
|
try {
|
|
392
|
-
|
|
388
|
+
flushSync(() => container.querySelector('button[aria-label="Edit generic capabilities"]').click());
|
|
393
389
|
let failed;
|
|
394
390
|
let queued;
|
|
395
|
-
|
|
391
|
+
flushSync(() => {
|
|
396
392
|
failed = change('skills', ['skill-a']);
|
|
397
393
|
queued = change('skills', ['skill-a', 'skill-b']);
|
|
398
394
|
});
|
|
399
395
|
const failure = new Error('Write failed');
|
|
400
|
-
const rejection = failed.then(() =>
|
|
396
|
+
const rejection = failed.then(() => expect.fail('Expected the save to reject'), error => expect(error).to.equal(failure));
|
|
401
397
|
const queuedResult = queued.then(() => undefined, error => error);
|
|
402
398
|
await rejectWrite(0, failure);
|
|
403
399
|
await rejection;
|
|
404
400
|
await new Promise(resolve => setTimeout(resolve, 0));
|
|
405
|
-
|
|
401
|
+
expect(updates).to.have.lengthOf(2);
|
|
406
402
|
await finishWrite(1);
|
|
407
|
-
|
|
408
|
-
|
|
403
|
+
expect(await queuedResult).to.equal(undefined);
|
|
404
|
+
expect(getStored()).to.deep.equal({ skills: ['skill-a', 'skill-b'] });
|
|
409
405
|
await new Promise(resolve => setTimeout(resolve, 0));
|
|
410
|
-
|
|
406
|
+
expect(container.querySelector('.ai-configuration-item-list').textContent).to.include('skill-a, skill-b');
|
|
411
407
|
}
|
|
412
408
|
finally {
|
|
413
409
|
dispose();
|
|
414
|
-
tree.restore();
|
|
415
410
|
}
|
|
416
411
|
});
|
|
417
412
|
it('rolls back a swallowed write failure after its change event and resolving promise', async () => {
|
|
418
413
|
const { container, finishWrite, dispose } = render({ skills: ['skill-a'] }, available, true);
|
|
419
414
|
try {
|
|
420
415
|
openEditorAndExpand(container, 'Skills');
|
|
421
|
-
|
|
422
|
-
|
|
416
|
+
flushSync(() => item(container, 'skill-b').click());
|
|
417
|
+
expect(item(container, 'skill-b').querySelector('input').checked).to.equal(true);
|
|
423
418
|
await finishWrite(0, false);
|
|
424
419
|
await waitUntil(() => !isChecked(container, 'skill-b'));
|
|
425
|
-
|
|
426
|
-
|
|
420
|
+
expect(item(container, 'skill-b').querySelector('input').checked).to.equal(false);
|
|
421
|
+
expect(item(container, 'skill-a').querySelector('input').checked).to.equal(true);
|
|
427
422
|
}
|
|
428
423
|
finally {
|
|
429
424
|
dispose();
|
|
@@ -433,18 +428,18 @@ describe('AgentGenericCapabilitiesSettings', () => {
|
|
|
433
428
|
const { container, finishWrite, updates, dispose } = render(undefined, available, true);
|
|
434
429
|
try {
|
|
435
430
|
openEditorAndExpand(container, 'Skills');
|
|
436
|
-
|
|
437
|
-
|
|
431
|
+
flushSync(() => item(container, 'skill-a').click());
|
|
432
|
+
flushSync(() => item(container, 'skill-b').click());
|
|
438
433
|
await finishWrite(0);
|
|
439
434
|
await new Promise(resolve => setTimeout(resolve, 0));
|
|
440
|
-
|
|
435
|
+
expect(item(container, 'skill-b').querySelector('input').checked).to.equal(true);
|
|
441
436
|
await finishWrite(1, false);
|
|
442
437
|
await waitUntil(() => !isChecked(container, 'skill-b'));
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
438
|
+
expect(item(container, 'skill-a').querySelector('input').checked).to.equal(true);
|
|
439
|
+
expect(item(container, 'skill-b').querySelector('input').checked).to.equal(false);
|
|
440
|
+
flushSync(() => item(container, 'skill-a').click());
|
|
446
441
|
await new Promise(resolve => setTimeout(resolve, 0));
|
|
447
|
-
|
|
442
|
+
expect(updates[2]).to.deep.equal({ genericCapabilitySelections: undefined });
|
|
448
443
|
await finishWrite(2);
|
|
449
444
|
}
|
|
450
445
|
finally {
|
|
@@ -455,21 +450,21 @@ describe('AgentGenericCapabilitiesSettings', () => {
|
|
|
455
450
|
const { container, reload, setStored, dispose } = render({ skills: ['skill-a'] }, available);
|
|
456
451
|
try {
|
|
457
452
|
openEditorAndExpand(container, 'Skills');
|
|
458
|
-
|
|
453
|
+
flushSync(() => item(container, 'skill-b').click());
|
|
459
454
|
await new Promise(resolve => setTimeout(resolve, 0));
|
|
460
455
|
setStored({ skills: ['skill-b'] });
|
|
461
456
|
reload({ skills: ['skill-b'] });
|
|
462
457
|
await waitUntil(() => !isChecked(container, 'skill-a'));
|
|
463
|
-
|
|
458
|
+
expect(item(container, 'skill-a').querySelector('input').checked).to.equal(false);
|
|
464
459
|
setStored({ skills: ['skill-a'] });
|
|
465
460
|
reload({ skills: ['skill-a'] });
|
|
466
461
|
await waitUntil(() => isChecked(container, 'skill-a') && !isChecked(container, 'skill-b'));
|
|
467
|
-
|
|
468
|
-
|
|
462
|
+
expect(item(container, 'skill-a').querySelector('input').checked).to.equal(true);
|
|
463
|
+
expect(item(container, 'skill-b').querySelector('input').checked).to.equal(false);
|
|
469
464
|
setStored(undefined);
|
|
470
465
|
reload(undefined);
|
|
471
466
|
await waitUntil(() => !isChecked(container, 'skill-a'));
|
|
472
|
-
|
|
467
|
+
expect(item(container, 'skill-a').querySelector('input').checked).to.equal(false);
|
|
473
468
|
}
|
|
474
469
|
finally {
|
|
475
470
|
dispose();
|
|
@@ -479,12 +474,12 @@ describe('AgentGenericCapabilitiesSettings', () => {
|
|
|
479
474
|
const { container, reload, setStored, dispose } = render(undefined, available);
|
|
480
475
|
try {
|
|
481
476
|
openEditorAndExpand(container, 'Skills');
|
|
482
|
-
|
|
477
|
+
flushSync(() => item(container, 'skill-a').click());
|
|
483
478
|
await new Promise(resolve => setTimeout(resolve, 0));
|
|
484
479
|
setStored(undefined);
|
|
485
480
|
reload(undefined);
|
|
486
481
|
await waitUntil(() => !isChecked(container, 'skill-a'));
|
|
487
|
-
|
|
482
|
+
expect(item(container, 'skill-a').querySelector('input').checked).to.equal(false);
|
|
488
483
|
}
|
|
489
484
|
finally {
|
|
490
485
|
dispose();
|
|
@@ -494,18 +489,18 @@ describe('AgentGenericCapabilitiesSettings', () => {
|
|
|
494
489
|
const { container, reload, setStored, finishWrite, dispose } = render(undefined, available, true);
|
|
495
490
|
try {
|
|
496
491
|
openEditorAndExpand(container, 'Skills');
|
|
497
|
-
|
|
492
|
+
flushSync(() => item(container, 'skill-a').click());
|
|
498
493
|
await finishWrite(0);
|
|
499
494
|
await new Promise(resolve => setTimeout(resolve, 0));
|
|
500
|
-
|
|
495
|
+
flushSync(() => item(container, 'skill-b').click());
|
|
501
496
|
setStored(undefined);
|
|
502
497
|
reload({});
|
|
503
498
|
await new Promise(resolve => setTimeout(resolve, 0));
|
|
504
|
-
|
|
499
|
+
expect(item(container, 'skill-b').querySelector('input').checked).to.equal(true);
|
|
505
500
|
await finishWrite(1, false);
|
|
506
501
|
await waitUntil(() => !isChecked(container, 'skill-a') && !isChecked(container, 'skill-b'));
|
|
507
|
-
|
|
508
|
-
|
|
502
|
+
expect(item(container, 'skill-a').querySelector('input').checked).to.equal(false);
|
|
503
|
+
expect(item(container, 'skill-b').querySelector('input').checked).to.equal(false);
|
|
509
504
|
}
|
|
510
505
|
finally {
|
|
511
506
|
dispose();
|
|
@@ -518,14 +513,14 @@ describe('AgentGenericCapabilitiesSettings', () => {
|
|
|
518
513
|
await new Promise(resolve => setTimeout(resolve, 0));
|
|
519
514
|
const staleRead = deferRead();
|
|
520
515
|
reload({ skills: ['skill-a'] });
|
|
521
|
-
|
|
516
|
+
flushSync(() => item(container, 'skill-b').click());
|
|
522
517
|
await new Promise(resolve => setTimeout(resolve, 0));
|
|
523
518
|
staleRead.resolve({ skills: ['skill-a'] });
|
|
524
519
|
await new Promise(resolve => setTimeout(resolve, 0));
|
|
525
|
-
|
|
526
|
-
|
|
520
|
+
expect(item(container, 'skill-b').querySelector('input').checked).to.equal(true);
|
|
521
|
+
flushSync(() => item(container, 'skill-a').click());
|
|
527
522
|
await new Promise(resolve => setTimeout(resolve, 0));
|
|
528
|
-
|
|
523
|
+
expect(updates[1]).to.deep.equal({ genericCapabilitySelections: { skills: ['skill-b'] } });
|
|
529
524
|
}
|
|
530
525
|
finally {
|
|
531
526
|
dispose();
|
|
@@ -535,17 +530,17 @@ describe('AgentGenericCapabilitiesSettings', () => {
|
|
|
535
530
|
const { container, finishWrite, deferRead, dispose } = render(undefined, available, true);
|
|
536
531
|
try {
|
|
537
532
|
openEditorAndExpand(container, 'Skills');
|
|
538
|
-
|
|
533
|
+
flushSync(() => item(container, 'skill-a').click());
|
|
539
534
|
const staleRead = deferRead();
|
|
540
535
|
await finishWrite(0);
|
|
541
536
|
await new Promise(resolve => setTimeout(resolve, 0));
|
|
542
|
-
|
|
537
|
+
flushSync(() => item(container, 'skill-b').click());
|
|
543
538
|
staleRead.resolve({ skills: ['skill-a'] });
|
|
544
539
|
await new Promise(resolve => setTimeout(resolve, 0));
|
|
545
|
-
|
|
540
|
+
expect(item(container, 'skill-b').querySelector('input').checked).to.equal(true);
|
|
546
541
|
await finishWrite(1);
|
|
547
542
|
await new Promise(resolve => setTimeout(resolve, 0));
|
|
548
|
-
|
|
543
|
+
expect(item(container, 'skill-b').querySelector('input').checked).to.equal(true);
|
|
549
544
|
}
|
|
550
545
|
finally {
|
|
551
546
|
dispose();
|
|
@@ -563,8 +558,8 @@ describe('AgentGenericCapabilitiesSettings', () => {
|
|
|
563
558
|
await new Promise(resolve => setTimeout(resolve, 0));
|
|
564
559
|
staleRead.resolve({ skills: ['skill-a'] });
|
|
565
560
|
await waitUntil(() => isChecked(container, 'skill-b'));
|
|
566
|
-
|
|
567
|
-
|
|
561
|
+
expect(item(container, 'skill-a').querySelector('input').checked).to.equal(false);
|
|
562
|
+
expect(item(container, 'skill-b').querySelector('input').checked).to.equal(true);
|
|
568
563
|
}
|
|
569
564
|
finally {
|
|
570
565
|
dispose();
|
|
@@ -576,13 +571,13 @@ describe('AgentGenericCapabilitiesSettings', () => {
|
|
|
576
571
|
openEditorAndExpand(container, 'Skills');
|
|
577
572
|
const functions = Array.from(container.querySelectorAll('.theia-GenericCapabilities-TreeNodeHeader'))
|
|
578
573
|
.find(candidate => candidate.textContent === 'Functions');
|
|
579
|
-
|
|
580
|
-
|
|
574
|
+
flushSync(() => functions.click());
|
|
575
|
+
flushSync(() => {
|
|
581
576
|
item(container, 'skill-a').click();
|
|
582
577
|
item(container, 'fn-a').click();
|
|
583
578
|
});
|
|
584
579
|
await new Promise(resolve => setTimeout(resolve, 0));
|
|
585
|
-
|
|
580
|
+
expect(updates[1]).to.deep.equal({ genericCapabilitySelections: { skills: ['skill-a'], functions: ['fn-a'] } });
|
|
586
581
|
}
|
|
587
582
|
finally {
|
|
588
583
|
dispose();
|
|
@@ -592,9 +587,9 @@ describe('AgentGenericCapabilitiesSettings', () => {
|
|
|
592
587
|
const { container, updates, dispose } = render({ skills: ['skill-a'] }, available);
|
|
593
588
|
try {
|
|
594
589
|
openEditorAndExpand(container, 'Skills');
|
|
595
|
-
|
|
590
|
+
flushSync(() => item(container, 'skill-a').click());
|
|
596
591
|
await new Promise(resolve => setTimeout(resolve, 0));
|
|
597
|
-
|
|
592
|
+
expect(updates).to.deep.equal([{ genericCapabilitySelections: undefined }]);
|
|
598
593
|
}
|
|
599
594
|
finally {
|
|
600
595
|
dispose();
|
|
@@ -606,10 +601,10 @@ describe('AgentGenericCapabilitiesSettings', () => {
|
|
|
606
601
|
openEditorAndExpand(container, 'Functions');
|
|
607
602
|
const used = item(container, 'fn-used');
|
|
608
603
|
const checkbox = used.querySelector('input[type=checkbox]');
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
604
|
+
expect(checkbox.checked).to.equal(true);
|
|
605
|
+
expect(checkbox.disabled).to.equal(true);
|
|
606
|
+
flushSync(() => used.click());
|
|
607
|
+
expect(updates).to.deep.equal([]);
|
|
613
608
|
}
|
|
614
609
|
finally {
|
|
615
610
|
dispose();
|