@nilsr0711/drydock 0.1.7 → 0.1.9
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/.next/standalone/.next/BUILD_ID +1 -1
- package/.next/standalone/.next/app-path-routes-manifest.json +4 -4
- package/.next/standalone/.next/build-manifest.json +2 -2
- package/.next/standalone/.next/prerender-manifest.json +3 -3
- package/.next/standalone/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/_global-error.html +1 -1
- package/.next/standalone/.next/server/app/_global-error.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found/page.js +2 -2
- package/.next/standalone/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/adrs/page.js +2 -2
- package/.next/standalone/.next/server/app/adrs/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/adrs/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/analytics/page.js +1 -1
- package/.next/standalone/.next/server/app/analytics/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/analytics/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/control/shutdown/route.js +1 -1
- package/.next/standalone/.next/server/app/api/control/shutdown/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/cost/export/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/health/route.js +1 -1
- package/.next/standalone/.next/server/app/api/health/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/sse/dashboard/route.js +1 -1
- package/.next/standalone/.next/server/app/api/sse/dashboard/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/sse/jobs/[id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/webhooks/[repoId]/route.js +1 -1
- package/.next/standalone/.next/server/app/api/webhooks/[repoId]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/costs/page.js +1 -1
- package/.next/standalone/.next/server/app/costs/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/costs/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/jobs/[id]/page.js +3 -3
- package/.next/standalone/.next/server/app/jobs/[id]/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/jobs/[id]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/jobs/page.js +2 -2
- package/.next/standalone/.next/server/app/jobs/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/jobs/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/needs-human/page.js +2 -2
- package/.next/standalone/.next/server/app/needs-human/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/needs-human/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/page.js +2 -2
- package/.next/standalone/.next/server/app/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/prompts/page.js +2 -2
- package/.next/standalone/.next/server/app/prompts/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/prompts/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/repos/[id]/page.js +2 -2
- package/.next/standalone/.next/server/app/repos/[id]/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/repos/[id]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/settings/page.js +2 -2
- package/.next/standalone/.next/server/app/settings/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app-paths-manifest.json +4 -4
- package/.next/standalone/.next/server/chunks/152.js +3 -0
- package/.next/standalone/.next/server/chunks/304.js +1 -1
- package/.next/standalone/.next/server/chunks/387.js +34 -0
- package/.next/standalone/.next/server/chunks/40.js +1 -1
- package/.next/standalone/.next/server/chunks/403.js +1 -0
- package/.next/standalone/.next/server/chunks/475.js +19 -0
- package/.next/standalone/.next/server/chunks/50.js +1 -0
- package/.next/standalone/.next/server/chunks/521.js +1 -1
- package/.next/standalone/.next/server/chunks/578.js +1 -1
- package/.next/standalone/.next/server/chunks/614.js +2 -2
- package/.next/standalone/.next/server/chunks/668.js +1 -0
- package/.next/standalone/.next/server/chunks/786.js +1 -1
- package/.next/standalone/.next/server/chunks/83.js +1 -1
- package/.next/standalone/.next/server/chunks/908.js +1 -1
- package/.next/standalone/.next/server/chunks/944.js +1 -0
- package/.next/standalone/.next/server/middleware-build-manifest.js +1 -1
- package/.next/standalone/.next/server/pages/500.html +1 -1
- package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/static/chunks/3433-ece700d2e393c23b.js +1 -0
- package/.next/standalone/.next/static/chunks/3894-4f48e3cc5be58e10.js +1 -0
- package/.next/standalone/.next/static/chunks/5080-16cb43874ff5c536.js +1 -0
- package/.next/standalone/.next/static/chunks/6634-74f0b66587b57037.js +1 -0
- package/.next/standalone/.next/static/chunks/{1642-a1ea35450c1b5c95.js → 8264-c27834f1552f983a.js} +1 -1
- package/.next/standalone/.next/static/chunks/8382-5201fc3dd1f64e60.js +1 -0
- package/.next/{static/chunks/4624-5e23973d35b58ca5.js → standalone/.next/static/chunks/8745-8b3833b3d2afa30c.js} +1 -1
- package/.next/standalone/.next/static/chunks/app/adrs/page-ca11e90e9404af90.js +1 -0
- package/.next/standalone/.next/static/chunks/app/costs/{page-24d086bf67620e30.js → page-5d66d93815eea63a.js} +1 -1
- package/.next/standalone/.next/static/chunks/app/jobs/[id]/page-dfb41b4785fd7cbb.js +1 -0
- package/.next/standalone/.next/static/chunks/app/jobs/page-98215ec1497b829e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/layout-134301ff0a9b828d.js +1 -0
- package/.next/standalone/.next/static/chunks/app/needs-human/page-569fc0e6aefc7677.js +1 -0
- package/.next/standalone/.next/static/chunks/app/page-504585be128c823c.js +1 -0
- package/.next/standalone/.next/static/chunks/app/prompts/page-c6bf6a4c782035ac.js +1 -0
- package/.next/standalone/.next/static/chunks/app/repos/[id]/page-c0c4531c2af46526.js +1 -0
- package/.next/standalone/.next/static/chunks/app/settings/page-84a44ab52a0ff49d.js +1 -0
- package/.next/standalone/.next/static/css/{bdce0893cf6b9cb9.css → 600a5b5311ad42be.css} +1 -1
- package/.next/standalone/drizzle/0034_human_instruction.sql +1 -0
- package/.next/standalone/drizzle/0035_agent_release.sql +4 -0
- package/.next/standalone/drizzle/0036_adopt_claude_mem.sql +1 -0
- package/.next/standalone/mcp-server.cjs +43157 -0
- package/.next/standalone/package.json +5 -3
- package/.next/static/chunks/3433-ece700d2e393c23b.js +1 -0
- package/.next/static/chunks/3894-4f48e3cc5be58e10.js +1 -0
- package/.next/static/chunks/5080-16cb43874ff5c536.js +1 -0
- package/.next/static/chunks/6634-74f0b66587b57037.js +1 -0
- package/.next/static/chunks/{1642-a1ea35450c1b5c95.js → 8264-c27834f1552f983a.js} +1 -1
- package/.next/static/chunks/8382-5201fc3dd1f64e60.js +1 -0
- package/.next/{standalone/.next/static/chunks/4624-5e23973d35b58ca5.js → static/chunks/8745-8b3833b3d2afa30c.js} +1 -1
- package/.next/static/chunks/app/adrs/page-ca11e90e9404af90.js +1 -0
- package/.next/static/chunks/app/costs/{page-24d086bf67620e30.js → page-5d66d93815eea63a.js} +1 -1
- package/.next/static/chunks/app/jobs/[id]/page-dfb41b4785fd7cbb.js +1 -0
- package/.next/static/chunks/app/jobs/page-98215ec1497b829e.js +1 -0
- package/.next/static/chunks/app/layout-134301ff0a9b828d.js +1 -0
- package/.next/static/chunks/app/needs-human/page-569fc0e6aefc7677.js +1 -0
- package/.next/static/chunks/app/page-504585be128c823c.js +1 -0
- package/.next/static/chunks/app/prompts/page-c6bf6a4c782035ac.js +1 -0
- package/.next/static/chunks/app/repos/[id]/page-c0c4531c2af46526.js +1 -0
- package/.next/static/chunks/app/settings/page-84a44ab52a0ff49d.js +1 -0
- package/.next/static/css/{bdce0893cf6b9cb9.css → 600a5b5311ad42be.css} +1 -1
- package/README.md +66 -21
- package/bin/drydock.mjs +77 -2
- package/drizzle/0034_human_instruction.sql +1 -0
- package/drizzle/0035_agent_release.sql +4 -0
- package/drizzle/0036_adopt_claude_mem.sql +1 -0
- package/package.json +5 -3
- package/.next/standalone/.next/server/chunks/382.js +0 -31
- package/.next/standalone/.next/server/chunks/468.js +0 -1
- package/.next/standalone/.next/server/chunks/822.js +0 -1
- package/.next/standalone/.next/server/chunks/99.js +0 -18
- package/.next/standalone/.next/static/chunks/1298-7ac9c00c70b27598.js +0 -1
- package/.next/standalone/.next/static/chunks/3433-719d6f55f39342d8.js +0 -1
- package/.next/standalone/.next/static/chunks/3894-c7b01dcfcf83d89b.js +0 -1
- package/.next/standalone/.next/static/chunks/7690-6dcfd9ae4cbf4e7d.js +0 -1
- package/.next/standalone/.next/static/chunks/app/adrs/page-1dfee698ea4c111f.js +0 -1
- package/.next/standalone/.next/static/chunks/app/jobs/[id]/page-8a9e4ed64c3303fe.js +0 -1
- package/.next/standalone/.next/static/chunks/app/jobs/page-4180ccc9acd3ddba.js +0 -1
- package/.next/standalone/.next/static/chunks/app/layout-189fa697d72d1fdf.js +0 -1
- package/.next/standalone/.next/static/chunks/app/needs-human/page-e458ffa78c06a6fa.js +0 -1
- package/.next/standalone/.next/static/chunks/app/page-add53cbf6d87a3f5.js +0 -1
- package/.next/standalone/.next/static/chunks/app/prompts/page-ff6cc30777232933.js +0 -1
- package/.next/standalone/.next/static/chunks/app/repos/[id]/page-cd11007841a5d73f.js +0 -1
- package/.next/standalone/.next/static/chunks/app/settings/page-280668b9c92e9b48.js +0 -1
- package/.next/static/chunks/1298-7ac9c00c70b27598.js +0 -1
- package/.next/static/chunks/3433-719d6f55f39342d8.js +0 -1
- package/.next/static/chunks/3894-c7b01dcfcf83d89b.js +0 -1
- package/.next/static/chunks/7690-6dcfd9ae4cbf4e7d.js +0 -1
- package/.next/static/chunks/app/adrs/page-1dfee698ea4c111f.js +0 -1
- package/.next/static/chunks/app/jobs/[id]/page-8a9e4ed64c3303fe.js +0 -1
- package/.next/static/chunks/app/jobs/page-4180ccc9acd3ddba.js +0 -1
- package/.next/static/chunks/app/layout-189fa697d72d1fdf.js +0 -1
- package/.next/static/chunks/app/needs-human/page-e458ffa78c06a6fa.js +0 -1
- package/.next/static/chunks/app/page-add53cbf6d87a3f5.js +0 -1
- package/.next/static/chunks/app/prompts/page-ff6cc30777232933.js +0 -1
- package/.next/static/chunks/app/repos/[id]/page-cd11007841a5d73f.js +0 -1
- package/.next/static/chunks/app/settings/page-280668b9c92e9b48.js +0 -1
- /package/.next/standalone/.next/static/{-sJQutzNDvUvcdmf3YlJA → gBXyOslZ8CoJrAVnOEHDm}/_buildManifest.js +0 -0
- /package/.next/standalone/.next/static/{-sJQutzNDvUvcdmf3YlJA → gBXyOslZ8CoJrAVnOEHDm}/_ssgManifest.js +0 -0
- /package/.next/static/{-sJQutzNDvUvcdmf3YlJA → gBXyOslZ8CoJrAVnOEHDm}/_buildManifest.js +0 -0
- /package/.next/static/{-sJQutzNDvUvcdmf3YlJA → gBXyOslZ8CoJrAVnOEHDm}/_ssgManifest.js +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1298],{598:(e,t,r)=>{r.d(t,{y:()=>s});var n=r(515),i=r(8108),o=r(5832);function s({size:e=16,className:t}){return(0,n.jsx)(i.A,{width:e,height:e,className:(0,o.cn)("dd-spin",t),"aria-hidden":!0})}},1059:(e,t,r)=>{r.d(t,{d:()=>o});var n=r(515),i=r(5832);function o({checked:e,onChange:t,disabled:r,id:s,"aria-label":a}){return(0,n.jsx)("button",{type:"button",role:"switch",id:s,"aria-checked":e,"aria-label":a,disabled:r,onClick:()=>!r&&t?.(!e),className:(0,i.cn)("relative inline-flex h-[22px] w-[38px] shrink-0 items-center rounded-full transition-colors focus-ring",e?"bg-primary":"bg-input",r&&"pointer-events-none opacity-50"),children:(0,n.jsx)("span",{className:(0,i.cn)("inline-block h-4 w-4 transform rounded-full bg-white shadow-sm transition-transform",e?"translate-x-[18px]":"translate-x-[3px]")})})}},1837:(e,t,r)=>{r.d(t,{L6:()=>n,UB:()=>i,VJ:()=>s,tT:()=>o});let n=[{id:"claude-opus-4-8",label:"Claude Opus 4.8",agent:"claude"},{id:"claude-fable-5",label:"Claude Fable 5",agent:"claude"},{id:"claude-opus-4-7",label:"Claude Opus 4.7",agent:"claude"},{id:"claude-sonnet-4-6",label:"Claude Sonnet 4.6",agent:"claude"},{id:"claude-sonnet-4-5",label:"Claude Sonnet 4.5",agent:"claude"},{id:"claude-haiku-4-5",label:"Claude Haiku 4.5",agent:"claude"},{id:"gpt-5-codex",label:"GPT-5 Codex",agent:"codex"},{id:"gpt-5",label:"GPT-5",agent:"codex"},{id:"gpt-5-mini",label:"GPT-5 Mini",agent:"codex"}],i="claude-opus-4-8";function o(e){return n.filter(t=>t.agent===e)}function s(e){return"openrouter"===e?"":o(e)[0]?.id??i}},2655:(e,t,r)=>{r.d(t,{A:()=>n});let n=(0,r(1330).A)("container",[["path",{d:"M22 7.7c0-.6-.4-1.2-.8-1.5l-6.3-3.9a1.72 1.72 0 0 0-1.7 0l-10.3 6c-.5.2-.9.8-.9 1.4v6.6c0 .5.4 1.2.8 1.5l6.3 3.9a1.72 1.72 0 0 0 1.7 0l10.3-6c.5-.3.9-1 .9-1.5Z",key:"1t2lqe"}],["path",{d:"M10 21.9V14L2.1 9.1",key:"o7czzq"}],["path",{d:"m10 14 11.9-6.9",key:"zm5e20"}],["path",{d:"M14 19.8v-8.1",key:"159ecu"}],["path",{d:"M18 17.5V9.4",key:"11uown"}]])},3798:(e,t,r)=>{r.d(t,{A:()=>n});let n=(0,r(1330).A)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]])},4148:(e,t,r)=>{r.d(t,{S:()=>s});var n=r(515),i=r(4266),o=r(5832);function s({checked:e,onChange:t,disabled:r,id:a,className:u,"aria-label":l}){return(0,n.jsx)("button",{type:"button",role:"checkbox",id:a,"aria-checked":e,"aria-label":l,disabled:r,onClick:()=>!r&&t?.(!e),className:(0,o.cn)("flex h-[18px] w-[18px] shrink-0 items-center justify-center rounded-[5px] border transition-colors focus-ring",e?"border-primary bg-primary text-primary-foreground":"border-input bg-background hover:border-muted-foreground",r&&"pointer-events-none opacity-50",u),children:e&&(0,n.jsx)(i.A,{className:"h-[13px] w-[13px]",strokeWidth:3})})}},4266:(e,t,r)=>{r.d(t,{A:()=>n});let n=(0,r(1330).A)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]])},4783:(e,t,r)=>{r.d(t,{F:()=>p,W:()=>h});var n=r(515),i=r(6512),o=r(8131),s=r(4877),a=r(5662),u=r(5529),l=r(9214),d=r(5832);let c={info:{cls:"border-primary/30 bg-primary/5 text-foreground",icon:i.A,ic:"text-primary"},success:{cls:"border-success-border bg-success-muted text-foreground",icon:o.A,ic:"text-success"},warning:{cls:"border-warning-border bg-warning-muted text-foreground",icon:s.A,ic:"text-warning"},destructive:{cls:"border-destructive/30 bg-destructive/5 text-foreground",icon:a.A,ic:"text-destructive"}};function p({tone:e="info",title:t,children:r,action:i,icon:o,className:s}){let a=c[e],u=o??a.icon;return(0,n.jsxs)("div",{className:(0,d.cn)("flex gap-3 rounded-xl border p-4",a.cls,s),role:"alert",children:[(0,n.jsx)(u,{className:(0,d.cn)("mt-0.5 h-[18px] w-[18px] shrink-0",a.ic)}),(0,n.jsxs)("div",{className:"min-w-0 flex-1",children:[t&&(0,n.jsx)("p",{className:"text-sm font-semibold",children:t}),r&&(0,n.jsx)("div",{className:"mt-0.5 text-pretty text-sm text-muted-foreground",children:r})]}),i&&(0,n.jsx)("div",{className:"shrink-0",children:i})]})}function h({title:e="Something went wrong",description:t,action:r,className:i}){return(0,n.jsx)(u.Zp,{className:(0,d.cn)("border-destructive/30",i),children:(0,n.jsx)(l.p,{icon:a.A,tone:"destructive",title:e,description:t,action:r})})}},7217:(e,t,r)=>{r.d(t,{D:()=>s});var n=r(515),i=r(5832);function o({htmlFor:e,className:t,children:r}){return(0,n.jsx)("label",{htmlFor:e,className:(0,i.cn)("text-sm font-medium text-foreground",t),children:r})}function s({label:e,hint:t,htmlFor:r,children:a,className:u}){return(0,n.jsxs)("div",{className:(0,i.cn)("flex flex-col gap-1.5",u),children:[e&&(0,n.jsx)(o,{htmlFor:r,children:e}),a,t&&(0,n.jsx)("p",{className:"text-xs leading-relaxed text-muted-foreground",children:t})]})}},7241:(e,t,r)=>{r.d(t,{a:()=>F});var n=r(515),i=r(8067);let o={"claude-fable-5":{inputPerMTok:10,outputPerMTok:50,cacheWritePerMTok:12.5,cacheReadPerMTok:1},"claude-opus-4-8":{inputPerMTok:5,outputPerMTok:25,cacheWritePerMTok:6.25,cacheReadPerMTok:.5},"claude-opus-4-7":{inputPerMTok:5,outputPerMTok:25,cacheWritePerMTok:6.25,cacheReadPerMTok:.5},"claude-sonnet-4-6":{inputPerMTok:3,outputPerMTok:15,cacheWritePerMTok:3.75,cacheReadPerMTok:.3},"claude-sonnet-4-5":{inputPerMTok:3,outputPerMTok:15,cacheWritePerMTok:3.75,cacheReadPerMTok:.3},"claude-haiku-4-5":{inputPerMTok:1,outputPerMTok:5,cacheWritePerMTok:1.25,cacheReadPerMTok:.1}},s=Object.values(o).reduce((e,t)=>t.outputPerMTok>e.outputPerMTok?t:e,{inputPerMTok:0,outputPerMTok:0,cacheWritePerMTok:0,cacheReadPerMTok:0});var a=r(4502);let u=a.Ik({input_tokens:a.ai().optional(),output_tokens:a.ai().optional(),cache_creation_input_tokens:a.ai().optional(),cache_read_input_tokens:a.ai().optional()}).passthrough(),l=a.Ik({type:a.eu("system"),subtype:a.Yj().optional(),session_id:a.Yj().optional(),model:a.Yj().optional()}),d=a.Ik({type:a.eu("assistant"),message:a.Ik({role:a.eu("assistant"),content:a.YO(a.g1(a.Yj(),a.L5())),usage:u.optional()})}),c=a.Ik({type:a.eu("user"),message:a.Ik({role:a.eu("user"),content:a.YO(a.g1(a.Yj(),a.L5()))})}),p=a.Ik({status:a.Yj().optional(),resetsAt:a.ai().optional(),rateLimitType:a.Yj().optional()}).passthrough(),h=a.Ik({type:a.eu("rate_limit_event"),rate_limit_info:p.optional(),session_id:a.Yj().optional()}),m=a.Ik({type:a.eu("result"),subtype:a.Yj().optional(),session_id:a.Yj().optional(),is_error:a.zM().optional(),result:a.Yj().optional(),total_cost_usd:a.ai().optional(),usage:u.optional()}),k=a.gM("type",[l,d,c,h,m]);function f(e){return e instanceof Error?e.message:String(e)}function g(e){let t=[];for(let r of e)"text"===r.type&&"string"==typeof r.text?t.push({kind:"text",text:r.text}):"tool_use"===r.type?t.push({kind:"tool_use",name:String(r.name??"unknown"),id:String(r.id??""),input:r.input}):"tool_result"===r.type&&t.push({kind:"tool_result",toolUseId:String(r.tool_use_id??""),isError:!!r.is_error});return t}class b{push(e){this.buffer+=e;let t=[],r=this.buffer.indexOf("\n");for(;-1!==r;){let e=this.buffer.slice(0,r);this.buffer=this.buffer.slice(r+1);let n=this.consume(e);n&&t.push(n),r=this.buffer.indexOf("\n")}return t}flush(){let e=this.buffer;this.buffer="";let t=this.consume(e);return t?[t]:[]}consume(e){let t;try{t=function(e){var t;let r,n=e.trim();if(!n)return null;let i=JSON.parse(n);return r={type:(t=k.parse(i)).type,chunks:[],inputTokens:0,outputTokens:0,cacheCreationInputTokens:0,cacheReadInputTokens:0,isError:!1,raw:t},"system"===t.type?(r.sessionId=t.session_id,r.model=t.model):"assistant"===t.type?(r.chunks=g(t.message.content),r.inputTokens=t.message.usage?.input_tokens??0,r.outputTokens=t.message.usage?.output_tokens??0,r.cacheCreationInputTokens=t.message.usage?.cache_creation_input_tokens??0,r.cacheReadInputTokens=t.message.usage?.cache_read_input_tokens??0):"user"===t.type?r.chunks=g(t.message.content):"rate_limit_event"===t.type?(r.sessionId=t.session_id,r.rateLimitInfo=t.rate_limit_info):(r.sessionId=t.session_id,r.resultText=t.result,r.costUsd=t.total_cost_usd,r.inputTokens=t.usage?.input_tokens??0,r.outputTokens=t.usage?.output_tokens??0,r.cacheCreationInputTokens=t.usage?.cache_creation_input_tokens??0,r.cacheReadInputTokens=t.usage?.cache_read_input_tokens??0,r.isError=t.is_error??!1),r}(e)}catch(t){return this.onParseError?.({line:e.trim(),message:f(t)}),null}return t?(t.sessionId&&(this.sessionId=t.sessionId),t.model&&(this.model=t.model),t.rateLimitInfo&&(this.rateLimit=t.rateLimitInfo),"result"===t.type?(t.inputTokens>0&&(this.totalInputTokens=t.inputTokens),t.outputTokens>0&&(this.totalOutputTokens=t.outputTokens),t.cacheCreationInputTokens>0&&(this.totalCacheCreationInputTokens=t.cacheCreationInputTokens),t.cacheReadInputTokens>0&&(this.totalCacheReadInputTokens=t.cacheReadInputTokens),void 0!==t.costUsd&&(this.costUsd=t.costUsd),void 0!==t.resultText&&(this.resultText=t.resultText),this.resultIsError=t.isError):(this.totalInputTokens+=t.inputTokens,this.totalOutputTokens+=t.outputTokens,this.totalCacheCreationInputTokens+=t.cacheCreationInputTokens,this.totalCacheReadInputTokens+=t.cacheReadInputTokens),t):null}constructor(){this.buffer="",this.totalInputTokens=0,this.totalOutputTokens=0,this.totalCacheCreationInputTokens=0,this.totalCacheReadInputTokens=0,this.costUsd=0,this.resultIsError=!1}}let x="[REDACTED]",_=[/\bgh[pousr]_[A-Za-z0-9]{36,}\b/g,/\bgithub_pat_[A-Za-z0-9_]{50,}\b/g,/\bglpat-[A-Za-z0-9_-]{20,}\b/g,/(Bearer )[A-Za-z0-9._~+/-]+=*/g,/(https?:\/\/)[^\s/@:"\\]+:[^\s/@"\\]+(?=@)/g,/(PRIVATE-TOKEN:\s*)[^\s"\\]+/gi,/(Basic )[A-Za-z0-9+/]+=*/g,/\b(?:AKIA|ASIA|AGPA|AIDA|ANPA|AROA)[0-9A-Z]{16}\b/g,/\bsk-ant-[A-Za-z0-9_-]{20,}\b/g,/\bsk-(?:proj-)?[A-Za-z0-9_-]{20,}\b/g,/\d{8,10}:[A-Za-z0-9_-]{35}\b/g];function T(e){let t=e;for(let e of _)t=t.replace(e,(e,t)=>"string"==typeof t?`${t}${x}`:x);return t}let y=[{kind:"auth",pattern:/invalid api key/i},{kind:"auth",pattern:/please run \/login/i},{kind:"auth",pattern:/authentication_error/i},{kind:"auth",pattern:/api error:?\s*401\b/i},{kind:"auth",pattern:/oauth token (?:has )?(?:expired|been revoked)/i},{kind:"billing",pattern:/credit balance is too low/i},{kind:"billing",pattern:/billing_error/i},{kind:"usage_limit",pattern:/usage limit reached/i},{kind:"usage_limit",pattern:/\b(?:\d+-hour|session|weekly) limit reached/i},{kind:"usage_limit",pattern:/limit will reset at/i},{kind:"rate_limit",pattern:/rate.?limit_error/i},{kind:"rate_limit",pattern:/api error:?\s*429\b/i},{kind:"rate_limit",pattern:/too many requests/i},{kind:"rate_limit",pattern:/\brate.?limit(?:ed)?\b.{0,60}\b(?:exceeded|reached|hit)\b/i},{kind:"rate_limit",pattern:/\b(?:exceeded|reached|hit)\b.{0,60}\brate.?limit/i},{kind:"overloaded",pattern:/overloaded_error/i},{kind:"overloaded",pattern:/api error:?\s*529\b/i}],v=/limit reached\|(\d{9,12})\b/i,M=/retry[- ]?after[:\s]+(\d+)\s*(?:s|sec|second)/i,I=[{kind:"auth",pattern:/unexpected status 401\b/i},{kind:"auth",pattern:/\b401 unauthorized\b/i},{kind:"auth",pattern:/access token could not be refreshed/i},{kind:"auth",pattern:/please log out and sign in again/i},{kind:"auth",pattern:/\bnot logged in\b/i},{kind:"auth",pattern:/(?:chatgpt|api key) login is required/i},{kind:"auth",pattern:/missing environment variable.{0,5}OPENAI_API_KEY/i},{kind:"auth",pattern:/re-?run `?codex login`?/i},{kind:"billing",pattern:/quota exceeded\. check your plan and billing/i},{kind:"billing",pattern:/insufficient_quota/i},{kind:"billing",pattern:/exceeded your current quota/i},{kind:"billing",pattern:/\bout of credits\b/i},{kind:"billing",pattern:/\bspend cap\b/i},{kind:"billing",pattern:/to use codex with your chatgpt plan/i},{kind:"usage_limit",pattern:/you.?ve hit your usage limit/i},{kind:"usage_limit",pattern:/usage_limit_reached/i},{kind:"rate_limit",pattern:/rate.?limit_exceeded/i},{kind:"rate_limit",pattern:/rate limit reached for/i},{kind:"rate_limit",pattern:/last status:?\s*429\b/i},{kind:"rate_limit",pattern:/unexpected status 429\b/i},{kind:"rate_limit",pattern:/too many requests/i},{kind:"overloaded",pattern:/selected model is at capacity/i},{kind:"overloaded",pattern:/currently experiencing high demand/i},{kind:"overloaded",pattern:/server_is_overloaded/i},{kind:"overloaded",pattern:/last status:?\s*5\d\d\b/i},{kind:"overloaded",pattern:/unexpected status 5\d\d\b/i}],j=/try again in ([\d.]+)\s*s(?:ec(?:ond)?s?)?\b/i,P="gpt-5-codex",w={"gpt-5-codex":{inputPerMTok:1.25,outputPerMTok:10,cacheWritePerMTok:0,cacheReadPerMTok:0},"gpt-5":{inputPerMTok:1.25,outputPerMTok:10,cacheWritePerMTok:0,cacheReadPerMTok:0},"gpt-5-mini":{inputPerMTok:.25,outputPerMTok:2,cacheWritePerMTok:0,cacheReadPerMTok:0}},A=Object.values(w).reduce((e,t)=>t.outputPerMTok>e.outputPerMTok?t:e,{inputPerMTok:0,outputPerMTok:0,cacheWritePerMTok:0,cacheReadPerMTok:0}),C=a.Ik({input_tokens:a.ai().optional(),cached_input_tokens:a.ai().optional(),output_tokens:a.ai().optional(),reasoning_output_tokens:a.ai().optional()}).passthrough(),N=a.Ik({used_percent:a.ai().optional(),window_minutes:a.ai().optional(),resets_in_seconds:a.ai().optional()}).passthrough(),R=a.Ik({primary:N.nullish(),secondary:N.nullish()}).passthrough(),S=a.Ik({id:a.Yj().optional(),item_type:a.Yj().optional(),text:a.Yj().optional(),command:a.Yj().optional(),exit_code:a.ai().optional(),server:a.Yj().optional(),tool:a.Yj().optional()}).passthrough(),E=a.Ik({type:a.Yj(),thread_id:a.Yj().optional(),usage:C.optional(),rate_limits:R.nullish(),item:S.optional(),error:a.Ik({message:a.Yj().optional()}).passthrough().optional(),message:a.Yj().optional()}).passthrough();function O(e){if(e&&"number"==typeof e.used_percent)return{usedPercent:e.used_percent,windowMinutes:e.window_minutes,resetsInSeconds:e.resets_in_seconds}}class Y{push(e){this.buffer+=e;let t=[],r=this.buffer.indexOf("\n");for(;-1!==r;){let e=this.buffer.slice(0,r);this.buffer=this.buffer.slice(r+1);let n=this.consume(e);n&&t.push(n),r=this.buffer.indexOf("\n")}return t}flush(){let e=this.buffer;this.buffer="";let t=this.consume(e);return t?[t]:[]}consume(e){let t;try{t=function(e){let t=e.trim();if(!t)return null;let r=JSON.parse(t);return E.parse(r)}(e)}catch(t){return this.onParseError?.({line:e.trim(),message:f(t)}),null}if(!t)return null;let r=function(e){let t=R.nullish().safeParse(e.rate_limits);if(!t.success||!t.data)return;let r=O(t.data.primary),n=O(t.data.secondary);if(r||n)return{primary:r,secondary:n}}(t);if(r&&(this.rateLimits=r),"turn.failed"===t.type||"error"===t.type){this.resultIsError=!0;let e=t.error?.message??t.message;e&&(this.resultText=e)}else"turn.completed"===t.type&&(this.resultIsError=!1,this.resultText=void 0);let n=function(e){let t={type:"assistant",chunks:[],inputTokens:0,outputTokens:0,cacheCreationInputTokens:0,cacheReadInputTokens:0,isError:!1,raw:e};if("thread.started"===e.type)return{...t,type:"system",sessionId:e.thread_id};if("item.completed"===e.type&&e.item)return{...t,type:"assistant",chunks:function(e){let t=e.id??"";switch(e.item_type){case"assistant_message":case"reasoning":return e.text?[{kind:"text",text:e.text}]:[];case"command_execution":return[{kind:"tool_use",name:"command",id:t,input:{command:e.command,exit_code:e.exit_code}}];case"file_change":return[{kind:"tool_use",name:"edit",id:t,input:e}];case"mcp_tool_call":return[{kind:"tool_use",name:`${e.server??"mcp"}/${e.tool??"tool"}`,id:t,input:e}];default:return[]}}(e.item)};if("turn.completed"===e.type){let r=e.usage;return{...t,type:"result",inputTokens:r?.input_tokens??0,outputTokens:(r?.output_tokens??0)+(r?.reasoning_output_tokens??0)}}return"turn.failed"===e.type||"error"===e.type?{...t,type:"result",isError:!0}:null}(t);return n?(n.sessionId&&(this.sessionId=n.sessionId),this.totalInputTokens+=n.inputTokens,this.totalOutputTokens+=n.outputTokens,n):null}constructor(){this.buffer="",this.totalInputTokens=0,this.totalOutputTokens=0,this.totalCacheCreationInputTokens=0,this.totalCacheReadInputTokens=0,this.costUsd=0}}let L=/openrouter http (\d{3})/i,W=/retry[- ]?after[:\s]+(\d+)\s*(?:s\b|sec|second)/i,z="openrouter is an HTTP provider; it has no CLI surface (dispatch on provider.kind)",U={claude:{id:"claude",label:"Claude Code",defaultCommand:"claude",supportsResume:!0,resumeModel:"claude-haiku-4-5",resumeMaxTurns:15,defaultModel:"claude-opus-4-8",buildStartArgs:({prompt:e,model:t,maxTurns:r})=>["-p",e,"--max-turns",String(r),"--permission-mode","acceptEdits","--model",t,"--output-format","stream-json","--verbose"],buildResumeArgs:({prompt:e,sessionId:t,model:r,maxTurns:n})=>["-p",e,"--resume",t,"--max-turns",String(n),"--model",r,"--output-format","stream-json","--verbose"],buildOneShotArgs:({prompt:e,model:t})=>["-p",e,"--model",t],buildStreamOneShotArgs:({prompt:e,model:t})=>["-p",e,"--model",t,"--output-format","stream-json","--verbose"],createParser:()=>new b,classifyFailure:function(e){var t;if(0===e.exitCode&&!e.resultIsError)return;let r=[e.resultText,e.stderr].filter(Boolean).join("\n");if(!r.trim())return;let n=y.find(e=>e.pattern.test(r));if(!n)return;let i={agent:"claude",kind:n.kind,rawSnippet:(t=n.pattern,T((r.split("\n").find(e=>t.test(e))??r).trim()).slice(0,300))};if("usage_limit"===n.kind){let e=r.match(v)?.[1];e&&(i.resetAt=Number(e))}if("rate_limit"===n.kind||"overloaded"===n.kind){let e=r.match(M)?.[1];e&&(i.retryAfterMs=1e3*Number(e))}return i},estimateCost:function(e,t,r,n=0,i=0){let a=function(e){if(!e)return s;let t=o[e];return t||(console.warn(`[drydock] Unknown model id "${e}" — using max-priced fallback to avoid under-counting cost`),s)}(e);return t/1e6*a.inputPerMTok+r/1e6*a.outputPerMTok+n/1e6*a.cacheWritePerMTok+i/1e6*a.cacheReadPerMTok}},codex:{id:"codex",label:"Codex CLI",defaultCommand:"codex",supportsResume:!0,resumeModel:P,resumeMaxTurns:15,defaultModel:P,buildStartArgs:({prompt:e,model:t})=>["exec","--json","--sandbox","workspace-write","--model",t,e],buildResumeArgs:({prompt:e,sessionId:t,model:r})=>["exec","resume",t,"--json","--sandbox","workspace-write","--model",r,e],buildOneShotArgs:({prompt:e,model:t})=>["exec","--model",t,e],buildStreamOneShotArgs:()=>null,createParser:()=>new Y,classifyFailure:function(e){var t;if(0===e.exitCode&&!e.resultIsError)return;let r=[e.resultText,e.stderr].filter(Boolean).join("\n");if(!r.trim())return;let n=I.find(e=>e.pattern.test(r));if(!n)return;let i={agent:"codex",kind:n.kind,rawSnippet:(t=n.pattern,T((r.split("\n").find(e=>t.test(e))??r).trim()).slice(0,300))};if("rate_limit"===n.kind||"overloaded"===n.kind){let e=r.match(j)?.[1],t=e?Math.ceil(1e3*Number(e)):NaN;Number.isFinite(t)&&t>=0&&(i.retryAfterMs=t)}return i},captureUsage:e=>e instanceof Y?e.rateLimits:void 0,estimateCost:function(e,t,r){let n=function(e){if(!e)return A;let t=w[e];return t||(console.warn(`[drydock] Unknown codex model id "${e}" — using max-priced fallback to avoid under-counting cost`),A)}(e);return t/1e6*n.inputPerMTok+r/1e6*n.outputPerMTok}},openrouter:{id:"openrouter",kind:"http",label:"OpenRouter",defaultCommand:"",supportsResume:!1,resumeModel:"",resumeMaxTurns:20,defaultModel:"",buildStartArgs(){throw Error(z)},buildResumeArgs:()=>null,buildOneShotArgs(){throw Error(z)},buildStreamOneShotArgs:()=>null,createParser(){throw Error(z)},classifyFailure:function(e){var t;if(0===e.exitCode&&!e.resultIsError)return;let r=[e.resultText,e.stderr].filter(Boolean).join("\n"),n=r.match(L)?.[1];if(!n)return;let i=(t=Number(n),401===t||403===t?"auth":402===t?"billing":429===t?/\b(?:free|daily|quota)\b/i.test(r)?"usage_limit":"rate_limit":408===t||t>=500&&t<600?"overloaded":void 0);if(!i)return;let o={agent:"openrouter",kind:i,rawSnippet:T((r.split("\n").find(e=>L.test(e))??r).trim()).slice(0,300)},s=r.match(W)?.[1];return s&&("rate_limit"===i||"overloaded"===i)&&(o.retryAfterMs=1e3*Number(s)),o},estimateCost:()=>0}},Z=["claude","codex","openrouter"].map(e=>U[e]),q=["claude","codex"];function F({value:e,onChange:t,id:r,className:o,agents:s=q}){let a=Z.filter(e=>s.includes(e.id));return(0,n.jsx)(i.l,{id:r,value:e,onChange:e=>t(e.target.value),className:o,children:a.map(e=>(0,n.jsx)("option",{value:e.id,children:e.label},e.id))})}},7405:(e,t,r)=>{r.d(t,{p:()=>s});var n=r(515),i=r(1171),o=r(5832);let s=i.forwardRef(({className:e,...t},r)=>(0,n.jsx)("input",{ref:r,className:(0,o.cn)("h-9 w-full rounded-lg border border-input bg-background px-3 text-sm text-foreground","placeholder:text-muted-foreground transition focus-ring","disabled:cursor-not-allowed disabled:opacity-50",e),...t}));s.displayName="Input"},8067:(e,t,r)=>{r.d(t,{l:()=>a});var n=r(515),i=r(3798),o=r(1171),s=r(5832);let a=o.forwardRef(({className:e,children:t,...r},o)=>(0,n.jsxs)("div",{className:"relative",children:[(0,n.jsx)("select",{ref:o,className:(0,s.cn)("h-9 w-full appearance-none cursor-pointer rounded-lg border border-input bg-background pl-3 pr-9 text-sm text-foreground","transition focus-ring","disabled:cursor-not-allowed disabled:opacity-50",e),...r,children:t}),(0,n.jsx)(i.A,{className:"pointer-events-none absolute right-2.5 top-1/2 h-[15px] w-[15px] -translate-y-1/2 text-muted-foreground"})]}));a.displayName="Select"},9214:(e,t,r)=>{r.d(t,{p:()=>s});var n=r(515),i=r(5832);let o={neutral:"bg-secondary text-muted-foreground",primary:"bg-primary/10 text-primary",success:"bg-success-muted text-success",warning:"bg-warning-muted text-warning",destructive:"bg-destructive/10 text-destructive"};function s({icon:e,tone:t="neutral",title:r,description:a,action:u,secondary:l,className:d,compact:c}){return(0,n.jsxs)("div",{className:(0,i.cn)("flex flex-col items-center justify-center text-center",c?"py-10":"py-16",d),children:[e&&(0,n.jsx)("div",{className:(0,i.cn)("flex items-center justify-center rounded-2xl",c?"h-12 w-12":"h-16 w-16",o[t]),children:(0,n.jsx)(e,{className:c?"h-[22px] w-[22px]":"h-7 w-7"})}),(0,n.jsx)("h3",{className:"mt-4 text-base font-semibold",children:r}),a&&(0,n.jsx)("p",{className:"mt-1 max-w-sm text-pretty text-sm text-muted-foreground",children:a}),(u||l)&&(0,n.jsxs)("div",{className:"mt-5 flex items-center gap-2",children:[u,l]})]})}},9754:(e,t,r)=>{r.d(t,{o:()=>s});var n=r(515),i=r(8067),o=r(1837);function s({value:e,onChange:t,agent:r,openrouterModels:a=[],id:u,className:l}){if("openrouter"===r)return(0,n.jsxs)(i.l,{id:u,value:e,onChange:e=>t(e.target.value),className:l,children:[0===a.length&&(0,n.jsx)("option",{value:"",disabled:!0,children:"No synced models — refresh the catalog in Settings"}),a.length>0&&""!==e&&!a.some(t=>t.id===e)&&(0,n.jsxs)("option",{value:e,disabled:!0,children:[e," (no longer in catalog)"]}),a.map(e=>(0,n.jsx)("option",{value:e.id,children:e.isFree?`${e.label} (free)`:e.label},e.id))]});let d=r?(0,o.tT)(r):o.L6;return(0,n.jsx)(i.l,{id:u,value:e,onChange:e=>t(e.target.value),className:l,children:d.map(e=>(0,n.jsx)("option",{value:e.id,children:e.label},e.id))})}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3433],{395:(e,t,r)=>{r.d(t,{$:()=>l});var n=r(515),a=r(1171),s=r(5832);let i={default:"bg-primary text-primary-foreground shadow-sm hover-elevate active-elevate-2",secondary:"bg-secondary text-secondary-foreground hover-elevate active-elevate-2",outline:"border border-border bg-transparent shadow-sm hover-elevate active-elevate-2",destructive:"bg-destructive text-destructive-foreground shadow-sm hover-elevate active-elevate-2",ghost:"border border-transparent hover-elevate active-elevate-2",success:"bg-success text-white shadow-sm hover-elevate active-elevate-2"},o={default:"h-9 px-4 py-2 rounded-lg text-sm",sm:"h-8 px-3 rounded-md text-xs",lg:"h-10 px-6 rounded-lg text-sm",icon:"h-9 w-9 rounded-lg","icon-sm":"h-8 w-8 rounded-md"},l=a.forwardRef(({className:e,variant:t="default",size:r="default",type:a="button",...l},d)=>(0,n.jsx)("button",{ref:d,type:a,className:(0,s.cn)("inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium transition-colors focus-ring","disabled:pointer-events-none disabled:opacity-50","[&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",i[t],o[r],e),...l}));l.displayName="Button"},5529:(e,t,r)=>{r.d(t,{Wu:()=>d,ZB:()=>l,Zp:()=>i,aR:()=>o});var n=r(515),a=r(5832);let s={none:"",sm:"p-4",default:"p-5",lg:"p-6"};function i({className:e,pad:t,hover:r,...o}){return(0,n.jsx)("div",{className:(0,a.cn)("rounded-xl border border-card-border bg-card text-card-foreground shadow-sm",r&&"hover-elevate transition-shadow hover:shadow-md",t&&s[t],e),...o})}function o({className:e,...t}){return(0,n.jsx)("div",{className:(0,a.cn)("flex flex-col gap-1.5 p-5",e),...t})}function l({className:e,...t}){return(0,n.jsx)("h3",{className:(0,a.cn)("text-base font-semibold leading-none tracking-tight",e),...t})}function d({className:e,...t}){return(0,n.jsx)("div",{className:(0,a.cn)("p-5 pt-0",e),...t})}},5832:(e,t,r)=>{function n(...e){return e.filter(Boolean).join(" ")}function a(e){if(!e)return"no activity";let t=Math.floor(Date.now()/1e3)-e;return t<60?"just now":t<3600?`${Math.floor(t/60)}m ago`:t<86400?`${Math.floor(t/3600)}h ago`:t<604800?`${Math.floor(t/86400)}d ago`:new Date(1e3*e).toLocaleDateString()}function s(e){if(e>=3600){let t=Math.floor(e/3600),r=Math.round(e%3600/60);return r>0?`${t}h ${r}m`:`${t}h`}return e>=60?`${Math.floor(e/60)}m ${e%60}s`:`${e}s`}function i(e,t=2){return`$${e.toFixed(t)}`}r.d(t,{KW:()=>a,UK:()=>i,a3:()=>s,cn:()=>n})},6644:(e,t,r)=>{r.d(t,{E:()=>l});var n=r(515),a=r(5832);let s={neutral:"border-border bg-secondary text-secondary-foreground",primary:"border-primary/40 bg-primary/10 text-primary",success:"border-success-border bg-success-muted text-success-foreground",warning:"border-warning-border bg-warning-muted text-warning-foreground",destructive:"border-destructive/40 bg-destructive/10 text-destructive"},i={queued:"neutral",working:"primary",ci_running:"warning",ci_failed:"destructive",retrying:"warning",waiting_limit:"warning",merged:"success",needs_human:"destructive",aborted:"neutral",interrupted:"warning",open:"neutral",triaged:"primary",releasing:"primary"},o=new Set(["working","ci_running","retrying","releasing"]);function l({className:e,status:t,tone:r,children:d,...c}){let u=r??(t?i[t]??"neutral":"neutral"),m=void 0!==t&&o.has(t);return(0,n.jsxs)("span",{className:(0,a.cn)("inline-flex items-center gap-1.5 whitespace-nowrap rounded-md border px-2 py-0.5 text-[11px] font-semibold leading-4",s[u],e),...c,children:[m&&(0,n.jsxs)("span",{className:"relative flex h-1.5 w-1.5",children:[(0,n.jsx)("span",{className:"absolute inline-flex h-full w-full animate-ping rounded-full bg-current opacity-60"}),(0,n.jsx)("span",{className:"relative inline-flex h-1.5 w-1.5 rounded-full bg-current"})]}),d??t?.replace(/_/g," ")]})}},6845:(e,t,r)=>{r.d(t,{p:()=>s});var n=r(1171);let a=()=>()=>{};function s(){return(0,n.useSyncExternalStore)(a,()=>!0,()=>!1)}},7901:(e,t,r)=>{r.d(t,{l:()=>c});var n=r(515),a=r(5378),s=r(1171);function i(e){return Array.from(e.querySelectorAll('a[href]:not([tabindex="-1"]), button:not([disabled]):not([tabindex="-1"]), input:not([disabled]):not([tabindex="-1"]), select:not([disabled]):not([tabindex="-1"]), textarea:not([disabled]):not([tabindex="-1"]), [tabindex]:not([tabindex="-1"])'))}var o=r(5832);let l={neutral:"bg-secondary text-muted-foreground",primary:"bg-primary/10 text-primary",success:"bg-success-muted text-success",warning:"bg-warning-muted text-warning",destructive:"bg-destructive/10 text-destructive"},d={sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-2xl"};function c({open:e,onClose:t,onOpenChange:r,labelledById:u,title:m,description:x,icon:f,tone:v="primary",footer:p,size:g="xl",className:h,children:b}){let w=(0,s.useRef)(null),y=(0,s.useRef)(null),[j,N]=(0,s.useState)(e),[k,C]=(0,s.useState)(!1),$=(0,s.useId)(),D=()=>{r?r(!1):t?.()},E=(0,s.useRef)(D);if(E.current=D,(0,s.useEffect)(()=>{let t;return e?(N(!0),t=setTimeout(()=>C(!0),10)):(C(!1),t=setTimeout(()=>N(!1),180)),()=>clearTimeout(t)},[e]),(0,s.useEffect)(()=>{if(!e||!j)return;y.current=document.activeElement;let t=w.current;function r(e){if("Escape"===e.key){e.preventDefault(),E.current();return}let t=w.current;if("Tab"===e.key&&t){var r,n;let a,s,o;e.preventDefault();let l=i(t);if(0===l.length)return;(r=document.activeElement,n=e.shiftKey,a=l.indexOf(r),s=l[l.length-1],o=l[0],-1===a?n?s:o:l[((n?a-1:a+1)+l.length)%l.length]).focus()}}return t&&(i(t)[0]??t).focus(),document.addEventListener("keydown",r),()=>{document.removeEventListener("keydown",r),y.current instanceof HTMLElement&&y.current.focus(),y.current=null}},[e,j]),!j)return null;let _=null!=m?$:void 0,M=u??_,A=null!=m||null!=x||null!=f;return(0,n.jsxs)("div",{className:"fixed inset-0 z-50 flex items-start justify-center overflow-y-auto p-4 sm:p-8",children:[(0,n.jsx)("div",{className:(0,o.cn)("fixed inset-0 bg-black/50 backdrop-blur-sm transition-opacity duration-200",k?"opacity-100":"opacity-0"),onMouseDown:D}),(0,n.jsx)("div",{ref:w,role:"dialog","aria-modal":"true","aria-labelledby":M,tabIndex:-1,className:(0,o.cn)("relative mt-8 w-full rounded-xl border border-card-border bg-card text-card-foreground shadow-2xl outline-none","transition-all duration-200",k?"scale-100 opacity-100 translate-y-0":"scale-[0.97] opacity-0 translate-y-2",d[g],h),onMouseDown:e=>e.stopPropagation(),children:A?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"flex items-start gap-3 p-5",children:[f&&(0,n.jsx)("span",{className:(0,o.cn)("flex h-9 w-9 shrink-0 items-center justify-center rounded-lg",l[v]),children:(0,n.jsx)(f,{className:"h-[18px] w-[18px]"})}),(0,n.jsxs)("div",{className:"min-w-0 flex-1",children:[null!=m&&(0,n.jsx)("h2",{id:_,className:"text-base font-semibold tracking-tight",children:m}),null!=x&&(0,n.jsx)("p",{className:"mt-1 text-sm text-muted-foreground text-pretty",children:x})]}),(0,n.jsx)("button",{type:"button","aria-label":"Close",onClick:D,className:"-mr-1 -mt-1 shrink-0 rounded-md p-1 text-muted-foreground hover-elevate",children:(0,n.jsx)(a.A,{className:"h-4 w-4"})})]}),null!=b&&(0,n.jsx)("div",{className:"px-5 pb-2",children:b}),null!=p&&(0,n.jsx)("div",{className:"flex justify-end gap-2 p-5 pt-3",children:p})]}):(0,n.jsxs)("div",{className:"p-5",children:[b,null!=p&&(0,n.jsx)("div",{className:"mt-4 flex justify-end gap-2",children:p})]})})]})}},8479:(e,t,r)=>{r.d(t,{t:()=>m,d:()=>x});var n=r(515),a=r(8131),s=r(6003),i=r(6512),o=r(5378),l=r(1171);function d(e){return"error"===e?"assertive":"polite"}var c=r(5832);let u=(0,l.createContext)(null);function m({children:e}){let[t,r]=(0,l.useState)([]),a=(0,l.useCallback)(e=>{r(t=>t.filter(t=>t.id!==e))},[]),s=(0,l.useCallback)(e=>{let t=Date.now()+Math.random(),n={id:t,title:e.title,description:e.description,variant:e.variant??"info"};r(e=>[...e,n]),setTimeout(()=>a(t),5e3)},[a]),i=(0,l.useMemo)(()=>({toast:s,success:(e,t)=>s({title:e,description:t,variant:"success"}),error:(e,t)=>s({title:e,description:t,variant:"error"}),info:(e,t)=>s({title:e,description:t,variant:"info"})}),[s]);return(0,n.jsxs)(u.Provider,{value:i,children:[e,(0,n.jsx)(g,{toasts:t,onDismiss:a})]})}function x(){let e=(0,l.useContext)(u);if(!e)throw Error("useToast must be used within a ToastProvider");return e}let f={success:a.A,error:s.A,info:i.A},v={success:{icon:"text-success",bar:"bg-success"},error:{icon:"text-destructive",bar:"bg-destructive"},info:{icon:"text-primary",bar:"bg-primary"}};function p({toast:e,onDismiss:t}){let r=f[e.variant],a=v[e.variant];return(0,n.jsxs)("div",{className:"dd-toast dd-toast-in pointer-events-auto relative flex items-start gap-3 overflow-hidden rounded-xl border border-card-border bg-card p-3.5 shadow-lg",children:[(0,n.jsx)(r,{className:(0,c.cn)("mt-0.5 h-[18px] w-[18px] shrink-0",a.icon)}),(0,n.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,n.jsx)("p",{className:"text-sm font-medium",children:e.title}),e.description&&(0,n.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:e.description})]}),(0,n.jsx)("button",{type:"button","aria-label":"Dismiss notification",onClick:()=>t(e.id),className:"shrink-0 rounded-md p-0.5 text-muted-foreground hover-elevate",children:(0,n.jsx)(o.A,{className:"h-3.5 w-3.5"})}),(0,n.jsx)("span",{className:(0,c.cn)("dd-toast-progress absolute bottom-0 left-0 h-0.5 w-full",a.bar),style:{animationDuration:"5000ms"}})]})}function g({toasts:e,onDismiss:t}){let r=e.filter(e=>"assertive"===d(e.variant)),a=e.filter(e=>"polite"===d(e.variant));return(0,n.jsxs)("div",{className:"pointer-events-none fixed bottom-4 right-4 z-[60] flex w-full max-w-sm flex-col gap-2",children:[(0,n.jsx)("div",{role:"alert","aria-live":"assertive","aria-atomic":"false",className:"flex flex-col gap-2",children:r.map(e=>(0,n.jsx)(p,{toast:e,onDismiss:t},e.id))}),(0,n.jsx)("div",{"aria-live":"polite","aria-atomic":"false",className:"flex flex-col gap-2",children:a.map(e=>(0,n.jsx)(p,{toast:e,onDismiss:t},e.id))})]})}},9694:(e,t,r)=>{r.d(t,{T:()=>l});var n=r(515),a=r(4877),s=r(6512),i=r(395),o=r(7901);function l({open:e,onOpenChange:t,onConfirm:r,title:d,description:c,confirmLabel:u="Confirm",cancelLabel:m="Cancel",variant:x="default",pending:f=!1,icon:v}){let p="destructive"===x,g=v??(p?a.A:s.A);return(0,n.jsx)(o.l,{open:e,onOpenChange:t,title:d,description:c,icon:g,tone:p?"destructive":"primary",size:"sm",footer:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(i.$,{variant:"outline",size:"sm",disabled:f,onClick:()=>t(!1),children:m}),(0,n.jsx)(i.$,{variant:p?"destructive":"default",size:"sm",disabled:f,onClick:()=>{r(),t(!1)},children:u})]})})}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3894],{9:(e,t,r)=>{r.d(t,{T:()=>a});var s=r(515),n=r(1171),o=r(5832);let a=n.forwardRef(({className:e,...t},r)=>(0,s.jsx)("textarea",{ref:r,className:(0,o.cn)("min-h-[80px] w-full rounded-lg border border-input bg-background px-3 py-2 text-sm text-foreground leading-relaxed","placeholder:text-muted-foreground transition focus-ring","disabled:cursor-not-allowed disabled:opacity-50",e),...t}));a.displayName="Textarea"},715:(e,t,r)=>{r.d(t,{LogViewer:()=>O});var s=r(515),n=r(6512),o=r(1753),a=r(5803),l=r(2863),i=r(8131),d=r(159),c=r(5662),u=r(6819),p=r(1365),x=r(2961),m=r(3611),f=r(1171),g=r(2497),h=r(6644),b=r(598),y=r(8479),j=r(6845),N=r(5832);let v=["status","text","tool_use","tool_result","result","claude_exit","error"],w={status:{icon:n.A,color:"text-muted-foreground",chip:"bg-secondary text-muted-foreground",label:"status"},text:{icon:o.A,color:"text-primary",chip:"bg-primary/10 text-primary",label:"assistant"},tool_use:{icon:a.A,color:"text-primary",chip:"bg-primary/10 text-primary",label:"tool"},tool_result:{icon:l.A,color:"text-success",chip:"bg-success-muted text-success",label:"result"},result:{icon:i.A,color:"text-success",chip:"bg-success-muted text-success",label:"done"},claude_exit:{icon:d.A,color:"text-muted-foreground",chip:"bg-secondary text-muted-foreground",label:"exit"},error:{icon:c.A,color:"text-destructive",chip:"bg-destructive/10 text-destructive",label:"error"}},k={icon:n.A,color:"text-muted-foreground",chip:"bg-secondary text-muted-foreground",label:"event"};function S(e){return new Date(1e3*e).toTimeString().slice(0,8)}function _(e,t){if(e&&"object"==typeof e&&t in e){let r=e[t];return null==r?void 0:String(r)}}let A=new Set(["merged","needs_human","aborted","interrupted"]);function C(e,t){if("result"===e||"claude_exit"===e)return!0;if("status"!==e)return!1;let r=_(t,"to");return void 0!==r&&A.has(r)}function E({type:e,payload:t}){if("text"===e)return(0,s.jsx)("p",{className:"leading-relaxed text-foreground/90",children:"string"==typeof t?t:_(t,"text")??JSON.stringify(t)});if("status"===e){let e=_(t,"from"),r=_(t,"to"),n=_(t,"reason");return e||r?(0,s.jsxs)("span",{className:"text-muted-foreground",children:[e??"?"," ",(0,s.jsx)("span",{className:"text-muted-foreground/60",children:"→"})," ",(0,s.jsx)("span",{className:"text-foreground",children:r??"?"}),n&&(0,s.jsxs)(s.Fragment,{children:[" \xb7 ",n]})]}):(0,s.jsx)("span",{className:"text-muted-foreground",children:_(t,"message")??n??("string"==typeof t?t:JSON.stringify(t))})}if("error"===e)return(0,s.jsx)("span",{className:"text-destructive",children:_(t,"message")??("string"==typeof t?t:JSON.stringify(t))});if("claude_exit"===e){let e=_(t,"exitCode")??_(t,"code"),r=_(t,"reason");return(0,s.jsxs)("span",{className:"text-muted-foreground",children:["exited code ",(0,s.jsx)("span",{className:"text-foreground",children:e??"?"}),r&&(0,s.jsxs)(s.Fragment,{children:[" \xb7 ",r]})]})}if("tool_use"===e){let e=_(t,"name")??"tool",r=(t&&"object"==typeof t?t.input:void 0)??{},n=r.file_path??r.command??r.pattern??r.summary??Object.values(r)[0]??"";return(0,s.jsxs)("span",{children:[(0,s.jsx)("span",{className:"font-semibold text-primary",children:e}),(0,s.jsx)("span",{className:"text-muted-foreground",children:"("}),(0,s.jsx)("span",{className:"text-foreground/80",children:String(n)}),(0,s.jsx)("span",{className:"text-muted-foreground",children:")"}),!!r.summary&&!!r.file_path&&(0,s.jsxs)("span",{className:"text-muted-foreground",children:[" — ",String(r.summary)]})]})}if("tool_result"===e){let e=t&&"object"==typeof t&&t.ok,r=_(t,"summary")??"",n=e?i.A:c.A;return(0,s.jsxs)("span",{className:(0,N.cn)("inline-flex items-center gap-1.5",e?"text-success":"text-destructive"),children:[(0,s.jsx)(n,{className:"h-3 w-3 shrink-0"}),(0,s.jsx)("span",{className:"text-foreground/80",children:r})]})}if("result"===e){let e=t??{},r="number"==typeof e.costUsd?e.costUsd:void 0,n="number"==typeof e.durationSec?e.durationSec:void 0,o="number"==typeof e.turns?e.turns:void 0,a="number"==typeof e.inputTokens?e.inputTokens:void 0,l="number"==typeof e.outputTokens?e.outputTokens:void 0,i="rounded bg-secondary px-1.5 py-0.5 text-[11px] tnum";return(0,s.jsxs)("span",{className:"inline-flex flex-wrap items-center gap-2 align-middle",children:[(0,s.jsx)(h.E,{tone:"success",children:"done"}),null!=r&&(0,s.jsxs)("span",{className:i,children:["$",r.toFixed(2)]}),null!=n&&(0,s.jsxs)("span",{className:i,children:[Math.floor(n/60),"m ",n%60,"s"]}),null!=o&&(0,s.jsxs)("span",{className:i,children:[o," turns"]}),null!=a&&null!=l&&(0,s.jsxs)("span",{className:i,children:[(a/1e3).toFixed(0),"k in \xb7 ",(l/1e3).toFixed(1),"k out"]})]})}return(0,s.jsx)("span",{className:"text-muted-foreground",children:"string"==typeof t?t:JSON.stringify(t)})}function T({line:e,showClock:t}){let r=w[e.type]??k,n=r.icon,o=t&&e.ts?S(e.ts):"";return(0,s.jsxs)("div",{className:(0,N.cn)("dd-log-in flex gap-2.5 rounded-md px-2.5 py-1.5 hover:bg-secondary/40","error"===e.type&&"bg-destructive/[0.06]"),children:[(0,s.jsx)("span",{className:"shrink-0 select-none pt-0.5 text-[11px] tnum text-muted-foreground/60",children:o}),(0,s.jsx)(n,{className:(0,N.cn)("mt-0.5 h-[13px] w-[13px] shrink-0",r.color)}),(0,s.jsx)("span",{className:(0,N.cn)("w-[68px] shrink-0 pt-0.5 text-[10px] font-semibold uppercase tracking-wide",r.color),children:r.label}),(0,s.jsx)("div",{className:"min-w-0 flex-1 whitespace-pre-wrap break-words pt-0.5",children:(0,s.jsx)(E,{type:e.type,payload:e.payload})})]})}function O({jobId:e,initial:t=[],active:r=!0}){let[n,o]=(0,f.useState)(t),[a,l]=(0,f.useState)(()=>!r||t.some(e=>C(e.type,e.payload))),[i,d]=(0,f.useState)(!0),[c,_]=(0,f.useState)(()=>new Set),[A,E]=(0,f.useState)(!1),$=(0,f.useRef)(new Set(t.map(e=>e.id))),F=(0,j.p)(),{success:J,error:L}=(0,y.d)();(0,f.useEffect)(()=>{if(!r||a)return;let t=new EventSource(`/api/sse/jobs/${e}`),s=e=>t=>{let r=t.lastEventId?Number(t.lastEventId):Date.now();if($.current.has(r))return;$.current.add(r);let s=t.data;try{s=JSON.parse(t.data)}catch{}o(t=>[...t,{id:r,type:e,payload:s,ts:Math.floor(Date.now()/1e3)}]),C(e,s)&&l(!0)};for(let e of v)t.addEventListener(e,s(e));return()=>t.close()},[e,r,a]);let z=(0,f.useMemo)(()=>n.filter(e=>!c.has(e.type)),[n,c]),D=!a,M=c.size;return(0,s.jsxs)("div",{className:"overflow-hidden rounded-xl border border-card-border bg-card shadow-sm",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 border-b border-card-border bg-secondary/40 px-3 py-2",children:[(0,s.jsxs)("span",{className:"flex items-center gap-2 text-sm font-semibold",children:[(0,s.jsx)(u.A,{className:"h-[15px] w-[15px] text-muted-foreground"})," Log stream"]}),D?(0,s.jsx)(h.E,{status:"working",children:"live"}):(0,s.jsxs)(h.E,{tone:"neutral",children:["complete \xb7 ",n.length," events"]}),(0,s.jsxs)("div",{className:"ml-auto flex items-center gap-1",children:[(0,s.jsxs)("button",{type:"button",onClick:()=>E(e=>!e),className:(0,N.cn)("inline-flex items-center gap-1.5 rounded-md px-2 py-1 text-xs font-medium hover-elevate focus-ring",M>0&&"text-primary"),children:[(0,s.jsx)(p.A,{className:"h-3.5 w-3.5"})," Filter",M>0&&(0,s.jsxs)("span",{className:"tnum",children:["\xb7 ",v.length-M]})]}),(0,s.jsxs)("button",{type:"button",onClick:()=>d(e=>!e),className:(0,N.cn)("inline-flex items-center gap-1.5 rounded-md px-2 py-1 text-xs font-medium hover-elevate focus-ring",i?"text-primary":"text-muted-foreground"),"aria-pressed":i,children:[(0,s.jsx)(x.A,{className:"h-3.5 w-3.5"})," Autoscroll"]}),(0,s.jsxs)("button",{type:"button",onClick:function(){let e=n.map(e=>{let t=e.ts?`[${S(e.ts)}] `:"",r="string"==typeof e.payload?e.payload:JSON.stringify(e.payload);return`${t}${e.type} ${r}`}).join("\n"),t=navigator.clipboard;t?t.writeText(e).then(()=>J("Log copied",`${n.length} events`)).catch(()=>L("Copy failed","Could not write to the clipboard.")):L("Copy failed","The clipboard is unavailable in this context.")},className:"inline-flex items-center gap-1.5 rounded-md px-2 py-1 text-xs font-medium text-muted-foreground hover-elevate focus-ring",children:[(0,s.jsx)(m.A,{className:"h-3.5 w-3.5"})," Copy"]})]})]}),A&&(0,s.jsx)("div",{className:"dd-fade-up flex flex-wrap items-center gap-1.5 border-b border-card-border bg-secondary/20 px-3 py-2",children:v.map(e=>{let t=!c.has(e),r=w[e]??k,n=r.icon;return(0,s.jsxs)("button",{type:"button",onClick:()=>{_(t=>{let r=new Set(t);return r.has(e)?r.delete(e):r.add(e),r})},className:(0,N.cn)("inline-flex items-center gap-1.5 rounded-md border px-2 py-1 text-[11px] font-medium transition-colors focus-ring",t?`${r.chip} border-transparent`:"border-border text-muted-foreground/60 line-through"),children:[(0,s.jsx)(n,{className:"h-[11px] w-[11px]"})," ",r.label]},e)})}),(0,s.jsx)("div",{role:"log","aria-live":"polite","aria-label":"Job log stream",className:"h-[460px] bg-background/40 px-1 py-1 font-mono text-xs",children:(0,s.jsx)(g.aY,{data:z,followOutput:!!i&&"smooth",itemContent:(e,t)=>(0,s.jsx)(T,{line:t,showClock:F}),components:{Footer:()=>D?(0,s.jsxs)("div",{className:"flex items-center gap-2.5 px-2.5 py-1.5 text-muted-foreground",children:[(0,s.jsx)("span",{className:"w-[42px]"}),(0,s.jsx)(b.y,{size:13}),(0,s.jsx)("span",{className:"text-[11px]",children:"streaming…"})]}):null}})})]})}},5172:(e,t,r)=>{r.d(t,{V:()=>i,m:()=>l});var s=r(515),n=r(4393),o=r(5832);let a={top:"bottom-full left-1/2 -translate-x-1/2 mb-2",bottom:"top-full left-1/2 -translate-x-1/2 mt-2",right:"left-full top-1/2 -translate-y-1/2 ml-2",left:"right-full top-1/2 -translate-y-1/2 mr-2"};function l({content:e,children:t,side:r="top",className:n}){return(0,s.jsxs)("span",{className:"group/tt relative inline-flex",children:[t,(0,s.jsx)("span",{role:"tooltip",className:(0,o.cn)("pointer-events-none absolute z-50 w-max max-w-[260px] rounded-lg border border-border bg-popover px-2.5 py-1.5 text-xs leading-relaxed text-popover-foreground shadow-lg","translate-y-0.5 opacity-0 transition-all duration-150 group-focus-within/tt:opacity-100 group-hover/tt:translate-y-0 group-hover/tt:opacity-100",a[r],n),children:e})]})}function i({content:e,side:t="top"}){return(0,s.jsx)(l,{content:e,side:t,children:(0,s.jsx)("button",{type:"button",className:"inline-flex h-4 w-4 items-center justify-center rounded-full text-muted-foreground/70 transition-colors hover:text-foreground focus-ring","aria-label":"Help",children:(0,s.jsx)(n.A,{className:"h-3.5 w-3.5"})})})}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7690],{2235:(e,t,n)=>{var s=n(2067);n.o(s,"usePathname")&&n.d(t,{usePathname:function(){return s.usePathname}}),n.o(s,"useRouter")&&n.d(t,{useRouter:function(){return s.useRouter}}),n.o(s,"useSearchParams")&&n.d(t,{useSearchParams:function(){return s.useSearchParams}})},2414:(e,t,n)=>{n.d(t,{A:()=>s});let s=(0,n(1330).A)("dollar-sign",[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]])},3823:(e,t,n)=>{n.d(t,{A:()=>s});let s=(0,n(1330).A)("gauge",[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]])},4913:(e,t,n)=>{n.d(t,{C:()=>m,B:()=>f});var s=n(515),r=n(3823),a=n(1171),l=n(4502);l.Ik({status:l.k5(["ok","warning","blocked"]),windowType:l.Yj(),resetsAt:l.ai().nullable(),capturedAt:l.ai()});var u=n(6845),i=n(6644),d=n(5529);let o={neutral:"bg-secondary text-muted-foreground",success:"bg-success/10 text-success",warning:"bg-warning/10 text-warning",destructive:"bg-destructive/10 text-destructive"};function c(e){return e&&"unknown"!==e?"five_hour"===e?"5h window":"weekly"===e?"weekly window":e.replace(/_/g," "):null}function x(e){let[,t]=(0,a.useReducer)(e=>e+1,0);(0,a.useEffect)(()=>{if(!e)return;let n=setInterval(t,1e3);return()=>clearInterval(n)},[e])}function h(e){return function(e,t){if(null===e||e<=t)return null;let n=e-t;if(n<60)return`${n}s`;if(n<3600)return`${Math.floor(n/60)}m`;if(n<86400){let e=Math.floor(n/3600),t=Math.floor(n%3600/60);return t>0?`${e}h ${t}m`:`${e}h`}let s=Math.floor(n/86400),r=Math.floor(n%86400/3600);return r>0?`${s}d ${r}h`:`${s}d`}(e.resetsAt,Math.floor(Date.now()/1e3))}function f({view:e}){let t,n=(0,u.p)()?h(e):null;x(null!==n),t="blocked"===e.state?n?`Claude limited \xb7 ${n}`:"Claude limited":"warning"===e.state?n?`Claude \xb7 ${n}`:"Claude limit near":"ok"===e.state?"Claude OK":"Claude usage —";let a="unknown"===e.state?"Claude subscription usage: no recent reading yet":`Claude ${c(e.windowType)??"subscription"} — ${e.label}${n?` \xb7 resets in ${n}`:""}`;return(0,s.jsxs)(i.E,{tone:e.tone,title:a,className:"shrink-0",children:[(0,s.jsx)(r.A,{className:"h-3 w-3","aria-hidden":!0}),t]})}function m({view:e}){let t,n=(0,u.p)()?h(e):null;x(null!==n);let a=c(e.windowType);return t="unknown"===e.state?"No recent reading yet.":e.blocked?n?`Parked — resets in ${n}`:"Parked until the window resets":n?`Resets in ${n}`:a?`${a} active`:"Within limits",(0,s.jsxs)(d.Zp,{pad:"lg",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:`flex h-8 w-8 items-center justify-center rounded-lg ${o[e.tone]}`,children:(0,s.jsx)(r.A,{className:"h-4 w-4","aria-hidden":!0})}),(0,s.jsx)("span",{className:"text-sm font-medium text-foreground",children:"Claude usage"})]}),(0,s.jsx)(i.E,{tone:e.tone,children:e.label})]}),(0,s.jsxs)("div",{className:"mt-3 flex items-baseline justify-between",children:[(0,s.jsx)("span",{className:"text-sm text-muted-foreground",children:t}),a&&"unknown"!==e.state&&(0,s.jsx)("span",{className:"text-xs text-muted-foreground/70",children:a})]})]})}},9583:(e,t,n)=>{n.d(t,{L:()=>b,_:()=>w});var s=n(515),r=n(3823),a=n(1171),l=n(4502);let u=l.Ik({usedPercent:l.ai(),resetsAt:l.ai().optional(),windowMinutes:l.ai().optional()});function i(e,t){if(null===e||e<=t)return null;let n=e-t;if(n<60)return`${n}s`;if(n<3600)return`${Math.floor(n/60)}m`;if(n<86400){let e=Math.floor(n/3600),t=Math.floor(n%3600/60);return t>0?`${e}h ${t}m`:`${e}h`}let s=Math.floor(n/86400),r=Math.floor(n%86400/3600);return r>0?`${s}d ${r}h`:`${s}d`}l.Ik({capturedAt:l.ai(),primary:u.optional(),secondary:u.optional()});var d=n(6845),o=n(6644),c=n(5529);let x={neutral:"bg-secondary text-muted-foreground",success:"bg-success/10 text-success",warning:"bg-warning/10 text-warning",destructive:"bg-destructive/10 text-destructive"},h={neutral:"bg-muted-foreground/40",success:"bg-success",warning:"bg-warning",destructive:"bg-destructive"};function f(e){let[,t]=(0,a.useReducer)(e=>e+1,0);(0,a.useEffect)(()=>{if(!e)return;let n=setInterval(t,1e3);return()=>clearInterval(n)},[e])}function m(e){return Math.round(Math.min(Math.max(e,0),100))}function w({view:e}){let t,n=(0,d.p)()?i(e.resetsAt,Math.floor(Date.now()/1e3)):null;f(null!==n),t="blocked"===e.state?n?`Codex limited \xb7 ${n}`:"Codex limited":null!==e.usedPercent?`Codex ${m(e.usedPercent)}%`:"Codex usage —";let a="unknown"===e.state?"Codex OAuth usage: no recent reading yet":`Codex OAuth — ${e.label}${null!==e.usedPercent?` (${m(e.usedPercent)}% used)`:""}${n?` \xb7 resets in ${n}`:""}`;return(0,s.jsxs)(o.E,{tone:e.tone,title:a,className:"shrink-0",children:[(0,s.jsx)(r.A,{className:"h-3 w-3","aria-hidden":!0}),t]})}function g({label:e,window:t,tone:n,now:r}){let a=i(t.resetsAt??null,r);return(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,s.jsxs)("div",{className:"flex items-baseline justify-between text-xs",children:[(0,s.jsx)("span",{className:"font-medium text-foreground",children:function(e,t){if(void 0===e)return t;if(e>=10020)return"weekly window";if(e>=60){let t=Math.round(e/60);return`${t}h window`}return`${e}m window`}(t.windowMinutes,e)}),(0,s.jsxs)("span",{className:"tnum text-muted-foreground",children:[m(t.usedPercent),"%"]})]}),(0,s.jsx)("div",{className:"h-1.5 w-full overflow-hidden rounded-full bg-secondary",children:(0,s.jsx)("div",{className:`h-full rounded-full ${h[n]}`,style:{width:`${m(t.usedPercent)}%`}})}),a&&(0,s.jsxs)("span",{className:"text-[11px] text-muted-foreground/80",children:["resets in ",a]})]})}function p(e){return e>=90?"destructive":e>=75?"warning":"success"}function b({view:e}){let t=(0,d.p)(),n=Math.floor(Date.now()/1e3),a=t&&e.blocked?i(e.resetsAt,n):null;return f((e.primary?.resetsAt??e.resetsAt)!==null&&t),(0,s.jsxs)(c.Zp,{pad:"lg",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:`flex h-8 w-8 items-center justify-center rounded-lg ${x[e.tone]}`,children:(0,s.jsx)(r.A,{className:"h-4 w-4","aria-hidden":!0})}),(0,s.jsx)("span",{className:"text-sm font-medium text-foreground",children:"Codex usage"})]}),(0,s.jsx)(o.E,{tone:e.tone,children:e.label})]}),"unknown"===e.state?(0,s.jsx)("p",{className:"mt-3 text-sm text-muted-foreground",children:"No quota reading yet. Codex reports its OAuth usage as it runs."}):(0,s.jsxs)("div",{className:"mt-3 flex flex-col gap-3",children:[e.blocked&&(0,s.jsxs)("div",{className:"rounded-lg border border-destructive/40 bg-destructive/10 px-3 py-2 text-xs text-destructive",children:["Quota exhausted — work is parked",a?`, resets in ${a}`:"","."]}),e.primary&&(0,s.jsx)(g,{label:"5h window",window:e.primary,tone:p(e.primary.usedPercent),now:n}),e.secondary&&(0,s.jsx)(g,{label:"weekly window",window:e.secondary,tone:p(e.secondary.usedPercent),now:n}),!e.primary&&!e.secondary&&(0,s.jsx)("p",{className:"text-sm text-muted-foreground",children:"No window details reported."})]})]})}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6029],{739:(e,t,s)=>{"use strict";s.d(t,{s:()=>c});var r=s(515),n=s(6845),a=s(5832);function c({ts:e,className:t}){let s=(0,n.p)();return(0,r.jsx)("span",{className:t,children:s?(0,a.KW)(e):"…"})}},4940:(e,t,s)=>{Promise.resolve().then(s.bind(s,5704))},5704:(e,t,s)=>{"use strict";s.d(t,{AdrReview:()=>v});var r=s(515),n=s(3639),a=s(1171),c=s(5138),i=s(9199),d=s(6644),l=s(395),o=s(5529),x=s(9694),u=s(9214),m=s(7405),p=s(739),f=s(8479),h=s(5097);let j=(0,h.createServerReference)("403e034e393c8ec019adf822a5775a005a81f11232",h.callServer,void 0,h.findSourceMapURL,"approveAdrAction"),g=(0,h.createServerReference)("60b75e117c3b22f053fff0ca500ba16bcef831dccf",h.callServer,void 0,h.findSourceMapURL,"rejectAdrAction");function v({items:e}){let[t,s]=(0,a.useState)(()=>new Set),c=e.filter(e=>"pending_review"===e.status&&!t.has(e.id)).length;return(0,r.jsxs)("div",{className:"dd-fade-up max-w-3xl",children:[(0,r.jsx)(i.z,{title:"ADRs",subtitle:"Architecture decisions the agent recorded — review before they harden.",icon:n.A,actions:c>0?(0,r.jsxs)(d.E,{tone:"destructive",children:[c," pending"]}):void 0}),0===e.length?(0,r.jsx)(o.Zp,{children:(0,r.jsx)(u.p,{icon:n.A,title:"No decisions yet",description:"When the agent makes a notable architectural call, it'll log an ADR here for you to review."})}):(0,r.jsx)("div",{className:"flex flex-col gap-3",children:e.map(e=>(0,r.jsx)(b,{adr:e,onResolved:()=>{let t;return t=e.id,s(e=>new Set(e).add(t))}},e.id))})]})}function b({adr:e,onResolved:t}){var s;let n,i,[u,h]=(0,a.useTransition)(),[v,N]=(0,a.useState)(""),[w,y]=(0,a.useState)(!1),[A,R]=(0,a.useState)(null),{success:S,error:k}=(0,f.d)(),_="pending_review"===e.status&&null===A,D=(n=(s=e.filePath).split("/").pop()??s,(i=n.match(/^(\d{1,4})/)?.[1])?`ADR-${i.padStart(3,"0")}`:n.replace(/\.mdx?$/,""));return(0,r.jsxs)(o.Zp,{pad:"default",className:"flex flex-col gap-4",children:[(0,r.jsxs)("div",{className:"flex flex-row items-center gap-4",children:[(0,r.jsx)("span",{className:"font-mono text-sm font-semibold text-muted-foreground",children:D}),(0,r.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,r.jsx)("p",{className:"truncate font-medium",children:e.title}),(0,r.jsx)("p",{className:"text-xs text-muted-foreground",children:(0,r.jsx)(p.s,{ts:e.createdAt})})]}),_?(0,r.jsxs)("div",{className:"flex shrink-0 gap-2",children:[(0,r.jsx)(l.$,{size:"sm",variant:"outline",disabled:u,onClick:function(){h(async()=>{try{await j(e.id),R("approved"),t(),S("ADR approved",e.title)}catch(e){k("Failed to approve ADR",e instanceof Error?e.message:String(e))}})},children:"Accept"}),(0,r.jsx)(l.$,{size:"sm",variant:"ghost",disabled:u,onClick:()=>y(!0),children:"Reject"})]}):(0,r.jsx)(d.E,{tone:"rejected"===A?"neutral":"success",children:"rejected"===A?"rejected":"accepted"})]}),(0,r.jsx)("div",{className:"prose prose-sm dark:prose-invert max-w-none rounded-lg border border-card-border bg-secondary/40 p-4 [&_pre]:bg-card",children:(0,r.jsx)(c.oz,{children:e.content})}),_&&(0,r.jsx)(m.p,{"aria-label":"Rejection comment",placeholder:"Optional rejection comment",value:v,onChange:e=>N(e.target.value)}),(0,r.jsx)(x.T,{open:w,onOpenChange:y,onConfirm:function(){h(async()=>{try{await g(e.id,v),R("rejected"),t(),S("ADR rejected",e.title)}catch(e){k("Failed to reject ADR",e instanceof Error?e.message:String(e))}})},title:"Reject ADR?",description:`This rejects "${e.title}" and notifies the run.`,confirmLabel:"Reject",variant:"destructive",pending:u})]})}},7405:(e,t,s)=>{"use strict";s.d(t,{p:()=>c});var r=s(515),n=s(1171),a=s(5832);let c=n.forwardRef(({className:e,...t},s)=>(0,r.jsx)("input",{ref:s,className:(0,a.cn)("h-9 w-full rounded-lg border border-input bg-background px-3 text-sm text-foreground","placeholder:text-muted-foreground transition focus-ring","disabled:cursor-not-allowed disabled:opacity-50",e),...t}));c.displayName="Input"},9199:(e,t,s)=>{"use strict";s.d(t,{z:()=>l});var r=s(515),n=s(9662),a=s(742),c=s.n(a),i=s(1171),d=s(5832);function l({title:e,subtitle:t,breadcrumb:s,actions:a,icon:o,className:x}){return(0,r.jsxs)("div",{className:(0,d.cn)("mb-6 flex flex-wrap items-end justify-between gap-4",x),children:[(0,r.jsxs)("div",{className:"min-w-0",children:[s&&s.length>0&&(0,r.jsx)("nav",{className:"mb-1.5 flex items-center gap-1.5 text-xs text-muted-foreground",children:s.map((e,t)=>(0,r.jsxs)(i.Fragment,{children:[t>0&&(0,r.jsx)(n.A,{className:"h-3 w-3 opacity-60","aria-hidden":!0}),e.href?(0,r.jsx)(c(),{href:e.href,className:"rounded transition-colors hover:text-foreground focus-ring",children:e.label}):(0,r.jsx)("span",{className:"text-foreground/80",children:e.label})]},e.href??e.label))}),(0,r.jsxs)("div",{className:"flex items-center gap-2.5",children:[o&&(0,r.jsx)("span",{className:"flex h-8 w-8 items-center justify-center rounded-lg bg-secondary text-muted-foreground",children:(0,r.jsx)(o,{className:"h-[17px] w-[17px]"})}),(0,r.jsx)("h1",{className:"text-pretty text-2xl font-bold tracking-tight",children:e})]}),t&&(0,r.jsx)("p",{className:"mt-1 text-sm text-muted-foreground",children:t})]}),a&&(0,r.jsx)("div",{className:"flex items-center gap-2",children:a})]})}},9214:(e,t,s)=>{"use strict";s.d(t,{p:()=>c});var r=s(515),n=s(5832);let a={neutral:"bg-secondary text-muted-foreground",primary:"bg-primary/10 text-primary",success:"bg-success-muted text-success",warning:"bg-warning-muted text-warning",destructive:"bg-destructive/10 text-destructive"};function c({icon:e,tone:t="neutral",title:s,description:i,action:d,secondary:l,className:o,compact:x}){return(0,r.jsxs)("div",{className:(0,n.cn)("flex flex-col items-center justify-center text-center",x?"py-10":"py-16",o),children:[e&&(0,r.jsx)("div",{className:(0,n.cn)("flex items-center justify-center rounded-2xl",x?"h-12 w-12":"h-16 w-16",a[t]),children:(0,r.jsx)(e,{className:x?"h-[22px] w-[22px]":"h-7 w-7"})}),(0,r.jsx)("h3",{className:"mt-4 text-base font-semibold",children:s}),i&&(0,r.jsx)("p",{className:"mt-1 max-w-sm text-pretty text-sm text-muted-foreground",children:i}),(d||l)&&(0,r.jsxs)("div",{className:"mt-5 flex items-center gap-2",children:[d,l]})]})}}},e=>{e.O(0,[9843,4443,3433,9655,4234,7358],()=>e(e.s=4940)),_N_E=e.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3747],{598:(e,t,s)=>{"use strict";s.d(t,{y:()=>i});var r=s(515),a=s(8108),n=s(5832);function i({size:e=16,className:t}){return(0,r.jsx)(a.A,{width:e,height:e,className:(0,n.cn)("dd-spin",t),"aria-hidden":!0})}},2235:(e,t,s)=>{"use strict";var r=s(2067);s.o(r,"usePathname")&&s.d(t,{usePathname:function(){return r.usePathname}}),s.o(r,"useRouter")&&s.d(t,{useRouter:function(){return r.useRouter}}),s.o(r,"useSearchParams")&&s.d(t,{useSearchParams:function(){return r.useSearchParams}})},2414:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(1330).A)("dollar-sign",[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]])},2674:(e,t,s)=>{"use strict";s.d(t,{JobStopButton:()=>o});var r=s(515);let a=(0,s(1330).A)("square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);var n=s(1171),i=s(395),c=s(9694),d=s(8479),l=s(5497);function o({jobId:e}){let[t,s]=(0,n.useTransition)(),[u,h]=(0,n.useState)(!1),{success:m,error:x}=(0,d.d)();return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(i.$,{variant:"destructive",size:"sm",disabled:t,onClick:()=>h(!0),children:[(0,r.jsx)(a,{className:"h-3.5 w-3.5"}),"Stop"]}),(0,r.jsx)(c.T,{open:u,onOpenChange:h,onConfirm:function(){s(async()=>{try{await (0,l.A)(e),m("Job stopped",`Job #${e} aborted`)}catch(e){x("Failed to stop job",e instanceof Error?e.message:String(e))}})},icon:a,title:"Stop job?",description:`This terminates the running agent for job #${e} and marks it aborted.`,confirmLabel:"Stop",variant:"destructive",pending:t})]})}},4074:(e,t,s)=>{"use strict";s.d(t,{PrQuestionPanel:()=>g});var r=s(515);let a=(0,s(1330).A)("message-square-text",[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}],["path",{d:"M7 11h10",key:"1twpyw"}],["path",{d:"M7 15h6",key:"d9of3u"}],["path",{d:"M7 7h8",key:"af5zfr"}]]);var n=s(8762),i=s(2235),c=s(1171),d=s(6644),l=s(395),o=s(5529),u=s(9),h=s(8479),m=s(5097);let x=(0,m.createServerReference)("600ce4ac2376492da86f263bfad25463d9b94c318c",m.callServer,void 0,m.findSourceMapURL,"askPrQuestionAction"),p={answering:"warning",answered:"success",error:"destructive"},f={answering:"answering…",answered:"answered",error:"error"};function g({jobId:e,initialQuestions:t}){let s=(0,i.useRouter)(),{error:m}=(0,h.d)(),[y,v]=(0,c.useState)(""),[b,j]=(0,c.useTransition)(),k=t.some(e=>"answering"===e.status);function w(){let t=y.trim();t&&!b&&j(async()=>{try{await x(e,t),v(""),s.refresh()}catch(e){m("Failed to ask",e instanceof Error?e.message:String(e))}})}return(0,c.useEffect)(()=>{if(!k)return;let e=setInterval(()=>s.refresh(),2500);return()=>clearInterval(e)},[k,s]),(0,r.jsxs)(o.Zp,{pad:"lg",className:"space-y-4",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,r.jsx)("span",{className:"flex h-8 w-8 items-center justify-center rounded-lg bg-primary/10 text-primary",children:(0,r.jsx)(a,{className:"h-[17px] w-[17px]"})}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h2",{className:"text-base font-semibold",children:"Ask about this PR"}),(0,r.jsx)("p",{className:"text-xs text-muted-foreground",children:"A read-only assistant answers from the PR's assembled context."})]})]}),(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsx)(u.T,{value:y,onChange:e=>v(e.target.value),onKeyDown:e=>{(e.metaKey||e.ctrlKey)&&"Enter"===e.key&&w()},placeholder:"e.g. Why did this change the queue logic? Is the failing test related?",rows:3,className:"resize-y"}),(0,r.jsxs)("div",{className:"flex items-center justify-end gap-2",children:[(0,r.jsx)("span",{className:"text-xs text-muted-foreground",children:"⌘/Ctrl+Enter to send"}),(0,r.jsxs)(l.$,{size:"sm",onClick:w,disabled:b||0===y.trim().length,children:[(0,r.jsx)(n.A,{className:"h-3.5 w-3.5"}),b?"Asking…":"Ask"]})]})]}),0===t.length?(0,r.jsx)("p",{className:"text-sm text-muted-foreground",children:"No questions yet. The agent answers read-only, from the PR's assembled context."}):(0,r.jsx)("ul",{className:"space-y-3",children:t.map(e=>(0,r.jsxs)("li",{className:"rounded-lg border border-border bg-background p-3",children:[(0,r.jsxs)("div",{className:"mb-1 flex items-start justify-between gap-2",children:[(0,r.jsx)("p",{className:"text-sm font-medium",children:e.question}),(0,r.jsx)(d.E,{tone:p[e.status]??"neutral",children:f[e.status]??e.status})]}),"answered"===e.status&&e.answer&&(0,r.jsx)("p",{className:"whitespace-pre-wrap text-sm text-muted-foreground",children:e.answer}),"error"===e.status&&(0,r.jsx)("p",{className:"text-sm text-destructive",children:e.errorMessage??"Answering failed."}),"answering"===e.status&&(0,r.jsx)("p",{className:"text-sm text-muted-foreground",children:"Working on an answer…"})]},e.id))})]})}},4276:(e,t,s)=>{"use strict";s.d(t,{h:()=>d});var r=s(515),a=s(6512),n=s(5832),i=s(5172);let c={neutral:{chip:"bg-secondary text-muted-foreground",val:"text-foreground",bg:""},primary:{chip:"bg-primary/15 text-primary",val:"text-primary",bg:"bg-primary/[0.04]"},success:{chip:"bg-success-muted text-success",val:"text-success",bg:"bg-success/[0.05]"},warning:{chip:"bg-warning-muted text-warning",val:"text-warning",bg:"bg-warning/[0.05]"},destructive:{chip:"bg-destructive/15 text-destructive",val:"text-destructive",bg:"bg-destructive/[0.05]"}};function d({icon:e,label:t,value:s,sub:l,tone:o="neutral",active:u,onClick:h,hint:m}){let x=!!u&&"neutral"!==o,p=c[o],f=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsx)("span",{className:(0,n.cn)("flex h-8 w-8 items-center justify-center rounded-lg transition-colors",x?p.chip:"bg-secondary text-muted-foreground"),children:e&&(0,r.jsx)(e,{className:"h-4 w-4"})}),m&&(0,r.jsx)("span",{className:"text-muted-foreground/60",children:(0,r.jsx)(i.m,{content:m,children:(0,r.jsx)(a.A,{className:"h-3.5 w-3.5"})})})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:(0,n.cn)("text-2xl font-semibold tnum tracking-tight",x?p.val:"text-foreground"),children:s}),(0,r.jsx)("div",{className:"mt-0.5 text-[13px] font-medium text-muted-foreground",children:t}),l&&(0,r.jsx)("div",{className:"mt-0.5 text-xs text-muted-foreground/80",children:l})]})]}),g=(0,n.cn)("group relative flex flex-col gap-3 rounded-xl border border-card-border bg-card p-4 text-left shadow-sm transition-colors",x&&p.bg,h&&"hover-elevate focus-ring");return h?(0,r.jsx)("button",{type:"button",onClick:h,className:g,children:f}):(0,r.jsx)("div",{className:g,children:f})}},4283:(e,t,s)=>{"use strict";s.d(t,{JobMetrics:()=>u});var r=s(515),a=s(2414),n=s(7561),i=s(1528);let c=(0,s(1330).A)("cpu",[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]]);var d=s(1171),l=s(4276),o=s(5832);function u({jobId:e,issueNumber:t,model:s,initialCostUsd:h,inputTokens:m,outputTokens:x,durationSec:p,attempts:f,active:g=!0}){let[y,v]=(0,d.useState)(h);(0,d.useEffect)(()=>{if(!g)return;let t=new EventSource(`/api/sse/jobs/${e}`);return t.addEventListener("result",e=>{try{let t=JSON.parse(e.data);"number"==typeof t.costUsd&&v(t.costUsd)}catch{}}),()=>t.close()},[e,g]);let b=`${(m/1e3).toFixed(0)}k in \xb7 ${(x/1e3).toFixed(1)}k out \xb7 #${t}`;return(0,r.jsxs)("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-4",children:[(0,r.jsx)(l.h,{icon:a.A,label:"Cost",value:(0,o.UK)(y),sub:b,tone:"primary",active:!0}),(0,r.jsx)(l.h,{icon:n.A,label:"Duration",value:null!=p?(0,o.a3)(p):"—"}),(0,r.jsx)(l.h,{icon:i.A,label:"Attempts",value:f??"—",tone:null!=f&&f>2?"warning":"neutral",active:null!=f&&f>2}),(0,r.jsx)(l.h,{icon:c,label:"Model",value:(0,r.jsx)("span",{className:"font-mono text-base",children:(s??"—").replace("claude-","")})})]})}},4877:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(1330).A)("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]])},5097:(e,t,s)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={callServer:function(){return n.callServer},createServerReference:function(){return c.createServerReference},findSourceMapURL:function(){return i.findSourceMapURL}};for(var a in r)Object.defineProperty(t,a,{enumerable:!0,get:r[a]});let n=s(2258),i=s(7886),c=s(349)},5378:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(1330).A)("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},5497:(e,t,s)=>{"use strict";s.d(t,{A:()=>a});var r=s(5097);let a=(0,r.createServerReference)("403fc9b2867e1f720d4d1326cb1ea3c5c67b2fad36",r.callServer,void 0,r.findSourceMapURL,"abortJobAction")},6003:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(1330).A)("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]])},6512:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(1330).A)("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]])},8131:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(1330).A)("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]])},8319:(e,t,s)=>{"use strict";s.d(t,{PrAuditButton:()=>o});var r=s(515);let a=(0,s(1330).A)("search-check",[["path",{d:"m8 11 2 2 4-4",key:"1sed1v"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);var n=s(1171),i=s(395),c=s(8479),d=s(5097);let l=(0,d.createServerReference)("403ca90e26f08545e01b6b28ae7c352b6f837e2e21",d.callServer,void 0,d.findSourceMapURL,"runPrAuditAction");function o({jobId:e}){let[t,s]=(0,n.useTransition)(),{success:d,error:u}=(0,c.d)();return(0,r.jsxs)(i.$,{variant:"outline",size:"sm",disabled:t,onClick:function(){s(async()=>{try{let{prNumber:t}=await l(e);d("PR audit started",`Reviewing PR #${t} — the result lands on the issue.`)}catch(e){u("Failed to start PR audit",e instanceof Error?e.message:String(e))}})},children:[(0,r.jsx)(a,{className:"h-3.5 w-3.5"}),t?"Starting…":"Run PR audit"]})}},8762:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(1330).A)("send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]])},9532:(e,t,s)=>{Promise.resolve().then(s.bind(s,9290)),Promise.resolve().then(s.t.bind(s,742,23)),Promise.resolve().then(s.bind(s,4283)),Promise.resolve().then(s.bind(s,2674)),Promise.resolve().then(s.bind(s,715)),Promise.resolve().then(s.bind(s,8319)),Promise.resolve().then(s.bind(s,4074))}},e=>{e.O(0,[9843,4624,3433,3894,9655,4234,7358],()=>e(e.s=9532)),_N_E=e.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5531],{242:(e,t,r)=>{"use strict";r.d(t,{JobsHistoryPagination:()=>d});var a=r(515);let n=(0,r(1330).A)("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);var s=r(9662),o=r(742),l=r.n(o),i=r(2235),u=r(5832);function d({page:e,totalPages:t}){let r=(0,i.usePathname)(),o=(0,i.useSearchParams)();if(t<=1)return null;function l(e){let t=new URLSearchParams(o.toString());return t.set("page",String(e)),`${r}?${t.toString()}`}let u=function(e,t){if(t<=7)return Array.from({length:t},(e,t)=>t+1);let r=new Set([e-1,e,e+1].filter(e=>e>=1&&e<=t)),a=[...new Set([1,t,...r])].sort((e,t)=>e-t),n=[];for(let e=0;e<a.length;e++){let t=a[e],r=a[e-1];e>0&&void 0!==r&&t-r>1&&n.push("…"),n.push(t)}return n}(e,t);return(0,a.jsxs)("nav",{className:"flex items-center justify-center gap-1 py-2","aria-label":"Pagination",children:[(0,a.jsx)(c,{href:l(e-1),disabled:1===e,"aria-label":"Previous page",children:(0,a.jsx)(n,{className:"h-4 w-4"})}),u.map((t,r)=>"…"===t?(0,a.jsx)("span",{className:"px-1.5 text-sm text-muted-foreground",children:"…"},`ellipsis-${r}`):(0,a.jsx)(c,{href:l(t),active:t===e,children:t},t)),(0,a.jsx)(c,{href:l(e+1),disabled:e===t,"aria-label":"Next page",children:(0,a.jsx)(s.A,{className:"h-4 w-4"})})]})}function c({href:e,children:t,disabled:r,active:n,"aria-label":s}){return(0,a.jsx)(l(),{href:e,"aria-label":s,"aria-disabled":r,tabIndex:r?-1:void 0,className:(0,u.cn)("inline-flex h-8 min-w-8 items-center justify-center rounded-md border px-2.5 text-sm font-medium transition-colors focus-ring",n?"border-primary bg-primary text-primary-foreground shadow-sm":"border-border bg-card text-foreground hover-elevate",r&&"pointer-events-none opacity-40"),children:t})}},2038:(e,t,r)=>{Promise.resolve().then(r.bind(r,9290)),Promise.resolve().then(r.t.bind(r,742,23)),Promise.resolve().then(r.bind(r,3354)),Promise.resolve().then(r.bind(r,242))},2235:(e,t,r)=>{"use strict";var a=r(2067);r.o(a,"usePathname")&&r.d(t,{usePathname:function(){return a.usePathname}}),r.o(a,"useRouter")&&r.d(t,{useRouter:function(){return a.useRouter}}),r.o(a,"useSearchParams")&&r.d(t,{useSearchParams:function(){return a.useSearchParams}})},3354:(e,t,r)=>{"use strict";r.d(t,{JobsHistoryFilters:()=>c});var a=r(515),n=r(9564),s=r(2235),o=r(1171),l=r(7405),i=r(5897),u=r(8067);let d=[{value:"",label:"All"},...["queued","working","ci_running","ci_failed","retrying","waiting_limit","merged","needs_human","aborted","interrupted"].map(e=>({value:e,label:e.replace(/_/g," ")}))];function c({repos:e,models:t}){let r=(0,s.useRouter)(),h=(0,s.usePathname)(),m=(0,s.useSearchParams)(),[,f]=(0,o.useTransition)(),p=(0,o.useRef)(void 0);function x(e,t){var a;let n,s=(a=window.location.search,n=new URLSearchParams(a),t?n.set(e,t):n.delete(e),n.delete("page"),n.toString());f(()=>{r.push(`${h}?${s}`)})}return(0,o.useEffect)(()=>()=>clearTimeout(p.current),[]),(0,a.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,a.jsx)(i.I,{value:m.get("status")??"",onChange:e=>x("status",e),options:d}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)(n.A,{className:"pointer-events-none absolute left-2.5 top-1/2 h-[15px] w-[15px] -translate-y-1/2 text-muted-foreground"}),(0,a.jsx)(l.p,{className:"h-9 w-56 pl-8",placeholder:"Search issue title or #",defaultValue:m.get("q")??"",onChange:e=>{let t=e.target.value;clearTimeout(p.current),p.current=setTimeout(()=>x("q",t),300)}})]}),(0,a.jsx)("div",{className:"w-44",children:(0,a.jsxs)(u.l,{className:"h-9 text-sm",value:m.get("repo")??"",onChange:e=>x("repo",e.target.value),children:[(0,a.jsx)("option",{value:"",children:"All repositories"}),e.map(e=>(0,a.jsx)("option",{value:String(e.id),children:e.name},e.id))]})}),(0,a.jsx)("div",{className:"w-44",children:(0,a.jsxs)(u.l,{className:"h-9 text-sm",value:m.get("model")??"",onChange:e=>x("model",e.target.value),children:[(0,a.jsx)("option",{value:"",children:"All models"}),t.map(e=>(0,a.jsx)("option",{value:e.id,children:e.label},e.id))]})})]})]})}},3798:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});let a=(0,r(1330).A)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]])},5832:(e,t,r)=>{"use strict";function a(...e){return e.filter(Boolean).join(" ")}function n(e){if(!e)return"no activity";let t=Math.floor(Date.now()/1e3)-e;return t<60?"just now":t<3600?`${Math.floor(t/60)}m ago`:t<86400?`${Math.floor(t/3600)}h ago`:t<604800?`${Math.floor(t/86400)}d ago`:new Date(1e3*e).toLocaleDateString()}function s(e){if(e>=3600){let t=Math.floor(e/3600),r=Math.round(e%3600/60);return r>0?`${t}h ${r}m`:`${t}h`}return e>=60?`${Math.floor(e/60)}m ${e%60}s`:`${e}s`}function o(e,t=2){return`$${e.toFixed(t)}`}r.d(t,{KW:()=>n,UK:()=>o,a3:()=>s,cn:()=>a})},5897:(e,t,r)=>{"use strict";r.d(t,{I:()=>s});var a=r(515),n=r(5832);function s({value:e,onChange:t,options:r,size:o="default",disabled:l=!1}){return(0,a.jsx)("div",{className:(0,n.cn)("inline-flex items-center gap-0.5 rounded-lg border border-border bg-secondary/50 p-0.5","sm"===o&&"text-xs"),children:r.map(r=>(0,a.jsx)("button",{type:"button",disabled:l,onClick:()=>t(r.value),className:(0,n.cn)("rounded-md px-2.5 py-1 text-xs font-medium transition-colors focus-ring","disabled:cursor-not-allowed disabled:opacity-50",e===r.value?"bg-card text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:r.label},r.value))})}},7405:(e,t,r)=>{"use strict";r.d(t,{p:()=>o});var a=r(515),n=r(1171),s=r(5832);let o=n.forwardRef(({className:e,...t},r)=>(0,a.jsx)("input",{ref:r,className:(0,s.cn)("h-9 w-full rounded-lg border border-input bg-background px-3 text-sm text-foreground","placeholder:text-muted-foreground transition focus-ring","disabled:cursor-not-allowed disabled:opacity-50",e),...t}));o.displayName="Input"},8067:(e,t,r)=>{"use strict";r.d(t,{l:()=>l});var a=r(515),n=r(3798),s=r(1171),o=r(5832);let l=s.forwardRef(({className:e,children:t,...r},s)=>(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("select",{ref:s,className:(0,o.cn)("h-9 w-full appearance-none cursor-pointer rounded-lg border border-input bg-background pl-3 pr-9 text-sm text-foreground","transition focus-ring","disabled:cursor-not-allowed disabled:opacity-50",e),...r,children:t}),(0,a.jsx)(n.A,{className:"pointer-events-none absolute right-2.5 top-1/2 h-[15px] w-[15px] -translate-y-1/2 text-muted-foreground"})]}));l.displayName="Select"},9564:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});let a=(0,r(1330).A)("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]])},9662:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});let a=(0,r(1330).A)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]])}},e=>{e.O(0,[9843,9655,4234,7358],()=>e(e.s=2038)),_N_E=e.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7177],{293:(e,t,a)=>{"use strict";a.d(t,{A:()=>s});let s=(0,a(1330).A)("layout-dashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]])},2194:(e,t,a)=>{Promise.resolve().then(a.t.bind(a,8353,23)),Promise.resolve().then(a.t.bind(a,2332,23)),Promise.resolve().then(a.t.bind(a,5689,23)),Promise.resolve().then(a.bind(a,3385)),Promise.resolve().then(a.bind(a,3728))},2332:e=>{e.exports={style:{fontFamily:"'JetBrains Mono', 'JetBrains Mono Fallback'",fontStyle:"normal"},className:"__className_3c557b",variable:"__variable_3c557b"}},3164:(e,t,a)=>{"use strict";a.d(t,{A:()=>s});let s=(0,a(1330).A)("file-text",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]])},3385:(e,t,a)=>{"use strict";a.d(t,{AppShell:()=>U});var s=a(515),r=a(293),n=a(4877),l=a(9320),o=a(1330);let i=(0,o.A)("chart-no-axes-column",[["path",{d:"M5 21v-6",key:"1hz6c0"}],["path",{d:"M12 21V3",key:"1lcnhd"}],["path",{d:"M19 21V9",key:"unv183"}]]);var c=a(3164),d=a(3639),m=a(2414);let u=(0,o.A)("settings",[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]),h=(0,o.A)("anchor",[["path",{d:"M12 6v16",key:"nqf5sj"}],["path",{d:"m19 13 2-1a9 9 0 0 1-18 0l2 1",key:"y7qv08"}],["path",{d:"M9 11h6",key:"1fldmi"}],["circle",{cx:"12",cy:"4",r:"2",key:"muu5ef"}]]),p=(0,o.A)("pause",[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1",key:"kaeet6"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1",key:"1wsw3u"}]]);var f=a(742),x=a.n(f),y=a(2235),b=a(4913),g=a(9583);let v=(0,o.A)("key-round",[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]);function k({failures:e}){return 0===e.length?null:(0,s.jsx)("div",{role:"alert",className:"border-t border-destructive/30 bg-destructive/10",children:(0,s.jsxs)("div",{className:"mx-auto flex max-w-7xl items-start gap-2 px-4 py-1.5 text-xs text-destructive",children:[(0,s.jsx)(v,{className:"mt-0.5 h-[13px] w-[13px] shrink-0"}),(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsx)("span",{className:"font-semibold",children:"Credential check failed — new jobs are paused until auth is restored."})," ",e.map(e=>(0,s.jsxs)("span",{className:"after:content-['_']",children:[(0,s.jsxs)("span",{className:"font-medium",children:[e.label,":"]})," ",e.message]},e.target))]})]})})}let w=(0,o.A)("octagon-x",[["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z",key:"2d38gg"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);var j=a(1171),N=a(9694),A=a(8479),S=a(5097);let M=(0,S.createServerReference)("00d40d65ec366596ba0f414253cbf8a8e26ce81760",S.callServer,void 0,S.findSourceMapURL,"emergencyStopAction");function E(){let[e,t]=(0,j.useTransition)(),[a,r]=(0,j.useState)(!1),{success:n,error:l}=(0,A.d)();return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("button",{type:"button",disabled:e,onClick:()=>r(!0),"aria-label":"Emergency stop — pause automation and abort all running jobs",className:"inline-flex h-8 items-center gap-1.5 rounded-lg border border-destructive/30 px-2.5 text-xs font-medium text-destructive hover-elevate focus-ring disabled:opacity-60",children:[(0,s.jsx)(w,{className:"h-3.5 w-3.5"}),(0,s.jsx)("span",{className:"hidden sm:inline",children:"Stop all"})]}),(0,s.jsx)(N.T,{open:a,onOpenChange:r,onConfirm:function(){t(async()=>{try{let{aborted:e}=await M();n("Emergency stop",1===e?"Automation paused, 1 job aborted":`Automation paused, ${e} jobs aborted`)}catch(e){l("Emergency stop failed",e instanceof Error?e.message:String(e))}})},title:"Emergency stop?",description:"This pauses automation and aborts every running job, terminating their agents immediately.",confirmLabel:"Stop all",variant:"destructive",pending:e})]})}var C=a(4054),_=a(7635),T=a(5832);function z({paused:e}){let[t,a]=(0,j.useState)(e),[r,n]=(0,j.useTransition)(),{success:l,error:o}=(0,A.d)();return(0,j.useEffect)(()=>a(e),[e]),(0,s.jsxs)("button",{type:"button",onClick:function(){let e=!t;n(async()=>{try{let t=await (0,_.$)(e);a(t.paused),l(t.paused?"Automation paused":"Automation resumed")}catch(e){o("Failed to toggle pause",e instanceof Error?e.message:String(e))}})},disabled:r,"aria-pressed":t,"aria-label":t?"Resume automation":"Pause automation",className:(0,T.cn)("inline-flex h-8 items-center gap-1.5 rounded-lg px-2.5 text-xs font-medium hover-elevate focus-ring disabled:opacity-60",t?"text-warning":"text-muted-foreground"),children:[t?(0,s.jsx)(C.A,{className:"h-3.5 w-3.5"}):(0,s.jsx)(p,{className:"h-3.5 w-3.5"}),(0,s.jsx)("span",{className:"hidden sm:inline",children:t?"Resume":"Pause"})]})}let V=(0,o.A)("sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]),P=(0,o.A)("moon",[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]]);var L=a(5241);function H(){let{resolvedTheme:e,setTheme:t}=(0,L.D)(),[a,r]=(0,j.useState)(!1);(0,j.useEffect)(()=>r(!0),[]);let n="dark"===e;return(0,s.jsx)("button",{type:"button","aria-label":"Toggle theme",onClick:()=>t(n?"light":"dark"),className:"inline-flex h-8 w-8 items-center justify-center rounded-lg text-muted-foreground hover-elevate focus-ring",children:a&&!n?(0,s.jsx)(V,{className:"h-4 w-4"}):(0,s.jsx)(P,{className:"h-4 w-4"})})}let I=(0,o.A)("circle-arrow-up",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16 12-4-4-4 4",key:"177agl"}],["path",{d:"M12 16V8",key:"1sbj14"}]]);var R=a(5378),q=a(6644);let F="drydock:update-dismissed";function O({status:e,installKind:t}){let[a,r]=(0,j.useState)(null),[n,l]=(0,j.useState)(!1);return((0,j.useEffect)(()=>{try{r(localStorage.getItem(F))}catch{}l(!0)},[]),n&&e.updateAvailable&&e.latestVersion&&e.latestVersion!==a)?(0,s.jsxs)(q.E,{tone:"success",className:"h-8 gap-1.5 px-2.5",children:[(0,s.jsx)(I,{className:"h-3.5 w-3.5 shrink-0"}),e.releaseUrl?(0,s.jsxs)("a",{href:e.releaseUrl,target:"_blank",rel:"noreferrer",className:"rounded-sm hover:underline focus-ring",title:"global"===t?"Run `drydock update` to upgrade":"View the release on GitHub",children:["Update available: v",e.latestVersion]}):(0,s.jsxs)("span",{children:["Update available: v",e.latestVersion]}),"global"===t&&(0,s.jsx)("code",{className:"rounded bg-success/15 px-1 font-mono",children:"drydock update"}),(0,s.jsx)("button",{type:"button",onClick:()=>{try{e.latestVersion&&localStorage.setItem(F,e.latestVersion)}catch{}r(e.latestVersion)},"aria-label":"Dismiss update notice",className:"-mr-1 rounded p-0.5 hover-elevate focus-ring",children:(0,s.jsx)(R.A,{className:"h-3 w-3"})})]}):null}let D=[{href:"/",label:"Dashboard",icon:r.A},{href:"/needs-human",label:"Needs human",icon:n.A},{href:"/jobs",label:"Jobs",icon:l.A},{href:"/analytics",label:"Analytics",icon:i},{href:"/prompts",label:"Prompts",icon:c.A},{href:"/adrs",label:"ADRs",icon:d.A},{href:"/costs",label:"Costs",icon:m.A},{href:"/settings",label:"Settings",icon:u}];function U({children:e,adrPending:t=0,needsHuman:a=0,paused:r=!1,updateStatus:n,installKind:l="local",credentialFailures:o=[],claudeUsage:i,codexUsage:c}){let d=(0,y.usePathname)();return(0,s.jsxs)("div",{className:"min-h-screen bg-background",children:[(0,s.jsx)("a",{href:"#main",className:"sr-only focus:not-sr-only focus:absolute focus:left-4 focus:top-4 focus:z-50 focus:rounded-md focus:bg-background focus:px-4 focus:py-2 focus:text-sm focus:font-medium focus:ring-2 focus:ring-ring",children:"Skip to main content"}),(0,s.jsxs)("header",{className:"sticky top-0 z-30 border-b border-border bg-background/85 backdrop-blur-md",children:[(0,s.jsxs)("div",{className:"mx-auto flex h-14 max-w-7xl items-center gap-2 px-4",children:[(0,s.jsxs)(x(),{href:"/",className:"mr-2 flex shrink-0 items-center gap-2 rounded-md focus-ring",children:[(0,s.jsx)("span",{className:"flex h-7 w-7 items-center justify-center rounded-lg bg-primary text-primary-foreground shadow-sm",children:(0,s.jsx)(h,{className:"h-4 w-4"})}),(0,s.jsx)("span",{className:"text-base font-bold tracking-tight",children:"Drydock"})]}),(0,s.jsx)("nav",{className:"flex min-w-0 flex-1 items-center gap-0.5 overflow-x-auto scrollbar-none",children:D.map(e=>{var r;let n="/"===(r=e.href)?"/"===d:d.startsWith(r),l=e.icon,o="/needs-human"===e.href?a:"/adrs"===e.href?t:0;return(0,s.jsxs)(x(),{href:e.href,"aria-current":n?"page":void 0,className:(0,T.cn)("relative flex shrink-0 items-center gap-1.5 rounded-md px-3 py-1.5 text-sm transition-colors hover-elevate",n?"font-medium text-foreground":"text-muted-foreground"),children:[(0,s.jsx)(l,{className:(0,T.cn)("h-[15px] w-[15px]",n&&"text-primary")}),e.label,o>0&&(0,s.jsx)("span",{className:"ml-0.5 rounded-full bg-destructive px-1.5 text-[10px] font-semibold leading-4 text-destructive-foreground tnum",children:o}),n&&(0,s.jsx)("span",{className:"absolute inset-x-2 -bottom-[7px] h-0.5 rounded-full bg-primary"})]},e.href)})}),(0,s.jsxs)("div",{className:"ml-auto flex shrink-0 items-center gap-1.5",children:[i&&(0,s.jsx)(b.B,{view:i}),c&&(0,s.jsx)(g._,{view:c}),n&&(0,s.jsx)(O,{status:n,installKind:l}),(0,s.jsx)(z,{paused:r}),(0,s.jsx)(E,{}),(0,s.jsx)("div",{className:"mx-1 h-5 w-px bg-border"}),(0,s.jsx)(H,{})]})]}),r&&(0,s.jsx)("div",{className:"border-t border-warning-border bg-warning-muted",children:(0,s.jsxs)("div",{className:"mx-auto flex max-w-7xl items-center gap-2 px-4 py-1.5 text-xs text-warning-foreground",children:[(0,s.jsx)(p,{className:"h-[13px] w-[13px]"})," Automation is paused globally. No new jobs will start."]})}),(0,s.jsx)(k,{failures:o})]}),(0,s.jsx)("main",{id:"main",className:"mx-auto max-w-7xl px-4 py-6 sm:py-8",children:e})]})}},3639:(e,t,a)=>{"use strict";a.d(t,{A:()=>s});let s=(0,a(1330).A)("book-text",[["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20",key:"k3hazp"}],["path",{d:"M8 11h8",key:"vwpz6n"}],["path",{d:"M8 7h6",key:"1f0q6e"}]])},3728:(e,t,a)=>{"use strict";a.d(t,{Providers:()=>l});var s=a(515),r=a(5241),n=a(8479);function l({children:e}){return(0,s.jsx)(r.N,{attribute:"class",defaultTheme:"dark",enableSystem:!1,disableTransitionOnChange:!0,children:(0,s.jsx)(n.t,{children:e})})}},4054:(e,t,a)=>{"use strict";a.d(t,{A:()=>s});let s=(0,a(1330).A)("play",[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]])},5241:(e,t,a)=>{"use strict";a.d(t,{D:()=>d,N:()=>m});var s=a(1171),r=(e,t,a,s,r,n,l,o)=>{let i=document.documentElement,c=["light","dark"];function d(t){var a;(Array.isArray(e)?e:[e]).forEach(e=>{let a="class"===e,s=a&&n?r.map(e=>n[e]||e):r;a?(i.classList.remove(...s),i.classList.add(n&&n[t]?n[t]:t)):i.setAttribute(e,t)}),a=t,o&&c.includes(a)&&(i.style.colorScheme=a)}if(s)d(s);else try{let e=localStorage.getItem(t)||a,s=l&&"system"===e?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":e;d(s)}catch(e){}},n=["light","dark"],l="(prefers-color-scheme: dark)",o="u"<typeof window,i=s.createContext(void 0),c={setTheme:e=>{},themes:[]},d=()=>{var e;return null!=(e=s.useContext(i))?e:c},m=e=>s.useContext(i)?s.createElement(s.Fragment,null,e.children):s.createElement(h,{...e}),u=["light","dark"],h=({forcedTheme:e,disableTransitionOnChange:t=!1,enableSystem:a=!0,enableColorScheme:r=!0,storageKey:o="theme",themes:c=u,defaultTheme:d=a?"system":"light",attribute:m="data-theme",value:h,children:b,nonce:g,scriptProps:v})=>{let[k,w]=s.useState(()=>f(o,d)),[j,N]=s.useState(()=>"system"===k?y():k),A=h?Object.values(h):c,S=s.useCallback(e=>{let s=e;if(!s)return;"system"===e&&a&&(s=y());let l=h?h[s]:s,o=t?x(g):null,i=document.documentElement,c=e=>{"class"===e?(i.classList.remove(...A),l&&i.classList.add(l)):e.startsWith("data-")&&(l?i.setAttribute(e,l):i.removeAttribute(e))};if(Array.isArray(m)?m.forEach(c):c(m),r){let e=n.includes(d)?d:null,t=n.includes(s)?s:e;i.style.colorScheme=t}null==o||o()},[g]),M=s.useCallback(e=>{let t="function"==typeof e?e(k):e;w(t);try{localStorage.setItem(o,t)}catch(e){}},[k]),E=s.useCallback(t=>{N(y(t)),"system"===k&&a&&!e&&S("system")},[k,e]);s.useEffect(()=>{let e=window.matchMedia(l);return e.addListener(E),E(e),()=>e.removeListener(E)},[E]),s.useEffect(()=>{let e=e=>{e.key===o&&(e.newValue?w(e.newValue):M(d))};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)},[M]),s.useEffect(()=>{S(null!=e?e:k)},[e,k]);let C=s.useMemo(()=>({theme:k,setTheme:M,forcedTheme:e,resolvedTheme:"system"===k?j:k,themes:a?[...c,"system"]:c,systemTheme:a?j:void 0}),[k,M,e,j,a,c]);return s.createElement(i.Provider,{value:C},s.createElement(p,{forcedTheme:e,storageKey:o,attribute:m,enableSystem:a,enableColorScheme:r,defaultTheme:d,value:h,themes:c,nonce:g,scriptProps:v}),b)},p=s.memo(({forcedTheme:e,storageKey:t,attribute:a,enableSystem:n,enableColorScheme:l,defaultTheme:o,value:i,themes:c,nonce:d,scriptProps:m})=>{let u=JSON.stringify([a,t,o,e,c,i,n,l]).slice(1,-1);return s.createElement("script",{...m,suppressHydrationWarning:!0,nonce:"u"<typeof window?d:"",dangerouslySetInnerHTML:{__html:`(${r.toString()})(${u})`}})}),f=(e,t)=>{let a;if(!o){try{a=localStorage.getItem(e)||void 0}catch(e){}return a||t}},x=e=>{let t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.appendChild(document.createTextNode("*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(t),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(t)},1)}},y=e=>(e||(e=window.matchMedia(l)),e.matches?"dark":"light")},5689:()=>{},7635:(e,t,a)=>{"use strict";a.d(t,{$:()=>r});var s=a(5097);let r=(0,s.createServerReference)("40d6ac063e31ed3ee52059d74d9460570a55d99e84",s.callServer,void 0,s.findSourceMapURL,"togglePauseAction")},8353:e=>{e.exports={style:{fontFamily:"'Inter', 'Inter Fallback'",fontStyle:"normal"},className:"__className_f367f3",variable:"__variable_f367f3"}},9320:(e,t,a)=>{"use strict";a.d(t,{A:()=>s});let s=(0,a(1330).A)("list-checks",[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}]])}},e=>{e.O(0,[643,9843,1642,3433,7690,9655,4234,7358],()=>e(e.s=2194)),_N_E=e.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8608],{293:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(1330).A)("layout-dashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]])},739:(e,t,s)=>{"use strict";s.d(t,{s:()=>n});var r=s(515),a=s(6845),c=s(5832);function n({ts:e,className:t}){let s=(0,a.p)();return(0,r.jsx)("span",{className:t,children:s?(0,c.KW)(e):"…"})}},2235:(e,t,s)=>{"use strict";var r=s(2067);s.o(r,"usePathname")&&s.d(t,{usePathname:function(){return r.usePathname}}),s.o(r,"useRouter")&&s.d(t,{useRouter:function(){return r.useRouter}}),s.o(r,"useSearchParams")&&s.d(t,{useSearchParams:function(){return r.useSearchParams}})},2457:(e,t,s)=>{Promise.resolve().then(s.bind(s,2734))},2734:(e,t,s)=>{"use strict";s.d(t,{NeedsHumanList:()=>A});var r=s(515),a=s(4877),c=s(8131),n=s(293),i=s(6819),l=s(9339);let d=(0,s(1330).A)("ban",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M4.929 4.929 19.07 19.071",key:"196cmz"}]]);var u=s(742),o=s.n(u),h=s(2235),m=s(1171),x=s(9199),p=s(6644),f=s(395),y=s(5529),g=s(9694),v=s(9214),b=s(739),j=s(8479),N=s(5097);let k=(0,N.createServerReference)("40ea5d9a48c67bf43c3c92eead681338f5513aaa29",N.callServer,void 0,N.findSourceMapURL,"requeueJobAction");var w=s(5497);function A({jobs:e}){let t=(0,h.useRouter)(),[,s]=(0,m.useTransition)(),[u,N]=(0,m.useState)(null),[S,M]=(0,m.useState)(null),{success:R,error:$}=(0,j.d)();return(0,r.jsxs)("div",{className:"dd-fade-up",children:[(0,r.jsx)(x.z,{title:"Needs human",subtitle:"Jobs a guardrail paused for review. Nothing risky was written.",icon:a.A}),0===e.length?(0,r.jsx)(y.Zp,{children:(0,r.jsx)(v.p,{icon:c.A,tone:"success",title:"All clear",description:"No jobs are waiting on a human. Drydock will surface anything that hits a guardrail here.",action:(0,r.jsxs)(f.$,{variant:"outline",onClick:()=>t.push("/"),children:[(0,r.jsx)(n.A,{className:"h-[15px] w-[15px]"})," Back to dashboard"]})})}):(0,r.jsx)("div",{className:"dd-stagger flex flex-col gap-3",children:e.map((e,c)=>(0,r.jsx)(y.Zp,{pad:"none",className:"border-destructive/30",style:{animationDelay:`${60*c}ms`},children:(0,r.jsxs)("div",{className:"flex flex-wrap items-start gap-3 p-4",children:[(0,r.jsx)("span",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-destructive/10 text-destructive",children:(0,r.jsx)(a.A,{className:"h-[17px] w-[17px]"})}),(0,r.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,r.jsxs)(o(),{href:`/jobs/${e.id}`,className:"flex flex-wrap items-center gap-2 text-left focus-ring rounded",children:[(0,r.jsxs)("span",{className:"font-mono text-xs text-muted-foreground",children:[e.repoName," #",e.issueNumber]}),(0,r.jsx)(p.E,{tone:"destructive",children:"needs human"}),(0,r.jsxs)("span",{className:"text-xs text-muted-foreground",children:["\xb7 ",e.attempts," attempts \xb7 ",(0,r.jsx)(b.s,{ts:e.parkedAt})]})]}),(0,r.jsx)("p",{className:"mt-1 text-sm text-muted-foreground text-pretty",children:e.errorMessage??"No error message recorded."})]}),(0,r.jsxs)("div",{className:"flex shrink-0 gap-2",children:[(0,r.jsxs)(f.$,{variant:"outline",size:"sm",onClick:()=>t.push(`/jobs/${e.id}`),children:[(0,r.jsx)(i.A,{className:"h-3.5 w-3.5"})," Log"]}),(0,r.jsxs)(f.$,{variant:"outline",size:"sm",disabled:u===e.id,onClick:()=>{N(e.id),s(async()=>{try{await k(e.id),R("Job requeued",`${e.repoName} #${e.issueNumber}`),t.refresh()}catch(e){$("Failed to requeue job",e instanceof Error?e.message:String(e))}finally{N(null)}})},children:[(0,r.jsx)(l.A,{className:"h-3.5 w-3.5"})," Requeue"]}),(0,r.jsxs)(f.$,{variant:"destructive",size:"sm",disabled:u===e.id,onClick:()=>M(e),children:[(0,r.jsx)(d,{className:"h-3.5 w-3.5"})," Abort"]})]})]})},e.id))}),(0,r.jsx)(g.T,{open:null!==S,onOpenChange:e=>!e&&M(null),onConfirm:()=>S&&void(N(S.id),s(async()=>{try{await (0,w.A)(S.id),R("Job aborted",`${S.repoName} #${S.issueNumber}`),t.refresh()}catch(e){$("Failed to abort job",e instanceof Error?e.message:String(e))}finally{N(null)}})),title:"Abort job?",description:S?`This permanently aborts ${S.repoName} #${S.issueNumber}.`:void 0,confirmLabel:"Abort",variant:"destructive",icon:d,pending:null!==u})]})}},4877:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(1330).A)("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]])},5097:(e,t,s)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={callServer:function(){return c.callServer},createServerReference:function(){return i.createServerReference},findSourceMapURL:function(){return n.findSourceMapURL}};for(var a in r)Object.defineProperty(t,a,{enumerable:!0,get:r[a]});let c=s(2258),n=s(7886),i=s(349)},5378:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(1330).A)("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},5497:(e,t,s)=>{"use strict";s.d(t,{A:()=>a});var r=s(5097);let a=(0,r.createServerReference)("403fc9b2867e1f720d4d1326cb1ea3c5c67b2fad36",r.callServer,void 0,r.findSourceMapURL,"abortJobAction")},6003:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(1330).A)("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]])},6512:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(1330).A)("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]])},6819:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(1330).A)("scroll-text",[["path",{d:"M15 12h-5",key:"r7krc0"}],["path",{d:"M15 8h-5",key:"1khuty"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]])},8131:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(1330).A)("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]])},9199:(e,t,s)=>{"use strict";s.d(t,{z:()=>d});var r=s(515),a=s(9662),c=s(742),n=s.n(c),i=s(1171),l=s(5832);function d({title:e,subtitle:t,breadcrumb:s,actions:c,icon:u,className:o}){return(0,r.jsxs)("div",{className:(0,l.cn)("mb-6 flex flex-wrap items-end justify-between gap-4",o),children:[(0,r.jsxs)("div",{className:"min-w-0",children:[s&&s.length>0&&(0,r.jsx)("nav",{className:"mb-1.5 flex items-center gap-1.5 text-xs text-muted-foreground",children:s.map((e,t)=>(0,r.jsxs)(i.Fragment,{children:[t>0&&(0,r.jsx)(a.A,{className:"h-3 w-3 opacity-60","aria-hidden":!0}),e.href?(0,r.jsx)(n(),{href:e.href,className:"rounded transition-colors hover:text-foreground focus-ring",children:e.label}):(0,r.jsx)("span",{className:"text-foreground/80",children:e.label})]},e.href??e.label))}),(0,r.jsxs)("div",{className:"flex items-center gap-2.5",children:[u&&(0,r.jsx)("span",{className:"flex h-8 w-8 items-center justify-center rounded-lg bg-secondary text-muted-foreground",children:(0,r.jsx)(u,{className:"h-[17px] w-[17px]"})}),(0,r.jsx)("h1",{className:"text-pretty text-2xl font-bold tracking-tight",children:e})]}),t&&(0,r.jsx)("p",{className:"mt-1 text-sm text-muted-foreground",children:t})]}),c&&(0,r.jsx)("div",{className:"flex items-center gap-2",children:c})]})}},9214:(e,t,s)=>{"use strict";s.d(t,{p:()=>n});var r=s(515),a=s(5832);let c={neutral:"bg-secondary text-muted-foreground",primary:"bg-primary/10 text-primary",success:"bg-success-muted text-success",warning:"bg-warning-muted text-warning",destructive:"bg-destructive/10 text-destructive"};function n({icon:e,tone:t="neutral",title:s,description:i,action:l,secondary:d,className:u,compact:o}){return(0,r.jsxs)("div",{className:(0,a.cn)("flex flex-col items-center justify-center text-center",o?"py-10":"py-16",u),children:[e&&(0,r.jsx)("div",{className:(0,a.cn)("flex items-center justify-center rounded-2xl",o?"h-12 w-12":"h-16 w-16",c[t]),children:(0,r.jsx)(e,{className:o?"h-[22px] w-[22px]":"h-7 w-7"})}),(0,r.jsx)("h3",{className:"mt-4 text-base font-semibold",children:s}),i&&(0,r.jsx)("p",{className:"mt-1 max-w-sm text-pretty text-sm text-muted-foreground",children:i}),(l||d)&&(0,r.jsxs)("div",{className:"mt-5 flex items-center gap-2",children:[l,d]})]})}},9339:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(1330).A)("rotate-ccw",[["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"}]])},9662:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(1330).A)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]])}},e=>{e.O(0,[9843,3433,9655,4234,7358],()=>e(e.s=2457)),_N_E=e.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8974],{296:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(1330).A)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]])},739:(e,t,s)=>{"use strict";s.d(t,{s:()=>l});var r=s(515),a=s(6845),n=s(5832);function l({ts:e,className:t}){let s=(0,a.p)();return(0,r.jsx)("span",{className:t,children:s?(0,n.KW)(e):"…"})}},1104:(e,t,s)=>{Promise.resolve().then(s.bind(s,5742))},1837:(e,t,s)=>{"use strict";s.d(t,{L6:()=>r,UB:()=>a,VJ:()=>l,tT:()=>n});let r=[{id:"claude-opus-4-8",label:"Claude Opus 4.8",agent:"claude"},{id:"claude-fable-5",label:"Claude Fable 5",agent:"claude"},{id:"claude-opus-4-7",label:"Claude Opus 4.7",agent:"claude"},{id:"claude-sonnet-4-6",label:"Claude Sonnet 4.6",agent:"claude"},{id:"claude-sonnet-4-5",label:"Claude Sonnet 4.5",agent:"claude"},{id:"claude-haiku-4-5",label:"Claude Haiku 4.5",agent:"claude"},{id:"gpt-5-codex",label:"GPT-5 Codex",agent:"codex"},{id:"gpt-5",label:"GPT-5",agent:"codex"},{id:"gpt-5-mini",label:"GPT-5 Mini",agent:"codex"}],a="claude-opus-4-8";function n(e){return r.filter(t=>t.agent===e)}function l(e){return"openrouter"===e?"":n(e)[0]?.id??a}},2718:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(1330).A)("inbox",[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]])},2836:(e,t,s)=>{"use strict";s.d(t,{Sparkline:()=>l});var r=s(515),a=s(1171),n=s(4497);function l({data:e,width:t=132,height:s=36,tone:i="chart-1",fill:d=!0,strokeWidth:c=1.75,average:o=!1}){let u=`sp${(0,a.useId)().replace(/:/g,"")}`;if(0===e.length)return null;let x=Math.min(...e),h=Math.max(...e)-x||1,m=e.length>1?t/(e.length-1):t,p=e.map((e,t)=>[t*m,s-3-(e-x)/h*(s-6)]),g=p.map((e,t)=>`${t?"L":"M"}${e[0].toFixed(1)} ${e[1].toFixed(1)}`).join(" "),f=`${g} L${t} ${s} L0 ${s} Z`,j=(0,n.U)(i),b=p[p.length-1]??[0,s-3],v=s-3-(e.reduce((e,t)=>e+t,0)/e.length-x)/h*(s-6);return(0,r.jsxs)("svg",{width:t,height:s,viewBox:`0 0 ${t} ${s}`,className:"overflow-visible","aria-hidden":"true",children:[d&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("defs",{children:(0,r.jsxs)("linearGradient",{id:u,x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,r.jsx)("stop",{offset:"0%",stopColor:j,stopOpacity:"0.22"}),(0,r.jsx)("stop",{offset:"100%",stopColor:j,stopOpacity:"0"})]})}),(0,r.jsx)("path",{d:f,fill:`url(#${u})`})]}),o&&e.length>1&&(0,r.jsx)("line",{x1:0,x2:t,y1:v,y2:v,stroke:"hsl(var(--muted-foreground) / 0.45)",strokeWidth:1,strokeDasharray:"3 3"}),(0,r.jsx)("path",{d:g,fill:"none",stroke:j,strokeWidth:c,strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("circle",{cx:b[0],cy:b[1],r:2.5,fill:j})]})}},3798:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(1330).A)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]])},4266:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(1330).A)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]])},4276:(e,t,s)=>{"use strict";s.d(t,{h:()=>d});var r=s(515),a=s(6512),n=s(5832),l=s(5172);let i={neutral:{chip:"bg-secondary text-muted-foreground",val:"text-foreground",bg:""},primary:{chip:"bg-primary/15 text-primary",val:"text-primary",bg:"bg-primary/[0.04]"},success:{chip:"bg-success-muted text-success",val:"text-success",bg:"bg-success/[0.05]"},warning:{chip:"bg-warning-muted text-warning",val:"text-warning",bg:"bg-warning/[0.05]"},destructive:{chip:"bg-destructive/15 text-destructive",val:"text-destructive",bg:"bg-destructive/[0.05]"}};function d({icon:e,label:t,value:s,sub:c,tone:o="neutral",active:u,onClick:x,hint:h}){let m=!!u&&"neutral"!==o,p=i[o],g=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsx)("span",{className:(0,n.cn)("flex h-8 w-8 items-center justify-center rounded-lg transition-colors",m?p.chip:"bg-secondary text-muted-foreground"),children:e&&(0,r.jsx)(e,{className:"h-4 w-4"})}),h&&(0,r.jsx)("span",{className:"text-muted-foreground/60",children:(0,r.jsx)(l.m,{content:h,children:(0,r.jsx)(a.A,{className:"h-3.5 w-3.5"})})})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:(0,n.cn)("text-2xl font-semibold tnum tracking-tight",m?p.val:"text-foreground"),children:s}),(0,r.jsx)("div",{className:"mt-0.5 text-[13px] font-medium text-muted-foreground",children:t}),c&&(0,r.jsx)("div",{className:"mt-0.5 text-xs text-muted-foreground/80",children:c})]})]}),f=(0,n.cn)("group relative flex flex-col gap-3 rounded-xl border border-card-border bg-card p-4 text-left shadow-sm transition-colors",m&&p.bg,x&&"hover-elevate focus-ring");return x?(0,r.jsx)("button",{type:"button",onClick:x,className:f,children:g}):(0,r.jsx)("div",{className:f,children:g})}},4393:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(1330).A)("circle-question-mark",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]])},4497:(e,t,s)=>{"use strict";function r(e){return e?`hsl(var(--${e}))`:"hsl(var(--muted-foreground))"}s.d(t,{U:()=>r})},4783:(e,t,s)=>{"use strict";s.d(t,{F:()=>x,W:()=>h});var r=s(515),a=s(6512),n=s(8131),l=s(4877),i=s(5662),d=s(5529),c=s(9214),o=s(5832);let u={info:{cls:"border-primary/30 bg-primary/5 text-foreground",icon:a.A,ic:"text-primary"},success:{cls:"border-success-border bg-success-muted text-foreground",icon:n.A,ic:"text-success"},warning:{cls:"border-warning-border bg-warning-muted text-foreground",icon:l.A,ic:"text-warning"},destructive:{cls:"border-destructive/30 bg-destructive/5 text-foreground",icon:i.A,ic:"text-destructive"}};function x({tone:e="info",title:t,children:s,action:a,icon:n,className:l}){let i=u[e],d=n??i.icon;return(0,r.jsxs)("div",{className:(0,o.cn)("flex gap-3 rounded-xl border p-4",i.cls,l),role:"alert",children:[(0,r.jsx)(d,{className:(0,o.cn)("mt-0.5 h-[18px] w-[18px] shrink-0",i.ic)}),(0,r.jsxs)("div",{className:"min-w-0 flex-1",children:[t&&(0,r.jsx)("p",{className:"text-sm font-semibold",children:t}),s&&(0,r.jsx)("div",{className:"mt-0.5 text-pretty text-sm text-muted-foreground",children:s})]}),a&&(0,r.jsx)("div",{className:"shrink-0",children:a})]})}function h({title:e="Something went wrong",description:t,action:s,className:a}){return(0,r.jsx)(d.Zp,{className:(0,o.cn)("border-destructive/30",a),children:(0,r.jsx)(c.p,{icon:i.A,tone:"destructive",title:e,description:t,action:s})})}},5172:(e,t,s)=>{"use strict";s.d(t,{V:()=>d,m:()=>i});var r=s(515),a=s(4393),n=s(5832);let l={top:"bottom-full left-1/2 -translate-x-1/2 mb-2",bottom:"top-full left-1/2 -translate-x-1/2 mt-2",right:"left-full top-1/2 -translate-y-1/2 ml-2",left:"right-full top-1/2 -translate-y-1/2 mr-2"};function i({content:e,children:t,side:s="top",className:a}){return(0,r.jsxs)("span",{className:"group/tt relative inline-flex",children:[t,(0,r.jsx)("span",{role:"tooltip",className:(0,n.cn)("pointer-events-none absolute z-50 w-max max-w-[260px] rounded-lg border border-border bg-popover px-2.5 py-1.5 text-xs leading-relaxed text-popover-foreground shadow-lg","translate-y-0.5 opacity-0 transition-all duration-150 group-focus-within/tt:opacity-100 group-hover/tt:translate-y-0 group-hover/tt:opacity-100",l[s],a),children:e})]})}function d({content:e,side:t="top"}){return(0,r.jsx)(i,{content:e,side:t,children:(0,r.jsx)("button",{type:"button",className:"inline-flex h-4 w-4 items-center justify-center rounded-full text-muted-foreground/70 transition-colors hover:text-foreground focus-ring","aria-label":"Help",children:(0,r.jsx)(a.A,{className:"h-3.5 w-3.5"})})})}},5662:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(1330).A)("octagon-alert",[["path",{d:"M12 16h.01",key:"1drbdi"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M15.312 2a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z",key:"1fd625"}]])},5742:(e,t,s)=>{"use strict";s.d(t,{DashboardLive:()=>er});var r=s(515),a=s(296),n=s(1330);let l=(0,n.A)("folder-git-2",[["path",{d:"M18 19a5 5 0 0 1-5-5v8",key:"sz5oeg"}],["path",{d:"M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v5",key:"1w6njk"}],["circle",{cx:"13",cy:"12",r:"2",key:"1j92g6"}],["circle",{cx:"20",cy:"19",r:"2",key:"1obnsp"}]]);var i=s(6512),d=s(2235),c=s(1171);let o=(0,n.A)("folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);var u=s(5378),x=s(4266),h=s(6644),m=s(395),p=s(7901),g=s(5097);let f=(0,g.createServerReference)("404a78f2971f8deaa5a40c97c4559144db1a759d3d",g.callServer,void 0,g.findSourceMapURL,"browseDirectoryAction");function j({onSelect:e,onClose:t}){let[s,a]=(0,c.useState)(null),[n,i]=(0,c.useTransition)(),d=e=>i(async()=>a(await f(e)));return(0,c.useEffect)(()=>{d()},[]),(0,r.jsx)(p.l,{open:!0,onClose:t,labelledById:"dir-picker-title",children:(0,r.jsxs)("div",{className:"flex max-h-[70vh] flex-col",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between border-b border-card-border pb-3",children:[(0,r.jsxs)("span",{id:"dir-picker-title",className:"flex items-center gap-2 text-base font-semibold tracking-tight",children:[(0,r.jsx)("span",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-primary/10 text-primary",children:(0,r.jsx)(o,{className:"h-[18px] w-[18px]"})}),"Choose a folder"]}),(0,r.jsx)(m.$,{size:"icon-sm",variant:"ghost","aria-label":"Close",onClick:t,children:(0,r.jsx)(u.A,{})})]}),(0,r.jsxs)("div",{className:"border-b border-card-border py-3",children:[(0,r.jsx)("p",{className:"truncate font-mono text-xs text-muted-foreground",title:s?.path,children:s?.path??"…"}),s?.isGitRepo&&(0,r.jsxs)(h.E,{tone:"success",className:"mt-1.5",children:[(0,r.jsx)(l,{className:"h-3 w-3"}),"git repo"]})]}),(0,r.jsxs)("div",{className:"scrollbar-none min-h-0 flex-1 overflow-auto py-2",children:[s?.parent&&(0,r.jsxs)("button",{type:"button",disabled:n,onClick:()=>d(s.parent??void 0),className:"flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-left text-sm hover-elevate disabled:opacity-50",children:[(0,r.jsx)(o,{className:"h-4 w-4 text-muted-foreground"}),".."]}),s?.entries.map(e=>(0,r.jsxs)("button",{type:"button",disabled:n,onClick:()=>d(e.path),className:"flex w-full items-center justify-between gap-2 rounded-md px-2 py-1.5 text-left text-sm hover-elevate disabled:opacity-50",children:[(0,r.jsxs)("span",{className:"flex min-w-0 items-center gap-2",children:[e.isGitRepo?(0,r.jsx)(l,{className:"h-4 w-4 shrink-0 text-primary"}):(0,r.jsx)(o,{className:"h-4 w-4 shrink-0 text-muted-foreground"}),(0,r.jsx)("span",{className:"truncate",children:e.name})]}),e.isGitRepo&&(0,r.jsx)(h.E,{tone:"success",children:"git"})]},e.path)),s&&0===s.entries.length&&(0,r.jsx)("p",{className:"px-2 py-1.5 text-xs text-muted-foreground",children:"No subfolders."})]}),(0,r.jsxs)("div",{className:"flex items-center justify-end gap-2 border-t border-card-border pt-3",children:[(0,r.jsx)(m.$,{variant:"outline",size:"sm",onClick:t,children:"Cancel"}),(0,r.jsxs)(m.$,{size:"sm",disabled:!s||n,onClick:()=>s&&e(s.path),children:[(0,r.jsx)(x.A,{}),"Use this folder"]})]})]})})}var b=s(8067);let v={github:{id:"github",label:"GitHub",needsConnection:!1},gitlab:{id:"gitlab",label:"GitLab",needsConnection:!0}},y=["github","gitlab"].map(e=>v[e]);function N({value:e,onChange:t,id:s,className:a}){return(0,r.jsx)(b.l,{id:s,value:e,onChange:e=>t(e.target.value),className:a,children:y.map(e=>(0,r.jsx)("option",{value:e.id,children:e.label},e.id))})}var w=s(9754),k=s(5529),A=s(7217),C=s(7405),$=s(1837);let S=(0,g.createServerReference)("40ff46484b8d0230f28e7853cff3b0037220bc4029",g.callServer,void 0,g.findSourceMapURL,"detectDefaultBranchAction"),M=(0,g.createServerReference)("40fd63aacb5de1dd97754363caf4af17282a4ba203",g.callServer,void 0,g.findSourceMapURL,"addRepoAction");function R({onDone:e}){let[t,s]=(0,c.useTransition)(),[n,i]=(0,c.useState)(""),[d,o]=(0,c.useState)(""),[u,x]=(0,c.useState)($.UB),[h,p]=(0,c.useState)("github"),[g,f]=(0,c.useState)(""),[b,v]=(0,c.useState)(""),[y,F]=(0,c.useState)(""),E=(0,c.useRef)(!1),L=(0,c.useRef)(0),[D,T]=(0,c.useState)(!1);function U(e){let t=e.trim();if(E.current||!t)return;let r=++L.current;s(async()=>{let e=await S(t);E.current||r!==L.current||F(e)})}return(0,r.jsxs)(k.Zp,{className:"dd-fade-up p-5",children:[(0,r.jsxs)("form",{className:"grid gap-4 sm:grid-cols-2",action:()=>{s(async()=>{await M({path:d,name:n,defaultModel:u,platform:h,defaultBranch:y.trim()||void 0,apiBaseUrl:"gitlab"===h&&g.trim()||null,apiToken:"gitlab"===h&&b.trim()||null}),e()})},children:[(0,r.jsx)(A.D,{label:"Name",htmlFor:"repo-name",children:(0,r.jsx)(C.p,{id:"repo-name",value:n,onChange:e=>i(e.target.value),placeholder:"my-project",required:!0})}),(0,r.jsx)(A.D,{label:"Local path",htmlFor:"repo-path",hint:"Drydock watches this working copy and runs the agent in an isolated worktree.",children:(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsxs)("div",{className:"relative flex-1",children:[(0,r.jsx)(l,{className:"pointer-events-none absolute left-3 top-1/2 h-[15px] w-[15px] -translate-y-1/2 text-muted-foreground"}),(0,r.jsx)(C.p,{id:"repo-path",value:d,onChange:e=>o(e.target.value),onBlur:e=>U(e.target.value),placeholder:"/abs/path/to/repo",required:!0,className:"pl-9 font-mono"})]}),(0,r.jsx)(m.$,{type:"button",variant:"outline",size:"sm",onClick:()=>T(!0),children:"Browse…"})]})}),(0,r.jsx)(A.D,{label:"Default model",htmlFor:"repo-model",children:(0,r.jsx)(w.o,{id:"repo-model",value:u,onChange:x})}),(0,r.jsx)(A.D,{label:"Forge",htmlFor:"repo-platform",children:(0,r.jsx)(N,{id:"repo-platform",value:h,onChange:p})}),(0,r.jsx)(A.D,{label:"Default branch",htmlFor:"repo-default-branch",hint:"Auto-detected from the clone; the base for worktrees and PRs.",children:(0,r.jsx)(C.p,{id:"repo-default-branch",value:y,onChange:e=>{E.current=!0,F(e.target.value)},placeholder:"main",className:"font-mono"})}),"gitlab"===h&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(A.D,{label:"API base URL",htmlFor:"repo-api-url",className:"sm:col-span-2",children:(0,r.jsx)(C.p,{id:"repo-api-url",value:g,onChange:e=>f(e.target.value),placeholder:"https://gitlab.com"})}),(0,r.jsx)(A.D,{label:"Access token",htmlFor:"repo-api-token",hint:"Stored locally on this machine.",className:"sm:col-span-2",children:(0,r.jsx)(C.p,{id:"repo-api-token",value:b,onChange:e=>v(e.target.value),type:"password",placeholder:"Access token"})})]}),(0,r.jsxs)("div",{className:"flex items-center gap-2 sm:col-span-2",children:[(0,r.jsxs)(m.$,{type:"submit",disabled:t||!d,children:[(0,r.jsx)(a.A,{className:"h-[15px] w-[15px]"})," Add repository"]}),(0,r.jsx)(m.$,{type:"button",variant:"ghost",onClick:e,children:"Cancel"})]})]}),D&&(0,r.jsx)(j,{onClose:()=>T(!1),onSelect:e=>{o(e),n.trim()||i(e.replace(/\/+$/,"").split("/").pop()??""),U(e),T(!1)}})]})}var F=s(4913),E=s(9583),L=s(2718);let D=(0,n.A)("loader",[["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m16.2 7.8 2.9-2.9",key:"r700ao"}],["path",{d:"M18 12h4",key:"wj9ykh"}],["path",{d:"m16.2 16.2 2.9 2.9",key:"1bxg5t"}],["path",{d:"M12 18v4",key:"jadmvz"}],["path",{d:"m4.9 19.1 2.9-2.9",key:"bwix9q"}],["path",{d:"M2 12h4",key:"j09sii"}],["path",{d:"m4.9 4.9 2.9 2.9",key:"giyufr"}]]),T=(0,n.A)("git-merge",[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M6 21V9a9 9 0 0 0 9 9",key:"7kw0sc"}]]);var U=s(4877),H=s(2414),z=s(4276),q=s(5832);function B({summary:e}){let t=(0,d.useRouter)();return(0,r.jsxs)("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-3 lg:grid-cols-6",children:[(0,r.jsx)(z.h,{icon:l,label:"Repositories",value:e.repos}),(0,r.jsx)(z.h,{icon:L.A,label:"Queued",value:e.queued,tone:"primary",active:e.queued>0}),(0,r.jsx)(z.h,{icon:D,label:"Running",value:e.running,tone:"primary",active:e.running>0}),(0,r.jsx)(z.h,{icon:T,label:"Merged",value:e.merged,tone:"success",active:!0}),(0,r.jsx)(z.h,{icon:U.A,label:"Needs human",value:e.needsHuman,tone:"destructive",active:e.needsHuman>0,onClick:()=>t.push("/needs-human"),hint:"Jobs that hit a guardrail and paused for review."}),(0,r.jsx)(z.h,{icon:H.A,label:"Spend today",value:(0,q.UK)(e.spendToday),tone:"primary",active:!0,sub:"across all repos"})]})}var G=s(9199);let O=(0,n.A)("clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]),I=(0,n.A)("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);var V=s(742),P=s.n(V),Z=s(9694),_=s(739),W=s(8479);let K=(0,g.createServerReference)("40fcc887f9ff7ac5868aa79ea734267acaafdf2939",g.callServer,void 0,g.findSourceMapURL,"removeRepoAction");function J({repo:e}){let[t,s]=(0,c.useTransition)(),[a,n]=(0,c.useState)(!1),{success:i,error:d}=(0,W.d)(),o=e.working+e.ciRunning>0;return(0,r.jsxs)(k.Zp,{hover:!0,className:(0,q.cn)("flex flex-col gap-3 p-4",e.attention&&"border-destructive/40 bg-destructive/[0.04]"),children:[(0,r.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,r.jsxs)(P(),{href:`/repos/${e.id}`,className:"group flex min-w-0 items-center gap-2 rounded-md text-left focus-ring",children:[(0,r.jsx)("span",{className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-md bg-secondary text-muted-foreground",children:(0,r.jsx)(l,{className:"h-[15px] w-[15px]"})}),(0,r.jsxs)("span",{className:"min-w-0",children:[(0,r.jsx)("span",{className:"block truncate font-mono text-sm font-semibold group-hover:underline",children:e.name}),(0,r.jsx)("span",{className:"block truncate text-xs text-muted-foreground",children:e.path})]})]}),e.attention?(0,r.jsxs)(h.E,{tone:"destructive",className:"shrink-0",children:[(0,r.jsx)(U.A,{className:"h-[11px] w-[11px]"})," Needs human"]}):o?(0,r.jsx)(h.E,{status:"working",className:"shrink-0",children:"Active"}):(0,r.jsx)(h.E,{tone:"neutral",className:"shrink-0",children:"Idle"})]}),(0,r.jsxs)("div",{className:"flex flex-wrap gap-1.5",children:["gitlab"===e.platform&&(0,r.jsx)(h.E,{tone:"primary",children:"GitLab"}),(0,r.jsxs)(h.E,{tone:"neutral",children:[e.queued," queued"]}),e.working>0?(0,r.jsxs)(h.E,{status:"working",children:[e.working," working"]}):(0,r.jsx)(h.E,{tone:"neutral",children:"0 working"}),e.ciRunning>0?(0,r.jsxs)(h.E,{status:"ci_running",children:[e.ciRunning," CI"]}):(0,r.jsx)(h.E,{tone:"neutral",children:"0 CI"}),e.needsHuman>0&&(0,r.jsxs)(h.E,{tone:"destructive",children:[e.needsHuman," needs human"]})]}),e.inFlight.length>0&&(0,r.jsx)("ul",{className:"flex flex-col gap-1 border-t border-card-border pt-2.5 text-xs",children:e.inFlight.slice(0,3).map(e=>(0,r.jsxs)("li",{className:"flex items-center gap-2",children:[(0,r.jsx)(h.E,{status:e.status,className:"shrink-0 px-1.5 py-0"}),(0,r.jsx)(P(),{href:`/jobs/${e.id}`,className:"truncate text-muted-foreground transition-colors hover:text-foreground",children:(0,r.jsxs)("span",{className:"font-mono text-foreground/80",children:["#",e.issueNumber]})})]},e.id))}),(0,r.jsxs)("div",{className:"mt-auto flex items-center justify-between border-t border-card-border pt-2.5 text-xs text-muted-foreground",children:[(0,r.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[(0,r.jsx)(H.A,{className:"h-3 w-3"}),(0,r.jsx)("span",{className:"tnum text-foreground/90",children:(0,q.UK)(e.todaySpend)})," today"]}),(0,r.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[(0,r.jsx)(O,{className:"h-3 w-3"}),(0,r.jsx)(_.s,{ts:e.lastActivityAt})]})]}),(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)(P(),{href:`/repos/${e.id}`,children:(0,r.jsx)(m.$,{size:"sm",children:"Open workspace"})}),(0,r.jsx)(m.$,{size:"sm",variant:"ghost",disabled:t,onClick:()=>n(!0),"aria-label":"Remove repository",children:(0,r.jsx)(I,{className:"h-3.5 w-3.5"})})]}),(0,r.jsx)(Z.T,{open:a,onOpenChange:n,onConfirm:function(){s(async()=>{try{await K(e.id),i("Repository removed",e.name)}catch(e){d("Failed to remove repository",e instanceof Error?e.message:String(e))}})},title:"Remove repository?",description:`This stops watching ${e.name} and deletes its local job history. Repos with active jobs cannot be removed — abort or finish them first.`,confirmLabel:"Remove",variant:"destructive",pending:t})]})}var Q=s(4783),X=s(4497);function Y({value:e,limit:t,size:s=132,label:a="Spend today"}){let n=t>0?Math.min(e/t,1):0,l=t>0&&e>=t,i=(0,X.U)(l||n>=.95?"destructive":n>=.8?"warning":"primary"),d=(s-18)/2,c=2*Math.PI*d,o=.75*c,u=s/2;return(0,r.jsxs)("div",{className:"flex flex-col items-center",children:[(0,r.jsxs)("div",{className:"relative",style:{width:s,height:.82*s},children:[(0,r.jsxs)("svg",{width:s,height:s,viewBox:`0 0 ${s} ${s}`,style:{transform:"rotate(135deg)"},role:"img","aria-label":`${a}: $${e.toFixed(2)} of $${t.toFixed(0)} limit`,children:[(0,r.jsx)("circle",{cx:u,cy:u,r:d,fill:"none",stroke:"hsl(var(--secondary))",strokeWidth:9,strokeDasharray:`${o} ${c}`,strokeLinecap:"round"}),(0,r.jsx)("circle",{cx:u,cy:u,r:d,fill:"none",stroke:i,strokeWidth:9,strokeDasharray:`${o*n} ${c}`,strokeLinecap:"round"})]}),(0,r.jsxs)("div",{className:"absolute inset-0 flex flex-col items-center justify-center pb-1",children:[(0,r.jsxs)("span",{className:"tnum text-[26px] font-semibold leading-none",style:{color:i},children:["$",e.toFixed(2)]}),(0,r.jsxs)("span",{className:"mt-1 text-xs text-muted-foreground tnum",children:["of $",t.toFixed(0)," limit"]})]})]}),(0,r.jsx)("div",{className:"mt-1 flex items-center gap-1.5 text-xs",children:l?(0,r.jsx)(h.E,{tone:"destructive",children:"Limit reached"}):n>=.8?(0,r.jsxs)(h.E,{tone:"warning",children:[Math.round(100*n),"% used"]}):(0,r.jsxs)("span",{className:"text-muted-foreground",children:[a,t>0&&(0,r.jsxs)(r.Fragment,{children:[" \xb7 ",Math.round(100*n),"% of budget"]})]})})]})}var ee=s(9214),et=s(2836),es=s(5172);function er({initial:e,spend7d:t}){let s=(0,d.useRouter)(),[n,o]=(0,c.useState)(e),[u,x]=(0,c.useState)(!1);(0,c.useEffect)(()=>{let e=new EventSource("/api/sse/dashboard");return e.addEventListener("snapshot",e=>{try{o(JSON.parse(e.data))}catch{}}),()=>e.close()},[]);let{repos:h,summary:p}=n,g=0===h.length,f=Math.max(h.reduce((e,t)=>e+(t.dailyLimitUsd??10),0),p.spendToday,10),j=t&&t.length>0?[...t.slice(0,-1),p.spendToday]:[p.spendToday];return(0,r.jsxs)("div",{className:"dd-fade-up",children:[(0,r.jsx)(G.z,{title:"Dashboard",subtitle:"Every watched repository, its in-flight work, and today's spend — live.",actions:(0,r.jsx)(m.$,{onClick:()=>x(e=>!e),children:u?"Cancel":(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(a.A,{className:"h-[15px] w-[15px]"})," Add repo"]})})}),(0,r.jsx)(B,{summary:p}),(0,r.jsxs)("div",{className:"mt-6 grid gap-6 lg:grid-cols-3",children:[(0,r.jsxs)("div",{className:"lg:col-span-2",children:[(0,r.jsx)("div",{className:"mb-3 flex items-center justify-between",children:(0,r.jsxs)("h2",{className:"text-base font-semibold",children:["Repositories"," ",(0,r.jsxs)("span",{className:"font-normal text-muted-foreground",children:["(",h.length,")"]})]})}),u&&(0,r.jsx)("div",{className:"mb-3",children:(0,r.jsx)(R,{onDone:()=>x(!1)})}),g&&!u?(0,r.jsx)(k.Zp,{children:(0,r.jsx)(ee.p,{icon:l,tone:"primary",title:"No repositories yet",description:"Add a local repository and Drydock will start turning its labelled issues into pull requests.",action:(0,r.jsxs)(m.$,{onClick:()=>x(!0),children:[(0,r.jsx)(a.A,{className:"h-[15px] w-[15px]"})," Add your first repo"]})})}):(0,r.jsx)("div",{className:"dd-stagger grid gap-3 sm:grid-cols-2",children:h.map((e,t)=>(0,r.jsx)("div",{style:{animationDelay:`${50*t}ms`},children:(0,r.jsx)(J,{repo:e})},e.id))})]}),(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsxs)(k.Zp,{pad:"lg",children:[(0,r.jsxs)("div",{className:"mb-1 flex items-center justify-between",children:[(0,r.jsx)("h3",{className:"text-base font-semibold",children:"Daily budget"}),(0,r.jsx)(es.m,{content:"Combined spend today against the sum of per-repo daily limits. Turns amber at 80%, red near the cap.",children:(0,r.jsx)(i.A,{className:"h-3.5 w-3.5 text-muted-foreground"})})]}),(0,r.jsx)("div",{className:"mt-2 flex justify-center",children:(0,r.jsx)(Y,{value:p.spendToday,limit:f})}),(0,r.jsxs)("div",{className:"mt-4 border-t border-card-border pt-3",children:[(0,r.jsxs)("div",{className:"mb-2 flex items-center justify-between text-xs text-muted-foreground",children:[(0,r.jsx)("span",{children:"Spend \xb7 last 7 days"}),(0,r.jsxs)("span",{className:"tnum text-foreground/80",children:[(0,q.UK)(p.spendToday)," today"]})]}),(0,r.jsx)(et.Sparkline,{data:j,width:300,height:44,tone:"chart-1",average:!0})]})]}),(0,r.jsx)(F.C,{view:n.claudeUsage}),(0,r.jsx)(E.L,{view:n.codexUsage}),p.needsHuman>0?(0,r.jsx)(Q.F,{tone:"destructive",title:`${p.needsHuman} ${1===p.needsHuman?"job needs":"jobs need"} a human`,action:(0,r.jsx)(m.$,{size:"sm",variant:"outline",onClick:()=>s.push("/needs-human"),children:"Review"}),children:"A guardrail paused work before anything risky was written."}):(0,r.jsx)(Q.F,{tone:"success",title:"All clear",children:"No jobs are waiting on a human right now."})]})]})]})}},7217:(e,t,s)=>{"use strict";s.d(t,{D:()=>l});var r=s(515),a=s(5832);function n({htmlFor:e,className:t,children:s}){return(0,r.jsx)("label",{htmlFor:e,className:(0,a.cn)("text-sm font-medium text-foreground",t),children:s})}function l({label:e,hint:t,htmlFor:s,children:i,className:d}){return(0,r.jsxs)("div",{className:(0,a.cn)("flex flex-col gap-1.5",d),children:[e&&(0,r.jsx)(n,{htmlFor:s,children:e}),i,t&&(0,r.jsx)("p",{className:"text-xs leading-relaxed text-muted-foreground",children:t})]})}},7405:(e,t,s)=>{"use strict";s.d(t,{p:()=>l});var r=s(515),a=s(1171),n=s(5832);let l=a.forwardRef(({className:e,...t},s)=>(0,r.jsx)("input",{ref:s,className:(0,n.cn)("h-9 w-full rounded-lg border border-input bg-background px-3 text-sm text-foreground","placeholder:text-muted-foreground transition focus-ring","disabled:cursor-not-allowed disabled:opacity-50",e),...t}));l.displayName="Input"},8067:(e,t,s)=>{"use strict";s.d(t,{l:()=>i});var r=s(515),a=s(3798),n=s(1171),l=s(5832);let i=n.forwardRef(({className:e,children:t,...s},n)=>(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)("select",{ref:n,className:(0,l.cn)("h-9 w-full appearance-none cursor-pointer rounded-lg border border-input bg-background pl-3 pr-9 text-sm text-foreground","transition focus-ring","disabled:cursor-not-allowed disabled:opacity-50",e),...s,children:t}),(0,r.jsx)(a.A,{className:"pointer-events-none absolute right-2.5 top-1/2 h-[15px] w-[15px] -translate-y-1/2 text-muted-foreground"})]}));i.displayName="Select"},9199:(e,t,s)=>{"use strict";s.d(t,{z:()=>c});var r=s(515),a=s(9662),n=s(742),l=s.n(n),i=s(1171),d=s(5832);function c({title:e,subtitle:t,breadcrumb:s,actions:n,icon:o,className:u}){return(0,r.jsxs)("div",{className:(0,d.cn)("mb-6 flex flex-wrap items-end justify-between gap-4",u),children:[(0,r.jsxs)("div",{className:"min-w-0",children:[s&&s.length>0&&(0,r.jsx)("nav",{className:"mb-1.5 flex items-center gap-1.5 text-xs text-muted-foreground",children:s.map((e,t)=>(0,r.jsxs)(i.Fragment,{children:[t>0&&(0,r.jsx)(a.A,{className:"h-3 w-3 opacity-60","aria-hidden":!0}),e.href?(0,r.jsx)(l(),{href:e.href,className:"rounded transition-colors hover:text-foreground focus-ring",children:e.label}):(0,r.jsx)("span",{className:"text-foreground/80",children:e.label})]},e.href??e.label))}),(0,r.jsxs)("div",{className:"flex items-center gap-2.5",children:[o&&(0,r.jsx)("span",{className:"flex h-8 w-8 items-center justify-center rounded-lg bg-secondary text-muted-foreground",children:(0,r.jsx)(o,{className:"h-[17px] w-[17px]"})}),(0,r.jsx)("h1",{className:"text-pretty text-2xl font-bold tracking-tight",children:e})]}),t&&(0,r.jsx)("p",{className:"mt-1 text-sm text-muted-foreground",children:t})]}),n&&(0,r.jsx)("div",{className:"flex items-center gap-2",children:n})]})}},9214:(e,t,s)=>{"use strict";s.d(t,{p:()=>l});var r=s(515),a=s(5832);let n={neutral:"bg-secondary text-muted-foreground",primary:"bg-primary/10 text-primary",success:"bg-success-muted text-success",warning:"bg-warning-muted text-warning",destructive:"bg-destructive/10 text-destructive"};function l({icon:e,tone:t="neutral",title:s,description:i,action:d,secondary:c,className:o,compact:u}){return(0,r.jsxs)("div",{className:(0,a.cn)("flex flex-col items-center justify-center text-center",u?"py-10":"py-16",o),children:[e&&(0,r.jsx)("div",{className:(0,a.cn)("flex items-center justify-center rounded-2xl",u?"h-12 w-12":"h-16 w-16",n[t]),children:(0,r.jsx)(e,{className:u?"h-[22px] w-[22px]":"h-7 w-7"})}),(0,r.jsx)("h3",{className:"mt-4 text-base font-semibold",children:s}),i&&(0,r.jsx)("p",{className:"mt-1 max-w-sm text-pretty text-sm text-muted-foreground",children:i}),(d||c)&&(0,r.jsxs)("div",{className:"mt-5 flex items-center gap-2",children:[d,c]})]})}},9662:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(1330).A)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]])},9754:(e,t,s)=>{"use strict";s.d(t,{o:()=>l});var r=s(515),a=s(8067),n=s(1837);function l({value:e,onChange:t,agent:s,openrouterModels:i=[],id:d,className:c}){if("openrouter"===s)return(0,r.jsxs)(a.l,{id:d,value:e,onChange:e=>t(e.target.value),className:c,children:[0===i.length&&(0,r.jsx)("option",{value:"",disabled:!0,children:"No synced models — refresh the catalog in Settings"}),i.length>0&&""!==e&&!i.some(t=>t.id===e)&&(0,r.jsxs)("option",{value:e,disabled:!0,children:[e," (no longer in catalog)"]}),i.map(e=>(0,r.jsx)("option",{value:e.id,children:e.isFree?`${e.label} (free)`:e.label},e.id))]});let o=s?(0,n.tT)(s):n.L6;return(0,r.jsx)(a.l,{id:d,value:e,onChange:e=>t(e.target.value),className:c,children:o.map(e=>(0,r.jsx)("option",{value:e.id,children:e.label},e.id))})}}},e=>{e.O(0,[9843,1642,3433,7690,9655,4234,7358],()=>e(e.s=1104)),_N_E=e.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[942],{395:(e,t,r)=>{"use strict";r.d(t,{$:()=>l});var s=r(515),n=r(1171),a=r(5832);let i={default:"bg-primary text-primary-foreground shadow-sm hover-elevate active-elevate-2",secondary:"bg-secondary text-secondary-foreground hover-elevate active-elevate-2",outline:"border border-border bg-transparent shadow-sm hover-elevate active-elevate-2",destructive:"bg-destructive text-destructive-foreground shadow-sm hover-elevate active-elevate-2",ghost:"border border-transparent hover-elevate active-elevate-2",success:"bg-success text-white shadow-sm hover-elevate active-elevate-2"},o={default:"h-9 px-4 py-2 rounded-lg text-sm",sm:"h-8 px-3 rounded-md text-xs",lg:"h-10 px-6 rounded-lg text-sm",icon:"h-9 w-9 rounded-lg","icon-sm":"h-8 w-8 rounded-md"},l=n.forwardRef(({className:e,variant:t="default",size:r="default",type:n="button",...l},d)=>(0,s.jsx)("button",{ref:d,type:n,className:(0,a.cn)("inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium transition-colors focus-ring","disabled:pointer-events-none disabled:opacity-50","[&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",i[t],o[r],e),...l}));l.displayName="Button"},598:(e,t,r)=>{"use strict";r.d(t,{y:()=>i});var s=r(515),n=r(8108),a=r(5832);function i({size:e=16,className:t}){return(0,s.jsx)(n.A,{width:e,height:e,className:(0,a.cn)("dd-spin",t),"aria-hidden":!0})}},1139:(e,t,r)=>{"use strict";r.d(t,{v:()=>n});var s=r(5097);let n=(0,s.createServerReference)("6030172ec23da9d8d9b85f482f488a3ff5648350ca",s.callServer,void 0,s.findSourceMapURL,"loadTemplateAction")},1417:(e,t,r)=>{"use strict";r.d(t,{PromptEditor:()=>C});var s=r(515),n=r(9919),a=r(3372),i=r(5378),o=r(9339),l=r(4847),d=r(6473),c=r(6106),u=r(1171),m=r(6644),x=r(395),p=r(5529),f=r(9214),v=r(7217),h=r(5897),g=r(8067),b=r(598),j=r(8479),N=r(1139),w=r(5135),y=r(2801);let S=["$ISSUE_NUM","$ISSUE_TITLE","$ISSUE_BODY","$BRANCH","$REPO_NAME","$CI_LOG"];var _=r(5832);let E=[{value:y._.main,label:"Main"},{value:y._.ciFix,label:"CI fix"},{value:y._.plan,label:"Plan"},{value:y._.limitResume,label:"Limit resume"}];function $(e){return new Date(1e3*e).toLocaleString("en-US",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}function C({repos:e,initialContent:t,initialVersions:r}){let[I,A]=(0,u.useState)(t),[U,R]=(0,u.useState)(e[0]?.id??0),[k,M]=(0,u.useState)(y._.main),[D,O]=(0,u.useState)(r),[T,B]=(0,u.useTransition)(),[L,P]=(0,u.useState)(null),[F,z]=(0,u.useState)(null),{success:Z,error:G}=(0,j.d)();function H(e,t){B(async()=>{try{let r=await (0,N.v)(e,t);A(r.content),O(r.versions),P(null),z(null)}catch(e){G("Failed to load template",e instanceof Error?e.message:String(e))}})}let W=function(e,t){let r={$ISSUE_NUM:void 0!==t.ISSUE_NUM?String(t.ISSUE_NUM):"$ISSUE_NUM",$ISSUE_TITLE:t.ISSUE_TITLE??"$ISSUE_TITLE",$ISSUE_BODY:t.ISSUE_BODY??"$ISSUE_BODY",$BRANCH:t.BRANCH??"$BRANCH",$REPO_NAME:t.REPO_NAME??"$REPO_NAME",$CI_LOG:t.CI_LOG??"$CI_LOG"},s=e;for(let e of[...S].sort((e,t)=>t.length-e.length))s=s.split(e).join(r[e]??e);return s}(I,{ISSUE_NUM:42,ISSUE_TITLE:"Example issue title",ISSUE_BODY:"Example issue body with the full context the agent needs.",BRANCH:"fix/issue-42",REPO_NAME:"acme",CI_LOG:"example CI failure output"});return(0,s.jsxs)("div",{className:"grid gap-4 lg:grid-cols-2",children:[(0,s.jsxs)(p.Zp,{pad:"none",children:[(0,s.jsxs)(p.aR,{children:[(0,s.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,s.jsx)(p.ZB,{children:"Editor"}),T&&(0,s.jsx)(b.y,{size:16,className:"text-muted-foreground"})]}),(0,s.jsxs)("p",{className:"text-xs text-muted-foreground",children:["Variables:"," ",(0,s.jsx)("span",{className:"font-mono text-foreground/80",children:S.join(", ")})]})]}),(0,s.jsxs)(p.Wu,{className:"space-y-3 px-5 pb-5",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-end gap-3",children:[(0,s.jsx)(v.D,{label:"Repository",htmlFor:"prompt-repo",className:"min-w-[180px] flex-1",children:(0,s.jsx)(g.l,{id:"prompt-repo","aria-label":"Repository",value:U,onChange:e=>{let t=Number(e.target.value);R(t),H(t,k)},children:e.map(e=>(0,s.jsx)("option",{value:e.id,children:e.name},e.id))})}),(0,s.jsx)(v.D,{label:"Template",children:(0,s.jsx)(h.I,{value:k,onChange:e=>{M(e),H(U,e)},options:E})})]}),F?(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 rounded-lg border border-card-border bg-secondary/50 px-3 py-2 text-xs text-muted-foreground",children:[(0,s.jsx)(a.A,{className:"h-3.5 w-3.5 shrink-0"}),(0,s.jsxs)("span",{children:["Diffing"," ",(0,s.jsxs)("span",{className:"font-medium text-foreground",children:["v",F.version]})," (",$(F.updatedAt),") vs active"]}),(0,s.jsxs)("button",{type:"button",className:"ml-auto inline-flex items-center gap-1 rounded transition-colors hover:text-foreground focus-ring",onClick:()=>z(null),children:[(0,s.jsx)(i.A,{className:"h-3.5 w-3.5"}),"Close diff"]})]}),(0,s.jsx)("div",{className:"h-72 overflow-hidden rounded-lg border border-card-border",children:(0,s.jsx)(n.zC,{language:"markdown",original:F.content,modified:I,options:{minimap:{enabled:!1},fontSize:13,readOnly:!0,renderSideBySide:!0}})}),(0,s.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,s.jsx)(x.$,{variant:"ghost",size:"sm",onClick:()=>z(null),children:"Cancel"}),(0,s.jsxs)(x.$,{disabled:T,variant:"outline",size:"sm",onClick:function(){F&&B(async()=>{try{let e=await (0,w.m)({repoId:U,name:k,content:F.content});P(e.version);let t=await (0,N.v)(U,k);A(t.content),O(t.versions),z(null),Z("Version restored",`Saved as v${e.version}`)}catch(e){G("Failed to restore version",e instanceof Error?e.message:String(e))}})},children:[(0,s.jsx)(o.A,{className:"h-4 w-4"}),"Restore v",F.version]})]})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"h-72 overflow-hidden rounded-lg border border-card-border",children:(0,s.jsx)(n.Ay,{defaultLanguage:"markdown",value:I,onChange:e=>A(e??""),options:{minimap:{enabled:!1},fontSize:13}})}),(0,s.jsxs)("div",{className:"flex items-center justify-end gap-3",children:[null!==L&&(0,s.jsxs)("span",{className:"text-xs text-success",children:["Saved v",L]}),(0,s.jsxs)(x.$,{disabled:T||!U,size:"sm",onClick:()=>B(async()=>{try{let e=await (0,w.m)({repoId:U,name:k,content:I});P(e.version);let t=await (0,N.v)(U,k);O(t.versions),Z("Template saved",`Version ${e.version}`)}catch(e){G("Failed to save template",e instanceof Error?e.message:String(e))}}),children:[(0,s.jsx)(l.A,{className:"h-4 w-4"}),"Save version"]})]})]})]})]}),(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)(p.Zp,{pad:"none",children:[(0,s.jsx)(p.aR,{children:(0,s.jsxs)(p.ZB,{className:"flex items-center gap-2",children:[(0,s.jsx)(d.A,{className:"h-4 w-4 text-muted-foreground"}),"Preview",(0,s.jsx)("span",{className:"text-xs font-normal text-muted-foreground",children:"(sample data)"})]})}),(0,s.jsx)(p.Wu,{className:"px-5 pb-5",children:(0,s.jsx)("pre",{className:"scrollbar-none max-h-72 overflow-auto whitespace-pre-wrap rounded-lg border border-card-border bg-secondary/40 p-3 font-mono text-xs leading-relaxed",children:W})})]}),(0,s.jsxs)(p.Zp,{pad:"none",children:[(0,s.jsx)(p.aR,{children:(0,s.jsxs)(p.ZB,{className:"flex items-center gap-2",children:[(0,s.jsx)(c.A,{className:"h-4 w-4 text-muted-foreground"}),"Version history"]})}),(0,s.jsx)(p.Wu,{className:"px-5 pb-5",children:0===D.length?(0,s.jsx)(f.p,{compact:!0,icon:c.A,title:"No versions yet",description:"Past versions appear here after you save changes."}):(0,s.jsx)("ul",{className:"flex flex-col gap-1",children:D.map(e=>{let t=e.version===D[0]?.version,r=F?.version===e.version;return(0,s.jsx)("li",{children:(0,s.jsxs)("button",{type:"button",className:(0,_.cn)("flex w-full items-center gap-2 rounded-lg border px-3 py-2 text-left text-sm transition-colors focus-ring",r?"border-primary/40 bg-primary/10 text-primary":"border-transparent text-muted-foreground hover-elevate hover:text-foreground"),onClick:()=>{z(t=>t?.version===e.version?null:e)},title:t?"Active version":"Click to diff against active",children:[(0,s.jsxs)("span",{className:"font-mono font-semibold tnum",children:["v",e.version]}),t&&(0,s.jsx)(m.E,{tone:"success",children:"active"}),(0,s.jsx)("span",{className:"ml-auto tnum text-xs text-muted-foreground",children:$(e.updatedAt)})]})},e.version)})})})]})]})]})}},2049:(e,t,r)=>{Promise.resolve().then(r.bind(r,9290)),Promise.resolve().then(r.t.bind(r,742,23)),Promise.resolve().then(r.bind(r,1417))},2801:(e,t,r)=>{"use strict";r.d(t,{_:()=>s});let s={main:"default",ciFix:"ci-fix",plan:"plan",limitResume:"limit-resume"}},5135:(e,t,r)=>{"use strict";r.d(t,{m:()=>n});var s=r(5097);let n=(0,s.createServerReference)("40997a0f75158e6053a9b7c0d68fa06915f0dd55e8",s.callServer,void 0,s.findSourceMapURL,"saveTemplateAction")},5529:(e,t,r)=>{"use strict";r.d(t,{Wu:()=>d,ZB:()=>l,Zp:()=>i,aR:()=>o});var s=r(515),n=r(5832);let a={none:"",sm:"p-4",default:"p-5",lg:"p-6"};function i({className:e,pad:t,hover:r,...o}){return(0,s.jsx)("div",{className:(0,n.cn)("rounded-xl border border-card-border bg-card text-card-foreground shadow-sm",r&&"hover-elevate transition-shadow hover:shadow-md",t&&a[t],e),...o})}function o({className:e,...t}){return(0,s.jsx)("div",{className:(0,n.cn)("flex flex-col gap-1.5 p-5",e),...t})}function l({className:e,...t}){return(0,s.jsx)("h3",{className:(0,n.cn)("text-base font-semibold leading-none tracking-tight",e),...t})}function d({className:e,...t}){return(0,s.jsx)("div",{className:(0,n.cn)("p-5 pt-0",e),...t})}},5832:(e,t,r)=>{"use strict";function s(...e){return e.filter(Boolean).join(" ")}function n(e){if(!e)return"no activity";let t=Math.floor(Date.now()/1e3)-e;return t<60?"just now":t<3600?`${Math.floor(t/60)}m ago`:t<86400?`${Math.floor(t/3600)}h ago`:t<604800?`${Math.floor(t/86400)}d ago`:new Date(1e3*e).toLocaleDateString()}function a(e){if(e>=3600){let t=Math.floor(e/3600),r=Math.round(e%3600/60);return r>0?`${t}h ${r}m`:`${t}h`}return e>=60?`${Math.floor(e/60)}m ${e%60}s`:`${e}s`}function i(e,t=2){return`$${e.toFixed(t)}`}r.d(t,{KW:()=>n,UK:()=>i,a3:()=>a,cn:()=>s})},5897:(e,t,r)=>{"use strict";r.d(t,{I:()=>a});var s=r(515),n=r(5832);function a({value:e,onChange:t,options:r,size:i="default",disabled:o=!1}){return(0,s.jsx)("div",{className:(0,n.cn)("inline-flex items-center gap-0.5 rounded-lg border border-border bg-secondary/50 p-0.5","sm"===i&&"text-xs"),children:r.map(r=>(0,s.jsx)("button",{type:"button",disabled:o,onClick:()=>t(r.value),className:(0,n.cn)("rounded-md px-2.5 py-1 text-xs font-medium transition-colors focus-ring","disabled:cursor-not-allowed disabled:opacity-50",e===r.value?"bg-card text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:r.label},r.value))})}},6644:(e,t,r)=>{"use strict";r.d(t,{E:()=>l});var s=r(515),n=r(5832);let a={neutral:"border-border bg-secondary text-secondary-foreground",primary:"border-primary/40 bg-primary/10 text-primary",success:"border-success-border bg-success-muted text-success-foreground",warning:"border-warning-border bg-warning-muted text-warning-foreground",destructive:"border-destructive/40 bg-destructive/10 text-destructive"},i={queued:"neutral",working:"primary",ci_running:"warning",ci_failed:"destructive",retrying:"warning",waiting_limit:"warning",merged:"success",needs_human:"destructive",aborted:"neutral",interrupted:"warning",open:"neutral",triaged:"primary",releasing:"primary"},o=new Set(["working","ci_running","retrying","releasing"]);function l({className:e,status:t,tone:r,children:d,...c}){let u=r??(t?i[t]??"neutral":"neutral"),m=void 0!==t&&o.has(t);return(0,s.jsxs)("span",{className:(0,n.cn)("inline-flex items-center gap-1.5 whitespace-nowrap rounded-md border px-2 py-0.5 text-[11px] font-semibold leading-4",a[u],e),...c,children:[m&&(0,s.jsxs)("span",{className:"relative flex h-1.5 w-1.5",children:[(0,s.jsx)("span",{className:"absolute inline-flex h-full w-full animate-ping rounded-full bg-current opacity-60"}),(0,s.jsx)("span",{className:"relative inline-flex h-1.5 w-1.5 rounded-full bg-current"})]}),d??t?.replace(/_/g," ")]})}},7217:(e,t,r)=>{"use strict";r.d(t,{D:()=>i});var s=r(515),n=r(5832);function a({htmlFor:e,className:t,children:r}){return(0,s.jsx)("label",{htmlFor:e,className:(0,n.cn)("text-sm font-medium text-foreground",t),children:r})}function i({label:e,hint:t,htmlFor:r,children:o,className:l}){return(0,s.jsxs)("div",{className:(0,n.cn)("flex flex-col gap-1.5",l),children:[e&&(0,s.jsx)(a,{htmlFor:r,children:e}),o,t&&(0,s.jsx)("p",{className:"text-xs leading-relaxed text-muted-foreground",children:t})]})}},8067:(e,t,r)=>{"use strict";r.d(t,{l:()=>o});var s=r(515),n=r(3798),a=r(1171),i=r(5832);let o=a.forwardRef(({className:e,children:t,...r},a)=>(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)("select",{ref:a,className:(0,i.cn)("h-9 w-full appearance-none cursor-pointer rounded-lg border border-input bg-background pl-3 pr-9 text-sm text-foreground","transition focus-ring","disabled:cursor-not-allowed disabled:opacity-50",e),...r,children:t}),(0,s.jsx)(n.A,{className:"pointer-events-none absolute right-2.5 top-1/2 h-[15px] w-[15px] -translate-y-1/2 text-muted-foreground"})]}));o.displayName="Select"},8479:(e,t,r)=>{"use strict";r.d(t,{t:()=>m,d:()=>x});var s=r(515),n=r(8131),a=r(6003),i=r(6512),o=r(5378),l=r(1171);function d(e){return"error"===e?"assertive":"polite"}var c=r(5832);let u=(0,l.createContext)(null);function m({children:e}){let[t,r]=(0,l.useState)([]),n=(0,l.useCallback)(e=>{r(t=>t.filter(t=>t.id!==e))},[]),a=(0,l.useCallback)(e=>{let t=Date.now()+Math.random(),s={id:t,title:e.title,description:e.description,variant:e.variant??"info"};r(e=>[...e,s]),setTimeout(()=>n(t),5e3)},[n]),i=(0,l.useMemo)(()=>({toast:a,success:(e,t)=>a({title:e,description:t,variant:"success"}),error:(e,t)=>a({title:e,description:t,variant:"error"}),info:(e,t)=>a({title:e,description:t,variant:"info"})}),[a]);return(0,s.jsxs)(u.Provider,{value:i,children:[e,(0,s.jsx)(h,{toasts:t,onDismiss:n})]})}function x(){let e=(0,l.useContext)(u);if(!e)throw Error("useToast must be used within a ToastProvider");return e}let p={success:n.A,error:a.A,info:i.A},f={success:{icon:"text-success",bar:"bg-success"},error:{icon:"text-destructive",bar:"bg-destructive"},info:{icon:"text-primary",bar:"bg-primary"}};function v({toast:e,onDismiss:t}){let r=p[e.variant],n=f[e.variant];return(0,s.jsxs)("div",{className:"dd-toast dd-toast-in pointer-events-auto relative flex items-start gap-3 overflow-hidden rounded-xl border border-card-border bg-card p-3.5 shadow-lg",children:[(0,s.jsx)(r,{className:(0,c.cn)("mt-0.5 h-[18px] w-[18px] shrink-0",n.icon)}),(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsx)("p",{className:"text-sm font-medium",children:e.title}),e.description&&(0,s.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:e.description})]}),(0,s.jsx)("button",{type:"button","aria-label":"Dismiss notification",onClick:()=>t(e.id),className:"shrink-0 rounded-md p-0.5 text-muted-foreground hover-elevate",children:(0,s.jsx)(o.A,{className:"h-3.5 w-3.5"})}),(0,s.jsx)("span",{className:(0,c.cn)("dd-toast-progress absolute bottom-0 left-0 h-0.5 w-full",n.bar),style:{animationDuration:"5000ms"}})]})}function h({toasts:e,onDismiss:t}){let r=e.filter(e=>"assertive"===d(e.variant)),n=e.filter(e=>"polite"===d(e.variant));return(0,s.jsxs)("div",{className:"pointer-events-none fixed bottom-4 right-4 z-[60] flex w-full max-w-sm flex-col gap-2",children:[(0,s.jsx)("div",{role:"alert","aria-live":"assertive","aria-atomic":"false",className:"flex flex-col gap-2",children:r.map(e=>(0,s.jsx)(v,{toast:e,onDismiss:t},e.id))}),(0,s.jsx)("div",{"aria-live":"polite","aria-atomic":"false",className:"flex flex-col gap-2",children:n.map(e=>(0,s.jsx)(v,{toast:e,onDismiss:t},e.id))})]})}},9214:(e,t,r)=>{"use strict";r.d(t,{p:()=>i});var s=r(515),n=r(5832);let a={neutral:"bg-secondary text-muted-foreground",primary:"bg-primary/10 text-primary",success:"bg-success-muted text-success",warning:"bg-warning-muted text-warning",destructive:"bg-destructive/10 text-destructive"};function i({icon:e,tone:t="neutral",title:r,description:o,action:l,secondary:d,className:c,compact:u}){return(0,s.jsxs)("div",{className:(0,n.cn)("flex flex-col items-center justify-center text-center",u?"py-10":"py-16",c),children:[e&&(0,s.jsx)("div",{className:(0,n.cn)("flex items-center justify-center rounded-2xl",u?"h-12 w-12":"h-16 w-16",a[t]),children:(0,s.jsx)(e,{className:u?"h-[22px] w-[22px]":"h-7 w-7"})}),(0,s.jsx)("h3",{className:"mt-4 text-base font-semibold",children:r}),o&&(0,s.jsx)("p",{className:"mt-1 max-w-sm text-pretty text-sm text-muted-foreground",children:o}),(l||d)&&(0,s.jsxs)("div",{className:"mt-5 flex items-center gap-2",children:[l,d]})]})}}},e=>{e.O(0,[9843,6263,9655,4234,7358],()=>e(e.s=2049)),_N_E=e.O()}]);
|