@iaforged/context-code 1.0.80 → 1.0.82

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 (35) hide show
  1. package/dist/src/components/LogoV2/FeedColumn.js +3 -4
  2. package/dist/src/components/LogoV2/LogoV2.js +10 -10
  3. package/dist/src/components/LogoV2/WelcomeV2.js +1 -1
  4. package/dist/src/components/agents/AgentDetail.js +19 -210
  5. package/dist/src/components/agents/AgentEditor.js +60 -70
  6. package/dist/src/components/agents/AgentsList.js +3 -2
  7. package/dist/src/components/agents/AgentsMenu.js +10 -10
  8. package/dist/src/components/agents/ColorPicker.js +2 -2
  9. package/dist/src/components/agents/ModelSelector.js +204 -52
  10. package/dist/src/components/agents/ToolSelector.js +13 -13
  11. package/dist/src/components/agents/agentFileUtils.js +12 -11
  12. package/dist/src/components/agents/new-agent-creation/CreateAgentWizard.js +1 -1
  13. package/dist/src/components/agents/new-agent-creation/types.js +1 -0
  14. package/dist/src/components/agents/new-agent-creation/wizard-steps/ColorStep.js +22 -68
  15. package/dist/src/components/agents/new-agent-creation/wizard-steps/ConfirmStep.js +30 -369
  16. package/dist/src/components/agents/new-agent-creation/wizard-steps/ConfirmStepWrapper.js +13 -15
  17. package/dist/src/components/agents/new-agent-creation/wizard-steps/DescriptionStep.js +4 -4
  18. package/dist/src/components/agents/new-agent-creation/wizard-steps/GenerateStep.js +15 -22
  19. package/dist/src/components/agents/new-agent-creation/wizard-steps/LocationStep.js +2 -2
  20. package/dist/src/components/agents/new-agent-creation/wizard-steps/MemoryStep.js +9 -9
  21. package/dist/src/components/agents/new-agent-creation/wizard-steps/MethodStep.js +3 -3
  22. package/dist/src/components/agents/new-agent-creation/wizard-steps/ModelStep.js +8 -38
  23. package/dist/src/components/agents/new-agent-creation/wizard-steps/PromptStep.js +4 -4
  24. package/dist/src/components/agents/new-agent-creation/wizard-steps/ToolsStep.js +1 -1
  25. package/dist/src/components/agents/new-agent-creation/wizard-steps/TypeStep.js +3 -3
  26. package/dist/src/components/agents/validateAgent.js +16 -16
  27. package/dist/src/services/compact/compact.js +22 -20
  28. package/dist/src/tools/AgentTool/AgentTool.js +12 -8
  29. package/dist/src/tools/AgentTool/agentDisplay.js +5 -2
  30. package/dist/src/tools/AgentTool/loadAgentsDir.js +36 -0
  31. package/dist/src/tools/AgentTool/resumeAgent.js +7 -3
  32. package/dist/src/utils/model/agent.js +12 -3
  33. package/dist/src/utils/model/providerOverrideContext.js +11 -0
  34. package/dist/src/utils/model/providers.js +14 -0
  35. package/package.json +1 -1
@@ -1,5 +1,4 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { c as _c } from "react/compiler-runtime";
3
2
  import { Box } from '../../../../ink.js';
4
3
  import { useKeybinding } from '../../../../keybindings/useKeybinding.js';
5
4
  import { ConfigurableShortcutHint } from '../../../ConfigurableShortcutHint.js';
@@ -9,72 +8,27 @@ import { useWizard } from '../../../wizard/index.js';
9
8
  import { WizardDialogLayout } from '../../../wizard/WizardDialogLayout.js';
10
9
  import { ColorPicker } from '../../ColorPicker.js';
11
10
  export function ColorStep() {
12
- const $ = _c(14);
13
11
  const { goNext, goBack, updateWizardData, wizardData } = useWizard();
14
- let t0;
15
- if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
16
- t0 = {
17
- context: "Confirmation"
18
- };
19
- $[0] = t0;
20
- }
21
- else {
22
- t0 = $[0];
23
- }
24
- useKeybinding("confirm:no", goBack, t0);
25
- let t1;
26
- if ($[1] !== goNext || $[2] !== updateWizardData || $[3] !== wizardData.agentType || $[4] !== wizardData.location || $[5] !== wizardData.selectedModel || $[6] !== wizardData.selectedTools || $[7] !== wizardData.systemPrompt || $[8] !== wizardData.whenToUse) {
27
- t1 = color => {
28
- updateWizardData({
29
- selectedColor: color,
30
- finalAgent: {
31
- agentType: wizardData.agentType,
32
- whenToUse: wizardData.whenToUse,
33
- getSystemPrompt: () => wizardData.systemPrompt,
34
- tools: wizardData.selectedTools,
35
- ...(wizardData.selectedModel ? {
36
- model: wizardData.selectedModel
37
- } : {}),
38
- ...(color ? {
39
- color: color
40
- } : {}),
41
- source: wizardData.location
42
- }
43
- });
44
- goNext();
45
- };
46
- $[1] = goNext;
47
- $[2] = updateWizardData;
48
- $[3] = wizardData.agentType;
49
- $[4] = wizardData.location;
50
- $[5] = wizardData.selectedModel;
51
- $[6] = wizardData.selectedTools;
52
- $[7] = wizardData.systemPrompt;
53
- $[8] = wizardData.whenToUse;
54
- $[9] = t1;
55
- }
56
- else {
57
- t1 = $[9];
58
- }
59
- const handleConfirm = t1;
60
- let t2;
61
- if ($[10] === Symbol.for("react.memo_cache_sentinel")) {
62
- t2 = _jsxs(Byline, { children: [_jsx(KeyboardShortcutHint, { shortcut: "\u2191\u2193", action: "navegar" }), _jsx(KeyboardShortcutHint, { shortcut: "Enter", action: "seleccionar" }), _jsx(ConfigurableShortcutHint, { action: "confirm:no", context: "Confirmation", fallback: "Esc", description: "volver" })] });
63
- $[10] = t2;
64
- }
65
- else {
66
- t2 = $[10];
67
- }
68
- const t3 = wizardData.agentType || "agent";
69
- let t4;
70
- if ($[11] !== handleConfirm || $[12] !== t3) {
71
- t4 = _jsx(WizardDialogLayout, { subtitle: "Choose background color", footerText: t2, children: _jsx(Box, { children: _jsx(ColorPicker, { agentName: t3, currentColor: "automatic", onConfirm: handleConfirm }) }) });
72
- $[11] = handleConfirm;
73
- $[12] = t3;
74
- $[13] = t4;
75
- }
76
- else {
77
- t4 = $[13];
78
- }
79
- return t4;
12
+ useKeybinding('confirm:no', goBack, { context: 'Confirmation' });
13
+ const handleConfirm = (color) => {
14
+ updateWizardData({
15
+ selectedColor: color,
16
+ finalAgent: {
17
+ agentType: wizardData.agentType,
18
+ whenToUse: wizardData.whenToUse,
19
+ getSystemPrompt: () => wizardData.systemPrompt,
20
+ tools: wizardData.selectedTools,
21
+ ...(wizardData.selectedModel
22
+ ? { model: wizardData.selectedModel }
23
+ : {}),
24
+ ...(wizardData.selectedProvider
25
+ ? { provider: wizardData.selectedProvider }
26
+ : {}),
27
+ ...(color ? { color: color } : {}),
28
+ source: wizardData.location,
29
+ },
30
+ });
31
+ goNext();
32
+ };
33
+ return (_jsx(WizardDialogLayout, { subtitle: "Color de fondo", footerText: _jsxs(Byline, { children: [_jsx(KeyboardShortcutHint, { shortcut: "\u2191\u2193", action: "navegar" }), _jsx(KeyboardShortcutHint, { shortcut: "Enter", action: "seleccionar" }), _jsx(ConfigurableShortcutHint, { action: "confirm:no", context: "Confirmation", fallback: "Esc", description: "volver" })] }), children: _jsx(Box, { children: _jsx(ColorPicker, { agentName: wizardData.agentType || 'agent', currentColor: "automatic", onConfirm: handleConfirm }) }) }));
80
34
  }
@@ -1,11 +1,10 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { c as _c } from "react/compiler-runtime";
3
2
  import { Box, Text } from '../../../../ink.js';
4
3
  import { useKeybinding } from '../../../../keybindings/useKeybinding.js';
5
4
  import { isAutoMemoryEnabled } from '../../../../memdir/paths.js';
6
5
  import { getMemoryScopeDisplay } from '../../../../tools/AgentTool/agentMemory.js';
7
6
  import { truncateToWidth } from '../../../../utils/format.js';
8
- import { getAgentModelDisplay } from '../../../../utils/model/agent.js';
7
+ import { getAgentModelDisplay, getAgentProviderDisplay, } from '../../../../utils/model/agent.js';
9
8
  import { ConfigurableShortcutHint } from '../../../ConfigurableShortcutHint.js';
10
9
  import { Byline } from '../../../design-system/Byline.js';
11
10
  import { KeyboardShortcutHint } from '../../../design-system/KeyboardShortcutHint.js';
@@ -13,374 +12,36 @@ import { useWizard } from '../../../wizard/index.js';
13
12
  import { WizardDialogLayout } from '../../../wizard/WizardDialogLayout.js';
14
13
  import { getNewRelativeAgentFilePath } from '../../agentFileUtils.js';
15
14
  import { validateAgent } from '../../validateAgent.js';
16
- export function ConfirmStep(t0) {
17
- const $ = _c(88);
18
- const { tools, existingAgents, onSave, onSaveAndEdit, error } = t0;
15
+ function getToolsDisplay(toolNames) {
16
+ if (toolNames === undefined)
17
+ return 'Todas las herramientas';
18
+ if (toolNames.length === 0)
19
+ return 'Ninguna';
20
+ if (toolNames.length === 1)
21
+ return toolNames[0] || 'Ninguna';
22
+ if (toolNames.length === 2)
23
+ return toolNames.join(' y ');
24
+ return `${toolNames.slice(0, -1).join(', ')} y ${toolNames[toolNames.length - 1]}`;
25
+ }
26
+ export function ConfirmStep({ tools, existingAgents, onSave, onSaveAndEdit, error, }) {
19
27
  const { goBack, wizardData } = useWizard();
20
- let t1;
21
- if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
22
- t1 = {
23
- context: "Confirmation"
24
- };
25
- $[0] = t1;
26
- }
27
- else {
28
- t1 = $[0];
29
- }
30
- useKeybinding("confirm:no", goBack, t1);
31
- let t2;
32
- if ($[1] !== onSave || $[2] !== onSaveAndEdit) {
33
- t2 = e => {
34
- if (e.key === "s" || e.key === "return") {
35
- e.preventDefault();
36
- onSave();
37
- }
38
- else {
39
- if (e.key === "e") {
40
- e.preventDefault();
41
- onSaveAndEdit();
42
- }
43
- }
44
- };
45
- $[1] = onSave;
46
- $[2] = onSaveAndEdit;
47
- $[3] = t2;
48
- }
49
- else {
50
- t2 = $[3];
51
- }
52
- const handleKeyDown = t2;
53
- const agent = wizardData.finalAgent;
54
- let T0;
55
- let T1;
56
- let t10;
57
- let t11;
58
- let t12;
59
- let t13;
60
- let t14;
61
- let t15;
62
- let t16;
63
- let t17;
64
- let t18;
65
- let t19;
66
- let t3;
67
- let t4;
68
- let t5;
69
- let t6;
70
- let t7;
71
- let t8;
72
- let t9;
73
- if ($[4] !== agent || $[5] !== existingAgents || $[6] !== handleKeyDown || $[7] !== tools || $[8] !== wizardData.location) {
74
- const validation = validateAgent(agent, tools, existingAgents);
75
- let t20;
76
- if ($[28] !== agent) {
77
- t20 = truncateToWidth(agent.getSystemPrompt(), 240);
78
- $[28] = agent;
79
- $[29] = t20;
80
- }
81
- else {
82
- t20 = $[29];
83
- }
84
- const systemPromptPreview = t20;
85
- let t21;
86
- if ($[30] !== agent.whenToUse) {
87
- t21 = truncateToWidth(agent.whenToUse, 240);
88
- $[30] = agent.whenToUse;
89
- $[31] = t21;
90
- }
91
- else {
92
- t21 = $[31];
93
- }
94
- const whenToUsePreview = t21;
95
- const getToolsDisplay = _temp;
96
- let t22;
97
- if ($[32] !== agent.memory) {
98
- t22 = isAutoMemoryEnabled() ? _jsxs(Text, { children: [_jsx(Text, { bold: true, children: "Memory" }), ": ", getMemoryScopeDisplay(agent.memory)] }) : null;
99
- $[32] = agent.memory;
100
- $[33] = t22;
101
- }
102
- else {
103
- t22 = $[33];
104
- }
105
- const memoryDisplayElement = t22;
106
- T1 = WizardDialogLayout;
107
- t18 = "Confirm and save";
108
- if ($[34] === Symbol.for("react.memo_cache_sentinel")) {
109
- t19 = _jsxs(Byline, { children: [_jsx(KeyboardShortcutHint, { shortcut: "s/Enter", action: "guardar" }), _jsx(KeyboardShortcutHint, { shortcut: "e", action: "editar en tu editor" }), _jsx(ConfigurableShortcutHint, { action: "confirm:no", context: "Confirmation", fallback: "Esc", description: "cancelar" })] });
110
- $[34] = t19;
111
- }
112
- else {
113
- t19 = $[34];
114
- }
115
- T0 = Box;
116
- t3 = "column";
117
- t4 = 0;
118
- t5 = true;
119
- t6 = handleKeyDown;
120
- let t23;
121
- if ($[35] === Symbol.for("react.memo_cache_sentinel")) {
122
- t23 = _jsx(Text, { bold: true, children: "Name" });
123
- $[35] = t23;
124
- }
125
- else {
126
- t23 = $[35];
127
- }
128
- if ($[36] !== agent.agentType) {
129
- t7 = _jsxs(Text, { children: [t23, ": ", agent.agentType] });
130
- $[36] = agent.agentType;
131
- $[37] = t7;
132
- }
133
- else {
134
- t7 = $[37];
135
- }
136
- let t24;
137
- if ($[38] === Symbol.for("react.memo_cache_sentinel")) {
138
- t24 = _jsx(Text, { bold: true, children: "Location" });
139
- $[38] = t24;
140
- }
141
- else {
142
- t24 = $[38];
143
- }
144
- let t25;
145
- if ($[39] !== agent.agentType || $[40] !== wizardData.location) {
146
- t25 = getNewRelativeAgentFilePath({
147
- source: wizardData.location,
148
- agentType: agent.agentType
149
- });
150
- $[39] = agent.agentType;
151
- $[40] = wizardData.location;
152
- $[41] = t25;
153
- }
154
- else {
155
- t25 = $[41];
156
- }
157
- if ($[42] !== t25) {
158
- t8 = _jsxs(Text, { children: [t24, ":", " ", t25] });
159
- $[42] = t25;
160
- $[43] = t8;
161
- }
162
- else {
163
- t8 = $[43];
164
- }
165
- let t26;
166
- if ($[44] === Symbol.for("react.memo_cache_sentinel")) {
167
- t26 = _jsx(Text, { bold: true, children: "Tools" });
168
- $[44] = t26;
169
- }
170
- else {
171
- t26 = $[44];
28
+ useKeybinding('confirm:no', goBack, { context: 'Confirmation' });
29
+ const handleKeyDown = (e) => {
30
+ if (e.key === 's' || e.key === 'return') {
31
+ e.preventDefault();
32
+ onSave();
172
33
  }
173
- let t27;
174
- if ($[45] !== agent.tools) {
175
- t27 = getToolsDisplay(agent.tools);
176
- $[45] = agent.tools;
177
- $[46] = t27;
34
+ else if (e.key === 'e') {
35
+ e.preventDefault();
36
+ onSaveAndEdit();
178
37
  }
179
- else {
180
- t27 = $[46];
181
- }
182
- if ($[47] !== t27) {
183
- t9 = _jsxs(Text, { children: [t26, ": ", t27] });
184
- $[47] = t27;
185
- $[48] = t9;
186
- }
187
- else {
188
- t9 = $[48];
189
- }
190
- let t28;
191
- if ($[49] === Symbol.for("react.memo_cache_sentinel")) {
192
- t28 = _jsx(Text, { bold: true, children: "Model" });
193
- $[49] = t28;
194
- }
195
- else {
196
- t28 = $[49];
197
- }
198
- let t29;
199
- if ($[50] !== agent.model) {
200
- t29 = getAgentModelDisplay(agent.model);
201
- $[50] = agent.model;
202
- $[51] = t29;
203
- }
204
- else {
205
- t29 = $[51];
206
- }
207
- if ($[52] !== t29) {
208
- t10 = _jsxs(Text, { children: [t28, ": ", t29] });
209
- $[52] = t29;
210
- $[53] = t10;
211
- }
212
- else {
213
- t10 = $[53];
214
- }
215
- t11 = memoryDisplayElement;
216
- if ($[54] === Symbol.for("react.memo_cache_sentinel")) {
217
- t12 = _jsx(Box, { marginTop: 1, children: _jsxs(Text, { children: [_jsx(Text, { bold: true, children: "Description" }), " (tells Claude when to use this agent):"] }) });
218
- $[54] = t12;
219
- }
220
- else {
221
- t12 = $[54];
222
- }
223
- if ($[55] !== whenToUsePreview) {
224
- t13 = _jsx(Box, { marginLeft: 2, marginTop: 1, children: _jsx(Text, { children: whenToUsePreview }) });
225
- $[55] = whenToUsePreview;
226
- $[56] = t13;
227
- }
228
- else {
229
- t13 = $[56];
230
- }
231
- if ($[57] === Symbol.for("react.memo_cache_sentinel")) {
232
- t14 = _jsx(Box, { marginTop: 1, children: _jsxs(Text, { children: [_jsx(Text, { bold: true, children: "System prompt" }), ":"] }) });
233
- $[57] = t14;
234
- }
235
- else {
236
- t14 = $[57];
237
- }
238
- if ($[58] !== systemPromptPreview) {
239
- t15 = _jsx(Box, { marginLeft: 2, marginTop: 1, children: _jsx(Text, { children: systemPromptPreview }) });
240
- $[58] = systemPromptPreview;
241
- $[59] = t15;
242
- }
243
- else {
244
- t15 = $[59];
245
- }
246
- t16 = validation.warnings.length > 0 && _jsxs(Box, { marginTop: 1, flexDirection: "column", children: [_jsx(Text, { color: "warning", children: "Warnings:" }), validation.warnings.map(_temp2)] });
247
- t17 = validation.errors.length > 0 && _jsxs(Box, { marginTop: 1, flexDirection: "column", children: [_jsx(Text, { color: "error", children: "Errors:" }), validation.errors.map(_temp3)] });
248
- $[4] = agent;
249
- $[5] = existingAgents;
250
- $[6] = handleKeyDown;
251
- $[7] = tools;
252
- $[8] = wizardData.location;
253
- $[9] = T0;
254
- $[10] = T1;
255
- $[11] = t10;
256
- $[12] = t11;
257
- $[13] = t12;
258
- $[14] = t13;
259
- $[15] = t14;
260
- $[16] = t15;
261
- $[17] = t16;
262
- $[18] = t17;
263
- $[19] = t18;
264
- $[20] = t19;
265
- $[21] = t3;
266
- $[22] = t4;
267
- $[23] = t5;
268
- $[24] = t6;
269
- $[25] = t7;
270
- $[26] = t8;
271
- $[27] = t9;
272
- }
273
- else {
274
- T0 = $[9];
275
- T1 = $[10];
276
- t10 = $[11];
277
- t11 = $[12];
278
- t12 = $[13];
279
- t13 = $[14];
280
- t14 = $[15];
281
- t15 = $[16];
282
- t16 = $[17];
283
- t17 = $[18];
284
- t18 = $[19];
285
- t19 = $[20];
286
- t3 = $[21];
287
- t4 = $[22];
288
- t5 = $[23];
289
- t6 = $[24];
290
- t7 = $[25];
291
- t8 = $[26];
292
- t9 = $[27];
293
- }
294
- let t20;
295
- if ($[60] !== error) {
296
- t20 = error && _jsx(Box, { marginTop: 1, children: _jsx(Text, { color: "error", children: error }) });
297
- $[60] = error;
298
- $[61] = t20;
299
- }
300
- else {
301
- t20 = $[61];
302
- }
303
- let t21;
304
- if ($[62] === Symbol.for("react.memo_cache_sentinel")) {
305
- t21 = _jsx(Text, { bold: true, children: "s" });
306
- $[62] = t21;
307
- }
308
- else {
309
- t21 = $[62];
310
- }
311
- let t22;
312
- if ($[63] === Symbol.for("react.memo_cache_sentinel")) {
313
- t22 = _jsx(Text, { bold: true, children: "Enter" });
314
- $[63] = t22;
315
- }
316
- else {
317
- t22 = $[63];
318
- }
319
- let t23;
320
- if ($[64] === Symbol.for("react.memo_cache_sentinel")) {
321
- t23 = _jsx(Box, { marginTop: 2, children: _jsxs(Text, { color: "success", children: ["Presiona ", _jsx(Text, { bold: true, children: "s" }), " o ", _jsx(Text, { bold: true, children: "Enter" }), " para guardar,", " ", _jsx(Text, { bold: true, children: "e" }), " para guardar y editar"] }) });
322
- $[64] = t23;
323
- }
324
- else {
325
- t23 = $[64];
326
- }
327
- let t24;
328
- if ($[65] !== T0 || $[66] !== t10 || $[67] !== t11 || $[68] !== t12 || $[69] !== t13 || $[70] !== t14 || $[71] !== t15 || $[72] !== t16 || $[73] !== t17 || $[74] !== t20 || $[75] !== t3 || $[76] !== t4 || $[77] !== t5 || $[78] !== t6 || $[79] !== t7 || $[80] !== t8 || $[81] !== t9) {
329
- t24 = _jsxs(T0, { flexDirection: t3, tabIndex: t4, autoFocus: t5, onKeyDown: t6, children: [t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t20, t23] });
330
- $[65] = T0;
331
- $[66] = t10;
332
- $[67] = t11;
333
- $[68] = t12;
334
- $[69] = t13;
335
- $[70] = t14;
336
- $[71] = t15;
337
- $[72] = t16;
338
- $[73] = t17;
339
- $[74] = t20;
340
- $[75] = t3;
341
- $[76] = t4;
342
- $[77] = t5;
343
- $[78] = t6;
344
- $[79] = t7;
345
- $[80] = t8;
346
- $[81] = t9;
347
- $[82] = t24;
348
- }
349
- else {
350
- t24 = $[82];
351
- }
352
- let t25;
353
- if ($[83] !== T1 || $[84] !== t18 || $[85] !== t19 || $[86] !== t24) {
354
- t25 = _jsx(T1, { subtitle: t18, footerText: t19, children: t24 });
355
- $[83] = T1;
356
- $[84] = t18;
357
- $[85] = t19;
358
- $[86] = t24;
359
- $[87] = t25;
360
- }
361
- else {
362
- t25 = $[87];
363
- }
364
- return t25;
365
- }
366
- function _temp3(err, i_0) {
367
- return _jsxs(Text, { color: "error", children: [" ", "\u2022 ", err] }, i_0);
368
- }
369
- function _temp2(warning, i) {
370
- return _jsxs(Text, { dimColor: true, children: [" ", "\u2022 ", warning] }, i);
371
- }
372
- function _temp(toolNames) {
373
- if (toolNames === undefined) {
374
- return "All tools";
375
- }
376
- if (toolNames.length === 0) {
377
- return "None";
378
- }
379
- if (toolNames.length === 1) {
380
- return toolNames[0] || "None";
381
- }
382
- if (toolNames.length === 2) {
383
- return toolNames.join(" and ");
384
- }
385
- return `${toolNames.slice(0, -1).join(", ")}, and ${toolNames[toolNames.length - 1]}`;
38
+ };
39
+ const agent = wizardData.finalAgent;
40
+ const validation = validateAgent(agent, tools, existingAgents);
41
+ const systemPromptPreview = truncateToWidth(agent.getSystemPrompt(), 240);
42
+ const whenToUsePreview = truncateToWidth(agent.whenToUse, 240);
43
+ return (_jsx(WizardDialogLayout, { subtitle: "Confirmar y guardar", footerText: _jsxs(Byline, { children: [_jsx(KeyboardShortcutHint, { shortcut: "s/Enter", action: "guardar" }), _jsx(KeyboardShortcutHint, { shortcut: "e", action: "editar en tu editor" }), _jsx(ConfigurableShortcutHint, { action: "confirm:no", context: "Confirmation", fallback: "Esc", description: "cancelar" })] }), children: _jsxs(Box, { flexDirection: "column", tabIndex: 0, autoFocus: true, onKeyDown: handleKeyDown, children: [_jsxs(Text, { children: [_jsx(Text, { bold: true, children: "Nombre" }), ": ", agent.agentType] }), _jsxs(Text, { children: [_jsx(Text, { bold: true, children: "Ubicacion" }), ":", ' ', getNewRelativeAgentFilePath({
44
+ source: wizardData.location,
45
+ agentType: agent.agentType,
46
+ })] }), _jsxs(Text, { children: [_jsx(Text, { bold: true, children: "Herramientas" }), ": ", getToolsDisplay(agent.tools)] }), _jsxs(Text, { children: [_jsx(Text, { bold: true, children: "Proveedor" }), ": ", getAgentProviderDisplay(agent.provider)] }), _jsxs(Text, { children: [_jsx(Text, { bold: true, children: "Modelo" }), ":", ' ', getAgentModelDisplay(agent.model, agent.provider)] }), isAutoMemoryEnabled() ? (_jsxs(Text, { children: [_jsx(Text, { bold: true, children: "Memoria" }), ": ", getMemoryScopeDisplay(agent.memory)] })) : null, _jsx(Box, { marginTop: 1, children: _jsxs(Text, { children: [_jsx(Text, { bold: true, children: "Descripcion" }), " (indica cuando usar este agente):"] }) }), _jsx(Box, { marginLeft: 2, marginTop: 1, children: _jsx(Text, { children: whenToUsePreview }) }), _jsx(Box, { marginTop: 1, children: _jsxs(Text, { children: [_jsx(Text, { bold: true, children: "System prompt" }), ":"] }) }), _jsx(Box, { marginLeft: 2, marginTop: 1, children: _jsx(Text, { children: systemPromptPreview }) }), validation.warnings.length > 0 ? (_jsxs(Box, { marginTop: 1, flexDirection: "column", children: [_jsx(Text, { color: "warning", children: "Advertencias:" }), validation.warnings.map((warning, index) => (_jsxs(Text, { dimColor: true, children: [' ', "- ", warning] }, index)))] })) : null, validation.errors.length > 0 ? (_jsxs(Box, { marginTop: 1, flexDirection: "column", children: [_jsx(Text, { color: "error", children: "Errores:" }), validation.errors.map((err, index) => (_jsxs(Text, { color: "error", children: [' ', "- ", err] }, index)))] })) : null, error ? (_jsx(Box, { marginTop: 1, children: _jsx(Text, { color: "error", children: error }) })) : null, _jsx(Box, { marginTop: 2, children: _jsxs(Text, { color: "success", children: ["Presiona ", _jsx(Text, { bold: true, children: "s" }), " o ", _jsx(Text, { bold: true, children: "Enter" }), " para guardar,", ' ', _jsx(Text, { bold: true, children: "e" }), " para guardar y editar"] }) })] }) }));
386
47
  }
@@ -1,14 +1,14 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import chalk from 'chalk';
3
3
  import { useCallback, useState } from 'react';
4
- import { logEvent } from '../../../../services/analytics/index.js';
4
+ import { logEvent, } from '../../../../services/analytics/index.js';
5
5
  import { useSetAppState } from '../../../../state/AppState.js';
6
- import { getActiveAgentsFromList } from '../../../../tools/AgentTool/loadAgentsDir.js';
6
+ import { getActiveAgentsFromList, } from '../../../../tools/AgentTool/loadAgentsDir.js';
7
7
  import { editFileInEditor } from '../../../../utils/promptEditor.js';
8
8
  import { useWizard } from '../../../wizard/index.js';
9
9
  import { getNewAgentFilePath, saveAgentToFile } from '../../agentFileUtils.js';
10
10
  import { ConfirmStep } from './ConfirmStep.js';
11
- export function ConfirmStepWrapper({ tools, existingAgents, onComplete }) {
11
+ export function ConfirmStepWrapper({ tools, existingAgents, onComplete, }) {
12
12
  const { wizardData } = useWizard();
13
13
  const [saveError, setSaveError] = useState(null);
14
14
  const setAppState = useSetAppState();
@@ -16,7 +16,7 @@ export function ConfirmStepWrapper({ tools, existingAgents, onComplete }) {
16
16
  if (!wizardData?.finalAgent)
17
17
  return;
18
18
  try {
19
- await saveAgentToFile(wizardData.location, wizardData.finalAgent.agentType, wizardData.finalAgent.whenToUse, wizardData.finalAgent.tools, wizardData.finalAgent.getSystemPrompt(), true, wizardData.finalAgent.color, wizardData.finalAgent.model, wizardData.finalAgent.memory);
19
+ await saveAgentToFile(wizardData.location, wizardData.finalAgent.agentType, wizardData.finalAgent.whenToUse, wizardData.finalAgent.tools, wizardData.finalAgent.getSystemPrompt(), true, wizardData.finalAgent.color, wizardData.finalAgent.model, wizardData.finalAgent.provider, wizardData.finalAgent.memory);
20
20
  setAppState(state => {
21
21
  if (!wizardData.finalAgent)
22
22
  return state;
@@ -26,14 +26,14 @@ export function ConfirmStepWrapper({ tools, existingAgents, onComplete }) {
26
26
  agentDefinitions: {
27
27
  ...state.agentDefinitions,
28
28
  activeAgents: getActiveAgentsFromList(allAgents),
29
- allAgents
30
- }
29
+ allAgents,
30
+ },
31
31
  };
32
32
  });
33
33
  if (openInEditor) {
34
34
  const filePath = getNewAgentFilePath({
35
35
  source: wizardData.location,
36
- agentType: wizardData.finalAgent.agentType
36
+ agentType: wizardData.finalAgent.agentType,
37
37
  });
38
38
  await editFileInEditor(filePath);
39
39
  }
@@ -46,18 +46,16 @@ export function ConfirmStepWrapper({ tools, existingAgents, onComplete }) {
46
46
  has_custom_color: !!wizardData.finalAgent.color,
47
47
  has_memory: !!wizardData.finalAgent.memory,
48
48
  memory_scope: wizardData.finalAgent.memory ?? 'none',
49
- ...(openInEditor ? {
50
- opened_in_editor: true
51
- } : {})
49
+ ...(openInEditor ? { opened_in_editor: true } : {}),
52
50
  });
53
- const message = openInEditor ? `Created agent: ${chalk.bold(wizardData.finalAgent.agentType)} and opened in editor. ` + `If you made edits, restart to load the latest version.` : `Created agent: ${chalk.bold(wizardData.finalAgent.agentType)}`;
51
+ const message = openInEditor
52
+ ? `Agente creado: ${chalk.bold(wizardData.finalAgent.agentType)} y abierto en el editor. Si hiciste cambios, reinicia para cargar la version mas reciente.`
53
+ : `Agente creado: ${chalk.bold(wizardData.finalAgent.agentType)}`;
54
54
  onComplete(message);
55
55
  }
56
56
  catch (err) {
57
- setSaveError(err instanceof Error ? err.message : 'Failed to save agent');
57
+ setSaveError(err instanceof Error ? err.message : 'No se pudo guardar el agente');
58
58
  }
59
59
  }, [wizardData, onComplete, setAppState]);
60
- const handleSave = useCallback(() => saveAgent(false), [saveAgent]);
61
- const handleSaveAndEdit = useCallback(() => saveAgent(true), [saveAgent]);
62
- return _jsx(ConfirmStep, { tools: tools, existingAgents: existingAgents, onSave: handleSave, onSaveAndEdit: handleSaveAndEdit, error: saveError });
60
+ return (_jsx(ConfirmStep, { tools: tools, existingAgents: existingAgents, onSave: () => void saveAgent(false), onSaveAndEdit: () => void saveAgent(true), error: saveError }));
63
61
  }
@@ -59,7 +59,7 @@ export function DescriptionStep() {
59
59
  t3 = value => {
60
60
  const trimmedValue = value.trim();
61
61
  if (!trimmedValue) {
62
- setError("Description is required");
62
+ setError("La descripcion es obligatoria");
63
63
  return;
64
64
  }
65
65
  setError(null);
@@ -86,7 +86,7 @@ export function DescriptionStep() {
86
86
  }
87
87
  let t5;
88
88
  if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
89
- t5 = _jsx(Text, { children: "When should Claude use this agent?" });
89
+ t5 = _jsx(Text, { children: "Cuando debe usar Claude este agente?" });
90
90
  $[8] = t5;
91
91
  }
92
92
  else {
@@ -94,7 +94,7 @@ export function DescriptionStep() {
94
94
  }
95
95
  let t6;
96
96
  if ($[9] !== cursorOffset || $[10] !== handleSubmit || $[11] !== whenToUse) {
97
- t6 = _jsx(Box, { marginTop: 1, children: _jsx(TextInput, { value: whenToUse, onChange: setWhenToUse, onSubmit: handleSubmit, placeholder: "e.g., use this agent after you're done writing code...", columns: 80, cursorOffset: cursorOffset, onChangeCursorOffset: setCursorOffset, focus: true, showCursor: true }) });
97
+ t6 = _jsx(Box, { marginTop: 1, children: _jsx(TextInput, { value: whenToUse, onChange: setWhenToUse, onSubmit: handleSubmit, placeholder: "p. ej., usa este agente cuando termines de escribir codigo...", columns: 80, cursorOffset: cursorOffset, onChangeCursorOffset: setCursorOffset, focus: true, showCursor: true }) });
98
98
  $[9] = cursorOffset;
99
99
  $[10] = handleSubmit;
100
100
  $[11] = whenToUse;
@@ -114,7 +114,7 @@ export function DescriptionStep() {
114
114
  }
115
115
  let t8;
116
116
  if ($[15] !== t6 || $[16] !== t7) {
117
- t8 = _jsx(WizardDialogLayout, { subtitle: "Description (tell Claude when to use this agent)", footerText: t4, children: _jsxs(Box, { flexDirection: "column", children: [t5, t6, t7] }) });
117
+ t8 = _jsx(WizardDialogLayout, { subtitle: "Descripcion (indica cuando debe usarse este agente)", footerText: t4, children: _jsxs(Box, { flexDirection: "column", children: [t5, t6, t7] }) });
118
118
  $[15] = t6;
119
119
  $[16] = t7;
120
120
  $[17] = t8;