chorus-codes 0.8.37 → 0.8.39

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (146) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-path-routes-manifest.json +2 -2
  3. package/.next/build-manifest.json +2 -2
  4. package/.next/prerender-manifest.json +3 -3
  5. package/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  6. package/.next/server/app/_global-error.html +1 -1
  7. package/.next/server/app/_global-error.rsc +1 -1
  8. package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  9. package/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  10. package/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  11. package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  12. package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  13. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  14. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  15. package/.next/server/app/_not-found.html +1 -1
  16. package/.next/server/app/_not-found.rsc +2 -2
  17. package/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
  18. package/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  19. package/.next/server/app/_not-found.segments/_index.segment.rsc +2 -2
  20. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  21. package/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  22. package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  23. package/.next/server/app/connect/page.js +1 -1
  24. package/.next/server/app/connect/page_client-reference-manifest.js +1 -1
  25. package/.next/server/app/demo/[scenario]/page_client-reference-manifest.js +1 -1
  26. package/.next/server/app/new/page.js +1 -1
  27. package/.next/server/app/new/page_client-reference-manifest.js +1 -1
  28. package/.next/server/app/new.html +1 -1
  29. package/.next/server/app/new.rsc +3 -3
  30. package/.next/server/app/new.segments/_full.segment.rsc +3 -3
  31. package/.next/server/app/new.segments/_head.segment.rsc +1 -1
  32. package/.next/server/app/new.segments/_index.segment.rsc +2 -2
  33. package/.next/server/app/new.segments/_tree.segment.rsc +2 -2
  34. package/.next/server/app/new.segments/new/__PAGE__.segment.rsc +2 -2
  35. package/.next/server/app/new.segments/new.segment.rsc +1 -1
  36. package/.next/server/app/onboarding/page.js +2 -2
  37. package/.next/server/app/onboarding/page_client-reference-manifest.js +1 -1
  38. package/.next/server/app/onboarding.html +1 -1
  39. package/.next/server/app/onboarding.rsc +3 -3
  40. package/.next/server/app/onboarding.segments/_full.segment.rsc +3 -3
  41. package/.next/server/app/onboarding.segments/_head.segment.rsc +1 -1
  42. package/.next/server/app/onboarding.segments/_index.segment.rsc +2 -2
  43. package/.next/server/app/onboarding.segments/_tree.segment.rsc +2 -2
  44. package/.next/server/app/onboarding.segments/onboarding/__PAGE__.segment.rsc +2 -2
  45. package/.next/server/app/onboarding.segments/onboarding.segment.rsc +1 -1
  46. package/.next/server/app/page.js +1 -1
  47. package/.next/server/app/page_client-reference-manifest.js +1 -1
  48. package/.next/server/app/personas/page_client-reference-manifest.js +1 -1
  49. package/.next/server/app/personas.html +1 -1
  50. package/.next/server/app/personas.rsc +3 -3
  51. package/.next/server/app/personas.segments/_full.segment.rsc +3 -3
  52. package/.next/server/app/personas.segments/_head.segment.rsc +1 -1
  53. package/.next/server/app/personas.segments/_index.segment.rsc +2 -2
  54. package/.next/server/app/personas.segments/_tree.segment.rsc +2 -2
  55. package/.next/server/app/personas.segments/personas/__PAGE__.segment.rsc +2 -2
  56. package/.next/server/app/personas.segments/personas.segment.rsc +1 -1
  57. package/.next/server/app/runs/[runId]/page_client-reference-manifest.js +1 -1
  58. package/.next/server/app/runs/page_client-reference-manifest.js +1 -1
  59. package/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  60. package/.next/server/app/settings/permissions/page_client-reference-manifest.js +1 -1
  61. package/.next/server/app/settings.html +1 -1
  62. package/.next/server/app/settings.rsc +3 -3
  63. package/.next/server/app/settings.segments/_full.segment.rsc +3 -3
  64. package/.next/server/app/settings.segments/_head.segment.rsc +1 -1
  65. package/.next/server/app/settings.segments/_index.segment.rsc +2 -2
  66. package/.next/server/app/settings.segments/_tree.segment.rsc +2 -2
  67. package/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +2 -2
  68. package/.next/server/app/settings.segments/settings.segment.rsc +1 -1
  69. package/.next/server/app/templates/page.js +1 -1
  70. package/.next/server/app/templates/page_client-reference-manifest.js +1 -1
  71. package/.next/server/app/templates.html +1 -1
  72. package/.next/server/app/templates.rsc +3 -3
  73. package/.next/server/app/templates.segments/_full.segment.rsc +3 -3
  74. package/.next/server/app/templates.segments/_head.segment.rsc +1 -1
  75. package/.next/server/app/templates.segments/_index.segment.rsc +2 -2
  76. package/.next/server/app/templates.segments/_tree.segment.rsc +2 -2
  77. package/.next/server/app/templates.segments/templates/__PAGE__.segment.rsc +2 -2
  78. package/.next/server/app/templates.segments/templates.segment.rsc +1 -1
  79. package/.next/server/app-paths-manifest.json +2 -2
  80. package/.next/server/chunks/189.js +1 -1
  81. package/.next/server/chunks/325.js +1 -1
  82. package/.next/server/chunks/642.js +1 -1
  83. package/.next/server/chunks/681.js +1 -1
  84. package/.next/server/middleware-build-manifest.js +1 -1
  85. package/.next/server/pages/404.html +1 -1
  86. package/.next/server/pages/500.html +1 -1
  87. package/.next/server/server-reference-manifest.json +1 -1
  88. package/.next/static/chunks/245-686f2a9a3d4d5554.js +1 -0
  89. package/.next/static/chunks/{641-3e7b9575770aa968.js → 641-66f3ba81d2479b02.js} +1 -1
  90. package/.next/static/chunks/744-a5a2f718e91700bd.js +1 -0
  91. package/.next/static/chunks/app/connect/page-e216744a2daa061b.js +1 -0
  92. package/.next/static/chunks/app/new/page-d65ea7687a1b37ad.js +1 -0
  93. package/.next/static/chunks/app/onboarding/page-9f2b388be3008bdc.js +1 -0
  94. package/.next/static/chunks/app/page-75f1f750029680bd.js +1 -0
  95. package/.next/static/chunks/app/templates/page-0cfb5ce79f29fcd5.js +1 -0
  96. package/.next/static/css/a2b7a8d35dba10d3.css +3 -0
  97. package/.next/trace +20 -20
  98. package/.next/trace-build +1 -1
  99. package/dist/cli/commands/doctor.js +1 -0
  100. package/dist/cli/commands/doctor.js.map +1 -1
  101. package/dist/cli/commands/init.js +2 -0
  102. package/dist/cli/commands/init.js.map +1 -1
  103. package/dist/cli/commands/quickstart.js +20 -10
  104. package/dist/cli/commands/quickstart.js.map +1 -1
  105. package/dist/daemon/agents/grok.js +105 -0
  106. package/dist/daemon/agents/grok.js.map +1 -0
  107. package/dist/daemon/agents/index.js +4 -1
  108. package/dist/daemon/agents/index.js.map +1 -1
  109. package/dist/daemon/agents/parsers/grok.js +89 -0
  110. package/dist/daemon/agents/parsers/grok.js.map +1 -0
  111. package/dist/daemon/agents/parsers/index.js +4 -1
  112. package/dist/daemon/agents/parsers/index.js.map +1 -1
  113. package/dist/daemon/error-detector.js +21 -2
  114. package/dist/daemon/error-detector.js.map +1 -1
  115. package/dist/daemon/orchestrators/grok.js +101 -0
  116. package/dist/daemon/orchestrators/grok.js.map +1 -0
  117. package/dist/daemon/orchestrators/index.js +2 -0
  118. package/dist/daemon/orchestrators/index.js.map +1 -1
  119. package/dist/daemon/orchestrators/shared.js.map +1 -1
  120. package/dist/lib/cli-detect.js +13 -0
  121. package/dist/lib/cli-detect.js.map +1 -1
  122. package/dist/lib/cli-health.js +1 -0
  123. package/dist/lib/cli-health.js.map +1 -1
  124. package/dist/lib/cli-paths.js +1 -0
  125. package/dist/lib/cli-paths.js.map +1 -1
  126. package/dist/lib/cli-precheck.js +12 -0
  127. package/dist/lib/cli-precheck.js.map +1 -1
  128. package/dist/lib/db/voices.js +1 -1
  129. package/dist/lib/db/voices.js.map +1 -1
  130. package/dist/lib/lineage-maps.js +25 -0
  131. package/dist/lib/lineage-maps.js.map +1 -1
  132. package/dist/lib/template-schema.js +2 -2
  133. package/dist/lib/template-schema.js.map +1 -1
  134. package/dist/lib/voices.js +6 -0
  135. package/dist/lib/voices.js.map +1 -1
  136. package/package.json +1 -1
  137. package/.next/static/chunks/245-c081ea5ea945611e.js +0 -1
  138. package/.next/static/chunks/744-0fa71524896d2b59.js +0 -1
  139. package/.next/static/chunks/app/connect/page-ae2d68d73d1fa88a.js +0 -1
  140. package/.next/static/chunks/app/new/page-7793713d2f445862.js +0 -1
  141. package/.next/static/chunks/app/onboarding/page-0ad8dceca7279475.js +0 -1
  142. package/.next/static/chunks/app/page-4bbcd06414430038.js +0 -1
  143. package/.next/static/chunks/app/templates/page-5ecd9b15c495b3bd.js +0 -1
  144. package/.next/static/css/b914f2b25cf933a9.css +0 -3
  145. /package/.next/static/{PLVy0iTepN1xpE0hbQBjx → CJke3duo44Hy3cygzeoG9}/_buildManifest.js +0 -0
  146. /package/.next/static/{PLVy0iTepN1xpE0hbQBjx → CJke3duo44Hy3cygzeoG9}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- "use strict";exports.id=325,exports.ids=[325],exports.modules={14463:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(52449).A)("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]])},15213:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(52449).A)("file-code-corner",[["path",{d:"M4 12.15V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2h-3.35",key:"1wthlu"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m5 16-3 3 3 3",key:"331omg"}],["path",{d:"m9 22 3-3-3-3",key:"lsp7cz"}]])},15808:(a,b,c)=>{c.d(b,{$:()=>d});function d(a){return!!a&&a.phases[0]?.kind==="review_only"}},31650:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(52449).A)("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]])},41970:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(52449).A)("test-tube-diagonal",[["path",{d:"M21 7 6.82 21.18a2.83 2.83 0 0 1-3.99-.01a2.83 2.83 0 0 1 0-4L17 3",key:"1ub6xw"}],["path",{d:"m16 2 6 6",key:"1gw87d"}],["path",{d:"M12 16H4",key:"1cjfip"}]])},46728:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(52449).A)("clipboard-list",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"M12 11h4",key:"1jrz19"}],["path",{d:"M12 16h4",key:"n85exb"}],["path",{d:"M8 11h.01",key:"1dfujw"}],["path",{d:"M8 16h.01",key:"18s6g9"}]])},72069:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(52449).A)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]])},72325:(a,b,c)=>{c.d(b,{LiveRunReal:()=>$});var d=c(66722),e=c(23937),f=c.n(e),g=c(52449);let h=(0,g.A)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);var i=c(31131),j=c(15808),k=c(43092);function l({work:a}){let[b,c]=(0,i.useState)(!1),e=(0,k.t)(a),f=a.trim()!==e.trim()||a.length>100;return(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsx)("button",{type:"button",onClick:f?()=>c(a=>!a):void 0,title:f?b?"Hide full brief":"Click to show full brief":e,disabled:!f,className:"block w-full min-w-0 text-left disabled:cursor-default",children:(0,d.jsx)("h1",{className:"truncate text-sm font-medium tracking-tight",children:e})}),f&&b&&(0,d.jsx)("pre",{className:"mt-2 max-h-72 overflow-auto whitespace-pre-wrap break-words rounded-md border border-border bg-background px-5 py-4 font-mono text-[12px] leading-relaxed text-foreground/90",children:a})]})}var m=c(90057),n=c(91458),o=c(95047),p=c(65850);let q=(0,g.A)("maximize-2",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]]);var r=c(6506);let s=Object.fromEntries(Object.entries(r.r2).map(([a,b])=>[a,b.gradient]));var t=c(55932),u=c(66635);function v({state:a}){switch(a){case"done":return(0,d.jsxs)("span",{className:"flex items-center gap-1 rounded-md bg-emerald-500/10 px-1.5 py-0.5 text-[10px] font-medium text-emerald-400",children:[(0,d.jsx)(t.A,{className:"h-3 w-3"})," DONE"]});case"errored":return(0,d.jsxs)("span",{className:"flex items-center gap-1 rounded-md bg-destructive/10 px-1.5 py-0.5 text-[10px] font-medium text-destructive",children:[(0,d.jsx)(p.A,{className:"h-3 w-3"})," ERRORED"]});case"working":return(0,d.jsxs)("span",{className:"flex items-center gap-1 rounded-md bg-primary/10 px-1.5 py-0.5 text-[10px] font-medium text-primary",children:[(0,d.jsx)(u.A,{className:"h-3 w-3 animate-spin"})," WORKING"]});case"pending":return(0,d.jsx)("span",{className:"flex items-center gap-1 rounded-md bg-muted/40 px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground/80",children:"QUEUED"});default:return(0,d.jsx)("span",{className:"rounded-md bg-muted px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground",children:"IDLE"})}}var w=c(64519);function x({participant:a,isActive:b,liveTail:c,chatTerminal:e,chatId:f,reviewOnly:g,swaps:h}){var j,k;let l,t,[u,z]=(0,i.useState)(!1),[A,B]=(0,i.useState)(!1),C=function(a){let b;if(!a)return null;let c=a.trimStart();if(!/^##\s+(?:REVIEWER|DOER)\s+FAILED/i.test(c))return null;let d=c.match(/\*\*Kind:\*\*\s*(.+?)(?:\n|$)/),e=d?d[1].trim():"failed",f=c.match(/\*\*Resets:\*\*\s*(.+?)(?:\n|$)/);if(f){let a=Date.parse(f[1].trim());Number.isFinite(a)&&(b=a)}let g=c.search(/\n\n[^*]/),h=g>=0?c.slice(g+2).trim():"",i=h.length>0?h:"(no error message reported)",j=function(a,b){if(b&&/dangerously-skip-permissions cannot be used with root\/sudo/i.test(b))return"Claude CLI refuses --dangerously-skip-permissions as root. Run chorus as a non-root user, or disable Claude voices in /connect.";switch(a){case"quota_exhausted":return"Check your subscription dashboard or swap the account in CHORUS_CODEX_HOME / chorus settings.";case"stream_failure":return"Subprocess died mid-stream — check disk space and CLI version.";case"cli_failed":case"cli_error":return"Re-auth the CLI (codex/gemini/opencode login) and retry.";default:return}}(e,i);return{kind:e,message:i,...j?{cta:j}:{},...b?{resetAt:b}:{}}}(a.answer),D=a.pending?"pending":a.hasAnswer?"done":C||e?"errored":"working",E="opencode-cli"===a.binaryUsed?"opencode":a.lineage;return(0,d.jsxs)("div",{className:`flex h-[320px] flex-col overflow-hidden rounded-lg border transition-[opacity,border-color,box-shadow] duration-300 ${s[E]??"bg-card"} ${"done"===D?"border-emerald-500/30":"working"===D?"border-primary/60 shadow-[0_0_0_1px_rgba(124,58,237,0.25),0_0_24px_-6px_rgba(124,58,237,0.45)] animate-pulse-soft":"errored"===D?"border-destructive/40":"pending"===D?"border-border/40 opacity-50 grayscale-[0.6]":"border-border"}`,children:[(0,d.jsxs)("div",{className:"flex items-center justify-between gap-2 border-b border-border bg-card/60 px-4 py-3",children:[(0,d.jsxs)("div",{className:"flex min-w-0 items-center gap-2 text-xs leading-none",children:[(0,d.jsx)("span",{className:`h-2 w-2 shrink-0 rounded-full ${(0,r.JR)(E)} ${"working"===D?"animate-pulse-soft":""}`}),(0,d.jsx)("span",{className:"font-medium capitalize text-foreground",children:a.role}),(0,d.jsx)("span",{className:"text-muted-foreground",children:"\xb7"}),(0,d.jsx)("span",{className:"uppercase tracking-wider text-muted-foreground",children:(0,r.u5)(E)}),(a.modelUsed??a.model)&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("span",{className:"text-muted-foreground/60",children:"\xb7"}),(0,d.jsx)("span",{className:"truncate font-mono text-muted-foreground",children:a.modelUsed??a.model})]})]}),(0,d.jsxs)("div",{className:"flex shrink-0 items-center gap-1.5",children:["working"===D&&f&&(0,d.jsx)("button",{type:"button",disabled:u,onClick:async()=>{if(!u){z(!0);try{let b=await fetch(`/api/daemon/chats/${f}/participants/${encodeURIComponent(a.participant)}/cancel`,{method:"POST"});if(!b.ok)return void z(!1);let c=await b.json();if(!c.ok){window.alert(`Couldn't cancel: ${c.error?.message??"unknown error"}`),z(!1);return}setTimeout(()=>z(!1),15e3)}catch{z(!1)}}},"aria-label":"Cancel this reviewer",title:"Cancel this reviewer (chat continues with others)",className:"grid h-6 w-6 shrink-0 place-items-center rounded-md border border-border bg-card/40 text-muted-foreground transition hover:border-destructive/40 hover:text-destructive disabled:cursor-not-allowed disabled:opacity-50",children:(0,d.jsx)(m.A,{className:"h-3 w-3"})}),(0,d.jsx)(v,{state:D})]})]}),h&&h.length>0&&(t=h.slice().sort((a,b)=>a.fallbackIdx-b.fallbackIdx),(0,d.jsx)("div",{className:"space-y-1.5 border-b border-amber-500/30 bg-amber-500/5 px-4 py-2 text-[11px]",children:t.map((a,b)=>{let c="lineage_fallback"===a.reason,e=b===t.length-1;return(0,d.jsxs)("div",{className:"flex items-start gap-2",children:[(0,d.jsx)(n.A,{className:"mt-0.5 h-3 w-3 shrink-0 text-amber-300"}),(0,d.jsxs)("div",{className:"min-w-0 flex-1 space-y-0.5",children:[(0,d.jsx)("div",{className:"font-medium uppercase tracking-wider text-[10px] text-amber-300",children:c?"Cross-lineage fallback":"Model fallback"}),(0,d.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5 text-[11px] text-amber-100/90",children:[(0,d.jsxs)("span",{className:"text-amber-100/60 line-through",children:[a.fromLineage,"/",a.fromModel]}),(0,d.jsx)(o.A,{className:"h-3 w-3 shrink-0 text-amber-300"}),(0,d.jsxs)("span",{className:e?"font-medium text-amber-100":"text-amber-100/60 line-through",children:[a.toLineage,"/",a.toModel]}),e&&(0,d.jsx)("span",{className:"rounded bg-amber-500/15 px-1 py-0.5 font-mono text-[9px] text-amber-200",children:"actually ran"})]}),a.fromErrorKind&&(0,d.jsxs)("div",{className:"text-[10px] text-amber-200/75",children:[(0,d.jsx)("span",{className:"font-mono uppercase tracking-wider text-amber-300/90",children:a.fromErrorKind}),a.fromErrorMessage&&(0,d.jsxs)("span",{className:"ml-1.5 text-amber-100/80",children:["— ",a.fromErrorMessage]})]})]})]},`${a.fromLineage}-${a.fromModel}-${b}`)})})),a.warnings&&a.warnings.length>0&&(0,d.jsx)("div",{className:"space-y-1 border-b border-amber-500/30 bg-amber-500/5 px-4 py-2 text-[11px] text-amber-200/90",children:a.warnings.map((a,b)=>(0,d.jsxs)("div",{className:"flex items-start gap-1.5",children:[(0,d.jsx)(p.A,{className:"mt-0.5 h-3 w-3 shrink-0 text-amber-400"}),(0,d.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,d.jsx)("span",{className:"font-medium uppercase tracking-wider text-[10px] text-amber-300",children:a.kind}),(0,d.jsx)("div",{className:"mt-0.5 break-words font-mono text-[11px] leading-snug text-amber-100/85",children:a.message})]})]},b))}),(0,d.jsx)("div",{className:"flex min-h-0 flex-1 flex-col overflow-hidden px-4 py-3 font-mono text-xs leading-relaxed text-muted-foreground",children:a.findingsPreview&&a.findingsPreview.length>0?a.findingsPreview.map((a,b)=>(0,d.jsx)("div",{className:"py-0.5 text-foreground/90",children:a},b)):"working"===D&&c&&c.length>0?(0,d.jsx)("div",{className:"flex min-h-0 flex-1 flex-col-reverse overflow-y-auto",children:(0,d.jsx)("pre",{className:"whitespace-pre-wrap break-words text-foreground/85",children:c})}):"working"===D?(0,d.jsx)("div",{className:"text-muted-foreground",children:"Thinking…"}):"pending"===D?(0,d.jsx)("div",{className:"text-muted-foreground/70",children:g?"Queued — waiting for an open slot.":"Queued — runs after the doer."}):"errored"===D?C?(0,d.jsxs)("div",{className:"space-y-1.5 text-destructive/90",children:[(0,d.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,d.jsx)("span",{className:"text-[10px] font-semibold uppercase tracking-wider",children:C.kind}),C.resetAt&&(0,d.jsxs)("span",{className:"inline-flex items-center gap-1 rounded-full bg-amber-500/10 px-2 py-0.5 text-[10px] font-medium text-amber-300",children:["Resets ",function(a){let b=a-Date.now();if(b<=0)return"now";let c=Math.round(b/1e3);if(c<60)return`in ${c}s`;let d=Math.round(c/60);if(d<60)return`in ${d}m`;let e=Math.round(d/60);if(e<24){let b=new Date(a);return`at ${b.getHours().toString().padStart(2,"0")}:${b.getMinutes().toString().padStart(2,"0")}`}let f=Math.round(e/24);return`in ${f}d`}(C.resetAt)]})]}),(0,d.jsx)("div",{className:"whitespace-pre-wrap break-words text-foreground/85",children:C.message}),C.cta&&(0,d.jsx)("div",{className:"text-[11px] text-muted-foreground/80",children:C.cta})]}):(0,d.jsx)("div",{className:"text-destructive/80",children:"The program finished but didn't produce any output."}):"done"===D&&a.answer?(0,d.jsx)("button",{type:"button",onClick:()=>B(!0),className:"group min-h-0 flex-1 cursor-zoom-in overflow-y-auto rounded text-left transition-colors hover:bg-foreground/5 focus:outline-none focus:ring-2 focus:ring-primary/40",title:"Click to view the full answer",children:(0,d.jsx)("pre",{className:"whitespace-pre-wrap break-words text-foreground/85",children:a.answer})}):(0,d.jsx)("div",{className:"text-muted-foreground/70",children:"No output yet."})}),(0,d.jsxs)("div",{className:"flex items-center justify-between gap-3 border-t border-border bg-card/60 px-4 py-2 font-mono text-[10px] text-muted-foreground",children:[(0,d.jsx)("span",{className:"truncate",children:a.binaryUsed??a.agentName}),(0,d.jsxs)("span",{className:"flex shrink-0 items-center gap-2",children:[void 0!==a.durationMs&&(0,d.jsx)("span",{title:"Wall-clock time the CLI took to finish.",children:function(a){if(a<1e3)return`${a} ms`;let b=a/1e3;if(b<60)return`${b.toFixed(1)}s`;let c=Math.floor(b/60),d=Math.round(b-60*c);return`${c}m${d.toString().padStart(2,"0")}s`}(a.durationMs)}),a.usage?.costUsd!==void 0&&(0,d.jsx)("span",{title:"USD cost reported by the CLI for this run.",children:(j=a.usage.costUsd)<=0?"$0.00":j<.01?"<$0.01":j<1?`$${j.toFixed(3)}`:`$${j.toFixed(2)}`}),a.usage&&y(a.usage)&&(0,d.jsx)("span",{title:(k=a.usage,l=[],void 0!==k.inputTokens&&l.push(`in ${k.inputTokens.toLocaleString()}`),void 0!==k.outputTokens&&l.push(`out ${k.outputTokens.toLocaleString()}`),void 0!==k.cachedInputTokens&&l.push(`cached ${k.cachedInputTokens.toLocaleString()}`),l.join(" \xb7 ")),children:y(a.usage)}),(0,d.jsx)("span",{children:a.hasAnswer?`${(a.answer?.length??0).toLocaleString()} B`:"—"}),"done"===D&&a.answer&&(0,d.jsxs)("button",{type:"button",onClick:()=>B(!0),className:"inline-flex items-center gap-1 rounded px-1 py-0.5 text-muted-foreground/80 transition-colors hover:bg-foreground/10 hover:text-foreground",title:"View full answer",children:[(0,d.jsx)(q,{className:"h-3 w-3"}),(0,d.jsx)("span",{className:"hidden sm:inline",children:"expand"})]})]})]}),(0,d.jsx)(w.lG,{open:A,onOpenChange:B,children:(0,d.jsxs)(w.Cf,{className:"max-h-[85vh] max-w-3xl overflow-hidden",children:[(0,d.jsx)(w.c7,{children:(0,d.jsxs)(w.L3,{className:"flex items-center gap-2 text-sm",children:[(0,d.jsx)("span",{className:`h-2 w-2 shrink-0 rounded-full ${(0,r.JR)(E)}`}),(0,d.jsx)("span",{className:"font-medium capitalize",children:a.role}),(0,d.jsx)("span",{className:"text-muted-foreground",children:"\xb7"}),(0,d.jsx)("span",{className:"uppercase tracking-wider text-muted-foreground",children:(0,r.u5)(E)}),(a.modelUsed??a.model)&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("span",{className:"text-muted-foreground/60",children:"\xb7"}),(0,d.jsx)("span",{className:"font-mono text-xs text-muted-foreground",children:a.modelUsed??a.model})]})]})}),(0,d.jsx)("div",{className:"max-h-[70vh] overflow-y-auto rounded border border-border bg-card/40 p-4",children:(0,d.jsx)("pre",{className:"whitespace-pre-wrap break-words text-sm text-foreground/90",children:a.answer??""})})]})})]})}function y(a){let b=(a.inputTokens??0)+(a.outputTokens??0);return b<=0?null:b<1e3?`${b} tok`:`${(b/1e3).toFixed(1)}k tok`}function z({round:a,isLatest:b,activeFor:c,liveTails:e,chatTerminal:f,reviewOnly:g,chatId:h,swaps:i}){let j=g?a.participants.filter(a=>"doer"!==a.role):a.participants,k=(i??[]).filter(b=>b.round===a.round);return(0,d.jsxs)("section",{children:[!g&&(0,d.jsxs)("h2",{className:"mb-3 text-xs uppercase tracking-wider text-muted-foreground",children:["Round ",a.round,b&&(0,d.jsx)("span",{className:"ml-2 rounded bg-primary/10 px-1.5 py-0.5 text-[10px] font-medium text-primary",children:"current"})]}),(0,d.jsx)("div",{className:"grid items-start gap-4 sm:grid-cols-2 xl:grid-cols-3",children:j.map(a=>{let b;return(0,d.jsx)(x,{participant:a,isActive:c(a),liveTail:e[a.participant],chatTerminal:f,chatId:h,reviewOnly:g,swaps:(b=a.participant.replace(/^(reviewer-|doer-)/,""),k.filter(a=>a.agent===b))},a.participant)})})]})}let A={claude:"claude-code",codex:"codex-cli",gemini:"gemini-cli",opencode:"opencode-cli",kimi:"kimi-cli",openrouter:"openrouter"},B={anthropic:"claude",openai:"codex",google:"gemini",opencode:"opencode",moonshot:"kimi"},C={drafting:{text:"DRAFTING \xb7 doer working",color:"primary"},reviewing:{text:"REVIEWING \xb7 cross-lineage check",color:"primary"},approved:{text:"APPROVED",color:"emerald"},merged:{text:"PR OPENED",color:"emerald"},blocked:{text:"BLOCKED \xb7 ship error",color:"amber"},no_review:{text:"NO REVIEW \xb7 reviewers unavailable",color:"amber"},failed:{text:"FAILED",color:"destructive"},cancelled:{text:"CANCELLED",color:"muted"}},D={primary:"bg-primary",emerald:"bg-emerald-400",amber:"bg-amber-400",destructive:"bg-destructive",muted:"bg-muted-foreground"},E=["approved","merged","blocked","failed","cancelled","no_review"];function F(a,b){return b&&b.startsWith("openrouter:")?"openrouter":B[a]??a}let G=(0,g.A)("rotate-cw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]),H=(0,g.A)("repeat",[["path",{d:"m17 2 4 4-4 4",key:"nntrym"}],["path",{d:"M3 11v-1a4 4 0 0 1 4-4h14",key:"84bu3i"}],["path",{d:"m7 22-4-4 4-4",key:"1wqhfi"}],["path",{d:"M21 13v1a4 4 0 0 1-4 4H3",key:"1rx37r"}]]);var I=c(78770),J=c(260);function K({chatId:a,status:b,isTerminal:c,template:e,onCancel:g}){let h=(0,J.useRouter)(),[j,k]=(0,i.useState)(!1),[l,n]=(0,i.useState)(!1),o=async()=>{k(!0);try{let b=await fetch(`/api/daemon/chats/${a}/rerun`,{method:"POST"});if(!b.ok){window.alert("Couldn't start a new run — Chorus didn't respond. Try restarting it from your terminal: chorus start"),k(!1);return}let c=await b.json();if(!c.ok){let a=c.error?.message??"Unknown error from Chorus.";window.alert(`Couldn't start a new run: ${a}`),k(!1);return}let d=c.data?.slug??c.data?.id;d?(h.push(`/runs/${d}`),h.refresh()):(window.alert("Chorus accepted the retry but didn't return a chat id. Refresh and try again."),k(!1))}catch{window.alert("Retry failed. Network error."),k(!1)}},p=async()=>{if(window.confirm("Delete this chat permanently? This removes all reviewer output and history. You cannot undo this.")){n(!0);try{(await fetch(`/api/daemon/chats/${a}`,{method:"DELETE"})).ok?(h.push("/runs"),h.refresh()):(window.alert("Couldn't delete this chat — Chorus didn't respond. Try restarting it from your terminal: chorus start"),n(!1))}catch{window.alert("Delete failed. Network error."),n(!1)}}};return(0,d.jsxs)("div",{className:"flex shrink-0 items-center gap-2",children:["cancelled"===b||"failed"===b?(0,d.jsxs)("button",{type:"button",disabled:j,onClick:o,className:"flex items-center gap-1.5 rounded-md border border-primary/40 bg-primary/10 px-3 py-1.5 text-xs font-medium text-primary transition hover:border-primary hover:bg-primary/20 disabled:cursor-not-allowed disabled:opacity-50",children:[(0,d.jsx)(G,{className:`h-3.5 w-3.5 ${j?"animate-spin":""}`}),j?"Restarting…":"Retry"]}):(0,d.jsxs)("button",{type:"button",disabled:c,onClick:async()=>{await fetch(`/api/daemon/chats/${a}/cancel`,{method:"POST"}),g()},className:"flex items-center gap-1.5 rounded-md border border-border bg-card px-3 py-1.5 text-xs font-medium text-muted-foreground transition hover:border-destructive/40 hover:text-destructive disabled:cursor-not-allowed disabled:opacity-50",children:[(0,d.jsx)(m.A,{className:"h-3.5 w-3.5"}),"Cancel"]}),c&&e&&(0,d.jsxs)(f(),{href:`/new?template=${encodeURIComponent(e.id)}`,className:"flex items-center gap-1.5 rounded-md border border-border bg-card px-3 py-1.5 text-xs font-medium text-muted-foreground transition hover:border-primary/40 hover:text-primary",children:[(0,d.jsx)(H,{className:"h-3.5 w-3.5"}),"Run again"]}),(0,d.jsxs)("button",{type:"button",disabled:l,onClick:p,className:"flex items-center gap-1.5 rounded-md border border-border bg-card px-3 py-1.5 text-xs font-medium text-muted-foreground transition hover:border-destructive/40 hover:text-destructive disabled:cursor-not-allowed disabled:opacity-50",children:[(0,d.jsx)(I.A,{className:"h-3.5 w-3.5"}),l?"Deleting…":"Delete"]})]})}var L=c(31650),M=c(46728),N=c(15213),O=c(41970),P=c(5616),Q=c(83720),R=c(75619),S=c(14463),T=c(72069);let U={review:L.A,review_only:L.A,plan:M.A,spec:N.A,tests:O.A,implement:P.A,verify:Q.A,pr:R.A,divergence:n.A,recon:S.A},V={pending:"bg-muted-foreground/20 text-muted-foreground",active:"bg-primary/20 text-primary ring-2 ring-primary/40 ring-offset-2 ring-offset-background",done:"bg-emerald-500/20 text-emerald-300",blocked:"bg-amber-500/20 text-amber-300",skipped:"bg-muted-foreground/10 text-muted-foreground/50 line-through"},W={pending:"queued",active:"active",done:"done",blocked:"blocked",skipped:"skipped"};function X({phases:a,activeIndex:b,states:c,onSelect:e}){return(0,d.jsx)("div",{className:"flex items-center gap-0 overflow-x-auto pb-1",children:a.map((f,g)=>{let h=c[g]??"pending",i=U[f.kind],j=e&&("done"===h||"active"===h);return(0,d.jsxs)("div",{className:"flex items-center",children:[(0,d.jsxs)("button",{type:"button",disabled:!j,onClick:()=>j&&e?.(g),className:`group flex items-center gap-2 rounded-md border px-3 py-1.5 text-left transition ${g===b?"border-primary/40 bg-primary/5":"done"===h?"border-emerald-500/30 bg-emerald-500/5":"blocked"===h?"border-amber-500/40 bg-amber-500/5":"border-border bg-card/30"} ${j?"hover:border-foreground/30":"cursor-default"}`,children:[(0,d.jsx)("span",{className:`grid h-6 w-6 shrink-0 place-items-center rounded-md ${V[h]}`,children:"done"===h?(0,d.jsx)(T.A,{className:"h-3.5 w-3.5"}):"active"===h?(0,d.jsx)(u.A,{className:"h-3.5 w-3.5 animate-spin"}):(0,d.jsx)(i,{className:"h-3.5 w-3.5"})}),(0,d.jsxs)("span",{className:"flex flex-col leading-tight",children:[(0,d.jsxs)("span",{className:"text-[10px] font-medium uppercase tracking-wider text-muted-foreground",children:[String(g+1).padStart(2,"0")," \xb7 ",W[h]]}),(0,d.jsx)("span",{className:`text-xs font-medium ${"skipped"===h?"text-muted-foreground/50":"text-foreground"}`,children:f.name})]})]}),g<a.length-1&&(0,d.jsx)("span",{className:`mx-1.5 h-px w-6 ${"done"===c[g]?"bg-emerald-500/40":"bg-border"}`})]},f.id)})})}function Y({template:a,status:b,totalPhases:c,completedPhaseCount:e,rounds:f,enrichedRounds:g,prUrl:h,shipError:i}){return(0,d.jsx)("div",{className:"border-b border-border bg-card/20 px-4 py-3 sm:px-8",children:(0,d.jsxs)("div",{className:"mx-auto flex w-full flex-col gap-3",children:[h&&(0,d.jsxs)("div",{className:"rounded-md border border-emerald-500/40 bg-emerald-500/5 px-4 py-3",children:[(0,d.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2 text-sm font-medium text-emerald-300",children:[(0,d.jsx)(t.A,{className:"h-4 w-4"}),"Pull request opened"]}),(0,d.jsx)("a",{href:h,target:"_blank",rel:"noreferrer",className:"rounded-md border border-emerald-500/40 bg-emerald-500/10 px-3 py-1.5 text-xs font-medium text-emerald-300 transition hover:bg-emerald-500/20",children:"View PR →"})]}),(0,d.jsx)("p",{className:"mt-1 break-all font-mono text-[11px] text-emerald-200/70",children:h})]}),i&&!h&&(0,d.jsxs)("div",{className:"rounded-md border border-amber-500/40 bg-amber-500/5 px-4 py-3",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2 text-sm font-medium text-amber-300",children:[(0,d.jsx)(p.A,{className:"h-4 w-4"}),"Ship phase blocked"]}),(0,d.jsx)("p",{className:"mt-1 break-words font-mono text-[11px] text-amber-200/80",children:i}),(0,d.jsx)("p",{className:"mt-2 text-[11px] leading-relaxed text-muted-foreground",children:"The reviewers approved the doer's output, but chorus couldn't open a PR. Resolve the issue above and re-run."})]}),a?.phases&&a.phases.length>0&&(0,d.jsx)("div",{className:"flex justify-center",children:(0,d.jsx)(X,{phases:a.phases,activeIndex:Math.min(e,c-1),states:a.phases.map((a,c)=>"approved"===b?"done":"no_review"===b?c<e?"done":"blocked":"failed"===b||"cancelled"===b?c<e?"done":"skipped":c<e?"done":c===e?"active":"pending")})}),(0,d.jsx)(Z,{template:a,status:b,totalPhases:c,completedPhaseCount:e,rounds:f,enrichedRounds:g})]})})}function Z({template:a,status:b,totalPhases:c,completedPhaseCount:e,rounds:f,enrichedRounds:g}){let h=a?.maxRounds??1,i="approved"===b||"merged"===b||"no_review"===b||"blocked"===b||"failed"===b||"cancelled"===b,j=c>1,k=!j&&h>1,l=g[g.length-1],m=l?.participants.filter(a=>"reviewer"===a.role)??[],n=m.length,o=m.filter(a=>a.hasAnswer).length;if(!j&&!k&&!(!j&&!k&&n>1))return null;let p=j?c:k?h:n,q=j?Math.min(e,c):k?Math.min(Math.max(f.length,1),h):o,r=j&&i?p:q,s=j?`${r} / ${p} phases`:k?`Round ${r} / ${p}`:`${r} / ${p} complete`;return(0,d.jsxs)("div",{className:"mx-auto flex w-full max-w-xs items-center gap-2",children:[(0,d.jsx)("div",{className:"flex h-1 flex-1 overflow-hidden rounded-full bg-muted",children:(0,d.jsx)("div",{className:`transition-[width] duration-700 ease-out ${"approved"===b?"bg-emerald-400":"bg-primary"}`,style:{width:`${r/p*100}%`}})}),(0,d.jsx)("span",{className:"shrink-0 font-mono text-[10px] tabular-nums text-muted-foreground",children:s})]})}function $({chatId:a,initialStatus:b,initialRounds:c,templateId:e,template:g,work:k,projectName:m,initialPrUrl:n,initialShipError:o,initialVerdict:p,demoDataSource:q}){var s,t;let[u,v]=(0,i.useState)(b),[w,x]=(0,i.useState)(p),[y,B]=(0,i.useState)(c),[G,H]=(0,i.useState)(new Set),[I,J]=(0,i.useState)(n),[L,M]=(0,i.useState)(o),[N,O]=(0,i.useState)({}),[P,Q]=(0,i.useState)(-1),[R,S]=(0,i.useState)({}),[T,U]=(0,i.useState)([]),V=E.includes(u),W=(s=u,t=w,"approved"===s&&t&&"approved"!==t?"request_changes"===t?{text:"REVIEW \xb7 CHANGES REQUESTED",color:"amber"}:{text:`REVIEW \xb7 ${t.toUpperCase()}`,color:"amber"}:C[s]??{text:s.toUpperCase(),color:"muted"}),X=g?.phases?.length??1,Z=(0,i.useMemo)(()=>"approved"===u||"merged"===u||"no_review"===u||"blocked"===u?X:"failed"===u||"cancelled"===u?0:Math.min(Math.max(0,P+1),X),[u,X,P]),_=(0,i.useMemo)(()=>(0,j.$)(g),[g]),aa=(0,i.useMemo)(()=>(function(a,b,c){if(!b?.phases?.length)return a;let d=(0,j.$)(b),e=function(a,b){let c=a.phases[0],d=(a,b)=>b?.[0]??(0,r.YM)(a),e=[];if(!b){let a=c.doer.models?.[0],b=F(c.doer.lineage,a);e.push({role:"doer",lineage:b,model:a??d(b,c.doer.models)})}for(let[a,b]of(c.reviewer?.candidatesWithModels??[]).entries()){let c=b.models?.[0],f=F(b.lineage,c);e.push({role:"reviewer",lineage:f,model:c??d(f,b.models),reviewerIdx:a})}return e}(b,d);return(0===a.length?[{round:1,participants:[]}]:a).map(a=>{let b=[],d=new Set;for(let f of e){let e="doer"===f.role?`doer-${f.lineage}`:`reviewer-${f.lineage}-${f.reviewerIdx}`,g=a.participants.find(a=>"doer"===f.role?"doer"===a.role&&a.lineage===f.lineage:"reviewer"===a.role&&a.lineage===f.lineage&&parseInt(a.participant.match(/-(\d+)$/)?.[1]??"0",10)===f.reviewerIdx);g?(b.push({...g,model:f.model,...c[g.participant]?{warnings:c[g.participant]}:{}}),d.add(g.participant)):b.push({participant:e,role:f.role,agentName:A[f.lineage]??f.lineage,lineage:f.lineage,hasAnswer:!1,model:f.model,pending:!0,...c[e]?{warnings:c[e]}:{}})}for(let e of a.participants)d.has(e.participant)||b.push({...e,...c[e.participant]?{warnings:c[e.participant]}:{}});return{...a,participants:b}})})(y,g,R),[y,g,R]),ab=aa[aa.length-1],ac=aa.slice(0,-1);return(0,d.jsxs)("div",{className:"flex h-full flex-col",children:[(0,d.jsxs)("div",{className:"sticky top-0 z-20 border-b border-border bg-card/80 backdrop-blur-sm px-4 py-3 sm:px-8",children:[(0,d.jsxs)("div",{className:"mb-2 flex w-full items-center justify-between gap-3",children:[(0,d.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,d.jsxs)(f(),{href:"/runs",className:"flex shrink-0 items-center gap-1 text-xs text-muted-foreground transition hover:text-foreground",children:[(0,d.jsx)(h,{className:"h-3 w-3"}),(0,d.jsx)("span",{children:m??"Runs"})]}),(0,d.jsx)("span",{className:"text-muted-foreground/40",children:"\xb7"}),(0,d.jsxs)("span",{title:W.text,className:"inline-flex shrink-0 items-center gap-1.5 text-[11px] uppercase tracking-wider text-muted-foreground",children:[(0,d.jsx)("span",{className:`h-2 w-2 shrink-0 rounded-full ${D[W.color]} ${V?"":"animate-pulse-soft"}`}),u]}),(g||e)&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("span",{className:"text-muted-foreground/40",children:"\xb7"}),(0,d.jsxs)(f(),{href:`/templates${g?`#${encodeURIComponent(g.id)}`:""}`,title:g?`Template: ${g.name}`:`Template (deleted): ${e}`,className:"inline-flex min-w-0 shrink items-center gap-1.5 text-[11px] text-muted-foreground transition hover:text-primary",children:[(0,d.jsx)("span",{className:"font-mono uppercase tracking-wider",children:"tpl"}),(0,d.jsx)("span",{className:"truncate font-medium text-foreground",children:g?.name??e})]})]})]}),(0,d.jsx)(K,{chatId:a,status:u,isTerminal:V,template:g,onCancel:()=>v("cancelled")})]}),(0,d.jsx)("div",{className:"min-w-0",children:(0,d.jsx)(l,{work:k})})]}),(0,d.jsx)(Y,{template:g,status:u,totalPhases:X,completedPhaseCount:Z,rounds:y,enrichedRounds:aa,prUrl:I,shipError:L}),(0,d.jsx)("div",{className:"flex-1 overflow-y-auto px-4 py-6 sm:px-8",children:(0,d.jsxs)("div",{className:"mx-auto w-full space-y-8",children:[0===y.length&&(0,d.jsx)("div",{className:"rounded-lg border border-dashed border-border p-12 text-center text-sm text-muted-foreground",children:"Waiting for first phase to start…"}),ab&&(0,d.jsx)(z,{round:ab,isLatest:!0,activeFor:a=>{let b=`${a.participant}-`;for(let a of G)if(a.startsWith(b))return!0;return!1},liveTails:N,chatTerminal:V,reviewOnly:_,chatId:a,swaps:T}),!_&&ac.length>0&&(0,d.jsxs)("details",{className:"rounded-lg border border-border bg-card",children:[(0,d.jsxs)("summary",{className:"cursor-pointer px-4 py-3 text-xs uppercase tracking-wider text-muted-foreground hover:text-foreground",children:["Earlier rounds (",ac.length,")"]}),(0,d.jsx)("div",{className:"space-y-6 border-t border-border p-4",children:ac.slice().reverse().map(a=>(0,d.jsx)(z,{round:a,activeFor:()=>!1,liveTails:{},chatTerminal:V,swaps:T},a.round))})]})]})})]})}},75619:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(52449).A)("git-pull-request",[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M13 6h3a2 2 0 0 1 2 2v7",key:"1yeb86"}],["line",{x1:"6",x2:"6",y1:"9",y2:"21",key:"rroup"}]])},83720:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(52449).A)("flask-conical",[["path",{d:"M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2",key:"18mbvz"}],["path",{d:"M6.453 15h11.094",key:"3shlmq"}],["path",{d:"M8.5 2h7",key:"csnxdl"}]])},91458:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(52449).A)("shuffle",[["path",{d:"m18 14 4 4-4 4",key:"10pe0f"}],["path",{d:"m18 2 4 4-4 4",key:"pucp1d"}],["path",{d:"M2 18h1.973a4 4 0 0 0 3.3-1.7l5.454-8.6a4 4 0 0 1 3.3-1.7H22",key:"1ailkh"}],["path",{d:"M2 6h1.972a4 4 0 0 1 3.6 2.2",key:"km57vx"}],["path",{d:"M22 18h-6.041a4 4 0 0 1-3.3-1.8l-.359-.45",key:"os18l9"}]])},95047:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(52449).A)("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]])}};
1
+ "use strict";exports.id=325,exports.ids=[325],exports.modules={14463:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(52449).A)("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]])},15213:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(52449).A)("file-code-corner",[["path",{d:"M4 12.15V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2h-3.35",key:"1wthlu"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m5 16-3 3 3 3",key:"331omg"}],["path",{d:"m9 22 3-3-3-3",key:"lsp7cz"}]])},15808:(a,b,c)=>{c.d(b,{$:()=>d});function d(a){return!!a&&a.phases[0]?.kind==="review_only"}},31650:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(52449).A)("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]])},41970:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(52449).A)("test-tube-diagonal",[["path",{d:"M21 7 6.82 21.18a2.83 2.83 0 0 1-3.99-.01a2.83 2.83 0 0 1 0-4L17 3",key:"1ub6xw"}],["path",{d:"m16 2 6 6",key:"1gw87d"}],["path",{d:"M12 16H4",key:"1cjfip"}]])},46728:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(52449).A)("clipboard-list",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"M12 11h4",key:"1jrz19"}],["path",{d:"M12 16h4",key:"n85exb"}],["path",{d:"M8 11h.01",key:"1dfujw"}],["path",{d:"M8 16h.01",key:"18s6g9"}]])},72069:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(52449).A)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]])},72325:(a,b,c)=>{c.d(b,{LiveRunReal:()=>$});var d=c(66722),e=c(23937),f=c.n(e),g=c(52449);let h=(0,g.A)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);var i=c(31131),j=c(15808),k=c(43092);function l({work:a}){let[b,c]=(0,i.useState)(!1),e=(0,k.t)(a),f=a.trim()!==e.trim()||a.length>100;return(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsx)("button",{type:"button",onClick:f?()=>c(a=>!a):void 0,title:f?b?"Hide full brief":"Click to show full brief":e,disabled:!f,className:"block w-full min-w-0 text-left disabled:cursor-default",children:(0,d.jsx)("h1",{className:"truncate text-sm font-medium tracking-tight",children:e})}),f&&b&&(0,d.jsx)("pre",{className:"mt-2 max-h-72 overflow-auto whitespace-pre-wrap break-words rounded-md border border-border bg-background px-5 py-4 font-mono text-[12px] leading-relaxed text-foreground/90",children:a})]})}var m=c(90057),n=c(91458),o=c(95047),p=c(65850);let q=(0,g.A)("maximize-2",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]]);var r=c(6506);let s=Object.fromEntries(Object.entries(r.r2).map(([a,b])=>[a,b.gradient]));var t=c(55932),u=c(66635);function v({state:a}){switch(a){case"done":return(0,d.jsxs)("span",{className:"flex items-center gap-1 rounded-md bg-emerald-500/10 px-1.5 py-0.5 text-[10px] font-medium text-emerald-400",children:[(0,d.jsx)(t.A,{className:"h-3 w-3"})," DONE"]});case"errored":return(0,d.jsxs)("span",{className:"flex items-center gap-1 rounded-md bg-destructive/10 px-1.5 py-0.5 text-[10px] font-medium text-destructive",children:[(0,d.jsx)(p.A,{className:"h-3 w-3"})," ERRORED"]});case"working":return(0,d.jsxs)("span",{className:"flex items-center gap-1 rounded-md bg-primary/10 px-1.5 py-0.5 text-[10px] font-medium text-primary",children:[(0,d.jsx)(u.A,{className:"h-3 w-3 animate-spin"})," WORKING"]});case"pending":return(0,d.jsx)("span",{className:"flex items-center gap-1 rounded-md bg-muted/40 px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground/80",children:"QUEUED"});default:return(0,d.jsx)("span",{className:"rounded-md bg-muted px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground",children:"IDLE"})}}var w=c(64519);function x({participant:a,isActive:b,liveTail:c,chatTerminal:e,chatId:f,reviewOnly:g,swaps:h}){var j,k;let l,t,[u,z]=(0,i.useState)(!1),[A,B]=(0,i.useState)(!1),C=function(a){let b;if(!a)return null;let c=a.trimStart();if(!/^##\s+(?:REVIEWER|DOER)\s+FAILED/i.test(c))return null;let d=c.match(/\*\*Kind:\*\*\s*(.+?)(?:\n|$)/),e=d?d[1].trim():"failed",f=c.match(/\*\*Resets:\*\*\s*(.+?)(?:\n|$)/);if(f){let a=Date.parse(f[1].trim());Number.isFinite(a)&&(b=a)}let g=c.search(/\n\n[^*]/),h=g>=0?c.slice(g+2).trim():"",i=h.length>0?h:"(no error message reported)",j=function(a,b){if(b&&/dangerously-skip-permissions cannot be used with root\/sudo/i.test(b))return"Claude CLI refuses --dangerously-skip-permissions as root. Run chorus as a non-root user, or disable Claude voices in /connect.";switch(a){case"quota_exhausted":return"Check your subscription dashboard or swap the account in CHORUS_CODEX_HOME / chorus settings.";case"stream_failure":return"Subprocess died mid-stream — check disk space and CLI version.";case"cli_failed":case"cli_error":return"Re-auth the CLI (codex/gemini/opencode login) and retry.";default:return}}(e,i);return{kind:e,message:i,...j?{cta:j}:{},...b?{resetAt:b}:{}}}(a.answer),D=a.pending?"pending":a.hasAnswer?"done":C||e?"errored":"working",E="opencode-cli"===a.binaryUsed?"opencode":a.lineage;return(0,d.jsxs)("div",{className:`flex h-[320px] flex-col overflow-hidden rounded-lg border transition-[opacity,border-color,box-shadow] duration-300 ${s[E]??"bg-card"} ${"done"===D?"border-emerald-500/30":"working"===D?"border-primary/60 shadow-[0_0_0_1px_rgba(124,58,237,0.25),0_0_24px_-6px_rgba(124,58,237,0.45)] animate-pulse-soft":"errored"===D?"border-destructive/40":"pending"===D?"border-border/40 opacity-50 grayscale-[0.6]":"border-border"}`,children:[(0,d.jsxs)("div",{className:"flex items-center justify-between gap-2 border-b border-border bg-card/60 px-4 py-3",children:[(0,d.jsxs)("div",{className:"flex min-w-0 items-center gap-2 text-xs leading-none",children:[(0,d.jsx)("span",{className:`h-2 w-2 shrink-0 rounded-full ${(0,r.JR)(E)} ${"working"===D?"animate-pulse-soft":""}`}),(0,d.jsx)("span",{className:"font-medium capitalize text-foreground",children:a.role}),(0,d.jsx)("span",{className:"text-muted-foreground",children:"\xb7"}),(0,d.jsx)("span",{className:"uppercase tracking-wider text-muted-foreground",children:(0,r.u5)(E)}),(a.modelUsed??a.model)&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("span",{className:"text-muted-foreground/60",children:"\xb7"}),(0,d.jsx)("span",{className:"truncate font-mono text-muted-foreground",children:a.modelUsed??a.model})]})]}),(0,d.jsxs)("div",{className:"flex shrink-0 items-center gap-1.5",children:["working"===D&&f&&(0,d.jsx)("button",{type:"button",disabled:u,onClick:async()=>{if(!u){z(!0);try{let b=await fetch(`/api/daemon/chats/${f}/participants/${encodeURIComponent(a.participant)}/cancel`,{method:"POST"});if(!b.ok)return void z(!1);let c=await b.json();if(!c.ok){window.alert(`Couldn't cancel: ${c.error?.message??"unknown error"}`),z(!1);return}setTimeout(()=>z(!1),15e3)}catch{z(!1)}}},"aria-label":"Cancel this reviewer",title:"Cancel this reviewer (chat continues with others)",className:"grid h-6 w-6 shrink-0 place-items-center rounded-md border border-border bg-card/40 text-muted-foreground transition hover:border-destructive/40 hover:text-destructive disabled:cursor-not-allowed disabled:opacity-50",children:(0,d.jsx)(m.A,{className:"h-3 w-3"})}),(0,d.jsx)(v,{state:D})]})]}),h&&h.length>0&&(t=h.slice().sort((a,b)=>a.fallbackIdx-b.fallbackIdx),(0,d.jsx)("div",{className:"space-y-1.5 border-b border-amber-500/30 bg-amber-500/5 px-4 py-2 text-[11px]",children:t.map((a,b)=>{let c="lineage_fallback"===a.reason,e=b===t.length-1;return(0,d.jsxs)("div",{className:"flex items-start gap-2",children:[(0,d.jsx)(n.A,{className:"mt-0.5 h-3 w-3 shrink-0 text-amber-300"}),(0,d.jsxs)("div",{className:"min-w-0 flex-1 space-y-0.5",children:[(0,d.jsx)("div",{className:"font-medium uppercase tracking-wider text-[10px] text-amber-300",children:c?"Cross-lineage fallback":"Model fallback"}),(0,d.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5 text-[11px] text-amber-100/90",children:[(0,d.jsxs)("span",{className:"text-amber-100/60 line-through",children:[a.fromLineage,"/",a.fromModel]}),(0,d.jsx)(o.A,{className:"h-3 w-3 shrink-0 text-amber-300"}),(0,d.jsxs)("span",{className:e?"font-medium text-amber-100":"text-amber-100/60 line-through",children:[a.toLineage,"/",a.toModel]}),e&&(0,d.jsx)("span",{className:"rounded bg-amber-500/15 px-1 py-0.5 font-mono text-[9px] text-amber-200",children:"actually ran"})]}),a.fromErrorKind&&(0,d.jsxs)("div",{className:"text-[10px] text-amber-200/75",children:[(0,d.jsx)("span",{className:"font-mono uppercase tracking-wider text-amber-300/90",children:a.fromErrorKind}),a.fromErrorMessage&&(0,d.jsxs)("span",{className:"ml-1.5 text-amber-100/80",children:["— ",a.fromErrorMessage]})]})]})]},`${a.fromLineage}-${a.fromModel}-${b}`)})})),a.warnings&&a.warnings.length>0&&(0,d.jsx)("div",{className:"space-y-1 border-b border-amber-500/30 bg-amber-500/5 px-4 py-2 text-[11px] text-amber-200/90",children:a.warnings.map((a,b)=>(0,d.jsxs)("div",{className:"flex items-start gap-1.5",children:[(0,d.jsx)(p.A,{className:"mt-0.5 h-3 w-3 shrink-0 text-amber-400"}),(0,d.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,d.jsx)("span",{className:"font-medium uppercase tracking-wider text-[10px] text-amber-300",children:a.kind}),(0,d.jsx)("div",{className:"mt-0.5 break-words font-mono text-[11px] leading-snug text-amber-100/85",children:a.message})]})]},b))}),(0,d.jsx)("div",{className:"flex min-h-0 flex-1 flex-col overflow-hidden px-4 py-3 font-mono text-xs leading-relaxed text-muted-foreground",children:a.findingsPreview&&a.findingsPreview.length>0?a.findingsPreview.map((a,b)=>(0,d.jsx)("div",{className:"py-0.5 text-foreground/90",children:a},b)):"working"===D&&c&&c.length>0?(0,d.jsx)("div",{className:"flex min-h-0 flex-1 flex-col-reverse overflow-y-auto",children:(0,d.jsx)("pre",{className:"whitespace-pre-wrap break-words text-foreground/85",children:c})}):"working"===D?(0,d.jsx)("div",{className:"text-muted-foreground",children:"Thinking…"}):"pending"===D?(0,d.jsx)("div",{className:"text-muted-foreground/70",children:g?"Queued — waiting for an open slot.":"Queued — runs after the doer."}):"errored"===D?C?(0,d.jsxs)("div",{className:"space-y-1.5 text-destructive/90",children:[(0,d.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,d.jsx)("span",{className:"text-[10px] font-semibold uppercase tracking-wider",children:C.kind}),C.resetAt&&(0,d.jsxs)("span",{className:"inline-flex items-center gap-1 rounded-full bg-amber-500/10 px-2 py-0.5 text-[10px] font-medium text-amber-300",children:["Resets ",function(a){let b=a-Date.now();if(b<=0)return"now";let c=Math.round(b/1e3);if(c<60)return`in ${c}s`;let d=Math.round(c/60);if(d<60)return`in ${d}m`;let e=Math.round(d/60);if(e<24){let b=new Date(a);return`at ${b.getHours().toString().padStart(2,"0")}:${b.getMinutes().toString().padStart(2,"0")}`}let f=Math.round(e/24);return`in ${f}d`}(C.resetAt)]})]}),(0,d.jsx)("div",{className:"whitespace-pre-wrap break-words text-foreground/85",children:C.message}),C.cta&&(0,d.jsx)("div",{className:"text-[11px] text-muted-foreground/80",children:C.cta})]}):(0,d.jsx)("div",{className:"text-destructive/80",children:"The program finished but didn't produce any output."}):"done"===D&&a.answer?(0,d.jsx)("button",{type:"button",onClick:()=>B(!0),className:"group min-h-0 flex-1 cursor-zoom-in overflow-y-auto rounded text-left transition-colors hover:bg-foreground/5 focus:outline-none focus:ring-2 focus:ring-primary/40",title:"Click to view the full answer",children:(0,d.jsx)("pre",{className:"whitespace-pre-wrap break-words text-foreground/85",children:a.answer})}):(0,d.jsx)("div",{className:"text-muted-foreground/70",children:"No output yet."})}),(0,d.jsxs)("div",{className:"flex items-center justify-between gap-3 border-t border-border bg-card/60 px-4 py-2 font-mono text-[10px] text-muted-foreground",children:[(0,d.jsx)("span",{className:"truncate",children:a.binaryUsed??a.agentName}),(0,d.jsxs)("span",{className:"flex shrink-0 items-center gap-2",children:[void 0!==a.durationMs&&(0,d.jsx)("span",{title:"Wall-clock time the CLI took to finish.",children:function(a){if(a<1e3)return`${a} ms`;let b=a/1e3;if(b<60)return`${b.toFixed(1)}s`;let c=Math.floor(b/60),d=Math.round(b-60*c);return`${c}m${d.toString().padStart(2,"0")}s`}(a.durationMs)}),a.usage?.costUsd!==void 0&&(0,d.jsx)("span",{title:"USD cost reported by the CLI for this run.",children:(j=a.usage.costUsd)<=0?"$0.00":j<.01?"<$0.01":j<1?`$${j.toFixed(3)}`:`$${j.toFixed(2)}`}),a.usage&&y(a.usage)&&(0,d.jsx)("span",{title:(k=a.usage,l=[],void 0!==k.inputTokens&&l.push(`in ${k.inputTokens.toLocaleString()}`),void 0!==k.outputTokens&&l.push(`out ${k.outputTokens.toLocaleString()}`),void 0!==k.cachedInputTokens&&l.push(`cached ${k.cachedInputTokens.toLocaleString()}`),l.join(" \xb7 ")),children:y(a.usage)}),(0,d.jsx)("span",{children:a.hasAnswer?`${(a.answer?.length??0).toLocaleString()} B`:"—"}),"done"===D&&a.answer&&(0,d.jsxs)("button",{type:"button",onClick:()=>B(!0),className:"inline-flex items-center gap-1 rounded px-1 py-0.5 text-muted-foreground/80 transition-colors hover:bg-foreground/10 hover:text-foreground",title:"View full answer",children:[(0,d.jsx)(q,{className:"h-3 w-3"}),(0,d.jsx)("span",{className:"hidden sm:inline",children:"expand"})]})]})]}),(0,d.jsx)(w.lG,{open:A,onOpenChange:B,children:(0,d.jsxs)(w.Cf,{className:"max-h-[85vh] max-w-3xl overflow-hidden",children:[(0,d.jsx)(w.c7,{children:(0,d.jsxs)(w.L3,{className:"flex items-center gap-2 text-sm",children:[(0,d.jsx)("span",{className:`h-2 w-2 shrink-0 rounded-full ${(0,r.JR)(E)}`}),(0,d.jsx)("span",{className:"font-medium capitalize",children:a.role}),(0,d.jsx)("span",{className:"text-muted-foreground",children:"\xb7"}),(0,d.jsx)("span",{className:"uppercase tracking-wider text-muted-foreground",children:(0,r.u5)(E)}),(a.modelUsed??a.model)&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("span",{className:"text-muted-foreground/60",children:"\xb7"}),(0,d.jsx)("span",{className:"font-mono text-xs text-muted-foreground",children:a.modelUsed??a.model})]})]})}),(0,d.jsx)("div",{className:"max-h-[70vh] overflow-y-auto rounded border border-border bg-card/40 p-4",children:(0,d.jsx)("pre",{className:"whitespace-pre-wrap break-words text-sm text-foreground/90",children:a.answer??""})})]})})]})}function y(a){let b=(a.inputTokens??0)+(a.outputTokens??0);return b<=0?null:b<1e3?`${b} tok`:`${(b/1e3).toFixed(1)}k tok`}function z({round:a,isLatest:b,activeFor:c,liveTails:e,chatTerminal:f,reviewOnly:g,chatId:h,swaps:i}){let j=g?a.participants.filter(a=>"doer"!==a.role):a.participants,k=(i??[]).filter(b=>b.round===a.round);return(0,d.jsxs)("section",{children:[!g&&(0,d.jsxs)("h2",{className:"mb-3 text-xs uppercase tracking-wider text-muted-foreground",children:["Round ",a.round,b&&(0,d.jsx)("span",{className:"ml-2 rounded bg-primary/10 px-1.5 py-0.5 text-[10px] font-medium text-primary",children:"current"})]}),(0,d.jsx)("div",{className:"grid items-start gap-4 sm:grid-cols-2 xl:grid-cols-3",children:j.map(a=>{let b;return(0,d.jsx)(x,{participant:a,isActive:c(a),liveTail:e[a.participant],chatTerminal:f,chatId:h,reviewOnly:g,swaps:(b=a.participant.replace(/^(reviewer-|doer-)/,""),k.filter(a=>a.agent===b))},a.participant)})})]})}let A={claude:"claude-code",codex:"codex-cli",gemini:"gemini-cli",opencode:"opencode-cli",kimi:"kimi-cli",grok:"grok-cli",openrouter:"openrouter"},B={anthropic:"claude",openai:"codex",google:"gemini",opencode:"opencode",moonshot:"kimi",grok:"grok"},C={drafting:{text:"DRAFTING \xb7 doer working",color:"primary"},reviewing:{text:"REVIEWING \xb7 cross-lineage check",color:"primary"},approved:{text:"APPROVED",color:"emerald"},merged:{text:"PR OPENED",color:"emerald"},blocked:{text:"BLOCKED \xb7 ship error",color:"amber"},no_review:{text:"NO REVIEW \xb7 reviewers unavailable",color:"amber"},failed:{text:"FAILED",color:"destructive"},cancelled:{text:"CANCELLED",color:"muted"}},D={primary:"bg-primary",emerald:"bg-emerald-400",amber:"bg-amber-400",destructive:"bg-destructive",muted:"bg-muted-foreground"},E=["approved","merged","blocked","failed","cancelled","no_review"];function F(a,b){return b&&b.startsWith("openrouter:")?"openrouter":B[a]??a}let G=(0,g.A)("rotate-cw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]),H=(0,g.A)("repeat",[["path",{d:"m17 2 4 4-4 4",key:"nntrym"}],["path",{d:"M3 11v-1a4 4 0 0 1 4-4h14",key:"84bu3i"}],["path",{d:"m7 22-4-4 4-4",key:"1wqhfi"}],["path",{d:"M21 13v1a4 4 0 0 1-4 4H3",key:"1rx37r"}]]);var I=c(78770),J=c(260);function K({chatId:a,status:b,isTerminal:c,template:e,onCancel:g}){let h=(0,J.useRouter)(),[j,k]=(0,i.useState)(!1),[l,n]=(0,i.useState)(!1),o=async()=>{k(!0);try{let b=await fetch(`/api/daemon/chats/${a}/rerun`,{method:"POST"});if(!b.ok){window.alert("Couldn't start a new run — Chorus didn't respond. Try restarting it from your terminal: chorus start"),k(!1);return}let c=await b.json();if(!c.ok){let a=c.error?.message??"Unknown error from Chorus.";window.alert(`Couldn't start a new run: ${a}`),k(!1);return}let d=c.data?.slug??c.data?.id;d?(h.push(`/runs/${d}`),h.refresh()):(window.alert("Chorus accepted the retry but didn't return a chat id. Refresh and try again."),k(!1))}catch{window.alert("Retry failed. Network error."),k(!1)}},p=async()=>{if(window.confirm("Delete this chat permanently? This removes all reviewer output and history. You cannot undo this.")){n(!0);try{(await fetch(`/api/daemon/chats/${a}`,{method:"DELETE"})).ok?(h.push("/runs"),h.refresh()):(window.alert("Couldn't delete this chat — Chorus didn't respond. Try restarting it from your terminal: chorus start"),n(!1))}catch{window.alert("Delete failed. Network error."),n(!1)}}};return(0,d.jsxs)("div",{className:"flex shrink-0 items-center gap-2",children:["cancelled"===b||"failed"===b?(0,d.jsxs)("button",{type:"button",disabled:j,onClick:o,className:"flex items-center gap-1.5 rounded-md border border-primary/40 bg-primary/10 px-3 py-1.5 text-xs font-medium text-primary transition hover:border-primary hover:bg-primary/20 disabled:cursor-not-allowed disabled:opacity-50",children:[(0,d.jsx)(G,{className:`h-3.5 w-3.5 ${j?"animate-spin":""}`}),j?"Restarting…":"Retry"]}):(0,d.jsxs)("button",{type:"button",disabled:c,onClick:async()=>{await fetch(`/api/daemon/chats/${a}/cancel`,{method:"POST"}),g()},className:"flex items-center gap-1.5 rounded-md border border-border bg-card px-3 py-1.5 text-xs font-medium text-muted-foreground transition hover:border-destructive/40 hover:text-destructive disabled:cursor-not-allowed disabled:opacity-50",children:[(0,d.jsx)(m.A,{className:"h-3.5 w-3.5"}),"Cancel"]}),c&&e&&(0,d.jsxs)(f(),{href:`/new?template=${encodeURIComponent(e.id)}`,className:"flex items-center gap-1.5 rounded-md border border-border bg-card px-3 py-1.5 text-xs font-medium text-muted-foreground transition hover:border-primary/40 hover:text-primary",children:[(0,d.jsx)(H,{className:"h-3.5 w-3.5"}),"Run again"]}),(0,d.jsxs)("button",{type:"button",disabled:l,onClick:p,className:"flex items-center gap-1.5 rounded-md border border-border bg-card px-3 py-1.5 text-xs font-medium text-muted-foreground transition hover:border-destructive/40 hover:text-destructive disabled:cursor-not-allowed disabled:opacity-50",children:[(0,d.jsx)(I.A,{className:"h-3.5 w-3.5"}),l?"Deleting…":"Delete"]})]})}var L=c(31650),M=c(46728),N=c(15213),O=c(41970),P=c(5616),Q=c(83720),R=c(75619),S=c(14463),T=c(72069);let U={review:L.A,review_only:L.A,plan:M.A,spec:N.A,tests:O.A,implement:P.A,verify:Q.A,pr:R.A,divergence:n.A,recon:S.A},V={pending:"bg-muted-foreground/20 text-muted-foreground",active:"bg-primary/20 text-primary ring-2 ring-primary/40 ring-offset-2 ring-offset-background",done:"bg-emerald-500/20 text-emerald-300",blocked:"bg-amber-500/20 text-amber-300",skipped:"bg-muted-foreground/10 text-muted-foreground/50 line-through"},W={pending:"queued",active:"active",done:"done",blocked:"blocked",skipped:"skipped"};function X({phases:a,activeIndex:b,states:c,onSelect:e}){return(0,d.jsx)("div",{className:"flex items-center gap-0 overflow-x-auto pb-1",children:a.map((f,g)=>{let h=c[g]??"pending",i=U[f.kind],j=e&&("done"===h||"active"===h);return(0,d.jsxs)("div",{className:"flex items-center",children:[(0,d.jsxs)("button",{type:"button",disabled:!j,onClick:()=>j&&e?.(g),className:`group flex items-center gap-2 rounded-md border px-3 py-1.5 text-left transition ${g===b?"border-primary/40 bg-primary/5":"done"===h?"border-emerald-500/30 bg-emerald-500/5":"blocked"===h?"border-amber-500/40 bg-amber-500/5":"border-border bg-card/30"} ${j?"hover:border-foreground/30":"cursor-default"}`,children:[(0,d.jsx)("span",{className:`grid h-6 w-6 shrink-0 place-items-center rounded-md ${V[h]}`,children:"done"===h?(0,d.jsx)(T.A,{className:"h-3.5 w-3.5"}):"active"===h?(0,d.jsx)(u.A,{className:"h-3.5 w-3.5 animate-spin"}):(0,d.jsx)(i,{className:"h-3.5 w-3.5"})}),(0,d.jsxs)("span",{className:"flex flex-col leading-tight",children:[(0,d.jsxs)("span",{className:"text-[10px] font-medium uppercase tracking-wider text-muted-foreground",children:[String(g+1).padStart(2,"0")," \xb7 ",W[h]]}),(0,d.jsx)("span",{className:`text-xs font-medium ${"skipped"===h?"text-muted-foreground/50":"text-foreground"}`,children:f.name})]})]}),g<a.length-1&&(0,d.jsx)("span",{className:`mx-1.5 h-px w-6 ${"done"===c[g]?"bg-emerald-500/40":"bg-border"}`})]},f.id)})})}function Y({template:a,status:b,totalPhases:c,completedPhaseCount:e,rounds:f,enrichedRounds:g,prUrl:h,shipError:i}){return(0,d.jsx)("div",{className:"border-b border-border bg-card/20 px-4 py-3 sm:px-8",children:(0,d.jsxs)("div",{className:"mx-auto flex w-full flex-col gap-3",children:[h&&(0,d.jsxs)("div",{className:"rounded-md border border-emerald-500/40 bg-emerald-500/5 px-4 py-3",children:[(0,d.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2 text-sm font-medium text-emerald-300",children:[(0,d.jsx)(t.A,{className:"h-4 w-4"}),"Pull request opened"]}),(0,d.jsx)("a",{href:h,target:"_blank",rel:"noreferrer",className:"rounded-md border border-emerald-500/40 bg-emerald-500/10 px-3 py-1.5 text-xs font-medium text-emerald-300 transition hover:bg-emerald-500/20",children:"View PR →"})]}),(0,d.jsx)("p",{className:"mt-1 break-all font-mono text-[11px] text-emerald-200/70",children:h})]}),i&&!h&&(0,d.jsxs)("div",{className:"rounded-md border border-amber-500/40 bg-amber-500/5 px-4 py-3",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2 text-sm font-medium text-amber-300",children:[(0,d.jsx)(p.A,{className:"h-4 w-4"}),"Ship phase blocked"]}),(0,d.jsx)("p",{className:"mt-1 break-words font-mono text-[11px] text-amber-200/80",children:i}),(0,d.jsx)("p",{className:"mt-2 text-[11px] leading-relaxed text-muted-foreground",children:"The reviewers approved the doer's output, but chorus couldn't open a PR. Resolve the issue above and re-run."})]}),a?.phases&&a.phases.length>0&&(0,d.jsx)("div",{className:"flex justify-center",children:(0,d.jsx)(X,{phases:a.phases,activeIndex:Math.min(e,c-1),states:a.phases.map((a,c)=>"approved"===b?"done":"no_review"===b?c<e?"done":"blocked":"failed"===b||"cancelled"===b?c<e?"done":"skipped":c<e?"done":c===e?"active":"pending")})}),(0,d.jsx)(Z,{template:a,status:b,totalPhases:c,completedPhaseCount:e,rounds:f,enrichedRounds:g})]})})}function Z({template:a,status:b,totalPhases:c,completedPhaseCount:e,rounds:f,enrichedRounds:g}){let h=a?.maxRounds??1,i="approved"===b||"merged"===b||"no_review"===b||"blocked"===b||"failed"===b||"cancelled"===b,j=c>1,k=!j&&h>1,l=g[g.length-1],m=l?.participants.filter(a=>"reviewer"===a.role)??[],n=m.length,o=m.filter(a=>a.hasAnswer).length;if(!j&&!k&&!(!j&&!k&&n>1))return null;let p=j?c:k?h:n,q=j?Math.min(e,c):k?Math.min(Math.max(f.length,1),h):o,r=j&&i?p:q,s=j?`${r} / ${p} phases`:k?`Round ${r} / ${p}`:`${r} / ${p} complete`;return(0,d.jsxs)("div",{className:"mx-auto flex w-full max-w-xs items-center gap-2",children:[(0,d.jsx)("div",{className:"flex h-1 flex-1 overflow-hidden rounded-full bg-muted",children:(0,d.jsx)("div",{className:`transition-[width] duration-700 ease-out ${"approved"===b?"bg-emerald-400":"bg-primary"}`,style:{width:`${r/p*100}%`}})}),(0,d.jsx)("span",{className:"shrink-0 font-mono text-[10px] tabular-nums text-muted-foreground",children:s})]})}function $({chatId:a,initialStatus:b,initialRounds:c,templateId:e,template:g,work:k,projectName:m,initialPrUrl:n,initialShipError:o,initialVerdict:p,demoDataSource:q}){var s,t;let[u,v]=(0,i.useState)(b),[w,x]=(0,i.useState)(p),[y,B]=(0,i.useState)(c),[G,H]=(0,i.useState)(new Set),[I,J]=(0,i.useState)(n),[L,M]=(0,i.useState)(o),[N,O]=(0,i.useState)({}),[P,Q]=(0,i.useState)(-1),[R,S]=(0,i.useState)({}),[T,U]=(0,i.useState)([]),V=E.includes(u),W=(s=u,t=w,"approved"===s&&t&&"approved"!==t?"request_changes"===t?{text:"REVIEW \xb7 CHANGES REQUESTED",color:"amber"}:{text:`REVIEW \xb7 ${t.toUpperCase()}`,color:"amber"}:C[s]??{text:s.toUpperCase(),color:"muted"}),X=g?.phases?.length??1,Z=(0,i.useMemo)(()=>"approved"===u||"merged"===u||"no_review"===u||"blocked"===u?X:"failed"===u||"cancelled"===u?0:Math.min(Math.max(0,P+1),X),[u,X,P]),_=(0,i.useMemo)(()=>(0,j.$)(g),[g]),aa=(0,i.useMemo)(()=>(function(a,b,c){if(!b?.phases?.length)return a;let d=(0,j.$)(b),e=function(a,b){let c=a.phases[0],d=(a,b)=>b?.[0]??(0,r.YM)(a),e=[];if(!b){let a=c.doer.models?.[0],b=F(c.doer.lineage,a);e.push({role:"doer",lineage:b,model:a??d(b,c.doer.models)})}for(let[a,b]of(c.reviewer?.candidatesWithModels??[]).entries()){let c=b.models?.[0],f=F(b.lineage,c);e.push({role:"reviewer",lineage:f,model:c??d(f,b.models),reviewerIdx:a})}return e}(b,d);return(0===a.length?[{round:1,participants:[]}]:a).map(a=>{let b=[],d=new Set;for(let f of e){let e="doer"===f.role?`doer-${f.lineage}`:`reviewer-${f.lineage}-${f.reviewerIdx}`,g=a.participants.find(a=>"doer"===f.role?"doer"===a.role&&a.lineage===f.lineage:"reviewer"===a.role&&a.lineage===f.lineage&&parseInt(a.participant.match(/-(\d+)$/)?.[1]??"0",10)===f.reviewerIdx);g?(b.push({...g,model:f.model,...c[g.participant]?{warnings:c[g.participant]}:{}}),d.add(g.participant)):b.push({participant:e,role:f.role,agentName:A[f.lineage]??f.lineage,lineage:f.lineage,hasAnswer:!1,model:f.model,pending:!0,...c[e]?{warnings:c[e]}:{}})}for(let e of a.participants)d.has(e.participant)||b.push({...e,...c[e.participant]?{warnings:c[e.participant]}:{}});return{...a,participants:b}})})(y,g,R),[y,g,R]),ab=aa[aa.length-1],ac=aa.slice(0,-1);return(0,d.jsxs)("div",{className:"flex h-full flex-col",children:[(0,d.jsxs)("div",{className:"sticky top-0 z-20 border-b border-border bg-card/80 backdrop-blur-sm px-4 py-3 sm:px-8",children:[(0,d.jsxs)("div",{className:"mb-2 flex w-full items-center justify-between gap-3",children:[(0,d.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,d.jsxs)(f(),{href:"/runs",className:"flex shrink-0 items-center gap-1 text-xs text-muted-foreground transition hover:text-foreground",children:[(0,d.jsx)(h,{className:"h-3 w-3"}),(0,d.jsx)("span",{children:m??"Runs"})]}),(0,d.jsx)("span",{className:"text-muted-foreground/40",children:"\xb7"}),(0,d.jsxs)("span",{title:W.text,className:"inline-flex shrink-0 items-center gap-1.5 text-[11px] uppercase tracking-wider text-muted-foreground",children:[(0,d.jsx)("span",{className:`h-2 w-2 shrink-0 rounded-full ${D[W.color]} ${V?"":"animate-pulse-soft"}`}),u]}),(g||e)&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("span",{className:"text-muted-foreground/40",children:"\xb7"}),(0,d.jsxs)(f(),{href:`/templates${g?`#${encodeURIComponent(g.id)}`:""}`,title:g?`Template: ${g.name}`:`Template (deleted): ${e}`,className:"inline-flex min-w-0 shrink items-center gap-1.5 text-[11px] text-muted-foreground transition hover:text-primary",children:[(0,d.jsx)("span",{className:"font-mono uppercase tracking-wider",children:"tpl"}),(0,d.jsx)("span",{className:"truncate font-medium text-foreground",children:g?.name??e})]})]})]}),(0,d.jsx)(K,{chatId:a,status:u,isTerminal:V,template:g,onCancel:()=>v("cancelled")})]}),(0,d.jsx)("div",{className:"min-w-0",children:(0,d.jsx)(l,{work:k})})]}),(0,d.jsx)(Y,{template:g,status:u,totalPhases:X,completedPhaseCount:Z,rounds:y,enrichedRounds:aa,prUrl:I,shipError:L}),(0,d.jsx)("div",{className:"flex-1 overflow-y-auto px-4 py-6 sm:px-8",children:(0,d.jsxs)("div",{className:"mx-auto w-full space-y-8",children:[0===y.length&&(0,d.jsx)("div",{className:"rounded-lg border border-dashed border-border p-12 text-center text-sm text-muted-foreground",children:"Waiting for first phase to start…"}),ab&&(0,d.jsx)(z,{round:ab,isLatest:!0,activeFor:a=>{let b=`${a.participant}-`;for(let a of G)if(a.startsWith(b))return!0;return!1},liveTails:N,chatTerminal:V,reviewOnly:_,chatId:a,swaps:T}),!_&&ac.length>0&&(0,d.jsxs)("details",{className:"rounded-lg border border-border bg-card",children:[(0,d.jsxs)("summary",{className:"cursor-pointer px-4 py-3 text-xs uppercase tracking-wider text-muted-foreground hover:text-foreground",children:["Earlier rounds (",ac.length,")"]}),(0,d.jsx)("div",{className:"space-y-6 border-t border-border p-4",children:ac.slice().reverse().map(a=>(0,d.jsx)(z,{round:a,activeFor:()=>!1,liveTails:{},chatTerminal:V,swaps:T},a.round))})]})]})})]})}},75619:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(52449).A)("git-pull-request",[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M13 6h3a2 2 0 0 1 2 2v7",key:"1yeb86"}],["line",{x1:"6",x2:"6",y1:"9",y2:"21",key:"rroup"}]])},83720:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(52449).A)("flask-conical",[["path",{d:"M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2",key:"18mbvz"}],["path",{d:"M6.453 15h11.094",key:"3shlmq"}],["path",{d:"M8.5 2h7",key:"csnxdl"}]])},91458:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(52449).A)("shuffle",[["path",{d:"m18 14 4 4-4 4",key:"10pe0f"}],["path",{d:"m18 2 4 4-4 4",key:"pucp1d"}],["path",{d:"M2 18h1.973a4 4 0 0 0 3.3-1.7l5.454-8.6a4 4 0 0 1 3.3-1.7H22",key:"1ailkh"}],["path",{d:"M2 6h1.972a4 4 0 0 1 3.6 2.2",key:"km57vx"}],["path",{d:"M22 18h-6.041a4 4 0 0 1-3.3-1.8l-.359-.45",key:"os18l9"}]])},95047:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(52449).A)("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]])}};
@@ -1 +1 @@
1
- "use strict";exports.id=642,exports.ids=[642],exports.modules={5616:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(52449).A)("code-xml",[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]])},6506:(a,b,c)=>{c.d(b,{JR:()=>k,QJ:()=>f,VW:()=>g,YM:()=>m,m_:()=>h,r2:()=>n,u5:()=>j,x0:()=>l,ze:()=>d});let d={anthropic:"Claude",openai:"Codex",google:"Gemini",opencode:"OpenCode",moonshot:"Kimi",local:"Local LLM"},e={anthropic:"bg-violet-400",openai:"bg-orange-400",google:"bg-blue-400",opencode:"bg-emerald-400",moonshot:"bg-pink-400",local:"bg-teal-400"};function f(a){return a?d[a]??a:""}function g(a){return a?e[a]??"bg-muted":"bg-muted"}let h={claude:"Claude",codex:"Codex",gemini:"Gemini",opencode:"OpenCode",kimi:"Kimi",openrouter:"OpenRouter",local:"Local LLM"},i={claude:"bg-violet-400",codex:"bg-orange-400",gemini:"bg-blue-400",opencode:"bg-emerald-400",kimi:"bg-pink-400",openrouter:"bg-cyan-400",local:"bg-teal-400"};function j(a){return a?h[a]??a:""}function k(a){return a?i[a]??"bg-muted":"bg-muted"}let l={claude:"claude-opus-4-7",codex:"gpt-5.5",gemini:"gemini-2.5-pro",opencode:"kimi-k2.6",kimi:"kimi-k2.6",openrouter:"",local:""};function m(a){if(a)return l[a]}let n={claude:{dot:"bg-violet-400",ring:"ring-violet-400/40",gradient:"bg-gradient-to-b from-violet-500/15 to-card"},codex:{dot:"bg-orange-400",ring:"ring-orange-400/40",gradient:"bg-gradient-to-b from-orange-500/15 to-card"},gemini:{dot:"bg-blue-400",ring:"ring-blue-400/40",gradient:"bg-gradient-to-b from-blue-500/15 to-card"},opencode:{dot:"bg-emerald-400",ring:"ring-emerald-400/40",gradient:"bg-gradient-to-b from-emerald-500/15 to-card"},kimi:{dot:"bg-pink-400",ring:"ring-pink-400/40",gradient:"bg-gradient-to-b from-pink-500/15 to-card"},openrouter:{dot:"bg-cyan-400",ring:"ring-cyan-400/40",gradient:"bg-gradient-to-b from-cyan-500/15 to-card"},local:{dot:"bg-teal-400",ring:"ring-teal-400/40",gradient:"bg-gradient-to-b from-teal-500/15 to-card"}}},55932:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(52449).A)("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]])},64519:(a,b,c)=>{c.d(b,{Cf:()=>l,L3:()=>n,c7:()=>m,lG:()=>h,rr:()=>o,zM:()=>i});var d=c(66722);c(31131);var e=c(90057),f=c(18694),g=c(16276);function h({...a}){return(0,d.jsx)(f.bL,{"data-slot":"dialog",...a})}function i({...a}){return(0,d.jsx)(f.l9,{"data-slot":"dialog-trigger",...a})}function j({...a}){return(0,d.jsx)(f.ZL,{"data-slot":"dialog-portal",...a})}function k({className:a,...b}){return(0,d.jsx)(f.hJ,{"data-slot":"dialog-overlay",className:(0,g.cn)("fixed inset-0 z-50 bg-black/75 backdrop-blur-sm data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0",a),...b})}function l({className:a,children:b,showCloseButton:c=!0,...h}){return(0,d.jsxs)(j,{"data-slot":"dialog-portal",children:[(0,d.jsx)(k,{}),(0,d.jsxs)(f.UC,{"data-slot":"dialog-content",className:(0,g.cn)("fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border bg-background p-6 shadow-lg duration-200 outline-none data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 sm:max-w-lg",a),...h,children:[b,c&&(0,d.jsxs)(f.bm,{"data-slot":"dialog-close",className:"absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[(0,d.jsx)(e.A,{}),(0,d.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})}function m({className:a,...b}){return(0,d.jsx)("div",{"data-slot":"dialog-header",className:(0,g.cn)("flex flex-col gap-2 text-center sm:text-left",a),...b})}function n({className:a,...b}){return(0,d.jsx)(f.hE,{"data-slot":"dialog-title",className:(0,g.cn)("text-lg leading-none font-semibold",a),...b})}function o({className:a,...b}){return(0,d.jsx)(f.VY,{"data-slot":"dialog-description",className:(0,g.cn)("text-sm text-muted-foreground",a),...b})}c(72827)},65850:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(52449).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"}]])},66635:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(52449).A)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},72827:(a,b,c)=>{c.d(b,{$:()=>i});var d=c(66722);c(31131);var e=c(82786),f=c(29399),g=c(16276);let h=(0,e.F)("inline-flex shrink-0 items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",xs:"h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-xs":"size-6 rounded-md [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function i({className:a,variant:b="default",size:c="default",asChild:e=!1,...j}){let k=e?f.bL:"button";return(0,d.jsx)(k,{"data-slot":"button","data-variant":b,"data-size":c,className:(0,g.cn)(h({variant:b,size:c,className:a})),...j})}},78770:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(52449).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"}]])},82786:(a,b,c)=>{c.d(b,{F:()=>g});var d=c(84602);let e=a=>"boolean"==typeof a?`${a}`:0===a?"0":a,f=d.$,g=(a,b)=>c=>{var d;if((null==b?void 0:b.variants)==null)return f(a,null==c?void 0:c.class,null==c?void 0:c.className);let{variants:g,defaultVariants:h}=b,i=Object.keys(g).map(a=>{let b=null==c?void 0:c[a],d=null==h?void 0:h[a];if(null===b)return null;let f=e(b)||e(d);return g[a][f]}),j=c&&Object.entries(c).reduce((a,b)=>{let[c,d]=b;return void 0===d||(a[c]=d),a},{});return f(a,i,null==b||null==(d=b.compoundVariants)?void 0:d.reduce((a,b)=>{let{class:c,className:d,...e}=b;return Object.entries(e).every(a=>{let[b,c]=a;return Array.isArray(c)?c.includes({...h,...j}[b]):({...h,...j})[b]===c})?[...a,c,d]:a},[]),null==c?void 0:c.class,null==c?void 0:c.className)}}};
1
+ "use strict";exports.id=642,exports.ids=[642],exports.modules={5616:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(52449).A)("code-xml",[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]])},6506:(a,b,c)=>{c.d(b,{JR:()=>k,QJ:()=>f,VW:()=>g,YM:()=>m,m_:()=>h,r2:()=>n,u5:()=>j,x0:()=>l,ze:()=>d});let d={anthropic:"Claude",openai:"Codex",google:"Gemini",opencode:"OpenCode",moonshot:"Kimi",local:"Local LLM",grok:"Grok"},e={anthropic:"bg-violet-400",openai:"bg-orange-400",google:"bg-blue-400",opencode:"bg-emerald-400",moonshot:"bg-pink-400",local:"bg-teal-400",grok:"bg-slate-400"};function f(a){return a?d[a]??a:""}function g(a){return a?e[a]??"bg-muted":"bg-muted"}let h={claude:"Claude",codex:"Codex",gemini:"Gemini",opencode:"OpenCode",kimi:"Kimi",openrouter:"OpenRouter",local:"Local LLM",grok:"Grok"},i={claude:"bg-violet-400",codex:"bg-orange-400",gemini:"bg-blue-400",opencode:"bg-emerald-400",kimi:"bg-pink-400",openrouter:"bg-cyan-400",local:"bg-teal-400",grok:"bg-slate-400"};function j(a){return a?h[a]??a:""}function k(a){return a?i[a]??"bg-muted":"bg-muted"}let l={claude:"claude-opus-4-7",codex:"gpt-5.5",gemini:"gemini-2.5-pro",opencode:"kimi-k2.6",kimi:"kimi-k2.6",openrouter:"",local:"",grok:"grok-build"};function m(a){if(a)return l[a]}let n={claude:{dot:"bg-violet-400",ring:"ring-violet-400/40",gradient:"bg-gradient-to-b from-violet-500/15 to-card"},codex:{dot:"bg-orange-400",ring:"ring-orange-400/40",gradient:"bg-gradient-to-b from-orange-500/15 to-card"},gemini:{dot:"bg-blue-400",ring:"ring-blue-400/40",gradient:"bg-gradient-to-b from-blue-500/15 to-card"},opencode:{dot:"bg-emerald-400",ring:"ring-emerald-400/40",gradient:"bg-gradient-to-b from-emerald-500/15 to-card"},kimi:{dot:"bg-pink-400",ring:"ring-pink-400/40",gradient:"bg-gradient-to-b from-pink-500/15 to-card"},openrouter:{dot:"bg-cyan-400",ring:"ring-cyan-400/40",gradient:"bg-gradient-to-b from-cyan-500/15 to-card"},local:{dot:"bg-teal-400",ring:"ring-teal-400/40",gradient:"bg-gradient-to-b from-teal-500/15 to-card"},grok:{dot:"bg-slate-400",ring:"ring-slate-400/40",gradient:"bg-gradient-to-b from-slate-500/15 to-card"}}},55932:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(52449).A)("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]])},64519:(a,b,c)=>{c.d(b,{Cf:()=>l,L3:()=>n,c7:()=>m,lG:()=>h,rr:()=>o,zM:()=>i});var d=c(66722);c(31131);var e=c(90057),f=c(18694),g=c(16276);function h({...a}){return(0,d.jsx)(f.bL,{"data-slot":"dialog",...a})}function i({...a}){return(0,d.jsx)(f.l9,{"data-slot":"dialog-trigger",...a})}function j({...a}){return(0,d.jsx)(f.ZL,{"data-slot":"dialog-portal",...a})}function k({className:a,...b}){return(0,d.jsx)(f.hJ,{"data-slot":"dialog-overlay",className:(0,g.cn)("fixed inset-0 z-50 bg-black/75 backdrop-blur-sm data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0",a),...b})}function l({className:a,children:b,showCloseButton:c=!0,...h}){return(0,d.jsxs)(j,{"data-slot":"dialog-portal",children:[(0,d.jsx)(k,{}),(0,d.jsxs)(f.UC,{"data-slot":"dialog-content",className:(0,g.cn)("fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border bg-background p-6 shadow-lg duration-200 outline-none data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 sm:max-w-lg",a),...h,children:[b,c&&(0,d.jsxs)(f.bm,{"data-slot":"dialog-close",className:"absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[(0,d.jsx)(e.A,{}),(0,d.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})}function m({className:a,...b}){return(0,d.jsx)("div",{"data-slot":"dialog-header",className:(0,g.cn)("flex flex-col gap-2 text-center sm:text-left",a),...b})}function n({className:a,...b}){return(0,d.jsx)(f.hE,{"data-slot":"dialog-title",className:(0,g.cn)("text-lg leading-none font-semibold",a),...b})}function o({className:a,...b}){return(0,d.jsx)(f.VY,{"data-slot":"dialog-description",className:(0,g.cn)("text-sm text-muted-foreground",a),...b})}c(72827)},65850:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(52449).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"}]])},66635:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(52449).A)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},72827:(a,b,c)=>{c.d(b,{$:()=>i});var d=c(66722);c(31131);var e=c(82786),f=c(29399),g=c(16276);let h=(0,e.F)("inline-flex shrink-0 items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",xs:"h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-xs":"size-6 rounded-md [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function i({className:a,variant:b="default",size:c="default",asChild:e=!1,...j}){let k=e?f.bL:"button";return(0,d.jsx)(k,{"data-slot":"button","data-variant":b,"data-size":c,className:(0,g.cn)(h({variant:b,size:c,className:a})),...j})}},78770:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(52449).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"}]])},82786:(a,b,c)=>{c.d(b,{F:()=>g});var d=c(84602);let e=a=>"boolean"==typeof a?`${a}`:0===a?"0":a,f=d.$,g=(a,b)=>c=>{var d;if((null==b?void 0:b.variants)==null)return f(a,null==c?void 0:c.class,null==c?void 0:c.className);let{variants:g,defaultVariants:h}=b,i=Object.keys(g).map(a=>{let b=null==c?void 0:c[a],d=null==h?void 0:h[a];if(null===b)return null;let f=e(b)||e(d);return g[a][f]}),j=c&&Object.entries(c).reduce((a,b)=>{let[c,d]=b;return void 0===d||(a[c]=d),a},{});return f(a,i,null==b||null==(d=b.compoundVariants)?void 0:d.reduce((a,b)=>{let{class:c,className:d,...e}=b;return Object.entries(e).every(a=>{let[b,c]=a;return Array.isArray(c)?c.includes({...h,...j}[b]):({...h,...j})[b]===c})?[...a,c,d]:a},[]),null==c?void 0:c.class,null==c?void 0:c.className)}}};
@@ -1 +1 @@
1
- exports.id=681,exports.ids=[681],exports.modules={9446:()=>{},11305:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>e});var d=c(39821);let e=async a=>[{type:"image/x-icon",sizes:"16x16",url:(0,d.fillMetadataSegment)(".",await a.params,"favicon.ico",!0)+"?b67a357858af4169"}]},11897:(a,b,c)=>{"use strict";c.d(b,{K7:()=>i,UT:()=>f,dW:()=>g,qI:()=>h});var d=c(34291);function e(a){return{id:a.id,label:a.label,one_liner:a.one_liner,system_prompt:a.system_prompt,recommended_lineage:a.recommended_lineage,builtin:!!a.builtin,forked_from:a.forked_from??null,created_at:a.created_at,updated_at:a.updated_at}}async function f(){return(await (0,d.T)("/personas")).items.map(e)}async function g(a){return e(await (0,d.T)(`/personas/${encodeURIComponent(a)}`))}async function h(a){return e(await (0,d.T)("/personas",{method:"POST",body:JSON.stringify(a)}))}async function i(a){await (0,d.T)(`/personas/${encodeURIComponent(a)}`,{method:"DELETE"})}},16276:(a,b,c)=>{"use strict";c.d(b,{cn:()=>f});var d=c(84602),e=c(60237);function f(...a){return(0,e.QP)((0,d.$)(a))}},29843:(a,b,c)=>{"use strict";c.d(b,{createVoice:()=>g,listVoices:()=>e,updateVoice:()=>f});var d=c(34291);async function e(a){return(await (0,d.T)(`/voices${function(a){if(!a)return"";let b=[];return a.lineage&&b.push(`lineage=${encodeURIComponent(a.lineage)}`),a.source&&b.push(`source=${encodeURIComponent(a.source)}`),a.provider&&b.push(`provider=${encodeURIComponent(a.provider)}`),void 0!==a.enabled&&b.push(`enabled=${a.enabled?"true":"false"}`),0===b.length?"":`?${b.join("&")}`}(a)}`)).items}async function f(a,b){return(0,d.T)(`/voices/${encodeURIComponent(a)}`,{method:"PUT",body:JSON.stringify(b)})}async function g(a){return(0,d.T)("/voices",{method:"POST",body:JSON.stringify(a)})}},31915:(a,b,c)=>{Promise.resolve().then(c.t.bind(c,10186,23)),Promise.resolve().then(c.t.bind(c,37373,23)),Promise.resolve().then(c.t.bind(c,76941,23)),Promise.resolve().then(c.t.bind(c,79652,23)),Promise.resolve().then(c.t.bind(c,25980,23)),Promise.resolve().then(c.t.bind(c,85080,23)),Promise.resolve().then(c.t.bind(c,62753,23)),Promise.resolve().then(c.bind(c,68936))},32673:(a,b,c)=>{"use strict";c.d(b,{A1:()=>o,Ci:()=>p,Df:()=>g,Dl:()=>n,Ep:()=>h,WH:()=>r,WK:()=>q,Wt:()=>m,Xx:()=>i,fk:()=>e,iW:()=>f,lT:()=>l,nr:()=>k,oD:()=>j});var d=c(34291);async function e(){return(await (0,d.T)("/onboard/detect-clis")).items}async function f(a,b){return(0,d.T)("/onboard/validate-cli-path",{method:"POST",body:JSON.stringify({id:a,path:b})})}async function g(a,b){return(0,d.T)("/onboard/save-cli-path",{method:"POST",body:JSON.stringify({id:a,path:b})})}async function h(a){return(0,d.T)("/settings/permissions",{method:"PUT",body:JSON.stringify(a)})}async function i(a){return(0,d.T)("/settings",{method:"PUT",body:JSON.stringify(a)})}async function j(){return(0,d.T)("/settings/transport")}async function k(a){return(0,d.T)("/settings/transport",{method:"PUT",body:JSON.stringify(a)})}async function l(){return(0,d.T)("/settings/concurrency")}async function m(a){return(0,d.T)("/settings/concurrency",{method:"PUT",body:JSON.stringify(a)})}async function n(){return(0,d.T)("/settings/billing")}async function o(a){return(0,d.T)("/settings/billing",{method:"PUT",body:JSON.stringify(a)})}async function p(){return(0,d.T)("/settings/telemetry")}async function q(a){return(0,d.T)("/settings/telemetry",{method:"PUT",body:JSON.stringify({enabled:a})})}async function r(a,b){return(0,d.T)(`/secrets/${a}`,{method:"PUT",body:JSON.stringify(b)})}},34291:(a,b,c)=>{"use strict";c.d(b,{$:()=>g,T:()=>h});let d="/api/v1";async function e(){let a=process.env.PORT;return a?`http://127.0.0.1:${a}/api/daemon`:"http://127.0.0.1:5050/api/daemon"}async function f(){return await e()}class g extends Error{constructor(a,b,c,d){super(c),this.code=a,this.statusCode=b,this.details=d,this.name="DaemonError"}}async function h(a,b={}){let c=await f(),e=a.startsWith("/")?a:`/${a}`,i=e===d||e.startsWith(`${d}/`)?e:`${d}${e}`,j=`${c.replace(/\/$/,"")}${i}`;try{let a=await fetch(j,{...b,headers:{"Content-Type":"application/json",...b.headers}}),c=await a.json().catch(()=>({ok:!1,error:{code:"parse_error",message:"Failed to parse response"}}));if(!c.ok){if("string"==typeof c.error&&"string"==typeof c.message)throw new g(c.error,a.status,c.message);throw new g(c.error?.code||"unknown",a.status,c.error?.message||`Daemon returned ${a.status}`,c.error?.details)}return c.data}catch(a){if(a instanceof g)throw a;if(a instanceof TypeError&&a.message.includes("fetch"))throw new g("connection_failed",0,"Failed to connect to Chorus daemon. Is it running?");throw new g("unknown",0,a instanceof Error?a.message:"Unknown error")}}},35075:(a,b,c)=>{"use strict";c.d(b,{Ay:()=>f,jb:()=>e});var d=c(34291);async function e(a){return(0,d.T)(`/orchestrators/${a}/connect`,{method:"POST"})}async function f(){return(0,d.T)("/orchestrators/opencode/models")}},56019:()=>{},61296:(a,b,c)=>{"use strict";c.d(b,{U:()=>e});var d=c(66722);function e({className:a}){return(0,d.jsxs)("svg",{viewBox:"0 0 32 32","aria-hidden":"true",className:a,fill:"currentColor",children:[(0,d.jsx)("circle",{cx:"11",cy:"20",r:"3.2",fillOpacity:"0.55"}),(0,d.jsx)("circle",{cx:"21",cy:"20",r:"3.2",fillOpacity:"0.55"}),(0,d.jsx)("circle",{cx:"16",cy:"11",r:"3.2"})]})}},65979:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>k,metadata:()=>i,viewport:()=>j});var d=c(87796),e=c(13655),f=c.n(e),g=c(44859),h=c.n(g);c(75234);let i={title:"Chorus — many voices, one chorus",description:"The polished orchestrator over your AI fleet. Paste a task. Pick a template. Watch multiple LLMs reach consensus."},j={width:"device-width",initialScale:1};function k({children:a}){return(0,d.jsx)("html",{lang:"en",className:`dark ${f().variable} ${h().variable} h-full antialiased`,children:(0,d.jsx)("body",{className:"min-h-full flex flex-col bg-background text-foreground",children:a})})}},66152:(a,b,c)=>{"use strict";c.d(b,{$v:()=>d.$,jb:()=>s.jb,RL:()=>h,K7:()=>t.K7,I7:()=>q,dW:()=>t.dW,Ih:()=>g,UT:()=>t.UT,eG:()=>o,qI:()=>t.qI,AI:()=>p,Xx:()=>r.Xx,WH:()=>r.WH});var d=c(34291),e=c(94755);function f(a){let b,c;if(a.attached_files)try{let c=JSON.parse(a.attached_files);Array.isArray(c)&&(b=c)}catch{}if(a.template_snapshot)try{let b=JSON.parse(a.template_snapshot),d=e._i.safeParse(b);d.success&&(c={...d.data,phases:d.data.phases.map(a=>({...a,reviewer:a.reviewer?{...a.reviewer,candidatesWithModels:a.reviewer.candidatesWithModels??(a.reviewer.candidates??[]).map(a=>({lineage:a.lineage,models:a.models??[],...void 0!==a.persona?{persona:a.persona}:{}}))}:a.reviewer}))})}catch{}return{id:a.id,slug:a.slug??void 0,work:a.work,templateId:a.template_id,status:a.status,currentPhaseIdx:a.current_phase_idx??0,yolo:!!a.yolo,attachedFiles:b,repoPath:a.repo_path??void 0,prUrl:a.pr_url??void 0,shipError:a.ship_error??void 0,artifact:a.artifact??void 0,verdict:a.verdict??void 0,templateSnapshot:c,createdAt:a.created_at,updatedAt:a.updated_at,finishedAt:a.finished_at??void 0}}async function g(a){let b=new URLSearchParams;a?.limit&&b.append("limit",a.limit.toString()),a?.offset&&b.append("offset",a.offset.toString()),a?.status&&b.append("status",a.status);let c=b.toString();return(await (0,d.T)(`/chats${c?`?${c}`:""}`)).items.map(f)}async function h(a){return f(await (0,d.T)("/chats",{method:"POST",body:JSON.stringify(a)}))}var i=c(11022);let j=new Set(["anthropic","openai","google","opencode","moonshot","any","xai"]),k={anthropic:"claude",openai:"codex",google:"gemini",opencode:"opencode",moonshot:"kimi",any:"claude",xai:"opencode"};function l(a){return a?k[a]??"claude":"claude"}function m(a){let b=a.kind??"review";return{id:a.id??"phase",name:a.title??a.name??a.id??"Phase",description:a.description??"",kind:b,gate:"auto",doer:{lineage:l(a.doer?.lineage),models:a.doer?.models??[],...a.doer?.persona?{persona:a.doer.persona}:{}},reviewer:{require:a.reviewer?.require??1,crossLineage:a.reviewer?.crossLineage??!0,candidates:(a.reviewer?.candidates??[]).map(a=>l(a.lineage)).filter(a=>j.has(Object.keys(k).find(b=>k[b]===a)??"")),candidatesWithModels:(a.reviewer?.candidates??[]).map(a=>({lineage:l(a.lineage),models:a.models??[],...a.persona?{persona:a.persona}:{}}))},inputs:{include:a.inputs?.include??[],exclude:a.inputs?.exclude??[]},iterate:{max:a.iterate?.maxRounds??2,onMax:"ask-user"},blindSpots:[],execution:"parallel",builtin:!0,..."review_only"===b?{artifact:{label:a.artifact?.label??"Artifact to review",hint:a.artifact?.hint??"Paste a unified diff, a markdown draft, code, or any text blob.",maxBytes:a.artifact?.maxBytes??1048576}}:{}}}function n(a){let b={};try{b=i.parse(a.yaml)??{}}catch{}let c="majority";"number"==typeof b.agreementThreshold?c=b.agreementThreshold>=.99?"unanimous":b.agreementThreshold>=.5?"majority":"any":"string"==typeof b.agreementThreshold&&(c=b.agreementThreshold);let d=(b.phases??[]).map(m);return{id:a.id,name:b.name??a.id,description:b.description??"",category:function(a,b){if(a.category)return a.category;let c=b.toLowerCase();return c.includes("bug")||c.includes("debug")||c.includes("diagnose")?"debug":c.includes("plan")||c.includes("architect")?"plan":c.includes("decide")||c.includes("decision")?"decide":"review"}(b,a.id),phases:d,agreementThreshold:c,onThresholdMet:"auto-finalize"===b.onThresholdMet?"auto-finalize":"ask-user",maxRounds:b.maxRounds??3,driver:"external",driverHandoff:!1,verificationGate:"auto",costCapUsd:0,yoloDefault:b.yoloDefault??!1,estimatedBaselineTokens:b.estimatedBaselineTokens,onError:"ask-user",notify:"dashboard-only",yaml:a.yaml,authorHandle:b.author??"chorus",forks:0,popularity:0,source:a.source,isComplete:"number"==typeof a.is_complete?0!==a.is_complete:!1!==a.is_complete}}async function o(){return(await (0,d.T)("/templates")).items.map(n)}async function p(a){return n(await (0,d.T)("/templates",{method:"POST",body:JSON.stringify(a)}))}async function q(a){await (0,d.T)(`/templates/${encodeURIComponent(a)}`,{method:"DELETE"})}var r=c(32673),s=c(35075),t=c(11897);c(29843)},68312:(a,b,c)=>{Promise.resolve().then(c.t.bind(c,10312,23))},75234:()=>{},78040:(a,b,c)=>{Promise.resolve().then(c.t.bind(c,10186,23))},79182:()=>{},89796:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>e});var d=c(39821);let e=async a=>[{type:"image/svg+xml",sizes:"any",url:(0,d.fillMetadataSegment)(".",await a.params,"icon.svg",!0)+"?79b94d624cb60ac1"}]},92971:()=>{},94755:(a,b,c)=>{"use strict";c.d(b,{_i:()=>o});var d=c(74890),e=c(78350);let f=d.ai().int().min(3e4).max(36e5).optional(),g=d.k5(["anthropic","openai","google","opencode","moonshot","openrouter","local","any"]),h=d.k5(["anthropic","openai","google","opencode","moonshot","openrouter","local"]),i=d.Ik({require:d.ai().int().min(0).default(1),crossLineage:d.zM().default(!0),candidates:d.YO(d.Ik({lineage:h,models:d.YO(d.Yj()).optional(),persona:d.Yj().optional()}))}).superRefine((a,b)=>{if(a.require>a.candidates.length&&b.addIssue({code:e.eq.custom,path:["require"],message:`reviewer.require (${a.require}) cannot exceed reviewer.candidates.length (${a.candidates.length}). Either lower require or add more candidates.`}),a.crossLineage&&a.require>0){let c=new Set(a.candidates.map(a=>a.lineage)).size;a.require>c&&b.addIssue({code:e.eq.custom,path:["require"],message:`reviewer.require (${a.require}) exceeds distinct lineages (${c}) in candidates with crossLineage=true. Either lower require, disable crossLineage, or add candidates from more lineages.`})}}),j=d.Ik({include:d.YO(d.Yj()).default([]),exclude:d.YO(d.Yj()).default([])}).default({include:[],exclude:[]}),k=d.Ik({maxRounds:d.ai().int().min(1).default(2),onDisagreement:d.k5(["continue","escalate","accept-doer"]).default("continue"),shareSessionAcrossRounds:d.zM().default(!0),shareSessionAcrossPhases:d.zM().default(!1)}).default({maxRounds:2,onDisagreement:"continue",shareSessionAcrossRounds:!0,shareSessionAcrossPhases:!1}),l=d.Ik({id:d.Yj().min(1),kind:d.k5(["plan","spec","tests","implement","review","verify","divergence"]),title:d.Yj().min(1),description:d.Yj().optional(),doer:d.Ik({lineage:g,models:d.YO(d.Yj()).optional(),persona:d.Yj().optional()}),reviewer:i.optional(),inputs:j,iterate:k,timeoutMs:f}),m=d.Ik({id:d.Yj().min(1),kind:d.eu("review_only"),title:d.Yj().min(1),description:d.Yj().optional(),reviewer:i,artifact:d.Ik({label:d.Yj().min(1).default("Artifact to review"),hint:d.Yj().default("Paste a unified diff, a markdown draft, code, or any text blob."),maxBytes:d.ai().int().min(1).default(1048576)}).default({label:"Artifact to review",hint:"Paste a unified diff, a markdown draft, code, or any text blob.",maxBytes:1048576}),inputs:j,timeoutMs:f}),n=d.gM("kind",[l.extend({kind:d.eu("plan")}),l.extend({kind:d.eu("spec")}),l.extend({kind:d.eu("tests")}),l.extend({kind:d.eu("implement")}),l.extend({kind:d.eu("review")}),l.extend({kind:d.eu("verify")}),l.extend({kind:d.eu("divergence")}),m]),o=d.Ik({id:d.Yj().min(1),name:d.Yj().min(1),description:d.Yj().min(1),author:d.Yj().default("chorus"),agreementThreshold:d.ai().min(0).max(1).default(.66),onThresholdMet:d.k5(["merge","ask","review"]).default("ask"),maxRounds:d.ai().int().min(1).default(3),yoloDefault:d.zM().default(!1),estimatedBaselineTokens:d.ai().int().min(0).optional(),phases:d.YO(n).min(1).refine(a=>{let b=a.filter(a=>"review_only"===a.kind).length;return 0===b||1===b&&1===a.length},{message:"review_only phases cannot be mixed with other phase kinds and only one is allowed (hybrid templates are out of scope)"}).refine(a=>{let b=a.map(a=>a.id);return new Set(b).size===b.length},{message:"phase ids must be unique"}),ship:d.Ik({enabled:d.zM().default(!1),baseBranch:d.Yj().optional(),branchPattern:d.Yj().default("chorus/{chatId}"),titleTemplate:d.Yj().default("chorus: {template} via #{chatId}")}).optional(),fallback:d.Ik({doer:d.YO(d.Ik({lineage:g,models:d.YO(d.Yj()).min(1),persona:d.Yj().optional()})).optional(),reviewer:d.YO(d.Ik({lineage:h,models:d.YO(d.Yj()).min(1),persona:d.Yj().optional()})).optional()}).optional()})},94963:(a,b,c)=>{Promise.resolve().then(c.t.bind(c,10312,23)),Promise.resolve().then(c.t.bind(c,38883,23)),Promise.resolve().then(c.t.bind(c,56207,23)),Promise.resolve().then(c.t.bind(c,97314,23)),Promise.resolve().then(c.t.bind(c,14374,23)),Promise.resolve().then(c.t.bind(c,21554,23)),Promise.resolve().then(c.t.bind(c,90039,23)),Promise.resolve().then(c.t.bind(c,15858,23))}};
1
+ exports.id=681,exports.ids=[681],exports.modules={9446:()=>{},11305:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>e});var d=c(39821);let e=async a=>[{type:"image/x-icon",sizes:"16x16",url:(0,d.fillMetadataSegment)(".",await a.params,"favicon.ico",!0)+"?b67a357858af4169"}]},11897:(a,b,c)=>{"use strict";c.d(b,{K7:()=>i,UT:()=>f,dW:()=>g,qI:()=>h});var d=c(34291);function e(a){return{id:a.id,label:a.label,one_liner:a.one_liner,system_prompt:a.system_prompt,recommended_lineage:a.recommended_lineage,builtin:!!a.builtin,forked_from:a.forked_from??null,created_at:a.created_at,updated_at:a.updated_at}}async function f(){return(await (0,d.T)("/personas")).items.map(e)}async function g(a){return e(await (0,d.T)(`/personas/${encodeURIComponent(a)}`))}async function h(a){return e(await (0,d.T)("/personas",{method:"POST",body:JSON.stringify(a)}))}async function i(a){await (0,d.T)(`/personas/${encodeURIComponent(a)}`,{method:"DELETE"})}},16276:(a,b,c)=>{"use strict";c.d(b,{cn:()=>f});var d=c(84602),e=c(60237);function f(...a){return(0,e.QP)((0,d.$)(a))}},29843:(a,b,c)=>{"use strict";c.d(b,{createVoice:()=>g,listVoices:()=>e,updateVoice:()=>f});var d=c(34291);async function e(a){return(await (0,d.T)(`/voices${function(a){if(!a)return"";let b=[];return a.lineage&&b.push(`lineage=${encodeURIComponent(a.lineage)}`),a.source&&b.push(`source=${encodeURIComponent(a.source)}`),a.provider&&b.push(`provider=${encodeURIComponent(a.provider)}`),void 0!==a.enabled&&b.push(`enabled=${a.enabled?"true":"false"}`),0===b.length?"":`?${b.join("&")}`}(a)}`)).items}async function f(a,b){return(0,d.T)(`/voices/${encodeURIComponent(a)}`,{method:"PUT",body:JSON.stringify(b)})}async function g(a){return(0,d.T)("/voices",{method:"POST",body:JSON.stringify(a)})}},31915:(a,b,c)=>{Promise.resolve().then(c.t.bind(c,10186,23)),Promise.resolve().then(c.t.bind(c,37373,23)),Promise.resolve().then(c.t.bind(c,76941,23)),Promise.resolve().then(c.t.bind(c,79652,23)),Promise.resolve().then(c.t.bind(c,25980,23)),Promise.resolve().then(c.t.bind(c,85080,23)),Promise.resolve().then(c.t.bind(c,62753,23)),Promise.resolve().then(c.bind(c,68936))},32673:(a,b,c)=>{"use strict";c.d(b,{A1:()=>o,Ci:()=>p,Df:()=>g,Dl:()=>n,Ep:()=>h,WH:()=>r,WK:()=>q,Wt:()=>m,Xx:()=>i,fk:()=>e,iW:()=>f,lT:()=>l,nr:()=>k,oD:()=>j});var d=c(34291);async function e(){return(await (0,d.T)("/onboard/detect-clis")).items}async function f(a,b){return(0,d.T)("/onboard/validate-cli-path",{method:"POST",body:JSON.stringify({id:a,path:b})})}async function g(a,b){return(0,d.T)("/onboard/save-cli-path",{method:"POST",body:JSON.stringify({id:a,path:b})})}async function h(a){return(0,d.T)("/settings/permissions",{method:"PUT",body:JSON.stringify(a)})}async function i(a){return(0,d.T)("/settings",{method:"PUT",body:JSON.stringify(a)})}async function j(){return(0,d.T)("/settings/transport")}async function k(a){return(0,d.T)("/settings/transport",{method:"PUT",body:JSON.stringify(a)})}async function l(){return(0,d.T)("/settings/concurrency")}async function m(a){return(0,d.T)("/settings/concurrency",{method:"PUT",body:JSON.stringify(a)})}async function n(){return(0,d.T)("/settings/billing")}async function o(a){return(0,d.T)("/settings/billing",{method:"PUT",body:JSON.stringify(a)})}async function p(){return(0,d.T)("/settings/telemetry")}async function q(a){return(0,d.T)("/settings/telemetry",{method:"PUT",body:JSON.stringify({enabled:a})})}async function r(a,b){return(0,d.T)(`/secrets/${a}`,{method:"PUT",body:JSON.stringify(b)})}},34291:(a,b,c)=>{"use strict";c.d(b,{$:()=>g,T:()=>h});let d="/api/v1";async function e(){let a=process.env.PORT;return a?`http://127.0.0.1:${a}/api/daemon`:"http://127.0.0.1:5050/api/daemon"}async function f(){return await e()}class g extends Error{constructor(a,b,c,d){super(c),this.code=a,this.statusCode=b,this.details=d,this.name="DaemonError"}}async function h(a,b={}){let c=await f(),e=a.startsWith("/")?a:`/${a}`,i=e===d||e.startsWith(`${d}/`)?e:`${d}${e}`,j=`${c.replace(/\/$/,"")}${i}`;try{let a=await fetch(j,{...b,headers:{"Content-Type":"application/json",...b.headers}}),c=await a.json().catch(()=>({ok:!1,error:{code:"parse_error",message:"Failed to parse response"}}));if(!c.ok){if("string"==typeof c.error&&"string"==typeof c.message)throw new g(c.error,a.status,c.message);throw new g(c.error?.code||"unknown",a.status,c.error?.message||`Daemon returned ${a.status}`,c.error?.details)}return c.data}catch(a){if(a instanceof g)throw a;if(a instanceof TypeError&&a.message.includes("fetch"))throw new g("connection_failed",0,"Failed to connect to Chorus daemon. Is it running?");throw new g("unknown",0,a instanceof Error?a.message:"Unknown error")}}},35075:(a,b,c)=>{"use strict";c.d(b,{Ay:()=>f,jb:()=>e});var d=c(34291);async function e(a){return(0,d.T)(`/orchestrators/${a}/connect`,{method:"POST"})}async function f(){return(0,d.T)("/orchestrators/opencode/models")}},56019:()=>{},61296:(a,b,c)=>{"use strict";c.d(b,{U:()=>e});var d=c(66722);function e({className:a}){return(0,d.jsxs)("svg",{viewBox:"0 0 32 32","aria-hidden":"true",className:a,fill:"currentColor",children:[(0,d.jsx)("circle",{cx:"11",cy:"20",r:"3.2",fillOpacity:"0.55"}),(0,d.jsx)("circle",{cx:"21",cy:"20",r:"3.2",fillOpacity:"0.55"}),(0,d.jsx)("circle",{cx:"16",cy:"11",r:"3.2"})]})}},65979:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>k,metadata:()=>i,viewport:()=>j});var d=c(87796),e=c(13655),f=c.n(e),g=c(44859),h=c.n(g);c(75234);let i={title:"Chorus — many voices, one chorus",description:"The polished orchestrator over your AI fleet. Paste a task. Pick a template. Watch multiple LLMs reach consensus."},j={width:"device-width",initialScale:1};function k({children:a}){return(0,d.jsx)("html",{lang:"en",className:`dark ${f().variable} ${h().variable} h-full antialiased`,children:(0,d.jsx)("body",{className:"min-h-full flex flex-col bg-background text-foreground",children:a})})}},66152:(a,b,c)=>{"use strict";c.d(b,{$v:()=>d.$,jb:()=>s.jb,RL:()=>h,K7:()=>t.K7,I7:()=>q,dW:()=>t.dW,Ih:()=>g,UT:()=>t.UT,eG:()=>o,qI:()=>t.qI,AI:()=>p,Xx:()=>r.Xx,WH:()=>r.WH});var d=c(34291),e=c(94755);function f(a){let b,c;if(a.attached_files)try{let c=JSON.parse(a.attached_files);Array.isArray(c)&&(b=c)}catch{}if(a.template_snapshot)try{let b=JSON.parse(a.template_snapshot),d=e._i.safeParse(b);d.success&&(c={...d.data,phases:d.data.phases.map(a=>({...a,reviewer:a.reviewer?{...a.reviewer,candidatesWithModels:a.reviewer.candidatesWithModels??(a.reviewer.candidates??[]).map(a=>({lineage:a.lineage,models:a.models??[],...void 0!==a.persona?{persona:a.persona}:{}}))}:a.reviewer}))})}catch{}return{id:a.id,slug:a.slug??void 0,work:a.work,templateId:a.template_id,status:a.status,currentPhaseIdx:a.current_phase_idx??0,yolo:!!a.yolo,attachedFiles:b,repoPath:a.repo_path??void 0,prUrl:a.pr_url??void 0,shipError:a.ship_error??void 0,artifact:a.artifact??void 0,verdict:a.verdict??void 0,templateSnapshot:c,createdAt:a.created_at,updatedAt:a.updated_at,finishedAt:a.finished_at??void 0}}async function g(a){let b=new URLSearchParams;a?.limit&&b.append("limit",a.limit.toString()),a?.offset&&b.append("offset",a.offset.toString()),a?.status&&b.append("status",a.status);let c=b.toString();return(await (0,d.T)(`/chats${c?`?${c}`:""}`)).items.map(f)}async function h(a){return f(await (0,d.T)("/chats",{method:"POST",body:JSON.stringify(a)}))}var i=c(11022);let j=new Set(["anthropic","openai","google","opencode","moonshot","any","xai"]),k={anthropic:"claude",openai:"codex",google:"gemini",opencode:"opencode",moonshot:"kimi",any:"claude",xai:"opencode"};function l(a){return a?k[a]??"claude":"claude"}function m(a){let b=a.kind??"review";return{id:a.id??"phase",name:a.title??a.name??a.id??"Phase",description:a.description??"",kind:b,gate:"auto",doer:{lineage:l(a.doer?.lineage),models:a.doer?.models??[],...a.doer?.persona?{persona:a.doer.persona}:{}},reviewer:{require:a.reviewer?.require??1,crossLineage:a.reviewer?.crossLineage??!0,candidates:(a.reviewer?.candidates??[]).map(a=>l(a.lineage)).filter(a=>j.has(Object.keys(k).find(b=>k[b]===a)??"")),candidatesWithModels:(a.reviewer?.candidates??[]).map(a=>({lineage:l(a.lineage),models:a.models??[],...a.persona?{persona:a.persona}:{}}))},inputs:{include:a.inputs?.include??[],exclude:a.inputs?.exclude??[]},iterate:{max:a.iterate?.maxRounds??2,onMax:"ask-user"},blindSpots:[],execution:"parallel",builtin:!0,..."review_only"===b?{artifact:{label:a.artifact?.label??"Artifact to review",hint:a.artifact?.hint??"Paste a unified diff, a markdown draft, code, or any text blob.",maxBytes:a.artifact?.maxBytes??1048576}}:{}}}function n(a){let b={};try{b=i.parse(a.yaml)??{}}catch{}let c="majority";"number"==typeof b.agreementThreshold?c=b.agreementThreshold>=.99?"unanimous":b.agreementThreshold>=.5?"majority":"any":"string"==typeof b.agreementThreshold&&(c=b.agreementThreshold);let d=(b.phases??[]).map(m);return{id:a.id,name:b.name??a.id,description:b.description??"",category:function(a,b){if(a.category)return a.category;let c=b.toLowerCase();return c.includes("bug")||c.includes("debug")||c.includes("diagnose")?"debug":c.includes("plan")||c.includes("architect")?"plan":c.includes("decide")||c.includes("decision")?"decide":"review"}(b,a.id),phases:d,agreementThreshold:c,onThresholdMet:"auto-finalize"===b.onThresholdMet?"auto-finalize":"ask-user",maxRounds:b.maxRounds??3,driver:"external",driverHandoff:!1,verificationGate:"auto",costCapUsd:0,yoloDefault:b.yoloDefault??!1,estimatedBaselineTokens:b.estimatedBaselineTokens,onError:"ask-user",notify:"dashboard-only",yaml:a.yaml,authorHandle:b.author??"chorus",forks:0,popularity:0,source:a.source,isComplete:"number"==typeof a.is_complete?0!==a.is_complete:!1!==a.is_complete}}async function o(){return(await (0,d.T)("/templates")).items.map(n)}async function p(a){return n(await (0,d.T)("/templates",{method:"POST",body:JSON.stringify(a)}))}async function q(a){await (0,d.T)(`/templates/${encodeURIComponent(a)}`,{method:"DELETE"})}var r=c(32673),s=c(35075),t=c(11897);c(29843)},68312:(a,b,c)=>{Promise.resolve().then(c.t.bind(c,10312,23))},75234:()=>{},78040:(a,b,c)=>{Promise.resolve().then(c.t.bind(c,10186,23))},79182:()=>{},89796:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>e});var d=c(39821);let e=async a=>[{type:"image/svg+xml",sizes:"any",url:(0,d.fillMetadataSegment)(".",await a.params,"icon.svg",!0)+"?79b94d624cb60ac1"}]},92971:()=>{},94755:(a,b,c)=>{"use strict";c.d(b,{_i:()=>o});var d=c(74890),e=c(78350);let f=d.ai().int().min(3e4).max(36e5).optional(),g=d.k5(["anthropic","openai","google","opencode","moonshot","openrouter","local","grok","any"]),h=d.k5(["anthropic","openai","google","opencode","moonshot","openrouter","local","grok"]),i=d.Ik({require:d.ai().int().min(0).default(1),crossLineage:d.zM().default(!0),candidates:d.YO(d.Ik({lineage:h,models:d.YO(d.Yj()).optional(),persona:d.Yj().optional()}))}).superRefine((a,b)=>{if(a.require>a.candidates.length&&b.addIssue({code:e.eq.custom,path:["require"],message:`reviewer.require (${a.require}) cannot exceed reviewer.candidates.length (${a.candidates.length}). Either lower require or add more candidates.`}),a.crossLineage&&a.require>0){let c=new Set(a.candidates.map(a=>a.lineage)).size;a.require>c&&b.addIssue({code:e.eq.custom,path:["require"],message:`reviewer.require (${a.require}) exceeds distinct lineages (${c}) in candidates with crossLineage=true. Either lower require, disable crossLineage, or add candidates from more lineages.`})}}),j=d.Ik({include:d.YO(d.Yj()).default([]),exclude:d.YO(d.Yj()).default([])}).default({include:[],exclude:[]}),k=d.Ik({maxRounds:d.ai().int().min(1).default(2),onDisagreement:d.k5(["continue","escalate","accept-doer"]).default("continue"),shareSessionAcrossRounds:d.zM().default(!0),shareSessionAcrossPhases:d.zM().default(!1)}).default({maxRounds:2,onDisagreement:"continue",shareSessionAcrossRounds:!0,shareSessionAcrossPhases:!1}),l=d.Ik({id:d.Yj().min(1),kind:d.k5(["plan","spec","tests","implement","review","verify","divergence"]),title:d.Yj().min(1),description:d.Yj().optional(),doer:d.Ik({lineage:g,models:d.YO(d.Yj()).optional(),persona:d.Yj().optional()}),reviewer:i.optional(),inputs:j,iterate:k,timeoutMs:f}),m=d.Ik({id:d.Yj().min(1),kind:d.eu("review_only"),title:d.Yj().min(1),description:d.Yj().optional(),reviewer:i,artifact:d.Ik({label:d.Yj().min(1).default("Artifact to review"),hint:d.Yj().default("Paste a unified diff, a markdown draft, code, or any text blob."),maxBytes:d.ai().int().min(1).default(1048576)}).default({label:"Artifact to review",hint:"Paste a unified diff, a markdown draft, code, or any text blob.",maxBytes:1048576}),inputs:j,timeoutMs:f}),n=d.gM("kind",[l.extend({kind:d.eu("plan")}),l.extend({kind:d.eu("spec")}),l.extend({kind:d.eu("tests")}),l.extend({kind:d.eu("implement")}),l.extend({kind:d.eu("review")}),l.extend({kind:d.eu("verify")}),l.extend({kind:d.eu("divergence")}),m]),o=d.Ik({id:d.Yj().min(1),name:d.Yj().min(1),description:d.Yj().min(1),author:d.Yj().default("chorus"),agreementThreshold:d.ai().min(0).max(1).default(.66),onThresholdMet:d.k5(["merge","ask","review"]).default("ask"),maxRounds:d.ai().int().min(1).default(3),yoloDefault:d.zM().default(!1),estimatedBaselineTokens:d.ai().int().min(0).optional(),phases:d.YO(n).min(1).refine(a=>{let b=a.filter(a=>"review_only"===a.kind).length;return 0===b||1===b&&1===a.length},{message:"review_only phases cannot be mixed with other phase kinds and only one is allowed (hybrid templates are out of scope)"}).refine(a=>{let b=a.map(a=>a.id);return new Set(b).size===b.length},{message:"phase ids must be unique"}),ship:d.Ik({enabled:d.zM().default(!1),baseBranch:d.Yj().optional(),branchPattern:d.Yj().default("chorus/{chatId}"),titleTemplate:d.Yj().default("chorus: {template} via #{chatId}")}).optional(),fallback:d.Ik({doer:d.YO(d.Ik({lineage:g,models:d.YO(d.Yj()).min(1),persona:d.Yj().optional()})).optional(),reviewer:d.YO(d.Ik({lineage:h,models:d.YO(d.Yj()).min(1),persona:d.Yj().optional()})).optional()}).optional()})},94963:(a,b,c)=>{Promise.resolve().then(c.t.bind(c,10312,23)),Promise.resolve().then(c.t.bind(c,38883,23)),Promise.resolve().then(c.t.bind(c,56207,23)),Promise.resolve().then(c.t.bind(c,97314,23)),Promise.resolve().then(c.t.bind(c,14374,23)),Promise.resolve().then(c.t.bind(c,21554,23)),Promise.resolve().then(c.t.bind(c,90039,23)),Promise.resolve().then(c.t.bind(c,15858,23))}};
@@ -1 +1 @@
1
- globalThis.__BUILD_MANIFEST={polyfillFiles:["static/chunks/polyfills-42372ed130431b0a.js"],devFiles:[],lowPriorityFiles:["static/PLVy0iTepN1xpE0hbQBjx/_buildManifest.js","static/PLVy0iTepN1xpE0hbQBjx/_ssgManifest.js"],rootMainFiles:["static/chunks/webpack-87142ab87b87c8fb.js","static/chunks/ed64ccb0-b7d2b5246d18ca7e.js","static/chunks/128-a5d059bf5b2e5090.js","static/chunks/main-app-e9f7985e32dc8a63.js"],rootMainFilesTree:{},pages:{"/_app":[]}};
1
+ globalThis.__BUILD_MANIFEST={polyfillFiles:["static/chunks/polyfills-42372ed130431b0a.js"],devFiles:[],lowPriorityFiles:["static/CJke3duo44Hy3cygzeoG9/_buildManifest.js","static/CJke3duo44Hy3cygzeoG9/_ssgManifest.js"],rootMainFiles:["static/chunks/webpack-87142ab87b87c8fb.js","static/chunks/ed64ccb0-b7d2b5246d18ca7e.js","static/chunks/128-a5d059bf5b2e5090.js","static/chunks/main-app-e9f7985e32dc8a63.js"],rootMainFilesTree:{},pages:{"/_app":[]}};
@@ -1 +1 @@
1
- <!DOCTYPE html><html lang="en" class="dark __variable_246ccd __variable_4c40f6 h-full antialiased"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" href="/_next/static/media/22a5144ee8d83bca-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="preload" href="/_next/static/media/f5271587012faf78-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="stylesheet" href="/_next/static/css/b914f2b25cf933a9.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-87142ab87b87c8fb.js"/><script src="/_next/static/chunks/ed64ccb0-b7d2b5246d18ca7e.js" async=""></script><script src="/_next/static/chunks/128-a5d059bf5b2e5090.js" async=""></script><script src="/_next/static/chunks/main-app-e9f7985e32dc8a63.js" async=""></script><meta name="robots" content="noindex"/><meta name="next-size-adjust" content=""/><title>404: This page could not be found.</title><title>Chorus — many voices, one chorus</title><meta name="description" content="The polished orchestrator over your AI fleet. Paste a task. Pick a template. Watch multiple LLMs reach consensus."/><link rel="icon" href="/favicon.ico?b67a357858af4169" type="image/x-icon" sizes="16x16"/><link rel="icon" href="/icon.svg?79b94d624cb60ac1" type="image/svg+xml" sizes="any"/><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body class="min-h-full flex flex-col bg-background text-foreground"><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><!--$--><!--/$--><script src="/_next/static/chunks/webpack-87142ab87b87c8fb.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[5484,[],\"\"]\n3:I[5482,[],\"\"]\n4:I[5017,[],\"OutletBoundary\"]\n5:\"$Sreact.suspense\"\n8:I[5017,[],\"ViewportBoundary\"]\na:I[5017,[],\"MetadataBoundary\"]\nc:I[3720,[],\"default\",1]\n:HL[\"/_next/static/media/22a5144ee8d83bca-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n:HL[\"/_next/static/media/f5271587012faf78-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n:HL[\"/_next/static/css/b914f2b25cf933a9.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"c\":[\"\",\"_not-found\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",16],[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/b914f2b25cf933a9.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"className\":\"dark __variable_246ccd __variable_4c40f6 h-full antialiased\",\"children\":[\"$\",\"body\",null,{\"className\":\"min-h-full flex flex-col bg-background text-foreground\",\"children\":[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}]}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],null,[\"$\",\"$L4\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@6\"}]}]]}],{},null,false,null]},null,false,\"$@7\"]},null,false,null],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[\"$\",\"$L8\",null,{\"children\":\"$L9\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$La\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Lb\"}]}]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$c\",[]],\"S\":true,\"h\":null,\"s\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"PLVy0iTepN1xpE0hbQBjx\"}\n"])</script><script>self.__next_f.push([1,"d:[]\n7:\"$Wd\"\n"])</script><script>self.__next_f.push([1,"9:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"e:I[3068,[],\"IconMark\"]\n6:null\nb:[[\"$\",\"title\",\"0\",{\"children\":\"Chorus — many voices, one chorus\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"The polished orchestrator over your AI fleet. Paste a task. Pick a template. Watch multiple LLMs reach consensus.\"}],[\"$\",\"link\",\"2\",{\"rel\":\"icon\",\"href\":\"/favicon.ico?b67a357858af4169\",\"type\":\"image/x-icon\",\"sizes\":\"16x16\"}],[\"$\",\"link\",\"3\",{\"rel\":\"icon\",\"href\":\"/icon.svg?79b94d624cb60ac1\",\"type\":\"image/svg+xml\",\"sizes\":\"any\"}],[\"$\",\"$Le\",\"4\",{}]]\n"])</script></body></html>
1
+ <!DOCTYPE html><html lang="en" class="dark __variable_246ccd __variable_4c40f6 h-full antialiased"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" href="/_next/static/media/22a5144ee8d83bca-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="preload" href="/_next/static/media/f5271587012faf78-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="stylesheet" href="/_next/static/css/a2b7a8d35dba10d3.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-87142ab87b87c8fb.js"/><script src="/_next/static/chunks/ed64ccb0-b7d2b5246d18ca7e.js" async=""></script><script src="/_next/static/chunks/128-a5d059bf5b2e5090.js" async=""></script><script src="/_next/static/chunks/main-app-e9f7985e32dc8a63.js" async=""></script><meta name="robots" content="noindex"/><meta name="next-size-adjust" content=""/><title>404: This page could not be found.</title><title>Chorus — many voices, one chorus</title><meta name="description" content="The polished orchestrator over your AI fleet. Paste a task. Pick a template. Watch multiple LLMs reach consensus."/><link rel="icon" href="/favicon.ico?b67a357858af4169" type="image/x-icon" sizes="16x16"/><link rel="icon" href="/icon.svg?79b94d624cb60ac1" type="image/svg+xml" sizes="any"/><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body class="min-h-full flex flex-col bg-background text-foreground"><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><!--$--><!--/$--><script src="/_next/static/chunks/webpack-87142ab87b87c8fb.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[5484,[],\"\"]\n3:I[5482,[],\"\"]\n4:I[5017,[],\"OutletBoundary\"]\n5:\"$Sreact.suspense\"\n8:I[5017,[],\"ViewportBoundary\"]\na:I[5017,[],\"MetadataBoundary\"]\nc:I[3720,[],\"default\",1]\n:HL[\"/_next/static/media/22a5144ee8d83bca-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n:HL[\"/_next/static/media/f5271587012faf78-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n:HL[\"/_next/static/css/a2b7a8d35dba10d3.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"c\":[\"\",\"_not-found\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",16],[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/a2b7a8d35dba10d3.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"className\":\"dark __variable_246ccd __variable_4c40f6 h-full antialiased\",\"children\":[\"$\",\"body\",null,{\"className\":\"min-h-full flex flex-col bg-background text-foreground\",\"children\":[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}]}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],null,[\"$\",\"$L4\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@6\"}]}]]}],{},null,false,null]},null,false,\"$@7\"]},null,false,null],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[\"$\",\"$L8\",null,{\"children\":\"$L9\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$La\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Lb\"}]}]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$c\",[]],\"S\":true,\"h\":null,\"s\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"CJke3duo44Hy3cygzeoG9\"}\n"])</script><script>self.__next_f.push([1,"d:[]\n7:\"$Wd\"\n"])</script><script>self.__next_f.push([1,"9:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"e:I[3068,[],\"IconMark\"]\n6:null\nb:[[\"$\",\"title\",\"0\",{\"children\":\"Chorus — many voices, one chorus\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"The polished orchestrator over your AI fleet. Paste a task. Pick a template. Watch multiple LLMs reach consensus.\"}],[\"$\",\"link\",\"2\",{\"rel\":\"icon\",\"href\":\"/favicon.ico?b67a357858af4169\",\"type\":\"image/x-icon\",\"sizes\":\"16x16\"}],[\"$\",\"link\",\"3\",{\"rel\":\"icon\",\"href\":\"/icon.svg?79b94d624cb60ac1\",\"type\":\"image/svg+xml\",\"sizes\":\"any\"}],[\"$\",\"$Le\",\"4\",{}]]\n"])</script></body></html>
@@ -1 +1 @@
1
- <!DOCTYPE html><html id="__next_error__"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-87142ab87b87c8fb.js"/><script src="/_next/static/chunks/ed64ccb0-b7d2b5246d18ca7e.js" async=""></script><script src="/_next/static/chunks/128-a5d059bf5b2e5090.js" async=""></script><script src="/_next/static/chunks/main-app-e9f7985e32dc8a63.js" async=""></script><meta name="next-size-adjust" content=""/><title>500: This page couldn’t load</title><style>:root {--next-error-bg: #fff;--next-error-text: #171717;--next-error-title: #171717;--next-error-message: #171717;--next-error-digest: #666666;--next-error-btn-text: #fff;--next-error-btn-bg: #171717;--next-error-btn-border: none;--next-error-btn-secondary-text: #171717;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);}@media (prefers-color-scheme: dark) {:root {--next-error-bg: #0a0a0a;--next-error-text: #ededed;--next-error-title: #ededed;--next-error-message: #ededed;--next-error-digest: #a0a0a0;--next-error-btn-text: #0a0a0a;--next-error-btn-bg: #ededed;--next-error-btn-border: none;--next-error-btn-secondary-text: #ededed;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);}}body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }</style><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;display:flex;align-items:center;justify-content:center"><div style="margin-top:-32px;max-width:325px;padding:32px 28px;text-align:left"><svg width="32" height="32" viewBox="-0.2 -1.5 32 32" fill="none" style="margin-bottom:24px"><path d="M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z" fill="var(--next-error-title)"></path></svg><h1 style="font-size:24px;font-weight:500;letter-spacing:-0.02em;line-height:32px;margin:0 0 12px 0;color:var(--next-error-title)">This page couldn’t load</h1><p style="font-size:14px;font-weight:400;line-height:21px;margin:0 0 20px 0;color:var(--next-error-message)">A server error occurred. Reload to try again.</p><form style="margin:0"><button type="submit" style="display:inline-flex;align-items:center;justify-content:center;height:32px;padding:0 12px;font-size:14px;font-weight:500;line-height:20px;border-radius:6px;cursor:pointer;color:var(--next-error-btn-text);background:var(--next-error-btn-bg);border:var(--next-error-btn-border)">Reload</button></form></div></div><!--$--><!--/$--><script src="/_next/static/chunks/webpack-87142ab87b87c8fb.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[5484,[],\"\"]\n3:I[5482,[],\"\"]\n4:I[5017,[],\"OutletBoundary\"]\n5:\"$Sreact.suspense\"\n8:I[5017,[],\"ViewportBoundary\"]\na:I[5017,[],\"MetadataBoundary\"]\nc:I[3720,[],\"default\",1]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"c\":[\"\",\"_global-error\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"_global-error\",{\"children\":[\"__PAGE__\",{}]}]}],[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"html\",null,{\"id\":\"__next_error__\",\"children\":[[\"$\",\"head\",null,{\"children\":[[\"$\",\"title\",null,{\"children\":\"500: This page couldn’t load\"}],[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\":root {--next-error-bg: #fff;--next-error-text: #171717;--next-error-title: #171717;--next-error-message: #171717;--next-error-digest: #666666;--next-error-btn-text: #fff;--next-error-btn-bg: #171717;--next-error-btn-border: none;--next-error-btn-secondary-text: #171717;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);}@media (prefers-color-scheme: dark) {:root {--next-error-bg: #0a0a0a;--next-error-text: #ededed;--next-error-title: #ededed;--next-error-message: #ededed;--next-error-digest: #a0a0a0;--next-error-btn-text: #0a0a0a;--next-error-btn-bg: #ededed;--next-error-btn-border: none;--next-error-btn-secondary-text: #ededed;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);}}body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }\"}}]]}],[\"$\",\"body\",null,{\"children\":[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"display\":\"flex\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"style\":{\"marginTop\":\"-32px\",\"maxWidth\":\"325px\",\"padding\":\"32px 28px\",\"textAlign\":\"left\"},\"children\":[[\"$\",\"svg\",null,{\"width\":\"32\",\"height\":\"32\",\"viewBox\":\"-0.2 -1.5 32 32\",\"fill\":\"none\",\"style\":{\"marginBottom\":\"24px\"},\"children\":[\"$\",\"path\",null,{\"d\":\"M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z\",\"fill\":\"var(--next-error-title)\"}]}],[\"$\",\"h1\",null,{\"style\":{\"fontSize\":\"24px\",\"fontWeight\":500,\"letterSpacing\":\"-0.02em\",\"lineHeight\":\"32px\",\"margin\":\"0 0 12px 0\",\"color\":\"var(--next-error-title)\"},\"children\":\"This page couldn’t load\"}],[\"$\",\"p\",null,{\"style\":{\"fontSize\":\"14px\",\"fontWeight\":400,\"lineHeight\":\"21px\",\"margin\":\"0 0 20px 0\",\"color\":\"var(--next-error-message)\"},\"children\":\"A server error occurred. Reload to try again.\"}],[\"$\",\"form\",null,{\"style\":{\"margin\":0},\"children\":[\"$\",\"button\",null,{\"type\":\"submit\",\"style\":{\"display\":\"inline-flex\",\"alignItems\":\"center\",\"justifyContent\":\"center\",\"height\":\"32px\",\"padding\":\"0 12px\",\"fontSize\":\"14px\",\"fontWeight\":500,\"lineHeight\":\"20px\",\"borderRadius\":\"6px\",\"cursor\":\"pointer\",\"color\":\"var(--next-error-btn-text)\",\"background\":\"var(--next-error-btn-bg)\",\"border\":\"var(--next-error-btn-border)\"},\"children\":\"Reload\"}]}]]}]}]}]]}],null,[\"$\",\"$L4\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@6\"}]}]]}],{},null,false,null]},null,false,\"$@7\"]},null,false,\"$@7\"],[\"$\",\"$1\",\"h\",{\"children\":[null,[\"$\",\"$L8\",null,{\"children\":\"$L9\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$La\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Lb\"}]}]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$c\",[]],\"S\":true,\"h\":null,\"s\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"PLVy0iTepN1xpE0hbQBjx\"}\n"])</script><script>self.__next_f.push([1,"d:[]\n7:\"$Wd\"\n"])</script><script>self.__next_f.push([1,"9:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"6:null\nb:[]\n"])</script></body></html>
1
+ <!DOCTYPE html><html id="__next_error__"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-87142ab87b87c8fb.js"/><script src="/_next/static/chunks/ed64ccb0-b7d2b5246d18ca7e.js" async=""></script><script src="/_next/static/chunks/128-a5d059bf5b2e5090.js" async=""></script><script src="/_next/static/chunks/main-app-e9f7985e32dc8a63.js" async=""></script><meta name="next-size-adjust" content=""/><title>500: This page couldn’t load</title><style>:root {--next-error-bg: #fff;--next-error-text: #171717;--next-error-title: #171717;--next-error-message: #171717;--next-error-digest: #666666;--next-error-btn-text: #fff;--next-error-btn-bg: #171717;--next-error-btn-border: none;--next-error-btn-secondary-text: #171717;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);}@media (prefers-color-scheme: dark) {:root {--next-error-bg: #0a0a0a;--next-error-text: #ededed;--next-error-title: #ededed;--next-error-message: #ededed;--next-error-digest: #a0a0a0;--next-error-btn-text: #0a0a0a;--next-error-btn-bg: #ededed;--next-error-btn-border: none;--next-error-btn-secondary-text: #ededed;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);}}body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }</style><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;display:flex;align-items:center;justify-content:center"><div style="margin-top:-32px;max-width:325px;padding:32px 28px;text-align:left"><svg width="32" height="32" viewBox="-0.2 -1.5 32 32" fill="none" style="margin-bottom:24px"><path d="M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z" fill="var(--next-error-title)"></path></svg><h1 style="font-size:24px;font-weight:500;letter-spacing:-0.02em;line-height:32px;margin:0 0 12px 0;color:var(--next-error-title)">This page couldn’t load</h1><p style="font-size:14px;font-weight:400;line-height:21px;margin:0 0 20px 0;color:var(--next-error-message)">A server error occurred. Reload to try again.</p><form style="margin:0"><button type="submit" style="display:inline-flex;align-items:center;justify-content:center;height:32px;padding:0 12px;font-size:14px;font-weight:500;line-height:20px;border-radius:6px;cursor:pointer;color:var(--next-error-btn-text);background:var(--next-error-btn-bg);border:var(--next-error-btn-border)">Reload</button></form></div></div><!--$--><!--/$--><script src="/_next/static/chunks/webpack-87142ab87b87c8fb.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[5484,[],\"\"]\n3:I[5482,[],\"\"]\n4:I[5017,[],\"OutletBoundary\"]\n5:\"$Sreact.suspense\"\n8:I[5017,[],\"ViewportBoundary\"]\na:I[5017,[],\"MetadataBoundary\"]\nc:I[3720,[],\"default\",1]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"c\":[\"\",\"_global-error\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"_global-error\",{\"children\":[\"__PAGE__\",{}]}]}],[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"html\",null,{\"id\":\"__next_error__\",\"children\":[[\"$\",\"head\",null,{\"children\":[[\"$\",\"title\",null,{\"children\":\"500: This page couldn’t load\"}],[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\":root {--next-error-bg: #fff;--next-error-text: #171717;--next-error-title: #171717;--next-error-message: #171717;--next-error-digest: #666666;--next-error-btn-text: #fff;--next-error-btn-bg: #171717;--next-error-btn-border: none;--next-error-btn-secondary-text: #171717;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);}@media (prefers-color-scheme: dark) {:root {--next-error-bg: #0a0a0a;--next-error-text: #ededed;--next-error-title: #ededed;--next-error-message: #ededed;--next-error-digest: #a0a0a0;--next-error-btn-text: #0a0a0a;--next-error-btn-bg: #ededed;--next-error-btn-border: none;--next-error-btn-secondary-text: #ededed;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);}}body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }\"}}]]}],[\"$\",\"body\",null,{\"children\":[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"display\":\"flex\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"style\":{\"marginTop\":\"-32px\",\"maxWidth\":\"325px\",\"padding\":\"32px 28px\",\"textAlign\":\"left\"},\"children\":[[\"$\",\"svg\",null,{\"width\":\"32\",\"height\":\"32\",\"viewBox\":\"-0.2 -1.5 32 32\",\"fill\":\"none\",\"style\":{\"marginBottom\":\"24px\"},\"children\":[\"$\",\"path\",null,{\"d\":\"M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z\",\"fill\":\"var(--next-error-title)\"}]}],[\"$\",\"h1\",null,{\"style\":{\"fontSize\":\"24px\",\"fontWeight\":500,\"letterSpacing\":\"-0.02em\",\"lineHeight\":\"32px\",\"margin\":\"0 0 12px 0\",\"color\":\"var(--next-error-title)\"},\"children\":\"This page couldn’t load\"}],[\"$\",\"p\",null,{\"style\":{\"fontSize\":\"14px\",\"fontWeight\":400,\"lineHeight\":\"21px\",\"margin\":\"0 0 20px 0\",\"color\":\"var(--next-error-message)\"},\"children\":\"A server error occurred. Reload to try again.\"}],[\"$\",\"form\",null,{\"style\":{\"margin\":0},\"children\":[\"$\",\"button\",null,{\"type\":\"submit\",\"style\":{\"display\":\"inline-flex\",\"alignItems\":\"center\",\"justifyContent\":\"center\",\"height\":\"32px\",\"padding\":\"0 12px\",\"fontSize\":\"14px\",\"fontWeight\":500,\"lineHeight\":\"20px\",\"borderRadius\":\"6px\",\"cursor\":\"pointer\",\"color\":\"var(--next-error-btn-text)\",\"background\":\"var(--next-error-btn-bg)\",\"border\":\"var(--next-error-btn-border)\"},\"children\":\"Reload\"}]}]]}]}]}]]}],null,[\"$\",\"$L4\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@6\"}]}]]}],{},null,false,null]},null,false,\"$@7\"]},null,false,\"$@7\"],[\"$\",\"$1\",\"h\",{\"children\":[null,[\"$\",\"$L8\",null,{\"children\":\"$L9\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$La\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Lb\"}]}]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$c\",[]],\"S\":true,\"h\":null,\"s\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"CJke3duo44Hy3cygzeoG9\"}\n"])</script><script>self.__next_f.push([1,"d:[]\n7:\"$Wd\"\n"])</script><script>self.__next_f.push([1,"9:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"6:null\nb:[]\n"])</script></body></html>
@@ -1 +1 @@
1
- {"node":{},"edge":{},"encryptionKey":"aO00ke5a1fYKHGXZYsTMG6+YxilRU17NDbaqeW5kATc="}
1
+ {"node":{},"edge":{},"encryptionKey":"h8b7wbsm4AfMurbVl8lw+RztA7b2c8WH2x01YYLG6+Y="}
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[245],{52:(e,t,r)=>{r.d(t,{A:()=>a});let a=(0,r(3884).A)("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]])},862:(e,t,r)=>{r.d(t,{$:()=>a});function a(e){return!!e&&e.phases[0]?.kind==="review_only"}},1245:(e,t,r)=>{r.d(t,{LiveRunReal:()=>X});var a=r(9442),s=r(2573),n=r.n(s),o=r(3884);let d=(0,o.A)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);var i=r(6074),l=r(862),c=r(7296);function p({work:e}){let[t,r]=(0,i.useState)(!1),s=(0,c.t)(e),n=e.trim()!==s.trim()||e.length>100;return(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("button",{type:"button",onClick:n?()=>r(e=>!e):void 0,title:n?t?"Hide full brief":"Click to show full brief":s,disabled:!n,className:"block w-full min-w-0 text-left disabled:cursor-default",children:(0,a.jsx)("h1",{className:"truncate text-sm font-medium tracking-tight",children:s})}),n&&t&&(0,a.jsx)("pre",{className:"mt-2 max-h-72 overflow-auto whitespace-pre-wrap break-words rounded-md border border-border bg-background px-5 py-4 font-mono text-[12px] leading-relaxed text-foreground/90",children:e})]})}var u=r(6891),m=r(4608),x=r(6289),h=r(4030);let g=(0,o.A)("maximize-2",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]]);var f=r(3734);let b=Object.fromEntries(Object.entries(f.r2).map(([e,t])=>[e,t.gradient]));var v=r(2956),y=r(3149);function w({state:e}){switch(e){case"done":return(0,a.jsxs)("span",{className:"flex items-center gap-1 rounded-md bg-emerald-500/10 px-1.5 py-0.5 text-[10px] font-medium text-emerald-400",children:[(0,a.jsx)(v.A,{className:"h-3 w-3"})," DONE"]});case"errored":return(0,a.jsxs)("span",{className:"flex items-center gap-1 rounded-md bg-destructive/10 px-1.5 py-0.5 text-[10px] font-medium text-destructive",children:[(0,a.jsx)(h.A,{className:"h-3 w-3"})," ERRORED"]});case"working":return(0,a.jsxs)("span",{className:"flex items-center gap-1 rounded-md bg-primary/10 px-1.5 py-0.5 text-[10px] font-medium text-primary",children:[(0,a.jsx)(y.A,{className:"h-3 w-3 animate-spin"})," WORKING"]});case"pending":return(0,a.jsx)("span",{className:"flex items-center gap-1 rounded-md bg-muted/40 px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground/80",children:"QUEUED"});default:return(0,a.jsx)("span",{className:"rounded-md bg-muted px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground",children:"IDLE"})}}var k=r(1853);function j({participant:e,isActive:t,liveTail:r,chatTerminal:s,chatId:n,reviewOnly:o,swaps:d}){var l,c;let p,v,[y,A]=(0,i.useState)(!1),[$,M]=(0,i.useState)(!1),C=function(e){let t;if(!e)return null;let r=e.trimStart();if(!/^##\s+(?:REVIEWER|DOER)\s+FAILED/i.test(r))return null;let a=r.match(/\*\*Kind:\*\*\s*(.+?)(?:\n|$)/),s=a?a[1].trim():"failed",n=r.match(/\*\*Resets:\*\*\s*(.+?)(?:\n|$)/);if(n){let e=Date.parse(n[1].trim());Number.isFinite(e)&&(t=e)}let o=r.search(/\n\n[^*]/),d=o>=0?r.slice(o+2).trim():"",i=d.length>0?d:"(no error message reported)",l=function(e,t){if(t&&/dangerously-skip-permissions cannot be used with root\/sudo/i.test(t))return"Claude CLI refuses --dangerously-skip-permissions as root. Run chorus as a non-root user, or disable Claude voices in /connect.";switch(e){case"quota_exhausted":return"Check your subscription dashboard or swap the account in CHORUS_CODEX_HOME / chorus settings.";case"stream_failure":return"Subprocess died mid-stream — check disk space and CLI version.";case"cli_failed":case"cli_error":return"Re-auth the CLI (codex/gemini/opencode login) and retry.";default:return}}(s,i);return{kind:s,message:i,...l?{cta:l}:{},...t?{resetAt:t}:{}}}(e.answer),E=e.pending?"pending":e.hasAnswer?"done":C||s?"errored":"working",_="opencode-cli"===e.binaryUsed?"opencode":e.lineage;return(0,a.jsxs)("div",{className:`flex h-[320px] flex-col overflow-hidden rounded-lg border transition-[opacity,border-color,box-shadow] duration-300 ${b[_]??"bg-card"} ${"done"===E?"border-emerald-500/30":"working"===E?"border-primary/60 shadow-[0_0_0_1px_rgba(124,58,237,0.25),0_0_24px_-6px_rgba(124,58,237,0.45)] animate-pulse-soft":"errored"===E?"border-destructive/40":"pending"===E?"border-border/40 opacity-50 grayscale-[0.6]":"border-border"}`,children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2 border-b border-border bg-card/60 px-4 py-3",children:[(0,a.jsxs)("div",{className:"flex min-w-0 items-center gap-2 text-xs leading-none",children:[(0,a.jsx)("span",{className:`h-2 w-2 shrink-0 rounded-full ${(0,f.JR)(_)} ${"working"===E?"animate-pulse-soft":""}`}),(0,a.jsx)("span",{className:"font-medium capitalize text-foreground",children:e.role}),(0,a.jsx)("span",{className:"text-muted-foreground",children:"\xb7"}),(0,a.jsx)("span",{className:"uppercase tracking-wider text-muted-foreground",children:(0,f.u5)(_)}),(e.modelUsed??e.model)&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-muted-foreground/60",children:"\xb7"}),(0,a.jsx)("span",{className:"truncate font-mono text-muted-foreground",children:e.modelUsed??e.model})]})]}),(0,a.jsxs)("div",{className:"flex shrink-0 items-center gap-1.5",children:["working"===E&&n&&(0,a.jsx)("button",{type:"button",disabled:y,onClick:async()=>{if(!y){A(!0);try{let t=await fetch(`/api/daemon/chats/${n}/participants/${encodeURIComponent(e.participant)}/cancel`,{method:"POST"});if(!t.ok)return void A(!1);let r=await t.json();if(!r.ok){window.alert(`Couldn't cancel: ${r.error?.message??"unknown error"}`),A(!1);return}setTimeout(()=>A(!1),15e3)}catch{A(!1)}}},"aria-label":"Cancel this reviewer",title:"Cancel this reviewer (chat continues with others)",className:"grid h-6 w-6 shrink-0 place-items-center rounded-md border border-border bg-card/40 text-muted-foreground transition hover:border-destructive/40 hover:text-destructive disabled:cursor-not-allowed disabled:opacity-50",children:(0,a.jsx)(u.A,{className:"h-3 w-3"})}),(0,a.jsx)(w,{state:E})]})]}),d&&d.length>0&&(v=d.slice().sort((e,t)=>e.fallbackIdx-t.fallbackIdx),(0,a.jsx)("div",{className:"space-y-1.5 border-b border-amber-500/30 bg-amber-500/5 px-4 py-2 text-[11px]",children:v.map((e,t)=>{let r="lineage_fallback"===e.reason,s=t===v.length-1;return(0,a.jsxs)("div",{className:"flex items-start gap-2",children:[(0,a.jsx)(m.A,{className:"mt-0.5 h-3 w-3 shrink-0 text-amber-300"}),(0,a.jsxs)("div",{className:"min-w-0 flex-1 space-y-0.5",children:[(0,a.jsx)("div",{className:"font-medium uppercase tracking-wider text-[10px] text-amber-300",children:r?"Cross-lineage fallback":"Model fallback"}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5 text-[11px] text-amber-100/90",children:[(0,a.jsxs)("span",{className:"text-amber-100/60 line-through",children:[e.fromLineage,"/",e.fromModel]}),(0,a.jsx)(x.A,{className:"h-3 w-3 shrink-0 text-amber-300"}),(0,a.jsxs)("span",{className:s?"font-medium text-amber-100":"text-amber-100/60 line-through",children:[e.toLineage,"/",e.toModel]}),s&&(0,a.jsx)("span",{className:"rounded bg-amber-500/15 px-1 py-0.5 font-mono text-[9px] text-amber-200",children:"actually ran"})]}),e.fromErrorKind&&(0,a.jsxs)("div",{className:"text-[10px] text-amber-200/75",children:[(0,a.jsx)("span",{className:"font-mono uppercase tracking-wider text-amber-300/90",children:e.fromErrorKind}),e.fromErrorMessage&&(0,a.jsxs)("span",{className:"ml-1.5 text-amber-100/80",children:["— ",e.fromErrorMessage]})]})]})]},`${e.fromLineage}-${e.fromModel}-${t}`)})})),e.warnings&&e.warnings.length>0&&(0,a.jsx)("div",{className:"space-y-1 border-b border-amber-500/30 bg-amber-500/5 px-4 py-2 text-[11px] text-amber-200/90",children:e.warnings.map((e,t)=>(0,a.jsxs)("div",{className:"flex items-start gap-1.5",children:[(0,a.jsx)(h.A,{className:"mt-0.5 h-3 w-3 shrink-0 text-amber-400"}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("span",{className:"font-medium uppercase tracking-wider text-[10px] text-amber-300",children:e.kind}),(0,a.jsx)("div",{className:"mt-0.5 break-words font-mono text-[11px] leading-snug text-amber-100/85",children:e.message})]})]},t))}),(0,a.jsx)("div",{className:"flex min-h-0 flex-1 flex-col overflow-hidden px-4 py-3 font-mono text-xs leading-relaxed text-muted-foreground",children:e.findingsPreview&&e.findingsPreview.length>0?e.findingsPreview.map((e,t)=>(0,a.jsx)("div",{className:"py-0.5 text-foreground/90",children:e},t)):"working"===E&&r&&r.length>0?(0,a.jsx)("div",{className:"flex min-h-0 flex-1 flex-col-reverse overflow-y-auto",children:(0,a.jsx)("pre",{className:"whitespace-pre-wrap break-words text-foreground/85",children:r})}):"working"===E?(0,a.jsx)("div",{className:"text-muted-foreground",children:"Thinking…"}):"pending"===E?(0,a.jsx)("div",{className:"text-muted-foreground/70",children:o?"Queued — waiting for an open slot.":"Queued — runs after the doer."}):"errored"===E?C?(0,a.jsxs)("div",{className:"space-y-1.5 text-destructive/90",children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsx)("span",{className:"text-[10px] font-semibold uppercase tracking-wider",children:C.kind}),C.resetAt&&(0,a.jsxs)("span",{className:"inline-flex items-center gap-1 rounded-full bg-amber-500/10 px-2 py-0.5 text-[10px] font-medium text-amber-300",children:["Resets ",function(e){let t=e-Date.now();if(t<=0)return"now";let r=Math.round(t/1e3);if(r<60)return`in ${r}s`;let a=Math.round(r/60);if(a<60)return`in ${a}m`;let s=Math.round(a/60);if(s<24){let t=new Date(e);return`at ${t.getHours().toString().padStart(2,"0")}:${t.getMinutes().toString().padStart(2,"0")}`}let n=Math.round(s/24);return`in ${n}d`}(C.resetAt)]})]}),(0,a.jsx)("div",{className:"whitespace-pre-wrap break-words text-foreground/85",children:C.message}),C.cta&&(0,a.jsx)("div",{className:"text-[11px] text-muted-foreground/80",children:C.cta})]}):(0,a.jsx)("div",{className:"text-destructive/80",children:"The program finished but didn't produce any output."}):"done"===E&&e.answer?(0,a.jsx)("button",{type:"button",onClick:()=>M(!0),className:"group min-h-0 flex-1 cursor-zoom-in overflow-y-auto rounded text-left transition-colors hover:bg-foreground/5 focus:outline-none focus:ring-2 focus:ring-primary/40",title:"Click to view the full answer",children:(0,a.jsx)("pre",{className:"whitespace-pre-wrap break-words text-foreground/85",children:e.answer})}):(0,a.jsx)("div",{className:"text-muted-foreground/70",children:"No output yet."})}),(0,a.jsxs)("div",{className:"flex items-center justify-between gap-3 border-t border-border bg-card/60 px-4 py-2 font-mono text-[10px] text-muted-foreground",children:[(0,a.jsx)("span",{className:"truncate",children:e.binaryUsed??e.agentName}),(0,a.jsxs)("span",{className:"flex shrink-0 items-center gap-2",children:[void 0!==e.durationMs&&(0,a.jsx)("span",{title:"Wall-clock time the CLI took to finish.",children:function(e){if(e<1e3)return`${e} ms`;let t=e/1e3;if(t<60)return`${t.toFixed(1)}s`;let r=Math.floor(t/60),a=Math.round(t-60*r);return`${r}m${a.toString().padStart(2,"0")}s`}(e.durationMs)}),e.usage?.costUsd!==void 0&&(0,a.jsx)("span",{title:"USD cost reported by the CLI for this run.",children:(l=e.usage.costUsd)<=0?"$0.00":l<.01?"<$0.01":l<1?`$${l.toFixed(3)}`:`$${l.toFixed(2)}`}),e.usage&&N(e.usage)&&(0,a.jsx)("span",{title:(c=e.usage,p=[],void 0!==c.inputTokens&&p.push(`in ${c.inputTokens.toLocaleString()}`),void 0!==c.outputTokens&&p.push(`out ${c.outputTokens.toLocaleString()}`),void 0!==c.cachedInputTokens&&p.push(`cached ${c.cachedInputTokens.toLocaleString()}`),p.join(" \xb7 ")),children:N(e.usage)}),(0,a.jsx)("span",{children:e.hasAnswer?`${(e.answer?.length??0).toLocaleString()} B`:"—"}),"done"===E&&e.answer&&(0,a.jsxs)("button",{type:"button",onClick:()=>M(!0),className:"inline-flex items-center gap-1 rounded px-1 py-0.5 text-muted-foreground/80 transition-colors hover:bg-foreground/10 hover:text-foreground",title:"View full answer",children:[(0,a.jsx)(g,{className:"h-3 w-3"}),(0,a.jsx)("span",{className:"hidden sm:inline",children:"expand"})]})]})]}),(0,a.jsx)(k.lG,{open:$,onOpenChange:M,children:(0,a.jsxs)(k.Cf,{className:"max-h-[85vh] max-w-3xl overflow-hidden",children:[(0,a.jsx)(k.c7,{children:(0,a.jsxs)(k.L3,{className:"flex items-center gap-2 text-sm",children:[(0,a.jsx)("span",{className:`h-2 w-2 shrink-0 rounded-full ${(0,f.JR)(_)}`}),(0,a.jsx)("span",{className:"font-medium capitalize",children:e.role}),(0,a.jsx)("span",{className:"text-muted-foreground",children:"\xb7"}),(0,a.jsx)("span",{className:"uppercase tracking-wider text-muted-foreground",children:(0,f.u5)(_)}),(e.modelUsed??e.model)&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-muted-foreground/60",children:"\xb7"}),(0,a.jsx)("span",{className:"font-mono text-xs text-muted-foreground",children:e.modelUsed??e.model})]})]})}),(0,a.jsx)("div",{className:"max-h-[70vh] overflow-y-auto rounded border border-border bg-card/40 p-4",children:(0,a.jsx)("pre",{className:"whitespace-pre-wrap break-words text-sm text-foreground/90",children:e.answer??""})})]})})]})}function N(e){let t=(e.inputTokens??0)+(e.outputTokens??0);return t<=0?null:t<1e3?`${t} tok`:`${(t/1e3).toFixed(1)}k tok`}function A({round:e,isLatest:t,activeFor:r,liveTails:s,chatTerminal:n,reviewOnly:o,chatId:d,swaps:i}){let l=o?e.participants.filter(e=>"doer"!==e.role):e.participants,c=(i??[]).filter(t=>t.round===e.round);return(0,a.jsxs)("section",{children:[!o&&(0,a.jsxs)("h2",{className:"mb-3 text-xs uppercase tracking-wider text-muted-foreground",children:["Round ",e.round,t&&(0,a.jsx)("span",{className:"ml-2 rounded bg-primary/10 px-1.5 py-0.5 text-[10px] font-medium text-primary",children:"current"})]}),(0,a.jsx)("div",{className:"grid items-start gap-4 sm:grid-cols-2 xl:grid-cols-3",children:l.map(e=>{let t;return(0,a.jsx)(j,{participant:e,isActive:r(e),liveTail:s[e.participant],chatTerminal:n,chatId:d,reviewOnly:o,swaps:(t=e.participant.replace(/^(reviewer-|doer-)/,""),c.filter(e=>e.agent===t))},e.participant)})})]})}let $={claude:"claude-code",codex:"codex-cli",gemini:"gemini-cli",opencode:"opencode-cli",kimi:"kimi-cli",grok:"grok-cli",openrouter:"openrouter"},M={anthropic:"claude",openai:"codex",google:"gemini",opencode:"opencode",moonshot:"kimi",grok:"grok"},C={drafting:{text:"DRAFTING \xb7 doer working",color:"primary"},reviewing:{text:"REVIEWING \xb7 cross-lineage check",color:"primary"},approved:{text:"APPROVED",color:"emerald"},merged:{text:"PR OPENED",color:"emerald"},blocked:{text:"BLOCKED \xb7 ship error",color:"amber"},no_review:{text:"NO REVIEW \xb7 reviewers unavailable",color:"amber"},failed:{text:"FAILED",color:"destructive"},cancelled:{text:"CANCELLED",color:"muted"}},E={primary:"bg-primary",emerald:"bg-emerald-400",amber:"bg-amber-400",destructive:"bg-destructive",muted:"bg-muted-foreground"},_=["approved","merged","blocked","failed","cancelled","no_review"];function S(e,t){return t&&t.startsWith("openrouter:")?"openrouter":M[e]??e}let R=(0,o.A)("rotate-cw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]),L=(0,o.A)("repeat",[["path",{d:"m17 2 4 4-4 4",key:"nntrym"}],["path",{d:"M3 11v-1a4 4 0 0 1 4-4h14",key:"84bu3i"}],["path",{d:"m7 22-4-4 4-4",key:"1wqhfi"}],["path",{d:"M21 13v1a4 4 0 0 1-4 4H3",key:"1rx37r"}]]);var I=r(8420),z=r(5902);function T({chatId:e,status:t,isTerminal:r,template:s,onCancel:o}){let d=(0,z.useRouter)(),[l,c]=(0,i.useState)(!1),[p,m]=(0,i.useState)(!1),x=async()=>{c(!0);try{let t=await fetch(`/api/daemon/chats/${e}/rerun`,{method:"POST"});if(!t.ok){window.alert("Couldn't start a new run — Chorus didn't respond. Try restarting it from your terminal: chorus start"),c(!1);return}let r=await t.json();if(!r.ok){let e=r.error?.message??"Unknown error from Chorus.";window.alert(`Couldn't start a new run: ${e}`),c(!1);return}let a=r.data?.slug??r.data?.id;a?(d.push(`/runs/${a}`),d.refresh()):(window.alert("Chorus accepted the retry but didn't return a chat id. Refresh and try again."),c(!1))}catch{window.alert("Retry failed. Network error."),c(!1)}},h=async()=>{if(window.confirm("Delete this chat permanently? This removes all reviewer output and history. You cannot undo this.")){m(!0);try{(await fetch(`/api/daemon/chats/${e}`,{method:"DELETE"})).ok?(d.push("/runs"),d.refresh()):(window.alert("Couldn't delete this chat — Chorus didn't respond. Try restarting it from your terminal: chorus start"),m(!1))}catch{window.alert("Delete failed. Network error."),m(!1)}}};return(0,a.jsxs)("div",{className:"flex shrink-0 items-center gap-2",children:["cancelled"===t||"failed"===t?(0,a.jsxs)("button",{type:"button",disabled:l,onClick:x,className:"flex items-center gap-1.5 rounded-md border border-primary/40 bg-primary/10 px-3 py-1.5 text-xs font-medium text-primary transition hover:border-primary hover:bg-primary/20 disabled:cursor-not-allowed disabled:opacity-50",children:[(0,a.jsx)(R,{className:`h-3.5 w-3.5 ${l?"animate-spin":""}`}),l?"Restarting…":"Retry"]}):(0,a.jsxs)("button",{type:"button",disabled:r,onClick:async()=>{await fetch(`/api/daemon/chats/${e}/cancel`,{method:"POST"}),o()},className:"flex items-center gap-1.5 rounded-md border border-border bg-card px-3 py-1.5 text-xs font-medium text-muted-foreground transition hover:border-destructive/40 hover:text-destructive disabled:cursor-not-allowed disabled:opacity-50",children:[(0,a.jsx)(u.A,{className:"h-3.5 w-3.5"}),"Cancel"]}),r&&s&&(0,a.jsxs)(n(),{href:`/new?template=${encodeURIComponent(s.id)}`,className:"flex items-center gap-1.5 rounded-md border border-border bg-card px-3 py-1.5 text-xs font-medium text-muted-foreground transition hover:border-primary/40 hover:text-primary",children:[(0,a.jsx)(L,{className:"h-3.5 w-3.5"}),"Run again"]}),(0,a.jsxs)("button",{type:"button",disabled:p,onClick:h,className:"flex items-center gap-1.5 rounded-md border border-border bg-card px-3 py-1.5 text-xs font-medium text-muted-foreground transition hover:border-destructive/40 hover:text-destructive disabled:cursor-not-allowed disabled:opacity-50",children:[(0,a.jsx)(I.A,{className:"h-3.5 w-3.5"}),p?"Deleting…":"Delete"]})]})}var O=r(52),D=r(2116),U=r(2865),P=r(9410),V=r(9208),F=r(7618),H=r(4579),q=r(9812),W=r(9707);let G={review:O.A,review_only:O.A,plan:D.A,spec:U.A,tests:P.A,implement:V.A,verify:F.A,pr:H.A,divergence:m.A,recon:q.A},K={pending:"bg-muted-foreground/20 text-muted-foreground",active:"bg-primary/20 text-primary ring-2 ring-primary/40 ring-offset-2 ring-offset-background",done:"bg-emerald-500/20 text-emerald-300",blocked:"bg-amber-500/20 text-amber-300",skipped:"bg-muted-foreground/10 text-muted-foreground/50 line-through"},J={pending:"queued",active:"active",done:"done",blocked:"blocked",skipped:"skipped"};function Q({phases:e,activeIndex:t,states:r,onSelect:s}){return(0,a.jsx)("div",{className:"flex items-center gap-0 overflow-x-auto pb-1",children:e.map((n,o)=>{let d=r[o]??"pending",i=G[n.kind],l=s&&("done"===d||"active"===d);return(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsxs)("button",{type:"button",disabled:!l,onClick:()=>l&&s?.(o),className:`group flex items-center gap-2 rounded-md border px-3 py-1.5 text-left transition ${o===t?"border-primary/40 bg-primary/5":"done"===d?"border-emerald-500/30 bg-emerald-500/5":"blocked"===d?"border-amber-500/40 bg-amber-500/5":"border-border bg-card/30"} ${l?"hover:border-foreground/30":"cursor-default"}`,children:[(0,a.jsx)("span",{className:`grid h-6 w-6 shrink-0 place-items-center rounded-md ${K[d]}`,children:"done"===d?(0,a.jsx)(W.A,{className:"h-3.5 w-3.5"}):"active"===d?(0,a.jsx)(y.A,{className:"h-3.5 w-3.5 animate-spin"}):(0,a.jsx)(i,{className:"h-3.5 w-3.5"})}),(0,a.jsxs)("span",{className:"flex flex-col leading-tight",children:[(0,a.jsxs)("span",{className:"text-[10px] font-medium uppercase tracking-wider text-muted-foreground",children:[String(o+1).padStart(2,"0")," \xb7 ",J[d]]}),(0,a.jsx)("span",{className:`text-xs font-medium ${"skipped"===d?"text-muted-foreground/50":"text-foreground"}`,children:n.name})]})]}),o<e.length-1&&(0,a.jsx)("span",{className:`mx-1.5 h-px w-6 ${"done"===r[o]?"bg-emerald-500/40":"bg-border"}`})]},n.id)})})}function Y({template:e,status:t,totalPhases:r,completedPhaseCount:s,rounds:n,enrichedRounds:o,prUrl:d,shipError:i}){return(0,a.jsx)("div",{className:"border-b border-border bg-card/20 px-4 py-3 sm:px-8",children:(0,a.jsxs)("div",{className:"mx-auto flex w-full flex-col gap-3",children:[d&&(0,a.jsxs)("div",{className:"rounded-md border border-emerald-500/40 bg-emerald-500/5 px-4 py-3",children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm font-medium text-emerald-300",children:[(0,a.jsx)(v.A,{className:"h-4 w-4"}),"Pull request opened"]}),(0,a.jsx)("a",{href:d,target:"_blank",rel:"noreferrer",className:"rounded-md border border-emerald-500/40 bg-emerald-500/10 px-3 py-1.5 text-xs font-medium text-emerald-300 transition hover:bg-emerald-500/20",children:"View PR →"})]}),(0,a.jsx)("p",{className:"mt-1 break-all font-mono text-[11px] text-emerald-200/70",children:d})]}),i&&!d&&(0,a.jsxs)("div",{className:"rounded-md border border-amber-500/40 bg-amber-500/5 px-4 py-3",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm font-medium text-amber-300",children:[(0,a.jsx)(h.A,{className:"h-4 w-4"}),"Ship phase blocked"]}),(0,a.jsx)("p",{className:"mt-1 break-words font-mono text-[11px] text-amber-200/80",children:i}),(0,a.jsx)("p",{className:"mt-2 text-[11px] leading-relaxed text-muted-foreground",children:"The reviewers approved the doer's output, but chorus couldn't open a PR. Resolve the issue above and re-run."})]}),e?.phases&&e.phases.length>0&&(0,a.jsx)("div",{className:"flex justify-center",children:(0,a.jsx)(Q,{phases:e.phases,activeIndex:Math.min(s,r-1),states:e.phases.map((e,r)=>"approved"===t?"done":"no_review"===t?r<s?"done":"blocked":"failed"===t||"cancelled"===t?r<s?"done":"skipped":r<s?"done":r===s?"active":"pending")})}),(0,a.jsx)(B,{template:e,status:t,totalPhases:r,completedPhaseCount:s,rounds:n,enrichedRounds:o})]})})}function B({template:e,status:t,totalPhases:r,completedPhaseCount:s,rounds:n,enrichedRounds:o}){let d=e?.maxRounds??1,i="approved"===t||"merged"===t||"no_review"===t||"blocked"===t||"failed"===t||"cancelled"===t,l=r>1,c=!l&&d>1,p=o[o.length-1],u=p?.participants.filter(e=>"reviewer"===e.role)??[],m=u.length,x=u.filter(e=>e.hasAnswer).length;if(!l&&!c&&!(!l&&!c&&m>1))return null;let h=l?r:c?d:m,g=l?Math.min(s,r):c?Math.min(Math.max(n.length,1),d):x,f=l&&i?h:g,b=l?`${f} / ${h} phases`:c?`Round ${f} / ${h}`:`${f} / ${h} complete`;return(0,a.jsxs)("div",{className:"mx-auto flex w-full max-w-xs items-center gap-2",children:[(0,a.jsx)("div",{className:"flex h-1 flex-1 overflow-hidden rounded-full bg-muted",children:(0,a.jsx)("div",{className:`transition-[width] duration-700 ease-out ${"approved"===t?"bg-emerald-400":"bg-primary"}`,style:{width:`${f/h*100}%`}})}),(0,a.jsx)("span",{className:"shrink-0 font-mono text-[10px] tabular-nums text-muted-foreground",children:b})]})}function X({chatId:e,initialStatus:t,initialRounds:r,templateId:s,template:o,work:c,projectName:u,initialPrUrl:m,initialShipError:x,initialVerdict:h,demoDataSource:g}){var b,v;let[y,w]=(0,i.useState)(t),[k,j]=(0,i.useState)(h),[N,M]=(0,i.useState)(r),[R,L]=(0,i.useState)(new Set),[I,z]=(0,i.useState)(m),[O,D]=(0,i.useState)(x),[U,P]=(0,i.useState)({}),[V,F]=(0,i.useState)(-1),[H,q]=(0,i.useState)({}),[W,G]=(0,i.useState)([]),K=e=>`${e.round}:${e.phaseId}:${e.role}:${e.agent}:${e.fromLineage}:${e.fromModel}`,J=e=>{G(t=>{let r=new Set(t.map(K)),a=[...t];for(let t of e){let e=K(t);r.has(e)||(r.add(e),a.push(t))}return a})},Q=_.includes(y);(0,i.useEffect)(()=>{if(Q||g)return;let t=setInterval(async()=>{try{let t=await fetch(`/api/run-artifacts/${e}`);if(!t.ok)return;let r=await t.json();M(r.rounds),Array.isArray(r.swaps)&&r.swaps.length>0&&J(r.swaps)}catch{}},8e3);return()=>clearInterval(t)},[e,Q,g]),(0,i.useEffect)(()=>{if(Q)return;let t=g?g.createEventSource():new EventSource(`/api/daemon/chats/${e}/stream`);return t.onmessage=r=>{try{let a=JSON.parse(r.data),s=a.payload.role,n=a.payload.agent,o=a.payload.phaseId;if("phase_start"===a.type&&s&&n&&o&&(L(e=>{let t=new Set(e);return t.add(`${s}-${n}-${o}`),t}),g)){let e=g.fetchArtifacts();M(e.rounds),Array.isArray(e.swaps)&&J(e.swaps)}if("phase_progress"===a.type&&s&&n){let e=a.payload.output;if("string"==typeof e&&e.length>0){let t=`${s}-${n}`;P(r=>({...r,[t]:e}))}}if(("phase_done"===a.type||"phase_failed"===a.type)&&(L(new Set),"phase_done"===a.type)){let e=a.payload?.phaseIdx??-1;Number.isInteger(e)&&e>=0&&F(t=>e>t?e:t)}if("cli_warning"===a.type&&n&&s){let e="doer"===s?`doer-${n}`:`reviewer-${n}`,t=a.payload.reason??void 0,r=t??a.payload.kind??"warning",o=a.payload.message??"(no detail)";if(q(t=>{let s={...t},n=s[e]??[];return n.some(e=>e.kind===r&&e.message===o)?t:(s[e]=[...n,{kind:r,message:o,ts:a.ts??Date.now()}],s)}),("lineage_fallback"===t||"model_fallback"===t)&&"string"==typeof a.payload.fromLineage&&"string"==typeof a.payload.toLineage){let e=a.payload.round??1,r=a.payload.phaseId??"",o=a.payload.fromModel??"(default)",d=a.payload.toModel??"(default)",i=a.payload.fallbackIdx??0,l={round:e,phaseId:r,role:s,agent:n,reason:t,fromLineage:a.payload.fromLineage,toLineage:a.payload.toLineage,fromModel:o,toModel:d,fallbackIdx:i,ts:a.ts??Date.now()};G(e=>{let t=K(l);return e.some(e=>K(e)===t)?e:[...e,l]})}}if("participant_done"===a.type)if(g){let e=g.fetchArtifacts();M(e.rounds),Array.isArray(e.swaps)&&J(e.swaps)}else fetch(`/api/run-artifacts/${e}`).then(e=>e.ok?e.json():null).then(e=>{e&&(M(e.rounds),Array.isArray(e.swaps)&&J(e.swaps))}).catch(()=>{});if("chat_done"===a.type){let r=a.payload.status;"merged"===r?w("merged"):"blocked"===r?w("blocked"):"no_review"===r?w("no_review"):"failed"===r?w("failed"):"cancelled"===r?w("cancelled"):w("approved");let s=a.payload.verdict;"string"==typeof s&&s.length>0&&j(s);let n=a.payload.prUrl;"string"==typeof n&&n.length>0&&z(n);let o=a.payload.shipError;if("string"==typeof o&&o.length>0&&D(o),t.close(),g){let e=g.fetchArtifacts();M(e.rounds),Array.isArray(e.swaps)&&J(e.swaps)}else fetch(`/api/run-artifacts/${e}`).then(e=>e.ok?e.json():null).then(e=>{e&&(M(e.rounds),Array.isArray(e.swaps)&&J(e.swaps))}).catch(()=>{})}}catch{}},()=>t.close()},[e,Q,g]),(0,i.useEffect)(()=>{if(g)return;let t=!1;return fetch(`/api/run-artifacts/${e}`).then(e=>e.ok?e.json():null).then(e=>{!t&&e&&Array.isArray(e.swaps)&&J(e.swaps)}).catch(()=>{}),()=>{t=!0}},[e,g]);let B=(b=y,v=k,"approved"===b&&v&&"approved"!==v?"request_changes"===v?{text:"REVIEW \xb7 CHANGES REQUESTED",color:"amber"}:{text:`REVIEW \xb7 ${v.toUpperCase()}`,color:"amber"}:C[b]??{text:b.toUpperCase(),color:"muted"}),Z=o?.phases?.length??1,ee=(0,i.useMemo)(()=>"approved"===y||"merged"===y||"no_review"===y||"blocked"===y?Z:"failed"===y||"cancelled"===y?0:Math.min(Math.max(0,V+1),Z),[y,Z,V]),et=(0,i.useMemo)(()=>(0,l.$)(o),[o]),er=(0,i.useMemo)(()=>(function(e,t,r){if(!t?.phases?.length)return e;let a=(0,l.$)(t),s=function(e,t){let r=e.phases[0],a=(e,t)=>t?.[0]??(0,f.YM)(e),s=[];if(!t){let e=r.doer.models?.[0],t=S(r.doer.lineage,e);s.push({role:"doer",lineage:t,model:e??a(t,r.doer.models)})}for(let[e,t]of(r.reviewer?.candidatesWithModels??[]).entries()){let r=t.models?.[0],n=S(t.lineage,r);s.push({role:"reviewer",lineage:n,model:r??a(n,t.models),reviewerIdx:e})}return s}(t,a);return(0===e.length?[{round:1,participants:[]}]:e).map(e=>{let t=[],a=new Set;for(let n of s){let s="doer"===n.role?`doer-${n.lineage}`:`reviewer-${n.lineage}-${n.reviewerIdx}`,o=e.participants.find(e=>"doer"===n.role?"doer"===e.role&&e.lineage===n.lineage:"reviewer"===e.role&&e.lineage===n.lineage&&parseInt(e.participant.match(/-(\d+)$/)?.[1]??"0",10)===n.reviewerIdx);o?(t.push({...o,model:n.model,...r[o.participant]?{warnings:r[o.participant]}:{}}),a.add(o.participant)):t.push({participant:s,role:n.role,agentName:$[n.lineage]??n.lineage,lineage:n.lineage,hasAnswer:!1,model:n.model,pending:!0,...r[s]?{warnings:r[s]}:{}})}for(let s of e.participants)a.has(s.participant)||t.push({...s,...r[s.participant]?{warnings:r[s.participant]}:{}});return{...e,participants:t}})})(N,o,H),[N,o,H]),ea=er[er.length-1],es=er.slice(0,-1);return(0,a.jsxs)("div",{className:"flex h-full flex-col",children:[(0,a.jsxs)("div",{className:"sticky top-0 z-20 border-b border-border bg-card/80 backdrop-blur-sm px-4 py-3 sm:px-8",children:[(0,a.jsxs)("div",{className:"mb-2 flex w-full items-center justify-between gap-3",children:[(0,a.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,a.jsxs)(n(),{href:"/runs",className:"flex shrink-0 items-center gap-1 text-xs text-muted-foreground transition hover:text-foreground",children:[(0,a.jsx)(d,{className:"h-3 w-3"}),(0,a.jsx)("span",{children:u??"Runs"})]}),(0,a.jsx)("span",{className:"text-muted-foreground/40",children:"\xb7"}),(0,a.jsxs)("span",{title:B.text,className:"inline-flex shrink-0 items-center gap-1.5 text-[11px] uppercase tracking-wider text-muted-foreground",children:[(0,a.jsx)("span",{className:`h-2 w-2 shrink-0 rounded-full ${E[B.color]} ${Q?"":"animate-pulse-soft"}`}),y]}),(o||s)&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-muted-foreground/40",children:"\xb7"}),(0,a.jsxs)(n(),{href:`/templates${o?`#${encodeURIComponent(o.id)}`:""}`,title:o?`Template: ${o.name}`:`Template (deleted): ${s}`,className:"inline-flex min-w-0 shrink items-center gap-1.5 text-[11px] text-muted-foreground transition hover:text-primary",children:[(0,a.jsx)("span",{className:"font-mono uppercase tracking-wider",children:"tpl"}),(0,a.jsx)("span",{className:"truncate font-medium text-foreground",children:o?.name??s})]})]})]}),(0,a.jsx)(T,{chatId:e,status:y,isTerminal:Q,template:o,onCancel:()=>w("cancelled")})]}),(0,a.jsx)("div",{className:"min-w-0",children:(0,a.jsx)(p,{work:c})})]}),(0,a.jsx)(Y,{template:o,status:y,totalPhases:Z,completedPhaseCount:ee,rounds:N,enrichedRounds:er,prUrl:I,shipError:O}),(0,a.jsx)("div",{className:"flex-1 overflow-y-auto px-4 py-6 sm:px-8",children:(0,a.jsxs)("div",{className:"mx-auto w-full space-y-8",children:[0===N.length&&(0,a.jsx)("div",{className:"rounded-lg border border-dashed border-border p-12 text-center text-sm text-muted-foreground",children:"Waiting for first phase to start…"}),ea&&(0,a.jsx)(A,{round:ea,isLatest:!0,activeFor:e=>{let t=`${e.participant}-`;for(let e of R)if(e.startsWith(t))return!0;return!1},liveTails:U,chatTerminal:Q,reviewOnly:et,chatId:e,swaps:W}),!et&&es.length>0&&(0,a.jsxs)("details",{className:"rounded-lg border border-border bg-card",children:[(0,a.jsxs)("summary",{className:"cursor-pointer px-4 py-3 text-xs uppercase tracking-wider text-muted-foreground hover:text-foreground",children:["Earlier rounds (",es.length,")"]}),(0,a.jsx)("div",{className:"space-y-6 border-t border-border p-4",children:es.slice().reverse().map(e=>(0,a.jsx)(A,{round:e,activeFor:()=>!1,liveTails:{},chatTerminal:Q,swaps:W},e.round))})]})]})})]})}},1749:(e,t,r)=>{r.d(t,{$:()=>i});var a=r(9442);r(6074);var s=r(9056),n=r(8113),o=r(7362);let d=(0,s.F)("inline-flex shrink-0 items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",xs:"h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-xs":"size-6 rounded-md [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function i({className:e,variant:t="default",size:r="default",asChild:s=!1,...l}){let c=s?n.bL:"button";return(0,a.jsx)(c,{"data-slot":"button","data-variant":t,"data-size":r,className:(0,o.cn)(d({variant:t,size:r,className:e})),...l})}},1853:(e,t,r)=>{r.d(t,{Cf:()=>p,L3:()=>m,c7:()=>u,lG:()=>d,rr:()=>x,zM:()=>i});var a=r(9442);r(6074);var s=r(6891),n=r(3703),o=r(7362);function d({...e}){return(0,a.jsx)(n.bL,{"data-slot":"dialog",...e})}function i({...e}){return(0,a.jsx)(n.l9,{"data-slot":"dialog-trigger",...e})}function l({...e}){return(0,a.jsx)(n.ZL,{"data-slot":"dialog-portal",...e})}function c({className:e,...t}){return(0,a.jsx)(n.hJ,{"data-slot":"dialog-overlay",className:(0,o.cn)("fixed inset-0 z-50 bg-black/75 backdrop-blur-sm data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0",e),...t})}function p({className:e,children:t,showCloseButton:r=!0,...d}){return(0,a.jsxs)(l,{"data-slot":"dialog-portal",children:[(0,a.jsx)(c,{}),(0,a.jsxs)(n.UC,{"data-slot":"dialog-content",className:(0,o.cn)("fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border bg-background p-6 shadow-lg duration-200 outline-none data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 sm:max-w-lg",e),...d,children:[t,r&&(0,a.jsxs)(n.bm,{"data-slot":"dialog-close",className:"absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[(0,a.jsx)(s.A,{}),(0,a.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})}function u({className:e,...t}){return(0,a.jsx)("div",{"data-slot":"dialog-header",className:(0,o.cn)("flex flex-col gap-2 text-center sm:text-left",e),...t})}function m({className:e,...t}){return(0,a.jsx)(n.hE,{"data-slot":"dialog-title",className:(0,o.cn)("text-lg leading-none font-semibold",e),...t})}function x({className:e,...t}){return(0,a.jsx)(n.VY,{"data-slot":"dialog-description",className:(0,o.cn)("text-sm text-muted-foreground",e),...t})}r(1749)},2116:(e,t,r)=>{r.d(t,{A:()=>a});let a=(0,r(3884).A)("clipboard-list",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"M12 11h4",key:"1jrz19"}],["path",{d:"M12 16h4",key:"n85exb"}],["path",{d:"M8 11h.01",key:"1dfujw"}],["path",{d:"M8 16h.01",key:"18s6g9"}]])},2865:(e,t,r)=>{r.d(t,{A:()=>a});let a=(0,r(3884).A)("file-code-corner",[["path",{d:"M4 12.15V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2h-3.35",key:"1wthlu"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m5 16-3 3 3 3",key:"331omg"}],["path",{d:"m9 22 3-3-3-3",key:"lsp7cz"}]])},2956:(e,t,r)=>{r.d(t,{A:()=>a});let a=(0,r(3884).A)("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]])},3149:(e,t,r)=>{r.d(t,{A:()=>a});let a=(0,r(3884).A)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},3734:(e,t,r)=>{r.d(t,{JR:()=>c,QJ:()=>n,VW:()=>o,YM:()=>u,m_:()=>d,r2:()=>m,u5:()=>l,x0:()=>p,ze:()=>a});let a={anthropic:"Claude",openai:"Codex",google:"Gemini",opencode:"OpenCode",moonshot:"Kimi",local:"Local LLM",grok:"Grok"},s={anthropic:"bg-violet-400",openai:"bg-orange-400",google:"bg-blue-400",opencode:"bg-emerald-400",moonshot:"bg-pink-400",local:"bg-teal-400",grok:"bg-slate-400"};function n(e){return e?a[e]??e:""}function o(e){return e?s[e]??"bg-muted":"bg-muted"}let d={claude:"Claude",codex:"Codex",gemini:"Gemini",opencode:"OpenCode",kimi:"Kimi",openrouter:"OpenRouter",local:"Local LLM",grok:"Grok"},i={claude:"bg-violet-400",codex:"bg-orange-400",gemini:"bg-blue-400",opencode:"bg-emerald-400",kimi:"bg-pink-400",openrouter:"bg-cyan-400",local:"bg-teal-400",grok:"bg-slate-400"};function l(e){return e?d[e]??e:""}function c(e){return e?i[e]??"bg-muted":"bg-muted"}let p={claude:"claude-opus-4-7",codex:"gpt-5.5",gemini:"gemini-2.5-pro",opencode:"kimi-k2.6",kimi:"kimi-k2.6",openrouter:"",local:"",grok:"grok-build"};function u(e){if(e)return p[e]}let m={claude:{dot:"bg-violet-400",ring:"ring-violet-400/40",gradient:"bg-gradient-to-b from-violet-500/15 to-card"},codex:{dot:"bg-orange-400",ring:"ring-orange-400/40",gradient:"bg-gradient-to-b from-orange-500/15 to-card"},gemini:{dot:"bg-blue-400",ring:"ring-blue-400/40",gradient:"bg-gradient-to-b from-blue-500/15 to-card"},opencode:{dot:"bg-emerald-400",ring:"ring-emerald-400/40",gradient:"bg-gradient-to-b from-emerald-500/15 to-card"},kimi:{dot:"bg-pink-400",ring:"ring-pink-400/40",gradient:"bg-gradient-to-b from-pink-500/15 to-card"},openrouter:{dot:"bg-cyan-400",ring:"ring-cyan-400/40",gradient:"bg-gradient-to-b from-cyan-500/15 to-card"},local:{dot:"bg-teal-400",ring:"ring-teal-400/40",gradient:"bg-gradient-to-b from-teal-500/15 to-card"},grok:{dot:"bg-slate-400",ring:"ring-slate-400/40",gradient:"bg-gradient-to-b from-slate-500/15 to-card"}}},4030:(e,t,r)=>{r.d(t,{A:()=>a});let a=(0,r(3884).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"}]])},4579:(e,t,r)=>{r.d(t,{A:()=>a});let a=(0,r(3884).A)("git-pull-request",[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M13 6h3a2 2 0 0 1 2 2v7",key:"1yeb86"}],["line",{x1:"6",x2:"6",y1:"9",y2:"21",key:"rroup"}]])},4608:(e,t,r)=>{r.d(t,{A:()=>a});let a=(0,r(3884).A)("shuffle",[["path",{d:"m18 14 4 4-4 4",key:"10pe0f"}],["path",{d:"m18 2 4 4-4 4",key:"pucp1d"}],["path",{d:"M2 18h1.973a4 4 0 0 0 3.3-1.7l5.454-8.6a4 4 0 0 1 3.3-1.7H22",key:"1ailkh"}],["path",{d:"M2 6h1.972a4 4 0 0 1 3.6 2.2",key:"km57vx"}],["path",{d:"M22 18h-6.041a4 4 0 0 1-3.3-1.8l-.359-.45",key:"os18l9"}]])},6289:(e,t,r)=>{r.d(t,{A:()=>a});let a=(0,r(3884).A)("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]])},7618:(e,t,r)=>{r.d(t,{A:()=>a});let a=(0,r(3884).A)("flask-conical",[["path",{d:"M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2",key:"18mbvz"}],["path",{d:"M6.453 15h11.094",key:"3shlmq"}],["path",{d:"M8.5 2h7",key:"csnxdl"}]])},8420:(e,t,r)=>{r.d(t,{A:()=>a});let a=(0,r(3884).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"}]])},9056:(e,t,r)=>{r.d(t,{F:()=>o});var a=r(142);let s=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,n=a.$,o=(e,t)=>r=>{var a;if((null==t?void 0:t.variants)==null)return n(e,null==r?void 0:r.class,null==r?void 0:r.className);let{variants:o,defaultVariants:d}=t,i=Object.keys(o).map(e=>{let t=null==r?void 0:r[e],a=null==d?void 0:d[e];if(null===t)return null;let n=s(t)||s(a);return o[e][n]}),l=r&&Object.entries(r).reduce((e,t)=>{let[r,a]=t;return void 0===a||(e[r]=a),e},{});return n(e,i,null==t||null==(a=t.compoundVariants)?void 0:a.reduce((e,t)=>{let{class:r,className:a,...s}=t;return Object.entries(s).every(e=>{let[t,r]=e;return Array.isArray(r)?r.includes({...d,...l}[t]):({...d,...l})[t]===r})?[...e,r,a]:e},[]),null==r?void 0:r.class,null==r?void 0:r.className)}},9208:(e,t,r)=>{r.d(t,{A:()=>a});let a=(0,r(3884).A)("code-xml",[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]])},9410:(e,t,r)=>{r.d(t,{A:()=>a});let a=(0,r(3884).A)("test-tube-diagonal",[["path",{d:"M21 7 6.82 21.18a2.83 2.83 0 0 1-3.99-.01a2.83 2.83 0 0 1 0-4L17 3",key:"1ub6xw"}],["path",{d:"m16 2 6 6",key:"1gw87d"}],["path",{d:"M12 16H4",key:"1cjfip"}]])},9707:(e,t,r)=>{r.d(t,{A:()=>a});let a=(0,r(3884).A)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]])},9812:(e,t,r)=>{r.d(t,{A:()=>a});let a=(0,r(3884).A)("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]])}}]);