@theia/ai-ide 1.67.0-next.56 → 1.67.0-next.59
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-configuration/agent-configuration-widget.d.ts +41 -0
- package/lib/browser/ai-configuration/agent-configuration-widget.d.ts.map +1 -0
- package/lib/browser/ai-configuration/agent-configuration-widget.js +333 -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/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 +104 -0
- package/lib/browser/ai-configuration/language-model-renderer.js.map +1 -0
- package/lib/browser/ai-configuration/mcp-configuration-widget.d.ts +43 -0
- package/lib/browser/ai-configuration/mcp-configuration-widget.d.ts.map +1 -0
- package/lib/browser/ai-configuration/mcp-configuration-widget.js +302 -0
- package/lib/browser/ai-configuration/mcp-configuration-widget.js.map +1 -0
- package/lib/browser/ai-configuration/model-aliases-configuration-widget.d.ts +41 -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 +226 -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 +22 -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 +156 -0
- package/lib/browser/ai-configuration/token-usage-configuration-widget.js.map +1 -0
- package/lib/browser/ai-configuration/tools-configuration-widget.d.ts +30 -0
- package/lib/browser/ai-configuration/tools-configuration-widget.d.ts.map +1 -0
- package/lib/browser/ai-configuration/tools-configuration-widget.js +150 -0
- package/lib/browser/ai-configuration/tools-configuration-widget.js.map +1 -0
- package/lib/browser/ai-configuration/variable-configuration-widget.d.ts +19 -0
- package/lib/browser/ai-configuration/variable-configuration-widget.d.ts.map +1 -0
- package/lib/browser/ai-configuration/variable-configuration-widget.js +99 -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/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 +220 -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/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
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* eslint-disable @typescript-eslint/tslint/config */
|
|
3
|
+
// *****************************************************************************
|
|
4
|
+
// Copyright (C) 2025 EclipseSource GmbH and others.
|
|
5
|
+
//
|
|
6
|
+
// This file is licensed under the MIT License.
|
|
7
|
+
// See LICENSE-MIT.txt in the project root for license information.
|
|
8
|
+
// https://opensource.org/license/mit.
|
|
9
|
+
//
|
|
10
|
+
// SPDX-License-Identifier: MIT
|
|
11
|
+
// *****************************************************************************
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
exports.commandTemplate = void 0;
|
|
14
|
+
exports.commandTemplate = {
|
|
15
|
+
id: 'command-system',
|
|
16
|
+
defaultVariant: {
|
|
17
|
+
id: 'command-system-default',
|
|
18
|
+
template: `{{!-- This prompt is licensed under the MIT License (https://opensource.org/license/mit).
|
|
19
|
+
Made improvements or adaptations to this prompt template? We\u2019d love for you to share it with the community! Contribute back here:
|
|
20
|
+
https://github.com/eclipse-theia/theia/discussions/new?category=prompt-template-contribution --}}
|
|
21
|
+
# System Prompt
|
|
22
|
+
|
|
23
|
+
You are a service that helps users find commands to execute in an IDE.
|
|
24
|
+
You reply with stringified JSON Objects that tell the user which command to execute and its arguments, if any.
|
|
25
|
+
|
|
26
|
+
# Examples
|
|
27
|
+
|
|
28
|
+
The examples start with a short explanation of the return object.
|
|
29
|
+
The response can be found within the markdown \`\`\`json and \`\`\` markers.
|
|
30
|
+
Please include these markers in the reply.
|
|
31
|
+
|
|
32
|
+
Never under any circumstances may you reply with just the command-id!
|
|
33
|
+
|
|
34
|
+
## Example 1
|
|
35
|
+
|
|
36
|
+
This reply is to tell the user to execute the \`preferences:open\` command that is available in the Theia command registry.
|
|
37
|
+
|
|
38
|
+
\`\`\`json
|
|
39
|
+
{
|
|
40
|
+
"type": "theia-command",
|
|
41
|
+
"commandId": "preferences:open"
|
|
42
|
+
}
|
|
43
|
+
\`\`\`
|
|
44
|
+
|
|
45
|
+
## Example 2
|
|
46
|
+
|
|
47
|
+
This reply is to tell the user to execute the \`preferences:open\` command that is available in the Theia command registry,
|
|
48
|
+
when the user want to pass arguments to the command.
|
|
49
|
+
|
|
50
|
+
\`\`\`json
|
|
51
|
+
{
|
|
52
|
+
"type": "theia-command",
|
|
53
|
+
"commandId": "preferences:open",
|
|
54
|
+
"arguments": ["ai-features"]
|
|
55
|
+
}
|
|
56
|
+
\`\`\`
|
|
57
|
+
|
|
58
|
+
## Example 3
|
|
59
|
+
|
|
60
|
+
This reply is for custom commands that are not registered in the Theia command registry.
|
|
61
|
+
These commands always have the command id \`ai-chat.command-chat-response.generic\`.
|
|
62
|
+
The arguments are an array and may differ, depending on the user's instructions.
|
|
63
|
+
|
|
64
|
+
\`\`\`json
|
|
65
|
+
{
|
|
66
|
+
"type": "custom-handler",
|
|
67
|
+
"commandId": "ai-chat.command-chat-response.generic",
|
|
68
|
+
"arguments": ["foo", "bar"]
|
|
69
|
+
}
|
|
70
|
+
\`\`\`
|
|
71
|
+
|
|
72
|
+
## Example 4
|
|
73
|
+
|
|
74
|
+
This reply of type no-command is for cases where you can't find a proper command.
|
|
75
|
+
You may use the message to explain the situation to the user.
|
|
76
|
+
|
|
77
|
+
\`\`\`json
|
|
78
|
+
{
|
|
79
|
+
"type": "no-command",
|
|
80
|
+
"message": "a message explaining what is wrong"
|
|
81
|
+
}
|
|
82
|
+
\`\`\`
|
|
83
|
+
|
|
84
|
+
# Rules
|
|
85
|
+
|
|
86
|
+
## Theia Commands
|
|
87
|
+
|
|
88
|
+
If a user asks for a Theia command, or the context implies it is about a command in Theia, return a response with \`"type": "theia-command"\`.
|
|
89
|
+
You need to exchange the "commandId".
|
|
90
|
+
The available command ids in Theia are in the list below. The list of commands is formatted like this:
|
|
91
|
+
|
|
92
|
+
command-id1: Label1
|
|
93
|
+
command-id2: Label2
|
|
94
|
+
command-id3:
|
|
95
|
+
command-id4: Label4
|
|
96
|
+
|
|
97
|
+
The Labels may be empty, but there is always a command-id.
|
|
98
|
+
|
|
99
|
+
Suggest a command that probably fits the user's message based on the label and the command ids you know.
|
|
100
|
+
If you have multiple commands that fit, return the one that fits best. We only want a single command in the reply.
|
|
101
|
+
If the user says that the last command was not right, try to return the next best fit based on the conversation history with the user.
|
|
102
|
+
|
|
103
|
+
If there are no more command ids that seem to fit, return a response of \`"type": "no-command"\` explaining the situation.
|
|
104
|
+
|
|
105
|
+
Here are the known Theia commands:
|
|
106
|
+
|
|
107
|
+
Begin List:
|
|
108
|
+
{{command-ids}}
|
|
109
|
+
End List
|
|
110
|
+
|
|
111
|
+
You may only use commands from this list when responding with \`"type": "theia-command"\`.
|
|
112
|
+
Do not come up with command ids that are not in this list.
|
|
113
|
+
If you need to do this, use the \`"type": "no-command"\`. instead
|
|
114
|
+
|
|
115
|
+
## Custom Handlers
|
|
116
|
+
|
|
117
|
+
If the user asks for a command that is not a Theia command, return a response with \`"type": "custom-handler"\`.
|
|
118
|
+
|
|
119
|
+
## Other Cases
|
|
120
|
+
|
|
121
|
+
In all other cases, return a reply of \`"type": "no-command"\`.
|
|
122
|
+
|
|
123
|
+
# Examples of Invalid Responses
|
|
124
|
+
|
|
125
|
+
## Invalid Response Example 1
|
|
126
|
+
|
|
127
|
+
This example is invalid because it returns text and two commands.
|
|
128
|
+
Only one command should be replied, and it must be parseable JSON.
|
|
129
|
+
|
|
130
|
+
### The Example
|
|
131
|
+
|
|
132
|
+
Yes, there are a few more theme-related commands. Here is another one:
|
|
133
|
+
|
|
134
|
+
\`\`\`json
|
|
135
|
+
{
|
|
136
|
+
"type": "theia-command",
|
|
137
|
+
"commandId": "workbench.action.selectIconTheme"
|
|
138
|
+
}
|
|
139
|
+
\`\`\`
|
|
140
|
+
|
|
141
|
+
And another one:
|
|
142
|
+
|
|
143
|
+
\`\`\`json
|
|
144
|
+
{
|
|
145
|
+
"type": "theia-command",
|
|
146
|
+
"commandId": "core.close.right.tabs"
|
|
147
|
+
}
|
|
148
|
+
\`\`\`
|
|
149
|
+
|
|
150
|
+
## Invalid Response Example 2
|
|
151
|
+
|
|
152
|
+
The following example is invalid because it only returns the command id and is not parseable JSON:
|
|
153
|
+
|
|
154
|
+
### The Example
|
|
155
|
+
|
|
156
|
+
workbench.action.selectIconTheme
|
|
157
|
+
|
|
158
|
+
## Invalid Response Example 3
|
|
159
|
+
|
|
160
|
+
The following example is invalid because it returns a message with the command id. We need JSON objects based on the above rules.
|
|
161
|
+
Do not respond like this in any case! We need a command of \`"type": "theia-command"\`.
|
|
162
|
+
|
|
163
|
+
The expected response would be:
|
|
164
|
+
\`\`\`json
|
|
165
|
+
{
|
|
166
|
+
"type": "theia-command",
|
|
167
|
+
"commandId": "core.close.right.tabs"
|
|
168
|
+
}
|
|
169
|
+
\`\`\`
|
|
170
|
+
|
|
171
|
+
### The Example
|
|
172
|
+
|
|
173
|
+
I found this command that might help you: core.close.right.tabs
|
|
174
|
+
|
|
175
|
+
## Invalid Response Example 4
|
|
176
|
+
|
|
177
|
+
The following example is invalid because it has an explanation string before the JSON.
|
|
178
|
+
We only want the JSON!
|
|
179
|
+
|
|
180
|
+
### The Example
|
|
181
|
+
|
|
182
|
+
You can toggle high contrast mode with this command:
|
|
183
|
+
|
|
184
|
+
\`\`\`json
|
|
185
|
+
{
|
|
186
|
+
"type": "theia-command",
|
|
187
|
+
"commandId": "editor.action.toggleHighContrast"
|
|
188
|
+
}
|
|
189
|
+
\`\`\`
|
|
190
|
+
|
|
191
|
+
## Invalid Response Example 5
|
|
192
|
+
|
|
193
|
+
The following example is invalid because it explains that no command was found.
|
|
194
|
+
We want a response of \`"type": "no-command"\` and have the message there.
|
|
195
|
+
|
|
196
|
+
### The Example
|
|
197
|
+
|
|
198
|
+
There is no specific command available to "open the windows" in the provided Theia command list.
|
|
199
|
+
|
|
200
|
+
## Invalid Response Example 6
|
|
201
|
+
|
|
202
|
+
In this example we were using the following theia id command list:
|
|
203
|
+
|
|
204
|
+
Begin List:
|
|
205
|
+
container--theia-open-editors-widget: Hello
|
|
206
|
+
foo:toggle-visibility-explorer-view-container--files: Label 1
|
|
207
|
+
foo:toggle-visibility-explorer-view-container--plugin-view: Label 2
|
|
208
|
+
End List
|
|
209
|
+
|
|
210
|
+
The problem is that workbench.action.toggleHighContrast is not in this list.
|
|
211
|
+
theia-command types may only use commandIds from this list.
|
|
212
|
+
This should have been of \`"type": "no-command"\`.
|
|
213
|
+
|
|
214
|
+
### The Example
|
|
215
|
+
|
|
216
|
+
\`\`\`json
|
|
217
|
+
{
|
|
218
|
+
"type": "theia-command",
|
|
219
|
+
"commandId": "workbench.action.toggleHighContrast"
|
|
220
|
+
}
|
|
221
|
+
\`\`\`
|
|
222
|
+
|
|
223
|
+
`
|
|
224
|
+
}
|
|
225
|
+
};
|
|
226
|
+
//# sourceMappingURL=command-prompt-template.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command-prompt-template.js","sourceRoot":"","sources":["../../src/common/command-prompt-template.ts"],"names":[],"mappings":";AAAA,qDAAqD;AACrD,gFAAgF;AAChF,oDAAoD;AACpD,EAAE;AACF,+CAA+C;AAC/C,mEAAmE;AACnE,sCAAsC;AACtC,EAAE;AACF,+BAA+B;AAC/B,gFAAgF;;;AAInE,QAAA,eAAe,GAAqB;IAC7C,EAAE,EAAE,gBAAgB;IACpB,cAAc,EAAE;QACZ,EAAE,EAAE,wBAAwB;QAC5B,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6MjB;KAAC;CACD,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { MaybePromise } from '@theia/core';
|
|
2
|
+
import { AIVariable, ResolvedAIVariable, AIVariableContribution, AIVariableResolver, AIVariableService, AIVariableResolutionRequest, AIVariableContext } from '@theia/ai-core';
|
|
3
|
+
export declare const CONTEXT_FILES_VARIABLE: AIVariable;
|
|
4
|
+
export declare class ContextFilesVariableContribution implements AIVariableContribution, AIVariableResolver {
|
|
5
|
+
registerVariables(service: AIVariableService): void;
|
|
6
|
+
canResolve(request: AIVariableResolutionRequest, context: AIVariableContext): MaybePromise<number>;
|
|
7
|
+
resolve(request: AIVariableResolutionRequest, context: AIVariableContext): Promise<ResolvedAIVariable | undefined>;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=context-files-variable.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context-files-variable.d.ts","sourceRoot":"","sources":["../../src/common/context-files-variable.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,YAAY,EAAO,MAAM,aAAa,CAAC;AAEhD,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,2BAA2B,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAI/K,eAAO,MAAM,sBAAsB,EAAE,UAIpC,CAAC;AAEF,qBACa,gCAAiC,YAAW,sBAAsB,EAAE,kBAAkB;IAC/F,iBAAiB,CAAC,OAAO,EAAE,iBAAiB,GAAG,IAAI;IAInD,UAAU,CAAC,OAAO,EAAE,2BAA2B,EAAE,OAAO,EAAE,iBAAiB,GAAG,YAAY,CAAC,MAAM,CAAC;IAI5F,OAAO,CAAC,OAAO,EAAE,2BAA2B,EAAE,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,kBAAkB,GAAG,SAAS,CAAC;CAU3H"}
|
|
@@ -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
|
+
exports.ContextFilesVariableContribution = exports.CONTEXT_FILES_VARIABLE = void 0;
|
|
19
|
+
const tslib_1 = require("tslib");
|
|
20
|
+
const core_1 = require("@theia/core");
|
|
21
|
+
const inversify_1 = require("@theia/core/shared/inversify");
|
|
22
|
+
const ai_chat_1 = require("@theia/ai-chat");
|
|
23
|
+
const context_variables_1 = require("./context-variables");
|
|
24
|
+
exports.CONTEXT_FILES_VARIABLE = {
|
|
25
|
+
id: context_variables_1.CONTEXT_FILES_VARIABLE_ID,
|
|
26
|
+
description: core_1.nls.localize('theia/ai/core/contextSummaryVariable/description', 'Describes files in the context for a given session.'),
|
|
27
|
+
name: context_variables_1.CONTEXT_FILES_VARIABLE_ID,
|
|
28
|
+
};
|
|
29
|
+
let ContextFilesVariableContribution = class ContextFilesVariableContribution {
|
|
30
|
+
registerVariables(service) {
|
|
31
|
+
service.registerResolver(exports.CONTEXT_FILES_VARIABLE, this);
|
|
32
|
+
}
|
|
33
|
+
canResolve(request, context) {
|
|
34
|
+
return request.variable.name === exports.CONTEXT_FILES_VARIABLE.name ? 50 : 0;
|
|
35
|
+
}
|
|
36
|
+
async resolve(request, context) {
|
|
37
|
+
if (!ai_chat_1.ChatSessionContext.is(context) || request.variable.name !== exports.CONTEXT_FILES_VARIABLE.name) {
|
|
38
|
+
return undefined;
|
|
39
|
+
}
|
|
40
|
+
const variables = ai_chat_1.ChatSessionContext.getVariables(context);
|
|
41
|
+
return {
|
|
42
|
+
variable: exports.CONTEXT_FILES_VARIABLE,
|
|
43
|
+
value: variables.filter(variable => variable.variable.name === 'file' && !!variable.arg)
|
|
44
|
+
.map(variable => `- ${variable.arg}`).join('\n')
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
exports.ContextFilesVariableContribution = ContextFilesVariableContribution;
|
|
49
|
+
exports.ContextFilesVariableContribution = ContextFilesVariableContribution = tslib_1.__decorate([
|
|
50
|
+
(0, inversify_1.injectable)()
|
|
51
|
+
], ContextFilesVariableContribution);
|
|
52
|
+
//# sourceMappingURL=context-files-variable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context-files-variable.js","sourceRoot":"","sources":["../../src/common/context-files-variable.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,sCAAgD;AAChD,4DAA0D;AAE1D,4CAAoD;AACpD,2DAAgE;AAEnD,QAAA,sBAAsB,GAAe;IAC9C,EAAE,EAAE,6CAAyB;IAC7B,WAAW,EAAE,UAAG,CAAC,QAAQ,CAAC,kDAAkD,EAAE,qDAAqD,CAAC;IACpI,IAAI,EAAE,6CAAyB;CAClC,CAAC;AAGK,IAAM,gCAAgC,GAAtC,MAAM,gCAAgC;IACzC,iBAAiB,CAAC,OAA0B;QACxC,OAAO,CAAC,gBAAgB,CAAC,8BAAsB,EAAE,IAAI,CAAC,CAAC;IAC3D,CAAC;IAED,UAAU,CAAC,OAAoC,EAAE,OAA0B;QACvE,OAAO,OAAO,CAAC,QAAQ,CAAC,IAAI,KAAK,8BAAsB,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;IAC1E,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,OAAoC,EAAE,OAA0B;QAC1E,IAAI,CAAC,4BAAkB,CAAC,EAAE,CAAC,OAAO,CAAC,IAAI,OAAO,CAAC,QAAQ,CAAC,IAAI,KAAK,8BAAsB,CAAC,IAAI,EAAE,CAAC;YAAC,OAAO,SAAS,CAAC;QAAC,CAAC;QACnH,MAAM,SAAS,GAAG,4BAAkB,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;QAE3D,OAAO;YACH,QAAQ,EAAE,8BAAsB;YAChC,KAAK,EAAE,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,KAAK,MAAM,IAAI,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC;iBACnF,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC,KAAK,QAAQ,CAAC,GAAG,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;SACvD,CAAC;IACN,CAAC;CACJ,CAAA;AAnBY,4EAAgC;2CAAhC,gCAAgC;IAD5C,IAAA,sBAAU,GAAE;GACA,gCAAgC,CAmB5C"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const UPDATE_CONTEXT_FILES_FUNCTION_ID = "context_addFile";
|
|
2
|
+
export declare const RESOLVE_CHAT_CONTEXT_FUNCTION_ID = "context_ResolveChatContext";
|
|
3
|
+
export declare const LIST_CHAT_CONTEXT_FUNCTION_ID = "context_ListChatContext";
|
|
4
|
+
//# sourceMappingURL=context-functions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context-functions.d.ts","sourceRoot":"","sources":["../../src/common/context-functions.ts"],"names":[],"mappings":"AAgBA,eAAO,MAAM,gCAAgC,oBAAoB,CAAC;AAClE,eAAO,MAAM,gCAAgC,+BAA+B,CAAC;AAC7E,eAAO,MAAM,6BAA6B,4BAA4B,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
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
|
+
exports.LIST_CHAT_CONTEXT_FUNCTION_ID = exports.RESOLVE_CHAT_CONTEXT_FUNCTION_ID = exports.UPDATE_CONTEXT_FILES_FUNCTION_ID = void 0;
|
|
19
|
+
exports.UPDATE_CONTEXT_FILES_FUNCTION_ID = 'context_addFile';
|
|
20
|
+
exports.RESOLVE_CHAT_CONTEXT_FUNCTION_ID = 'context_ResolveChatContext';
|
|
21
|
+
exports.LIST_CHAT_CONTEXT_FUNCTION_ID = 'context_ListChatContext';
|
|
22
|
+
//# sourceMappingURL=context-functions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context-functions.js","sourceRoot":"","sources":["../../src/common/context-functions.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;;;AAEnE,QAAA,gCAAgC,GAAG,iBAAiB,CAAC;AACrD,QAAA,gCAAgC,GAAG,4BAA4B,CAAC;AAChE,QAAA,6BAA6B,GAAG,yBAAyB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context-variables.d.ts","sourceRoot":"","sources":["../../src/common/context-variables.ts"],"names":[],"mappings":"AAgBA,eAAO,MAAM,yBAAyB,iBAAiB,CAAC;AACxD,eAAO,MAAM,gCAAgC,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
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
|
+
exports.TASK_CONTEXT_SUMMARY_VARIABLE_ID = exports.CONTEXT_FILES_VARIABLE_ID = void 0;
|
|
19
|
+
exports.CONTEXT_FILES_VARIABLE_ID = 'contextFiles';
|
|
20
|
+
exports.TASK_CONTEXT_SUMMARY_VARIABLE_ID = 'taskContextSummary';
|
|
21
|
+
//# sourceMappingURL=context-variables.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context-variables.js","sourceRoot":"","sources":["../../src/common/context-variables.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;;;AAEnE,QAAA,yBAAyB,GAAG,cAAc,CAAC;AAC3C,QAAA,gCAAgC,GAAG,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export declare const SUGGEST_FILE_CONTENT_ID = "suggestFileContent";
|
|
2
|
+
export declare const WRITE_FILE_CONTENT_ID = "writeFileContent";
|
|
3
|
+
/**
|
|
4
|
+
* Default function ID for suggesting file replacements.
|
|
5
|
+
* Uses the improved content replacer implementation (V2) with better matching and error handling.
|
|
6
|
+
* This replaced the previous simpler implementation which is now available as SUGGEST_FILE_REPLACEMENTS_SIMPLE_ID.
|
|
7
|
+
*/
|
|
8
|
+
export declare const SUGGEST_FILE_REPLACEMENTS_ID = "suggestFileReplacements";
|
|
9
|
+
/**
|
|
10
|
+
* Legacy function ID for suggesting file replacements.
|
|
11
|
+
* Uses the original content replacer implementation (V1).
|
|
12
|
+
* @deprecated This is the older implementation. Consider using SUGGEST_FILE_REPLACEMENTS_ID (default) instead.
|
|
13
|
+
* This implementation may be removed in a future version.
|
|
14
|
+
*/
|
|
15
|
+
export declare const SUGGEST_FILE_REPLACEMENTS_SIMPLE_ID = "suggestFileReplacements_Simple";
|
|
16
|
+
export declare const WRITE_FILE_REPLACEMENTS_ID = "writeFileReplacements";
|
|
17
|
+
export declare const CLEAR_FILE_CHANGES_ID = "clearFileChanges";
|
|
18
|
+
export declare const GET_PROPOSED_CHANGES_ID = "getProposedFileState";
|
|
19
|
+
//# sourceMappingURL=file-changeset-function-ids.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-changeset-function-ids.d.ts","sourceRoot":"","sources":["../../src/common/file-changeset-function-ids.ts"],"names":[],"mappings":"AAgBA,eAAO,MAAM,uBAAuB,uBAAuB,CAAC;AAC5D,eAAO,MAAM,qBAAqB,qBAAqB,CAAC;AAExD;;;;GAIG;AACH,eAAO,MAAM,4BAA4B,4BAA4B,CAAC;AAEtE;;;;;GAKG;AACH,eAAO,MAAM,mCAAmC,mCAAmC,CAAC;AAEpF,eAAO,MAAM,0BAA0B,0BAA0B,CAAC;AAClE,eAAO,MAAM,qBAAqB,qBAAqB,CAAC;AACxD,eAAO,MAAM,uBAAuB,yBAAyB,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
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
|
+
exports.GET_PROPOSED_CHANGES_ID = exports.CLEAR_FILE_CHANGES_ID = exports.WRITE_FILE_REPLACEMENTS_ID = exports.SUGGEST_FILE_REPLACEMENTS_SIMPLE_ID = exports.SUGGEST_FILE_REPLACEMENTS_ID = exports.WRITE_FILE_CONTENT_ID = exports.SUGGEST_FILE_CONTENT_ID = void 0;
|
|
19
|
+
exports.SUGGEST_FILE_CONTENT_ID = 'suggestFileContent';
|
|
20
|
+
exports.WRITE_FILE_CONTENT_ID = 'writeFileContent';
|
|
21
|
+
/**
|
|
22
|
+
* Default function ID for suggesting file replacements.
|
|
23
|
+
* Uses the improved content replacer implementation (V2) with better matching and error handling.
|
|
24
|
+
* This replaced the previous simpler implementation which is now available as SUGGEST_FILE_REPLACEMENTS_SIMPLE_ID.
|
|
25
|
+
*/
|
|
26
|
+
exports.SUGGEST_FILE_REPLACEMENTS_ID = 'suggestFileReplacements';
|
|
27
|
+
/**
|
|
28
|
+
* Legacy function ID for suggesting file replacements.
|
|
29
|
+
* Uses the original content replacer implementation (V1).
|
|
30
|
+
* @deprecated This is the older implementation. Consider using SUGGEST_FILE_REPLACEMENTS_ID (default) instead.
|
|
31
|
+
* This implementation may be removed in a future version.
|
|
32
|
+
*/
|
|
33
|
+
exports.SUGGEST_FILE_REPLACEMENTS_SIMPLE_ID = 'suggestFileReplacements_Simple';
|
|
34
|
+
exports.WRITE_FILE_REPLACEMENTS_ID = 'writeFileReplacements';
|
|
35
|
+
exports.CLEAR_FILE_CHANGES_ID = 'clearFileChanges';
|
|
36
|
+
exports.GET_PROPOSED_CHANGES_ID = 'getProposedFileState';
|
|
37
|
+
//# sourceMappingURL=file-changeset-function-ids.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-changeset-function-ids.js","sourceRoot":"","sources":["../../src/common/file-changeset-function-ids.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;;;AAEnE,QAAA,uBAAuB,GAAG,oBAAoB,CAAC;AAC/C,QAAA,qBAAqB,GAAG,kBAAkB,CAAC;AAExD;;;;GAIG;AACU,QAAA,4BAA4B,GAAG,yBAAyB,CAAC;AAEtE;;;;;GAKG;AACU,QAAA,mCAAmC,GAAG,gCAAgC,CAAC;AAEvE,QAAA,0BAA0B,GAAG,uBAAuB,CAAC;AACrD,QAAA,qBAAqB,GAAG,kBAAkB,CAAC;AAC3C,QAAA,uBAAuB,GAAG,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare const GitHubRepoService: unique symbol;
|
|
2
|
+
export declare const githubRepoServicePath = "/services/github-repo";
|
|
3
|
+
export interface GitHubRepoInfo {
|
|
4
|
+
owner: string;
|
|
5
|
+
repo: string;
|
|
6
|
+
}
|
|
7
|
+
export interface GitHubRepoService {
|
|
8
|
+
/**
|
|
9
|
+
* Gets the GitHub repository information for the given workspace path.
|
|
10
|
+
* @param workspacePath The absolute path to the workspace directory
|
|
11
|
+
* @returns GitHub repository info (owner/repo) or undefined if not a GitHub repository
|
|
12
|
+
*/
|
|
13
|
+
getGitHubRepoInfo(workspacePath: string): Promise<GitHubRepoInfo | undefined>;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=github-repo-protocol.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"github-repo-protocol.d.ts","sourceRoot":"","sources":["../../src/common/github-repo-protocol.ts"],"names":[],"mappings":"AAgBA,eAAO,MAAM,iBAAiB,eAA8B,CAAC;AAC7D,eAAO,MAAM,qBAAqB,0BAA0B,CAAC;AAE7D,MAAM,WAAW,cAAc;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,iBAAiB;IAC9B;;;;OAIG;IACH,iBAAiB,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,GAAG,SAAS,CAAC,CAAC;CACjF"}
|
|
@@ -0,0 +1,21 @@
|
|
|
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
|
+
exports.githubRepoServicePath = exports.GitHubRepoService = void 0;
|
|
19
|
+
exports.GitHubRepoService = Symbol('GitHubRepoService');
|
|
20
|
+
exports.githubRepoServicePath = '/services/github-repo';
|
|
21
|
+
//# sourceMappingURL=github-repo-protocol.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"github-repo-protocol.js","sourceRoot":"","sources":["../../src/common/github-repo-protocol.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;;;AAEnE,QAAA,iBAAiB,GAAG,MAAM,CAAC,mBAAmB,CAAC,CAAC;AAChD,QAAA,qBAAqB,GAAG,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { AIVariableContext, LanguageModel, LanguageModelMessage, LanguageModelRequirement, LanguageModelResponse } from '@theia/ai-core';
|
|
2
|
+
import { ChatAgentService } from '@theia/ai-chat/lib/common/chat-agent-service';
|
|
3
|
+
import { ChatToolRequest } from '@theia/ai-chat/lib/common/chat-tool-request-service';
|
|
4
|
+
import { AbstractStreamParsingChatAgent, SystemMessageDescription } from '@theia/ai-chat/lib/common/chat-agents';
|
|
5
|
+
import { MutableChatRequestModel } from '@theia/ai-chat/lib/common/chat-model';
|
|
6
|
+
import { PreferenceService } from '@theia/core';
|
|
7
|
+
export declare const OrchestratorChatAgentId = "Orchestrator";
|
|
8
|
+
export declare class OrchestratorChatAgent extends AbstractStreamParsingChatAgent {
|
|
9
|
+
id: string;
|
|
10
|
+
name: string;
|
|
11
|
+
languageModelRequirements: LanguageModelRequirement[];
|
|
12
|
+
protected defaultLanguageModelPurpose: string;
|
|
13
|
+
prompts: import("@theia/ai-core").PromptVariantSet[];
|
|
14
|
+
description: string;
|
|
15
|
+
iconClass: string;
|
|
16
|
+
agentSpecificVariables: {
|
|
17
|
+
name: string;
|
|
18
|
+
description: string;
|
|
19
|
+
usedInPrompt: boolean;
|
|
20
|
+
}[];
|
|
21
|
+
protected systemPromptId: string;
|
|
22
|
+
private fallBackChatAgentId;
|
|
23
|
+
protected chatAgentService: ChatAgentService;
|
|
24
|
+
protected preferenceService: PreferenceService;
|
|
25
|
+
protected getSystemMessageDescription(context: AIVariableContext): Promise<SystemMessageDescription | undefined>;
|
|
26
|
+
protected getAvailableAgentsForDelegation(excludedAgents: string[]): Array<{
|
|
27
|
+
id: string;
|
|
28
|
+
name: string;
|
|
29
|
+
description: string;
|
|
30
|
+
}>;
|
|
31
|
+
protected getExcludedAgentIds(): string[];
|
|
32
|
+
invoke(request: MutableChatRequestModel): Promise<void>;
|
|
33
|
+
protected sendLlmRequest(request: MutableChatRequestModel, messages: LanguageModelMessage[], toolRequests: ChatToolRequest[], languageModel: LanguageModel): Promise<LanguageModelResponse>;
|
|
34
|
+
protected addContentsToResponse(response: LanguageModelResponse, request: MutableChatRequestModel): Promise<void>;
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=orchestrator-chat-agent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"orchestrator-chat-agent.d.ts","sourceRoot":"","sources":["../../src/common/orchestrator-chat-agent.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,iBAAiB,EAAoC,aAAa,EAAE,oBAAoB,EAAE,wBAAwB,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAE3K,OAAO,EAAE,gBAAgB,EAAE,MAAM,8CAA8C,CAAC;AAChF,OAAO,EAAE,eAAe,EAAE,MAAM,qDAAqD,CAAC;AACtF,OAAO,EAAE,8BAA8B,EAAE,wBAAwB,EAAE,MAAM,uCAAuC,CAAC;AACjH,OAAO,EAAE,uBAAuB,EAAwC,MAAM,sCAAsC,CAAC;AACrH,OAAO,EAAqB,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAInE,eAAO,MAAM,uBAAuB,iBAAiB,CAAC;AAGtD,qBACa,qBAAsB,SAAQ,8BAA8B;IACrE,EAAE,EAAE,MAAM,CAA2B;IACrC,IAAI,SAA2B;IAC/B,yBAAyB,EAAE,wBAAwB,EAAE,CAGlD;IACH,SAAS,CAAC,2BAA2B,EAAE,MAAM,CAAqB;IAEzD,OAAO,8CAA0B;IACjC,WAAW,SAE+F;IAC1G,SAAS,EAAE,MAAM,CAAoC;IACrD,sBAAsB;;;;QAK5B;IAEH,UAAmB,cAAc,EAAE,MAAM,CAA2B;IAEpE,OAAO,CAAC,mBAAmB,CAAe;IAG1C,SAAS,CAAC,gBAAgB,EAAE,gBAAgB,CAAC;IAG7C,SAAS,CAAC,iBAAiB,EAAE,iBAAiB,CAAC;cAEtB,2BAA2B,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,wBAAwB,GAAG,SAAS,CAAC;IAkB/H,SAAS,CAAC,+BAA+B,CAAC,cAAc,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAE,CAAC;IAU7H,SAAS,CAAC,mBAAmB,IAAI,MAAM,EAAE;IAI1B,MAAM,CAAC,OAAO,EAAE,uBAAuB,GAAG,OAAO,CAAC,IAAI,CAAC;cAS7C,cAAc,CACnC,OAAO,EAAE,uBAAuB,EAChC,QAAQ,EAAE,oBAAoB,EAAE,EAChC,YAAY,EAAE,eAAe,EAAE,EAC/B,aAAa,EAAE,aAAa,GAC7B,OAAO,CAAC,qBAAqB,CAAC;cAqBR,qBAAqB,CAAC,QAAQ,EAAE,qBAAqB,EAAE,OAAO,EAAE,uBAAuB,GAAG,OAAO,CAAC,IAAI,CAAC;CA2DnI"}
|