@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,83 @@
|
|
|
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.appTesterTemplateVariant = exports.appTesterTemplate = exports.REQUIRED_MCP_SERVERS = void 0;
|
|
14
|
+
const ai_chat_1 = require("@theia/ai-chat");
|
|
15
|
+
const app_tester_chat_functions_1 = require("../common/app-tester-chat-functions");
|
|
16
|
+
const workspace_functions_1 = require("../common/workspace-functions");
|
|
17
|
+
exports.REQUIRED_MCP_SERVERS = [
|
|
18
|
+
{
|
|
19
|
+
name: 'playwright',
|
|
20
|
+
command: 'npx',
|
|
21
|
+
args: ['-y', '@playwright/mcp@latest',
|
|
22
|
+
'--cdp-endpoint',
|
|
23
|
+
'http://localhost:9222/'],
|
|
24
|
+
autostart: false,
|
|
25
|
+
env: {},
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
name: 'playwright-visual',
|
|
29
|
+
command: 'npx',
|
|
30
|
+
args: ['-y', '@playwright/mcp@latest', '--vision',
|
|
31
|
+
'--cdp-endpoint',
|
|
32
|
+
'http://localhost:9222/'],
|
|
33
|
+
autostart: false,
|
|
34
|
+
env: {},
|
|
35
|
+
}
|
|
36
|
+
];
|
|
37
|
+
exports.appTesterTemplate = {
|
|
38
|
+
id: 'app-tester-system-default',
|
|
39
|
+
template: `{{!-- This prompt is licensed under the MIT License (https://opensource.org/license/mit).
|
|
40
|
+
Made improvements or adaptations to this prompt template? We'd love for you to share it with the community! Contribute back here:
|
|
41
|
+
https://github.com/eclipse-theia/theia/discussions/new?category=prompt-template-contribution --}}
|
|
42
|
+
|
|
43
|
+
You are AppTester, an AI assistant integrated into Theia IDE specifically designed to help developers test running applications using Playwright.
|
|
44
|
+
Your role is to inspect the application for user-specified test scenarios through the Playwright MCP server.
|
|
45
|
+
|
|
46
|
+
## Your Workflow
|
|
47
|
+
1. Help the user build and launch their application
|
|
48
|
+
2. Use Playwright browser automation to validate test scenarios
|
|
49
|
+
3. Report results and provide actionable feedback
|
|
50
|
+
4. Help fix issues when needed
|
|
51
|
+
|
|
52
|
+
## Available Playwright Testing Tools
|
|
53
|
+
You have access to these powerful automation tools:
|
|
54
|
+
${exports.REQUIRED_MCP_SERVERS.map(server => `{{prompt:mcp_${server.name}_tools}}`)}
|
|
55
|
+
|
|
56
|
+
- **~{${app_tester_chat_functions_1.LAUNCH_BROWSER_FUNCTION_ID}}**: Launch the browser. This is required before performing any browser interactions. Always launch a new browser when starting a test session.
|
|
57
|
+
- **~{${app_tester_chat_functions_1.IS_BROWSER_RUNNING_FUNCTION_ID}}**: Check if the browser is running. If a tool fails by saying that the connection failed, you can verify the connection by using this tool.
|
|
58
|
+
- **~{${app_tester_chat_functions_1.CLOSE_BROWSER_FUNCTION_ID}}**: Close the browser.
|
|
59
|
+
- **~{${app_tester_chat_functions_1.QUERY_DOM_FUNCTION_ID}}**: Query the DOM for specific elements and their properties. Only use when explicitly requested by the user.
|
|
60
|
+
- **~{${workspace_functions_1.LIST_LAUNCH_CONFIGURATIONS_FUNCTION_ID}}**: To get a list of all available launch configurations. If there are no launch configurations, ask the user to manually start\
|
|
61
|
+
the App or configure one.
|
|
62
|
+
- **~{${workspace_functions_1.RUN_LAUNCH_CONFIGURATION_FUNCTION_ID}}**: Use this to launch the App under test (in case it is not already running)
|
|
63
|
+
- **~{${workspace_functions_1.STOP_LAUNCH_CONFIGURATION_FUNCTION_ID}}**: To stop Apps once the testing is done
|
|
64
|
+
|
|
65
|
+
Prefer snapshots for investigating the page.
|
|
66
|
+
|
|
67
|
+
## Workflow Approach
|
|
68
|
+
1. **Understand Requirements**: Ask the user to clearly define what needs to be tested
|
|
69
|
+
2. **Launch Browser**: Start a fresh browser instance for testing
|
|
70
|
+
3. **Navigate and Test**: Execute the test scenario methodically
|
|
71
|
+
4. **Document Results**: Provide detailed results with screenshots when helpful
|
|
72
|
+
5. **Clean Up**: Always close the browser when testing is complete
|
|
73
|
+
|
|
74
|
+
## Current Context
|
|
75
|
+
Some files and other pieces of data may have been added by the user to the context of the chat. If any have, the details can be found below.
|
|
76
|
+
{{${ai_chat_1.CHAT_CONTEXT_DETAILS_VARIABLE_ID}}}
|
|
77
|
+
`
|
|
78
|
+
};
|
|
79
|
+
exports.appTesterTemplateVariant = {
|
|
80
|
+
id: 'app-tester-system-empty',
|
|
81
|
+
template: '',
|
|
82
|
+
};
|
|
83
|
+
//# sourceMappingURL=app-tester-prompt-template.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app-tester-prompt-template.js","sourceRoot":"","sources":["../../src/browser/app-tester-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;;;AAGhF,4CAAkE;AAClE,mFAAmK;AAEnK,uEAAoK;AAEvJ,QAAA,oBAAoB,GAA2B;IACxD;QACI,IAAI,EAAE,YAAY;QAClB,OAAO,EAAE,KAAK;QACd,IAAI,EAAE,CAAC,IAAI,EAAE,wBAAwB;YACjC,gBAAgB;YAChB,wBAAwB,CAAC;QAC7B,SAAS,EAAE,KAAK;QAChB,GAAG,EAAE,EAAE;KACV;IACD;QACI,IAAI,EAAE,mBAAmB;QACzB,OAAO,EAAE,KAAK;QACd,IAAI,EAAE,CAAC,IAAI,EAAE,wBAAwB,EAAE,UAAU;YAC7C,gBAAgB;YAChB,wBAAwB,CAAC;QAC7B,SAAS,EAAE,KAAK;QAChB,GAAG,EAAE,EAAE;KACV;CACJ,CAAC;AAEW,QAAA,iBAAiB,GAAuB;IACjD,EAAE,EAAE,2BAA2B;IAC/B,QAAQ,EAAE;;;;;;;;;;;;;;;EAeZ,4BAAoB,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,gBAAgB,MAAM,CAAC,IAAI,UAAU,CAAC;;QAEnE,sDAA0B;QAC1B,0DAA8B;QAC9B,qDAAyB;QACzB,iDAAqB;QACrB,4DAAsC;;QAEtC,0DAAoC;QACpC,2DAAqC;;;;;;;;;;;;;IAazC,0CAAgC;CACnC;CACA,CAAC;AAEW,QAAA,wBAAwB,GAAuB;IACxD,EAAE,EAAE,yBAAyB;IAC7B,QAAQ,EAAE,EAAE;CACf,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { AbstractStreamParsingChatAgent, ChatRequestModel, ChatService, ChatSession, MutableChatRequestModel } from '@theia/ai-chat/lib/common';
|
|
2
|
+
import { LanguageModelRequirement } from '@theia/ai-core';
|
|
3
|
+
export declare class ArchitectAgent extends AbstractStreamParsingChatAgent {
|
|
4
|
+
protected readonly chatService: ChatService;
|
|
5
|
+
name: string;
|
|
6
|
+
id: string;
|
|
7
|
+
languageModelRequirements: LanguageModelRequirement[];
|
|
8
|
+
protected defaultLanguageModelPurpose: string;
|
|
9
|
+
description: string;
|
|
10
|
+
prompts: import("@theia/ai-core").PromptVariantSet[];
|
|
11
|
+
protected systemPromptId: string | undefined;
|
|
12
|
+
invoke(request: MutableChatRequestModel): Promise<void>;
|
|
13
|
+
suggest(context: ChatSession | ChatRequestModel): Promise<void>;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=architect-agent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"architect-agent.d.ts","sourceRoot":"","sources":["../../src/browser/architect-agent.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,8BAA8B,EAAE,gBAAgB,EAAE,WAAW,EAAE,WAAW,EAAoB,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAClK,OAAO,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;AAO1D,qBACa,cAAe,SAAQ,8BAA8B;IACzC,SAAS,CAAC,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAC;IAEjE,IAAI,SAAe;IACnB,EAAE,SAAe;IACjB,yBAAyB,EAAE,wBAAwB,EAAE,CAGlD;IACH,SAAS,CAAC,2BAA2B,EAAE,MAAM,CAAU;IAE9C,WAAW,SAG8G;IACzH,OAAO,8CAA6B;IAC7C,UAAmB,cAAc,EAAE,MAAM,GAAG,SAAS,CAA8B;IAEpE,MAAM,CAAC,OAAO,EAAE,uBAAuB,GAAG,OAAO,CAAC,IAAI,CAAC;IAKhE,OAAO,CAAC,OAAO,EAAE,WAAW,GAAG,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC;CAaxE"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ArchitectAgent = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
// *****************************************************************************
|
|
6
|
+
// Copyright (C) 2024 EclipseSource GmbH.
|
|
7
|
+
//
|
|
8
|
+
// This program and the accompanying materials are made available under the
|
|
9
|
+
// terms of the Eclipse Public License v. 2.0 which is available at
|
|
10
|
+
// http://www.eclipse.org/legal/epl-2.0.
|
|
11
|
+
//
|
|
12
|
+
// This Source Code may also be made available under the following Secondary
|
|
13
|
+
// Licenses when the conditions for such availability set forth in the Eclipse
|
|
14
|
+
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
15
|
+
// with the GNU Classpath Exception which is available at
|
|
16
|
+
// https://www.gnu.org/software/classpath/license.html.
|
|
17
|
+
//
|
|
18
|
+
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
19
|
+
// *****************************************************************************
|
|
20
|
+
const common_1 = require("@theia/ai-chat/lib/common");
|
|
21
|
+
const inversify_1 = require("@theia/core/shared/inversify");
|
|
22
|
+
const architect_prompt_template_1 = require("../common/architect-prompt-template");
|
|
23
|
+
const core_1 = require("@theia/core");
|
|
24
|
+
const markdown_rendering_1 = require("@theia/core/lib/common/markdown-rendering");
|
|
25
|
+
const summarize_session_commands_1 = require("../common/summarize-session-commands");
|
|
26
|
+
let ArchitectAgent = class ArchitectAgent extends common_1.AbstractStreamParsingChatAgent {
|
|
27
|
+
constructor() {
|
|
28
|
+
super(...arguments);
|
|
29
|
+
this.name = 'Architect';
|
|
30
|
+
this.id = 'Architect';
|
|
31
|
+
this.languageModelRequirements = [{
|
|
32
|
+
purpose: 'chat',
|
|
33
|
+
identifier: 'default/code',
|
|
34
|
+
}];
|
|
35
|
+
this.defaultLanguageModelPurpose = 'chat';
|
|
36
|
+
this.description = core_1.nls.localize('theia/ai/workspace/workspaceAgent/description', 'An AI assistant integrated into Theia IDE, designed to assist software developers. This agent can access the users workspace, it can get a list of all available files \
|
|
37
|
+
and folders and retrieve their content. It cannot modify files. It can therefore answer questions about the current project, project files and source code in the \
|
|
38
|
+
workspace, such as how to build the project, where to put source code, where to find specific code or configurations, etc.');
|
|
39
|
+
this.prompts = [architect_prompt_template_1.architectSystemVariants];
|
|
40
|
+
this.systemPromptId = architect_prompt_template_1.architectSystemVariants.id;
|
|
41
|
+
}
|
|
42
|
+
async invoke(request) {
|
|
43
|
+
await super.invoke(request);
|
|
44
|
+
this.suggest(request);
|
|
45
|
+
}
|
|
46
|
+
async suggest(context) {
|
|
47
|
+
const model = common_1.ChatRequestModel.is(context) ? context.session : context.model;
|
|
48
|
+
const session = this.chatService.getSessions().find(candidate => candidate.model.id === model.id);
|
|
49
|
+
if (!(model instanceof common_1.MutableChatModel) || !session) {
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
if (!model.isEmpty()) {
|
|
53
|
+
model.setSuggestions([
|
|
54
|
+
new markdown_rendering_1.MarkdownStringImpl(`[${core_1.nls.localize('theia/ai/ide/architectAgent/suggestion/summarizeSessionAsTaskForCoder', 'Summarize this session as a task for Coder')}](command:${summarize_session_commands_1.AI_SUMMARIZE_SESSION_AS_TASK_FOR_CODER.id}).`),
|
|
55
|
+
new markdown_rendering_1.MarkdownStringImpl(`[${core_1.nls.localize('theia/ai/ide/architectAgent/suggestion/updateTaskContext', 'Update current task context')}](command:${summarize_session_commands_1.AI_UPDATE_TASK_CONTEXT_COMMAND.id}).`)
|
|
56
|
+
]);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
exports.ArchitectAgent = ArchitectAgent;
|
|
61
|
+
tslib_1.__decorate([
|
|
62
|
+
(0, inversify_1.inject)(common_1.ChatService),
|
|
63
|
+
tslib_1.__metadata("design:type", Object)
|
|
64
|
+
], ArchitectAgent.prototype, "chatService", void 0);
|
|
65
|
+
exports.ArchitectAgent = ArchitectAgent = tslib_1.__decorate([
|
|
66
|
+
(0, inversify_1.injectable)()
|
|
67
|
+
], ArchitectAgent);
|
|
68
|
+
//# sourceMappingURL=architect-agent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"architect-agent.js","sourceRoot":"","sources":["../../src/browser/architect-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;AAChF,sDAAkK;AAElK,4DAAkE;AAClE,mFAA8E;AAC9E,sCAAkC;AAClC,kFAA+E;AAC/E,qFAA8H;AAGvH,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,uCAA8B;IAA3D;;QAGH,SAAI,GAAG,WAAW,CAAC;QACnB,OAAE,GAAG,WAAW,CAAC;QACjB,8BAAyB,GAA+B,CAAC;gBACrD,OAAO,EAAE,MAAM;gBACf,UAAU,EAAE,cAAc;aAC7B,CAAC,CAAC;QACO,gCAA2B,GAAW,MAAM,CAAC;QAE9C,gBAAW,GAAG,UAAG,CAAC,QAAQ,CAAC,+CAA+C,EAC/E;;oIAE4H,CAAC,CAAC;QACzH,YAAO,GAAG,CAAC,mDAAuB,CAAC,CAAC;QAC1B,mBAAc,GAAuB,mDAAuB,CAAC,EAAE,CAAC;IAoBvF,CAAC;IAlBY,KAAK,CAAC,MAAM,CAAC,OAAgC;QAClD,MAAM,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QAC5B,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IAC1B,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,OAAuC;QACjD,MAAM,KAAK,GAAG,yBAAgB,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC;QAC7E,MAAM,OAAO,GAAG,IAAI,CAAC,WAAW,CAAC,WAAW,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,KAAK,KAAK,CAAC,EAAE,CAAC,CAAC;QAClG,IAAI,CAAC,CAAC,KAAK,YAAY,yBAAgB,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;YAAC,OAAO;QAAC,CAAC;QACjE,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,EAAE,CAAC;YACnB,KAAK,CAAC,cAAc,CAAC;gBACjB,IAAI,uCAAkB,CAAC,IAAI,UAAG,CAAC,QAAQ,CAAC,uEAAuE,EAC3G,4CAA4C,CAAC,aAAa,mEAAsC,CAAC,EAAE,IAAI,CAAC;gBAC5G,IAAI,uCAAkB,CAAC,IAAI,UAAG,CAAC,QAAQ,CAAC,0DAA0D,EAC9F,6BAA6B,CAAC,aAAa,2DAA8B,CAAC,EAAE,IAAI,CAAC;aACxF,CAAC,CAAC;QACP,CAAC;IACL,CAAC;CACJ,CAAA;AApCY,wCAAc;AACiB;IAAvC,IAAA,kBAAM,EAAC,oBAAW,CAAC;;mDAA6C;yBADxD,cAAc;IAD1B,IAAA,sBAAU,GAAE;GACA,cAAc,CAoC1B"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { AbstractStreamParsingChatAgent, ChatRequestModel, ChatService, ChatSession, MutableChatRequestModel } from '@theia/ai-chat/lib/common';
|
|
2
|
+
import { LanguageModelRequirement, PromptVariantSet } from '@theia/ai-core';
|
|
3
|
+
export declare class CoderAgent extends AbstractStreamParsingChatAgent {
|
|
4
|
+
protected readonly chatService: ChatService;
|
|
5
|
+
id: string;
|
|
6
|
+
name: string;
|
|
7
|
+
languageModelRequirements: LanguageModelRequirement[];
|
|
8
|
+
protected defaultLanguageModelPurpose: string;
|
|
9
|
+
description: string;
|
|
10
|
+
prompts: PromptVariantSet[];
|
|
11
|
+
protected systemPromptId: string | undefined;
|
|
12
|
+
invoke(request: MutableChatRequestModel): Promise<void>;
|
|
13
|
+
suggest(context: ChatSession | ChatRequestModel): Promise<void>;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=coder-agent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coder-agent.d.ts","sourceRoot":"","sources":["../../src/browser/coder-agent.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,8BAA8B,EAAE,gBAAgB,EAAE,WAAW,EAAE,WAAW,EAAoB,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAIlK,OAAO,EAAE,wBAAwB,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAK5E,qBACa,UAAW,SAAQ,8BAA8B;IACrC,SAAS,CAAC,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAC;IACjE,EAAE,EAAE,MAAM,CAAW;IACrB,IAAI,SAAW;IACf,yBAAyB,EAAE,wBAAwB,EAAE,CAGlD;IACH,SAAS,CAAC,2BAA2B,EAAE,MAAM,CAAU;IAE9C,WAAW,SAGgB;IAC3B,OAAO,EAAE,gBAAgB,EAAE,CAIjC;IACH,UAAmB,cAAc,EAAE,MAAM,GAAG,SAAS,CAA0B;IAChE,MAAM,CAAC,OAAO,EAAE,uBAAuB,GAAG,OAAO,CAAC,IAAI,CAAC;IAIhE,OAAO,CAAC,OAAO,EAAE,WAAW,GAAG,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC;CAsBxE"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CoderAgent = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
// *****************************************************************************
|
|
6
|
+
// Copyright (C) 2025 EclipseSource GmbH.
|
|
7
|
+
//
|
|
8
|
+
// This program and the accompanying materials are made available under the
|
|
9
|
+
// terms of the Eclipse Public License v. 2.0 which is available at
|
|
10
|
+
// http://www.eclipse.org/legal/epl-2.0.
|
|
11
|
+
//
|
|
12
|
+
// This Source Code may also be made available under the following Secondary
|
|
13
|
+
// Licenses when the conditions for such availability set forth in the Eclipse
|
|
14
|
+
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
15
|
+
// with the GNU Classpath Exception which is available at
|
|
16
|
+
// https://www.gnu.org/software/classpath/license.html.
|
|
17
|
+
//
|
|
18
|
+
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
19
|
+
// *****************************************************************************
|
|
20
|
+
const common_1 = require("@theia/ai-chat/lib/common");
|
|
21
|
+
const inversify_1 = require("@theia/core/shared/inversify");
|
|
22
|
+
const coder_replace_prompt_template_1 = require("../common/coder-replace-prompt-template");
|
|
23
|
+
const core_1 = require("@theia/core");
|
|
24
|
+
const markdown_rendering_1 = require("@theia/core/lib/common/markdown-rendering");
|
|
25
|
+
const chat_view_commands_1 = require("@theia/ai-chat-ui/lib/browser/chat-view-commands");
|
|
26
|
+
let CoderAgent = class CoderAgent extends common_1.AbstractStreamParsingChatAgent {
|
|
27
|
+
constructor() {
|
|
28
|
+
super(...arguments);
|
|
29
|
+
this.id = 'Coder';
|
|
30
|
+
this.name = 'Coder';
|
|
31
|
+
this.languageModelRequirements = [{
|
|
32
|
+
purpose: 'chat',
|
|
33
|
+
identifier: 'default/code',
|
|
34
|
+
}];
|
|
35
|
+
this.defaultLanguageModelPurpose = 'chat';
|
|
36
|
+
this.description = core_1.nls.localize('theia/ai/workspace/coderAgent/description', 'An AI assistant integrated into Theia IDE, designed to assist software developers. This agent can access the users workspace, it can get a list of all available files \
|
|
37
|
+
and folders and retrieve their content. Furthermore, it can suggest modifications of files to the user. It can therefore assist the user with coding tasks or other \
|
|
38
|
+
tasks involving file changes.');
|
|
39
|
+
this.prompts = [{
|
|
40
|
+
id: coder_replace_prompt_template_1.CODER_SYSTEM_PROMPT_ID,
|
|
41
|
+
defaultVariant: (0, coder_replace_prompt_template_1.getCoderPromptTemplateEdit)(),
|
|
42
|
+
variants: [(0, coder_replace_prompt_template_1.getCoderPromptTemplateSimpleEdit)(), (0, coder_replace_prompt_template_1.getCoderAgentModePromptTemplate)(), (0, coder_replace_prompt_template_1.getCoderPromptTemplateEditNext)()]
|
|
43
|
+
}];
|
|
44
|
+
this.systemPromptId = coder_replace_prompt_template_1.CODER_SYSTEM_PROMPT_ID;
|
|
45
|
+
}
|
|
46
|
+
async invoke(request) {
|
|
47
|
+
await super.invoke(request);
|
|
48
|
+
this.suggest(request);
|
|
49
|
+
}
|
|
50
|
+
async suggest(context) {
|
|
51
|
+
const contextIsRequest = common_1.ChatRequestModel.is(context);
|
|
52
|
+
const model = contextIsRequest ? context.session : context.model;
|
|
53
|
+
const session = contextIsRequest ? this.chatService.getSessions().find(candidate => candidate.model.id === model.id) : context;
|
|
54
|
+
if (!(model instanceof common_1.MutableChatModel) || !session) {
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
if (model.isEmpty()) {
|
|
58
|
+
model.setSuggestions([
|
|
59
|
+
{
|
|
60
|
+
kind: 'callback',
|
|
61
|
+
callback: () => this.chatService.sendRequest(session.id, {
|
|
62
|
+
text: `@Coder ${core_1.nls.localize('theia/ai/ide/coderAgent/suggestion/fixProblems/prompt', 'please look at {1} and fix any problems.', '#_f')}`
|
|
63
|
+
}),
|
|
64
|
+
content: core_1.nls.localize('theia/ai/ide/coderAgent/suggestion/fixProblems/content', '[Fix problems]({0}) in the current file.', '_callback')
|
|
65
|
+
},
|
|
66
|
+
]);
|
|
67
|
+
}
|
|
68
|
+
else {
|
|
69
|
+
model.setSuggestions([new markdown_rendering_1.MarkdownStringImpl(core_1.nls.localize('theia/ai/ide/coderAgent/suggestion/startNewChat', 'Keep chats short and focused. [Start a new chat]({0}) for a new task or [start a new chat with a summary of this one]({1}).', `command:${chat_view_commands_1.AI_CHAT_NEW_CHAT_WINDOW_COMMAND.id}`, `command:${chat_view_commands_1.ChatCommands.AI_CHAT_NEW_WITH_TASK_CONTEXT.id}`))]);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
exports.CoderAgent = CoderAgent;
|
|
74
|
+
tslib_1.__decorate([
|
|
75
|
+
(0, inversify_1.inject)(common_1.ChatService),
|
|
76
|
+
tslib_1.__metadata("design:type", Object)
|
|
77
|
+
], CoderAgent.prototype, "chatService", void 0);
|
|
78
|
+
exports.CoderAgent = CoderAgent = tslib_1.__decorate([
|
|
79
|
+
(0, inversify_1.injectable)()
|
|
80
|
+
], CoderAgent);
|
|
81
|
+
//# sourceMappingURL=coder-agent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coder-agent.js","sourceRoot":"","sources":["../../src/browser/coder-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;AAChF,sDAAkK;AAClK,4DAAkE;AAClE,2FACmD;AAEnD,sCAAkC;AAClC,kFAA+E;AAC/E,yFAAiH;AAG1G,IAAM,UAAU,GAAhB,MAAM,UAAW,SAAQ,uCAA8B;IAAvD;;QAEH,OAAE,GAAW,OAAO,CAAC;QACrB,SAAI,GAAG,OAAO,CAAC;QACf,8BAAyB,GAA+B,CAAC;gBACrD,OAAO,EAAE,MAAM;gBACf,U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B,QAAQ,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,OAAO,CAAC,EAAE,EAAE;wBACrD,IAAI,EAAE,UAAU,UAAG,CAAC,QAAQ,CAAC,uDAAuD,EAAE,0CAA0C,EAAE,KAAK,CAAC,EAAE;qBAC7I,CAAC;oBACF,OAAO,EAAE,UAAG,CAAC,QAAQ,CAAC,wDAAwD,EAAE,0CAA0C,EAAE,WAAW,CAAC;iBAC3I;aACJ,CAAC,CAAC;QACP,CAAC;aAAM,CAAC;YACJ,KAAK,CAAC,cAAc,CAAC,CAAC,IAAI,uCAAkB,CAAC,UAAG,CAAC,QAAQ,CAAC,iDAAiD,EACvG,6HAA6H,EAC7H,WAAW,oDAA+B,CAAC,EAAE,EAAE,EAAE,WAAW,iCAAY,CAAC,6BAA6B,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;QACxH,CAAC;IACL,CAAC;CAEJ,CAAA;AA9CY,gCAAU;AACqB;IAAvC,IAAA,kBAAM,EAAC,oBAAW,CAAC;;+CAA6C;qBADxD,UAAU;IADtB,IAAA,sBAAU,GAAE;GACA,UAAU,CA8CtB"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { URI } from '@theia/core';
|
|
2
|
+
import { FileService } from '@theia/filesystem/lib/browser/file-service';
|
|
3
|
+
import { WorkspaceService } from '@theia/workspace/lib/browser/workspace-service';
|
|
4
|
+
import { ContextFileValidationService, FileValidationResult } from '@theia/ai-chat/lib/browser/context-file-validation-service';
|
|
5
|
+
import { WorkspaceFunctionScope } from './workspace-functions';
|
|
6
|
+
export declare class ContextFileValidationServiceImpl implements ContextFileValidationService {
|
|
7
|
+
protected readonly fileService: FileService;
|
|
8
|
+
protected readonly workspaceScope: WorkspaceFunctionScope;
|
|
9
|
+
protected readonly workspaceService: WorkspaceService;
|
|
10
|
+
validateFile(pathOrUri: string | URI): Promise<FileValidationResult>;
|
|
11
|
+
protected findInSecondaryWorkspaceRoots(pathOrUri: string | URI): Promise<URI | undefined>;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=context-file-validation-service-impl.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context-file-validation-service-impl.d.ts","sourceRoot":"","sources":["../../src/browser/context-file-validation-service-impl.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAClC,OAAO,EAAE,WAAW,EAAE,MAAM,4CAA4C,CAAC;AACzE,OAAO,EAAE,gBAAgB,EAAE,MAAM,gDAAgD,CAAC;AAClF,OAAO,EAAE,4BAA4B,EAAE,oBAAoB,EAAuB,MAAM,4DAA4D,CAAC;AACrJ,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAE/D,qBACa,gCAAiC,YAAW,4BAA4B;IAGjF,SAAS,CAAC,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAC;IAG5C,SAAS,CAAC,QAAQ,CAAC,cAAc,EAAE,sBAAsB,CAAC;IAG1D,SAAS,CAAC,QAAQ,CAAC,gBAAgB,EAAE,gBAAgB,CAAC;IAEhD,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,GAAG,GAAG,OAAO,CAAC,oBAAoB,CAAC;cAmD1D,6BAA6B,CAAC,SAAS,EAAE,MAAM,GAAG,GAAG,GAAG,OAAO,CAAC,GAAG,GAAG,SAAS,CAAC;CAiCnG"}
|
|
@@ -0,0 +1,123 @@
|
|
|
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.ContextFileValidationServiceImpl = void 0;
|
|
19
|
+
const tslib_1 = require("tslib");
|
|
20
|
+
const inversify_1 = require("@theia/core/shared/inversify");
|
|
21
|
+
const core_1 = require("@theia/core");
|
|
22
|
+
const file_service_1 = require("@theia/filesystem/lib/browser/file-service");
|
|
23
|
+
const workspace_service_1 = require("@theia/workspace/lib/browser/workspace-service");
|
|
24
|
+
const context_file_validation_service_1 = require("@theia/ai-chat/lib/browser/context-file-validation-service");
|
|
25
|
+
const workspace_functions_1 = require("./workspace-functions");
|
|
26
|
+
let ContextFileValidationServiceImpl = class ContextFileValidationServiceImpl {
|
|
27
|
+
async validateFile(pathOrUri) {
|
|
28
|
+
try {
|
|
29
|
+
const resolvedUri = await this.workspaceScope.resolveToUri(pathOrUri);
|
|
30
|
+
if (!resolvedUri) {
|
|
31
|
+
return {
|
|
32
|
+
state: context_file_validation_service_1.FileValidationState.INVALID_NOT_FOUND,
|
|
33
|
+
message: 'File does not exist'
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
const exists = await this.fileService.exists(resolvedUri);
|
|
37
|
+
if (!exists) {
|
|
38
|
+
const secondaryRootUri = await this.findInSecondaryWorkspaceRoots(pathOrUri);
|
|
39
|
+
if (secondaryRootUri) {
|
|
40
|
+
return {
|
|
41
|
+
state: context_file_validation_service_1.FileValidationState.INVALID_SECONDARY,
|
|
42
|
+
message: 'File is in a secondary workspace root. AI agents can only access files in the first workspace root.'
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
return {
|
|
46
|
+
state: context_file_validation_service_1.FileValidationState.INVALID_NOT_FOUND,
|
|
47
|
+
message: 'File does not exist'
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
if (this.workspaceScope.isInPrimaryWorkspace(resolvedUri)) {
|
|
51
|
+
return {
|
|
52
|
+
state: context_file_validation_service_1.FileValidationState.VALID
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
if (this.workspaceScope.isInWorkspace(resolvedUri)) {
|
|
56
|
+
return {
|
|
57
|
+
state: context_file_validation_service_1.FileValidationState.INVALID_SECONDARY,
|
|
58
|
+
message: 'File is in a secondary workspace root. AI agents can only access files in the first workspace root.'
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
return {
|
|
62
|
+
state: context_file_validation_service_1.FileValidationState.INVALID_NOT_FOUND,
|
|
63
|
+
message: 'File does not exist in the workspace'
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
catch (error) {
|
|
67
|
+
return {
|
|
68
|
+
state: context_file_validation_service_1.FileValidationState.INVALID_NOT_FOUND,
|
|
69
|
+
message: 'File does not exist'
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
async findInSecondaryWorkspaceRoots(pathOrUri) {
|
|
74
|
+
const roots = this.workspaceService.tryGetRoots();
|
|
75
|
+
if (roots.length <= 1) {
|
|
76
|
+
return undefined;
|
|
77
|
+
}
|
|
78
|
+
for (let i = 1; i < roots.length; i++) {
|
|
79
|
+
const root = roots[i];
|
|
80
|
+
let candidateUri;
|
|
81
|
+
if (pathOrUri instanceof core_1.URI) {
|
|
82
|
+
candidateUri = pathOrUri;
|
|
83
|
+
}
|
|
84
|
+
else if (pathOrUri.includes('://')) {
|
|
85
|
+
try {
|
|
86
|
+
candidateUri = new core_1.URI(pathOrUri);
|
|
87
|
+
}
|
|
88
|
+
catch {
|
|
89
|
+
continue;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
else {
|
|
93
|
+
candidateUri = root.resource.resolve(pathOrUri);
|
|
94
|
+
}
|
|
95
|
+
try {
|
|
96
|
+
if (await this.fileService.exists(candidateUri)) {
|
|
97
|
+
return candidateUri;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
catch {
|
|
101
|
+
continue;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
return undefined;
|
|
105
|
+
}
|
|
106
|
+
};
|
|
107
|
+
exports.ContextFileValidationServiceImpl = ContextFileValidationServiceImpl;
|
|
108
|
+
tslib_1.__decorate([
|
|
109
|
+
(0, inversify_1.inject)(file_service_1.FileService),
|
|
110
|
+
tslib_1.__metadata("design:type", file_service_1.FileService)
|
|
111
|
+
], ContextFileValidationServiceImpl.prototype, "fileService", void 0);
|
|
112
|
+
tslib_1.__decorate([
|
|
113
|
+
(0, inversify_1.inject)(workspace_functions_1.WorkspaceFunctionScope),
|
|
114
|
+
tslib_1.__metadata("design:type", workspace_functions_1.WorkspaceFunctionScope)
|
|
115
|
+
], ContextFileValidationServiceImpl.prototype, "workspaceScope", void 0);
|
|
116
|
+
tslib_1.__decorate([
|
|
117
|
+
(0, inversify_1.inject)(workspace_service_1.WorkspaceService),
|
|
118
|
+
tslib_1.__metadata("design:type", workspace_service_1.WorkspaceService)
|
|
119
|
+
], ContextFileValidationServiceImpl.prototype, "workspaceService", void 0);
|
|
120
|
+
exports.ContextFileValidationServiceImpl = ContextFileValidationServiceImpl = tslib_1.__decorate([
|
|
121
|
+
(0, inversify_1.injectable)()
|
|
122
|
+
], ContextFileValidationServiceImpl);
|
|
123
|
+
//# sourceMappingURL=context-file-validation-service-impl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context-file-validation-service-impl.js","sourceRoot":"","sources":["../../src/browser/context-file-validation-service-impl.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA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gBACL,SAAS;YACb,CAAC;QACL,CAAC;QAED,OAAO,SAAS,CAAC;IACrB,CAAC;CACJ,CAAA;AA/FY,4EAAgC;AAGtB;IADlB,IAAA,kBAAM,EAAC,0BAAW,CAAC;sCACY,0BAAW;qEAAC;AAGzB;IADlB,IAAA,kBAAM,EAAC,4CAAsB,CAAC;sCACI,4CAAsB;wEAAC;AAGvC;IADlB,IAAA,kBAAM,EAAC,oCAAgB,CAAC;sCACY,oCAAgB;0EAAC;2CAT7C,gCAAgC;IAD5C,IAAA,sBAAU,GAAE;GACA,gCAAgC,CA+F5C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context-file-validation-service-impl.spec.d.ts","sourceRoot":"","sources":["../../src/browser/context-file-validation-service-impl.spec.ts"],"names":[],"mappings":""}
|