@theia/ai-ide 1.75.0-next.8 → 1.75.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/ai-allow-all-mode-chat-banner.js +2 -20
- package/lib/browser/ai-allow-all-mode-chat-banner.js.map +1 -1
- package/lib/browser/ai-configuration/agent-icon.d.ts +16 -0
- package/lib/browser/ai-configuration/agent-icon.d.ts.map +1 -0
- package/lib/browser/ai-configuration/agent-icon.js +38 -0
- package/lib/browser/ai-configuration/agent-icon.js.map +1 -0
- package/lib/browser/ai-configuration/ai-configuration-breadcrumbs-contribution.d.ts +36 -0
- package/lib/browser/ai-configuration/ai-configuration-breadcrumbs-contribution.d.ts.map +1 -0
- package/lib/browser/ai-configuration/ai-configuration-breadcrumbs-contribution.js +163 -0
- package/lib/browser/ai-configuration/ai-configuration-breadcrumbs-contribution.js.map +1 -0
- package/lib/browser/ai-configuration/ai-configuration-detail-widget.d.ts +50 -0
- package/lib/browser/ai-configuration/ai-configuration-detail-widget.d.ts.map +1 -0
- package/lib/browser/ai-configuration/ai-configuration-detail-widget.js +208 -0
- package/lib/browser/ai-configuration/ai-configuration-detail-widget.js.map +1 -0
- package/lib/browser/ai-configuration/ai-configuration-detail-widget.spec.d.ts +2 -0
- package/lib/browser/ai-configuration/ai-configuration-detail-widget.spec.d.ts.map +1 -0
- package/lib/browser/ai-configuration/ai-configuration-detail-widget.spec.js +139 -0
- package/lib/browser/ai-configuration/ai-configuration-detail-widget.spec.js.map +1 -0
- package/lib/browser/ai-configuration/ai-configuration-label-provider-contribution.d.ts +13 -0
- package/lib/browser/ai-configuration/ai-configuration-label-provider-contribution.d.ts.map +1 -0
- package/lib/browser/ai-configuration/ai-configuration-label-provider-contribution.js +48 -0
- package/lib/browser/ai-configuration/ai-configuration-label-provider-contribution.js.map +1 -0
- package/lib/browser/ai-configuration/ai-configuration-open-preference-renderer.d.ts +22 -0
- package/lib/browser/ai-configuration/ai-configuration-open-preference-renderer.d.ts.map +1 -0
- package/lib/browser/ai-configuration/ai-configuration-open-preference-renderer.js +72 -0
- package/lib/browser/ai-configuration/ai-configuration-open-preference-renderer.js.map +1 -0
- package/lib/browser/ai-configuration/ai-configuration-preference-ownership.spec.d.ts +2 -0
- package/lib/browser/ai-configuration/ai-configuration-preference-ownership.spec.d.ts.map +1 -0
- package/lib/browser/ai-configuration/ai-configuration-preference-ownership.spec.js +126 -0
- package/lib/browser/ai-configuration/ai-configuration-preference-ownership.spec.js.map +1 -0
- package/lib/browser/ai-configuration/ai-configuration-resource.d.ts +10 -0
- package/lib/browser/ai-configuration/ai-configuration-resource.d.ts.map +1 -0
- package/lib/browser/ai-configuration/{components/configuration-section.js → ai-configuration-resource.js} +11 -11
- package/lib/browser/ai-configuration/ai-configuration-resource.js.map +1 -0
- package/lib/browser/ai-configuration/ai-configuration-search-widget.d.ts +29 -0
- package/lib/browser/ai-configuration/ai-configuration-search-widget.d.ts.map +1 -0
- package/lib/browser/ai-configuration/ai-configuration-search-widget.js +106 -0
- package/lib/browser/ai-configuration/ai-configuration-search-widget.js.map +1 -0
- package/lib/browser/ai-configuration/ai-configuration-search.d.ts +18 -0
- package/lib/browser/ai-configuration/ai-configuration-search.d.ts.map +1 -0
- package/lib/browser/ai-configuration/ai-configuration-search.js +45 -0
- package/lib/browser/ai-configuration/ai-configuration-search.js.map +1 -0
- package/lib/browser/ai-configuration/ai-configuration-search.spec.d.ts +2 -0
- package/lib/browser/ai-configuration/ai-configuration-search.spec.d.ts.map +1 -0
- package/lib/browser/ai-configuration/ai-configuration-search.spec.js +79 -0
- package/lib/browser/ai-configuration/ai-configuration-search.spec.js.map +1 -0
- package/lib/browser/ai-configuration/ai-configuration-tree-model.d.ts +8 -0
- package/lib/browser/ai-configuration/ai-configuration-tree-model.d.ts.map +1 -0
- package/lib/browser/ai-configuration/{base/ai-configuration-base-widget.js → ai-configuration-tree-model.js} +11 -14
- package/lib/browser/ai-configuration/ai-configuration-tree-model.js.map +1 -0
- package/lib/browser/ai-configuration/ai-configuration-tree-nodes.d.ts +57 -0
- package/lib/browser/ai-configuration/ai-configuration-tree-nodes.d.ts.map +1 -0
- package/lib/browser/ai-configuration/ai-configuration-tree-nodes.js +134 -0
- package/lib/browser/ai-configuration/ai-configuration-tree-nodes.js.map +1 -0
- package/lib/browser/ai-configuration/ai-configuration-tree-nodes.spec.d.ts +2 -0
- package/lib/browser/ai-configuration/ai-configuration-tree-nodes.spec.d.ts.map +1 -0
- package/lib/browser/ai-configuration/ai-configuration-tree-nodes.spec.js +134 -0
- package/lib/browser/ai-configuration/ai-configuration-tree-nodes.spec.js.map +1 -0
- package/lib/browser/ai-configuration/ai-configuration-tree-widget.d.ts +96 -0
- package/lib/browser/ai-configuration/ai-configuration-tree-widget.d.ts.map +1 -0
- package/lib/browser/ai-configuration/ai-configuration-tree-widget.js +407 -0
- package/lib/browser/ai-configuration/ai-configuration-tree-widget.js.map +1 -0
- package/lib/browser/ai-configuration/ai-configuration-view-contribution.d.ts +38 -4
- package/lib/browser/ai-configuration/ai-configuration-view-contribution.d.ts.map +1 -1
- package/lib/browser/ai-configuration/ai-configuration-view-contribution.js +151 -19
- package/lib/browser/ai-configuration/ai-configuration-view-contribution.js.map +1 -1
- package/lib/browser/ai-configuration/ai-configuration-widget.d.ts +21 -23
- package/lib/browser/ai-configuration/ai-configuration-widget.d.ts.map +1 -1
- package/lib/browser/ai-configuration/ai-configuration-widget.js +102 -70
- package/lib/browser/ai-configuration/ai-configuration-widget.js.map +1 -1
- package/lib/browser/ai-configuration/categories/agent-capabilities-settings.d.ts +56 -0
- package/lib/browser/ai-configuration/categories/agent-capabilities-settings.d.ts.map +1 -0
- package/lib/browser/ai-configuration/categories/agent-capabilities-settings.js +195 -0
- package/lib/browser/ai-configuration/categories/agent-capabilities-settings.js.map +1 -0
- package/lib/browser/ai-configuration/categories/agent-capabilities-settings.spec.d.ts +2 -0
- package/lib/browser/ai-configuration/categories/agent-capabilities-settings.spec.d.ts.map +1 -0
- package/lib/browser/ai-configuration/categories/agent-capabilities-settings.spec.js +140 -0
- package/lib/browser/ai-configuration/categories/agent-capabilities-settings.spec.js.map +1 -0
- package/lib/browser/ai-configuration/categories/agent-chips.d.ts +15 -0
- package/lib/browser/ai-configuration/categories/agent-chips.d.ts.map +1 -0
- package/lib/browser/ai-configuration/categories/agent-chips.js +19 -0
- package/lib/browser/ai-configuration/categories/agent-chips.js.map +1 -0
- package/lib/browser/ai-configuration/categories/agent-detail-model.d.ts +37 -0
- package/lib/browser/ai-configuration/categories/agent-detail-model.d.ts.map +1 -0
- package/lib/browser/ai-configuration/categories/agent-detail-model.js +99 -0
- package/lib/browser/ai-configuration/categories/agent-detail-model.js.map +1 -0
- package/lib/browser/ai-configuration/categories/agent-detail-view.d.ts +28 -0
- package/lib/browser/ai-configuration/categories/agent-detail-view.d.ts.map +1 -0
- package/lib/browser/ai-configuration/categories/agent-detail-view.js +135 -0
- package/lib/browser/ai-configuration/categories/agent-detail-view.js.map +1 -0
- package/lib/browser/ai-configuration/categories/agents-configuration-category.d.ts +78 -0
- package/lib/browser/ai-configuration/categories/agents-configuration-category.d.ts.map +1 -0
- package/lib/browser/ai-configuration/categories/agents-configuration-category.js +352 -0
- package/lib/browser/ai-configuration/categories/agents-configuration-category.js.map +1 -0
- package/lib/browser/ai-configuration/categories/agents-configuration-category.spec.d.ts +2 -0
- package/lib/browser/ai-configuration/categories/agents-configuration-category.spec.d.ts.map +1 -0
- package/lib/browser/ai-configuration/categories/agents-configuration-category.spec.js +99 -0
- package/lib/browser/ai-configuration/categories/agents-configuration-category.spec.js.map +1 -0
- package/lib/browser/ai-configuration/categories/general-configuration-category.d.ts +93 -0
- package/lib/browser/ai-configuration/categories/general-configuration-category.d.ts.map +1 -0
- package/lib/browser/ai-configuration/categories/general-configuration-category.js +313 -0
- package/lib/browser/ai-configuration/categories/general-configuration-category.js.map +1 -0
- package/lib/browser/ai-configuration/categories/general-configuration-category.spec.d.ts +2 -0
- package/lib/browser/ai-configuration/categories/general-configuration-category.spec.d.ts.map +1 -0
- package/lib/browser/ai-configuration/categories/general-configuration-category.spec.js +213 -0
- package/lib/browser/ai-configuration/categories/general-configuration-category.spec.js.map +1 -0
- package/lib/browser/ai-configuration/categories/model-aliases-configuration-category.d.ts +53 -0
- package/lib/browser/ai-configuration/categories/model-aliases-configuration-category.d.ts.map +1 -0
- package/lib/browser/ai-configuration/categories/model-aliases-configuration-category.js +241 -0
- package/lib/browser/ai-configuration/categories/model-aliases-configuration-category.js.map +1 -0
- package/lib/browser/ai-configuration/categories/model-aliases-configuration-category.spec.d.ts +2 -0
- package/lib/browser/ai-configuration/categories/model-aliases-configuration-category.spec.d.ts.map +1 -0
- package/lib/browser/ai-configuration/categories/model-aliases-configuration-category.spec.js +75 -0
- package/lib/browser/ai-configuration/categories/model-aliases-configuration-category.spec.js.map +1 -0
- package/lib/browser/ai-configuration/categories/models-configuration-category.d.ts +72 -0
- package/lib/browser/ai-configuration/categories/models-configuration-category.d.ts.map +1 -0
- package/lib/browser/ai-configuration/categories/models-configuration-category.js +227 -0
- package/lib/browser/ai-configuration/categories/models-configuration-category.js.map +1 -0
- package/lib/browser/ai-configuration/categories/models-configuration-category.spec.d.ts +2 -0
- package/lib/browser/ai-configuration/categories/models-configuration-category.spec.d.ts.map +1 -0
- package/lib/browser/ai-configuration/categories/models-configuration-category.spec.js +145 -0
- package/lib/browser/ai-configuration/categories/models-configuration-category.spec.js.map +1 -0
- package/lib/browser/ai-configuration/categories/prompt-snippets-configuration-category.d.ts +114 -0
- package/lib/browser/ai-configuration/categories/prompt-snippets-configuration-category.d.ts.map +1 -0
- package/lib/browser/ai-configuration/categories/prompt-snippets-configuration-category.js +341 -0
- package/lib/browser/ai-configuration/categories/prompt-snippets-configuration-category.js.map +1 -0
- package/lib/browser/ai-configuration/categories/prompt-snippets-configuration-category.spec.d.ts +2 -0
- package/lib/browser/ai-configuration/categories/prompt-snippets-configuration-category.spec.d.ts.map +1 -0
- package/lib/browser/ai-configuration/categories/prompt-snippets-configuration-category.spec.js +199 -0
- package/lib/browser/ai-configuration/categories/prompt-snippets-configuration-category.spec.js.map +1 -0
- package/lib/browser/ai-configuration/categories/prompts-and-skills-configuration-category.d.ts +84 -0
- package/lib/browser/ai-configuration/categories/prompts-and-skills-configuration-category.d.ts.map +1 -0
- package/lib/browser/ai-configuration/categories/prompts-and-skills-configuration-category.js +341 -0
- package/lib/browser/ai-configuration/categories/prompts-and-skills-configuration-category.js.map +1 -0
- package/lib/browser/ai-configuration/categories/prompts-and-skills-configuration-category.spec.d.ts +2 -0
- package/lib/browser/ai-configuration/categories/prompts-and-skills-configuration-category.spec.d.ts.map +1 -0
- package/lib/browser/ai-configuration/categories/prompts-and-skills-configuration-category.spec.js +184 -0
- package/lib/browser/ai-configuration/categories/prompts-and-skills-configuration-category.spec.js.map +1 -0
- package/lib/browser/ai-configuration/categories/token-usage-configuration-category.d.ts +38 -0
- package/lib/browser/ai-configuration/categories/token-usage-configuration-category.d.ts.map +1 -0
- package/lib/browser/ai-configuration/categories/token-usage-configuration-category.js +130 -0
- package/lib/browser/ai-configuration/categories/token-usage-configuration-category.js.map +1 -0
- package/lib/browser/ai-configuration/categories/token-usage-configuration-category.spec.d.ts +2 -0
- package/lib/browser/ai-configuration/categories/token-usage-configuration-category.spec.d.ts.map +1 -0
- package/lib/browser/ai-configuration/categories/token-usage-configuration-category.spec.js +51 -0
- package/lib/browser/ai-configuration/categories/token-usage-configuration-category.spec.js.map +1 -0
- package/lib/browser/ai-configuration/categories/tools-configuration-category.d.ts +60 -0
- package/lib/browser/ai-configuration/categories/tools-configuration-category.d.ts.map +1 -0
- package/lib/browser/ai-configuration/categories/tools-configuration-category.js +302 -0
- package/lib/browser/ai-configuration/categories/tools-configuration-category.js.map +1 -0
- package/lib/browser/ai-configuration/categories/tools-configuration-category.spec.d.ts +2 -0
- package/lib/browser/ai-configuration/categories/tools-configuration-category.spec.d.ts.map +1 -0
- package/lib/browser/ai-configuration/categories/tools-configuration-category.spec.js +111 -0
- package/lib/browser/ai-configuration/categories/tools-configuration-category.spec.js.map +1 -0
- package/lib/browser/ai-configuration/categories/variables-configuration-category.d.ts +72 -0
- package/lib/browser/ai-configuration/categories/variables-configuration-category.d.ts.map +1 -0
- package/lib/browser/ai-configuration/categories/variables-configuration-category.js +245 -0
- package/lib/browser/ai-configuration/categories/variables-configuration-category.js.map +1 -0
- package/lib/browser/ai-configuration/categories/variables-configuration-category.spec.d.ts +2 -0
- package/lib/browser/ai-configuration/categories/variables-configuration-category.spec.d.ts.map +1 -0
- package/lib/browser/ai-configuration/categories/variables-configuration-category.spec.js +131 -0
- package/lib/browser/ai-configuration/categories/variables-configuration-category.spec.js.map +1 -0
- package/lib/browser/ai-configuration/components/agent-notification-settings.d.ts +6 -2
- package/lib/browser/ai-configuration/components/agent-notification-settings.d.ts.map +1 -1
- package/lib/browser/ai-configuration/components/agent-notification-settings.js +15 -21
- package/lib/browser/ai-configuration/components/agent-notification-settings.js.map +1 -1
- package/lib/browser/ai-configuration/language-model-renderer.d.ts +25 -1
- package/lib/browser/ai-configuration/language-model-renderer.d.ts.map +1 -1
- package/lib/browser/ai-configuration/language-model-renderer.js +159 -63
- package/lib/browser/ai-configuration/language-model-renderer.js.map +1 -1
- package/lib/browser/ai-configuration/language-model-renderer.spec.d.ts +2 -0
- package/lib/browser/ai-configuration/language-model-renderer.spec.d.ts.map +1 -0
- package/lib/browser/ai-configuration/language-model-renderer.spec.js +93 -0
- package/lib/browser/ai-configuration/language-model-renderer.spec.js.map +1 -0
- package/lib/browser/ai-sessions-widget.js +12 -16
- package/lib/browser/ai-sessions-widget.js.map +1 -1
- package/lib/browser/app-tester-chat-agent.d.ts +2 -0
- package/lib/browser/app-tester-chat-agent.d.ts.map +1 -1
- package/lib/browser/app-tester-chat-agent.js +5 -0
- package/lib/browser/app-tester-chat-agent.js.map +1 -1
- package/lib/browser/architect-agent.d.ts +2 -0
- package/lib/browser/architect-agent.d.ts.map +1 -1
- package/lib/browser/architect-agent.js +5 -0
- package/lib/browser/architect-agent.js.map +1 -1
- package/lib/browser/architect-prompt-template.d.ts.map +1 -1
- package/lib/browser/architect-prompt-template.js +7 -0
- package/lib/browser/architect-prompt-template.js.map +1 -1
- package/lib/browser/chat-session-item.d.ts.map +1 -1
- package/lib/browser/chat-session-item.js +17 -30
- package/lib/browser/chat-session-item.js.map +1 -1
- package/lib/browser/chat-session-list-components.js +7 -30
- package/lib/browser/chat-session-list-components.js.map +1 -1
- package/lib/browser/chat-session-list-service.d.ts +2 -1
- package/lib/browser/chat-session-list-service.d.ts.map +1 -1
- package/lib/browser/chat-session-list-service.js +6 -1
- package/lib/browser/chat-session-list-service.js.map +1 -1
- package/lib/browser/chat-sessions-welcome-message-provider.js +3 -21
- package/lib/browser/chat-sessions-welcome-message-provider.js.map +1 -1
- package/lib/browser/code-reviewer-agent.d.ts +2 -0
- package/lib/browser/code-reviewer-agent.d.ts.map +1 -1
- package/lib/browser/code-reviewer-agent.js +5 -0
- package/lib/browser/code-reviewer-agent.js.map +1 -1
- package/lib/browser/coder-agent.d.ts +2 -0
- package/lib/browser/coder-agent.d.ts.map +1 -1
- package/lib/browser/coder-agent.js +6 -1
- package/lib/browser/coder-agent.js.map +1 -1
- package/lib/browser/context-file-validation-service-impl.spec.js +2 -0
- package/lib/browser/context-file-validation-service-impl.spec.js.map +1 -1
- package/lib/browser/create-skill-agent.d.ts +2 -0
- package/lib/browser/create-skill-agent.d.ts.map +1 -1
- package/lib/browser/create-skill-agent.js +5 -0
- package/lib/browser/create-skill-agent.js.map +1 -1
- package/lib/browser/explore-agent.d.ts +2 -0
- package/lib/browser/explore-agent.d.ts.map +1 -1
- package/lib/browser/explore-agent.js +5 -0
- package/lib/browser/explore-agent.js.map +1 -1
- package/lib/browser/file-changeset-functions.d.ts +7 -1
- package/lib/browser/file-changeset-functions.d.ts.map +1 -1
- package/lib/browser/file-changeset-functions.js +62 -20
- package/lib/browser/file-changeset-functions.js.map +1 -1
- package/lib/browser/file-changeset-functions.spec.js +130 -1
- package/lib/browser/file-changeset-functions.spec.js.map +1 -1
- package/lib/browser/frontend-module.d.ts.map +1 -1
- package/lib/browser/frontend-module.js +65 -59
- package/lib/browser/frontend-module.js.map +1 -1
- package/lib/browser/github-chat-agent.d.ts +2 -1
- package/lib/browser/github-chat-agent.d.ts.map +1 -1
- package/lib/browser/github-chat-agent.js +5 -0
- package/lib/browser/github-chat-agent.js.map +1 -1
- package/lib/browser/github-repo-variable-contribution.d.ts +2 -1
- package/lib/browser/github-repo-variable-contribution.d.ts.map +1 -1
- package/lib/browser/github-repo-variable-contribution.js +6 -1
- package/lib/browser/github-repo-variable-contribution.js.map +1 -1
- package/lib/browser/ide-chat-welcome-message-provider.d.ts.map +1 -1
- package/lib/browser/ide-chat-welcome-message-provider.js +31 -118
- package/lib/browser/ide-chat-welcome-message-provider.js.map +1 -1
- package/lib/browser/memory-capability-contribution.d.ts +8 -0
- package/lib/browser/memory-capability-contribution.d.ts.map +1 -0
- package/lib/browser/memory-capability-contribution.js +88 -0
- package/lib/browser/memory-capability-contribution.js.map +1 -0
- package/lib/browser/memory-capability-contribution.spec.d.ts +2 -0
- package/lib/browser/memory-capability-contribution.spec.d.ts.map +1 -0
- package/lib/browser/memory-capability-contribution.spec.js +74 -0
- package/lib/browser/memory-capability-contribution.spec.js.map +1 -0
- package/lib/browser/memory-directory-variable-contribution.d.ts +41 -0
- package/lib/browser/memory-directory-variable-contribution.d.ts.map +1 -0
- package/lib/browser/memory-directory-variable-contribution.js +107 -0
- package/lib/browser/memory-directory-variable-contribution.js.map +1 -0
- package/lib/browser/memory-directory-variable-contribution.spec.d.ts +2 -0
- package/lib/browser/memory-directory-variable-contribution.spec.d.ts.map +1 -0
- package/lib/browser/memory-directory-variable-contribution.spec.js +98 -0
- package/lib/browser/memory-directory-variable-contribution.spec.js.map +1 -0
- package/lib/browser/open-editors-hint-contribution.d.ts +7 -0
- package/lib/browser/open-editors-hint-contribution.d.ts.map +1 -0
- package/lib/browser/open-editors-hint-contribution.js +43 -0
- package/lib/browser/open-editors-hint-contribution.js.map +1 -0
- package/lib/browser/project-info-agent.d.ts +2 -0
- package/lib/browser/project-info-agent.d.ts.map +1 -1
- package/lib/browser/project-info-agent.js +5 -0
- package/lib/browser/project-info-agent.js.map +1 -1
- package/lib/browser/review/pr-review-agent.d.ts +2 -0
- package/lib/browser/review/pr-review-agent.d.ts.map +1 -1
- package/lib/browser/review/pr-review-agent.js +5 -0
- package/lib/browser/review/pr-review-agent.js.map +1 -1
- package/lib/browser/summarize-session-command-contribution.d.ts +2 -1
- package/lib/browser/summarize-session-command-contribution.d.ts.map +1 -1
- package/lib/browser/summarize-session-command-contribution.js +6 -1
- package/lib/browser/summarize-session-command-contribution.js.map +1 -1
- package/lib/browser/task-context-file-storage-service.d.ts.map +1 -1
- package/lib/browser/task-context-file-storage-service.js +1 -0
- package/lib/browser/task-context-file-storage-service.js.map +1 -1
- package/lib/browser/todo-tool-renderer.js +11 -19
- package/lib/browser/todo-tool-renderer.js.map +1 -1
- package/lib/browser/user-interaction-tool-renderer.js +39 -83
- package/lib/browser/user-interaction-tool-renderer.js.map +1 -1
- package/lib/browser/user-interaction-tool.d.ts +2 -0
- package/lib/browser/user-interaction-tool.d.ts.map +1 -1
- package/lib/browser/user-interaction-tool.js +7 -1
- package/lib/browser/user-interaction-tool.js.map +1 -1
- package/lib/browser/user-interaction-tool.spec.js +4 -2
- package/lib/browser/user-interaction-tool.spec.js.map +1 -1
- package/lib/browser/workspace-functions.d.ts +45 -7
- package/lib/browser/workspace-functions.d.ts.map +1 -1
- package/lib/browser/workspace-functions.js +108 -70
- package/lib/browser/workspace-functions.js.map +1 -1
- package/lib/browser/workspace-functions.spec.js +139 -9
- package/lib/browser/workspace-functions.spec.js.map +1 -1
- package/lib/browser/workspace-launch-provider.spec.js +3 -0
- package/lib/browser/workspace-launch-provider.spec.js.map +1 -1
- package/lib/browser/workspace-search-provider.d.ts.map +1 -1
- package/lib/browser/workspace-search-provider.js +4 -7
- package/lib/browser/workspace-search-provider.js.map +1 -1
- package/lib/browser/workspace-search-provider.spec.js +1 -2
- package/lib/browser/workspace-search-provider.spec.js.map +1 -1
- package/lib/browser/workspace-task-provider.spec.js +4 -0
- package/lib/browser/workspace-task-provider.spec.js.map +1 -1
- package/lib/common/coder-replace-prompt-template.d.ts +0 -2
- package/lib/common/coder-replace-prompt-template.d.ts.map +1 -1
- package/lib/common/coder-replace-prompt-template.js +10 -11
- package/lib/common/coder-replace-prompt-template.js.map +1 -1
- package/lib/common/command-chat-agents.d.ts +2 -1
- package/lib/common/command-chat-agents.d.ts.map +1 -1
- package/lib/common/command-chat-agents.js +6 -1
- package/lib/common/command-chat-agents.js.map +1 -1
- package/lib/common/open-editors-hint-fragment-id.d.ts +2 -0
- package/lib/common/open-editors-hint-fragment-id.d.ts.map +1 -0
- package/lib/{browser/ai-configuration/components/empty-state.js → common/open-editors-hint-fragment-id.js} +5 -11
- package/lib/common/open-editors-hint-fragment-id.js.map +1 -0
- package/lib/common/orchestrator-chat-agent.d.ts +2 -1
- package/lib/common/orchestrator-chat-agent.d.ts.map +1 -1
- package/lib/common/orchestrator-chat-agent.js +5 -0
- package/lib/common/orchestrator-chat-agent.js.map +1 -1
- package/lib/common/universal-chat-agent.d.ts +2 -0
- package/lib/common/universal-chat-agent.d.ts.map +1 -1
- package/lib/common/universal-chat-agent.js +5 -0
- package/lib/common/universal-chat-agent.js.map +1 -1
- package/lib/common/universal-prompt-template.d.ts.map +1 -1
- package/lib/common/universal-prompt-template.js +3 -0
- package/lib/common/universal-prompt-template.js.map +1 -1
- package/lib/common/workspace-preferences.js +2 -2
- package/lib/common/workspace-preferences.js.map +1 -1
- package/lib/common/workspace-search-provider-util.d.ts +2 -1
- package/lib/common/workspace-search-provider-util.d.ts.map +1 -1
- package/lib/common/workspace-search-provider-util.js +3 -2
- package/lib/common/workspace-search-provider-util.js.map +1 -1
- package/lib/common/workspace-search-provider-util.spec.d.ts +2 -0
- package/lib/common/workspace-search-provider-util.spec.d.ts.map +1 -0
- package/lib/common/workspace-search-provider-util.spec.js +55 -0
- package/lib/common/workspace-search-provider-util.spec.js.map +1 -0
- package/lib/node/github-repo-service-impl.d.ts +2 -0
- package/lib/node/github-repo-service-impl.d.ts.map +1 -1
- package/lib/node/github-repo-service-impl.js +7 -1
- package/lib/node/github-repo-service-impl.js.map +1 -1
- package/package.json +26 -25
- package/src/browser/ai-configuration/agent-icon.ts +37 -0
- package/src/browser/ai-configuration/ai-configuration-breadcrumbs-contribution.ts +164 -0
- package/src/browser/ai-configuration/ai-configuration-detail-widget.spec.ts +165 -0
- package/src/browser/ai-configuration/ai-configuration-detail-widget.tsx +237 -0
- package/src/browser/ai-configuration/ai-configuration-label-provider-contribution.ts +47 -0
- package/src/browser/ai-configuration/ai-configuration-open-preference-renderer.ts +64 -0
- package/src/browser/ai-configuration/ai-configuration-preference-ownership.spec.ts +135 -0
- package/src/browser/ai-configuration/{components/configuration-section.tsx → ai-configuration-resource.ts} +9 -19
- package/src/browser/ai-configuration/ai-configuration-search-widget.tsx +135 -0
- package/src/browser/ai-configuration/ai-configuration-search.spec.ts +91 -0
- package/src/browser/ai-configuration/ai-configuration-search.ts +43 -0
- package/src/browser/ai-configuration/{components/empty-state.tsx → ai-configuration-tree-model.ts} +7 -11
- package/src/browser/ai-configuration/ai-configuration-tree-nodes.spec.ts +150 -0
- package/src/browser/ai-configuration/ai-configuration-tree-nodes.ts +167 -0
- package/src/browser/ai-configuration/ai-configuration-tree-widget.tsx +457 -0
- package/src/browser/ai-configuration/ai-configuration-view-contribution.ts +156 -18
- package/src/browser/ai-configuration/ai-configuration-widget.tsx +107 -75
- package/src/browser/ai-configuration/categories/agent-capabilities-settings.spec.ts +161 -0
- package/src/browser/ai-configuration/categories/agent-capabilities-settings.tsx +340 -0
- package/src/browser/ai-configuration/categories/agent-chips.tsx +51 -0
- package/src/browser/ai-configuration/categories/agent-detail-model.ts +152 -0
- package/src/browser/ai-configuration/categories/agent-detail-view.tsx +329 -0
- package/src/browser/ai-configuration/categories/agents-configuration-category.spec.ts +119 -0
- package/src/browser/ai-configuration/categories/agents-configuration-category.tsx +431 -0
- package/src/browser/ai-configuration/categories/general-configuration-category.spec.ts +225 -0
- package/src/browser/ai-configuration/categories/general-configuration-category.tsx +465 -0
- package/src/browser/ai-configuration/categories/model-aliases-configuration-category.spec.ts +87 -0
- package/src/browser/ai-configuration/categories/model-aliases-configuration-category.tsx +286 -0
- package/src/browser/ai-configuration/categories/models-configuration-category.spec.ts +167 -0
- package/src/browser/ai-configuration/categories/models-configuration-category.tsx +264 -0
- package/src/browser/ai-configuration/categories/prompt-snippets-configuration-category.spec.ts +250 -0
- package/src/browser/ai-configuration/categories/prompt-snippets-configuration-category.tsx +438 -0
- package/src/browser/ai-configuration/categories/prompts-and-skills-configuration-category.spec.ts +226 -0
- package/src/browser/ai-configuration/categories/prompts-and-skills-configuration-category.tsx +419 -0
- package/src/browser/ai-configuration/categories/token-usage-configuration-category.spec.ts +57 -0
- package/src/browser/ai-configuration/categories/token-usage-configuration-category.tsx +185 -0
- package/src/browser/ai-configuration/categories/tools-configuration-category.spec.ts +130 -0
- package/src/browser/ai-configuration/categories/tools-configuration-category.tsx +421 -0
- package/src/browser/ai-configuration/categories/variables-configuration-category.spec.ts +154 -0
- package/src/browser/ai-configuration/categories/variables-configuration-category.tsx +322 -0
- package/src/browser/ai-configuration/components/agent-notification-settings.tsx +38 -33
- package/src/browser/ai-configuration/language-model-renderer.spec.ts +100 -0
- package/src/browser/ai-configuration/language-model-renderer.tsx +244 -100
- package/src/browser/app-tester-chat-agent.ts +5 -2
- package/src/browser/architect-agent.ts +5 -2
- package/src/browser/architect-prompt-template.ts +7 -0
- package/src/browser/chat-session-item.tsx +2 -4
- package/src/browser/chat-session-list-service.ts +6 -3
- package/src/browser/code-reviewer-agent.ts +5 -2
- package/src/browser/coder-agent.ts +7 -5
- package/src/browser/context-file-validation-service-impl.spec.ts +3 -2
- package/src/browser/create-skill-agent.ts +5 -2
- package/src/browser/explore-agent.ts +5 -2
- package/src/browser/file-changeset-functions.spec.ts +158 -5
- package/src/browser/file-changeset-functions.ts +61 -23
- package/src/browser/frontend-module.ts +76 -63
- package/src/browser/github-chat-agent.ts +5 -2
- package/src/browser/github-repo-variable-contribution.ts +6 -3
- package/src/browser/ide-chat-welcome-message-provider.tsx +11 -11
- package/src/browser/memory-capability-contribution.spec.ts +85 -0
- package/src/browser/memory-capability-contribution.ts +86 -0
- package/src/browser/memory-directory-variable-contribution.spec.ts +113 -0
- package/src/browser/memory-directory-variable-contribution.ts +113 -0
- package/src/browser/open-editors-hint-contribution.ts +38 -0
- package/src/browser/project-info-agent.ts +5 -2
- package/src/browser/review/pr-review-agent.ts +5 -2
- package/src/browser/style/ai-configuration-base.css +0 -6
- package/src/browser/style/ai-configuration-shell.css +416 -0
- package/src/browser/style/ai-configuration-table.css +2 -15
- package/src/browser/style/index.css +220 -276
- package/src/browser/summarize-session-command-contribution.ts +6 -3
- package/src/browser/task-context-file-storage-service.ts +5 -2
- package/src/browser/user-interaction-tool.spec.ts +5 -2
- package/src/browser/user-interaction-tool.ts +6 -2
- package/src/browser/workspace-functions.spec.ts +163 -10
- package/src/browser/workspace-functions.ts +121 -72
- package/src/browser/workspace-launch-provider.spec.ts +4 -1
- package/src/browser/workspace-search-provider.spec.ts +1 -2
- package/src/browser/workspace-search-provider.ts +4 -7
- package/src/browser/workspace-task-provider.spec.ts +5 -1
- package/src/common/coder-replace-prompt-template.ts +9 -9
- package/src/common/command-chat-agents.ts +6 -2
- package/src/{browser/ai-configuration/base/ai-configuration-base-widget.tsx → common/open-editors-hint-fragment-id.ts} +2 -22
- package/src/common/orchestrator-chat-agent.ts +5 -2
- package/src/common/universal-chat-agent.ts +5 -2
- package/src/common/universal-prompt-template.ts +3 -0
- package/src/common/workspace-preferences.ts +2 -2
- package/src/common/workspace-search-provider-util.spec.ts +61 -0
- package/src/common/workspace-search-provider-util.ts +3 -2
- package/src/node/github-repo-service-impl.ts +6 -2
- package/lib/browser/ai-configuration/agent-configuration-widget.d.ts +0 -72
- package/lib/browser/ai-configuration/agent-configuration-widget.d.ts.map +0 -1
- package/lib/browser/ai-configuration/agent-configuration-widget.js +0 -620
- package/lib/browser/ai-configuration/agent-configuration-widget.js.map +0 -1
- package/lib/browser/ai-configuration/agent-configuration-widget.spec.d.ts +0 -2
- package/lib/browser/ai-configuration/agent-configuration-widget.spec.d.ts.map +0 -1
- package/lib/browser/ai-configuration/agent-configuration-widget.spec.js +0 -56
- package/lib/browser/ai-configuration/agent-configuration-widget.spec.js.map +0 -1
- package/lib/browser/ai-configuration/base/ai-card-grid-configuration-widget.d.ts +0 -31
- package/lib/browser/ai-configuration/base/ai-card-grid-configuration-widget.d.ts.map +0 -1
- package/lib/browser/ai-configuration/base/ai-card-grid-configuration-widget.js +0 -55
- package/lib/browser/ai-configuration/base/ai-card-grid-configuration-widget.js.map +0 -1
- package/lib/browser/ai-configuration/base/ai-configuration-base-widget.d.ts +0 -13
- package/lib/browser/ai-configuration/base/ai-configuration-base-widget.d.ts.map +0 -1
- package/lib/browser/ai-configuration/base/ai-configuration-base-widget.js.map +0 -1
- package/lib/browser/ai-configuration/base/ai-hierarchical-configuration-widget.d.ts +0 -23
- package/lib/browser/ai-configuration/base/ai-hierarchical-configuration-widget.d.ts.map +0 -1
- package/lib/browser/ai-configuration/base/ai-hierarchical-configuration-widget.js +0 -60
- package/lib/browser/ai-configuration/base/ai-hierarchical-configuration-widget.js.map +0 -1
- package/lib/browser/ai-configuration/base/ai-list-detail-configuration-widget.d.ts +0 -55
- package/lib/browser/ai-configuration/base/ai-list-detail-configuration-widget.d.ts.map +0 -1
- package/lib/browser/ai-configuration/base/ai-list-detail-configuration-widget.js +0 -96
- package/lib/browser/ai-configuration/base/ai-list-detail-configuration-widget.js.map +0 -1
- package/lib/browser/ai-configuration/base/ai-table-configuration-widget.d.ts +0 -44
- package/lib/browser/ai-configuration/base/ai-table-configuration-widget.d.ts.map +0 -1
- package/lib/browser/ai-configuration/base/ai-table-configuration-widget.js +0 -66
- package/lib/browser/ai-configuration/base/ai-table-configuration-widget.js.map +0 -1
- package/lib/browser/ai-configuration/components/configuration-section.d.ts +0 -12
- package/lib/browser/ai-configuration/components/configuration-section.d.ts.map +0 -1
- package/lib/browser/ai-configuration/components/configuration-section.js.map +0 -1
- package/lib/browser/ai-configuration/components/empty-state.d.ts +0 -10
- package/lib/browser/ai-configuration/components/empty-state.d.ts.map +0 -1
- package/lib/browser/ai-configuration/components/empty-state.js.map +0 -1
- package/lib/browser/ai-configuration/components/expandable-section.d.ts +0 -13
- package/lib/browser/ai-configuration/components/expandable-section.d.ts.map +0 -1
- package/lib/browser/ai-configuration/components/expandable-section.js +0 -31
- package/lib/browser/ai-configuration/components/expandable-section.js.map +0 -1
- package/lib/browser/ai-configuration/model-aliases-configuration-widget.d.ts +0 -26
- package/lib/browser/ai-configuration/model-aliases-configuration-widget.d.ts.map +0 -1
- package/lib/browser/ai-configuration/model-aliases-configuration-widget.js +0 -198
- package/lib/browser/ai-configuration/model-aliases-configuration-widget.js.map +0 -1
- package/lib/browser/ai-configuration/prompt-fragments-configuration-widget.d.ts +0 -140
- package/lib/browser/ai-configuration/prompt-fragments-configuration-widget.d.ts.map +0 -1
- package/lib/browser/ai-configuration/prompt-fragments-configuration-widget.js +0 -508
- package/lib/browser/ai-configuration/prompt-fragments-configuration-widget.js.map +0 -1
- package/lib/browser/ai-configuration/skills-configuration-widget.d.ts +0 -29
- package/lib/browser/ai-configuration/skills-configuration-widget.d.ts.map +0 -1
- package/lib/browser/ai-configuration/skills-configuration-widget.js +0 -166
- package/lib/browser/ai-configuration/skills-configuration-widget.js.map +0 -1
- package/lib/browser/ai-configuration/skills-configuration-widget.spec.d.ts +0 -2
- package/lib/browser/ai-configuration/skills-configuration-widget.spec.d.ts.map +0 -1
- package/lib/browser/ai-configuration/skills-configuration-widget.spec.js +0 -191
- package/lib/browser/ai-configuration/skills-configuration-widget.spec.js.map +0 -1
- package/lib/browser/ai-configuration/template-settings-renderer.d.ts +0 -9
- package/lib/browser/ai-configuration/template-settings-renderer.d.ts.map +0 -1
- package/lib/browser/ai-configuration/template-settings-renderer.js +0 -78
- package/lib/browser/ai-configuration/template-settings-renderer.js.map +0 -1
- package/lib/browser/ai-configuration/token-usage-configuration-widget.d.ts +0 -20
- package/lib/browser/ai-configuration/token-usage-configuration-widget.d.ts.map +0 -1
- package/lib/browser/ai-configuration/token-usage-configuration-widget.js +0 -170
- package/lib/browser/ai-configuration/token-usage-configuration-widget.js.map +0 -1
- package/lib/browser/ai-configuration/tools-configuration-widget.d.ts +0 -52
- package/lib/browser/ai-configuration/tools-configuration-widget.d.ts.map +0 -1
- package/lib/browser/ai-configuration/tools-configuration-widget.js +0 -357
- package/lib/browser/ai-configuration/tools-configuration-widget.js.map +0 -1
- package/lib/browser/ai-configuration/variable-configuration-widget.d.ts +0 -22
- package/lib/browser/ai-configuration/variable-configuration-widget.d.ts.map +0 -1
- package/lib/browser/ai-configuration/variable-configuration-widget.js +0 -133
- package/lib/browser/ai-configuration/variable-configuration-widget.js.map +0 -1
- package/src/browser/ai-configuration/agent-configuration-widget.spec.ts +0 -71
- package/src/browser/ai-configuration/agent-configuration-widget.tsx +0 -928
- package/src/browser/ai-configuration/base/ai-card-grid-configuration-widget.tsx +0 -72
- package/src/browser/ai-configuration/base/ai-hierarchical-configuration-widget.tsx +0 -51
- package/src/browser/ai-configuration/base/ai-list-detail-configuration-widget.tsx +0 -140
- package/src/browser/ai-configuration/base/ai-table-configuration-widget.tsx +0 -107
- package/src/browser/ai-configuration/components/expandable-section.tsx +0 -51
- package/src/browser/ai-configuration/model-aliases-configuration-widget.tsx +0 -270
- package/src/browser/ai-configuration/prompt-fragments-configuration-widget.tsx +0 -736
- package/src/browser/ai-configuration/skills-configuration-widget.spec.ts +0 -248
- package/src/browser/ai-configuration/skills-configuration-widget.tsx +0 -229
- package/src/browser/ai-configuration/template-settings-renderer.tsx +0 -125
- package/src/browser/ai-configuration/token-usage-configuration-widget.tsx +0 -214
- package/src/browser/ai-configuration/tools-configuration-widget.tsx +0 -544
- package/src/browser/ai-configuration/variable-configuration-widget.tsx +0 -159
- package/src/browser/style/ai-configuration-cards.css +0 -60
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
// *****************************************************************************
|
|
2
|
+
// Copyright (C) 2026 EclipseSource and others.
|
|
3
|
+
//
|
|
4
|
+
// This program and the accompanying materials are made available under the
|
|
5
|
+
// terms of the Eclipse Public License v. 2.0 which is available at
|
|
6
|
+
// http://www.eclipse.org/legal/epl-2.0.
|
|
7
|
+
//
|
|
8
|
+
// This Source Code may also be made available under the following Secondary
|
|
9
|
+
// Licenses when the conditions for such availability set forth in the Eclipse
|
|
10
|
+
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
11
|
+
// with the GNU Classpath Exception which is available at
|
|
12
|
+
// https://www.gnu.org/software/classpath/license.html.
|
|
13
|
+
//
|
|
14
|
+
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
15
|
+
// *****************************************************************************
|
|
16
|
+
|
|
17
|
+
import * as React from '@theia/core/shared/react';
|
|
18
|
+
import { nls, PreferenceService } from '@theia/core';
|
|
19
|
+
import { inject, injectable, postConstruct } from '@theia/core/shared/inversify';
|
|
20
|
+
import { codicon, Message, ReactWidget } from '@theia/core/lib/browser';
|
|
21
|
+
import { AiConfigurationService } from '@theia/ai-core';
|
|
22
|
+
import { AiConfigurationCategoryRegistry } from '@theia/ai-core-ui/lib/browser/ai-configuration/ai-configuration-category-registry';
|
|
23
|
+
import { AiConfigurationSelectionModel } from '@theia/ai-core-ui/lib/browser/ai-configuration/ai-configuration-selection-model';
|
|
24
|
+
import { AiConfigurationItemDetailHeader } from '@theia/ai-core-ui/lib/browser/ai-configuration/components/ai-configuration-primitives';
|
|
25
|
+
import {
|
|
26
|
+
AiConfigurationCategory, AiConfigurationRenderContext, AiConfigurationScope, AiConfigurationSelection
|
|
27
|
+
} from '@theia/ai-core-ui/lib/browser/ai-configuration/ai-configuration-category';
|
|
28
|
+
|
|
29
|
+
@injectable()
|
|
30
|
+
export class AiConfigurationDetailWidget extends ReactWidget {
|
|
31
|
+
|
|
32
|
+
static readonly ID = 'ai-configuration-detail';
|
|
33
|
+
|
|
34
|
+
/** Frames a pending search highlight waits for its target row to be mounted before it is dropped. */
|
|
35
|
+
static readonly HIGHLIGHT_RETRY_FRAMES = 10;
|
|
36
|
+
|
|
37
|
+
@inject(AiConfigurationCategoryRegistry)
|
|
38
|
+
protected readonly registry: AiConfigurationCategoryRegistry;
|
|
39
|
+
|
|
40
|
+
@inject(AiConfigurationSelectionModel)
|
|
41
|
+
protected readonly selectionModel: AiConfigurationSelectionModel;
|
|
42
|
+
|
|
43
|
+
@inject(AiConfigurationService)
|
|
44
|
+
protected readonly aiConfigurationService: AiConfigurationService;
|
|
45
|
+
|
|
46
|
+
@inject(PreferenceService)
|
|
47
|
+
protected readonly preferenceService: PreferenceService;
|
|
48
|
+
|
|
49
|
+
/** Scope every row on the page reads from and writes to; per-scope editing is not wired up yet. */
|
|
50
|
+
protected scope: AiConfigurationScope = 'user';
|
|
51
|
+
|
|
52
|
+
protected resetScroll = false;
|
|
53
|
+
protected pendingHighlight?: AiConfigurationSelection['highlight'];
|
|
54
|
+
/** Frames a pending highlight has already waited for its target row; see {@link applyScrollAndHighlight}. */
|
|
55
|
+
protected pendingHighlightFrames = 0;
|
|
56
|
+
|
|
57
|
+
@postConstruct()
|
|
58
|
+
protected init(): void {
|
|
59
|
+
this.id = AiConfigurationDetailWidget.ID;
|
|
60
|
+
this.addClass('ai-configuration-detail-widget');
|
|
61
|
+
// The page scrolls in its own inner `.ai-configuration-detail-body` (driven by
|
|
62
|
+
// `applyScrollAndHighlight`). Clear the default `ReactWidget` scroll options so that
|
|
63
|
+
// `BaseWidget` does not attach a PerfectScrollbar to the outer node, whose forced
|
|
64
|
+
// `overflow: hidden` and wheel handling would otherwise swallow the inner body's scroll.
|
|
65
|
+
this.scrollOptions = undefined;
|
|
66
|
+
this.toDispose.push(this.selectionModel.onDidChangeSelection(() => this.onSelectionChanged()));
|
|
67
|
+
this.toDispose.push(this.registry.onDidChange(() => this.update()));
|
|
68
|
+
// Also covers the workspace-trust transitions this service reports, which are not preference changes.
|
|
69
|
+
this.toDispose.push(this.aiConfigurationService.onDidChange(() => this.update()));
|
|
70
|
+
// Reflect preference changes made outside the current render pass — most notably the gear menu's
|
|
71
|
+
// Reset command, which runs as a command and so never calls `ctx.update()`. Listening here rather
|
|
72
|
+
// than only to `AiConfigurationService.onDidChange` (scoped to `ai-features.*`) keeps contributed
|
|
73
|
+
// categories up to date too: their preferences carry no AI prefix, so a reset of one used to leave
|
|
74
|
+
// the row's `modified` state stale until the page was re-rendered for some other reason.
|
|
75
|
+
this.toDispose.push(this.preferenceService.onPreferenceChanged(() => this.update()));
|
|
76
|
+
this.update();
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
protected onSelectionChanged(): void {
|
|
80
|
+
this.resetScroll = true;
|
|
81
|
+
this.pendingHighlight = this.selectionModel.getSelection()?.highlight;
|
|
82
|
+
this.pendingHighlightFrames = 0;
|
|
83
|
+
this.update();
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
protected createRenderContext(): AiConfigurationRenderContext {
|
|
87
|
+
return {
|
|
88
|
+
scope: this.scope,
|
|
89
|
+
navigate: selection => this.selectionModel.select(selection),
|
|
90
|
+
update: () => this.update()
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
protected render(): React.ReactNode {
|
|
95
|
+
const selection = this.selectionModel.getSelection();
|
|
96
|
+
const category = selection && this.registry.getCategory(selection.categoryId);
|
|
97
|
+
if (!selection || !category) {
|
|
98
|
+
return this.renderPlaceholder();
|
|
99
|
+
}
|
|
100
|
+
const ctx = this.createRenderContext();
|
|
101
|
+
// The category/item path is shown as real Theia breadcrumbs in the shell tab bar
|
|
102
|
+
// (see AiConfigurationBreadcrumbsContribution), so no in-pane breadcrumb is rendered here.
|
|
103
|
+
return <div className='ai-configuration-detail-container'>
|
|
104
|
+
{this.scope !== 'user' && this.renderScopeBanner()}
|
|
105
|
+
<div className='ai-configuration-detail-body'>
|
|
106
|
+
{this.renderBody(category, selection, ctx)}
|
|
107
|
+
</div>
|
|
108
|
+
</div>;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* Selects the category whose item just disappeared. Deferred to a microtask: this runs during render, and
|
|
113
|
+
* selecting synchronously would re-enter the widget's update while React is still committing this one.
|
|
114
|
+
*/
|
|
115
|
+
protected selectCategoryAfterItemLoss(category: AiConfigurationCategory): void {
|
|
116
|
+
queueMicrotask(() => {
|
|
117
|
+
const selection = this.selectionModel.getSelection();
|
|
118
|
+
if (selection?.categoryId === category.id && selection.itemId) {
|
|
119
|
+
this.selectionModel.select({ categoryId: category.id });
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
protected renderScopeBanner(): React.ReactNode {
|
|
125
|
+
return <div className='ai-configuration-detail-scope-banner'>
|
|
126
|
+
<span className={codicon('info')}></span>
|
|
127
|
+
<span>{nls.localize('theia/ai/core/aiConfiguration/scopeBanner', 'Editing the {0} scope.', this.scope)}</span>
|
|
128
|
+
</div>;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
protected renderBody(category: AiConfigurationCategory, selection: AiConfigurationSelection, ctx: AiConfigurationRenderContext): React.ReactNode {
|
|
132
|
+
const renderer = category.renderer;
|
|
133
|
+
// Item detail pages render their own header (id/status/actions), so they are returned as-is.
|
|
134
|
+
if (selection.itemId && renderer.renderItemDetail) {
|
|
135
|
+
const detail = renderer.renderItemDetail(selection.itemId, ctx);
|
|
136
|
+
if (detail) {
|
|
137
|
+
return detail;
|
|
138
|
+
}
|
|
139
|
+
// The item is gone (deleted while its page was open, e.g. an MCP server) and the renderer has
|
|
140
|
+
// nothing to show, which would leave a blank pane. Fall back to the category, and move the
|
|
141
|
+
// selection there so the tree and breadcrumbs agree with what is displayed.
|
|
142
|
+
this.selectCategoryAfterItemLoss(category);
|
|
143
|
+
}
|
|
144
|
+
// Category-level pages/overviews get a shared header showing the category name, so the page is
|
|
145
|
+
// titled in-pane (not only in the breadcrumb tab bar).
|
|
146
|
+
let content: React.ReactNode;
|
|
147
|
+
if (category.kind === 'collection' && renderer.renderOverview) {
|
|
148
|
+
content = renderer.renderOverview(ctx);
|
|
149
|
+
} else if (renderer.renderPage) {
|
|
150
|
+
content = renderer.renderPage(ctx);
|
|
151
|
+
} else {
|
|
152
|
+
content = this.renderComingSoon(category);
|
|
153
|
+
}
|
|
154
|
+
return <>
|
|
155
|
+
{this.renderCategoryHeader(category)}
|
|
156
|
+
{content}
|
|
157
|
+
</>;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
/** Shared in-pane header for a category-level page: the category icon, name and optional description. */
|
|
161
|
+
protected renderCategoryHeader(category: AiConfigurationCategory): React.ReactNode {
|
|
162
|
+
return <div className='ai-configuration-category-header'>
|
|
163
|
+
<AiConfigurationItemDetailHeader title={category.label} iconClass={category.iconClass} subtitle={category.description} />
|
|
164
|
+
</div>;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
protected renderComingSoon(category: AiConfigurationCategory): React.ReactNode {
|
|
168
|
+
return <div className='ai-configuration-detail-placeholder'>
|
|
169
|
+
{nls.localize('theia/ai/core/aiConfiguration/categoryComingSoon', '{0} configuration is not available yet.', category.label)}
|
|
170
|
+
</div>;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
protected renderPlaceholder(): React.ReactNode {
|
|
174
|
+
return <div className='ai-configuration-detail-placeholder'>
|
|
175
|
+
{nls.localize('theia/ai/core/aiConfiguration/selectCategory', 'Select a category to configure.')}
|
|
176
|
+
</div>;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
protected override onUpdateRequest(msg: Message): void {
|
|
180
|
+
super.onUpdateRequest(msg);
|
|
181
|
+
this.applyScrollAndHighlight();
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
protected applyScrollAndHighlight(): void {
|
|
185
|
+
if (typeof window === 'undefined' || typeof window.requestAnimationFrame !== 'function') {
|
|
186
|
+
return;
|
|
187
|
+
}
|
|
188
|
+
window.requestAnimationFrame(() => {
|
|
189
|
+
const body = this.node.querySelector<HTMLElement>('.ai-configuration-detail-body');
|
|
190
|
+
if (!body) {
|
|
191
|
+
return;
|
|
192
|
+
}
|
|
193
|
+
if (this.resetScroll && !this.pendingHighlight) {
|
|
194
|
+
body.scrollTop = 0;
|
|
195
|
+
}
|
|
196
|
+
this.resetScroll = false;
|
|
197
|
+
const highlight = this.pendingHighlight;
|
|
198
|
+
if (!highlight) {
|
|
199
|
+
return;
|
|
200
|
+
}
|
|
201
|
+
const element = body.querySelector<HTMLElement>(`[data-ai-config-row-id="${highlight.rowId}"]`);
|
|
202
|
+
if (element) {
|
|
203
|
+
this.pendingHighlight = undefined;
|
|
204
|
+
this.centerInBody(body, element);
|
|
205
|
+
element.classList.add('ai-configuration-row-flash');
|
|
206
|
+
window.setTimeout(() => element.classList.remove('ai-configuration-row-flash'), 1200);
|
|
207
|
+
} else if (this.pendingHighlightFrames < AiConfigurationDetailWidget.HIGHLIGHT_RETRY_FRAMES) {
|
|
208
|
+
// Cross-category navigation renders the new page and the highlight target in the same pass,
|
|
209
|
+
// but categories that resolve their rows asynchronously (agents, providers) are still empty on
|
|
210
|
+
// this frame. Keep the highlight pending and look again rather than dropping it, which made
|
|
211
|
+
// scroll-and-flash fire only when the row happened to be mounted already.
|
|
212
|
+
this.pendingHighlightFrames++;
|
|
213
|
+
this.applyScrollAndHighlight();
|
|
214
|
+
} else {
|
|
215
|
+
this.pendingHighlight = undefined;
|
|
216
|
+
}
|
|
217
|
+
});
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* Vertically centers `element` within `body` by scrolling that container and nothing else.
|
|
222
|
+
*
|
|
223
|
+
* Deliberately not `Element.scrollIntoView`: that scrolls *every* scrollable ancestor to satisfy the
|
|
224
|
+
* requested alignment, and `overflow: hidden` does not prevent programmatic scrolling. When a row cannot
|
|
225
|
+
* be centered inside the body alone, it therefore nudges the `overflow: hidden` containers above this
|
|
226
|
+
* widget, which have no scrollbar for the user to scroll back — shifting the whole shell, pushing the menu
|
|
227
|
+
* bar out of view and leaving a gap below the status bar.
|
|
228
|
+
*/
|
|
229
|
+
protected centerInBody(body: HTMLElement, element: HTMLElement): void {
|
|
230
|
+
const bodyRect = body.getBoundingClientRect();
|
|
231
|
+
const elementRect = element.getBoundingClientRect();
|
|
232
|
+
const current = elementRect.top - bodyRect.top;
|
|
233
|
+
const centered = (body.clientHeight - elementRect.height) / 2;
|
|
234
|
+
// Assigning `scrollTop` clamps to the scrollable range, so short pages simply do not scroll.
|
|
235
|
+
body.scrollTop += current - centered;
|
|
236
|
+
}
|
|
237
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
// *****************************************************************************
|
|
2
|
+
// Copyright (C) 2026 EclipseSource and others.
|
|
3
|
+
//
|
|
4
|
+
// This program and the accompanying materials are made available under the
|
|
5
|
+
// terms of the Eclipse Public License v. 2.0 which is available at
|
|
6
|
+
// http://www.eclipse.org/legal/epl-2.0.
|
|
7
|
+
//
|
|
8
|
+
// This Source Code may also be made available under the following Secondary
|
|
9
|
+
// Licenses when the conditions for such availability set forth in the Eclipse
|
|
10
|
+
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
11
|
+
// with the GNU Classpath Exception which is available at
|
|
12
|
+
// https://www.gnu.org/software/classpath/license.html.
|
|
13
|
+
//
|
|
14
|
+
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
15
|
+
// *****************************************************************************
|
|
16
|
+
|
|
17
|
+
import { nls } from '@theia/core';
|
|
18
|
+
import { codicon } from '@theia/core/lib/browser';
|
|
19
|
+
import { LabelProviderContribution } from '@theia/core/lib/browser/label-provider';
|
|
20
|
+
import URI from '@theia/core/lib/common/uri';
|
|
21
|
+
import { injectable } from '@theia/core/shared/inversify';
|
|
22
|
+
import { AI_CONFIGURATION_RESOURCE_SCHEME } from './ai-configuration-resource';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Labels the AI Configuration view's constant resource URI (see {@link AI_CONFIGURATION_RESOURCE_URI}).
|
|
26
|
+
* The view is a {@link NavigatableWidget} so the shell renders breadcrumbs for it; without this, the
|
|
27
|
+
* window title updater would fall back to the URI's (empty) path and show `/` instead of a readable name.
|
|
28
|
+
*/
|
|
29
|
+
@injectable()
|
|
30
|
+
export class AiConfigurationLabelProviderContribution implements LabelProviderContribution {
|
|
31
|
+
|
|
32
|
+
canHandle(element: object): number {
|
|
33
|
+
return element instanceof URI && element.scheme === AI_CONFIGURATION_RESOURCE_SCHEME ? 200 : 0;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
getName(): string {
|
|
37
|
+
return nls.localize('theia/ai/ide/aiConfiguration/breadcrumbRoot', 'AI Configuration');
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
getLongName(): string {
|
|
41
|
+
return this.getName();
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
getIcon(): string {
|
|
45
|
+
return codicon('settings-gear');
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
// *****************************************************************************
|
|
2
|
+
// Copyright (C) 2026 EclipseSource and others.
|
|
3
|
+
//
|
|
4
|
+
// This program and the accompanying materials are made available under the
|
|
5
|
+
// terms of the Eclipse Public License v. 2.0 which is available at
|
|
6
|
+
// http://www.eclipse.org/legal/epl-2.0.
|
|
7
|
+
//
|
|
8
|
+
// This Source Code may also be made available under the following Secondary
|
|
9
|
+
// Licenses when the conditions for such availability set forth in the Eclipse
|
|
10
|
+
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
11
|
+
// with the GNU Classpath Exception which is available at
|
|
12
|
+
// https://www.gnu.org/software/classpath/license.html.
|
|
13
|
+
//
|
|
14
|
+
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
15
|
+
// *****************************************************************************
|
|
16
|
+
|
|
17
|
+
import { inject, injectable, interfaces } from '@theia/core/shared/inversify';
|
|
18
|
+
import { CommandService, nls } from '@theia/core';
|
|
19
|
+
import { AI_CONFIGURATION_OPEN_PREFERENCE_ID } from '@theia/ai-core/lib/browser';
|
|
20
|
+
import { PreferenceLeafNodeRenderer, PreferenceNodeRenderer } from '@theia/preferences/lib/browser/views/components/preference-node-renderer';
|
|
21
|
+
import { PreferenceLeafNodeRendererContribution } from '@theia/preferences/lib/browser/views/components/preference-node-renderer-creator';
|
|
22
|
+
import { Preference } from '@theia/preferences/lib/browser/util/preference-types';
|
|
23
|
+
import { OPEN_AI_CONFIG_VIEW } from './ai-configuration-view-contribution';
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Renders the {@link AI_CONFIGURATION_OPEN_PREFERENCE_ID} placeholder (shown where the AI
|
|
27
|
+
* preferences used to live in the Settings UI) as a button that opens the AI Configuration view.
|
|
28
|
+
*/
|
|
29
|
+
@injectable()
|
|
30
|
+
export class AiConfigurationOpenPreferenceRenderer extends PreferenceLeafNodeRenderer<null, HTMLElement> {
|
|
31
|
+
|
|
32
|
+
@inject(CommandService)
|
|
33
|
+
protected readonly commandService: CommandService;
|
|
34
|
+
|
|
35
|
+
protected createInteractable(container: HTMLElement): void {
|
|
36
|
+
const button = document.createElement('button');
|
|
37
|
+
button.classList.add('theia-button', 'main');
|
|
38
|
+
button.textContent = nls.localize('theia/ai/ide/aiConfiguration/openButton', 'Open AI Configuration');
|
|
39
|
+
button.onclick = () => this.commandService.executeCommand(OPEN_AI_CONFIG_VIEW.id);
|
|
40
|
+
this.interactable = button;
|
|
41
|
+
container.appendChild(button);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
protected getFallbackValue(): null {
|
|
45
|
+
// eslint-disable-next-line no-null/no-null
|
|
46
|
+
return null;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
protected doHandleValueChange(): void { }
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
@injectable()
|
|
53
|
+
export class AiConfigurationOpenPreferenceRendererContribution extends PreferenceLeafNodeRendererContribution {
|
|
54
|
+
static ID = 'ai-configuration-open-preference-renderer';
|
|
55
|
+
id = AiConfigurationOpenPreferenceRendererContribution.ID;
|
|
56
|
+
|
|
57
|
+
canHandleLeafNode(node: Preference.LeafNode): number {
|
|
58
|
+
return node.preferenceId === AI_CONFIGURATION_OPEN_PREFERENCE_ID ? 100 : 0;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
createLeafNodeRenderer(container: interfaces.Container): PreferenceNodeRenderer {
|
|
62
|
+
return container.get(AiConfigurationOpenPreferenceRenderer);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
// *****************************************************************************
|
|
2
|
+
// Copyright (C) 2026 EclipseSource and others.
|
|
3
|
+
//
|
|
4
|
+
// This program and the accompanying materials are made available under the
|
|
5
|
+
// terms of the Eclipse Public License v. 2.0 which is available at
|
|
6
|
+
// http://www.eclipse.org/legal/epl-2.0.
|
|
7
|
+
//
|
|
8
|
+
// This Source Code may also be made available under the following Secondary
|
|
9
|
+
// Licenses when the conditions for such availability set forth in the Eclipse
|
|
10
|
+
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
11
|
+
// with the GNU Classpath Exception which is available at
|
|
12
|
+
// https://www.gnu.org/software/classpath/license.html.
|
|
13
|
+
//
|
|
14
|
+
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
15
|
+
// *****************************************************************************
|
|
16
|
+
|
|
17
|
+
import { enableJSDOM } from '@theia/core/lib/browser/test/jsdom';
|
|
18
|
+
let disableJSDOM = enableJSDOM();
|
|
19
|
+
|
|
20
|
+
// @lumino/dragdrop (pulled in transitively by the categories) extends the DragEvent DOM global at
|
|
21
|
+
// module load, which JSDOM does not provide; stub it so the imports succeed.
|
|
22
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
23
|
+
if (!(global as any).DragEvent) {
|
|
24
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
25
|
+
(global as any).DragEvent = class DragEvent extends (global as any).Event { };
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
import { FrontendApplicationConfigProvider } from '@theia/core/lib/browser/frontend-application-config-provider';
|
|
29
|
+
// Mocha loads every spec into one process and `set` throws if called twice, so guard it.
|
|
30
|
+
try {
|
|
31
|
+
FrontendApplicationConfigProvider.get();
|
|
32
|
+
} catch {
|
|
33
|
+
FrontendApplicationConfigProvider.set({});
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
import { expect } from 'chai';
|
|
37
|
+
import { PreferenceSchema } from '@theia/core';
|
|
38
|
+
import { aiCorePreferenceSchema } from '@theia/ai-core/lib/common/ai-core-preferences';
|
|
39
|
+
import { AgentSettingsPreferenceSchema } from '@theia/ai-core/lib/common/agent-preferences';
|
|
40
|
+
import { aiChatPreferences } from '@theia/ai-chat/lib/common/ai-chat-preferences';
|
|
41
|
+
import { chatToolPreferences } from '@theia/ai-chat/lib/common/chat-tool-preferences';
|
|
42
|
+
import { shellCommandPreferences } from '@theia/ai-terminal/lib/common/shell-command-preferences';
|
|
43
|
+
import { aiIdePreferenceSchema } from '../../common/ai-ide-preferences';
|
|
44
|
+
import { GeneralConfigurationCategory } from './categories/general-configuration-category';
|
|
45
|
+
import { AgentsConfigurationCategory } from './categories/agents-configuration-category';
|
|
46
|
+
import { ToolsConfigurationCategory } from './categories/tools-configuration-category';
|
|
47
|
+
import { ModelAliasesConfigurationCategory } from './categories/model-aliases-configuration-category';
|
|
48
|
+
import { PromptsAndSkillsConfigurationCategory } from './categories/prompts-and-skills-configuration-category';
|
|
49
|
+
|
|
50
|
+
disableJSDOM();
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* The schemas that declare the `ai-features.*` preferences the categories below claim. Kept explicit
|
|
54
|
+
* rather than read from a live `PreferenceSchemaService`, so the check does not depend on DI.
|
|
55
|
+
*/
|
|
56
|
+
const SCHEMAS: PreferenceSchema[] = [
|
|
57
|
+
aiCorePreferenceSchema,
|
|
58
|
+
AgentSettingsPreferenceSchema,
|
|
59
|
+
aiChatPreferences,
|
|
60
|
+
chatToolPreferences,
|
|
61
|
+
shellCommandPreferences,
|
|
62
|
+
aiIdePreferenceSchema
|
|
63
|
+
];
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Categories with a statically declared ownership list. `ModelsConfigurationCategory` derives its ids
|
|
67
|
+
* from the registered schema at runtime and `McpServersConfigurationCategory` lives in `@theia/ai-mcp`
|
|
68
|
+
* (not a dependency of this package), so neither is covered here.
|
|
69
|
+
*/
|
|
70
|
+
function ownershipByCategory(): Map<string, string[]> {
|
|
71
|
+
const categories = [
|
|
72
|
+
new GeneralConfigurationCategory(),
|
|
73
|
+
new AgentsConfigurationCategory(),
|
|
74
|
+
new ToolsConfigurationCategory(),
|
|
75
|
+
new ModelAliasesConfigurationCategory(),
|
|
76
|
+
new PromptsAndSkillsConfigurationCategory()
|
|
77
|
+
];
|
|
78
|
+
return new Map(categories.map(category => [category.id, category.getOwnedPreferenceIds()]));
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
describe('AI configuration preference ownership', () => {
|
|
82
|
+
|
|
83
|
+
before(() => disableJSDOM = enableJSDOM());
|
|
84
|
+
after(() => disableJSDOM());
|
|
85
|
+
|
|
86
|
+
it('reads a non-empty schema and ownership set (guards the checks below against passing vacuously)', () => {
|
|
87
|
+
const declared = SCHEMAS.flatMap(schema => Object.keys(schema.properties ?? {}));
|
|
88
|
+
expect(declared).to.include('ai-features.AiEnable.enableAI');
|
|
89
|
+
for (const [categoryId, ownedIds] of ownershipByCategory()) {
|
|
90
|
+
expect(ownedIds, `${categoryId} declares no owned preference ids`).to.not.be.empty;
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
it('claims only preference ids that a schema actually declares', () => {
|
|
95
|
+
const declared = new Set(SCHEMAS.flatMap(schema => Object.keys(schema.properties ?? {})));
|
|
96
|
+
const unknown: string[] = [];
|
|
97
|
+
for (const [categoryId, ownedIds] of ownershipByCategory()) {
|
|
98
|
+
for (const preferenceId of ownedIds) {
|
|
99
|
+
if (!declared.has(preferenceId)) {
|
|
100
|
+
unknown.push(`${categoryId} -> ${preferenceId}`);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
// A typo or a renamed preference makes the id unclaimed, so General's catch-all silently renders it
|
|
105
|
+
// a second time. Nothing else fails, which is why this is worth asserting.
|
|
106
|
+
expect(unknown, `categories claim preference ids that no schema declares: ${unknown.join(', ')}`).to.be.empty;
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
it('never lets two categories claim the same preference id', () => {
|
|
110
|
+
const owners = new Map<string, string[]>();
|
|
111
|
+
for (const [categoryId, ownedIds] of ownershipByCategory()) {
|
|
112
|
+
for (const preferenceId of ownedIds) {
|
|
113
|
+
owners.set(preferenceId, [...(owners.get(preferenceId) ?? []), categoryId]);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
const contested = [...owners.entries()]
|
|
117
|
+
.filter(([, categoryIds]) => categoryIds.length > 1)
|
|
118
|
+
.map(([preferenceId, categoryIds]) => `${preferenceId} (${categoryIds.join(', ')})`);
|
|
119
|
+
expect(contested, `preference ids claimed more than once: ${contested.join(', ')}`).to.be.empty;
|
|
120
|
+
});
|
|
121
|
+
|
|
122
|
+
it('claims every id it renders as a row, so the General catch-all does not duplicate it', () => {
|
|
123
|
+
// The ownership contract only holds if a category claims what it renders. Spot-check the two
|
|
124
|
+
// categories whose rows are hand-authored (rather than derived from their ownership list).
|
|
125
|
+
const general = new GeneralConfigurationCategory();
|
|
126
|
+
const agents = new AgentsConfigurationCategory();
|
|
127
|
+
const generalOwned = new Set(general.getOwnedPreferenceIds());
|
|
128
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
129
|
+
const generalRendered = ((general as any).getSectionRefs() as { preferenceId: string }[]).map(ref => ref.preferenceId);
|
|
130
|
+
const missing = generalRendered.filter(preferenceId => !generalOwned.has(preferenceId));
|
|
131
|
+
expect(missing, `General renders rows it does not claim: ${missing.join(', ')}`).to.be.empty;
|
|
132
|
+
// The agent page's own rows are covered by its ownership list too.
|
|
133
|
+
expect(agents.getOwnedPreferenceIds()).to.include('ai-features.agentSettings');
|
|
134
|
+
});
|
|
135
|
+
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// *****************************************************************************
|
|
2
|
-
// Copyright (C)
|
|
2
|
+
// Copyright (C) 2026 EclipseSource GmbH.
|
|
3
3
|
//
|
|
4
4
|
// This program and the accompanying materials are made available under the
|
|
5
5
|
// terms of the Eclipse Public License v. 2.0 which is available at
|
|
@@ -13,25 +13,15 @@
|
|
|
13
13
|
//
|
|
14
14
|
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
15
15
|
// *****************************************************************************
|
|
16
|
-
import * as React from '@theia/core/shared/react';
|
|
17
16
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
17
|
+
import URI from '@theia/core/lib/common/uri';
|
|
18
|
+
|
|
19
|
+
/** URI scheme identifying the AI Configuration view for Theia's breadcrumbs infrastructure. */
|
|
20
|
+
export const AI_CONFIGURATION_RESOURCE_SCHEME = 'ai-configuration';
|
|
23
21
|
|
|
24
22
|
/**
|
|
25
|
-
*
|
|
26
|
-
*
|
|
23
|
+
* The stable resource URI of the AI Configuration view. It is constant (the current
|
|
24
|
+
* category/item is read from the selection model), mirroring how an editor keeps its file URI
|
|
25
|
+
* while its breadcrumb content changes with the cursor.
|
|
27
26
|
*/
|
|
28
|
-
export const
|
|
29
|
-
<div className={`ai-configuration-section ${className || ''}`}>
|
|
30
|
-
<div className='settings-section-title settings-section-category-title'>
|
|
31
|
-
{title}
|
|
32
|
-
</div>
|
|
33
|
-
<div className='ai-configuration-section-content'>
|
|
34
|
-
{children}
|
|
35
|
-
</div>
|
|
36
|
-
</div>
|
|
37
|
-
);
|
|
27
|
+
export const AI_CONFIGURATION_RESOURCE_URI = new URI(`${AI_CONFIGURATION_RESOURCE_SCHEME}:/`);
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
// *****************************************************************************
|
|
2
|
+
// Copyright (C) 2026 EclipseSource and others.
|
|
3
|
+
//
|
|
4
|
+
// This program and the accompanying materials are made available under the
|
|
5
|
+
// terms of the Eclipse Public License v. 2.0 which is available at
|
|
6
|
+
// http://www.eclipse.org/legal/epl-2.0.
|
|
7
|
+
//
|
|
8
|
+
// This Source Code may also be made available under the following Secondary
|
|
9
|
+
// Licenses when the conditions for such availability set forth in the Eclipse
|
|
10
|
+
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
11
|
+
// with the GNU Classpath Exception which is available at
|
|
12
|
+
// https://www.gnu.org/software/classpath/license.html.
|
|
13
|
+
//
|
|
14
|
+
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
15
|
+
// *****************************************************************************
|
|
16
|
+
|
|
17
|
+
import * as React from '@theia/core/shared/react';
|
|
18
|
+
import { Emitter, Event, nls } from '@theia/core';
|
|
19
|
+
import { injectable, postConstruct } from '@theia/core/shared/inversify';
|
|
20
|
+
import { codicon, ReactWidget } from '@theia/core/lib/browser';
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* The search box above the category tree. It emits {@link onDidChangeFilter} so the tree can
|
|
24
|
+
* live-filter its nodes; filtering the tree is the only search affordance.
|
|
25
|
+
*/
|
|
26
|
+
@injectable()
|
|
27
|
+
export class AiConfigurationSearchWidget extends ReactWidget {
|
|
28
|
+
|
|
29
|
+
static readonly ID = 'ai-configuration-search';
|
|
30
|
+
|
|
31
|
+
protected readonly onDidChangeFilterEmitter = new Emitter<string>();
|
|
32
|
+
readonly onDidChangeFilter: Event<string> = this.onDidChangeFilterEmitter.event;
|
|
33
|
+
|
|
34
|
+
protected readonly onDidRequestExpandAllEmitter = new Emitter<void>();
|
|
35
|
+
/** Fired by the "Expand All" toolbar button below the search input. */
|
|
36
|
+
readonly onDidRequestExpandAll: Event<void> = this.onDidRequestExpandAllEmitter.event;
|
|
37
|
+
|
|
38
|
+
protected readonly onDidRequestCollapseAllEmitter = new Emitter<void>();
|
|
39
|
+
/** Fired by the "Collapse All" toolbar button below the search input. */
|
|
40
|
+
readonly onDidRequestCollapseAll: Event<void> = this.onDidRequestCollapseAllEmitter.event;
|
|
41
|
+
|
|
42
|
+
/** Whether the tree has any expandable category, and whether all of them are currently expanded. */
|
|
43
|
+
protected hasExpandable = false;
|
|
44
|
+
protected allExpanded = false;
|
|
45
|
+
|
|
46
|
+
@postConstruct()
|
|
47
|
+
protected init(): void {
|
|
48
|
+
this.id = AiConfigurationSearchWidget.ID;
|
|
49
|
+
this.addClass('ai-configuration-search');
|
|
50
|
+
this.toDispose.push(this.onDidChangeFilterEmitter);
|
|
51
|
+
this.toDispose.push(this.onDidRequestExpandAllEmitter);
|
|
52
|
+
this.toDispose.push(this.onDidRequestCollapseAllEmitter);
|
|
53
|
+
this.update();
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/** Updates the expand/collapse-all toggle to reflect the tree's current expansion. */
|
|
57
|
+
setTreeExpansion(hasExpandable: boolean, allExpanded: boolean): void {
|
|
58
|
+
if (this.hasExpandable !== hasExpandable || this.allExpanded !== allExpanded) {
|
|
59
|
+
this.hasExpandable = hasExpandable;
|
|
60
|
+
this.allExpanded = allExpanded;
|
|
61
|
+
this.update();
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
protected onExpandAll = (): void => this.onDidRequestExpandAllEmitter.fire();
|
|
66
|
+
protected onCollapseAll = (): void => this.onDidRequestCollapseAllEmitter.fire();
|
|
67
|
+
protected onQueryChange = (query: string): void => this.onDidChangeFilterEmitter.fire(query);
|
|
68
|
+
|
|
69
|
+
protected render(): React.ReactNode {
|
|
70
|
+
return <React.Fragment>
|
|
71
|
+
{/* The input owns its value via React state so the caret is preserved while typing; a
|
|
72
|
+
ReactWidget re-render (e.g. the toolbar toggle below) would otherwise reset the caret. */}
|
|
73
|
+
<AiConfigurationSearchInput onQueryChange={this.onQueryChange} />
|
|
74
|
+
{this.hasExpandable && <div className='ai-configuration-tree-toolbar'>
|
|
75
|
+
{/* A single contextual toggle: Collapse All while everything is expanded, Expand All otherwise. */}
|
|
76
|
+
{this.allExpanded
|
|
77
|
+
? <button
|
|
78
|
+
type='button'
|
|
79
|
+
className={`ai-configuration-tree-toolbar-button ${codicon('collapse-all')}`}
|
|
80
|
+
title={nls.localizeByDefault('Collapse All')}
|
|
81
|
+
onClick={this.onCollapseAll}
|
|
82
|
+
></button>
|
|
83
|
+
: <button
|
|
84
|
+
type='button'
|
|
85
|
+
className={`ai-configuration-tree-toolbar-button ${codicon('expand-all')}`}
|
|
86
|
+
title={nls.localizeByDefault('Expand All')}
|
|
87
|
+
onClick={this.onExpandAll}
|
|
88
|
+
></button>}
|
|
89
|
+
</div>}
|
|
90
|
+
</React.Fragment>;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* The search box, as a functional component so its value lives in React state. Typing therefore preserves
|
|
96
|
+
* the caret position (editing mid-string no longer jumps to the end, which happened when the enclosing
|
|
97
|
+
* ReactWidget re-rendered the controlled input out of band). Notifies the owner via {@link onQueryChange}.
|
|
98
|
+
*/
|
|
99
|
+
const AiConfigurationSearchInput: React.FC<{ onQueryChange: (query: string) => void }> = ({ onQueryChange }) => {
|
|
100
|
+
const [query, setQuery] = React.useState('');
|
|
101
|
+
const change = React.useCallback((event: React.ChangeEvent<HTMLInputElement>) => {
|
|
102
|
+
setQuery(event.target.value);
|
|
103
|
+
onQueryChange(event.target.value);
|
|
104
|
+
}, [onQueryChange]);
|
|
105
|
+
const clear = React.useCallback(() => {
|
|
106
|
+
setQuery('');
|
|
107
|
+
onQueryChange('');
|
|
108
|
+
}, [onQueryChange]);
|
|
109
|
+
const onKeyDown = React.useCallback((event: React.KeyboardEvent<HTMLInputElement>) => {
|
|
110
|
+
if (event.key === 'Escape' && query.length > 0) {
|
|
111
|
+
event.preventDefault();
|
|
112
|
+
clear();
|
|
113
|
+
}
|
|
114
|
+
}, [query, clear]);
|
|
115
|
+
const clearLabel = nls.localizeByDefault('Clear');
|
|
116
|
+
return <div className='ai-configuration-search-wrap'>
|
|
117
|
+
<span className={`ai-configuration-search-icon ${codicon('search')}`}></span>
|
|
118
|
+
<input
|
|
119
|
+
className='theia-input ai-configuration-search-input'
|
|
120
|
+
type='text'
|
|
121
|
+
spellCheck={false}
|
|
122
|
+
placeholder={nls.localize('theia/ai/core/aiConfiguration/searchPlaceholder', 'Search AI settings')}
|
|
123
|
+
value={query}
|
|
124
|
+
onChange={change}
|
|
125
|
+
onKeyDown={onKeyDown}
|
|
126
|
+
/>
|
|
127
|
+
{query.length > 0 && <button
|
|
128
|
+
type='button'
|
|
129
|
+
className={`ai-configuration-search-clear ${codicon('close')}`}
|
|
130
|
+
title={clearLabel}
|
|
131
|
+
aria-label={clearLabel}
|
|
132
|
+
onClick={clear}
|
|
133
|
+
></button>}
|
|
134
|
+
</div>;
|
|
135
|
+
};
|