@theia/ai-ide 1.63.0-next.52 → 1.63.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/lib/browser/ai-configuration/agent-configuration-widget.d.ts.map +1 -1
  2. package/lib/browser/ai-configuration/agent-configuration-widget.js +7 -2
  3. package/lib/browser/ai-configuration/agent-configuration-widget.js.map +1 -1
  4. package/lib/browser/ai-configuration/ai-configuration-view-contribution.js +1 -1
  5. package/lib/browser/ai-configuration/ai-configuration-view-contribution.js.map +1 -1
  6. package/lib/browser/ai-configuration/mcp-configuration-widget.d.ts +4 -1
  7. package/lib/browser/ai-configuration/mcp-configuration-widget.d.ts.map +1 -1
  8. package/lib/browser/ai-configuration/mcp-configuration-widget.js +59 -11
  9. package/lib/browser/ai-configuration/mcp-configuration-widget.js.map +1 -1
  10. package/lib/browser/ai-configuration/prompt-fragments-configuration-widget.d.ts.map +1 -1
  11. package/lib/browser/ai-configuration/prompt-fragments-configuration-widget.js +1 -3
  12. package/lib/browser/ai-configuration/prompt-fragments-configuration-widget.js.map +1 -1
  13. package/lib/browser/ai-configuration/template-settings-renderer.js +1 -1
  14. package/lib/browser/ai-configuration/template-settings-renderer.js.map +1 -1
  15. package/lib/browser/app-tester-chat-agent.d.ts +5 -3
  16. package/lib/browser/app-tester-chat-agent.d.ts.map +1 -1
  17. package/lib/browser/app-tester-chat-agent.js +41 -31
  18. package/lib/browser/app-tester-chat-agent.js.map +1 -1
  19. package/lib/browser/architect-agent.d.ts.map +1 -1
  20. package/lib/browser/architect-agent.js +2 -2
  21. package/lib/browser/architect-agent.js.map +1 -1
  22. package/lib/browser/summarize-session-command-contribution.d.ts +2 -0
  23. package/lib/browser/summarize-session-command-contribution.d.ts.map +1 -1
  24. package/lib/browser/summarize-session-command-contribution.js +9 -4
  25. package/lib/browser/summarize-session-command-contribution.js.map +1 -1
  26. package/lib/common/architect-prompt-template.d.ts +4 -3
  27. package/lib/common/architect-prompt-template.d.ts.map +1 -1
  28. package/lib/common/architect-prompt-template.js +43 -38
  29. package/lib/common/architect-prompt-template.js.map +1 -1
  30. package/lib/common/coder-replace-prompt-template.d.ts +4 -4
  31. package/lib/common/coder-replace-prompt-template.d.ts.map +1 -1
  32. package/lib/common/coder-replace-prompt-template.js +6 -6
  33. package/lib/common/coder-replace-prompt-template.js.map +1 -1
  34. package/lib/common/universal-chat-agent.js +2 -2
  35. package/package.json +17 -17
  36. package/src/browser/ai-configuration/agent-configuration-widget.tsx +7 -5
  37. package/src/browser/ai-configuration/ai-configuration-view-contribution.ts +1 -1
  38. package/src/browser/ai-configuration/mcp-configuration-widget.tsx +82 -14
  39. package/src/browser/ai-configuration/prompt-fragments-configuration-widget.tsx +1 -3
  40. package/src/browser/ai-configuration/template-settings-renderer.tsx +1 -1
  41. package/src/browser/app-tester-chat-agent.ts +43 -33
  42. package/src/browser/architect-agent.ts +3 -3
  43. package/src/browser/summarize-session-command-contribution.ts +8 -4
  44. package/src/common/architect-prompt-template.ts +43 -37
  45. package/src/common/coder-replace-prompt-template.ts +6 -6
  46. package/src/common/universal-chat-agent.ts +2 -2
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  /* eslint-disable max-len */
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.AppTesterChatAgent = exports.AppTesterChatAgentId = exports.appTesterTemplateVariant = exports.appTesterTemplate = exports.EXPECTED_MCP_SERVER_NAME = void 0;
4
+ exports.AppTesterChatAgent = exports.AppTesterChatAgentId = exports.appTesterTemplateVariant = exports.appTesterTemplate = exports.REQUIRED_MCP_SERVERS = void 0;
5
5
  const tslib_1 = require("tslib");
6
6
  // *****************************************************************************
7
7
  // Copyright (C) 2024 EclipseSource GmbH.
@@ -26,7 +26,22 @@ const core_1 = require("@theia/core");
26
26
  const inversify_1 = require("@theia/core/shared/inversify");
27
27
  const mcp_preferences_1 = require("@theia/ai-mcp/lib/browser/mcp-preferences");
28
28
  const browser_1 = require("@theia/core/lib/browser");
29
- exports.EXPECTED_MCP_SERVER_NAME = 'playwright';
29
+ exports.REQUIRED_MCP_SERVERS = [
30
+ {
31
+ name: 'playwright',
32
+ command: 'npx',
33
+ args: ['-y', '@playwright/mcp@latest'],
34
+ autostart: false,
35
+ env: {},
36
+ },
37
+ {
38
+ name: 'playwright-visual',
39
+ command: 'npx',
40
+ args: ['-y', '@playwright/mcp@latest', '--vision'],
41
+ autostart: false,
42
+ env: {},
43
+ }
44
+ ];
30
45
  // Prompt templates
31
46
  exports.appTesterTemplate = {
32
47
  id: 'app-tester-system-default',
@@ -44,7 +59,8 @@ Your role is to inspect the application for user-specified test scenarios throug
44
59
  4. Help fix issues when needed
45
60
 
46
61
  ## Available Playwright Testing Tools
47
- You have access to these powerful automation tools: {{prompt:mcp_${exports.EXPECTED_MCP_SERVER_NAME}_tools}}
62
+ You have access to these powerful automation tools:
63
+ ${exports.REQUIRED_MCP_SERVERS.map(server => `{{prompt:mcp_${server.name}_tools}}`)}
48
64
 
49
65
  ## Workflow Approach
50
66
  1. **Understand Requirements**: Ask the user to clearly define what needs to be tested
@@ -76,26 +92,25 @@ let AppTesterChatAgent = class AppTesterChatAgent extends chat_agents_1.Abstract
76
92
  this.description = core_1.nls.localize('theia/ai/chat/app-tester/description', 'This agent tests your application user interface to verify user-specified test scenarios through the Playwright MCP server. '
77
93
  + 'It can automate testing workflows and provide detailed feedback on application functionality.');
78
94
  this.iconClass = 'codicon codicon-beaker';
79
- this.systemPromptId = 'app-tester-prompt';
80
- this.prompts = [{ id: 'app-tester-prompt', defaultVariant: exports.appTesterTemplate, variants: [exports.appTesterTemplateVariant] }];
95
+ this.systemPromptId = 'app-tester-system';
96
+ this.prompts = [{ id: 'app-tester-system', defaultVariant: exports.appTesterTemplate, variants: [exports.appTesterTemplateVariant] }];
81
97
  }
82
98
  /**
83
99
  * Override invoke to check if the Playwright MCP server is running, and if not, ask the user if it should be started.
84
100
  */
85
101
  async invoke(request) {
86
102
  try {
87
- const startedServers = await this.mcpService.getStartedServers();
88
- if (!startedServers.includes(exports.EXPECTED_MCP_SERVER_NAME)) {
103
+ if (await this.requiresStartingServers()) {
89
104
  // Ask the user if they want to start the server
90
- request.response.response.addContent(new chat_model_1.QuestionResponseContentImpl('The Playwright MCP server is not running. Would you like to start it now? This may install the Playwright MCP server.', [
91
- { text: 'Yes, start the server', value: 'yes' },
105
+ request.response.response.addContent(new chat_model_1.QuestionResponseContentImpl('The Playwright MCP servers are not running. Would you like to start them now? This may install the Playwright MCP servers.', [
106
+ { text: 'Yes, start the servers', value: 'yes' },
92
107
  { text: 'No, cancel', value: 'no' }
93
108
  ], request, async (selectedOption) => {
94
109
  if (selectedOption.value === 'yes') {
95
110
  // Show progress
96
- const progress = request.response.addProgressMessage({ content: 'Starting Playwright MCP server.', show: 'whileIncomplete' });
111
+ const progress = request.response.addProgressMessage({ content: 'Starting Playwright MCP servers.', show: 'whileIncomplete' });
97
112
  try {
98
- await this.startPlaywrightMCPServer();
113
+ await this.startServers();
99
114
  // Remove progress, continue with normal flow
100
115
  request.response.updateProgressMessage({ ...progress, show: 'whileIncomplete', status: 'completed' });
101
116
  await super.invoke(request);
@@ -107,7 +122,7 @@ let AppTesterChatAgent = class AppTesterChatAgent extends chat_agents_1.Abstract
107
122
  }
108
123
  else {
109
124
  // Continue without starting the server
110
- request.response.response.addContent(new chat_model_1.MarkdownChatResponseContentImpl('Please setup the MCP server.'));
125
+ request.response.response.addContent(new chat_model_1.MarkdownChatResponseContentImpl('Please setup the MCP servers.'));
111
126
  request.response.complete();
112
127
  }
113
128
  }));
@@ -122,37 +137,32 @@ let AppTesterChatAgent = class AppTesterChatAgent extends chat_agents_1.Abstract
122
137
  request.response.complete();
123
138
  }
124
139
  }
140
+ async requiresStartingServers() {
141
+ const allStarted = await Promise.all(exports.REQUIRED_MCP_SERVERS.map(server => this.mcpService.isServerStarted(server.name)));
142
+ return allStarted.some(started => !started);
143
+ }
144
+ async startServers() {
145
+ await Promise.all(exports.REQUIRED_MCP_SERVERS.map(server => this.ensureServerStarted(server)));
146
+ }
125
147
  /**
126
148
  * Starts the Playwright MCP server if it doesn't exist or isn't running.
127
149
  *
128
150
  * @returns A promise that resolves when the server is started
129
151
  */
130
- async startPlaywrightMCPServer() {
152
+ async ensureServerStarted(server) {
131
153
  try {
132
- const startedServers = await this.mcpService.getStartedServers();
133
- if (startedServers.includes(exports.EXPECTED_MCP_SERVER_NAME)) {
154
+ if ((await this.mcpService.isServerStarted(server.name))) {
134
155
  return;
135
156
  }
136
- const mcpServer = {
137
- name: exports.EXPECTED_MCP_SERVER_NAME,
138
- command: 'npx',
139
- args: ['-y', '@playwright/mcp@latest'],
140
- autostart: false,
141
- env: {},
142
- };
143
- const availableServers = await this.mcpService.getServerNames();
144
- if (!availableServers.includes(exports.EXPECTED_MCP_SERVER_NAME)) {
157
+ if (!(await this.mcpService.hasServer(server.name))) {
145
158
  const currentServers = this.preferenceService.get(mcp_preferences_1.MCP_SERVERS_PREF, {});
146
- await this.preferenceService.set(mcp_preferences_1.MCP_SERVERS_PREF, {
147
- ...currentServers,
148
- mcpServer
149
- }, browser_1.PreferenceScope.User);
150
- await this.mcpService.addOrUpdateServer(mcpServer);
159
+ await this.preferenceService.set(mcp_preferences_1.MCP_SERVERS_PREF, { ...currentServers, server }, browser_1.PreferenceScope.User);
160
+ await this.mcpService.addOrUpdateServer(server);
151
161
  }
152
- await this.mcpService.startServer(exports.EXPECTED_MCP_SERVER_NAME);
162
+ await this.mcpService.startServer(server.name);
153
163
  }
154
164
  catch (error) {
155
- this.logger.error(`Error starting Playwright MCP server: ${error}`);
165
+ this.logger.error(`Error starting MCP server ${server.name}: ${error}`);
156
166
  throw error;
157
167
  }
158
168
  }
@@ -1 +1 @@
1
- {"version":3,"file":"app-tester-chat-agent.js","sourceRoot":"","sources":["../../src/browser/app-tester-chat-agent.ts"],"names":[],"mappings":";AAAA,4BAA4B;;;;AAE5B,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2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AE;GACA,kBAAkB,CAsG9B"}
@@ -1 +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;AAQ1D,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,8CAAuB;IAC9B,SAAS,WAAmE;IACrF,UAAmB,cAAc,EAAE,MAAM,GAAG,SAAS,CAAwB;IAE9D,MAAM,CAAC,OAAO,EAAE,uBAAuB,GAAG,OAAO,CAAC,IAAI,CAAC;IAKhE,OAAO,CAAC,OAAO,EAAE,WAAW,GAAG,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC;CAWxE"}
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;AAQ1D,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,8CAA2D;IAClE,SAAS,WAAmE;IACrF,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;CAWxE"}
@@ -37,9 +37,9 @@ let ArchitectAgent = class ArchitectAgent extends common_1.AbstractStreamParsing
37
37
  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 \
38
38
  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 \
39
39
  workspace, such as how to build the project, where to put source code, where to find specific code or configurations, etc.');
40
- this.prompts = [architect_prompt_template_1.architectVariants];
40
+ this.prompts = [architect_prompt_template_1.architectSystemVariants, architect_prompt_template_1.architectTaskSummaryVariants];
41
41
  this.functions = [workspace_functions_1.GET_WORKSPACE_FILE_LIST_FUNCTION_ID, workspace_functions_1.FILE_CONTENT_FUNCTION_ID];
42
- this.systemPromptId = architect_prompt_template_1.architectVariants.id;
42
+ this.systemPromptId = architect_prompt_template_1.architectSystemVariants.id;
43
43
  }
44
44
  async invoke(request) {
45
45
  await super.invoke(request);
@@ -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,sDAAkK;AAElK,4DAAkE;AAClE,mFAAwE;AACxE,uEAA8G;AAC9G,sCAAkC;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,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,wDAAwD,mEAAsC,CAAC,EAAE,IAAI,CAAC;gBAC7H,IAAI,uCAAkB,CAAC,yCAAyC,2DAA8B,CAAC,EAAE,IAAI,CAAC;aACzG,CAAC,CAAC;QACP,CAAC;IACL,CAAC;CACJ,CAAA;AAnCY,wCAAc;AACiB;IAAvC,IAAA,kBAAM,EAAC,oBAAW,CAAC;;mDAA6C;yBADxD,cAAc;IAD1B,IAAA,sBAAU,GAAE;GACA,cAAc,CAmC1B"}
@@ -4,6 +4,7 @@ import { TaskContextStorageService, TaskContextService } from '@theia/ai-chat/li
4
4
  import { CoderAgent } from './coder-agent';
5
5
  import { FileService } from '@theia/filesystem/lib/browser/file-service';
6
6
  import { WorkspaceService } from '@theia/workspace/lib/browser';
7
+ import { AICommandHandlerFactory } from '@theia/ai-core/lib/browser';
7
8
  export declare class SummarizeSessionCommandContribution implements CommandContribution {
8
9
  protected readonly chatService: ChatService;
9
10
  protected readonly taskContextService: TaskContextService;
@@ -12,6 +13,7 @@ export declare class SummarizeSessionCommandContribution implements CommandContr
12
13
  protected readonly taskContextStorageService: TaskContextStorageService;
13
14
  protected readonly fileService: FileService;
14
15
  protected readonly wsService: WorkspaceService;
16
+ protected readonly commandHandlerFactory: AICommandHandlerFactory;
15
17
  registerCommands(registry: CommandRegistry): void;
16
18
  }
17
19
  //# sourceMappingURL=summarize-session-command-contribution.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"summarize-session-command-contribution.d.ts","sourceRoot":"","sources":["../../src/browser/summarize-session-command-contribution.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAqB,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAC3E,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AACnF,OAAO,EAAE,yBAAyB,EAAE,kBAAkB,EAAE,MAAM,iDAAiD,CAAC;AAGhH,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAK3C,OAAO,EAAE,WAAW,EAAE,MAAM,4CAA4C,CAAC;AACzE,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAEhE,qBACa,mCAAoC,YAAW,mBAAmB;IAE3E,SAAS,CAAC,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAC;IAG5C,SAAS,CAAC,QAAQ,CAAC,kBAAkB,EAAE,kBAAkB,CAAC;IAG1D,SAAS,CAAC,QAAQ,CAAC,cAAc,EAAE,cAAc,CAAC;IAGlD,SAAS,CAAC,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAC;IAG1C,SAAS,CAAC,QAAQ,CAAC,yBAAyB,EAAE,yBAAyB,CAAC;IAGxE,SAAS,CAAC,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAC;IAG5C,SAAS,CAAC,QAAQ,CAAC,SAAS,EAAE,gBAAgB,CAAC;IAE/C,gBAAgB,CAAC,QAAQ,EAAE,eAAe,GAAG,IAAI;CAwDpD"}
1
+ {"version":3,"file":"summarize-session-command-contribution.d.ts","sourceRoot":"","sources":["../../src/browser/summarize-session-command-contribution.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAqB,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAC3E,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AACnF,OAAO,EAAE,yBAAyB,EAAE,kBAAkB,EAAE,MAAM,iDAAiD,CAAC;AAGhH,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAK3C,OAAO,EAAE,WAAW,EAAE,MAAM,4CAA4C,CAAC;AACzE,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AAErE,qBACa,mCAAoC,YAAW,mBAAmB;IAE3E,SAAS,CAAC,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAC;IAG5C,SAAS,CAAC,QAAQ,CAAC,kBAAkB,EAAE,kBAAkB,CAAC;IAG1D,SAAS,CAAC,QAAQ,CAAC,cAAc,EAAE,cAAc,CAAC;IAGlD,SAAS,CAAC,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAC;IAG1C,SAAS,CAAC,QAAQ,CAAC,yBAAyB,EAAE,yBAAyB,CAAC;IAGxE,SAAS,CAAC,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAC;IAG5C,SAAS,CAAC,QAAQ,CAAC,SAAS,EAAE,gBAAgB,CAAC;IAG/C,SAAS,CAAC,QAAQ,CAAC,qBAAqB,EAAE,uBAAuB,CAAC;IAElE,gBAAgB,CAAC,QAAQ,EAAE,eAAe,GAAG,IAAI;CAwDpD"}
@@ -28,9 +28,10 @@ const architect_prompt_template_1 = require("../common/architect-prompt-template
28
28
  const file_variable_contribution_1 = require("@theia/ai-core/lib/browser/file-variable-contribution");
29
29
  const file_service_1 = require("@theia/filesystem/lib/browser/file-service");
30
30
  const browser_1 = require("@theia/workspace/lib/browser");
31
+ const browser_2 = require("@theia/ai-core/lib/browser");
31
32
  let SummarizeSessionCommandContribution = class SummarizeSessionCommandContribution {
32
33
  registerCommands(registry) {
33
- registry.registerCommand(summarize_session_commands_1.AI_UPDATE_TASK_CONTEXT_COMMAND, {
34
+ registry.registerCommand(summarize_session_commands_1.AI_UPDATE_TASK_CONTEXT_COMMAND, this.commandHandlerFactory({
34
35
  execute: async () => {
35
36
  const activeSession = this.chatService.getActiveSession();
36
37
  if (!activeSession) {
@@ -46,8 +47,8 @@ let SummarizeSessionCommandContribution = class SummarizeSessionCommandContribut
46
47
  await this.taskContextService.update(activeSession, architect_prompt_template_1.ARCHITECT_TASK_SUMMARY_UPDATE_PROMPT_TEMPLATE_ID);
47
48
  }
48
49
  }
49
- });
50
- registry.registerCommand(summarize_session_commands_1.AI_SUMMARIZE_SESSION_AS_TASK_FOR_CODER, {
50
+ }));
51
+ registry.registerCommand(summarize_session_commands_1.AI_SUMMARIZE_SESSION_AS_TASK_FOR_CODER, this.commandHandlerFactory({
51
52
  execute: async () => {
52
53
  const activeSession = this.chatService.getActiveSession();
53
54
  if (!activeSession) {
@@ -75,7 +76,7 @@ let SummarizeSessionCommandContribution = class SummarizeSessionCommandContribut
75
76
  newSession.model.context.addVariables(summaryVariable);
76
77
  }
77
78
  }
78
- });
79
+ }));
79
80
  }
80
81
  };
81
82
  exports.SummarizeSessionCommandContribution = SummarizeSessionCommandContribution;
@@ -107,6 +108,10 @@ tslib_1.__decorate([
107
108
  (0, inversify_1.inject)(browser_1.WorkspaceService),
108
109
  tslib_1.__metadata("design:type", browser_1.WorkspaceService)
109
110
  ], SummarizeSessionCommandContribution.prototype, "wsService", void 0);
111
+ tslib_1.__decorate([
112
+ (0, inversify_1.inject)(browser_2.AICommandHandlerFactory),
113
+ tslib_1.__metadata("design:type", Function)
114
+ ], SummarizeSessionCommandContribution.prototype, "commandHandlerFactory", void 0);
110
115
  exports.SummarizeSessionCommandContribution = SummarizeSessionCommandContribution = tslib_1.__decorate([
111
116
  (0, inversify_1.injectable)()
112
117
  ], SummarizeSessionCommandContribution);
@@ -1 +1 @@
1
- {"version":3,"file":"summarize-session-command-contribution.js","sourceRoot":"","sources":["../../src/browser/summarize-session-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;;;;AAEhF,sDAA2E;AAC3E,sCAAmF;AACnF,0FAAgH;AAChH,4DAAkE;AAClE,qFAA8H;AAC9H,+CAA2C;AAC3C,4FAAyF;AACzF,mFAAkJ;AAClJ,sGAAsF;AAEtF,6EAAyE;AACzE,0DAAgE;AAGzD,IAAM,mCAAmC,GAAzC,MAAM,mCAAmC;IAsB5C,gBAAgB,CAAC,QAAyB;QACtC,QAAQ,CAAC,eAAe,CAAC,2DAA8B,EAAE;YACrD,OAAO,EAAE,KAAK,IAAI,EAAE;gBAChB,MAAM,aAAa,GAAG,IAAI,CAAC,WAAW,CAAC,gBAAgB,EAAE,CAAC;gBAE1D,IAAI,CAAC,aAAa,EAAE,CAAC;oBACjB,OAAO;gBACX,CAAC;gBAED,yDAAyD;gBACzD,IAAI,CAAC,IAAI,CAAC,kBAAkB,CAAC,UAAU,CAAC,aAAa,CAAC,EAAE,CAAC;oBACrD,yCAAyC;oBACzC,MAAM,IAAI,CAAC,kBAAkB,CAAC,SAAS,CAAC,aAAa,EAAE,qEAAyC,CAAC,CAAC;gBACtG,CAAC;qBAAM,CAAC;oBACJ,0BAA0B;oBAC1B,MAAM,IAAI,CAAC,kBAAkB,CAAC,MAAM,CAAC,aAAa,EAAE,4EAAgD,CAAC,CAAC;gBAC1G,CAAC;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KAAK,EAAE,IAAI,EAAE,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;oBAC7G,MAAM,eAAe,GAAG,EAAE,QAAQ,EAAE,6CAAqB,EAAE,GAAG,EAAE,SAAS,EAAE,CAAC;oBAC5E,UAAU,CAAC,KAAK,CAAC,OAAO,CAAC,YAAY,CAAC,eAAe,CAAC,CAAC;gBAC3D,CAAC;YACL,CAAC;SACJ,CAAC,CAAC;IACP,CAAC;CACJ,CAAA;AA9EY,kFAAmC;AAEzB;IADlB,IAAA,kBAAM,EAAC,oBAAW,CAAC;;wEACwB;AAGzB;IADlB,IAAA,kBAAM,EAAC,yCAAkB,CAAC;sCACY,yCAAkB;+EAAC;AAGvC;IADlB,IAAA,kBAAM,EAAC,qBAAc,CAAC;;2EAC2B;AAG/B;IADlB,IAAA,kBAAM,EAAC,wBAAU,CAAC;sCACY,wBAAU;uEAAC;AAGvB;IADlB,IAAA,kBAAM,EAAC,gDAAyB,CAAC;;sFACsC;AAGrD;IADlB,IAAA,kBAAM,EAAC,0BAAW,CAAC;sCACY,0BAAW;wEAAC;AAGzB;IADlB,IAAA,kBAAM,EAAC,0BAAgB,CAAC;sCACK,0BAAgB;sEAAC;8CApBtC,mCAAmC;IAD/C,IAAA,sBAAU,GAAE;GACA,mCAAmC,CA8E/C"}
1
+ {"version":3,"file":"summarize-session-command-contribution.js","sourceRoot":"","sources":["../../src/browser/summarize-session-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;;;;AAEhF,sDAA2E;AAC3E,sCAAmF;AACnF,0FAAgH;AAChH,4DAAkE;AAClE,qFAA8H;AAC9H,+CAA2C;AAC3C,4FAAyF;AACzF,mFAAkJ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EAC2B;AAG/B;IADlB,IAAA,kBAAM,EAAC,wBAAU,CAAC;sCACY,wBAAU;uEAAC;AAGvB;IADlB,IAAA,kBAAM,EAAC,gDAAyB,CAAC;;sFACsC;AAGrD;IADlB,IAAA,kBAAM,EAAC,0BAAW,CAAC;sCACY,0BAAW;wEAAC;AAGzB;IADlB,IAAA,kBAAM,EAAC,0BAAgB,CAAC;sCACK,0BAAgB;sEAAC;AAG5B;IADlB,IAAA,kBAAM,EAAC,iCAAuB,CAAC;;kFACkC;8CAvBzD,mCAAmC;IAD/C,IAAA,sBAAU,GAAE;GACA,mCAAmC,CAiF/C"}
@@ -1,5 +1,6 @@
1
1
  import { PromptVariantSet } from '@theia/ai-core/lib/common';
2
- export declare const ARCHITECT_TASK_SUMMARY_PROMPT_TEMPLATE_ID = "architect-task-summary";
3
- export declare const ARCHITECT_TASK_SUMMARY_UPDATE_PROMPT_TEMPLATE_ID = "architect-update-task-summary";
4
- export declare const architectVariants: PromptVariantSet;
2
+ export declare const ARCHITECT_TASK_SUMMARY_PROMPT_TEMPLATE_ID = "architect-tasksummary-create";
3
+ export declare const ARCHITECT_TASK_SUMMARY_UPDATE_PROMPT_TEMPLATE_ID = "architect-tasksummary-update";
4
+ export declare const architectSystemVariants: PromptVariantSet;
5
+ export declare const architectTaskSummaryVariants: PromptVariantSet;
5
6
  //# sourceMappingURL=architect-prompt-template.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"architect-prompt-template.d.ts","sourceRoot":"","sources":["../../src/common/architect-prompt-template.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAQ7D,eAAO,MAAM,yCAAyC,2BAA2B,CAAC;AAClF,eAAO,MAAM,gDAAgD,kCAAkC,CAAC;AAEhG,eAAO,MAAM,iBAAiB,kBAyP7B,CAAC"}
1
+ {"version":3,"file":"architect-prompt-template.d.ts","sourceRoot":"","sources":["../../src/common/architect-prompt-template.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAQ7D,eAAO,MAAM,yCAAyC,iCAAiC,CAAC;AACxF,eAAO,MAAM,gDAAgD,iCAAiC,CAAC;AAE/F,eAAO,MAAM,uBAAuB,kBAqEnC,CAAC;AAEF,eAAO,MAAM,4BAA4B,kBAwLxC,CAAC"}
@@ -1,12 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.architectVariants = exports.ARCHITECT_TASK_SUMMARY_UPDATE_PROMPT_TEMPLATE_ID = exports.ARCHITECT_TASK_SUMMARY_PROMPT_TEMPLATE_ID = void 0;
3
+ exports.architectTaskSummaryVariants = exports.architectSystemVariants = exports.ARCHITECT_TASK_SUMMARY_UPDATE_PROMPT_TEMPLATE_ID = exports.ARCHITECT_TASK_SUMMARY_PROMPT_TEMPLATE_ID = void 0;
4
4
  const workspace_functions_1 = require("./workspace-functions");
5
5
  const context_variables_1 = require("./context-variables");
6
6
  const context_functions_1 = require("./context-functions");
7
- exports.ARCHITECT_TASK_SUMMARY_PROMPT_TEMPLATE_ID = 'architect-task-summary';
8
- exports.ARCHITECT_TASK_SUMMARY_UPDATE_PROMPT_TEMPLATE_ID = 'architect-update-task-summary';
9
- exports.architectVariants = {
7
+ exports.ARCHITECT_TASK_SUMMARY_PROMPT_TEMPLATE_ID = 'architect-tasksummary-create';
8
+ exports.ARCHITECT_TASK_SUMMARY_UPDATE_PROMPT_TEMPLATE_ID = 'architect-tasksummary-update';
9
+ exports.architectSystemVariants = {
10
10
  id: 'architect-system',
11
11
  defaultVariant: {
12
12
  id: 'architect-system-default',
@@ -15,69 +15,73 @@ Made improvements or adaptations to this prompt template? We'd love for you to s
15
15
  https://github.com/eclipse-theia/theia/discussions/new?category=prompt-template-contribution --}}
16
16
  # Instructions
17
17
 
18
- You are an AI assistant integrated into Theia IDE, designed to assist software developers. You can't change any files, but you can navigate and read the users workspace using \
19
- the provided functions. Therefore describe and explain the details or procedures necessary to achieve the desired outcome. If file changes are necessary to help the user, be \
18
+ You are an AI assistant integrated into Theia IDE, designed to assist software developers. You can only change the files added to the context, but you can navigate and read the
19
+ users workspace using the provided functions.\
20
+ Therefore describe and explain the details or procedures necessary to achieve the desired outcome. If file changes are necessary to help the user, be \
20
21
  aware that there is another agent called 'Coder' that can suggest file changes. In this case you can create a description on what to do and tell the user to ask '@Coder' to \
21
22
  implement the change plan. If you refer to files, always mention the workspace-relative path.\
22
23
 
23
- Use the following functions to interact with the workspace files as needed:
24
- - **~{${workspace_functions_1.GET_WORKSPACE_DIRECTORY_STRUCTURE_FUNCTION_ID}}**: Returns the complete directory structure.
25
- - **~{${workspace_functions_1.GET_WORKSPACE_FILE_LIST_FUNCTION_ID}}**: Lists files and directories in a specific directory.
26
- - **~{${workspace_functions_1.FILE_CONTENT_FUNCTION_ID}}**: Retrieves the content of a specific file.
27
-
28
- ### Workspace Navigation Guidelines
24
+ ## Context Retrieval
25
+ Use the following functions to interact with the workspace files if you require context:
26
+ - **~{${workspace_functions_1.GET_WORKSPACE_DIRECTORY_STRUCTURE_FUNCTION_ID}}**
27
+ - **~{${workspace_functions_1.GET_WORKSPACE_FILE_LIST_FUNCTION_ID}}**
28
+ - **~{${workspace_functions_1.FILE_CONTENT_FUNCTION_ID}}**
29
+ - **~{${workspace_functions_1.SEARCH_IN_WORKSPACE_FUNCTION_ID}}**
29
30
 
30
- 1. **Start at the Root**: For general questions (e.g., "How to build the project"), check root-level documentation files or setup files before browsing subdirectories.
31
- 2. **Confirm Paths**: Always verify paths by listing directories or files as you navigate. Avoid assumptions based on user input alone.
32
- 3. **Navigate Step-by-Step**: Move into subdirectories only as needed, confirming each directory level.
31
+ Remember file locations that are relevant for completing your tasks using **~{${context_functions_1.UPDATE_CONTEXT_FILES_FUNCTION_ID}}**
32
+ Only add files that are really relevant to look at later. Only add files that are really relevant to look at later.
33
33
 
34
+ ## File Validation
35
+ Use the following function to retrieve a list of problems in a file if the user requests fixes in a given file: **~{${workspace_functions_1.GET_FILE_DIAGNOSTICS_ID}}**
34
36
  ## Additional Context
35
37
  The following files have been provided for additional context. Some of them may also be referred to by the user (e.g. "this file" or "the attachment"). \
36
38
  Always look at the relevant files to understand your task using the function ~{${workspace_functions_1.FILE_CONTENT_FUNCTION_ID}}
37
39
  {{${context_variables_1.CONTEXT_FILES_VARIABLE_ID}}}
38
40
 
39
41
  {{prompt:project-info}}
42
+
43
+ {{${context_variables_1.TASK_CONTEXT_SUMMARY_VARIABLE_ID}}}
40
44
  `
41
45
  },
42
46
  variants: [
43
47
  {
44
- id: 'architect-system-next',
48
+ id: 'architect-system-simple',
45
49
  template: `{{!-- This prompt is licensed under the MIT License (https://opensource.org/license/mit).
46
50
  Made improvements or adaptations to this prompt template? We'd love for you to share it with the community! Contribute back here:
47
51
  https://github.com/eclipse-theia/theia/discussions/new?category=prompt-template-contribution --}}
48
52
  # Instructions
49
-
50
- You are an AI assistant integrated into Theia IDE, designed to assist software developers. You can only change the files added to the context, but you can navigate and read the
51
- users workspace using the provided functions.\
52
- Therefore describe and explain the details or procedures necessary to achieve the desired outcome. If file changes are necessary to help the user, be \
53
+
54
+ You are an AI assistant integrated into Theia IDE, designed to assist software developers. You can't change any files, but you can navigate and read the users workspace using \
55
+ the provided functions. Therefore describe and explain the details or procedures necessary to achieve the desired outcome. If file changes are necessary to help the user, be \
53
56
  aware that there is another agent called 'Coder' that can suggest file changes. In this case you can create a description on what to do and tell the user to ask '@Coder' to \
54
57
  implement the change plan. If you refer to files, always mention the workspace-relative path.\
58
+
59
+ Use the following functions to interact with the workspace files as needed:
60
+ - **~{${workspace_functions_1.GET_WORKSPACE_DIRECTORY_STRUCTURE_FUNCTION_ID}}**: Returns the complete directory structure.
61
+ - **~{${workspace_functions_1.GET_WORKSPACE_FILE_LIST_FUNCTION_ID}}**: Lists files and directories in a specific directory.
62
+ - **~{${workspace_functions_1.FILE_CONTENT_FUNCTION_ID}}**: Retrieves the content of a specific file.
63
+
64
+ ### Workspace Navigation Guidelines
55
65
 
56
- ## Context Retrieval
57
- Use the following functions to interact with the workspace files if you require context:
58
- - **~{${workspace_functions_1.GET_WORKSPACE_DIRECTORY_STRUCTURE_FUNCTION_ID}}**
59
- - **~{${workspace_functions_1.GET_WORKSPACE_FILE_LIST_FUNCTION_ID}}**
60
- - **~{${workspace_functions_1.FILE_CONTENT_FUNCTION_ID}}**
61
- - **~{${workspace_functions_1.SEARCH_IN_WORKSPACE_FUNCTION_ID}}**
62
-
63
- Remember file locations that are relevant for completing your tasks using **~{${context_functions_1.UPDATE_CONTEXT_FILES_FUNCTION_ID}}**
64
- Only add files that are really relevant to look at later. Only add files that are really relevant to look at later.
66
+ 1. **Start at the Root**: For general questions (e.g., "How to build the project"), check root-level documentation files or setup files before browsing subdirectories.
67
+ 2. **Confirm Paths**: Always verify paths by listing directories or files as you navigate. Avoid assumptions based on user input alone.
68
+ 3. **Navigate Step-by-Step**: Move into subdirectories only as needed, confirming each directory level.
65
69
 
66
- ## File Validation
67
- Use the following function to retrieve a list of problems in a file if the user requests fixes in a given file: **~{${workspace_functions_1.GET_FILE_DIAGNOSTICS_ID}}**
68
70
  ## Additional Context
69
71
  The following files have been provided for additional context. Some of them may also be referred to by the user (e.g. "this file" or "the attachment"). \
70
72
  Always look at the relevant files to understand your task using the function ~{${workspace_functions_1.FILE_CONTENT_FUNCTION_ID}}
71
73
  {{${context_variables_1.CONTEXT_FILES_VARIABLE_ID}}}
72
74
 
73
75
  {{prompt:project-info}}
74
-
75
- {{${context_variables_1.TASK_CONTEXT_SUMMARY_VARIABLE_ID}}}
76
76
  `
77
- },
78
- {
79
- id: exports.ARCHITECT_TASK_SUMMARY_PROMPT_TEMPLATE_ID,
80
- template: `{{!-- This prompt is licensed under the MIT License (https://opensource.org/license/mit).
77
+ }
78
+ ]
79
+ };
80
+ exports.architectTaskSummaryVariants = {
81
+ id: 'architect-tasksummary',
82
+ defaultVariant: {
83
+ id: exports.ARCHITECT_TASK_SUMMARY_PROMPT_TEMPLATE_ID,
84
+ template: `{{!-- This prompt is licensed under the MIT License (https://opensource.org/license/mit).
81
85
  Made improvements or adaptations to this prompt template? We'd love for you to share it with the community! Contribute back here:
82
86
  https://github.com/eclipse-theia/theia/discussions/new?category=prompt-template-contribution --}}
83
87
 
@@ -204,7 +208,8 @@ Use the following format, but only include the sections that were discussed in t
204
208
  **Next Steps:**
205
209
  - [Immediate action items, who should act next.]
206
210
  `
207
- },
211
+ },
212
+ variants: [
208
213
  {
209
214
  id: exports.ARCHITECT_TASK_SUMMARY_UPDATE_PROMPT_TEMPLATE_ID,
210
215
  template: `{{!-- This prompt is licensed under the MIT License (https://opensource.org/license/mit).
@@ -1 +1 @@
1
- {"version":3,"file":"architect-prompt-template.js","sourceRoot":"","sources":["../../src/common/architect-prompt-template.ts"],"names":[],"mappings":";;;AAWA,+DAG+B;AAC/B,2DAAkG;AAClG,2DAAuE;AAE1D,QAAA,yCAAyC,GAAG,wBAAwB,CAAC;AACrE,QAAA,gDAAgD,GAAG,+BAA+B,CAAC;AAEnF,QAAA,iBAAiB,GAAqB;IAC/C,EAAE,EAAE,kBAAkB;IACtB,cAAc,EAAE;QACZ,EAAE,EAAE,0BAA0B;QAC9B,QAAQ,EAAE;;;;;;;;;;;QAWV,mEAA6C;QAC7C,yDAAmC;QACnC,8CAAwB;;;;;;;;;;iFAUiD,8CAAwB;IACrG,6CAAyB;;;CAG5B;KACI;IACD,QAAQ,EAAE;QACN;YACI,EAAE,EAAE,uBAAuB;YAC3B,QAAQ,EAAE;;;;;;;;;;;;;QAad,mEAA6C;QAC7C,yDAAmC;QACnC,8CAAwB;QACxB,qDAA+B;;gFAEyC,oDAAgC;;;;sHAIM,6CAAuB;;;iFAG5D,8CAAwB;IACrG,6CAAyB;;;;IAIzB,oDAAgC;CACnC;SACQ;QACD;YACI,EAAE,EAAE,iDAAyC;YAC7C,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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A8HjB;KACI;IACD,QAAQ,EAAE;QAEN;YACI,EAAE,EAAE,wDAAgD;YACpD,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA6ClB,oDAAgC;CACnC;SAAE;KACE;CACJ,CAAC"}
@@ -1,8 +1,8 @@
1
1
  import { BasePromptFragment } from '@theia/ai-core/lib/common';
2
- export declare const CODER_SYSTEM_PROMPT_ID = "coder-prompt";
3
- export declare const CODER_SIMPLE_EDIT_TEMPLATE_ID = "coder-simple-edit";
4
- export declare const CODER_EDIT_TEMPLATE_ID = "coder-edit";
5
- export declare const CODER_AGENT_MODE_TEMPLATE_ID = "coder-agent-mode";
2
+ export declare const CODER_SYSTEM_PROMPT_ID = "coder-system";
3
+ export declare const CODER_SIMPLE_EDIT_TEMPLATE_ID = "coder-system-simple-edit";
4
+ export declare const CODER_EDIT_TEMPLATE_ID = "coder-system-edit";
5
+ export declare const CODER_AGENT_MODE_TEMPLATE_ID = "coder-system-agent-mode";
6
6
  export declare function getCoderAgentModePromptTemplate(): BasePromptFragment;
7
7
  export declare function getCoderPromptTemplateEdit(): BasePromptFragment;
8
8
  export declare function getCoderPromptTemplateSimpleEdit(): BasePromptFragment;
@@ -1 +1 @@
1
- {"version":3,"file":"coder-replace-prompt-template.d.ts","sourceRoot":"","sources":["../../src/common/coder-replace-prompt-template.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAsB/D,eAAO,MAAM,sBAAsB,iBAAiB,CAAC;AAErD,eAAO,MAAM,6BAA6B,sBAAsB,CAAC;AACjE,eAAO,MAAM,sBAAsB,eAAe,CAAC;AACnD,eAAO,MAAM,4BAA4B,qBAAqB,CAAC;AAE/D,wBAAgB,+BAA+B,IAAI,kBAAkB,CAsHpE;AAED,wBAAgB,0BAA0B,IAAI,kBAAkB,CAmE/D;AAED,wBAAgB,gCAAgC,IAAI,kBAAkB,CA0DrE"}
1
+ {"version":3,"file":"coder-replace-prompt-template.d.ts","sourceRoot":"","sources":["../../src/common/coder-replace-prompt-template.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAsB/D,eAAO,MAAM,sBAAsB,iBAAiB,CAAC;AAErD,eAAO,MAAM,6BAA6B,6BAA6B,CAAC;AACxE,eAAO,MAAM,sBAAsB,sBAAsB,CAAC;AAC1D,eAAO,MAAM,4BAA4B,4BAA4B,CAAC;AAEtE,wBAAgB,+BAA+B,IAAI,kBAAkB,CAsHpE;AAED,wBAAgB,0BAA0B,IAAI,kBAAkB,CAmE/D;AAED,wBAAgB,gCAAgC,IAAI,kBAAkB,CA0DrE"}
@@ -16,10 +16,10 @@ const workspace_functions_1 = require("./workspace-functions");
16
16
  const context_variables_1 = require("./context-variables");
17
17
  const context_functions_1 = require("./context-functions");
18
18
  const file_changeset_function_ids_1 = require("./file-changeset-function-ids");
19
- exports.CODER_SYSTEM_PROMPT_ID = 'coder-prompt';
20
- exports.CODER_SIMPLE_EDIT_TEMPLATE_ID = 'coder-simple-edit';
21
- exports.CODER_EDIT_TEMPLATE_ID = 'coder-edit';
22
- exports.CODER_AGENT_MODE_TEMPLATE_ID = 'coder-agent-mode';
19
+ exports.CODER_SYSTEM_PROMPT_ID = 'coder-system';
20
+ exports.CODER_SIMPLE_EDIT_TEMPLATE_ID = 'coder-system-simple-edit';
21
+ exports.CODER_EDIT_TEMPLATE_ID = 'coder-system-edit';
22
+ exports.CODER_AGENT_MODE_TEMPLATE_ID = 'coder-system-agent-mode';
23
23
  function getCoderAgentModePromptTemplate() {
24
24
  return {
25
25
  id: exports.CODER_AGENT_MODE_TEMPLATE_ID,
@@ -202,7 +202,7 @@ You have previously proposed changes for the following files. Some suggestions m
202
202
  {{${context_variables_1.TASK_CONTEXT_SUMMARY_VARIABLE_ID}}}
203
203
 
204
204
  ## Final Instruction
205
- - Your task is to propose changes to be reviewed by the user
205
+ - Your task is to propose changes to be reviewed by the user. Always do so using the functions described above.
206
206
  - Tasks such as building or liniting run on the workspace state, the user has to accept the changes beforehand
207
207
  - Do not run a build or any error checking before the users asks you to
208
208
  - Focus on the task that the user described
@@ -261,7 +261,7 @@ You have previously proposed changes for the following files. Some suggestions m
261
261
  {{${context_variables_1.TASK_CONTEXT_SUMMARY_VARIABLE_ID}}}
262
262
 
263
263
  ## Final Instruction
264
- - Your task is to propose changes to be reviewed by the user
264
+ - Your task is to propose changes to be reviewed by the user. Always do so using the functions described above.
265
265
  - Tasks such as building or liniting run on the workspace state, the user has to accept the changes beforehand
266
266
  - Do not run a build or any error checking before the users asks you to
267
267
  - Focus on the task that the user described
@@ -1 +1 @@
1
- {"version":3,"file":"coder-replace-prompt-template.js","sourceRoot":"","sources":["../../src/common/coder-replace-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,4CAAgE;AAChE,+DAQ+B;AAC/B,2DAAkG;AAClG,2DAAuE;AACvE,+EAOuC;AAE1B,QAAA,sBAAsB,GAAG,cAAc,CAAC;AAExC,QAAA,6BAA6B,GAAG,mBAAmB,CAAC;AACpD,QAAA,sBAAsB,GAAG,YAAY,CAAC;AACtC,QAAA,4BAA4B,GAAG,kBAAkB,CAAC;AAE/D,SAAgB,+BAA+B;IAC3C,OAAO;QACH,EAAE,EAAE,oCAA4B;QAChC,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAiCZ,mEAA6C;MAC7C,yDAAmC;MACnC,8CAAwB;MACxB,qDAA+B;;MAE/B,oDAAgC;;;;;QAK9B,wDAA0B;QAC1B,mDAAqB;;4CAEe,wDAA0B;SAC7D,wDAA0B,8BAA8B,mDAAqB;;;MAGhF,6CAAuB;;;UAGnB,4CAAsB;UACtB,0CAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iFAsCmD,8CAAwB;IACrG,6CAAyB;;;;;;;;;;IAUzB,oDAAgC;;;;;;;;;CASnC;QACO,GAAG,CAAC,EAAE,SAAS,EAAE,8BAAsB,EAAE,CAAC;KAC7C,CAAC;AACN,CAAC;AAtHD,0EAsHC;AAED,SAAgB,0BAA0B;IACtC,OAAO;QACH,EAAE,EAAE,8BAAsB;QAC1B,QAAQ,EAAE;;;;;;;;QAQV,mEAA6C;QAC7C,yDAAmC;QACnC,8CAAwB;QACxB,qDAA+B;;;gFAGyC,oDAAgC;;;;;;;;;oCAS5E,qDAAuB;;QAEnD,0DAA4B;QAC5B,qDAAuB;WACpB,0DAA4B,8BAA8B,qDAAuB;QACpF,mDAAqB;;;;;;;2EAO8C,4CAAsB,8BAA8B,0CAAoB;;;;;;sHAM7B,6CAAuB;;;;;;iFAM5D,8CAAwB;IACrG,6CAAyB;;;;IAIzB,wCAA8B;;;;IAI9B,oDAAgC;;;;;;;CAOnC;KAAC,CAAC;AACH,CAAC;AAnED,gEAmEC;AAED,SAAgB,gCAAgC;IAC5C,OAAO;QACH,EAAE,EAAE,qCAA6B;QACjC,QAAQ,EAAE;;;;;;;;QAQV,mEAA6C;QAC7C,yDAAmC;QACnC,8CAAwB;QACxB,qDAA+B;;;gFAGyC,oDAAgC;;;;;;;;;oCAS5E,qDAAuB;;QAEnD,0DAA4B;QAC5B,qDAAuB;WACpB,0DAA4B,8BAA8B,qDAAuB;QACpF,mDAAqB;;;;;;;;iFAQoD,8CAAwB;IACrG,6CAAyB;;;;IAIzB,wCAA8B;;;;IAI9B,oDAAgC;;;;;;;CAOnC;QACO,GAAG,CAAC,EAAE,SAAS,EAAE,8BAAsB,EAAE,CAAC;KAC7C,CAAC;AACN,CAAC;AA1DD,4EA0DC"}
1
+ {"version":3,"file":"coder-replace-prompt-template.js","sourceRoot":"","sources":["../../src/common/coder-replace-prompt-template.ts"],"names":[],"mappings":";AAAA,qDAAqD;A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HAM7B,6CAAuB;;;;;;iFAM5D,8CAAwB;IACrG,6CAAyB;;;;IAIzB,wCAA8B;;;;IAI9B,oDAAgC;;;;;;;CAOnC;KAAC,CAAC;AACH,CAAC;AAnED,gEAmEC;AAED,SAAgB,gCAAgC;IAC5C,OAAO;QACH,EAAE,EAAE,qCAA6B;QACjC,QAAQ,EAAE;;;;;;;;QAQV,mEAA6C;QAC7C,yDAAmC;QACnC,8CAAwB;QACxB,qDAA+B;;;gFAGyC,oDAAgC;;;;;;;;;oCAS5E,qDAAuB;;QAEnD,0DAA4B;QAC5B,qDAAuB;WACpB,0DAA4B,8BAA8B,qDAAuB;QACpF,mDAAqB;;;;;;;;iFAQoD,8CAAwB;IACrG,6CAAyB;;;;IAIzB,wCAA8B;;;;IAI9B,oDAAgC;;;;;;;CAOnC;QACO,GAAG,CAAC,EAAE,SAAS,EAAE,8BAAsB,EAAE,CAAC;KAC7C,CAAC;AACN,CAAC;AA1DD,4EA0DC"}
@@ -36,8 +36,8 @@ let UniversalChatAgent = class UniversalChatAgent extends chat_agents_1.Abstract
36
36
  + 'answers to general programming and software development questions. It is also the fall-back for any generic '
37
37
  + 'questions the user might ask. The universal agent currently does not have any context by default, i.e. it cannot '
38
38
  + 'access the current user context or the workspace.');
39
- this.prompts = [{ id: 'universal-prompt', defaultVariant: universal_prompt_template_1.universalTemplate, variants: [universal_prompt_template_1.universalTemplateVariant] }];
40
- this.systemPromptId = 'universal-prompt';
39
+ this.prompts = [{ id: 'universal-system', defaultVariant: universal_prompt_template_1.universalTemplate, variants: [universal_prompt_template_1.universalTemplateVariant] }];
40
+ this.systemPromptId = 'universal-system';
41
41
  }
42
42
  };
43
43
  exports.UniversalChatAgent = UniversalChatAgent;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theia/ai-ide",
3
- "version": "1.63.0-next.52+176018e53",
3
+ "version": "1.63.0",
4
4
  "description": "AI IDE Agents Extension",
5
5
  "license": "EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0",
6
6
  "repository": {
@@ -15,19 +15,19 @@
15
15
  "theia-extension"
16
16
  ],
17
17
  "dependencies": {
18
- "@theia/ai-chat": "1.63.0-next.52+176018e53",
19
- "@theia/ai-chat-ui": "1.63.0-next.52+176018e53",
20
- "@theia/ai-core": "1.63.0-next.52+176018e53",
21
- "@theia/ai-mcp": "1.63.0-next.52+176018e53",
22
- "@theia/core": "1.63.0-next.52+176018e53",
23
- "@theia/filesystem": "1.63.0-next.52+176018e53",
24
- "@theia/markers": "1.63.0-next.52+176018e53",
25
- "@theia/monaco": "1.63.0-next.52+176018e53",
26
- "@theia/navigator": "1.63.0-next.52+176018e53",
27
- "@theia/search-in-workspace": "1.63.0-next.52+176018e53",
28
- "@theia/task": "1.63.0-next.52+176018e53",
29
- "@theia/terminal": "1.63.0-next.52+176018e53",
30
- "@theia/workspace": "1.63.0-next.52+176018e53",
18
+ "@theia/ai-chat": "1.63.0",
19
+ "@theia/ai-chat-ui": "1.63.0",
20
+ "@theia/ai-core": "1.63.0",
21
+ "@theia/ai-mcp": "1.63.0",
22
+ "@theia/core": "1.63.0",
23
+ "@theia/filesystem": "1.63.0",
24
+ "@theia/markers": "1.63.0",
25
+ "@theia/monaco": "1.63.0",
26
+ "@theia/navigator": "1.63.0",
27
+ "@theia/search-in-workspace": "1.63.0",
28
+ "@theia/task": "1.63.0",
29
+ "@theia/terminal": "1.63.0",
30
+ "@theia/workspace": "1.63.0",
31
31
  "date-fns": "^4.1.0",
32
32
  "ignore": "^6.0.0",
33
33
  "js-yaml": "^4.1.0",
@@ -37,8 +37,8 @@
37
37
  "access": "public"
38
38
  },
39
39
  "devDependencies": {
40
- "@theia/cli": "1.63.0-next.52+176018e53",
41
- "@theia/test": "1.63.0-next.52+176018e53"
40
+ "@theia/cli": "1.63.0",
41
+ "@theia/test": "1.63.0"
42
42
  },
43
43
  "theiaExtensions": [
44
44
  {
@@ -61,5 +61,5 @@
61
61
  "nyc": {
62
62
  "extends": "../../configs/nyc.json"
63
63
  },
64
- "gitHead": "176018e53e62cafec9b25b23ac9f0b4826b6d0f7"
64
+ "gitHead": "facf442522991134333495a0b90cf56a56990280"
65
65
  }
@@ -99,13 +99,15 @@ export class AIAgentConfigurationWidget extends ReactWidget {
99
99
 
100
100
  protected render(): React.ReactNode {
101
101
  return <div className='ai-agent-configuration-main'>
102
- <div className='configuration-agents-list preferences-tree-widget theia-TreeContainer' style={{ width: '25%' }}>
102
+ <div className='configuration-agents-list theia-Tree theia-TreeContainer' style={{ width: '25%' }}>
103
103
  <ul>
104
- {this.agentService.getAllAgents().map(agent =>
105
- <li key={agent.id} className='theia-TreeNode theia-CompositeTreeNode theia-ExpandableTreeNode' onClick={() => this.setActiveAgent(agent)}>
104
+ {this.agentService.getAllAgents().map(agent => {
105
+ const isActive = this.aiConfigurationSelectionService.getActiveAgent()?.id === agent.id;
106
+ const className = `theia-TreeNode theia-CompositeTreeNode theia-ExpandableTreeNode${isActive ? ' theia-mod-selected' : ''}`;
107
+ return <li key={agent.id} className={className} onClick={() => this.setActiveAgent(agent)}>
106
108
  {this.renderAgentName(agent)}
107
- </li>
108
- )}
109
+ </li>;
110
+ })}
109
111
  </ul>
110
112
  <div className='configuration-agents-add'>
111
113
  <button