@theia/ai-ide 1.62.0-next.3 → 1.62.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 (92) hide show
  1. package/lib/browser/ai-configuration/agent-configuration-widget.d.ts +3 -3
  2. package/lib/browser/ai-configuration/agent-configuration-widget.d.ts.map +1 -1
  3. package/lib/browser/ai-configuration/agent-configuration-widget.js +24 -18
  4. package/lib/browser/ai-configuration/agent-configuration-widget.js.map +1 -1
  5. package/lib/browser/ai-configuration/ai-configuration-view-contribution.js +1 -1
  6. package/lib/browser/ai-configuration/ai-configuration-view-contribution.js.map +1 -1
  7. package/lib/browser/ai-configuration/ai-configuration-widget.d.ts +2 -0
  8. package/lib/browser/ai-configuration/ai-configuration-widget.d.ts.map +1 -1
  9. package/lib/browser/ai-configuration/ai-configuration-widget.js +6 -0
  10. package/lib/browser/ai-configuration/ai-configuration-widget.js.map +1 -1
  11. package/lib/browser/ai-configuration/prompt-fragments-configuration-widget.d.ts +138 -0
  12. package/lib/browser/ai-configuration/prompt-fragments-configuration-widget.d.ts.map +1 -0
  13. package/lib/browser/ai-configuration/prompt-fragments-configuration-widget.js +492 -0
  14. package/lib/browser/ai-configuration/prompt-fragments-configuration-widget.js.map +1 -0
  15. package/lib/browser/ai-configuration/template-settings-renderer.d.ts +4 -5
  16. package/lib/browser/ai-configuration/template-settings-renderer.d.ts.map +1 -1
  17. package/lib/browser/ai-configuration/template-settings-renderer.js +15 -31
  18. package/lib/browser/ai-configuration/template-settings-renderer.js.map +1 -1
  19. package/lib/browser/architect-agent.d.ts +1 -1
  20. package/lib/browser/architect-agent.d.ts.map +1 -1
  21. package/lib/browser/architect-agent.js +2 -2
  22. package/lib/browser/architect-agent.js.map +1 -1
  23. package/lib/browser/coder-agent.d.ts +2 -2
  24. package/lib/browser/coder-agent.d.ts.map +1 -1
  25. package/lib/browser/coder-agent.js +7 -3
  26. package/lib/browser/coder-agent.js.map +1 -1
  27. package/lib/browser/file-changeset-functions.d.ts +14 -1
  28. package/lib/browser/file-changeset-functions.d.ts.map +1 -1
  29. package/lib/browser/file-changeset-functions.js +153 -14
  30. package/lib/browser/file-changeset-functions.js.map +1 -1
  31. package/lib/browser/frontend-module.d.ts.map +1 -1
  32. package/lib/browser/frontend-module.js +11 -1
  33. package/lib/browser/frontend-module.js.map +1 -1
  34. package/lib/browser/template-preference-contribution.d.ts +2 -2
  35. package/lib/browser/template-preference-contribution.d.ts.map +1 -1
  36. package/lib/browser/template-preference-contribution.js +2 -2
  37. package/lib/browser/template-preference-contribution.js.map +1 -1
  38. package/lib/browser/workspace-functions.d.ts +1 -1
  39. package/lib/browser/workspace-functions.js +13 -13
  40. package/lib/common/architect-prompt-template.d.ts +2 -3
  41. package/lib/common/architect-prompt-template.d.ts.map +1 -1
  42. package/lib/common/architect-prompt-template.js +49 -11
  43. package/lib/common/architect-prompt-template.js.map +1 -1
  44. package/lib/common/coder-replace-prompt-template.d.ts +6 -3
  45. package/lib/common/coder-replace-prompt-template.d.ts.map +1 -1
  46. package/lib/common/coder-replace-prompt-template.js +148 -22
  47. package/lib/common/coder-replace-prompt-template.js.map +1 -1
  48. package/lib/common/command-chat-agents.d.ts +1 -1
  49. package/lib/common/command-chat-agents.d.ts.map +1 -1
  50. package/lib/common/command-chat-agents.js +4 -4
  51. package/lib/common/command-chat-agents.js.map +1 -1
  52. package/lib/common/command-prompt-template.d.ts +2 -2
  53. package/lib/common/command-prompt-template.d.ts.map +1 -1
  54. package/lib/common/command-prompt-template.js +18 -15
  55. package/lib/common/command-prompt-template.js.map +1 -1
  56. package/lib/common/orchestrator-chat-agent.d.ts +2 -3
  57. package/lib/common/orchestrator-chat-agent.d.ts.map +1 -1
  58. package/lib/common/orchestrator-chat-agent.js +11 -26
  59. package/lib/common/orchestrator-chat-agent.js.map +1 -1
  60. package/lib/common/orchestrator-prompt-template.d.ts +2 -2
  61. package/lib/common/orchestrator-prompt-template.d.ts.map +1 -1
  62. package/lib/common/orchestrator-prompt-template.js +4 -1
  63. package/lib/common/orchestrator-prompt-template.js.map +1 -1
  64. package/lib/common/universal-chat-agent.d.ts +5 -1
  65. package/lib/common/universal-chat-agent.d.ts.map +1 -1
  66. package/lib/common/universal-chat-agent.js +2 -2
  67. package/lib/common/universal-chat-agent.js.map +1 -1
  68. package/lib/common/universal-prompt-template.d.ts +3 -3
  69. package/lib/common/universal-prompt-template.d.ts.map +1 -1
  70. package/lib/common/universal-prompt-template.js +1 -2
  71. package/lib/common/universal-prompt-template.js.map +1 -1
  72. package/package.json +17 -17
  73. package/src/browser/ai-configuration/agent-configuration-widget.tsx +31 -24
  74. package/src/browser/ai-configuration/ai-configuration-view-contribution.ts +1 -1
  75. package/src/browser/ai-configuration/ai-configuration-widget.tsx +6 -0
  76. package/src/browser/ai-configuration/prompt-fragments-configuration-widget.tsx +710 -0
  77. package/src/browser/ai-configuration/template-settings-renderer.tsx +18 -38
  78. package/src/browser/architect-agent.ts +3 -3
  79. package/src/browser/coder-agent.ts +10 -5
  80. package/src/browser/file-changeset-functions.ts +152 -14
  81. package/src/browser/frontend-module.ts +14 -2
  82. package/src/browser/style/index.css +320 -0
  83. package/src/browser/template-preference-contribution.ts +4 -4
  84. package/src/browser/workspace-functions.ts +3 -3
  85. package/src/common/architect-prompt-template.ts +54 -14
  86. package/src/common/coder-replace-prompt-template.ts +150 -24
  87. package/src/common/command-chat-agents.ts +4 -4
  88. package/src/common/command-prompt-template.ts +21 -18
  89. package/src/common/orchestrator-chat-agent.ts +12 -28
  90. package/src/common/orchestrator-prompt-template.ts +7 -4
  91. package/src/common/universal-chat-agent.ts +2 -2
  92. package/src/common/universal-prompt-template.ts +4 -5
@@ -0,0 +1,492 @@
1
+ "use strict";
2
+ // *****************************************************************************
3
+ // Copyright (C) 2025 EclipseSource GmbH.
4
+ //
5
+ // This program and the accompanying materials are made available under the
6
+ // terms of the Eclipse Public License v. 2.0 which is available at
7
+ // http://www.eclipse.org/legal/epl-2.0.
8
+ //
9
+ // This Source Code may also be made available under the following Secondary
10
+ // Licenses when the conditions for such availability set forth in the Eclipse
11
+ // Public License v. 2.0 are satisfied: GNU General Public License, version 2
12
+ // with the GNU Classpath Exception which is available at
13
+ // https://www.gnu.org/software/classpath/license.html.
14
+ //
15
+ // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
16
+ // *****************************************************************************
17
+ var AIPromptFragmentsConfigurationWidget_1;
18
+ Object.defineProperty(exports, "__esModule", { value: true });
19
+ exports.AIPromptFragmentsConfigurationWidget = void 0;
20
+ const tslib_1 = require("tslib");
21
+ const core_1 = require("@theia/core");
22
+ const browser_1 = require("@theia/core/lib/browser");
23
+ const inversify_1 = require("@theia/core/shared/inversify");
24
+ const prompt_service_1 = require("@theia/ai-core/lib/common/prompt-service");
25
+ const React = require("@theia/core/shared/react");
26
+ require("../../../src/browser/style/index.css");
27
+ const agent_service_1 = require("@theia/ai-core/lib/common/agent-service");
28
+ const frontend_prompt_customization_service_1 = require("@theia/ai-core/lib/browser/frontend-prompt-customization-service");
29
+ /**
30
+ * Widget for configuring AI prompt fragments and prompt variant sets.
31
+ * Allows users to view, create, edit, and manage various types of prompt
32
+ * fragments including their customizations and variants.
33
+ */
34
+ let AIPromptFragmentsConfigurationWidget = AIPromptFragmentsConfigurationWidget_1 = class AIPromptFragmentsConfigurationWidget extends browser_1.ReactWidget {
35
+ constructor() {
36
+ super(...arguments);
37
+ /**
38
+ * Stores all available prompt fragments by ID
39
+ */
40
+ this.promptFragmentMap = new Map();
41
+ /**
42
+ * Stores prompt variant sets and their variant IDs
43
+ */
44
+ this.promptVariantsMap = new Map();
45
+ /**
46
+ * Currently active prompt fragments
47
+ */
48
+ this.activePromptFragments = [];
49
+ /**
50
+ * Tracks expanded state of prompt fragment sections in the UI
51
+ */
52
+ this.expandedPromptFragmentIds = new Set();
53
+ /**
54
+ * Tracks expanded state of prompt content display
55
+ */
56
+ this.expandedPromptFragmentTemplates = new Set();
57
+ /**
58
+ * Tracks expanded state of prompt variant set sections
59
+ */
60
+ this.expandedPromptVariantSetIds = new Set();
61
+ /**
62
+ * All available agents that may use prompts
63
+ */
64
+ this.availableAgents = [];
65
+ /**
66
+ * Maps prompt variant set IDs to their currently selected variant IDs
67
+ */
68
+ this.selectedVariantIds = new Map();
69
+ /**
70
+ * Maps prompt variant set IDs to their default variant IDs
71
+ */
72
+ this.defaultVariantIds = new Map();
73
+ this.togglePromptVariantSetExpansion = (promptVariantSetId) => {
74
+ if (this.expandedPromptVariantSetIds.has(promptVariantSetId)) {
75
+ this.expandedPromptVariantSetIds.delete(promptVariantSetId);
76
+ }
77
+ else {
78
+ this.expandedPromptVariantSetIds.add(promptVariantSetId);
79
+ }
80
+ this.update();
81
+ };
82
+ this.togglePromptFragmentExpansion = (promptFragmentId) => {
83
+ if (this.expandedPromptFragmentIds.has(promptFragmentId)) {
84
+ this.expandedPromptFragmentIds.delete(promptFragmentId);
85
+ }
86
+ else {
87
+ this.expandedPromptFragmentIds.add(promptFragmentId);
88
+ }
89
+ this.update();
90
+ };
91
+ this.toggleTemplateExpansion = (fragmentKey, event) => {
92
+ event.stopPropagation();
93
+ if (this.expandedPromptFragmentTemplates.has(fragmentKey)) {
94
+ this.expandedPromptFragmentTemplates.delete(fragmentKey);
95
+ }
96
+ else {
97
+ this.expandedPromptFragmentTemplates.add(fragmentKey);
98
+ }
99
+ this.update();
100
+ };
101
+ /**
102
+ * Call the edit action for the provided customized prompt fragment
103
+ * @param promptFragment Fragment to edit
104
+ * @param event Mouse event
105
+ */
106
+ this.editPromptCustomization = (promptFragment, event) => {
107
+ event.stopPropagation();
108
+ this.promptService.editCustomization(promptFragment.id, promptFragment.customizationId);
109
+ };
110
+ /**
111
+ * Resets a prompt fragment to use a specific customization (with confirmation dialog)
112
+ * @param customization customization to reset to
113
+ * @param event Mouse event
114
+ */
115
+ this.resetToPromptFragment = async (customization, event) => {
116
+ event.stopPropagation();
117
+ if ((0, prompt_service_1.isCustomizedPromptFragment)(customization)) {
118
+ // Get the customization type to show in the confirmation dialog
119
+ const type = await this.promptService.getCustomizationType(customization.id, customization.customizationId);
120
+ const dialog = new browser_1.ConfirmDialog({
121
+ title: core_1.nls.localize('theia/ai/core/promptFragmentsConfiguration/resetToCustomizationDialogTitle', 'Reset to Customization'),
122
+ msg: core_1.nls.localize('theia/ai/core/promptFragmentsConfiguration/resetToCustomizationDialogMsg', 'Are you sure you want to reset the prompt fragment "{0}" to use the {1} customization? This will remove all higher-priority customizations.', customization.id, type),
123
+ ok: core_1.nls.localize('theia/ai/core/promptFragmentsConfiguration/resetButton', 'Reset'),
124
+ cancel: core_1.nls.localize('theia/ai/core/promptFragmentsConfiguration/cancelButton', 'Cancel')
125
+ });
126
+ const shouldReset = await dialog.open();
127
+ if (shouldReset) {
128
+ await this.promptService.resetToCustomization(customization.id, customization.customizationId);
129
+ }
130
+ }
131
+ else {
132
+ const dialog = new browser_1.ConfirmDialog({
133
+ title: core_1.nls.localize('theia/ai/core/promptFragmentsConfiguration/resetToBuiltInDialogTitle', 'Reset to Built-in'),
134
+ msg: core_1.nls.localize('theia/ai/core/promptFragmentsConfiguration/resetToBuiltInDialogMsg', 'Are you sure you want to reset the prompt fragment "{0}" to its built-in version? This will remove all customizations.', customization.id),
135
+ ok: core_1.nls.localize('theia/ai/core/promptFragmentsConfiguration/resetButton', 'Reset'),
136
+ cancel: core_1.nls.localize('theia/ai/core/promptFragmentsConfiguration/cancelButton', 'Cancel')
137
+ });
138
+ const shouldReset = await dialog.open();
139
+ if (shouldReset) {
140
+ await this.promptService.resetToBuiltIn(customization.id);
141
+ }
142
+ }
143
+ };
144
+ /**
145
+ * Creates a new customization for a built-in prompt fragment
146
+ * @param promptFragment Built-in prompt fragment to customize
147
+ * @param event Mouse event
148
+ */
149
+ this.createPromptFragmentCustomization = (promptFragment, event) => {
150
+ event.stopPropagation();
151
+ this.promptService.createBuiltInCustomization(promptFragment.id);
152
+ };
153
+ /**
154
+ * Deletes a customization with confirmation dialog
155
+ * @param customization Customized prompt fragment to delete
156
+ * @param event Mouse event
157
+ */
158
+ this.deletePromptFragmentCustomization = async (customization, event) => {
159
+ event.stopPropagation();
160
+ // First get the customization type and description to show in the confirmation dialog
161
+ const type = await this.promptService.getCustomizationType(customization.id, customization.customizationId) || '';
162
+ const description = await this.promptService.getCustomizationDescription(customization.id, customization.customizationId) || '';
163
+ const dialog = new browser_1.ConfirmDialog({
164
+ title: core_1.nls.localize('theia/ai/core/promptFragmentsConfiguration/removeCustomizationDialogTitle', 'Remove Customization'),
165
+ msg: description ?
166
+ core_1.nls.localize('theia/ai/core/promptFragmentsConfiguration/removeCustomizationWithDescDialogMsg', 'Are you sure you want to remove the {0} customization for prompt fragment "{1}" ({2})?', type, customization.id, description) :
167
+ core_1.nls.localize('theia/ai/core/promptFragmentsConfiguration/removeCustomizationDialogMsg', 'Are you sure you want to remove the {0} customization for prompt fragment "{1}"?', type, customization.id),
168
+ ok: core_1.nls.localize('theia/ai/core/promptFragmentsConfiguration/removeButton', 'Remove'),
169
+ cancel: core_1.nls.localize('theia/ai/core/promptFragmentsConfiguration/cancelButton', 'Cancel')
170
+ });
171
+ const shouldDelete = await dialog.open();
172
+ if (shouldDelete) {
173
+ await this.promptService.removeCustomization(customization.id, customization.customizationId);
174
+ }
175
+ };
176
+ /**
177
+ * Removes all prompt customizations (resets to built-in versions) with confirmation
178
+ */
179
+ this.removeAllCustomizations = async () => {
180
+ const dialog = new browser_1.ConfirmDialog({
181
+ title: core_1.nls.localize('theia/ai/core/promptFragmentsConfiguration/resetAllCustomizationsDialogTitle', 'Reset All Customizations'),
182
+ msg: core_1.nls.localize('theia/ai/core/promptFragmentsConfiguration/resetAllCustomizationsDialogMsg', 'Are you sure you want to reset all prompt fragments to their built-in versions? This will remove all customizations.'),
183
+ ok: core_1.nls.localize('theia/ai/core/promptFragmentsConfiguration/resetAllButton', 'Reset All'),
184
+ cancel: core_1.nls.localize('theia/ai/core/promptFragmentsConfiguration/cancelButton', 'Cancel')
185
+ });
186
+ const shouldReset = await dialog.open();
187
+ if (shouldReset) {
188
+ this.promptFragmentMap.forEach(fragments => {
189
+ this.promptService.resetToBuiltIn(fragments[0].id);
190
+ });
191
+ }
192
+ };
193
+ }
194
+ init() {
195
+ this.id = AIPromptFragmentsConfigurationWidget_1.ID;
196
+ this.title.label = AIPromptFragmentsConfigurationWidget_1.LABEL;
197
+ this.title.caption = AIPromptFragmentsConfigurationWidget_1.LABEL;
198
+ this.title.closable = true;
199
+ this.addClass('ai-configuration-tab-content');
200
+ this.loadPromptFragments();
201
+ this.loadAgents();
202
+ this.toDispose.pushAll([
203
+ this.promptService.onPromptsChange(() => {
204
+ this.loadPromptFragments();
205
+ }),
206
+ this.promptService.onSelectedVariantChange(notification => {
207
+ this.selectedVariantIds.set(notification.promptVariantSetId, notification.variantId);
208
+ this.update();
209
+ }),
210
+ this.agentService.onDidChangeAgents(() => {
211
+ this.loadAgents();
212
+ })
213
+ ]);
214
+ }
215
+ /**
216
+ * Loads all prompt fragments and prompt variant sets from the prompt service.
217
+ * Preserves UI expansion states and updates variant information.
218
+ */
219
+ async loadPromptFragments() {
220
+ this.promptFragmentMap = this.promptService.getAllPromptFragments();
221
+ this.promptVariantsMap = this.promptService.getPromptVariantSets();
222
+ this.activePromptFragments = this.promptService.getActivePromptFragments();
223
+ // Preserve expansion state when reloading
224
+ const existingExpandedFragmentIds = new Set(this.expandedPromptFragmentIds);
225
+ const existingExpandedPromptVariantIds = new Set(this.expandedPromptVariantSetIds);
226
+ const existingExpandedTemplates = new Set(this.expandedPromptFragmentTemplates);
227
+ // If no sections were previously expanded, expand all by default
228
+ if (existingExpandedFragmentIds.size === 0) {
229
+ this.expandedPromptFragmentIds = new Set(Array.from(this.promptFragmentMap.keys()));
230
+ }
231
+ else {
232
+ // Keep existing expansion state but remove entries for fragments that no longer exist
233
+ this.expandedPromptFragmentIds = new Set(Array.from(existingExpandedFragmentIds).filter(id => this.promptFragmentMap.has(id)));
234
+ }
235
+ if (existingExpandedPromptVariantIds.size === 0) {
236
+ this.expandedPromptVariantSetIds = new Set(Array.from(this.promptVariantsMap.keys()));
237
+ }
238
+ else {
239
+ // Keep existing expansion state but remove entries for prompt variant sets that no longer exist
240
+ this.expandedPromptVariantSetIds = new Set(Array.from(existingExpandedPromptVariantIds).filter(id => this.promptVariantsMap.has(id)));
241
+ }
242
+ // For templates, preserve existing expanded states - don't expand by default
243
+ this.expandedPromptFragmentTemplates = new Set(Array.from(existingExpandedTemplates).filter(id => {
244
+ const [fragmentId] = id.split('_');
245
+ return this.promptFragmentMap.has(fragmentId);
246
+ }));
247
+ // Update variant information (selected/default) for prompt variant sets
248
+ for (const promptVariantSetId of this.promptVariantsMap.keys()) {
249
+ const selectedId = await this.promptService.getSelectedVariantId(promptVariantSetId);
250
+ const defaultId = await this.promptService.getDefaultVariantId(promptVariantSetId);
251
+ this.selectedVariantIds.set(promptVariantSetId, selectedId);
252
+ this.defaultVariantIds.set(promptVariantSetId, defaultId);
253
+ }
254
+ this.update();
255
+ }
256
+ /**
257
+ * Loads all available agents from the agent service
258
+ */
259
+ loadAgents() {
260
+ this.availableAgents = this.agentService.getAllAgents();
261
+ this.update();
262
+ }
263
+ /**
264
+ * Finds agents that use a specific prompt variant set
265
+ * @param promptVariantSetId ID of the prompt variant set to match
266
+ * @returns Array of agents that use the prompt variant set
267
+ */
268
+ getAgentsUsingPromptVariantId(promptVariantSetId) {
269
+ return this.availableAgents.filter((agent) => agent.prompts.find(promptVariantSet => promptVariantSet.id === promptVariantSetId));
270
+ }
271
+ /**
272
+ * Determines if a prompt fragment is currently the active one for its ID
273
+ * @param promptFragment The prompt fragment to check
274
+ * @returns True if this prompt fragment is the active customization
275
+ */
276
+ isActiveCustomization(promptFragment) {
277
+ const activePromptFragment = this.activePromptFragments.find(activePrompt => activePrompt.id === promptFragment.id);
278
+ if (!activePromptFragment) {
279
+ return false;
280
+ }
281
+ if ((0, prompt_service_1.isCustomizedPromptFragment)(activePromptFragment) && (0, prompt_service_1.isCustomizedPromptFragment)(promptFragment)) {
282
+ return (activePromptFragment.id === promptFragment.id &&
283
+ activePromptFragment.template === promptFragment.template &&
284
+ activePromptFragment.customizationId === promptFragment.customizationId &&
285
+ activePromptFragment.priority === promptFragment.priority);
286
+ }
287
+ if ((0, prompt_service_1.isBasePromptFragment)(activePromptFragment) && (0, prompt_service_1.isBasePromptFragment)(promptFragment)) {
288
+ return (activePromptFragment.id === promptFragment.id &&
289
+ activePromptFragment.template === promptFragment.template);
290
+ }
291
+ return false;
292
+ }
293
+ /**
294
+ * Main render method for the widget
295
+ * @returns Complete UI for the configuration widget
296
+ */
297
+ render() {
298
+ const nonSystemPromptFragments = this.getNonPromptVariantSetFragments();
299
+ return (React.createElement("div", { className: 'ai-prompt-fragments-configuration' },
300
+ React.createElement("div", { className: "prompt-fragments-header" },
301
+ React.createElement("h2", null, core_1.nls.localize('theia/ai/core/promptFragmentsConfiguration/headerTitle', 'Prompt Fragments')),
302
+ React.createElement("div", { className: "global-actions" },
303
+ React.createElement("button", { className: "global-action-button", onClick: this.removeAllCustomizations, title: core_1.nls.localize('theia/ai/core/promptFragmentsConfiguration/resetAllCustomizationsTitle', 'Reset all customizations') },
304
+ core_1.nls.localize('theia/ai/core/promptFragmentsConfiguration/resetAllPromptFragments', 'Reset all prompt fragments'),
305
+ " ",
306
+ React.createElement("span", { className: (0, browser_1.codicon)('clear-all') })))),
307
+ React.createElement("div", { className: "prompt-variants-container" },
308
+ React.createElement("h3", { className: "section-header" }, core_1.nls.localize('theia/ai/core/promptFragmentsConfiguration/promptVariantsHeader', 'Prompt Variant Sets')),
309
+ Array.from(this.promptVariantsMap.entries()).map(([promptVariantSetId, variantIds]) => this.renderPromptVariantSet(promptVariantSetId, variantIds))),
310
+ nonSystemPromptFragments.size > 0 && React.createElement("div", { className: "prompt-fragments-container" },
311
+ React.createElement("h3", { className: "section-header" }, core_1.nls.localize('theia/ai/core/promptFragmentsConfiguration/otherPromptFragmentsHeader', 'Other Prompt Fragments')),
312
+ Array.from(nonSystemPromptFragments.entries()).map(([promptFragmentId, fragments]) => this.renderPromptFragment(promptFragmentId, fragments))),
313
+ this.promptFragmentMap.size === 0 && (React.createElement("div", { className: "no-fragments" },
314
+ React.createElement("p", null, core_1.nls.localize('theia/ai/core/promptFragmentsConfiguration/noFragmentsAvailable', 'No prompt fragments available.'))))));
315
+ }
316
+ /**
317
+ * Renders a prompt variant set with its variants
318
+ * @param promptVariantSetId ID of the prompt variant set
319
+ * @param variantIds Array of variant IDs
320
+ * @returns React node for the prompt variant set group
321
+ */
322
+ renderPromptVariantSet(promptVariantSetId, variantIds) {
323
+ const isSectionExpanded = this.expandedPromptVariantSetIds.has(promptVariantSetId);
324
+ // Get selected and default variant IDs from our class properties
325
+ const selectedVariantId = this.selectedVariantIds.get(promptVariantSetId);
326
+ const defaultVariantId = this.defaultVariantIds.get(promptVariantSetId);
327
+ // Get variant fragments grouped by ID
328
+ const variantGroups = new Map();
329
+ // First, collect all actual fragments for each variant ID
330
+ for (const variantId of variantIds) {
331
+ if (this.promptFragmentMap.has(variantId)) {
332
+ variantGroups.set(variantId, this.promptFragmentMap.get(variantId));
333
+ }
334
+ }
335
+ const relatedAgents = this.getAgentsUsingPromptVariantId(promptVariantSetId);
336
+ return (React.createElement("div", { className: "prompt-fragment-section", key: `variant-${promptVariantSetId}` },
337
+ React.createElement("div", { className: `prompt-fragment-header ${isSectionExpanded ? 'expanded' : ''}`, onClick: () => this.togglePromptVariantSetExpansion(promptVariantSetId) },
338
+ React.createElement("div", { className: "prompt-fragment-title" },
339
+ React.createElement("span", { className: "expansion-icon" }, isSectionExpanded ? '▼' : '▶'),
340
+ React.createElement("h2", null, promptVariantSetId)),
341
+ relatedAgents.length > 0 && (React.createElement("div", { className: "agent-chips-container" }, relatedAgents.map(agent => (React.createElement("span", { key: agent.id, className: "agent-chip", title: core_1.nls.localize('theia/ai/core/promptFragmentsConfiguration/usedByAgentTitle', 'Used by agent: {0}', agent.name), onClick: e => e.stopPropagation() },
342
+ React.createElement("span", { className: (0, browser_1.codicon)('copilot') }),
343
+ agent.name)))))),
344
+ isSectionExpanded && (React.createElement("div", { className: "prompt-fragment-body" },
345
+ React.createElement("div", { className: "prompt-fragment-description" },
346
+ React.createElement("p", null, core_1.nls.localize('theia/ai/core/promptFragmentsConfiguration/variantsOfSystemPrompt', 'Variants of this prompt variant set:'))),
347
+ Array.from(variantGroups.entries()).map(([variantId, fragments]) => {
348
+ const isVariantExpanded = this.expandedPromptFragmentIds.has(variantId);
349
+ return (React.createElement("div", { key: variantId, className: `prompt-fragment-section ${selectedVariantId === variantId ? 'selected-variant' : ''}` },
350
+ React.createElement("div", { className: `prompt-fragment-header ${isVariantExpanded ? 'expanded' : ''}`, onClick: () => this.togglePromptFragmentExpansion(variantId) },
351
+ React.createElement("div", { className: "prompt-fragment-title" },
352
+ React.createElement("span", { className: "expansion-icon" }, isVariantExpanded ? '▼' : '▶'),
353
+ React.createElement("h4", null, variantId),
354
+ defaultVariantId === variantId && (React.createElement("span", { className: "badge default-variant", title: core_1.nls.localize('theia/ai/core/promptFragmentsConfiguration/defaultVariantTitle', 'Default variant') }, core_1.nls.localize('theia/ai/core/promptFragmentsConfiguration/defaultVariantLabel', 'Default'))),
355
+ selectedVariantId === variantId && (React.createElement("span", { className: "selected-indicator", title: core_1.nls.localize('theia/ai/core/promptFragmentsConfiguration/selectedVariantTitle', 'Selected variant') }, core_1.nls.localize('theia/ai/core/promptFragmentsConfiguration/selectedVariantLabel', 'Selected'))))),
356
+ isVariantExpanded && (React.createElement("div", { className: 'prompt-fragment-body' }, fragments.map(fragment => this.renderPromptFragmentCustomization(fragment))))));
357
+ })))));
358
+ }
359
+ /**
360
+ * Gets fragments that aren't part of any prompt variant set
361
+ * @returns Map of fragment IDs to their customizations
362
+ */
363
+ getNonPromptVariantSetFragments() {
364
+ const nonSystemPromptFragments = new Map();
365
+ const allVariantIds = new Set();
366
+ // Collect all variant IDs from prompt variant sets
367
+ this.promptVariantsMap.forEach((variants, _) => {
368
+ variants.forEach(variantId => allVariantIds.add(variantId));
369
+ });
370
+ // Add prompt variant set main IDs
371
+ this.promptVariantsMap.forEach((_, promptVariantSetId) => {
372
+ allVariantIds.add(promptVariantSetId);
373
+ });
374
+ // Filter the fragment map to only include non-prompt variant set fragments
375
+ this.promptFragmentMap.forEach((fragments, promptFragmentId) => {
376
+ if (!allVariantIds.has(promptFragmentId)) {
377
+ nonSystemPromptFragments.set(promptFragmentId, fragments);
378
+ }
379
+ });
380
+ return nonSystemPromptFragments;
381
+ }
382
+ /**
383
+ * Renders a prompt fragment with all of its customizations
384
+ * @param promptFragmentId ID of the prompt fragment
385
+ * @param customizations Array of the customizations
386
+ * @returns React node for the prompt fragment
387
+ */
388
+ renderPromptFragment(promptFragmentId, customizations) {
389
+ const isSectionExpanded = this.expandedPromptFragmentIds.has(promptFragmentId);
390
+ return (React.createElement("div", { className: 'prompt-fragment-group', key: promptFragmentId },
391
+ React.createElement("div", { className: `prompt-fragment-header ${isSectionExpanded ? 'expanded' : ''}`, onClick: () => this.togglePromptFragmentExpansion(promptFragmentId) },
392
+ React.createElement("div", { className: "prompt-fragment-title" },
393
+ React.createElement("span", { className: "expansion-icon" }, isSectionExpanded ? '▼' : '▶'),
394
+ promptFragmentId)),
395
+ isSectionExpanded && (React.createElement("div", { className: "prompt-fragment-body" }, customizations.map(fragment => this.renderPromptFragmentCustomization(fragment))))));
396
+ }
397
+ /**
398
+ * Renders a single prompt fragment customization with its controls and content
399
+ * @param promptFragment The prompt fragment to render
400
+ * @returns React node for the prompt fragment
401
+ */
402
+ renderPromptFragmentCustomization(promptFragment) {
403
+ var _a;
404
+ const isCustomized = (0, prompt_service_1.isCustomizedPromptFragment)(promptFragment);
405
+ const isActive = this.isActiveCustomization(promptFragment);
406
+ // Create a unique key for this fragment to track expansion state
407
+ const fragmentKey = `${promptFragment.id}_${isCustomized ? promptFragment.customizationId : 'built-in'}`;
408
+ const isTemplateExpanded = this.expandedPromptFragmentTemplates.has(fragmentKey);
409
+ const hasCustomizedBuiltIn = (_a = this.promptFragmentMap.get(promptFragment.id)) === null || _a === void 0 ? void 0 : _a.some(fragment => (0, prompt_service_1.isCustomizedPromptFragment)(fragment) && fragment.priority === frontend_prompt_customization_service_1.CustomizationSource.CUSTOMIZED);
410
+ return (React.createElement("div", { className: `prompt-customization ${isActive ? 'active-customization' : ''}`, key: fragmentKey },
411
+ React.createElement("div", { className: "prompt-customization-header" },
412
+ React.createElement("div", { className: "prompt-customization-title" },
413
+ React.createElement(React.Suspense, { fallback: React.createElement("div", null, "Loading...") },
414
+ React.createElement(CustomizationTypeBadge, { promptFragment: promptFragment, promptService: this.promptService })),
415
+ isActive && (React.createElement("span", { className: "active-indicator", title: core_1.nls.localize('theia/ai/core/promptFragmentsConfiguration/activeCustomizationTitle', 'Active customization') }, core_1.nls.localize('theia/ai/core/promptFragmentsConfiguration/activeCustomizationLabel', 'Active')))),
416
+ React.createElement("div", { className: "prompt-customization-actions" },
417
+ !isCustomized && !hasCustomizedBuiltIn && (React.createElement("button", { className: "template-action-button config-button", onClick: e => this.createPromptFragmentCustomization(promptFragment, e), title: core_1.nls.localize('theia/ai/core/promptFragmentsConfiguration/createCustomizationTitle', 'Create Customization') },
418
+ React.createElement("span", { className: (0, browser_1.codicon)('add') }))),
419
+ isCustomized && (React.createElement("button", { className: "source-uri-button", onClick: e => this.editPromptCustomization(promptFragment, e), title: core_1.nls.localize('theia/ai/core/promptFragmentsConfiguration/editTemplateTitle', 'Edit template') },
420
+ React.createElement("span", { className: (0, browser_1.codicon)('edit') }))),
421
+ !isActive && (React.createElement("button", { className: "template-action-button reset-button", onClick: e => this.resetToPromptFragment(promptFragment, e), title: !isCustomized ?
422
+ core_1.nls.localize('theia/ai/core/promptFragmentsConfiguration/resetToBuiltInTitle', 'Reset to this built-in') :
423
+ core_1.nls.localize('theia/ai/core/promptFragmentsConfiguration/resetToCustomizationTitle', 'Reset to this customization') },
424
+ React.createElement("span", { className: (0, browser_1.codicon)('discard') }))),
425
+ isCustomized && (React.createElement("button", { className: "template-action-button delete-button", onClick: e => this.deletePromptFragmentCustomization(promptFragment, e), title: core_1.nls.localize('theia/ai/core/promptFragmentsConfiguration/deleteCustomizationTitle', 'Delete Customization') },
426
+ React.createElement("span", { className: (0, browser_1.codicon)('trash') }))))),
427
+ isCustomized && (React.createElement(React.Suspense, { fallback: React.createElement("div", null, "Loading...") },
428
+ React.createElement(DescriptionBadge, { promptFragment: promptFragment, promptService: this.promptService }))),
429
+ React.createElement("div", { className: "template-content-container" },
430
+ React.createElement("div", { className: "template-toggle-button", onClick: e => this.toggleTemplateExpansion(fragmentKey, e) },
431
+ React.createElement("span", { className: "template-expansion-icon" }, isTemplateExpanded ? '▼' : '▶'),
432
+ React.createElement("span", null, core_1.nls.localize('theia/ai/core/promptFragmentsConfiguration/promptTemplateText', 'Prompt Template Text'))),
433
+ isTemplateExpanded && (React.createElement("div", { className: "template-content" },
434
+ React.createElement("pre", null, promptFragment.template))))));
435
+ }
436
+ };
437
+ exports.AIPromptFragmentsConfigurationWidget = AIPromptFragmentsConfigurationWidget;
438
+ AIPromptFragmentsConfigurationWidget.ID = 'ai-prompt-fragments-configuration';
439
+ AIPromptFragmentsConfigurationWidget.LABEL = core_1.nls.localize('theia/ai/core/promptFragmentsConfiguration/label', 'Prompt Fragments');
440
+ tslib_1.__decorate([
441
+ (0, inversify_1.inject)(prompt_service_1.PromptService),
442
+ tslib_1.__metadata("design:type", Object)
443
+ ], AIPromptFragmentsConfigurationWidget.prototype, "promptService", void 0);
444
+ tslib_1.__decorate([
445
+ (0, inversify_1.inject)(agent_service_1.AgentService),
446
+ tslib_1.__metadata("design:type", Object)
447
+ ], AIPromptFragmentsConfigurationWidget.prototype, "agentService", void 0);
448
+ tslib_1.__decorate([
449
+ (0, inversify_1.postConstruct)(),
450
+ tslib_1.__metadata("design:type", Function),
451
+ tslib_1.__metadata("design:paramtypes", []),
452
+ tslib_1.__metadata("design:returntype", void 0)
453
+ ], AIPromptFragmentsConfigurationWidget.prototype, "init", null);
454
+ exports.AIPromptFragmentsConfigurationWidget = AIPromptFragmentsConfigurationWidget = AIPromptFragmentsConfigurationWidget_1 = tslib_1.__decorate([
455
+ (0, inversify_1.injectable)()
456
+ ], AIPromptFragmentsConfigurationWidget);
457
+ /**
458
+ * Displays a badge indicating the type of a prompt fragment customization (built-in, user, workspace)
459
+ */
460
+ const CustomizationTypeBadge = ({ promptFragment, promptService }) => {
461
+ const [typeLabel, setTypeLabel] = React.useState('unknown');
462
+ React.useEffect(() => {
463
+ const fetchCustomizationType = async () => {
464
+ if ((0, prompt_service_1.isCustomizedPromptFragment)(promptFragment)) {
465
+ const customizationType = await promptService.getCustomizationType(promptFragment.id, promptFragment.customizationId);
466
+ setTypeLabel(`${customizationType ?
467
+ customizationType + ' ' + core_1.nls.localize('theia/ai/core/promptFragmentsConfiguration/customization', 'customization')
468
+ : core_1.nls.localize('theia/ai/core/promptFragmentsConfiguration/customizationLabel', 'Customization')}`);
469
+ }
470
+ else {
471
+ setTypeLabel(core_1.nls.localize('theia/ai/core/promptFragmentsConfiguration/builtInLabel', 'Built-in'));
472
+ }
473
+ };
474
+ fetchCustomizationType();
475
+ }, [promptFragment, promptService]);
476
+ return React.createElement("span", null, typeLabel);
477
+ };
478
+ /**
479
+ * Displays the description of a customized prompt fragment if available
480
+ */
481
+ const DescriptionBadge = ({ promptFragment, promptService }) => {
482
+ const [description, setDescription] = React.useState('');
483
+ React.useEffect(() => {
484
+ const fetchDescription = async () => {
485
+ const customizationDescription = await promptService.getCustomizationDescription(promptFragment.id, promptFragment.customizationId);
486
+ setDescription(customizationDescription || '');
487
+ };
488
+ fetchDescription();
489
+ }, [promptFragment.id, promptFragment.customizationId, promptService]);
490
+ return React.createElement("span", { className: "prompt-customization-description" }, description);
491
+ };
492
+ //# sourceMappingURL=prompt-fragments-configuration-widget.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prompt-fragments-configuration-widget.js","sourceRoot":"","sources":["../../../src/browser/ai-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AC;QACL,CAAC,CAAC;QAEF,sBAAsB,EAAE,CAAC;IAC7B,CAAC,EAAE,CAAC,cAAc,EAAE,aAAa,CAAC,CAAC,CAAC;IAEpC,OAAO,kCAAO,SAAS,CAAQ,CAAC;AACpC,CAAC,CAAC;AAUF;;GAEG;AACH,MAAM,gBAAgB,GAAiD,CAAC,EAAE,cAAc,EAAE,aAAa,EAAE,EAAE,EAAE;IACzG,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAS,EAAE,CAAC,CAAC;IAEjE,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACjB,MAAM,gBAAgB,GAAG,KAAK,IAAI,EAAE;YAChC,MAAM,wBAAwB,GAAG,MAAM,aAAa,CAAC,2BAA2B,CAC5E,cAAc,CAAC,EAAE,EACjB,cAAc,CAAC,eAAe,CACjC,CAAC;YACF,cAAc,CAAC,wBAAwB,IAAI,EAAE,CAAC,CAAC;QACnD,CAAC,CAAC;QAEF,gBAAgB,EAAE,CAAC;IACvB,CAAC,EAAE,CAAC,cAAc,CAAC,EAAE,EAAE,cAAc,CAAC,eAAe,EAAE,aAAa,CAAC,CAAC,CAAC;IAEvE,OAAO,8BAAM,SAAS,EAAC,kCAAkC,IAAE,WAAW,CAAQ,CAAC;AACnF,CAAC,CAAC"}
@@ -1,12 +1,11 @@
1
1
  /// <reference types="react" />
2
- import { AISettingsService, PromptCustomizationService, PromptService, PromptTemplate } from '@theia/ai-core/lib/common';
2
+ import { AISettingsService, PromptService, PromptVariantSet } from '@theia/ai-core/lib/common';
3
3
  import * as React from '@theia/core/shared/react';
4
- export interface TemplateRendererProps {
4
+ export interface PromptVariantRendererProps {
5
5
  agentId: string;
6
- template: PromptTemplate;
7
- promptCustomizationService: PromptCustomizationService;
6
+ promptVariantSet: PromptVariantSet;
8
7
  promptService: PromptService;
9
8
  aiSettingsService: AISettingsService;
10
9
  }
11
- export declare const TemplateRenderer: React.FC<TemplateRendererProps>;
10
+ export declare const PromptVariantRenderer: React.FC<PromptVariantRendererProps>;
12
11
  //# sourceMappingURL=template-settings-renderer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"template-settings-renderer.d.ts","sourceRoot":"","sources":["../../../src/browser/ai-configuration/template-settings-renderer.tsx"],"names":[],"mappings":";AAeA,OAAO,EAAE,iBAAiB,EAAE,0BAA0B,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AACzH,OAAO,KAAK,KAAK,MAAM,0BAA0B,CAAC;AAKlD,MAAM,WAAW,qBAAqB;IAClC,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,cAAc,CAAC;IACzB,0BAA0B,EAAE,0BAA0B,CAAC;IACvD,aAAa,EAAE,aAAa,CAAC;IAC7B,iBAAiB,EAAE,iBAAiB,CAAC;CACxC;AAED,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CAkG5D,CAAC"}
1
+ {"version":3,"file":"template-settings-renderer.d.ts","sourceRoot":"","sources":["../../../src/browser/ai-configuration/template-settings-renderer.tsx"],"names":[],"mappings":";AAeA,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC/F,OAAO,KAAK,KAAK,MAAM,0BAA0B,CAAC;AAGlD,MAAM,WAAW,0BAA0B;IACvC,OAAO,EAAE,MAAM,CAAC;IAChB,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,aAAa,EAAE,aAAa,CAAC;IAC7B,iBAAiB,EAAE,iBAAiB,CAAC;CACxC;AAED,eAAO,MAAM,qBAAqB,EAAE,KAAK,CAAC,EAAE,CAAC,0BAA0B,CAiFtE,CAAC"}