@theia/ai-ide 1.70.0-next.11 → 1.70.0-next.15
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/analyze-gh-ticket-command-contribution.d.ts.map +1 -1
- package/lib/browser/analyze-gh-ticket-command-contribution.js +4 -2
- package/lib/browser/analyze-gh-ticket-command-contribution.js.map +1 -1
- package/lib/browser/app-tester-prompt-template.d.ts.map +1 -1
- package/lib/browser/app-tester-prompt-template.js +222 -2
- package/lib/browser/app-tester-prompt-template.js.map +1 -1
- package/lib/browser/apptester-capability-contribution.d.ts.map +1 -1
- package/lib/browser/apptester-capability-contribution.js +112 -29
- package/lib/browser/apptester-capability-contribution.js.map +1 -1
- package/lib/browser/architect-agent.d.ts +1 -0
- package/lib/browser/architect-agent.d.ts.map +1 -1
- package/lib/browser/architect-agent.js +9 -4
- package/lib/browser/architect-agent.js.map +1 -1
- package/lib/{common → browser}/architect-prompt-template.d.ts +1 -0
- package/lib/browser/architect-prompt-template.d.ts.map +1 -0
- package/lib/browser/architect-prompt-template.js +436 -0
- package/lib/browser/architect-prompt-template.js.map +1 -0
- package/lib/browser/code-review-capability-contribution.d.ts +8 -0
- package/lib/browser/code-review-capability-contribution.d.ts.map +1 -0
- package/lib/browser/code-review-capability-contribution.js +110 -0
- package/lib/browser/code-review-capability-contribution.js.map +1 -0
- package/lib/browser/code-reviewer-agent.d.ts +17 -0
- package/lib/browser/code-reviewer-agent.d.ts.map +1 -0
- package/lib/browser/code-reviewer-agent.js +45 -0
- package/lib/browser/code-reviewer-agent.js.map +1 -0
- package/lib/browser/code-reviewer-prompt-template.d.ts +4 -0
- package/lib/browser/code-reviewer-prompt-template.d.ts.map +1 -0
- package/lib/browser/code-reviewer-prompt-template.js +132 -0
- package/lib/browser/code-reviewer-prompt-template.js.map +1 -0
- package/lib/browser/coder-agent.d.ts +1 -0
- package/lib/browser/coder-agent.d.ts.map +1 -1
- package/lib/browser/coder-agent.js +4 -3
- package/lib/browser/coder-agent.js.map +1 -1
- package/lib/browser/context-reviewer-agent.d.ts +17 -0
- package/lib/browser/context-reviewer-agent.d.ts.map +1 -0
- package/lib/browser/context-reviewer-agent.js +45 -0
- package/lib/browser/context-reviewer-agent.js.map +1 -0
- package/lib/browser/context-reviewer-prompt-template.d.ts +4 -0
- package/lib/browser/context-reviewer-prompt-template.d.ts.map +1 -0
- package/lib/browser/context-reviewer-prompt-template.js +160 -0
- package/lib/browser/context-reviewer-prompt-template.js.map +1 -0
- package/lib/browser/debug-capability-contribution.d.ts +8 -0
- package/lib/browser/debug-capability-contribution.d.ts.map +1 -0
- package/lib/browser/debug-capability-contribution.js +97 -0
- package/lib/browser/debug-capability-contribution.js.map +1 -0
- package/lib/browser/default-chat-agent-recommendation-service.d.ts.map +1 -1
- package/lib/browser/default-chat-agent-recommendation-service.js +4 -2
- package/lib/browser/default-chat-agent-recommendation-service.js.map +1 -1
- package/lib/browser/explore-agent.d.ts +17 -0
- package/lib/browser/explore-agent.d.ts.map +1 -0
- package/lib/browser/explore-agent.js +45 -0
- package/lib/browser/explore-agent.js.map +1 -0
- package/lib/browser/explore-prompt-template.d.ts +4 -0
- package/lib/browser/explore-prompt-template.d.ts.map +1 -0
- package/lib/browser/explore-prompt-template.js +121 -0
- package/lib/browser/explore-prompt-template.js.map +1 -0
- package/lib/browser/frontend-module.d.ts.map +1 -1
- package/lib/browser/frontend-module.js +22 -0
- package/lib/browser/frontend-module.js.map +1 -1
- package/lib/browser/junior-agent.d.ts +17 -0
- package/lib/browser/junior-agent.d.ts.map +1 -0
- package/lib/browser/junior-agent.js +45 -0
- package/lib/browser/junior-agent.js.map +1 -0
- package/lib/browser/junior-plan-capability-contribution.d.ts +8 -0
- package/lib/browser/junior-plan-capability-contribution.d.ts.map +1 -0
- package/lib/browser/junior-plan-capability-contribution.js +127 -0
- package/lib/browser/junior-plan-capability-contribution.js.map +1 -0
- package/lib/browser/junior-prompt-template.d.ts +4 -0
- package/lib/browser/junior-prompt-template.d.ts.map +1 -0
- package/lib/browser/junior-prompt-template.js +153 -0
- package/lib/browser/junior-prompt-template.js.map +1 -0
- package/lib/browser/remember-command-contribution.d.ts.map +1 -1
- package/lib/browser/remember-command-contribution.js +3 -1
- package/lib/browser/remember-command-contribution.js.map +1 -1
- package/lib/browser/task-context-functions.d.ts.map +1 -1
- package/lib/browser/task-context-functions.js +16 -5
- package/lib/browser/task-context-functions.js.map +1 -1
- package/lib/common/coder-replace-prompt-template.d.ts.map +1 -1
- package/lib/common/coder-replace-prompt-template.js +246 -1
- package/lib/common/coder-replace-prompt-template.js.map +1 -1
- package/package.json +22 -22
- package/src/browser/analyze-gh-ticket-command-contribution.ts +4 -2
- package/src/browser/app-tester-prompt-template.ts +222 -3
- package/src/browser/apptester-capability-contribution.ts +114 -32
- package/src/browser/architect-agent.ts +9 -3
- package/src/browser/architect-prompt-template.ts +458 -0
- package/src/browser/code-review-capability-contribution.ts +108 -0
- package/src/browser/code-reviewer-agent.ts +40 -0
- package/src/browser/code-reviewer-prompt-template.ts +132 -0
- package/src/browser/coder-agent.ts +4 -2
- package/src/browser/context-reviewer-agent.ts +40 -0
- package/src/browser/context-reviewer-prompt-template.ts +160 -0
- package/src/browser/debug-capability-contribution.ts +95 -0
- package/src/browser/default-chat-agent-recommendation-service.ts +4 -2
- package/src/browser/explore-agent.ts +40 -0
- package/src/browser/explore-prompt-template.ts +121 -0
- package/src/browser/frontend-module.ts +27 -0
- package/src/browser/junior-agent.ts +40 -0
- package/src/browser/junior-plan-capability-contribution.ts +125 -0
- package/src/browser/junior-prompt-template.ts +153 -0
- package/src/browser/remember-command-contribution.ts +3 -1
- package/src/browser/task-context-functions.ts +16 -5
- package/src/common/coder-replace-prompt-template.ts +247 -1
- package/lib/common/architect-prompt-template.d.ts.map +0 -1
- package/lib/common/architect-prompt-template.js +0 -203
- package/lib/common/architect-prompt-template.js.map +0 -1
- package/src/common/architect-prompt-template.ts +0 -224
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"analyze-gh-ticket-command-contribution.d.ts","sourceRoot":"","sources":["../../src/browser/analyze-gh-ticket-command-contribution.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,+BAA+B,EAAE,MAAM,yBAAyB,CAAC;AAE1E,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"analyze-gh-ticket-command-contribution.d.ts","sourceRoot":"","sources":["../../src/browser/analyze-gh-ticket-command-contribution.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,+BAA+B,EAAE,MAAM,yBAAyB,CAAC;AAE1E,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAO1D,qBACa,mCAAoC,YAAW,+BAA+B;IAGvF,SAAS,CAAC,QAAQ,CAAC,aAAa,EAAE,aAAa,CAAC;IAEhD,OAAO,IAAI,IAAI;IAIf,SAAS,CAAC,2BAA2B,IAAI,IAAI;IAoB7C,SAAS,CAAC,oBAAoB,IAAI,MAAM;CA0H3C"}
|
|
@@ -22,6 +22,8 @@ const common_1 = require("@theia/ai-core/lib/common");
|
|
|
22
22
|
const core_1 = require("@theia/core");
|
|
23
23
|
const ai_core_1 = require("@theia/ai-core");
|
|
24
24
|
const github_chat_agent_1 = require("./github-chat-agent");
|
|
25
|
+
const architect_agent_1 = require("./architect-agent");
|
|
26
|
+
const coder_agent_1 = require("./coder-agent");
|
|
25
27
|
let AnalyzesGhTicketCommandContribution = class AnalyzesGhTicketCommandContribution {
|
|
26
28
|
onStart() {
|
|
27
29
|
this.registerGitHubTicketCommand();
|
|
@@ -35,7 +37,7 @@ let AnalyzesGhTicketCommandContribution = class AnalyzesGhTicketCommandContribut
|
|
|
35
37
|
commandName: 'analyze-gh-ticket',
|
|
36
38
|
commandDescription: core_1.nls.localize('theia/ai-ide/ticketCommand/description', 'Analyze a GitHub ticket and create an implementation plan'),
|
|
37
39
|
commandArgumentHint: core_1.nls.localize('theia/ai-ide/ticketCommand/argumentHint', '<ticket-number>'),
|
|
38
|
-
commandAgents: [
|
|
40
|
+
commandAgents: [architect_agent_1.ArchitectAgentId]
|
|
39
41
|
});
|
|
40
42
|
}
|
|
41
43
|
buildCommandTemplate() {
|
|
@@ -155,7 +157,7 @@ Example response format:
|
|
|
155
157
|
- [Criterion 2]
|
|
156
158
|
|
|
157
159
|
### Next Steps
|
|
158
|
-
To implement this plan, you can ask
|
|
160
|
+
To implement this plan, you can ask @${coder_agent_1.CoderAgentId} to execute it.
|
|
159
161
|
\`\`\`
|
|
160
162
|
|
|
161
163
|
Remember: Be thorough in your analysis. It's better to ask for clarification than to create an incomplete or incorrect implementation plan.`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"analyze-gh-ticket-command-contribution.js","sourceRoot":"","sources":["../../src/browser/analyze-gh-ticket-command-contribution.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;;;AAGhF,4DAAkE;AAClE,sDAA0D;AAC1D,sCAAkC;AAClC,4CAA8D;AAC9D,2DAAwD;
|
|
1
|
+
{"version":3,"file":"analyze-gh-ticket-command-contribution.js","sourceRoot":"","sources":["../../src/browser/analyze-gh-ticket-command-contribution.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;;;AAGhF,4DAAkE;AAClE,sDAA0D;AAC1D,sCAAkC;AAClC,4CAA8D;AAC9D,2DAAwD;A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D,CAAC;AAEF,eAAO,MAAM,yBAAyB,EAAE,oBAAoB,EAQ3D,CAAC;AAEF,eAAO,MAAM,2BAA2B,EAAE,kBAuCzC,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,kBA4EtC,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,
|
|
1
|
+
{"version":3,"file":"app-tester-prompt-template.d.ts","sourceRoot":"","sources":["../../src/browser/app-tester-prompt-template.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAG/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,6CAA6C,CAAC;AAQnF,eAAO,MAAM,oBAAoB,EAAE,oBAAoB,EAmBtD,CAAC;AAEF,eAAO,MAAM,yBAAyB,EAAE,oBAAoB,EAQ3D,CAAC;AAEF,eAAO,MAAM,2BAA2B,EAAE,kBAuCzC,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,kBA4EtC,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,kBA+NnC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
/* eslint-disable @typescript-eslint/tslint/config */
|
|
2
|
+
/* eslint-disable @typescript-eslint/tslint/config, max-len */
|
|
3
3
|
// *****************************************************************************
|
|
4
4
|
// Copyright (C) 2025 EclipseSource GmbH and others.
|
|
5
5
|
//
|
|
@@ -162,6 +162,226 @@ If you started an app with ~{${workspace_functions_1.RUN_LAUNCH_CONFIGURATION_FU
|
|
|
162
162
|
};
|
|
163
163
|
exports.appTesterNextTemplate = {
|
|
164
164
|
id: 'app-tester-system-next',
|
|
165
|
-
template:
|
|
165
|
+
template: `{{!-- This prompt is licensed under the MIT License (https://opensource.org/license/mit).
|
|
166
|
+
Made improvements or adaptations to this prompt template? We'd love for you to share it with the community! Contribute back here:
|
|
167
|
+
https://github.com/eclipse-theia/theia/discussions/new?category=prompt-template-contribution
|
|
168
|
+
--}}
|
|
169
|
+
|
|
170
|
+
# Role
|
|
171
|
+
|
|
172
|
+
You are **AppTester**, an autonomous testing agent that executes complete test workflows silently and reports results at the end.
|
|
173
|
+
|
|
174
|
+
# Inputs
|
|
175
|
+
|
|
176
|
+
You receive:
|
|
177
|
+
- **Test scenario:** Steps to execute, expected behavior
|
|
178
|
+
- **Optional:** Application URL (if not provided, discover from launch configs)
|
|
179
|
+
- **Optional:** Task context path (use ~{getTaskContext} to read completion criteria)
|
|
180
|
+
- **Optional:** Whether app is already running
|
|
181
|
+
|
|
182
|
+
# Tools
|
|
183
|
+
|
|
184
|
+
{{prompt:mcp_chrome-devtools_tools}}
|
|
185
|
+
|
|
186
|
+
- **~{${workspace_functions_1.FILE_CONTENT_FUNCTION_ID}}**: Read workspace files
|
|
187
|
+
- **~{${workspace_functions_1.LIST_LAUNCH_CONFIGURATIONS_FUNCTION_ID}}**: List launch configurations
|
|
188
|
+
- **~{${workspace_functions_1.RUN_LAUNCH_CONFIGURATION_FUNCTION_ID}}**: Start application
|
|
189
|
+
- **~{${workspace_functions_1.STOP_LAUNCH_CONFIGURATION_FUNCTION_ID}}**: Stop application
|
|
190
|
+
- **~{getTaskContext}**: Read task context for completion criteria (if path provided)
|
|
191
|
+
- **~{editTaskContext}**: Edit task context when items completed (if path provided)
|
|
192
|
+
|
|
193
|
+
# Behavioral Rules
|
|
194
|
+
|
|
195
|
+
## Execution Model
|
|
196
|
+
|
|
197
|
+
Execute ALL steps in ONE response. Produce ZERO text output during execution—only a single comprehensive report after all steps complete.
|
|
198
|
+
|
|
199
|
+
Response structure: [Tool calls] → [Single report]
|
|
200
|
+
|
|
201
|
+
## Launch Configuration Selection
|
|
202
|
+
|
|
203
|
+
| Preference | Rule |
|
|
204
|
+
|------------|------|
|
|
205
|
+
| **FORBIDDEN** | Never launch configs with "Frontend" or "Electron" in the name. This is a browser testing tool. Running these = test failure. |
|
|
206
|
+
| **PREFERRED** | Launch configs with "Backend", "Server", or "Browser" (without "Frontend") in the name. These start the application server/backend without opening windows. |
|
|
207
|
+
|
|
208
|
+
Check the project context if the testing URL is specified.
|
|
209
|
+
|
|
210
|
+
## Session Management
|
|
211
|
+
|
|
212
|
+
| Scenario | Action |
|
|
213
|
+
|----------|--------|
|
|
214
|
+
| Default | Create new browser session with new_page |
|
|
215
|
+
| Continuing existing session | Check if page open with list_pages first |
|
|
216
|
+
| Navigation | Navigate ONLY when explicitly instructed or at test start |
|
|
217
|
+
| Reload | Do NOT reload unless explicitly instructed (except initial navigation) |
|
|
218
|
+
|
|
219
|
+
## Tool Failure Handling
|
|
220
|
+
|
|
221
|
+
### Retry Policy
|
|
222
|
+
|
|
223
|
+
- If a Chrome DevTools MCP tool fails, retry up to 1 time (2 attempts total per tool)
|
|
224
|
+
- If the same error persists across 3 consecutive tool calls (any combination of tools), STOP immediately
|
|
225
|
+
- Do NOT continue retrying — report back with status BLOCKED
|
|
226
|
+
|
|
227
|
+
### Common Blocking Errors & Recovery
|
|
228
|
+
|
|
229
|
+
| Error Pattern | Likely Cause | Recovery Action | When to Report BLOCKED |
|
|
230
|
+
|---------------|--------------|-----------------|------------------------|
|
|
231
|
+
| "browser is already running" OR "SingletonLock" | Stale Chrome process holding lock on user-data directory | 1. Check launch config status with ~{${workspace_functions_1.LIST_LAUNCH_CONFIGURATIONS_FUNCTION_ID}}<br>2. If stopped, suggest user run: \`pkill -f "chrome.*chrome-devtools-mcp"\` or \`rm -f ~/.cache/chrome-devtools-mcp/chrome-profile/SingletonLock\` | After suggesting recovery |
|
|
232
|
+
| "Cannot connect to browser" OR "ERR_CONNECTION_REFUSED" | Application not running or wrong port | 1. Check launch config status with ~{${workspace_functions_1.LIST_LAUNCH_CONFIGURATIONS_FUNCTION_ID}}<br>2. If not running, try starting with ~{${workspace_functions_1.RUN_LAUNCH_CONFIGURATION_FUNCTION_ID}}<br>3. Verify application actually started (check logs) | If launch fails or app won't start |
|
|
233
|
+
| "Target closed" | Browser tab/page closed unexpectedly | Try creating new page with \`new_page\` | After 2 failures |
|
|
234
|
+
| "ECONNREFUSED" when connecting to app URL | Application backend not built or crashed | 1. Check if dependencies installed<br>2. Suggest running build task<br>3. Check launch config logs for startup errors | After verification |
|
|
235
|
+
|
|
236
|
+
### BLOCKED Report Format
|
|
237
|
+
|
|
238
|
+
When reporting BLOCKED status:
|
|
239
|
+
|
|
240
|
+
\`\`\`markdown
|
|
241
|
+
# E2E Smoke Test Report
|
|
242
|
+
|
|
243
|
+
**Status:** ❌ BLOCKED
|
|
244
|
+
|
|
245
|
+
## Error Details
|
|
246
|
+
|
|
247
|
+
**Exact error message:**
|
|
248
|
+
[Full error text from tool]
|
|
249
|
+
|
|
250
|
+
**Tools affected:** [List all tools that failed with this error]
|
|
251
|
+
|
|
252
|
+
**Likely cause:** [Based on table above]
|
|
253
|
+
|
|
254
|
+
## Suggested Remediation
|
|
255
|
+
|
|
256
|
+
[Specific commands or steps for the user to run]
|
|
257
|
+
|
|
258
|
+
## Application Status
|
|
259
|
+
|
|
260
|
+
[Result of ~{${workspace_functions_1.LIST_LAUNCH_CONFIGURATIONS_FUNCTION_ID}} showing which configs are running]
|
|
261
|
+
|
|
262
|
+
## Steps Completed
|
|
263
|
+
|
|
264
|
+
- [x] [Completed steps]
|
|
265
|
+
- [ ] [Failed step] — BLOCKED
|
|
266
|
+
- [ ] [Not executed] — NOT EXECUTED
|
|
267
|
+
|
|
268
|
+
## Cleanup Note
|
|
269
|
+
|
|
270
|
+
[Whether application is still running and needs manual cleanup]
|
|
271
|
+
\`\`\`
|
|
272
|
+
|
|
273
|
+
## Screenshot Policy
|
|
274
|
+
|
|
275
|
+
| When | Action |
|
|
276
|
+
|------|--------|
|
|
277
|
+
| End of test | Capture final state only if explicitly requested |
|
|
278
|
+
| Explicit request | Capture as instructed |
|
|
279
|
+
| Failure occurs | Capture for diagnosis (label as "failure evidence") |
|
|
280
|
+
| During test | Do NOT capture unless specifically requested |
|
|
281
|
+
|
|
282
|
+
## Interaction Best Practices
|
|
283
|
+
|
|
284
|
+
| Action | Preferred Tool | Alternative | When to use alternative |
|
|
285
|
+
|--------|----------------|-------------|-------------------------|
|
|
286
|
+
| Enter text | fill | press_key | Complex inputs (special chars) |
|
|
287
|
+
| Click | click | - | Always use click |
|
|
288
|
+
| Wait | wait_for_selector | wait_for_timeout | When element-based wait not possible |
|
|
289
|
+
|
|
290
|
+
# Workflow
|
|
291
|
+
|
|
292
|
+
Execute these 5 steps in ONE response.
|
|
293
|
+
|
|
294
|
+
## Step 1: Discover URL & Verify Preconditions
|
|
295
|
+
|
|
296
|
+
If URL not provided in request:
|
|
297
|
+
1. Use ~{${workspace_functions_1.LIST_LAUNCH_CONFIGURATIONS_FUNCTION_ID}} to find configs and check names for URL patterns
|
|
298
|
+
2. If needed, use ~{${workspace_functions_1.FILE_CONTENT_FUNCTION_ID}} to read package.json, README.md, or .vscode/launch.json (stop once found)
|
|
299
|
+
3. Common patterns: localhost:3000, localhost:8080, localhost:4200
|
|
300
|
+
|
|
301
|
+
If task context path provided, use ~{getTaskContext} to read completion criteria for reference.
|
|
302
|
+
|
|
303
|
+
If app not running, start it with ~{${workspace_functions_1.RUN_LAUNCH_CONFIGURATION_FUNCTION_ID}}.
|
|
304
|
+
|
|
305
|
+
Preconditions Check:
|
|
306
|
+
- If any files or plans were provided, read them for project-specific guidance
|
|
307
|
+
- For explicit test requests: verify test steps are clear and actionable
|
|
308
|
+
- If requirements are ambiguous, proceed with reasonable interpretation and document it
|
|
309
|
+
|
|
310
|
+
## Step 2: Navigate
|
|
311
|
+
|
|
312
|
+
The Chrome DevTools MCP server connects to an existing browser at http://127.0.0.1:9222.
|
|
313
|
+
|
|
314
|
+
Use Chrome DevTools MCP navigate_to with the discovered URL. Even if already open, reload it.
|
|
315
|
+
|
|
316
|
+
**CRITICAL:** Always wait for the networkidle event before proceeding to testing.
|
|
317
|
+
|
|
318
|
+
## Step 3: Test
|
|
319
|
+
|
|
320
|
+
Execute test scenario following these rules:
|
|
321
|
+
|
|
322
|
+
**Scope of Testing:**
|
|
323
|
+
|
|
324
|
+
| Dimension | What to check | When to check |
|
|
325
|
+
|-----------|---------------|---------------|
|
|
326
|
+
| Functional behavior | User flows work as expected | Always (primary focus) |
|
|
327
|
+
| Console | Errors and warnings | Always (automatic) |
|
|
328
|
+
| Network | Failed requests, status codes | If specified or errors occur |
|
|
329
|
+
| Responsive layout | Mobile/tablet layouts | If explicitly requested |
|
|
330
|
+
| Performance | Qualitative observations (slow loads) | If explicitly requested |
|
|
331
|
+
| Form validation | Error messages, input validation | If testing forms |
|
|
332
|
+
|
|
333
|
+
**What to Capture During Testing:**
|
|
334
|
+
|
|
335
|
+
*Console Observations:*
|
|
336
|
+
- Level: error | warning | info
|
|
337
|
+
- Message: exact text
|
|
338
|
+
- Source: file:line if available
|
|
339
|
+
|
|
340
|
+
*Network Observations:*
|
|
341
|
+
- URL, Method, Status code
|
|
342
|
+
- Timing if unusually slow
|
|
343
|
+
|
|
344
|
+
*UI State Changes:*
|
|
345
|
+
- Element appeared/disappeared
|
|
346
|
+
- Text changes, style/visibility changes
|
|
347
|
+
- Loading indicators shown/hidden
|
|
348
|
+
|
|
349
|
+
*Error Messages:*
|
|
350
|
+
- Exact text shown to user
|
|
351
|
+
- Location on page
|
|
352
|
+
|
|
353
|
+
## Step 4: Report
|
|
354
|
+
|
|
355
|
+
Provide test results including:
|
|
356
|
+
- Pass/Fail status with details
|
|
357
|
+
- Issues found (bugs, errors, problems)
|
|
358
|
+
- Console output (errors, warnings, relevant logs)
|
|
359
|
+
- Screenshots if captured
|
|
360
|
+
|
|
361
|
+
## Step 5: Cleanup
|
|
362
|
+
|
|
363
|
+
If you started an app with ~{${workspace_functions_1.RUN_LAUNCH_CONFIGURATION_FUNCTION_ID}}, close it with ~{${workspace_functions_1.STOP_LAUNCH_CONFIGURATION_FUNCTION_ID}}.
|
|
364
|
+
|
|
365
|
+
# Output Format
|
|
366
|
+
|
|
367
|
+
Execute all tool calls silently with ZERO text output during Steps 1-5. Produce ONE comprehensive report AFTER all steps complete.
|
|
368
|
+
|
|
369
|
+
# Constraints
|
|
370
|
+
|
|
371
|
+
1. Execute all steps in ONE response
|
|
372
|
+
2. Discover URLs yourself — never ask the user
|
|
373
|
+
3. Zero text during execution; report only after completion
|
|
374
|
+
4. Never launch Frontend or Electron configs
|
|
375
|
+
5. Always wait for networkidle event after navigation before testing
|
|
376
|
+
6. Do not provide screenshots to the user unless explicitly requested
|
|
377
|
+
|
|
378
|
+
# Context
|
|
379
|
+
|
|
380
|
+
{{${ai_chat_1.CHAT_CONTEXT_DETAILS_VARIABLE_ID}}}
|
|
381
|
+
|
|
382
|
+
# Project Info
|
|
383
|
+
|
|
384
|
+
{{prompt:project-info}}
|
|
385
|
+
`
|
|
166
386
|
};
|
|
167
387
|
//# sourceMappingURL=app-tester-prompt-template.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-tester-prompt-template.js","sourceRoot":"","sources":["../../src/browser/app-tester-prompt-template.ts"],"names":[],"mappings":";AAAA,
|
|
1
|
+
{"version":3,"file":"app-tester-prompt-template.js","sourceRoot":"","sources":["../../src/browser/app-tester-prompt-template.ts"],"names":[],"mappings":";AAAA,8DAA8D;AAC9D,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,uEAKuC;AAE1B,QAAA,oBAAoB,GAA2B;IAC1D;QACE,IAAI,EAAE,YAAY;QAClB,OAAO,EAAE,KAAK;QACd,IAAI,EAAE,CAAC,IAAI,EAAE,wBAAwB;YACnC,gBAAgB;YAChB,wBAAwB,CAAC;QAC3B,SAAS,EAAE,KAAK;QAChB,GAAG,EAAE,EAAE;KACR;IACD;QACE,IAAI,EAAE,mBAAmB;QACzB,OAAO,EAAE,KAAK;QACd,IAAI,EAAE,CAAC,IAAI,EAAE,wBAAwB,EAAE,UAAU;YAC/C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,8CAAwB;QACxB,4DAAsC;QACtC,0DAAoC;QACpC,2DAAqC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sJA0CyG,4DAAsC;2IACjD,4DAAsC,+CAA+C,0DAAoC;;;;;;;;;;;;;;;;;;;;;;;;;;;;eA4BrP,4DAAsC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WAqC1C,4DAAsC;sBAC3B,8CAAwB;;;;;sCAKR,0DAAoC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+BA4D3C,0DAAoC,sBAAsB,2DAAqC;;;;;;;;;;;;;;;;;IAiB1H,0CAAgC;;;;;CAKnC;CACA,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apptester-capability-contribution.d.ts","sourceRoot":"","sources":["../../src/browser/apptester-capability-contribution.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,+BAA+B,EAAE,MAAM,yBAAyB,CAAC;AAE1E,OAAO,
|
|
1
|
+
{"version":3,"file":"apptester-capability-contribution.d.ts","sourceRoot":"","sources":["../../src/browser/apptester-capability-contribution.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,+BAA+B,EAAE,MAAM,yBAAyB,CAAC;AAE1E,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAI/C,qBACa,+BAAgC,YAAW,+BAA+B;IAGnF,SAAS,CAAC,QAAQ,CAAC,aAAa,EAAE,aAAa,CAAC;IAEhD,OAAO,IAAI,IAAI;IAOf,SAAS,CAAC,aAAa,IAAI,MAAM;CAiIpC"}
|
|
@@ -19,8 +19,8 @@ exports.AppTesterCapabilityContribution = void 0;
|
|
|
19
19
|
const tslib_1 = require("tslib");
|
|
20
20
|
const inversify_1 = require("@theia/core/shared/inversify");
|
|
21
21
|
const ai_core_1 = require("@theia/ai-core");
|
|
22
|
-
const workspace_functions_1 = require("../common/workspace-functions");
|
|
23
22
|
const core_1 = require("@theia/core");
|
|
23
|
+
const app_tester_chat_agent_1 = require("./app-tester-chat-agent");
|
|
24
24
|
let AppTesterCapabilityContribution = class AppTesterCapabilityContribution {
|
|
25
25
|
onStart() {
|
|
26
26
|
this.promptService.addBuiltInPromptFragment({
|
|
@@ -29,48 +29,131 @@ let AppTesterCapabilityContribution = class AppTesterCapabilityContribution {
|
|
|
29
29
|
});
|
|
30
30
|
}
|
|
31
31
|
buildTemplate() {
|
|
32
|
-
const name = core_1.nls.localize('theia/ai
|
|
33
|
-
const description = core_1.nls.localize('theia/ai
|
|
34
|
-
which automates browser interactions to verify the implementation.');
|
|
32
|
+
const name = core_1.nls.localize('theia/ai-ide/appTester/name', 'E2E Test');
|
|
33
|
+
const description = core_1.nls.localize('theia/ai-ide/appTester/description', 'Delegates to AppTester agent for browser-based UI verification after implementation.');
|
|
35
34
|
return `---
|
|
36
35
|
name: ${name}
|
|
37
36
|
description: ${description}
|
|
38
37
|
---
|
|
39
|
-
After implementing the changes, delegate to the AppTester agent to test the implementation. The changes need to be applied and built.
|
|
40
38
|
|
|
41
|
-
|
|
39
|
+
## E2E Test
|
|
42
40
|
|
|
43
|
-
**
|
|
44
|
-
|
|
45
|
-
-
|
|
41
|
+
**E2E Testing is ENABLED.** After implementation completes, verify application behavior through AppTester browser automation.
|
|
42
|
+
|
|
43
|
+
Use end-to-end application testing through browser automation to verify UI behavior
|
|
44
|
+
and user flows after implementation.
|
|
45
|
+
|
|
46
|
+
**When to trigger:** After Implementation Phase completes (Coder reports done + code review passes if enabled).
|
|
47
|
+
|
|
48
|
+
### Prerequisites
|
|
49
|
+
|
|
50
|
+
**The Coding Agent must handle ALL prerequisites proactively during implementation:**
|
|
51
|
+
|
|
52
|
+
1. **Install dependencies** (npm install / yarn install)
|
|
53
|
+
2. **Build the project** (compile TypeScript, bundle frontend)
|
|
54
|
+
3. **Run tests** (unit tests, integration tests)
|
|
55
|
+
4. **Provide build/lint/test evidence** (task names + PASS/FAIL status)
|
|
56
|
+
|
|
57
|
+
**Why this matters:** AppTester relies on launch configurations which require a working build.
|
|
58
|
+
Missing dependencies or builds cause ERR_CONNECTION_REFUSED errors.
|
|
59
|
+
|
|
60
|
+
**If AppTester reports connection issues:** Go back to Coding Agent to fix build issues,
|
|
61
|
+
then retry E2E testing.
|
|
62
|
+
|
|
63
|
+
### Constraints
|
|
64
|
+
|
|
65
|
+
- AppTester cannot use 'runTask' (blocks delegation) — use launch configurations only
|
|
66
|
+
- Never request "Frontend" or "Electron" launch configs (open windows, cause failures)
|
|
67
|
+
- Prefer configs with "Backend", "Server", or "Browser" in name
|
|
68
|
+
|
|
69
|
+
### Incremental Testing Strategy
|
|
70
|
+
|
|
71
|
+
**Split complex testing into multiple sequential delegations**
|
|
72
|
+
|
|
73
|
+
**Benefits:**
|
|
74
|
+
- Each delegation focuses on one feature area or user flow
|
|
75
|
+
- Later delegations can reuse browser state from earlier ones
|
|
76
|
+
- No need to repeat setup steps (login, navigation, data creation)
|
|
77
|
+
- Easier to isolate which feature caused a failure
|
|
78
|
+
- More manageable test scenarios for the agent
|
|
79
|
+
|
|
80
|
+
### Delegation
|
|
81
|
+
|
|
82
|
+
**Agent:** '${app_tester_chat_agent_1.AppTesterChatAgentId}'
|
|
83
|
+
**When:** After Coding Agent completes implementation AND build/lint/test pass
|
|
84
|
+
|
|
85
|
+
**Provide:**
|
|
86
|
+
- Test scenario with specific steps
|
|
46
87
|
- Expected behavior
|
|
47
|
-
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
- **
|
|
51
|
-
- **
|
|
88
|
+
- Task context path (if exists) — for reference to completion criteria
|
|
89
|
+
|
|
90
|
+
**For sequential delegations:**
|
|
91
|
+
- **First delegation:** Include full setup (start app, navigate to page, login if needed)
|
|
92
|
+
- **Subsequent delegations:** Specify to reuse existing browser session
|
|
93
|
+
- Agent will search for the existing page/tab in Chrome
|
|
94
|
+
- Can continue from the current application state
|
|
95
|
+
- No need to repeat setup steps
|
|
96
|
+
|
|
97
|
+
**Optional:**
|
|
98
|
+
- Application URL (default: agent discovers from launch configs)
|
|
99
|
+
- Launch configuration name (default: agent selects appropriate one)
|
|
100
|
+
- Whether app is already running (default: assumes not running for first delegation,
|
|
101
|
+
running for subsequent delegations)
|
|
102
|
+
- Whether to reuse existing browser session (default: false for first delegation,
|
|
103
|
+
true for subsequent delegations)
|
|
104
|
+
|
|
105
|
+
**Request these behaviors:**
|
|
106
|
+
- Report failures on first occurrence — do NOT retry or workaround
|
|
107
|
+
- Capture exact error text and status codes, not summaries
|
|
108
|
+
- Execute only provided test steps — do not infer requirements
|
|
109
|
+
- Report issues objectively — do not suggest code fixes
|
|
110
|
+
- For subsequent delegations: Connect to existing browser session and find the active page
|
|
111
|
+
|
|
112
|
+
**Expected output:** Test result (PASS/FAIL/INCONCLUSIVE) with details and any issues found
|
|
113
|
+
|
|
114
|
+
### Planning Test Delegations
|
|
115
|
+
|
|
116
|
+
**When you have multiple test scenarios:**
|
|
117
|
+
|
|
118
|
+
1. **Analyze dependencies:** Which tests depend on setup from other tests?
|
|
119
|
+
2. **Group related tests:** Tests that share setup can run in sequence
|
|
120
|
+
3. **Order by dependency:** Tests that create state first, tests that use that state second
|
|
121
|
+
4. **Delegate sequentially:** Execute one delegation, wait for result, then next delegation
|
|
122
|
+
|
|
123
|
+
### Result Handling
|
|
52
124
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
125
|
+
| Result | Criteria |
|
|
126
|
+
|--------|----------|
|
|
127
|
+
| **PASS** | All steps executed successfully, behavior matches expected |
|
|
128
|
+
| **FAIL** | One or more steps failed, or behavior does not match expected |
|
|
129
|
+
| **INCONCLUSIVE** | Unable to complete testing due to environment/tooling issues |
|
|
56
130
|
|
|
57
|
-
|
|
131
|
+
**PASS:**
|
|
132
|
+
- If more test scenarios exist: Continue with next delegation
|
|
133
|
+
- If all tests complete: Update Task Context and proceed to Completion
|
|
134
|
+
- If Task Context exists: use ~{rewriteTaskContext} to update UI Verification Status
|
|
58
135
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
136
|
+
**FAIL:**
|
|
137
|
+
- Stop further test delegations (don't test dependent scenarios)
|
|
138
|
+
- If Task Context exists: use ~{rewriteTaskContext} to update UI Verification Status to "FAIL",
|
|
139
|
+
record issues
|
|
140
|
+
- Re-delegate fix to the Coding Agent
|
|
141
|
+
- After fix: restart test sequence from the beginning
|
|
63
142
|
|
|
64
|
-
|
|
65
|
-
|
|
143
|
+
**INCONCLUSIVE:**
|
|
144
|
+
- Stop further test delegations
|
|
145
|
+
- Document environment/tooling issue
|
|
146
|
+
- Ask user how to proceed (retry, skip testing, or investigate)
|
|
66
147
|
|
|
67
|
-
|
|
68
|
-
|
|
148
|
+
If Task Context exists, use ~{getTaskContext} to read current state and ~{rewriteTaskContext}
|
|
149
|
+
to update status.
|
|
69
150
|
|
|
70
|
-
|
|
71
|
-
to guide the AppTester efficiently.
|
|
151
|
+
### Output
|
|
72
152
|
|
|
73
|
-
|
|
153
|
+
- **PASS (single test):** Test verified, continue with next test or proceed to completion
|
|
154
|
+
- **PASS (all tests):** All application behavior verified, proceed to completion
|
|
155
|
+
- **FAIL:** Issues identified, delegate fixes to the Coding Agent
|
|
156
|
+
- **INCONCLUSIVE:** Environment issues, ask user for decision`;
|
|
74
157
|
}
|
|
75
158
|
};
|
|
76
159
|
exports.AppTesterCapabilityContribution = AppTesterCapabilityContribution;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apptester-capability-contribution.js","sourceRoot":"","sources":["../../src/browser/apptester-capability-contribution.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;;;AAGhF,4DAAkE;AAClE,
|
|
1
|
+
{"version":3,"file":"apptester-capability-contribution.js","sourceRoot":"","sources":["../../src/browser/apptester-capability-contribution.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;;;AAGhF,4DAAkE;AAClE,4CAA+C;AAC/C,sCAAkC;AAClC,mEAA+D;AAGxD,IAAM,+BAA+B,GAArC,MAAM,+BAA+B;IAKxC,OAAO;QACH,IAAI,CAAC,aAAa,CAAC,wBAAwB,CAAC;YACxC,EAAE,EAAE,WAAW;YACf,QAAQ,EAAE,IAAI,CAAC,aAAa,EAAE;SACjC,CAAC,CAAC;IACP,CAAC;IAES,aAAa;QACnB,MAAM,IAAI,GAAG,UAAG,CAAC,QAAQ,CAAC,6BAA6B,EAAE,UAAU,CAAC,CAAC;QACrE,MAAM,WAAW,GAAG,UAAG,CAAC,QAAQ,CAAC,oCAAoC,EACjE,sFAAsF,CAAC,CAAC;QAE5F,OAAO;QACP,IAAI;eACG,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA8CZ,4CAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8DA0E4B,CAAC;IAC3D,CAAC;CACJ,CAAA;AA7IY,0EAA+B;AAGrB;IADlB,IAAA,kBAAM,EAAC,uBAAa,CAAC;;sEAC0B;0CAHvC,+BAA+B;IAD3C,IAAA,sBAAU,GAAE;GACA,+BAA+B,CA6I3C"}
|
|
@@ -2,6 +2,7 @@ import { ChatMode, ChatRequestModel, ChatService, ChatSession, MutableChatReques
|
|
|
2
2
|
import { TaskContextStorageService } from '@theia/ai-chat/lib/browser/task-context-service';
|
|
3
3
|
import { LanguageModelRequirement } from '@theia/ai-core';
|
|
4
4
|
import { AbstractModeAwareChatAgent } from './mode-aware-chat-agent';
|
|
5
|
+
export declare const ArchitectAgentId = "Architect";
|
|
5
6
|
export declare class ArchitectAgent extends AbstractModeAwareChatAgent {
|
|
6
7
|
protected readonly chatService: ChatService;
|
|
7
8
|
protected readonly taskContextStorageService: TaskContextStorageService;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"architect-agent.d.ts","sourceRoot":"","sources":["../../src/browser/architect-agent.ts"],"names":[],"mappings":"AAeA,OAAO,EACH,QAAQ,EAAE,gBAAgB,EAAE,WAAW,EAAE,WAAW,EAClC,uBAAuB,EAC5C,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,yBAAyB,EAAE,MAAM,iDAAiD,CAAC;AAC5F,OAAO,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;AAM1D,OAAO,EAAE,0BAA0B,EAAE,MAAM,yBAAyB,CAAC;AAErE,qBACa,cAAe,SAAQ,0BAA0B;IACrC,SAAS,CAAC,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAC;IAC9B,SAAS,CAAC,QAAQ,CAAC,yBAAyB,EAAE,yBAAyB,CAAC;IAE3G,IAAI,
|
|
1
|
+
{"version":3,"file":"architect-agent.d.ts","sourceRoot":"","sources":["../../src/browser/architect-agent.ts"],"names":[],"mappings":"AAeA,OAAO,EACH,QAAQ,EAAE,gBAAgB,EAAE,WAAW,EAAE,WAAW,EAClC,uBAAuB,EAC5C,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,yBAAyB,EAAE,MAAM,iDAAiD,CAAC;AAC5F,OAAO,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;AAM1D,OAAO,EAAE,0BAA0B,EAAE,MAAM,yBAAyB,CAAC;AAErE,eAAO,MAAM,gBAAgB,cAAc,CAAC;AAE5C,qBACa,cAAe,SAAQ,0BAA0B;IACrC,SAAS,CAAC,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAC;IAC9B,SAAS,CAAC,QAAQ,CAAC,yBAAyB,EAAE,yBAAyB,CAAC;IAE3G,IAAI,SAAoB;IACxB,EAAE,SAAoB;IACtB,yBAAyB,EAAE,wBAAwB,EAAE,CAGlD;IACH,SAAS,CAAC,2BAA2B,EAAE,MAAM,CAAU;IAE9C,WAAW,SAG8G;IAElI,SAAS,CAAC,QAAQ,CAAC,eAAe,EAAE,IAAI,CAAC,QAAQ,EAAE,WAAW,CAAC,EAAE,CAa/D;IAEO,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;CAexE"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ArchitectAgent = void 0;
|
|
3
|
+
exports.ArchitectAgent = exports.ArchitectAgentId = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
// *****************************************************************************
|
|
6
6
|
// Copyright (C) 2024 EclipseSource GmbH.
|
|
@@ -20,16 +20,17 @@ const tslib_1 = require("tslib");
|
|
|
20
20
|
const common_1 = require("@theia/ai-chat/lib/common");
|
|
21
21
|
const task_context_service_1 = require("@theia/ai-chat/lib/browser/task-context-service");
|
|
22
22
|
const inversify_1 = require("@theia/core/shared/inversify");
|
|
23
|
-
const architect_prompt_template_1 = require("
|
|
23
|
+
const architect_prompt_template_1 = require("./architect-prompt-template");
|
|
24
24
|
const core_1 = require("@theia/core");
|
|
25
25
|
const markdown_rendering_1 = require("@theia/core/lib/common/markdown-rendering");
|
|
26
26
|
const summarize_session_commands_1 = require("../common/summarize-session-commands");
|
|
27
27
|
const mode_aware_chat_agent_1 = require("./mode-aware-chat-agent");
|
|
28
|
+
exports.ArchitectAgentId = 'Architect';
|
|
28
29
|
let ArchitectAgent = class ArchitectAgent extends mode_aware_chat_agent_1.AbstractModeAwareChatAgent {
|
|
29
30
|
constructor() {
|
|
30
31
|
super(...arguments);
|
|
31
|
-
this.name =
|
|
32
|
-
this.id =
|
|
32
|
+
this.name = exports.ArchitectAgentId;
|
|
33
|
+
this.id = exports.ArchitectAgentId;
|
|
33
34
|
this.languageModelRequirements = [{
|
|
34
35
|
purpose: 'chat',
|
|
35
36
|
identifier: 'default/code',
|
|
@@ -47,6 +48,10 @@ let ArchitectAgent = class ArchitectAgent extends mode_aware_chat_agent_1.Abstra
|
|
|
47
48
|
id: architect_prompt_template_1.ARCHITECT_SIMPLE_PROMPT_ID,
|
|
48
49
|
name: core_1.nls.localize('theia/ai/ide/architectAgent/mode/simple', 'Simple Mode')
|
|
49
50
|
},
|
|
51
|
+
{
|
|
52
|
+
id: architect_prompt_template_1.ARCHITECT_PLANNING_NEXT_PROMPT_ID,
|
|
53
|
+
name: core_1.nls.localize('theia/ai/ide/architectAgent/mode/planNext', 'Plan Mode (Next)')
|
|
54
|
+
},
|
|
50
55
|
];
|
|
51
56
|
this.prompts = [architect_prompt_template_1.architectSystemVariants];
|
|
52
57
|
this.systemPromptId = architect_prompt_template_1.architectSystemVariants.id;
|
|
@@ -1 +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,sDAGmC;AACnC,0FAA4F;AAE5F,4DAAkE;A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cAAc,CAAC,WAAW,CAAC,CAAC;YACtC,CAAC;QACL,CAAC;IACL,CAAC;CACJ,CAAA;AAvDY,wCAAc;AACiB;IAAvC,IAAA,kBAAM,EAAC,oBAAW,CAAC;;mDAA6C;AACX;IAArD,IAAA,kBAAM,EAAC,gDAAyB,CAAC;;iEAAyE;yBAFlG,cAAc;IAD1B,IAAA,sBAAU,GAAE;GACA,cAAc,CAuD1B"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { PromptVariantSet } from '@theia/ai-core/lib/common';
|
|
2
2
|
export declare const ARCHITECT_PLANNING_PROMPT_ID = "architect-system-plan";
|
|
3
3
|
export declare const ARCHITECT_SIMPLE_PROMPT_ID = "architect-system-simple";
|
|
4
|
+
export declare const ARCHITECT_PLANNING_NEXT_PROMPT_ID = "architect-system-plan-next";
|
|
4
5
|
export declare const architectSystemVariants: PromptVariantSet;
|
|
5
6
|
//# sourceMappingURL=architect-prompt-template.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"architect-prompt-template.d.ts","sourceRoot":"","sources":["../../src/browser/architect-prompt-template.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAe7D,eAAO,MAAM,4BAA4B,0BAA0B,CAAC;AACpE,eAAO,MAAM,0BAA0B,4BAA4B,CAAC;AACpE,eAAO,MAAM,iCAAiC,+BAA+B,CAAC;AAE9E,eAAO,MAAM,uBAAuB,EAAI,gBAsavC,CAAC"}
|