@open-mercato/cezar 0.21.0-pr2304.5721 → 0.21.0-pr2304.5728

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/dist/exit-diagnostics.js +2 -1
  2. package/dist/exit-diagnostics.js.map +1 -1
  3. package/dist/server/worktree-lifecycle.d.ts +88 -88
  4. package/package.json +3 -3
  5. package/web/dist/assets/{active-forge-SXZzBSEm.js → active-forge-CH1C422f.js} +1 -1
  6. package/web/dist/assets/{agent-task-pickers-DZ_K5BSw.js → agent-task-pickers-DKcnq5-d.js} +1 -1
  7. package/web/dist/assets/{assets-view-BlMRV_S8.js → assets-view-BwCv6-67.js} +1 -1
  8. package/web/dist/assets/{automations-route--a2bvnsb.js → automations-route-D621kVoM.js} +1 -1
  9. package/web/dist/assets/{cache-status-GZdSOM-w.js → cache-status-D0Wf7c68.js} +1 -1
  10. package/web/dist/assets/{commit-list-CMba6xJ8.js → commit-list-BDxIHmx3.js} +1 -1
  11. package/web/dist/assets/{compare-variants-DG6ZRV97.js → compare-variants-BE_xz9fk.js} +1 -1
  12. package/web/dist/assets/{composer-BYpiJaMT.js → composer-COafX3M3.js} +1 -1
  13. package/web/dist/assets/{composer-attachments-C0SIKOoF.js → composer-attachments-jC2fZny-.js} +1 -1
  14. package/web/dist/assets/{dashboard-XZSt1cwP.js → dashboard-BlDorX8u.js} +1 -1
  15. package/web/dist/assets/{file-preview-C-OT_D3U.js → file-preview-Qib2HRWT.js} +1 -1
  16. package/web/dist/assets/{follow-up-engine-BZ78Zp_M.js → follow-up-engine-DEsBChjt.js} +1 -1
  17. package/web/dist/assets/{git-tab-loading-BmfGcSgR.js → git-tab-loading-CapWIFLB.js} +1 -1
  18. package/web/dist/assets/{github-rhfJLPQj.js → github-Dh0U9SiX.js} +1 -1
  19. package/web/dist/assets/{host-usage-BoTCPbYy.js → host-usage-DHxIMh3T.js} +1 -1
  20. package/web/dist/assets/{impact-control-DjbqfDHI.js → impact-control-olOY2eOt.js} +1 -1
  21. package/web/dist/assets/{impact-model-CbS8U6l9.js → impact-model-CjRQ3ZE0.js} +1 -1
  22. package/web/dist/assets/{index-l6dDBY93.js → index-BKBCS6l_.js} +4 -4
  23. package/web/dist/assets/{manager-approval-yQPtm9nq.js → manager-approval-23kvboEx.js} +1 -1
  24. package/web/dist/assets/{manager-approvals-Bfffj0mv.js → manager-approvals-BGKGqx-0.js} +1 -1
  25. package/web/dist/assets/{manager-chat-B5WCLy8r.js → manager-chat-BDO-VhmD.js} +1 -1
  26. package/web/dist/assets/{manager-index-CpmD_YnU.js → manager-index-BQPjJaW6.js} +1 -1
  27. package/web/dist/assets/{manager-loading-DIUwzR_i.js → manager-loading-DOphHKoY.js} +1 -1
  28. package/web/dist/assets/{manager-new-CJ8VGf9P.js → manager-new-C1BpfQN3.js} +1 -1
  29. package/web/dist/assets/{manager-pickers--_1Dox2z.js → manager-pickers-B0iQsvyI.js} +1 -1
  30. package/web/dist/assets/{manager-settings-CGTECxEc.js → manager-settings-DZW9_oUT.js} +1 -1
  31. package/web/dist/assets/{managers-BuFLH5m8.js → managers-DXUGRedp.js} +1 -1
  32. package/web/dist/assets/{phone-app-BjqinWvu.js → phone-app-6nN_N3NQ.js} +1 -1
  33. package/web/dist/assets/{project-router-C5i-wKEk.js → project-router-CkrILNS8.js} +1 -1
  34. package/web/dist/assets/{project-terminal-D0iMMZHa.js → project-terminal-DgUFYoSp.js} +2 -2
  35. package/web/dist/assets/{queries-7sc1yPNb.js → queries-TESHs8gB.js} +1 -1
  36. package/web/dist/assets/{reasoning-effort-pill-BhKttBPP.js → reasoning-effort-pill-BduLBwA3.js} +1 -1
  37. package/web/dist/assets/{reference-chip-CMMFnDN9.js → reference-chip-DrFTjbXo.js} +1 -1
  38. package/web/dist/assets/{reference-conflict-action-D4OnU6Nm.js → reference-conflict-action-BMJnLyty.js} +1 -1
  39. package/web/dist/assets/{repo-git-DK8YBe8x.js → repo-git-DqMVFKfb.js} +1 -1
  40. package/web/dist/assets/{run-actions-BsGMWimZ.js → run-actions-BpODrHsF.js} +1 -1
  41. package/web/dist/assets/{run-diff-B-nk3hd1.js → run-diff-D7wQkEvn.js} +1 -1
  42. package/web/dist/assets/{segmented-DTe3ZxCU.js → segmented-BoMB-Ozl.js} +1 -1
  43. package/web/dist/assets/{skills-khzCZStD.js → skills-CbiVzpz6.js} +1 -1
  44. package/web/dist/assets/{task-commits-Bs-wq3G2.js → task-commits-BzjH1lvZ.js} +1 -1
  45. package/web/dist/assets/{task-graph-Dyqglj7H.js → task-graph-DTnumspY.js} +1 -1
  46. package/web/dist/assets/{task-notes-x96jF7v4.js → task-notes-Dab46a24.js} +1 -1
  47. package/web/dist/assets/{task-workspace-CRMDR4od.js → task-workspace-DKRDUXLK.js} +3 -3
  48. package/web/dist/assets/{telemetry-Ds-0cFz4.js → telemetry-BRvVwU1u.js} +1 -1
  49. package/web/dist/assets/{terminal-drawer-D4uq2s5y.js → terminal-drawer-DXhb7yLC.js} +1 -1
  50. package/web/dist/assets/{terminal-pane-y7OuMJrP.js → terminal-pane-CQgs50mQ.js} +1 -1
  51. package/web/dist/assets/{terminal-scope-ClP9zE0Q.js → terminal-scope-LS9ZpOrU.js} +1 -1
  52. package/web/dist/assets/{thread-items-BLXMTNDz.js → thread-items-BhoFQ7WK.js} +1 -1
  53. package/web/dist/assets/{tracker-B34grazk.js → tracker-CpRLHjcN.js} +1 -1
  54. package/web/dist/assets/{tree-pane-resize-zh3MiY_a.js → tree-pane-resize-BU2KxfH7.js} +1 -1
  55. package/web/dist/assets/{use-media-query-DisWkDaK.js → use-media-query-a9XdnVtq.js} +1 -1
  56. package/web/dist/assets/{use-my-messages-nav-Cl4-a71x.js → use-my-messages-nav-B-je0UPs.js} +1 -1
  57. package/web/dist/assets/{workflow-graph-DTWqbB78.js → workflow-graph-D1udSshz.js} +1 -1
  58. package/web/dist/assets/{worktree-lifecycle-C68MYNNe.js → worktree-lifecycle-DI5Ax3RX.js} +1 -1
  59. package/web/dist/assets/{worktree-lifecycle-operation-DwNRly6i.js → worktree-lifecycle-operation-BJ7x0UkH.js} +1 -1
  60. package/web/dist/index.html +23 -23
@@ -48,7 +48,8 @@ let installed = false;
48
48
  /** Install once per process; returns whether it did. */
49
49
  export function installExitDiagnostics(env = process.env) {
50
50
  if (installed)
51
- installed = true;
51
+ return false;
52
+ installed = true;
52
53
  const path = exitLogPath(env);
53
54
  const write = (reason, detail) => appendExitRecord(path, formatExitLine(reason, detail));
54
55
  let abnormal = false;
@@ -1 +1 @@
1
- {"version":3,"file":"exit-diagnostics.js","sourceRoot":"","sources":["../src/exit-diagnostics.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC1E,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE1C,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAG,GAAG,IAAI,CAAC;AAC7C,MAAM,OAAO,GAAG,CAAC,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,SAAS,CAAU,CAAC;AAErE,MAAM,UAAU,WAAW,CAAC,GAAG,GAAsB,OAAO,CAAC,GAAG;IAC9D,OAAO,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,EAAE,MAAM,EAAE,iBAAiB,CAAC,CAAC;AAC5D,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,MAAc,EAAE,MAAM,GAA4B,EAAE,EAAE,GAAG,GAAG,IAAI,IAAI,EAAE;IACnG,MAAM,GAAG,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC;IAClC,MAAM,MAAM,GAAG;QACb,EAAE,EAAE,GAAG,CAAC,WAAW,EAAE;QACrB,GAAG,EAAE,OAAO,CAAC,GAAG;QAChB,MAAM;QACN,GAAG,MAAM;QACT,SAAS,EAAE,IA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AAI,KAAK,CAAC,IAAI,QAAQ;YAAE,KAAK,CAAC,MAAM,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC;IACtD,CAAC,CAAC,CAAC;IACH,OAAO,IAAI,CAAC;AACd,CAAC;AAED,iBAAiB;AACjB,MAAM,UAAU,4BAA4B;IAC1C,SAAS,GAAG,KAAK,CAAC;AACpB,CAAC"}
@@ -15,6 +15,19 @@ export declare function worktreeLifecycleRoutes(opts?: {
15
15
  }): import("hono/hono-base").HonoBase<ProjectApiEnv, {
16
16
  "/worktree-lifecycle": {
17
17
  $get: {
18
+ output: {
19
+ error: string;
20
+ };
21
+ outputFormat: "json";
22
+ status: 400 | 404 | 409;
23
+ input: {
24
+ query: {
25
+ attentionOnly?: "false" | "true" | undefined;
26
+ cursor?: string | undefined;
27
+ limit?: unknown;
28
+ };
29
+ };
30
+ } | {
18
31
  output: {
19
32
  worktrees: {
20
33
  worktreeId: string;
@@ -90,24 +103,23 @@ export declare function worktreeLifecycleRoutes(opts?: {
90
103
  limit?: unknown;
91
104
  };
92
105
  };
93
- } | {
106
+ };
107
+ };
108
+ } & {
109
+ "/worktree-lifecycle/preview": {
110
+ $post: {
94
111
  output: {
95
112
  error: string;
96
113
  };
97
114
  outputFormat: "json";
98
115
  status: 400 | 404 | 409;
99
116
  input: {
100
- query: {
101
- attentionOnly?: "false" | "true" | undefined;
102
- cursor?: string | undefined;
103
- limit?: unknown;
117
+ json: {
118
+ command: string;
119
+ worktreeId?: string | undefined;
104
120
  };
105
121
  };
106
- };
107
- };
108
- } & {
109
- "/worktree-lifecycle/preview": {
110
- $post: {
122
+ } | {
111
123
  output: {
112
124
  renderedCommand: string;
113
125
  variables: {
@@ -127,7 +139,11 @@ export declare function worktreeLifecycleRoutes(opts?: {
127
139
  worktreeId?: string | undefined;
128
140
  };
129
141
  };
130
- } | {
142
+ };
143
+ };
144
+ } & {
145
+ "/worktree-lifecycle/operations": {
146
+ $post: {
131
147
  output: {
132
148
  error: string;
133
149
  };
@@ -135,15 +151,16 @@ export declare function worktreeLifecycleRoutes(opts?: {
135
151
  status: 400 | 404 | 409;
136
152
  input: {
137
153
  json: {
138
- command: string;
139
- worktreeId?: string | undefined;
154
+ requestId: string;
155
+ runId: string;
156
+ intent: "delete-task" | "reclaim" | "remove-worktree";
157
+ } | {
158
+ requestId: string;
159
+ worktreeId: string;
160
+ intent: "orphan";
140
161
  };
141
162
  };
142
- };
143
- };
144
- } & {
145
- "/worktree-lifecycle/operations": {
146
- $post: {
163
+ } | {
147
164
  output: {
148
165
  operation: {
149
166
  id: string;
@@ -207,28 +224,22 @@ export declare function worktreeLifecycleRoutes(opts?: {
207
224
  intent: "orphan";
208
225
  };
209
226
  };
210
- } | {
227
+ };
228
+ };
229
+ } & {
230
+ "/worktree-lifecycle/operations/:operationId": {
231
+ $get: {
211
232
  output: {
212
233
  error: string;
213
234
  };
214
235
  outputFormat: "json";
215
236
  status: 400 | 404 | 409;
216
237
  input: {
217
- json: {
218
- requestId: string;
219
- runId: string;
220
- intent: "delete-task" | "reclaim" | "remove-worktree";
221
- } | {
222
- requestId: string;
223
- worktreeId: string;
224
- intent: "orphan";
238
+ param: {
239
+ operationId: string;
225
240
  };
226
241
  };
227
- };
228
- };
229
- } & {
230
- "/worktree-lifecycle/operations/:operationId": {
231
- $get: {
242
+ } | {
232
243
  output: {
233
244
  error: string;
234
245
  };
@@ -297,7 +308,11 @@ export declare function worktreeLifecycleRoutes(opts?: {
297
308
  operationId: string;
298
309
  };
299
310
  };
300
- } | {
311
+ };
312
+ };
313
+ } & {
314
+ "/worktree-lifecycle/operations/:operationId/actions": {
315
+ $post: {
301
316
  output: {
302
317
  error: string;
303
318
  };
@@ -307,12 +322,31 @@ export declare function worktreeLifecycleRoutes(opts?: {
307
322
  param: {
308
323
  operationId: string;
309
324
  };
325
+ } & {
326
+ json: {
327
+ requestId: string;
328
+ expectedRevision: number;
329
+ action: "cancel-task" | "force-delete" | "keep-worktree" | "retry" | "start-anyway" | "stop";
330
+ };
310
331
  };
311
- };
312
- };
313
- } & {
314
- "/worktree-lifecycle/operations/:operationId/actions": {
315
- $post: {
332
+ } | {
333
+ output: {
334
+ error: string;
335
+ };
336
+ outputFormat: "json";
337
+ status: 400;
338
+ input: {
339
+ param: {
340
+ operationId: string;
341
+ };
342
+ } & {
343
+ json: {
344
+ requestId: string;
345
+ expectedRevision: number;
346
+ action: "cancel-task" | "force-delete" | "keep-worktree" | "retry" | "start-anyway" | "stop";
347
+ };
348
+ };
349
+ } | {
316
350
  output: {
317
351
  operation: {
318
352
  id: string;
@@ -376,24 +410,11 @@ export declare function worktreeLifecycleRoutes(opts?: {
376
410
  action: "cancel-task" | "force-delete" | "keep-worktree" | "retry" | "start-anyway" | "stop";
377
411
  };
378
412
  };
379
- } | {
380
- output: {
381
- error: string;
382
- };
383
- outputFormat: "json";
384
- status: 400;
385
- input: {
386
- param: {
387
- operationId: string;
388
- };
389
- } & {
390
- json: {
391
- requestId: string;
392
- expectedRevision: number;
393
- action: "cancel-task" | "force-delete" | "keep-worktree" | "retry" | "start-anyway" | "stop";
394
- };
395
- };
396
- } | {
413
+ };
414
+ };
415
+ } & {
416
+ "/worktree-lifecycle/operations/:operationId/output": {
417
+ $get: {
397
418
  output: {
398
419
  error: string;
399
420
  };
@@ -404,17 +425,12 @@ export declare function worktreeLifecycleRoutes(opts?: {
404
425
  operationId: string;
405
426
  };
406
427
  } & {
407
- json: {
408
- requestId: string;
409
- expectedRevision: number;
410
- action: "cancel-task" | "force-delete" | "keep-worktree" | "retry" | "start-anyway" | "stop";
428
+ query: {
429
+ afterSeq?: unknown;
430
+ limit?: unknown;
411
431
  };
412
432
  };
413
- };
414
- };
415
- } & {
416
- "/worktree-lifecycle/operations/:operationId/output": {
417
- $get: {
433
+ } | {
418
434
  output: {
419
435
  error: string;
420
436
  };
@@ -454,7 +470,11 @@ export declare function worktreeLifecycleRoutes(opts?: {
454
470
  limit?: unknown;
455
471
  };
456
472
  };
457
- } | {
473
+ };
474
+ };
475
+ } & {
476
+ "/worktree-lifecycle/:worktreeId": {
477
+ $get: {
458
478
  output: {
459
479
  error: string;
460
480
  };
@@ -462,19 +482,10 @@ export declare function worktreeLifecycleRoutes(opts?: {
462
482
  status: 400 | 404 | 409;
463
483
  input: {
464
484
  param: {
465
- operationId: string;
466
- };
467
- } & {
468
- query: {
469
- afterSeq?: unknown;
470
- limit?: unknown;
485
+ worktreeId: string;
471
486
  };
472
487
  };
473
- };
474
- };
475
- } & {
476
- "/worktree-lifecycle/:worktreeId": {
477
- $get: {
488
+ } | {
478
489
  output: {
479
490
  error: string;
480
491
  };
@@ -606,17 +617,6 @@ export declare function worktreeLifecycleRoutes(opts?: {
606
617
  worktreeId: string;
607
618
  };
608
619
  };
609
- } | {
610
- output: {
611
- error: string;
612
- };
613
- outputFormat: "json";
614
- status: 400 | 404 | 409;
615
- input: {
616
- param: {
617
- worktreeId: string;
618
- };
619
- };
620
620
  };
621
621
  };
622
622
  }, "/", "/worktree-lifecycle/:worktreeId">;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-mercato/cezar",
3
- "version": "0.21.0-pr2304.5721",
3
+ "version": "0.21.0-pr2304.5728",
4
4
  "description": "Local cockpit for running and tracking AI agent tasks in your repo. Uses your logged-in `claude` CLI and `gh` — zero config, zero database.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -56,8 +56,8 @@
56
56
  "zod": "^4.6.7"
57
57
  },
58
58
  "devDependencies": {
59
- "@open-mercato/cezar-api-client": "0.21.0-pr2304.5721",
60
- "@open-mercato/cezar-contract": "0.21.0-pr2304.5721",
59
+ "@open-mercato/cezar-api-client": "0.21.0-pr2304.5728",
60
+ "@open-mercato/cezar-contract": "0.21.0-pr2304.5728",
61
61
  "@types/node": "^20.14.0",
62
62
  "@types/proper-lockfile": "4.1.4",
63
63
  "@types/ws": "^8.18.1",
@@ -1 +1 @@
1
- import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t}from"./react-runtime-CCIEwYL0.js";import{$ as n,F as r}from"./queries-7sc1yPNb.js";import{t as i}from"./createLucideIcon-BHp8sXmF.js";import{c as a}from"./project-router-C5i-wKEk.js";var o=i(`git-branch`,[[`path`,{d:`M15 6a9 9 0 0 0-9 9V3`,key:`1cii5b`}],[`circle`,{cx:`18`,cy:`6`,r:`3`,key:`1h7g24`}],[`circle`,{cx:`6`,cy:`18`,r:`3`,key:`fqmcym`}]]),s=i(`wrench`,[[`path`,{d:`M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z`,key:`1ngwbx`}]]),c=e(t(),1),l={github:`gh`};function u(e){return l[e]}function d(e){return`the ${e} CLI is not installed or not logged in — run \`${e} auth login\``}function f(e,t,n){let r=t?.bootProject??e?.bootProject??null;if(n===null||n==="default"||n===r)return e?.forge;let i=t?.projects?.find(e=>e.id===n);if(!i||!e)return;if(!i.forge)return null;let a=u(i.forge),o=a?e.checks?.find(e=>e.name===a):void 0;return!a||!o?{kind:i.forge}:o.available?{kind:i.forge,available:!0}:{kind:i.forge,available:!1,reason:d(a)}}function p(){let e=r().data,t=n().data,i=a();return(0,c.useMemo)(()=>f(e,t,i),[e,t,i])}export{s as n,o as r,p as t};
1
+ import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t}from"./react-runtime-CCIEwYL0.js";import{$ as n,F as r}from"./queries-TESHs8gB.js";import{t as i}from"./createLucideIcon-BHp8sXmF.js";import{c as a}from"./project-router-CkrILNS8.js";var o=i(`git-branch`,[[`path`,{d:`M15 6a9 9 0 0 0-9 9V3`,key:`1cii5b`}],[`circle`,{cx:`18`,cy:`6`,r:`3`,key:`1h7g24`}],[`circle`,{cx:`6`,cy:`18`,r:`3`,key:`fqmcym`}]]),s=i(`wrench`,[[`path`,{d:`M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z`,key:`1ngwbx`}]]),c=e(t(),1),l={github:`gh`};function u(e){return l[e]}function d(e){return`the ${e} CLI is not installed or not logged in — run \`${e} auth login\``}function f(e,t,n){let r=t?.bootProject??e?.bootProject??null;if(n===null||n==="default"||n===r)return e?.forge;let i=t?.projects?.find(e=>e.id===n);if(!i||!e)return;if(!i.forge)return null;let a=u(i.forge),o=a?e.checks?.find(e=>e.name===a):void 0;return!a||!o?{kind:i.forge}:o.available?{kind:i.forge,available:!0}:{kind:i.forge,available:!1,reason:d(a)}}function p(){let e=r().data,t=n().data,i=a();return(0,c.useMemo)(()=>f(e,t,i),[e,t,i])}export{s as n,o as r,p as t};
@@ -1 +1 @@
1
- import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,t as n}from"./react-runtime-CCIEwYL0.js";import{t as r}from"./utils-BAYLWSBi.js";import{M as i}from"./run-actions-BsGMWimZ.js";import{B as a}from"./button-Zagj9Dws.js";import{r as o}from"./dist-QZJVFwAU.js";import{t as s}from"./workflow-BEP63Wt4.js";import{_ as c}from"./impact-model-CbS8U6l9.js";import{S as l,b as u,m as d,v as f,x as p}from"./composer-BYpiJaMT.js";import{t as m}from"./project-router-C5i-wKEk.js";import{i as h,r as g,t as _}from"./popover-CCLtNieu.js";import{t as v}from"./icon-tooltip-DL8bft3F.js";import{a as y,i as b,o as x,r as S,s as C,t as w}from"./command-BPl4jaBv.js";import{i as T}from"./chip-DHKXesVO.js";import"./picker-pill-C1dV9QFm.js";import{l as E}from"./index-l6dDBY93.js";var D=n();function O({name:e,route:t,selected:n,list:i,detail:a}){return(0,D.jsxs)(`div`,{"data-route":t,className:`flex h-full min-h-0 items-stretch`,children:[(0,D.jsx)(`section`,{"data-slot":`${e}-list`,className:r(`w-full min-h-0 flex-col overflow-y-auto overscroll-contain border-border md:flex md:w-[360px] md:shrink-0 md:border-r`,n?`hidden`:`flex`),children:i}),(0,D.jsx)(`section`,{"data-slot":`${e}-detail`,className:r(`min-w-0 min-h-0 flex-1 flex-col overflow-y-auto overscroll-contain`,n?`flex`:`hidden md:flex`),children:a})]})}function k({resolved:e,dataSlot:t}){return e.providerPending||e.canRun?null:(0,D.jsxs)(`span`,{"data-slot":t,className:`inline-flex flex-wrap items-center gap-1 text-xs text-muted-foreground`,children:[e.providerError?`Provider authentication could not be verified.`:`Connect an agent provider to run this item.`,(0,D.jsx)(m,{to:`/settings/agents#providers`,className:`font-medium text-foreground underline underline-offset-4`,children:`Configure providers`})]})}var A=e(t(),1);function j({workflows:e,value:t,onChange:n,slotPrefix:i=`gh`}){let[c,u]=(0,A.useState)(!1),[d,f]=(0,A.useState)(``),m=(0,A.useRef)(null),v=p(e,d);return(0,D.jsxs)(_,{open:c,onOpenChange:e=>{u(e),e||f(``)},children:[(0,D.jsx)(h,{asChild:!0,children:(0,D.jsxs)(`button`,{type:`button`,"data-slot":`${i}-workflow-trigger`,"aria-label":`Choose a workflow`,className:r(T,t&&`border-foreground/60 font-mono text-meta font-semibold text-foreground`),children:[(0,D.jsx)(s,{"aria-hidden":`true`,className:`size-3 shrink-0 text-violet`}),(0,D.jsx)(`span`,{className:`max-w-44 truncate`,children:t??`workflow`}),(0,D.jsx)(o,{"aria-hidden":`true`,className:`size-2.5 shrink-0 text-soft-foreground`})]})}),(0,D.jsx)(g,{align:`start`,sideOffset:8,className:`w-[320px] max-w-[calc(100vw-2rem)] p-0`,children:(0,D.jsxs)(w,{label:`Choose a workflow`,shouldFilter:!1,children:[(0,D.jsx)(y,{placeholder:`search workflows…`,value:d,onValueChange:f,onInput:()=>m.current?.scrollTo(0,0)}),(0,D.jsxs)(C,{ref:m,"data-slot":`${i}-workflow-menu`,className:`max-h-[min(16rem,calc(var(--radix-popover-content-available-height)-3rem))]`,children:[v.length===0?(0,D.jsx)(S,{children:`Nothing matches.`}):null,(0,D.jsx)(b,{children:v.map(e=>{let r=t===e.name;return(0,D.jsxs)(x,{value:`workflow ${e.name}`,keywords:l(e.name,e.description),"data-slot":`${i}-workflow-option`,"data-workflow":e.name,onSelect:()=>{n(r?null:e.name),u(!1)},children:[(0,D.jsx)(`span`,{className:`shrink-0 font-mono text-xs`,children:e.name}),e.description?(0,D.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-label text-muted-foreground`,children:e.description}):null,r?(0,D.jsx)(a,{"aria-hidden":`true`,className:`ml-auto size-3.5 shrink-0 text-primary`}):null]},e.name)})})]})]})})]})}function M({skills:e,skillUsage:t,selected:n,onToggle:s,maxSelections:p,slotPrefix:m=`gh`}){let[O,k]=(0,A.useState)(!1),[j,M]=(0,A.useState)(``),[N,P]=(0,A.useState)(null),F=(0,A.useRef)(null),{mostUsed:I,project:L,global:R}=f(u(e,j,t),t),z=(e,t)=>{let i=n.includes(e.name);return(0,D.jsxs)(x,{value:`skill ${e.name} ${e.path}`,keywords:l(e.name,e.description),"data-slot":`${m}-skill-option`,"data-skill":e.name,"data-selected":i?`true`:void 0,disabled:!i&&p!==void 0&&n.length>=p,onSelect:()=>s(e.name),children:[(0,D.jsx)(`span`,{className:r(`shrink-0 font-mono text-xs`,t&&`font-semibold`),children:e.name}),e.description?(0,D.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-label text-muted-foreground`,children:e.description}):null,(0,D.jsx)(v,{label:`View skill`,children:(0,D.jsx)(`button`,{type:`button`,"data-slot":`${m}-skill-view`,"aria-label":`View skill ${e.name}`,onClick:t=>{t.preventDefault(),t.stopPropagation(),P(e)},className:`ml-auto shrink-0 rounded-sm p-0.5 text-soft-foreground transition-colors hover:text-foreground`,children:(0,D.jsx)(c,{"aria-hidden":`true`,className:`size-3.5`})})}),i?(0,D.jsx)(a,{"aria-hidden":`true`,className:`size-3.5 shrink-0 text-primary`}):null]},e.path)};return e.length===0?null:(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(E,{skill:N,onClose:()=>P(null)}),(0,D.jsxs)(_,{open:O,onOpenChange:e=>{k(e),e||M(``)},children:[(0,D.jsx)(h,{asChild:!0,children:(0,D.jsxs)(`button`,{type:`button`,"data-slot":`${m}-skills-trigger`,"aria-label":`Choose skills`,className:r(T,n.length>0&&`border-foreground/60 font-semibold text-foreground`),children:[(0,D.jsx)(i,{"aria-hidden":`true`,className:`size-3 shrink-0 text-violet`}),`skills`,n.length>0?` · ${n.length}`:``,(0,D.jsx)(o,{"aria-hidden":`true`,className:`size-2.5 shrink-0 text-soft-foreground`})]})}),(0,D.jsx)(g,{align:`start`,sideOffset:8,className:`w-[336px] max-w-[calc(100vw-2rem)] p-0`,children:(0,D.jsxs)(w,{label:`Choose skills`,shouldFilter:!1,children:[(0,D.jsx)(y,{placeholder:`search skills…`,value:j,onValueChange:M,onInput:()=>F.current?.scrollTo(0,0)}),(0,D.jsxs)(C,{ref:F,"data-slot":`${m}-skill-menu`,className:`max-h-[min(16rem,calc(var(--radix-popover-content-available-height)-3rem))]`,children:[I.length===0&&L.length===0&&R.length===0?(0,D.jsx)(S,{children:`Nothing matches.`}):null,I.length>0?(0,D.jsx)(b,{heading:`Most used`,children:I.map(e=>z(e,d(e)))}):null,L.length>0?(0,D.jsx)(b,{heading:`Project skills`,children:L.map(e=>z(e,!0))}):null,R.length>0?(0,D.jsx)(b,{heading:`Global`,children:R.map(e=>z(e,!1))}):null]})]})})]})]})}export{O as i,j as n,k as r,M as t};
1
+ import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,t as n}from"./react-runtime-CCIEwYL0.js";import{t as r}from"./utils-BAYLWSBi.js";import{M as i}from"./run-actions-BpODrHsF.js";import{B as a}from"./button-Zagj9Dws.js";import{r as o}from"./dist-QZJVFwAU.js";import{t as s}from"./workflow-BEP63Wt4.js";import{_ as c}from"./impact-model-CjRQ3ZE0.js";import{S as l,b as u,m as d,v as f,x as p}from"./composer-COafX3M3.js";import{t as m}from"./project-router-CkrILNS8.js";import{i as h,r as g,t as _}from"./popover-CCLtNieu.js";import{t as v}from"./icon-tooltip-DL8bft3F.js";import{a as y,i as b,o as x,r as S,s as C,t as w}from"./command-BPl4jaBv.js";import{i as T}from"./chip-DHKXesVO.js";import"./picker-pill-C1dV9QFm.js";import{l as E}from"./index-BKBCS6l_.js";var D=n();function O({name:e,route:t,selected:n,list:i,detail:a}){return(0,D.jsxs)(`div`,{"data-route":t,className:`flex h-full min-h-0 items-stretch`,children:[(0,D.jsx)(`section`,{"data-slot":`${e}-list`,className:r(`w-full min-h-0 flex-col overflow-y-auto overscroll-contain border-border md:flex md:w-[360px] md:shrink-0 md:border-r`,n?`hidden`:`flex`),children:i}),(0,D.jsx)(`section`,{"data-slot":`${e}-detail`,className:r(`min-w-0 min-h-0 flex-1 flex-col overflow-y-auto overscroll-contain`,n?`flex`:`hidden md:flex`),children:a})]})}function k({resolved:e,dataSlot:t}){return e.providerPending||e.canRun?null:(0,D.jsxs)(`span`,{"data-slot":t,className:`inline-flex flex-wrap items-center gap-1 text-xs text-muted-foreground`,children:[e.providerError?`Provider authentication could not be verified.`:`Connect an agent provider to run this item.`,(0,D.jsx)(m,{to:`/settings/agents#providers`,className:`font-medium text-foreground underline underline-offset-4`,children:`Configure providers`})]})}var A=e(t(),1);function j({workflows:e,value:t,onChange:n,slotPrefix:i=`gh`}){let[c,u]=(0,A.useState)(!1),[d,f]=(0,A.useState)(``),m=(0,A.useRef)(null),v=p(e,d);return(0,D.jsxs)(_,{open:c,onOpenChange:e=>{u(e),e||f(``)},children:[(0,D.jsx)(h,{asChild:!0,children:(0,D.jsxs)(`button`,{type:`button`,"data-slot":`${i}-workflow-trigger`,"aria-label":`Choose a workflow`,className:r(T,t&&`border-foreground/60 font-mono text-meta font-semibold text-foreground`),children:[(0,D.jsx)(s,{"aria-hidden":`true`,className:`size-3 shrink-0 text-violet`}),(0,D.jsx)(`span`,{className:`max-w-44 truncate`,children:t??`workflow`}),(0,D.jsx)(o,{"aria-hidden":`true`,className:`size-2.5 shrink-0 text-soft-foreground`})]})}),(0,D.jsx)(g,{align:`start`,sideOffset:8,className:`w-[320px] max-w-[calc(100vw-2rem)] p-0`,children:(0,D.jsxs)(w,{label:`Choose a workflow`,shouldFilter:!1,children:[(0,D.jsx)(y,{placeholder:`search workflows…`,value:d,onValueChange:f,onInput:()=>m.current?.scrollTo(0,0)}),(0,D.jsxs)(C,{ref:m,"data-slot":`${i}-workflow-menu`,className:`max-h-[min(16rem,calc(var(--radix-popover-content-available-height)-3rem))]`,children:[v.length===0?(0,D.jsx)(S,{children:`Nothing matches.`}):null,(0,D.jsx)(b,{children:v.map(e=>{let r=t===e.name;return(0,D.jsxs)(x,{value:`workflow ${e.name}`,keywords:l(e.name,e.description),"data-slot":`${i}-workflow-option`,"data-workflow":e.name,onSelect:()=>{n(r?null:e.name),u(!1)},children:[(0,D.jsx)(`span`,{className:`shrink-0 font-mono text-xs`,children:e.name}),e.description?(0,D.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-label text-muted-foreground`,children:e.description}):null,r?(0,D.jsx)(a,{"aria-hidden":`true`,className:`ml-auto size-3.5 shrink-0 text-primary`}):null]},e.name)})})]})]})})]})}function M({skills:e,skillUsage:t,selected:n,onToggle:s,maxSelections:p,slotPrefix:m=`gh`}){let[O,k]=(0,A.useState)(!1),[j,M]=(0,A.useState)(``),[N,P]=(0,A.useState)(null),F=(0,A.useRef)(null),{mostUsed:I,project:L,global:R}=f(u(e,j,t),t),z=(e,t)=>{let i=n.includes(e.name);return(0,D.jsxs)(x,{value:`skill ${e.name} ${e.path}`,keywords:l(e.name,e.description),"data-slot":`${m}-skill-option`,"data-skill":e.name,"data-selected":i?`true`:void 0,disabled:!i&&p!==void 0&&n.length>=p,onSelect:()=>s(e.name),children:[(0,D.jsx)(`span`,{className:r(`shrink-0 font-mono text-xs`,t&&`font-semibold`),children:e.name}),e.description?(0,D.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-label text-muted-foreground`,children:e.description}):null,(0,D.jsx)(v,{label:`View skill`,children:(0,D.jsx)(`button`,{type:`button`,"data-slot":`${m}-skill-view`,"aria-label":`View skill ${e.name}`,onClick:t=>{t.preventDefault(),t.stopPropagation(),P(e)},className:`ml-auto shrink-0 rounded-sm p-0.5 text-soft-foreground transition-colors hover:text-foreground`,children:(0,D.jsx)(c,{"aria-hidden":`true`,className:`size-3.5`})})}),i?(0,D.jsx)(a,{"aria-hidden":`true`,className:`size-3.5 shrink-0 text-primary`}):null]},e.path)};return e.length===0?null:(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(E,{skill:N,onClose:()=>P(null)}),(0,D.jsxs)(_,{open:O,onOpenChange:e=>{k(e),e||M(``)},children:[(0,D.jsx)(h,{asChild:!0,children:(0,D.jsxs)(`button`,{type:`button`,"data-slot":`${m}-skills-trigger`,"aria-label":`Choose skills`,className:r(T,n.length>0&&`border-foreground/60 font-semibold text-foreground`),children:[(0,D.jsx)(i,{"aria-hidden":`true`,className:`size-3 shrink-0 text-violet`}),`skills`,n.length>0?` · ${n.length}`:``,(0,D.jsx)(o,{"aria-hidden":`true`,className:`size-2.5 shrink-0 text-soft-foreground`})]})}),(0,D.jsx)(g,{align:`start`,sideOffset:8,className:`w-[336px] max-w-[calc(100vw-2rem)] p-0`,children:(0,D.jsxs)(w,{label:`Choose skills`,shouldFilter:!1,children:[(0,D.jsx)(y,{placeholder:`search skills…`,value:j,onValueChange:M,onInput:()=>F.current?.scrollTo(0,0)}),(0,D.jsxs)(C,{ref:F,"data-slot":`${m}-skill-menu`,className:`max-h-[min(16rem,calc(var(--radix-popover-content-available-height)-3rem))]`,children:[I.length===0&&L.length===0&&R.length===0?(0,D.jsx)(S,{children:`Nothing matches.`}):null,I.length>0?(0,D.jsx)(b,{heading:`Most used`,children:I.map(e=>z(e,d(e)))}):null,L.length>0?(0,D.jsx)(b,{heading:`Project skills`,children:L.map(e=>z(e,!0))}):null,R.length>0?(0,D.jsx)(b,{heading:`Global`,children:R.map(e=>z(e,!1))}):null]})]})})]})]})}export{O as i,j as n,k as r,M as t};
@@ -1 +1 @@
1
- import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,t as n}from"./react-runtime-CCIEwYL0.js";import{Ct as r,Fa as i,wt as a}from"./queries-7sc1yPNb.js";import{kt as o,t as s}from"./utils-BAYLWSBi.js";import{f as c}from"./chunk-KS7C4IRE-DtL2Gzw3.js";import{t as l}from"./createLucideIcon-BHp8sXmF.js";import{O as u}from"./run-actions-BsGMWimZ.js";import{t as d}from"./button-Zagj9Dws.js";import{r as f}from"./dist-QZJVFwAU.js";import{a as p,o as m,p as h,r as g,s as _,t as v}from"./dropdown-menu-Cj2FWGRs.js";import{t as y}from"./download-CfgyYHf7.js";import{t as b}from"./external-link-BE6y205O.js";import{t as x}from"./file-preview-C-OT_D3U.js";import{t as S}from"./file--aqoYe_k.js";import{t as C}from"./layers-CS8s30-0.js";import{t as w}from"./loader-circle-CPBhhDbB.js";import{a as T,c as E,n as D,s as O}from"./sidebar-rail-CKo-kvV9.js";import{a as k,c as A,d as j,f as M,i as N,l as P,o as F,r as I,s as ee,t as te,u as L}from"./follow-up-engine-BZ78Zp_M.js";import{t as R}from"./triangle-alert-CIzim6ZN.js";import{t as z}from"./x-BqECUykl.js";import{l as B}from"./project-router-C5i-wKEk.js";import{t as V}from"./icon-tooltip-DL8bft3F.js";import{r as H}from"./format-BUbPQpzw.js";import{t as U}from"./centered-state-BcSou2G6.js";import{t as W}from"./markdown-n7Q1bY01.js";import{Q as G}from"./index-l6dDBY93.js";var K=l(`at-sign`,[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M16 8v5a3 3 0 0 0 6 0v-1a10 10 0 1 0-4 8`,key:`7n84p3`}]]),q=l(`history`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}],[`path`,{d:`M12 7v5l4 2`,key:`1fdv2h`}]]),J=e(t(),1);function Y(e){let t=o.safeParse(e);return t.success?{ref:t.data.ref,label:t.data.label.slice(0,200)}:null}function X(e,t){return e?`About ${e.ref} ("${e.label}"): ${t}`:t}function Z(e,t){let n=(0,J.useRef)(t);n.current=t,(0,J.useEffect)(()=>{let t=t=>{let r=e.current?.contentWindow;if(!r||t.source!==r)return;let i=Y(t.data);i&&n.current(i)};return window.addEventListener(`message`,t),()=>window.removeEventListener(`message`,t)},[e])}var Q=n();function ne({run:e,reference:t,onClearReference:n}){let r=te(e),i=I(e,r.continueWith),a=u(e),[o,s]=(0,J.useState)(``),[c,l]=(0,J.useState)(!1),[f,p]=(0,J.useState)(null),m=(0,J.useId)(),h=e.status===`running`||e.status===`waiting`,g=e.status===`queued`,_=!h&&!g&&r.available;if(!h&&!g&&!_||e.worktreeLifecycle?.activeOperationId)return null;let v=h&&!a.usable?a.reason:_&&!r.canContinue?r.reason??`No provider can continue this task.`:void 0,y=!v&&!c&&o.trim()!==``,b=async e=>{if(e?.preventDefault(),y){l(!0),p(null);try{await i(X(t,o.trim()),[]),s(``),n()}catch(e){p(e instanceof Error?e.message:String(e))}finally{l(!1)}}};return(0,Q.jsxs)(`form`,{"data-slot":`assets-ask`,"aria-label":`Ask about this asset`,onSubmit:e=>void b(e),className:`shrink-0 border-t border-border bg-background px-2 py-2 sm:px-3`,children:[t?(0,Q.jsxs)(`span`,{"data-slot":`assets-ask-ref`,className:`mb-1.5 inline-flex max-w-full items-center gap-1 rounded-full border border-border bg-muted py-0.5 pr-0.5 pl-2 text-meta`,children:[(0,Q.jsx)(K,{"aria-hidden":`true`,className:`size-3 shrink-0 text-muted-foreground`}),(0,Q.jsx)(V,{label:`${t.ref} — ${t.label}`,children:(0,Q.jsxs)(`span`,{className:`truncate`,children:[(0,Q.jsx)(`span`,{className:`font-mono text-muted-foreground`,children:t.ref}),` `,t.label]})}),(0,Q.jsx)(`button`,{type:`button`,"data-action":`assets-ask-ref-remove`,"aria-label":`Remove reference`,onClick:n,className:`rounded-full p-0.5 text-muted-foreground hover:bg-background hover:text-foreground focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-none`,children:(0,Q.jsx)(z,{"aria-hidden":`true`,className:`size-3`})})]}):null,(0,Q.jsxs)(`div`,{className:`flex items-end gap-2`,children:[(0,Q.jsx)(`textarea`,{"data-slot":`assets-ask-input`,"aria-label":t?`Ask about ${t.label||t.ref}`:`Ask the agent about this asset`,"aria-describedby":v||f?m:void 0,rows:1,value:o,onChange:e=>s(e.target.value),onKeyDown:e=>{e.key===`Enter`&&(e.metaKey||e.ctrlKey)&&b()},disabled:!!v,placeholder:t?`Ask or correct — ⌘↵ to send`:`Ask the agent about this report — click an element to reference it`,className:`max-h-32 min-h-9 flex-1 resize-y rounded-md border border-border bg-card px-2.5 py-2 text-ui focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-none disabled:opacity-60`}),(0,Q.jsxs)(d,{type:`submit`,size:`sm`,"data-action":`assets-ask-send`,disabled:!y,"aria-busy":c||void 0,children:[c?(0,Q.jsx)(w,{"aria-hidden":`true`,className:`motion-safe:animate-spin`}):(0,Q.jsx)(j,{"aria-hidden":`true`}),_?`Continue`:`Send`]})]}),v||f?(0,Q.jsx)(`p`,{id:m,"data-slot":`assets-ask-reason`,className:`mt-1 text-label text-muted-foreground`,children:f??v}):null]})}var re=`No assets yet`,ie=`Agents publish pages here when they write to the run's artifacts folder.`;function ae({runId:e,routed:t,run:n}){let r=a(e),o=c(),l=B(),[u,f]=(0,J.useState)(void 0),p=t?o.name:u,m=r.data?.artifacts??[],h=A(m,p),g=(0,J.useCallback)(n=>{t?l(`/tasks/${e}/assets/${encodeURIComponent(n)}`,{replace:!0}):f(n)},[l,t,e]),[_,v]=se(),[x,S]=(0,J.useState)(0),[T,D]=(0,J.useState)(void 0),k=h?.kind===`html`?oe(r.data?.versions,h.name):[],j=k.at(-1)?.version,N=T&&h&&T.name===h.name&&T.version!==j&&k.some(e=>e.version===T.version)?T.version:void 0,P=(0,J.useRef)(null),[F,I]=(0,J.useState)(null);return Z(P,I),r.isPending?(0,Q.jsx)(U,{icon:(0,Q.jsx)(w,{className:`motion-safe:animate-spin`}),tone:`neutral`,heading:`h2`,title:`Loading assets…`}):r.isError?(0,Q.jsx)(U,{icon:(0,Q.jsx)(R,{}),tone:`danger`,heading:`h2`,title:`Could not load this task's assets`,subtitle:r.error.message}):(0,Q.jsxs)(`section`,{"data-slot":`assets-view`,className:`flex h-full min-h-0 flex-col bg-background`,children:[(0,Q.jsxs)(`div`,{"data-slot":`assets-toolbar`,role:`toolbar`,"aria-label":`Assets`,className:`flex h-10 shrink-0 items-center gap-1.5 border-b border-border px-2 sm:px-3`,children:[h?(0,Q.jsx)(ce,{artifacts:m,current:h,onSelect:g}):(0,Q.jsx)(`span`,{className:`px-1 text-xs text-muted-foreground`,children:`Assets`}),h?.kind===`html`?(0,Q.jsx)(V,{label:`Runs in a sandbox: no access to cezar, your cookies or the network beyond pinned CDN scripts`,children:(0,Q.jsxs)(`span`,{"data-slot":`assets-sandboxed`,tabIndex:0,className:`hidden items-center gap-1 rounded-sm border border-border px-1.5 py-px text-meta text-muted-foreground focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-none sm:inline-flex`,children:[(0,Q.jsx)(G,{"aria-hidden":`true`,className:`size-3`}),`sandboxed`]})}):null,h&&k.length>1?(0,Q.jsx)($,{versions:k,viewing:N,onSelect:e=>D(e===j?void 0:{name:h.name,version:e})}):null,N===void 0?null:(0,Q.jsxs)(`span`,{"data-slot":`assets-viewing-version`,className:`inline-flex items-center gap-1.5 text-meta text-muted-foreground`,children:[`Viewing v`,N,(0,Q.jsx)(`span`,{"aria-hidden":`true`,children:`—`}),(0,Q.jsx)(`button`,{type:`button`,"data-action":`assets-version-current`,onClick:()=>D(void 0),className:`font-medium text-foreground underline underline-offset-2`,children:`back to current`})]}),r.data.truncated?(0,Q.jsxs)(`span`,{className:`hidden text-meta text-muted-foreground md:inline`,children:[`Showing the newest `,r.data.artifacts.length,` files; the folder has more`]}):null,(0,Q.jsxs)(`div`,{className:`ml-auto flex shrink-0 items-center gap-0.5`,children:[(0,Q.jsx)(V,{label:_?`Leave focus — bring the sidebar back`:`Focus — fold the sidebar to icons while Assets is open`,children:(0,Q.jsx)(d,{type:`button`,variant:`ghost`,size:`icon-sm`,"data-action":`assets-focus`,"aria-pressed":_,"aria-label":_?`Leave focus`:`Focus`,className:s(`text-muted-foreground`,_&&`bg-muted text-foreground`),onClick:()=>v(!_),children:_?(0,Q.jsx)(O,{"aria-hidden":`true`}):(0,Q.jsx)(E,{"aria-hidden":`true`})})}),h?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(d,{asChild:!0,variant:`ghost`,size:`sm`,className:`text-muted-foreground max-sm:size-[30px] max-sm:px-0`,children:(0,Q.jsxs)(`a`,{"data-action":`assets-open`,href:i(e,h.name,N),target:`_blank`,rel:`noopener noreferrer`,"aria-label":`Open in new tab`,title:`Open in new tab (still sandboxed)`,children:[(0,Q.jsx)(b,{"aria-hidden":`true`}),(0,Q.jsx)(`span`,{className:`max-sm:sr-only`,children:`Open in new tab`})]})}),(0,Q.jsx)(d,{asChild:!0,variant:`ghost`,size:`sm`,className:`text-muted-foreground max-sm:size-[30px] max-sm:px-0`,children:(0,Q.jsxs)(`a`,{"data-action":`assets-download`,href:i(e,h.name,N),download:h.name,"aria-label":`Download`,children:[(0,Q.jsx)(y,{"aria-hidden":`true`}),(0,Q.jsx)(`span`,{className:`max-sm:sr-only`,children:`Download`})]})}),(0,Q.jsxs)(d,{type:`button`,variant:`ghost`,size:`sm`,"data-action":`assets-reload`,"aria-label":`Reload`,className:`text-muted-foreground max-sm:size-[30px] max-sm:px-0`,onClick:()=>S(e=>e+1),children:[(0,Q.jsx)(M,{"aria-hidden":`true`}),(0,Q.jsx)(`span`,{className:`max-sm:sr-only`,children:`Reload`})]})]}):null]})]}),h?(0,Q.jsx)(le,{runId:e,artifact:h,version:N,frameRef:P},`${h.name}@${h.updatedAt}#${x}v${N??``}`):(0,Q.jsx)(U,{icon:(0,Q.jsx)(C,{}),tone:`neutral`,heading:`h2`,title:re,subtitle:ie}),n&&h?(0,Q.jsx)(ne,{run:n,reference:F,onClearReference:()=>I(null)}):null]})}function oe(e,t){return(e??[]).filter(e=>e.files.includes(t))}function $({versions:e,viewing:t,onSelect:n}){let r=e.at(-1),i=t??r?.version;return(0,Q.jsxs)(v,{children:[(0,Q.jsx)(h,{asChild:!0,children:(0,Q.jsxs)(d,{type:`button`,variant:`ghost`,size:`sm`,"data-action":`assets-versions`,"aria-label":`Version v${i} — pick another version`,className:`h-7 gap-1 px-2 text-label text-muted-foreground`,children:[(0,Q.jsx)(q,{"aria-hidden":`true`,className:`size-3.5`}),`v`,i,r&&t===void 0?(0,Q.jsxs)(`span`,{className:`hidden sm:inline`,children:[`· `,H(r.updatedAt),` ago`]}):null,(0,Q.jsx)(f,{"aria-hidden":`true`,className:`size-3.5 opacity-60`})]})}),(0,Q.jsxs)(g,{align:`start`,className:`w-56`,children:[(0,Q.jsx)(p,{children:`Versions`}),(0,Q.jsx)(m,{value:String(i),onValueChange:e=>n(Number(e)),children:[...e].reverse().map(e=>(0,Q.jsxs)(_,{value:String(e.version),"data-version":e.version,children:[`v`,e.version,` · `,H(e.updatedAt),` ago`,e.version===r?.version?(0,Q.jsx)(`span`,{className:`ml-auto text-meta text-muted-foreground`,children:`current`}):null]},e.version))})]})]})}function se(){let[e,t]=(0,J.useState)(()=>P(`assets`)),n=(0,J.useCallback)(e=>{L(`assets`,e),t(e)},[]);return(0,J.useEffect)(()=>{if(e)return D(()=>n(!1))},[e,n]),[e,n]}function ce({artifacts:e,current:t,onSelect:n}){let r=ee(e);return(0,Q.jsxs)(v,{children:[(0,Q.jsx)(h,{asChild:!0,children:(0,Q.jsxs)(d,{type:`button`,variant:`ghost`,size:`sm`,"data-action":`assets-switcher`,"aria-label":`Asset: ${F(t)} — switch asset`,className:`h-7 min-w-0 max-w-[min(28rem,60vw)] gap-1.5 px-2 text-ui font-medium`,children:[(0,Q.jsx)(`span`,{className:`truncate`,children:F(t)}),(0,Q.jsx)(`span`,{className:`shrink-0 text-meta font-normal text-muted-foreground`,children:k[t.kind]}),(0,Q.jsx)(f,{"aria-hidden":`true`,className:`size-3.5 shrink-0 opacity-60`})]})}),(0,Q.jsxs)(g,{align:`start`,className:`max-h-80 w-80 overflow-y-auto`,children:[(0,Q.jsxs)(p,{children:[e.length,` `,e.length===1?`asset`:`assets`]}),(0,Q.jsx)(m,{value:t.name,onValueChange:n,children:r.map(e=>(0,Q.jsx)(_,{value:e.name,"data-asset":e.name,children:(0,Q.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col`,children:[(0,Q.jsx)(`span`,{className:`truncate`,children:F(e)}),(0,Q.jsxs)(`span`,{className:`truncate font-mono text-meta text-muted-foreground`,children:[e.name,` · `,k[e.kind],` · `,H(e.updatedAt)]})]})},e.name))})]})]})}function le({runId:e,artifact:t,version:n,frameRef:r}){let a=T(),o=i(e,t.name,n);switch(t.kind){case`html`:return(0,Q.jsx)(`iframe`,{ref:r,"data-slot":`assets-frame`,title:F(t),src:`${o}#theme=${a}`,sandbox:N,referrerPolicy:`no-referrer`,className:`min-h-0 w-full flex-1 border-0 bg-background`});case`image`:return(0,Q.jsx)(`div`,{className:`flex min-h-0 flex-1 items-center justify-center overflow-auto p-4`,children:(0,Q.jsx)(`img`,{"data-slot":`assets-image`,src:o,alt:F(t),className:`max-w-full rounded-sm`})});case`markdown`:case`json`:return(0,Q.jsx)(ue,{runId:e,artifact:t});case`other`:return(0,Q.jsx)(U,{icon:(0,Q.jsx)(S,{}),tone:`neutral`,heading:`h2`,title:`No preview for this file`,subtitle:`${t.name} — download it to open it locally.`,actions:(0,Q.jsx)(d,{asChild:!0,variant:`outline`,children:(0,Q.jsxs)(`a`,{"data-action":`assets-download-file`,href:o,download:t.name,children:[(0,Q.jsx)(y,{"aria-hidden":`true`}),`Download`]})})})}}function ue({runId:e,artifact:t}){let n=r(e,t.name,t.updatedAt);return n.isPending?(0,Q.jsxs)(`p`,{className:`px-4 py-6 text-center text-label text-soft-foreground`,children:[`Loading `,t.name,`…`]}):n.isError?(0,Q.jsx)(U,{icon:(0,Q.jsx)(R,{}),tone:`danger`,heading:`h2`,title:`Could not load this asset`,subtitle:n.error.message}):(0,Q.jsx)(`div`,{"data-slot":`assets-${t.kind}`,className:`min-h-0 flex-1 overflow-auto`,children:t.kind===`markdown`?(0,Q.jsx)(`div`,{className:`mx-auto max-w-3xl px-4 py-4`,children:(0,Q.jsx)(W,{children:n.data})}):(0,Q.jsx)(x,{path:t.name,text:n.data})})}export{ae as AssetsView};
1
+ import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,t as n}from"./react-runtime-CCIEwYL0.js";import{Ct as r,Fa as i,wt as a}from"./queries-TESHs8gB.js";import{kt as o,t as s}from"./utils-BAYLWSBi.js";import{f as c}from"./chunk-KS7C4IRE-DtL2Gzw3.js";import{t as l}from"./createLucideIcon-BHp8sXmF.js";import{O as u}from"./run-actions-BpODrHsF.js";import{t as d}from"./button-Zagj9Dws.js";import{r as f}from"./dist-QZJVFwAU.js";import{a as p,o as m,p as h,r as g,s as _,t as v}from"./dropdown-menu-Cj2FWGRs.js";import{t as y}from"./download-CfgyYHf7.js";import{t as b}from"./external-link-BE6y205O.js";import{t as x}from"./file-preview-Qib2HRWT.js";import{t as S}from"./file--aqoYe_k.js";import{t as C}from"./layers-CS8s30-0.js";import{t as w}from"./loader-circle-CPBhhDbB.js";import{a as T,c as E,n as D,s as O}from"./sidebar-rail-CKo-kvV9.js";import{a as k,c as A,d as j,f as M,i as N,l as P,o as F,r as I,s as ee,t as te,u as L}from"./follow-up-engine-DEsBChjt.js";import{t as R}from"./triangle-alert-CIzim6ZN.js";import{t as z}from"./x-BqECUykl.js";import{l as B}from"./project-router-CkrILNS8.js";import{t as V}from"./icon-tooltip-DL8bft3F.js";import{r as H}from"./format-BUbPQpzw.js";import{t as U}from"./centered-state-BcSou2G6.js";import{t as W}from"./markdown-n7Q1bY01.js";import{Q as G}from"./index-BKBCS6l_.js";var K=l(`at-sign`,[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M16 8v5a3 3 0 0 0 6 0v-1a10 10 0 1 0-4 8`,key:`7n84p3`}]]),q=l(`history`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}],[`path`,{d:`M12 7v5l4 2`,key:`1fdv2h`}]]),J=e(t(),1);function Y(e){let t=o.safeParse(e);return t.success?{ref:t.data.ref,label:t.data.label.slice(0,200)}:null}function X(e,t){return e?`About ${e.ref} ("${e.label}"): ${t}`:t}function Z(e,t){let n=(0,J.useRef)(t);n.current=t,(0,J.useEffect)(()=>{let t=t=>{let r=e.current?.contentWindow;if(!r||t.source!==r)return;let i=Y(t.data);i&&n.current(i)};return window.addEventListener(`message`,t),()=>window.removeEventListener(`message`,t)},[e])}var Q=n();function ne({run:e,reference:t,onClearReference:n}){let r=te(e),i=I(e,r.continueWith),a=u(e),[o,s]=(0,J.useState)(``),[c,l]=(0,J.useState)(!1),[f,p]=(0,J.useState)(null),m=(0,J.useId)(),h=e.status===`running`||e.status===`waiting`,g=e.status===`queued`,_=!h&&!g&&r.available;if(!h&&!g&&!_||e.worktreeLifecycle?.activeOperationId)return null;let v=h&&!a.usable?a.reason:_&&!r.canContinue?r.reason??`No provider can continue this task.`:void 0,y=!v&&!c&&o.trim()!==``,b=async e=>{if(e?.preventDefault(),y){l(!0),p(null);try{await i(X(t,o.trim()),[]),s(``),n()}catch(e){p(e instanceof Error?e.message:String(e))}finally{l(!1)}}};return(0,Q.jsxs)(`form`,{"data-slot":`assets-ask`,"aria-label":`Ask about this asset`,onSubmit:e=>void b(e),className:`shrink-0 border-t border-border bg-background px-2 py-2 sm:px-3`,children:[t?(0,Q.jsxs)(`span`,{"data-slot":`assets-ask-ref`,className:`mb-1.5 inline-flex max-w-full items-center gap-1 rounded-full border border-border bg-muted py-0.5 pr-0.5 pl-2 text-meta`,children:[(0,Q.jsx)(K,{"aria-hidden":`true`,className:`size-3 shrink-0 text-muted-foreground`}),(0,Q.jsx)(V,{label:`${t.ref} — ${t.label}`,children:(0,Q.jsxs)(`span`,{className:`truncate`,children:[(0,Q.jsx)(`span`,{className:`font-mono text-muted-foreground`,children:t.ref}),` `,t.label]})}),(0,Q.jsx)(`button`,{type:`button`,"data-action":`assets-ask-ref-remove`,"aria-label":`Remove reference`,onClick:n,className:`rounded-full p-0.5 text-muted-foreground hover:bg-background hover:text-foreground focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-none`,children:(0,Q.jsx)(z,{"aria-hidden":`true`,className:`size-3`})})]}):null,(0,Q.jsxs)(`div`,{className:`flex items-end gap-2`,children:[(0,Q.jsx)(`textarea`,{"data-slot":`assets-ask-input`,"aria-label":t?`Ask about ${t.label||t.ref}`:`Ask the agent about this asset`,"aria-describedby":v||f?m:void 0,rows:1,value:o,onChange:e=>s(e.target.value),onKeyDown:e=>{e.key===`Enter`&&(e.metaKey||e.ctrlKey)&&b()},disabled:!!v,placeholder:t?`Ask or correct — ⌘↵ to send`:`Ask the agent about this report — click an element to reference it`,className:`max-h-32 min-h-9 flex-1 resize-y rounded-md border border-border bg-card px-2.5 py-2 text-ui focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-none disabled:opacity-60`}),(0,Q.jsxs)(d,{type:`submit`,size:`sm`,"data-action":`assets-ask-send`,disabled:!y,"aria-busy":c||void 0,children:[c?(0,Q.jsx)(w,{"aria-hidden":`true`,className:`motion-safe:animate-spin`}):(0,Q.jsx)(j,{"aria-hidden":`true`}),_?`Continue`:`Send`]})]}),v||f?(0,Q.jsx)(`p`,{id:m,"data-slot":`assets-ask-reason`,className:`mt-1 text-label text-muted-foreground`,children:f??v}):null]})}var re=`No assets yet`,ie=`Agents publish pages here when they write to the run's artifacts folder.`;function ae({runId:e,routed:t,run:n}){let r=a(e),o=c(),l=B(),[u,f]=(0,J.useState)(void 0),p=t?o.name:u,m=r.data?.artifacts??[],h=A(m,p),g=(0,J.useCallback)(n=>{t?l(`/tasks/${e}/assets/${encodeURIComponent(n)}`,{replace:!0}):f(n)},[l,t,e]),[_,v]=se(),[x,S]=(0,J.useState)(0),[T,D]=(0,J.useState)(void 0),k=h?.kind===`html`?oe(r.data?.versions,h.name):[],j=k.at(-1)?.version,N=T&&h&&T.name===h.name&&T.version!==j&&k.some(e=>e.version===T.version)?T.version:void 0,P=(0,J.useRef)(null),[F,I]=(0,J.useState)(null);return Z(P,I),r.isPending?(0,Q.jsx)(U,{icon:(0,Q.jsx)(w,{className:`motion-safe:animate-spin`}),tone:`neutral`,heading:`h2`,title:`Loading assets…`}):r.isError?(0,Q.jsx)(U,{icon:(0,Q.jsx)(R,{}),tone:`danger`,heading:`h2`,title:`Could not load this task's assets`,subtitle:r.error.message}):(0,Q.jsxs)(`section`,{"data-slot":`assets-view`,className:`flex h-full min-h-0 flex-col bg-background`,children:[(0,Q.jsxs)(`div`,{"data-slot":`assets-toolbar`,role:`toolbar`,"aria-label":`Assets`,className:`flex h-10 shrink-0 items-center gap-1.5 border-b border-border px-2 sm:px-3`,children:[h?(0,Q.jsx)(ce,{artifacts:m,current:h,onSelect:g}):(0,Q.jsx)(`span`,{className:`px-1 text-xs text-muted-foreground`,children:`Assets`}),h?.kind===`html`?(0,Q.jsx)(V,{label:`Runs in a sandbox: no access to cezar, your cookies or the network beyond pinned CDN scripts`,children:(0,Q.jsxs)(`span`,{"data-slot":`assets-sandboxed`,tabIndex:0,className:`hidden items-center gap-1 rounded-sm border border-border px-1.5 py-px text-meta text-muted-foreground focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-none sm:inline-flex`,children:[(0,Q.jsx)(G,{"aria-hidden":`true`,className:`size-3`}),`sandboxed`]})}):null,h&&k.length>1?(0,Q.jsx)($,{versions:k,viewing:N,onSelect:e=>D(e===j?void 0:{name:h.name,version:e})}):null,N===void 0?null:(0,Q.jsxs)(`span`,{"data-slot":`assets-viewing-version`,className:`inline-flex items-center gap-1.5 text-meta text-muted-foreground`,children:[`Viewing v`,N,(0,Q.jsx)(`span`,{"aria-hidden":`true`,children:`—`}),(0,Q.jsx)(`button`,{type:`button`,"data-action":`assets-version-current`,onClick:()=>D(void 0),className:`font-medium text-foreground underline underline-offset-2`,children:`back to current`})]}),r.data.truncated?(0,Q.jsxs)(`span`,{className:`hidden text-meta text-muted-foreground md:inline`,children:[`Showing the newest `,r.data.artifacts.length,` files; the folder has more`]}):null,(0,Q.jsxs)(`div`,{className:`ml-auto flex shrink-0 items-center gap-0.5`,children:[(0,Q.jsx)(V,{label:_?`Leave focus — bring the sidebar back`:`Focus — fold the sidebar to icons while Assets is open`,children:(0,Q.jsx)(d,{type:`button`,variant:`ghost`,size:`icon-sm`,"data-action":`assets-focus`,"aria-pressed":_,"aria-label":_?`Leave focus`:`Focus`,className:s(`text-muted-foreground`,_&&`bg-muted text-foreground`),onClick:()=>v(!_),children:_?(0,Q.jsx)(O,{"aria-hidden":`true`}):(0,Q.jsx)(E,{"aria-hidden":`true`})})}),h?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(d,{asChild:!0,variant:`ghost`,size:`sm`,className:`text-muted-foreground max-sm:size-[30px] max-sm:px-0`,children:(0,Q.jsxs)(`a`,{"data-action":`assets-open`,href:i(e,h.name,N),target:`_blank`,rel:`noopener noreferrer`,"aria-label":`Open in new tab`,title:`Open in new tab (still sandboxed)`,children:[(0,Q.jsx)(b,{"aria-hidden":`true`}),(0,Q.jsx)(`span`,{className:`max-sm:sr-only`,children:`Open in new tab`})]})}),(0,Q.jsx)(d,{asChild:!0,variant:`ghost`,size:`sm`,className:`text-muted-foreground max-sm:size-[30px] max-sm:px-0`,children:(0,Q.jsxs)(`a`,{"data-action":`assets-download`,href:i(e,h.name,N),download:h.name,"aria-label":`Download`,children:[(0,Q.jsx)(y,{"aria-hidden":`true`}),(0,Q.jsx)(`span`,{className:`max-sm:sr-only`,children:`Download`})]})}),(0,Q.jsxs)(d,{type:`button`,variant:`ghost`,size:`sm`,"data-action":`assets-reload`,"aria-label":`Reload`,className:`text-muted-foreground max-sm:size-[30px] max-sm:px-0`,onClick:()=>S(e=>e+1),children:[(0,Q.jsx)(M,{"aria-hidden":`true`}),(0,Q.jsx)(`span`,{className:`max-sm:sr-only`,children:`Reload`})]})]}):null]})]}),h?(0,Q.jsx)(le,{runId:e,artifact:h,version:N,frameRef:P},`${h.name}@${h.updatedAt}#${x}v${N??``}`):(0,Q.jsx)(U,{icon:(0,Q.jsx)(C,{}),tone:`neutral`,heading:`h2`,title:re,subtitle:ie}),n&&h?(0,Q.jsx)(ne,{run:n,reference:F,onClearReference:()=>I(null)}):null]})}function oe(e,t){return(e??[]).filter(e=>e.files.includes(t))}function $({versions:e,viewing:t,onSelect:n}){let r=e.at(-1),i=t??r?.version;return(0,Q.jsxs)(v,{children:[(0,Q.jsx)(h,{asChild:!0,children:(0,Q.jsxs)(d,{type:`button`,variant:`ghost`,size:`sm`,"data-action":`assets-versions`,"aria-label":`Version v${i} — pick another version`,className:`h-7 gap-1 px-2 text-label text-muted-foreground`,children:[(0,Q.jsx)(q,{"aria-hidden":`true`,className:`size-3.5`}),`v`,i,r&&t===void 0?(0,Q.jsxs)(`span`,{className:`hidden sm:inline`,children:[`· `,H(r.updatedAt),` ago`]}):null,(0,Q.jsx)(f,{"aria-hidden":`true`,className:`size-3.5 opacity-60`})]})}),(0,Q.jsxs)(g,{align:`start`,className:`w-56`,children:[(0,Q.jsx)(p,{children:`Versions`}),(0,Q.jsx)(m,{value:String(i),onValueChange:e=>n(Number(e)),children:[...e].reverse().map(e=>(0,Q.jsxs)(_,{value:String(e.version),"data-version":e.version,children:[`v`,e.version,` · `,H(e.updatedAt),` ago`,e.version===r?.version?(0,Q.jsx)(`span`,{className:`ml-auto text-meta text-muted-foreground`,children:`current`}):null]},e.version))})]})]})}function se(){let[e,t]=(0,J.useState)(()=>P(`assets`)),n=(0,J.useCallback)(e=>{L(`assets`,e),t(e)},[]);return(0,J.useEffect)(()=>{if(e)return D(()=>n(!1))},[e,n]),[e,n]}function ce({artifacts:e,current:t,onSelect:n}){let r=ee(e);return(0,Q.jsxs)(v,{children:[(0,Q.jsx)(h,{asChild:!0,children:(0,Q.jsxs)(d,{type:`button`,variant:`ghost`,size:`sm`,"data-action":`assets-switcher`,"aria-label":`Asset: ${F(t)} — switch asset`,className:`h-7 min-w-0 max-w-[min(28rem,60vw)] gap-1.5 px-2 text-ui font-medium`,children:[(0,Q.jsx)(`span`,{className:`truncate`,children:F(t)}),(0,Q.jsx)(`span`,{className:`shrink-0 text-meta font-normal text-muted-foreground`,children:k[t.kind]}),(0,Q.jsx)(f,{"aria-hidden":`true`,className:`size-3.5 shrink-0 opacity-60`})]})}),(0,Q.jsxs)(g,{align:`start`,className:`max-h-80 w-80 overflow-y-auto`,children:[(0,Q.jsxs)(p,{children:[e.length,` `,e.length===1?`asset`:`assets`]}),(0,Q.jsx)(m,{value:t.name,onValueChange:n,children:r.map(e=>(0,Q.jsx)(_,{value:e.name,"data-asset":e.name,children:(0,Q.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col`,children:[(0,Q.jsx)(`span`,{className:`truncate`,children:F(e)}),(0,Q.jsxs)(`span`,{className:`truncate font-mono text-meta text-muted-foreground`,children:[e.name,` · `,k[e.kind],` · `,H(e.updatedAt)]})]})},e.name))})]})]})}function le({runId:e,artifact:t,version:n,frameRef:r}){let a=T(),o=i(e,t.name,n);switch(t.kind){case`html`:return(0,Q.jsx)(`iframe`,{ref:r,"data-slot":`assets-frame`,title:F(t),src:`${o}#theme=${a}`,sandbox:N,referrerPolicy:`no-referrer`,className:`min-h-0 w-full flex-1 border-0 bg-background`});case`image`:return(0,Q.jsx)(`div`,{className:`flex min-h-0 flex-1 items-center justify-center overflow-auto p-4`,children:(0,Q.jsx)(`img`,{"data-slot":`assets-image`,src:o,alt:F(t),className:`max-w-full rounded-sm`})});case`markdown`:case`json`:return(0,Q.jsx)(ue,{runId:e,artifact:t});case`other`:return(0,Q.jsx)(U,{icon:(0,Q.jsx)(S,{}),tone:`neutral`,heading:`h2`,title:`No preview for this file`,subtitle:`${t.name} — download it to open it locally.`,actions:(0,Q.jsx)(d,{asChild:!0,variant:`outline`,children:(0,Q.jsxs)(`a`,{"data-action":`assets-download-file`,href:o,download:t.name,children:[(0,Q.jsx)(y,{"aria-hidden":`true`}),`Download`]})})})}}function ue({runId:e,artifact:t}){let n=r(e,t.name,t.updatedAt);return n.isPending?(0,Q.jsxs)(`p`,{className:`px-4 py-6 text-center text-label text-soft-foreground`,children:[`Loading `,t.name,`…`]}):n.isError?(0,Q.jsx)(U,{icon:(0,Q.jsx)(R,{}),tone:`danger`,heading:`h2`,title:`Could not load this asset`,subtitle:n.error.message}):(0,Q.jsx)(`div`,{"data-slot":`assets-${t.kind}`,className:`min-h-0 flex-1 overflow-auto`,children:t.kind===`markdown`?(0,Q.jsx)(`div`,{className:`mx-auto max-w-3xl px-4 py-4`,children:(0,Q.jsx)(W,{children:n.data})}):(0,Q.jsx)(x,{path:t.name,text:n.data})})}export{ae as AssetsView};