@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,245 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var VariablesConfigurationCategory_1;
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.VariablesConfigurationCategory = 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 common_1 = require("@theia/ai-core/lib/common");
|
|
23
|
+
const core_1 = require("@theia/core");
|
|
24
|
+
const browser_1 = require("@theia/core/lib/browser");
|
|
25
|
+
const clipboard_service_1 = require("@theia/core/lib/browser/clipboard-service");
|
|
26
|
+
const common_2 = require("@theia/core/lib/common");
|
|
27
|
+
const inversify_1 = require("@theia/core/shared/inversify");
|
|
28
|
+
const React = require("@theia/core/shared/react");
|
|
29
|
+
const ai_configuration_category_1 = require("@theia/ai-core-ui/lib/browser/ai-configuration/ai-configuration-category");
|
|
30
|
+
const single_page_category_renderer_1 = require("@theia/ai-core-ui/lib/browser/ai-configuration/renderers/single-page-category-renderer");
|
|
31
|
+
const agent_chips_1 = require("./agent-chips");
|
|
32
|
+
const collapsible_list_1 = require("@theia/ai-core-ui/lib/browser/ai-configuration/components/collapsible-list");
|
|
33
|
+
/**
|
|
34
|
+
* The Variables category: a `single-page` category that renders every variable as a flat,
|
|
35
|
+
* expandable list rather than a tree of nodes with per-item detail pages. Each row shows the
|
|
36
|
+
* variable reference, a one-line description and count pills for its arguments and the agents
|
|
37
|
+
* that use it at a glance; expanding a row reveals the full description, its id, its arguments
|
|
38
|
+
* and the agents that use it as chips. Variables are read-only, so a dedicated detail page per
|
|
39
|
+
* item would be more navigation than the payload warrants.
|
|
40
|
+
*/
|
|
41
|
+
let VariablesConfigurationCategory = VariablesConfigurationCategory_1 = class VariablesConfigurationCategory extends single_page_category_renderer_1.SinglePageCategoryRenderer {
|
|
42
|
+
constructor() {
|
|
43
|
+
super(...arguments);
|
|
44
|
+
this.id = ai_configuration_category_1.AiConfigurationCategoryId.VARIABLES;
|
|
45
|
+
this.label = core_1.nls.localizeByDefault('Variables');
|
|
46
|
+
this.description = core_1.nls.localize('theia/ai/ide/variableConfiguration/pageSubtitle', 'Values you can reference with {0}name in a prompt. They are resolved and inserted at request time.', common_1.PromptText.VARIABLE_CHAR);
|
|
47
|
+
this.iconClass = (0, browser_1.codicon)('symbol-variable');
|
|
48
|
+
this.order = ai_configuration_category_1.AiConfigurationCategoryOrder.VARIABLES;
|
|
49
|
+
this.kind = 'single-page';
|
|
50
|
+
this.onDidChangeEmitter = new core_1.Emitter();
|
|
51
|
+
this.onDidChange = this.onDidChangeEmitter.event;
|
|
52
|
+
this.toDispose = new common_2.DisposableCollection(this.onDidChangeEmitter);
|
|
53
|
+
}
|
|
54
|
+
get renderer() {
|
|
55
|
+
return this;
|
|
56
|
+
}
|
|
57
|
+
get search() {
|
|
58
|
+
return this;
|
|
59
|
+
}
|
|
60
|
+
init() {
|
|
61
|
+
this.toDispose.pushAll([
|
|
62
|
+
this.variableService.onDidChangeVariables(() => this.onDidChangeEmitter.fire()),
|
|
63
|
+
this.agentService.onDidChangeAgents(() => this.onDidChangeEmitter.fire())
|
|
64
|
+
]);
|
|
65
|
+
}
|
|
66
|
+
dispose() {
|
|
67
|
+
this.toDispose.dispose();
|
|
68
|
+
}
|
|
69
|
+
getVariables() {
|
|
70
|
+
return this.variableService.getVariables().sort((a, b) => a.name.localeCompare(b.name));
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Computes, per agent, which variables it uses: those explicitly declared in {@link Agent.variables}
|
|
74
|
+
* (matched by id) plus those referenced in its prompt templates as `{{name}}` (matched by name).
|
|
75
|
+
* Declared globals are rarely populated in practice, so the prompt-template references are the
|
|
76
|
+
* signal that actually surfaces the "used by" chips.
|
|
77
|
+
*/
|
|
78
|
+
computeAgentUsage() {
|
|
79
|
+
return this.agentService.getAllAgents()
|
|
80
|
+
.slice()
|
|
81
|
+
.sort((a, b) => a.name.localeCompare(b.name))
|
|
82
|
+
.map(agent => ({
|
|
83
|
+
agent,
|
|
84
|
+
declaredIds: new Set(agent.variables ?? []),
|
|
85
|
+
referencedNames: this.getReferencedVariableNames(agent)
|
|
86
|
+
}));
|
|
87
|
+
}
|
|
88
|
+
/** Variable names referenced as `{{name}}` (or `{{name:arg}}`) across the agent's prompt templates. */
|
|
89
|
+
getReferencedVariableNames(agent) {
|
|
90
|
+
const names = new Set();
|
|
91
|
+
for (const promptVariantSet of agent.prompts ?? []) {
|
|
92
|
+
const fragments = [promptVariantSet.defaultVariant, ...(promptVariantSet.variants ?? [])];
|
|
93
|
+
for (const fragment of fragments) {
|
|
94
|
+
if (!fragment?.template) {
|
|
95
|
+
continue;
|
|
96
|
+
}
|
|
97
|
+
for (const match of (0, common_1.matchVariablesRegEx)(fragment.template)) {
|
|
98
|
+
const name = match[1].split(common_1.PromptText.VARIABLE_SEPARATOR_CHAR, 2)[0].trim();
|
|
99
|
+
if (name) {
|
|
100
|
+
names.add(name);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
return names;
|
|
106
|
+
}
|
|
107
|
+
getAgentsForVariable(variable, usage) {
|
|
108
|
+
return usage
|
|
109
|
+
.filter(entry => entry.declaredIds.has(variable.id) || entry.referencedNames.has(variable.name))
|
|
110
|
+
.map(entry => entry.agent);
|
|
111
|
+
}
|
|
112
|
+
/** The prompt reference used to insert the variable, e.g. `#file`. */
|
|
113
|
+
getVariableReference(variable) {
|
|
114
|
+
return `${common_1.PromptText.VARIABLE_CHAR}${variable.name}`;
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Case-insensitive match of a variable against the filter query, testing both the variable name
|
|
118
|
+
* and its description. An empty (or whitespace-only) query matches everything.
|
|
119
|
+
*/
|
|
120
|
+
matchesVariable(variable, query) {
|
|
121
|
+
const needle = query.trim().toLocaleLowerCase();
|
|
122
|
+
if (!needle) {
|
|
123
|
+
return true;
|
|
124
|
+
}
|
|
125
|
+
const haystack = `${variable.name} ${VariablesConfigurationCategory_1.normalizeDescription(variable.description)}`.toLocaleLowerCase();
|
|
126
|
+
return haystack.includes(needle);
|
|
127
|
+
}
|
|
128
|
+
buildRow(variable, usage, onOpenAgent) {
|
|
129
|
+
const reference = this.getVariableReference(variable);
|
|
130
|
+
const description = VariablesConfigurationCategory_1.normalizeDescription(variable.description);
|
|
131
|
+
const agents = this.getAgentsForVariable(variable, usage);
|
|
132
|
+
const argCount = variable.args?.length ?? 0;
|
|
133
|
+
const pills = [];
|
|
134
|
+
if (argCount > 0) {
|
|
135
|
+
pills.push(argCount === 1
|
|
136
|
+
? core_1.nls.localize('theia/ai/ide/variableConfiguration/argCountSingular', '1 argument')
|
|
137
|
+
: core_1.nls.localize('theia/ai/ide/variableConfiguration/argCountPlural', '{0} arguments', argCount));
|
|
138
|
+
}
|
|
139
|
+
if (agents.length > 0) {
|
|
140
|
+
pills.push(agents.length === 1 ? core_1.nls.localizeByDefault('1 agent') : core_1.nls.localizeByDefault('{0} agents', agents.length));
|
|
141
|
+
}
|
|
142
|
+
return {
|
|
143
|
+
id: variable.id,
|
|
144
|
+
title: reference,
|
|
145
|
+
description,
|
|
146
|
+
pills,
|
|
147
|
+
filterText: `${variable.name} ${description}`.toLocaleLowerCase(),
|
|
148
|
+
actions: (0, jsx_runtime_1.jsx)(CopyReferenceButton, { onCopy: () => this.copyReference(variable) }),
|
|
149
|
+
body: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("div", { className: 'ai-variable-id-row', children: [(0, jsx_runtime_1.jsx)("span", { className: 'ai-variable-id-label', children: core_1.nls.localizeByDefault('ID') }), (0, jsx_runtime_1.jsx)("code", { className: 'ai-variable-id-value', children: variable.id })] }), argCount > 0 && (0, jsx_runtime_1.jsx)(VariableArgs, { variable: variable }), agents.length > 0 && (0, jsx_runtime_1.jsx)(UsedByAgents, { agents: agents, onOpenAgent: onOpenAgent })] })
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
/** Copies the variable's prompt reference (e.g. `#file`) to the clipboard. */
|
|
153
|
+
copyReference(variable) {
|
|
154
|
+
this.clipboardService.writeText(this.getVariableReference(variable));
|
|
155
|
+
}
|
|
156
|
+
renderSections(ctx) {
|
|
157
|
+
const variables = this.getVariables();
|
|
158
|
+
const usage = this.computeAgentUsage();
|
|
159
|
+
const onOpenAgent = (agentId) => ctx.navigate({ categoryId: ai_configuration_category_1.AiConfigurationCategoryId.AGENTS, itemId: agentId });
|
|
160
|
+
const groups = [
|
|
161
|
+
{
|
|
162
|
+
id: 'context',
|
|
163
|
+
title: core_1.nls.localize('theia/ai/ide/variableConfiguration/contextGroup', 'Context Variables'),
|
|
164
|
+
description: core_1.nls.localize('theia/ai/ide/variableConfiguration/contextGroupDescription', 'Referenced with {0}name in a prompt and also attachable to a request as context that the agent and its tools can inspect.', common_1.PromptText.VARIABLE_CHAR),
|
|
165
|
+
rows: variables.filter(variable => variable.isContextVariable).map(variable => this.buildRow(variable, usage, onOpenAgent))
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
id: 'plain',
|
|
169
|
+
title: core_1.nls.localize('theia/ai/ide/variableConfiguration/plainGroup', 'Plain Variables'),
|
|
170
|
+
description: core_1.nls.localize('theia/ai/ide/variableConfiguration/plainGroupDescription', 'Referenced with {0}name in a prompt and resolved inline to a text value at request time.', common_1.PromptText.VARIABLE_CHAR),
|
|
171
|
+
rows: variables.filter(variable => !variable.isContextVariable).map(variable => this.buildRow(variable, usage, onOpenAgent))
|
|
172
|
+
}
|
|
173
|
+
];
|
|
174
|
+
return (0, jsx_runtime_1.jsx)(collapsible_list_1.CollapsibleList, { groups: groups, filterPlaceholder: core_1.nls.localize('theia/ai/ide/variableConfiguration/filterPlaceholder', 'Filter variables by name or description'), emptyMessage: core_1.nls.localize('theia/ai/ide/variableConfiguration/noVariables', 'No variables are available.'), filterEmptyMessage: query => core_1.nls.localize('theia/ai/ide/variableConfiguration/noMatches', 'No variables match "{0}".', query) });
|
|
175
|
+
}
|
|
176
|
+
getSearchItems() {
|
|
177
|
+
const typeLabel = core_1.nls.localizeByDefault('Variable');
|
|
178
|
+
return this.getVariables().map(variable => ({
|
|
179
|
+
label: variable.name,
|
|
180
|
+
typeLabel,
|
|
181
|
+
categoryId: this.id,
|
|
182
|
+
target: { categoryId: this.id, highlight: { rowId: variable.id } },
|
|
183
|
+
keywords: `${variable.id} ${variable.description ?? ''}`
|
|
184
|
+
}));
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* Trims and collapses internal whitespace in a description. Descriptions are contributed by
|
|
188
|
+
* third-party extensions, so they may contain runs of whitespace from indented template literals.
|
|
189
|
+
*/
|
|
190
|
+
static normalizeDescription(text) {
|
|
191
|
+
return (text ?? '').replace(/\s+/g, ' ').trim();
|
|
192
|
+
}
|
|
193
|
+
};
|
|
194
|
+
exports.VariablesConfigurationCategory = VariablesConfigurationCategory;
|
|
195
|
+
tslib_1.__decorate([
|
|
196
|
+
(0, inversify_1.inject)(common_1.AIVariableService),
|
|
197
|
+
tslib_1.__metadata("design:type", Object)
|
|
198
|
+
], VariablesConfigurationCategory.prototype, "variableService", void 0);
|
|
199
|
+
tslib_1.__decorate([
|
|
200
|
+
(0, inversify_1.inject)(common_1.AgentService),
|
|
201
|
+
tslib_1.__metadata("design:type", Object)
|
|
202
|
+
], VariablesConfigurationCategory.prototype, "agentService", void 0);
|
|
203
|
+
tslib_1.__decorate([
|
|
204
|
+
(0, inversify_1.inject)(clipboard_service_1.ClipboardService),
|
|
205
|
+
tslib_1.__metadata("design:type", Object)
|
|
206
|
+
], VariablesConfigurationCategory.prototype, "clipboardService", void 0);
|
|
207
|
+
tslib_1.__decorate([
|
|
208
|
+
(0, inversify_1.postConstruct)(),
|
|
209
|
+
tslib_1.__metadata("design:type", Function),
|
|
210
|
+
tslib_1.__metadata("design:paramtypes", []),
|
|
211
|
+
tslib_1.__metadata("design:returntype", void 0)
|
|
212
|
+
], VariablesConfigurationCategory.prototype, "init", null);
|
|
213
|
+
exports.VariablesConfigurationCategory = VariablesConfigurationCategory = VariablesConfigurationCategory_1 = tslib_1.__decorate([
|
|
214
|
+
(0, inversify_1.injectable)()
|
|
215
|
+
], VariablesConfigurationCategory);
|
|
216
|
+
/** A copy-to-clipboard affordance for the variable reference, briefly swapping to a check on success. */
|
|
217
|
+
const CopyReferenceButton = ({ onCopy }) => {
|
|
218
|
+
const [copied, setCopied] = React.useState(false);
|
|
219
|
+
const timeoutRef = React.useRef(undefined);
|
|
220
|
+
React.useEffect(() => () => {
|
|
221
|
+
if (timeoutRef.current !== undefined) {
|
|
222
|
+
clearTimeout(timeoutRef.current);
|
|
223
|
+
}
|
|
224
|
+
}, []);
|
|
225
|
+
const label = core_1.nls.localize('theia/ai/ide/variableConfiguration/copyVariableName', 'Copy variable name');
|
|
226
|
+
return (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(collapsible_list_1.CollapsibleRowAction, { iconClass: (0, browser_1.codicon)(copied ? 'check' : 'copy'), label: label, onActivate: () => {
|
|
227
|
+
onCopy();
|
|
228
|
+
setCopied(true);
|
|
229
|
+
if (timeoutRef.current !== undefined) {
|
|
230
|
+
clearTimeout(timeoutRef.current);
|
|
231
|
+
}
|
|
232
|
+
timeoutRef.current = setTimeout(() => setCopied(false), 1500);
|
|
233
|
+
} }), (0, jsx_runtime_1.jsx)("span", { className: 'ai-variable-visually-hidden', "aria-live": 'polite', children: copied ? core_1.nls.localizeByDefault('Copied') : '' })] });
|
|
234
|
+
};
|
|
235
|
+
const VariableArgs = ({ variable }) => {
|
|
236
|
+
if (!variable.args || variable.args.length === 0) {
|
|
237
|
+
return undefined;
|
|
238
|
+
}
|
|
239
|
+
return (0, jsx_runtime_1.jsxs)("div", { className: 'ai-variable-section', children: [(0, jsx_runtime_1.jsx)("div", { className: 'ai-variable-section-label', children: core_1.nls.localizeByDefault('Arguments') }), (0, jsx_runtime_1.jsx)("div", { className: 'ai-variable-args-container', children: variable.args.map(arg => (0, jsx_runtime_1.jsxs)("div", { className: 'ai-variable-arg-row', children: [(0, jsx_runtime_1.jsx)("code", { className: 'ai-variable-arg-name', children: arg.name }), (0, jsx_runtime_1.jsx)("span", { className: `ai-variable-arg-badge ${arg.isOptional ? 'optional' : 'required'}`, children: arg.isOptional
|
|
240
|
+
? core_1.nls.localize('theia/ai/ide/variableConfiguration/optional', 'optional')
|
|
241
|
+
: core_1.nls.localize('theia/ai/ide/variableConfiguration/required', 'required') }), (0, jsx_runtime_1.jsxs)("div", { className: 'ai-variable-arg-description', children: [VariablesConfigurationCategory.normalizeDescription(arg.description), arg.enum && arg.enum.length > 0 && (0, jsx_runtime_1.jsx)("span", { className: 'ai-variable-arg-enum', children: core_1.nls.localize('theia/ai/ide/variableConfiguration/argEnum', 'One of: {0}', arg.enum.join(', ')) })] })] }, arg.name)) })] });
|
|
242
|
+
};
|
|
243
|
+
/** The agents that reference the variable, rendered as navigable chips. */
|
|
244
|
+
const UsedByAgents = ({ agents, onOpenAgent }) => (0, jsx_runtime_1.jsxs)("div", { className: 'ai-variable-section', children: [(0, jsx_runtime_1.jsx)("div", { className: 'ai-variable-section-label', children: core_1.nls.localize('theia/ai/ide/variableConfiguration/usedByAgents', 'Used by Agents') }), (0, jsx_runtime_1.jsx)("div", { className: 'ai-variable-agent-chips', children: agents.map(agent => (0, jsx_runtime_1.jsx)(agent_chips_1.AgentChip, { agent: agent, onOpenAgent: onOpenAgent }, agent.id)) })] });
|
|
245
|
+
//# sourceMappingURL=variables-configuration-category.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"variables-configuration-category.js","sourceRoot":"","sources":["../../../../src/browser/ai-configuration/categories/variables-configuration-category.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;AAEhF,sDAAgI;AAChI,sCAAkD;AAClD,qDAAkD;AAClD,iFAA6E;AAC7E,mDAA8D;AAC9D,4DAAiF;AACjF,kDAAkD;AAClD,wHAOkF;AAClF,0IAAoI;AACpI,+CAA0C;AAC1C,iHAKoF;AAEpF;;;;;;;GAOG;AAEI,IAAM,8BAA8B,sCAApC,MAAM,8BAA+B,SAAQ,0DAA0B;IAAvE;;QAEM,OAAE,GAAG,qDAAyB,CAAC,SAAS,CAAC;QACzC,UAAK,GAAG,UAAG,CAAC,iBAAiB,CAAC,WAAW,CAAC,CAAC;QAC3C,gBAAW,GAAG,UAAG,CAAC,QAAQ,CAC/B,iDAAiD,EACjD,oGAAoG,EACpG,mBAAU,CAAC,aAAa,CAC3B,CAAC;QACO,cAAS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W,EAAE,EAAE,EAAE,CACpH,iCAAK,SAAS,EAAC,qBAAqB,aAChC,gCAAK,SAAS,EAAC,2BAA2B,YAAE,UAAG,CAAC,QAAQ,CAAC,iDAAiD,EAAE,gBAAgB,CAAC,GAAO,EACpI,gCAAK,SAAS,EAAC,yBAAyB,YACnC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,uBAAC,uBAAS,IAAgB,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,WAAW,IAAhD,KAAK,CAAC,EAAE,CAA4C,CAAC,GACxF,IACJ,CAAC"}
|
package/lib/browser/ai-configuration/categories/variables-configuration-category.spec.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"variables-configuration-category.spec.d.ts","sourceRoot":"","sources":["../../../../src/browser/ai-configuration/categories/variables-configuration-category.spec.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// *****************************************************************************
|
|
3
|
+
// Copyright (C) 2026 EclipseSource and others.
|
|
4
|
+
//
|
|
5
|
+
// This program and the accompanying materials are made available under the
|
|
6
|
+
// terms of the Eclipse Public License v. 2.0 which is available at
|
|
7
|
+
// http://www.eclipse.org/legal/epl-2.0.
|
|
8
|
+
//
|
|
9
|
+
// This Source Code may also be made available under the following Secondary
|
|
10
|
+
// Licenses when the conditions for such availability set forth in the Eclipse
|
|
11
|
+
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
12
|
+
// with the GNU Classpath Exception which is available at
|
|
13
|
+
// https://www.gnu.org/software/classpath/license.html.
|
|
14
|
+
//
|
|
15
|
+
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
16
|
+
// *****************************************************************************
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
const jsdom_1 = require("@theia/core/lib/browser/test/jsdom");
|
|
19
|
+
let disableJSDOM = (0, jsdom_1.enableJSDOM)();
|
|
20
|
+
const frontend_application_config_provider_1 = require("@theia/core/lib/browser/frontend-application-config-provider");
|
|
21
|
+
frontend_application_config_provider_1.FrontendApplicationConfigProvider.set({});
|
|
22
|
+
const chai_1 = require("chai");
|
|
23
|
+
const ai_configuration_category_1 = require("@theia/ai-core-ui/lib/browser/ai-configuration/ai-configuration-category");
|
|
24
|
+
const variables_configuration_category_1 = require("./variables-configuration-category");
|
|
25
|
+
disableJSDOM();
|
|
26
|
+
function variable(id, name, description = '') {
|
|
27
|
+
return { id, name, description };
|
|
28
|
+
}
|
|
29
|
+
function agent(id, name, options = {}) {
|
|
30
|
+
return {
|
|
31
|
+
id,
|
|
32
|
+
name,
|
|
33
|
+
variables: options.variables ?? [],
|
|
34
|
+
prompts: (options.templates ?? []).map((template, index) => ({ id: `${id}-${index}`, defaultVariant: { id: `${id}-${index}-v`, template } }))
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
function createCategory(variables, agents = []) {
|
|
38
|
+
const category = new variables_configuration_category_1.VariablesConfigurationCategory();
|
|
39
|
+
const variableService = { getVariables: () => variables };
|
|
40
|
+
const agentService = { getAllAgents: () => agents };
|
|
41
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
42
|
+
category.variableService = variableService;
|
|
43
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
44
|
+
category.agentService = agentService;
|
|
45
|
+
return category;
|
|
46
|
+
}
|
|
47
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
48
|
+
function agentsForVariable(category, target) {
|
|
49
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
50
|
+
const anyCategory = category;
|
|
51
|
+
return anyCategory.getAgentsForVariable(target, anyCategory.computeAgentUsage()).map((a) => a.id);
|
|
52
|
+
}
|
|
53
|
+
describe('VariablesConfigurationCategory', () => {
|
|
54
|
+
before(() => disableJSDOM = (0, jsdom_1.enableJSDOM)());
|
|
55
|
+
after(() => disableJSDOM());
|
|
56
|
+
it('declares the variables single-page metadata', () => {
|
|
57
|
+
const category = createCategory([]);
|
|
58
|
+
(0, chai_1.expect)(category.id).to.equal(ai_configuration_category_1.AiConfigurationCategoryId.VARIABLES);
|
|
59
|
+
(0, chai_1.expect)(category.kind).to.equal('single-page');
|
|
60
|
+
(0, chai_1.expect)(category.renderer).to.equal(category);
|
|
61
|
+
});
|
|
62
|
+
it('indexes one search item per variable, sorted by name and highlighting the row', () => {
|
|
63
|
+
const items = createCategory([variable('b', 'Beta'), variable('a', 'Alpha', 'the alpha')]).getSearchItems();
|
|
64
|
+
(0, chai_1.expect)(items.map(i => i.label)).to.deep.equal(['Alpha', 'Beta']);
|
|
65
|
+
(0, chai_1.expect)(items[0].target).to.deep.equal({ categoryId: ai_configuration_category_1.AiConfigurationCategoryId.VARIABLES, highlight: { rowId: 'a' } });
|
|
66
|
+
(0, chai_1.expect)(items[0].keywords).to.contain('a').and.to.contain('the alpha');
|
|
67
|
+
});
|
|
68
|
+
it('associates an agent with a variable referenced in its prompt template', () => {
|
|
69
|
+
const productName = variable('product-name-provider', 'productName');
|
|
70
|
+
const category = createCategory([productName], [
|
|
71
|
+
agent('coder', 'Coder', { templates: ['You are running in {{productName}} today.'] }),
|
|
72
|
+
agent('other', 'Other', { templates: ['References {{today}} only.'] })
|
|
73
|
+
]);
|
|
74
|
+
(0, chai_1.expect)(agentsForVariable(category, productName)).to.deep.equal(['coder']);
|
|
75
|
+
});
|
|
76
|
+
it('associates an agent that declares the variable id in Agent.variables', () => {
|
|
77
|
+
const file = variable('file-provider', 'file');
|
|
78
|
+
const category = createCategory([file], [agent('coder', 'Coder', { variables: ['file-provider'] })]);
|
|
79
|
+
(0, chai_1.expect)(agentsForVariable(category, file)).to.deep.equal(['coder']);
|
|
80
|
+
});
|
|
81
|
+
it('ignores template references with an argument suffix beyond the variable name', () => {
|
|
82
|
+
const file = variable('file-provider', 'file');
|
|
83
|
+
const category = createCategory([file], [agent('coder', 'Coder', { templates: ['Content: {{file:/tmp/x.ts}}'] })]);
|
|
84
|
+
(0, chai_1.expect)(agentsForVariable(category, file)).to.deep.equal(['coder']);
|
|
85
|
+
});
|
|
86
|
+
describe('filter matching', () => {
|
|
87
|
+
const category = createCategory([]);
|
|
88
|
+
it('matches everything for an empty or whitespace-only query', () => {
|
|
89
|
+
const file = variable('file-provider', 'file', 'The current file');
|
|
90
|
+
(0, chai_1.expect)(category.matchesVariable(file, '')).to.be.true;
|
|
91
|
+
(0, chai_1.expect)(category.matchesVariable(file, ' ')).to.be.true;
|
|
92
|
+
});
|
|
93
|
+
it('matches the variable name case-insensitively', () => {
|
|
94
|
+
const file = variable('file-provider', 'file', 'The current file');
|
|
95
|
+
(0, chai_1.expect)(category.matchesVariable(file, 'FIL')).to.be.true;
|
|
96
|
+
});
|
|
97
|
+
it('matches the description case-insensitively', () => {
|
|
98
|
+
const file = variable('file-provider', 'file', 'The Current File');
|
|
99
|
+
(0, chai_1.expect)(category.matchesVariable(file, 'current')).to.be.true;
|
|
100
|
+
});
|
|
101
|
+
it('does not match when neither name nor description contain the query', () => {
|
|
102
|
+
const file = variable('file-provider', 'file', 'The current file');
|
|
103
|
+
(0, chai_1.expect)(category.matchesVariable(file, 'agent')).to.be.false;
|
|
104
|
+
});
|
|
105
|
+
});
|
|
106
|
+
describe('description normalization', () => {
|
|
107
|
+
it('collapses runs of whitespace and trims', () => {
|
|
108
|
+
(0, chai_1.expect)(variables_configuration_category_1.VariablesConfigurationCategory.normalizeDescription(' The absolute path of the currently opened file. '))
|
|
109
|
+
.to.equal('The absolute path of the currently opened file.');
|
|
110
|
+
});
|
|
111
|
+
it('returns an empty string for an undefined description', () => {
|
|
112
|
+
(0, chai_1.expect)(variables_configuration_category_1.VariablesConfigurationCategory.normalizeDescription(undefined)).to.equal('');
|
|
113
|
+
});
|
|
114
|
+
it('matches variables whose description contains collapsible whitespace', () => {
|
|
115
|
+
const spaced = variable('file-provider', 'file', 'The absolute path of the current file.');
|
|
116
|
+
(0, chai_1.expect)(createCategory([]).matchesVariable(spaced, 'path of the current')).to.be.true;
|
|
117
|
+
});
|
|
118
|
+
});
|
|
119
|
+
describe('copy reference', () => {
|
|
120
|
+
it('copies the prompt reference of the variable to the clipboard', () => {
|
|
121
|
+
const written = [];
|
|
122
|
+
const category = createCategory([]);
|
|
123
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
124
|
+
category.clipboardService = { writeText: (text) => written.push(text) };
|
|
125
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
126
|
+
category.copyReference(variable('file-provider', 'file'));
|
|
127
|
+
(0, chai_1.expect)(written).to.deep.equal(['#file']);
|
|
128
|
+
});
|
|
129
|
+
});
|
|
130
|
+
});
|
|
131
|
+
//# sourceMappingURL=variables-configuration-category.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"variables-configuration-category.spec.js","sourceRoot":"","sources":["../../../../src/browser/ai-configuration/categories/variables-configuration-category.spec.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,+CAA+C;AAC/C,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;AAEhF,8DAAiE;AACjE,IAAI,YAAY,GAAG,IAAA,mBAAW,GAAE,CAAC;AAEjC,uHAAiH;AACjH,wEAAiC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;AAE1C,+BAA8B;AAE9B,wHAAqH;AACrH,yFAAoF;AAEpF,YAAY,EAAE,CAAC;AAEf,SAAS,QAAQ,CAAC,EAAU,EAAE,IAAY,EAAE,WAAW,GAAG,EAAE;IACxD,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,WAAW,EAA2B,CAAC;AAC9D,CAAC;AAED,SAAS,KAAK,CAAC,EAAU,EAAE,IA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,GAAG,EAAE;YACpE,MAAM,OAAO,GAAa,EAAE,CAAC;YAC7B,MAAM,QAAQ,GAAG,cAAc,CAAC,EAAE,CAAC,CAAC;YACpC,8DAA8D;YAC7D,QAAgB,CAAC,gBAAgB,GAAG,EAAE,SAAS,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;YACzF,8DAA8D;YAC7D,QAAgB,CAAC,aAAa,CAAC,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC,CAAC;YACnE,IAAA,aAAM,EAAC,OAAO,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;QAC7C,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AAEP,CAAC,CAAC,CAAC"}
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import { NotificationType } from '@theia/ai-core/lib/common';
|
|
2
|
-
import
|
|
2
|
+
import { AiSettingsRowService } from '@theia/ai-core-ui/lib/browser/ai-configuration/components/ai-settings-row-service';
|
|
3
3
|
export interface AgentNotificationSettingsProps {
|
|
4
4
|
agentId: string;
|
|
5
5
|
currentNotificationType?: NotificationType;
|
|
6
6
|
onNotificationTypeChange: (agentId: string, notificationType: NotificationType | undefined) => Promise<void>;
|
|
7
|
+
/** Opens the global AI notification setting (linked from the description). */
|
|
7
8
|
onOpenNotificationSettings: () => void;
|
|
9
|
+
/** Backs the row's gear menu (its "Reset Setting" resets this agent's override). */
|
|
10
|
+
settingsRowService: AiSettingsRowService;
|
|
8
11
|
}
|
|
9
|
-
|
|
12
|
+
/** The agent's completion-notification setting, rendered as a normal setting row whose gear menu resets the override. */
|
|
13
|
+
export declare const AgentNotificationSettings: ({ agentId, currentNotificationType, onNotificationTypeChange, onOpenNotificationSettings, settingsRowService }: AgentNotificationSettingsProps) => import("react").JSX.Element;
|
|
10
14
|
//# sourceMappingURL=agent-notification-settings.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-notification-settings.d.ts","sourceRoot":"","sources":["../../../../src/browser/ai-configuration/components/agent-notification-settings.tsx"],"names":[],"mappings":"AAgBA,OAAO,EACH,gBAAgB,EAInB,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"agent-notification-settings.d.ts","sourceRoot":"","sources":["../../../../src/browser/ai-configuration/components/agent-notification-settings.tsx"],"names":[],"mappings":"AAgBA,OAAO,EACH,gBAAgB,EAInB,MAAM,2BAA2B,CAAC;AAKnC,OAAO,EAAE,oBAAoB,EAAE,MAAM,mFAAmF,CAAC;AAEzH,MAAM,WAAW,8BAA8B;IAC3C,OAAO,EAAE,MAAM,CAAC;IAChB,uBAAuB,CAAC,EAAE,gBAAgB,CAAC;IAC3C,wBAAwB,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,gBAAgB,EAAE,gBAAgB,GAAG,SAAS,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7G,8EAA8E;IAC9E,0BAA0B,EAAE,MAAM,IAAI,CAAC;IACvC,oFAAoF;IACpF,kBAAkB,EAAE,oBAAoB,CAAC;CAC5C;AAkBD,yHAAyH;AACzH,eAAO,MAAM,yBAAyB,GAAI,gHAEvC,8BAA8B,gCA8BhC,CAAC"}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AgentNotificationSettings = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("@theia/core/shared/react/jsx-runtime");
|
|
2
5
|
// *****************************************************************************
|
|
3
6
|
// Copyright (C) 2026 EclipseSource GmbH.
|
|
4
7
|
//
|
|
@@ -14,12 +17,10 @@
|
|
|
14
17
|
//
|
|
15
18
|
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
16
19
|
// *****************************************************************************
|
|
17
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.AgentNotificationSettings = void 0;
|
|
19
20
|
const common_1 = require("@theia/ai-core/lib/common");
|
|
20
21
|
const core_1 = require("@theia/core");
|
|
21
|
-
const
|
|
22
|
-
const
|
|
22
|
+
const ai_configuration_controls_1 = require("@theia/ai-core-ui/lib/browser/ai-configuration/components/ai-configuration-controls");
|
|
23
|
+
const ai_configuration_setting_row_1 = require("@theia/ai-core-ui/lib/browser/ai-configuration/components/ai-configuration-setting-row");
|
|
23
24
|
const DEFAULT_VALUE = 'default';
|
|
24
25
|
const NOTIFICATION_SELECT_OPTIONS = [
|
|
25
26
|
{
|
|
@@ -33,25 +34,18 @@ const NOTIFICATION_SELECT_OPTIONS = [
|
|
|
33
34
|
description: common_1.NOTIFICATION_TYPE_DESCRIPTIONS[type],
|
|
34
35
|
})),
|
|
35
36
|
];
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
/** The agent's completion-notification setting, rendered as a normal setting row whose gear menu resets the override. */
|
|
38
|
+
const AgentNotificationSettings = ({ agentId, currentNotificationType, onNotificationTypeChange, onOpenNotificationSettings, settingsRowService }) => {
|
|
39
|
+
const handleChange = (value) => {
|
|
40
|
+
const notificationType = value === DEFAULT_VALUE ? undefined : value;
|
|
39
41
|
onNotificationTypeChange(agentId, notificationType);
|
|
40
42
|
};
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
React.createElement(NotificationDescription, { onOpenNotificationSettings: onOpenNotificationSettings })));
|
|
43
|
+
const isOverridden = currentNotificationType !== undefined;
|
|
44
|
+
return (0, jsx_runtime_1.jsx)(ai_configuration_setting_row_1.AiConfigurationSettingRow, { title: core_1.nls.localizeByDefault('Notifications'), description: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [core_1.nls.localize('theia/ai/core/agentConfiguration/completionNotificationIntro', 'How you want to be notified when this agent needs your attention (it completes its task or requests input). "Default" uses the global '), (0, jsx_runtime_1.jsx)("a", { href: '#', onClick: event => { event.preventDefault(); onOpenNotificationSettings(); }, children: core_1.nls.localize('theia/ai/core/agentConfiguration/notificationSettingsLink', 'AI notification setting') }), "."] }), modified: isOverridden, below: (0, jsx_runtime_1.jsx)(ai_configuration_controls_1.AiEnumSelect, { ariaLabel: core_1.nls.localizeByDefault('Notifications'), options: NOTIFICATION_SELECT_OPTIONS.map(option => ({
|
|
45
|
+
value: String(option.value ?? ''),
|
|
46
|
+
label: option.label ?? String(option.value ?? ''),
|
|
47
|
+
title: option.description
|
|
48
|
+
})), value: currentNotificationType ?? DEFAULT_VALUE, onCommit: handleChange }), onOpenMenu: gear => settingsRowService.openResetMenu(gear, () => onNotificationTypeChange(agentId, undefined)) });
|
|
48
49
|
};
|
|
49
50
|
exports.AgentNotificationSettings = AgentNotificationSettings;
|
|
50
|
-
const NotificationDescription = ({ onOpenNotificationSettings }) => {
|
|
51
|
-
const linkText = core_1.nls.localize('theia/ai/core/agentConfiguration/notificationSettingsLink', 'AI notification setting');
|
|
52
|
-
return (React.createElement("div", { className: "ai-configuration-description" },
|
|
53
|
-
core_1.nls.localize('theia/ai/core/agentConfiguration/completionNotificationDescriptionPrefix', 'Select how you want to be notified when this agent needs your attention, i.e. it completes its task or requests your input. "Default" uses the '),
|
|
54
|
-
React.createElement("a", { href: "#", onClick: e => { e.preventDefault(); onOpenNotificationSettings(); } }, linkText),
|
|
55
|
-
"."));
|
|
56
|
-
};
|
|
57
51
|
//# sourceMappingURL=agent-notification-settings.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-notification-settings.js","sourceRoot":"","sources":["../../../../src/browser/ai-configuration/components/agent-notification-settings.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"agent-notification-settings.js","sourceRoot":"","sources":["../../../../src/browser/ai-configuration/components/agent-notification-settings.tsx"],"names":[],"mappings":";;;;AAAA,gFAAgF;AAChF,yCAAyC;AACz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,wIAAwI,CAAC,EAC7I,8BAAG,IAAI,EAAC,GAAG,EAAC,OAAO,EAAE,KAAK,CAAC,EAAE,GAAG,KAAK,CAAC,cAAc,EAAE,CAAC,CAAC,0BAA0B,EAAE,CAAC,CAAC,CAAC,YAClF,UAAG,CAAC,QAAQ,CAAC,2DAA2D,EAAE,yBAAyB,CAAC,GACrG,SACL,EACH,QAAQ,EAAE,YAAY,EACtB,KAAK,EAAE,uBAAC,wCAAY,IAChB,SAAS,EAAE,UAAG,CAAC,iBAAiB,CAAC,eAAe,CAAC,EACjD,OAAO,EAAE,2BAA2B,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;gBAChD,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,KAAK,IAAI,EAAE,CAAC;gBACjC,KAAK,EAAE,MAAM,CAAC,KAAK,IAAI,MAAM,CAAC,MAAM,CAAC,KAAK,IAAI,EAAE,CAAC;gBACjD,KAAK,EAAE,MAAM,CAAC,WAAW;aAC5B,CAAC,CAAC,EACH,KAAK,EAAE,uBAAuB,IAAI,aAAa,EAC/C,QAAQ,EAAE,YAAY,GACxB,EACF,UAAU,EAAE,IAAI,CAAC,EAAE,CAAC,kBAAkB,CAAC,aAAa,CAAC,IAAI,EAAE,GAAG,EAAE,CAAC,wBAAwB,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC,GAChH,CAAC;AACP,CAAC,CAAC;AAhCW,QAAA,yBAAyB,6BAgCpC"}
|
|
@@ -1,12 +1,36 @@
|
|
|
1
1
|
import * as React from '@theia/core/shared/react';
|
|
2
|
-
import { Agent, AISettingsService, FrontendLanguageModelRegistry, LanguageModel } from '@theia/ai-core/lib/common';
|
|
2
|
+
import { Agent, AISettingsService, FrontendLanguageModelRegistry, LanguageModel, ReasoningLevel, ReasoningSupport } from '@theia/ai-core/lib/common';
|
|
3
3
|
import { LanguageModelAlias } from '@theia/ai-core/lib/common/language-model-alias';
|
|
4
|
+
import { AiSettingsRowService } from '@theia/ai-core-ui/lib/browser/ai-configuration/components/ai-settings-row-service';
|
|
4
5
|
export interface LanguageModelSettingsProps {
|
|
5
6
|
agent: Agent;
|
|
6
7
|
languageModels?: LanguageModel[];
|
|
7
8
|
aiSettingsService: AISettingsService;
|
|
8
9
|
languageModelRegistry: FrontendLanguageModelRegistry;
|
|
9
10
|
languageModelAliases: LanguageModelAlias[];
|
|
11
|
+
/** Backs each purpose row's gear menu (its "Reset Setting" drops that purpose's override). */
|
|
12
|
+
settingsRowService: AiSettingsRowService;
|
|
10
13
|
}
|
|
14
|
+
/**
|
|
15
|
+
* The agent's persisted reasoning level, shown right below its models because that is the model
|
|
16
|
+
* capability it depends on. The chat input's selector writes this same per-agent setting, so without this
|
|
17
|
+
* row there is no way to see what it stored, change it outside a chat, or clear it again.
|
|
18
|
+
*
|
|
19
|
+
* Shown only while the resolved model declares reasoning support, matching the chat input, which hides its
|
|
20
|
+
* selector in that case. The select carries `theia-ReasoningLevelSelector` so it shows the same per-level
|
|
21
|
+
* lightbulb glyphs as the chat input.
|
|
22
|
+
*
|
|
23
|
+
* Exported for tests: the glyph class it builds is the contract with `ai-chat-ui`'s shared CSS.
|
|
24
|
+
*/
|
|
25
|
+
export declare const ReasoningRow: React.FC<{
|
|
26
|
+
support: ReasoningSupport;
|
|
27
|
+
/** Level stored for this agent; `undefined` means the level is inherited. */
|
|
28
|
+
savedLevel?: ReasoningLevel;
|
|
29
|
+
/** Level that applies when nothing is stored: the matching preference default, else the model's. */
|
|
30
|
+
inheritedLevel: ReasoningLevel;
|
|
31
|
+
onSelect: (level: ReasoningLevel) => void;
|
|
32
|
+
onReset: () => void;
|
|
33
|
+
settingsRowService: AiSettingsRowService;
|
|
34
|
+
}>;
|
|
11
35
|
export declare const LanguageModelRenderer: React.FC<LanguageModelSettingsProps>;
|
|
12
36
|
//# sourceMappingURL=language-model-renderer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"language-model-renderer.d.ts","sourceRoot":"","sources":["../../../src/browser/ai-configuration/language-model-renderer.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAK,KAAK,MAAM,0BAA0B,CAAC;AAClD,OAAO,
|
|
1
|
+
{"version":3,"file":"language-model-renderer.d.ts","sourceRoot":"","sources":["../../../src/browser/ai-configuration/language-model-renderer.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAK,KAAK,MAAM,0BAA0B,CAAC;AAClD,OAAO,EACH,KAAK,EACL,iBAAiB,EACjB,6BAA6B,EAC7B,aAAa,EAGb,cAAc,EAEd,gBAAgB,EACnB,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAAE,kBAAkB,EAAE,MAAM,gDAAgD,CAAC;AAKpF,OAAO,EAAE,oBAAoB,EAAE,MAAM,mFAAmF,CAAC;AAEzH,MAAM,WAAW,0BAA0B;IACvC,KAAK,EAAE,KAAK,CAAC;IACb,cAAc,CAAC,EAAE,aAAa,EAAE,CAAC;IACjC,iBAAiB,EAAE,iBAAiB,CAAC;IACrC,qBAAqB,EAAE,6BAA6B,CAAC;IACrD,oBAAoB,EAAE,kBAAkB,EAAE,CAAC;IAC3C,8FAA8F;IAC9F,kBAAkB,EAAE,oBAAoB,CAAC;CAC5C;AAsCD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC;IAChC,OAAO,EAAE,gBAAgB,CAAC;IAC1B,6EAA6E;IAC7E,UAAU,CAAC,EAAE,cAAc,CAAC;IAC5B,oGAAoG;IACpG,cAAc,EAAE,cAAc,CAAC;IAC/B,QAAQ,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,IAAI,CAAC;IAC1C,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,kBAAkB,EAAE,oBAAoB,CAAC;CAC5C,CA4BA,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,KAAK,CAAC,EAAE,CAAC,0BAA0B,CA4KtE,CAAC"}
|