@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,106 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var AiConfigurationSearchWidget_1;
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.AiConfigurationSearchWidget = void 0;
|
|
5
|
+
const tslib_1 = require("tslib");
|
|
6
|
+
const jsx_runtime_1 = require("@theia/core/shared/react/jsx-runtime");
|
|
7
|
+
// *****************************************************************************
|
|
8
|
+
// Copyright (C) 2026 EclipseSource and others.
|
|
9
|
+
//
|
|
10
|
+
// This program and the accompanying materials are made available under the
|
|
11
|
+
// terms of the Eclipse Public License v. 2.0 which is available at
|
|
12
|
+
// http://www.eclipse.org/legal/epl-2.0.
|
|
13
|
+
//
|
|
14
|
+
// This Source Code may also be made available under the following Secondary
|
|
15
|
+
// Licenses when the conditions for such availability set forth in the Eclipse
|
|
16
|
+
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
17
|
+
// with the GNU Classpath Exception which is available at
|
|
18
|
+
// https://www.gnu.org/software/classpath/license.html.
|
|
19
|
+
//
|
|
20
|
+
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
21
|
+
// *****************************************************************************
|
|
22
|
+
const React = require("@theia/core/shared/react");
|
|
23
|
+
const core_1 = require("@theia/core");
|
|
24
|
+
const inversify_1 = require("@theia/core/shared/inversify");
|
|
25
|
+
const browser_1 = require("@theia/core/lib/browser");
|
|
26
|
+
/**
|
|
27
|
+
* The search box above the category tree. It emits {@link onDidChangeFilter} so the tree can
|
|
28
|
+
* live-filter its nodes; filtering the tree is the only search affordance.
|
|
29
|
+
*/
|
|
30
|
+
let AiConfigurationSearchWidget = class AiConfigurationSearchWidget extends browser_1.ReactWidget {
|
|
31
|
+
constructor() {
|
|
32
|
+
super(...arguments);
|
|
33
|
+
this.onDidChangeFilterEmitter = new core_1.Emitter();
|
|
34
|
+
this.onDidChangeFilter = this.onDidChangeFilterEmitter.event;
|
|
35
|
+
this.onDidRequestExpandAllEmitter = new core_1.Emitter();
|
|
36
|
+
/** Fired by the "Expand All" toolbar button below the search input. */
|
|
37
|
+
this.onDidRequestExpandAll = this.onDidRequestExpandAllEmitter.event;
|
|
38
|
+
this.onDidRequestCollapseAllEmitter = new core_1.Emitter();
|
|
39
|
+
/** Fired by the "Collapse All" toolbar button below the search input. */
|
|
40
|
+
this.onDidRequestCollapseAll = this.onDidRequestCollapseAllEmitter.event;
|
|
41
|
+
/** Whether the tree has any expandable category, and whether all of them are currently expanded. */
|
|
42
|
+
this.hasExpandable = false;
|
|
43
|
+
this.allExpanded = false;
|
|
44
|
+
this.onExpandAll = () => this.onDidRequestExpandAllEmitter.fire();
|
|
45
|
+
this.onCollapseAll = () => this.onDidRequestCollapseAllEmitter.fire();
|
|
46
|
+
this.onQueryChange = (query) => this.onDidChangeFilterEmitter.fire(query);
|
|
47
|
+
}
|
|
48
|
+
static { AiConfigurationSearchWidget_1 = this; }
|
|
49
|
+
static { this.ID = 'ai-configuration-search'; }
|
|
50
|
+
init() {
|
|
51
|
+
this.id = AiConfigurationSearchWidget_1.ID;
|
|
52
|
+
this.addClass('ai-configuration-search');
|
|
53
|
+
this.toDispose.push(this.onDidChangeFilterEmitter);
|
|
54
|
+
this.toDispose.push(this.onDidRequestExpandAllEmitter);
|
|
55
|
+
this.toDispose.push(this.onDidRequestCollapseAllEmitter);
|
|
56
|
+
this.update();
|
|
57
|
+
}
|
|
58
|
+
/** Updates the expand/collapse-all toggle to reflect the tree's current expansion. */
|
|
59
|
+
setTreeExpansion(hasExpandable, allExpanded) {
|
|
60
|
+
if (this.hasExpandable !== hasExpandable || this.allExpanded !== allExpanded) {
|
|
61
|
+
this.hasExpandable = hasExpandable;
|
|
62
|
+
this.allExpanded = allExpanded;
|
|
63
|
+
this.update();
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
render() {
|
|
67
|
+
return (0, jsx_runtime_1.jsxs)(React.Fragment, { children: [(0, jsx_runtime_1.jsx)(AiConfigurationSearchInput, { onQueryChange: this.onQueryChange }), this.hasExpandable && (0, jsx_runtime_1.jsx)("div", { className: 'ai-configuration-tree-toolbar', children: this.allExpanded
|
|
68
|
+
? (0, jsx_runtime_1.jsx)("button", { type: 'button', className: `ai-configuration-tree-toolbar-button ${(0, browser_1.codicon)('collapse-all')}`, title: core_1.nls.localizeByDefault('Collapse All'), onClick: this.onCollapseAll })
|
|
69
|
+
: (0, jsx_runtime_1.jsx)("button", { type: 'button', className: `ai-configuration-tree-toolbar-button ${(0, browser_1.codicon)('expand-all')}`, title: core_1.nls.localizeByDefault('Expand All'), onClick: this.onExpandAll }) })] });
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
exports.AiConfigurationSearchWidget = AiConfigurationSearchWidget;
|
|
73
|
+
tslib_1.__decorate([
|
|
74
|
+
(0, inversify_1.postConstruct)(),
|
|
75
|
+
tslib_1.__metadata("design:type", Function),
|
|
76
|
+
tslib_1.__metadata("design:paramtypes", []),
|
|
77
|
+
tslib_1.__metadata("design:returntype", void 0)
|
|
78
|
+
], AiConfigurationSearchWidget.prototype, "init", null);
|
|
79
|
+
exports.AiConfigurationSearchWidget = AiConfigurationSearchWidget = AiConfigurationSearchWidget_1 = tslib_1.__decorate([
|
|
80
|
+
(0, inversify_1.injectable)()
|
|
81
|
+
], AiConfigurationSearchWidget);
|
|
82
|
+
/**
|
|
83
|
+
* The search box, as a functional component so its value lives in React state. Typing therefore preserves
|
|
84
|
+
* the caret position (editing mid-string no longer jumps to the end, which happened when the enclosing
|
|
85
|
+
* ReactWidget re-rendered the controlled input out of band). Notifies the owner via {@link onQueryChange}.
|
|
86
|
+
*/
|
|
87
|
+
const AiConfigurationSearchInput = ({ onQueryChange }) => {
|
|
88
|
+
const [query, setQuery] = React.useState('');
|
|
89
|
+
const change = React.useCallback((event) => {
|
|
90
|
+
setQuery(event.target.value);
|
|
91
|
+
onQueryChange(event.target.value);
|
|
92
|
+
}, [onQueryChange]);
|
|
93
|
+
const clear = React.useCallback(() => {
|
|
94
|
+
setQuery('');
|
|
95
|
+
onQueryChange('');
|
|
96
|
+
}, [onQueryChange]);
|
|
97
|
+
const onKeyDown = React.useCallback((event) => {
|
|
98
|
+
if (event.key === 'Escape' && query.length > 0) {
|
|
99
|
+
event.preventDefault();
|
|
100
|
+
clear();
|
|
101
|
+
}
|
|
102
|
+
}, [query, clear]);
|
|
103
|
+
const clearLabel = core_1.nls.localizeByDefault('Clear');
|
|
104
|
+
return (0, jsx_runtime_1.jsxs)("div", { className: 'ai-configuration-search-wrap', children: [(0, jsx_runtime_1.jsx)("span", { className: `ai-configuration-search-icon ${(0, browser_1.codicon)('search')}` }), (0, jsx_runtime_1.jsx)("input", { className: 'theia-input ai-configuration-search-input', type: 'text', spellCheck: false, placeholder: core_1.nls.localize('theia/ai/core/aiConfiguration/searchPlaceholder', 'Search AI settings'), value: query, onChange: change, onKeyDown: onKeyDown }), query.length > 0 && (0, jsx_runtime_1.jsx)("button", { type: 'button', className: `ai-configuration-search-clear ${(0, browser_1.codicon)('close')}`, title: clearLabel, "aria-label": clearLabel, onClick: clear })] });
|
|
105
|
+
};
|
|
106
|
+
//# sourceMappingURL=ai-configuration-search-widget.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ai-configuration-search-widget.js","sourceRoot":"","sources":["../../../src/browser/ai-configuration/ai-configuration-search-widget.tsx"],"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;A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AC,IAAI,mCACjB,IAAI,EAAC,QAAQ,EACb,SAAS,EAAE,iCAAiC,IAAA,iBAAO,EAAC,OAAO,CAAC,EAAE,EAC9D,KAAK,EAAE,UAAU,gBACL,UAAU,EACtB,OAAO,EAAE,KAAK,GACR,IACR,CAAC;AACX,CAAC,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { AiConfigurationSearchItem } from '@theia/ai-core-ui/lib/browser/ai-configuration/ai-configuration-category';
|
|
2
|
+
/**
|
|
3
|
+
* Pure matching helpers for the tree-level (deep) search. Kept free of any DOM
|
|
4
|
+
* or DI dependency so the tree filter can reuse it and it can be unit-tested in
|
|
5
|
+
* isolation.
|
|
6
|
+
*
|
|
7
|
+
* Match semantics: every whitespace-separated term of the query must appear in
|
|
8
|
+
* the item's match key (`label + keywords + typeLabel`, lower-cased).
|
|
9
|
+
*/
|
|
10
|
+
export declare namespace AiConfigurationSearch {
|
|
11
|
+
/** The lower-cased text a search item is matched against. */
|
|
12
|
+
function matchKey(item: AiConfigurationSearchItem): string;
|
|
13
|
+
/** Splits a query into lower-cased, non-empty terms. */
|
|
14
|
+
function terms(query: string): string[];
|
|
15
|
+
/** Returns whether every term is present in `key`. */
|
|
16
|
+
function matchesTerms(key: string, searchTerms: string[]): boolean;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=ai-configuration-search.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ai-configuration-search.d.ts","sourceRoot":"","sources":["../../../src/browser/ai-configuration/ai-configuration-search.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,yBAAyB,EAAE,MAAM,0EAA0E,CAAC;AAErH;;;;;;;GAOG;AACH,yBAAiB,qBAAqB,CAAC;IAEnC,6DAA6D;IAC7D,SAAgB,QAAQ,CAAC,IAAI,EAAE,yBAAyB,GAAG,MAAM,CAEhE;IAED,wDAAwD;IACxD,SAAgB,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CAE7C;IAED,sDAAsD;IACtD,SAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,GAAG,OAAO,CAExE;CACJ"}
|
|
@@ -0,0 +1,45 @@
|
|
|
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
|
+
exports.AiConfigurationSearch = void 0;
|
|
19
|
+
/**
|
|
20
|
+
* Pure matching helpers for the tree-level (deep) search. Kept free of any DOM
|
|
21
|
+
* or DI dependency so the tree filter can reuse it and it can be unit-tested in
|
|
22
|
+
* isolation.
|
|
23
|
+
*
|
|
24
|
+
* Match semantics: every whitespace-separated term of the query must appear in
|
|
25
|
+
* the item's match key (`label + keywords + typeLabel`, lower-cased).
|
|
26
|
+
*/
|
|
27
|
+
var AiConfigurationSearch;
|
|
28
|
+
(function (AiConfigurationSearch) {
|
|
29
|
+
/** The lower-cased text a search item is matched against. */
|
|
30
|
+
function matchKey(item) {
|
|
31
|
+
return `${item.label} ${item.keywords ?? ''} ${item.typeLabel}`.toLowerCase();
|
|
32
|
+
}
|
|
33
|
+
AiConfigurationSearch.matchKey = matchKey;
|
|
34
|
+
/** Splits a query into lower-cased, non-empty terms. */
|
|
35
|
+
function terms(query) {
|
|
36
|
+
return query.trim().toLowerCase().split(/\s+/).filter(term => term.length > 0);
|
|
37
|
+
}
|
|
38
|
+
AiConfigurationSearch.terms = terms;
|
|
39
|
+
/** Returns whether every term is present in `key`. */
|
|
40
|
+
function matchesTerms(key, searchTerms) {
|
|
41
|
+
return searchTerms.every(term => key.includes(term));
|
|
42
|
+
}
|
|
43
|
+
AiConfigurationSearch.matchesTerms = matchesTerms;
|
|
44
|
+
})(AiConfigurationSearch || (exports.AiConfigurationSearch = AiConfigurationSearch = {}));
|
|
45
|
+
//# sourceMappingURL=ai-configuration-search.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ai-configuration-search.js","sourceRoot":"","sources":["../../../src/browser/ai-configuration/ai-configuration-search.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;;;AAIhF;;;;;;;GAOG;AACH,IAAiB,qBAAqB,CAgBrC;AAhBD,WAAiB,qBAAqB;IAElC,6DAA6D;IAC7D,SAAgB,QAAQ,CAAC,IAA+B;QACpD,OAAO,GAAG,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,QAAQ,IAAI,EAAE,IAAI,IAAI,CAAC,SAAS,EAAE,CAAC,WAAW,EAAE,CAAC;IAClF,CAAC;IAFe,8BAAQ,WAEvB,CAAA;IAED,wDAAwD;IACxD,SAAgB,KAAK,CAAC,KAAa;QAC/B,OAAO,KAAK,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IACnF,CAAC;IAFe,2BAAK,QAEpB,CAAA;IAED,sDAAsD;IACtD,SAAgB,YAAY,CAAC,GAAW,EAAE,WAAqB;QAC3D,OAAO,WAAW,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC;IACzD,CAAC;IAFe,kCAAY,eAE3B,CAAA;AACL,CAAC,EAhBgB,qBAAqB,qCAArB,qBAAqB,QAgBrC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ai-configuration-search.spec.d.ts","sourceRoot":"","sources":["../../../src/browser/ai-configuration/ai-configuration-search.spec.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,79 @@
|
|
|
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 chai_1 = require("chai");
|
|
19
|
+
const ai_configuration_search_1 = require("./ai-configuration-search");
|
|
20
|
+
function item(label, options) {
|
|
21
|
+
return {
|
|
22
|
+
label,
|
|
23
|
+
typeLabel: options?.typeLabel ?? 'Setting',
|
|
24
|
+
categoryId: options?.categoryId ?? 'general',
|
|
25
|
+
target: options?.target ?? { categoryId: options?.categoryId ?? 'general' },
|
|
26
|
+
keywords: options?.keywords
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
describe('AiConfigurationSearch', () => {
|
|
30
|
+
describe('terms', () => {
|
|
31
|
+
it('splits on whitespace, lower-cases, and drops empties', () => {
|
|
32
|
+
(0, chai_1.expect)(ai_configuration_search_1.AiConfigurationSearch.terms(' Default Chat ')).to.deep.equal(['default', 'chat']);
|
|
33
|
+
});
|
|
34
|
+
it('returns an empty array for a blank query', () => {
|
|
35
|
+
(0, chai_1.expect)(ai_configuration_search_1.AiConfigurationSearch.terms(' ')).to.deep.equal([]);
|
|
36
|
+
});
|
|
37
|
+
});
|
|
38
|
+
describe('matchKey', () => {
|
|
39
|
+
it('folds label, keywords, and type label into a lower-cased key', () => {
|
|
40
|
+
const key = ai_configuration_search_1.AiConfigurationSearch.matchKey(item('Default Chat Agent', { typeLabel: 'Agent', keywords: 'orchestrator id-42' }));
|
|
41
|
+
(0, chai_1.expect)(key).to.equal('default chat agent orchestrator id-42 agent');
|
|
42
|
+
});
|
|
43
|
+
it('omits missing keywords', () => {
|
|
44
|
+
(0, chai_1.expect)(ai_configuration_search_1.AiConfigurationSearch.matchKey(item('MCP Server', { typeLabel: 'MCP Server' }))).to.equal('mcp server mcp server');
|
|
45
|
+
});
|
|
46
|
+
});
|
|
47
|
+
describe('matchesTerms', () => {
|
|
48
|
+
const index = [
|
|
49
|
+
item('Default Chat Agent', { typeLabel: 'Agent', categoryId: 'agents', keywords: 'orchestrator' }),
|
|
50
|
+
item('Universal', { typeLabel: 'Agent', categoryId: 'agents' }),
|
|
51
|
+
item('Filesystem', { typeLabel: 'MCP Server', categoryId: 'mcp-servers', keywords: 'files' }),
|
|
52
|
+
item('Enable AI Features', { typeLabel: 'Setting', categoryId: 'general' })
|
|
53
|
+
];
|
|
54
|
+
/** Mirrors how the tree filter combines the helpers: `terms` once, then `matchesTerms` per item. */
|
|
55
|
+
function matching(query) {
|
|
56
|
+
const searchTerms = ai_configuration_search_1.AiConfigurationSearch.terms(query);
|
|
57
|
+
return index
|
|
58
|
+
.filter(candidate => ai_configuration_search_1.AiConfigurationSearch.matchesTerms(ai_configuration_search_1.AiConfigurationSearch.matchKey(candidate), searchTerms))
|
|
59
|
+
.map(candidate => candidate.label);
|
|
60
|
+
}
|
|
61
|
+
it('matches every item for a blank query', () => {
|
|
62
|
+
(0, chai_1.expect)(matching(' ')).to.have.length(index.length);
|
|
63
|
+
});
|
|
64
|
+
it('requires every term to be present (AND semantics)', () => {
|
|
65
|
+
(0, chai_1.expect)(matching('chat agent')).to.deep.equal(['Default Chat Agent']);
|
|
66
|
+
});
|
|
67
|
+
it('matches against keywords and type label', () => {
|
|
68
|
+
(0, chai_1.expect)(matching('orchestrator')).to.deep.equal(['Default Chat Agent']);
|
|
69
|
+
(0, chai_1.expect)(matching('mcp')).to.deep.equal(['Filesystem']);
|
|
70
|
+
});
|
|
71
|
+
it('is case-insensitive', () => {
|
|
72
|
+
(0, chai_1.expect)(matching('UNIVERSAL')).to.deep.equal(['Universal']);
|
|
73
|
+
});
|
|
74
|
+
it('matches on substrings', () => {
|
|
75
|
+
(0, chai_1.expect)(matching('a')).to.deep.equal(['Default Chat Agent', 'Universal', 'Enable AI Features']);
|
|
76
|
+
});
|
|
77
|
+
});
|
|
78
|
+
});
|
|
79
|
+
//# sourceMappingURL=ai-configuration-search.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ai-configuration-search.spec.js","sourceRoot":"","sources":["../../../src/browser/ai-configuration/ai-configuration-search.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,u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|
|
3
|
+
* Tree model backing the AI Configuration category tree. A dedicated subclass so
|
|
4
|
+
* adopters can rebind/customize the model in {@link createAiConfigurationTreeContainer}.
|
|
5
|
+
*/
|
|
6
|
+
export declare class AiConfigurationTreeModel extends TreeModelImpl {
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=ai-configuration-tree-model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ai-configuration-tree-model.d.ts","sourceRoot":"","sources":["../../../src/browser/ai-configuration/ai-configuration-tree-model.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAExD;;;GAGG;AACH,qBACa,wBAAyB,SAAQ,aAAa;CAC1D"}
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AIConfigurationBaseWidget = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
2
|
// *****************************************************************************
|
|
6
3
|
// Copyright (C) 2025 EclipseSource GmbH.
|
|
7
4
|
//
|
|
@@ -17,19 +14,19 @@ const tslib_1 = require("tslib");
|
|
|
17
14
|
//
|
|
18
15
|
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
19
16
|
// *****************************************************************************
|
|
20
|
-
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.AiConfigurationTreeModel = void 0;
|
|
19
|
+
const tslib_1 = require("tslib");
|
|
21
20
|
const inversify_1 = require("@theia/core/shared/inversify");
|
|
22
|
-
const
|
|
21
|
+
const browser_1 = require("@theia/core/lib/browser");
|
|
23
22
|
/**
|
|
24
|
-
*
|
|
23
|
+
* Tree model backing the AI Configuration category tree. A dedicated subclass so
|
|
24
|
+
* adopters can rebind/customize the model in {@link createAiConfigurationTreeContainer}.
|
|
25
25
|
*/
|
|
26
|
-
let
|
|
27
|
-
render() {
|
|
28
|
-
return (React.createElement("div", { className: 'ai-configuration-widget-content' }, this.renderContent()));
|
|
29
|
-
}
|
|
26
|
+
let AiConfigurationTreeModel = class AiConfigurationTreeModel extends browser_1.TreeModelImpl {
|
|
30
27
|
};
|
|
31
|
-
exports.
|
|
32
|
-
exports.
|
|
28
|
+
exports.AiConfigurationTreeModel = AiConfigurationTreeModel;
|
|
29
|
+
exports.AiConfigurationTreeModel = AiConfigurationTreeModel = tslib_1.__decorate([
|
|
33
30
|
(0, inversify_1.injectable)()
|
|
34
|
-
],
|
|
35
|
-
//# sourceMappingURL=ai-configuration-
|
|
31
|
+
], AiConfigurationTreeModel);
|
|
32
|
+
//# sourceMappingURL=ai-configuration-tree-model.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ai-configuration-tree-model.js","sourceRoot":"","sources":["../../../src/browser/ai-configuration/ai-configuration-tree-model.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;;;AAEhF,4DAA0D;AAC1D,qDAAwD;AAExD;;;GAGG;AAEI,IAAM,wBAAwB,GAA9B,MAAM,wBAAyB,SAAQ,uBAAa;CAC1D,CAAA;AADY,4DAAwB;mCAAxB,wBAAwB;IADpC,IAAA,sBAAU,GAAE;GACA,wBAAwB,CACpC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { CompositeTreeNode, TreeNode } from '@theia/core/lib/browser/tree/tree';
|
|
2
|
+
import { SelectableTreeNode } from '@theia/core/lib/browser/tree/tree-selection';
|
|
3
|
+
import { AiConfigurationCategory, AiConfigurationItemStatus } from '@theia/ai-core-ui/lib/browser/ai-configuration/ai-configuration-category';
|
|
4
|
+
/**
|
|
5
|
+
* Top-level node representing a single {@link AiConfigurationCategory}.
|
|
6
|
+
* Carries the `expanded` property (making it an `ExpandableTreeNode`) only when
|
|
7
|
+
* the category is a non-empty collection.
|
|
8
|
+
*/
|
|
9
|
+
export interface AiConfigurationCategoryNode extends SelectableTreeNode, CompositeTreeNode {
|
|
10
|
+
readonly type: 'category';
|
|
11
|
+
readonly categoryId: string;
|
|
12
|
+
readonly iconClass: string;
|
|
13
|
+
readonly contributed: boolean;
|
|
14
|
+
children: AiConfigurationItemNode[];
|
|
15
|
+
expanded?: boolean;
|
|
16
|
+
selected: boolean;
|
|
17
|
+
}
|
|
18
|
+
export declare namespace AiConfigurationCategoryNode {
|
|
19
|
+
function is(node: TreeNode | undefined): node is AiConfigurationCategoryNode;
|
|
20
|
+
}
|
|
21
|
+
/** Child node representing one item of a collection category. */
|
|
22
|
+
export interface AiConfigurationItemNode extends SelectableTreeNode {
|
|
23
|
+
readonly type: 'item';
|
|
24
|
+
readonly categoryId: string;
|
|
25
|
+
readonly itemId: string;
|
|
26
|
+
readonly iconClass: string;
|
|
27
|
+
/** The item's state, as the tree shows it: a dot next to the label (e.g. an MCP server that is running). */
|
|
28
|
+
readonly status?: AiConfigurationItemStatus;
|
|
29
|
+
selected: boolean;
|
|
30
|
+
}
|
|
31
|
+
export declare namespace AiConfigurationItemNode {
|
|
32
|
+
function is(node: TreeNode | undefined): node is AiConfigurationItemNode;
|
|
33
|
+
}
|
|
34
|
+
/** Non-selectable separator introducing the "Contributed by extensions" group. */
|
|
35
|
+
export interface AiConfigurationSeparatorNode extends TreeNode {
|
|
36
|
+
readonly type: 'separator';
|
|
37
|
+
}
|
|
38
|
+
export declare namespace AiConfigurationSeparatorNode {
|
|
39
|
+
function is(node: TreeNode | undefined): node is AiConfigurationSeparatorNode;
|
|
40
|
+
}
|
|
41
|
+
export interface AiConfigurationTreeBuildOptions {
|
|
42
|
+
/** Returns the previous expansion state of a category, to preserve it across rebuilds. */
|
|
43
|
+
isExpanded?(categoryId: string): boolean | undefined;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Builds the (invisible) root of the AI Configuration category tree from the
|
|
47
|
+
* ordered list of categories. Extracted as a pure function so the tree shape
|
|
48
|
+
* (children, separator, expansion) can be tested without a DOM.
|
|
49
|
+
*/
|
|
50
|
+
export declare namespace AiConfigurationTree {
|
|
51
|
+
const ROOT_ID = "ai-configuration-tree-root";
|
|
52
|
+
const CONTRIBUTED_SEPARATOR_ID = "ai-configuration-contributed-separator";
|
|
53
|
+
function categoryNodeId(categoryId: string): string;
|
|
54
|
+
function itemNodeId(categoryId: string, itemId: string): string;
|
|
55
|
+
function buildRoot(categories: AiConfigurationCategory[], options?: AiConfigurationTreeBuildOptions): CompositeTreeNode;
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=ai-configuration-tree-nodes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ai-configuration-tree-nodes.d.ts","sourceRoot":"","sources":["../../../src/browser/ai-configuration/ai-configuration-tree-nodes.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AAChF,OAAO,EAAE,kBAAkB,EAAE,MAAM,6CAA6C,CAAC;AACjF,OAAO,EAAE,uBAAuB,EAAE,yBAAyB,EAA2B,MAAM,0EAA0E,CAAC;AAEvK;;;;GAIG;AACH,MAAM,WAAW,2BAA4B,SAAQ,kBAAkB,EAAE,iBAAiB;IACtF,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAC1B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;IAC9B,QAAQ,EAAE,uBAAuB,EAAE,CAAC;IACpC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,OAAO,CAAC;CAC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AE,uBAAuB,EAAE,EAAE,OAAO,CAAC,EAAE,+BAA+B,GAAG,iBAAiB,CA8B7H;CA8CJ"}
|
|
@@ -0,0 +1,134 @@
|
|
|
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
|
+
exports.AiConfigurationTree = exports.AiConfigurationSeparatorNode = exports.AiConfigurationItemNode = exports.AiConfigurationCategoryNode = void 0;
|
|
19
|
+
const core_1 = require("@theia/core");
|
|
20
|
+
const tree_1 = require("@theia/core/lib/browser/tree/tree");
|
|
21
|
+
var AiConfigurationCategoryNode;
|
|
22
|
+
(function (AiConfigurationCategoryNode) {
|
|
23
|
+
function is(node) {
|
|
24
|
+
return !!node && node.type === 'category';
|
|
25
|
+
}
|
|
26
|
+
AiConfigurationCategoryNode.is = is;
|
|
27
|
+
})(AiConfigurationCategoryNode || (exports.AiConfigurationCategoryNode = AiConfigurationCategoryNode = {}));
|
|
28
|
+
var AiConfigurationItemNode;
|
|
29
|
+
(function (AiConfigurationItemNode) {
|
|
30
|
+
function is(node) {
|
|
31
|
+
return !!node && node.type === 'item';
|
|
32
|
+
}
|
|
33
|
+
AiConfigurationItemNode.is = is;
|
|
34
|
+
})(AiConfigurationItemNode || (exports.AiConfigurationItemNode = AiConfigurationItemNode = {}));
|
|
35
|
+
var AiConfigurationSeparatorNode;
|
|
36
|
+
(function (AiConfigurationSeparatorNode) {
|
|
37
|
+
function is(node) {
|
|
38
|
+
return !!node && node.type === 'separator';
|
|
39
|
+
}
|
|
40
|
+
AiConfigurationSeparatorNode.is = is;
|
|
41
|
+
})(AiConfigurationSeparatorNode || (exports.AiConfigurationSeparatorNode = AiConfigurationSeparatorNode = {}));
|
|
42
|
+
/**
|
|
43
|
+
* Builds the (invisible) root of the AI Configuration category tree from the
|
|
44
|
+
* ordered list of categories. Extracted as a pure function so the tree shape
|
|
45
|
+
* (children, separator, expansion) can be tested without a DOM.
|
|
46
|
+
*/
|
|
47
|
+
var AiConfigurationTree;
|
|
48
|
+
(function (AiConfigurationTree) {
|
|
49
|
+
AiConfigurationTree.ROOT_ID = 'ai-configuration-tree-root';
|
|
50
|
+
AiConfigurationTree.CONTRIBUTED_SEPARATOR_ID = 'ai-configuration-contributed-separator';
|
|
51
|
+
function categoryNodeId(categoryId) {
|
|
52
|
+
return `category:${categoryId}`;
|
|
53
|
+
}
|
|
54
|
+
AiConfigurationTree.categoryNodeId = categoryNodeId;
|
|
55
|
+
function itemNodeId(categoryId, itemId) {
|
|
56
|
+
return `item:${categoryId}:${itemId}`;
|
|
57
|
+
}
|
|
58
|
+
AiConfigurationTree.itemNodeId = itemNodeId;
|
|
59
|
+
function buildRoot(categories, options) {
|
|
60
|
+
const root = {
|
|
61
|
+
id: AiConfigurationTree.ROOT_ID,
|
|
62
|
+
parent: undefined,
|
|
63
|
+
visible: false,
|
|
64
|
+
children: []
|
|
65
|
+
};
|
|
66
|
+
let separatorAdded = false;
|
|
67
|
+
for (const category of categories) {
|
|
68
|
+
if (category.contributed && !separatorAdded) {
|
|
69
|
+
tree_1.CompositeTreeNode.addChild(root, createSeparatorNode());
|
|
70
|
+
separatorAdded = true;
|
|
71
|
+
}
|
|
72
|
+
const items = category.kind === 'collection' ? (category.renderer.getTreeChildren?.() ?? []) : [];
|
|
73
|
+
const categoryNode = createCategoryNode(category, items, options);
|
|
74
|
+
tree_1.CompositeTreeNode.addChild(root, categoryNode);
|
|
75
|
+
// A tree node is addressed by its id (selection, navigation, expansion), so two items claiming the
|
|
76
|
+
// same id cannot both be nodes. Keep the first and skip the rest deterministically rather than
|
|
77
|
+
// leaving it to the tree model; the category's overview lists every one of them and flags the
|
|
78
|
+
// clash, which is where the user can see that something needs fixing.
|
|
79
|
+
const usedItemIds = new Set();
|
|
80
|
+
for (const item of items) {
|
|
81
|
+
if (usedItemIds.has(item.id)) {
|
|
82
|
+
continue;
|
|
83
|
+
}
|
|
84
|
+
usedItemIds.add(item.id);
|
|
85
|
+
tree_1.CompositeTreeNode.addChild(categoryNode, createItemNode(category, item));
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
return root;
|
|
89
|
+
}
|
|
90
|
+
AiConfigurationTree.buildRoot = buildRoot;
|
|
91
|
+
function createCategoryNode(category, items, options) {
|
|
92
|
+
const collection = category.kind === 'collection';
|
|
93
|
+
const node = {
|
|
94
|
+
type: 'category',
|
|
95
|
+
id: categoryNodeId(category.id),
|
|
96
|
+
categoryId: category.id,
|
|
97
|
+
name: category.label,
|
|
98
|
+
iconClass: category.iconClass,
|
|
99
|
+
contributed: !!category.contributed,
|
|
100
|
+
parent: undefined,
|
|
101
|
+
children: [],
|
|
102
|
+
selected: false
|
|
103
|
+
};
|
|
104
|
+
if (collection && items.length > 0) {
|
|
105
|
+
// Categories start collapsed; a rebuild preserves whatever state the user had.
|
|
106
|
+
node.expanded = options?.isExpanded?.(category.id) ?? false;
|
|
107
|
+
}
|
|
108
|
+
return node;
|
|
109
|
+
}
|
|
110
|
+
function createItemNode(category, item) {
|
|
111
|
+
return {
|
|
112
|
+
type: 'item',
|
|
113
|
+
id: itemNodeId(category.id, item.id),
|
|
114
|
+
categoryId: category.id,
|
|
115
|
+
itemId: item.id,
|
|
116
|
+
name: item.label,
|
|
117
|
+
// Every child shows an icon so rows look consistent: a dedicated per-item icon where one exists
|
|
118
|
+
// (e.g. individual agents), otherwise the category's icon as a uniform fallback.
|
|
119
|
+
iconClass: item.iconClass ?? category.iconClass,
|
|
120
|
+
status: item.status,
|
|
121
|
+
parent: undefined,
|
|
122
|
+
selected: false
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
function createSeparatorNode() {
|
|
126
|
+
return {
|
|
127
|
+
type: 'separator',
|
|
128
|
+
id: AiConfigurationTree.CONTRIBUTED_SEPARATOR_ID,
|
|
129
|
+
name: core_1.nls.localize('theia/ai/core/aiConfiguration/contributedByExtensions', 'Contributed by extensions'),
|
|
130
|
+
parent: undefined
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
})(AiConfigurationTree || (exports.AiConfigurationTree = AiConfigurationTree = {}));
|
|
134
|
+
//# sourceMappingURL=ai-configuration-tree-nodes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ai-configuration-tree-nodes.js","sourceRoot":"","sources":["../../../src/browser/ai-configuration/ai-configuration-tree-nodes.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,sCAAkC;AAClC,4DAAgF;AAkBhF,IAAiB,2BAA2B,CAI3C;AAJD,WAAiB,2BAA2B;IACxC,SAAgB,EAAE,CAAC,IAA0B;QACzC,OAAO,CAAC,CAAC,IAAI,IAAK,IAAoC,CAAC,IAAI,KAAK,UAAU,CAAC;IAC/E,CAAC;IAFe,8BAAE,KAEjB,CAAA;AACL,CAAC,EAJgB,2BAA2B,2CAA3B,2BAA2B,QAI3C;AAYD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spec.ts"],"names":[],"mappings":""}
|