@theia/ai-ide 1.62.0-next.3 → 1.62.1
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 +3 -3
- package/lib/browser/ai-configuration/agent-configuration-widget.d.ts.map +1 -1
- package/lib/browser/ai-configuration/agent-configuration-widget.js +24 -18
- package/lib/browser/ai-configuration/agent-configuration-widget.js.map +1 -1
- package/lib/browser/ai-configuration/ai-configuration-view-contribution.js +1 -1
- package/lib/browser/ai-configuration/ai-configuration-view-contribution.js.map +1 -1
- package/lib/browser/ai-configuration/ai-configuration-widget.d.ts +2 -0
- package/lib/browser/ai-configuration/ai-configuration-widget.d.ts.map +1 -1
- package/lib/browser/ai-configuration/ai-configuration-widget.js +6 -0
- package/lib/browser/ai-configuration/ai-configuration-widget.js.map +1 -1
- package/lib/browser/ai-configuration/prompt-fragments-configuration-widget.d.ts +138 -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 +492 -0
- package/lib/browser/ai-configuration/prompt-fragments-configuration-widget.js.map +1 -0
- package/lib/browser/ai-configuration/template-settings-renderer.d.ts +4 -5
- package/lib/browser/ai-configuration/template-settings-renderer.d.ts.map +1 -1
- package/lib/browser/ai-configuration/template-settings-renderer.js +15 -31
- package/lib/browser/ai-configuration/template-settings-renderer.js.map +1 -1
- package/lib/browser/architect-agent.d.ts +1 -1
- package/lib/browser/architect-agent.d.ts.map +1 -1
- package/lib/browser/architect-agent.js +2 -2
- package/lib/browser/architect-agent.js.map +1 -1
- package/lib/browser/coder-agent.d.ts +2 -2
- package/lib/browser/coder-agent.d.ts.map +1 -1
- package/lib/browser/coder-agent.js +7 -3
- package/lib/browser/coder-agent.js.map +1 -1
- package/lib/browser/file-changeset-functions.d.ts +14 -1
- package/lib/browser/file-changeset-functions.d.ts.map +1 -1
- package/lib/browser/file-changeset-functions.js +153 -14
- package/lib/browser/file-changeset-functions.js.map +1 -1
- package/lib/browser/frontend-module.d.ts.map +1 -1
- package/lib/browser/frontend-module.js +11 -1
- package/lib/browser/frontend-module.js.map +1 -1
- package/lib/browser/template-preference-contribution.d.ts +2 -2
- package/lib/browser/template-preference-contribution.d.ts.map +1 -1
- package/lib/browser/template-preference-contribution.js +2 -2
- package/lib/browser/template-preference-contribution.js.map +1 -1
- package/lib/browser/workspace-functions.d.ts +1 -1
- package/lib/browser/workspace-functions.js +13 -13
- package/lib/common/architect-prompt-template.d.ts +2 -3
- package/lib/common/architect-prompt-template.d.ts.map +1 -1
- package/lib/common/architect-prompt-template.js +49 -11
- package/lib/common/architect-prompt-template.js.map +1 -1
- package/lib/common/coder-replace-prompt-template.d.ts +6 -3
- package/lib/common/coder-replace-prompt-template.d.ts.map +1 -1
- package/lib/common/coder-replace-prompt-template.js +148 -22
- package/lib/common/coder-replace-prompt-template.js.map +1 -1
- package/lib/common/command-chat-agents.d.ts +1 -1
- package/lib/common/command-chat-agents.d.ts.map +1 -1
- package/lib/common/command-chat-agents.js +4 -4
- package/lib/common/command-chat-agents.js.map +1 -1
- package/lib/common/command-prompt-template.d.ts +2 -2
- package/lib/common/command-prompt-template.d.ts.map +1 -1
- package/lib/common/command-prompt-template.js +18 -15
- package/lib/common/command-prompt-template.js.map +1 -1
- package/lib/common/orchestrator-chat-agent.d.ts +2 -3
- package/lib/common/orchestrator-chat-agent.d.ts.map +1 -1
- package/lib/common/orchestrator-chat-agent.js +11 -26
- package/lib/common/orchestrator-chat-agent.js.map +1 -1
- package/lib/common/orchestrator-prompt-template.d.ts +2 -2
- package/lib/common/orchestrator-prompt-template.d.ts.map +1 -1
- package/lib/common/orchestrator-prompt-template.js +4 -1
- package/lib/common/orchestrator-prompt-template.js.map +1 -1
- package/lib/common/universal-chat-agent.d.ts +5 -1
- package/lib/common/universal-chat-agent.d.ts.map +1 -1
- package/lib/common/universal-chat-agent.js +2 -2
- package/lib/common/universal-chat-agent.js.map +1 -1
- package/lib/common/universal-prompt-template.d.ts +3 -3
- package/lib/common/universal-prompt-template.d.ts.map +1 -1
- package/lib/common/universal-prompt-template.js +1 -2
- package/lib/common/universal-prompt-template.js.map +1 -1
- package/package.json +17 -17
- package/src/browser/ai-configuration/agent-configuration-widget.tsx +31 -24
- package/src/browser/ai-configuration/ai-configuration-view-contribution.ts +1 -1
- package/src/browser/ai-configuration/ai-configuration-widget.tsx +6 -0
- package/src/browser/ai-configuration/prompt-fragments-configuration-widget.tsx +710 -0
- package/src/browser/ai-configuration/template-settings-renderer.tsx +18 -38
- package/src/browser/architect-agent.ts +3 -3
- package/src/browser/coder-agent.ts +10 -5
- package/src/browser/file-changeset-functions.ts +152 -14
- package/src/browser/frontend-module.ts +14 -2
- package/src/browser/style/index.css +320 -0
- package/src/browser/template-preference-contribution.ts +4 -4
- package/src/browser/workspace-functions.ts +3 -3
- package/src/common/architect-prompt-template.ts +54 -14
- package/src/common/coder-replace-prompt-template.ts +150 -24
- package/src/common/command-chat-agents.ts +4 -4
- package/src/common/command-prompt-template.ts +21 -18
- package/src/common/orchestrator-chat-agent.ts +12 -28
- package/src/common/orchestrator-prompt-template.ts +7 -4
- package/src/common/universal-chat-agent.ts +2 -2
- package/src/common/universal-prompt-template.ts +4 -5
|
@@ -127,6 +127,326 @@
|
|
|
127
127
|
margin-left: 0;
|
|
128
128
|
}
|
|
129
129
|
|
|
130
|
+
/* Prompt Fragments Configuration Styles */
|
|
131
|
+
.ai-prompt-fragments-configuration {
|
|
132
|
+
padding: var(--theia-ui-padding);
|
|
133
|
+
max-width: 1200px;
|
|
134
|
+
margin: 0 auto;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.prompt-fragments-header {
|
|
138
|
+
display: flex;
|
|
139
|
+
justify-content: space-between;
|
|
140
|
+
align-items: center;
|
|
141
|
+
margin-bottom: 20px;
|
|
142
|
+
padding-bottom: 10px;
|
|
143
|
+
border-bottom: 1px solid var(--theia-panelTitle-activeBorder);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.prompt-fragments-header h2 {
|
|
147
|
+
margin: 0;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.global-actions {
|
|
151
|
+
display: flex;
|
|
152
|
+
gap: 10px;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.global-action-button {
|
|
156
|
+
padding: 6px 12px;
|
|
157
|
+
background-color: transparent;
|
|
158
|
+
color: var(--theia-foreground);
|
|
159
|
+
border: 1px solid var(--theia-border);
|
|
160
|
+
border-radius: 4px;
|
|
161
|
+
cursor: pointer;
|
|
162
|
+
font-size: 12px;
|
|
163
|
+
transition: all 0.2s;
|
|
164
|
+
display: flex;
|
|
165
|
+
align-items: center;
|
|
166
|
+
gap: 5px;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.global-action-button:hover {
|
|
170
|
+
background-color: var(--theia-list-hoverBackground);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.prompt-fragments-container {
|
|
174
|
+
display: flex;
|
|
175
|
+
flex-direction: column;
|
|
176
|
+
gap: 15px;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.prompt-fragment-group {
|
|
180
|
+
border: 1px solid var(--theia-panelTitle-activeBorder);
|
|
181
|
+
border-radius: 6px;
|
|
182
|
+
overflow: hidden;
|
|
183
|
+
margin-bottom: 15px;
|
|
184
|
+
background-color: var(--theia-editorWidget-background);
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
.prompt-customization {
|
|
188
|
+
border: 1px solid var(--theia-panelTitle-activeBorder);
|
|
189
|
+
border-radius: 6px;
|
|
190
|
+
margin-bottom: 10px;
|
|
191
|
+
background-color: var(--theia-editor-background);
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.prompt-customization.active-customization {
|
|
195
|
+
border: 3px solid var(--theia-successBackground);
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.prompt-customization-header {
|
|
199
|
+
display: flex;
|
|
200
|
+
justify-content: space-between;
|
|
201
|
+
align-items: center;
|
|
202
|
+
padding: 8px 12px;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
.prompt-customization-title {
|
|
206
|
+
display: flex;
|
|
207
|
+
gap: 8px;
|
|
208
|
+
align-items: center;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
.prompt-customization-actions {
|
|
212
|
+
display: flex;
|
|
213
|
+
gap: 8px;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.prompt-customization-description {
|
|
217
|
+
padding: 0px 15px;
|
|
218
|
+
color: var(--theia-descriptionForeground);
|
|
219
|
+
font-size: 12px;
|
|
220
|
+
margin-bottom: 5px;
|
|
221
|
+
font-style: italic;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
.expansion-icon {
|
|
225
|
+
color: var(--theia-descriptionForeground);
|
|
226
|
+
font-size: 14px;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
.template-action-button {
|
|
230
|
+
background-color: transparent;
|
|
231
|
+
color: var(--theia-foreground);
|
|
232
|
+
border: 1px solid var(--theia-border);
|
|
233
|
+
border-radius: 4px;
|
|
234
|
+
padding: 4px 8px;
|
|
235
|
+
font-size: 12px;
|
|
236
|
+
cursor: pointer;
|
|
237
|
+
transition: all 0.2s;
|
|
238
|
+
display: flex;
|
|
239
|
+
align-items: center;
|
|
240
|
+
gap: 4px;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
.template-action-button:hover {
|
|
244
|
+
background-color: var(--theia-list-hoverBackground);
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
.template-action-button.reset-button {
|
|
248
|
+
color: var(--theia-foreground);
|
|
249
|
+
border-color: var(--theia-border);
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
.template-action-button.config-button {
|
|
253
|
+
color: var(--theia-foreground);
|
|
254
|
+
border-color: var(--theia-border);
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
.template-action-button.delete-button {
|
|
258
|
+
color: var(--theia-errorForeground);
|
|
259
|
+
border-color: var(--theia-errorForeground);
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
.template-action-button.delete-button:hover {
|
|
263
|
+
background-color: var(--theia-errorBackground);
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
.badge {
|
|
267
|
+
font-size: 12px;
|
|
268
|
+
padding: 3px 8px;
|
|
269
|
+
border-radius: 12px;
|
|
270
|
+
font-weight: 500;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
.default-variant {
|
|
274
|
+
background: hsla(0, 0%, 68%, 0.31);
|
|
275
|
+
color: var(--theia-foreground);
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
.active-indicator {
|
|
279
|
+
background-color: var(--theia-successBackground);
|
|
280
|
+
color: var(--theia-editor-background);
|
|
281
|
+
font-size: 12px;
|
|
282
|
+
padding: 2px 6px;
|
|
283
|
+
border-radius: 4px;
|
|
284
|
+
font-weight: 500;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
.selected-indicator {
|
|
288
|
+
background-color: var(--theia-charts-blue);
|
|
289
|
+
color: var(--theia-editor-background);
|
|
290
|
+
font-size: 12px;
|
|
291
|
+
padding: 2px 6px;
|
|
292
|
+
border-radius: 4px;
|
|
293
|
+
font-weight: 500;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
.source-uri-button {
|
|
297
|
+
display: inline-flex;
|
|
298
|
+
align-items: center;
|
|
299
|
+
justify-content: center;
|
|
300
|
+
background: transparent;
|
|
301
|
+
color: var(--theia-foreground);
|
|
302
|
+
border: 1px solid var(--theia-border);
|
|
303
|
+
border-radius: 4px;
|
|
304
|
+
height: 22px;
|
|
305
|
+
width: 22px;
|
|
306
|
+
margin-left: 8px;
|
|
307
|
+
cursor: pointer;
|
|
308
|
+
transition: all 0.2s;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
.source-uri-button:hover {
|
|
312
|
+
background-color: var(--theia-list-hoverBackground);
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
.no-fragments {
|
|
316
|
+
text-align: center;
|
|
317
|
+
padding: 30px;
|
|
318
|
+
color: var(--theia-descriptionForeground);
|
|
319
|
+
font-style: italic;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
/* Template content collapsable styles */
|
|
323
|
+
.template-content-container {
|
|
324
|
+
padding: 10px;
|
|
325
|
+
background-color: var(--theia-list-focusBackground);
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
.template-toggle-button {
|
|
329
|
+
display: flex;
|
|
330
|
+
align-items: center;
|
|
331
|
+
cursor: pointer;
|
|
332
|
+
padding: 5px;
|
|
333
|
+
border-radius: 4px;
|
|
334
|
+
transition: background-color 0.2s;
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
.template-toggle-button:hover {
|
|
338
|
+
background-color: var(--theia-list-hoverBackground);
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
.template-expansion-icon {
|
|
342
|
+
margin-right: 8px;
|
|
343
|
+
color: var(--theia-descriptionForeground);
|
|
344
|
+
font-size: 14px;
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
.template-content {
|
|
348
|
+
margin-top: 10px;
|
|
349
|
+
padding: 10px;
|
|
350
|
+
background-color: var(--theia-editor-inactiveSelectionBackground);
|
|
351
|
+
border-radius: 4px;
|
|
352
|
+
overflow-x: auto;
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
.template-content pre {
|
|
356
|
+
margin: 0;
|
|
357
|
+
white-space: pre-wrap;
|
|
358
|
+
word-break: break-word;
|
|
359
|
+
font-family: monospace;
|
|
360
|
+
font-size: 12px;
|
|
361
|
+
line-height: 1.4;
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
.agent-chips-container {
|
|
365
|
+
display: flex;
|
|
366
|
+
gap: 6px;
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
.agent-chip {
|
|
370
|
+
display: inline-flex;
|
|
371
|
+
align-items: center;
|
|
372
|
+
justify-content: center;
|
|
373
|
+
background-color: var(--theia-charts-blue);
|
|
374
|
+
color: var(--theia-editor-background);
|
|
375
|
+
gap: 6px;
|
|
376
|
+
padding: 6px 8px;
|
|
377
|
+
border-radius: 10px;
|
|
378
|
+
font-size: 12px;
|
|
379
|
+
font-weight: 500;
|
|
380
|
+
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
|
|
381
|
+
white-space: nowrap;
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
/* Prompt Variants improvements */
|
|
385
|
+
.prompt-variants-container {
|
|
386
|
+
margin-bottom: 20px;
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
.prompt-fragment-section {
|
|
390
|
+
border: 1px solid var(--theia-panelTitle-activeBorder);
|
|
391
|
+
border-radius: 6px;
|
|
392
|
+
overflow: hidden;
|
|
393
|
+
margin-bottom: 15px;
|
|
394
|
+
background-color: var(--theia-editorWidget-background);
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
.prompt-fragment-section.selected-variant {
|
|
398
|
+
border: 3px solid var(--theia-charts-blue);
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
.prompt-fragment-header {
|
|
402
|
+
display: flex;
|
|
403
|
+
justify-content: space-between;
|
|
404
|
+
align-items: center;
|
|
405
|
+
padding: 10px 15px;
|
|
406
|
+
cursor: pointer;
|
|
407
|
+
background-color: var(--theia-editor-background);
|
|
408
|
+
transition: background-color 0.2s;
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
.prompt-fragment-header.expanded {
|
|
412
|
+
border-bottom: 1px solid var(--theia-panelTitle-activeBorder);
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
.prompt-fragment-header:hover {
|
|
416
|
+
background-color: var(--theia-list-hoverBackground);
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
.prompt-fragment-title {
|
|
420
|
+
display: flex;
|
|
421
|
+
align-items: center;
|
|
422
|
+
gap: 8px;
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
.prompt-fragment-title h2, h4 {
|
|
426
|
+
margin-right: 8px;
|
|
427
|
+
margin: 0;
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
.prompt-fragment-title .active-indicator {
|
|
431
|
+
margin-right: 4px;
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
.prompt-fragment-body {
|
|
435
|
+
padding: 15px;
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
.prompt-fragment-description {
|
|
439
|
+
margin-top: 0;
|
|
440
|
+
margin-bottom: 10px;
|
|
441
|
+
color: var(--theia-descriptionForeground);
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
.section-header {
|
|
445
|
+
margin: 10px 0;
|
|
446
|
+
color: var(--theia-foreground);
|
|
447
|
+
font-size: 14px;
|
|
448
|
+
}
|
|
449
|
+
|
|
130
450
|
/* MCP Configuration Styles */
|
|
131
451
|
.mcp-configuration-container {
|
|
132
452
|
padding: 16px;
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
|
|
17
17
|
import { FrontendApplicationContribution, PreferenceService } from '@theia/core/lib/browser';
|
|
18
18
|
import { inject, injectable } from '@theia/core/shared/inversify';
|
|
19
|
-
import {
|
|
19
|
+
import { DefaultPromptFragmentCustomizationService, PromptFragmentCustomizationProperties } from '@theia/ai-core/lib/browser/frontend-prompt-customization-service';
|
|
20
20
|
import {
|
|
21
21
|
PROMPT_TEMPLATE_WORKSPACE_DIRECTORIES_PREF,
|
|
22
22
|
PROMPT_TEMPLATE_ADDITIONAL_EXTENSIONS_PREF,
|
|
@@ -31,8 +31,8 @@ export class TemplatePreferenceContribution implements FrontendApplicationContri
|
|
|
31
31
|
@inject(PreferenceService)
|
|
32
32
|
protected readonly preferenceService: PreferenceService;
|
|
33
33
|
|
|
34
|
-
@inject(
|
|
35
|
-
protected readonly customizationService:
|
|
34
|
+
@inject(DefaultPromptFragmentCustomizationService)
|
|
35
|
+
protected readonly customizationService: DefaultPromptFragmentCustomizationService;
|
|
36
36
|
|
|
37
37
|
@inject(WorkspaceService)
|
|
38
38
|
protected readonly workspaceService: WorkspaceService;
|
|
@@ -70,7 +70,7 @@ export class TemplatePreferenceContribution implements FrontendApplicationContri
|
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
const workspaceRootUri = workspaceRoot.resource;
|
|
73
|
-
const configProperties:
|
|
73
|
+
const configProperties: PromptFragmentCustomizationProperties = {};
|
|
74
74
|
|
|
75
75
|
if (!changedPreference || changedPreference === PROMPT_TEMPLATE_WORKSPACE_DIRECTORIES_PREF) {
|
|
76
76
|
const relativeDirectories = this.preferenceService.get<string[]>(PROMPT_TEMPLATE_WORKSPACE_DIRECTORIES_PREF, []);
|
|
@@ -336,7 +336,7 @@ export class GetWorkspaceFileList implements ToolProvider {
|
|
|
336
336
|
}
|
|
337
337
|
|
|
338
338
|
@injectable()
|
|
339
|
-
export class
|
|
339
|
+
export class FileDiagnosticProvider implements ToolProvider {
|
|
340
340
|
static ID = GET_FILE_DIAGNOSTICS_ID;
|
|
341
341
|
|
|
342
342
|
@inject(WorkspaceFunctionScope)
|
|
@@ -353,8 +353,8 @@ export class FileDiagonsticProvider implements ToolProvider {
|
|
|
353
353
|
|
|
354
354
|
getTool(): ToolRequest {
|
|
355
355
|
return {
|
|
356
|
-
id:
|
|
357
|
-
name:
|
|
356
|
+
id: FileDiagnosticProvider.ID,
|
|
357
|
+
name: FileDiagnosticProvider.ID,
|
|
358
358
|
description:
|
|
359
359
|
'A function to retrieve diagnostics associated with a specific file in the workspace. It will return a list of problems that includes the surrounding text \
|
|
360
360
|
a message describing the problem, and optionally a code and a codeDescription field describing that code.',
|
|
@@ -8,15 +8,21 @@
|
|
|
8
8
|
//
|
|
9
9
|
// SPDX-License-Identifier: MIT
|
|
10
10
|
// *****************************************************************************
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
|
|
11
|
+
import { PromptVariantSet } from '@theia/ai-core/lib/common';
|
|
12
|
+
import {
|
|
13
|
+
GET_WORKSPACE_FILE_LIST_FUNCTION_ID, FILE_CONTENT_FUNCTION_ID, GET_WORKSPACE_DIRECTORY_STRUCTURE_FUNCTION_ID, SEARCH_IN_WORKSPACE_FUNCTION_ID,
|
|
14
|
+
GET_FILE_DIAGNOSTICS_ID
|
|
15
|
+
} from './workspace-functions';
|
|
16
|
+
import { CONTEXT_FILES_VARIABLE_ID, TASK_CONTEXT_SUMMARY_VARIABLE_ID } from './context-variables';
|
|
17
|
+
import { UPDATE_CONTEXT_FILES_FUNCTION_ID } from './context-functions';
|
|
14
18
|
|
|
15
19
|
export const ARCHITECT_TASK_SUMMARY_PROMPT_TEMPLATE_ID = 'architect-task-summary';
|
|
16
20
|
|
|
17
|
-
export const
|
|
21
|
+
export const architectVariants = <PromptVariantSet>{
|
|
18
22
|
id: 'architect-system',
|
|
19
|
-
|
|
23
|
+
defaultVariant: {
|
|
24
|
+
id: 'architect-system-default',
|
|
25
|
+
template: `{{!-- This prompt is licensed under the MIT License (https://opensource.org/license/mit).
|
|
20
26
|
Made improvements or adaptations to this prompt template? We’d love for you to share it with the community! Contribute back here:
|
|
21
27
|
https://github.com/eclipse-theia/theia/discussions/new?category=prompt-template-contribution --}}
|
|
22
28
|
# Instructions
|
|
@@ -38,18 +44,51 @@ Use the following functions to interact with the workspace files as needed:
|
|
|
38
44
|
3. **Navigate Step-by-Step**: Move into subdirectories only as needed, confirming each directory level.
|
|
39
45
|
|
|
40
46
|
## Additional Context
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
Always look at the relevant files to understand your task using the function ~{${FILE_CONTENT_FUNCTION_ID}}.
|
|
47
|
+
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"). \
|
|
48
|
+
Always look at the relevant files to understand your task using the function ~{${FILE_CONTENT_FUNCTION_ID}}
|
|
44
49
|
{{${CONTEXT_FILES_VARIABLE_ID}}}
|
|
45
50
|
|
|
46
51
|
{{prompt:project-info}}
|
|
47
52
|
`
|
|
48
|
-
}
|
|
53
|
+
},
|
|
54
|
+
variants: [
|
|
55
|
+
{
|
|
56
|
+
id: 'architect-system-next',
|
|
57
|
+
template: `{{!-- This prompt is licensed under the MIT License (https://opensource.org/license/mit).
|
|
58
|
+
Made improvements or adaptations to this prompt template? We’d love for you to share it with the community! Contribute back here:
|
|
59
|
+
https://github.com/eclipse-theia/theia/discussions/new?category=prompt-template-contribution --}}
|
|
60
|
+
# Instructions
|
|
61
|
+
|
|
62
|
+
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 \
|
|
63
|
+
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 \
|
|
64
|
+
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 \
|
|
65
|
+
implement the change plan. If you refer to files, always mention the workspace-relative path.\
|
|
49
66
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
67
|
+
## Context Retrieval
|
|
68
|
+
Use the following functions to interact with the workspace files if you require context:
|
|
69
|
+
- **~{${GET_WORKSPACE_DIRECTORY_STRUCTURE_FUNCTION_ID}}**
|
|
70
|
+
- **~{${GET_WORKSPACE_FILE_LIST_FUNCTION_ID}}**
|
|
71
|
+
- **~{${FILE_CONTENT_FUNCTION_ID}}**
|
|
72
|
+
- **~{${SEARCH_IN_WORKSPACE_FUNCTION_ID}}**
|
|
73
|
+
|
|
74
|
+
Remember file locations that are relevant for completing your tasks using **~{${UPDATE_CONTEXT_FILES_FUNCTION_ID}}**
|
|
75
|
+
Only add files that are really relevant to look at later. Only add files that are really relevant to look at later.
|
|
76
|
+
|
|
77
|
+
## File Validation
|
|
78
|
+
Use the following function to retrieve a list of problems in a file if the user requests fixes in a given file: **~{${GET_FILE_DIAGNOSTICS_ID}}**
|
|
79
|
+
## Additional Context
|
|
80
|
+
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"). \
|
|
81
|
+
Always look at the relevant files to understand your task using the function ~{${FILE_CONTENT_FUNCTION_ID}}
|
|
82
|
+
{{${CONTEXT_FILES_VARIABLE_ID}}}
|
|
83
|
+
|
|
84
|
+
{{prompt:project-info}}
|
|
85
|
+
|
|
86
|
+
{{${TASK_CONTEXT_SUMMARY_VARIABLE_ID}}}
|
|
87
|
+
`
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
id: ARCHITECT_TASK_SUMMARY_PROMPT_TEMPLATE_ID,
|
|
91
|
+
template: `{{!-- This prompt is licensed under the MIT License (https://opensource.org/license/mit).
|
|
53
92
|
Made improvements or adaptations to this prompt template? We'd love for you to share it with the community! Contribute back here:
|
|
54
93
|
https://github.com/eclipse-theia/theia/discussions/new?category=prompt-template-contribution --}}
|
|
55
94
|
|
|
@@ -66,6 +105,7 @@ Skip irrelevant information, e.g. for discussions, only sum up the final result.
|
|
|
66
105
|
4. If any part of the task is ambiguous, note the ambiguity so that it can be clarified later.
|
|
67
106
|
|
|
68
107
|
Focus on providing actionable steps and implementation guidance. The coding agent needs practical help with this specific coding task.
|
|
69
|
-
|
|
70
|
-
|
|
108
|
+
`
|
|
109
|
+
}
|
|
110
|
+
]
|
|
71
111
|
};
|