@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
package/lib/browser/ai-configuration/categories/model-aliases-configuration-category.spec.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"model-aliases-configuration-category.spec.js","sourceRoot":"","sources":["../../../../src/browser/ai-configuration/categories/model-aliases-configuration-category.spec.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,+CAA+C;AAC/C,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;AAEhF,8DAAiE;AACjE,IAAI,YAAY,GAAG,IAAA,mBAAW,GAAE,CAAC;AAEjC,uHAAiH;AACjH,wEAAiC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;AAE1C,+BAA8B;AAG9B,wHAAqH;AACrH,iGAA2F;AAE3F,YAAY,EAAE,CAAC;AAEf,SAAS,KAAK,CAAC,EAAU,EAAE,WAAW,GAAG,EAAE;IACvC,OAAO,EAAE,EAAE,EAAE,WAAW,EAAE,eAAe,EAAE,EAAE,EAAmC,CAAC;AACrF,CAAC;AAED,SAAS,UAAU,CAAC,EAAU;IAC1B,OAAO,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,EAA8B,CAAC;AAC3E,CAAC;AAED,SAAS,YAAY,CAAC,EAAU;IAC5B,OAAO,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,EAAE,EAA8B,CAAC;AAClG,CAAC;AAED,SAAS,cAAc,CAAC,OAA6B,EAAE,QAAgD;IACnG,MAAM,QAAQ,GAA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CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,UAAU,EAAE,qDAAyB,CAAC,aAAa,EAAE,MAAM,EAAE,cAAc,EAAE,CAAC,CAAC;QACvH,IAAA,aAAM,EAAC,KAAK,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;IACvD,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { Emitter, Event } from '@theia/core';
|
|
2
|
+
import { DisposableCollection } from '@theia/core/lib/common';
|
|
3
|
+
import * as React from '@theia/core/shared/react';
|
|
4
|
+
import { AiConfigurationCategory, AiConfigurationRenderContext, AiConfigurationSearchItem, AiConfigurationSearchProvider, AiConfigurationTreeItem } from '@theia/ai-core-ui/lib/browser/ai-configuration/ai-configuration-category';
|
|
5
|
+
import { AiSettingsRowService } from '@theia/ai-core-ui/lib/browser/ai-configuration/components/ai-settings-row-service';
|
|
6
|
+
import { CollectionCategoryRenderer } from '@theia/ai-core-ui/lib/browser/ai-configuration/renderers/collection-category-renderer';
|
|
7
|
+
interface ModelsSection {
|
|
8
|
+
readonly id: string;
|
|
9
|
+
readonly title: string;
|
|
10
|
+
readonly preferenceIds: string[];
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* The Models category: a `collection` listing each language-model provider as a tree child, so
|
|
14
|
+
* providers appear as nodes under the Models category. Provider blocks are discovered from the
|
|
15
|
+
* registered `ai-features.<provider>.*` preferences, so any installed provider package contributes
|
|
16
|
+
* a node here without ai-ide having to depend on it.
|
|
17
|
+
*
|
|
18
|
+
* The page layout comes from {@link CollectionCategoryRenderer}, like the other collection categories:
|
|
19
|
+
* the overview shows the cross-provider model settings (`ai-features.modelSettings.*`,
|
|
20
|
+
* `ai-features.reasoning.*`) above the provider cards, and selecting a provider node shows that
|
|
21
|
+
* provider's settings.
|
|
22
|
+
*/
|
|
23
|
+
export declare class ModelsConfigurationCategory extends CollectionCategoryRenderer implements AiConfigurationCategory, AiConfigurationSearchProvider {
|
|
24
|
+
readonly id = "models";
|
|
25
|
+
readonly label: string;
|
|
26
|
+
readonly description: string;
|
|
27
|
+
readonly iconClass: string;
|
|
28
|
+
readonly order = 200;
|
|
29
|
+
readonly kind: "collection";
|
|
30
|
+
protected readonly settingsRowService: AiSettingsRowService;
|
|
31
|
+
protected readonly onDidChangeEmitter: Emitter<void>;
|
|
32
|
+
readonly onDidChange: Event<void>;
|
|
33
|
+
protected readonly toDispose: DisposableCollection;
|
|
34
|
+
get renderer(): this;
|
|
35
|
+
protected get categoryId(): string;
|
|
36
|
+
getOwnedPreferenceIds(): string[];
|
|
37
|
+
get search(): AiConfigurationSearchProvider;
|
|
38
|
+
protected init(): void;
|
|
39
|
+
dispose(): void;
|
|
40
|
+
/**
|
|
41
|
+
* One tree child per discovered provider (the cross-provider model settings stay in the overview).
|
|
42
|
+
* Each carries the category icon so the overview cards show it; the tree nodes fall back to it anyway.
|
|
43
|
+
*/
|
|
44
|
+
getTreeChildren(): AiConfigurationTreeItem[];
|
|
45
|
+
protected get overviewListTitle(): string;
|
|
46
|
+
protected getEmptyMessage(): string;
|
|
47
|
+
/** Shown above the provider cards: the cross-provider model settings, when any are registered. */
|
|
48
|
+
protected renderCategorySettings(ctx: AiConfigurationRenderContext): React.ReactNode;
|
|
49
|
+
/** Provider detail (node selected): that provider's settings. */
|
|
50
|
+
protected renderItemSections(item: AiConfigurationTreeItem, ctx: AiConfigurationRenderContext): React.ReactNode;
|
|
51
|
+
protected renderPreferenceRow(ctx: AiConfigurationRenderContext, preferenceId: string): React.ReactNode;
|
|
52
|
+
/** Discovers the model-settings and provider sections from the registered preference schema. */
|
|
53
|
+
protected getSections(): ModelsSection[];
|
|
54
|
+
/**
|
|
55
|
+
* The human-readable display name for a provider block. A provider declares it in its preference
|
|
56
|
+
* schema (via the `aiModelProvider` `typeDetails`, `MODEL_PROVIDER_TYPE_DETAIL`), so this
|
|
57
|
+
* package does not have to know provider names. Providers that declare no name (e.g. third-party
|
|
58
|
+
* packages) fall back to a prettified form of the `ai-features.<provider>.*` segment.
|
|
59
|
+
*/
|
|
60
|
+
protected getProviderLabel(providerId: string, preferenceIds: string[]): string;
|
|
61
|
+
/** The `ai-features.<segment>.…` area segment of a preference id, e.g. `ai-features.google.apiKey` → `google`. */
|
|
62
|
+
protected segmentOf(preferenceId: string): string;
|
|
63
|
+
/** Turns an unknown provider segment such as `myProvider` or `my-provider` into `My Provider`. */
|
|
64
|
+
protected prettifyProviderId(providerId: string): string;
|
|
65
|
+
/** The cross-provider "Model Settings" section, if any settings are registered for it. */
|
|
66
|
+
protected getModelSettingsSection(): ModelsSection | undefined;
|
|
67
|
+
/** The provider sections (everything except the cross-provider "Model Settings"). */
|
|
68
|
+
protected getProviderSections(): ModelsSection[];
|
|
69
|
+
getSearchItems(): AiConfigurationSearchItem[];
|
|
70
|
+
}
|
|
71
|
+
export {};
|
|
72
|
+
//# sourceMappingURL=models-configuration-category.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"models-configuration-category.d.ts","sourceRoot":"","sources":["../../../../src/browser/ai-configuration/categories/models-configuration-category.tsx"],"names":[],"mappings":"AAgBA,OAAO,EAAE,OAAO,EAAE,KAAK,EAAO,MAAM,aAAa,CAAC;AAElD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAE9D,OAAO,KAAK,KAAK,MAAM,0BAA0B,CAAC;AAClD,OAAO,EACH,uBAAuB,EAGvB,4BAA4B,EAC5B,yBAAyB,EACzB,6BAA6B,EAC7B,uBAAuB,EAC1B,MAAM,0EAA0E,CAAC;AAClF,OAAO,EAAE,oBAAoB,EAAE,MAAM,mFAAmF,CAAC;AAEzH,OAAO,EAAE,0BAA0B,EAAE,MAAM,uFAAuF,CAAC;AAYnI,UAAU,aAAa;IACnB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC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G,gGAAgG;IAChG,SAAS,CAAC,WAAW,IAAI,aAAa,EAAE;IA+CxC;;;;;OAKG;IACH,SAAS,CAAC,gBAAgB,CAAC,UAAU,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,GAAG,MAAM;IAU/E,kHAAkH;IAClH,SAAS,CAAC,SAAS,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM;IAIjD,kGAAkG;IAClG,SAAS,CAAC,kBAAkB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM;IAQxD,0FAA0F;IAC1F,SAAS,CAAC,uBAAuB,IAAI,aAAa,GAAG,SAAS;IAI9D,qFAAqF;IACrF,SAAS,CAAC,mBAAmB,IAAI,aAAa,EAAE;IAIhD,cAAc,IAAI,yBAAyB,EAAE;CAqBhD"}
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ModelsConfigurationCategory = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const jsx_runtime_1 = require("@theia/core/shared/react/jsx-runtime");
|
|
6
|
+
// *****************************************************************************
|
|
7
|
+
// Copyright (C) 2026 EclipseSource and others.
|
|
8
|
+
//
|
|
9
|
+
// This program and the accompanying materials are made available under the
|
|
10
|
+
// terms of the Eclipse Public License v. 2.0 which is available at
|
|
11
|
+
// http://www.eclipse.org/legal/epl-2.0.
|
|
12
|
+
//
|
|
13
|
+
// This Source Code may also be made available under the following Secondary
|
|
14
|
+
// Licenses when the conditions for such availability set forth in the Eclipse
|
|
15
|
+
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
16
|
+
// with the GNU Classpath Exception which is available at
|
|
17
|
+
// https://www.gnu.org/software/classpath/license.html.
|
|
18
|
+
//
|
|
19
|
+
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
20
|
+
// *****************************************************************************
|
|
21
|
+
const core_1 = require("@theia/core");
|
|
22
|
+
const browser_1 = require("@theia/core/lib/browser");
|
|
23
|
+
const common_1 = require("@theia/core/lib/common");
|
|
24
|
+
const inversify_1 = require("@theia/core/shared/inversify");
|
|
25
|
+
const ai_configuration_category_1 = require("@theia/ai-core-ui/lib/browser/ai-configuration/ai-configuration-category");
|
|
26
|
+
const ai_settings_row_service_1 = require("@theia/ai-core-ui/lib/browser/ai-configuration/components/ai-settings-row-service");
|
|
27
|
+
const ai_configuration_primitives_1 = require("@theia/ai-core-ui/lib/browser/ai-configuration/components/ai-configuration-primitives");
|
|
28
|
+
const collection_category_renderer_1 = require("@theia/ai-core-ui/lib/browser/ai-configuration/renderers/collection-category-renderer");
|
|
29
|
+
const ai_settings_row_1 = require("@theia/ai-core-ui/lib/browser/ai-configuration/components/ai-settings-row");
|
|
30
|
+
/** Prefix shared by every AI preference. */
|
|
31
|
+
const AI_FEATURES_PREFIX = 'ai-features.';
|
|
32
|
+
/** Id of the cross-provider "Model Settings" section (kept in the overview, not a provider node). */
|
|
33
|
+
const MODEL_SETTINGS_ID = 'model-settings';
|
|
34
|
+
/** Segments that make up the cross-provider "Model Settings" section. */
|
|
35
|
+
const MODEL_SETTINGS_SEGMENTS = new Set(['modelSettings', 'reasoning']);
|
|
36
|
+
/**
|
|
37
|
+
* The Models category: a `collection` listing each language-model provider as a tree child, so
|
|
38
|
+
* providers appear as nodes under the Models category. Provider blocks are discovered from the
|
|
39
|
+
* registered `ai-features.<provider>.*` preferences, so any installed provider package contributes
|
|
40
|
+
* a node here without ai-ide having to depend on it.
|
|
41
|
+
*
|
|
42
|
+
* The page layout comes from {@link CollectionCategoryRenderer}, like the other collection categories:
|
|
43
|
+
* the overview shows the cross-provider model settings (`ai-features.modelSettings.*`,
|
|
44
|
+
* `ai-features.reasoning.*`) above the provider cards, and selecting a provider node shows that
|
|
45
|
+
* provider's settings.
|
|
46
|
+
*/
|
|
47
|
+
let ModelsConfigurationCategory = class ModelsConfigurationCategory extends collection_category_renderer_1.CollectionCategoryRenderer {
|
|
48
|
+
constructor() {
|
|
49
|
+
super(...arguments);
|
|
50
|
+
this.id = ai_configuration_category_1.AiConfigurationCategoryId.MODELS;
|
|
51
|
+
this.label = core_1.nls.localize('theia/ai/core/aiConfiguration/models/label', 'Providers & Models');
|
|
52
|
+
this.description = core_1.nls.localize('theia/ai/ide/modelsConfiguration/description', 'Configure language-model providers and the models available to agents.');
|
|
53
|
+
this.iconClass = (0, browser_1.codicon)('cloud');
|
|
54
|
+
this.order = ai_configuration_category_1.AiConfigurationCategoryOrder.MODELS;
|
|
55
|
+
this.kind = 'collection';
|
|
56
|
+
this.onDidChangeEmitter = new core_1.Emitter();
|
|
57
|
+
this.onDidChange = this.onDidChangeEmitter.event;
|
|
58
|
+
this.toDispose = new common_1.DisposableCollection(this.onDidChangeEmitter);
|
|
59
|
+
}
|
|
60
|
+
get renderer() {
|
|
61
|
+
return this;
|
|
62
|
+
}
|
|
63
|
+
get categoryId() {
|
|
64
|
+
return this.id;
|
|
65
|
+
}
|
|
66
|
+
getOwnedPreferenceIds() {
|
|
67
|
+
return this.getSections().flatMap(section => section.preferenceIds);
|
|
68
|
+
}
|
|
69
|
+
get search() {
|
|
70
|
+
return this;
|
|
71
|
+
}
|
|
72
|
+
init() {
|
|
73
|
+
this.toDispose.push(this.settingsRowService.onPreferenceChanged(() => this.onDidChangeEmitter.fire()));
|
|
74
|
+
}
|
|
75
|
+
dispose() {
|
|
76
|
+
this.toDispose.dispose();
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* One tree child per discovered provider (the cross-provider model settings stay in the overview).
|
|
80
|
+
* Each carries the category icon so the overview cards show it; the tree nodes fall back to it anyway.
|
|
81
|
+
*/
|
|
82
|
+
getTreeChildren() {
|
|
83
|
+
return this.getProviderSections().map(section => ({
|
|
84
|
+
id: section.id,
|
|
85
|
+
label: section.title,
|
|
86
|
+
iconClass: this.iconClass
|
|
87
|
+
}));
|
|
88
|
+
}
|
|
89
|
+
get overviewListTitle() {
|
|
90
|
+
return core_1.nls.localize('theia/ai/ide/modelsConfiguration/providers', 'Providers');
|
|
91
|
+
}
|
|
92
|
+
getEmptyMessage() {
|
|
93
|
+
return core_1.nls.localize('theia/ai/ide/modelsConfiguration/noProviders', 'No language-model providers are installed.');
|
|
94
|
+
}
|
|
95
|
+
/** Shown above the provider cards: the cross-provider model settings, when any are registered. */
|
|
96
|
+
renderCategorySettings(ctx) {
|
|
97
|
+
const modelSettings = this.getModelSettingsSection();
|
|
98
|
+
return modelSettings && (0, jsx_runtime_1.jsx)(ai_configuration_primitives_1.AiConfigurationSection, { title: modelSettings.title, children: modelSettings.preferenceIds.map(preferenceId => this.renderPreferenceRow(ctx, preferenceId)) });
|
|
99
|
+
}
|
|
100
|
+
/** Provider detail (node selected): that provider's settings. */
|
|
101
|
+
renderItemSections(item, ctx) {
|
|
102
|
+
const section = this.getProviderSections().find(candidate => candidate.id === item.id);
|
|
103
|
+
if (!section) {
|
|
104
|
+
return undefined;
|
|
105
|
+
}
|
|
106
|
+
return (0, jsx_runtime_1.jsx)(ai_configuration_primitives_1.AiConfigurationSection, { title: core_1.nls.localizeByDefault('Settings'), children: section.preferenceIds.map(preferenceId => this.renderPreferenceRow(ctx, preferenceId)) });
|
|
107
|
+
}
|
|
108
|
+
renderPreferenceRow(ctx, preferenceId) {
|
|
109
|
+
return (0, jsx_runtime_1.jsx)(ai_settings_row_1.AiSettingsRow, { service: this.settingsRowService, preferenceId: preferenceId, scope: ctx.scope, control: this.settingsRowService.controlFor(preferenceId), onDidChange: () => ctx.update() }, preferenceId);
|
|
110
|
+
}
|
|
111
|
+
/** Discovers the model-settings and provider sections from the registered preference schema. */
|
|
112
|
+
getSections() {
|
|
113
|
+
const displayable = this.settingsRowService.aiFeaturePreferenceIds();
|
|
114
|
+
// A `ai-features.<segment>.*` block is a provider block only when at least one of its preferences
|
|
115
|
+
// positively declares the `aiModelProvider` typeDetail (the same marker used to label the block).
|
|
116
|
+
// This replaces a hand-maintained denylist of non-provider segments: an unknown feature area that
|
|
117
|
+
// never claims to be a provider is no longer mistaken for one — it falls through to the General
|
|
118
|
+
// catch-all instead of showing up as a bogus provider block.
|
|
119
|
+
const providerSegments = new Set();
|
|
120
|
+
for (const preferenceId of displayable) {
|
|
121
|
+
if (this.settingsRowService.isModelProviderPreference(preferenceId)) {
|
|
122
|
+
providerSegments.add(this.segmentOf(preferenceId));
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
const modelSettings = [];
|
|
126
|
+
const byProvider = new Map();
|
|
127
|
+
for (const preferenceId of displayable) {
|
|
128
|
+
const segment = this.segmentOf(preferenceId);
|
|
129
|
+
if (MODEL_SETTINGS_SEGMENTS.has(segment)) {
|
|
130
|
+
modelSettings.push(preferenceId);
|
|
131
|
+
}
|
|
132
|
+
else if (providerSegments.has(segment)) {
|
|
133
|
+
const block = byProvider.get(segment) ?? [];
|
|
134
|
+
block.push(preferenceId);
|
|
135
|
+
byProvider.set(segment, block);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
const sections = [];
|
|
139
|
+
if (modelSettings.length > 0) {
|
|
140
|
+
sections.push({
|
|
141
|
+
id: MODEL_SETTINGS_ID,
|
|
142
|
+
title: core_1.nls.localize('theia/ai/ide/modelsConfiguration/modelSettings', 'Model Settings'),
|
|
143
|
+
preferenceIds: modelSettings
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
const providerSections = Array.from(byProvider.entries()).map(([provider, preferenceIds]) => ({
|
|
147
|
+
id: provider,
|
|
148
|
+
title: this.getProviderLabel(provider, preferenceIds),
|
|
149
|
+
preferenceIds
|
|
150
|
+
}));
|
|
151
|
+
// Order provider nodes by the label the user actually sees, not by the raw preference segment.
|
|
152
|
+
providerSections.sort((left, right) => left.title.localeCompare(right.title));
|
|
153
|
+
sections.push(...providerSections);
|
|
154
|
+
return sections;
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* The human-readable display name for a provider block. A provider declares it in its preference
|
|
158
|
+
* schema (via the `aiModelProvider` `typeDetails`, `MODEL_PROVIDER_TYPE_DETAIL`), so this
|
|
159
|
+
* package does not have to know provider names. Providers that declare no name (e.g. third-party
|
|
160
|
+
* packages) fall back to a prettified form of the `ai-features.<provider>.*` segment.
|
|
161
|
+
*/
|
|
162
|
+
getProviderLabel(providerId, preferenceIds) {
|
|
163
|
+
for (const preferenceId of preferenceIds) {
|
|
164
|
+
const declared = this.settingsRowService.modelProviderLabel(preferenceId);
|
|
165
|
+
if (declared) {
|
|
166
|
+
return declared;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
return this.prettifyProviderId(providerId);
|
|
170
|
+
}
|
|
171
|
+
/** The `ai-features.<segment>.…` area segment of a preference id, e.g. `ai-features.google.apiKey` → `google`. */
|
|
172
|
+
segmentOf(preferenceId) {
|
|
173
|
+
return preferenceId.substring(AI_FEATURES_PREFIX.length).split('.')[0];
|
|
174
|
+
}
|
|
175
|
+
/** Turns an unknown provider segment such as `myProvider` or `my-provider` into `My Provider`. */
|
|
176
|
+
prettifyProviderId(providerId) {
|
|
177
|
+
const spaced = providerId
|
|
178
|
+
.replace(/([a-z0-9])([A-Z])/g, '$1 $2')
|
|
179
|
+
.replace(/[-_]+/g, ' ')
|
|
180
|
+
.trim();
|
|
181
|
+
return spaced.charAt(0).toUpperCase() + spaced.slice(1);
|
|
182
|
+
}
|
|
183
|
+
/** The cross-provider "Model Settings" section, if any settings are registered for it. */
|
|
184
|
+
getModelSettingsSection() {
|
|
185
|
+
return this.getSections().find(section => section.id === MODEL_SETTINGS_ID);
|
|
186
|
+
}
|
|
187
|
+
/** The provider sections (everything except the cross-provider "Model Settings"). */
|
|
188
|
+
getProviderSections() {
|
|
189
|
+
return this.getSections().filter(section => section.id !== MODEL_SETTINGS_ID);
|
|
190
|
+
}
|
|
191
|
+
getSearchItems() {
|
|
192
|
+
const settingLabel = core_1.nls.localizeByDefault('Setting');
|
|
193
|
+
return this.getSections().flatMap(section => {
|
|
194
|
+
// Provider settings live in the provider's node; model settings live in the overview.
|
|
195
|
+
const isProvider = section.id !== MODEL_SETTINGS_ID;
|
|
196
|
+
return section.preferenceIds.map(preferenceId => {
|
|
197
|
+
const described = this.settingsRowService.describe(preferenceId);
|
|
198
|
+
return {
|
|
199
|
+
label: described.label ?? preferenceId,
|
|
200
|
+
typeLabel: settingLabel,
|
|
201
|
+
categoryId: this.id,
|
|
202
|
+
target: {
|
|
203
|
+
categoryId: this.id,
|
|
204
|
+
itemId: isProvider ? section.id : undefined,
|
|
205
|
+
highlight: { rowId: preferenceId }
|
|
206
|
+
},
|
|
207
|
+
keywords: `${preferenceId} ${section.title}`
|
|
208
|
+
};
|
|
209
|
+
});
|
|
210
|
+
});
|
|
211
|
+
}
|
|
212
|
+
};
|
|
213
|
+
exports.ModelsConfigurationCategory = ModelsConfigurationCategory;
|
|
214
|
+
tslib_1.__decorate([
|
|
215
|
+
(0, inversify_1.inject)(ai_settings_row_service_1.AiSettingsRowService),
|
|
216
|
+
tslib_1.__metadata("design:type", ai_settings_row_service_1.AiSettingsRowService)
|
|
217
|
+
], ModelsConfigurationCategory.prototype, "settingsRowService", void 0);
|
|
218
|
+
tslib_1.__decorate([
|
|
219
|
+
(0, inversify_1.postConstruct)(),
|
|
220
|
+
tslib_1.__metadata("design:type", Function),
|
|
221
|
+
tslib_1.__metadata("design:paramtypes", []),
|
|
222
|
+
tslib_1.__metadata("design:returntype", void 0)
|
|
223
|
+
], ModelsConfigurationCategory.prototype, "init", null);
|
|
224
|
+
exports.ModelsConfigurationCategory = ModelsConfigurationCategory = tslib_1.__decorate([
|
|
225
|
+
(0, inversify_1.injectable)()
|
|
226
|
+
], ModelsConfigurationCategory);
|
|
227
|
+
//# sourceMappingURL=models-configuration-category.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"models-configuration-category.js","sourceRoot":"","sources":["../../../../src/browser/ai-configuration/categories/models-configuration-category.tsx"],"names":[],"mappings":";;;;;AAAA,gFAAgF;AAChF,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C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"models-configuration-category.spec.d.ts","sourceRoot":"","sources":["../../../../src/browser/ai-configuration/categories/models-configuration-category.spec.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// *****************************************************************************
|
|
3
|
+
// Copyright (C) 2026 EclipseSource and others.
|
|
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 jsdom_1 = require("@theia/core/lib/browser/test/jsdom");
|
|
19
|
+
let disableJSDOM = (0, jsdom_1.enableJSDOM)();
|
|
20
|
+
const frontend_application_config_provider_1 = require("@theia/core/lib/browser/frontend-application-config-provider");
|
|
21
|
+
frontend_application_config_provider_1.FrontendApplicationConfigProvider.set({});
|
|
22
|
+
const chai_1 = require("chai");
|
|
23
|
+
const ai_configuration_category_1 = require("@theia/ai-core-ui/lib/browser/ai-configuration/ai-configuration-category");
|
|
24
|
+
const models_configuration_category_1 = require("./models-configuration-category");
|
|
25
|
+
disableJSDOM();
|
|
26
|
+
function createCategory(preferenceIds, nonDisplayable = [], providerLabels = {}, providerPreferenceIds = []) {
|
|
27
|
+
const category = new models_configuration_category_1.ModelsConfigurationCategory();
|
|
28
|
+
const hidden = new Set(nonDisplayable);
|
|
29
|
+
// A preference marks its `ai-features.<segment>.*` block as a provider either by carrying an explicit
|
|
30
|
+
// provider label or by being listed in `providerPreferenceIds` (mirrors the `aiModelProvider` typeDetail).
|
|
31
|
+
const providers = new Set([...providerPreferenceIds, ...Object.keys(providerLabels)]);
|
|
32
|
+
const service = {
|
|
33
|
+
preferenceIds: () => preferenceIds,
|
|
34
|
+
isDisplayable: (id) => !hidden.has(id),
|
|
35
|
+
aiFeaturePreferenceIds: () => preferenceIds.filter(id => id.startsWith('ai-features.') && !hidden.has(id)),
|
|
36
|
+
describe: (id) => ({ label: `label:${id}` }),
|
|
37
|
+
controlFor: () => ({ type: 'string' }),
|
|
38
|
+
modelProviderLabel: (id) => providerLabels[id],
|
|
39
|
+
isModelProviderPreference: (id) => providers.has(id)
|
|
40
|
+
};
|
|
41
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
42
|
+
category.settingsRowService = service;
|
|
43
|
+
return category;
|
|
44
|
+
}
|
|
45
|
+
describe('ModelsConfigurationCategory', () => {
|
|
46
|
+
before(() => disableJSDOM = (0, jsdom_1.enableJSDOM)());
|
|
47
|
+
after(() => disableJSDOM());
|
|
48
|
+
it('declares the models collection metadata', () => {
|
|
49
|
+
const category = createCategory([]);
|
|
50
|
+
(0, chai_1.expect)(category.id).to.equal(ai_configuration_category_1.AiConfigurationCategoryId.MODELS);
|
|
51
|
+
(0, chai_1.expect)(category.kind).to.equal('collection');
|
|
52
|
+
(0, chai_1.expect)(category.renderer).to.equal(category);
|
|
53
|
+
});
|
|
54
|
+
it('groups model settings and one section per discovered provider, ignoring other categories', () => {
|
|
55
|
+
const category = createCategory([
|
|
56
|
+
'ai-features.modelSettings.requestSettings',
|
|
57
|
+
'ai-features.reasoning.defaults',
|
|
58
|
+
'ai-features.anthropic.AnthropicApiKey',
|
|
59
|
+
'ai-features.anthropic.AnthropicModels',
|
|
60
|
+
'ai-features.google.apiKey',
|
|
61
|
+
// must be ignored: owned by other categories / unrelated
|
|
62
|
+
'ai-features.chat.pinChatAgent',
|
|
63
|
+
'ai-features.AiEnable.enableAI',
|
|
64
|
+
'editor.fontSize'
|
|
65
|
+
], [], {}, [
|
|
66
|
+
// one preference per block declares the provider marker; the whole segment becomes a provider block
|
|
67
|
+
'ai-features.anthropic.AnthropicApiKey',
|
|
68
|
+
'ai-features.google.apiKey'
|
|
69
|
+
]);
|
|
70
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
71
|
+
const sections = category.getSections();
|
|
72
|
+
(0, chai_1.expect)(sections.map(s => s.id)).to.deep.equal(['model-settings', 'anthropic', 'google']);
|
|
73
|
+
(0, chai_1.expect)(sections[0].preferenceIds).to.have.members(['ai-features.modelSettings.requestSettings', 'ai-features.reasoning.defaults']);
|
|
74
|
+
(0, chai_1.expect)(sections[1].preferenceIds).to.deep.equal(['ai-features.anthropic.AnthropicApiKey', 'ai-features.anthropic.AnthropicModels']);
|
|
75
|
+
(0, chai_1.expect)(sections[2].preferenceIds).to.deep.equal(['ai-features.google.apiKey']);
|
|
76
|
+
});
|
|
77
|
+
it('does not treat the agent settings store as a provider', () => {
|
|
78
|
+
const category = createCategory([
|
|
79
|
+
'ai-features.anthropic.AnthropicApiKey',
|
|
80
|
+
// agent settings: the hidden backing store and its value-less redirect placeholder
|
|
81
|
+
'ai-features.agentSettings',
|
|
82
|
+
'ai-features.agentSettings.details'
|
|
83
|
+
], ['ai-features.agentSettings', 'ai-features.agentSettings.details'], {}, ['ai-features.anthropic.AnthropicApiKey']);
|
|
84
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
85
|
+
const sections = category.getSections();
|
|
86
|
+
(0, chai_1.expect)(sections.map(s => s.id)).to.deep.equal(['anthropic']);
|
|
87
|
+
});
|
|
88
|
+
it('does not treat an unmarked feature area as a provider (it falls through to the General catch-all)', () => {
|
|
89
|
+
const category = createCategory([
|
|
90
|
+
'ai-features.anthropic.AnthropicApiKey',
|
|
91
|
+
// a feature area that never declares the provider marker must NOT appear as a provider block
|
|
92
|
+
'ai-features.telemetry.enabled'
|
|
93
|
+
], [], {}, ['ai-features.anthropic.AnthropicApiKey']);
|
|
94
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
95
|
+
const sections = category.getSections();
|
|
96
|
+
(0, chai_1.expect)(sections.map(s => s.id)).to.deep.equal(['anthropic']);
|
|
97
|
+
});
|
|
98
|
+
it('exposes one tree child per provider, excluding the cross-provider model settings', () => {
|
|
99
|
+
const category = createCategory([
|
|
100
|
+
'ai-features.modelSettings.requestSettings',
|
|
101
|
+
'ai-features.huggingFace.apiKey',
|
|
102
|
+
'ai-features.google.apiKey'
|
|
103
|
+
], [], { 'ai-features.huggingFace.apiKey': 'Hugging Face', 'ai-features.google.apiKey': 'Google' });
|
|
104
|
+
const children = category.getTreeChildren();
|
|
105
|
+
(0, chai_1.expect)(children.map(c => c.id)).to.deep.equal(['google', 'huggingFace']);
|
|
106
|
+
// Nodes carry the human-readable provider names the schema declares, not the raw segments,
|
|
107
|
+
// and are ordered by that visible label ("Google" before "Hugging Face").
|
|
108
|
+
(0, chai_1.expect)(children.map(c => c.label)).to.deep.equal(['Google', 'Hugging Face']);
|
|
109
|
+
});
|
|
110
|
+
it('labels a provider with the name declared in its preference schema', () => {
|
|
111
|
+
const category = createCategory(['ai-features.huggingFace.apiKey', 'ai-features.huggingFace.models'], [], { 'ai-features.huggingFace.models': 'Hugging Face' });
|
|
112
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
113
|
+
const label = category.getProviderLabel('huggingFace', ['ai-features.huggingFace.apiKey', 'ai-features.huggingFace.models']);
|
|
114
|
+
// Any preference in the block may carry the declared label.
|
|
115
|
+
(0, chai_1.expect)(label).to.equal('Hugging Face');
|
|
116
|
+
});
|
|
117
|
+
it('prettifies the provider segment when the schema declares no name', () => {
|
|
118
|
+
const category = createCategory([]);
|
|
119
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
120
|
+
const label = (id) => category.getProviderLabel(id, [`ai-features.${id}.key`]);
|
|
121
|
+
(0, chai_1.expect)(label('myCustomProvider')).to.equal('My Custom Provider');
|
|
122
|
+
(0, chai_1.expect)(label('some-vendor')).to.equal('Some vendor');
|
|
123
|
+
});
|
|
124
|
+
it('indexes each setting for deep search, navigating provider settings to the provider node', () => {
|
|
125
|
+
const category = createCategory([
|
|
126
|
+
'ai-features.modelSettings.requestSettings',
|
|
127
|
+
'ai-features.anthropic.AnthropicApiKey'
|
|
128
|
+
], [], {}, ['ai-features.anthropic.AnthropicApiKey']);
|
|
129
|
+
const items = category.getSearchItems();
|
|
130
|
+
(0, chai_1.expect)(items).to.have.lengthOf(2);
|
|
131
|
+
// Cross-provider model settings navigate to the overview (no itemId).
|
|
132
|
+
(0, chai_1.expect)(items[0].target).to.deep.equal({
|
|
133
|
+
categoryId: ai_configuration_category_1.AiConfigurationCategoryId.MODELS,
|
|
134
|
+
itemId: undefined,
|
|
135
|
+
highlight: { rowId: 'ai-features.modelSettings.requestSettings' }
|
|
136
|
+
});
|
|
137
|
+
// Provider settings navigate to the provider node.
|
|
138
|
+
(0, chai_1.expect)(items[1].target).to.deep.equal({
|
|
139
|
+
categoryId: ai_configuration_category_1.AiConfigurationCategoryId.MODELS,
|
|
140
|
+
itemId: 'anthropic',
|
|
141
|
+
highlight: { rowId: 'ai-features.anthropic.AnthropicApiKey' }
|
|
142
|
+
});
|
|
143
|
+
});
|
|
144
|
+
});
|
|
145
|
+
//# sourceMappingURL=models-configuration-category.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"models-configuration-category.spec.js","sourceRoot":"","sources":["../../../../src/browser/ai-configuration/categories/models-configuration-category.spec.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,+CAA+C;AAC/C,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA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AC,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC;YAClC,UAAU,EAAE,qDAAyB,CAAC,MAAM;YAC5C,MAAM,EAAE,SAAS;YACjB,SAAS,EAAE,EAAE,KAAK,EAAE,2CAA2C,EAAE;SACpE,CAAC,CAAC;QACH,mDAAmD;QACnD,IAAA,aAAM,EAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC;YAClC,UAAU,EAAE,qDAAyB,CAAC,MAAM;YAC5C,MAAM,EAAE,WAAW;YACnB,SAAS,EAAE,EAAE,KAAK,EAAE,uCAAuC,EAAE;SAChE,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { Agent, AgentService } from '@theia/ai-core';
|
|
2
|
+
import { PromptFragment, PromptService } from '@theia/ai-core/lib/common/prompt-service';
|
|
3
|
+
import { Emitter, Event } from '@theia/core';
|
|
4
|
+
import { DisposableCollection } from '@theia/core/lib/common';
|
|
5
|
+
import * as React from '@theia/core/shared/react';
|
|
6
|
+
import { AiConfigurationCategory, AiConfigurationRenderContext, AiConfigurationSearchItem, AiConfigurationSearchProvider, AiConfigurationSelection } from '@theia/ai-core-ui/lib/browser/ai-configuration/ai-configuration-category';
|
|
7
|
+
import { SinglePageCategoryRenderer } from '@theia/ai-core-ui/lib/browser/ai-configuration/renderers/single-page-category-renderer';
|
|
8
|
+
import { CollapsibleRow } from '@theia/ai-core-ui/lib/browser/ai-configuration/components/collapsible-list';
|
|
9
|
+
/** Which group a fragment belongs to, in the order the page renders them. */
|
|
10
|
+
export type PromptSnippetKind = 'snippet' | 'capability' | 'generic-capability';
|
|
11
|
+
/** One prompt fragment as this page shows it, resolved from the prompt service on load. */
|
|
12
|
+
export interface PromptSnippetEntry {
|
|
13
|
+
readonly id: string;
|
|
14
|
+
readonly kind: PromptSnippetKind;
|
|
15
|
+
/** Frontmatter `name`, when the fragment declares one. */
|
|
16
|
+
readonly name?: string;
|
|
17
|
+
/** Frontmatter `description`, when the fragment declares one. */
|
|
18
|
+
readonly description?: string;
|
|
19
|
+
/** A customization currently overrides (or, without a built-in, provides) the text. */
|
|
20
|
+
readonly customized: boolean;
|
|
21
|
+
/** `false` for a fragment that exists only as a user/workspace file, where reset has nothing to fall back to. */
|
|
22
|
+
readonly hasBuiltIn: boolean;
|
|
23
|
+
/** Agents whose selected prompt references this fragment as a capability; empty for plain snippets. */
|
|
24
|
+
readonly agentIds: string[];
|
|
25
|
+
}
|
|
26
|
+
export declare namespace PromptSnippetsConfiguration {
|
|
27
|
+
/**
|
|
28
|
+
* Prefix of the `data-ai-config-row-id` of every row on this page, regardless of its group, so that
|
|
29
|
+
* a deep link only needs the fragment id (an agent's capability list, for instance, does not know
|
|
30
|
+
* whether a fragment ends up under Capabilities or Generic Capabilities).
|
|
31
|
+
*/
|
|
32
|
+
const ROW_ID_PREFIX = "fragment:";
|
|
33
|
+
/** Navigation target that scrolls to and flashes `fragmentId`'s row on this page. */
|
|
34
|
+
function selectionFor(fragmentId: string): AiConfigurationSelection;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* The "Prompt Snippets" category: every prompt fragment that has no other home in this view, as a
|
|
38
|
+
* filterable list of expandable rows in three groups — user-authored snippets, agent capabilities and
|
|
39
|
+
* generic capabilities. Prompt variant sets live in the agent detail, skills and slash commands on the
|
|
40
|
+
* Skills page, so those are filtered out here; what remains would otherwise be uneditable, which is
|
|
41
|
+
* what this page fixes.
|
|
42
|
+
*
|
|
43
|
+
* Capability fragments are global: editing one affects every agent that references it, which is why
|
|
44
|
+
* each row lists the agents using it rather than pretending the text belongs to one of them.
|
|
45
|
+
*/
|
|
46
|
+
export declare class PromptSnippetsConfigurationCategory extends SinglePageCategoryRenderer implements AiConfigurationCategory, AiConfigurationSearchProvider {
|
|
47
|
+
readonly id = "prompt-snippets";
|
|
48
|
+
readonly label: string;
|
|
49
|
+
readonly description: string;
|
|
50
|
+
readonly iconClass: string;
|
|
51
|
+
readonly order = 550;
|
|
52
|
+
readonly kind: "single-page";
|
|
53
|
+
protected readonly promptService: PromptService;
|
|
54
|
+
protected readonly agentService: AgentService;
|
|
55
|
+
protected readonly onDidChangeEmitter: Emitter<void>;
|
|
56
|
+
readonly onDidChange: Event<void>;
|
|
57
|
+
protected readonly toDispose: DisposableCollection;
|
|
58
|
+
protected entries: PromptSnippetEntry[];
|
|
59
|
+
protected availableAgents: Agent[];
|
|
60
|
+
get renderer(): this;
|
|
61
|
+
get search(): AiConfigurationSearchProvider;
|
|
62
|
+
protected init(): void;
|
|
63
|
+
dispose(): void;
|
|
64
|
+
protected reload(): void;
|
|
65
|
+
/**
|
|
66
|
+
* Classifies every registered fragment, dropping those another part of the view already owns.
|
|
67
|
+
* Grouped by {@link PromptSnippetKind} and sorted by display name within each group.
|
|
68
|
+
*/
|
|
69
|
+
protected loadEntries(): PromptSnippetEntry[];
|
|
70
|
+
/**
|
|
71
|
+
* A fragment is a *generic* capability when it is one of the fixed set the chat dropdowns inject
|
|
72
|
+
* (`CAPABILITY_TYPE_PROMPT_MAP` is that single source of truth), and a *capability* when an agent
|
|
73
|
+
* references it as `{{capability:id}}`. Declared frontmatter is accepted as a fallback so that a
|
|
74
|
+
* capability shipped by an extension still groups correctly before any agent template pulls it in.
|
|
75
|
+
*/
|
|
76
|
+
protected classify(id: string, fragment: PromptFragment, genericCapabilityIds: Set<string>, referencedByAgent: boolean): PromptSnippetKind;
|
|
77
|
+
/**
|
|
78
|
+
* Maps capability fragment id -> ids of the agents referencing it. Mirrors the agent detail page,
|
|
79
|
+
* which parses `{{capability:...}}` out of each agent's selected prompt, so both agree on what
|
|
80
|
+
* counts as a capability. Uses the globally effective variant to stay synchronous; the agent detail
|
|
81
|
+
* additionally honours that agent's own variant selection.
|
|
82
|
+
*/
|
|
83
|
+
protected collectCapabilityReferences(): Map<string, string[]>;
|
|
84
|
+
/**
|
|
85
|
+
* Fragment ids another part of the view is responsible for: the prompt variant sets and their
|
|
86
|
+
* variants, which the agent detail owns as the single source of truth.
|
|
87
|
+
*/
|
|
88
|
+
protected collectFragmentIdsOwnedElsewhere(): Set<string>;
|
|
89
|
+
protected displayName(entry: PromptSnippetEntry): string;
|
|
90
|
+
protected renderSections(ctx: AiConfigurationRenderContext): React.ReactNode;
|
|
91
|
+
/**
|
|
92
|
+
* Page-level reset, as the prompt fragments page it replaces had. Shown only while something is
|
|
93
|
+
* customized, and explicit that it reverts *every* customization — including the agents' prompt
|
|
94
|
+
* variants, which live on their own pages.
|
|
95
|
+
*/
|
|
96
|
+
protected renderResetAllCallout(ctx: AiConfigurationRenderContext): React.ReactNode;
|
|
97
|
+
/**
|
|
98
|
+
* Whether anything would actually be reset. Deliberately not limited to this page's entries: the action
|
|
99
|
+
* reverts every customized fragment that has a built-in, which includes the agents' prompt templates
|
|
100
|
+
* (listed on their own pages), so gating on the rows here would hide it exactly when it is needed.
|
|
101
|
+
*/
|
|
102
|
+
protected hasResettableCustomizations(): boolean;
|
|
103
|
+
protected resetAllCustomizations(ctx: AiConfigurationRenderContext): Promise<void>;
|
|
104
|
+
protected buildRows(kind: PromptSnippetKind, ctx: AiConfigurationRenderContext, onOpenAgent: (agentId: string) => void): CollapsibleRow[];
|
|
105
|
+
protected buildRow(entry: PromptSnippetEntry, ctx: AiConfigurationRenderContext, onOpenAgent: (agentId: string) => void): CollapsibleRow;
|
|
106
|
+
/** Opens the effective text: the customization if there is one, otherwise a fresh copy of the built-in. */
|
|
107
|
+
protected editEntry(entry: PromptSnippetEntry): void;
|
|
108
|
+
/** Drops all customizations so the built-in text applies again. */
|
|
109
|
+
protected resetEntry(entry: PromptSnippetEntry, ctx: AiConfigurationRenderContext): Promise<void>;
|
|
110
|
+
/** Deletes a snippet that has no built-in behind it, naming the file, since it is gone afterwards. */
|
|
111
|
+
protected removeEntry(entry: PromptSnippetEntry, ctx: AiConfigurationRenderContext): Promise<void>;
|
|
112
|
+
getSearchItems(): AiConfigurationSearchItem[];
|
|
113
|
+
}
|
|
114
|
+
//# sourceMappingURL=prompt-snippets-configuration-category.d.ts.map
|
package/lib/browser/ai-configuration/categories/prompt-snippets-configuration-category.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompt-snippets-configuration-category.d.ts","sourceRoot":"","sources":["../../../../src/browser/ai-configuration/categories/prompt-snippets-configuration-category.tsx"],"names":[],"mappings":"AAgBA,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAErD,OAAO,EAA8B,cAAc,EAAE,aAAa,EAAE,MAAM,0CAA0C,CAAC;AACrH,OAAO,EAAE,OAAO,EAAE,KAAK,EAAO,MAAM,aAAa,CAAC;AAElD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAE9D,OAAO,KAAK,KAAK,MAAM,0BAA0B,CAAC;AAClD,OAAO,EACH,uBAAuB,EAGvB,4BAA4B,EAC5B,yBAAyB,EACzB,6BAA6B,EAC7B,wBAAwB,EAC3B,MAAM,0EAA0E,CAAC;AAClF,OAAO,EAAE,0BAA0B,EAAE,MAAM,wFAAwF,CAAC;AACpI,OAAO,EAGH,cAAc,EAEjB,MAAM,4EAA4E,CAAC;AAapF,6EAA6E;AAC7E,MAAM,MAAM,iBAAiB,GAAG,SAAS,GAAG,YAAY,GAAG,oBAAoB,CAAC;AAEhF,2FAA2F;AAC3F,MAAM,WAAW,kBAAkB;IAC/B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,IAAI,EAAE,iBAAiB,CAAC;IACjC,0DAA0D;IAC1D,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,iEAAiE;IACjE,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,uFAAuF;IACvF,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;IAC7B,iHAAiH;I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