@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,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// *****************************************************************************
|
|
3
|
+
// Copyright (C) 2026 EclipseSource GmbH.
|
|
4
|
+
//
|
|
5
|
+
// This program and the accompanying materials are made available under the
|
|
6
|
+
// terms of the Eclipse Public License v. 2.0 which is available at
|
|
7
|
+
// http://www.eclipse.org/legal/epl-2.0.
|
|
8
|
+
//
|
|
9
|
+
// This Source Code may also be made available under the following Secondary
|
|
10
|
+
// Licenses when the conditions for such availability set forth in the Eclipse
|
|
11
|
+
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
12
|
+
// with the GNU Classpath Exception which is available at
|
|
13
|
+
// https://www.gnu.org/software/classpath/license.html.
|
|
14
|
+
//
|
|
15
|
+
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
16
|
+
// *****************************************************************************
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
const chai_1 = require("chai");
|
|
19
|
+
const core_1 = require("@theia/core");
|
|
20
|
+
const workspace_search_provider_util_1 = require("./workspace-search-provider-util");
|
|
21
|
+
const result = (fileUri) => ({
|
|
22
|
+
root: 'file:///workspace',
|
|
23
|
+
fileUri,
|
|
24
|
+
matches: [{ line: 3, character: 1, length: 4, lineText: ' hit ' }]
|
|
25
|
+
});
|
|
26
|
+
/** Resolves paths below `file:///workspace` and treats everything else as external. */
|
|
27
|
+
const workspaceResolver = {
|
|
28
|
+
toWorkspaceRelativePath: (uri) => {
|
|
29
|
+
const relative = new core_1.URI('file:///workspace').relative(uri)?.toString();
|
|
30
|
+
return relative === undefined ? undefined : `workspace/${relative}`;
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
describe('optimizeSearchResults', () => {
|
|
34
|
+
it('returns root-prefixed relative paths and trimmed line text for workspace hits', () => {
|
|
35
|
+
(0, chai_1.expect)((0, workspace_search_provider_util_1.optimizeSearchResults)([result('file:///workspace/src/a.ts')], workspaceResolver)).to.deep.equal([
|
|
36
|
+
{ file: 'workspace/src/a.ts', matches: [{ line: 3, text: 'hit' }] }
|
|
37
|
+
]);
|
|
38
|
+
});
|
|
39
|
+
describe('paths outside the workspace roots', () => {
|
|
40
|
+
let originalIsWindows;
|
|
41
|
+
beforeEach(() => { originalIsWindows = core_1.OS.backend.isWindows; });
|
|
42
|
+
afterEach(() => { core_1.OS.backend.isWindows = originalIsWindows; });
|
|
43
|
+
it('falls back to the native path, so it can be passed back to the file tools', () => {
|
|
44
|
+
core_1.OS.backend.isWindows = true;
|
|
45
|
+
const [optimized] = (0, workspace_search_provider_util_1.optimizeSearchResults)([result('file:///c%3A/external/data/x.ts')], workspaceResolver);
|
|
46
|
+
(0, chai_1.expect)(optimized.file).to.equal('C:\\external\\data\\x.ts');
|
|
47
|
+
});
|
|
48
|
+
it('falls back to the absolute path on POSIX', () => {
|
|
49
|
+
core_1.OS.backend.isWindows = false;
|
|
50
|
+
const [optimized] = (0, workspace_search_provider_util_1.optimizeSearchResults)([result('file:///external/data/x.ts')], workspaceResolver);
|
|
51
|
+
(0, chai_1.expect)(optimized.file).to.equal('/external/data/x.ts');
|
|
52
|
+
});
|
|
53
|
+
});
|
|
54
|
+
});
|
|
55
|
+
//# sourceMappingURL=workspace-search-provider-util.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workspace-search-provider-util.spec.js","sourceRoot":"","sources":["../../src/common/workspace-search-provider-util.spec.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;AAEhF,+BAA8B;AAC9B,sCAAsC;AAEtC,qFAAgG;AAEhG,MAAM,MAAM,GAAG,CAAC,OAAe,EAA2B,EAAE,CAAC,CAAC;IAC1D,IAAI,EAAE,mBAAmB;IACzB,OAAO;IACP,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,QAAQ,EAAE,WAAW,EAAE,CAAC;CACzE,CAAC,CAAC;AAEH,uFAAuF;AACvF,MAAM,iBAAiB,GAA0B;IAC7C,uBAAuB,EAAE,CAAC,GAAQ,EAAE,EAAE;QAClC,MAAM,QAAQ,GAAG,IAAI,UAAG,CAAC,mBAAmB,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,QAAQ,EAAE,CAAC;QACxE,OAAO,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,aAAa,QAAQ,EAAE,CAAC;IACxE,CAAC;CACJ,CAAC;AAEF,QAAQ,CAAC,uBAAuB,EAAE,GAAG,EAAE;IAEnC,EAAE,CAAC,+EAA+E,EAAE,GAAG,EAAE;QACrF,IAAA,aAAM,EAAC,IAAA,sDAAqB,EAAC,CAAC,MAAM,CAAC,4BAA4B,CAAC,CAAC,EAAE,iBAAiB,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC;YACnG,EAAE,IAAI,EAAE,oBAAoB,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE;SACtE,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;IAEH,QAAQ,CAAC,mCAAmC,EAAE,GAAG,EAAE;QAC/C,IAAI,iBAA0B,CAAC;QAC/B,UAAU,CAAC,GAAG,EAAE,GAAG,iBAAiB,GAAG,SAAE,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;QAChE,SAAS,CAAC,GAAG,EAAE,GAAG,SAAE,CAAC,OAAO,CAAC,SAAS,GAAG,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAC;QAE/D,EAAE,CAAC,2EAA2E,EAAE,GAAG,EAAE;YACjF,SAAE,CAAC,OAAO,CAAC,SAAS,GAAG,IAAI,CAAC;YAC5B,MAAM,CAAC,SAAS,CAAC,GAAG,IAAA,sDAAqB,EAAC,CAAC,MAAM,CAAC,iCAAiC,CAAC,CAAC,EAAE,iBAAiB,CAAC,CAAC;YAC1G,IAAA,aAAM,EAAC,SAAS,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,0BAA0B,CAAC,CAAC;QAChE,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,0CAA0C,EAAE,GAAG,EAAE;YAChD,SAAE,CAAC,OAAO,CAAC,SAAS,GAAG,KAAK,CAAC;YAC7B,MAAM,CAAC,SAAS,CAAC,GAAG,IAAA,sDAAqB,EAAC,CAAC,MAAM,CAAC,4BAA4B,CAAC,CAAC,EAAE,iBAAiB,CAAC,CAAC;YACrG,IAAA,aAAM,EAAC,SAAS,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC;QAC3D,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { GitHubRepoService, GitHubRepoInfo } from '../common/github-repo-protocol';
|
|
2
|
+
import { ILogger } from '@theia/core';
|
|
2
3
|
export declare class GitHubRepoServiceImpl implements GitHubRepoService {
|
|
4
|
+
protected readonly logger: ILogger;
|
|
3
5
|
getGitHubRepoInfo(workspacePath: string): Promise<GitHubRepoInfo | undefined>;
|
|
4
6
|
private isGitHubRemote;
|
|
5
7
|
private extractRepoInfoFromGitHubUrl;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"github-repo-service-impl.d.ts","sourceRoot":"","sources":["../../src/node/github-repo-service-impl.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"github-repo-service-impl.d.ts","sourceRoot":"","sources":["../../src/node/github-repo-service-impl.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AACnF,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEtC,qBACa,qBAAsB,YAAW,iBAAiB;IAG3D,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IAE7B,iBAAiB,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,GAAG,SAAS,CAAC;IAwCnF,OAAO,CAAC,cAAc;IAItB,OAAO,CAAC,4BAA4B;CA8BvC"}
|
|
@@ -19,6 +19,7 @@ exports.GitHubRepoServiceImpl = void 0;
|
|
|
19
19
|
const tslib_1 = require("tslib");
|
|
20
20
|
const inversify_1 = require("@theia/core/shared/inversify");
|
|
21
21
|
const simple_git_1 = require("simple-git");
|
|
22
|
+
const core_1 = require("@theia/core");
|
|
22
23
|
let GitHubRepoServiceImpl = class GitHubRepoServiceImpl {
|
|
23
24
|
async getGitHubRepoInfo(workspacePath) {
|
|
24
25
|
try {
|
|
@@ -44,7 +45,7 @@ let GitHubRepoServiceImpl = class GitHubRepoServiceImpl {
|
|
|
44
45
|
return repoInfo;
|
|
45
46
|
}
|
|
46
47
|
catch (error) {
|
|
47
|
-
|
|
48
|
+
this.logger.warn('Failed to get GitHub repository info:', error);
|
|
48
49
|
return undefined;
|
|
49
50
|
}
|
|
50
51
|
}
|
|
@@ -80,6 +81,11 @@ let GitHubRepoServiceImpl = class GitHubRepoServiceImpl {
|
|
|
80
81
|
}
|
|
81
82
|
};
|
|
82
83
|
exports.GitHubRepoServiceImpl = GitHubRepoServiceImpl;
|
|
84
|
+
tslib_1.__decorate([
|
|
85
|
+
(0, inversify_1.inject)(core_1.ILogger),
|
|
86
|
+
(0, inversify_1.named)('ai-ide:GitHubRepoServiceImpl'),
|
|
87
|
+
tslib_1.__metadata("design:type", Object)
|
|
88
|
+
], GitHubRepoServiceImpl.prototype, "logger", void 0);
|
|
83
89
|
exports.GitHubRepoServiceImpl = GitHubRepoServiceImpl = tslib_1.__decorate([
|
|
84
90
|
(0, inversify_1.injectable)()
|
|
85
91
|
], GitHubRepoServiceImpl);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"github-repo-service-impl.js","sourceRoot":"","sources":["../../src/node/github-repo-service-impl.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;;;AAEhF,
|
|
1
|
+
{"version":3,"file":"github-repo-service-impl.js","sourceRoot":"","sources":["../../src/node/github-repo-service-impl.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;;;AAEhF,4DAAyE;AACzE,2CAAkD;AAElD,sCAAsC;AAG/B,IAAM,qBAAqB,GAA3B,MAAM,qBAAqB;IAK9B,KAAK,CAAC,iBAAiB,CAAC,aAAqB;QACzC,IAAI,CAAC;YACD,gDAAgD;YAChD,MAAM,GAAG,GAAc,IAAA,sBAAS,EAAC,aAAa,CAAC,CAAC;YAEhD,oCAAoC;YACpC,MAAM,MAAM,GAAG,MAAM,GAAG,CAAC,WAAW,EAAE,CAAC;YACvC,IAAI,CAAC,MAAM,EAAE,CAAC;gBACV,OAAO,SAAS,CAAC;YACrB,CAAC;YAED,kCAAkC;YAClC,MAAM,OAAO,GAAG,MAAM,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;YAE3C,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;gBACvB,OAAO,SAAS,CAAC;YACrB,CAAC;YAED,+DAA+D;YAC/D,MAAM,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CACvC,MAAM,CAAC,IAAI,KAAK,QAAQ,IAAI,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,IAAI,EAAE,CAAC,CAC/F,IAAI,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CACvB,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,IAAI,EAAE,CAAC,CACnE,CAAC;YAEF,IAAI,CAAC,YAAY,EAAE,CAAC;gBAChB,OAAO,SAAS,CAAC;YACrB,CAAC;YAED,MAAM,SAAS,GAAG,YAAY,CAAC,IAAI,CAAC,KAAK,IAAI,YAAY,CAAC,IAAI,CAAC,IAAI,IAAI,EAAE,CAAC;YAC1E,MAAM,QAAQ,GAAG,IAAI,CAAC,4BAA4B,CAAC,SAAS,CAAC,CAAC;YAE9D,OAAO,QAAQ,CAAC;QAEpB,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACb,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,uCAAuC,EAAE,KAAK,CAAC,CAAC;YACjE,OAAO,SAAS,CAAC;QACrB,CAAC;IACL,CAAC;IAEO,cAAc,CAAC,SAAiB;QACpC,OAAO,SAAS,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC;IAC5C,CAAC;IAEO,4BAA4B,CAAC,GAAW;QAC5C,wFAAwF;QACxF,MAAM,UAAU,GAAG,GAAG,CAAC,KAAK,CAAC,uDAAuD,CAAC,CAAC;QACtF,IAAI,UAAU,EAAE,CAAC;YACb,OAAO;gBACH,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC;gBACpB,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC;aACtB,CAAC;QACN,CAAC;QAED,8EAA8E;QAC9E,MAAM,QAAQ,GAAG,GAAG,CAAC,KAAK,CAAC,gDAAgD,CAAC,CAAC;QAC7E,IAAI,QAAQ,EAAE,CAAC;YACX,OAAO;gBACH,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC;gBAClB,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC;aACpB,CAAC;QACN,CAAC;QAED,wGAAwG;QACxG,MAAM,WAAW,GAAG,GAAG,CAAC,KAAK,CAAC,yDAAyD,CAAC,CAAC;QACzF,IAAI,WAAW,EAAE,CAAC;YACd,OAAO;gBACH,KAAK,EAAE,WAAW,CAAC,CAAC,CAAC;gBACrB,IAAI,EAAE,WAAW,CAAC,CAAC,CAAC;aACvB,CAAC;QACN,CAAC;QAED,OAAO,SAAS,CAAC;IACrB,CAAC;CACJ,CAAA;AA/EY,sDAAqB;AAGX;IADlB,IAAA,kBAAM,EAAC,cAAO,CAAC;IAAE,IAAA,iBAAK,EAAC,8BAA8B,CAAC;;qDACpB;gCAH1B,qBAAqB;IADjC,IAAA,sBAAU,GAAE;GACA,qBAAqB,CA+EjC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theia/ai-ide",
|
|
3
|
-
"version": "1.75.0
|
|
3
|
+
"version": "1.75.0",
|
|
4
4
|
"description": "AI IDE Agents Extension",
|
|
5
5
|
"license": "EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -15,29 +15,30 @@
|
|
|
15
15
|
"theia-extension"
|
|
16
16
|
],
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@theia/ai-chat": "1.75.0
|
|
19
|
-
"@theia/ai-chat-ui": "1.75.0
|
|
20
|
-
"@theia/ai-core": "1.75.0
|
|
21
|
-
"@theia/ai-
|
|
22
|
-
"@theia/ai-
|
|
23
|
-
"@theia/
|
|
24
|
-
"@theia/
|
|
25
|
-
"@theia/
|
|
26
|
-
"@theia/
|
|
27
|
-
"@theia/
|
|
28
|
-
"@theia/
|
|
29
|
-
"@theia/
|
|
30
|
-
"@theia/
|
|
31
|
-
"@theia/
|
|
32
|
-
"@theia/
|
|
33
|
-
"@theia/
|
|
34
|
-
"@theia/
|
|
35
|
-
"@theia/
|
|
36
|
-
"@theia/
|
|
18
|
+
"@theia/ai-chat": "1.75.0",
|
|
19
|
+
"@theia/ai-chat-ui": "1.75.0",
|
|
20
|
+
"@theia/ai-core": "1.75.0",
|
|
21
|
+
"@theia/ai-core-ui": "1.75.0",
|
|
22
|
+
"@theia/ai-mcp": "1.75.0",
|
|
23
|
+
"@theia/ai-terminal": "1.75.0",
|
|
24
|
+
"@theia/core": "1.75.0",
|
|
25
|
+
"@theia/debug": "1.75.0",
|
|
26
|
+
"@theia/editor": "1.75.0",
|
|
27
|
+
"@theia/file-search": "1.75.0",
|
|
28
|
+
"@theia/filesystem": "1.75.0",
|
|
29
|
+
"@theia/markers": "1.75.0",
|
|
30
|
+
"@theia/monaco": "1.75.0",
|
|
31
|
+
"@theia/navigator": "1.75.0",
|
|
32
|
+
"@theia/preferences": "1.75.0",
|
|
33
|
+
"@theia/scm": "1.75.0",
|
|
34
|
+
"@theia/search-in-workspace": "1.75.0",
|
|
35
|
+
"@theia/task": "1.75.0",
|
|
36
|
+
"@theia/terminal": "1.75.0",
|
|
37
|
+
"@theia/workspace": "1.75.0",
|
|
37
38
|
"date-fns": "^4.4.0",
|
|
38
39
|
"ignore": "^6.0.2",
|
|
39
|
-
"js-yaml": "^4.3.
|
|
40
|
-
"minimatch": "^10.2.
|
|
40
|
+
"js-yaml": "^4.3.1",
|
|
41
|
+
"minimatch": "^10.2.6",
|
|
41
42
|
"puppeteer-core": "^25.1.0",
|
|
42
43
|
"simple-git": "^3.36.0"
|
|
43
44
|
},
|
|
@@ -45,8 +46,8 @@
|
|
|
45
46
|
"access": "public"
|
|
46
47
|
},
|
|
47
48
|
"devDependencies": {
|
|
48
|
-
"@theia/cli": "1.75.0
|
|
49
|
-
"@theia/test": "1.75.0
|
|
49
|
+
"@theia/cli": "1.75.0",
|
|
50
|
+
"@theia/test": "1.75.0"
|
|
50
51
|
},
|
|
51
52
|
"theiaExtensions": [
|
|
52
53
|
{
|
|
@@ -70,5 +71,5 @@
|
|
|
70
71
|
"nyc": {
|
|
71
72
|
"extends": "../../configs/nyc.json"
|
|
72
73
|
},
|
|
73
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "6d8e911f05f0fd9a13d76797e79b21ee3f038bc2"
|
|
74
75
|
}
|
|
@@ -0,0 +1,37 @@
|
|
|
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 { Agent } from '@theia/ai-core/lib/common';
|
|
18
|
+
import { isChatAgent } from '@theia/ai-chat/lib/common';
|
|
19
|
+
import { codicon } from '@theia/core/lib/browser';
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* The icon used throughout the AI configuration view for agents that do not
|
|
23
|
+
* contribute their own icon. Matches the framework default of {@link AbstractChatAgent}
|
|
24
|
+
* so that agents without a custom icon look consistent everywhere.
|
|
25
|
+
*/
|
|
26
|
+
export const DEFAULT_AGENT_ICON_CLASS = codicon('copilot');
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Resolves the icon class to use for an agent in the AI configuration view.
|
|
30
|
+
*
|
|
31
|
+
* Only chat agents can contribute an icon (via `iconClass`); when an agent
|
|
32
|
+
* contributes one it is used, otherwise the shared {@link DEFAULT_AGENT_ICON_CLASS}
|
|
33
|
+
* is applied so agents are rendered consistently across chips, tree nodes and detail views.
|
|
34
|
+
*/
|
|
35
|
+
export function getAgentIconClass(agent: Agent): string {
|
|
36
|
+
return (isChatAgent(agent) && agent.iconClass) ? agent.iconClass : DEFAULT_AGENT_ICON_CLASS;
|
|
37
|
+
}
|
|
@@ -0,0 +1,164 @@
|
|
|
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 { Disposable, Emitter, Event, nls } from '@theia/core';
|
|
18
|
+
import { ApplicationShell, codicon } from '@theia/core/lib/browser';
|
|
19
|
+
import { Breadcrumb, BreadcrumbsContribution } from '@theia/core/lib/browser/breadcrumbs/breadcrumbs-constants';
|
|
20
|
+
import URI from '@theia/core/lib/common/uri';
|
|
21
|
+
import { inject, injectable, postConstruct } from '@theia/core/shared/inversify';
|
|
22
|
+
import { AiConfigurationSelection } from '@theia/ai-core-ui/lib/browser/ai-configuration/ai-configuration-category';
|
|
23
|
+
import { AiConfigurationCategoryRegistry } from '@theia/ai-core-ui/lib/browser/ai-configuration/ai-configuration-category-registry';
|
|
24
|
+
import { AiConfigurationSelectionModel } from '@theia/ai-core-ui/lib/browser/ai-configuration/ai-configuration-selection-model';
|
|
25
|
+
import { AIConfigurationContainerWidget } from './ai-configuration-widget';
|
|
26
|
+
import { AI_CONFIGURATION_RESOURCE_SCHEME, AI_CONFIGURATION_RESOURCE_URI } from './ai-configuration-resource';
|
|
27
|
+
|
|
28
|
+
export const AI_CONFIGURATION_BREADCRUMB_TYPE = Symbol('ai-configuration-breadcrumb');
|
|
29
|
+
|
|
30
|
+
interface PopupEntry {
|
|
31
|
+
readonly label: string;
|
|
32
|
+
readonly iconClass?: string;
|
|
33
|
+
readonly selection: AiConfigurationSelection;
|
|
34
|
+
readonly selected: boolean;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Contributes real Theia breadcrumbs for the AI Configuration view. The view's resource URI is
|
|
39
|
+
* constant; the breadcrumb path (category › item) is derived from the shared
|
|
40
|
+
* {@link AiConfigurationSelectionModel}, and clicking a segment opens a popup to jump to sibling
|
|
41
|
+
* categories/items — matching the editor breadcrumb UX and honoring the `breadcrumbs.enabled` setting.
|
|
42
|
+
*/
|
|
43
|
+
@injectable()
|
|
44
|
+
export class AiConfigurationBreadcrumbsContribution implements BreadcrumbsContribution {
|
|
45
|
+
|
|
46
|
+
readonly type = AI_CONFIGURATION_BREADCRUMB_TYPE;
|
|
47
|
+
readonly priority = 100;
|
|
48
|
+
|
|
49
|
+
@inject(AiConfigurationSelectionModel)
|
|
50
|
+
protected readonly selectionModel: AiConfigurationSelectionModel;
|
|
51
|
+
|
|
52
|
+
@inject(AiConfigurationCategoryRegistry)
|
|
53
|
+
protected readonly registry: AiConfigurationCategoryRegistry;
|
|
54
|
+
|
|
55
|
+
@inject(ApplicationShell)
|
|
56
|
+
protected readonly shell: ApplicationShell;
|
|
57
|
+
|
|
58
|
+
protected readonly onDidChangeBreadcrumbsEmitter = new Emitter<URI>();
|
|
59
|
+
get onDidChangeBreadcrumbs(): Event<URI> {
|
|
60
|
+
return this.onDidChangeBreadcrumbsEmitter.event;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
@postConstruct()
|
|
64
|
+
protected init(): void {
|
|
65
|
+
// Recompute the breadcrumbs whenever the in-view selection changes (URI stays constant).
|
|
66
|
+
this.selectionModel.onDidChangeSelection(() => this.onDidChangeBreadcrumbsEmitter.fire(AI_CONFIGURATION_RESOURCE_URI));
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
computeBreadcrumbs(uri: URI): Breadcrumb[] {
|
|
70
|
+
if (uri.scheme !== AI_CONFIGURATION_RESOURCE_SCHEME) {
|
|
71
|
+
return [];
|
|
72
|
+
}
|
|
73
|
+
const selection = this.selectionModel.getSelection();
|
|
74
|
+
const category = selection ? this.registry.getCategory(selection.categoryId) : undefined;
|
|
75
|
+
const crumbs: Breadcrumb[] = [];
|
|
76
|
+
if (category) {
|
|
77
|
+
crumbs.push({
|
|
78
|
+
id: `category:${category.id}`,
|
|
79
|
+
type: this.type,
|
|
80
|
+
label: category.label,
|
|
81
|
+
longLabel: category.label,
|
|
82
|
+
iconClass: category.iconClass
|
|
83
|
+
});
|
|
84
|
+
if (selection?.itemId) {
|
|
85
|
+
const item = category.renderer.getTreeChildren?.().find(child => child.id === selection.itemId);
|
|
86
|
+
const label = item?.label ?? selection.itemId;
|
|
87
|
+
crumbs.push({
|
|
88
|
+
id: `item:${category.id}:${selection.itemId}`,
|
|
89
|
+
type: this.type,
|
|
90
|
+
label,
|
|
91
|
+
longLabel: label,
|
|
92
|
+
iconClass: item?.iconClass ?? category.iconClass
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
if (crumbs.length === 0) {
|
|
97
|
+
crumbs.push({
|
|
98
|
+
id: 'ai-configuration:root',
|
|
99
|
+
type: this.type,
|
|
100
|
+
label: nls.localize('theia/ai/ide/aiConfiguration/breadcrumbRoot', 'AI Configuration'),
|
|
101
|
+
longLabel: nls.localize('theia/ai/ide/aiConfiguration/breadcrumbRoot', 'AI Configuration'),
|
|
102
|
+
iconClass: codicon('settings-gear')
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
return crumbs;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
async attachPopupContent(breadcrumb: Breadcrumb, parent: HTMLElement): Promise<Disposable | undefined> {
|
|
109
|
+
if (breadcrumb.type !== this.type) {
|
|
110
|
+
return undefined;
|
|
111
|
+
}
|
|
112
|
+
const entries = this.popupEntries(breadcrumb.id);
|
|
113
|
+
if (entries.length === 0) {
|
|
114
|
+
return undefined;
|
|
115
|
+
}
|
|
116
|
+
const list = document.createElement('ul');
|
|
117
|
+
list.className = 'theia-ai-configuration-breadcrumb-popup';
|
|
118
|
+
for (const entry of entries) {
|
|
119
|
+
const item = document.createElement('li');
|
|
120
|
+
item.className = 'theia-ai-configuration-breadcrumb-popup-item' + (entry.selected ? ' selected' : '');
|
|
121
|
+
if (entry.iconClass) {
|
|
122
|
+
const icon = document.createElement('span');
|
|
123
|
+
icon.className = `theia-ai-configuration-breadcrumb-popup-icon ${entry.iconClass}`;
|
|
124
|
+
item.appendChild(icon);
|
|
125
|
+
}
|
|
126
|
+
const label = document.createElement('span');
|
|
127
|
+
label.textContent = entry.label;
|
|
128
|
+
item.appendChild(label);
|
|
129
|
+
item.onclick = () => {
|
|
130
|
+
this.selectionModel.select(entry.selection);
|
|
131
|
+
// Move focus back to the view so the popup blurs and closes.
|
|
132
|
+
this.shell.activateWidget(AIConfigurationContainerWidget.ID);
|
|
133
|
+
};
|
|
134
|
+
list.appendChild(item);
|
|
135
|
+
}
|
|
136
|
+
parent.appendChild(list);
|
|
137
|
+
return undefined;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
/** Sibling categories for a category breadcrumb, or sibling items for an item breadcrumb. */
|
|
141
|
+
protected popupEntries(breadcrumbId: string): PopupEntry[] {
|
|
142
|
+
const selection = this.selectionModel.getSelection();
|
|
143
|
+
if (breadcrumbId.startsWith('category:')) {
|
|
144
|
+
return this.registry.getCategories().map(category => ({
|
|
145
|
+
label: category.label,
|
|
146
|
+
iconClass: category.iconClass,
|
|
147
|
+
selection: { categoryId: category.id },
|
|
148
|
+
selected: category.id === selection?.categoryId
|
|
149
|
+
}));
|
|
150
|
+
}
|
|
151
|
+
if (breadcrumbId.startsWith('item:')) {
|
|
152
|
+
const categoryId = breadcrumbId.split(':')[1];
|
|
153
|
+
const category = this.registry.getCategory(categoryId);
|
|
154
|
+
const items = category?.renderer.getTreeChildren?.() ?? [];
|
|
155
|
+
return items.map(item => ({
|
|
156
|
+
label: item.label,
|
|
157
|
+
iconClass: item.iconClass ?? category?.iconClass,
|
|
158
|
+
selection: { categoryId, itemId: item.id },
|
|
159
|
+
selected: item.id === selection?.itemId
|
|
160
|
+
}));
|
|
161
|
+
}
|
|
162
|
+
return [];
|
|
163
|
+
}
|
|
164
|
+
}
|
|
@@ -0,0 +1,165 @@
|
|
|
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
|
+
import { FrontendApplicationConfigProvider } from '@theia/core/lib/browser/frontend-application-config-provider';
|
|
21
|
+
FrontendApplicationConfigProvider.set({});
|
|
22
|
+
|
|
23
|
+
import { expect } from 'chai';
|
|
24
|
+
import * as React from '@theia/core/shared/react';
|
|
25
|
+
import {
|
|
26
|
+
AiConfigurationCategory, AiConfigurationRenderContext, AiConfigurationSelection
|
|
27
|
+
} from '@theia/ai-core-ui/lib/browser/ai-configuration/ai-configuration-category';
|
|
28
|
+
import { AiConfigurationDetailWidget } from './ai-configuration-detail-widget';
|
|
29
|
+
|
|
30
|
+
disableJSDOM();
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Exercises the selection → detail dispatch logic of {@link AiConfigurationDetailWidget#renderBody}
|
|
34
|
+
* in isolation. `renderBody` only consumes its arguments (not the injected registry/selection model),
|
|
35
|
+
* so we invoke it on a prototype instance without spinning up the DI container or a DOM.
|
|
36
|
+
*/
|
|
37
|
+
describe('AiConfigurationDetailWidget dispatch', () => {
|
|
38
|
+
|
|
39
|
+
before(() => disableJSDOM = enableJSDOM());
|
|
40
|
+
after(() => disableJSDOM());
|
|
41
|
+
|
|
42
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
43
|
+
const widget = Object.create(AiConfigurationDetailWidget.prototype) as any;
|
|
44
|
+
const ctx = {} as AiConfigurationRenderContext;
|
|
45
|
+
|
|
46
|
+
function category(kind: 'single-page' | 'collection', renderer: AiConfigurationCategory['renderer']): AiConfigurationCategory {
|
|
47
|
+
return { id: 'c', label: 'C', iconClass: 'codicon codicon-gear', kind, renderer };
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
function renderBody(cat: AiConfigurationCategory, selection: AiConfigurationSelection): React.ReactNode {
|
|
51
|
+
return widget.renderBody(cat, selection, ctx);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// Category-level views are wrapped as `<>{categoryHeader}{content}</>`; the content is the second child.
|
|
55
|
+
// Item-detail views are returned as-is (they render their own header).
|
|
56
|
+
function contentOf(cat: AiConfigurationCategory, selection: AiConfigurationSelection): React.ReactNode {
|
|
57
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
58
|
+
return (renderBody(cat, selection) as any).props.children[1];
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
it('renders the item detail as-is when an item is selected and the renderer supports it', () => {
|
|
62
|
+
const cat = category('collection', {
|
|
63
|
+
renderItemDetail: itemId => `detail:${itemId}`,
|
|
64
|
+
renderOverview: () => 'overview'
|
|
65
|
+
});
|
|
66
|
+
expect(renderBody(cat, { categoryId: 'c', itemId: 'a' })).to.equal('detail:a');
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
it('falls back to the overview when an item is selected but the renderer has no item detail', () => {
|
|
70
|
+
const cat = category('collection', { renderOverview: () => 'overview' });
|
|
71
|
+
expect(contentOf(cat, { categoryId: 'c', itemId: 'a' })).to.equal('overview');
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
it('renders the overview for a collection without an item selection', () => {
|
|
75
|
+
const cat = category('collection', { renderOverview: () => 'overview', renderPage: () => 'page' });
|
|
76
|
+
expect(contentOf(cat, { categoryId: 'c' })).to.equal('overview');
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
it('renders the page for a single-page category', () => {
|
|
80
|
+
const cat = category('single-page', { renderPage: () => 'page' });
|
|
81
|
+
expect(contentOf(cat, { categoryId: 'c' })).to.equal('page');
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
it('shows the coming-soon placeholder when the renderer provides no applicable method', () => {
|
|
85
|
+
const cat = category('single-page', {});
|
|
86
|
+
// The placeholder is a <div> element rather than a plain renderer return value.
|
|
87
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
88
|
+
expect((contentOf(cat, { categoryId: 'c' }) as any).type).to.equal('div');
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
it('prefixes category-level views with the shared category header', () => {
|
|
92
|
+
const cat = category('single-page', { renderPage: () => 'page' });
|
|
93
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
94
|
+
const header = (renderBody(cat, { categoryId: 'c' }) as any).props.children[0];
|
|
95
|
+
expect(header.props.className).to.contain('ai-configuration-category-header');
|
|
96
|
+
});
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Pins the scrolling arithmetic of {@link AiConfigurationDetailWidget#centerInBody} and, more importantly,
|
|
101
|
+
* that it writes only the scroll container.
|
|
102
|
+
*
|
|
103
|
+
* The predecessor was `element.scrollIntoView({ block: 'center' })`, which also scrolls every scrollable
|
|
104
|
+
* ancestor — and `overflow: hidden` does not prevent programmatic scrolling, so it shifted the containers
|
|
105
|
+
* above the widget, taking the menu bar out of view. JSDOM performs no layout, so the rects and
|
|
106
|
+
* `clientHeight` are stubbed; it also does not implement `scrollIntoView`, so reverting to it fails every
|
|
107
|
+
* assertion here (verified by patching the method back).
|
|
108
|
+
*/
|
|
109
|
+
describe('AiConfigurationDetailWidget centerInBody', () => {
|
|
110
|
+
|
|
111
|
+
before(() => disableJSDOM = enableJSDOM());
|
|
112
|
+
after(() => disableJSDOM());
|
|
113
|
+
|
|
114
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
115
|
+
const widget = Object.create(AiConfigurationDetailWidget.prototype) as any;
|
|
116
|
+
|
|
117
|
+
/** An element whose `scrollTop` is a plain writable property, since JSDOM would otherwise clamp it to 0. */
|
|
118
|
+
function scrollable(rect: { top: number; height: number }, clientHeight?: number): HTMLElement {
|
|
119
|
+
const element = document.createElement('div');
|
|
120
|
+
Object.defineProperty(element, 'scrollTop', { value: 0, writable: true });
|
|
121
|
+
if (clientHeight !== undefined) {
|
|
122
|
+
Object.defineProperty(element, 'clientHeight', { value: clientHeight });
|
|
123
|
+
}
|
|
124
|
+
element.getBoundingClientRect = () => ({ top: rect.top, height: rect.height }) as DOMRect;
|
|
125
|
+
return element;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/** A body scrolled within an ancestor, so the test can assert the ancestor is left alone. */
|
|
129
|
+
function hierarchy(elementTop: number): { ancestor: HTMLElement; body: HTMLElement; element: HTMLElement } {
|
|
130
|
+
const ancestor = scrollable({ top: 0, height: 600 }, 600);
|
|
131
|
+
const body = scrollable({ top: 100, height: 400 }, 400);
|
|
132
|
+
const element = scrollable({ top: elementTop, height: 40 });
|
|
133
|
+
ancestor.appendChild(body);
|
|
134
|
+
body.appendChild(element);
|
|
135
|
+
return { ancestor, body, element };
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
it('scrolls the container so the row is vertically centred', () => {
|
|
139
|
+
const { body, element } = hierarchy(500);
|
|
140
|
+
// Row sits 400px below the body's top; centring it in a 400px viewport puts it at (400 - 40) / 2 = 180.
|
|
141
|
+
widget.centerInBody(body, element);
|
|
142
|
+
expect(body.scrollTop).to.equal(220);
|
|
143
|
+
});
|
|
144
|
+
|
|
145
|
+
it('leaves the scroll position alone when the row is already centred', () => {
|
|
146
|
+
const { body, element } = hierarchy(280);
|
|
147
|
+
widget.centerInBody(body, element);
|
|
148
|
+
expect(body.scrollTop).to.equal(0);
|
|
149
|
+
});
|
|
150
|
+
|
|
151
|
+
it('scrolls back up for a row above the centre', () => {
|
|
152
|
+
const { body, element } = hierarchy(120);
|
|
153
|
+
// 20px below the body's top, so it has to scroll up by 160 to reach the centre.
|
|
154
|
+
body.scrollTop = 300;
|
|
155
|
+
widget.centerInBody(body, element);
|
|
156
|
+
expect(body.scrollTop).to.equal(140);
|
|
157
|
+
});
|
|
158
|
+
|
|
159
|
+
it('never scrolls an ancestor of the container', () => {
|
|
160
|
+
const { ancestor, body, element } = hierarchy(500);
|
|
161
|
+
widget.centerInBody(body, element);
|
|
162
|
+
expect(body.scrollTop, 'the container itself should have scrolled').to.not.equal(0);
|
|
163
|
+
expect(ancestor.scrollTop, 'scrolling an ancestor shifts the whole shell').to.equal(0);
|
|
164
|
+
});
|
|
165
|
+
});
|