@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,91 @@
|
|
|
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 { expect } from 'chai';
|
|
18
|
+
import { AiConfigurationSearchItem } from '@theia/ai-core-ui/lib/browser/ai-configuration/ai-configuration-category';
|
|
19
|
+
import { AiConfigurationSearch } from './ai-configuration-search';
|
|
20
|
+
|
|
21
|
+
function item(label: string, options?: Partial<AiConfigurationSearchItem>): AiConfigurationSearchItem {
|
|
22
|
+
return {
|
|
23
|
+
label,
|
|
24
|
+
typeLabel: options?.typeLabel ?? 'Setting',
|
|
25
|
+
categoryId: options?.categoryId ?? 'general',
|
|
26
|
+
target: options?.target ?? { categoryId: options?.categoryId ?? 'general' },
|
|
27
|
+
keywords: options?.keywords
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
describe('AiConfigurationSearch', () => {
|
|
32
|
+
|
|
33
|
+
describe('terms', () => {
|
|
34
|
+
it('splits on whitespace, lower-cases, and drops empties', () => {
|
|
35
|
+
expect(AiConfigurationSearch.terms(' Default Chat ')).to.deep.equal(['default', 'chat']);
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
it('returns an empty array for a blank query', () => {
|
|
39
|
+
expect(AiConfigurationSearch.terms(' ')).to.deep.equal([]);
|
|
40
|
+
});
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
describe('matchKey', () => {
|
|
44
|
+
it('folds label, keywords, and type label into a lower-cased key', () => {
|
|
45
|
+
const key = AiConfigurationSearch.matchKey(item('Default Chat Agent', { typeLabel: 'Agent', keywords: 'orchestrator id-42' }));
|
|
46
|
+
expect(key).to.equal('default chat agent orchestrator id-42 agent');
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
it('omits missing keywords', () => {
|
|
50
|
+
expect(AiConfigurationSearch.matchKey(item('MCP Server', { typeLabel: 'MCP Server' }))).to.equal('mcp server mcp server');
|
|
51
|
+
});
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
describe('matchesTerms', () => {
|
|
55
|
+
const index = [
|
|
56
|
+
item('Default Chat Agent', { typeLabel: 'Agent', categoryId: 'agents', keywords: 'orchestrator' }),
|
|
57
|
+
item('Universal', { typeLabel: 'Agent', categoryId: 'agents' }),
|
|
58
|
+
item('Filesystem', { typeLabel: 'MCP Server', categoryId: 'mcp-servers', keywords: 'files' }),
|
|
59
|
+
item('Enable AI Features', { typeLabel: 'Setting', categoryId: 'general' })
|
|
60
|
+
];
|
|
61
|
+
|
|
62
|
+
/** Mirrors how the tree filter combines the helpers: `terms` once, then `matchesTerms` per item. */
|
|
63
|
+
function matching(query: string): string[] {
|
|
64
|
+
const searchTerms = AiConfigurationSearch.terms(query);
|
|
65
|
+
return index
|
|
66
|
+
.filter(candidate => AiConfigurationSearch.matchesTerms(AiConfigurationSearch.matchKey(candidate), searchTerms))
|
|
67
|
+
.map(candidate => candidate.label);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
it('matches every item for a blank query', () => {
|
|
71
|
+
expect(matching(' ')).to.have.length(index.length);
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
it('requires every term to be present (AND semantics)', () => {
|
|
75
|
+
expect(matching('chat agent')).to.deep.equal(['Default Chat Agent']);
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
it('matches against keywords and type label', () => {
|
|
79
|
+
expect(matching('orchestrator')).to.deep.equal(['Default Chat Agent']);
|
|
80
|
+
expect(matching('mcp')).to.deep.equal(['Filesystem']);
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
it('is case-insensitive', () => {
|
|
84
|
+
expect(matching('UNIVERSAL')).to.deep.equal(['Universal']);
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
it('matches on substrings', () => {
|
|
88
|
+
expect(matching('a')).to.deep.equal(['Default Chat Agent', 'Universal', 'Enable AI Features']);
|
|
89
|
+
});
|
|
90
|
+
});
|
|
91
|
+
});
|
|
@@ -0,0 +1,43 @@
|
|
|
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 { AiConfigurationSearchItem } from '@theia/ai-core-ui/lib/browser/ai-configuration/ai-configuration-category';
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Pure matching helpers for the tree-level (deep) search. Kept free of any DOM
|
|
21
|
+
* or DI dependency so the tree filter can reuse it and it can be unit-tested in
|
|
22
|
+
* isolation.
|
|
23
|
+
*
|
|
24
|
+
* Match semantics: every whitespace-separated term of the query must appear in
|
|
25
|
+
* the item's match key (`label + keywords + typeLabel`, lower-cased).
|
|
26
|
+
*/
|
|
27
|
+
export namespace AiConfigurationSearch {
|
|
28
|
+
|
|
29
|
+
/** The lower-cased text a search item is matched against. */
|
|
30
|
+
export function matchKey(item: AiConfigurationSearchItem): string {
|
|
31
|
+
return `${item.label} ${item.keywords ?? ''} ${item.typeLabel}`.toLowerCase();
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/** Splits a query into lower-cased, non-empty terms. */
|
|
35
|
+
export function terms(query: string): string[] {
|
|
36
|
+
return query.trim().toLowerCase().split(/\s+/).filter(term => term.length > 0);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/** Returns whether every term is present in `key`. */
|
|
40
|
+
export function matchesTerms(key: string, searchTerms: string[]): boolean {
|
|
41
|
+
return searchTerms.every(term => key.includes(term));
|
|
42
|
+
}
|
|
43
|
+
}
|
package/src/browser/ai-configuration/{components/empty-state.tsx → ai-configuration-tree-model.ts}
RENAMED
|
@@ -13,18 +13,14 @@
|
|
|
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
|
-
className?: string;
|
|
21
|
-
}
|
|
17
|
+
import { injectable } from '@theia/core/shared/inversify';
|
|
18
|
+
import { TreeModelImpl } from '@theia/core/lib/browser';
|
|
22
19
|
|
|
23
20
|
/**
|
|
24
|
-
*
|
|
21
|
+
* Tree model backing the AI Configuration category tree. A dedicated subclass so
|
|
22
|
+
* adopters can rebind/customize the model in {@link createAiConfigurationTreeContainer}.
|
|
25
23
|
*/
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
</div>
|
|
30
|
-
);
|
|
24
|
+
@injectable()
|
|
25
|
+
export class AiConfigurationTreeModel extends TreeModelImpl {
|
|
26
|
+
}
|
|
@@ -0,0 +1,150 @@
|
|
|
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 { expect } from 'chai';
|
|
18
|
+
import { CompositeTreeNode } from '@theia/core/lib/browser/tree/tree';
|
|
19
|
+
import { ExpandableTreeNode } from '@theia/core/lib/browser/tree/tree-expansion';
|
|
20
|
+
import { AiConfigurationCategory, AiConfigurationTreeItem } from '@theia/ai-core-ui/lib/browser/ai-configuration/ai-configuration-category';
|
|
21
|
+
import { AiConfigurationCategoryNode, AiConfigurationItemNode, AiConfigurationSeparatorNode, AiConfigurationTree } from './ai-configuration-tree-nodes';
|
|
22
|
+
|
|
23
|
+
function category(id: string, kind: 'single-page' | 'collection', options?: {
|
|
24
|
+
contributed?: boolean;
|
|
25
|
+
items?: AiConfigurationTreeItem[];
|
|
26
|
+
}): AiConfigurationCategory {
|
|
27
|
+
return {
|
|
28
|
+
id,
|
|
29
|
+
label: id.toUpperCase(),
|
|
30
|
+
iconClass: 'codicon codicon-gear',
|
|
31
|
+
kind,
|
|
32
|
+
contributed: options?.contributed,
|
|
33
|
+
renderer: {
|
|
34
|
+
getTreeChildren: kind === 'collection' ? () => options?.items ?? [] : undefined
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
describe('AiConfigurationTree.buildRoot', () => {
|
|
40
|
+
|
|
41
|
+
it('builds an empty invisible root when there are no categories', () => {
|
|
42
|
+
const root = AiConfigurationTree.buildRoot([]);
|
|
43
|
+
expect(root.id).to.equal(AiConfigurationTree.ROOT_ID);
|
|
44
|
+
expect(root.visible).to.equal(false);
|
|
45
|
+
expect(root.children).to.have.length(0);
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
it('creates a non-expandable node for a single-page category', () => {
|
|
49
|
+
const root = AiConfigurationTree.buildRoot([category('general', 'single-page')]);
|
|
50
|
+
const node = root.children[0] as AiConfigurationCategoryNode;
|
|
51
|
+
expect(AiConfigurationCategoryNode.is(node)).to.equal(true);
|
|
52
|
+
expect(node.id).to.equal(AiConfigurationTree.categoryNodeId('general'));
|
|
53
|
+
expect(ExpandableTreeNode.is(node)).to.equal(false);
|
|
54
|
+
expect(node.children).to.have.length(0);
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
it('creates an expandable node with item children for a non-empty collection', () => {
|
|
58
|
+
const items: AiConfigurationTreeItem[] = [
|
|
59
|
+
{ id: 'a', label: 'Agent A' },
|
|
60
|
+
{ id: 'b', label: 'Agent B' }
|
|
61
|
+
];
|
|
62
|
+
const root = AiConfigurationTree.buildRoot([category('agents', 'collection', { items })]);
|
|
63
|
+
const node = root.children[0] as AiConfigurationCategoryNode;
|
|
64
|
+
// Expandable, but collapsed by default (categories start collapsed).
|
|
65
|
+
expect(ExpandableTreeNode.is(node)).to.equal(true);
|
|
66
|
+
expect(ExpandableTreeNode.isExpanded(node)).to.equal(false);
|
|
67
|
+
expect(node.children.map(c => c.id)).to.deep.equal([
|
|
68
|
+
AiConfigurationTree.itemNodeId('agents', 'a'),
|
|
69
|
+
AiConfigurationTree.itemNodeId('agents', 'b')
|
|
70
|
+
]);
|
|
71
|
+
const [first] = node.children;
|
|
72
|
+
expect(AiConfigurationItemNode.is(first)).to.equal(true);
|
|
73
|
+
expect(first.name).to.equal('Agent A');
|
|
74
|
+
expect(first.parent).to.equal(node);
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
it("carries an item's status onto its node, so the tree can show it as a dot", () => {
|
|
78
|
+
const items: AiConfigurationTreeItem[] = [
|
|
79
|
+
{ id: 'github', label: 'GitHub', status: { kind: 'on', label: 'Running' } },
|
|
80
|
+
{ id: 'local', label: 'Local', status: { kind: 'error', label: 'Errored', tooltip: 'spawn failed' } },
|
|
81
|
+
{ id: 'plain', label: 'Plain' }
|
|
82
|
+
];
|
|
83
|
+
const root = AiConfigurationTree.buildRoot([category('mcp-servers', 'collection', { items })]);
|
|
84
|
+
const children = (root.children[0] as AiConfigurationCategoryNode).children as AiConfigurationItemNode[];
|
|
85
|
+
|
|
86
|
+
expect(children.map(child => child.status?.kind)).to.deep.equal(['on', 'error', undefined]);
|
|
87
|
+
expect(children[1].status?.tooltip).to.equal('spawn failed');
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
it('keeps the first of two items claiming the same id, since a node is addressed by its id', () => {
|
|
91
|
+
const items: AiConfigurationTreeItem[] = [
|
|
92
|
+
{ id: 'code-reviewer', label: 'Code Reviewer' },
|
|
93
|
+
{ id: 'code-reviewer', label: 'Code Reviewer (copy)' },
|
|
94
|
+
{ id: 'coder', label: 'Coder' }
|
|
95
|
+
];
|
|
96
|
+
const root = AiConfigurationTree.buildRoot([category('agents', 'collection', { items })]);
|
|
97
|
+
const children = (root.children[0] as AiConfigurationCategoryNode).children as AiConfigurationItemNode[];
|
|
98
|
+
|
|
99
|
+
expect(children.map(child => child.name)).to.deep.equal(['Code Reviewer', 'Coder']);
|
|
100
|
+
expect(new Set(children.map(child => child.id)).size).to.equal(children.length);
|
|
101
|
+
});
|
|
102
|
+
|
|
103
|
+
it('marks an empty collection as non-expandable', () => {
|
|
104
|
+
const root = AiConfigurationTree.buildRoot([category('variables', 'collection', { items: [] })]);
|
|
105
|
+
const node = root.children[0] as AiConfigurationCategoryNode;
|
|
106
|
+
expect(ExpandableTreeNode.is(node)).to.equal(false);
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
it('preserves the previous expansion state', () => {
|
|
110
|
+
const items: AiConfigurationTreeItem[] = [{ id: 'a', label: 'Agent A' }];
|
|
111
|
+
const root = AiConfigurationTree.buildRoot([category('agents', 'collection', { items })], {
|
|
112
|
+
isExpanded: id => id === 'agents' ? false : undefined
|
|
113
|
+
});
|
|
114
|
+
const node = root.children[0] as AiConfigurationCategoryNode;
|
|
115
|
+
expect(ExpandableTreeNode.isCollapsed(node)).to.equal(true);
|
|
116
|
+
});
|
|
117
|
+
|
|
118
|
+
it('inserts a single separator before the first contributed category, preserving order', () => {
|
|
119
|
+
const root = AiConfigurationTree.buildRoot([
|
|
120
|
+
category('agents', 'collection', { items: [] }),
|
|
121
|
+
category('tools', 'single-page'),
|
|
122
|
+
category('sample-ext', 'single-page', { contributed: true }),
|
|
123
|
+
category('other-ext', 'single-page', { contributed: true })
|
|
124
|
+
]);
|
|
125
|
+
const ids = root.children.map(child => child.id);
|
|
126
|
+
expect(ids).to.deep.equal([
|
|
127
|
+
AiConfigurationTree.categoryNodeId('agents'),
|
|
128
|
+
AiConfigurationTree.categoryNodeId('tools'),
|
|
129
|
+
AiConfigurationTree.CONTRIBUTED_SEPARATOR_ID,
|
|
130
|
+
AiConfigurationTree.categoryNodeId('sample-ext'),
|
|
131
|
+
AiConfigurationTree.categoryNodeId('other-ext')
|
|
132
|
+
]);
|
|
133
|
+
const separator = root.children.find(AiConfigurationSeparatorNode.is);
|
|
134
|
+
expect(separator).to.not.equal(undefined);
|
|
135
|
+
expect(root.children.filter(AiConfigurationSeparatorNode.is)).to.have.length(1);
|
|
136
|
+
});
|
|
137
|
+
|
|
138
|
+
it('omits the separator when there are no contributed categories', () => {
|
|
139
|
+
const root = AiConfigurationTree.buildRoot([category('general', 'single-page')]);
|
|
140
|
+
expect(root.children.some(AiConfigurationSeparatorNode.is)).to.equal(false);
|
|
141
|
+
});
|
|
142
|
+
|
|
143
|
+
it('wires child siblings via CompositeTreeNode', () => {
|
|
144
|
+
const items: AiConfigurationTreeItem[] = [{ id: 'a', label: 'A' }, { id: 'b', label: 'B' }];
|
|
145
|
+
const root = AiConfigurationTree.buildRoot([category('agents', 'collection', { items })]);
|
|
146
|
+
const node = root.children[0] as AiConfigurationCategoryNode;
|
|
147
|
+
expect(CompositeTreeNode.is(node)).to.equal(true);
|
|
148
|
+
expect(node.children[0].nextSibling).to.equal(node.children[1]);
|
|
149
|
+
});
|
|
150
|
+
});
|
|
@@ -0,0 +1,167 @@
|
|
|
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 { CompositeTreeNode, TreeNode } from '@theia/core/lib/browser/tree/tree';
|
|
19
|
+
import { SelectableTreeNode } from '@theia/core/lib/browser/tree/tree-selection';
|
|
20
|
+
import { AiConfigurationCategory, AiConfigurationItemStatus, AiConfigurationTreeItem } from '@theia/ai-core-ui/lib/browser/ai-configuration/ai-configuration-category';
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Top-level node representing a single {@link AiConfigurationCategory}.
|
|
24
|
+
* Carries the `expanded` property (making it an `ExpandableTreeNode`) only when
|
|
25
|
+
* the category is a non-empty collection.
|
|
26
|
+
*/
|
|
27
|
+
export interface AiConfigurationCategoryNode extends SelectableTreeNode, CompositeTreeNode {
|
|
28
|
+
readonly type: 'category';
|
|
29
|
+
readonly categoryId: string;
|
|
30
|
+
readonly iconClass: string;
|
|
31
|
+
readonly contributed: boolean;
|
|
32
|
+
children: AiConfigurationItemNode[];
|
|
33
|
+
expanded?: boolean;
|
|
34
|
+
selected: boolean;
|
|
35
|
+
}
|
|
36
|
+
export namespace AiConfigurationCategoryNode {
|
|
37
|
+
export function is(node: TreeNode | undefined): node is AiConfigurationCategoryNode {
|
|
38
|
+
return !!node && (node as AiConfigurationCategoryNode).type === 'category';
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/** Child node representing one item of a collection category. */
|
|
43
|
+
export interface AiConfigurationItemNode extends SelectableTreeNode {
|
|
44
|
+
readonly type: 'item';
|
|
45
|
+
readonly categoryId: string;
|
|
46
|
+
readonly itemId: string;
|
|
47
|
+
readonly iconClass: string;
|
|
48
|
+
/** The item's state, as the tree shows it: a dot next to the label (e.g. an MCP server that is running). */
|
|
49
|
+
readonly status?: AiConfigurationItemStatus;
|
|
50
|
+
selected: boolean;
|
|
51
|
+
}
|
|
52
|
+
export namespace AiConfigurationItemNode {
|
|
53
|
+
export function is(node: TreeNode | undefined): node is AiConfigurationItemNode {
|
|
54
|
+
return !!node && (node as AiConfigurationItemNode).type === 'item';
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/** Non-selectable separator introducing the "Contributed by extensions" group. */
|
|
59
|
+
export interface AiConfigurationSeparatorNode extends TreeNode {
|
|
60
|
+
readonly type: 'separator';
|
|
61
|
+
}
|
|
62
|
+
export namespace AiConfigurationSeparatorNode {
|
|
63
|
+
export function is(node: TreeNode | undefined): node is AiConfigurationSeparatorNode {
|
|
64
|
+
return !!node && (node as AiConfigurationSeparatorNode).type === 'separator';
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export interface AiConfigurationTreeBuildOptions {
|
|
69
|
+
/** Returns the previous expansion state of a category, to preserve it across rebuilds. */
|
|
70
|
+
isExpanded?(categoryId: string): boolean | undefined;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Builds the (invisible) root of the AI Configuration category tree from the
|
|
75
|
+
* ordered list of categories. Extracted as a pure function so the tree shape
|
|
76
|
+
* (children, separator, expansion) can be tested without a DOM.
|
|
77
|
+
*/
|
|
78
|
+
export namespace AiConfigurationTree {
|
|
79
|
+
|
|
80
|
+
export const ROOT_ID = 'ai-configuration-tree-root';
|
|
81
|
+
export const CONTRIBUTED_SEPARATOR_ID = 'ai-configuration-contributed-separator';
|
|
82
|
+
|
|
83
|
+
export function categoryNodeId(categoryId: string): string {
|
|
84
|
+
return `category:${categoryId}`;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export function itemNodeId(categoryId: string, itemId: string): string {
|
|
88
|
+
return `item:${categoryId}:${itemId}`;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export function buildRoot(categories: AiConfigurationCategory[], options?: AiConfigurationTreeBuildOptions): CompositeTreeNode {
|
|
92
|
+
const root: CompositeTreeNode = {
|
|
93
|
+
id: ROOT_ID,
|
|
94
|
+
parent: undefined,
|
|
95
|
+
visible: false,
|
|
96
|
+
children: []
|
|
97
|
+
};
|
|
98
|
+
let separatorAdded = false;
|
|
99
|
+
for (const category of categories) {
|
|
100
|
+
if (category.contributed && !separatorAdded) {
|
|
101
|
+
CompositeTreeNode.addChild(root, createSeparatorNode());
|
|
102
|
+
separatorAdded = true;
|
|
103
|
+
}
|
|
104
|
+
const items = category.kind === 'collection' ? (category.renderer.getTreeChildren?.() ?? []) : [];
|
|
105
|
+
const categoryNode = createCategoryNode(category, items, options);
|
|
106
|
+
CompositeTreeNode.addChild(root, categoryNode);
|
|
107
|
+
// A tree node is addressed by its id (selection, navigation, expansion), so two items claiming the
|
|
108
|
+
// same id cannot both be nodes. Keep the first and skip the rest deterministically rather than
|
|
109
|
+
// leaving it to the tree model; the category's overview lists every one of them and flags the
|
|
110
|
+
// clash, which is where the user can see that something needs fixing.
|
|
111
|
+
const usedItemIds = new Set<string>();
|
|
112
|
+
for (const item of items) {
|
|
113
|
+
if (usedItemIds.has(item.id)) {
|
|
114
|
+
continue;
|
|
115
|
+
}
|
|
116
|
+
usedItemIds.add(item.id);
|
|
117
|
+
CompositeTreeNode.addChild(categoryNode, createItemNode(category, item));
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
return root;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
function createCategoryNode(category: AiConfigurationCategory, items: AiConfigurationTreeItem[], options?: AiConfigurationTreeBuildOptions): AiConfigurationCategoryNode {
|
|
124
|
+
const collection = category.kind === 'collection';
|
|
125
|
+
const node: AiConfigurationCategoryNode = {
|
|
126
|
+
type: 'category',
|
|
127
|
+
id: categoryNodeId(category.id),
|
|
128
|
+
categoryId: category.id,
|
|
129
|
+
name: category.label,
|
|
130
|
+
iconClass: category.iconClass,
|
|
131
|
+
contributed: !!category.contributed,
|
|
132
|
+
parent: undefined,
|
|
133
|
+
children: [],
|
|
134
|
+
selected: false
|
|
135
|
+
};
|
|
136
|
+
if (collection && items.length > 0) {
|
|
137
|
+
// Categories start collapsed; a rebuild preserves whatever state the user had.
|
|
138
|
+
node.expanded = options?.isExpanded?.(category.id) ?? false;
|
|
139
|
+
}
|
|
140
|
+
return node;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
function createItemNode(category: AiConfigurationCategory, item: AiConfigurationTreeItem): AiConfigurationItemNode {
|
|
144
|
+
return {
|
|
145
|
+
type: 'item',
|
|
146
|
+
id: itemNodeId(category.id, item.id),
|
|
147
|
+
categoryId: category.id,
|
|
148
|
+
itemId: item.id,
|
|
149
|
+
name: item.label,
|
|
150
|
+
// Every child shows an icon so rows look consistent: a dedicated per-item icon where one exists
|
|
151
|
+
// (e.g. individual agents), otherwise the category's icon as a uniform fallback.
|
|
152
|
+
iconClass: item.iconClass ?? category.iconClass,
|
|
153
|
+
status: item.status,
|
|
154
|
+
parent: undefined,
|
|
155
|
+
selected: false
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
function createSeparatorNode(): AiConfigurationSeparatorNode {
|
|
160
|
+
return {
|
|
161
|
+
type: 'separator',
|
|
162
|
+
id: CONTRIBUTED_SEPARATOR_ID,
|
|
163
|
+
name: nls.localize('theia/ai/core/aiConfiguration/contributedByExtensions', 'Contributed by extensions'),
|
|
164
|
+
parent: undefined
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
}
|