@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,100 @@
|
|
|
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 { flushSync } from '@theia/core/shared/react-dom';
|
|
26
|
+
import { createRoot } from '@theia/core/shared/react-dom/client';
|
|
27
|
+
import { ReasoningSupport } from '@theia/ai-core/lib/common';
|
|
28
|
+
import { AiSettingsRowService } from '@theia/ai-core-ui/lib/browser/ai-configuration/components/ai-settings-row-service';
|
|
29
|
+
import { ReasoningRow } from './language-model-renderer';
|
|
30
|
+
|
|
31
|
+
disableJSDOM();
|
|
32
|
+
|
|
33
|
+
describe('ReasoningRow', () => {
|
|
34
|
+
|
|
35
|
+
before(() => disableJSDOM = enableJSDOM());
|
|
36
|
+
after(() => disableJSDOM());
|
|
37
|
+
|
|
38
|
+
const support: ReasoningSupport = { supportedLevels: ['off', 'low', 'high'], defaultLevel: 'low' };
|
|
39
|
+
|
|
40
|
+
function render(props: Partial<React.ComponentProps<typeof ReasoningRow>>): { container: HTMLElement; dispose: () => void } {
|
|
41
|
+
const container = document.createElement('div');
|
|
42
|
+
document.body.appendChild(container);
|
|
43
|
+
const root = createRoot(container);
|
|
44
|
+
flushSync(() => root.render(React.createElement(ReasoningRow, {
|
|
45
|
+
support,
|
|
46
|
+
inheritedLevel: 'low',
|
|
47
|
+
onSelect: () => { },
|
|
48
|
+
onReset: () => { },
|
|
49
|
+
settingsRowService: { openResetMenu: () => { } } as unknown as AiSettingsRowService,
|
|
50
|
+
...props
|
|
51
|
+
})));
|
|
52
|
+
return { container, dispose: () => { flushSync(() => root.unmount()); container.remove(); } };
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
it('marks the select with the effective level, which is what draws the shared lightbulb glyph', () => {
|
|
56
|
+
const stored = render({ savedLevel: 'high' });
|
|
57
|
+
try {
|
|
58
|
+
const select = stored.container.querySelector('.theia-ReasoningLevelSelector');
|
|
59
|
+
expect(select?.classList.contains('reasoning-level-high')).to.equal(true);
|
|
60
|
+
} finally {
|
|
61
|
+
stored.dispose();
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
// Nothing stored: the row shows the inherited level, so the glyph matches what the model will do.
|
|
65
|
+
const inherited = render({ savedLevel: undefined, inheritedLevel: 'off' });
|
|
66
|
+
try {
|
|
67
|
+
const select = inherited.container.querySelector('.theia-ReasoningLevelSelector');
|
|
68
|
+
expect(select?.classList.contains('reasoning-level-off')).to.equal(true);
|
|
69
|
+
} finally {
|
|
70
|
+
inherited.dispose();
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
it('offers a reset only once a level is stored for the agent', () => {
|
|
75
|
+
const stored = render({ savedLevel: 'high' });
|
|
76
|
+
try {
|
|
77
|
+
expect(Boolean(stored.container.querySelector('.ai-settings-row-gear'))).to.equal(true);
|
|
78
|
+
expect(Boolean(stored.container.querySelector('.ai-settings-row.modified'))).to.equal(true);
|
|
79
|
+
} finally {
|
|
80
|
+
stored.dispose();
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
const inherited = render({ savedLevel: undefined });
|
|
84
|
+
try {
|
|
85
|
+
expect(Boolean(inherited.container.querySelector('.ai-settings-row-gear'))).to.equal(false);
|
|
86
|
+
expect(Boolean(inherited.container.querySelector('.ai-settings-row.modified'))).to.equal(false);
|
|
87
|
+
} finally {
|
|
88
|
+
inherited.dispose();
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
it('names the inherited level while nothing is stored, so the effective value is not a guess', () => {
|
|
93
|
+
const inherited = render({ savedLevel: undefined, inheritedLevel: 'high' });
|
|
94
|
+
try {
|
|
95
|
+
expect(inherited.container.textContent).to.include('High');
|
|
96
|
+
} finally {
|
|
97
|
+
inherited.dispose();
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
});
|
|
@@ -14,10 +14,24 @@
|
|
|
14
14
|
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
15
15
|
// *****************************************************************************
|
|
16
16
|
import * as React from '@theia/core/shared/react';
|
|
17
|
-
import {
|
|
17
|
+
import {
|
|
18
|
+
Agent,
|
|
19
|
+
AISettingsService,
|
|
20
|
+
FrontendLanguageModelRegistry,
|
|
21
|
+
LanguageModel,
|
|
22
|
+
LanguageModelRequirement,
|
|
23
|
+
PREFERENCE_NAME_REASONING,
|
|
24
|
+
ReasoningLevel,
|
|
25
|
+
ReasoningPreferenceEntry,
|
|
26
|
+
ReasoningSupport
|
|
27
|
+
} from '@theia/ai-core/lib/common';
|
|
28
|
+
import { mergeReasoningSettings } from '@theia/ai-core/lib/browser/frontend-language-model-service';
|
|
18
29
|
import { LanguageModelAlias } from '@theia/ai-core/lib/common/language-model-alias';
|
|
19
30
|
import { Mutable } from '@theia/core';
|
|
20
31
|
import { nls } from '@theia/core/lib/common/nls';
|
|
32
|
+
import { SelectComponent, SelectOption } from '@theia/core/lib/browser/widgets/select-component';
|
|
33
|
+
import { AiConfigurationSettingRow } from '@theia/ai-core-ui/lib/browser/ai-configuration/components/ai-configuration-setting-row';
|
|
34
|
+
import { AiSettingsRowService } from '@theia/ai-core-ui/lib/browser/ai-configuration/components/ai-settings-row-service';
|
|
21
35
|
|
|
22
36
|
export interface LanguageModelSettingsProps {
|
|
23
37
|
agent: Agent;
|
|
@@ -25,37 +39,130 @@ export interface LanguageModelSettingsProps {
|
|
|
25
39
|
aiSettingsService: AISettingsService;
|
|
26
40
|
languageModelRegistry: FrontendLanguageModelRegistry;
|
|
27
41
|
languageModelAliases: LanguageModelAlias[];
|
|
42
|
+
/** Backs each purpose row's gear menu (its "Reset Setting" drops that purpose's override). */
|
|
43
|
+
settingsRowService: AiSettingsRowService;
|
|
28
44
|
}
|
|
29
45
|
|
|
30
|
-
|
|
31
|
-
|
|
46
|
+
/**
|
|
47
|
+
* The model/alias picker for a single requirement, backed by the shared {@link SelectComponent}.
|
|
48
|
+
* Extracted so its `onChange` can be a stable, purpose-bound callback (rather than an inline closure)
|
|
49
|
+
* per the React guideline.
|
|
50
|
+
*/
|
|
51
|
+
const ModelSelect: React.FC<{
|
|
52
|
+
id: string;
|
|
53
|
+
purpose: string;
|
|
54
|
+
value: string | undefined;
|
|
55
|
+
options: SelectOption[];
|
|
56
|
+
onSelect: (purpose: string, identifier: string) => void;
|
|
57
|
+
}> = ({ id, purpose, value, options, onSelect }) => {
|
|
58
|
+
const handleChange = React.useCallback((option: SelectOption): void => {
|
|
59
|
+
onSelect(purpose, option.value ?? '');
|
|
60
|
+
}, [onSelect, purpose]);
|
|
61
|
+
return <SelectComponent
|
|
62
|
+
id={id}
|
|
63
|
+
className='ai-config-select ai-configuration-value-row-value'
|
|
64
|
+
options={options}
|
|
65
|
+
defaultValue={value}
|
|
66
|
+
onChange={handleChange}
|
|
67
|
+
/>;
|
|
68
|
+
};
|
|
32
69
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
70
|
+
/** Same wording as the chat input's selector, so a level reads identically wherever it is set. */
|
|
71
|
+
const reasoningLevelLabel = (level: ReasoningLevel): string => {
|
|
72
|
+
switch (level) {
|
|
73
|
+
case 'off': return nls.localizeByDefault('Off');
|
|
74
|
+
case 'minimal': return nls.localizeByDefault('Minimal');
|
|
75
|
+
case 'low': return nls.localizeByDefault('Low');
|
|
76
|
+
case 'medium': return nls.localizeByDefault('Medium');
|
|
77
|
+
case 'high': return nls.localizeByDefault('High');
|
|
78
|
+
case 'auto': return nls.localizeByDefault('Auto');
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* The agent's persisted reasoning level, shown right below its models because that is the model
|
|
84
|
+
* capability it depends on. The chat input's selector writes this same per-agent setting, so without this
|
|
85
|
+
* row there is no way to see what it stored, change it outside a chat, or clear it again.
|
|
86
|
+
*
|
|
87
|
+
* Shown only while the resolved model declares reasoning support, matching the chat input, which hides its
|
|
88
|
+
* selector in that case. The select carries `theia-ReasoningLevelSelector` so it shows the same per-level
|
|
89
|
+
* lightbulb glyphs as the chat input.
|
|
90
|
+
*
|
|
91
|
+
* Exported for tests: the glyph class it builds is the contract with `ai-chat-ui`'s shared CSS.
|
|
92
|
+
*/
|
|
93
|
+
export const ReasoningRow: React.FC<{
|
|
94
|
+
support: ReasoningSupport;
|
|
95
|
+
/** Level stored for this agent; `undefined` means the level is inherited. */
|
|
96
|
+
savedLevel?: ReasoningLevel;
|
|
97
|
+
/** Level that applies when nothing is stored: the matching preference default, else the model's. */
|
|
98
|
+
inheritedLevel: ReasoningLevel;
|
|
99
|
+
onSelect: (level: ReasoningLevel) => void;
|
|
100
|
+
onReset: () => void;
|
|
101
|
+
settingsRowService: AiSettingsRowService;
|
|
102
|
+
}> = ({ support, savedLevel, inheritedLevel, onSelect, onReset, settingsRowService }) => {
|
|
103
|
+
const options = React.useMemo<SelectOption[]>(
|
|
104
|
+
() => support.supportedLevels.map(level => ({ value: level, label: reasoningLevelLabel(level) })),
|
|
105
|
+
[support]
|
|
106
|
+
);
|
|
107
|
+
const handleChange = React.useCallback((option: SelectOption): void => {
|
|
108
|
+
if (option.value) {
|
|
109
|
+
onSelect(option.value as ReasoningLevel);
|
|
110
|
+
}
|
|
111
|
+
}, [onSelect]);
|
|
112
|
+
const effectiveLevel = savedLevel ?? inheritedLevel;
|
|
113
|
+
return <AiConfigurationSettingRow
|
|
114
|
+
title={nls.localizeByDefault('Reasoning')}
|
|
115
|
+
description={savedLevel
|
|
116
|
+
? nls.localize('theia/ai/core/languageModelRenderer/reasoningStored',
|
|
117
|
+
'Reasoning effort this agent asks the model for. Set here or by the chat input\'s selector, which writes the same setting.')
|
|
118
|
+
: nls.localize('theia/ai/core/languageModelRenderer/reasoningInherited',
|
|
119
|
+
'Reasoning effort this agent asks the model for. Not set, so "{0}" applies, from the reasoning defaults preference or the model.',
|
|
120
|
+
reasoningLevelLabel(inheritedLevel))}
|
|
121
|
+
modified={savedLevel !== undefined}
|
|
122
|
+
below={<SelectComponent
|
|
123
|
+
className={`ai-config-select ai-configuration-value-row-value theia-ReasoningLevelSelector reasoning-level-${effectiveLevel}`}
|
|
124
|
+
options={options}
|
|
125
|
+
defaultValue={effectiveLevel}
|
|
126
|
+
onChange={handleChange}
|
|
127
|
+
/>}
|
|
128
|
+
onOpenMenu={savedLevel !== undefined ? gear => settingsRowService.openResetMenu(gear, onReset) : undefined}
|
|
129
|
+
/>;
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
export const LanguageModelRenderer: React.FC<LanguageModelSettingsProps> = (
|
|
133
|
+
{ agent, languageModels, aiSettingsService, languageModelRegistry, languageModelAliases: aliases, settingsRowService }) => {
|
|
37
134
|
|
|
38
135
|
const [lmRequirementMap, setLmRequirementMap] = React.useState<Record<string, LanguageModelRequirement>>({});
|
|
136
|
+
const [overriddenPurposes, setOverriddenPurposes] = React.useState<ReadonlySet<string>>(new Set());
|
|
39
137
|
const [resolvedAliasModels, setResolvedAliasModels] = React.useState<Record<string, LanguageModel | undefined>>({});
|
|
138
|
+
/** Level stored for this agent, as the chat input's selector persists it; `undefined` means inherited. */
|
|
139
|
+
const [savedReasoningLevel, setSavedReasoningLevel] = React.useState<ReasoningLevel | undefined>(undefined);
|
|
40
140
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
141
|
+
// Merge the agent's declared requirements with the user's per-purpose overrides, resolving a default model
|
|
142
|
+
// where none is selected, and track which purposes the user has explicitly overridden (for the reset action).
|
|
143
|
+
const loadRequirements = React.useCallback(async (): Promise<void> => {
|
|
144
|
+
const settings = await aiSettingsService.getAgentSettings(agent.id);
|
|
145
|
+
const userRequirements = settings?.languageModelRequirements ?? [];
|
|
146
|
+
const overrides = new Set<string>();
|
|
147
|
+
const map: Record<string, LanguageModelRequirement> = {};
|
|
148
|
+
for (const declared of agent.languageModelRequirements) {
|
|
149
|
+
const userRequirement = userRequirements.find(e => e.purpose === declared.purpose);
|
|
150
|
+
if (userRequirement) {
|
|
151
|
+
overrides.add(declared.purpose);
|
|
152
|
+
}
|
|
153
|
+
const lmRequirement = userRequirement ?? declared;
|
|
154
|
+
if (!lmRequirement.identifier) {
|
|
155
|
+
const llm = await languageModelRegistry.selectLanguageModel({ agent: agent.id, ...lmRequirement });
|
|
156
|
+
(lmRequirement as Mutable<LanguageModelRequirement>).identifier = llm?.id;
|
|
157
|
+
}
|
|
158
|
+
map[declared.purpose] = lmRequirement;
|
|
159
|
+
}
|
|
160
|
+
setLmRequirementMap(map);
|
|
161
|
+
setOverriddenPurposes(overrides);
|
|
162
|
+
setSavedReasoningLevel(settings?.reasoning?.level);
|
|
163
|
+
}, [agent, aiSettingsService, languageModelRegistry]);
|
|
164
|
+
|
|
165
|
+
React.useEffect(() => { loadRequirements(); }, [loadRequirements]);
|
|
59
166
|
|
|
60
167
|
// Effect to resolve alias to model whenever requirements.identifier or aliases change
|
|
61
168
|
React.useEffect(() => {
|
|
@@ -72,89 +179,126 @@ export const LanguageModelRenderer: React.FC<LanguageModelSettingsProps> = (
|
|
|
72
179
|
resolveAliases();
|
|
73
180
|
}, [lmRequirementMap, aliases]);
|
|
74
181
|
|
|
75
|
-
|
|
76
|
-
|
|
182
|
+
/**
|
|
183
|
+
* The model behind the agent's requirements that declares reasoning support, and the id it is known by.
|
|
184
|
+
* Mirrors the chat input, which takes the first supporting model it resolves for the receiving agent.
|
|
185
|
+
*/
|
|
186
|
+
const reasoningModel = React.useMemo<LanguageModel | undefined>(() => {
|
|
187
|
+
for (const requirement of Object.values(lmRequirementMap)) {
|
|
188
|
+
const identifier = requirement.identifier;
|
|
189
|
+
if (!identifier) {
|
|
190
|
+
continue;
|
|
191
|
+
}
|
|
192
|
+
const model = aliases.some(alias => alias.id === identifier)
|
|
193
|
+
? resolvedAliasModels[identifier]
|
|
194
|
+
: languageModels?.find(candidate => candidate.id === identifier);
|
|
195
|
+
if (model?.reasoningSupport) {
|
|
196
|
+
return model;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
return undefined;
|
|
200
|
+
}, [lmRequirementMap, resolvedAliasModels, aliases, languageModels]);
|
|
201
|
+
|
|
202
|
+
/** What applies while the agent stores no level: the matching reasoning default, else the model's own. */
|
|
203
|
+
const inheritedReasoningLevel = React.useMemo<ReasoningLevel>(() => {
|
|
204
|
+
const support = reasoningModel?.reasoningSupport;
|
|
205
|
+
if (!support) {
|
|
206
|
+
return 'off';
|
|
207
|
+
}
|
|
208
|
+
const entries = settingsRowService.inspect(PREFERENCE_NAME_REASONING, 'user').value as ReasoningPreferenceEntry[] | undefined;
|
|
209
|
+
const [providerId, modelId] = (reasoningModel?.id ?? '').split('/');
|
|
210
|
+
const fromPreference = entries?.length
|
|
211
|
+
? mergeReasoningSettings(entries, modelId, providerId, agent.id)?.reasoning?.level
|
|
212
|
+
: undefined;
|
|
213
|
+
return fromPreference ?? support.defaultLevel ?? support.supportedLevels[0] ?? 'off';
|
|
214
|
+
}, [reasoningModel, settingsRowService, agent.id]);
|
|
215
|
+
|
|
216
|
+
const onReasoningChange = React.useCallback(async (level: ReasoningLevel): Promise<void> => {
|
|
217
|
+
await aiSettingsService.updateAgentSettings(agent.id, { reasoning: { level } });
|
|
218
|
+
setSavedReasoningLevel(level);
|
|
219
|
+
}, [aiSettingsService, agent.id]);
|
|
220
|
+
|
|
221
|
+
// Drop the stored level so the preference default (or the model's) applies again.
|
|
222
|
+
const onResetReasoning = React.useCallback(async (): Promise<void> => {
|
|
223
|
+
await aiSettingsService.updateAgentSettings(agent.id, { reasoning: undefined });
|
|
224
|
+
setSavedReasoningLevel(undefined);
|
|
225
|
+
}, [aiSettingsService, agent.id]);
|
|
226
|
+
|
|
227
|
+
const onSelectedModelChange = React.useCallback((purpose: string, identifier: string): void => {
|
|
228
|
+
const newLmRequirementMap = { ...lmRequirementMap, [purpose]: { purpose, identifier } };
|
|
77
229
|
aiSettingsService.updateAgentSettings(agent.id, { languageModelRequirements: Object.values(newLmRequirementMap) });
|
|
78
230
|
setLmRequirementMap(newLmRequirementMap);
|
|
79
|
-
|
|
231
|
+
setOverriddenPurposes(previous => new Set(previous).add(purpose));
|
|
232
|
+
}, [lmRequirementMap, aiSettingsService, agent.id]);
|
|
233
|
+
|
|
234
|
+
// Reset a purpose: drop the user override so it falls back to the agent's declared requirement.
|
|
235
|
+
const onResetPurpose = React.useCallback(async (purpose: string): Promise<void> => {
|
|
236
|
+
const settings = await aiSettingsService.getAgentSettings(agent.id);
|
|
237
|
+
const remaining = (settings?.languageModelRequirements ?? []).filter(requirement => requirement.purpose !== purpose);
|
|
238
|
+
await aiSettingsService.updateAgentSettings(agent.id, { languageModelRequirements: remaining });
|
|
239
|
+
await loadRequirements();
|
|
240
|
+
}, [aiSettingsService, agent.id, loadRequirements]);
|
|
241
|
+
|
|
242
|
+
// The empty entry preserves the "no selection" choice; aliases are listed first, then language models.
|
|
243
|
+
const modelSelectOptions = React.useMemo<SelectOption[]>(() => {
|
|
244
|
+
const options: SelectOption[] = [{ value: '', label: '' }];
|
|
245
|
+
aliases?.slice().sort((a, b) => a.id.localeCompare(b.id)).forEach(alias => {
|
|
246
|
+
options.push({
|
|
247
|
+
value: alias.id,
|
|
248
|
+
label: nls.localize('theia/ai/core/languageModelRenderer/alias', '[alias] {0}', alias.id)
|
|
249
|
+
});
|
|
250
|
+
});
|
|
251
|
+
languageModels?.slice().sort((a, b) => (a.name ?? a.id).localeCompare(b.name ?? b.id)).forEach(model => {
|
|
252
|
+
const isNotReady = model.status.status !== 'ready';
|
|
253
|
+
options.push({
|
|
254
|
+
value: model.id,
|
|
255
|
+
label: `${model.name ?? model.id} ${isNotReady ? '✗' : '✓'}`,
|
|
256
|
+
description: isNotReady && model.status.message ? model.status.message : undefined
|
|
257
|
+
});
|
|
258
|
+
});
|
|
259
|
+
return options;
|
|
260
|
+
}, [aliases, languageModels]);
|
|
80
261
|
|
|
81
262
|
return <div className='language-model-container'>
|
|
82
263
|
{lmRequirementMap && Object.keys(lmRequirementMap).length > 0 ? (
|
|
83
264
|
<div className="settings-section-subcategory-title ai-settings-section-subcategory-title">
|
|
84
|
-
{nls.
|
|
265
|
+
{nls.localizeByDefault('Language Models')}
|
|
85
266
|
</div>
|
|
86
267
|
) : undefined}
|
|
87
|
-
{Object.values(lmRequirementMap).map(
|
|
88
|
-
const isAlias = requirement.identifier && aliases.some(a => a.id === requirement.identifier);
|
|
89
|
-
const resolvedModel = isAlias ? resolvedAliasModels[requirement.identifier] : undefined;
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
<
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
<option key={`alias/${alias.id}`} value={alias.id} className='ai-language-model-item-ready'>
|
|
114
|
-
{nls.localize('theia/ai/core/languageModelRenderer/alias', '[alias] {0}', alias.id)}
|
|
115
|
-
</option>
|
|
116
|
-
))}
|
|
117
|
-
{languageModels?.sort((a, b) => (a.name ?? a.id).localeCompare(b.name ?? b.id)).map(model => {
|
|
118
|
-
const isNotReady = model.status.status !== 'ready';
|
|
119
|
-
return (
|
|
120
|
-
<option
|
|
121
|
-
key={model.id}
|
|
122
|
-
value={model.id}
|
|
123
|
-
className={isNotReady ? 'ai-language-model-item-not-ready' : 'ai-language-model-item-ready'}
|
|
124
|
-
title={isNotReady && model.status.message ? model.status.message : undefined}
|
|
125
|
-
>
|
|
126
|
-
{model.name ?? model.id} {isNotReady ? '✗' : '✓'}
|
|
127
|
-
</option>
|
|
128
|
-
);
|
|
129
|
-
})}
|
|
130
|
-
</select>
|
|
131
|
-
</div>
|
|
132
|
-
{/* If alias is selected, show what it currently evaluates to */}
|
|
133
|
-
{isAlias && (
|
|
134
|
-
<div className="ai-configuration-value-row">
|
|
135
|
-
<span className="ai-configuration-value-row-label">{nls.localize('theia/ai/core/modelAliasesConfiguration/evaluatesTo', 'Evaluates to')}:</span>
|
|
136
|
-
{resolvedModel ? (
|
|
137
|
-
<span className="ai-configuration-value-row-value">
|
|
138
|
-
{resolvedModel.name ?? resolvedModel.id}
|
|
139
|
-
{resolvedModel.status.status === 'ready' ? (
|
|
140
|
-
<span className="ai-model-status-ready"
|
|
141
|
-
title={nls.localize('theia/ai/core/modelAliasesConfiguration/modelReadyTooltip', 'Ready')}>✓</span>
|
|
142
|
-
) : (
|
|
143
|
-
<span className="ai-model-status-not-ready" title={resolvedModel.status.message
|
|
144
|
-
|| nls.localize('theia/ai/core/modelAliasesConfiguration/modelNotReadyTooltip', 'Not ready')}>✗</span>
|
|
145
|
-
)}
|
|
146
|
-
</span>
|
|
147
|
-
) : (
|
|
148
|
-
<span className="ai-configuration-value-row-value ai-alias-evaluates-to-unresolved">
|
|
149
|
-
{nls.localize('theia/ai/core/modelAliasesConfiguration/noResolvedModel', 'No model ready for this alias.')}
|
|
150
|
-
<span className="ai-model-status-not-ready"
|
|
151
|
-
title={nls.localize('theia/ai/core/modelAliasesConfiguration/noModelReadyTooltip', 'No model ready')}>✗</span>
|
|
152
|
-
</span>
|
|
153
|
-
)}
|
|
154
|
-
</div>
|
|
155
|
-
)}
|
|
156
|
-
</div>
|
|
157
|
-
);
|
|
268
|
+
{Object.values(lmRequirementMap).map(requirement => {
|
|
269
|
+
const isAlias = !!requirement.identifier && aliases.some(a => a.id === requirement.identifier);
|
|
270
|
+
const resolvedModel = isAlias && requirement.identifier ? resolvedAliasModels[requirement.identifier] : undefined;
|
|
271
|
+
const isOverridden = overriddenPurposes.has(requirement.purpose);
|
|
272
|
+
return <AiConfigurationSettingRow
|
|
273
|
+
key={requirement.purpose}
|
|
274
|
+
title={nls.localize('theia/ai/core/languageModelRenderer/purposeTitle', 'Purpose: {0}', requirement.purpose)}
|
|
275
|
+
modified={isOverridden}
|
|
276
|
+
below={<>
|
|
277
|
+
<ModelSelect
|
|
278
|
+
id={`model-select-${agent.id}-${requirement.purpose}`}
|
|
279
|
+
purpose={requirement.purpose}
|
|
280
|
+
value={requirement.identifier}
|
|
281
|
+
options={modelSelectOptions}
|
|
282
|
+
onSelect={onSelectedModelChange}
|
|
283
|
+
/>
|
|
284
|
+
{isAlias && <div className='ai-lm-evaluates-to'>
|
|
285
|
+
<span className='ai-lm-evaluates-to-label'>{nls.localize('theia/ai/core/modelAliasesConfiguration/evaluatesTo', 'Evaluates to')}:</span>
|
|
286
|
+
{resolvedModel
|
|
287
|
+
? <span>{resolvedModel.name ?? resolvedModel.id} {resolvedModel.status.status === 'ready' ? '✓' : '✗'}</span>
|
|
288
|
+
: <span className='ai-alias-evaluates-to-unresolved'>
|
|
289
|
+
{nls.localize('theia/ai/core/modelAliasesConfiguration/noResolvedModel', 'No model ready for this alias.')}</span>}
|
|
290
|
+
</div>}
|
|
291
|
+
</>}
|
|
292
|
+
onOpenMenu={gear => settingsRowService.openResetMenu(gear, () => onResetPurpose(requirement.purpose))}
|
|
293
|
+
/>;
|
|
158
294
|
})}
|
|
295
|
+
{reasoningModel?.reasoningSupport && <ReasoningRow
|
|
296
|
+
support={reasoningModel.reasoningSupport}
|
|
297
|
+
savedLevel={savedReasoningLevel}
|
|
298
|
+
inheritedLevel={inheritedReasoningLevel}
|
|
299
|
+
onSelect={onReasoningChange}
|
|
300
|
+
onReset={onResetReasoning}
|
|
301
|
+
settingsRowService={settingsRowService}
|
|
302
|
+
/>}
|
|
159
303
|
</div>;
|
|
160
304
|
};
|
|
@@ -20,8 +20,8 @@ import { AbstractStreamParsingChatAgent } from '@theia/ai-chat/lib/common/chat-a
|
|
|
20
20
|
import { ErrorChatResponseContentImpl, MarkdownChatResponseContentImpl, MutableChatRequestModel, QuestionResponseContentImpl } from '@theia/ai-chat/lib/common/chat-model';
|
|
21
21
|
import { LanguageModelRequirement } from '@theia/ai-core/lib/common';
|
|
22
22
|
import { MCPFrontendService, MCPServerDescription } from '@theia/ai-mcp/lib/common/mcp-server-manager';
|
|
23
|
-
import { nls } from '@theia/core';
|
|
24
|
-
import { inject, injectable } from '@theia/core/shared/inversify';
|
|
23
|
+
import { ILogger, nls } from '@theia/core';
|
|
24
|
+
import { inject, injectable, named } from '@theia/core/shared/inversify';
|
|
25
25
|
import { MCP_SERVERS_PREF } from '@theia/ai-mcp/lib/common/mcp-preferences';
|
|
26
26
|
import { PreferenceScope, PreferenceService } from '@theia/core/lib/common';
|
|
27
27
|
import { appTesterPlaywrightTemplate, appTesterDefaultTemplate, appTesterNextTemplate, REQUIRED_MCP_SERVERS, REQUIRED_MCP_SERVERS_NEXT } from './app-tester-prompt-template';
|
|
@@ -30,6 +30,9 @@ export const AppTesterChatAgentId = 'AppTester';
|
|
|
30
30
|
@injectable()
|
|
31
31
|
export class AppTesterChatAgent extends AbstractStreamParsingChatAgent {
|
|
32
32
|
|
|
33
|
+
@inject(ILogger) @named('ai-ide:AppTesterChatAgent')
|
|
34
|
+
protected override readonly logger: ILogger;
|
|
35
|
+
|
|
33
36
|
@inject(MCPFrontendService)
|
|
34
37
|
protected readonly mcpService: MCPFrontendService;
|
|
35
38
|
|
|
@@ -19,9 +19,9 @@ import {
|
|
|
19
19
|
} from '@theia/ai-chat/lib/common';
|
|
20
20
|
import { TaskContextStorageService } from '@theia/ai-chat/lib/browser/task-context-service';
|
|
21
21
|
import { LanguageModelRequirement } from '@theia/ai-core';
|
|
22
|
-
import { inject, injectable } from '@theia/core/shared/inversify';
|
|
22
|
+
import { inject, injectable, named } from '@theia/core/shared/inversify';
|
|
23
23
|
import { architectSystemVariants, ARCHITECT_PLANNING_PROMPT_ID, ARCHITECT_SIMPLE_PROMPT_ID, ARCHITECT_PLANNING_NEXT_PROMPT_ID } from './architect-prompt-template';
|
|
24
|
-
import { nls } from '@theia/core';
|
|
24
|
+
import { ILogger, nls } from '@theia/core';
|
|
25
25
|
import { FrontendApplicationConfigProvider } from '@theia/core/lib/browser/frontend-application-config-provider';
|
|
26
26
|
import { MarkdownStringImpl } from '@theia/core/lib/common/markdown-rendering';
|
|
27
27
|
import { AI_EXECUTE_PLAN_WITH_CODER } from '../common/summarize-session-commands';
|
|
@@ -32,6 +32,9 @@ export { ArchitectAgentId };
|
|
|
32
32
|
|
|
33
33
|
@injectable()
|
|
34
34
|
export class ArchitectAgent extends AbstractModeAwareChatAgent {
|
|
35
|
+
@inject(ILogger) @named('ai-ide:ArchitectAgent')
|
|
36
|
+
protected override readonly logger: ILogger;
|
|
37
|
+
|
|
35
38
|
@inject(ChatService) protected readonly chatService: ChatService;
|
|
36
39
|
@inject(TaskContextStorageService) protected readonly taskContextStorageService: TaskContextStorageService;
|
|
37
40
|
|
|
@@ -19,6 +19,7 @@ import {
|
|
|
19
19
|
GET_WORKSPACE_FILE_LIST_FUNCTION_ID, FILE_CONTENT_FUNCTION_ID, SEARCH_IN_WORKSPACE_FUNCTION_ID, FIND_FILES_BY_PATTERN_FUNCTION_ID
|
|
20
20
|
} from '../common/workspace-functions';
|
|
21
21
|
import { CONTEXT_FILES_VARIABLE_ID, TASK_CONTEXT_SUMMARY_VARIABLE_ID } from '../common/context-variables';
|
|
22
|
+
import { OPEN_EDITORS_HINT_FRAGMENT_ID } from '../common/open-editors-hint-fragment-id';
|
|
22
23
|
import {
|
|
23
24
|
CREATE_TASK_CONTEXT_FUNCTION_ID,
|
|
24
25
|
GET_TASK_CONTEXT_FUNCTION_ID,
|
|
@@ -194,6 +195,8 @@ When a diagram clarifies an architectural concept or how something is implemente
|
|
|
194
195
|
|
|
195
196
|
{{prompt:project-info}}
|
|
196
197
|
|
|
198
|
+
{{prompt:${OPEN_EDITORS_HINT_FRAGMENT_ID}}}
|
|
199
|
+
|
|
197
200
|
{{${TASK_CONTEXT_SUMMARY_VARIABLE_ID}}}
|
|
198
201
|
`
|
|
199
202
|
},
|
|
@@ -231,6 +234,8 @@ Always look at the relevant files to understand your task using the function ~{$
|
|
|
231
234
|
{{${CONTEXT_FILES_VARIABLE_ID}}}
|
|
232
235
|
|
|
233
236
|
{{prompt:project-info}}
|
|
237
|
+
|
|
238
|
+
{{prompt:${OPEN_EDITORS_HINT_FRAGMENT_ID}}}
|
|
234
239
|
`
|
|
235
240
|
},
|
|
236
241
|
{
|
|
@@ -464,6 +469,8 @@ When a diagram clarifies an architectural concept or how something is implemente
|
|
|
464
469
|
|
|
465
470
|
{{prompt:project-info}}
|
|
466
471
|
|
|
472
|
+
{{prompt:${OPEN_EDITORS_HINT_FRAGMENT_ID}}}
|
|
473
|
+
|
|
467
474
|
{{${TASK_CONTEXT_SUMMARY_VARIABLE_ID}}}
|
|
468
475
|
`
|
|
469
476
|
}]
|
|
@@ -187,15 +187,13 @@ export function ChatSessionItem(props: ChatSessionItemComponentProps): React.Rea
|
|
|
187
187
|
|
|
188
188
|
const handleMouseLeave = React.useCallback(() => {
|
|
189
189
|
hoverActiveRef.current = false;
|
|
190
|
-
|
|
191
|
-
}, [hoverService]);
|
|
190
|
+
}, []);
|
|
192
191
|
|
|
193
192
|
const handleMouseOver = React.useCallback((e: React.MouseEvent) => {
|
|
194
193
|
if ((e.target as Element).closest('.theia-chat-session-item-action')) {
|
|
195
194
|
hoverActiveRef.current = false;
|
|
196
|
-
hoverService.cancelHover();
|
|
197
195
|
}
|
|
198
|
-
}, [
|
|
196
|
+
}, []);
|
|
199
197
|
|
|
200
198
|
const handleKeyDown = React.useCallback((e: React.KeyboardEvent) => {
|
|
201
199
|
if (isActivationKey(e)) {
|
|
@@ -17,9 +17,9 @@
|
|
|
17
17
|
import { ChatService, ChatSession, ChatSessionMetadata, ChatSessionStatus } from '@theia/ai-chat';
|
|
18
18
|
import { PERSISTED_SESSION_LIMIT_PREF, SESSION_STORAGE_PREF } from '@theia/ai-chat/lib/common/ai-chat-preferences';
|
|
19
19
|
import { ChatViewWidget } from '@theia/ai-chat-ui/lib/browser/chat-view-widget';
|
|
20
|
-
import { DisposableCollection, Emitter, Event, PreferenceService } from '@theia/core';
|
|
20
|
+
import { DisposableCollection, Emitter, Event, ILogger, PreferenceService } from '@theia/core';
|
|
21
21
|
import { ApplicationShell } from '@theia/core/lib/browser';
|
|
22
|
-
import { inject, injectable, postConstruct } from '@theia/core/shared/inversify';
|
|
22
|
+
import { inject, injectable, named, postConstruct } from '@theia/core/shared/inversify';
|
|
23
23
|
import { UnreadStateProvider } from './chat-session-item';
|
|
24
24
|
import { SectionedSessions, SessionRow, parentIdOf } from './chat-session-list-components';
|
|
25
25
|
|
|
@@ -35,6 +35,9 @@ export class ChatSessionListService implements UnreadStateProvider {
|
|
|
35
35
|
@inject(ApplicationShell)
|
|
36
36
|
protected readonly shell: ApplicationShell;
|
|
37
37
|
|
|
38
|
+
@inject(ILogger) @named('ai-ide:ChatSessionListService')
|
|
39
|
+
protected readonly logger: ILogger;
|
|
40
|
+
|
|
38
41
|
private readonly unreadSessions = new Map<string, {
|
|
39
42
|
unread: boolean;
|
|
40
43
|
requiresAction: boolean;
|
|
@@ -174,7 +177,7 @@ export class ChatSessionListService implements UnreadStateProvider {
|
|
|
174
177
|
this._persistedSessions = Object.values(index)
|
|
175
178
|
.toSorted((a, b) => b.saveDate - a.saveDate);
|
|
176
179
|
} catch (error) {
|
|
177
|
-
|
|
180
|
+
this.logger.error('Failed to load persisted sessions:', error);
|
|
178
181
|
this._persistedSessions = [];
|
|
179
182
|
} finally {
|
|
180
183
|
this.onStateChangedEmitter.fire();
|
|
@@ -16,14 +16,17 @@
|
|
|
16
16
|
|
|
17
17
|
import { AbstractStreamParsingChatAgent } from '@theia/ai-chat/lib/common/chat-agents';
|
|
18
18
|
import { LanguageModelRequirement } from '@theia/ai-core/lib/common';
|
|
19
|
-
import { nls } from '@theia/core';
|
|
20
|
-
import { injectable } from '@theia/core/shared/inversify';
|
|
19
|
+
import { ILogger, nls } from '@theia/core';
|
|
20
|
+
import { inject, injectable, named } from '@theia/core/shared/inversify';
|
|
21
21
|
import { codeReviewerSystemPrompt, CODE_REVIEWER_SYSTEM_PROMPT_ID } from './code-reviewer-prompt-template';
|
|
22
22
|
|
|
23
23
|
export const CodeReviewerAgentId = 'code-reviewer';
|
|
24
24
|
|
|
25
25
|
@injectable()
|
|
26
26
|
export class CodeReviewerAgent extends AbstractStreamParsingChatAgent {
|
|
27
|
+
@inject(ILogger) @named('ai-ide:CodeReviewerAgent')
|
|
28
|
+
protected override readonly logger: ILogger;
|
|
29
|
+
|
|
27
30
|
name = 'Code Reviewer';
|
|
28
31
|
id = CodeReviewerAgentId;
|
|
29
32
|
languageModelRequirements: LanguageModelRequirement[] = [{
|