@theia/ai-ide 1.67.0-next.56 → 1.67.0-next.86
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/address-pr-review-command-contribution.d.ts +9 -0
- package/lib/browser/address-pr-review-command-contribution.d.ts.map +1 -0
- package/lib/browser/address-pr-review-command-contribution.js +176 -0
- package/lib/browser/address-pr-review-command-contribution.js.map +1 -0
- package/lib/browser/ai-configuration/agent-configuration-widget.d.ts +47 -0
- package/lib/browser/ai-configuration/agent-configuration-widget.d.ts.map +1 -0
- package/lib/browser/ai-configuration/agent-configuration-widget.js +385 -0
- package/lib/browser/ai-configuration/agent-configuration-widget.js.map +1 -0
- package/lib/browser/ai-configuration/ai-configuration-service.d.ts +18 -0
- package/lib/browser/ai-configuration/ai-configuration-service.d.ts.map +1 -0
- package/lib/browser/ai-configuration/ai-configuration-service.js +53 -0
- package/lib/browser/ai-configuration/ai-configuration-service.js.map +1 -0
- package/lib/browser/ai-configuration/ai-configuration-view-contribution.d.ts +14 -0
- package/lib/browser/ai-configuration/ai-configuration-view-contribution.d.ts.map +1 -0
- package/lib/browser/ai-configuration/ai-configuration-view-contribution.js +67 -0
- package/lib/browser/ai-configuration/ai-configuration-view-contribution.js.map +1 -0
- package/lib/browser/ai-configuration/ai-configuration-widget.d.ts +29 -0
- package/lib/browser/ai-configuration/ai-configuration-widget.d.ts.map +1 -0
- package/lib/browser/ai-configuration/ai-configuration-widget.js +118 -0
- package/lib/browser/ai-configuration/ai-configuration-widget.js.map +1 -0
- package/lib/browser/ai-configuration/base/ai-card-grid-configuration-widget.d.ts +32 -0
- package/lib/browser/ai-configuration/base/ai-card-grid-configuration-widget.d.ts.map +1 -0
- package/lib/browser/ai-configuration/base/ai-card-grid-configuration-widget.js +55 -0
- package/lib/browser/ai-configuration/base/ai-card-grid-configuration-widget.js.map +1 -0
- package/lib/browser/ai-configuration/base/ai-configuration-base-widget.d.ts +14 -0
- package/lib/browser/ai-configuration/base/ai-configuration-base-widget.d.ts.map +1 -0
- package/lib/browser/ai-configuration/base/ai-configuration-base-widget.js +35 -0
- package/lib/browser/ai-configuration/base/ai-configuration-base-widget.js.map +1 -0
- package/lib/browser/ai-configuration/base/ai-hierarchical-configuration-widget.d.ts +23 -0
- package/lib/browser/ai-configuration/base/ai-hierarchical-configuration-widget.d.ts.map +1 -0
- package/lib/browser/ai-configuration/base/ai-hierarchical-configuration-widget.js +60 -0
- package/lib/browser/ai-configuration/base/ai-hierarchical-configuration-widget.js.map +1 -0
- package/lib/browser/ai-configuration/base/ai-list-detail-configuration-widget.d.ts +56 -0
- package/lib/browser/ai-configuration/base/ai-list-detail-configuration-widget.d.ts.map +1 -0
- package/lib/browser/ai-configuration/base/ai-list-detail-configuration-widget.js +96 -0
- package/lib/browser/ai-configuration/base/ai-list-detail-configuration-widget.js.map +1 -0
- package/lib/browser/ai-configuration/base/ai-table-configuration-widget.d.ts +45 -0
- package/lib/browser/ai-configuration/base/ai-table-configuration-widget.d.ts.map +1 -0
- package/lib/browser/ai-configuration/base/ai-table-configuration-widget.js +66 -0
- package/lib/browser/ai-configuration/base/ai-table-configuration-widget.js.map +1 -0
- package/lib/browser/ai-configuration/components/configuration-section.d.ts +13 -0
- package/lib/browser/ai-configuration/components/configuration-section.d.ts.map +1 -0
- package/lib/browser/ai-configuration/components/configuration-section.js +28 -0
- package/lib/browser/ai-configuration/components/configuration-section.js.map +1 -0
- package/lib/browser/ai-configuration/components/empty-state.d.ts +11 -0
- package/lib/browser/ai-configuration/components/empty-state.d.ts.map +1 -0
- package/lib/browser/ai-configuration/components/empty-state.js +26 -0
- package/lib/browser/ai-configuration/components/empty-state.js.map +1 -0
- package/lib/browser/ai-configuration/components/expandable-section.d.ts +14 -0
- package/lib/browser/ai-configuration/components/expandable-section.d.ts.map +1 -0
- package/lib/browser/ai-configuration/components/expandable-section.js +31 -0
- package/lib/browser/ai-configuration/components/expandable-section.js.map +1 -0
- package/lib/browser/ai-configuration/language-model-renderer.d.ts +13 -0
- package/lib/browser/ai-configuration/language-model-renderer.d.ts.map +1 -0
- package/lib/browser/ai-configuration/language-model-renderer.js +105 -0
- package/lib/browser/ai-configuration/language-model-renderer.js.map +1 -0
- package/lib/browser/ai-configuration/mcp-configuration-widget.d.ts +42 -0
- package/lib/browser/ai-configuration/mcp-configuration-widget.d.ts.map +1 -0
- package/lib/browser/ai-configuration/mcp-configuration-widget.js +308 -0
- package/lib/browser/ai-configuration/mcp-configuration-widget.js.map +1 -0
- package/lib/browser/ai-configuration/model-aliases-configuration-widget.d.ts +27 -0
- package/lib/browser/ai-configuration/model-aliases-configuration-widget.d.ts.map +1 -0
- package/lib/browser/ai-configuration/model-aliases-configuration-widget.js +197 -0
- package/lib/browser/ai-configuration/model-aliases-configuration-widget.js.map +1 -0
- package/lib/browser/ai-configuration/prompt-fragments-configuration-widget.d.ts +141 -0
- package/lib/browser/ai-configuration/prompt-fragments-configuration-widget.d.ts.map +1 -0
- package/lib/browser/ai-configuration/prompt-fragments-configuration-widget.js +508 -0
- package/lib/browser/ai-configuration/prompt-fragments-configuration-widget.js.map +1 -0
- package/lib/browser/ai-configuration/template-settings-renderer.d.ts +10 -0
- package/lib/browser/ai-configuration/template-settings-renderer.d.ts.map +1 -0
- package/lib/browser/ai-configuration/template-settings-renderer.js +48 -0
- package/lib/browser/ai-configuration/template-settings-renderer.js.map +1 -0
- package/lib/browser/ai-configuration/token-usage-configuration-widget.d.ts +21 -0
- package/lib/browser/ai-configuration/token-usage-configuration-widget.d.ts.map +1 -0
- package/lib/browser/ai-configuration/token-usage-configuration-widget.js +170 -0
- package/lib/browser/ai-configuration/token-usage-configuration-widget.js.map +1 -0
- package/lib/browser/ai-configuration/tools-configuration-widget.d.ts +35 -0
- package/lib/browser/ai-configuration/tools-configuration-widget.d.ts.map +1 -0
- package/lib/browser/ai-configuration/tools-configuration-widget.js +158 -0
- package/lib/browser/ai-configuration/tools-configuration-widget.js.map +1 -0
- package/lib/browser/ai-configuration/variable-configuration-widget.d.ts +23 -0
- package/lib/browser/ai-configuration/variable-configuration-widget.d.ts.map +1 -0
- package/lib/browser/ai-configuration/variable-configuration-widget.js +132 -0
- package/lib/browser/ai-configuration/variable-configuration-widget.js.map +1 -0
- package/lib/browser/ai-ide-activation-service.d.ts +18 -0
- package/lib/browser/ai-ide-activation-service.d.ts.map +1 -0
- package/lib/browser/ai-ide-activation-service.js +71 -0
- package/lib/browser/ai-ide-activation-service.js.map +1 -0
- package/lib/browser/ai-terminal-functions.d.ts +13 -0
- package/lib/browser/ai-terminal-functions.d.ts.map +1 -0
- package/lib/browser/ai-terminal-functions.js +114 -0
- package/lib/browser/ai-terminal-functions.js.map +1 -0
- package/lib/browser/analyze-gh-ticket-command-contribution.d.ts +9 -0
- package/lib/browser/analyze-gh-ticket-command-contribution.d.ts.map +1 -0
- package/lib/browser/analyze-gh-ticket-command-contribution.js +172 -0
- package/lib/browser/analyze-gh-ticket-command-contribution.js.map +1 -0
- package/lib/browser/app-tester-chat-agent.d.ts +35 -0
- package/lib/browser/app-tester-chat-agent.d.ts.map +1 -0
- package/lib/browser/app-tester-chat-agent.js +142 -0
- package/lib/browser/app-tester-chat-agent.js.map +1 -0
- package/lib/browser/app-tester-chat-functions.d.ts +25 -0
- package/lib/browser/app-tester-chat-functions.d.ts.map +1 -0
- package/lib/browser/app-tester-chat-functions.js +170 -0
- package/lib/browser/app-tester-chat-functions.js.map +1 -0
- package/lib/browser/app-tester-prompt-template.d.ts +6 -0
- package/lib/browser/app-tester-prompt-template.d.ts.map +1 -0
- package/lib/browser/app-tester-prompt-template.js +83 -0
- package/lib/browser/app-tester-prompt-template.js.map +1 -0
- package/lib/browser/architect-agent.d.ts +15 -0
- package/lib/browser/architect-agent.d.ts.map +1 -0
- package/lib/browser/architect-agent.js +68 -0
- package/lib/browser/architect-agent.js.map +1 -0
- package/lib/browser/coder-agent.d.ts +15 -0
- package/lib/browser/coder-agent.d.ts.map +1 -0
- package/lib/browser/coder-agent.js +81 -0
- package/lib/browser/coder-agent.js.map +1 -0
- package/lib/browser/context-file-validation-service-impl.d.ts +13 -0
- package/lib/browser/context-file-validation-service-impl.d.ts.map +1 -0
- package/lib/browser/context-file-validation-service-impl.js +123 -0
- package/lib/browser/context-file-validation-service-impl.js.map +1 -0
- package/lib/browser/context-file-validation-service-impl.spec.d.ts +2 -0
- package/lib/browser/context-file-validation-service-impl.spec.d.ts.map +1 -0
- package/lib/browser/context-file-validation-service-impl.spec.js +340 -0
- package/lib/browser/context-file-validation-service-impl.spec.js.map +1 -0
- package/lib/browser/context-functions.d.ts +16 -0
- package/lib/browser/context-functions.d.ts.map +1 -0
- package/lib/browser/context-functions.js +166 -0
- package/lib/browser/context-functions.js.map +1 -0
- package/lib/browser/context-functions.spec.d.ts +2 -0
- package/lib/browser/context-functions.spec.d.ts.map +1 -0
- package/lib/browser/context-functions.spec.js +213 -0
- package/lib/browser/context-functions.spec.js.map +1 -0
- package/lib/browser/file-changeset-function.spec.d.ts +2 -0
- package/lib/browser/file-changeset-function.spec.d.ts.map +1 -0
- package/lib/browser/file-changeset-function.spec.js +45 -0
- package/lib/browser/file-changeset-function.spec.js.map +1 -0
- package/lib/browser/file-changeset-functions.d.ts +87 -0
- package/lib/browser/file-changeset-functions.d.ts.map +1 -0
- package/lib/browser/file-changeset-functions.js +645 -0
- package/lib/browser/file-changeset-functions.js.map +1 -0
- package/lib/browser/file-changeset-functions.spec.d.ts +2 -0
- package/lib/browser/file-changeset-functions.spec.d.ts.map +1 -0
- package/lib/browser/file-changeset-functions.spec.js +179 -0
- package/lib/browser/file-changeset-functions.spec.js.map +1 -0
- package/lib/browser/frontend-module.d.ts +5 -0
- package/lib/browser/frontend-module.d.ts.map +1 -0
- package/lib/browser/frontend-module.js +226 -0
- package/lib/browser/frontend-module.js.map +1 -0
- package/lib/browser/github-chat-agent.d.ts +48 -0
- package/lib/browser/github-chat-agent.d.ts.map +1 -0
- package/lib/browser/github-chat-agent.js +222 -0
- package/lib/browser/github-chat-agent.js.map +1 -0
- package/lib/browser/github-prompt-template.d.ts +6 -0
- package/lib/browser/github-prompt-template.d.ts.map +1 -0
- package/lib/browser/github-prompt-template.js +53 -0
- package/lib/browser/github-prompt-template.js.map +1 -0
- package/lib/browser/github-repo-variable-contribution.d.ts +15 -0
- package/lib/browser/github-repo-variable-contribution.d.ts.map +1 -0
- package/lib/browser/github-repo-variable-contribution.js +82 -0
- package/lib/browser/github-repo-variable-contribution.js.map +1 -0
- package/lib/browser/ide-chat-welcome-message-provider.d.ts +10 -0
- package/lib/browser/ide-chat-welcome-message-provider.d.ts.map +1 -0
- package/lib/browser/ide-chat-welcome-message-provider.js +102 -0
- package/lib/browser/ide-chat-welcome-message-provider.js.map +1 -0
- package/lib/browser/implement-gh-ticket-command-contribution.d.ts +9 -0
- package/lib/browser/implement-gh-ticket-command-contribution.d.ts.map +1 -0
- package/lib/browser/implement-gh-ticket-command-contribution.js +156 -0
- package/lib/browser/implement-gh-ticket-command-contribution.js.map +1 -0
- package/lib/browser/project-info-agent.d.ts +13 -0
- package/lib/browser/project-info-agent.d.ts.map +1 -0
- package/lib/browser/project-info-agent.js +45 -0
- package/lib/browser/project-info-agent.js.map +1 -0
- package/lib/browser/remember-command-contribution.d.ts +16 -0
- package/lib/browser/remember-command-contribution.d.ts.map +1 -0
- package/lib/browser/remember-command-contribution.js +101 -0
- package/lib/browser/remember-command-contribution.js.map +1 -0
- package/lib/browser/summarize-session-command-contribution.d.ts +19 -0
- package/lib/browser/summarize-session-command-contribution.d.ts.map +1 -0
- package/lib/browser/summarize-session-command-contribution.js +118 -0
- package/lib/browser/summarize-session-command-contribution.js.map +1 -0
- package/lib/browser/task-background-summary-variable.d.ts +9 -0
- package/lib/browser/task-background-summary-variable.d.ts.map +1 -0
- package/lib/browser/task-background-summary-variable.js +60 -0
- package/lib/browser/task-background-summary-variable.js.map +1 -0
- package/lib/browser/task-context-agent.d.ts +13 -0
- package/lib/browser/task-context-agent.d.ts.map +1 -0
- package/lib/browser/task-context-agent.js +45 -0
- package/lib/browser/task-context-agent.js.map +1 -0
- package/lib/browser/task-context-file-storage-service.d.ts +40 -0
- package/lib/browser/task-context-file-storage-service.d.ts.map +1 -0
- package/lib/browser/task-context-file-storage-service.js +232 -0
- package/lib/browser/task-context-file-storage-service.js.map +1 -0
- package/lib/browser/template-preference-contribution.d.ts +17 -0
- package/lib/browser/template-preference-contribution.d.ts.map +1 -0
- package/lib/browser/template-preference-contribution.js +94 -0
- package/lib/browser/template-preference-contribution.js.map +1 -0
- package/lib/browser/test/tool-provider-cancellation-test-util.spec.d.ts +2 -0
- package/lib/browser/test/tool-provider-cancellation-test-util.spec.d.ts.map +1 -0
- package/lib/browser/test/tool-provider-cancellation-test-util.spec.js +52 -0
- package/lib/browser/test/tool-provider-cancellation-test-util.spec.js.map +1 -0
- package/lib/browser/workspace-functions.d.ts +78 -0
- package/lib/browser/workspace-functions.d.ts.map +1 -0
- package/lib/browser/workspace-functions.js +697 -0
- package/lib/browser/workspace-functions.js.map +1 -0
- package/lib/browser/workspace-functions.spec.d.ts +2 -0
- package/lib/browser/workspace-functions.spec.d.ts.map +1 -0
- package/lib/browser/workspace-functions.spec.js +161 -0
- package/lib/browser/workspace-functions.spec.js.map +1 -0
- package/lib/browser/workspace-launch-provider.d.ts +24 -0
- package/lib/browser/workspace-launch-provider.d.ts.map +1 -0
- package/lib/browser/workspace-launch-provider.js +216 -0
- package/lib/browser/workspace-launch-provider.js.map +1 -0
- package/lib/browser/workspace-launch-provider.spec.d.ts +2 -0
- package/lib/browser/workspace-launch-provider.spec.d.ts.map +1 -0
- package/lib/browser/workspace-launch-provider.spec.js +245 -0
- package/lib/browser/workspace-launch-provider.spec.js.map +1 -0
- package/lib/browser/workspace-search-provider.d.ts +15 -0
- package/lib/browser/workspace-search-provider.d.ts.map +1 -0
- package/lib/browser/workspace-search-provider.js +204 -0
- package/lib/browser/workspace-search-provider.js.map +1 -0
- package/lib/browser/workspace-search-provider.spec.d.ts +2 -0
- package/lib/browser/workspace-search-provider.spec.d.ts.map +1 -0
- package/lib/browser/workspace-search-provider.spec.js +82 -0
- package/lib/browser/workspace-search-provider.spec.js.map +1 -0
- package/lib/browser/workspace-task-provider.d.ts +15 -0
- package/lib/browser/workspace-task-provider.d.ts.map +1 -0
- package/lib/browser/workspace-task-provider.js +138 -0
- package/lib/browser/workspace-task-provider.js.map +1 -0
- package/lib/browser/workspace-task-provider.spec.d.ts +2 -0
- package/lib/browser/workspace-task-provider.spec.d.ts.map +1 -0
- package/lib/browser/workspace-task-provider.spec.js +109 -0
- package/lib/browser/workspace-task-provider.spec.js.map +1 -0
- package/lib/common/ai-configuration-preferences.d.ts +8 -0
- package/lib/common/ai-configuration-preferences.d.ts.map +1 -0
- package/lib/common/ai-configuration-preferences.js +41 -0
- package/lib/common/ai-configuration-preferences.js.map +1 -0
- package/lib/common/ai-ide-preferences.d.ts +5 -0
- package/lib/common/ai-ide-preferences.d.ts.map +1 -0
- package/lib/common/ai-ide-preferences.js +53 -0
- package/lib/common/ai-ide-preferences.js.map +1 -0
- package/lib/common/ai-terminal-functions.d.ts +2 -0
- package/lib/common/ai-terminal-functions.d.ts.map +1 -0
- package/lib/common/ai-terminal-functions.js +20 -0
- package/lib/common/ai-terminal-functions.js.map +1 -0
- package/lib/common/app-tester-chat-functions.d.ts +5 -0
- package/lib/common/app-tester-chat-functions.d.ts.map +1 -0
- package/lib/common/app-tester-chat-functions.js +23 -0
- package/lib/common/app-tester-chat-functions.js.map +1 -0
- package/lib/common/architect-prompt-template.d.ts +3 -0
- package/lib/common/architect-prompt-template.d.ts.map +1 -0
- package/lib/common/architect-prompt-template.js +81 -0
- package/lib/common/architect-prompt-template.js.map +1 -0
- package/lib/common/browser-automation-protocol.d.ts +15 -0
- package/lib/common/browser-automation-protocol.d.ts.map +1 -0
- package/lib/common/browser-automation-protocol.js +22 -0
- package/lib/common/browser-automation-protocol.js.map +1 -0
- package/lib/common/coder-replace-prompt-template.d.ts +11 -0
- package/lib/common/coder-replace-prompt-template.d.ts.map +1 -0
- package/lib/common/coder-replace-prompt-template.js +296 -0
- package/lib/common/coder-replace-prompt-template.js.map +1 -0
- package/lib/common/command-chat-agents.d.ts +36 -0
- package/lib/common/command-chat-agents.d.ts.map +1 -0
- package/lib/common/command-chat-agents.js +122 -0
- package/lib/common/command-chat-agents.js.map +1 -0
- package/lib/common/command-prompt-template.d.ts +3 -0
- package/lib/common/command-prompt-template.d.ts.map +1 -0
- package/lib/common/command-prompt-template.js +226 -0
- package/lib/common/command-prompt-template.js.map +1 -0
- package/lib/common/context-files-variable.d.ts +9 -0
- package/lib/common/context-files-variable.d.ts.map +1 -0
- package/lib/common/context-files-variable.js +52 -0
- package/lib/common/context-files-variable.js.map +1 -0
- package/lib/common/context-functions.d.ts +4 -0
- package/lib/common/context-functions.d.ts.map +1 -0
- package/lib/common/context-functions.js +22 -0
- package/lib/common/context-functions.js.map +1 -0
- package/lib/common/context-variables.d.ts +3 -0
- package/lib/common/context-variables.d.ts.map +1 -0
- package/lib/common/context-variables.js +21 -0
- package/lib/common/context-variables.js.map +1 -0
- package/lib/common/file-changeset-function-ids.d.ts +19 -0
- package/lib/common/file-changeset-function-ids.d.ts.map +1 -0
- package/lib/common/file-changeset-function-ids.js +37 -0
- package/lib/common/file-changeset-function-ids.js.map +1 -0
- package/lib/common/github-repo-protocol.d.ts +15 -0
- package/lib/common/github-repo-protocol.d.ts.map +1 -0
- package/lib/common/github-repo-protocol.js +21 -0
- package/lib/common/github-repo-protocol.js.map +1 -0
- package/lib/common/orchestrator-chat-agent.d.ts +36 -0
- package/lib/common/orchestrator-chat-agent.d.ts.map +1 -0
- package/lib/common/orchestrator-chat-agent.js +167 -0
- package/lib/common/orchestrator-chat-agent.js.map +1 -0
- package/lib/common/orchestrator-prompt-template.d.ts +3 -0
- package/lib/common/orchestrator-prompt-template.d.ts.map +1 -0
- package/lib/common/orchestrator-prompt-template.js +55 -0
- package/lib/common/orchestrator-prompt-template.js.map +1 -0
- package/lib/common/project-info-prompt-template.d.ts +6 -0
- package/lib/common/project-info-prompt-template.d.ts.map +1 -0
- package/lib/common/project-info-prompt-template.js +145 -0
- package/lib/common/project-info-prompt-template.js.map +1 -0
- package/lib/common/summarize-session-commands.d.ts +4 -0
- package/lib/common/summarize-session-commands.d.ts.map +1 -0
- package/lib/common/summarize-session-commands.js +28 -0
- package/lib/common/summarize-session-commands.js.map +1 -0
- package/lib/common/task-context-prompt-template.d.ts +8 -0
- package/lib/common/task-context-prompt-template.d.ts.map +1 -0
- package/lib/common/task-context-prompt-template.js +217 -0
- package/lib/common/task-context-prompt-template.js.map +1 -0
- package/lib/common/universal-chat-agent.d.ts +17 -0
- package/lib/common/universal-chat-agent.d.ts.map +1 -0
- package/lib/common/universal-chat-agent.js +47 -0
- package/lib/common/universal-chat-agent.js.map +1 -0
- package/lib/common/universal-prompt-template.d.ts +4 -0
- package/lib/common/universal-prompt-template.d.ts.map +1 -0
- package/lib/common/universal-prompt-template.js +32 -0
- package/lib/common/universal-prompt-template.js.map +1 -0
- package/lib/common/workspace-functions.d.ts +12 -0
- package/lib/common/workspace-functions.d.ts.map +1 -0
- package/lib/common/workspace-functions.js +30 -0
- package/lib/common/workspace-functions.js.map +1 -0
- package/lib/common/workspace-preferences.d.ts +10 -0
- package/lib/common/workspace-preferences.d.ts.map +1 -0
- package/lib/common/workspace-preferences.js +89 -0
- package/lib/common/workspace-preferences.js.map +1 -0
- package/lib/common/workspace-search-provider-util.d.ts +17 -0
- package/lib/common/workspace-search-provider-util.d.ts.map +1 -0
- package/lib/common/workspace-search-provider-util.js +51 -0
- package/lib/common/workspace-search-provider-util.js.map +1 -0
- package/lib/node/app-tester-agent/browser-automation-impl.d.ts +18 -0
- package/lib/node/app-tester-agent/browser-automation-impl.d.ts.map +1 -0
- package/lib/node/app-tester-agent/browser-automation-impl.js +96 -0
- package/lib/node/app-tester-agent/browser-automation-impl.js.map +1 -0
- package/lib/node/backend-module.d.ts +4 -0
- package/lib/node/backend-module.d.ts.map +1 -0
- package/lib/node/backend-module.js +45 -0
- package/lib/node/backend-module.js.map +1 -0
- package/lib/node/github-repo-service-impl.d.ts +7 -0
- package/lib/node/github-repo-service-impl.d.ts.map +1 -0
- package/lib/node/github-repo-service-impl.js +86 -0
- package/lib/node/github-repo-service-impl.js.map +1 -0
- package/lib/package.spec.d.ts +1 -0
- package/lib/package.spec.d.ts.map +1 -0
- package/lib/package.spec.js +26 -0
- package/lib/package.spec.js.map +1 -0
- package/package.json +21 -21
- package/src/browser/address-pr-review-command-contribution.ts +180 -0
- package/src/browser/ai-configuration/agent-configuration-widget.tsx +256 -135
- package/src/browser/ai-configuration/base/ai-card-grid-configuration-widget.tsx +72 -0
- package/src/browser/ai-configuration/base/ai-configuration-base-widget.tsx +37 -0
- package/src/browser/ai-configuration/base/ai-hierarchical-configuration-widget.tsx +51 -0
- package/src/browser/ai-configuration/base/ai-list-detail-configuration-widget.tsx +140 -0
- package/src/browser/ai-configuration/base/ai-table-configuration-widget.tsx +107 -0
- package/src/browser/ai-configuration/components/configuration-section.tsx +37 -0
- package/src/browser/ai-configuration/components/empty-state.tsx +30 -0
- package/src/browser/ai-configuration/components/expandable-section.tsx +51 -0
- package/src/browser/ai-configuration/language-model-renderer.tsx +68 -63
- package/src/browser/ai-configuration/mcp-configuration-widget.tsx +80 -85
- package/src/browser/ai-configuration/model-aliases-configuration-widget.tsx +93 -107
- package/src/browser/ai-configuration/template-settings-renderer.tsx +25 -29
- package/src/browser/ai-configuration/token-usage-configuration-widget.tsx +130 -130
- package/src/browser/ai-configuration/tools-configuration-widget.tsx +68 -59
- package/src/browser/ai-configuration/variable-configuration-widget.tsx +95 -45
- package/src/browser/analyze-gh-ticket-command-contribution.ts +176 -0
- package/src/browser/frontend-module.ts +6 -0
- package/src/browser/implement-gh-ticket-command-contribution.ts +160 -0
- package/src/browser/style/ai-configuration-base.css +90 -0
- package/src/browser/style/ai-configuration-cards.css +60 -0
- package/src/browser/style/ai-configuration-hierarchical.css +61 -0
- package/src/browser/style/ai-configuration-list-detail.css +88 -0
- package/src/browser/style/ai-configuration-table.css +73 -0
- package/src/browser/style/index.css +458 -288
- package/src/browser/style/widgets/mcp-configuration.css +253 -0
- package/src/browser/style/widgets/model-aliases-configuration.css +74 -0
|
@@ -0,0 +1,45 @@
|
|
|
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 TaskContextAgent_1;
|
|
18
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
+
exports.TaskContextAgent = void 0;
|
|
20
|
+
const tslib_1 = require("tslib");
|
|
21
|
+
const core_1 = require("@theia/core");
|
|
22
|
+
const inversify_1 = require("@theia/core/shared/inversify");
|
|
23
|
+
const task_context_prompt_template_1 = require("../common/task-context-prompt-template");
|
|
24
|
+
let TaskContextAgent = TaskContextAgent_1 = class TaskContextAgent {
|
|
25
|
+
constructor() {
|
|
26
|
+
this.id = TaskContextAgent_1.ID;
|
|
27
|
+
this.name = 'TaskContext';
|
|
28
|
+
this.description = core_1.nls.localize('theia/ai/taskcontext/taskContextAgent/description', 'An AI assistant that analyzes chat sessions and creates structured task summaries for coding tasks. ' +
|
|
29
|
+
'This agent specializes in extracting key information from conversations and formatting them into comprehensive task context documents that can be used by other agents.');
|
|
30
|
+
this.variables = [];
|
|
31
|
+
this.prompts = [task_context_prompt_template_1.taskContextSystemVariants, task_context_prompt_template_1.taskContextTemplateVariants, task_context_prompt_template_1.taskContextUpdateVariants];
|
|
32
|
+
this.languageModelRequirements = [{
|
|
33
|
+
purpose: 'TaskContext Creation/Update',
|
|
34
|
+
identifier: 'default/code',
|
|
35
|
+
}];
|
|
36
|
+
this.agentSpecificVariables = [];
|
|
37
|
+
this.functions = [];
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
exports.TaskContextAgent = TaskContextAgent;
|
|
41
|
+
TaskContextAgent.ID = 'TaskContext';
|
|
42
|
+
exports.TaskContextAgent = TaskContextAgent = TaskContextAgent_1 = tslib_1.__decorate([
|
|
43
|
+
(0, inversify_1.injectable)()
|
|
44
|
+
], TaskContextAgent);
|
|
45
|
+
//# sourceMappingURL=task-context-agent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"task-context-agent.js","sourceRoot":"","sources":["../../src/browser/task-context-agent.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;;;;AAGhF,sCAAkC;AAClC,4DAA0D;AAC1D,yFAA2I;AAGpI,IAAM,gBAAgB,wBAAtB,MAAM,gBAAgB;IAAtB;QAGH,OAAE,GAAG,kBAAgB,CAAC,EAAE,CAAC;QACzB,SAAI,GAAG,aAAa,CAAC;QACrB,gBAAW,GAAG,UAAG,CAAC,QAAQ,CAAC,mDAAmD,EAC1E,sGAAsG;YACtG,yKAAyK,CAAC,CAAC;QAE/K,cAAS,GAAG,EAAE,CAAC;QACf,YAAO,GAAG,CAAC,wDAAyB,EAAE,0DAA2B,EAAE,wDAAyB,CAAC,CAAC;QAC9F,8BAAyB,GAA+B,CAAC;gBACrD,OAAO,EAAE,6BAA6B;gBACtC,UAAU,EAAE,cAAc;aAC7B,CAAC,CAAC;QACH,2BAAsB,GAAG,EAAE,CAAC;QAC5B,cAAS,GAAG,EAAE,CAAC;IACnB,CAAC;;AAjBY,4CAAgB;AAClB,mBAAE,GAAG,aAAa,AAAhB,CAAiB;2BADjB,gBAAgB;IAD5B,IAAA,sBAAU,GAAE;GACA,gBAAgB,CAiB5B"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { Summary, SummaryMetadata, TaskContextStorageService } from '@theia/ai-chat/lib/browser/task-context-service';
|
|
2
|
+
import { InMemoryTaskContextStorage } from '@theia/ai-chat/lib/browser/task-context-storage-service';
|
|
3
|
+
import { DisposableCollection, Emitter, ILogger, PreferenceService, URI } from '@theia/core';
|
|
4
|
+
import { OpenerService } from '@theia/core/lib/browser';
|
|
5
|
+
import { FileService } from '@theia/filesystem/lib/browser/file-service';
|
|
6
|
+
import { WorkspaceService } from '@theia/workspace/lib/browser';
|
|
7
|
+
import { FileChange } from '@theia/filesystem/lib/common/files';
|
|
8
|
+
export declare class TaskContextFileStorageService implements TaskContextStorageService {
|
|
9
|
+
protected readonly inMemoryStorage: InMemoryTaskContextStorage;
|
|
10
|
+
protected readonly preferenceService: PreferenceService;
|
|
11
|
+
protected readonly workspaceService: WorkspaceService;
|
|
12
|
+
protected readonly fileService: FileService;
|
|
13
|
+
protected readonly openerService: OpenerService;
|
|
14
|
+
protected readonly logger: ILogger;
|
|
15
|
+
protected readonly onDidChangeEmitter: Emitter<void>;
|
|
16
|
+
readonly onDidChange: import("@theia/core").Event<void>;
|
|
17
|
+
protected sanitizeLabel(label: string): string;
|
|
18
|
+
protected getStorageLocation(): URI | undefined;
|
|
19
|
+
protected init(): void;
|
|
20
|
+
protected get ready(): Promise<void>;
|
|
21
|
+
protected doInit(): Promise<void>;
|
|
22
|
+
protected toDisposeOnStorageChange?: DisposableCollection;
|
|
23
|
+
protected watchStorage(): Promise<void>;
|
|
24
|
+
protected handleChanges(changes: FileChange[]): Promise<void>;
|
|
25
|
+
protected clearInMemoryStorage(): void;
|
|
26
|
+
protected deleteFileReference(uri: URI): boolean;
|
|
27
|
+
protected cacheNewTasks(storageLocation: URI): Promise<void>;
|
|
28
|
+
protected readFile(uri: URI): Promise<void>;
|
|
29
|
+
store(summary: Summary): Promise<void>;
|
|
30
|
+
getAll(): Summary[];
|
|
31
|
+
get(identifier: string): Summary | undefined;
|
|
32
|
+
delete(identifier: string): Promise<boolean>;
|
|
33
|
+
protected maybeReadFrontmatter(content: string): {
|
|
34
|
+
body: string;
|
|
35
|
+
frontmatter: SummaryMetadata | undefined;
|
|
36
|
+
};
|
|
37
|
+
protected hasLabel(candidate: unknown): candidate is SummaryMetadata;
|
|
38
|
+
open(identifier: string): Promise<void>;
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=task-context-file-storage-service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"task-context-file-storage-service.d.ts","sourceRoot":"","sources":["../../src/browser/task-context-file-storage-service.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,yBAAyB,EAAE,MAAM,iDAAiD,CAAC;AACtH,OAAO,EAAE,0BAA0B,EAAE,MAAM,yDAAyD,CAAC;AAErG,OAAO,EAAE,oBAAoB,EAAO,OAAO,EAAE,OAAO,EAAQ,iBAAiB,EAAE,GAAG,EAAe,MAAM,aAAa,CAAC;AACrH,OAAO,EAAE,aAAa,EAAQ,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,4CAA4C,CAAC;AACzE,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAEhE,OAAO,EAAE,UAAU,EAAkB,MAAM,oCAAoC,CAAC;AAIhF,qBACa,6BAA8B,YAAW,yBAAyB;IACv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OAAO,GAAG,SAAS;IAItC,MAAM,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAYlD,SAAS,CAAC,oBAAoB,CAAC,OAAO,EAAE,MAAM,GAAG;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,eAAe,GAAG,SAAS,CAAA;KAAE;IAa3G,SAAS,CAAC,QAAQ,CAAC,SAAS,EAAE,OAAO,GAAG,SAAS,IAAI,eAAe;IAI9D,IAAI,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAOhD"}
|
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// *****************************************************************************
|
|
3
|
+
// Copyright (C) 2025 EclipseSource GmbH and others.
|
|
4
|
+
//
|
|
5
|
+
// This program and the accompanying materials are made available under the
|
|
6
|
+
// terms of the Eclipse Public License v. 2.0 which is available at
|
|
7
|
+
// http://www.eclipse.org/legal/epl-2.0.
|
|
8
|
+
//
|
|
9
|
+
// This Source Code may also be made available under the following Secondary
|
|
10
|
+
// Licenses when the conditions for such availability set forth in the Eclipse
|
|
11
|
+
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
12
|
+
// with the GNU Classpath Exception which is available at
|
|
13
|
+
// https://www.gnu.org/software/classpath/license.html.
|
|
14
|
+
//
|
|
15
|
+
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
16
|
+
// *****************************************************************************
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.TaskContextFileStorageService = void 0;
|
|
19
|
+
const tslib_1 = require("tslib");
|
|
20
|
+
const task_context_storage_service_1 = require("@theia/ai-chat/lib/browser/task-context-storage-service");
|
|
21
|
+
const inversify_1 = require("@theia/core/shared/inversify");
|
|
22
|
+
const core_1 = require("@theia/core");
|
|
23
|
+
const browser_1 = require("@theia/core/lib/browser");
|
|
24
|
+
const file_service_1 = require("@theia/filesystem/lib/browser/file-service");
|
|
25
|
+
const browser_2 = require("@theia/workspace/lib/browser");
|
|
26
|
+
const yaml = require("js-yaml");
|
|
27
|
+
const workspace_preferences_1 = require("../common/workspace-preferences");
|
|
28
|
+
const buffer_1 = require("@theia/core/lib/common/buffer");
|
|
29
|
+
let TaskContextFileStorageService = class TaskContextFileStorageService {
|
|
30
|
+
constructor() {
|
|
31
|
+
this.onDidChangeEmitter = new core_1.Emitter();
|
|
32
|
+
this.onDidChange = this.onDidChangeEmitter.event;
|
|
33
|
+
}
|
|
34
|
+
sanitizeLabel(label) {
|
|
35
|
+
return label.replace(/^[^\p{L}\p{N}]+/vg, '');
|
|
36
|
+
}
|
|
37
|
+
getStorageLocation() {
|
|
38
|
+
var _a;
|
|
39
|
+
if (!this.workspaceService.opened) {
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
const values = this.preferenceService.inspect(workspace_preferences_1.TASK_CONTEXT_STORAGE_DIRECTORY_PREF);
|
|
43
|
+
const configuredPath = (values === null || values === void 0 ? void 0 : values.globalValue) === undefined ? values === null || values === void 0 ? void 0 : values.defaultValue : values === null || values === void 0 ? void 0 : values.globalValue;
|
|
44
|
+
if (!configuredPath || typeof configuredPath !== 'string') {
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
const asPath = new core_1.Path(configuredPath);
|
|
48
|
+
return asPath.isAbsolute ? new core_1.URI(configuredPath) : (_a = this.workspaceService.tryGetRoots().at(0)) === null || _a === void 0 ? void 0 : _a.resource.resolve(configuredPath);
|
|
49
|
+
}
|
|
50
|
+
init() {
|
|
51
|
+
this.doInit();
|
|
52
|
+
}
|
|
53
|
+
get ready() {
|
|
54
|
+
return Promise.all([
|
|
55
|
+
this.workspaceService.ready,
|
|
56
|
+
this.preferenceService.ready,
|
|
57
|
+
]).then(() => undefined);
|
|
58
|
+
}
|
|
59
|
+
async doInit() {
|
|
60
|
+
await this.ready;
|
|
61
|
+
this.watchStorage();
|
|
62
|
+
this.preferenceService.onPreferenceChanged(e => {
|
|
63
|
+
if (e.preferenceName === workspace_preferences_1.TASK_CONTEXT_STORAGE_DIRECTORY_PREF) {
|
|
64
|
+
this.watchStorage().catch(error => this.logger.error(error));
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
async watchStorage() {
|
|
69
|
+
var _a;
|
|
70
|
+
const newStorage = await this.getStorageLocation();
|
|
71
|
+
(_a = this.toDisposeOnStorageChange) === null || _a === void 0 ? void 0 : _a.dispose();
|
|
72
|
+
this.toDisposeOnStorageChange = undefined;
|
|
73
|
+
if (!newStorage) {
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
this.toDisposeOnStorageChange = new core_1.DisposableCollection(this.fileService.watch(newStorage, { recursive: true, excludes: [] }), this.fileService.onDidFilesChange(event => {
|
|
77
|
+
const relevantChanges = event.changes.filter(candidate => newStorage.isEqualOrParent(candidate.resource));
|
|
78
|
+
this.handleChanges(relevantChanges);
|
|
79
|
+
}), { dispose: () => this.clearInMemoryStorage() });
|
|
80
|
+
this.cacheNewTasks(newStorage).catch(this.logger.error.bind(this.logger));
|
|
81
|
+
}
|
|
82
|
+
async handleChanges(changes) {
|
|
83
|
+
await Promise.all(changes.map(change => {
|
|
84
|
+
switch (change.type) {
|
|
85
|
+
case 2 /* FileChangeType.DELETED */: return this.deleteFileReference(change.resource);
|
|
86
|
+
case 1 /* FileChangeType.ADDED */:
|
|
87
|
+
case 0 /* FileChangeType.UPDATED */:
|
|
88
|
+
return this.readFile(change.resource);
|
|
89
|
+
default: return (0, core_1.unreachable)(change.type);
|
|
90
|
+
}
|
|
91
|
+
}));
|
|
92
|
+
}
|
|
93
|
+
clearInMemoryStorage() {
|
|
94
|
+
this.inMemoryStorage.clear();
|
|
95
|
+
}
|
|
96
|
+
deleteFileReference(uri) {
|
|
97
|
+
var _a;
|
|
98
|
+
if (this.inMemoryStorage.delete(uri.path.base)) {
|
|
99
|
+
return true;
|
|
100
|
+
}
|
|
101
|
+
for (const summary of this.inMemoryStorage.getAll()) {
|
|
102
|
+
if ((_a = summary.uri) === null || _a === void 0 ? void 0 : _a.isEqual(uri)) {
|
|
103
|
+
return this.inMemoryStorage.delete(summary.id);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
return false;
|
|
107
|
+
}
|
|
108
|
+
async cacheNewTasks(storageLocation) {
|
|
109
|
+
var _a;
|
|
110
|
+
const contents = await this.fileService.resolve(storageLocation).catch(() => undefined);
|
|
111
|
+
if (!((_a = contents === null || contents === void 0 ? void 0 : contents.children) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
112
|
+
return;
|
|
113
|
+
}
|
|
114
|
+
await Promise.all(contents.children.map(child => this.readFile(child.resource)));
|
|
115
|
+
this.onDidChangeEmitter.fire();
|
|
116
|
+
}
|
|
117
|
+
async readFile(uri) {
|
|
118
|
+
const content = await this.fileService.read(uri).then(read => read.value).catch(() => undefined);
|
|
119
|
+
if (content === undefined) {
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
const { frontmatter, body } = this.maybeReadFrontmatter(content);
|
|
123
|
+
const rawLabel = (frontmatter === null || frontmatter === void 0 ? void 0 : frontmatter.label) || uri.path.base.slice(0, (-1 * uri.path.ext.length) || uri.path.base.length);
|
|
124
|
+
const summary = {
|
|
125
|
+
...frontmatter,
|
|
126
|
+
summary: body,
|
|
127
|
+
label: this.sanitizeLabel(rawLabel),
|
|
128
|
+
uri,
|
|
129
|
+
id: (frontmatter === null || frontmatter === void 0 ? void 0 : frontmatter.sessionId) || uri.path.base
|
|
130
|
+
};
|
|
131
|
+
const existingSummary = summary.sessionId && this.getAll().find(candidate => candidate.sessionId === summary.sessionId);
|
|
132
|
+
if (existingSummary) {
|
|
133
|
+
summary.id = existingSummary.id;
|
|
134
|
+
}
|
|
135
|
+
this.inMemoryStorage.store(summary);
|
|
136
|
+
}
|
|
137
|
+
async store(summary) {
|
|
138
|
+
await this.ready;
|
|
139
|
+
const label = this.sanitizeLabel(summary.label);
|
|
140
|
+
const storageLocation = this.getStorageLocation();
|
|
141
|
+
if (storageLocation) {
|
|
142
|
+
const frontmatter = {
|
|
143
|
+
sessionId: summary.sessionId,
|
|
144
|
+
date: new Date().toISOString(),
|
|
145
|
+
label,
|
|
146
|
+
};
|
|
147
|
+
const derivedName = label.trim().replace(/[^\p{L}\p{N}]/vg, '-').replace(/^-+|-+$/g, '');
|
|
148
|
+
const filename = (derivedName.length > 32 ? derivedName.slice(0, derivedName.indexOf('-', 32)) : derivedName) + '.md';
|
|
149
|
+
const content = yaml.dump(frontmatter).trim() + `${core_1.EOL}---${core_1.EOL}` + summary.summary;
|
|
150
|
+
const uri = storageLocation.resolve(filename);
|
|
151
|
+
summary.uri = uri;
|
|
152
|
+
await this.fileService.writeFile(uri, buffer_1.BinaryBuffer.fromString(content));
|
|
153
|
+
}
|
|
154
|
+
this.inMemoryStorage.store({ ...summary, label });
|
|
155
|
+
this.onDidChangeEmitter.fire();
|
|
156
|
+
}
|
|
157
|
+
getAll() {
|
|
158
|
+
return this.inMemoryStorage.getAll();
|
|
159
|
+
}
|
|
160
|
+
get(identifier) {
|
|
161
|
+
return this.inMemoryStorage.get(identifier);
|
|
162
|
+
}
|
|
163
|
+
async delete(identifier) {
|
|
164
|
+
const summary = this.inMemoryStorage.get(identifier);
|
|
165
|
+
if (summary === null || summary === void 0 ? void 0 : summary.uri) {
|
|
166
|
+
await this.fileService.delete(summary.uri);
|
|
167
|
+
}
|
|
168
|
+
this.inMemoryStorage.delete(identifier);
|
|
169
|
+
if (summary) {
|
|
170
|
+
this.onDidChangeEmitter.fire();
|
|
171
|
+
}
|
|
172
|
+
return !!summary;
|
|
173
|
+
}
|
|
174
|
+
maybeReadFrontmatter(content) {
|
|
175
|
+
const frontmatterEnd = content.indexOf('---');
|
|
176
|
+
if (frontmatterEnd !== -1) {
|
|
177
|
+
try {
|
|
178
|
+
const frontmatter = yaml.load(content.slice(0, frontmatterEnd));
|
|
179
|
+
if (this.hasLabel(frontmatter)) {
|
|
180
|
+
return { frontmatter, body: content.slice(frontmatterEnd + 3).trim() };
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
catch { /* Probably not frontmatter, then. */ }
|
|
184
|
+
}
|
|
185
|
+
return { body: content, frontmatter: undefined };
|
|
186
|
+
}
|
|
187
|
+
hasLabel(candidate) {
|
|
188
|
+
return !!candidate && typeof candidate === 'object' && !Array.isArray(candidate) && 'label' in candidate && typeof candidate.label === 'string';
|
|
189
|
+
}
|
|
190
|
+
async open(identifier) {
|
|
191
|
+
const summary = this.get(identifier);
|
|
192
|
+
if (!summary) {
|
|
193
|
+
throw new Error('Unable to open requested task context: none found with specified identifier.');
|
|
194
|
+
}
|
|
195
|
+
await (summary.uri ? (0, browser_1.open)(this.openerService, summary.uri) : this.inMemoryStorage.open(identifier));
|
|
196
|
+
}
|
|
197
|
+
};
|
|
198
|
+
exports.TaskContextFileStorageService = TaskContextFileStorageService;
|
|
199
|
+
tslib_1.__decorate([
|
|
200
|
+
(0, inversify_1.inject)(task_context_storage_service_1.InMemoryTaskContextStorage),
|
|
201
|
+
tslib_1.__metadata("design:type", task_context_storage_service_1.InMemoryTaskContextStorage)
|
|
202
|
+
], TaskContextFileStorageService.prototype, "inMemoryStorage", void 0);
|
|
203
|
+
tslib_1.__decorate([
|
|
204
|
+
(0, inversify_1.inject)(core_1.PreferenceService),
|
|
205
|
+
tslib_1.__metadata("design:type", Object)
|
|
206
|
+
], TaskContextFileStorageService.prototype, "preferenceService", void 0);
|
|
207
|
+
tslib_1.__decorate([
|
|
208
|
+
(0, inversify_1.inject)(browser_2.WorkspaceService),
|
|
209
|
+
tslib_1.__metadata("design:type", browser_2.WorkspaceService)
|
|
210
|
+
], TaskContextFileStorageService.prototype, "workspaceService", void 0);
|
|
211
|
+
tslib_1.__decorate([
|
|
212
|
+
(0, inversify_1.inject)(file_service_1.FileService),
|
|
213
|
+
tslib_1.__metadata("design:type", file_service_1.FileService)
|
|
214
|
+
], TaskContextFileStorageService.prototype, "fileService", void 0);
|
|
215
|
+
tslib_1.__decorate([
|
|
216
|
+
(0, inversify_1.inject)(browser_1.OpenerService),
|
|
217
|
+
tslib_1.__metadata("design:type", Object)
|
|
218
|
+
], TaskContextFileStorageService.prototype, "openerService", void 0);
|
|
219
|
+
tslib_1.__decorate([
|
|
220
|
+
(0, inversify_1.inject)(core_1.ILogger),
|
|
221
|
+
tslib_1.__metadata("design:type", Object)
|
|
222
|
+
], TaskContextFileStorageService.prototype, "logger", void 0);
|
|
223
|
+
tslib_1.__decorate([
|
|
224
|
+
(0, inversify_1.postConstruct)(),
|
|
225
|
+
tslib_1.__metadata("design:type", Function),
|
|
226
|
+
tslib_1.__metadata("design:paramtypes", []),
|
|
227
|
+
tslib_1.__metadata("design:returntype", void 0)
|
|
228
|
+
], TaskContextFileStorageService.prototype, "init", null);
|
|
229
|
+
exports.TaskContextFileStorageService = TaskContextFileStorageService = tslib_1.__decorate([
|
|
230
|
+
(0, inversify_1.injectable)()
|
|
231
|
+
], TaskContextFileStorageService);
|
|
232
|
+
//# sourceMappingURL=task-context-file-storage-service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"task-context-file-storage-service.js","sourceRoot":"","sources":["../../src/browser/task-context-file-storage-service.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,oDAAoD;AACpD,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;;;;AAGhF,0GAAqG;AACrG,4DAAiF;AACjF,sCAAqH;AACrH,qDAA8D;AAC9D,6EAAyE;AACzE,0DAAgE;AAChE,gCAAgC;AAEhC,2EAAsF;AACtF,0DAA6D;AAGtD,IAAM,6BAA6B,GAAnC,MAAM,6BAA6B;IAAnC;QAOgB,uBAAkB,GAAG,IA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qC,yDAA0B;sEAAC;AACrD;IAA7C,IAAA,kBAAM,EAAC,wBAAiB,CAAC;;wEAAyD;AACtC;IAA5C,IAAA,kBAAM,EAAC,0BAAgB,CAAC;sCAAsC,0BAAgB;uEAAC;AACxC;IAAvC,IAAA,kBAAM,EAAC,0BAAW,CAAC;sCAAiC,0BAAW;kEAAC;AACvB;IAAzC,IAAA,kBAAM,EAAC,uBAAa,CAAC;;oEAAiD;AACnC;IAAnC,IAAA,kBAAM,EAAC,cAAO,CAAC;;6DAAoC;AAkB1C;IADT,IAAA,yBAAa,GAAE;;;;yDAGf;wCA1BQ,6BAA6B;IADzC,IAAA,sBAAU,GAAE;GACA,6BAA6B,CAqLzC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { FrontendApplicationContribution } from '@theia/core/lib/browser';
|
|
2
|
+
import { DefaultPromptFragmentCustomizationService } from '@theia/ai-core/lib/browser/frontend-prompt-customization-service';
|
|
3
|
+
import { WorkspaceService } from '@theia/workspace/lib/browser';
|
|
4
|
+
import { PreferenceService } from '@theia/core';
|
|
5
|
+
export declare class TemplatePreferenceContribution implements FrontendApplicationContribution {
|
|
6
|
+
protected readonly preferenceService: PreferenceService;
|
|
7
|
+
protected readonly customizationService: DefaultPromptFragmentCustomizationService;
|
|
8
|
+
protected readonly workspaceService: WorkspaceService;
|
|
9
|
+
onStart(): void;
|
|
10
|
+
/**
|
|
11
|
+
* Updates the template configuration in the customization service.
|
|
12
|
+
* If a specific preference name is provided, only that configuration aspect is updated.
|
|
13
|
+
* @param changedPreference Optional name of the preference that changed
|
|
14
|
+
*/
|
|
15
|
+
protected updateConfiguration(changedPreference?: string): Promise<void>;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=template-preference-contribution.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"template-preference-contribution.d.ts","sourceRoot":"","sources":["../../src/browser/template-preference-contribution.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,+BAA+B,EAAE,MAAM,yBAAyB,CAAC;AAE1E,OAAO,EAAE,yCAAyC,EAAyC,MAAM,kEAAkE,CAAC;AAMpK,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAQ,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEtD,qBACa,8BAA+B,YAAW,+BAA+B;IAGlF,SAAS,CAAC,QAAQ,CAAC,iBAAiB,EAAE,iBAAiB,CAAC;IAGxD,SAAS,CAAC,QAAQ,CAAC,oBAAoB,EAAE,yCAAyC,CAAC;IAGnF,SAAS,CAAC,QAAQ,CAAC,gBAAgB,EAAE,gBAAgB,CAAC;IAEtD,OAAO,IAAI,IAAI;IAqBf;;;;OAIG;cACa,mBAAmB,CAAC,iBAAiB,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAiCjF"}
|
|
@@ -0,0 +1,94 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.TemplatePreferenceContribution = void 0;
|
|
19
|
+
const tslib_1 = require("tslib");
|
|
20
|
+
const inversify_1 = require("@theia/core/shared/inversify");
|
|
21
|
+
const frontend_prompt_customization_service_1 = require("@theia/ai-core/lib/browser/frontend-prompt-customization-service");
|
|
22
|
+
const workspace_preferences_1 = require("../common/workspace-preferences");
|
|
23
|
+
const browser_1 = require("@theia/workspace/lib/browser");
|
|
24
|
+
const core_1 = require("@theia/core");
|
|
25
|
+
let TemplatePreferenceContribution = class TemplatePreferenceContribution {
|
|
26
|
+
onStart() {
|
|
27
|
+
Promise.all([this.preferenceService.ready, this.workspaceService.ready]).then(() => {
|
|
28
|
+
// Set initial template configuration from preferences
|
|
29
|
+
this.updateConfiguration();
|
|
30
|
+
// Listen for preference changes
|
|
31
|
+
this.preferenceService.onPreferenceChanged(event => {
|
|
32
|
+
if (event.preferenceName === workspace_preferences_1.PROMPT_TEMPLATE_WORKSPACE_DIRECTORIES_PREF ||
|
|
33
|
+
event.preferenceName === workspace_preferences_1.PROMPT_TEMPLATE_ADDITIONAL_EXTENSIONS_PREF ||
|
|
34
|
+
event.preferenceName === workspace_preferences_1.PROMPT_TEMPLATE_WORKSPACE_FILES_PREF) {
|
|
35
|
+
this.updateConfiguration(event.preferenceName);
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
// Listen for workspace root changes
|
|
39
|
+
this.workspaceService.onWorkspaceLocationChanged(() => {
|
|
40
|
+
this.updateConfiguration();
|
|
41
|
+
});
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Updates the template configuration in the customization service.
|
|
46
|
+
* If a specific preference name is provided, only that configuration aspect is updated.
|
|
47
|
+
* @param changedPreference Optional name of the preference that changed
|
|
48
|
+
*/
|
|
49
|
+
async updateConfiguration(changedPreference) {
|
|
50
|
+
const workspaceRoot = this.workspaceService.tryGetRoots()[0];
|
|
51
|
+
if (!workspaceRoot) {
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
const workspaceRootUri = workspaceRoot.resource;
|
|
55
|
+
const configProperties = {};
|
|
56
|
+
if (!changedPreference || changedPreference === workspace_preferences_1.PROMPT_TEMPLATE_WORKSPACE_DIRECTORIES_PREF) {
|
|
57
|
+
const relativeDirectories = this.preferenceService.get(workspace_preferences_1.PROMPT_TEMPLATE_WORKSPACE_DIRECTORIES_PREF, []);
|
|
58
|
+
configProperties.directoryPaths = relativeDirectories.map(dir => {
|
|
59
|
+
const path = new core_1.Path(dir);
|
|
60
|
+
const uri = workspaceRootUri.resolve(path.toString());
|
|
61
|
+
return uri.path.toString();
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
if (!changedPreference || changedPreference === workspace_preferences_1.PROMPT_TEMPLATE_ADDITIONAL_EXTENSIONS_PREF) {
|
|
65
|
+
configProperties.extensions = this.preferenceService.get(workspace_preferences_1.PROMPT_TEMPLATE_ADDITIONAL_EXTENSIONS_PREF, []);
|
|
66
|
+
}
|
|
67
|
+
if (!changedPreference || changedPreference === workspace_preferences_1.PROMPT_TEMPLATE_WORKSPACE_FILES_PREF) {
|
|
68
|
+
const relativeFilePaths = this.preferenceService.get(workspace_preferences_1.PROMPT_TEMPLATE_WORKSPACE_FILES_PREF, []);
|
|
69
|
+
configProperties.filePaths = relativeFilePaths.map(filePath => {
|
|
70
|
+
const path = new core_1.Path(filePath);
|
|
71
|
+
const uri = workspaceRootUri.resolve(path.toString());
|
|
72
|
+
return uri.path.toString();
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
await this.customizationService.updateConfiguration(configProperties);
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
exports.TemplatePreferenceContribution = TemplatePreferenceContribution;
|
|
79
|
+
tslib_1.__decorate([
|
|
80
|
+
(0, inversify_1.inject)(core_1.PreferenceService),
|
|
81
|
+
tslib_1.__metadata("design:type", Object)
|
|
82
|
+
], TemplatePreferenceContribution.prototype, "preferenceService", void 0);
|
|
83
|
+
tslib_1.__decorate([
|
|
84
|
+
(0, inversify_1.inject)(frontend_prompt_customization_service_1.DefaultPromptFragmentCustomizationService),
|
|
85
|
+
tslib_1.__metadata("design:type", frontend_prompt_customization_service_1.DefaultPromptFragmentCustomizationService)
|
|
86
|
+
], TemplatePreferenceContribution.prototype, "customizationService", void 0);
|
|
87
|
+
tslib_1.__decorate([
|
|
88
|
+
(0, inversify_1.inject)(browser_1.WorkspaceService),
|
|
89
|
+
tslib_1.__metadata("design:type", browser_1.WorkspaceService)
|
|
90
|
+
], TemplatePreferenceContribution.prototype, "workspaceService", void 0);
|
|
91
|
+
exports.TemplatePreferenceContribution = TemplatePreferenceContribution = tslib_1.__decorate([
|
|
92
|
+
(0, inversify_1.injectable)()
|
|
93
|
+
], TemplatePreferenceContribution);
|
|
94
|
+
//# sourceMappingURL=template-preference-contribution.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"template-preference-contribution.js","sourceRoot":"","sources":["../../src/browser/template-preference-contribution.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;;;AAGhF,4DAAkE;AAClE,4HAAoK;AACpK,2EAIyC;AACzC,0DAAgE;AAChE,sCAAsD;AAG/C,IAAM,8BAA8B,GAApC,MAAM,8BAA8B;IAWvC,OAAO;QACH,OAAO,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,iBAAiB,CAAC,KAAK,EAAE,IAAI,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE;YAC/E,sDAAsD;YACtD,IAAI,CAAC,mBAAmB,EAAE,CAAC;YAE3B,gCAAgC;YAChC,IAAI,CAAC,iBAAiB,CAAC,mBAAmB,CAAC,KAAK,CAAC,EAAE;gBAC/C,IAAI,KAAK,CAAC,cAAc,KAAK,kEAA0C;oBACnE,K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G,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAW,kEAA0C,EAAE,EAAE,CAAC,CAAC;QACvH,CAAC;QAED,IAAI,CAAC,iBAAiB,IAAI,iBAAiB,KAAK,4DAAoC,EAAE,CAAC;YACnF,MAAM,iBAAiB,GAAG,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAW,4DAAoC,EAAE,EAAE,CAAC,CAAC;YACzG,gBAAgB,CAAC,SAAS,GAAG,iBAAiB,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE;gBAC1D,MAAM,IAAI,GAAG,IAAI,WAAI,CAAC,QAAQ,CAAC,CAAC;gBAChC,MAAM,GAAG,GAAG,gBAAgB,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;gBACtD,OAAO,GAAG,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;YAC/B,CAAC,CAAC,CAAC;QACP,CAAC;QAED,MAAM,IAAI,CAAC,oBAAoB,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,CAAC;IAC1E,CAAC;CACJ,CAAA;AAtEY,wEAA8B;AAGpB;IADlB,IAAA,kBAAM,EAAC,wBAAiB,CAAC;;yEAC8B;AAGrC;IADlB,IAAA,kBAAM,EAAC,iFAAyC,CAAC;sCACT,iFAAyC;4EAAC;AAGhE;IADlB,IAAA,kBAAM,EAAC,0BAAgB,CAAC;sCACY,0BAAgB;wEAAC;yCAT7C,8BAA8B;IAD1C,IAAA,sBAAU,GAAE;GACA,8BAA8B,CAsE1C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-provider-cancellation-test-util.spec.d.ts","sourceRoot":"","sources":["../../../src/browser/test/tool-provider-cancellation-test-util.spec.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// *****************************************************************************
|
|
3
|
+
// Copyright (C) 2025 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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
const core_1 = require("@theia/core");
|
|
19
|
+
const chai_1 = require("chai");
|
|
20
|
+
// Simple test for cancellation handling
|
|
21
|
+
describe('Tool Provider Cancellation Tests', () => {
|
|
22
|
+
it('should verify basic cancellation token functionality', () => {
|
|
23
|
+
// Create a cancellation token source
|
|
24
|
+
const cts = new core_1.CancellationTokenSource();
|
|
25
|
+
// Initially the token should not be cancelled
|
|
26
|
+
(0, chai_1.expect)(cts.token.isCancellationRequested).to.be.false;
|
|
27
|
+
// After cancellation, the token should report as cancelled
|
|
28
|
+
cts.cancel();
|
|
29
|
+
(0, chai_1.expect)(cts.token.isCancellationRequested).to.be.true;
|
|
30
|
+
// Cleanup
|
|
31
|
+
cts.dispose();
|
|
32
|
+
});
|
|
33
|
+
it('should trigger cancellation callback when cancelled', async () => {
|
|
34
|
+
// Create a cancellation token source
|
|
35
|
+
const cts = new core_1.CancellationTokenSource();
|
|
36
|
+
// Create a flag to track if the callback was called
|
|
37
|
+
let callbackCalled = false;
|
|
38
|
+
// Register a cancellation callback
|
|
39
|
+
const disposable = cts.token.onCancellationRequested(() => {
|
|
40
|
+
callbackCalled = true;
|
|
41
|
+
});
|
|
42
|
+
// Initially the callback should not have been called
|
|
43
|
+
(0, chai_1.expect)(callbackCalled).to.be.false;
|
|
44
|
+
// After cancellation, the callback should be called
|
|
45
|
+
cts.cancel();
|
|
46
|
+
(0, chai_1.expect)(callbackCalled).to.be.true;
|
|
47
|
+
// Cleanup
|
|
48
|
+
disposable.dispose();
|
|
49
|
+
cts.dispose();
|
|
50
|
+
});
|
|
51
|
+
});
|
|
52
|
+
//# sourceMappingURL=tool-provider-cancellation-test-util.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-provider-cancellation-test-util.spec.js","sourceRoot":"","sources":["../../../src/browser/test/tool-provider-cancellation-test-util.spec.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;AAEhF,sCAAsD;AACtD,+BAA8B;AAE9B,wCAAwC;AACxC,QAAQ,CAAC,kCAAkC,EAAE,GAAG,EAAE;IAC9C,EAAE,CAAC,sDAAsD,EAAE,GAAG,EAAE;QAC5D,qCAAqC;QACrC,MAAM,GAAG,GAAG,IAAI,8BAAuB,EAAE,CAAC;QAE1C,8CAA8C;QAC9C,IAAA,aAAM,EAAC,GAAG,CAAC,KAAK,CAAC,uBAAuB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC;QAEtD,2DAA2D;QAC3D,GAAG,CAAC,MAAM,EAAE,CAAC;QACb,IAAA,aAAM,EAAC,GAAG,CAAC,KAAK,CAAC,uBAAuB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC;QAErD,UAAU;QACV,GAAG,CAAC,OAAO,EAAE,CAAC;IAClB,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,qDAAqD,EAAE,KAAK,IAAI,EAAE;QACjE,qCAAqC;QACrC,MAAM,GAAG,GAAG,IAAI,8BAAuB,EAAE,CAAC;QAE1C,oDAAoD;QACpD,IAAI,cAAc,GAAG,KAAK,CAAC;QAE3B,mCAAmC;QACnC,MAAM,UAAU,GAAG,GAAG,CAAC,KAAK,CAAC,uBAAuB,CAAC,GAAG,EAAE;YACtD,cAAc,GAAG,IAAI,CAAC;QAC1B,CAAC,CAAC,CAAC;QAEH,qDAAqD;QACrD,IAAA,aAAM,EAAC,cAAc,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC;QAEnC,oDAAoD;QACpD,GAAG,CAAC,MAAM,EAAE,CAAC;QACb,IAAA,aAAM,EAAC,cAAc,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC;QAElC,UAAU;QACV,UAAU,CAAC,OAAO,EAAE,CAAC;QACrB,GAAG,CAAC,OAAO,EAAE,CAAC;IAClB,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { ToolProvider, ToolRequest } from '@theia/ai-core';
|
|
2
|
+
import { CancellationToken, PreferenceService, URI } from '@theia/core';
|
|
3
|
+
import { FileService } from '@theia/filesystem/lib/browser/file-service';
|
|
4
|
+
import { FileStat } from '@theia/filesystem/lib/common/files';
|
|
5
|
+
import { WorkspaceService } from '@theia/workspace/lib/browser';
|
|
6
|
+
import { OpenerService } from '@theia/core/lib/browser';
|
|
7
|
+
import { MonacoWorkspace } from '@theia/monaco/lib/browser/monaco-workspace';
|
|
8
|
+
import { MonacoTextModelService } from '@theia/monaco/lib/browser/monaco-text-model-service';
|
|
9
|
+
import { ProblemManager } from '@theia/markers/lib/browser';
|
|
10
|
+
import { Range } from '@theia/core/shared/vscode-languageserver-protocol';
|
|
11
|
+
export declare class WorkspaceFunctionScope {
|
|
12
|
+
protected readonly GITIGNORE_FILE_NAME = ".gitignore";
|
|
13
|
+
protected readonly workspaceService: WorkspaceService;
|
|
14
|
+
protected readonly fileService: FileService;
|
|
15
|
+
protected readonly preferences: PreferenceService;
|
|
16
|
+
private gitignoreMatcher;
|
|
17
|
+
private gitignoreWatcherInitialized;
|
|
18
|
+
getWorkspaceRoot(): Promise<URI>;
|
|
19
|
+
ensureWithinWorkspace(targetUri: URI, workspaceRootUri: URI): void;
|
|
20
|
+
resolveRelativePath(relativePath: string): Promise<URI>;
|
|
21
|
+
isInWorkspace(uri: URI): boolean;
|
|
22
|
+
isInPrimaryWorkspace(uri: URI): boolean;
|
|
23
|
+
resolveToUri(pathOrUri: string | URI): Promise<URI | undefined>;
|
|
24
|
+
private initializeGitignoreWatcher;
|
|
25
|
+
shouldExclude(stat: FileStat): Promise<boolean>;
|
|
26
|
+
protected isUserExcluded(fileName: string, userExcludePatterns: string[]): boolean;
|
|
27
|
+
protected isGitIgnored(stat: FileStat, workspaceRoot: URI): Promise<boolean>;
|
|
28
|
+
}
|
|
29
|
+
export declare class GetWorkspaceDirectoryStructure implements ToolProvider {
|
|
30
|
+
static ID: string;
|
|
31
|
+
getTool(): ToolRequest;
|
|
32
|
+
protected readonly fileService: FileService;
|
|
33
|
+
protected workspaceScope: WorkspaceFunctionScope;
|
|
34
|
+
private getDirectoryStructure;
|
|
35
|
+
private buildDirectoryStructure;
|
|
36
|
+
}
|
|
37
|
+
export declare class FileContentFunction implements ToolProvider {
|
|
38
|
+
static ID: string;
|
|
39
|
+
getTool(): ToolRequest;
|
|
40
|
+
protected readonly fileService: FileService;
|
|
41
|
+
protected readonly workspaceScope: WorkspaceFunctionScope;
|
|
42
|
+
protected readonly monacoWorkspace: MonacoWorkspace;
|
|
43
|
+
private parseArg;
|
|
44
|
+
private getFileContent;
|
|
45
|
+
}
|
|
46
|
+
export declare class GetWorkspaceFileList implements ToolProvider {
|
|
47
|
+
static ID: string;
|
|
48
|
+
getTool(): ToolRequest;
|
|
49
|
+
protected readonly fileService: FileService;
|
|
50
|
+
protected workspaceScope: WorkspaceFunctionScope;
|
|
51
|
+
getProjectFileList(path?: string, cancellationToken?: CancellationToken): Promise<string | string[]>;
|
|
52
|
+
private listFilesDirectly;
|
|
53
|
+
}
|
|
54
|
+
export declare class FileDiagnosticProvider implements ToolProvider {
|
|
55
|
+
static ID: string;
|
|
56
|
+
protected readonly workspaceScope: WorkspaceFunctionScope;
|
|
57
|
+
protected readonly problemManager: ProblemManager;
|
|
58
|
+
protected readonly modelService: MonacoTextModelService;
|
|
59
|
+
protected readonly openerService: OpenerService;
|
|
60
|
+
getTool(): ToolRequest;
|
|
61
|
+
protected getDiagnosticsForFile(uri: URI, cancellationToken?: CancellationToken): Promise<string>;
|
|
62
|
+
/**
|
|
63
|
+
* Expands the range provided until it contains at least {@link desiredLines} lines or reaches the end of the document
|
|
64
|
+
* to attempt to provide the agent sufficient context to understand the diagnostic.
|
|
65
|
+
*/
|
|
66
|
+
protected atLeastNLines(desiredLines: number, range: Range, documentLineCount: number): Range;
|
|
67
|
+
}
|
|
68
|
+
export declare class FindFilesByPattern implements ToolProvider {
|
|
69
|
+
static ID: string;
|
|
70
|
+
protected readonly workspaceScope: WorkspaceFunctionScope;
|
|
71
|
+
protected readonly preferences: PreferenceService;
|
|
72
|
+
protected readonly fileService: FileService;
|
|
73
|
+
getTool(): ToolRequest;
|
|
74
|
+
private findFiles;
|
|
75
|
+
private buildIgnorePatterns;
|
|
76
|
+
private traverseDirectory;
|
|
77
|
+
}
|
|
78
|
+
//# sourceMappingURL=workspace-functions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workspace-functions.d.ts","sourceRoot":"","sources":["../../src/browser/workspace-functions.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAc,iBAAiB,EAAE,GAAG,EAAQ,MAAM,aAAa,CAAC;AAE1F,OAAO,EAAE,WAAW,EAAE,MAAM,4CAA4C,CAAC;AACzE,OAAO,EAAE,QAAQ,EAAE,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