@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
|
@@ -1,620 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// *****************************************************************************
|
|
3
|
-
// Copyright (C) 2024 EclipseSource GmbH.
|
|
4
|
-
//
|
|
5
|
-
// This program and the accompanying materials are made available under the
|
|
6
|
-
// terms of the Eclipse Public License v. 2.0 which is available at
|
|
7
|
-
// http://www.eclipse.org/legal/epl-2.0.
|
|
8
|
-
//
|
|
9
|
-
// This Source Code may also be made available under the following Secondary
|
|
10
|
-
// Licenses when the conditions for such availability set forth in the Eclipse
|
|
11
|
-
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
12
|
-
// with the GNU Classpath Exception which is available at
|
|
13
|
-
// https://www.gnu.org/software/classpath/license.html.
|
|
14
|
-
//
|
|
15
|
-
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
16
|
-
// *****************************************************************************
|
|
17
|
-
var AIAgentConfigurationWidget_1;
|
|
18
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
-
exports.AIAgentConfigurationWidget = void 0;
|
|
20
|
-
const tslib_1 = require("tslib");
|
|
21
|
-
const common_1 = require("@theia/ai-core/lib/common");
|
|
22
|
-
const common_2 = require("@theia/ai-chat/lib/common");
|
|
23
|
-
const browser_1 = require("@theia/core/lib/browser");
|
|
24
|
-
const command_1 = require("@theia/core/lib/common/command");
|
|
25
|
-
const inversify_1 = require("@theia/core/shared/inversify");
|
|
26
|
-
const React = require("@theia/core/shared/react");
|
|
27
|
-
const ai_configuration_service_1 = require("./ai-configuration-service");
|
|
28
|
-
const language_model_renderer_1 = require("./language-model-renderer");
|
|
29
|
-
const language_model_alias_1 = require("@theia/ai-core/lib/common/language-model-alias");
|
|
30
|
-
const variable_configuration_widget_1 = require("./variable-configuration-widget");
|
|
31
|
-
const core_1 = require("@theia/core");
|
|
32
|
-
const template_settings_renderer_1 = require("./template-settings-renderer");
|
|
33
|
-
const ai_list_detail_configuration_widget_1 = require("./base/ai-list-detail-configuration-widget");
|
|
34
|
-
const agent_notification_settings_1 = require("./components/agent-notification-settings");
|
|
35
|
-
;
|
|
36
|
-
let AIAgentConfigurationWidget = class AIAgentConfigurationWidget extends ai_list_detail_configuration_widget_1.AIListDetailConfigurationWidget {
|
|
37
|
-
constructor() {
|
|
38
|
-
super(...arguments);
|
|
39
|
-
this.languageModelAliases = [];
|
|
40
|
-
this.isLoadingDetails = false;
|
|
41
|
-
this.handleItemSelect = (agent) => {
|
|
42
|
-
this.selectedItem = agent;
|
|
43
|
-
this.aiConfigurationSelectionService.setActiveAgent(agent);
|
|
44
|
-
this.updateParsedPromptParts();
|
|
45
|
-
};
|
|
46
|
-
this.showInChatState = true;
|
|
47
|
-
this.toggleAgentEnabled = async () => {
|
|
48
|
-
const agent = this.aiConfigurationSelectionService.getActiveAgent();
|
|
49
|
-
if (!agent) {
|
|
50
|
-
return false;
|
|
51
|
-
}
|
|
52
|
-
const enabled = this.agentService.isEnabled(agent.id);
|
|
53
|
-
if (enabled) {
|
|
54
|
-
await this.agentService.disableAgent(agent.id);
|
|
55
|
-
}
|
|
56
|
-
else {
|
|
57
|
-
await this.agentService.enableAgent(agent.id);
|
|
58
|
-
}
|
|
59
|
-
this.update();
|
|
60
|
-
};
|
|
61
|
-
this.toggleShowInChat = async () => {
|
|
62
|
-
const agent = this.aiConfigurationSelectionService.getActiveAgent();
|
|
63
|
-
if (!agent) {
|
|
64
|
-
return;
|
|
65
|
-
}
|
|
66
|
-
if (!this.agentService.isEnabled(agent.id)) {
|
|
67
|
-
return;
|
|
68
|
-
}
|
|
69
|
-
const newValue = !this.showInChatState;
|
|
70
|
-
await this.aiSettingsService.updateAgentSettings(agent.id, { showInChat: newValue });
|
|
71
|
-
this.showInChatState = newValue;
|
|
72
|
-
this.update();
|
|
73
|
-
};
|
|
74
|
-
this.handleNotificationTypeChange = async (agentId, notificationType) => {
|
|
75
|
-
await this.aiSettingsService.updateAgentSettings(agentId, {
|
|
76
|
-
completionNotification: notificationType
|
|
77
|
-
});
|
|
78
|
-
this.agentCompletionNotificationType = notificationType;
|
|
79
|
-
this.update();
|
|
80
|
-
};
|
|
81
|
-
this.openNotificationSettings = () => {
|
|
82
|
-
this.commandService.executeCommand(browser_1.CommonCommands.OPEN_PREFERENCES.id, common_1.PREFERENCE_NAME_DEFAULT_NOTIFICATION_TYPE);
|
|
83
|
-
};
|
|
84
|
-
}
|
|
85
|
-
static { AIAgentConfigurationWidget_1 = this; }
|
|
86
|
-
static { this.ID = 'ai-agent-configuration-container-widget'; }
|
|
87
|
-
static { this.LABEL = core_1.nls.localizeByDefault('Agents'); }
|
|
88
|
-
init() {
|
|
89
|
-
this.id = AIAgentConfigurationWidget_1.ID;
|
|
90
|
-
this.title.label = AIAgentConfigurationWidget_1.LABEL;
|
|
91
|
-
this.title.closable = false;
|
|
92
|
-
Promise.all([
|
|
93
|
-
this.loadItems(),
|
|
94
|
-
this.languageModelRegistry.getLanguageModels().then(models => {
|
|
95
|
-
this.languageModels = models ?? [];
|
|
96
|
-
})
|
|
97
|
-
]).then(() => this.update());
|
|
98
|
-
this.languageModelAliasRegistry.ready.then(() => {
|
|
99
|
-
this.languageModelAliases = this.languageModelAliasRegistry.getAliases();
|
|
100
|
-
this.toDispose.push(this.languageModelAliasRegistry.onDidChange(() => {
|
|
101
|
-
this.languageModelAliases = this.languageModelAliasRegistry.getAliases();
|
|
102
|
-
this.update();
|
|
103
|
-
}));
|
|
104
|
-
});
|
|
105
|
-
this.toDispose.pushAll([
|
|
106
|
-
this.languageModelRegistry.onChange(({ models }) => {
|
|
107
|
-
this.languageModelAliases = this.languageModelAliasRegistry.getAliases();
|
|
108
|
-
this.languageModels = models;
|
|
109
|
-
this.update();
|
|
110
|
-
}),
|
|
111
|
-
this.promptService.onPromptsChange(() => this.updateParsedPromptParts()),
|
|
112
|
-
this.promptFragmentCustomizationService.onDidChangePromptFragmentCustomization(() => {
|
|
113
|
-
this.updateParsedPromptParts();
|
|
114
|
-
}),
|
|
115
|
-
this.aiSettingsService.onDidChange(() => {
|
|
116
|
-
this.updateParsedPromptParts();
|
|
117
|
-
}),
|
|
118
|
-
this.aiConfigurationSelectionService.onDidAgentChange(() => {
|
|
119
|
-
this.selectedItem = this.aiConfigurationSelectionService.getActiveAgent();
|
|
120
|
-
this.updateParsedPromptParts();
|
|
121
|
-
}),
|
|
122
|
-
this.agentService.onDidChangeAgents(async () => {
|
|
123
|
-
await this.loadItems();
|
|
124
|
-
this.update();
|
|
125
|
-
})
|
|
126
|
-
]);
|
|
127
|
-
this.updateParsedPromptParts();
|
|
128
|
-
}
|
|
129
|
-
async loadItems() {
|
|
130
|
-
this.items = this.agentService.getAllAgents();
|
|
131
|
-
const activeAgent = this.aiConfigurationSelectionService.getActiveAgent();
|
|
132
|
-
if (activeAgent) {
|
|
133
|
-
this.selectedItem = activeAgent;
|
|
134
|
-
}
|
|
135
|
-
else if (this.items.length > 0 && !this.selectedItem) {
|
|
136
|
-
this.selectedItem = this.items[0];
|
|
137
|
-
this.aiConfigurationSelectionService.setActiveAgent(this.items[0]);
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
getItemId(agent) {
|
|
141
|
-
return agent.id;
|
|
142
|
-
}
|
|
143
|
-
getItemLabel(agent) {
|
|
144
|
-
return agent.name;
|
|
145
|
-
}
|
|
146
|
-
getEmptySelectionMessage() {
|
|
147
|
-
return core_1.nls.localize('theia/ai/core/agentConfiguration/selectAgentMessage', 'Please select an Agent first!');
|
|
148
|
-
}
|
|
149
|
-
renderItemPrefix(agent) {
|
|
150
|
-
const enabled = this.agentService.isEnabled(agent.id);
|
|
151
|
-
return (React.createElement("span", { className: `agent-status-indicator ${enabled ? `agent-enabled ${(0, browser_1.codicon)('circle-filled')}` : `agent-disabled ${(0, browser_1.codicon)('circle')}`}`, title: enabled ? core_1.nls.localizeByDefault('Enabled') : core_1.nls.localizeByDefault('Disabled') }));
|
|
152
|
-
}
|
|
153
|
-
renderItemSuffix(agent) {
|
|
154
|
-
if (!agent.tags?.length) {
|
|
155
|
-
return undefined;
|
|
156
|
-
}
|
|
157
|
-
return React.createElement("span", null, agent.tags.map(tag => React.createElement("span", { key: tag, className: 'agent-tag' }, tag)));
|
|
158
|
-
}
|
|
159
|
-
renderList() {
|
|
160
|
-
return (React.createElement("div", { className: "ai-configuration-list preferences-tree-widget theia-TreeContainer" },
|
|
161
|
-
React.createElement("ul", null, this.items.map(agent => {
|
|
162
|
-
const agentId = this.getItemId(agent);
|
|
163
|
-
const isSelected = this.selectedItem && this.getItemId(this.selectedItem) === agentId;
|
|
164
|
-
return React.createElement("li", { key: agentId, className: `theia-TreeNode theia-CompositeTreeNode${isSelected ? ' theia-mod-selected' : ''} ${this.getItemClassName(agent)}`, onClick: () => this.handleItemSelect(agent) },
|
|
165
|
-
this.renderItemPrefix(agent),
|
|
166
|
-
React.createElement("span", { className: "ai-configuration-list-item-label" }, this.getItemLabel(agent)),
|
|
167
|
-
this.renderItemSuffix(agent));
|
|
168
|
-
})),
|
|
169
|
-
React.createElement("div", { className: 'configuration-agents-add' },
|
|
170
|
-
React.createElement("button", { className: 'theia-button main', onClick: () => this.addCustomAgent() }, core_1.nls.localize('theia/ai/core/agentConfiguration/addCustomAgent', 'Add Custom Agent')))));
|
|
171
|
-
}
|
|
172
|
-
async updateParsedPromptParts() {
|
|
173
|
-
this.isLoadingDetails = true;
|
|
174
|
-
const agent = this.aiConfigurationSelectionService.getActiveAgent();
|
|
175
|
-
if (agent) {
|
|
176
|
-
this.parsedPromptParts = await this.parsePromptFragmentsForVariableAndFunction(agent);
|
|
177
|
-
const agentSettings = await this.aiSettingsService.getAgentSettings(agent.id);
|
|
178
|
-
this.showInChatState = agentSettings?.showInChat ?? true;
|
|
179
|
-
this.agentCompletionNotificationType = agentSettings?.completionNotification;
|
|
180
|
-
this.savedCapabilityOverrides = agentSettings?.capabilityOverrides;
|
|
181
|
-
this.savedGenericCapabilitySelections = agentSettings?.genericCapabilitySelections;
|
|
182
|
-
}
|
|
183
|
-
else {
|
|
184
|
-
this.parsedPromptParts = undefined;
|
|
185
|
-
this.agentCompletionNotificationType = undefined;
|
|
186
|
-
this.savedCapabilityOverrides = undefined;
|
|
187
|
-
this.savedGenericCapabilitySelections = undefined;
|
|
188
|
-
}
|
|
189
|
-
this.isLoadingDetails = false;
|
|
190
|
-
this.update();
|
|
191
|
-
}
|
|
192
|
-
renderItemDetail(agent) {
|
|
193
|
-
if (this.isLoadingDetails) {
|
|
194
|
-
return React.createElement("div", null, core_1.nls.localizeByDefault('Loading...'));
|
|
195
|
-
}
|
|
196
|
-
const enabled = this.agentService.isEnabled(agent.id);
|
|
197
|
-
if (!this.parsedPromptParts) {
|
|
198
|
-
this.updateParsedPromptParts();
|
|
199
|
-
return React.createElement("div", null, core_1.nls.localizeByDefault('Loading...'));
|
|
200
|
-
}
|
|
201
|
-
const globalVariables = Array.from(new Set([...this.parsedPromptParts.globalVariables, ...agent.variables]));
|
|
202
|
-
const functions = Array.from(new Set([...this.parsedPromptParts.functions, ...agent.functions]));
|
|
203
|
-
const agentNameWithTags = React.createElement(React.Fragment, null,
|
|
204
|
-
agent.name,
|
|
205
|
-
agent.tags && agent.tags.length > 0 && React.createElement("span", null, agent.tags.map(tag => React.createElement("span", { key: tag, className: 'agent-tag' }, tag))));
|
|
206
|
-
return React.createElement("div", { key: agent.id },
|
|
207
|
-
React.createElement("div", { className: 'settings-section-title settings-section-category-title agent-title-with-toggle' },
|
|
208
|
-
React.createElement("div", { className: 'agent-title-content' },
|
|
209
|
-
React.createElement("div", null,
|
|
210
|
-
agentNameWithTags,
|
|
211
|
-
React.createElement("pre", { className: 'ai-id-label' },
|
|
212
|
-
"Id: ",
|
|
213
|
-
agent.id)),
|
|
214
|
-
React.createElement("div", { className: 'agent-toggles' },
|
|
215
|
-
React.createElement("label", { className: 'agent-enable-toggle', title: core_1.nls.localize('theia/ai/core/agentConfiguration/enableAgent', 'Enable Agent') },
|
|
216
|
-
React.createElement("span", { className: 'toggle-label' }, core_1.nls.localize('theia/ai/core/agentConfiguration/enableAgent', 'Enable Agent')),
|
|
217
|
-
React.createElement("div", { className: 'toggle-switch', onClick: this.toggleAgentEnabled },
|
|
218
|
-
React.createElement("input", { type: "checkbox", checked: enabled, onChange: this.toggleAgentEnabled }),
|
|
219
|
-
React.createElement("span", { className: 'toggle-slider' }))),
|
|
220
|
-
(0, common_2.isChatAgent)(agent) && (React.createElement("label", { className: `agent-enable-toggle${enabled ? '' : ' disabled'}`, title: core_1.nls.localize('theia/ai/core/agentConfiguration/showInChat', 'Show in Chat') },
|
|
221
|
-
React.createElement("span", { className: 'toggle-label' }, core_1.nls.localize('theia/ai/core/agentConfiguration/showInChat', 'Show in Chat')),
|
|
222
|
-
React.createElement("div", { className: 'toggle-switch', onClick: enabled ? this.toggleShowInChat : undefined },
|
|
223
|
-
React.createElement("input", { type: "checkbox", checked: this.showInChatState, disabled: !enabled, onChange: this.toggleShowInChat }),
|
|
224
|
-
React.createElement("span", { className: 'toggle-slider' }))))))),
|
|
225
|
-
agent.description && (React.createElement("div", { className: "ai-agent-description" }, agent.description)),
|
|
226
|
-
agent.prompts.length > 0 && (React.createElement(React.Fragment, null,
|
|
227
|
-
React.createElement("div", { className: "settings-section-subcategory-title ai-settings-section-subcategory-title" }, core_1.nls.localize('theia/ai/core/agentConfiguration/promptTemplates', 'Prompt Templates')),
|
|
228
|
-
React.createElement("table", { className: "ai-templates-table" },
|
|
229
|
-
React.createElement("thead", null,
|
|
230
|
-
React.createElement("tr", null,
|
|
231
|
-
React.createElement("th", null, core_1.nls.localize('theia/ai/core/agentConfiguration/templateName', 'Template')),
|
|
232
|
-
React.createElement("th", null, core_1.nls.localize('theia/ai/core/agentConfiguration/variant', 'Variant')),
|
|
233
|
-
React.createElement("th", { className: "template-actions-header" }, core_1.nls.localizeByDefault('Actions')))),
|
|
234
|
-
React.createElement("tbody", null, agent.prompts.map(prompt => (React.createElement(template_settings_renderer_1.PromptVariantRenderer, { key: agent.id + '.' + prompt.id, agentId: agent.id, promptVariantSet: prompt, promptService: this.promptService }))))))),
|
|
235
|
-
React.createElement("div", { className: 'ai-lm-requirements' },
|
|
236
|
-
React.createElement(language_model_renderer_1.LanguageModelRenderer, { agent: agent, languageModels: this.languageModels, aiSettingsService: this.aiSettingsService, languageModelRegistry: this.languageModelRegistry, languageModelAliases: this.languageModelAliases })),
|
|
237
|
-
globalVariables.length > 0 && (React.createElement(React.Fragment, null,
|
|
238
|
-
React.createElement("div", { className: "settings-section-subcategory-title ai-settings-section-subcategory-title" }, core_1.nls.localize('theia/ai/core/agentConfiguration/usedGlobalVariables', 'Used Global Variables')),
|
|
239
|
-
React.createElement(AgentGlobalVariables, { variables: globalVariables, variableService: this.variableService }))),
|
|
240
|
-
this.parsedPromptParts.agentSpecificVariables.length > 0 && (React.createElement(React.Fragment, null,
|
|
241
|
-
React.createElement("div", { className: "settings-section-subcategory-title ai-settings-section-subcategory-title" }, core_1.nls.localize('theia/ai/core/agentConfiguration/usedAgentSpecificVariables', 'Used Agent-Specific Variables')),
|
|
242
|
-
React.createElement("ul", { className: 'variable-references' },
|
|
243
|
-
React.createElement(AgentSpecificVariables, { promptVariables: this.parsedPromptParts.agentSpecificVariables, agent: agent })))),
|
|
244
|
-
functions.length > 0 && (React.createElement(React.Fragment, null,
|
|
245
|
-
React.createElement("div", { className: "settings-section-subcategory-title ai-settings-section-subcategory-title" }, core_1.nls.localize('theia/ai/core/agentConfiguration/usedFunctions', 'Used Functions')),
|
|
246
|
-
React.createElement("ul", { className: 'function-references' },
|
|
247
|
-
React.createElement(AgentFunctions, { functions: functions })))),
|
|
248
|
-
this.parsedPromptParts.capabilities.length > 0 && (React.createElement(React.Fragment, null,
|
|
249
|
-
React.createElement("div", { className: "settings-section-subcategory-title" }, core_1.nls.localize('theia/ai/core/agentConfiguration/availableCapabilities', 'Available Capabilities')),
|
|
250
|
-
React.createElement(AgentCapabilitiesSettings, { capabilities: this.parsedPromptParts.capabilities, agentId: agent.id, savedOverrides: this.savedCapabilityOverrides, aiSettingsService: this.aiSettingsService, onSettingsChange: () => this.updateParsedPromptParts() }))),
|
|
251
|
-
common_1.GenericCapabilitySelections.hasSelections(this.savedGenericCapabilitySelections) && (React.createElement(React.Fragment, null,
|
|
252
|
-
React.createElement("div", { className: "settings-section-subcategory-title ai-settings-section-subcategory-title" }, core_1.nls.localize('theia/ai/ide/agentConfiguration/genericCapabilitiesSettings', 'Generic Capabilities')),
|
|
253
|
-
React.createElement(AgentGenericCapabilitiesSettings, { agentId: agent.id, savedSelections: this.savedGenericCapabilitySelections, aiSettingsService: this.aiSettingsService, onSettingsChange: () => this.updateParsedPromptParts() }))),
|
|
254
|
-
(0, common_2.isChatAgent)(agent) && (React.createElement(React.Fragment, null,
|
|
255
|
-
React.createElement("div", { className: "settings-section-subcategory-title ai-settings-section-subcategory-title" }, core_1.nls.localize('theia/ai/core/agentConfiguration/notificationSettings', 'Notification Settings')),
|
|
256
|
-
React.createElement(agent_notification_settings_1.AgentNotificationSettings, { agentId: agent.id, currentNotificationType: this.agentCompletionNotificationType, onNotificationTypeChange: this.handleNotificationTypeChange, onOpenNotificationSettings: this.openNotificationSettings }))));
|
|
257
|
-
}
|
|
258
|
-
async parsePromptFragmentsForVariableAndFunction(agent) {
|
|
259
|
-
const result = { functions: [], globalVariables: [], agentSpecificVariables: [], capabilities: [] };
|
|
260
|
-
const agentSettings = await this.aiSettingsService.getAgentSettings(agent.id);
|
|
261
|
-
const selectedVariants = agentSettings?.selectedVariants ?? {};
|
|
262
|
-
for (const mainTemplate of agent.prompts) {
|
|
263
|
-
const promptId = selectedVariants[mainTemplate.id] ?? mainTemplate.defaultVariant.id ?? mainTemplate.id;
|
|
264
|
-
const promptToAnalyze = this.promptService.getRawPromptFragment(promptId)?.template;
|
|
265
|
-
if (!promptToAnalyze) {
|
|
266
|
-
continue;
|
|
267
|
-
}
|
|
268
|
-
this.extractVariablesAndFunctions(promptToAnalyze, result, agent);
|
|
269
|
-
this.extractCapabilities(promptToAnalyze, result);
|
|
270
|
-
}
|
|
271
|
-
return result;
|
|
272
|
-
}
|
|
273
|
-
extractCapabilities(promptContent, result) {
|
|
274
|
-
const capabilities = (0, common_1.parseCapabilitiesFromTemplate)(promptContent);
|
|
275
|
-
const existingIds = new Set(result.capabilities.map(c => c.fragmentId));
|
|
276
|
-
for (const capability of capabilities) {
|
|
277
|
-
if (!existingIds.has(capability.fragmentId)) {
|
|
278
|
-
const fragment = this.promptService.getRawPromptFragment(capability.fragmentId);
|
|
279
|
-
result.capabilities.push({
|
|
280
|
-
...capability,
|
|
281
|
-
name: fragment?.name,
|
|
282
|
-
description: fragment?.description,
|
|
283
|
-
});
|
|
284
|
-
existingIds.add(capability.fragmentId);
|
|
285
|
-
}
|
|
286
|
-
}
|
|
287
|
-
}
|
|
288
|
-
extractVariablesAndFunctions(promptContent, result, agent) {
|
|
289
|
-
const variableMatches = (0, common_1.matchVariablesRegEx)(promptContent);
|
|
290
|
-
variableMatches.forEach(match => {
|
|
291
|
-
const variableId = match[1];
|
|
292
|
-
if (variableId.startsWith('!--') || variableId.startsWith('capability:')) {
|
|
293
|
-
return;
|
|
294
|
-
}
|
|
295
|
-
const baseVariableId = variableId.split(':')[0];
|
|
296
|
-
if (this.variableService.hasVariable(baseVariableId) &&
|
|
297
|
-
agent.agentSpecificVariables.find(v => v.name === baseVariableId) === undefined) {
|
|
298
|
-
result.globalVariables.push(variableId);
|
|
299
|
-
}
|
|
300
|
-
else {
|
|
301
|
-
result.agentSpecificVariables.push(variableId);
|
|
302
|
-
}
|
|
303
|
-
});
|
|
304
|
-
const functionMatches = [...promptContent.matchAll(common_1.PROMPT_FUNCTION_REGEX)];
|
|
305
|
-
functionMatches.forEach(match => {
|
|
306
|
-
const functionId = match[1];
|
|
307
|
-
result.functions.push(functionId);
|
|
308
|
-
});
|
|
309
|
-
}
|
|
310
|
-
showVariableConfigurationTab() {
|
|
311
|
-
this.aiConfigurationSelectionService.selectConfigurationTab(variable_configuration_widget_1.AIVariableConfigurationWidget.ID);
|
|
312
|
-
}
|
|
313
|
-
/**
|
|
314
|
-
* Selects the candidate creation locations from the reported agent locations. Only `agents/`
|
|
315
|
-
* directories are considered (legacy `customAgents.yml` entries exist for discovery only). A
|
|
316
|
-
* scope is offered when it already contains an `agents/` folder; the preferred scope (the first
|
|
317
|
-
* one, i.e. `.agents`) is always kept so a fresh workspace defaults to `.agents` without
|
|
318
|
-
* surfacing empty fallback folders such as `.prompts`.
|
|
319
|
-
*/
|
|
320
|
-
selectAgentScopeOptions(locations) {
|
|
321
|
-
return locations
|
|
322
|
-
.filter(location => location.kind === 'agents-dir')
|
|
323
|
-
.filter((location, index) => index === 0 || location.exists)
|
|
324
|
-
.map(location => ({ scopeDir: location.uri.parent, agentsDir: location.uri }));
|
|
325
|
-
}
|
|
326
|
-
async addCustomAgent() {
|
|
327
|
-
const allLocations = await this.promptFragmentCustomizationService.getCustomAgentsLocations();
|
|
328
|
-
const scopeOptions = this.selectAgentScopeOptions(allLocations);
|
|
329
|
-
if (scopeOptions.length === 0) {
|
|
330
|
-
this.messageService.warn(core_1.nls.localize('theia/ai/ide/agentConfiguration/newAgent/noLocation', 'Cannot create a custom agent: no prompt-templates location is configured. Set a global or workspace prompt-templates folder and try again.'));
|
|
331
|
-
return;
|
|
332
|
-
}
|
|
333
|
-
let chosen = scopeOptions[0];
|
|
334
|
-
if (scopeOptions.length > 1) {
|
|
335
|
-
chosen = await new Promise((resolve, reject) => {
|
|
336
|
-
const quickPick = this.quickInputService.createQuickPick();
|
|
337
|
-
quickPick.title = core_1.nls.localize('theia/ai/ide/agentConfiguration/customAgentLocationQuickPick/title', 'Select location for the new custom agent');
|
|
338
|
-
quickPick.placeholder = core_1.nls.localize('theia/ai/ide/agentConfiguration/customAgentLocationQuickPick/placeholder', 'Choose where to create the agents/<id>/agent.md file');
|
|
339
|
-
quickPick.items = scopeOptions.map(opt => ({
|
|
340
|
-
label: opt.scopeDir.path.toString(),
|
|
341
|
-
description: opt.agentsDir.path.toString(),
|
|
342
|
-
option: opt
|
|
343
|
-
}));
|
|
344
|
-
quickPick.onDidAccept(() => {
|
|
345
|
-
const selected = quickPick.selectedItems[0];
|
|
346
|
-
quickPick.dispose();
|
|
347
|
-
if (selected?.option) {
|
|
348
|
-
resolve(selected.option);
|
|
349
|
-
}
|
|
350
|
-
else {
|
|
351
|
-
reject(new Error('No location selected'));
|
|
352
|
-
}
|
|
353
|
-
});
|
|
354
|
-
quickPick.onDidHide(() => reject(new Error('Selection cancelled')));
|
|
355
|
-
quickPick.show();
|
|
356
|
-
}).catch(() => undefined) ?? scopeOptions[0];
|
|
357
|
-
}
|
|
358
|
-
const id = await this.quickInputService.input({
|
|
359
|
-
title: core_1.nls.localize('theia/ai/ide/agentConfiguration/newAgent/idTitle', 'New custom agent'),
|
|
360
|
-
prompt: core_1.nls.localize('theia/ai/ide/agentConfiguration/newAgent/idPrompt', 'Agent id (used as folder name under agents/)'),
|
|
361
|
-
placeHolder: 'my-agent',
|
|
362
|
-
validateInput: async (value) => /^[A-Za-z0-9._-]+$/.test(value)
|
|
363
|
-
? undefined
|
|
364
|
-
: core_1.nls.localize('theia/ai/ide/agentConfiguration/newAgent/idInvalid', 'Use letters, digits, dash, underscore, or dot only.')
|
|
365
|
-
});
|
|
366
|
-
if (!id) {
|
|
367
|
-
return;
|
|
368
|
-
}
|
|
369
|
-
try {
|
|
370
|
-
await this.promptFragmentCustomizationService.createCustomAgentFile(chosen.scopeDir, {
|
|
371
|
-
id,
|
|
372
|
-
name: id,
|
|
373
|
-
description: core_1.nls.localize('theia/ai/ide/agentConfiguration/newAgent/defaultDescription', 'Custom agent. Edit this description in agent.md.'),
|
|
374
|
-
prompt: core_1.nls.localize('theia/ai/ide/agentConfiguration/newAgent/defaultPrompt', 'You are a helpful agent. Adjust this prompt to fit your needs.'),
|
|
375
|
-
defaultLLM: 'default/universal',
|
|
376
|
-
showInChat: true
|
|
377
|
-
});
|
|
378
|
-
}
|
|
379
|
-
catch (error) {
|
|
380
|
-
this.messageService.error(core_1.nls.localize('theia/ai/ide/agentConfiguration/newAgent/createFailed', 'Could not create the custom agent "{0}": {1}', id, error instanceof Error ? error.message : String(error)));
|
|
381
|
-
}
|
|
382
|
-
}
|
|
383
|
-
};
|
|
384
|
-
exports.AIAgentConfigurationWidget = AIAgentConfigurationWidget;
|
|
385
|
-
tslib_1.__decorate([
|
|
386
|
-
(0, inversify_1.inject)(common_1.AgentService),
|
|
387
|
-
tslib_1.__metadata("design:type", Object)
|
|
388
|
-
], AIAgentConfigurationWidget.prototype, "agentService", void 0);
|
|
389
|
-
tslib_1.__decorate([
|
|
390
|
-
(0, inversify_1.inject)(common_1.LanguageModelRegistry),
|
|
391
|
-
tslib_1.__metadata("design:type", Object)
|
|
392
|
-
], AIAgentConfigurationWidget.prototype, "languageModelRegistry", void 0);
|
|
393
|
-
tslib_1.__decorate([
|
|
394
|
-
(0, inversify_1.inject)(common_1.PromptFragmentCustomizationService),
|
|
395
|
-
tslib_1.__metadata("design:type", Object)
|
|
396
|
-
], AIAgentConfigurationWidget.prototype, "promptFragmentCustomizationService", void 0);
|
|
397
|
-
tslib_1.__decorate([
|
|
398
|
-
(0, inversify_1.inject)(language_model_alias_1.LanguageModelAliasRegistry),
|
|
399
|
-
tslib_1.__metadata("design:type", Object)
|
|
400
|
-
], AIAgentConfigurationWidget.prototype, "languageModelAliasRegistry", void 0);
|
|
401
|
-
tslib_1.__decorate([
|
|
402
|
-
(0, inversify_1.inject)(common_1.AISettingsService),
|
|
403
|
-
tslib_1.__metadata("design:type", Object)
|
|
404
|
-
], AIAgentConfigurationWidget.prototype, "aiSettingsService", void 0);
|
|
405
|
-
tslib_1.__decorate([
|
|
406
|
-
(0, inversify_1.inject)(ai_configuration_service_1.AIConfigurationSelectionService),
|
|
407
|
-
tslib_1.__metadata("design:type", ai_configuration_service_1.AIConfigurationSelectionService)
|
|
408
|
-
], AIAgentConfigurationWidget.prototype, "aiConfigurationSelectionService", void 0);
|
|
409
|
-
tslib_1.__decorate([
|
|
410
|
-
(0, inversify_1.inject)(common_1.AIVariableService),
|
|
411
|
-
tslib_1.__metadata("design:type", Object)
|
|
412
|
-
], AIAgentConfigurationWidget.prototype, "variableService", void 0);
|
|
413
|
-
tslib_1.__decorate([
|
|
414
|
-
(0, inversify_1.inject)(common_1.PromptService),
|
|
415
|
-
tslib_1.__metadata("design:type", Object)
|
|
416
|
-
], AIAgentConfigurationWidget.prototype, "promptService", void 0);
|
|
417
|
-
tslib_1.__decorate([
|
|
418
|
-
(0, inversify_1.inject)(browser_1.QuickInputService),
|
|
419
|
-
tslib_1.__metadata("design:type", Object)
|
|
420
|
-
], AIAgentConfigurationWidget.prototype, "quickInputService", void 0);
|
|
421
|
-
tslib_1.__decorate([
|
|
422
|
-
(0, inversify_1.inject)(command_1.CommandService),
|
|
423
|
-
tslib_1.__metadata("design:type", Object)
|
|
424
|
-
], AIAgentConfigurationWidget.prototype, "commandService", void 0);
|
|
425
|
-
tslib_1.__decorate([
|
|
426
|
-
(0, inversify_1.inject)(core_1.MessageService),
|
|
427
|
-
tslib_1.__metadata("design:type", core_1.MessageService)
|
|
428
|
-
], AIAgentConfigurationWidget.prototype, "messageService", void 0);
|
|
429
|
-
tslib_1.__decorate([
|
|
430
|
-
(0, inversify_1.postConstruct)(),
|
|
431
|
-
tslib_1.__metadata("design:type", Function),
|
|
432
|
-
tslib_1.__metadata("design:paramtypes", []),
|
|
433
|
-
tslib_1.__metadata("design:returntype", void 0)
|
|
434
|
-
], AIAgentConfigurationWidget.prototype, "init", null);
|
|
435
|
-
exports.AIAgentConfigurationWidget = AIAgentConfigurationWidget = AIAgentConfigurationWidget_1 = tslib_1.__decorate([
|
|
436
|
-
(0, inversify_1.injectable)()
|
|
437
|
-
], AIAgentConfigurationWidget);
|
|
438
|
-
const AgentGlobalVariables = ({ variables: globalVariables, variableService }) => {
|
|
439
|
-
if (globalVariables.length === 0) {
|
|
440
|
-
return React.createElement("div", { className: "ai-empty-state-content" }, core_1.nls.localizeByDefault('None'));
|
|
441
|
-
}
|
|
442
|
-
const allVariables = variableService.getVariables();
|
|
443
|
-
const variableData = globalVariables.map(varId => {
|
|
444
|
-
const variable = allVariables.find(v => v.id === varId);
|
|
445
|
-
return {
|
|
446
|
-
id: varId,
|
|
447
|
-
name: variable?.name || varId,
|
|
448
|
-
description: variable?.description || ''
|
|
449
|
-
};
|
|
450
|
-
});
|
|
451
|
-
return (React.createElement("table", { className: "ai-templates-table" },
|
|
452
|
-
React.createElement("thead", null,
|
|
453
|
-
React.createElement("tr", null,
|
|
454
|
-
React.createElement("th", null, core_1.nls.localizeByDefault('Variable')),
|
|
455
|
-
React.createElement("th", null, core_1.nls.localizeByDefault('Description')))),
|
|
456
|
-
React.createElement("tbody", null, variableData.map(variable => (React.createElement("tr", { key: variable.id },
|
|
457
|
-
React.createElement("td", { className: "ai-variable-name-cell" }, variable.name),
|
|
458
|
-
React.createElement("td", { className: "ai-variable-description-cell" }, variable.description || core_1.nls.localize('theia/ai/ide/agentConfiguration/noDescription', 'No description available'))))))));
|
|
459
|
-
};
|
|
460
|
-
const AgentFunctions = ({ functions }) => {
|
|
461
|
-
if (functions.length === 0) {
|
|
462
|
-
return React.createElement(React.Fragment, null, core_1.nls.localizeByDefault('None'));
|
|
463
|
-
}
|
|
464
|
-
return React.createElement(React.Fragment, null, functions.map(functionId => React.createElement("li", { key: functionId, className: 'variable-reference' },
|
|
465
|
-
React.createElement("span", null, functionId))));
|
|
466
|
-
};
|
|
467
|
-
const AgentCapabilitiesSettings = ({ capabilities, agentId, savedOverrides, aiSettingsService, onSettingsChange }) => {
|
|
468
|
-
const [loading, setLoading] = React.useState(false);
|
|
469
|
-
const handleToggle = async (fragmentId, currentValue) => {
|
|
470
|
-
if (loading) {
|
|
471
|
-
return;
|
|
472
|
-
}
|
|
473
|
-
setLoading(true);
|
|
474
|
-
try {
|
|
475
|
-
const newValue = !currentValue;
|
|
476
|
-
const capability = capabilities.find(c => c.fragmentId === fragmentId);
|
|
477
|
-
if (!capability) {
|
|
478
|
-
return;
|
|
479
|
-
}
|
|
480
|
-
const newOverrides = { ...savedOverrides };
|
|
481
|
-
// If new value matches default, remove the override
|
|
482
|
-
if (newValue === capability.defaultEnabled) {
|
|
483
|
-
delete newOverrides[fragmentId];
|
|
484
|
-
}
|
|
485
|
-
else {
|
|
486
|
-
newOverrides[fragmentId] = newValue;
|
|
487
|
-
}
|
|
488
|
-
await aiSettingsService.updateAgentSettings(agentId, { capabilityOverrides: newOverrides });
|
|
489
|
-
onSettingsChange();
|
|
490
|
-
}
|
|
491
|
-
catch (error) {
|
|
492
|
-
console.error('Failed to update capability settings:', error);
|
|
493
|
-
}
|
|
494
|
-
finally {
|
|
495
|
-
setLoading(false);
|
|
496
|
-
}
|
|
497
|
-
};
|
|
498
|
-
const handleResetAll = async () => {
|
|
499
|
-
if (loading) {
|
|
500
|
-
return;
|
|
501
|
-
}
|
|
502
|
-
setLoading(true);
|
|
503
|
-
try {
|
|
504
|
-
await aiSettingsService.updateAgentSettings(agentId, { capabilityOverrides: undefined });
|
|
505
|
-
onSettingsChange();
|
|
506
|
-
}
|
|
507
|
-
catch (error) {
|
|
508
|
-
console.error('Failed to reset all capability settings:', error);
|
|
509
|
-
}
|
|
510
|
-
finally {
|
|
511
|
-
setLoading(false);
|
|
512
|
-
}
|
|
513
|
-
};
|
|
514
|
-
const getCurrentValue = (capability) => {
|
|
515
|
-
if (savedOverrides && capability.fragmentId in savedOverrides) {
|
|
516
|
-
return savedOverrides[capability.fragmentId];
|
|
517
|
-
}
|
|
518
|
-
return capability.defaultEnabled;
|
|
519
|
-
};
|
|
520
|
-
const hasOverride = (capability) => savedOverrides !== undefined && capability.fragmentId in savedOverrides;
|
|
521
|
-
const hasAnyOverrides = savedOverrides && Object.keys(savedOverrides).length > 0;
|
|
522
|
-
return (React.createElement(React.Fragment, null,
|
|
523
|
-
hasAnyOverrides && (React.createElement("div", { className: "capability-reset-all-container" },
|
|
524
|
-
React.createElement("button", { className: "theia-button secondary", onClick: handleResetAll, disabled: loading, title: core_1.nls.localize('theia/ai/ide/agentConfiguration/resetAllCapabilities', 'Reset all capabilities to their default values') }, core_1.nls.localize('theia/ai/ide/agentConfiguration/resetAllDefaults', 'Reset All to Defaults')))),
|
|
525
|
-
React.createElement("table", { className: "ai-templates-table" },
|
|
526
|
-
React.createElement("thead", null,
|
|
527
|
-
React.createElement("tr", null,
|
|
528
|
-
React.createElement("th", null, core_1.nls.localizeByDefault('ID')),
|
|
529
|
-
React.createElement("th", null, core_1.nls.localizeByDefault('Name')),
|
|
530
|
-
React.createElement("th", null, core_1.nls.localizeByDefault('Description')),
|
|
531
|
-
React.createElement("th", null, core_1.nls.localizeByDefault('Enabled')))),
|
|
532
|
-
React.createElement("tbody", null, capabilities.map(capability => (React.createElement("tr", { key: capability.fragmentId, className: hasOverride(capability) ? 'capability-modified' : '' },
|
|
533
|
-
React.createElement("td", { className: "ai-variable-name-cell" }, capability.fragmentId),
|
|
534
|
-
React.createElement("td", { className: "ai-variable-name-cell" }, capability.name ?? capability.fragmentId),
|
|
535
|
-
React.createElement("td", { className: "ai-variable-description-cell" }, capability.description ?? core_1.nls.localize('theia/ai/ide/agentConfiguration/noDescription', 'No description available')),
|
|
536
|
-
React.createElement("td", null,
|
|
537
|
-
React.createElement("div", { className: 'toggle-switch', onClick: !loading ? () => handleToggle(capability.fragmentId, getCurrentValue(capability)) : undefined },
|
|
538
|
-
React.createElement("input", { type: "checkbox", checked: getCurrentValue(capability), disabled: loading, readOnly: true }),
|
|
539
|
-
React.createElement("span", { className: 'toggle-slider' }))))))))));
|
|
540
|
-
};
|
|
541
|
-
const AgentSpecificVariables = ({ promptVariables, agent }) => {
|
|
542
|
-
const agentDefinedVariablesName = agent.agentSpecificVariables.map(v => v.name);
|
|
543
|
-
const variables = Array.from(new Set([...promptVariables, ...agentDefinedVariablesName]));
|
|
544
|
-
if (variables.length === 0) {
|
|
545
|
-
return React.createElement("div", { className: "ai-empty-state-content" }, core_1.nls.localizeByDefault('None'));
|
|
546
|
-
}
|
|
547
|
-
return React.createElement("div", null, variables.map(variableId => React.createElement(AgentSpecificVariable, { key: variableId, variableId: variableId, agent: agent, promptVariables: promptVariables })));
|
|
548
|
-
};
|
|
549
|
-
const AgentSpecificVariable = ({ variableId, agent, promptVariables }) => {
|
|
550
|
-
const agentDefinedVariable = agent.agentSpecificVariables.find(v => v.name === variableId);
|
|
551
|
-
const undeclared = agentDefinedVariable === undefined;
|
|
552
|
-
const notUsed = !promptVariables.includes(variableId) && agentDefinedVariable?.usedInPrompt === true;
|
|
553
|
-
return React.createElement("div", { key: variableId, className: "ai-agent-specific-variable-item" },
|
|
554
|
-
React.createElement("div", { className: "ai-configuration-value-row" },
|
|
555
|
-
React.createElement("span", { className: "ai-configuration-value-row-label" },
|
|
556
|
-
core_1.nls.localizeByDefault('Name'),
|
|
557
|
-
":"),
|
|
558
|
-
React.createElement("span", { className: "ai-configuration-value-row-value" }, variableId)),
|
|
559
|
-
undeclared ? (React.createElement("div", { className: "ai-configuration-value-row", title: core_1.nls.localize('theia/ai/core/agentConfiguration/undeclaredTooltip', 'This variable is used in the prompt but has no description declared by the agent.') },
|
|
560
|
-
React.createElement("span", { className: "ai-configuration-value-row-label" },
|
|
561
|
-
core_1.nls.localizeByDefault('Status'),
|
|
562
|
-
":"),
|
|
563
|
-
React.createElement("span", { className: "ai-configuration-value-row-value ai-configuration-warning-text" }, core_1.nls.localize('theia/ai/core/agentConfiguration/undeclared', 'Undeclared')))) : (React.createElement(React.Fragment, null,
|
|
564
|
-
React.createElement("div", { className: "ai-configuration-value-row" },
|
|
565
|
-
React.createElement("span", { className: "ai-configuration-value-row-label" },
|
|
566
|
-
core_1.nls.localizeByDefault('Description'),
|
|
567
|
-
":"),
|
|
568
|
-
React.createElement("span", { className: "ai-configuration-value-row-value" }, agentDefinedVariable.description)),
|
|
569
|
-
notUsed && (React.createElement("div", { className: "ai-configuration-value-row", title: core_1.nls.localize('theia/ai/core/agentConfiguration/notUsedInPromptTooltip', 'This variable is declared by the agent but not referenced in the current prompt template.') },
|
|
570
|
-
React.createElement("span", { className: "ai-configuration-value-row-label" },
|
|
571
|
-
core_1.nls.localizeByDefault('Status'),
|
|
572
|
-
":"),
|
|
573
|
-
React.createElement("span", { className: "ai-configuration-value-row-value ai-configuration-warning-text" }, core_1.nls.localize('theia/ai/core/agentConfiguration/notUsedInPrompt', 'Not used in prompt')))))));
|
|
574
|
-
};
|
|
575
|
-
const AgentGenericCapabilitiesSettings = ({ agentId, savedSelections, aiSettingsService, onSettingsChange }) => {
|
|
576
|
-
const [loading, setLoading] = React.useState(false);
|
|
577
|
-
const handleReset = async (capabilityType) => {
|
|
578
|
-
if (loading) {
|
|
579
|
-
return;
|
|
580
|
-
}
|
|
581
|
-
setLoading(true);
|
|
582
|
-
try {
|
|
583
|
-
const newSelections = {
|
|
584
|
-
...savedSelections,
|
|
585
|
-
[capabilityType]: undefined
|
|
586
|
-
};
|
|
587
|
-
await aiSettingsService.updateAgentSettings(agentId, { genericCapabilitySelections: newSelections });
|
|
588
|
-
onSettingsChange();
|
|
589
|
-
}
|
|
590
|
-
catch (error) {
|
|
591
|
-
console.error('Failed to reset generic capability selections:', error);
|
|
592
|
-
}
|
|
593
|
-
finally {
|
|
594
|
-
setLoading(false);
|
|
595
|
-
}
|
|
596
|
-
};
|
|
597
|
-
const capabilityTypes = common_1.CAPABILITY_TYPE_PROMPT_MAP.map(m => m.type);
|
|
598
|
-
const getDisplayName = (type) => ({
|
|
599
|
-
skills: core_1.nls.localizeByDefault('Skills'),
|
|
600
|
-
mcpFunctions: core_1.nls.localize('theia/ai/ide/agentConfiguration/genericCapabilityType/mcpFunctions', 'MCP Functions'),
|
|
601
|
-
functions: core_1.nls.localize('theia/ai/ide/agentConfiguration/genericCapabilityType/functions', 'Functions'),
|
|
602
|
-
promptFragments: core_1.nls.localize('theia/ai/ide/agentConfiguration/genericCapabilityType/promptFragments', 'Prompt Fragments'),
|
|
603
|
-
agentDelegation: core_1.nls.localize('theia/ai/ide/agentConfiguration/genericCapabilityType/agentDelegation', 'Agent Delegation'),
|
|
604
|
-
variables: core_1.nls.localizeByDefault('Variables')
|
|
605
|
-
}[type]);
|
|
606
|
-
return (React.createElement("table", { className: "ai-templates-table" },
|
|
607
|
-
React.createElement("thead", null,
|
|
608
|
-
React.createElement("tr", null,
|
|
609
|
-
React.createElement("th", null, core_1.nls.localizeByDefault('Type')),
|
|
610
|
-
React.createElement("th", null, core_1.nls.localize('theia/ai/ide/agentConfiguration/selections', 'Selections')),
|
|
611
|
-
React.createElement("th", { className: "template-actions-header" }, core_1.nls.localizeByDefault('Actions')))),
|
|
612
|
-
React.createElement("tbody", null, capabilityTypes
|
|
613
|
-
.filter(type => (savedSelections?.[type]?.length ?? 0) > 0)
|
|
614
|
-
.map(type => (React.createElement("tr", { key: type },
|
|
615
|
-
React.createElement("td", { className: "ai-variable-name-cell" }, getDisplayName(type)),
|
|
616
|
-
React.createElement("td", { className: "ai-variable-description-cell" }, (savedSelections?.[type] ?? []).join(', ')),
|
|
617
|
-
React.createElement("td", { className: "template-actions-cell" },
|
|
618
|
-
React.createElement("button", { className: "theia-button secondary", onClick: () => handleReset(type), disabled: loading, title: core_1.nls.localizeByDefault('Reset') }, core_1.nls.localizeByDefault('Reset')))))))));
|
|
619
|
-
};
|
|
620
|
-
//# sourceMappingURL=agent-configuration-widget.js.map
|