@starlein/paperclip-plugin-company-wizard 0.2.4 → 0.3.18
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/README.md +59 -3
- package/dist/manifest.js +4 -5
- package/dist/manifest.js.map +2 -2
- package/dist/ui/index.css +563 -578
- package/dist/ui/index.css.map +2 -2
- package/dist/ui/index.js +1151 -559
- package/dist/ui/index.js.map +4 -4
- package/dist/worker.js +702 -253
- package/dist/worker.js.map +4 -4
- package/package.json +12 -7
- package/templates/ai-wizard/config-format.md +12 -4
- package/templates/ai-wizard/interview-system.md +3 -2
- package/templates/ai-wizard/messages.json +1 -1
- package/templates/ai-wizard/single-shot-system.md +4 -0
- package/templates/bootstrap-instructions.md +12 -2
- package/templates/modules/auto-assign/agents/ceo/heartbeat-section.md +1 -1
- package/templates/modules/auto-assign/agents/ceo/skills/auto-assign.fallback.md +1 -1
- package/templates/modules/auto-assign/agents/product-owner/heartbeat-section.md +1 -1
- package/templates/modules/auto-assign/module.meta.json +1 -1
- package/templates/modules/auto-assign/skills/auto-assign.md +1 -1
- package/templates/modules/backlog/module.meta.json +4 -3
- package/templates/modules/build-api/module.meta.json +1 -0
- package/templates/modules/ci-cd/module.meta.json +2 -1
- package/templates/modules/game-design/module.meta.json +18 -0
- package/templates/modules/game-design/skills/audio-design.fallback.md +16 -0
- package/templates/modules/game-design/skills/audio-design.md +28 -0
- package/templates/modules/game-design/skills/level-design.fallback.md +17 -0
- package/templates/modules/game-design/skills/level-design.md +29 -0
- package/templates/modules/github-repo/README.md +1 -0
- package/templates/modules/github-repo/module.meta.json +5 -2
- package/templates/modules/pr-review/README.md +5 -5
- package/templates/modules/pr-review/agents/code-reviewer/skills/code-review.md +7 -6
- package/templates/modules/pr-review/agents/devops/skills/infra-review.md +6 -6
- package/templates/modules/pr-review/agents/engineer/skills/pr-workflow.md +11 -6
- package/templates/modules/pr-review/agents/product-owner/skills/product-review.md +7 -6
- package/templates/modules/pr-review/agents/qa/skills/qa-review.md +6 -6
- package/templates/modules/pr-review/agents/ui-designer/skills/design-review.md +6 -6
- package/templates/modules/pr-review/agents/ux-researcher/skills/ux-review.md +6 -6
- package/templates/modules/pr-review/docs/pr-conventions.md +16 -15
- package/templates/modules/pr-review/module.meta.json +8 -3
- package/templates/modules/stall-detection/module.meta.json +1 -1
- package/templates/modules/website-relaunch/module.meta.json +2 -1
- package/templates/presets/build-game/preset.meta.json +2 -1
- package/templates/presets/content/preset.meta.json +3 -1
- package/templates/presets/full/preset.meta.json +1 -0
- package/templates/presets/gtm/preset.meta.json +3 -1
- package/templates/presets/launch-pack/preset.meta.json +1 -0
- package/templates/presets/quality/preset.meta.json +2 -1
- package/templates/presets/repo-maintenance/preset.meta.json +2 -1
- package/templates/presets/secure/preset.meta.json +1 -0
- package/templates/roles/security-engineer/role.meta.json +1 -1
- package/templates/roles/cfo/AGENTS.md +0 -31
- package/templates/roles/cfo/HEARTBEAT.md +0 -37
- package/templates/roles/cfo/SOUL.md +0 -17
- package/templates/roles/cfo/TOOLS.md +0 -3
- package/templates/roles/cfo/role.meta.json +0 -17
package/dist/ui/index.js
CHANGED
|
@@ -187,8 +187,16 @@ var __iconNode10 = [
|
|
|
187
187
|
];
|
|
188
188
|
var CircleCheck = createLucideIcon("circle-check", __iconNode10);
|
|
189
189
|
|
|
190
|
-
// node_modules/.pnpm/lucide-react@0.574.0_react@19.2.4/node_modules/lucide-react/dist/esm/icons/
|
|
190
|
+
// node_modules/.pnpm/lucide-react@0.574.0_react@19.2.4/node_modules/lucide-react/dist/esm/icons/circle-plus.js
|
|
191
191
|
var __iconNode11 = [
|
|
192
|
+
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
193
|
+
["path", { d: "M8 12h8", key: "1wcyev" }],
|
|
194
|
+
["path", { d: "M12 8v8", key: "napkw2" }]
|
|
195
|
+
];
|
|
196
|
+
var CirclePlus = createLucideIcon("circle-plus", __iconNode11);
|
|
197
|
+
|
|
198
|
+
// node_modules/.pnpm/lucide-react@0.574.0_react@19.2.4/node_modules/lucide-react/dist/esm/icons/clipboard-check.js
|
|
199
|
+
var __iconNode12 = [
|
|
192
200
|
["rect", { width: "8", height: "4", x: "8", y: "2", rx: "1", ry: "1", key: "tgr4d6" }],
|
|
193
201
|
[
|
|
194
202
|
"path",
|
|
@@ -199,10 +207,10 @@ var __iconNode11 = [
|
|
|
199
207
|
],
|
|
200
208
|
["path", { d: "m9 14 2 2 4-4", key: "df797q" }]
|
|
201
209
|
];
|
|
202
|
-
var ClipboardCheck = createLucideIcon("clipboard-check",
|
|
210
|
+
var ClipboardCheck = createLucideIcon("clipboard-check", __iconNode12);
|
|
203
211
|
|
|
204
212
|
// node_modules/.pnpm/lucide-react@0.574.0_react@19.2.4/node_modules/lucide-react/dist/esm/icons/cpu.js
|
|
205
|
-
var
|
|
213
|
+
var __iconNode13 = [
|
|
206
214
|
["path", { d: "M12 20v2", key: "1lh1kg" }],
|
|
207
215
|
["path", { d: "M12 2v2", key: "tus03m" }],
|
|
208
216
|
["path", { d: "M17 20v2", key: "1rnc9c" }],
|
|
@@ -218,10 +226,10 @@ var __iconNode12 = [
|
|
|
218
226
|
["rect", { x: "4", y: "4", width: "16", height: "16", rx: "2", key: "1vbyd7" }],
|
|
219
227
|
["rect", { x: "8", y: "8", width: "8", height: "8", rx: "1", key: "z9xiuo" }]
|
|
220
228
|
];
|
|
221
|
-
var Cpu = createLucideIcon("cpu",
|
|
229
|
+
var Cpu = createLucideIcon("cpu", __iconNode13);
|
|
222
230
|
|
|
223
231
|
// node_modules/.pnpm/lucide-react@0.574.0_react@19.2.4/node_modules/lucide-react/dist/esm/icons/crown.js
|
|
224
|
-
var
|
|
232
|
+
var __iconNode14 = [
|
|
225
233
|
[
|
|
226
234
|
"path",
|
|
227
235
|
{
|
|
@@ -231,18 +239,18 @@ var __iconNode13 = [
|
|
|
231
239
|
],
|
|
232
240
|
["path", { d: "M5 21h14", key: "11awu3" }]
|
|
233
241
|
];
|
|
234
|
-
var Crown = createLucideIcon("crown",
|
|
242
|
+
var Crown = createLucideIcon("crown", __iconNode14);
|
|
235
243
|
|
|
236
244
|
// node_modules/.pnpm/lucide-react@0.574.0_react@19.2.4/node_modules/lucide-react/dist/esm/icons/external-link.js
|
|
237
|
-
var
|
|
245
|
+
var __iconNode15 = [
|
|
238
246
|
["path", { d: "M15 3h6v6", key: "1q9fwt" }],
|
|
239
247
|
["path", { d: "M10 14 21 3", key: "gplh6r" }],
|
|
240
248
|
["path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6", key: "a6xqqp" }]
|
|
241
249
|
];
|
|
242
|
-
var ExternalLink = createLucideIcon("external-link",
|
|
250
|
+
var ExternalLink = createLucideIcon("external-link", __iconNode15);
|
|
243
251
|
|
|
244
252
|
// node_modules/.pnpm/lucide-react@0.574.0_react@19.2.4/node_modules/lucide-react/dist/esm/icons/file-text.js
|
|
245
|
-
var
|
|
253
|
+
var __iconNode16 = [
|
|
246
254
|
[
|
|
247
255
|
"path",
|
|
248
256
|
{
|
|
@@ -255,10 +263,10 @@ var __iconNode15 = [
|
|
|
255
263
|
["path", { d: "M16 13H8", key: "t4e002" }],
|
|
256
264
|
["path", { d: "M16 17H8", key: "z1uh3a" }]
|
|
257
265
|
];
|
|
258
|
-
var FileText = createLucideIcon("file-text",
|
|
266
|
+
var FileText = createLucideIcon("file-text", __iconNode16);
|
|
259
267
|
|
|
260
268
|
// node_modules/.pnpm/lucide-react@0.574.0_react@19.2.4/node_modules/lucide-react/dist/esm/icons/flask-conical.js
|
|
261
|
-
var
|
|
269
|
+
var __iconNode17 = [
|
|
262
270
|
[
|
|
263
271
|
"path",
|
|
264
272
|
{
|
|
@@ -269,10 +277,31 @@ var __iconNode16 = [
|
|
|
269
277
|
["path", { d: "M6.453 15h11.094", key: "3shlmq" }],
|
|
270
278
|
["path", { d: "M8.5 2h7", key: "csnxdl" }]
|
|
271
279
|
];
|
|
272
|
-
var FlaskConical = createLucideIcon("flask-conical",
|
|
280
|
+
var FlaskConical = createLucideIcon("flask-conical", __iconNode17);
|
|
281
|
+
|
|
282
|
+
// node_modules/.pnpm/lucide-react@0.574.0_react@19.2.4/node_modules/lucide-react/dist/esm/icons/git-branch.js
|
|
283
|
+
var __iconNode18 = [
|
|
284
|
+
["path", { d: "M15 6a9 9 0 0 0-9 9V3", key: "1cii5b" }],
|
|
285
|
+
["circle", { cx: "18", cy: "6", r: "3", key: "1h7g24" }],
|
|
286
|
+
["circle", { cx: "6", cy: "18", r: "3", key: "fqmcym" }]
|
|
287
|
+
];
|
|
288
|
+
var GitBranch = createLucideIcon("git-branch", __iconNode18);
|
|
289
|
+
|
|
290
|
+
// node_modules/.pnpm/lucide-react@0.574.0_react@19.2.4/node_modules/lucide-react/dist/esm/icons/github.js
|
|
291
|
+
var __iconNode19 = [
|
|
292
|
+
[
|
|
293
|
+
"path",
|
|
294
|
+
{
|
|
295
|
+
d: "M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",
|
|
296
|
+
key: "tonef"
|
|
297
|
+
}
|
|
298
|
+
],
|
|
299
|
+
["path", { d: "M9 18c-4.51 2-5-2-7-2", key: "9comsn" }]
|
|
300
|
+
];
|
|
301
|
+
var Github = createLucideIcon("github", __iconNode19);
|
|
273
302
|
|
|
274
303
|
// node_modules/.pnpm/lucide-react@0.574.0_react@19.2.4/node_modules/lucide-react/dist/esm/icons/layers.js
|
|
275
|
-
var
|
|
304
|
+
var __iconNode20 = [
|
|
276
305
|
[
|
|
277
306
|
"path",
|
|
278
307
|
{
|
|
@@ -295,31 +324,31 @@ var __iconNode17 = [
|
|
|
295
324
|
}
|
|
296
325
|
]
|
|
297
326
|
];
|
|
298
|
-
var Layers = createLucideIcon("layers",
|
|
327
|
+
var Layers = createLucideIcon("layers", __iconNode20);
|
|
299
328
|
|
|
300
329
|
// node_modules/.pnpm/lucide-react@0.574.0_react@19.2.4/node_modules/lucide-react/dist/esm/icons/list-checks.js
|
|
301
|
-
var
|
|
330
|
+
var __iconNode21 = [
|
|
302
331
|
["path", { d: "M13 5h8", key: "a7qcls" }],
|
|
303
332
|
["path", { d: "M13 12h8", key: "h98zly" }],
|
|
304
333
|
["path", { d: "M13 19h8", key: "c3s6r1" }],
|
|
305
334
|
["path", { d: "m3 17 2 2 4-4", key: "1jhpwq" }],
|
|
306
335
|
["path", { d: "m3 7 2 2 4-4", key: "1obspn" }]
|
|
307
336
|
];
|
|
308
|
-
var ListChecks = createLucideIcon("list-checks",
|
|
337
|
+
var ListChecks = createLucideIcon("list-checks", __iconNode21);
|
|
309
338
|
|
|
310
339
|
// node_modules/.pnpm/lucide-react@0.574.0_react@19.2.4/node_modules/lucide-react/dist/esm/icons/loader-circle.js
|
|
311
|
-
var
|
|
312
|
-
var LoaderCircle = createLucideIcon("loader-circle",
|
|
340
|
+
var __iconNode22 = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]];
|
|
341
|
+
var LoaderCircle = createLucideIcon("loader-circle", __iconNode22);
|
|
313
342
|
|
|
314
343
|
// node_modules/.pnpm/lucide-react@0.574.0_react@19.2.4/node_modules/lucide-react/dist/esm/icons/lock.js
|
|
315
|
-
var
|
|
344
|
+
var __iconNode23 = [
|
|
316
345
|
["rect", { width: "18", height: "11", x: "3", y: "11", rx: "2", ry: "2", key: "1w4ew1" }],
|
|
317
346
|
["path", { d: "M7 11V7a5 5 0 0 1 10 0v4", key: "fwvmzm" }]
|
|
318
347
|
];
|
|
319
|
-
var Lock = createLucideIcon("lock",
|
|
348
|
+
var Lock = createLucideIcon("lock", __iconNode23);
|
|
320
349
|
|
|
321
350
|
// node_modules/.pnpm/lucide-react@0.574.0_react@19.2.4/node_modules/lucide-react/dist/esm/icons/message-square.js
|
|
322
|
-
var
|
|
351
|
+
var __iconNode24 = [
|
|
323
352
|
[
|
|
324
353
|
"path",
|
|
325
354
|
{
|
|
@@ -328,10 +357,10 @@ var __iconNode21 = [
|
|
|
328
357
|
}
|
|
329
358
|
]
|
|
330
359
|
];
|
|
331
|
-
var MessageSquare = createLucideIcon("message-square",
|
|
360
|
+
var MessageSquare = createLucideIcon("message-square", __iconNode24);
|
|
332
361
|
|
|
333
362
|
// node_modules/.pnpm/lucide-react@0.574.0_react@19.2.4/node_modules/lucide-react/dist/esm/icons/pencil.js
|
|
334
|
-
var
|
|
363
|
+
var __iconNode25 = [
|
|
335
364
|
[
|
|
336
365
|
"path",
|
|
337
366
|
{
|
|
@@ -341,19 +370,19 @@ var __iconNode22 = [
|
|
|
341
370
|
],
|
|
342
371
|
["path", { d: "m15 5 4 4", key: "1mk7zo" }]
|
|
343
372
|
];
|
|
344
|
-
var Pencil = createLucideIcon("pencil",
|
|
373
|
+
var Pencil = createLucideIcon("pencil", __iconNode25);
|
|
345
374
|
|
|
346
375
|
// node_modules/.pnpm/lucide-react@0.574.0_react@19.2.4/node_modules/lucide-react/dist/esm/icons/refresh-cw.js
|
|
347
|
-
var
|
|
376
|
+
var __iconNode26 = [
|
|
348
377
|
["path", { d: "M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8", key: "v9h5vc" }],
|
|
349
378
|
["path", { d: "M21 3v5h-5", key: "1q7to0" }],
|
|
350
379
|
["path", { d: "M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16", key: "3uifl3" }],
|
|
351
380
|
["path", { d: "M8 16H3v5", key: "1cv678" }]
|
|
352
381
|
];
|
|
353
|
-
var RefreshCw = createLucideIcon("refresh-cw",
|
|
382
|
+
var RefreshCw = createLucideIcon("refresh-cw", __iconNode26);
|
|
354
383
|
|
|
355
384
|
// node_modules/.pnpm/lucide-react@0.574.0_react@19.2.4/node_modules/lucide-react/dist/esm/icons/rocket.js
|
|
356
|
-
var
|
|
385
|
+
var __iconNode27 = [
|
|
357
386
|
["path", { d: "M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5", key: "qeys4" }],
|
|
358
387
|
[
|
|
359
388
|
"path",
|
|
@@ -371,17 +400,17 @@ var __iconNode24 = [
|
|
|
371
400
|
],
|
|
372
401
|
["path", { d: "M9 12H4s.55-3.03 2-4c1.62-1.08 5 .05 5 .05", key: "92ym6u" }]
|
|
373
402
|
];
|
|
374
|
-
var Rocket = createLucideIcon("rocket",
|
|
403
|
+
var Rocket = createLucideIcon("rocket", __iconNode27);
|
|
375
404
|
|
|
376
405
|
// node_modules/.pnpm/lucide-react@0.574.0_react@19.2.4/node_modules/lucide-react/dist/esm/icons/rotate-ccw.js
|
|
377
|
-
var
|
|
406
|
+
var __iconNode28 = [
|
|
378
407
|
["path", { d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8", key: "1357e3" }],
|
|
379
408
|
["path", { d: "M3 3v5h5", key: "1xhq8a" }]
|
|
380
409
|
];
|
|
381
|
-
var RotateCcw = createLucideIcon("rotate-ccw",
|
|
410
|
+
var RotateCcw = createLucideIcon("rotate-ccw", __iconNode28);
|
|
382
411
|
|
|
383
412
|
// node_modules/.pnpm/lucide-react@0.574.0_react@19.2.4/node_modules/lucide-react/dist/esm/icons/send.js
|
|
384
|
-
var
|
|
413
|
+
var __iconNode29 = [
|
|
385
414
|
[
|
|
386
415
|
"path",
|
|
387
416
|
{
|
|
@@ -391,19 +420,19 @@ var __iconNode26 = [
|
|
|
391
420
|
],
|
|
392
421
|
["path", { d: "m21.854 2.147-10.94 10.939", key: "12cjpa" }]
|
|
393
422
|
];
|
|
394
|
-
var Send = createLucideIcon("send",
|
|
423
|
+
var Send = createLucideIcon("send", __iconNode29);
|
|
395
424
|
|
|
396
425
|
// node_modules/.pnpm/lucide-react@0.574.0_react@19.2.4/node_modules/lucide-react/dist/esm/icons/settings-2.js
|
|
397
|
-
var
|
|
426
|
+
var __iconNode30 = [
|
|
398
427
|
["path", { d: "M14 17H5", key: "gfn3mx" }],
|
|
399
428
|
["path", { d: "M19 7h-9", key: "6i9tg" }],
|
|
400
429
|
["circle", { cx: "17", cy: "17", r: "3", key: "18b49y" }],
|
|
401
430
|
["circle", { cx: "7", cy: "7", r: "3", key: "dfmy0x" }]
|
|
402
431
|
];
|
|
403
|
-
var Settings2 = createLucideIcon("settings-2",
|
|
432
|
+
var Settings2 = createLucideIcon("settings-2", __iconNode30);
|
|
404
433
|
|
|
405
434
|
// node_modules/.pnpm/lucide-react@0.574.0_react@19.2.4/node_modules/lucide-react/dist/esm/icons/settings.js
|
|
406
|
-
var
|
|
435
|
+
var __iconNode31 = [
|
|
407
436
|
[
|
|
408
437
|
"path",
|
|
409
438
|
{
|
|
@@ -413,10 +442,10 @@ var __iconNode28 = [
|
|
|
413
442
|
],
|
|
414
443
|
["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
|
|
415
444
|
];
|
|
416
|
-
var Settings = createLucideIcon("settings",
|
|
445
|
+
var Settings = createLucideIcon("settings", __iconNode31);
|
|
417
446
|
|
|
418
447
|
// node_modules/.pnpm/lucide-react@0.574.0_react@19.2.4/node_modules/lucide-react/dist/esm/icons/shield.js
|
|
419
|
-
var
|
|
448
|
+
var __iconNode32 = [
|
|
420
449
|
[
|
|
421
450
|
"path",
|
|
422
451
|
{
|
|
@@ -425,10 +454,10 @@ var __iconNode29 = [
|
|
|
425
454
|
}
|
|
426
455
|
]
|
|
427
456
|
];
|
|
428
|
-
var Shield = createLucideIcon("shield",
|
|
457
|
+
var Shield = createLucideIcon("shield", __iconNode32);
|
|
429
458
|
|
|
430
459
|
// node_modules/.pnpm/lucide-react@0.574.0_react@19.2.4/node_modules/lucide-react/dist/esm/icons/sparkles.js
|
|
431
|
-
var
|
|
460
|
+
var __iconNode33 = [
|
|
432
461
|
[
|
|
433
462
|
"path",
|
|
434
463
|
{
|
|
@@ -440,18 +469,18 @@ var __iconNode30 = [
|
|
|
440
469
|
["path", { d: "M22 4h-4", key: "gwowj6" }],
|
|
441
470
|
["circle", { cx: "4", cy: "20", r: "2", key: "6kqj1y" }]
|
|
442
471
|
];
|
|
443
|
-
var Sparkles = createLucideIcon("sparkles",
|
|
472
|
+
var Sparkles = createLucideIcon("sparkles", __iconNode33);
|
|
444
473
|
|
|
445
474
|
// node_modules/.pnpm/lucide-react@0.574.0_react@19.2.4/node_modules/lucide-react/dist/esm/icons/target.js
|
|
446
|
-
var
|
|
475
|
+
var __iconNode34 = [
|
|
447
476
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
448
477
|
["circle", { cx: "12", cy: "12", r: "6", key: "1vlfrh" }],
|
|
449
478
|
["circle", { cx: "12", cy: "12", r: "2", key: "1c9p78" }]
|
|
450
479
|
];
|
|
451
|
-
var Target = createLucideIcon("target",
|
|
480
|
+
var Target = createLucideIcon("target", __iconNode34);
|
|
452
481
|
|
|
453
482
|
// node_modules/.pnpm/lucide-react@0.574.0_react@19.2.4/node_modules/lucide-react/dist/esm/icons/triangle-alert.js
|
|
454
|
-
var
|
|
483
|
+
var __iconNode35 = [
|
|
455
484
|
[
|
|
456
485
|
"path",
|
|
457
486
|
{
|
|
@@ -462,34 +491,34 @@ var __iconNode32 = [
|
|
|
462
491
|
["path", { d: "M12 9v4", key: "juzpu7" }],
|
|
463
492
|
["path", { d: "M12 17h.01", key: "p32p05" }]
|
|
464
493
|
];
|
|
465
|
-
var TriangleAlert = createLucideIcon("triangle-alert",
|
|
494
|
+
var TriangleAlert = createLucideIcon("triangle-alert", __iconNode35);
|
|
466
495
|
|
|
467
496
|
// node_modules/.pnpm/lucide-react@0.574.0_react@19.2.4/node_modules/lucide-react/dist/esm/icons/user.js
|
|
468
|
-
var
|
|
497
|
+
var __iconNode36 = [
|
|
469
498
|
["path", { d: "M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2", key: "975kel" }],
|
|
470
499
|
["circle", { cx: "12", cy: "7", r: "4", key: "17ys0d" }]
|
|
471
500
|
];
|
|
472
|
-
var User = createLucideIcon("user",
|
|
501
|
+
var User = createLucideIcon("user", __iconNode36);
|
|
473
502
|
|
|
474
503
|
// node_modules/.pnpm/lucide-react@0.574.0_react@19.2.4/node_modules/lucide-react/dist/esm/icons/users.js
|
|
475
|
-
var
|
|
504
|
+
var __iconNode37 = [
|
|
476
505
|
["path", { d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2", key: "1yyitq" }],
|
|
477
506
|
["path", { d: "M16 3.128a4 4 0 0 1 0 7.744", key: "16gr8j" }],
|
|
478
507
|
["path", { d: "M22 21v-2a4 4 0 0 0-3-3.87", key: "kshegd" }],
|
|
479
508
|
["circle", { cx: "9", cy: "7", r: "4", key: "nufk8" }]
|
|
480
509
|
];
|
|
481
|
-
var Users = createLucideIcon("users",
|
|
510
|
+
var Users = createLucideIcon("users", __iconNode37);
|
|
482
511
|
|
|
483
512
|
// node_modules/.pnpm/lucide-react@0.574.0_react@19.2.4/node_modules/lucide-react/dist/esm/icons/workflow.js
|
|
484
|
-
var
|
|
513
|
+
var __iconNode38 = [
|
|
485
514
|
["rect", { width: "8", height: "8", x: "3", y: "3", rx: "2", key: "by2w9f" }],
|
|
486
515
|
["path", { d: "M7 11v4a2 2 0 0 0 2 2h4", key: "xkn7yn" }],
|
|
487
516
|
["rect", { width: "8", height: "8", x: "13", y: "13", rx: "2", key: "1cgmvn" }]
|
|
488
517
|
];
|
|
489
|
-
var Workflow = createLucideIcon("workflow",
|
|
518
|
+
var Workflow = createLucideIcon("workflow", __iconNode38);
|
|
490
519
|
|
|
491
520
|
// node_modules/.pnpm/lucide-react@0.574.0_react@19.2.4/node_modules/lucide-react/dist/esm/icons/wrench.js
|
|
492
|
-
var
|
|
521
|
+
var __iconNode39 = [
|
|
493
522
|
[
|
|
494
523
|
"path",
|
|
495
524
|
{
|
|
@@ -498,17 +527,17 @@ var __iconNode36 = [
|
|
|
498
527
|
}
|
|
499
528
|
]
|
|
500
529
|
];
|
|
501
|
-
var Wrench = createLucideIcon("wrench",
|
|
530
|
+
var Wrench = createLucideIcon("wrench", __iconNode39);
|
|
502
531
|
|
|
503
532
|
// node_modules/.pnpm/lucide-react@0.574.0_react@19.2.4/node_modules/lucide-react/dist/esm/icons/x.js
|
|
504
|
-
var
|
|
533
|
+
var __iconNode40 = [
|
|
505
534
|
["path", { d: "M18 6 6 18", key: "1bl5f8" }],
|
|
506
535
|
["path", { d: "m6 6 12 12", key: "d8bk6v" }]
|
|
507
536
|
];
|
|
508
|
-
var X = createLucideIcon("x",
|
|
537
|
+
var X = createLucideIcon("x", __iconNode40);
|
|
509
538
|
|
|
510
539
|
// node_modules/.pnpm/lucide-react@0.574.0_react@19.2.4/node_modules/lucide-react/dist/esm/icons/zap.js
|
|
511
|
-
var
|
|
540
|
+
var __iconNode41 = [
|
|
512
541
|
[
|
|
513
542
|
"path",
|
|
514
543
|
{
|
|
@@ -517,10 +546,10 @@ var __iconNode38 = [
|
|
|
517
546
|
}
|
|
518
547
|
]
|
|
519
548
|
];
|
|
520
|
-
var Zap = createLucideIcon("zap",
|
|
549
|
+
var Zap = createLucideIcon("zap", __iconNode41);
|
|
521
550
|
|
|
522
551
|
// src/ui/components/WizardShell.tsx
|
|
523
|
-
import { useEffect as
|
|
552
|
+
import { useEffect as useEffect6 } from "react";
|
|
524
553
|
|
|
525
554
|
// src/ui/context/WizardContext.tsx
|
|
526
555
|
import { createContext, useCallback, useContext, useState } from "react";
|
|
@@ -529,6 +558,7 @@ var MANUAL_STEPS = [
|
|
|
529
558
|
"onboarding",
|
|
530
559
|
"name",
|
|
531
560
|
"goal",
|
|
561
|
+
"repository",
|
|
532
562
|
"preset",
|
|
533
563
|
"modules",
|
|
534
564
|
"roles",
|
|
@@ -571,6 +601,7 @@ var initialState = {
|
|
|
571
601
|
companyName: "",
|
|
572
602
|
goals: [],
|
|
573
603
|
projects: [],
|
|
604
|
+
issues: [],
|
|
574
605
|
ceoAdapter: { type: "codex_local", cwd: "", model: "gpt-5.5" },
|
|
575
606
|
existingCompanyId: "",
|
|
576
607
|
presetName: "",
|
|
@@ -4334,8 +4365,281 @@ function StepGoal() {
|
|
|
4334
4365
|
] });
|
|
4335
4366
|
}
|
|
4336
4367
|
|
|
4368
|
+
// src/ui/components/steps/StepRepository.tsx
|
|
4369
|
+
import { useCallback as useCallback4, useState as useState4 } from "react";
|
|
4370
|
+
|
|
4371
|
+
// src/ui/lib/repository.ts
|
|
4372
|
+
function resolveWorkspaceSourceType(project) {
|
|
4373
|
+
const sourceType = project?.workspace?.sourceType || project?.workspaceSourceType;
|
|
4374
|
+
return typeof sourceType === "string" ? sourceType.trim() : void 0;
|
|
4375
|
+
}
|
|
4376
|
+
function getRepositoryMode(project) {
|
|
4377
|
+
const workspace = project?.workspace;
|
|
4378
|
+
const sourceType = resolveWorkspaceSourceType(project);
|
|
4379
|
+
if (sourceType === "git_repo" || workspace?.repoUrl || project?.repoUrl || typeof sourceType === "string" && sourceType !== "local_path" && sourceType.length > 0) {
|
|
4380
|
+
return "external";
|
|
4381
|
+
}
|
|
4382
|
+
return "new";
|
|
4383
|
+
}
|
|
4384
|
+
function isExternalRepository(project) {
|
|
4385
|
+
const sourceType = resolveWorkspaceSourceType(project);
|
|
4386
|
+
return typeof sourceType === "string" && sourceType !== "local_path" && sourceType.length > 0 || Boolean(project?.workspace?.repoUrl || project?.repoUrl);
|
|
4387
|
+
}
|
|
4388
|
+
function getRepositoryUrl(project) {
|
|
4389
|
+
return project?.workspace?.repoUrl || project?.repoUrl || "";
|
|
4390
|
+
}
|
|
4391
|
+
function getRepositoryRef(project, mode) {
|
|
4392
|
+
return project?.workspace?.defaultRef || project?.workspace?.repoRef || project?.defaultRef || project?.repoRef || (mode === "external" ? "origin/main" : "main");
|
|
4393
|
+
}
|
|
4394
|
+
function normalizeExternalRepoRef(value) {
|
|
4395
|
+
const trimmed = value.trim();
|
|
4396
|
+
if (!trimmed) return "origin/main";
|
|
4397
|
+
if (trimmed.startsWith("origin/") || trimmed.startsWith("refs/")) {
|
|
4398
|
+
return trimmed;
|
|
4399
|
+
}
|
|
4400
|
+
return `origin/${trimmed}`;
|
|
4401
|
+
}
|
|
4402
|
+
function normalizeNewRepoBranch(value) {
|
|
4403
|
+
const raw = value.trim().replace(/^origin\//, "") || "main";
|
|
4404
|
+
return /^[A-Za-z0-9._/-]+$/.test(raw) ? raw : "main";
|
|
4405
|
+
}
|
|
4406
|
+
function repositoryProjectFields(mode, repoUrl, repoRef) {
|
|
4407
|
+
if (mode === "external") {
|
|
4408
|
+
const ref = normalizeExternalRepoRef(repoRef);
|
|
4409
|
+
const url = repoUrl.trim();
|
|
4410
|
+
return {
|
|
4411
|
+
workspaceSourceType: "git_repo",
|
|
4412
|
+
repoUrl: url,
|
|
4413
|
+
repoRef: ref,
|
|
4414
|
+
defaultRef: ref,
|
|
4415
|
+
workspace: {
|
|
4416
|
+
sourceType: "git_repo",
|
|
4417
|
+
repoUrl: url,
|
|
4418
|
+
repoRef: ref,
|
|
4419
|
+
defaultRef: ref,
|
|
4420
|
+
isPrimary: true
|
|
4421
|
+
},
|
|
4422
|
+
executionWorkspacePolicy: {
|
|
4423
|
+
defaultMode: "isolated_workspace",
|
|
4424
|
+
workspaceStrategy: { type: "git_worktree", baseRef: ref }
|
|
4425
|
+
}
|
|
4426
|
+
};
|
|
4427
|
+
}
|
|
4428
|
+
const branch = normalizeNewRepoBranch(repoRef);
|
|
4429
|
+
return {
|
|
4430
|
+
workspaceSourceType: "local_path",
|
|
4431
|
+
repoUrl: void 0,
|
|
4432
|
+
repoRef: void 0,
|
|
4433
|
+
defaultRef: branch,
|
|
4434
|
+
workspace: {
|
|
4435
|
+
sourceType: "local_path",
|
|
4436
|
+
defaultRef: branch,
|
|
4437
|
+
setupCommand: `git init -b ${branch}`,
|
|
4438
|
+
isPrimary: true
|
|
4439
|
+
},
|
|
4440
|
+
executionWorkspacePolicy: void 0
|
|
4441
|
+
};
|
|
4442
|
+
}
|
|
4443
|
+
|
|
4444
|
+
// src/ui/components/steps/StepRepository.tsx
|
|
4445
|
+
import { jsx as jsx8, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
4446
|
+
function getPrimaryProject(stateProjects) {
|
|
4447
|
+
return stateProjects.length > 0 ? stateProjects[0] : null;
|
|
4448
|
+
}
|
|
4449
|
+
function buildProject({
|
|
4450
|
+
existing,
|
|
4451
|
+
companyName,
|
|
4452
|
+
goalTitles,
|
|
4453
|
+
goalDescription,
|
|
4454
|
+
mode,
|
|
4455
|
+
repoUrl,
|
|
4456
|
+
repoRef
|
|
4457
|
+
}) {
|
|
4458
|
+
const name = existing?.name?.trim() || companyName || "Main Project";
|
|
4459
|
+
const description = existing?.description?.trim() || goalDescription || `Main project for ${companyName}`;
|
|
4460
|
+
const goals = existing?.goals?.length ? existing.goals : goalTitles;
|
|
4461
|
+
return {
|
|
4462
|
+
...existing ?? {},
|
|
4463
|
+
name,
|
|
4464
|
+
description,
|
|
4465
|
+
goals,
|
|
4466
|
+
...repositoryProjectFields(mode, repoUrl, repoRef)
|
|
4467
|
+
};
|
|
4468
|
+
}
|
|
4469
|
+
function ModeCard({
|
|
4470
|
+
icon: Icon2,
|
|
4471
|
+
title,
|
|
4472
|
+
description,
|
|
4473
|
+
selected,
|
|
4474
|
+
onClick
|
|
4475
|
+
}) {
|
|
4476
|
+
return /* @__PURE__ */ jsxs4(
|
|
4477
|
+
"button",
|
|
4478
|
+
{
|
|
4479
|
+
type: "button",
|
|
4480
|
+
onClick,
|
|
4481
|
+
className: cn(
|
|
4482
|
+
"flex items-start gap-4 rounded-lg border p-4 text-left transition-all duration-150",
|
|
4483
|
+
selected ? "border-foreground/30 bg-accent" : "border-border hover:border-foreground/15 hover:bg-accent/50"
|
|
4484
|
+
),
|
|
4485
|
+
children: [
|
|
4486
|
+
/* @__PURE__ */ jsx8(
|
|
4487
|
+
"div",
|
|
4488
|
+
{
|
|
4489
|
+
className: cn(
|
|
4490
|
+
"mt-0.5 h-8 w-8 rounded-md flex items-center justify-center shrink-0",
|
|
4491
|
+
selected ? "bg-foreground text-background" : "bg-secondary"
|
|
4492
|
+
),
|
|
4493
|
+
children: selected ? /* @__PURE__ */ jsx8(Check, { className: "h-4 w-4" }) : /* @__PURE__ */ jsx8(Icon2, { className: "h-4 w-4" })
|
|
4494
|
+
}
|
|
4495
|
+
),
|
|
4496
|
+
/* @__PURE__ */ jsxs4("div", { className: "space-y-1", children: [
|
|
4497
|
+
/* @__PURE__ */ jsx8("p", { className: "text-sm font-medium", children: title }),
|
|
4498
|
+
/* @__PURE__ */ jsx8("p", { className: "text-sm text-muted-foreground", children: description })
|
|
4499
|
+
] })
|
|
4500
|
+
]
|
|
4501
|
+
}
|
|
4502
|
+
);
|
|
4503
|
+
}
|
|
4504
|
+
function StepRepository() {
|
|
4505
|
+
const state = useWizard();
|
|
4506
|
+
const dispatch = useWizardDispatch();
|
|
4507
|
+
const existingProject = getPrimaryProject(state.projects);
|
|
4508
|
+
const initialMode = getRepositoryMode(existingProject);
|
|
4509
|
+
const [mode, setMode] = useState4(initialMode);
|
|
4510
|
+
const [repoUrl, setRepoUrl] = useState4(getRepositoryUrl(existingProject));
|
|
4511
|
+
const [repoRef, setRepoRef] = useState4(getRepositoryRef(existingProject, initialMode));
|
|
4512
|
+
const companyName = state.companyName.trim() || "Company";
|
|
4513
|
+
const goalTitles = state.goals.map((g) => g.title).filter(Boolean);
|
|
4514
|
+
const goalDescription = state.goals[0]?.description || "";
|
|
4515
|
+
const externalRepoMissing = mode === "external" && !repoUrl.trim();
|
|
4516
|
+
const chooseMode = (nextMode) => {
|
|
4517
|
+
setMode(nextMode);
|
|
4518
|
+
if (nextMode === "external" && (!repoRef.trim() || repoRef.trim() === "main")) {
|
|
4519
|
+
setRepoRef("origin/main");
|
|
4520
|
+
}
|
|
4521
|
+
if (nextMode === "new" && (!repoRef.trim() || repoRef.trim().startsWith("origin/"))) {
|
|
4522
|
+
setRepoRef("main");
|
|
4523
|
+
}
|
|
4524
|
+
};
|
|
4525
|
+
const handleNext = useCallback4(() => {
|
|
4526
|
+
if (externalRepoMissing) return;
|
|
4527
|
+
const updatedProject = buildProject({
|
|
4528
|
+
existing: existingProject,
|
|
4529
|
+
companyName,
|
|
4530
|
+
goalTitles,
|
|
4531
|
+
goalDescription,
|
|
4532
|
+
mode,
|
|
4533
|
+
repoUrl,
|
|
4534
|
+
repoRef
|
|
4535
|
+
});
|
|
4536
|
+
dispatch({ type: "SET_PROJECTS", projects: [updatedProject, ...state.projects.slice(1)] });
|
|
4537
|
+
dispatch({ type: "GO_TO", step: nextStep(state) });
|
|
4538
|
+
}, [
|
|
4539
|
+
companyName,
|
|
4540
|
+
dispatch,
|
|
4541
|
+
existingProject,
|
|
4542
|
+
externalRepoMissing,
|
|
4543
|
+
goalDescription,
|
|
4544
|
+
goalTitles,
|
|
4545
|
+
mode,
|
|
4546
|
+
repoRef,
|
|
4547
|
+
repoUrl,
|
|
4548
|
+
state
|
|
4549
|
+
]);
|
|
4550
|
+
return /* @__PURE__ */ jsxs4("div", { className: "space-y-6", children: [
|
|
4551
|
+
/* @__PURE__ */ jsxs4("div", { className: "space-y-2", children: [
|
|
4552
|
+
/* @__PURE__ */ jsx8("h2", { className: "text-xl font-semibold tracking-tight", children: "Repository setup" }),
|
|
4553
|
+
/* @__PURE__ */ jsx8("p", { className: "text-sm text-muted-foreground", children: "Should Paperclip create a fresh Git repository for this project, or should the agents work from an existing external repository such as GitHub?" })
|
|
4554
|
+
] }),
|
|
4555
|
+
/* @__PURE__ */ jsxs4("div", { className: "grid gap-3 sm:grid-cols-2", children: [
|
|
4556
|
+
/* @__PURE__ */ jsx8(
|
|
4557
|
+
ModeCard,
|
|
4558
|
+
{
|
|
4559
|
+
icon: CirclePlus,
|
|
4560
|
+
title: "Create a new Git repository",
|
|
4561
|
+
description: "Start with a fresh local project workspace. Paperclip will initialize Git during bootstrap.",
|
|
4562
|
+
selected: mode === "new",
|
|
4563
|
+
onClick: () => chooseMode("new")
|
|
4564
|
+
}
|
|
4565
|
+
),
|
|
4566
|
+
/* @__PURE__ */ jsx8(
|
|
4567
|
+
ModeCard,
|
|
4568
|
+
{
|
|
4569
|
+
icon: Github,
|
|
4570
|
+
title: "Use an external repository",
|
|
4571
|
+
description: "Connect an existing GitHub, GitLab, or other remote Git repository.",
|
|
4572
|
+
selected: mode === "external",
|
|
4573
|
+
onClick: () => chooseMode("external")
|
|
4574
|
+
}
|
|
4575
|
+
)
|
|
4576
|
+
] }),
|
|
4577
|
+
mode === "external" ? /* @__PURE__ */ jsxs4("div", { className: "space-y-4 rounded-lg border p-4", children: [
|
|
4578
|
+
/* @__PURE__ */ jsxs4("div", { className: "space-y-2", children: [
|
|
4579
|
+
/* @__PURE__ */ jsx8("label", { className: "text-sm font-medium", children: "Repository URL" }),
|
|
4580
|
+
/* @__PURE__ */ jsx8(
|
|
4581
|
+
Input,
|
|
4582
|
+
{
|
|
4583
|
+
placeholder: "https://github.com/org/repo",
|
|
4584
|
+
value: repoUrl,
|
|
4585
|
+
onChange: (e) => setRepoUrl(e.target.value),
|
|
4586
|
+
autoFocus: true
|
|
4587
|
+
}
|
|
4588
|
+
),
|
|
4589
|
+
/* @__PURE__ */ jsx8("p", { className: "text-xs text-muted-foreground", children: "Do not paste tokens or credentials into the URL. Configure provider access as Paperclip company secrets instead." })
|
|
4590
|
+
] }),
|
|
4591
|
+
/* @__PURE__ */ jsxs4("div", { className: "space-y-2", children: [
|
|
4592
|
+
/* @__PURE__ */ jsxs4("label", { className: "text-sm font-medium", children: [
|
|
4593
|
+
"Default ref ",
|
|
4594
|
+
/* @__PURE__ */ jsx8("span", { className: "text-muted-foreground font-normal", children: "(optional)" })
|
|
4595
|
+
] }),
|
|
4596
|
+
/* @__PURE__ */ jsx8(
|
|
4597
|
+
Input,
|
|
4598
|
+
{
|
|
4599
|
+
placeholder: "origin/main",
|
|
4600
|
+
value: repoRef,
|
|
4601
|
+
onChange: (e) => setRepoRef(e.target.value),
|
|
4602
|
+
onKeyDown: (e) => e.key === "Enter" && handleNext()
|
|
4603
|
+
}
|
|
4604
|
+
)
|
|
4605
|
+
] })
|
|
4606
|
+
] }) : /* @__PURE__ */ jsxs4("div", { className: "space-y-4 rounded-lg border p-4", children: [
|
|
4607
|
+
/* @__PURE__ */ jsxs4("div", { className: "flex items-start gap-3", children: [
|
|
4608
|
+
/* @__PURE__ */ jsx8(GitBranch, { className: "h-4 w-4 text-muted-foreground shrink-0 mt-0.5" }),
|
|
4609
|
+
/* @__PURE__ */ jsxs4("div", { className: "space-y-1", children: [
|
|
4610
|
+
/* @__PURE__ */ jsx8("p", { className: "text-sm font-medium", children: "Fresh repository workspace" }),
|
|
4611
|
+
/* @__PURE__ */ jsxs4("p", { className: "text-sm text-muted-foreground", children: [
|
|
4612
|
+
'The bootstrap will create project "',
|
|
4613
|
+
existingProject?.name || companyName,
|
|
4614
|
+
'" with a local workspace and run',
|
|
4615
|
+
" ",
|
|
4616
|
+
/* @__PURE__ */ jsx8("code", { className: "bg-muted px-1 py-0.5 rounded", children: "git init" }),
|
|
4617
|
+
"."
|
|
4618
|
+
] })
|
|
4619
|
+
] })
|
|
4620
|
+
] }),
|
|
4621
|
+
/* @__PURE__ */ jsxs4("div", { className: "space-y-2", children: [
|
|
4622
|
+
/* @__PURE__ */ jsxs4("label", { className: "text-sm font-medium", children: [
|
|
4623
|
+
"Initial branch ",
|
|
4624
|
+
/* @__PURE__ */ jsx8("span", { className: "text-muted-foreground font-normal", children: "(optional)" })
|
|
4625
|
+
] }),
|
|
4626
|
+
/* @__PURE__ */ jsx8(
|
|
4627
|
+
Input,
|
|
4628
|
+
{
|
|
4629
|
+
placeholder: "main",
|
|
4630
|
+
value: repoRef,
|
|
4631
|
+
onChange: (e) => setRepoRef(e.target.value),
|
|
4632
|
+
onKeyDown: (e) => e.key === "Enter" && handleNext()
|
|
4633
|
+
}
|
|
4634
|
+
)
|
|
4635
|
+
] })
|
|
4636
|
+
] }),
|
|
4637
|
+
/* @__PURE__ */ jsx8("div", { className: "flex justify-end", children: /* @__PURE__ */ jsx8(Button, { onClick: handleNext, disabled: externalRepoMissing, children: "Continue" }) })
|
|
4638
|
+
] });
|
|
4639
|
+
}
|
|
4640
|
+
|
|
4337
4641
|
// src/ui/components/ui/badge.tsx
|
|
4338
|
-
import { jsx as
|
|
4642
|
+
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
4339
4643
|
var badgeVariants = cva(
|
|
4340
4644
|
"inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
|
|
4341
4645
|
{
|
|
@@ -4351,11 +4655,11 @@ var badgeVariants = cva(
|
|
|
4351
4655
|
}
|
|
4352
4656
|
);
|
|
4353
4657
|
function Badge({ className, variant, ...props }) {
|
|
4354
|
-
return /* @__PURE__ */
|
|
4658
|
+
return /* @__PURE__ */ jsx9("div", { className: cn(badgeVariants({ variant }), className), ...props });
|
|
4355
4659
|
}
|
|
4356
4660
|
|
|
4357
4661
|
// src/ui/components/steps/StepPreset.tsx
|
|
4358
|
-
import { jsx as
|
|
4662
|
+
import { jsx as jsx10, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
4359
4663
|
var PRESET_ICONS = {
|
|
4360
4664
|
fast: Zap,
|
|
4361
4665
|
quality: Shield,
|
|
@@ -4370,16 +4674,16 @@ function StepPreset() {
|
|
|
4370
4674
|
const handleSelect = (name) => {
|
|
4371
4675
|
dispatch({ type: "SET_PRESET", name });
|
|
4372
4676
|
};
|
|
4373
|
-
return /* @__PURE__ */
|
|
4374
|
-
/* @__PURE__ */
|
|
4375
|
-
/* @__PURE__ */
|
|
4376
|
-
/* @__PURE__ */
|
|
4677
|
+
return /* @__PURE__ */ jsxs5("div", { className: "space-y-6", children: [
|
|
4678
|
+
/* @__PURE__ */ jsxs5("div", { className: "space-y-2", children: [
|
|
4679
|
+
/* @__PURE__ */ jsx10("h2", { className: "text-xl font-semibold tracking-tight", children: "Team preset" }),
|
|
4680
|
+
/* @__PURE__ */ jsx10("p", { className: "text-sm text-muted-foreground", children: "Choose a pre-configured team setup, or go custom." })
|
|
4377
4681
|
] }),
|
|
4378
|
-
/* @__PURE__ */
|
|
4682
|
+
/* @__PURE__ */ jsxs5("div", { className: "grid gap-3 max-h-[60vh] overflow-y-auto pr-1", children: [
|
|
4379
4683
|
state.presets.map((preset) => {
|
|
4380
4684
|
const Icon2 = PRESET_ICONS[preset.name] || Settings;
|
|
4381
4685
|
const selected = state.presetName === preset.name;
|
|
4382
|
-
return /* @__PURE__ */
|
|
4686
|
+
return /* @__PURE__ */ jsxs5(
|
|
4383
4687
|
"button",
|
|
4384
4688
|
{
|
|
4385
4689
|
onClick: () => handleSelect(preset.name),
|
|
@@ -4388,38 +4692,38 @@ function StepPreset() {
|
|
|
4388
4692
|
selected ? "border-foreground/30 bg-accent" : "border-border hover:border-foreground/15 hover:bg-accent/50"
|
|
4389
4693
|
),
|
|
4390
4694
|
children: [
|
|
4391
|
-
/* @__PURE__ */
|
|
4695
|
+
/* @__PURE__ */ jsx10(
|
|
4392
4696
|
"div",
|
|
4393
4697
|
{
|
|
4394
4698
|
className: cn(
|
|
4395
4699
|
"mt-0.5 h-8 w-8 rounded-md flex items-center justify-center shrink-0",
|
|
4396
4700
|
selected ? "bg-foreground text-background" : "bg-secondary"
|
|
4397
4701
|
),
|
|
4398
|
-
children: selected ? /* @__PURE__ */
|
|
4702
|
+
children: selected ? /* @__PURE__ */ jsx10(Check, { className: "h-4 w-4" }) : /* @__PURE__ */ jsx10(Icon2, { className: "h-4 w-4" })
|
|
4399
4703
|
}
|
|
4400
4704
|
),
|
|
4401
|
-
/* @__PURE__ */
|
|
4402
|
-
/* @__PURE__ */
|
|
4403
|
-
/* @__PURE__ */
|
|
4404
|
-
preset.modules && /* @__PURE__ */
|
|
4705
|
+
/* @__PURE__ */ jsxs5("div", { className: "flex-1 min-w-0", children: [
|
|
4706
|
+
/* @__PURE__ */ jsxs5("div", { className: "flex items-center gap-2", children: [
|
|
4707
|
+
/* @__PURE__ */ jsx10("span", { className: "font-medium text-sm capitalize", children: preset.name }),
|
|
4708
|
+
preset.modules && /* @__PURE__ */ jsxs5(Badge, { variant: "secondary", className: "text-[10px]", children: [
|
|
4405
4709
|
preset.modules.length,
|
|
4406
4710
|
" modules"
|
|
4407
4711
|
] }),
|
|
4408
|
-
preset.roles && preset.roles.length > 0 && /* @__PURE__ */
|
|
4712
|
+
preset.roles && preset.roles.length > 0 && /* @__PURE__ */ jsxs5(Badge, { variant: "secondary", className: "text-[10px]", children: [
|
|
4409
4713
|
"+",
|
|
4410
4714
|
preset.roles.length,
|
|
4411
4715
|
" roles"
|
|
4412
4716
|
] })
|
|
4413
4717
|
] }),
|
|
4414
|
-
/* @__PURE__ */
|
|
4415
|
-
preset.constraints && preset.constraints.length > 0 && /* @__PURE__ */
|
|
4718
|
+
/* @__PURE__ */ jsx10("p", { className: "text-sm text-muted-foreground mt-0.5", children: preset.description }),
|
|
4719
|
+
preset.constraints && preset.constraints.length > 0 && /* @__PURE__ */ jsx10("p", { className: "text-xs text-muted-foreground/70 mt-1", children: preset.constraints.join(" \xB7 ") })
|
|
4416
4720
|
] })
|
|
4417
4721
|
]
|
|
4418
4722
|
},
|
|
4419
4723
|
preset.name
|
|
4420
4724
|
);
|
|
4421
4725
|
}),
|
|
4422
|
-
/* @__PURE__ */
|
|
4726
|
+
/* @__PURE__ */ jsxs5(
|
|
4423
4727
|
"button",
|
|
4424
4728
|
{
|
|
4425
4729
|
onClick: () => handleSelect("custom"),
|
|
@@ -4428,25 +4732,25 @@ function StepPreset() {
|
|
|
4428
4732
|
state.presetName === "custom" ? "border-foreground/30 bg-accent" : "border-border hover:border-foreground/15 hover:bg-accent/50"
|
|
4429
4733
|
),
|
|
4430
4734
|
children: [
|
|
4431
|
-
/* @__PURE__ */
|
|
4735
|
+
/* @__PURE__ */ jsx10(
|
|
4432
4736
|
"div",
|
|
4433
4737
|
{
|
|
4434
4738
|
className: cn(
|
|
4435
4739
|
"mt-0.5 h-8 w-8 rounded-md flex items-center justify-center shrink-0",
|
|
4436
4740
|
state.presetName === "custom" ? "bg-foreground text-background" : "bg-secondary"
|
|
4437
4741
|
),
|
|
4438
|
-
children: state.presetName === "custom" ? /* @__PURE__ */
|
|
4742
|
+
children: state.presetName === "custom" ? /* @__PURE__ */ jsx10(Check, { className: "h-4 w-4" }) : /* @__PURE__ */ jsx10(Settings, { className: "h-4 w-4" })
|
|
4439
4743
|
}
|
|
4440
4744
|
),
|
|
4441
|
-
/* @__PURE__ */
|
|
4442
|
-
/* @__PURE__ */
|
|
4443
|
-
/* @__PURE__ */
|
|
4745
|
+
/* @__PURE__ */ jsxs5("div", { children: [
|
|
4746
|
+
/* @__PURE__ */ jsx10("span", { className: "font-medium text-sm", children: "Custom" }),
|
|
4747
|
+
/* @__PURE__ */ jsx10("p", { className: "text-sm text-muted-foreground mt-0.5", children: "Pick modules and roles manually" })
|
|
4444
4748
|
] })
|
|
4445
4749
|
]
|
|
4446
4750
|
}
|
|
4447
4751
|
)
|
|
4448
4752
|
] }),
|
|
4449
|
-
/* @__PURE__ */
|
|
4753
|
+
/* @__PURE__ */ jsx10("div", { className: "flex justify-end", children: /* @__PURE__ */ jsx10(
|
|
4450
4754
|
Button,
|
|
4451
4755
|
{
|
|
4452
4756
|
onClick: () => dispatch({ type: "GO_TO", step: nextStep(state) }),
|
|
@@ -4458,7 +4762,7 @@ function StepPreset() {
|
|
|
4458
4762
|
}
|
|
4459
4763
|
|
|
4460
4764
|
// src/ui/components/steps/StepModules.tsx
|
|
4461
|
-
import { jsx as
|
|
4765
|
+
import { jsx as jsx11, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
4462
4766
|
function StepModules() {
|
|
4463
4767
|
const state = useWizard();
|
|
4464
4768
|
const dispatch = useWizardDispatch();
|
|
@@ -4502,16 +4806,16 @@ function StepModules() {
|
|
|
4502
4806
|
const isLocked = (name) => {
|
|
4503
4807
|
return selected.has(name) && getBlockingDependents(name).length > 0;
|
|
4504
4808
|
};
|
|
4505
|
-
return /* @__PURE__ */
|
|
4506
|
-
/* @__PURE__ */
|
|
4507
|
-
/* @__PURE__ */
|
|
4508
|
-
/* @__PURE__ */
|
|
4809
|
+
return /* @__PURE__ */ jsxs6("div", { className: "space-y-6", children: [
|
|
4810
|
+
/* @__PURE__ */ jsxs6("div", { className: "space-y-2", children: [
|
|
4811
|
+
/* @__PURE__ */ jsx11("h2", { className: "text-xl font-semibold tracking-tight", children: "Modules" }),
|
|
4812
|
+
/* @__PURE__ */ jsx11("p", { className: "text-sm text-muted-foreground", children: "Capabilities to enable. Dependencies are auto-selected." })
|
|
4509
4813
|
] }),
|
|
4510
|
-
/* @__PURE__ */
|
|
4814
|
+
/* @__PURE__ */ jsx11("div", { className: "grid gap-2 max-h-[60vh] overflow-y-auto pr-1", children: state.modules.map((mod) => {
|
|
4511
4815
|
const isSelected = selected.has(mod.name);
|
|
4512
4816
|
const locked = isLocked(mod.name);
|
|
4513
4817
|
const capCount = mod.capabilities?.length ?? 0;
|
|
4514
|
-
return /* @__PURE__ */
|
|
4818
|
+
return /* @__PURE__ */ jsxs6(
|
|
4515
4819
|
"button",
|
|
4516
4820
|
{
|
|
4517
4821
|
onClick: () => toggle(mod.name),
|
|
@@ -4522,43 +4826,43 @@ function StepModules() {
|
|
|
4522
4826
|
locked && isSelected && "opacity-80"
|
|
4523
4827
|
),
|
|
4524
4828
|
children: [
|
|
4525
|
-
/* @__PURE__ */
|
|
4829
|
+
/* @__PURE__ */ jsx11(
|
|
4526
4830
|
"div",
|
|
4527
4831
|
{
|
|
4528
4832
|
className: cn(
|
|
4529
4833
|
"h-5 w-5 rounded flex items-center justify-center shrink-0 border mt-0.5",
|
|
4530
4834
|
isSelected ? "bg-foreground border-foreground text-background" : "border-input"
|
|
4531
4835
|
),
|
|
4532
|
-
children: isSelected && (locked ? /* @__PURE__ */
|
|
4836
|
+
children: isSelected && (locked ? /* @__PURE__ */ jsx11(Lock, { className: "h-3 w-3" }) : /* @__PURE__ */ jsx11(Check, { className: "h-3 w-3" }))
|
|
4533
4837
|
}
|
|
4534
4838
|
),
|
|
4535
|
-
/* @__PURE__ */
|
|
4536
|
-
/* @__PURE__ */
|
|
4537
|
-
/* @__PURE__ */
|
|
4538
|
-
mod.activatesWithRoles && mod.activatesWithRoles.length > 0 && /* @__PURE__ */
|
|
4839
|
+
/* @__PURE__ */ jsxs6("div", { className: "flex-1 min-w-0", children: [
|
|
4840
|
+
/* @__PURE__ */ jsxs6("div", { className: "flex items-center gap-2 flex-wrap", children: [
|
|
4841
|
+
/* @__PURE__ */ jsx11("span", { className: "text-sm font-medium", children: mod.name }),
|
|
4842
|
+
mod.activatesWithRoles && mod.activatesWithRoles.length > 0 && /* @__PURE__ */ jsxs6(Badge, { variant: "outline", className: "text-[10px]", children: [
|
|
4539
4843
|
"needs ",
|
|
4540
4844
|
mod.activatesWithRoles.join("/")
|
|
4541
4845
|
] }),
|
|
4542
|
-
(mod.issues?.length ?? mod.tasks?.length ?? 0) > 0 && /* @__PURE__ */
|
|
4846
|
+
(mod.issues?.length ?? mod.tasks?.length ?? 0) > 0 && /* @__PURE__ */ jsxs6(Badge, { variant: "secondary", className: "text-[10px]", children: [
|
|
4543
4847
|
mod.issues?.length ?? mod.tasks?.length ?? 0,
|
|
4544
4848
|
" tasks"
|
|
4545
4849
|
] }),
|
|
4546
|
-
capCount > 0 && /* @__PURE__ */
|
|
4850
|
+
capCount > 0 && /* @__PURE__ */ jsxs6(Badge, { variant: "secondary", className: "text-[10px]", children: [
|
|
4547
4851
|
capCount,
|
|
4548
4852
|
" ",
|
|
4549
4853
|
capCount === 1 ? "capability" : "capabilities"
|
|
4550
4854
|
] })
|
|
4551
4855
|
] }),
|
|
4552
|
-
/* @__PURE__ */
|
|
4553
|
-
capCount > 0 && /* @__PURE__ */
|
|
4856
|
+
/* @__PURE__ */ jsx11("p", { className: "text-xs text-muted-foreground mt-0.5", children: mod.description }),
|
|
4857
|
+
capCount > 0 && /* @__PURE__ */ jsx11("div", { className: "flex flex-wrap gap-x-3 gap-y-0.5 mt-1", children: mod.capabilities.map((cap) => /* @__PURE__ */ jsxs6("span", { className: "text-[11px] text-muted-foreground/70", children: [
|
|
4554
4858
|
cap.skill,
|
|
4555
4859
|
" ",
|
|
4556
|
-
/* @__PURE__ */
|
|
4860
|
+
/* @__PURE__ */ jsxs6("span", { className: "text-muted-foreground/40", children: [
|
|
4557
4861
|
"\u2192 ",
|
|
4558
4862
|
cap.owners.join(", ")
|
|
4559
4863
|
] })
|
|
4560
4864
|
] }, cap.skill)) }),
|
|
4561
|
-
mod.requires && mod.requires.length > 0 && /* @__PURE__ */
|
|
4865
|
+
mod.requires && mod.requires.length > 0 && /* @__PURE__ */ jsxs6("p", { className: "text-[11px] text-muted-foreground/60 mt-0.5", children: [
|
|
4562
4866
|
"requires ",
|
|
4563
4867
|
mod.requires.join(", ")
|
|
4564
4868
|
] })
|
|
@@ -4568,20 +4872,20 @@ function StepModules() {
|
|
|
4568
4872
|
mod.name
|
|
4569
4873
|
);
|
|
4570
4874
|
}) }),
|
|
4571
|
-
/* @__PURE__ */
|
|
4572
|
-
/* @__PURE__ */
|
|
4875
|
+
/* @__PURE__ */ jsxs6("div", { className: "flex items-center justify-between", children: [
|
|
4876
|
+
/* @__PURE__ */ jsxs6("p", { className: "text-xs text-muted-foreground", children: [
|
|
4573
4877
|
selected.size,
|
|
4574
4878
|
" of ",
|
|
4575
4879
|
state.modules.length,
|
|
4576
4880
|
" selected"
|
|
4577
4881
|
] }),
|
|
4578
|
-
/* @__PURE__ */
|
|
4882
|
+
/* @__PURE__ */ jsx11(Button, { onClick: () => dispatch({ type: "GO_TO", step: nextStep(state) }), children: "Continue" })
|
|
4579
4883
|
] })
|
|
4580
4884
|
] });
|
|
4581
4885
|
}
|
|
4582
4886
|
|
|
4583
4887
|
// src/ui/components/steps/StepRoles.tsx
|
|
4584
|
-
import { jsx as
|
|
4888
|
+
import { jsx as jsx12, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
4585
4889
|
function StepRoles() {
|
|
4586
4890
|
const state = useWizard();
|
|
4587
4891
|
const dispatch = useWizardDispatch();
|
|
@@ -4597,39 +4901,39 @@ function StepRoles() {
|
|
|
4597
4901
|
}
|
|
4598
4902
|
dispatch({ type: "SET_ROLES", roles: [...next] });
|
|
4599
4903
|
};
|
|
4600
|
-
return /* @__PURE__ */
|
|
4601
|
-
/* @__PURE__ */
|
|
4602
|
-
/* @__PURE__ */
|
|
4603
|
-
/* @__PURE__ */
|
|
4904
|
+
return /* @__PURE__ */ jsxs7("div", { className: "space-y-6", children: [
|
|
4905
|
+
/* @__PURE__ */ jsxs7("div", { className: "space-y-2", children: [
|
|
4906
|
+
/* @__PURE__ */ jsx12("h2", { className: "text-xl font-semibold tracking-tight", children: "Team roles" }),
|
|
4907
|
+
/* @__PURE__ */ jsx12("p", { className: "text-sm text-muted-foreground", children: "Base roles are always included. Add specialists as needed." })
|
|
4604
4908
|
] }),
|
|
4605
|
-
/* @__PURE__ */
|
|
4606
|
-
/* @__PURE__ */
|
|
4607
|
-
/* @__PURE__ */
|
|
4608
|
-
/* @__PURE__ */
|
|
4909
|
+
/* @__PURE__ */ jsxs7("div", { className: "max-h-[60vh] overflow-y-auto pr-1 space-y-4", children: [
|
|
4910
|
+
/* @__PURE__ */ jsxs7("div", { className: "space-y-2", children: [
|
|
4911
|
+
/* @__PURE__ */ jsx12("p", { className: "text-xs font-medium text-muted-foreground uppercase tracking-wider", children: "Base team" }),
|
|
4912
|
+
/* @__PURE__ */ jsx12("div", { className: "grid gap-2", children: baseRoles.map((role) => /* @__PURE__ */ jsxs7(
|
|
4609
4913
|
"div",
|
|
4610
4914
|
{
|
|
4611
4915
|
className: "flex items-start gap-3 rounded-lg border border-foreground/10 bg-accent/50 p-3",
|
|
4612
4916
|
children: [
|
|
4613
|
-
/* @__PURE__ */
|
|
4614
|
-
/* @__PURE__ */
|
|
4615
|
-
/* @__PURE__ */
|
|
4616
|
-
/* @__PURE__ */
|
|
4617
|
-
role.division && /* @__PURE__ */
|
|
4618
|
-
/* @__PURE__ */
|
|
4917
|
+
/* @__PURE__ */ jsx12("div", { className: "h-5 w-5 rounded flex items-center justify-center shrink-0 bg-foreground text-background mt-0.5", children: /* @__PURE__ */ jsx12(Crown, { className: "h-3 w-3" }) }),
|
|
4918
|
+
/* @__PURE__ */ jsxs7("div", { className: "flex-1 min-w-0", children: [
|
|
4919
|
+
/* @__PURE__ */ jsxs7("div", { className: "flex items-center gap-2", children: [
|
|
4920
|
+
/* @__PURE__ */ jsx12("span", { className: "text-sm font-medium", children: role.title }),
|
|
4921
|
+
role.division && /* @__PURE__ */ jsx12(Badge, { variant: "outline", className: "text-[10px]", children: role.division }),
|
|
4922
|
+
/* @__PURE__ */ jsx12(Badge, { variant: "secondary", className: "ml-auto text-[10px]", children: "required" })
|
|
4619
4923
|
] }),
|
|
4620
|
-
/* @__PURE__ */
|
|
4621
|
-
role.tagline && /* @__PURE__ */
|
|
4924
|
+
/* @__PURE__ */ jsx12("p", { className: "text-xs text-muted-foreground mt-0.5", children: role.description }),
|
|
4925
|
+
role.tagline && /* @__PURE__ */ jsx12("p", { className: "text-[11px] text-muted-foreground/60 mt-0.5 italic", children: role.tagline })
|
|
4622
4926
|
] })
|
|
4623
4927
|
]
|
|
4624
4928
|
},
|
|
4625
4929
|
role.name
|
|
4626
4930
|
)) })
|
|
4627
4931
|
] }),
|
|
4628
|
-
/* @__PURE__ */
|
|
4629
|
-
/* @__PURE__ */
|
|
4630
|
-
/* @__PURE__ */
|
|
4932
|
+
/* @__PURE__ */ jsxs7("div", { className: "space-y-2", children: [
|
|
4933
|
+
/* @__PURE__ */ jsx12("p", { className: "text-xs font-medium text-muted-foreground uppercase tracking-wider", children: "Specialists" }),
|
|
4934
|
+
/* @__PURE__ */ jsx12("div", { className: "grid gap-2", children: extraRoles.map((role) => {
|
|
4631
4935
|
const isSelected = selected.has(role.name);
|
|
4632
|
-
return /* @__PURE__ */
|
|
4936
|
+
return /* @__PURE__ */ jsxs7(
|
|
4633
4937
|
"button",
|
|
4634
4938
|
{
|
|
4635
4939
|
onClick: () => toggle(role.name),
|
|
@@ -4638,28 +4942,28 @@ function StepRoles() {
|
|
|
4638
4942
|
isSelected ? "border-foreground/20 bg-accent" : "border-border hover:border-foreground/10 hover:bg-accent/30"
|
|
4639
4943
|
),
|
|
4640
4944
|
children: [
|
|
4641
|
-
/* @__PURE__ */
|
|
4945
|
+
/* @__PURE__ */ jsx12(
|
|
4642
4946
|
"div",
|
|
4643
4947
|
{
|
|
4644
4948
|
className: cn(
|
|
4645
4949
|
"h-5 w-5 rounded flex items-center justify-center shrink-0 border mt-0.5",
|
|
4646
4950
|
isSelected ? "bg-foreground border-foreground text-background" : "border-input"
|
|
4647
4951
|
),
|
|
4648
|
-
children: isSelected && /* @__PURE__ */
|
|
4952
|
+
children: isSelected && /* @__PURE__ */ jsx12(Check, { className: "h-3 w-3" })
|
|
4649
4953
|
}
|
|
4650
4954
|
),
|
|
4651
|
-
/* @__PURE__ */
|
|
4652
|
-
/* @__PURE__ */
|
|
4653
|
-
/* @__PURE__ */
|
|
4654
|
-
role.division && /* @__PURE__ */
|
|
4655
|
-
role.reportsTo && /* @__PURE__ */
|
|
4955
|
+
/* @__PURE__ */ jsxs7("div", { className: "flex-1 min-w-0", children: [
|
|
4956
|
+
/* @__PURE__ */ jsxs7("div", { className: "flex items-center gap-2 flex-wrap", children: [
|
|
4957
|
+
/* @__PURE__ */ jsx12("span", { className: "text-sm font-medium", children: role.title }),
|
|
4958
|
+
role.division && /* @__PURE__ */ jsx12(Badge, { variant: "outline", className: "text-[10px]", children: role.division }),
|
|
4959
|
+
role.reportsTo && /* @__PURE__ */ jsxs7("span", { className: "text-[10px] text-muted-foreground", children: [
|
|
4656
4960
|
"reports to ",
|
|
4657
4961
|
role.reportsTo
|
|
4658
4962
|
] })
|
|
4659
4963
|
] }),
|
|
4660
|
-
/* @__PURE__ */
|
|
4661
|
-
role.tagline && /* @__PURE__ */
|
|
4662
|
-
isSelected && role.enhances && role.enhances.length > 0 && /* @__PURE__ */
|
|
4964
|
+
/* @__PURE__ */ jsx12("p", { className: "text-xs text-muted-foreground mt-0.5", children: role.description }),
|
|
4965
|
+
role.tagline && /* @__PURE__ */ jsx12("p", { className: "text-[11px] text-muted-foreground/60 mt-0.5 italic", children: role.tagline }),
|
|
4966
|
+
isSelected && role.enhances && role.enhances.length > 0 && /* @__PURE__ */ jsx12("div", { className: "flex flex-wrap gap-x-3 gap-y-0.5 mt-1", children: role.enhances.map((e, i) => /* @__PURE__ */ jsxs7("span", { className: "text-[11px] text-muted-foreground/70", children: [
|
|
4663
4967
|
"+ ",
|
|
4664
4968
|
e
|
|
4665
4969
|
] }, i)) })
|
|
@@ -4671,50 +4975,50 @@ function StepRoles() {
|
|
|
4671
4975
|
}) })
|
|
4672
4976
|
] })
|
|
4673
4977
|
] }),
|
|
4674
|
-
/* @__PURE__ */
|
|
4675
|
-
/* @__PURE__ */
|
|
4978
|
+
/* @__PURE__ */ jsxs7("div", { className: "flex items-center justify-between", children: [
|
|
4979
|
+
/* @__PURE__ */ jsxs7("p", { className: "text-xs text-muted-foreground", children: [
|
|
4676
4980
|
baseRoles.length + selected.size,
|
|
4677
4981
|
" total agents"
|
|
4678
4982
|
] }),
|
|
4679
|
-
/* @__PURE__ */
|
|
4983
|
+
/* @__PURE__ */ jsx12(Button, { onClick: () => dispatch({ type: "GO_TO", step: nextStep(state) }), children: "Continue" })
|
|
4680
4984
|
] })
|
|
4681
4985
|
] });
|
|
4682
4986
|
}
|
|
4683
4987
|
|
|
4684
4988
|
// src/ui/components/steps/StepSummary.tsx
|
|
4685
|
-
import { useEffect as
|
|
4989
|
+
import { useEffect as useEffect3, useRef as useRef3, useState as useState7 } from "react";
|
|
4686
4990
|
import { usePluginAction as usePluginAction3 } from "@paperclipai/plugin-sdk/ui";
|
|
4687
4991
|
|
|
4688
4992
|
// src/ui/components/ConfigReview.tsx
|
|
4689
|
-
import { useState as
|
|
4993
|
+
import { useEffect as useEffect2, useState as useState6, useCallback as useCallback6, useRef as useRef2 } from "react";
|
|
4690
4994
|
import { usePluginAction as usePluginAction2 } from "@paperclipai/plugin-sdk/ui";
|
|
4691
4995
|
|
|
4692
4996
|
// src/ui/components/ui/hover-card.tsx
|
|
4693
4997
|
import {
|
|
4694
|
-
useState as
|
|
4998
|
+
useState as useState5,
|
|
4695
4999
|
useRef,
|
|
4696
5000
|
useEffect,
|
|
4697
|
-
useCallback as
|
|
5001
|
+
useCallback as useCallback5,
|
|
4698
5002
|
createContext as createContext2,
|
|
4699
5003
|
useContext as useContext2
|
|
4700
5004
|
} from "react";
|
|
4701
5005
|
import * as ReactDOM from "react-dom";
|
|
4702
|
-
import { Fragment, jsx as
|
|
5006
|
+
import { Fragment, jsx as jsx13 } from "react/jsx-runtime";
|
|
4703
5007
|
var HoverCardContext = createContext2({ open: false, triggerRef: { current: null } });
|
|
4704
5008
|
function HoverCardRoot({
|
|
4705
5009
|
children,
|
|
4706
5010
|
openDelay = 200,
|
|
4707
5011
|
closeDelay = 100
|
|
4708
5012
|
}) {
|
|
4709
|
-
const [open, setOpen] =
|
|
5013
|
+
const [open, setOpen] = useState5(false);
|
|
4710
5014
|
const openTimer = useRef(void 0);
|
|
4711
5015
|
const closeTimer = useRef(void 0);
|
|
4712
5016
|
const triggerRef = useRef(null);
|
|
4713
|
-
const handleEnter =
|
|
5017
|
+
const handleEnter = useCallback5(() => {
|
|
4714
5018
|
clearTimeout(closeTimer.current);
|
|
4715
5019
|
openTimer.current = setTimeout(() => setOpen(true), openDelay);
|
|
4716
5020
|
}, [openDelay]);
|
|
4717
|
-
const handleLeave =
|
|
5021
|
+
const handleLeave = useCallback5(() => {
|
|
4718
5022
|
clearTimeout(openTimer.current);
|
|
4719
5023
|
closeTimer.current = setTimeout(() => setOpen(false), closeDelay);
|
|
4720
5024
|
}, [closeDelay]);
|
|
@@ -4725,7 +5029,7 @@ function HoverCardRoot({
|
|
|
4725
5029
|
},
|
|
4726
5030
|
[]
|
|
4727
5031
|
);
|
|
4728
|
-
return /* @__PURE__ */
|
|
5032
|
+
return /* @__PURE__ */ jsx13(HoverCardContext.Provider, { value: { open, triggerRef }, children: /* @__PURE__ */ jsx13(
|
|
4729
5033
|
"div",
|
|
4730
5034
|
{
|
|
4731
5035
|
ref: triggerRef,
|
|
@@ -4737,7 +5041,7 @@ function HoverCardRoot({
|
|
|
4737
5041
|
) });
|
|
4738
5042
|
}
|
|
4739
5043
|
function HoverCardTrigger({ children }) {
|
|
4740
|
-
return /* @__PURE__ */
|
|
5044
|
+
return /* @__PURE__ */ jsx13(Fragment, { children });
|
|
4741
5045
|
}
|
|
4742
5046
|
function HoverCardContent({
|
|
4743
5047
|
children,
|
|
@@ -4747,7 +5051,7 @@ function HoverCardContent({
|
|
|
4747
5051
|
sideOffset = 6
|
|
4748
5052
|
}) {
|
|
4749
5053
|
const { open, triggerRef } = useContext2(HoverCardContext);
|
|
4750
|
-
const [pos, setPos] =
|
|
5054
|
+
const [pos, setPos] = useState5(null);
|
|
4751
5055
|
const contentRef = useRef(null);
|
|
4752
5056
|
useEffect(() => {
|
|
4753
5057
|
if (!open || !triggerRef.current) {
|
|
@@ -4775,7 +5079,7 @@ function HoverCardContent({
|
|
|
4775
5079
|
setPos({ top, left });
|
|
4776
5080
|
}, [open, side, align, sideOffset, triggerRef]);
|
|
4777
5081
|
if (!open) return null;
|
|
4778
|
-
return /* @__PURE__ */
|
|
5082
|
+
return /* @__PURE__ */ jsx13(
|
|
4779
5083
|
"div",
|
|
4780
5084
|
{
|
|
4781
5085
|
ref: contentRef,
|
|
@@ -4798,28 +5102,28 @@ function HoverCardPortal({ children }) {
|
|
|
4798
5102
|
}
|
|
4799
5103
|
|
|
4800
5104
|
// src/ui/components/ConfigReview.tsx
|
|
4801
|
-
import { Fragment as Fragment2, jsx as
|
|
5105
|
+
import { Fragment as Fragment2, jsx as jsx14, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
4802
5106
|
function SummaryRow({
|
|
4803
5107
|
icon: Icon2,
|
|
4804
5108
|
label,
|
|
4805
5109
|
onEdit,
|
|
4806
5110
|
children
|
|
4807
5111
|
}) {
|
|
4808
|
-
return /* @__PURE__ */
|
|
4809
|
-
/* @__PURE__ */
|
|
4810
|
-
/* @__PURE__ */
|
|
4811
|
-
/* @__PURE__ */
|
|
4812
|
-
/* @__PURE__ */
|
|
4813
|
-
onEdit && /* @__PURE__ */
|
|
5112
|
+
return /* @__PURE__ */ jsxs8("div", { className: "group flex items-start gap-3 py-3", children: [
|
|
5113
|
+
/* @__PURE__ */ jsx14(Icon2, { className: "h-4 w-4 mt-0.5 text-muted-foreground shrink-0" }),
|
|
5114
|
+
/* @__PURE__ */ jsxs8("div", { className: "flex-1 min-w-0", children: [
|
|
5115
|
+
/* @__PURE__ */ jsxs8("div", { className: "flex items-center gap-2 mb-1", children: [
|
|
5116
|
+
/* @__PURE__ */ jsx14("p", { className: "text-xs font-medium text-muted-foreground uppercase tracking-wider", children: label }),
|
|
5117
|
+
onEdit && /* @__PURE__ */ jsx14(
|
|
4814
5118
|
"button",
|
|
4815
5119
|
{
|
|
4816
5120
|
onClick: onEdit,
|
|
4817
5121
|
className: "opacity-0 group-hover:opacity-100 transition-opacity text-muted-foreground hover:text-foreground",
|
|
4818
|
-
children: /* @__PURE__ */
|
|
5122
|
+
children: /* @__PURE__ */ jsx14(Pencil, { className: "h-3 w-3" })
|
|
4819
5123
|
}
|
|
4820
5124
|
)
|
|
4821
5125
|
] }),
|
|
4822
|
-
/* @__PURE__ */
|
|
5126
|
+
/* @__PURE__ */ jsx14("div", { className: "text-sm", children })
|
|
4823
5127
|
] })
|
|
4824
5128
|
] });
|
|
4825
5129
|
}
|
|
@@ -4830,10 +5134,10 @@ function InlineEdit({
|
|
|
4830
5134
|
multiline,
|
|
4831
5135
|
placeholder
|
|
4832
5136
|
}) {
|
|
4833
|
-
const [draft, setDraft] =
|
|
5137
|
+
const [draft, setDraft] = useState6(value);
|
|
4834
5138
|
const InputTag = multiline ? "textarea" : "input";
|
|
4835
|
-
return /* @__PURE__ */
|
|
4836
|
-
/* @__PURE__ */
|
|
5139
|
+
return /* @__PURE__ */ jsxs8("div", { className: "flex gap-1.5 items-start", children: [
|
|
5140
|
+
/* @__PURE__ */ jsx14(
|
|
4837
5141
|
InputTag,
|
|
4838
5142
|
{
|
|
4839
5143
|
className: cn(
|
|
@@ -4853,24 +5157,140 @@ function InlineEdit({
|
|
|
4853
5157
|
}
|
|
4854
5158
|
}
|
|
4855
5159
|
),
|
|
4856
|
-
/* @__PURE__ */
|
|
5160
|
+
/* @__PURE__ */ jsx14(
|
|
4857
5161
|
"button",
|
|
4858
5162
|
{
|
|
4859
5163
|
onClick: () => onSave(draft),
|
|
4860
5164
|
className: "h-7 w-7 rounded flex items-center justify-center border hover:bg-accent shrink-0",
|
|
4861
|
-
children: /* @__PURE__ */
|
|
5165
|
+
children: /* @__PURE__ */ jsx14(Check, { className: "h-3.5 w-3.5" })
|
|
4862
5166
|
}
|
|
4863
5167
|
),
|
|
4864
|
-
/* @__PURE__ */
|
|
5168
|
+
/* @__PURE__ */ jsx14(
|
|
4865
5169
|
"button",
|
|
4866
5170
|
{
|
|
4867
5171
|
onClick: onCancel,
|
|
4868
5172
|
className: "h-7 w-7 rounded flex items-center justify-center border hover:bg-accent shrink-0",
|
|
4869
|
-
children: /* @__PURE__ */
|
|
5173
|
+
children: /* @__PURE__ */ jsx14(X, { className: "h-3.5 w-3.5" })
|
|
4870
5174
|
}
|
|
4871
5175
|
)
|
|
4872
5176
|
] });
|
|
4873
5177
|
}
|
|
5178
|
+
function RepositoryEdit({
|
|
5179
|
+
project,
|
|
5180
|
+
onSave,
|
|
5181
|
+
onCancel
|
|
5182
|
+
}) {
|
|
5183
|
+
const initialMode = getRepositoryMode(project);
|
|
5184
|
+
const [mode, setMode] = useState6(initialMode);
|
|
5185
|
+
const [repoUrl, setRepoUrl] = useState6(getRepositoryUrl(project));
|
|
5186
|
+
const [repoRef, setRepoRef] = useState6(getRepositoryRef(project, initialMode));
|
|
5187
|
+
const chooseMode = (next) => {
|
|
5188
|
+
setMode(next);
|
|
5189
|
+
if (next === "external" && (!repoRef.trim() || repoRef.trim() === "main")) {
|
|
5190
|
+
setRepoRef("origin/main");
|
|
5191
|
+
}
|
|
5192
|
+
if (next === "new" && (!repoRef.trim() || repoRef.trim().startsWith("origin/"))) {
|
|
5193
|
+
setRepoRef("main");
|
|
5194
|
+
}
|
|
5195
|
+
};
|
|
5196
|
+
const externalRepoMissing = mode === "external" && !repoUrl.trim();
|
|
5197
|
+
const save = () => {
|
|
5198
|
+
if (externalRepoMissing) return;
|
|
5199
|
+
onSave(repositoryProjectFields(mode, repoUrl, repoRef));
|
|
5200
|
+
};
|
|
5201
|
+
const modeButton = (value, Icon2, label) => /* @__PURE__ */ jsxs8(
|
|
5202
|
+
"button",
|
|
5203
|
+
{
|
|
5204
|
+
type: "button",
|
|
5205
|
+
onClick: () => chooseMode(value),
|
|
5206
|
+
className: cn(
|
|
5207
|
+
"flex items-center gap-1.5 rounded-md border px-2.5 py-1.5 text-xs transition-colors",
|
|
5208
|
+
mode === value ? "border-foreground/30 bg-accent text-foreground" : "border-border text-muted-foreground hover:bg-accent/50"
|
|
5209
|
+
),
|
|
5210
|
+
children: [
|
|
5211
|
+
/* @__PURE__ */ jsx14(Icon2, { className: "h-3.5 w-3.5" }),
|
|
5212
|
+
label
|
|
5213
|
+
]
|
|
5214
|
+
}
|
|
5215
|
+
);
|
|
5216
|
+
const inputClass = "flex w-full rounded-md border border-input bg-transparent px-2 py-1 text-sm shadow-sm focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring";
|
|
5217
|
+
return /* @__PURE__ */ jsxs8("div", { className: "space-y-2.5 py-1", children: [
|
|
5218
|
+
/* @__PURE__ */ jsxs8("div", { className: "flex gap-2", children: [
|
|
5219
|
+
modeButton("new", CirclePlus, "New repository"),
|
|
5220
|
+
modeButton("external", Github, "Existing repository")
|
|
5221
|
+
] }),
|
|
5222
|
+
mode === "external" ? /* @__PURE__ */ jsxs8("div", { className: "space-y-2", children: [
|
|
5223
|
+
/* @__PURE__ */ jsx14(
|
|
5224
|
+
"input",
|
|
5225
|
+
{
|
|
5226
|
+
className: inputClass,
|
|
5227
|
+
value: repoUrl,
|
|
5228
|
+
onChange: (e) => setRepoUrl(e.target.value),
|
|
5229
|
+
placeholder: "https://github.com/org/repo",
|
|
5230
|
+
autoFocus: true,
|
|
5231
|
+
onKeyDown: (e) => {
|
|
5232
|
+
if (e.key === "Enter") save();
|
|
5233
|
+
if (e.key === "Escape") onCancel();
|
|
5234
|
+
}
|
|
5235
|
+
}
|
|
5236
|
+
),
|
|
5237
|
+
/* @__PURE__ */ jsx14(
|
|
5238
|
+
"input",
|
|
5239
|
+
{
|
|
5240
|
+
className: inputClass,
|
|
5241
|
+
value: repoRef,
|
|
5242
|
+
onChange: (e) => setRepoRef(e.target.value),
|
|
5243
|
+
placeholder: "Default ref (e.g. origin/main)",
|
|
5244
|
+
onKeyDown: (e) => {
|
|
5245
|
+
if (e.key === "Enter") save();
|
|
5246
|
+
if (e.key === "Escape") onCancel();
|
|
5247
|
+
}
|
|
5248
|
+
}
|
|
5249
|
+
),
|
|
5250
|
+
/* @__PURE__ */ jsx14("p", { className: "text-xs text-muted-foreground", children: "Do not paste tokens or credentials. Configure provider access as company secrets." })
|
|
5251
|
+
] }) : /* @__PURE__ */ jsx14(
|
|
5252
|
+
"input",
|
|
5253
|
+
{
|
|
5254
|
+
className: inputClass,
|
|
5255
|
+
value: repoRef,
|
|
5256
|
+
onChange: (e) => setRepoRef(e.target.value),
|
|
5257
|
+
placeholder: "Initial branch (e.g. main)",
|
|
5258
|
+
autoFocus: true,
|
|
5259
|
+
onKeyDown: (e) => {
|
|
5260
|
+
if (e.key === "Enter") save();
|
|
5261
|
+
if (e.key === "Escape") onCancel();
|
|
5262
|
+
}
|
|
5263
|
+
}
|
|
5264
|
+
),
|
|
5265
|
+
/* @__PURE__ */ jsxs8("div", { className: "flex items-center gap-1.5", children: [
|
|
5266
|
+
/* @__PURE__ */ jsxs8(
|
|
5267
|
+
"button",
|
|
5268
|
+
{
|
|
5269
|
+
type: "button",
|
|
5270
|
+
onClick: save,
|
|
5271
|
+
disabled: externalRepoMissing,
|
|
5272
|
+
className: "flex items-center gap-1 text-xs px-2 py-1 rounded border hover:bg-accent disabled:opacity-50",
|
|
5273
|
+
children: [
|
|
5274
|
+
/* @__PURE__ */ jsx14(Check, { className: "h-3 w-3" }),
|
|
5275
|
+
" Save"
|
|
5276
|
+
]
|
|
5277
|
+
}
|
|
5278
|
+
),
|
|
5279
|
+
/* @__PURE__ */ jsxs8(
|
|
5280
|
+
"button",
|
|
5281
|
+
{
|
|
5282
|
+
type: "button",
|
|
5283
|
+
onClick: onCancel,
|
|
5284
|
+
className: "flex items-center gap-1 text-xs px-2 py-1 rounded border hover:bg-accent",
|
|
5285
|
+
children: [
|
|
5286
|
+
/* @__PURE__ */ jsx14(X, { className: "h-3 w-3" }),
|
|
5287
|
+
" Cancel"
|
|
5288
|
+
]
|
|
5289
|
+
}
|
|
5290
|
+
)
|
|
5291
|
+
] })
|
|
5292
|
+
] });
|
|
5293
|
+
}
|
|
4874
5294
|
function ModuleDetail({ mod, allRoleNames }) {
|
|
4875
5295
|
const moduleIssues = mod.issues ?? mod.tasks ?? [];
|
|
4876
5296
|
const hasCapabilities = mod.capabilities && mod.capabilities.length > 0;
|
|
@@ -4878,11 +5298,11 @@ function ModuleDetail({ mod, allRoleNames }) {
|
|
|
4878
5298
|
const hasRequires = mod.requires && mod.requires.length > 0;
|
|
4879
5299
|
const hasRoleGating = mod.activatesWithRoles && mod.activatesWithRoles.length > 0;
|
|
4880
5300
|
const isGated = hasRoleGating && !mod.activatesWithRoles.some((r2) => allRoleNames.has(r2));
|
|
4881
|
-
return /* @__PURE__ */
|
|
4882
|
-
/* @__PURE__ */
|
|
4883
|
-
/* @__PURE__ */
|
|
4884
|
-
/* @__PURE__ */
|
|
4885
|
-
isGated && /* @__PURE__ */
|
|
5301
|
+
return /* @__PURE__ */ jsxs8("div", { className: cn("rounded-lg border p-3 space-y-2.5", isGated && "opacity-50"), children: [
|
|
5302
|
+
/* @__PURE__ */ jsxs8("div", { children: [
|
|
5303
|
+
/* @__PURE__ */ jsxs8("div", { className: "flex items-center gap-2", children: [
|
|
5304
|
+
/* @__PURE__ */ jsx14("span", { className: "text-sm font-medium", children: mod.name }),
|
|
5305
|
+
isGated && /* @__PURE__ */ jsx14(
|
|
4886
5306
|
Badge,
|
|
4887
5307
|
{
|
|
4888
5308
|
variant: "outline",
|
|
@@ -4891,37 +5311,37 @@ function ModuleDetail({ mod, allRoleNames }) {
|
|
|
4891
5311
|
}
|
|
4892
5312
|
)
|
|
4893
5313
|
] }),
|
|
4894
|
-
mod.description && /* @__PURE__ */
|
|
5314
|
+
mod.description && /* @__PURE__ */ jsx14("p", { className: "text-xs text-muted-foreground mt-0.5", children: mod.description })
|
|
4895
5315
|
] }),
|
|
4896
|
-
hasRequires && /* @__PURE__ */
|
|
4897
|
-
/* @__PURE__ */
|
|
4898
|
-
/* @__PURE__ */
|
|
5316
|
+
hasRequires && /* @__PURE__ */ jsxs8("div", { className: "flex items-center gap-1.5 text-xs text-muted-foreground", children: [
|
|
5317
|
+
/* @__PURE__ */ jsx14(Layers, { className: "h-3 w-3 shrink-0" }),
|
|
5318
|
+
/* @__PURE__ */ jsxs8("span", { children: [
|
|
4899
5319
|
"Requires: ",
|
|
4900
5320
|
mod.requires.join(", ")
|
|
4901
5321
|
] })
|
|
4902
5322
|
] }),
|
|
4903
|
-
hasRoleGating && /* @__PURE__ */
|
|
4904
|
-
/* @__PURE__ */
|
|
4905
|
-
/* @__PURE__ */
|
|
5323
|
+
hasRoleGating && /* @__PURE__ */ jsxs8("div", { className: "flex items-center gap-1.5 text-xs text-muted-foreground", children: [
|
|
5324
|
+
/* @__PURE__ */ jsx14(Shield, { className: "h-3 w-3 shrink-0" }),
|
|
5325
|
+
/* @__PURE__ */ jsxs8("span", { children: [
|
|
4906
5326
|
"Activates with: ",
|
|
4907
5327
|
mod.activatesWithRoles.join(", ")
|
|
4908
5328
|
] })
|
|
4909
5329
|
] }),
|
|
4910
|
-
hasCapabilities && /* @__PURE__ */
|
|
4911
|
-
/* @__PURE__ */
|
|
4912
|
-
/* @__PURE__ */
|
|
5330
|
+
hasCapabilities && /* @__PURE__ */ jsxs8("div", { className: "space-y-1", children: [
|
|
5331
|
+
/* @__PURE__ */ jsxs8("p", { className: "text-[10px] font-medium text-muted-foreground uppercase tracking-wider flex items-center gap-1", children: [
|
|
5332
|
+
/* @__PURE__ */ jsx14(Workflow, { className: "h-3 w-3" }),
|
|
4913
5333
|
" Capabilities"
|
|
4914
5334
|
] }),
|
|
4915
|
-
/* @__PURE__ */
|
|
5335
|
+
/* @__PURE__ */ jsx14("div", { className: "space-y-1", children: mod.capabilities.map((cap) => /* @__PURE__ */ jsxs8(
|
|
4916
5336
|
"div",
|
|
4917
5337
|
{
|
|
4918
5338
|
className: "flex items-start gap-2 rounded bg-accent/50 px-2 py-1.5",
|
|
4919
5339
|
children: [
|
|
4920
|
-
/* @__PURE__ */
|
|
4921
|
-
/* @__PURE__ */
|
|
4922
|
-
/* @__PURE__ */
|
|
4923
|
-
/* @__PURE__ */
|
|
4924
|
-
cap.fallbackSkill && /* @__PURE__ */
|
|
5340
|
+
/* @__PURE__ */ jsx14(Wrench, { className: "h-3 w-3 mt-0.5 text-muted-foreground shrink-0" }),
|
|
5341
|
+
/* @__PURE__ */ jsxs8("div", { className: "text-xs", children: [
|
|
5342
|
+
/* @__PURE__ */ jsx14("span", { className: "font-medium", children: cap.skill }),
|
|
5343
|
+
/* @__PURE__ */ jsx14("span", { className: "text-muted-foreground ml-1.5", children: cap.owners.join(" \u2192 ") }),
|
|
5344
|
+
cap.fallbackSkill && /* @__PURE__ */ jsxs8("span", { className: "text-muted-foreground ml-1", children: [
|
|
4925
5345
|
"(fallback: ",
|
|
4926
5346
|
cap.fallbackSkill,
|
|
4927
5347
|
")"
|
|
@@ -4932,24 +5352,24 @@ function ModuleDetail({ mod, allRoleNames }) {
|
|
|
4932
5352
|
cap.skill
|
|
4933
5353
|
)) })
|
|
4934
5354
|
] }),
|
|
4935
|
-
hasTasks && /* @__PURE__ */
|
|
4936
|
-
/* @__PURE__ */
|
|
4937
|
-
/* @__PURE__ */
|
|
5355
|
+
hasTasks && /* @__PURE__ */ jsxs8("div", { className: "space-y-1", children: [
|
|
5356
|
+
/* @__PURE__ */ jsxs8("p", { className: "text-[10px] font-medium text-muted-foreground uppercase tracking-wider flex items-center gap-1", children: [
|
|
5357
|
+
/* @__PURE__ */ jsx14(ListChecks, { className: "h-3 w-3" }),
|
|
4938
5358
|
" Initial tasks"
|
|
4939
5359
|
] }),
|
|
4940
|
-
/* @__PURE__ */
|
|
5360
|
+
/* @__PURE__ */ jsx14("div", { className: "space-y-1", children: moduleIssues.map((task) => /* @__PURE__ */ jsxs8(
|
|
4941
5361
|
"div",
|
|
4942
5362
|
{
|
|
4943
5363
|
className: "flex items-start gap-2 rounded bg-accent/50 px-2 py-1.5",
|
|
4944
5364
|
children: [
|
|
4945
|
-
/* @__PURE__ */
|
|
4946
|
-
/* @__PURE__ */
|
|
4947
|
-
/* @__PURE__ */
|
|
4948
|
-
/* @__PURE__ */
|
|
5365
|
+
/* @__PURE__ */ jsx14(ChevronRight, { className: "h-3 w-3 mt-0.5 text-muted-foreground shrink-0" }),
|
|
5366
|
+
/* @__PURE__ */ jsxs8("div", { className: "text-xs", children: [
|
|
5367
|
+
/* @__PURE__ */ jsx14("span", { className: "font-medium", children: task.title }),
|
|
5368
|
+
/* @__PURE__ */ jsxs8("span", { className: "text-muted-foreground ml-1.5", children: [
|
|
4949
5369
|
"\u2192 ",
|
|
4950
5370
|
task.assignTo
|
|
4951
5371
|
] }),
|
|
4952
|
-
task.description && /* @__PURE__ */
|
|
5372
|
+
task.description && /* @__PURE__ */ jsx14("p", { className: "text-muted-foreground mt-0.5", children: task.description })
|
|
4953
5373
|
] })
|
|
4954
5374
|
]
|
|
4955
5375
|
},
|
|
@@ -4960,35 +5380,35 @@ function ModuleDetail({ mod, allRoleNames }) {
|
|
|
4960
5380
|
}
|
|
4961
5381
|
function RoleDetail({ role }) {
|
|
4962
5382
|
const adapter = role.adapter;
|
|
4963
|
-
return /* @__PURE__ */
|
|
4964
|
-
/* @__PURE__ */
|
|
4965
|
-
/* @__PURE__ */
|
|
4966
|
-
role._base && /* @__PURE__ */
|
|
4967
|
-
/* @__PURE__ */
|
|
4968
|
-
/* @__PURE__ */
|
|
5383
|
+
return /* @__PURE__ */ jsxs8("div", { className: "rounded-lg border p-3 space-y-2", children: [
|
|
5384
|
+
/* @__PURE__ */ jsxs8("div", { children: [
|
|
5385
|
+
/* @__PURE__ */ jsxs8("div", { className: "flex items-center gap-2", children: [
|
|
5386
|
+
role._base && /* @__PURE__ */ jsx14(Crown, { className: "h-3.5 w-3.5 text-muted-foreground" }),
|
|
5387
|
+
/* @__PURE__ */ jsx14("span", { className: "text-sm font-medium", children: role.title }),
|
|
5388
|
+
/* @__PURE__ */ jsx14("span", { className: "text-xs text-muted-foreground", children: role.name })
|
|
4969
5389
|
] }),
|
|
4970
|
-
/* @__PURE__ */
|
|
5390
|
+
/* @__PURE__ */ jsx14("p", { className: "text-xs text-muted-foreground mt-0.5", children: role.description })
|
|
4971
5391
|
] }),
|
|
4972
|
-
/* @__PURE__ */
|
|
4973
|
-
role.paperclipRole && /* @__PURE__ */
|
|
4974
|
-
/* @__PURE__ */
|
|
5392
|
+
/* @__PURE__ */ jsxs8("div", { className: "flex flex-wrap gap-x-4 gap-y-1 text-xs text-muted-foreground", children: [
|
|
5393
|
+
role.paperclipRole && /* @__PURE__ */ jsxs8("span", { className: "flex items-center gap-1", children: [
|
|
5394
|
+
/* @__PURE__ */ jsx14(Cpu, { className: "h-3 w-3" }),
|
|
4975
5395
|
role.paperclipRole
|
|
4976
5396
|
] }),
|
|
4977
|
-
role.reportsTo && /* @__PURE__ */
|
|
4978
|
-
/* @__PURE__ */
|
|
5397
|
+
role.reportsTo && /* @__PURE__ */ jsxs8("span", { className: "flex items-center gap-1", children: [
|
|
5398
|
+
/* @__PURE__ */ jsx14(ArrowUpRight, { className: "h-3 w-3" }),
|
|
4979
5399
|
"reports to ",
|
|
4980
5400
|
role.reportsTo
|
|
4981
5401
|
] }),
|
|
4982
|
-
adapter?.model && /* @__PURE__ */
|
|
4983
|
-
/* @__PURE__ */
|
|
5402
|
+
adapter?.model && /* @__PURE__ */ jsxs8("span", { className: "flex items-center gap-1", children: [
|
|
5403
|
+
/* @__PURE__ */ jsx14(Wrench, { className: "h-3 w-3" }),
|
|
4984
5404
|
adapter.model,
|
|
4985
5405
|
adapter.effort && ` (${adapter.effort})`
|
|
4986
5406
|
] })
|
|
4987
5407
|
] }),
|
|
4988
|
-
role.enhances && role.enhances.length > 0 && /* @__PURE__ */
|
|
4989
|
-
/* @__PURE__ */
|
|
4990
|
-
/* @__PURE__ */
|
|
4991
|
-
/* @__PURE__ */
|
|
5408
|
+
role.enhances && role.enhances.length > 0 && /* @__PURE__ */ jsxs8("div", { className: "space-y-1", children: [
|
|
5409
|
+
/* @__PURE__ */ jsx14("p", { className: "text-[10px] font-medium text-muted-foreground uppercase tracking-wider", children: "Enhances" }),
|
|
5410
|
+
/* @__PURE__ */ jsx14("ul", { className: "space-y-0.5", children: role.enhances.map((e, i) => /* @__PURE__ */ jsxs8("li", { className: "text-xs text-muted-foreground flex items-start gap-1.5", children: [
|
|
5411
|
+
/* @__PURE__ */ jsx14("span", { className: "text-foreground/30 mt-px", children: "\xB7" }),
|
|
4992
5412
|
e
|
|
4993
5413
|
] }, i)) })
|
|
4994
5414
|
] })
|
|
@@ -5021,9 +5441,9 @@ function FileEntry({
|
|
|
5021
5441
|
onSaveOverride,
|
|
5022
5442
|
onResetOverride
|
|
5023
5443
|
}) {
|
|
5024
|
-
const [expanded, setExpanded] =
|
|
5025
|
-
const [editing, setEditing] =
|
|
5026
|
-
const [draft, setDraft] =
|
|
5444
|
+
const [expanded, setExpanded] = useState6(false);
|
|
5445
|
+
const [editing, setEditing] = useState6(false);
|
|
5446
|
+
const [draft, setDraft] = useState6(override ?? content);
|
|
5027
5447
|
const parts = filePath.split("/");
|
|
5028
5448
|
const fileName = parts.length >= 3 && parts[0] === "agents" ? parts.slice(2).join("/") : parts.pop();
|
|
5029
5449
|
const hasOverride = override !== void 0;
|
|
@@ -5046,12 +5466,12 @@ function FileEntry({
|
|
|
5046
5466
|
setEditing(false);
|
|
5047
5467
|
};
|
|
5048
5468
|
const displayContent = override ?? content;
|
|
5049
|
-
return /* @__PURE__ */
|
|
5469
|
+
return /* @__PURE__ */ jsxs8(
|
|
5050
5470
|
"div",
|
|
5051
5471
|
{
|
|
5052
5472
|
className: cn("rounded border", hasOverride && "border-blue-400/60 dark:border-blue-500/50"),
|
|
5053
5473
|
children: [
|
|
5054
|
-
/* @__PURE__ */
|
|
5474
|
+
/* @__PURE__ */ jsxs8(
|
|
5055
5475
|
"button",
|
|
5056
5476
|
{
|
|
5057
5477
|
className: "w-full flex items-center gap-2 px-3 py-2 text-left hover:bg-accent/50 transition-colors",
|
|
@@ -5059,12 +5479,12 @@ function FileEntry({
|
|
|
5059
5479
|
if (!editing) setExpanded((v) => !v);
|
|
5060
5480
|
},
|
|
5061
5481
|
children: [
|
|
5062
|
-
/* @__PURE__ */
|
|
5063
|
-
/* @__PURE__ */
|
|
5482
|
+
/* @__PURE__ */ jsx14(FileText, { className: "h-3.5 w-3.5 text-muted-foreground shrink-0" }),
|
|
5483
|
+
/* @__PURE__ */ jsxs8("span", { className: "text-xs font-medium flex-1 min-w-0 truncate", children: [
|
|
5064
5484
|
fileName,
|
|
5065
|
-
hasOverride && /* @__PURE__ */
|
|
5485
|
+
hasOverride && /* @__PURE__ */ jsx14("span", { className: "ml-1.5 text-[10px] text-blue-600 dark:text-blue-400 font-normal", children: "edited" })
|
|
5066
5486
|
] }),
|
|
5067
|
-
!editing && /* @__PURE__ */
|
|
5487
|
+
!editing && /* @__PURE__ */ jsx14(
|
|
5068
5488
|
"span",
|
|
5069
5489
|
{
|
|
5070
5490
|
role: "button",
|
|
@@ -5080,15 +5500,15 @@ function FileEntry({
|
|
|
5080
5500
|
}
|
|
5081
5501
|
},
|
|
5082
5502
|
className: "opacity-0 group-hover:opacity-100 transition-opacity text-muted-foreground hover:text-foreground p-0.5 rounded",
|
|
5083
|
-
children: /* @__PURE__ */
|
|
5503
|
+
children: /* @__PURE__ */ jsx14(Pencil, { className: "h-3 w-3" })
|
|
5084
5504
|
}
|
|
5085
5505
|
),
|
|
5086
|
-
!editing && (expanded ? /* @__PURE__ */
|
|
5506
|
+
!editing && (expanded ? /* @__PURE__ */ jsx14(ChevronDown, { className: "h-3.5 w-3.5 text-muted-foreground shrink-0" }) : /* @__PURE__ */ jsx14(ChevronRight, { className: "h-3.5 w-3.5 text-muted-foreground shrink-0" }))
|
|
5087
5507
|
]
|
|
5088
5508
|
}
|
|
5089
5509
|
),
|
|
5090
|
-
(expanded || editing) && /* @__PURE__ */
|
|
5091
|
-
/* @__PURE__ */
|
|
5510
|
+
(expanded || editing) && /* @__PURE__ */ jsx14("div", { className: "border-t", children: editing ? /* @__PURE__ */ jsxs8("div", { className: "p-2 space-y-1.5", children: [
|
|
5511
|
+
/* @__PURE__ */ jsx14(
|
|
5092
5512
|
"textarea",
|
|
5093
5513
|
{
|
|
5094
5514
|
className: "w-full font-mono text-xs rounded border border-input bg-transparent px-2 py-1.5 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring resize-y",
|
|
@@ -5098,50 +5518,50 @@ function FileEntry({
|
|
|
5098
5518
|
autoFocus: true
|
|
5099
5519
|
}
|
|
5100
5520
|
),
|
|
5101
|
-
/* @__PURE__ */
|
|
5102
|
-
/* @__PURE__ */
|
|
5521
|
+
/* @__PURE__ */ jsxs8("div", { className: "flex items-center gap-1.5", children: [
|
|
5522
|
+
/* @__PURE__ */ jsxs8(
|
|
5103
5523
|
"button",
|
|
5104
5524
|
{
|
|
5105
5525
|
onClick: handleSave,
|
|
5106
5526
|
className: "flex items-center gap-1 text-xs px-2 py-1 rounded border hover:bg-accent",
|
|
5107
5527
|
children: [
|
|
5108
|
-
/* @__PURE__ */
|
|
5528
|
+
/* @__PURE__ */ jsx14(Check, { className: "h-3 w-3" }),
|
|
5109
5529
|
" Save"
|
|
5110
5530
|
]
|
|
5111
5531
|
}
|
|
5112
5532
|
),
|
|
5113
|
-
/* @__PURE__ */
|
|
5533
|
+
/* @__PURE__ */ jsxs8(
|
|
5114
5534
|
"button",
|
|
5115
5535
|
{
|
|
5116
5536
|
onClick: handleCancel,
|
|
5117
5537
|
className: "flex items-center gap-1 text-xs px-2 py-1 rounded border hover:bg-accent",
|
|
5118
5538
|
children: [
|
|
5119
|
-
/* @__PURE__ */
|
|
5539
|
+
/* @__PURE__ */ jsx14(X, { className: "h-3 w-3" }),
|
|
5120
5540
|
" Cancel"
|
|
5121
5541
|
]
|
|
5122
5542
|
}
|
|
5123
5543
|
),
|
|
5124
|
-
hasOverride && /* @__PURE__ */
|
|
5544
|
+
hasOverride && /* @__PURE__ */ jsxs8(
|
|
5125
5545
|
"button",
|
|
5126
5546
|
{
|
|
5127
5547
|
onClick: handleReset,
|
|
5128
5548
|
className: "flex items-center gap-1 text-xs px-2 py-1 rounded border hover:bg-accent text-muted-foreground ml-auto",
|
|
5129
5549
|
children: [
|
|
5130
|
-
/* @__PURE__ */
|
|
5550
|
+
/* @__PURE__ */ jsx14(RotateCcw, { className: "h-3 w-3" }),
|
|
5131
5551
|
" Reset to default"
|
|
5132
5552
|
]
|
|
5133
5553
|
}
|
|
5134
5554
|
)
|
|
5135
5555
|
] })
|
|
5136
|
-
] }) : /* @__PURE__ */
|
|
5137
|
-
/* @__PURE__ */
|
|
5138
|
-
/* @__PURE__ */
|
|
5556
|
+
] }) : /* @__PURE__ */ jsxs8("div", { className: "group relative", children: [
|
|
5557
|
+
/* @__PURE__ */ jsx14("pre", { className: "p-3 font-mono text-xs overflow-x-auto whitespace-pre-wrap wrap-break-word text-muted-foreground max-h-[400px] overflow-y-auto", children: displayContent }),
|
|
5558
|
+
/* @__PURE__ */ jsxs8(
|
|
5139
5559
|
"button",
|
|
5140
5560
|
{
|
|
5141
5561
|
onClick: handleEdit,
|
|
5142
5562
|
className: "absolute top-2 right-2 opacity-0 group-hover:opacity-100 transition-opacity flex items-center gap-1 text-xs px-1.5 py-0.5 rounded border bg-background hover:bg-accent",
|
|
5143
5563
|
children: [
|
|
5144
|
-
/* @__PURE__ */
|
|
5564
|
+
/* @__PURE__ */ jsx14(Pencil, { className: "h-3 w-3" }),
|
|
5145
5565
|
" Edit"
|
|
5146
5566
|
]
|
|
5147
5567
|
}
|
|
@@ -5154,14 +5574,15 @@ function FileEntry({
|
|
|
5154
5574
|
function ConfigReview() {
|
|
5155
5575
|
const state = useWizard();
|
|
5156
5576
|
const dispatch = useWizardDispatch();
|
|
5157
|
-
const [editing, setEditing] =
|
|
5158
|
-
const [showDetails, setShowDetails] =
|
|
5159
|
-
const [showFiles, setShowFiles] =
|
|
5160
|
-
const [loadingFiles, setLoadingFiles] =
|
|
5161
|
-
const [previewFiles, setPreviewFiles] =
|
|
5162
|
-
const [previewError, setPreviewError] =
|
|
5577
|
+
const [editing, setEditing] = useState6(null);
|
|
5578
|
+
const [showDetails, setShowDetails] = useState6(false);
|
|
5579
|
+
const [showFiles, setShowFiles] = useState6(false);
|
|
5580
|
+
const [loadingFiles, setLoadingFiles] = useState6(false);
|
|
5581
|
+
const [previewFiles, setPreviewFiles] = useState6(null);
|
|
5582
|
+
const [previewError, setPreviewError] = useState6(null);
|
|
5583
|
+
const lastPreviewRepoFingerprint = useRef2("");
|
|
5163
5584
|
const previewFilesAction = usePluginAction2("preview-files");
|
|
5164
|
-
const loadPreview =
|
|
5585
|
+
const loadPreview = useCallback6(async () => {
|
|
5165
5586
|
setLoadingFiles(true);
|
|
5166
5587
|
setPreviewError(null);
|
|
5167
5588
|
try {
|
|
@@ -5171,7 +5592,8 @@ function ConfigReview() {
|
|
|
5171
5592
|
selectedModules: state.selectedModules,
|
|
5172
5593
|
selectedRoles: state.selectedRoles,
|
|
5173
5594
|
goals: state.goals.length > 0 ? state.goals : void 0,
|
|
5174
|
-
projects: state.projects.length > 0 ? state.projects : void 0
|
|
5595
|
+
projects: state.projects.length > 0 ? state.projects : void 0,
|
|
5596
|
+
issues: state.issues.length > 0 ? state.issues : void 0
|
|
5175
5597
|
});
|
|
5176
5598
|
if (result.error) {
|
|
5177
5599
|
setPreviewError(result.error);
|
|
@@ -5190,6 +5612,7 @@ function ConfigReview() {
|
|
|
5190
5612
|
state.selectedRoles,
|
|
5191
5613
|
state.goals,
|
|
5192
5614
|
state.projects,
|
|
5615
|
+
state.issues,
|
|
5193
5616
|
previewFilesAction
|
|
5194
5617
|
]);
|
|
5195
5618
|
const allRoles = getAllRoles(state);
|
|
@@ -5207,6 +5630,12 @@ function ConfigReview() {
|
|
|
5207
5630
|
const baseRoleNames = state.roles.filter((r2) => r2._base).map((r2) => r2.name);
|
|
5208
5631
|
const activeRoleData = state.roles.filter((r2) => r2._base || selectedRoleSet.has(r2.name));
|
|
5209
5632
|
const selectedModuleData = state.modules.filter((m) => selectedModSet.has(m.name));
|
|
5633
|
+
const primaryProject = state.projects[0];
|
|
5634
|
+
const primaryWorkspace = primaryProject?.workspace;
|
|
5635
|
+
const primaryRepoUrl = primaryWorkspace?.repoUrl || primaryProject?.repoUrl || "";
|
|
5636
|
+
const primaryRepoRef = primaryWorkspace?.defaultRef || primaryWorkspace?.repoRef || primaryProject?.defaultRef || primaryProject?.repoRef || "";
|
|
5637
|
+
const isExternalRepo = isExternalRepository(primaryProject);
|
|
5638
|
+
const repositoryFingerprint = `${isExternalRepo ? "external" : "new"}|${primaryWorkspace?.sourceType || primaryProject?.workspaceSourceType || ""}|${primaryRepoUrl}|${primaryRepoRef}|${primaryWorkspace?.defaultRef || ""}|${primaryWorkspace?.setupCommand || ""}`;
|
|
5210
5639
|
const totalCapabilities = selectedModuleData.reduce(
|
|
5211
5640
|
(sum, m) => sum + (m.capabilities?.length ?? 0),
|
|
5212
5641
|
0
|
|
@@ -5233,9 +5662,31 @@ function ConfigReview() {
|
|
|
5233
5662
|
else next.add(name);
|
|
5234
5663
|
dispatch({ type: "SET_ROLES", roles: [...next] });
|
|
5235
5664
|
};
|
|
5236
|
-
|
|
5237
|
-
|
|
5238
|
-
|
|
5665
|
+
const refreshPreview = useCallback6(() => {
|
|
5666
|
+
if (!showFiles || loadingFiles) return;
|
|
5667
|
+
if (!previewFiles || lastPreviewRepoFingerprint.current !== repositoryFingerprint) {
|
|
5668
|
+
lastPreviewRepoFingerprint.current = repositoryFingerprint;
|
|
5669
|
+
loadPreview();
|
|
5670
|
+
}
|
|
5671
|
+
}, [loadingFiles, previewFiles, repositoryFingerprint, showFiles, loadPreview]);
|
|
5672
|
+
useEffect2(() => {
|
|
5673
|
+
refreshPreview();
|
|
5674
|
+
}, [refreshPreview]);
|
|
5675
|
+
const saveRepository = (repo) => {
|
|
5676
|
+
const base = primaryProject ?? {
|
|
5677
|
+
name: state.companyName || "Main Project",
|
|
5678
|
+
description: state.goals[0]?.description || "",
|
|
5679
|
+
goals: state.goals.map((g) => g.title).filter(Boolean)
|
|
5680
|
+
};
|
|
5681
|
+
dispatch({
|
|
5682
|
+
type: "SET_PROJECTS",
|
|
5683
|
+
projects: [{ ...base, ...repo }, ...state.projects.slice(1)]
|
|
5684
|
+
});
|
|
5685
|
+
setEditing(null);
|
|
5686
|
+
};
|
|
5687
|
+
return /* @__PURE__ */ jsxs8(Fragment2, { children: [
|
|
5688
|
+
/* @__PURE__ */ jsx14(Card, { children: /* @__PURE__ */ jsxs8(CardContent, { className: "divide-y p-0", children: [
|
|
5689
|
+
/* @__PURE__ */ jsx14("div", { className: "px-4", children: /* @__PURE__ */ jsx14(SummaryRow, { icon: Building2, label: "Company", onEdit: () => setEditing("name"), children: editing === "name" ? /* @__PURE__ */ jsx14(
|
|
5239
5690
|
InlineEdit,
|
|
5240
5691
|
{
|
|
5241
5692
|
value: state.companyName,
|
|
@@ -5246,21 +5697,21 @@ function ConfigReview() {
|
|
|
5246
5697
|
onCancel: () => setEditing(null),
|
|
5247
5698
|
placeholder: "Company name"
|
|
5248
5699
|
}
|
|
5249
|
-
) : /* @__PURE__ */
|
|
5250
|
-
/* @__PURE__ */
|
|
5251
|
-
/* @__PURE__ */
|
|
5700
|
+
) : /* @__PURE__ */ jsxs8(Fragment2, { children: [
|
|
5701
|
+
/* @__PURE__ */ jsx14("span", { className: "font-medium", children: state.companyName || "(unnamed)" }),
|
|
5702
|
+
/* @__PURE__ */ jsxs8("span", { className: "text-muted-foreground ml-2", children: [
|
|
5252
5703
|
"\u2192 ",
|
|
5253
5704
|
toPascalCase2(state.companyName || "Company"),
|
|
5254
5705
|
"/"
|
|
5255
5706
|
] })
|
|
5256
5707
|
] }) }) }),
|
|
5257
|
-
/* @__PURE__ */
|
|
5708
|
+
/* @__PURE__ */ jsx14("div", { className: "px-4", children: /* @__PURE__ */ jsx14(
|
|
5258
5709
|
SummaryRow,
|
|
5259
5710
|
{
|
|
5260
5711
|
icon: ArrowUpRight,
|
|
5261
5712
|
label: "Target",
|
|
5262
5713
|
onEdit: () => setEditing("existingCompanyId"),
|
|
5263
|
-
children: editing === "existingCompanyId" ? /* @__PURE__ */
|
|
5714
|
+
children: editing === "existingCompanyId" ? /* @__PURE__ */ jsx14(
|
|
5264
5715
|
InlineEdit,
|
|
5265
5716
|
{
|
|
5266
5717
|
value: state.existingCompanyId,
|
|
@@ -5271,13 +5722,47 @@ function ConfigReview() {
|
|
|
5271
5722
|
onCancel: () => setEditing(null),
|
|
5272
5723
|
placeholder: "Leave empty to create a new company, or paste existing company ID"
|
|
5273
5724
|
}
|
|
5274
|
-
) : state.existingCompanyId ? /* @__PURE__ */
|
|
5275
|
-
/* @__PURE__ */
|
|
5276
|
-
/* @__PURE__ */
|
|
5277
|
-
] }) : /* @__PURE__ */
|
|
5725
|
+
) : state.existingCompanyId ? /* @__PURE__ */ jsxs8(Fragment2, { children: [
|
|
5726
|
+
/* @__PURE__ */ jsx14("span", { className: "font-medium", children: "Existing company" }),
|
|
5727
|
+
/* @__PURE__ */ jsx14("span", { className: "text-muted-foreground ml-2 font-mono text-xs", children: state.existingCompanyId })
|
|
5728
|
+
] }) : /* @__PURE__ */ jsx14("span", { className: "text-muted-foreground", children: "Create a new company" })
|
|
5278
5729
|
}
|
|
5279
5730
|
) }),
|
|
5280
|
-
/* @__PURE__ */
|
|
5731
|
+
/* @__PURE__ */ jsx14("div", { className: "px-4", children: /* @__PURE__ */ jsx14(SummaryRow, { icon: GitBranch, label: "Repository", onEdit: () => setEditing("repository"), children: editing === "repository" ? /* @__PURE__ */ jsx14(
|
|
5732
|
+
RepositoryEdit,
|
|
5733
|
+
{
|
|
5734
|
+
project: primaryProject ?? null,
|
|
5735
|
+
onSave: (repo) => {
|
|
5736
|
+
saveRepository(repo);
|
|
5737
|
+
},
|
|
5738
|
+
onCancel: () => setEditing(null)
|
|
5739
|
+
}
|
|
5740
|
+
) : /* @__PURE__ */ jsx14(
|
|
5741
|
+
"button",
|
|
5742
|
+
{
|
|
5743
|
+
type: "button",
|
|
5744
|
+
onClick: () => setEditing("repository"),
|
|
5745
|
+
className: "group/repo w-full text-left rounded-md -mx-1 px-1 py-0.5 hover:bg-accent/50 transition-colors",
|
|
5746
|
+
children: isExternalRepo ? /* @__PURE__ */ jsxs8(Fragment2, { children: [
|
|
5747
|
+
/* @__PURE__ */ jsx14("span", { className: "font-medium", children: "External Git repository" }),
|
|
5748
|
+
/* @__PURE__ */ jsx14("span", { className: "ml-2 text-xs text-muted-foreground underline decoration-dotted underline-offset-2 group-hover/repo:text-foreground", children: "Change" }),
|
|
5749
|
+
primaryRepoUrl && /* @__PURE__ */ jsx14("p", { className: "text-xs text-muted-foreground mt-0.5 wrap-break-word", children: primaryRepoUrl }),
|
|
5750
|
+
primaryRepoRef && /* @__PURE__ */ jsxs8("p", { className: "text-xs text-muted-foreground mt-0.5", children: [
|
|
5751
|
+
"Ref: ",
|
|
5752
|
+
primaryRepoRef
|
|
5753
|
+
] })
|
|
5754
|
+
] }) : /* @__PURE__ */ jsxs8(Fragment2, { children: [
|
|
5755
|
+
/* @__PURE__ */ jsx14("span", { className: "font-medium", children: "Create a new Git repository" }),
|
|
5756
|
+
/* @__PURE__ */ jsx14("span", { className: "ml-2 text-xs text-muted-foreground underline decoration-dotted underline-offset-2 group-hover/repo:text-foreground", children: "Change \u2014 use an existing repository" }),
|
|
5757
|
+
/* @__PURE__ */ jsxs8("p", { className: "text-xs text-muted-foreground mt-0.5", children: [
|
|
5758
|
+
"Fresh local workspace",
|
|
5759
|
+
primaryRepoRef ? ` on ${primaryRepoRef}` : "",
|
|
5760
|
+
primaryWorkspace?.setupCommand ? ` \xB7 ${primaryWorkspace.setupCommand}` : ""
|
|
5761
|
+
] })
|
|
5762
|
+
] })
|
|
5763
|
+
}
|
|
5764
|
+
) }) }),
|
|
5765
|
+
/* @__PURE__ */ jsx14("div", { className: "px-4", children: /* @__PURE__ */ jsx14(SummaryRow, { icon: Target, label: "Goal", onEdit: () => setEditing("goal"), children: editing === "goal" ? /* @__PURE__ */ jsx14(
|
|
5281
5766
|
InlineEdit,
|
|
5282
5767
|
{
|
|
5283
5768
|
value: state.goals[0]?.title || "",
|
|
@@ -5291,9 +5776,9 @@ function ConfigReview() {
|
|
|
5291
5776
|
onCancel: () => setEditing(null),
|
|
5292
5777
|
placeholder: "Goal title"
|
|
5293
5778
|
}
|
|
5294
|
-
) : editing === "goalDesc" ? /* @__PURE__ */
|
|
5295
|
-
/* @__PURE__ */
|
|
5296
|
-
/* @__PURE__ */
|
|
5779
|
+
) : editing === "goalDesc" ? /* @__PURE__ */ jsxs8("div", { className: "space-y-1", children: [
|
|
5780
|
+
/* @__PURE__ */ jsx14("span", { children: state.goals[0]?.title || "(no goal)" }),
|
|
5781
|
+
/* @__PURE__ */ jsx14(
|
|
5297
5782
|
InlineEdit,
|
|
5298
5783
|
{
|
|
5299
5784
|
value: state.goals[0]?.description || "",
|
|
@@ -5309,21 +5794,21 @@ function ConfigReview() {
|
|
|
5309
5794
|
multiline: true
|
|
5310
5795
|
}
|
|
5311
5796
|
)
|
|
5312
|
-
] }) : /* @__PURE__ */
|
|
5313
|
-
/* @__PURE__ */
|
|
5314
|
-
state.goals[0]?.description && /* @__PURE__ */
|
|
5315
|
-
state.goals.length > 1 && /* @__PURE__ */
|
|
5797
|
+
] }) : /* @__PURE__ */ jsxs8(Fragment2, { children: [
|
|
5798
|
+
/* @__PURE__ */ jsx14("span", { children: state.goals[0]?.title || "(no goal)" }),
|
|
5799
|
+
state.goals[0]?.description && /* @__PURE__ */ jsx14("p", { className: "text-xs text-muted-foreground mt-0.5", children: state.goals[0].description }),
|
|
5800
|
+
state.goals.length > 1 && /* @__PURE__ */ jsxs8("p", { className: "text-xs text-muted-foreground mt-0.5", children: [
|
|
5316
5801
|
"+ ",
|
|
5317
5802
|
state.goals.length - 1,
|
|
5318
5803
|
" sub-goal",
|
|
5319
5804
|
state.goals.length > 2 ? "s" : ""
|
|
5320
5805
|
] })
|
|
5321
5806
|
] }) }) }),
|
|
5322
|
-
/* @__PURE__ */
|
|
5323
|
-
/* @__PURE__ */
|
|
5807
|
+
/* @__PURE__ */ jsx14("div", { className: "px-4", children: /* @__PURE__ */ jsxs8(SummaryRow, { icon: Blocks, label: `Modules (${activeModules.length})`, children: [
|
|
5808
|
+
/* @__PURE__ */ jsx14("div", { className: "flex flex-wrap gap-1.5", children: state.modules.map((m) => {
|
|
5324
5809
|
const isActive = selectedModSet.has(m.name);
|
|
5325
|
-
return /* @__PURE__ */
|
|
5326
|
-
/* @__PURE__ */
|
|
5810
|
+
return /* @__PURE__ */ jsxs8(HoverCardRoot, { openDelay: 200, closeDelay: 100, children: [
|
|
5811
|
+
/* @__PURE__ */ jsx14(HoverCardTrigger, { asChild: true, children: /* @__PURE__ */ jsx14("button", { onClick: () => toggleModule(m.name), children: /* @__PURE__ */ jsx14(
|
|
5327
5812
|
Badge,
|
|
5328
5813
|
{
|
|
5329
5814
|
variant: isActive ? "secondary" : "outline",
|
|
@@ -5334,28 +5819,28 @@ function ConfigReview() {
|
|
|
5334
5819
|
children: m.name
|
|
5335
5820
|
}
|
|
5336
5821
|
) }) }),
|
|
5337
|
-
/* @__PURE__ */
|
|
5822
|
+
/* @__PURE__ */ jsx14(HoverCardPortal, { children: /* @__PURE__ */ jsx14(
|
|
5338
5823
|
HoverCardContent,
|
|
5339
5824
|
{
|
|
5340
5825
|
side: "top",
|
|
5341
5826
|
align: "center",
|
|
5342
5827
|
sideOffset: 6,
|
|
5343
5828
|
className: "z-50 w-80 rounded-lg border bg-popover p-0 shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",
|
|
5344
|
-
children: /* @__PURE__ */
|
|
5829
|
+
children: /* @__PURE__ */ jsx14(ModuleDetail, { mod: m, allRoleNames })
|
|
5345
5830
|
}
|
|
5346
5831
|
) })
|
|
5347
5832
|
] }, m.name);
|
|
5348
5833
|
}) }),
|
|
5349
|
-
(totalTasks > 0 || totalCapabilities > 0) && /* @__PURE__ */
|
|
5834
|
+
(totalTasks > 0 || totalCapabilities > 0) && /* @__PURE__ */ jsx14("p", { className: "text-xs text-muted-foreground mt-1.5", children: [
|
|
5350
5835
|
totalTasks > 0 && `${totalTasks} initial tasks`,
|
|
5351
5836
|
totalCapabilities > 0 && `${totalCapabilities} capabilities`
|
|
5352
5837
|
].filter(Boolean).join(" \xB7 ") })
|
|
5353
5838
|
] }) }),
|
|
5354
|
-
/* @__PURE__ */
|
|
5839
|
+
/* @__PURE__ */ jsx14("div", { className: "px-4", children: /* @__PURE__ */ jsx14(SummaryRow, { icon: Users, label: `Team (${allRoles.length} agents)`, children: /* @__PURE__ */ jsx14("div", { className: "flex flex-wrap gap-1.5", children: state.roles.map((role) => {
|
|
5355
5840
|
const isBase = role._base;
|
|
5356
5841
|
const isActive = isBase || selectedRoleSet.has(role.name);
|
|
5357
|
-
return /* @__PURE__ */
|
|
5358
|
-
/* @__PURE__ */
|
|
5842
|
+
return /* @__PURE__ */ jsxs8(HoverCardRoot, { openDelay: 200, closeDelay: 100, children: [
|
|
5843
|
+
/* @__PURE__ */ jsx14(HoverCardTrigger, { asChild: true, children: /* @__PURE__ */ jsx14("button", { onClick: () => toggleRole(role.name), disabled: isBase, children: /* @__PURE__ */ jsx14(
|
|
5359
5844
|
Badge,
|
|
5360
5845
|
{
|
|
5361
5846
|
variant: isActive ? "outline" : "secondary",
|
|
@@ -5368,42 +5853,43 @@ function ConfigReview() {
|
|
|
5368
5853
|
children: role.title
|
|
5369
5854
|
}
|
|
5370
5855
|
) }) }),
|
|
5371
|
-
/* @__PURE__ */
|
|
5856
|
+
/* @__PURE__ */ jsx14(HoverCardPortal, { children: /* @__PURE__ */ jsx14(
|
|
5372
5857
|
HoverCardContent,
|
|
5373
5858
|
{
|
|
5374
5859
|
side: "top",
|
|
5375
5860
|
align: "center",
|
|
5376
5861
|
sideOffset: 6,
|
|
5377
5862
|
className: "z-50 w-80 rounded-lg border bg-popover p-0 shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",
|
|
5378
|
-
children: /* @__PURE__ */
|
|
5863
|
+
children: /* @__PURE__ */ jsx14(RoleDetail, { role })
|
|
5379
5864
|
}
|
|
5380
5865
|
) })
|
|
5381
5866
|
] }, role.name);
|
|
5382
5867
|
}) }) }) })
|
|
5383
5868
|
] }) }),
|
|
5384
|
-
skippedModules.length > 0 && /* @__PURE__ */
|
|
5385
|
-
/* @__PURE__ */
|
|
5386
|
-
/* @__PURE__ */
|
|
5387
|
-
/* @__PURE__ */
|
|
5869
|
+
skippedModules.length > 0 && /* @__PURE__ */ jsxs8("div", { className: "flex items-start gap-2 rounded-lg border border-amber-500/30 bg-amber-500/10 p-3 text-sm", children: [
|
|
5870
|
+
/* @__PURE__ */ jsx14(TriangleAlert, { className: "h-4 w-4 text-amber-500 shrink-0 mt-0.5" }),
|
|
5871
|
+
/* @__PURE__ */ jsxs8("div", { children: [
|
|
5872
|
+
/* @__PURE__ */ jsxs8("p", { className: "font-medium text-amber-800 dark:text-amber-200", children: [
|
|
5388
5873
|
skippedModules.length,
|
|
5389
5874
|
" module(s) will be skipped"
|
|
5390
5875
|
] }),
|
|
5391
|
-
/* @__PURE__ */
|
|
5876
|
+
/* @__PURE__ */ jsxs8("p", { className: "text-xs text-amber-700 dark:text-amber-300 mt-0.5", children: [
|
|
5392
5877
|
skippedModules.join(", "),
|
|
5393
5878
|
" \u2014 missing required roles"
|
|
5394
5879
|
] })
|
|
5395
5880
|
] })
|
|
5396
5881
|
] }),
|
|
5397
|
-
/* @__PURE__ */
|
|
5882
|
+
/* @__PURE__ */ jsxs8(
|
|
5398
5883
|
"button",
|
|
5399
5884
|
{
|
|
5885
|
+
type: "button",
|
|
5400
5886
|
onClick: () => setShowDetails((v) => !v),
|
|
5401
5887
|
className: "w-full flex items-center justify-center gap-2 text-xs font-medium text-muted-foreground hover:text-foreground transition-colors py-2",
|
|
5402
5888
|
children: [
|
|
5403
|
-
showDetails ? /* @__PURE__ */
|
|
5889
|
+
showDetails ? /* @__PURE__ */ jsx14(ChevronDown, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ jsx14(ChevronRight, { className: "h-3.5 w-3.5" }),
|
|
5404
5890
|
showDetails ? "Hide" : "Show",
|
|
5405
5891
|
" detailed configuration",
|
|
5406
|
-
/* @__PURE__ */
|
|
5892
|
+
/* @__PURE__ */ jsxs8("span", { className: "text-muted-foreground/60", children: [
|
|
5407
5893
|
"(",
|
|
5408
5894
|
activeRoleData.length,
|
|
5409
5895
|
" roles \xB7 ",
|
|
@@ -5416,20 +5902,20 @@ function ConfigReview() {
|
|
|
5416
5902
|
]
|
|
5417
5903
|
}
|
|
5418
5904
|
),
|
|
5419
|
-
/* @__PURE__ */
|
|
5905
|
+
/* @__PURE__ */ jsxs8(
|
|
5420
5906
|
"button",
|
|
5421
5907
|
{
|
|
5908
|
+
type: "button",
|
|
5422
5909
|
onClick: () => {
|
|
5423
5910
|
const next = !showFiles;
|
|
5424
5911
|
setShowFiles(next);
|
|
5425
|
-
if (next && !previewFiles && !loadingFiles) loadPreview();
|
|
5426
5912
|
},
|
|
5427
5913
|
className: "w-full flex items-center justify-center gap-2 text-xs font-medium text-muted-foreground hover:text-foreground transition-colors py-2",
|
|
5428
5914
|
children: [
|
|
5429
|
-
showFiles ? /* @__PURE__ */
|
|
5915
|
+
showFiles ? /* @__PURE__ */ jsx14(ChevronDown, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ jsx14(ChevronRight, { className: "h-3.5 w-3.5" }),
|
|
5430
5916
|
showFiles ? "Hide" : "Preview",
|
|
5431
5917
|
" generated files",
|
|
5432
|
-
previewFiles && /* @__PURE__ */
|
|
5918
|
+
previewFiles && /* @__PURE__ */ jsxs8("span", { className: "text-muted-foreground/60", children: [
|
|
5433
5919
|
"(",
|
|
5434
5920
|
Object.keys(previewFiles).length,
|
|
5435
5921
|
" files",
|
|
@@ -5439,39 +5925,40 @@ function ConfigReview() {
|
|
|
5439
5925
|
]
|
|
5440
5926
|
}
|
|
5441
5927
|
),
|
|
5442
|
-
showFiles && /* @__PURE__ */
|
|
5443
|
-
loadingFiles && /* @__PURE__ */
|
|
5444
|
-
/* @__PURE__ */
|
|
5928
|
+
showFiles && /* @__PURE__ */ jsxs8("div", { className: "space-y-3", children: [
|
|
5929
|
+
loadingFiles && /* @__PURE__ */ jsxs8("div", { className: "flex items-center justify-center gap-2 py-6 text-sm text-muted-foreground", children: [
|
|
5930
|
+
/* @__PURE__ */ jsx14(LoaderCircle, { className: "h-4 w-4 animate-spin" }),
|
|
5445
5931
|
"Assembling preview..."
|
|
5446
5932
|
] }),
|
|
5447
|
-
previewError && !loadingFiles && /* @__PURE__ */
|
|
5448
|
-
/* @__PURE__ */
|
|
5449
|
-
/* @__PURE__ */
|
|
5450
|
-
/* @__PURE__ */
|
|
5451
|
-
/* @__PURE__ */
|
|
5933
|
+
previewError && !loadingFiles && /* @__PURE__ */ jsxs8("div", { className: "flex items-start gap-2 rounded-lg border border-destructive/30 bg-destructive/5 p-3 text-sm", children: [
|
|
5934
|
+
/* @__PURE__ */ jsx14(TriangleAlert, { className: "h-4 w-4 text-destructive shrink-0 mt-0.5" }),
|
|
5935
|
+
/* @__PURE__ */ jsxs8("div", { children: [
|
|
5936
|
+
/* @__PURE__ */ jsx14("p", { className: "font-medium", children: "Preview failed" }),
|
|
5937
|
+
/* @__PURE__ */ jsx14("p", { className: "text-xs text-muted-foreground mt-0.5", children: previewError })
|
|
5452
5938
|
] })
|
|
5453
5939
|
] }),
|
|
5454
|
-
previewFiles && !loadingFiles && /* @__PURE__ */
|
|
5455
|
-
/* @__PURE__ */
|
|
5456
|
-
/* @__PURE__ */
|
|
5457
|
-
/* @__PURE__ */
|
|
5940
|
+
previewFiles && !loadingFiles && /* @__PURE__ */ jsxs8(Fragment2, { children: [
|
|
5941
|
+
/* @__PURE__ */ jsxs8("div", { className: "flex items-center justify-between", children: [
|
|
5942
|
+
/* @__PURE__ */ jsx14("p", { className: "text-xs text-muted-foreground", children: "Click a file to expand. Use the edit button to override its content before provisioning." }),
|
|
5943
|
+
/* @__PURE__ */ jsxs8(
|
|
5458
5944
|
"button",
|
|
5459
5945
|
{
|
|
5946
|
+
type: "button",
|
|
5460
5947
|
onClick: loadPreview,
|
|
5461
5948
|
className: "flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",
|
|
5462
5949
|
children: [
|
|
5463
|
-
/* @__PURE__ */
|
|
5950
|
+
/* @__PURE__ */ jsx14(RefreshCw, { className: "h-3 w-3" }),
|
|
5464
5951
|
"Refresh"
|
|
5465
5952
|
]
|
|
5466
5953
|
}
|
|
5467
5954
|
)
|
|
5468
5955
|
] }),
|
|
5469
|
-
groupFiles(previewFiles).map(({ group, paths }) => /* @__PURE__ */
|
|
5470
|
-
group && /* @__PURE__ */
|
|
5956
|
+
groupFiles(previewFiles).map(({ group, paths }) => /* @__PURE__ */ jsxs8("div", { className: "space-y-1", children: [
|
|
5957
|
+
group && /* @__PURE__ */ jsxs8("p", { className: "text-[10px] font-medium text-muted-foreground uppercase tracking-wider px-0.5", children: [
|
|
5471
5958
|
group,
|
|
5472
5959
|
"/"
|
|
5473
5960
|
] }),
|
|
5474
|
-
/* @__PURE__ */
|
|
5961
|
+
/* @__PURE__ */ jsx14("div", { className: "space-y-1", children: paths.map((filePath) => /* @__PURE__ */ jsx14(
|
|
5475
5962
|
FileEntry,
|
|
5476
5963
|
{
|
|
5477
5964
|
filePath,
|
|
@@ -5485,57 +5972,57 @@ function ConfigReview() {
|
|
|
5485
5972
|
] }, group || "_root"))
|
|
5486
5973
|
] })
|
|
5487
5974
|
] }),
|
|
5488
|
-
showDetails && /* @__PURE__ */
|
|
5975
|
+
showDetails && /* @__PURE__ */ jsxs8("div", { className: "space-y-6", children: [
|
|
5489
5976
|
state.presetName && state.presetName !== "custom" && (() => {
|
|
5490
5977
|
const preset = state.presets.find((p) => p.name === state.presetName);
|
|
5491
5978
|
if (!preset) return null;
|
|
5492
|
-
return /* @__PURE__ */
|
|
5493
|
-
/* @__PURE__ */
|
|
5494
|
-
/* @__PURE__ */
|
|
5495
|
-
/* @__PURE__ */
|
|
5496
|
-
/* @__PURE__ */
|
|
5497
|
-
preset.base && /* @__PURE__ */
|
|
5979
|
+
return /* @__PURE__ */ jsxs8("div", { children: [
|
|
5980
|
+
/* @__PURE__ */ jsx14("p", { className: "text-xs font-medium text-muted-foreground uppercase tracking-wider mb-2", children: "Preset" }),
|
|
5981
|
+
/* @__PURE__ */ jsx14(Card, { children: /* @__PURE__ */ jsxs8(CardContent, { className: "p-3 space-y-1.5", children: [
|
|
5982
|
+
/* @__PURE__ */ jsxs8("div", { className: "flex items-center gap-2", children: [
|
|
5983
|
+
/* @__PURE__ */ jsx14("span", { className: "text-sm font-medium capitalize", children: preset.name }),
|
|
5984
|
+
preset.base && /* @__PURE__ */ jsxs8(Badge, { variant: "outline", className: "text-[10px]", children: [
|
|
5498
5985
|
"extends ",
|
|
5499
5986
|
preset.base
|
|
5500
5987
|
] })
|
|
5501
5988
|
] }),
|
|
5502
|
-
/* @__PURE__ */
|
|
5503
|
-
preset.constraints && preset.constraints.length > 0 && /* @__PURE__ */
|
|
5504
|
-
/* @__PURE__ */
|
|
5505
|
-
/* @__PURE__ */
|
|
5989
|
+
/* @__PURE__ */ jsx14("p", { className: "text-xs text-muted-foreground", children: preset.description }),
|
|
5990
|
+
preset.constraints && preset.constraints.length > 0 && /* @__PURE__ */ jsxs8("div", { className: "flex items-start gap-1.5 text-xs text-amber-700 dark:text-amber-300 mt-1", children: [
|
|
5991
|
+
/* @__PURE__ */ jsx14(TriangleAlert, { className: "h-3 w-3 shrink-0 mt-0.5" }),
|
|
5992
|
+
/* @__PURE__ */ jsx14("span", { children: preset.constraints.join(" \xB7 ") })
|
|
5506
5993
|
] })
|
|
5507
5994
|
] }) })
|
|
5508
5995
|
] });
|
|
5509
5996
|
})(),
|
|
5510
|
-
/* @__PURE__ */
|
|
5511
|
-
/* @__PURE__ */
|
|
5997
|
+
/* @__PURE__ */ jsxs8("div", { children: [
|
|
5998
|
+
/* @__PURE__ */ jsxs8("p", { className: "text-xs font-medium text-muted-foreground uppercase tracking-wider mb-2", children: [
|
|
5512
5999
|
"Team \u2014 ",
|
|
5513
6000
|
activeRoleData.length,
|
|
5514
6001
|
" agents"
|
|
5515
6002
|
] }),
|
|
5516
|
-
/* @__PURE__ */
|
|
6003
|
+
/* @__PURE__ */ jsx14("div", { className: "grid gap-2", children: activeRoleData.map((role) => /* @__PURE__ */ jsx14(RoleDetail, { role }, role.name)) })
|
|
5517
6004
|
] }),
|
|
5518
|
-
/* @__PURE__ */
|
|
5519
|
-
/* @__PURE__ */
|
|
6005
|
+
/* @__PURE__ */ jsxs8("div", { children: [
|
|
6006
|
+
/* @__PURE__ */ jsxs8("p", { className: "text-xs font-medium text-muted-foreground uppercase tracking-wider mb-2", children: [
|
|
5520
6007
|
"Modules \u2014 ",
|
|
5521
6008
|
selectedModuleData.length,
|
|
5522
6009
|
" active"
|
|
5523
6010
|
] }),
|
|
5524
|
-
/* @__PURE__ */
|
|
6011
|
+
/* @__PURE__ */ jsx14("div", { className: "grid gap-2", children: selectedModuleData.map((mod) => /* @__PURE__ */ jsx14(ModuleDetail, { mod, allRoleNames }, mod.name)) })
|
|
5525
6012
|
] })
|
|
5526
6013
|
] })
|
|
5527
6014
|
] });
|
|
5528
6015
|
}
|
|
5529
6016
|
|
|
5530
6017
|
// src/ui/components/steps/StepSummary.tsx
|
|
5531
|
-
import { jsx as
|
|
6018
|
+
import { jsx as jsx15, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
5532
6019
|
function StepSummary() {
|
|
5533
6020
|
const state = useWizard();
|
|
5534
6021
|
const dispatch = useWizardDispatch();
|
|
5535
6022
|
const checkAuth = usePluginAction3("check-auth");
|
|
5536
|
-
const [authError, setAuthError] =
|
|
5537
|
-
const checked =
|
|
5538
|
-
|
|
6023
|
+
const [authError, setAuthError] = useState7(null);
|
|
6024
|
+
const checked = useRef3(false);
|
|
6025
|
+
useEffect3(() => {
|
|
5539
6026
|
if (checked.current) return;
|
|
5540
6027
|
checked.current = true;
|
|
5541
6028
|
checkAuth({}).then((result) => {
|
|
@@ -5544,18 +6031,18 @@ function StepSummary() {
|
|
|
5544
6031
|
setAuthError(err?.message || "Could not verify API connection");
|
|
5545
6032
|
});
|
|
5546
6033
|
}, []);
|
|
5547
|
-
return /* @__PURE__ */
|
|
5548
|
-
/* @__PURE__ */
|
|
5549
|
-
/* @__PURE__ */
|
|
5550
|
-
/* @__PURE__ */
|
|
6034
|
+
return /* @__PURE__ */ jsxs9("div", { className: "space-y-6", children: [
|
|
6035
|
+
/* @__PURE__ */ jsxs9("div", { className: "space-y-2", children: [
|
|
6036
|
+
/* @__PURE__ */ jsx15("h2", { className: "text-xl font-semibold tracking-tight", children: "Review" }),
|
|
6037
|
+
/* @__PURE__ */ jsx15("p", { className: "text-sm text-muted-foreground", children: "Confirm your company configuration before creating. Click any field to edit." })
|
|
5551
6038
|
] }),
|
|
5552
|
-
/* @__PURE__ */
|
|
5553
|
-
authError && /* @__PURE__ */
|
|
5554
|
-
/* @__PURE__ */
|
|
5555
|
-
/* @__PURE__ */
|
|
5556
|
-
/* @__PURE__ */
|
|
5557
|
-
/* @__PURE__ */
|
|
5558
|
-
/* @__PURE__ */
|
|
6039
|
+
/* @__PURE__ */ jsx15(ConfigReview, {}),
|
|
6040
|
+
authError && /* @__PURE__ */ jsxs9("div", { className: "flex items-start gap-3 rounded-lg border border-amber-500/30 bg-amber-500/10 p-4", children: [
|
|
6041
|
+
/* @__PURE__ */ jsx15(TriangleAlert, { className: "h-4 w-4 text-amber-500 shrink-0 mt-0.5" }),
|
|
6042
|
+
/* @__PURE__ */ jsxs9("div", { className: "space-y-2 flex-1 min-w-0", children: [
|
|
6043
|
+
/* @__PURE__ */ jsx15("p", { className: "text-sm font-medium text-amber-800 dark:text-amber-200", children: "API connection failed" }),
|
|
6044
|
+
/* @__PURE__ */ jsx15("p", { className: "text-xs text-amber-700 dark:text-amber-300 wrap-break-word", children: authError }),
|
|
6045
|
+
/* @__PURE__ */ jsxs9(
|
|
5559
6046
|
Button,
|
|
5560
6047
|
{
|
|
5561
6048
|
variant: "outline",
|
|
@@ -5565,59 +6052,81 @@ function StepSummary() {
|
|
|
5565
6052
|
window.location.href = getPluginSettingsUrl();
|
|
5566
6053
|
},
|
|
5567
6054
|
children: [
|
|
5568
|
-
/* @__PURE__ */
|
|
6055
|
+
/* @__PURE__ */ jsx15(Settings, { className: "h-3 w-3 mr-1.5" }),
|
|
5569
6056
|
"Plugin Settings"
|
|
5570
6057
|
]
|
|
5571
6058
|
}
|
|
5572
6059
|
)
|
|
5573
6060
|
] })
|
|
5574
6061
|
] }),
|
|
5575
|
-
/* @__PURE__ */
|
|
5576
|
-
/* @__PURE__ */
|
|
5577
|
-
/* @__PURE__ */
|
|
6062
|
+
/* @__PURE__ */ jsxs9("div", { className: "flex justify-end gap-3", children: [
|
|
6063
|
+
/* @__PURE__ */ jsx15(Button, { variant: "outline", onClick: () => dispatch({ type: "GO_TO", step: "roles" }), children: "Back" }),
|
|
6064
|
+
/* @__PURE__ */ jsx15(Button, { onClick: () => dispatch({ type: "GO_TO", step: "provision" }), children: state.existingCompanyId ? "Provision into Existing Company" : "Create Company" })
|
|
5578
6065
|
] })
|
|
5579
6066
|
] });
|
|
5580
6067
|
}
|
|
5581
6068
|
|
|
5582
6069
|
// src/ui/components/steps/StepAiWizard.tsx
|
|
5583
|
-
import { useState as
|
|
6070
|
+
import { useState as useState8, useRef as useRef4, useEffect as useEffect4 } from "react";
|
|
5584
6071
|
import { usePluginAction as usePluginAction4 } from "@paperclipai/plugin-sdk/ui";
|
|
5585
6072
|
|
|
5586
6073
|
// raw:/paperclip/paperclip-plugin-company-wizard/src/ui/prompts/interview-system.md
|
|
5587
|
-
var interview_system_default =
|
|
6074
|
+
var interview_system_default = 'You are the Clipper AI Wizard \u2014 an expert at assembling AI agent teams. You\'re enthusiastic but concise. Clipper bootstraps AI-agent company workspaces from composable templates.\n\nYou are conducting a guided interview to understand what company to set up.\n\n{{CATALOG}}\n\n## How Roles Work\n\n- **Base roles** (marked "always included") are auto-added. You do NOT list them in the JSON.\n- **All other roles** (listed under "Available Extra Roles") are OPTIONAL and must be EXPLICITLY listed in your JSON `roles` array if you want them.\n- **Critically: `engineer` is NOT a base role.** Most software projects need an engineer. If the project involves writing code, building software, or maintaining a repository, you MUST include `engineer` in your `roles` array. The preset does NOT auto-add roles \u2014 you must list every non-base role the company needs.\n- When in doubt, include the engineer. A company that builds software without an engineer agent will have no one to write code.\n\n## Interview Rules\n\n- Ask exactly ONE question per turn. Keep it short and energetic (1-2 sentences). Use a conversational tone.\n- Do NOT output JSON during questions \u2014 just ask the question as plain text.\n- Tailor each question based on previous answers. Show you understood what they said.\n- After 3 questions, summarize what you understood in a brief, enthusiastic paragraph. End with: "Ready to generate your configuration?"\n- When the user confirms, output a human-readable recommendation with reasoning, then the JSON config.\n\n## What to Ask About\n\nAcross your 3 questions, try to cover as many of these as the user\'s initial description left unclear:\n\n1. **What they\'re building** \u2014 Product type, target users, domain (fintech, SaaS, game, etc.)\n2. **Current stage** \u2014 Greenfield, existing codebase, research phase, relaunch?\n3. **Quality vs speed** \u2014 Ship fast, iterate? Or production-grade, high quality from the start?\n4. **Team needs** \u2014 Do they need code review, security, design, marketing, docs, DevOps?\n5. **Special requirements** \u2014 Compliance, accessibility, specific tech stack, CI/CD, game engine?\n6. **Repository** \u2014 Should Paperclip create a new Git repository/workspace, or should the agents use an existing external repo such as GitHub/GitLab? If external, ask for URL and branch/ref; never ask for tokens.\n\nDon\'t ask about things already clear from the initial description. Skip to what\'s missing.\n\n## Information Preservation\n\nThe user\'s interview answers are the primary source of context for the company. When generating the configuration:\n\n- **`companyDescription`**: Write a comprehensive 2-4 paragraph description that captures EVERYTHING learned during the interview \u2014 what the company does, what it\'s building, who it\'s for, key technical decisions, constraints, priorities, and any special context. This is the company\'s permanent record. Be thorough. Do NOT summarize into a single vague sentence.\n- **`goals`**: Array of goals. The first goal is the main user-specific company goal \u2014 its description is the most important field. Write a THOROUGH, DETAILED description that includes EVERYTHING the user shared: full requirements, technical specs, acceptance criteria, constraints, edge cases, API contracts, user stories, design decisions, performance targets. If the user dropped a full spec, reproduce it in full. This is the primary brief all agents work from. Multiple paragraphs expected. Additional goals can be sub-goals (use `parentGoal` to reference the parent\'s title). Most setups need 1 main goal + 0-2 sub-goals. Preset/module template goals are added by the wizard after your JSON, so do NOT replace the user\'s objective with generic preset goals like "Build a REST API" or "Set up CI/CD" unless the user explicitly asked only for that.\n- **`projects`**: Array of projects. Each has a `name`, `description`, `goals` array (goal titles it\'s linked to), and repository workspace metadata. If the user chose an external repo, use `workspace.sourceType: "git_repo"` with `repoUrl`, `repoRef`/`defaultRef`, and isolated git worktrees. If no external repo was provided, use a fresh local Git repository with `workspace.sourceType: "local_path"`, `workspace.defaultRef: "main"`, `workspace.setupCommand: "git init -b main"`, and `workspace.isPrimary: true`.\n- **`issues`**: Array of 6-12 CONCRETE, domain-specific initial work items taken straight from what you learned in the interview \u2014 the real features, components, and integrations the user actually described, each with a `title`, a `description` with acceptance criteria, a `priority` (`critical`/`high`/`medium`/`low`), and `assignTo` set to a role on the team. These seed the backlog so the project starts in its actual domain. Do NOT put generic scaffolding here (vision docs, linters, CI, branch protection) \u2014 the wizard adds those automatically.\n\n## RECOMMENDATION Format (when generating config)\n\n- One paragraph explaining your reasoning: why this preset, why these modules, why these roles.\n- A bullet list of the key choices.\n\nThen output the JSON (no markdown fences):\n{{CONFIG_FORMAT}}\n\n## Rules\n\n- `modules` should list ALL modules to activate (including preset ones).\n- `roles` should list ALL non-base roles the company needs. This includes roles that come with the preset. The system does not auto-add preset roles \u2014 you must list them explicitly.\n- If the project involves building software, `engineer` MUST be in `roles`.\n- The primary project MUST state whether it uses a fresh local Git repository or an external Git repository. Do not put credentials or tokens in repository fields.\n- Be pragmatic \u2014 don\'t over-engineer. Match the config to actual needs.\n';
|
|
5588
6075
|
|
|
5589
6076
|
// raw:/paperclip/paperclip-plugin-company-wizard/src/ui/prompts/single-shot-system.md
|
|
5590
|
-
var single_shot_system_default = 'You are the Clipper AI Wizard. Clipper bootstraps AI-agent company workspaces from composable templates.\n\nGiven a natural language description of what the user wants to build, you select the best configuration.\n\n{{CATALOG}}\n\n## How Roles Work\n\n- **Base roles** (marked "always included") are auto-added. You do NOT list them in the JSON.\n- **All other roles** (listed under "Available Extra Roles") are OPTIONAL and must be EXPLICITLY listed in your JSON `roles` array if you want them.\n- **Critically: `engineer` is NOT a base role.** Most software projects need an engineer. If the project involves writing code, building software, or maintaining a repository, you MUST include `engineer` in your `roles` array. The preset does NOT auto-add roles \u2014 you must list every non-base role the company needs.\n- When in doubt, include the engineer. A company that builds software without an engineer agent will have no one to write code.\n\n## Instructions\n\n1. Analyze the user\'s description to understand: what they\'re building, their team size preference, quality vs speed priority, and any specific needs.\n2. Select the best preset as a starting point.\n3. List ALL modules to activate (including preset ones). Add extra modules beyond the preset if the description warrants them.\n4. List ALL non-base roles the company needs. This includes roles from the preset. If the project involves software, include `engineer`.\n5. Suggest a company name (PascalCase-friendly, short, memorable) if not obvious from the description.\n6. Write a thorough company description (2-4 paragraphs) capturing everything the user described \u2014 product, audience, tech stack, constraints, priorities, stage, and special context. This is the company\'s permanent record.\n7. Define goals as an array. The first goal is the main company goal \u2014 its description is the most important field. Include EVERYTHING the user described: full requirements, technical specs, acceptance criteria, constraints, edge cases, API contracts, user stories, performance targets. If the user provided a detailed spec, reproduce it in full. This is the primary brief all agents work from. Do NOT summarize \u2014 preserve every detail. Add sub-goals with `parentGoal` if the description warrants separate workstreams.\n8. Define projects as an array. Most setups need one project linked to all goals. Name and describe the project concretely.\n\nFirst write one paragraph explaining your reasoning: why this preset, why these modules, why these roles.\n\nThen output the JSON (no markdown fences):\n{{CONFIG_FORMAT}}\n';
|
|
6077
|
+
var single_shot_system_default = 'You are the Clipper AI Wizard. Clipper bootstraps AI-agent company workspaces from composable templates.\n\nGiven a natural language description of what the user wants to build, you select the best configuration.\n\n{{CATALOG}}\n\n## How Roles Work\n\n- **Base roles** (marked "always included") are auto-added. You do NOT list them in the JSON.\n- **All other roles** (listed under "Available Extra Roles") are OPTIONAL and must be EXPLICITLY listed in your JSON `roles` array if you want them.\n- **Critically: `engineer` is NOT a base role.** Most software projects need an engineer. If the project involves writing code, building software, or maintaining a repository, you MUST include `engineer` in your `roles` array. The preset does NOT auto-add roles \u2014 you must list every non-base role the company needs.\n- When in doubt, include the engineer. A company that builds software without an engineer agent will have no one to write code.\n\n## Instructions\n\n1. Analyze the user\'s description to understand: what they\'re building, their team size preference, quality vs speed priority, and any specific needs.\n2. Select the best preset as a starting point.\n3. List ALL modules to activate (including preset ones). Add extra modules beyond the preset if the description warrants them.\n4. List ALL non-base roles the company needs. This includes roles from the preset. If the project involves software, include `engineer`.\n5. Suggest a company name (PascalCase-friendly, short, memorable) if not obvious from the description.\n6. Write a thorough company description (2-4 paragraphs) capturing everything the user described \u2014 product, audience, tech stack, constraints, priorities, stage, and special context. This is the company\'s permanent record.\n7. Define goals as an array. The first goal is the main user-specific company goal \u2014 its description is the most important field. Include EVERYTHING the user described: full requirements, technical specs, acceptance criteria, constraints, edge cases, API contracts, user stories, performance targets. If the user provided a detailed spec, reproduce it in full. This is the primary brief all agents work from. Do NOT summarize \u2014 preserve every detail. Add sub-goals with `parentGoal` if the description warrants separate workstreams. Preset/module template goals are added by the wizard after your JSON, so do NOT replace the user\'s objective with generic preset goals like "Build a REST API" or "Set up CI/CD" unless the user explicitly asked only for that.\n8. Define projects as an array. Most setups need one project linked to all goals. Name and describe the project concretely.\n9. Always decide the repository setup for the primary project:\n - If the user gives an existing GitHub/GitLab/remote Git repo, set `workspace.sourceType: "git_repo"`, include `repoUrl`, set `repoRef`/`defaultRef` when known (default to `origin/main`), and use `executionWorkspacePolicy.defaultMode: "isolated_workspace"` with a `git_worktree` strategy.\n - If no external repository is given, assume Paperclip should create a fresh local Git repository. Set `workspace.sourceType: "local_path"`, `workspace.defaultRef: "main"`, `workspace.setupCommand: "git init -b main"`, and `workspace.isPrimary: true`. Do NOT include an `executionWorkspacePolicy` for a fresh local repository \u2014 the repo and its base ref do not exist yet, so isolated git worktrees would fail on the first run. Agents work in the shared project workspace until the repo is established.\n - Never include credentials or tokens in repository URLs or project text.\n10. Define an `issues` array of 6-12 CONCRETE, domain-specific initial work items taken straight from the description \u2014 the real features, components, and integrations the user actually described, each with a `title`, a `description` with acceptance criteria, a `priority`, and `assignTo` set to a role on the team. These seed the backlog so the project starts in its actual domain instead of only doing generic setup. Do NOT put generic scaffolding here (vision docs, linters, CI, branch protection) \u2014 the wizard adds those automatically.\n\nFirst write one paragraph explaining your reasoning: why this preset, why these modules, why these roles.\n\nThen output the JSON (no markdown fences):\n{{CONFIG_FORMAT}}\n';
|
|
5591
6078
|
|
|
5592
6079
|
// src/ui/prompts/messages.json
|
|
5593
6080
|
var messages_default = {
|
|
5594
6081
|
interviewStart: "Here's what I want to build:\n\n{{DESCRIPTION}}\n\nStart the interview. Ask your first question.",
|
|
5595
6082
|
singleShot: "{{DESCRIPTION}}",
|
|
5596
|
-
generateConfig: "Generate the configuration now. Remember: include ALL non-base roles the company needs in the roles array (engineer is NOT a base role \u2014 list it if this project involves code). Write a thorough companyDescription that captures everything we discussed. The first goal's description must contain ALL requirements, specs, and details \u2014 this is the primary brief for all agents.",
|
|
5597
|
-
configFormat: `
|
|
6083
|
+
generateConfig: "Generate the configuration now. Remember: include ALL non-base roles the company needs in the roles array (engineer is NOT a base role \u2014 list it if this project involves code). Write a thorough companyDescription that captures everything we discussed. The goals array must preserve the user-specific objectives; preset/module template goals are added later by the wizard, so do not replace the user's requested outcome with a generic preset goal like \"Build a REST API\" unless that is truly the entire objective. The first goal's description must contain ALL requirements, specs, and details \u2014 this is the primary brief for all agents. The primary project must explicitly choose repository setup: either a fresh local Git repository or an external Git repository such as GitHub. Never include credentials or tokens in repository fields. Also include an `issues` array of 6-12 CONCRETE, domain-specific initial work items taken straight from the brief \u2014 the real features, components, and integrations the user's spec actually describes, each with a `title`, a `description` with acceptance criteria, a `priority`, and `assignTo` set to a role on the team. These seed the backlog so the project starts in its actual domain. Do NOT put generic scaffolding here (vision docs, linters, CI, branch protection) \u2014 the wizard adds those automatically.",
|
|
6084
|
+
configFormat: `Respond with ONLY a JSON object using this shape. Use exactly one project object for a single-project setup. For a fresh/new repository, use workspace.sourceType=local_path, defaultRef=main, setupCommand=git init -b main, and isPrimary=true, and do NOT include executionWorkspacePolicy (the repo does not exist yet, so isolated git worktrees would fail on the first run). For an existing external repo, use workspace.sourceType=git_repo, include repoUrl plus repoRef/defaultRef (default origin/main), and include executionWorkspacePolicy with isolated git_worktree.
|
|
6085
|
+
{
|
|
5598
6086
|
"name": "CompanyName",
|
|
5599
6087
|
"companyDescription": "Comprehensive 2-4 paragraph description of what this company does, what it is building, who it is for, key technical decisions, priorities, constraints, and any special context. This is the company's permanent record \u2014 be thorough and specific.",
|
|
5600
6088
|
"goals": [
|
|
5601
6089
|
{
|
|
5602
|
-
"title": "Main goal title",
|
|
5603
|
-
"description": "THOROUGH description with ALL requirements, specs, acceptance criteria, constraints, edge cases, and every detail the user provided. This is the primary brief for all agents \u2014 preserve every detail, do NOT summarize. Multiple paragraphs expected."
|
|
6090
|
+
"title": "Main user-specific goal title",
|
|
6091
|
+
"description": "THOROUGH description with ALL requirements, specs, acceptance criteria, constraints, edge cases, and every detail the user provided. This is the primary brief for all agents \u2014 preserve every detail, do NOT summarize. Multiple paragraphs expected. Do not use a generic preset goal title unless the user asked for exactly that."
|
|
5604
6092
|
},
|
|
5605
6093
|
{
|
|
5606
|
-
"title": "
|
|
5607
|
-
"description": "Sub-goal description...",
|
|
5608
|
-
"parentGoal": "Main goal title"
|
|
6094
|
+
"title": "Additional user-specific goal if needed",
|
|
6095
|
+
"description": "Sub-goal or parallel objective description...",
|
|
6096
|
+
"parentGoal": "Main user-specific goal title"
|
|
5609
6097
|
}
|
|
5610
6098
|
],
|
|
5611
6099
|
"projects": [
|
|
5612
6100
|
{
|
|
5613
6101
|
"name": "ProjectName",
|
|
5614
6102
|
"description": "Concrete project description \u2014 what is being built and key technical details.",
|
|
5615
|
-
"goals": [
|
|
6103
|
+
"goals": [
|
|
6104
|
+
"Main user-specific goal title",
|
|
6105
|
+
"Additional user-specific goal if needed"
|
|
6106
|
+
],
|
|
6107
|
+
"workspace": {
|
|
6108
|
+
"sourceType": "local_path",
|
|
6109
|
+
"defaultRef": "main",
|
|
6110
|
+
"setupCommand": "git init -b main",
|
|
6111
|
+
"isPrimary": true
|
|
6112
|
+
}
|
|
6113
|
+
}
|
|
6114
|
+
],
|
|
6115
|
+
"issues": [
|
|
6116
|
+
{
|
|
6117
|
+
"title": "Concrete, project-specific first work item taken straight from the brief",
|
|
6118
|
+
"description": "What to build and the acceptance criteria, grounded in the user's actual spec \u2014 NOT generic scaffolding.",
|
|
6119
|
+
"priority": "critical | high | medium | low",
|
|
6120
|
+
"assignTo": "engineer"
|
|
5616
6121
|
}
|
|
5617
6122
|
],
|
|
5618
6123
|
"preset": "preset-name",
|
|
5619
|
-
"modules": [
|
|
5620
|
-
|
|
6124
|
+
"modules": [
|
|
6125
|
+
"all-modules-to-activate-including-preset-ones"
|
|
6126
|
+
],
|
|
6127
|
+
"roles": [
|
|
6128
|
+
"all-non-base-roles-needed-including-preset-ones-engineer-is-not-base"
|
|
6129
|
+
],
|
|
5621
6130
|
"explanation": "2-3 sentences explaining WHY this configuration fits the described company."
|
|
5622
6131
|
}`
|
|
5623
6132
|
};
|
|
@@ -5631,7 +6140,7 @@ var examples_default = [
|
|
|
5631
6140
|
];
|
|
5632
6141
|
|
|
5633
6142
|
// src/ui/components/steps/StepAiWizard.tsx
|
|
5634
|
-
import { jsx as
|
|
6143
|
+
import { jsx as jsx16, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
5635
6144
|
var LOADING_MESSAGES = [
|
|
5636
6145
|
"Understanding your vision...",
|
|
5637
6146
|
"Analyzing requirements...",
|
|
@@ -5643,9 +6152,55 @@ var CONFIG_STEPS = [
|
|
|
5643
6152
|
"Selecting strategy preset",
|
|
5644
6153
|
"Choosing capability modules",
|
|
5645
6154
|
"Assembling agent team",
|
|
6155
|
+
"Resolving repository setup",
|
|
5646
6156
|
"Defining company goal",
|
|
5647
6157
|
"Finalizing configuration"
|
|
5648
6158
|
];
|
|
6159
|
+
function isPlainObject(value) {
|
|
6160
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
6161
|
+
}
|
|
6162
|
+
function copyStringField(source, target, key) {
|
|
6163
|
+
const value = source[key];
|
|
6164
|
+
if (typeof value === "string" && value.trim()) target[key] = value.trim();
|
|
6165
|
+
}
|
|
6166
|
+
function normalizeWorkspaceConfig(value) {
|
|
6167
|
+
if (!isPlainObject(value)) return void 0;
|
|
6168
|
+
const workspace = {};
|
|
6169
|
+
for (const key of [
|
|
6170
|
+
"name",
|
|
6171
|
+
"sourceType",
|
|
6172
|
+
"cwd",
|
|
6173
|
+
"repoUrl",
|
|
6174
|
+
"repoRef",
|
|
6175
|
+
"defaultRef",
|
|
6176
|
+
"visibility",
|
|
6177
|
+
"setupCommand",
|
|
6178
|
+
"cleanupCommand",
|
|
6179
|
+
"remoteProvider",
|
|
6180
|
+
"remoteWorkspaceRef",
|
|
6181
|
+
"sharedWorkspaceKey"
|
|
6182
|
+
]) {
|
|
6183
|
+
copyStringField(value, workspace, key);
|
|
6184
|
+
}
|
|
6185
|
+
if (typeof value.isPrimary === "boolean") workspace.isPrimary = value.isPrimary;
|
|
6186
|
+
if (isPlainObject(value.metadata)) workspace.metadata = value.metadata;
|
|
6187
|
+
if (isPlainObject(value.runtimeConfig)) workspace.runtimeConfig = value.runtimeConfig;
|
|
6188
|
+
return Object.keys(workspace).length > 0 ? workspace : void 0;
|
|
6189
|
+
}
|
|
6190
|
+
function normalizeExecutionWorkspacePolicy(value) {
|
|
6191
|
+
if (!isPlainObject(value)) return void 0;
|
|
6192
|
+
const policy = {};
|
|
6193
|
+
copyStringField(value, policy, "defaultMode");
|
|
6194
|
+
copyStringField(value, policy, "defaultProjectWorkspaceId");
|
|
6195
|
+
copyStringField(value, policy, "environmentId");
|
|
6196
|
+
if (typeof value.allowIssueOverride === "boolean") {
|
|
6197
|
+
policy.allowIssueOverride = value.allowIssueOverride;
|
|
6198
|
+
}
|
|
6199
|
+
if (isPlainObject(value.workspaceStrategy)) {
|
|
6200
|
+
policy.workspaceStrategy = { ...value.workspaceStrategy };
|
|
6201
|
+
}
|
|
6202
|
+
return Object.keys(policy).length > 0 ? policy : void 0;
|
|
6203
|
+
}
|
|
5649
6204
|
function PhaseIndicator({
|
|
5650
6205
|
phase,
|
|
5651
6206
|
questionCount
|
|
@@ -5658,13 +6213,13 @@ function PhaseIndicator({
|
|
|
5658
6213
|
];
|
|
5659
6214
|
const phaseKeys = phases.map((p) => p.key);
|
|
5660
6215
|
const activeIdx = phaseKeys.indexOf(phase);
|
|
5661
|
-
return /* @__PURE__ */
|
|
6216
|
+
return /* @__PURE__ */ jsx16("div", { className: "flex items-center gap-1", children: phases.map((p, i) => {
|
|
5662
6217
|
const Icon2 = p.icon;
|
|
5663
6218
|
const isActive = i === activeIdx;
|
|
5664
6219
|
const isDone = i < activeIdx;
|
|
5665
|
-
return /* @__PURE__ */
|
|
5666
|
-
i > 0 && /* @__PURE__ */
|
|
5667
|
-
/* @__PURE__ */
|
|
6220
|
+
return /* @__PURE__ */ jsxs10("div", { className: "flex items-center gap-1", children: [
|
|
6221
|
+
i > 0 && /* @__PURE__ */ jsx16("div", { className: cn("w-6 h-px", isDone ? "bg-foreground" : "bg-border") }),
|
|
6222
|
+
/* @__PURE__ */ jsxs10(
|
|
5668
6223
|
"div",
|
|
5669
6224
|
{
|
|
5670
6225
|
className: cn(
|
|
@@ -5674,9 +6229,9 @@ function PhaseIndicator({
|
|
|
5674
6229
|
!isActive && !isDone && "text-muted-foreground"
|
|
5675
6230
|
),
|
|
5676
6231
|
children: [
|
|
5677
|
-
isDone ? /* @__PURE__ */
|
|
5678
|
-
/* @__PURE__ */
|
|
5679
|
-
p.key === "interview" && isActive && questionCount > 0 && /* @__PURE__ */
|
|
6232
|
+
isDone ? /* @__PURE__ */ jsx16(CircleCheck, { className: "h-3 w-3" }) : /* @__PURE__ */ jsx16(Icon2, { className: cn("h-3 w-3", isActive && "animate-pulse") }),
|
|
6233
|
+
/* @__PURE__ */ jsx16("span", { className: "hidden sm:inline", children: p.label }),
|
|
6234
|
+
p.key === "interview" && isActive && questionCount > 0 && /* @__PURE__ */ jsxs10("span", { className: "text-[10px] opacity-70", children: [
|
|
5680
6235
|
questionCount,
|
|
5681
6236
|
"/3"
|
|
5682
6237
|
] })
|
|
@@ -5687,9 +6242,9 @@ function PhaseIndicator({
|
|
|
5687
6242
|
}) });
|
|
5688
6243
|
}
|
|
5689
6244
|
function ConfiguringAnimation({ ready, onDone }) {
|
|
5690
|
-
const [step, setStep] =
|
|
5691
|
-
const [animDone, setAnimDone] =
|
|
5692
|
-
|
|
6245
|
+
const [step, setStep] = useState8(0);
|
|
6246
|
+
const [animDone, setAnimDone] = useState8(false);
|
|
6247
|
+
useEffect4(() => {
|
|
5693
6248
|
if (step < CONFIG_STEPS.length) {
|
|
5694
6249
|
const timer = setTimeout(() => setStep((s) => s + 1), 600);
|
|
5695
6250
|
return () => clearTimeout(timer);
|
|
@@ -5697,19 +6252,19 @@ function ConfiguringAnimation({ ready, onDone }) {
|
|
|
5697
6252
|
setAnimDone(true);
|
|
5698
6253
|
}
|
|
5699
6254
|
}, [step]);
|
|
5700
|
-
|
|
6255
|
+
useEffect4(() => {
|
|
5701
6256
|
if (animDone && ready) {
|
|
5702
6257
|
const timer = setTimeout(onDone, 300);
|
|
5703
6258
|
return () => clearTimeout(timer);
|
|
5704
6259
|
}
|
|
5705
6260
|
}, [animDone, ready, onDone]);
|
|
5706
6261
|
const allStepsDone = step >= CONFIG_STEPS.length;
|
|
5707
|
-
return /* @__PURE__ */
|
|
5708
|
-
/* @__PURE__ */
|
|
5709
|
-
/* @__PURE__ */
|
|
5710
|
-
/* @__PURE__ */
|
|
6262
|
+
return /* @__PURE__ */ jsxs10("div", { className: "flex flex-col items-center justify-center py-12 space-y-6", children: [
|
|
6263
|
+
/* @__PURE__ */ jsxs10("div", { className: "relative", children: [
|
|
6264
|
+
/* @__PURE__ */ jsx16("div", { className: "h-12 w-12 rounded-full bg-foreground/5 flex items-center justify-center", children: /* @__PURE__ */ jsx16(Sparkles, { className: "h-6 w-6 text-foreground animate-pulse" }) }),
|
|
6265
|
+
/* @__PURE__ */ jsx16("div", { className: "absolute inset-0 rounded-full border-2 border-foreground/20 animate-ping" })
|
|
5711
6266
|
] }),
|
|
5712
|
-
/* @__PURE__ */
|
|
6267
|
+
/* @__PURE__ */ jsx16("div", { className: "space-y-2 w-full max-w-xs", children: CONFIG_STEPS.map((label, i) => /* @__PURE__ */ jsxs10(
|
|
5713
6268
|
"div",
|
|
5714
6269
|
{
|
|
5715
6270
|
className: cn(
|
|
@@ -5719,14 +6274,14 @@ function ConfiguringAnimation({ ready, onDone }) {
|
|
|
5719
6274
|
i > step && "text-muted-foreground/40"
|
|
5720
6275
|
),
|
|
5721
6276
|
children: [
|
|
5722
|
-
/* @__PURE__ */
|
|
6277
|
+
/* @__PURE__ */ jsx16("div", { className: "w-4 flex justify-center", children: i < step ? /* @__PURE__ */ jsx16(CircleCheck, { className: "h-3.5 w-3.5" }) : i === step ? /* @__PURE__ */ jsx16(LoaderCircle, { className: "h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ jsx16("div", { className: "h-1.5 w-1.5 rounded-full bg-current" }) }),
|
|
5723
6278
|
label
|
|
5724
6279
|
]
|
|
5725
6280
|
},
|
|
5726
6281
|
label
|
|
5727
6282
|
)) }),
|
|
5728
|
-
allStepsDone && !ready && /* @__PURE__ */
|
|
5729
|
-
/* @__PURE__ */
|
|
6283
|
+
allStepsDone && !ready && /* @__PURE__ */ jsxs10("div", { className: "flex items-center gap-2 text-sm text-muted-foreground", children: [
|
|
6284
|
+
/* @__PURE__ */ jsx16(LoaderCircle, { className: "h-3.5 w-3.5 animate-spin" }),
|
|
5730
6285
|
"Waiting for AI response..."
|
|
5731
6286
|
] })
|
|
5732
6287
|
] });
|
|
@@ -5736,33 +6291,33 @@ function StepAiWizard() {
|
|
|
5736
6291
|
const dispatch = useWizardDispatch();
|
|
5737
6292
|
const aiChat = usePluginAction4("ai-chat");
|
|
5738
6293
|
const checkAiConfig = usePluginAction4("check-ai-config");
|
|
5739
|
-
const [messages, setMessages] =
|
|
5740
|
-
const [input, setInput] =
|
|
5741
|
-
const [loading, setLoading] =
|
|
5742
|
-
const [phase, setPhase] =
|
|
5743
|
-
const [questionCount, setQuestionCount] =
|
|
5744
|
-
const [loadingMsg, setLoadingMsg] =
|
|
5745
|
-
const [configReady, setConfigReady] =
|
|
5746
|
-
const [configWarning, setConfigWarning] =
|
|
5747
|
-
const scrollRef =
|
|
5748
|
-
const inputRef =
|
|
5749
|
-
const pendingConfigRef =
|
|
5750
|
-
|
|
6294
|
+
const [messages, setMessages] = useState8([]);
|
|
6295
|
+
const [input, setInput] = useState8("");
|
|
6296
|
+
const [loading, setLoading] = useState8(false);
|
|
6297
|
+
const [phase, setPhase] = useState8("describe");
|
|
6298
|
+
const [questionCount, setQuestionCount] = useState8(0);
|
|
6299
|
+
const [loadingMsg, setLoadingMsg] = useState8(LOADING_MESSAGES[0]);
|
|
6300
|
+
const [configReady, setConfigReady] = useState8(false);
|
|
6301
|
+
const [configWarning, setConfigWarning] = useState8(null);
|
|
6302
|
+
const scrollRef = useRef4(null);
|
|
6303
|
+
const inputRef = useRef4(null);
|
|
6304
|
+
const pendingConfigRef = useRef4(null);
|
|
6305
|
+
useEffect4(() => {
|
|
5751
6306
|
checkAiConfig({}).then((result) => {
|
|
5752
6307
|
if (!result.ok) setConfigWarning(result.error);
|
|
5753
6308
|
else setConfigWarning(null);
|
|
5754
6309
|
}).catch(() => {
|
|
5755
6310
|
});
|
|
5756
6311
|
}, []);
|
|
5757
|
-
|
|
6312
|
+
useEffect4(() => {
|
|
5758
6313
|
scrollRef.current?.scrollTo({ top: scrollRef.current.scrollHeight, behavior: "smooth" });
|
|
5759
6314
|
}, [messages, loading]);
|
|
5760
|
-
|
|
6315
|
+
useEffect4(() => {
|
|
5761
6316
|
if (!loading && phase === "interview") {
|
|
5762
6317
|
inputRef.current?.focus();
|
|
5763
6318
|
}
|
|
5764
6319
|
}, [loading, phase]);
|
|
5765
|
-
|
|
6320
|
+
useEffect4(() => {
|
|
5766
6321
|
if (!loading) return;
|
|
5767
6322
|
const interval = setInterval(() => {
|
|
5768
6323
|
setLoadingMsg(LOADING_MESSAGES[Math.floor(Math.random() * LOADING_MESSAGES.length)]);
|
|
@@ -5789,14 +6344,22 @@ function StepAiWizard() {
|
|
|
5789
6344
|
const systemPrompt = interview_system_default.replace("{{CATALOG}}", buildCatalog()).replace("{{CONFIG_FORMAT}}", messages_default.configFormat);
|
|
5790
6345
|
const singleShotPrompt = single_shot_system_default.replace("{{CATALOG}}", buildCatalog()).replace("{{CONFIG_FORMAT}}", messages_default.configFormat);
|
|
5791
6346
|
const callApi = async (allMessages, system) => {
|
|
5792
|
-
const
|
|
6347
|
+
const start = await aiChat({
|
|
6348
|
+
mode: "start",
|
|
5793
6349
|
messages: allMessages.map((m) => ({ role: m.role, content: m.content })),
|
|
5794
6350
|
system: system || systemPrompt
|
|
5795
6351
|
});
|
|
5796
|
-
if (
|
|
5797
|
-
|
|
6352
|
+
if (start.error) throw new Error(start.error);
|
|
6353
|
+
if (!start.jobId) throw new Error("AI did not start a generation job");
|
|
6354
|
+
const POLL_INTERVAL_MS = 1500;
|
|
6355
|
+
const MAX_ATTEMPTS = 320;
|
|
6356
|
+
for (let attempt = 0; attempt < MAX_ATTEMPTS; attempt++) {
|
|
6357
|
+
await new Promise((resolve) => setTimeout(resolve, POLL_INTERVAL_MS));
|
|
6358
|
+
const poll = await aiChat({ mode: "poll", jobId: start.jobId });
|
|
6359
|
+
if (poll.status === "done") return poll.text || "";
|
|
6360
|
+
if (poll.status === "error") throw new Error(poll.error || "AI generation failed");
|
|
5798
6361
|
}
|
|
5799
|
-
|
|
6362
|
+
throw new Error("AI generation timed out. Please try again.");
|
|
5800
6363
|
};
|
|
5801
6364
|
const tryExtractConfig = (text) => {
|
|
5802
6365
|
const candidates = [];
|
|
@@ -6018,11 +6581,28 @@ function StepAiWizard() {
|
|
|
6018
6581
|
}
|
|
6019
6582
|
let parsedProjects;
|
|
6020
6583
|
if (Array.isArray(config.projects)) {
|
|
6021
|
-
parsedProjects = config.projects.map((p) =>
|
|
6022
|
-
|
|
6023
|
-
|
|
6024
|
-
|
|
6025
|
-
|
|
6584
|
+
parsedProjects = config.projects.map((p) => {
|
|
6585
|
+
const workspace = normalizeWorkspaceConfig(p.workspace);
|
|
6586
|
+
const executionWorkspacePolicy = normalizeExecutionWorkspacePolicy(
|
|
6587
|
+
p.executionWorkspacePolicy
|
|
6588
|
+
);
|
|
6589
|
+
const project = {
|
|
6590
|
+
name: String(p.name || ""),
|
|
6591
|
+
description: String(p.description || ""),
|
|
6592
|
+
goals: Array.isArray(p.goals) ? p.goals.map(String) : []
|
|
6593
|
+
};
|
|
6594
|
+
if (workspace) project.workspace = workspace;
|
|
6595
|
+
if (typeof p.workspaceSourceType === "string" && p.workspaceSourceType.trim()) {
|
|
6596
|
+
project.workspaceSourceType = p.workspaceSourceType.trim();
|
|
6597
|
+
}
|
|
6598
|
+
if (typeof p.repoUrl === "string" && p.repoUrl.trim()) project.repoUrl = p.repoUrl.trim();
|
|
6599
|
+
if (typeof p.repoRef === "string" && p.repoRef.trim()) project.repoRef = p.repoRef.trim();
|
|
6600
|
+
if (typeof p.defaultRef === "string" && p.defaultRef.trim()) {
|
|
6601
|
+
project.defaultRef = p.defaultRef.trim();
|
|
6602
|
+
}
|
|
6603
|
+
if (executionWorkspacePolicy) project.executionWorkspacePolicy = executionWorkspacePolicy;
|
|
6604
|
+
return project;
|
|
6605
|
+
});
|
|
6026
6606
|
} else if (config.project) {
|
|
6027
6607
|
parsedProjects = [
|
|
6028
6608
|
{
|
|
@@ -6034,12 +6614,19 @@ function StepAiWizard() {
|
|
|
6034
6614
|
} else {
|
|
6035
6615
|
parsedProjects = [];
|
|
6036
6616
|
}
|
|
6617
|
+
const parsedIssues = Array.isArray(config.issues) ? config.issues.filter((i) => i && (i.title || i.name)).map((i) => ({
|
|
6618
|
+
title: String(i.title || i.name || ""),
|
|
6619
|
+
description: String(i.description || ""),
|
|
6620
|
+
...i.priority ? { priority: String(i.priority) } : {},
|
|
6621
|
+
...i.assignTo ? { assignTo: String(i.assignTo) } : {}
|
|
6622
|
+
})) : [];
|
|
6037
6623
|
dispatch({
|
|
6038
6624
|
type: "APPLY_AI_RESULT",
|
|
6039
6625
|
result: {
|
|
6040
6626
|
companyName: config.name || state.aiDescription.slice(0, 30),
|
|
6041
6627
|
goals: parsedGoals,
|
|
6042
6628
|
projects: parsedProjects,
|
|
6629
|
+
issues: parsedIssues,
|
|
6043
6630
|
presetName: state.presets.some((p) => p.name === config.preset) ? config.preset : "custom",
|
|
6044
6631
|
selectedModules: mergedModules,
|
|
6045
6632
|
selectedRoles: mergedRoles,
|
|
@@ -6059,23 +6646,23 @@ function StepAiWizard() {
|
|
|
6059
6646
|
pendingConfigRef.current = null;
|
|
6060
6647
|
};
|
|
6061
6648
|
if (phase === "describe") {
|
|
6062
|
-
return /* @__PURE__ */
|
|
6063
|
-
/* @__PURE__ */
|
|
6064
|
-
/* @__PURE__ */
|
|
6065
|
-
/* @__PURE__ */
|
|
6066
|
-
/* @__PURE__ */
|
|
6067
|
-
/* @__PURE__ */
|
|
6649
|
+
return /* @__PURE__ */ jsxs10("div", { className: "space-y-6", children: [
|
|
6650
|
+
/* @__PURE__ */ jsxs10("div", { className: "space-y-3", children: [
|
|
6651
|
+
/* @__PURE__ */ jsx16(PhaseIndicator, { phase, questionCount }),
|
|
6652
|
+
/* @__PURE__ */ jsxs10("div", { children: [
|
|
6653
|
+
/* @__PURE__ */ jsx16("h2", { className: "text-xl font-semibold tracking-tight", children: "What are you building?" }),
|
|
6654
|
+
/* @__PURE__ */ jsx16("p", { className: "text-sm text-muted-foreground mt-1", children: "Describe your company or idea. Our AI will interview you and assemble the perfect agent team." })
|
|
6068
6655
|
] })
|
|
6069
6656
|
] }),
|
|
6070
|
-
configWarning && /* @__PURE__ */
|
|
6071
|
-
/* @__PURE__ */
|
|
6072
|
-
/* @__PURE__ */
|
|
6073
|
-
/* @__PURE__ */
|
|
6074
|
-
/* @__PURE__ */
|
|
6075
|
-
/* @__PURE__ */
|
|
6657
|
+
configWarning && /* @__PURE__ */ jsxs10("div", { className: "rounded-lg border border-amber-500/30 bg-amber-500/10 dark:bg-amber-500/5 p-4", children: [
|
|
6658
|
+
/* @__PURE__ */ jsxs10("div", { className: "flex items-start gap-3", children: [
|
|
6659
|
+
/* @__PURE__ */ jsx16(TriangleAlert, { className: "h-5 w-5 text-amber-500 dark:text-amber-400 shrink-0 mt-0.5" }),
|
|
6660
|
+
/* @__PURE__ */ jsxs10("div", { className: "space-y-1", children: [
|
|
6661
|
+
/* @__PURE__ */ jsx16("p", { className: "text-sm font-medium", children: "API key missing" }),
|
|
6662
|
+
/* @__PURE__ */ jsx16("p", { className: "text-sm text-muted-foreground", children: configWarning })
|
|
6076
6663
|
] })
|
|
6077
6664
|
] }),
|
|
6078
|
-
/* @__PURE__ */
|
|
6665
|
+
/* @__PURE__ */ jsx16("div", { className: "mt-3 pl-8", children: /* @__PURE__ */ jsxs10(
|
|
6079
6666
|
Button,
|
|
6080
6667
|
{
|
|
6081
6668
|
variant: "outline",
|
|
@@ -6084,14 +6671,14 @@ function StepAiWizard() {
|
|
|
6084
6671
|
window.location.href = getPluginSettingsUrl();
|
|
6085
6672
|
},
|
|
6086
6673
|
children: [
|
|
6087
|
-
/* @__PURE__ */
|
|
6674
|
+
/* @__PURE__ */ jsx16(Settings, { className: "h-3.5 w-3.5 mr-1.5" }),
|
|
6088
6675
|
"Plugin Settings"
|
|
6089
6676
|
]
|
|
6090
6677
|
}
|
|
6091
6678
|
) })
|
|
6092
6679
|
] }),
|
|
6093
|
-
/* @__PURE__ */
|
|
6094
|
-
/* @__PURE__ */
|
|
6680
|
+
/* @__PURE__ */ jsxs10("div", { className: "space-y-3", children: [
|
|
6681
|
+
/* @__PURE__ */ jsx16(
|
|
6095
6682
|
"textarea",
|
|
6096
6683
|
{
|
|
6097
6684
|
className: "flex min-h-[120px] w-full rounded-lg border border-input bg-transparent px-3 py-2.5 text-sm shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring resize-none",
|
|
@@ -6101,9 +6688,9 @@ function StepAiWizard() {
|
|
|
6101
6688
|
autoFocus: true
|
|
6102
6689
|
}
|
|
6103
6690
|
),
|
|
6104
|
-
/* @__PURE__ */
|
|
6105
|
-
/* @__PURE__ */
|
|
6106
|
-
/* @__PURE__ */
|
|
6691
|
+
/* @__PURE__ */ jsxs10("div", { className: "space-y-1.5", children: [
|
|
6692
|
+
/* @__PURE__ */ jsx16("p", { className: "text-xs text-muted-foreground", children: "Try an example:" }),
|
|
6693
|
+
/* @__PURE__ */ jsx16("div", { className: "flex flex-wrap gap-1.5", children: examples_default.map((prompt) => /* @__PURE__ */ jsx16(
|
|
6107
6694
|
"button",
|
|
6108
6695
|
{
|
|
6109
6696
|
onClick: () => {
|
|
@@ -6117,68 +6704,68 @@ function StepAiWizard() {
|
|
|
6117
6704
|
)) })
|
|
6118
6705
|
] })
|
|
6119
6706
|
] }),
|
|
6120
|
-
/* @__PURE__ */
|
|
6121
|
-
/* @__PURE__ */
|
|
6122
|
-
/* @__PURE__ */
|
|
6707
|
+
/* @__PURE__ */ jsxs10("div", { className: "flex justify-end gap-2", children: [
|
|
6708
|
+
/* @__PURE__ */ jsx16(Button, { variant: "outline", onClick: () => dispatch({ type: "GO_TO", step: "onboarding" }), children: "Back" }),
|
|
6709
|
+
/* @__PURE__ */ jsxs10(
|
|
6123
6710
|
Button,
|
|
6124
6711
|
{
|
|
6125
6712
|
variant: "outline",
|
|
6126
6713
|
onClick: () => quickGenerate(),
|
|
6127
6714
|
disabled: !state.aiDescription.trim(),
|
|
6128
6715
|
children: [
|
|
6129
|
-
/* @__PURE__ */
|
|
6716
|
+
/* @__PURE__ */ jsx16(Zap, { className: "h-4 w-4" }),
|
|
6130
6717
|
"Quick generate"
|
|
6131
6718
|
]
|
|
6132
6719
|
}
|
|
6133
6720
|
),
|
|
6134
|
-
/* @__PURE__ */
|
|
6135
|
-
/* @__PURE__ */
|
|
6721
|
+
/* @__PURE__ */ jsxs10(Button, { onClick: () => startInterview(), disabled: !state.aiDescription.trim(), children: [
|
|
6722
|
+
/* @__PURE__ */ jsx16(MessageSquare, { className: "h-4 w-4" }),
|
|
6136
6723
|
"Interview",
|
|
6137
|
-
/* @__PURE__ */
|
|
6724
|
+
/* @__PURE__ */ jsx16(ArrowRight, { className: "h-3.5 w-3.5" })
|
|
6138
6725
|
] })
|
|
6139
6726
|
] })
|
|
6140
6727
|
] });
|
|
6141
6728
|
}
|
|
6142
6729
|
if (phase === "configuring") {
|
|
6143
|
-
return /* @__PURE__ */
|
|
6144
|
-
/* @__PURE__ */
|
|
6145
|
-
/* @__PURE__ */
|
|
6730
|
+
return /* @__PURE__ */ jsxs10("div", { className: "space-y-6", children: [
|
|
6731
|
+
/* @__PURE__ */ jsx16(PhaseIndicator, { phase, questionCount }),
|
|
6732
|
+
/* @__PURE__ */ jsx16(ConfiguringAnimation, { ready: configReady, onDone: applyConfigToState })
|
|
6146
6733
|
] });
|
|
6147
6734
|
}
|
|
6148
6735
|
if (phase === "review") {
|
|
6149
|
-
return /* @__PURE__ */
|
|
6150
|
-
/* @__PURE__ */
|
|
6151
|
-
/* @__PURE__ */
|
|
6152
|
-
/* @__PURE__ */
|
|
6153
|
-
/* @__PURE__ */
|
|
6154
|
-
/* @__PURE__ */
|
|
6736
|
+
return /* @__PURE__ */ jsxs10("div", { className: "space-y-6", children: [
|
|
6737
|
+
/* @__PURE__ */ jsxs10("div", { className: "space-y-3", children: [
|
|
6738
|
+
/* @__PURE__ */ jsx16(PhaseIndicator, { phase, questionCount }),
|
|
6739
|
+
/* @__PURE__ */ jsxs10("div", { children: [
|
|
6740
|
+
/* @__PURE__ */ jsx16("h2", { className: "text-xl font-semibold tracking-tight", children: "Review configuration" }),
|
|
6741
|
+
/* @__PURE__ */ jsx16("p", { className: "text-sm text-muted-foreground mt-1", children: "Here's what the AI assembled. Adjust anything, then create your company." })
|
|
6155
6742
|
] })
|
|
6156
6743
|
] }),
|
|
6157
|
-
state.aiExplanation && /* @__PURE__ */
|
|
6158
|
-
/* @__PURE__ */
|
|
6159
|
-
/* @__PURE__ */
|
|
6160
|
-
/* @__PURE__ */
|
|
6744
|
+
state.aiExplanation && /* @__PURE__ */ jsx16("div", { className: "rounded-lg border border-foreground/10 bg-accent/50 px-4 py-3", children: /* @__PURE__ */ jsx16("p", { className: "text-sm text-foreground/80 leading-relaxed", children: state.aiExplanation }) }),
|
|
6745
|
+
/* @__PURE__ */ jsx16(ConfigReview, {}),
|
|
6746
|
+
/* @__PURE__ */ jsxs10("div", { className: "flex justify-between", children: [
|
|
6747
|
+
/* @__PURE__ */ jsxs10(
|
|
6161
6748
|
Button,
|
|
6162
6749
|
{
|
|
6163
6750
|
variant: "outline",
|
|
6164
6751
|
onClick: () => setPhase(messages.length > 0 ? "interview" : "describe"),
|
|
6165
6752
|
children: [
|
|
6166
|
-
/* @__PURE__ */
|
|
6753
|
+
/* @__PURE__ */ jsx16(ChevronLeft, { className: "h-3.5 w-3.5" }),
|
|
6167
6754
|
messages.length > 0 ? "Back to interview" : "Back"
|
|
6168
6755
|
]
|
|
6169
6756
|
}
|
|
6170
6757
|
),
|
|
6171
|
-
/* @__PURE__ */
|
|
6172
|
-
/* @__PURE__ */
|
|
6758
|
+
/* @__PURE__ */ jsxs10(Button, { onClick: () => dispatch({ type: "GO_TO", step: "provision" }), children: [
|
|
6759
|
+
/* @__PURE__ */ jsx16(Sparkles, { className: "h-4 w-4" }),
|
|
6173
6760
|
"Create Company"
|
|
6174
6761
|
] })
|
|
6175
6762
|
] })
|
|
6176
6763
|
] });
|
|
6177
6764
|
}
|
|
6178
|
-
return /* @__PURE__ */
|
|
6179
|
-
/* @__PURE__ */
|
|
6180
|
-
/* @__PURE__ */
|
|
6181
|
-
/* @__PURE__ */
|
|
6765
|
+
return /* @__PURE__ */ jsxs10("div", { className: "space-y-4", children: [
|
|
6766
|
+
/* @__PURE__ */ jsxs10("div", { className: "flex items-center justify-between", children: [
|
|
6767
|
+
/* @__PURE__ */ jsx16(PhaseIndicator, { phase, questionCount }),
|
|
6768
|
+
/* @__PURE__ */ jsxs10(
|
|
6182
6769
|
Button,
|
|
6183
6770
|
{
|
|
6184
6771
|
variant: "ghost",
|
|
@@ -6186,58 +6773,58 @@ function StepAiWizard() {
|
|
|
6186
6773
|
onClick: resetInterview,
|
|
6187
6774
|
className: "text-muted-foreground",
|
|
6188
6775
|
children: [
|
|
6189
|
-
/* @__PURE__ */
|
|
6776
|
+
/* @__PURE__ */ jsx16(RotateCcw, { className: "h-3 w-3" }),
|
|
6190
6777
|
"Reset"
|
|
6191
6778
|
]
|
|
6192
6779
|
}
|
|
6193
6780
|
)
|
|
6194
6781
|
] }),
|
|
6195
|
-
/* @__PURE__ */
|
|
6782
|
+
/* @__PURE__ */ jsxs10(
|
|
6196
6783
|
"div",
|
|
6197
6784
|
{
|
|
6198
6785
|
ref: scrollRef,
|
|
6199
6786
|
className: "space-y-4 max-h-[420px] overflow-y-auto rounded-lg border bg-accent/20 p-4",
|
|
6200
6787
|
children: [
|
|
6201
|
-
messages.map((msg, i) => /* @__PURE__ */
|
|
6788
|
+
messages.map((msg, i) => /* @__PURE__ */ jsxs10(
|
|
6202
6789
|
"div",
|
|
6203
6790
|
{
|
|
6204
6791
|
className: cn("flex gap-2.5 items-start", msg.role === "user" && "flex-row-reverse"),
|
|
6205
6792
|
children: [
|
|
6206
|
-
/* @__PURE__ */
|
|
6793
|
+
/* @__PURE__ */ jsx16(
|
|
6207
6794
|
"div",
|
|
6208
6795
|
{
|
|
6209
6796
|
className: cn(
|
|
6210
6797
|
"h-7 w-7 rounded-full flex items-center justify-center shrink-0",
|
|
6211
6798
|
msg.role === "user" ? "bg-foreground text-background" : "bg-background border border-border"
|
|
6212
6799
|
),
|
|
6213
|
-
children: msg.role === "user" ? /* @__PURE__ */
|
|
6800
|
+
children: msg.role === "user" ? /* @__PURE__ */ jsx16(User, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ jsx16(Sparkles, { className: "h-3.5 w-3.5" })
|
|
6214
6801
|
}
|
|
6215
6802
|
),
|
|
6216
|
-
/* @__PURE__ */
|
|
6803
|
+
/* @__PURE__ */ jsx16(
|
|
6217
6804
|
"div",
|
|
6218
6805
|
{
|
|
6219
6806
|
className: cn(
|
|
6220
6807
|
"rounded-lg px-3 py-2 max-w-[85%]",
|
|
6221
6808
|
msg.role === "user" ? "bg-foreground text-background" : "bg-background border border-border"
|
|
6222
6809
|
),
|
|
6223
|
-
children: /* @__PURE__ */
|
|
6810
|
+
children: /* @__PURE__ */ jsx16("div", { className: "text-sm whitespace-pre-wrap leading-relaxed", children: msg.content })
|
|
6224
6811
|
}
|
|
6225
6812
|
)
|
|
6226
6813
|
]
|
|
6227
6814
|
},
|
|
6228
6815
|
i
|
|
6229
6816
|
)),
|
|
6230
|
-
loading && /* @__PURE__ */
|
|
6231
|
-
/* @__PURE__ */
|
|
6232
|
-
/* @__PURE__ */
|
|
6233
|
-
/* @__PURE__ */
|
|
6817
|
+
loading && /* @__PURE__ */ jsxs10("div", { className: "flex gap-2.5 items-start", children: [
|
|
6818
|
+
/* @__PURE__ */ jsx16("div", { className: "h-7 w-7 rounded-full flex items-center justify-center shrink-0 bg-background border border-border", children: /* @__PURE__ */ jsx16(Sparkles, { className: "h-3.5 w-3.5 animate-pulse" }) }),
|
|
6819
|
+
/* @__PURE__ */ jsx16("div", { className: "rounded-lg px-3 py-2 bg-background border border-border", children: /* @__PURE__ */ jsxs10("div", { className: "flex items-center gap-2 text-sm text-muted-foreground", children: [
|
|
6820
|
+
/* @__PURE__ */ jsx16(LoaderCircle, { className: "h-3.5 w-3.5 animate-spin" }),
|
|
6234
6821
|
loadingMsg
|
|
6235
6822
|
] }) })
|
|
6236
6823
|
] })
|
|
6237
6824
|
]
|
|
6238
6825
|
}
|
|
6239
6826
|
),
|
|
6240
|
-
!loading && /* @__PURE__ */
|
|
6827
|
+
!loading && /* @__PURE__ */ jsxs10(
|
|
6241
6828
|
"button",
|
|
6242
6829
|
{
|
|
6243
6830
|
onClick: requestConfig,
|
|
@@ -6246,14 +6833,14 @@ function StepAiWizard() {
|
|
|
6246
6833
|
questionCount >= 3 ? "border-foreground/30 hover:border-foreground/50 hover:bg-accent/50" : "border-border hover:border-foreground/20 hover:bg-accent/30 text-muted-foreground"
|
|
6247
6834
|
),
|
|
6248
6835
|
children: [
|
|
6249
|
-
/* @__PURE__ */
|
|
6836
|
+
/* @__PURE__ */ jsx16(Sparkles, { className: "h-4 w-4" }),
|
|
6250
6837
|
questionCount >= 3 ? "Generate configuration" : "Skip \u2014 generate now",
|
|
6251
|
-
/* @__PURE__ */
|
|
6838
|
+
/* @__PURE__ */ jsx16(ArrowRight, { className: "h-3.5 w-3.5" })
|
|
6252
6839
|
]
|
|
6253
6840
|
}
|
|
6254
6841
|
),
|
|
6255
|
-
/* @__PURE__ */
|
|
6256
|
-
/* @__PURE__ */
|
|
6842
|
+
/* @__PURE__ */ jsxs10("div", { className: "flex gap-2", children: [
|
|
6843
|
+
/* @__PURE__ */ jsx16(
|
|
6257
6844
|
"input",
|
|
6258
6845
|
{
|
|
6259
6846
|
ref: inputRef,
|
|
@@ -6267,14 +6854,14 @@ function StepAiWizard() {
|
|
|
6267
6854
|
autoFocus: true
|
|
6268
6855
|
}
|
|
6269
6856
|
),
|
|
6270
|
-
/* @__PURE__ */
|
|
6857
|
+
/* @__PURE__ */ jsx16(
|
|
6271
6858
|
Button,
|
|
6272
6859
|
{
|
|
6273
6860
|
size: "sm",
|
|
6274
6861
|
onClick: sendMessage,
|
|
6275
6862
|
disabled: !input.trim() || loading,
|
|
6276
6863
|
className: "rounded-lg",
|
|
6277
|
-
children: /* @__PURE__ */
|
|
6864
|
+
children: /* @__PURE__ */ jsx16(Send, { className: "h-3.5 w-3.5" })
|
|
6278
6865
|
}
|
|
6279
6866
|
)
|
|
6280
6867
|
] })
|
|
@@ -6282,9 +6869,9 @@ function StepAiWizard() {
|
|
|
6282
6869
|
}
|
|
6283
6870
|
|
|
6284
6871
|
// src/ui/components/steps/StepProvision.tsx
|
|
6285
|
-
import { useEffect as
|
|
6872
|
+
import { useEffect as useEffect5, useRef as useRef5 } from "react";
|
|
6286
6873
|
import { usePluginAction as usePluginAction5 } from "@paperclipai/plugin-sdk/ui";
|
|
6287
|
-
import { jsx as
|
|
6874
|
+
import { jsx as jsx17, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
6288
6875
|
function isConfigError(error) {
|
|
6289
6876
|
return /authenticat|PAPERCLIP_EMAIL|PAPERCLIP_PASSWORD|paperclipEmail|paperclipPassword|credentials|unauthorized|forbidden/i.test(
|
|
6290
6877
|
error
|
|
@@ -6293,13 +6880,13 @@ function isConfigError(error) {
|
|
|
6293
6880
|
function StepProvision() {
|
|
6294
6881
|
const state = useWizard();
|
|
6295
6882
|
const dispatch = useWizardDispatch();
|
|
6296
|
-
const started =
|
|
6297
|
-
const logEndRef =
|
|
6883
|
+
const started = useRef5(false);
|
|
6884
|
+
const logEndRef = useRef5(null);
|
|
6298
6885
|
const startProvision = usePluginAction5("start-provision");
|
|
6299
|
-
|
|
6886
|
+
useEffect5(() => {
|
|
6300
6887
|
logEndRef.current?.scrollIntoView({ behavior: "smooth" });
|
|
6301
6888
|
}, [state.provisionLog]);
|
|
6302
|
-
|
|
6889
|
+
useEffect5(() => {
|
|
6303
6890
|
if (started.current) return;
|
|
6304
6891
|
started.current = true;
|
|
6305
6892
|
dispatch({ type: "SET_PROVISIONING", value: true });
|
|
@@ -6311,6 +6898,7 @@ function StepProvision() {
|
|
|
6311
6898
|
companyDescription: state.companyDescription || void 0,
|
|
6312
6899
|
goals: state.goals.length > 0 ? state.goals : void 0,
|
|
6313
6900
|
projects: state.projects.length > 0 ? state.projects : void 0,
|
|
6901
|
+
issues: state.issues.length > 0 ? state.issues : void 0,
|
|
6314
6902
|
ceoAdapter: state.ceoAdapter,
|
|
6315
6903
|
presetName: state.presetName,
|
|
6316
6904
|
selectedModules: state.selectedModules,
|
|
@@ -6341,32 +6929,32 @@ function StepProvision() {
|
|
|
6341
6929
|
}, []);
|
|
6342
6930
|
const isDone = !state.provisioning && state.provisionResult;
|
|
6343
6931
|
const showConfigHint = state.error && isConfigError(state.error);
|
|
6344
|
-
return /* @__PURE__ */
|
|
6345
|
-
/* @__PURE__ */
|
|
6346
|
-
/* @__PURE__ */
|
|
6347
|
-
state.provisioning && /* @__PURE__ */
|
|
6932
|
+
return /* @__PURE__ */ jsxs11("div", { className: "space-y-6", children: [
|
|
6933
|
+
/* @__PURE__ */ jsxs11("div", { className: "space-y-2", children: [
|
|
6934
|
+
/* @__PURE__ */ jsxs11("h2", { className: "text-xl font-semibold tracking-tight flex items-center gap-2", children: [
|
|
6935
|
+
state.provisioning && /* @__PURE__ */ jsx17(LoaderCircle, { className: "h-5 w-5 animate-spin" }),
|
|
6348
6936
|
state.provisioning ? "Provisioning..." : state.error ? "Error" : "Provisioned"
|
|
6349
6937
|
] }),
|
|
6350
|
-
isDone && /* @__PURE__ */
|
|
6938
|
+
isDone && /* @__PURE__ */ jsx17("p", { className: "text-sm text-muted-foreground", children: "Company created. CEO will bootstrap the team on first heartbeat." })
|
|
6351
6939
|
] }),
|
|
6352
|
-
showConfigHint && /* @__PURE__ */
|
|
6353
|
-
/* @__PURE__ */
|
|
6354
|
-
/* @__PURE__ */
|
|
6355
|
-
/* @__PURE__ */
|
|
6356
|
-
/* @__PURE__ */
|
|
6357
|
-
/* @__PURE__ */
|
|
6940
|
+
showConfigHint && /* @__PURE__ */ jsxs11("div", { className: "rounded-lg border border-amber-500/30 bg-amber-500/10 dark:bg-amber-500/5 p-4 space-y-3", children: [
|
|
6941
|
+
/* @__PURE__ */ jsxs11("div", { className: "flex items-start gap-3", children: [
|
|
6942
|
+
/* @__PURE__ */ jsx17(TriangleAlert, { className: "h-5 w-5 text-amber-500 dark:text-amber-400 shrink-0 mt-0.5" }),
|
|
6943
|
+
/* @__PURE__ */ jsxs11("div", { className: "space-y-1", children: [
|
|
6944
|
+
/* @__PURE__ */ jsx17("p", { className: "text-sm font-medium", children: "Authentication required" }),
|
|
6945
|
+
/* @__PURE__ */ jsxs11("p", { className: "text-sm text-muted-foreground", children: [
|
|
6358
6946
|
"This Paperclip instance requires credentials. Configure",
|
|
6359
6947
|
" ",
|
|
6360
|
-
/* @__PURE__ */
|
|
6948
|
+
/* @__PURE__ */ jsx17("span", { className: "font-medium", children: "paperclipEmail" }),
|
|
6361
6949
|
" and",
|
|
6362
6950
|
" ",
|
|
6363
|
-
/* @__PURE__ */
|
|
6951
|
+
/* @__PURE__ */ jsx17("span", { className: "font-medium", children: "paperclipPassword" }),
|
|
6364
6952
|
" in the plugin settings."
|
|
6365
6953
|
] })
|
|
6366
6954
|
] })
|
|
6367
6955
|
] }),
|
|
6368
|
-
/* @__PURE__ */
|
|
6369
|
-
/* @__PURE__ */
|
|
6956
|
+
/* @__PURE__ */ jsxs11("div", { className: "flex items-center gap-2 pl-8", children: [
|
|
6957
|
+
/* @__PURE__ */ jsxs11(
|
|
6370
6958
|
Button,
|
|
6371
6959
|
{
|
|
6372
6960
|
variant: "outline",
|
|
@@ -6375,12 +6963,12 @@ function StepProvision() {
|
|
|
6375
6963
|
window.location.href = getPluginSettingsUrl();
|
|
6376
6964
|
},
|
|
6377
6965
|
children: [
|
|
6378
|
-
/* @__PURE__ */
|
|
6966
|
+
/* @__PURE__ */ jsx17(Settings, { className: "h-3.5 w-3.5 mr-1.5" }),
|
|
6379
6967
|
"Plugin Settings"
|
|
6380
6968
|
]
|
|
6381
6969
|
}
|
|
6382
6970
|
),
|
|
6383
|
-
/* @__PURE__ */
|
|
6971
|
+
/* @__PURE__ */ jsxs11(
|
|
6384
6972
|
Button,
|
|
6385
6973
|
{
|
|
6386
6974
|
variant: "ghost",
|
|
@@ -6392,22 +6980,22 @@ function StepProvision() {
|
|
|
6392
6980
|
dispatch({ type: "GO_TO", step: state.path === "ai" ? "ai-wizard" : "summary" });
|
|
6393
6981
|
},
|
|
6394
6982
|
children: [
|
|
6395
|
-
/* @__PURE__ */
|
|
6983
|
+
/* @__PURE__ */ jsx17(RotateCcw, { className: "h-3.5 w-3.5 mr-1.5" }),
|
|
6396
6984
|
"Back to Summary"
|
|
6397
6985
|
]
|
|
6398
6986
|
}
|
|
6399
6987
|
)
|
|
6400
6988
|
] })
|
|
6401
6989
|
] }),
|
|
6402
|
-
state.error && !showConfigHint && /* @__PURE__ */
|
|
6403
|
-
/* @__PURE__ */
|
|
6404
|
-
/* @__PURE__ */
|
|
6405
|
-
/* @__PURE__ */
|
|
6406
|
-
/* @__PURE__ */
|
|
6407
|
-
/* @__PURE__ */
|
|
6990
|
+
state.error && !showConfigHint && /* @__PURE__ */ jsxs11("div", { className: "rounded-lg border border-destructive/30 bg-destructive/5 p-4 space-y-3", children: [
|
|
6991
|
+
/* @__PURE__ */ jsxs11("div", { className: "flex items-start gap-3", children: [
|
|
6992
|
+
/* @__PURE__ */ jsx17(TriangleAlert, { className: "h-5 w-5 text-destructive shrink-0 mt-0.5" }),
|
|
6993
|
+
/* @__PURE__ */ jsxs11("div", { className: "space-y-1", children: [
|
|
6994
|
+
/* @__PURE__ */ jsx17("p", { className: "text-sm font-medium", children: "Provisioning failed" }),
|
|
6995
|
+
/* @__PURE__ */ jsx17("p", { className: "text-sm text-muted-foreground", children: state.error })
|
|
6408
6996
|
] })
|
|
6409
6997
|
] }),
|
|
6410
|
-
/* @__PURE__ */
|
|
6998
|
+
/* @__PURE__ */ jsx17("div", { className: "pl-8", children: /* @__PURE__ */ jsxs11(
|
|
6411
6999
|
Button,
|
|
6412
7000
|
{
|
|
6413
7001
|
variant: "ghost",
|
|
@@ -6419,14 +7007,14 @@ function StepProvision() {
|
|
|
6419
7007
|
dispatch({ type: "GO_TO", step: state.path === "ai" ? "ai-wizard" : "summary" });
|
|
6420
7008
|
},
|
|
6421
7009
|
children: [
|
|
6422
|
-
/* @__PURE__ */
|
|
7010
|
+
/* @__PURE__ */ jsx17(RotateCcw, { className: "h-3.5 w-3.5 mr-1.5" }),
|
|
6423
7011
|
"Back to Summary"
|
|
6424
7012
|
]
|
|
6425
7013
|
}
|
|
6426
7014
|
) })
|
|
6427
7015
|
] }),
|
|
6428
|
-
/* @__PURE__ */
|
|
6429
|
-
state.provisionLog.map((line, i) => /* @__PURE__ */
|
|
7016
|
+
/* @__PURE__ */ jsxs11("div", { className: "rounded-lg border bg-card p-4 font-mono text-xs max-h-[400px] overflow-y-auto", children: [
|
|
7017
|
+
state.provisionLog.map((line, i) => /* @__PURE__ */ jsx17(
|
|
6430
7018
|
"div",
|
|
6431
7019
|
{
|
|
6432
7020
|
className: line.startsWith("\u2713") ? "text-green-600 py-0.5" : line.startsWith("!") ? "text-yellow-600 py-0.5" : line.startsWith("Error") ? "text-destructive py-0.5" : line.startsWith("+") || line.startsWith(" ") ? "text-foreground pl-2 py-0.5 bg-muted/50 rounded my-0.5" : "text-muted-foreground py-0.5",
|
|
@@ -6434,79 +7022,79 @@ function StepProvision() {
|
|
|
6434
7022
|
},
|
|
6435
7023
|
i
|
|
6436
7024
|
)),
|
|
6437
|
-
/* @__PURE__ */
|
|
7025
|
+
/* @__PURE__ */ jsx17("div", { ref: logEndRef })
|
|
6438
7026
|
] })
|
|
6439
7027
|
] });
|
|
6440
7028
|
}
|
|
6441
7029
|
|
|
6442
7030
|
// src/ui/components/steps/StepDone.tsx
|
|
6443
|
-
import { jsx as
|
|
7031
|
+
import { jsx as jsx18, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
6444
7032
|
function StepDone() {
|
|
6445
7033
|
const state = useWizard();
|
|
6446
7034
|
const dispatch = useWizardDispatch();
|
|
6447
7035
|
const allRoles = getAllRoles(state);
|
|
6448
7036
|
const result = state.provisionResult;
|
|
6449
|
-
return /* @__PURE__ */
|
|
6450
|
-
/* @__PURE__ */
|
|
6451
|
-
/* @__PURE__ */
|
|
6452
|
-
/* @__PURE__ */
|
|
6453
|
-
/* @__PURE__ */
|
|
6454
|
-
/* @__PURE__ */
|
|
7037
|
+
return /* @__PURE__ */ jsxs12("div", { className: "space-y-6", children: [
|
|
7038
|
+
/* @__PURE__ */ jsxs12("div", { className: "flex items-start gap-3", children: [
|
|
7039
|
+
/* @__PURE__ */ jsx18(CircleCheck, { className: "h-6 w-6 text-green-600 shrink-0 mt-0.5" }),
|
|
7040
|
+
/* @__PURE__ */ jsxs12("div", { children: [
|
|
7041
|
+
/* @__PURE__ */ jsx18("h2", { className: "text-xl font-semibold tracking-tight", children: state.companyName }),
|
|
7042
|
+
/* @__PURE__ */ jsx18("p", { className: "text-sm text-muted-foreground mt-1", children: state.existingCompanyId ? "Workspace has been assembled and bootstrap tasks were added to the existing Paperclip company." : "Company has been assembled and registered with Paperclip." })
|
|
6455
7043
|
] })
|
|
6456
7044
|
] }),
|
|
6457
|
-
/* @__PURE__ */
|
|
6458
|
-
state.goals[0]?.title && /* @__PURE__ */
|
|
6459
|
-
/* @__PURE__ */
|
|
6460
|
-
/* @__PURE__ */
|
|
7045
|
+
/* @__PURE__ */ jsx18(Card, { children: /* @__PURE__ */ jsxs12(CardContent, { className: "pt-6 space-y-4", children: [
|
|
7046
|
+
state.goals[0]?.title && /* @__PURE__ */ jsxs12("div", { children: [
|
|
7047
|
+
/* @__PURE__ */ jsx18("p", { className: "text-xs font-medium text-muted-foreground uppercase tracking-wider mb-1", children: "Goal" }),
|
|
7048
|
+
/* @__PURE__ */ jsx18("p", { className: "text-sm", children: state.goals[0].title })
|
|
6461
7049
|
] }),
|
|
6462
|
-
/* @__PURE__ */
|
|
6463
|
-
/* @__PURE__ */
|
|
7050
|
+
/* @__PURE__ */ jsxs12("div", { children: [
|
|
7051
|
+
/* @__PURE__ */ jsxs12("p", { className: "text-xs font-medium text-muted-foreground uppercase tracking-wider mb-2", children: [
|
|
6464
7052
|
"Team (",
|
|
6465
7053
|
allRoles.length,
|
|
6466
7054
|
" agents)"
|
|
6467
7055
|
] }),
|
|
6468
|
-
/* @__PURE__ */
|
|
7056
|
+
/* @__PURE__ */ jsx18("div", { className: "flex flex-wrap gap-1.5", children: allRoles.map((r2) => {
|
|
6469
7057
|
const role = state.roles.find((ro) => ro.name === r2);
|
|
6470
|
-
return /* @__PURE__ */
|
|
7058
|
+
return /* @__PURE__ */ jsx18(Badge, { variant: "outline", className: "text-xs", children: role?.title || r2 }, r2);
|
|
6471
7059
|
}) })
|
|
6472
7060
|
] }),
|
|
6473
|
-
/* @__PURE__ */
|
|
6474
|
-
/* @__PURE__ */
|
|
7061
|
+
/* @__PURE__ */ jsxs12("div", { children: [
|
|
7062
|
+
/* @__PURE__ */ jsxs12("p", { className: "text-xs font-medium text-muted-foreground uppercase tracking-wider mb-2", children: [
|
|
6475
7063
|
"Modules (",
|
|
6476
7064
|
state.selectedModules.length,
|
|
6477
7065
|
")"
|
|
6478
7066
|
] }),
|
|
6479
|
-
/* @__PURE__ */
|
|
7067
|
+
/* @__PURE__ */ jsx18("div", { className: "flex flex-wrap gap-1.5", children: state.selectedModules.map((m) => /* @__PURE__ */ jsx18(Badge, { variant: "secondary", className: "text-xs", children: m }, m)) })
|
|
6480
7068
|
] }),
|
|
6481
|
-
result?.issueIds && result.issueIds.length > 0 && /* @__PURE__ */
|
|
6482
|
-
/* @__PURE__ */
|
|
6483
|
-
/* @__PURE__ */
|
|
7069
|
+
result?.issueIds && result.issueIds.length > 0 && /* @__PURE__ */ jsxs12("div", { children: [
|
|
7070
|
+
/* @__PURE__ */ jsx18("p", { className: "text-xs font-medium text-muted-foreground uppercase tracking-wider mb-1", children: "Issues" }),
|
|
7071
|
+
/* @__PURE__ */ jsxs12("p", { className: "text-sm", children: [
|
|
6484
7072
|
result.issueIds.length,
|
|
6485
7073
|
" issues provisioned"
|
|
6486
7074
|
] })
|
|
6487
7075
|
] }),
|
|
6488
|
-
state.presetName && /* @__PURE__ */
|
|
6489
|
-
/* @__PURE__ */
|
|
6490
|
-
/* @__PURE__ */
|
|
7076
|
+
state.presetName && /* @__PURE__ */ jsxs12("div", { children: [
|
|
7077
|
+
/* @__PURE__ */ jsx18("p", { className: "text-xs font-medium text-muted-foreground uppercase tracking-wider mb-1", children: "Preset" }),
|
|
7078
|
+
/* @__PURE__ */ jsx18("p", { className: "text-sm capitalize", children: state.presetName })
|
|
6491
7079
|
] }),
|
|
6492
|
-
result?.companyId && /* @__PURE__ */
|
|
6493
|
-
/* @__PURE__ */
|
|
6494
|
-
/* @__PURE__ */
|
|
7080
|
+
result?.companyId && /* @__PURE__ */ jsxs12("div", { children: [
|
|
7081
|
+
/* @__PURE__ */ jsx18("p", { className: "text-xs font-medium text-muted-foreground uppercase tracking-wider mb-1", children: "Company ID" }),
|
|
7082
|
+
/* @__PURE__ */ jsx18("p", { className: "font-mono text-xs", children: result.companyId })
|
|
6495
7083
|
] })
|
|
6496
7084
|
] }) }),
|
|
6497
|
-
/* @__PURE__ */
|
|
6498
|
-
/* @__PURE__ */
|
|
6499
|
-
/* @__PURE__ */
|
|
7085
|
+
/* @__PURE__ */ jsxs12("div", { className: "flex gap-3", children: [
|
|
7086
|
+
/* @__PURE__ */ jsxs12(Button, { variant: "outline", onClick: () => dispatch({ type: "RESET" }), children: [
|
|
7087
|
+
/* @__PURE__ */ jsx18(RotateCcw, { className: "h-4 w-4" }),
|
|
6500
7088
|
"Create another"
|
|
6501
7089
|
] }),
|
|
6502
|
-
/* @__PURE__ */
|
|
7090
|
+
/* @__PURE__ */ jsx18(Button, { asChild: true, children: /* @__PURE__ */ jsxs12(
|
|
6503
7091
|
"a",
|
|
6504
7092
|
{
|
|
6505
7093
|
href: result?.paperclipUrl && result?.issuePrefix ? `${result.paperclipUrl}/${result.issuePrefix}/dashboard` : result?.paperclipUrl || "http://localhost:3100",
|
|
6506
7094
|
target: "_blank",
|
|
6507
7095
|
rel: "noopener noreferrer",
|
|
6508
7096
|
children: [
|
|
6509
|
-
/* @__PURE__ */
|
|
7097
|
+
/* @__PURE__ */ jsx18(ExternalLink, { className: "h-4 w-4" }),
|
|
6510
7098
|
"Open Paperclip"
|
|
6511
7099
|
]
|
|
6512
7100
|
}
|
|
@@ -6516,11 +7104,12 @@ function StepDone() {
|
|
|
6516
7104
|
}
|
|
6517
7105
|
|
|
6518
7106
|
// src/ui/components/WizardShell.tsx
|
|
6519
|
-
import { jsx as
|
|
7107
|
+
import { jsx as jsx19, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
6520
7108
|
var STEP_COMPONENTS = {
|
|
6521
7109
|
onboarding: StepOnboarding,
|
|
6522
7110
|
name: StepName,
|
|
6523
7111
|
goal: StepGoal,
|
|
7112
|
+
repository: StepRepository,
|
|
6524
7113
|
preset: StepPreset,
|
|
6525
7114
|
modules: StepModules,
|
|
6526
7115
|
roles: StepRoles,
|
|
@@ -6535,15 +7124,15 @@ function StepIndicator() {
|
|
|
6535
7124
|
const total = getTotalSteps(state);
|
|
6536
7125
|
if (current < 1 || state.step === "provision" || state.step === "done" || state.step === "ai-wizard")
|
|
6537
7126
|
return null;
|
|
6538
|
-
return /* @__PURE__ */
|
|
6539
|
-
Array.from({ length: total }, (_, i) => /* @__PURE__ */
|
|
7127
|
+
return /* @__PURE__ */ jsxs13("div", { className: "flex items-center gap-1.5", children: [
|
|
7128
|
+
Array.from({ length: total }, (_, i) => /* @__PURE__ */ jsx19(
|
|
6540
7129
|
"div",
|
|
6541
7130
|
{
|
|
6542
7131
|
className: `h-1.5 rounded-full transition-all duration-300 ${i + 1 <= current ? "w-6 bg-foreground" : "w-1.5 bg-muted-foreground/30"}`
|
|
6543
7132
|
},
|
|
6544
7133
|
i
|
|
6545
7134
|
)),
|
|
6546
|
-
/* @__PURE__ */
|
|
7135
|
+
/* @__PURE__ */ jsxs13("span", { className: "ml-2 text-xs text-muted-foreground", children: [
|
|
6547
7136
|
current,
|
|
6548
7137
|
"/",
|
|
6549
7138
|
total
|
|
@@ -6554,15 +7143,15 @@ function WizardShell() {
|
|
|
6554
7143
|
const state = useWizard();
|
|
6555
7144
|
const dispatch = useWizardDispatch();
|
|
6556
7145
|
const StepComponent = STEP_COMPONENTS[state.step];
|
|
6557
|
-
|
|
7146
|
+
useEffect6(() => {
|
|
6558
7147
|
window.scrollTo({ top: 0 });
|
|
6559
7148
|
}, [state.step]);
|
|
6560
|
-
return /* @__PURE__ */
|
|
6561
|
-
getUserStepIndex(state) >= 1 && state.step !== "provision" && state.step !== "done" && /* @__PURE__ */
|
|
6562
|
-
/* @__PURE__ */
|
|
6563
|
-
state.error && /* @__PURE__ */
|
|
6564
|
-
/* @__PURE__ */
|
|
6565
|
-
/* @__PURE__ */
|
|
7149
|
+
return /* @__PURE__ */ jsxs13("div", { className: "flex flex-col", children: [
|
|
7150
|
+
getUserStepIndex(state) >= 1 && state.step !== "provision" && state.step !== "done" && /* @__PURE__ */ jsx19("div", { className: "flex items-center justify-end px-6 py-3", children: /* @__PURE__ */ jsx19(StepIndicator, {}) }),
|
|
7151
|
+
/* @__PURE__ */ jsx19("main", { className: "flex-1 flex items-start justify-center p-6", children: /* @__PURE__ */ jsx19("div", { className: "w-full max-w-2xl", children: /* @__PURE__ */ jsx19(StepComponent, {}) }) }),
|
|
7152
|
+
state.error && /* @__PURE__ */ jsxs13("div", { className: "fixed bottom-0 inset-x-0 bg-destructive/10 border-t border-destructive/20 px-6 py-3 text-sm text-destructive flex items-center justify-between", children: [
|
|
7153
|
+
/* @__PURE__ */ jsx19("span", { children: state.error }),
|
|
7154
|
+
/* @__PURE__ */ jsx19(
|
|
6566
7155
|
Button,
|
|
6567
7156
|
{
|
|
6568
7157
|
variant: "ghost",
|
|
@@ -6576,30 +7165,30 @@ function WizardShell() {
|
|
|
6576
7165
|
}
|
|
6577
7166
|
|
|
6578
7167
|
// src/ui/index.tsx
|
|
6579
|
-
import { jsx as
|
|
7168
|
+
import { jsx as jsx20, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
6580
7169
|
function WizardPage(_props) {
|
|
6581
7170
|
const { data: templates, loading, error } = usePluginData("templates");
|
|
6582
7171
|
if (error) {
|
|
6583
|
-
return /* @__PURE__ */
|
|
7172
|
+
return /* @__PURE__ */ jsxs14("div", { className: "flex items-center justify-center min-h-[400px] text-sm text-destructive", children: [
|
|
6584
7173
|
"Failed to load templates: ",
|
|
6585
7174
|
error.message
|
|
6586
7175
|
] });
|
|
6587
7176
|
}
|
|
6588
7177
|
if (loading || !templates) {
|
|
6589
|
-
return /* @__PURE__ */
|
|
6590
|
-
/* @__PURE__ */
|
|
6591
|
-
/* @__PURE__ */
|
|
6592
|
-
/* @__PURE__ */
|
|
6593
|
-
/* @__PURE__ */
|
|
7178
|
+
return /* @__PURE__ */ jsxs14("div", { className: "flex flex-col items-center justify-center min-h-[400px] gap-4 text-center px-6", children: [
|
|
7179
|
+
/* @__PURE__ */ jsx20(LoaderCircle, { className: "h-6 w-6 animate-spin text-muted-foreground" }),
|
|
7180
|
+
/* @__PURE__ */ jsxs14("div", { className: "space-y-1.5", children: [
|
|
7181
|
+
/* @__PURE__ */ jsx20("p", { className: "text-sm font-medium", children: "Loading templates" }),
|
|
7182
|
+
/* @__PURE__ */ jsx20("p", { className: "text-xs text-muted-foreground max-w-xs", children: "Checking your templates directory. If no local templates are found, they'll be downloaded from GitHub \u2014 this may take a moment." })
|
|
6594
7183
|
] })
|
|
6595
7184
|
] });
|
|
6596
7185
|
}
|
|
6597
|
-
return /* @__PURE__ */
|
|
6598
|
-
templates.loadErrors && templates.loadErrors.length > 0 && /* @__PURE__ */
|
|
6599
|
-
/* @__PURE__ */
|
|
6600
|
-
/* @__PURE__ */
|
|
6601
|
-
/* @__PURE__ */
|
|
6602
|
-
/* @__PURE__ */
|
|
7186
|
+
return /* @__PURE__ */ jsxs14("div", { className: "space-y-3", children: [
|
|
7187
|
+
templates.loadErrors && templates.loadErrors.length > 0 && /* @__PURE__ */ jsx20("div", { className: "mx-4 mt-4 rounded-lg border border-amber-500/30 bg-amber-500/10 p-3 text-xs text-amber-800 dark:text-amber-200", children: /* @__PURE__ */ jsxs14("div", { className: "flex items-start gap-2", children: [
|
|
7188
|
+
/* @__PURE__ */ jsx20(TriangleAlert, { className: "h-4 w-4 shrink-0 mt-0.5" }),
|
|
7189
|
+
/* @__PURE__ */ jsxs14("div", { children: [
|
|
7190
|
+
/* @__PURE__ */ jsx20("p", { className: "font-medium", children: "Some template files could not be loaded" }),
|
|
7191
|
+
/* @__PURE__ */ jsxs14("p", { className: "mt-0.5 text-amber-700 dark:text-amber-300", children: [
|
|
6603
7192
|
templates.loadErrors.length,
|
|
6604
7193
|
" parse warning",
|
|
6605
7194
|
templates.loadErrors.length > 1 ? "s" : "",
|
|
@@ -6607,7 +7196,7 @@ function WizardPage(_props) {
|
|
|
6607
7196
|
] })
|
|
6608
7197
|
] })
|
|
6609
7198
|
] }) }),
|
|
6610
|
-
/* @__PURE__ */
|
|
7199
|
+
/* @__PURE__ */ jsx20(WizardProvider, { templates, children: /* @__PURE__ */ jsx20(WizardShell, {}) })
|
|
6611
7200
|
] });
|
|
6612
7201
|
}
|
|
6613
7202
|
function ToolbarButton({ context }) {
|
|
@@ -6618,7 +7207,7 @@ function ToolbarButton({ context }) {
|
|
|
6618
7207
|
if (href !== "#") window.history.pushState({}, "", href);
|
|
6619
7208
|
window.dispatchEvent(new PopStateEvent("popstate"));
|
|
6620
7209
|
};
|
|
6621
|
-
return /* @__PURE__ */
|
|
7210
|
+
return /* @__PURE__ */ jsx20(
|
|
6622
7211
|
"a",
|
|
6623
7212
|
{
|
|
6624
7213
|
href,
|
|
@@ -6648,7 +7237,7 @@ function SidebarLink({ context }) {
|
|
|
6648
7237
|
if (href !== "#") window.history.pushState({}, "", href);
|
|
6649
7238
|
window.dispatchEvent(new PopStateEvent("popstate"));
|
|
6650
7239
|
};
|
|
6651
|
-
return /* @__PURE__ */
|
|
7240
|
+
return /* @__PURE__ */ jsxs14(
|
|
6652
7241
|
"a",
|
|
6653
7242
|
{
|
|
6654
7243
|
href,
|
|
@@ -6668,8 +7257,8 @@ function SidebarLink({ context }) {
|
|
|
6668
7257
|
backgroundColor: isActive ? "var(--accent)" : "transparent"
|
|
6669
7258
|
},
|
|
6670
7259
|
children: [
|
|
6671
|
-
/* @__PURE__ */
|
|
6672
|
-
/* @__PURE__ */
|
|
7260
|
+
/* @__PURE__ */ jsx20(Sparkles, { style: { width: 16, height: 16, flexShrink: 0 } }),
|
|
7261
|
+
/* @__PURE__ */ jsx20("span", { style: { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: "Create Company" })
|
|
6673
7262
|
]
|
|
6674
7263
|
}
|
|
6675
7264
|
);
|
|
@@ -6699,12 +7288,15 @@ lucide-react/dist/esm/icons/chevron-down.js:
|
|
|
6699
7288
|
lucide-react/dist/esm/icons/chevron-left.js:
|
|
6700
7289
|
lucide-react/dist/esm/icons/chevron-right.js:
|
|
6701
7290
|
lucide-react/dist/esm/icons/circle-check.js:
|
|
7291
|
+
lucide-react/dist/esm/icons/circle-plus.js:
|
|
6702
7292
|
lucide-react/dist/esm/icons/clipboard-check.js:
|
|
6703
7293
|
lucide-react/dist/esm/icons/cpu.js:
|
|
6704
7294
|
lucide-react/dist/esm/icons/crown.js:
|
|
6705
7295
|
lucide-react/dist/esm/icons/external-link.js:
|
|
6706
7296
|
lucide-react/dist/esm/icons/file-text.js:
|
|
6707
7297
|
lucide-react/dist/esm/icons/flask-conical.js:
|
|
7298
|
+
lucide-react/dist/esm/icons/git-branch.js:
|
|
7299
|
+
lucide-react/dist/esm/icons/github.js:
|
|
6708
7300
|
lucide-react/dist/esm/icons/layers.js:
|
|
6709
7301
|
lucide-react/dist/esm/icons/list-checks.js:
|
|
6710
7302
|
lucide-react/dist/esm/icons/loader-circle.js:
|