@open-mercato/cezar 0.20.0-pr2188.5247 → 0.20.0-pr2192.5251
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/dist/server/server.d.ts +58 -58
- package/package.json +4 -4
- package/web/dist/assets/{active-forge-CkAcQPDz.js → active-forge-KyXM3uG9.js} +1 -1
- package/web/dist/assets/{agent-task-pickers-BXCIulS3.js → agent-task-pickers-UkVtTCna.js} +1 -1
- package/web/dist/assets/{alert-dialog-B2Vi6MQZ.js → alert-dialog-DT465VL4.js} +1 -1
- package/web/dist/assets/{ask-card-DPIjQSs8.js → ask-card-DVv8mY_R.js} +1 -1
- package/web/dist/assets/{assets-view-CsFjfV2n.js → assets-view-D22vr-oN.js} +1 -1
- package/web/dist/assets/{automation-format-CMG-6CYi.js → automation-format-KxcnBz7L.js} +1 -1
- package/web/dist/assets/{automations-route-Dd7F6b4F.js → automations-route-3gfbxDq2.js} +1 -1
- package/web/dist/assets/{button-CJXK1JqU.js → button-CEskWahs.js} +1 -1
- package/web/dist/assets/{centered-state-DE6sgEMs.js → centered-state-Cpzaj75Y.js} +1 -1
- package/web/dist/assets/{chip-DTCkrr8F.js → chip-CEZRGBV7.js} +1 -1
- package/web/dist/assets/{collapsible-DHALizq-.js → collapsible-ZLdkcdMa.js} +1 -1
- package/web/dist/assets/{command-CwP_dLx3.js → command-CcbuBum7.js} +1 -1
- package/web/dist/assets/{commit-list-BJeaIEp4.js → commit-list-BSjLQA6p.js} +1 -1
- package/web/dist/assets/{compare-variants-CYv97XSw.js → compare-variants-C9soYpuE.js} +1 -1
- package/web/dist/assets/{composer-C-aBJhY0.js → composer-Bz8ZfbHr.js} +1 -1
- package/web/dist/assets/{composer-attachments-ChelZhq4.js → composer-attachments-BD2enHFJ.js} +1 -1
- package/web/dist/assets/{dashboard-Dh65_Yi7.js → dashboard-Bl6qWW8i.js} +1 -1
- package/web/dist/assets/{dialog-DVZE8yAO.js → dialog-nn9sCNvn.js} +1 -1
- package/web/dist/assets/{diff-aKT-mpn8.js → diff-FrEDv09S.js} +2 -2
- package/web/dist/assets/{diff-stat-DPetRUXO.js → diff-stat-zisAayZW.js} +1 -1
- package/web/dist/assets/{diff-view-m4TvXu0y.js → diff-view-BeoeZVcx.js} +1 -1
- package/web/dist/assets/{dist-Bsi6zLdE.js → dist-B_KqW6o6.js} +1 -1
- package/web/dist/assets/{dropdown-menu-BKvUsb5Y.js → dropdown-menu-ayNafd3n.js} +1 -1
- package/web/dist/assets/{file-preview-C2EkjhOh.js → file-preview-Dzc3RFUx.js} +1 -1
- package/web/dist/assets/{follow-up-engine-BnRCTyQ4.js → follow-up-engine-Dul_3U9s.js} +1 -1
- package/web/dist/assets/{git-tab-loading-DpG2D8Vl.js → git-tab-loading-DG4p-eF4.js} +1 -1
- package/web/dist/assets/{github-CWRtsamJ.js → github-DvZE0hDJ.js} +1 -1
- package/web/dist/assets/{host-usage-B8ohHYHR.js → host-usage-GTjB03IM.js} +1 -1
- package/web/dist/assets/{icon-tooltip-DYk5cjLx.js → icon-tooltip-DRhwcic2.js} +1 -1
- package/web/dist/assets/{impact-control-ClslFBBA.js → impact-control-CTdtyfcn.js} +1 -1
- package/web/dist/assets/{impact-model-DCDyRxcf.js → impact-model-CpNcUgTV.js} +1 -1
- package/web/dist/assets/{index-BfbbA0lF.js → index-BMA7ZpLG.js} +4 -4
- package/web/dist/assets/{input-DofKzJZl.js → input-BtDLUR9Q.js} +1 -1
- package/web/dist/assets/{loading-state-NiNQtJ5H.js → loading-state-BTvZxCb2.js} +1 -1
- package/web/dist/assets/{manager-avatar-CKfqcoJQ.js → manager-avatar-Ct1uVuvZ.js} +1 -1
- package/web/dist/assets/{manager-chat-BdigDKYZ.js → manager-chat-BfxPyXv3.js} +1 -1
- package/web/dist/assets/{manager-index-D0TOmxr6.js → manager-index-CeMdRtKd.js} +1 -1
- package/web/dist/assets/{manager-new-CCet_7u8.js → manager-new-Bs8_CMUR.js} +1 -1
- package/web/dist/assets/{manager-settings-I1AeATjr.js → manager-settings-Bv2EqZvs.js} +1 -1
- package/web/dist/assets/{managers-Dr63u21Y.js → managers-DDPXJoKR.js} +1 -1
- package/web/dist/assets/{markdown-CXJIKz2i.js → markdown-3rt1rOmI.js} +1 -1
- package/web/dist/assets/{markdown-YSf01kqC.js → markdown-LlPZylt7.js} +1 -1
- package/web/dist/assets/{mascot-picker-C4s7n9Fc.js → mascot-picker-BuGxdrpW.js} +1 -1
- package/web/dist/assets/{new-task-form-2p4cXcVQ.js → new-task-form-BoiK41PS.js} +1 -1
- package/web/dist/assets/{picker-pill-Dv9H0dRF.js → picker-pill-CzANlEqt.js} +1 -1
- package/web/dist/assets/{pill-CoDPUIcJ.js → pill-C2wRS9lg.js} +1 -1
- package/web/dist/assets/{popover-DUg9gBOn.js → popover-DPba6FvD.js} +1 -1
- package/web/dist/assets/{project-router-B1Q3upIJ.js → project-router-CnMbTz-a.js} +1 -1
- package/web/dist/assets/{project-terminal-DbIohh5G.js → project-terminal-sfYncenW.js} +2 -2
- package/web/dist/assets/{provider-auth-alert-GxIEkIvw.js → provider-auth-alert-DbNH_-XT.js} +1 -1
- package/web/dist/assets/{queries-BQUz3Wnb.js → queries-DVZ1lYAo.js} +1 -1
- package/web/dist/assets/{reasoning-effort-pill-BOV3C0If.js → reasoning-effort-pill-al6bbPpw.js} +1 -1
- package/web/dist/assets/{reference-chip-BpbybBvl.js → reference-chip-DdxKs2_A.js} +1 -1
- package/web/dist/assets/{reference-conflict-action-ByDYwT-Y.js → reference-conflict-action-Ci4LDmIm.js} +1 -1
- package/web/dist/assets/{repo-git-ikURCYEK.js → repo-git-BcEGYBrc.js} +1 -1
- package/web/dist/assets/{run-actions-ChUnbFA7.js → run-actions-CDKK-8MP.js} +1 -1
- package/web/dist/assets/{run-diff-B08Fk7dR.js → run-diff-JJOUeclX.js} +1 -1
- package/web/dist/assets/{scroll-within-DMA4ZbQV.js → scroll-within-CfS_Ia4E.js} +1 -1
- package/web/dist/assets/{segmented-DI7abdqX.js → segmented-Chb1Y4ie.js} +1 -1
- package/web/dist/assets/{select-DL5E3ZAD.js → select-DG3hFvx2.js} +1 -1
- package/web/dist/assets/{sheet-DPwaj6sk.js → sheet-DirfZrZD.js} +1 -1
- package/web/dist/assets/{skills-BNiKFlUw.js → skills-CxWFZgjH.js} +1 -1
- package/web/dist/assets/{spinner-hSpq0sPM.js → spinner-CwKcijCN.js} +1 -1
- package/web/dist/assets/{status-dot-AP_4obOJ.js → status-dot-CZAbXsOs.js} +1 -1
- package/web/dist/assets/{tabs-DrhZb97I.js → tabs-r4PCzkHp.js} +1 -1
- package/web/dist/assets/{task-commits-Di0Mc8MX.js → task-commits-CHnonzuD.js} +1 -1
- package/web/dist/assets/{task-graph-Bpi3lEER.js → task-graph-DZAjkdmH.js} +1 -1
- package/web/dist/assets/{task-notes-DCHLinAF.js → task-notes-CHs_WZf5.js} +1 -1
- package/web/dist/assets/{task-workspace-DHl5akxu.js → task-workspace-DWGBLHlR.js} +3 -3
- package/web/dist/assets/{telemetry-3DhVDxf8.js → telemetry-onLa6CTl.js} +1 -1
- package/web/dist/assets/{terminal-drawer-CEktqC3z.js → terminal-drawer-DV7kUP0D.js} +1 -1
- package/web/dist/assets/{terminal-pane-CmmTwiTX.js → terminal-pane-DQAHtCtb.js} +1 -1
- package/web/dist/assets/{terminal-scope-okFE6qRP.js → terminal-scope-CEQdw5Tz.js} +1 -1
- package/web/dist/assets/{textarea-DDyYxCcO.js → textarea-BqeSvPOp.js} +1 -1
- package/web/dist/assets/{thread-items-C-4IW5zi.js → thread-items-CNxMLcOo.js} +1 -1
- package/web/dist/assets/{toaster-BoJZiTRl.js → toaster-4t61QM_C.js} +1 -1
- package/web/dist/assets/{tracker-bQUG9SkJ.js → tracker-B7u8exjG.js} +1 -1
- package/web/dist/assets/{tree-pane-resize-xgVK7J9r.js → tree-pane-resize-XHzIJDtc.js} +1 -1
- package/web/dist/assets/utils-DWwoYTjU.js +60 -0
- package/web/dist/assets/{workflow-graph-CGMeFErv.js → workflow-graph-BaZd6m6v.js} +1 -1
- package/web/dist/assets/{worktree-lifecycle-C18dBDW4.js → worktree-lifecycle-YFVatYLd.js} +1 -1
- package/web/dist/assets/{worktree-lifecycle-operation-_xqKBVKB.js → worktree-lifecycle-operation-CYHhFvQF.js} +1 -1
- package/web/dist/assets/{zoomable-image-BiM5LfTG.js → zoomable-image-D4B6jvp-.js} +1 -1
- package/web/dist/index.html +46 -46
- package/web/dist/assets/utils-Dp6vCdiU.js +0 -55
package/dist/server/server.d.ts
CHANGED
|
@@ -12609,19 +12609,6 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
12609
12609
|
} & {
|
|
12610
12610
|
"/repo/commit/:sha": {
|
|
12611
12611
|
$get: {
|
|
12612
|
-
output: string;
|
|
12613
|
-
outputFormat: "text";
|
|
12614
|
-
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
12615
|
-
input: {
|
|
12616
|
-
query: {
|
|
12617
|
-
structured?: string | string[] | undefined;
|
|
12618
|
-
};
|
|
12619
|
-
} & {
|
|
12620
|
-
param: {
|
|
12621
|
-
sha: string;
|
|
12622
|
-
};
|
|
12623
|
-
};
|
|
12624
|
-
} | {
|
|
12625
12612
|
output: {
|
|
12626
12613
|
sha: string;
|
|
12627
12614
|
subject: string;
|
|
@@ -12669,6 +12656,19 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
12669
12656
|
sha: string;
|
|
12670
12657
|
};
|
|
12671
12658
|
};
|
|
12659
|
+
} | {
|
|
12660
|
+
output: string;
|
|
12661
|
+
outputFormat: "text";
|
|
12662
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
12663
|
+
input: {
|
|
12664
|
+
query: {
|
|
12665
|
+
structured?: string | string[] | undefined;
|
|
12666
|
+
};
|
|
12667
|
+
} & {
|
|
12668
|
+
param: {
|
|
12669
|
+
sha: string;
|
|
12670
|
+
};
|
|
12671
|
+
};
|
|
12672
12672
|
};
|
|
12673
12673
|
};
|
|
12674
12674
|
} & {
|
|
@@ -25089,20 +25089,20 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
25089
25089
|
} & {
|
|
25090
25090
|
"/runs/:id/handoff": {
|
|
25091
25091
|
$get: {
|
|
25092
|
-
output:
|
|
25093
|
-
|
|
25094
|
-
|
|
25092
|
+
output: {
|
|
25093
|
+
error: string;
|
|
25094
|
+
};
|
|
25095
|
+
outputFormat: "json";
|
|
25096
|
+
status: 404;
|
|
25095
25097
|
input: {
|
|
25096
25098
|
param: {
|
|
25097
25099
|
id: string;
|
|
25098
25100
|
};
|
|
25099
25101
|
};
|
|
25100
25102
|
} | {
|
|
25101
|
-
output:
|
|
25102
|
-
|
|
25103
|
-
|
|
25104
|
-
outputFormat: "json";
|
|
25105
|
-
status: 404;
|
|
25103
|
+
output: string;
|
|
25104
|
+
outputFormat: "text";
|
|
25105
|
+
status: 200;
|
|
25106
25106
|
input: {
|
|
25107
25107
|
param: {
|
|
25108
25108
|
id: string;
|
|
@@ -25128,20 +25128,20 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
25128
25128
|
} & {
|
|
25129
25129
|
"/runs/:id/diff": {
|
|
25130
25130
|
$get: {
|
|
25131
|
-
output:
|
|
25132
|
-
|
|
25133
|
-
|
|
25131
|
+
output: {
|
|
25132
|
+
error: string;
|
|
25133
|
+
};
|
|
25134
|
+
outputFormat: "json";
|
|
25135
|
+
status: 404;
|
|
25134
25136
|
input: {
|
|
25135
25137
|
param: {
|
|
25136
25138
|
id: string;
|
|
25137
25139
|
};
|
|
25138
25140
|
};
|
|
25139
25141
|
} | {
|
|
25140
|
-
output:
|
|
25141
|
-
|
|
25142
|
-
|
|
25143
|
-
outputFormat: "json";
|
|
25144
|
-
status: 404;
|
|
25142
|
+
output: string;
|
|
25143
|
+
outputFormat: "text";
|
|
25144
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
25145
25145
|
input: {
|
|
25146
25146
|
param: {
|
|
25147
25147
|
id: string;
|
|
@@ -31389,19 +31389,6 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
31389
31389
|
} & {
|
|
31390
31390
|
"/repo/commit/:sha": {
|
|
31391
31391
|
$get: {
|
|
31392
|
-
output: string;
|
|
31393
|
-
outputFormat: "text";
|
|
31394
|
-
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
31395
|
-
input: {
|
|
31396
|
-
query: {
|
|
31397
|
-
structured?: string | string[] | undefined;
|
|
31398
|
-
};
|
|
31399
|
-
} & {
|
|
31400
|
-
param: {
|
|
31401
|
-
sha: string;
|
|
31402
|
-
};
|
|
31403
|
-
};
|
|
31404
|
-
} | {
|
|
31405
31392
|
output: {
|
|
31406
31393
|
sha: string;
|
|
31407
31394
|
subject: string;
|
|
@@ -31449,6 +31436,19 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
31449
31436
|
sha: string;
|
|
31450
31437
|
};
|
|
31451
31438
|
};
|
|
31439
|
+
} | {
|
|
31440
|
+
output: string;
|
|
31441
|
+
outputFormat: "text";
|
|
31442
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
31443
|
+
input: {
|
|
31444
|
+
query: {
|
|
31445
|
+
structured?: string | string[] | undefined;
|
|
31446
|
+
};
|
|
31447
|
+
} & {
|
|
31448
|
+
param: {
|
|
31449
|
+
sha: string;
|
|
31450
|
+
};
|
|
31451
|
+
};
|
|
31452
31452
|
};
|
|
31453
31453
|
};
|
|
31454
31454
|
} & {
|
|
@@ -43869,20 +43869,20 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
43869
43869
|
} & {
|
|
43870
43870
|
"/runs/:id/handoff": {
|
|
43871
43871
|
$get: {
|
|
43872
|
-
output:
|
|
43873
|
-
|
|
43874
|
-
|
|
43872
|
+
output: {
|
|
43873
|
+
error: string;
|
|
43874
|
+
};
|
|
43875
|
+
outputFormat: "json";
|
|
43876
|
+
status: 404;
|
|
43875
43877
|
input: {
|
|
43876
43878
|
param: {
|
|
43877
43879
|
id: string;
|
|
43878
43880
|
};
|
|
43879
43881
|
};
|
|
43880
43882
|
} | {
|
|
43881
|
-
output:
|
|
43882
|
-
|
|
43883
|
-
|
|
43884
|
-
outputFormat: "json";
|
|
43885
|
-
status: 404;
|
|
43883
|
+
output: string;
|
|
43884
|
+
outputFormat: "text";
|
|
43885
|
+
status: 200;
|
|
43886
43886
|
input: {
|
|
43887
43887
|
param: {
|
|
43888
43888
|
id: string;
|
|
@@ -43908,20 +43908,20 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
43908
43908
|
} & {
|
|
43909
43909
|
"/runs/:id/diff": {
|
|
43910
43910
|
$get: {
|
|
43911
|
-
output:
|
|
43912
|
-
|
|
43913
|
-
|
|
43911
|
+
output: {
|
|
43912
|
+
error: string;
|
|
43913
|
+
};
|
|
43914
|
+
outputFormat: "json";
|
|
43915
|
+
status: 404;
|
|
43914
43916
|
input: {
|
|
43915
43917
|
param: {
|
|
43916
43918
|
id: string;
|
|
43917
43919
|
};
|
|
43918
43920
|
};
|
|
43919
43921
|
} | {
|
|
43920
|
-
output:
|
|
43921
|
-
|
|
43922
|
-
|
|
43923
|
-
outputFormat: "json";
|
|
43924
|
-
status: 404;
|
|
43922
|
+
output: string;
|
|
43923
|
+
outputFormat: "text";
|
|
43924
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
43925
43925
|
input: {
|
|
43926
43926
|
param: {
|
|
43927
43927
|
id: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-mercato/cezar",
|
|
3
|
-
"version": "0.20.0-
|
|
3
|
+
"version": "0.20.0-pr2192.5251",
|
|
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",
|
|
@@ -53,11 +53,11 @@
|
|
|
53
53
|
"undici": "^6.29.0",
|
|
54
54
|
"ws": "^8.21.1",
|
|
55
55
|
"yaml": "^2.5.0",
|
|
56
|
-
"zod": "^4.
|
|
56
|
+
"zod": "^4.4.3"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
|
-
"@open-mercato/cezar-api-client": "0.20.0-
|
|
60
|
-
"@open-mercato/cezar-contract": "0.20.0-
|
|
59
|
+
"@open-mercato/cezar-api-client": "0.20.0-pr2192.5251",
|
|
60
|
+
"@open-mercato/cezar-contract": "0.20.0-pr2192.5251",
|
|
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-
|
|
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-DVZ1lYAo.js";import{c as i}from"./project-router-CnMbTz-a.js";import{t as a}from"./createLucideIcon-BHp8sXmF.js";var o=a(`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=a(`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,a=i();return(0,c.useMemo)(()=>f(e,t,a),[e,t,a])}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-
|
|
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-DWwoYTjU.js";import{t as i}from"./project-router-CnMbTz-a.js";import{j as a}from"./run-actions-CDKK-8MP.js";import{H as o}from"./button-CEskWahs.js";import{r as s}from"./dist-B_KqW6o6.js";import{t as c}from"./workflow-BEP63Wt4.js";import{_ as l}from"./impact-model-CpNcUgTV.js";import{S as u,b as d,m as f,v as p,x as m}from"./composer-Bz8ZfbHr.js";import{i as h,r as g,t as _}from"./popover-DPba6FvD.js";import{t as v}from"./icon-tooltip-DRhwcic2.js";import{a as y,i as b,o as x,r as S,s as C,t as w}from"./command-CcbuBum7.js";import{r as T}from"./chip-CEZRGBV7.js";import"./picker-pill-CzANlEqt.js";import{l as E}from"./index-BMA7ZpLG.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)(i,{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[a,l]=(0,A.useState)(!1),[d,f]=(0,A.useState)(``),p=(0,A.useRef)(null),v=m(e,d);return(0,D.jsxs)(_,{open:a,onOpenChange:e=>{l(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)(c,{"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)(s,{"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:()=>p.current?.scrollTo(0,0)}),(0,D.jsxs)(C,{ref:p,"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:u(e.name,e.description),"data-slot":`${i}-workflow-option`,"data-workflow":e.name,onSelect:()=>{n(r?null:e.name),l(!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)(o,{"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:i,maxSelections:c,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}=p(d(e,j,t),t),z=(e,t)=>{let a=n.includes(e.name);return(0,D.jsxs)(x,{value:`skill ${e.name} ${e.path}`,keywords:u(e.name,e.description),"data-slot":`${m}-skill-option`,"data-skill":e.name,"data-selected":a?`true`:void 0,disabled:!a&&c!==void 0&&n.length>=c,onSelect:()=>i(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)(l,{"aria-hidden":`true`,className:`size-3.5`})})}),a?(0,D.jsx)(o,{"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)(a,{"aria-hidden":`true`,className:`size-3 shrink-0 text-violet`}),`skills`,n.length>0?` · ${n.length}`:``,(0,D.jsx)(s,{"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,f(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{t as r}from"./utils-
|
|
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-DWwoYTjU.js";import{A as i,_ as a,d as o,f as s,g as c,h as l,k as u,l as d,m as f,n as p,p as m,u as h,z as g}from"./button-CEskWahs.js";var _=e(t(),1),v=n(),y=`AlertDialog`,[b,ee]=i(y,[a]),x=a(),S=e=>{let{__scopeAlertDialog:t,...n}=e,r=x(t);return(0,v.jsx)(d,{...r,...n,modal:!0})};S.displayName=y;var C=`AlertDialogTrigger`,w=_.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=x(n);return(0,v.jsx)(c,{...i,...r,ref:t})});w.displayName=C;var T=`AlertDialogPortal`,E=e=>{let{__scopeAlertDialog:t,...n}=e,r=x(t);return(0,v.jsx)(f,{...r,...n})};E.displayName=T;var D=`AlertDialogOverlay`,O=_.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=x(n);return(0,v.jsx)(m,{...i,...r,ref:t})});O.displayName=D;var k=`AlertDialogContent`,[A,j]=b(k),M=_.forwardRef((e,t)=>{let{__scopeAlertDialog:n,children:r,...i}=e,a=x(n),s=g(t,_.useRef(null)),c=_.useRef(null);return(0,v.jsx)(A,{scope:n,cancelRef:c,children:(0,v.jsx)(o,{role:`alertdialog`,...a,...i,ref:s,onOpenAutoFocus:u(i.onOpenAutoFocus,e=>{e.preventDefault(),c.current?.focus({preventScroll:!0})}),onPointerDownOutside:e=>e.preventDefault(),onInteractOutside:e=>e.preventDefault(),children:r})})});M.displayName=k;var N=`AlertDialogTitle`,P=_.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=x(n);return(0,v.jsx)(l,{...i,...r,ref:t})});P.displayName=N;var F=`AlertDialogDescription`,I=_.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=x(n);return(0,v.jsx)(s,{...i,...r,ref:t})});I.displayName=F;var L=`AlertDialogAction`,R=_.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=x(n);return(0,v.jsx)(h,{...i,...r,ref:t})});R.displayName=L;var z=`AlertDialogCancel`,B=_.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,{cancelRef:i}=j(z,n),a=x(n),o=g(t,i);return(0,v.jsx)(h,{...a,...r,ref:o})});B.displayName=z;var V=S,te=E,H=O,U=M,W=R,G=B,K=P,q=I;function J({...e}){return(0,v.jsx)(V,{"data-slot":`alert-dialog`,...e})}function Y({...e}){return(0,v.jsx)(te,{"data-slot":`alert-dialog-portal`,...e})}function X({className:e,...t}){return(0,v.jsx)(H,{"data-slot":`alert-dialog-overlay`,className:r(`fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0`,e),...t})}function Z({className:e,...t}){return(0,v.jsxs)(Y,{children:[(0,v.jsx)(X,{}),(0,v.jsx)(U,{"data-slot":`alert-dialog-content`,className:r(`fixed top-[50%] left-[50%] z-50 grid w-full grid-cols-1 max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border bg-card p-6 shadow-modal duration-200 outline-none data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 sm:max-w-md`,e),...t})]})}function Q({className:e,...t}){return(0,v.jsx)(`div`,{"data-slot":`alert-dialog-header`,className:r(`flex flex-col gap-2 text-center sm:text-left`,e),...t})}function $({className:e,...t}){return(0,v.jsx)(`div`,{"data-slot":`alert-dialog-footer`,className:r(`flex flex-col-reverse gap-2 sm:flex-row sm:justify-end`,e),...t})}function ne({className:e,...t}){return(0,v.jsx)(K,{"data-slot":`alert-dialog-title`,className:r(`text-lg leading-none font-semibold`,e),...t})}function re({className:e,...t}){return(0,v.jsx)(q,{"data-slot":`alert-dialog-description`,className:r(`text-sm text-muted-foreground`,e),...t})}function ie({className:e,variant:t=`contrast`,...n}){return(0,v.jsx)(W,{"data-slot":`alert-dialog-action`,"data-variant":t,className:r(p({variant:t}),e),...n})}function ae({className:e,...t}){return(0,v.jsx)(G,{"data-slot":`alert-dialog-cancel`,className:r(p({variant:`outline`}),e),...t})}export{re as a,ne as c,Z as i,ie as n,$ as o,ae as r,Q as s,J as t};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,t as n}from"./react-runtime-CCIEwYL0.js";import{$n as r}from"./queries-
|
|
1
|
+
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,t as n}from"./react-runtime-CCIEwYL0.js";import{$n as r}from"./queries-DVZ1lYAo.js";import{t as i}from"./utils-DWwoYTjU.js";import{t as a,y as o}from"./project-router-CnMbTz-a.js";import{H as s,t as c}from"./button-CEskWahs.js";import{t as l}from"./textarea-BqeSvPOp.js";import{t as u}from"./status-dot-CZAbXsOs.js";import{a as d}from"./reference-conflict-action-Ci4LDmIm.js";import{r as f,t as p}from"./enter-key-Bsscx4Nx.js";var m=e(t(),1),h=new Map,g=(e,t)=>JSON.stringify([e,t.id,t.questions.map(e=>[e.header,e.question,e.options.map(e=>e.label)])]);function _(e,t){return h.get(g(e,t))??{}}function v(e,t,n){h.set(g(e,t),n)}function y(e,t){h.delete(g(e,t))}var b=n(),x=`I need more information to answer this — please explain the context and ask again.`,S={labels:[]},C=r({status:`waiting`}),w=e=>e.other?.trim().replace(/\s+/g,` `)??``,T=e=>e.moreInfo===!0||e.labels.length>0||w(e)!==``;function E(e,t){if(t.moreInfo)return`${e.header}: ${x}`;let n=w(t);return`${e.header}: ${[...t.labels,...n?[n]:[]].join(`, `)}`}function D({ask:e,run:t}){return(0,m.useEffect)(()=>{e.resolved&&y(t.id,e)},[e,t.id]),e.resolved?(0,b.jsxs)(`div`,{"data-slot":`ask-card`,"data-resolved":`true`,className:`rounded-lg border border-border bg-card px-3.5 py-2.5 text-label text-muted-foreground`,children:[(0,b.jsx)(s,{"aria-hidden":`true`,className:`mr-1 inline size-3.5 align-[-2px] text-soft-foreground`}),(0,b.jsx)(`span`,{className:`text-soft-foreground`,children:`Answered`}),e.answer?(0,b.jsx)(`span`,{className:`ml-1.5 break-words whitespace-pre-line text-foreground`,children:e.answer}):null]}):(0,b.jsx)(O,{ask:e,run:t})}function O({ask:e,run:t}){let n=d(t);return(0,b.jsx)(k,{ask:e,ownerId:t.id,delivery:n,asker:e.fromWorkflow?`The workflow is asking`:`The agent is asking`})}function k({ask:e,ownerId:t,delivery:n,asker:r}){let i=n.blockedBy!==void 0,s=e.questions,l=s.length===1&&s[0]?.multiSelect!==!0,[d,f]=(0,m.useState)(()=>_(t,e)),p=(n,r)=>f(i=>{let a={...i,[n]:r};return v(t,e,a),a}),h=e=>d[e]??S,g=e=>T(h(e)),y=s.every((e,t)=>g(t)),x=s.some((e,t)=>g(t))?s.filter((e,t)=>!g(t)).map(e=>e.header):[],w=()=>void n.send(s.map((e,t)=>E(e,h(t))).join(`
|
|
2
2
|
`)),D=n.mode===`resume`,O=(0,m.useRef)(null),{hash:k}=o();return(0,m.useEffect)(()=>{k!==`#ask`||!O.current||(O.current.scrollIntoView?.({block:`center`}),O.current.querySelector(`button, input, textarea`)?.focus())},[k]),(0,b.jsxs)(`div`,{ref:O,"data-slot":`ask-card`,"data-resolved":`false`,"data-delivery":n.mode,"aria-busy":n.isPending||void 0,"data-tone":C.tone,className:`rounded-lg border border-info/30 bg-info/5 px-4 pt-3.5 pb-3.5`,children:[(0,b.jsxs)(`div`,{className:`mb-2.5 flex items-center gap-2`,children:[(0,b.jsx)(u,{tone:C.tone,pulse:C.pulse}),(0,b.jsx)(`span`,{"data-slot":`ask-asker`,className:`text-label font-semibold text-foreground`,children:r}),n.isPending?(0,b.jsx)(`span`,{"data-slot":`ask-sending`,role:`status`,className:`ml-auto text-meta text-muted-foreground`,children:`Sending…`}):null]}),(0,b.jsx)(`div`,{className:`flex flex-col gap-4`,children:s.map((e,t)=>(0,b.jsx)(A,{question:e,disabled:n.isPending||i,oneTap:l,answer:h(t),onChange:e=>{i||p(t,e)},onSubmit:t=>{!i&&T(t)&&n.send(E(e,t))}},e.id??t))}),l?D?(0,b.jsx)(`p`,{"data-slot":`ask-resume-hint`,className:`mt-3 text-meta text-muted-foreground`,children:`The session has ended — your answer reopens it and goes to the agent.`}):null:(0,b.jsxs)(`div`,{className:`mt-3 flex flex-wrap items-center gap-x-2.5 gap-y-1.5`,children:[(0,b.jsx)(c,{size:`sm`,disabled:n.isPending||i||!y,className:`pointer-coarse:min-h-11 disabled:bg-muted disabled:text-muted-foreground disabled:opacity-100 disabled:shadow-[inset_0_0_0_1px_var(--border)]`,onClick:w,children:D?`Send answer & reopen`:`Send answer`}),(0,b.jsx)(`span`,{"data-slot":D?`ask-resume-hint`:`ask-hint`,className:`min-w-0 text-meta text-muted-foreground`,children:D?`the session has ended — sending reopens it`:`${s.length>1?`answer each question`:`pick one or more`} — or type a reply below`})]}),!l&&x.length>0?(0,b.jsxs)(`p`,{"data-slot":`ask-unanswered`,className:`mt-2 text-meta text-muted-foreground`,children:[`unanswered: `,x.join(`, `)]}):null,n.blockedBy===`provider`?(0,b.jsxs)(`div`,{"data-slot":`ask-provider-gate`,className:`mt-3 flex flex-wrap items-center gap-1.5 text-label text-muted-foreground`,children:[(0,b.jsx)(`span`,{children:n.reason}),(0,b.jsx)(a,{to:`/settings/agents#providers`,className:`font-medium text-foreground underline underline-offset-4`,children:`Configure providers`})]}):null,n.blockedBy===`no-session`?(0,b.jsx)(`p`,{"data-slot":`ask-no-session`,className:`mt-3 text-label text-muted-foreground`,children:n.reason}):null,n.error?(0,b.jsx)(`p`,{"data-slot":`ask-error`,role:`alert`,className:`mt-3 text-label text-danger`,children:n.error}):null]})}function A({question:e,disabled:t,oneTap:n,answer:r,onChange:i,onSubmit:a}){let o=e.multiSelect===!0,s=f(),u=(0,m.useId)(),d=r.other!==void 0,h=(0,m.useRef)(null),[g,_]=(0,m.useState)(!1);(0,m.useEffect)(()=>{g&&(h.current?.focus(),_(!1))},[g]);let v=e=>n?a(e):i(e),y=e=>{if(!o){v({labels:[e]});return}i({labels:r.labels.includes(e)?r.labels.filter(t=>t!==e):[...r.labels,e],...d?{other:r.other}:{}})};return(0,b.jsxs)(`div`,{role:`group`,"aria-labelledby":u,children:[(0,b.jsxs)(`div`,{className:`mb-0.5 flex items-center gap-2`,children:[(0,b.jsx)(`span`,{className:`rounded-md bg-primary px-1.5 py-0.5 eyebrow text-primary-foreground`,children:e.header}),o?(0,b.jsx)(`span`,{"aria-hidden":`true`,className:`ml-auto text-micro text-soft-foreground`,children:`select all that apply`}):null]}),(0,b.jsxs)(`p`,{id:u,className:`mb-2.5 break-words text-body font-semibold text-foreground`,children:[e.question,o?(0,b.jsx)(`span`,{className:`sr-only`,children:` (select all that apply)`}):null]}),(0,b.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[e.options.map(e=>(0,b.jsx)(j,{label:e.label,description:e.description,checkbox:o,selected:r.labels.includes(e.label),disabled:t,onClick:()=>y(e.label)},e.label)),(0,b.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,b.jsx)(M,{slot:`ask-other`,selected:d,disabled:t,onClick:()=>{if(d){i({labels:r.labels});return}i({labels:o?r.labels:[],other:``}),_(!0)},children:`Other…`}),(0,b.jsx)(M,{slot:`ask-more-info`,selected:r.moreInfo===!0,disabled:t,onClick:()=>r.moreInfo?i(S):v({labels:[],moreInfo:!0}),children:`Need more info`})]}),d?(0,b.jsxs)(`div`,{"data-slot":`ask-other-input`,className:`flex flex-col gap-2`,children:[(0,b.jsx)(l,{ref:h,rows:2,"aria-label":`Your own answer: ${e.question}`,placeholder:`Type your own answer`,value:r.other,disabled:t,enterKeyHint:n&&!s?`send`:`enter`,onChange:e=>i({...r,other:e.target.value}),onKeyDown:e=>{let t=p({key:e.key,shiftKey:e.shiftKey,metaKey:e.metaKey,ctrlKey:e.ctrlKey,altKey:e.altKey,repeat:e.repeat,isComposing:e.nativeEvent.isComposing,keyCode:e.keyCode},s);n&&t&&(e.preventDefault(),a(r))}}),n?(0,b.jsx)(`div`,{children:(0,b.jsx)(c,{size:`sm`,disabled:t||!T(r),onClick:()=>a(r),children:`Send answer`})}):null]}):null]})]})}function j({label:e,description:t,checkbox:n,selected:r,disabled:a,onClick:o}){return(0,b.jsxs)(`button`,{type:`button`,disabled:a,"aria-pressed":r,onClick:o,className:i(`flex w-full flex-col gap-0.5 rounded-md border px-3.5 py-2.5 text-left outline-none transition-colors motion-reduce:transition-none`,`focus-visible:ring-[3px] focus-visible:ring-ring/50`,`hover:border-primary/50 hover:bg-primary/[0.06] disabled:pointer-events-none disabled:opacity-50`,r?`border-primary/60 bg-primary/[0.06]`:`border-border bg-card`),children:[(0,b.jsxs)(`span`,{className:`flex min-w-0 items-start gap-2 text-ui font-semibold text-foreground`,children:[n?(0,b.jsx)(`span`,{"aria-hidden":!0,className:i(`flex size-4 shrink-0 items-center justify-center rounded border text-micro`,r?`border-primary bg-primary text-primary-foreground`:`border-soft-foreground`),children:r?`✓`:``}):null,(0,b.jsx)(`span`,{className:`min-w-0 break-words`,children:e})]}),t?(0,b.jsx)(`span`,{className:`min-w-0 break-words text-label text-muted-foreground`,children:t}):null]})}function M({slot:e,selected:t,disabled:n,onClick:r,children:a}){return(0,b.jsx)(`button`,{type:`button`,"data-slot":e,disabled:n,"aria-pressed":t,onClick:r,className:i(`rounded-md border border-dashed px-3 py-1.5 text-label font-medium text-muted-foreground outline-none transition-colors motion-reduce:transition-none`,`focus-visible:ring-[3px] focus-visible:ring-ring/50 pointer-coarse:min-h-11 pointer-coarse:px-3.5`,`hover:border-primary/50 hover:bg-primary/[0.06] hover:text-foreground disabled:pointer-events-none disabled:opacity-50`,t?`border-primary/60 bg-primary/[0.06] text-foreground`:`border-border bg-card`),children:a})}export{k as n,y as r,D 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,Da as i,wt as a}from"./queries-BQUz3Wnb.js";import{Tt as o,t as s}from"./utils-Dp6vCdiU.js";import{S as c,l}from"./project-router-B1Q3upIJ.js";import{t as u}from"./createLucideIcon-BHp8sXmF.js";import{M as d,O as f}from"./run-actions-ChUnbFA7.js";import{t as p}from"./button-CJXK1JqU.js";import{r as m}from"./dist-Bsi6zLdE.js";import{a as h,o as g,p as _,r as v,s as y,t as b}from"./dropdown-menu-BKvUsb5Y.js";import{t as x}from"./download-CfgyYHf7.js";import{t as S}from"./external-link-BE6y205O.js";import{t as C}from"./file-preview-C2EkjhOh.js";import{t as w}from"./file--aqoYe_k.js";import{t as T}from"./loader-circle-CPBhhDbB.js";import{a as E,c as D,d as O,f as ee,i as k,l as A,o as j,r as M,s as N,t as P,u as F}from"./follow-up-engine-BnRCTyQ4.js";import{t as I}from"./triangle-alert-CIzim6ZN.js";import{t as te}from"./x-BqECUykl.js";import{t as L}from"./icon-tooltip-DYk5cjLx.js";import{r as R}from"./format-BUbPQpzw.js";import{t as z}from"./centered-state-DE6sgEMs.js";import{t as B}from"./markdown-YSf01kqC.js";import{mt as V,nt as H,pt as U,tt as W,ut as G}from"./index-BfbbA0lF.js";var K=u(`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=u(`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=P(e),i=M(e,r.continueWith),a=f(e),[o,s]=(0,J.useState)(``),[c,l]=(0,J.useState)(!1),[u,d]=(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),d(null);try{await i(X(t,o.trim()),[]),s(``),n()}catch(e){d(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)(L,{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)(te,{"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||u?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)(p,{type:`submit`,size:`sm`,"data-action":`assets-ask-send`,disabled:!y,"aria-busy":c||void 0,children:[c?(0,Q.jsx)(T,{"aria-hidden":`true`,className:`motion-safe:animate-spin`}):(0,Q.jsx)(O,{"aria-hidden":`true`}),_?`Continue`:`Send`]})]}),v||u?(0,Q.jsx)(`p`,{id:m,"data-slot":`assets-ask-reason`,className:`mt-1 text-label text-muted-foreground`,children:u??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(),u=l(),[f,m]=(0,J.useState)(void 0),h=t?o.name:f,g=r.data?.artifacts??[],_=D(g,h),v=(0,J.useCallback)(n=>{t?u(`/tasks/${e}/assets/${encodeURIComponent(n)}`,{replace:!0}):m(n)},[u,t,e]),[y,b]=se(),[C,w]=(0,J.useState)(0),[E,O]=(0,J.useState)(void 0),k=_?.kind===`html`?$(r.data?.versions,_.name):[],A=k.at(-1)?.version,j=E&&_&&E.name===_.name&&E.version!==A&&k.some(e=>e.version===E.version)?E.version:void 0,M=(0,J.useRef)(null),[N,P]=(0,J.useState)(null);return Z(M,P),r.isPending?(0,Q.jsx)(z,{icon:(0,Q.jsx)(T,{className:`motion-safe:animate-spin`}),tone:`neutral`,heading:`h2`,title:`Loading assets…`}):r.isError?(0,Q.jsx)(z,{icon:(0,Q.jsx)(I,{}),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:[_?(0,Q.jsx)(ce,{artifacts:g,current:_,onSelect:v}):(0,Q.jsx)(`span`,{className:`px-1 text-xs text-muted-foreground`,children:`Assets`}),_?.kind===`html`?(0,Q.jsx)(L,{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,_&&k.length>1?(0,Q.jsx)(oe,{versions:k,viewing:j,onSelect:e=>O(e===A?void 0:{name:_.name,version:e})}):null,j===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`,j,(0,Q.jsx)(`span`,{"aria-hidden":`true`,children:`—`}),(0,Q.jsx)(`button`,{type:`button`,"data-action":`assets-version-current`,onClick:()=>O(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)(L,{label:y?`Leave focus — bring the sidebar back`:`Focus — fold the sidebar to icons while Assets is open`,children:(0,Q.jsx)(p,{type:`button`,variant:`ghost`,size:`icon-sm`,"data-action":`assets-focus`,"aria-pressed":y,"aria-label":y?`Leave focus`:`Focus`,className:s(`text-muted-foreground`,y&&`bg-muted text-foreground`),onClick:()=>b(!y),children:y?(0,Q.jsx)(U,{"aria-hidden":`true`}):(0,Q.jsx)(V,{"aria-hidden":`true`})})}),_?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(p,{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,_.name,j),target:`_blank`,rel:`noopener noreferrer`,"aria-label":`Open in new tab`,title:`Open in new tab (still sandboxed)`,children:[(0,Q.jsx)(S,{"aria-hidden":`true`}),(0,Q.jsx)(`span`,{className:`max-sm:sr-only`,children:`Open in new tab`})]})}),(0,Q.jsx)(p,{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,_.name,j),download:_.name,"aria-label":`Download`,children:[(0,Q.jsx)(x,{"aria-hidden":`true`}),(0,Q.jsx)(`span`,{className:`max-sm:sr-only`,children:`Download`})]})}),(0,Q.jsxs)(p,{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:()=>w(e=>e+1),children:[(0,Q.jsx)(ee,{"aria-hidden":`true`}),(0,Q.jsx)(`span`,{className:`max-sm:sr-only`,children:`Reload`})]})]}):null]})]}),_?(0,Q.jsx)(le,{runId:e,artifact:_,version:j,frameRef:M},`${_.name}@${_.updatedAt}#${C}v${j??``}`):(0,Q.jsx)(z,{icon:(0,Q.jsx)(d,{}),tone:`neutral`,heading:`h2`,title:re,subtitle:ie}),n&&_?(0,Q.jsx)(ne,{run:n,reference:N,onClearReference:()=>P(null)}):null]})}function $(e,t){return(e??[]).filter(e=>e.files.includes(t))}function oe({versions:e,viewing:t,onSelect:n}){let r=e.at(-1),i=t??r?.version;return(0,Q.jsxs)(b,{children:[(0,Q.jsx)(_,{asChild:!0,children:(0,Q.jsxs)(p,{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:[`· `,R(r.updatedAt),` ago`]}):null,(0,Q.jsx)(m,{"aria-hidden":`true`,className:`size-3.5 opacity-60`})]})}),(0,Q.jsxs)(v,{align:`start`,className:`w-56`,children:[(0,Q.jsx)(h,{children:`Versions`}),(0,Q.jsx)(g,{value:String(i),onValueChange:e=>n(Number(e)),children:[...e].reverse().map(e=>(0,Q.jsxs)(y,{value:String(e.version),"data-version":e.version,children:[`v`,e.version,` · `,R(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)(()=>A(`assets`)),n=(0,J.useCallback)(e=>{F(`assets`,e),t(e)},[]);return(0,J.useEffect)(()=>{if(e)return W(()=>n(!1))},[e,n]),[e,n]}function ce({artifacts:e,current:t,onSelect:n}){let r=N(e);return(0,Q.jsxs)(b,{children:[(0,Q.jsx)(_,{asChild:!0,children:(0,Q.jsxs)(p,{type:`button`,variant:`ghost`,size:`sm`,"data-action":`assets-switcher`,"aria-label":`Asset: ${j(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:j(t)}),(0,Q.jsx)(`span`,{className:`shrink-0 text-meta font-normal text-muted-foreground`,children:E[t.kind]}),(0,Q.jsx)(m,{"aria-hidden":`true`,className:`size-3.5 shrink-0 opacity-60`})]})}),(0,Q.jsxs)(v,{align:`start`,className:`max-h-80 w-80 overflow-y-auto`,children:[(0,Q.jsxs)(h,{children:[e.length,` `,e.length===1?`asset`:`assets`]}),(0,Q.jsx)(g,{value:t.name,onValueChange:n,children:r.map(e=>(0,Q.jsx)(y,{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:j(e)}),(0,Q.jsxs)(`span`,{className:`truncate font-mono text-meta text-muted-foreground`,children:[e.name,` · `,E[e.kind],` · `,R(e.updatedAt)]})]})},e.name))})]})]})}function le({runId:e,artifact:t,version:n,frameRef:r}){let a=H(),o=i(e,t.name,n);switch(t.kind){case`html`:return(0,Q.jsx)(`iframe`,{ref:r,"data-slot":`assets-frame`,title:j(t),src:`${o}#theme=${a}`,sandbox:k,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:j(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)(z,{icon:(0,Q.jsx)(w,{}),tone:`neutral`,heading:`h2`,title:`No preview for this file`,subtitle:`${t.name} — download it to open it locally.`,actions:(0,Q.jsx)(p,{asChild:!0,variant:`outline`,children:(0,Q.jsxs)(`a`,{"data-action":`assets-download-file`,href:o,download:t.name,children:[(0,Q.jsx)(x,{"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)(z,{icon:(0,Q.jsx)(I,{}),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)(B,{children:n.data})}):(0,Q.jsx)(C,{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,Da as i,wt as a}from"./queries-DVZ1lYAo.js";import{Tt as o,t as s}from"./utils-DWwoYTjU.js";import{S as c,l}from"./project-router-CnMbTz-a.js";import{t as u}from"./createLucideIcon-BHp8sXmF.js";import{M as d,O as f}from"./run-actions-CDKK-8MP.js";import{t as p}from"./button-CEskWahs.js";import{r as m}from"./dist-B_KqW6o6.js";import{a as h,o as g,p as _,r as v,s as y,t as b}from"./dropdown-menu-ayNafd3n.js";import{t as x}from"./download-CfgyYHf7.js";import{t as S}from"./external-link-BE6y205O.js";import{t as C}from"./file-preview-Dzc3RFUx.js";import{t as w}from"./file--aqoYe_k.js";import{t as T}from"./loader-circle-CPBhhDbB.js";import{a as E,c as D,d as O,f as ee,i as k,l as A,o as j,r as M,s as N,t as P,u as F}from"./follow-up-engine-Dul_3U9s.js";import{t as I}from"./triangle-alert-CIzim6ZN.js";import{t as te}from"./x-BqECUykl.js";import{t as L}from"./icon-tooltip-DRhwcic2.js";import{r as R}from"./format-BUbPQpzw.js";import{t as z}from"./centered-state-Cpzaj75Y.js";import{t as B}from"./markdown-LlPZylt7.js";import{mt as V,nt as H,pt as U,tt as W,ut as G}from"./index-BMA7ZpLG.js";var K=u(`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=u(`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=P(e),i=M(e,r.continueWith),a=f(e),[o,s]=(0,J.useState)(``),[c,l]=(0,J.useState)(!1),[u,d]=(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),d(null);try{await i(X(t,o.trim()),[]),s(``),n()}catch(e){d(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)(L,{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)(te,{"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||u?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)(p,{type:`submit`,size:`sm`,"data-action":`assets-ask-send`,disabled:!y,"aria-busy":c||void 0,children:[c?(0,Q.jsx)(T,{"aria-hidden":`true`,className:`motion-safe:animate-spin`}):(0,Q.jsx)(O,{"aria-hidden":`true`}),_?`Continue`:`Send`]})]}),v||u?(0,Q.jsx)(`p`,{id:m,"data-slot":`assets-ask-reason`,className:`mt-1 text-label text-muted-foreground`,children:u??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(),u=l(),[f,m]=(0,J.useState)(void 0),h=t?o.name:f,g=r.data?.artifacts??[],_=D(g,h),v=(0,J.useCallback)(n=>{t?u(`/tasks/${e}/assets/${encodeURIComponent(n)}`,{replace:!0}):m(n)},[u,t,e]),[y,b]=se(),[C,w]=(0,J.useState)(0),[E,O]=(0,J.useState)(void 0),k=_?.kind===`html`?$(r.data?.versions,_.name):[],A=k.at(-1)?.version,j=E&&_&&E.name===_.name&&E.version!==A&&k.some(e=>e.version===E.version)?E.version:void 0,M=(0,J.useRef)(null),[N,P]=(0,J.useState)(null);return Z(M,P),r.isPending?(0,Q.jsx)(z,{icon:(0,Q.jsx)(T,{className:`motion-safe:animate-spin`}),tone:`neutral`,heading:`h2`,title:`Loading assets…`}):r.isError?(0,Q.jsx)(z,{icon:(0,Q.jsx)(I,{}),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:[_?(0,Q.jsx)(ce,{artifacts:g,current:_,onSelect:v}):(0,Q.jsx)(`span`,{className:`px-1 text-xs text-muted-foreground`,children:`Assets`}),_?.kind===`html`?(0,Q.jsx)(L,{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,_&&k.length>1?(0,Q.jsx)(oe,{versions:k,viewing:j,onSelect:e=>O(e===A?void 0:{name:_.name,version:e})}):null,j===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`,j,(0,Q.jsx)(`span`,{"aria-hidden":`true`,children:`—`}),(0,Q.jsx)(`button`,{type:`button`,"data-action":`assets-version-current`,onClick:()=>O(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)(L,{label:y?`Leave focus — bring the sidebar back`:`Focus — fold the sidebar to icons while Assets is open`,children:(0,Q.jsx)(p,{type:`button`,variant:`ghost`,size:`icon-sm`,"data-action":`assets-focus`,"aria-pressed":y,"aria-label":y?`Leave focus`:`Focus`,className:s(`text-muted-foreground`,y&&`bg-muted text-foreground`),onClick:()=>b(!y),children:y?(0,Q.jsx)(U,{"aria-hidden":`true`}):(0,Q.jsx)(V,{"aria-hidden":`true`})})}),_?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(p,{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,_.name,j),target:`_blank`,rel:`noopener noreferrer`,"aria-label":`Open in new tab`,title:`Open in new tab (still sandboxed)`,children:[(0,Q.jsx)(S,{"aria-hidden":`true`}),(0,Q.jsx)(`span`,{className:`max-sm:sr-only`,children:`Open in new tab`})]})}),(0,Q.jsx)(p,{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,_.name,j),download:_.name,"aria-label":`Download`,children:[(0,Q.jsx)(x,{"aria-hidden":`true`}),(0,Q.jsx)(`span`,{className:`max-sm:sr-only`,children:`Download`})]})}),(0,Q.jsxs)(p,{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:()=>w(e=>e+1),children:[(0,Q.jsx)(ee,{"aria-hidden":`true`}),(0,Q.jsx)(`span`,{className:`max-sm:sr-only`,children:`Reload`})]})]}):null]})]}),_?(0,Q.jsx)(le,{runId:e,artifact:_,version:j,frameRef:M},`${_.name}@${_.updatedAt}#${C}v${j??``}`):(0,Q.jsx)(z,{icon:(0,Q.jsx)(d,{}),tone:`neutral`,heading:`h2`,title:re,subtitle:ie}),n&&_?(0,Q.jsx)(ne,{run:n,reference:N,onClearReference:()=>P(null)}):null]})}function $(e,t){return(e??[]).filter(e=>e.files.includes(t))}function oe({versions:e,viewing:t,onSelect:n}){let r=e.at(-1),i=t??r?.version;return(0,Q.jsxs)(b,{children:[(0,Q.jsx)(_,{asChild:!0,children:(0,Q.jsxs)(p,{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:[`· `,R(r.updatedAt),` ago`]}):null,(0,Q.jsx)(m,{"aria-hidden":`true`,className:`size-3.5 opacity-60`})]})}),(0,Q.jsxs)(v,{align:`start`,className:`w-56`,children:[(0,Q.jsx)(h,{children:`Versions`}),(0,Q.jsx)(g,{value:String(i),onValueChange:e=>n(Number(e)),children:[...e].reverse().map(e=>(0,Q.jsxs)(y,{value:String(e.version),"data-version":e.version,children:[`v`,e.version,` · `,R(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)(()=>A(`assets`)),n=(0,J.useCallback)(e=>{F(`assets`,e),t(e)},[]);return(0,J.useEffect)(()=>{if(e)return W(()=>n(!1))},[e,n]),[e,n]}function ce({artifacts:e,current:t,onSelect:n}){let r=N(e);return(0,Q.jsxs)(b,{children:[(0,Q.jsx)(_,{asChild:!0,children:(0,Q.jsxs)(p,{type:`button`,variant:`ghost`,size:`sm`,"data-action":`assets-switcher`,"aria-label":`Asset: ${j(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:j(t)}),(0,Q.jsx)(`span`,{className:`shrink-0 text-meta font-normal text-muted-foreground`,children:E[t.kind]}),(0,Q.jsx)(m,{"aria-hidden":`true`,className:`size-3.5 shrink-0 opacity-60`})]})}),(0,Q.jsxs)(v,{align:`start`,className:`max-h-80 w-80 overflow-y-auto`,children:[(0,Q.jsxs)(h,{children:[e.length,` `,e.length===1?`asset`:`assets`]}),(0,Q.jsx)(g,{value:t.name,onValueChange:n,children:r.map(e=>(0,Q.jsx)(y,{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:j(e)}),(0,Q.jsxs)(`span`,{className:`truncate font-mono text-meta text-muted-foreground`,children:[e.name,` · `,E[e.kind],` · `,R(e.updatedAt)]})]})},e.name))})]})]})}function le({runId:e,artifact:t,version:n,frameRef:r}){let a=H(),o=i(e,t.name,n);switch(t.kind){case`html`:return(0,Q.jsx)(`iframe`,{ref:r,"data-slot":`assets-frame`,title:j(t),src:`${o}#theme=${a}`,sandbox:k,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:j(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)(z,{icon:(0,Q.jsx)(w,{}),tone:`neutral`,heading:`h2`,title:`No preview for this file`,subtitle:`${t.name} — download it to open it locally.`,actions:(0,Q.jsx)(p,{asChild:!0,variant:`outline`,children:(0,Q.jsxs)(`a`,{"data-action":`assets-download-file`,href:o,download:t.name,children:[(0,Q.jsx)(x,{"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)(z,{icon:(0,Q.jsx)(I,{}),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)(B,{children:n.data})}):(0,Q.jsx)(C,{path:t.name,text:n.data})})}export{ae as AssetsView};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./rolldown-runtime-QTnfLwEv.js";import{i as e,t}from"./react-runtime-CCIEwYL0.js";import{G as n,I as r,K as i,U as a,t as o,z as s}from"./utils-
|
|
1
|
+
import"./rolldown-runtime-QTnfLwEv.js";import{i as e,t}from"./react-runtime-CCIEwYL0.js";import{G as n,I as r,K as i,U as a,t as o,z as s}from"./utils-DWwoYTjU.js";import{t as c}from"./createLucideIcon-BHp8sXmF.js";var l=c(`calendar-clock`,[[`path`,{d:`M16 14v2.2l1.6 1`,key:`fo4ql5`}],[`path`,{d:`M16 2v4`,key:`4m81vk`}],[`path`,{d:`M21 7.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3.5`,key:`1osxxc`}],[`path`,{d:`M3 10h5`,key:`r794hk`}],[`path`,{d:`M8 2v4`,key:`1cmpym`}],[`circle`,{cx:`16`,cy:`16`,r:`6`,key:`qoo3c4`}]]);e();var u=t();function d({className:e,flush:t=!1,...n}){return(0,u.jsx)(`div`,{"data-slot":`card`,"data-flush":t?`true`:void 0,className:o(`flex flex-col rounded-lg border bg-card text-card-foreground shadow-xs`,t?`gap-0 overflow-hidden py-0`:`gap-6 py-6`,e),...n})}function f(e){return r[((e-1)%7+7)%7]??``}function p(e,t){let n=i(typeof e==`number`?e:Date.parse(e),t);return n?`${f(n.weekday)} ${s(n.hour,n.minute)}`:``}function m(e,t){let n=i(typeof e==`number`?e:Date.parse(e),t);return n?s(n.hour,n.minute):``}function h(e,t,n=Date.now()){let r=Date.parse(e),a=i(r,t);if(!a)return``;if(n-r<6*864e5)return`${f(a.weekday)} ${s(a.hour,a.minute)}`;let o=[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`][a.month-1];return`${a.day} ${o} ${s(a.hour,a.minute)}`}function g(e,t=Date.now()){let n=Math.max(0,Math.round((e-t)/6e4));return n<60?`in ${n}m`:n<1440?`in ${Math.round(n/60)}h`:`in ${Math.round(n/1440)}d`}function _(e){let t=Math.round(e/60),n=Math.floor(t/60);return n>0?`${n}h ${String(t%60).padStart(2,`0`)}m`:`${t}m`}function v(e){return e>=10?`$${e.toFixed(1)}`:`$${e.toFixed(2)}`}function y(e){if(e.kind===`schedule`)return n(e).map(a).join(`; `);if(e.kind===`tracker`){let t=e.trackerTrigger,n=t?.association.kind===`jira`?`Jira`:t?.association.kind===`linear`?`Linear`:`Tracker`;return t?`${n} · ${t.events.join(`, `)}${t.targetStatusIds?.length?` → ${t.targetStatusIds.join(`, `)}`:``}${t.changedLabelIds?.length?` · labels ${t.changedLabelIds.join(`, `)}`:``} · every ${Math.round((e.intervalSeconds??1800)/60)} min`:`${n} · select an event to complete setup`}let t=(e.events??[]).join(`, `),r=Math.round((e.intervalSeconds??300)/60);return`on ${t||`github`} · every ${r} min`}function b(e){switch(e){case`launched`:case`manual`:case`catch-up`:return`success`;case`failed`:case`error`:case`rate-limited`:return`danger`;default:return`neutral`}}export{g as a,y as c,l as d,h as i,v as l,f as n,b as o,p as r,m as s,_ as t,d as u};
|