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.
- package/.next/BUILD_ID +1 -1
- package/.next/app-path-routes-manifest.json +2 -2
- package/.next/build-manifest.json +2 -2
- package/.next/prerender-manifest.json +3 -3
- package/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_global-error.html +1 -1
- package/.next/server/app/_global-error.rsc +1 -1
- package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_not-found.html +1 -1
- package/.next/server/app/_not-found.rsc +2 -2
- package/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
- package/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_index.segment.rsc +2 -2
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/connect/page.js +1 -1
- package/.next/server/app/connect/page_client-reference-manifest.js +1 -1
- package/.next/server/app/demo/[scenario]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/new/page.js +1 -1
- package/.next/server/app/new/page_client-reference-manifest.js +1 -1
- package/.next/server/app/new.html +1 -1
- package/.next/server/app/new.rsc +3 -3
- package/.next/server/app/new.segments/_full.segment.rsc +3 -3
- package/.next/server/app/new.segments/_head.segment.rsc +1 -1
- package/.next/server/app/new.segments/_index.segment.rsc +2 -2
- package/.next/server/app/new.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/new.segments/new/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/new.segments/new.segment.rsc +1 -1
- package/.next/server/app/onboarding/page.js +2 -2
- package/.next/server/app/onboarding/page_client-reference-manifest.js +1 -1
- package/.next/server/app/onboarding.html +1 -1
- package/.next/server/app/onboarding.rsc +3 -3
- package/.next/server/app/onboarding.segments/_full.segment.rsc +3 -3
- package/.next/server/app/onboarding.segments/_head.segment.rsc +1 -1
- package/.next/server/app/onboarding.segments/_index.segment.rsc +2 -2
- package/.next/server/app/onboarding.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/onboarding.segments/onboarding/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/onboarding.segments/onboarding.segment.rsc +1 -1
- package/.next/server/app/page.js +1 -1
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app/personas/page_client-reference-manifest.js +1 -1
- package/.next/server/app/personas.html +1 -1
- package/.next/server/app/personas.rsc +3 -3
- package/.next/server/app/personas.segments/_full.segment.rsc +3 -3
- package/.next/server/app/personas.segments/_head.segment.rsc +1 -1
- package/.next/server/app/personas.segments/_index.segment.rsc +2 -2
- package/.next/server/app/personas.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/personas.segments/personas/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/personas.segments/personas.segment.rsc +1 -1
- package/.next/server/app/runs/[runId]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/runs/page_client-reference-manifest.js +1 -1
- package/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/.next/server/app/settings/permissions/page_client-reference-manifest.js +1 -1
- package/.next/server/app/settings.html +1 -1
- package/.next/server/app/settings.rsc +3 -3
- package/.next/server/app/settings.segments/_full.segment.rsc +3 -3
- package/.next/server/app/settings.segments/_head.segment.rsc +1 -1
- package/.next/server/app/settings.segments/_index.segment.rsc +2 -2
- package/.next/server/app/settings.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/settings.segments/settings.segment.rsc +1 -1
- package/.next/server/app/templates/page.js +1 -1
- package/.next/server/app/templates/page_client-reference-manifest.js +1 -1
- package/.next/server/app/templates.html +1 -1
- package/.next/server/app/templates.rsc +3 -3
- package/.next/server/app/templates.segments/_full.segment.rsc +3 -3
- package/.next/server/app/templates.segments/_head.segment.rsc +1 -1
- package/.next/server/app/templates.segments/_index.segment.rsc +2 -2
- package/.next/server/app/templates.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/templates.segments/templates/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/templates.segments/templates.segment.rsc +1 -1
- package/.next/server/app-paths-manifest.json +2 -2
- package/.next/server/chunks/189.js +1 -1
- package/.next/server/chunks/325.js +1 -1
- package/.next/server/chunks/642.js +1 -1
- package/.next/server/chunks/681.js +1 -1
- package/.next/server/middleware-build-manifest.js +1 -1
- package/.next/server/pages/404.html +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/server/server-reference-manifest.json +1 -1
- package/.next/static/chunks/245-686f2a9a3d4d5554.js +1 -0
- package/.next/static/chunks/{641-3e7b9575770aa968.js → 641-66f3ba81d2479b02.js} +1 -1
- package/.next/static/chunks/744-a5a2f718e91700bd.js +1 -0
- package/.next/static/chunks/app/connect/page-e216744a2daa061b.js +1 -0
- package/.next/static/chunks/app/new/page-d65ea7687a1b37ad.js +1 -0
- package/.next/static/chunks/app/onboarding/page-9f2b388be3008bdc.js +1 -0
- package/.next/static/chunks/app/page-75f1f750029680bd.js +1 -0
- package/.next/static/chunks/app/templates/page-0cfb5ce79f29fcd5.js +1 -0
- package/.next/static/css/a2b7a8d35dba10d3.css +3 -0
- package/.next/trace +20 -20
- package/.next/trace-build +1 -1
- package/dist/cli/commands/doctor.js +1 -0
- package/dist/cli/commands/doctor.js.map +1 -1
- package/dist/cli/commands/init.js +2 -0
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/quickstart.js +20 -10
- package/dist/cli/commands/quickstart.js.map +1 -1
- package/dist/daemon/agents/grok.js +105 -0
- package/dist/daemon/agents/grok.js.map +1 -0
- package/dist/daemon/agents/index.js +4 -1
- package/dist/daemon/agents/index.js.map +1 -1
- package/dist/daemon/agents/parsers/grok.js +89 -0
- package/dist/daemon/agents/parsers/grok.js.map +1 -0
- package/dist/daemon/agents/parsers/index.js +4 -1
- package/dist/daemon/agents/parsers/index.js.map +1 -1
- package/dist/daemon/error-detector.js +21 -2
- package/dist/daemon/error-detector.js.map +1 -1
- package/dist/daemon/orchestrators/grok.js +101 -0
- package/dist/daemon/orchestrators/grok.js.map +1 -0
- package/dist/daemon/orchestrators/index.js +2 -0
- package/dist/daemon/orchestrators/index.js.map +1 -1
- package/dist/daemon/orchestrators/shared.js.map +1 -1
- package/dist/lib/cli-detect.js +13 -0
- package/dist/lib/cli-detect.js.map +1 -1
- package/dist/lib/cli-health.js +1 -0
- package/dist/lib/cli-health.js.map +1 -1
- package/dist/lib/cli-paths.js +1 -0
- package/dist/lib/cli-paths.js.map +1 -1
- package/dist/lib/cli-precheck.js +12 -0
- package/dist/lib/cli-precheck.js.map +1 -1
- package/dist/lib/db/voices.js +1 -1
- package/dist/lib/db/voices.js.map +1 -1
- package/dist/lib/lineage-maps.js +25 -0
- package/dist/lib/lineage-maps.js.map +1 -1
- package/dist/lib/template-schema.js +2 -2
- package/dist/lib/template-schema.js.map +1 -1
- package/dist/lib/voices.js +6 -0
- package/dist/lib/voices.js.map +1 -1
- package/package.json +1 -1
- package/.next/static/chunks/245-c081ea5ea945611e.js +0 -1
- package/.next/static/chunks/744-0fa71524896d2b59.js +0 -1
- package/.next/static/chunks/app/connect/page-ae2d68d73d1fa88a.js +0 -1
- package/.next/static/chunks/app/new/page-7793713d2f445862.js +0 -1
- package/.next/static/chunks/app/onboarding/page-0ad8dceca7279475.js +0 -1
- package/.next/static/chunks/app/page-4bbcd06414430038.js +0 -1
- package/.next/static/chunks/app/templates/page-5ecd9b15c495b3bd.js +0 -1
- package/.next/static/css/b914f2b25cf933a9.css +0 -3
- /package/.next/static/{PLVy0iTepN1xpE0hbQBjx → CJke3duo44Hy3cygzeoG9}/_buildManifest.js +0 -0
- /package/.next/static/{PLVy0iTepN1xpE0hbQBjx → CJke3duo44Hy3cygzeoG9}/_ssgManifest.js +0 -0
package/dist/lib/voices.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"voices.js","sourceRoot":"","sources":["../../src/lib/voices.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAiDH,sDA6CC;AAqDD,sCAsMC;AAmBD,0DA4GC;AAtdD,2DAA8C;AAC9C,yCAAsC;AACtC,mDAAoE;AACpE,4CAAwE;AACxE,uDAAgE;AAEhE,MAAM,GAAG,GAAG,IAAA,qBAAS,EAAC,6BAAQ,CAAC,CAAC;AAKhC;;;GAGG;AACH,MAAM,aAAa,GAAqC;IACtD,SAAS,EAAE,QAAQ;IACnB,MAAM,EAAE,OAAO;IACf,MAAM,EAAE,QAAQ;IAChB,QAAQ,EAAE,UAAU;IACpB,QAAQ,EAAE,MAAM;CACjB,CAAC;AAEF;;;GAGG;AACH,MAAM,iBAAiB,GAIlB;IACH,EAAE,GAAG,EAAE,aAAa,EAAE,QAAQ,EAAE,aAAa,EAAE,OAAO,EAAE,WAAW,EAAE;IACrE,EAAE,GAAG,EAAE,WAAW,EAAE,QAAQ,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE;IAC9D,EAAE,GAAG,EAAE,YAAY,EAAE,QAAQ,EAAE,YAAY,EAAE,OAAO,EAAE,QAAQ,EAAE;IAChE,EAAE,GAAG,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,UAAU,EAAE;CAC/D,CAAC;AAEF;;;;;;;;GAQG;AACH,SAAgB,qBAAqB,CAAC,SAAiB;IAIrD,4EAA4E;IAC5E,MAAM,KAAK,GAAG,SAAS,CAAC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,OAAO,UAAU,CAAC;QACnC,KAAK,UAAU,CAAC,CAAC,OAAO,MAAM,CAAC;QAC/B,KAAK,MAAM,CAAC,CAAC,OAAO,MAAM,CAAC;IAC7B,CAAC;AACH,CAAC;AAED,2CAA2C;AAC9B,QAAA,UAAU,GAAG;IACxB,qBAAqB;IACrB,YAAY;IACZ,aAAa;IACb,iBAAiB;CAClB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "chorus-codes",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.39",
|
|
4
4
|
"description": "Driver-agnostic multi-LLM peer review for code decisions. Bring your own CLI; Chorus convenes 2-4 other LLMs to review the work before you ship.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "99x Agency",
|
|
@@ -1 +0,0 @@
|
|
|
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),d=r(3884);let o=(0,d.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,d.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:d,swaps:o}){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 d=r.search(/\n\n[^*]/),o=d>=0?r.slice(d+2).trim():"",i=o.length>0?o:"(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})]})]}),o&&o.length>0&&(v=o.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:d?"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:d,chatId:o,swaps:i}){let l=d?e.participants.filter(e=>"doer"!==e.role):e.participants,c=(i??[]).filter(t=>t.round===e.round);return(0,a.jsxs)("section",{children:[!d&&(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:o,reviewOnly:d,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",openrouter:"openrouter"},M={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"}},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,d.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,d.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:d}){let o=(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?(o.push(`/runs/${a}`),o.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?(o.push("/runs"),o.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"}),d()},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,d)=>{let o=r[d]??"pending",i=G[n.kind],l=s&&("done"===o||"active"===o);return(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsxs)("button",{type:"button",disabled:!l,onClick:()=>l&&s?.(d),className:`group flex items-center gap-2 rounded-md border px-3 py-1.5 text-left transition ${d===t?"border-primary/40 bg-primary/5":"done"===o?"border-emerald-500/30 bg-emerald-500/5":"blocked"===o?"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[o]}`,children:"done"===o?(0,a.jsx)(W.A,{className:"h-3.5 w-3.5"}):"active"===o?(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(d+1).padStart(2,"0")," \xb7 ",J[o]]}),(0,a.jsx)("span",{className:`text-xs font-medium ${"skipped"===o?"text-muted-foreground/50":"text-foreground"}`,children:n.name})]})]}),d<e.length-1&&(0,a.jsx)("span",{className:`mx-1.5 h-px w-6 ${"done"===r[d]?"bg-emerald-500/40":"bg-border"}`})]},n.id)})})}function Y({template:e,status:t,totalPhases:r,completedPhaseCount:s,rounds:n,enrichedRounds:d,prUrl:o,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:[o&&(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:o,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:o})]}),i&&!o&&(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:d})]})})}function B({template:e,status:t,totalPhases:r,completedPhaseCount:s,rounds:n,enrichedRounds:d}){let o=e?.maxRounds??1,i="approved"===t||"merged"===t||"no_review"===t||"blocked"===t||"failed"===t||"cancelled"===t,l=r>1,c=!l&&o>1,p=d[d.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?o:m,g=l?Math.min(s,r):c?Math.min(Math.max(n.length,1),o):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:d,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,d=a.payload.phaseId;if("phase_start"===a.type&&s&&n&&d&&(L(e=>{let t=new Set(e);return t.add(`${s}-${n}-${d}`),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",d=a.payload.message??"(no detail)";if(q(t=>{let s={...t},n=s[e]??[];return n.some(e=>e.kind===r&&e.message===d)?t:(s[e]=[...n,{kind:r,message:d,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??"",d=a.payload.fromModel??"(default)",o=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:d,toModel:o,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 d=a.payload.shipError;if("string"==typeof d&&d.length>0&&D(d),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=d?.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.$)(d),[d]),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}`,d=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);d?(t.push({...d,model:n.model,...r[d.participant]?{warnings:r[d.participant]}:{}}),a.add(d.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,d,H),[N,d,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)(o,{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]}),(d||s)&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-muted-foreground/40",children:"\xb7"}),(0,a.jsxs)(n(),{href:`/templates${d?`#${encodeURIComponent(d.id)}`:""}`,title:d?`Template: ${d.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:d?.name??s})]})]})]}),(0,a.jsx)(T,{chatId:e,status:y,isTerminal:Q,template:d,onCancel:()=>w("cancelled")})]}),(0,a.jsx)("div",{className:"min-w-0",children:(0,a.jsx)(p,{work:c})})]}),(0,a.jsx)(Y,{template:d,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),d=r(7362);let o=(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,d.cn)(o({variant:t,size:r,className:e})),...l})}},1853:(e,t,r)=>{r.d(t,{Cf:()=>p,L3:()=>m,c7:()=>u,lG:()=>o,rr:()=>x,zM:()=>i});var a=r(9442);r(6074);var s=r(6891),n=r(3703),d=r(7362);function o({...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,d.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,...o}){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,d.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),...o,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,d.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,d.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,d.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:()=>d,YM:()=>u,m_:()=>o,r2:()=>m,u5:()=>l,x0:()=>p,ze:()=>a});let a={anthropic:"Claude",openai:"Codex",google:"Gemini",opencode:"OpenCode",moonshot:"Kimi",local:"Local LLM"},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"};function n(e){return e?a[e]??e:""}function d(e){return e?s[e]??"bg-muted":"bg-muted"}let o={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 l(e){return e?o[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:""};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"}}},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:()=>d});var a=r(142);let s=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,n=a.$,d=(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:d,defaultVariants:o}=t,i=Object.keys(d).map(e=>{let t=null==r?void 0:r[e],a=null==o?void 0:o[e];if(null===t)return null;let n=s(t)||s(a);return d[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({...o,...l}[t]):({...o,...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"}]])}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[744],{63:(e,t,r)=>{r.d(t,{Zp:()=>o});var a=r(9442);r(6074);var n=r(7362);function o({className:e,...t}){return(0,a.jsx)("div",{"data-slot":"card",className:(0,n.cn)("flex flex-col gap-6 rounded-xl border bg-card py-6 text-card-foreground shadow-sm",e),...t})}},1749:(e,t,r)=>{r.d(t,{$:()=>s});var a=r(9442);r(6074);var n=r(9056),o=r(8113),i=r(7362);let d=(0,n.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 s({className:e,variant:t="default",size:r="default",asChild:n=!1,...l}){let c=n?o.bL:"button";return(0,a.jsx)(c,{"data-slot":"button","data-variant":t,"data-size":r,className:(0,i.cn)(d({variant:t,size:r,className:e})),...l})}},1853:(e,t,r)=>{r.d(t,{Cf:()=>g,L3:()=>b,c7:()=>u,lG:()=>d,rr:()=>x,zM:()=>s});var a=r(9442);r(6074);var n=r(6891),o=r(3703),i=r(7362);function d({...e}){return(0,a.jsx)(o.bL,{"data-slot":"dialog",...e})}function s({...e}){return(0,a.jsx)(o.l9,{"data-slot":"dialog-trigger",...e})}function l({...e}){return(0,a.jsx)(o.ZL,{"data-slot":"dialog-portal",...e})}function c({className:e,...t}){return(0,a.jsx)(o.hJ,{"data-slot":"dialog-overlay",className:(0,i.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 g({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)(o.UC,{"data-slot":"dialog-content",className:(0,i.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)(o.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)(n.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,i.cn)("flex flex-col gap-2 text-center sm:text-left",e),...t})}function b({className:e,...t}){return(0,a.jsx)(o.hE,{"data-slot":"dialog-title",className:(0,i.cn)("text-lg leading-none font-semibold",e),...t})}function x({className:e,...t}){return(0,a.jsx)(o.VY,{"data-slot":"dialog-description",className:(0,i.cn)("text-sm text-muted-foreground",e),...t})}r(1749)},3734:(e,t,r)=>{r.d(t,{JR:()=>c,QJ:()=>o,VW:()=>i,YM:()=>u,m_:()=>d,r2:()=>b,u5:()=>l,x0:()=>g,ze:()=>a});let a={anthropic:"Claude",openai:"Codex",google:"Gemini",opencode:"OpenCode",moonshot:"Kimi",local:"Local LLM"},n={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 o(e){return e?a[e]??e:""}function i(e){return e?n[e]??"bg-muted":"bg-muted"}let d={claude:"Claude",codex:"Codex",gemini:"Gemini",opencode:"OpenCode",kimi:"Kimi",openrouter:"OpenRouter",local:"Local LLM"},s={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 l(e){return e?d[e]??e:""}function c(e){return e?s[e]??"bg-muted":"bg-muted"}let g={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 u(e){if(e)return g[e]}let b={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"}}},4372:(e,t,r)=>{r.d(t,{G:()=>i});var a=r(9442),n=r(821),o=r(8344);function i({children:e}){return(0,a.jsxs)("div",{className:"flex h-screen w-screen overflow-hidden bg-background text-foreground",children:[(0,a.jsx)(n.AppSidebar,{}),(0,a.jsxs)("div",{className:"flex flex-1 flex-col overflow-hidden",children:[(0,a.jsx)(o.MobileTopBar,{}),(0,a.jsx)("main",{className:"flex-1 overflow-y-auto",children:e})]})]})}},5702:(e,t,r)=>{r.d(t,{E:()=>s});var a=r(9442);r(6074);var n=r(9056),o=r(8113),i=r(7362);let d=(0,n.F)("inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3",{variants:{variant:{default:"bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"bg-destructive text-white focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40 [a&]:hover:bg-destructive/90",outline:"border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",ghost:"[a&]:hover:bg-accent [a&]:hover:text-accent-foreground",link:"text-primary underline-offset-4 [a&]:hover:underline"}},defaultVariants:{variant:"default"}});function s({className:e,variant:t="default",asChild:r=!1,...n}){let l=r?o.bL:"span";return(0,a.jsx)(l,{"data-slot":"badge","data-variant":t,className:(0,i.cn)(d({variant:t}),e),...n})}},6457:(e,t,r)=>{r.d(t,{z:()=>n});var a=r(9442);function n({eyebrow:e,title:t,subtitle:r,action:o}){return(0,a.jsxs)("header",{className:"mb-6 flex flex-col gap-3 sm:flex-row sm:items-end sm:justify-between",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("p",{className:"text-xs uppercase tracking-wider text-muted-foreground",children:e}),(0,a.jsx)("h1",{className:"mt-1 text-2xl font-semibold tracking-tight",children:t}),r&&(0,a.jsx)("p",{className:"mt-2 max-w-2xl text-sm leading-relaxed text-muted-foreground",children:r})]}),o&&(0,a.jsx)("div",{className:"shrink-0 self-start sm:self-auto",children:o})]})}},8191:(e,t,r)=>{r.d(t,{N:()=>o});var a=r(9442),n=r(9208);function o({filename:e,charCount:t,footer:r,maxHeightClassName:i="max-h-[70vh]",children:d}){return(0,a.jsxs)("div",{className:"flex h-full min-w-0 flex-col overflow-hidden rounded-lg border border-border bg-card",children:[(0,a.jsxs)("div",{className:"flex shrink-0 items-center justify-between gap-2 border-b border-border bg-card/60 px-4 py-2.5",children:[(0,a.jsxs)("div",{className:"flex min-w-0 items-center gap-2 font-mono text-[11px] text-muted-foreground",children:[(0,a.jsx)(n.A,{className:"h-3 w-3 shrink-0"}),(0,a.jsx)("span",{className:"truncate",children:e})]}),"number"==typeof t&&(0,a.jsxs)("span",{className:"font-mono text-[10px] text-muted-foreground/70",children:[t.toLocaleString()," chars"]})]}),(0,a.jsx)("pre",{className:`${i} min-h-0 flex-1 overflow-auto whitespace-pre-wrap break-words bg-background px-5 py-4 font-mono text-[12px] leading-relaxed text-foreground/90`,children:d}),r&&(0,a.jsx)("div",{className:"flex shrink-0 items-center justify-between gap-2 border-t border-border bg-card/60 px-4 py-2.5 text-[11px] text-muted-foreground",children:r})]})}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[951],{1727:(e,t,r)=>{"use strict";r.d(t,{OrchestratorCard:()=>g});var a=r(9442),n=r(6074),d=r(9707),s=r(3149),o=r(6823),i=r(4030),l=r(6185),c=r(7847),m=r(3734),u=r(7362);let p={claude:"claude-code",codex:"codex-cli",gemini:"gemini-cli",opencode:"opencode-cli",kimi:"kimi-cli"},x={dot:"bg-muted-foreground/40",gradient:"bg-gradient-to-br from-muted/30 via-card to-card"};function g({initial:e,voices:t}){var r;let[h,f]=(0,n.useState)(e),[y,j]=(0,n.useState)(!1),[N,v]=(0,n.useState)(null),[k,w]=(0,n.useState)(!1),A=p[e.name],[C,S]=(0,n.useState)(t),[M,_]=(0,n.useState)(null),[P,O]=(0,n.useState)(null),L=!!A&&C.length>0,$=C.filter(e=>e.enabled).length,E="opencode-cli"===A,R=h.connected,T=h.approvedTools>0&&!R,z=(r=e.name)in m.r2?m.r2[r]:x,V=async()=>{j(!0),v(null);try{let e=await (0,l.jb)(h.name);f(e.status),w(e.added.length>0)}catch(e){v(e instanceof l.$v?e.message:"Failed to connect — is the daemon running?")}finally{j(!1)}},F=async e=>{_(e.id),O(null);try{let t=await (0,c.updateVoice)(e.id,{enabled:!e.enabled});S(e=>e.map(e=>e.id===t.id?t:e))}catch(e){O(e instanceof l.$v?e.message:"Couldn't save. Is the daemon running?")}finally{_(null)}},I=new Map;if(E)for(let e of C){let t=e.model_id.indexOf("/"),r=t>0?e.model_id.slice(0,t):"other",a=I.get(r)??[];a.push(e),I.set(r,a)}let q=Array.from(I.keys()).sort();return(0,a.jsxs)("div",{className:(0,u.cn)("flex h-72 flex-col rounded-lg border border-border",z.gradient),children:[(0,a.jsx)("div",{className:"flex shrink-0 items-center gap-3 px-4 py-3",children:(0,a.jsxs)("div",{className:"flex min-w-0 flex-1 items-center gap-2",children:[(0,a.jsx)("span",{className:(0,u.cn)("h-2 w-2 shrink-0 rounded-full",z.dot)}),(0,a.jsx)("h3",{className:"whitespace-nowrap text-sm font-semibold",children:h.label}),R?(0,a.jsxs)("span",{className:"inline-flex items-center gap-1 rounded-full bg-emerald-500/10 px-2 py-0.5 text-[10px] font-medium text-emerald-300",children:[(0,a.jsx)(d.A,{className:"h-3 w-3"})," Connected"]}):T?(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:[h.approvedTools,"/",h.totalTools," tools"]}):h.supported?(0,a.jsx)("span",{className:"inline-flex items-center rounded-full border border-border bg-card px-2 py-0.5 text-[10px] font-medium text-muted-foreground",children:"Not connected"}):(0,a.jsx)("span",{className:"inline-flex items-center rounded-full border border-border bg-card px-2 py-0.5 text-[10px] font-medium text-muted-foreground",children:"Coming soon"}),L&&(0,a.jsxs)("span",{className:"whitespace-nowrap text-[10px] text-muted-foreground",children:["\xb7 ",$," model",1===$?"":"s"]})]})}),(0,a.jsxs)("div",{className:"flex flex-1 flex-col gap-3 overflow-y-auto border-t border-border bg-card/30 p-4",children:[(0,a.jsx)("p",{className:"text-[11px] leading-relaxed text-muted-foreground",children:h.note}),!h.supported&&(0,a.jsx)("p",{className:"text-[11px] italic text-muted-foreground/70",children:"Wiring will land in a future release."}),h.supported&&(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsxs)("button",{type:"button",onClick:V,disabled:y||R&&!T,className:"inline-flex h-8 items-center gap-1.5 rounded-md bg-primary px-3 text-xs font-medium text-primary-foreground transition hover:bg-primary/90 disabled:cursor-not-allowed disabled:bg-muted disabled:text-muted-foreground",children:[y?(0,a.jsx)(s.A,{className:"h-3.5 w-3.5 animate-spin"}):(0,a.jsx)(o.A,{className:"h-3.5 w-3.5"}),R?"Already connected":T?"Approve remaining tools":`Connect ${h.label}`]}),k&&!N&&(0,a.jsxs)("p",{className:"text-[11px] text-emerald-400",children:["✓ Done. Restart ",h.label," for the change to take effect."]}),N&&(0,a.jsxs)("p",{className:"flex items-start gap-1 text-[11px] text-destructive",children:[(0,a.jsx)(i.A,{className:"mt-0.5 h-3 w-3 shrink-0"})," ",N]})]}),R&&"prompts_once"===h.firstCallBehavior&&(0,a.jsx)("p",{className:"text-[11px] text-amber-300/90",children:'⚠ First chorus.* call will show a one-time prompt — click "Always allow".'}),L&&(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("p",{className:"text-[11px] font-medium uppercase tracking-wider text-muted-foreground",children:"Models"}),P&&(0,a.jsx)("p",{className:"text-[11px] text-destructive",children:P}),E?(0,a.jsx)("div",{className:"space-y-2",children:q.map(e=>{let t=I.get(e)??[];return(0,a.jsxs)("div",{className:"space-y-1",children:[(0,a.jsxs)("p",{className:"text-[10px] font-mono text-muted-foreground/80",children:[e,"/"]}),(0,a.jsx)("div",{className:"grid grid-cols-1 gap-1 sm:grid-cols-2",children:t.map(t=>(0,a.jsx)(b,{label:t.model_id.slice(e.length+1),value:t.model_id,selected:t.enabled,disabled:M===t.id,onClick:()=>F(t)},t.id))})]},e)})}):(0,a.jsx)("div",{className:"grid grid-cols-1 gap-1 sm:grid-cols-2",children:C.map(e=>(0,a.jsx)(b,{label:e.model_id,value:e.model_id,selected:e.enabled,disabled:M===e.id,onClick:()=>F(e)},e.id))})]})]})]})}function b({label:e,value:t,selected:r,disabled:n,onClick:s}){return(0,a.jsxs)("button",{type:"button",disabled:n,onClick:s,title:t,className:(0,u.cn)("flex items-center gap-2 rounded border px-2 py-1.5 text-left text-[11px] transition disabled:opacity-60",r?"border-primary/50 bg-primary/10 text-foreground":"border-border bg-card hover:border-muted-foreground/30 text-muted-foreground"),children:[(0,a.jsx)("div",{className:(0,u.cn)("grid h-3 w-3 shrink-0 place-items-center rounded-sm border transition",r?"border-primary bg-primary text-primary-foreground":"border-border"),children:r&&(0,a.jsx)(d.A,{className:"h-2 w-2"})}),(0,a.jsx)("span",{className:"truncate font-mono",children:e})]})}},2545:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});let a=(0,r(3884).A)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]])},2881:(e,t,r)=>{"use strict";r.d(t,{Eu:()=>s,M5:()=>n,Y8:()=>d});var a=r(4411);async function n(e){return(0,a.T)("/openrouter/save-key",{method:"POST",body:JSON.stringify({apiKey:e})})}async function d(){return(0,a.T)("/openrouter/models")}async function s(e,t){return(0,a.T)("/openrouter/voices",{method:"POST",body:JSON.stringify(t?{modelIds:e,apiKey:t}:{modelIds:e})})}},3149:(e,t,r)=>{"use strict";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)=>{"use strict";r.d(t,{JR:()=>c,QJ:()=>d,VW:()=>s,YM:()=>u,m_:()=>o,r2:()=>p,u5:()=>l,x0:()=>m,ze:()=>a});let a={anthropic:"Claude",openai:"Codex",google:"Gemini",opencode:"OpenCode",moonshot:"Kimi",local:"Local LLM"},n={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 d(e){return e?a[e]??e:""}function s(e){return e?n[e]??"bg-muted":"bg-muted"}let o={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 l(e){return e?o[e]??e:""}function c(e){return e?i[e]??"bg-muted":"bg-muted"}let m={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 u(e){if(e)return m[e]}let p={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"}}},4030:(e,t,r)=>{"use strict";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"}]])},7130:(e,t,r)=>{"use strict";r.d(t,{OpenRouterCard:()=>x});var a=r(9442),n=r(6074),d=r(9707),s=r(2545),o=r(3149),i=r(4030),l=r(9812),c=r(7362),m=r(2881),u=r(7847),p=r(3734);function x({voices:e}){let[t,r]=(0,n.useState)(e),[b,h]=(0,n.useState)(null),[f,y]=(0,n.useState)(!1),[j,N]=(0,n.useState)(!1),[v,k]=(0,n.useState)(""),[w,A]=(0,n.useState)(!1),[C,S]=(0,n.useState)(null),[M,_]=(0,n.useState)(!1),[P,O]=(0,n.useState)(""),[L,$]=(0,n.useState)(new Set),[E,R]=(0,n.useState)(!1),[T,z]=(0,n.useState)(null),[V,F]=(0,n.useState)(null),[I,q]=(0,n.useState)(null),[J,Y]=(0,n.useState)(null),G=t.filter(e=>e.enabled).length,K=t.length>0;async function W(){if(!f){y(!0),S(null),N(!0);try{let{models:e}=await (0,m.Y8)();e.sort((e,t)=>e.id.localeCompare(t.id)),h(e),_(!1)}catch(t){let e=t instanceof Error?t.message:String(t);_(!0),/no openrouter api key/i.test(e)||S(e)}finally{y(!1)}}}async function B(){if(0!==v.trim().length){A(!0),S(null);try{let e=await (0,m.M5)(v.trim());if(!e.valid)return void S(e.error??"Validation failed");k(""),_(!1);let{models:t}=await (0,m.Y8)();t.sort((e,t)=>e.id.localeCompare(t.id)),h(t),N(!0)}catch(e){S(e instanceof Error?e.message:String(e))}finally{A(!1)}}}async function D(){if(0!==L.size){R(!0),z(null),F(null);try{let e=await (0,m.Eu)(Array.from(L)),t=e.added.length,a=e.skipped.length;F(`Added ${t} voice${1===t?"":"s"}`+(a>0?` \xb7 skipped ${a} (unknown id)`:"")),$(new Set);try{let e=await (0,u.listVoices)({source:"api",provider:"openrouter"});r(e)}catch{}}catch(e){z(e instanceof Error?e.message:String(e))}finally{R(!1)}}}async function H(e){q(e.id),Y(null);try{let t=await (0,u.updateVoice)(e.id,{enabled:!e.enabled});r(e=>e.map(e=>e.id===t.id?t:e))}catch(e){Y(e instanceof Error?e.message:String(e))}finally{q(null)}}let Q=P.trim()?(b??[]).filter(e=>e.id.toLowerCase().includes(P.toLowerCase().trim())||e.name.toLowerCase().includes(P.toLowerCase().trim())):b??[];return(0,a.jsxs)("div",{className:(0,c.cn)("flex h-72 flex-col rounded-lg border border-border",p.r2.openrouter.gradient),children:[(0,a.jsx)("div",{className:"flex shrink-0 items-center gap-3 px-4 py-3",children:(0,a.jsxs)("div",{className:"flex min-w-0 flex-1 items-center gap-2",children:[(0,a.jsx)("span",{className:(0,c.cn)("h-2 w-2 shrink-0 rounded-full",p.r2.openrouter.dot)}),(0,a.jsx)("h3",{className:"whitespace-nowrap text-sm font-semibold",children:"OpenRouter"}),K?(0,a.jsxs)("span",{className:"inline-flex items-center gap-1 rounded-full bg-emerald-500/10 px-2 py-0.5 text-[10px] font-medium text-emerald-300",children:[(0,a.jsx)(d.A,{className:"h-3 w-3"})," ",G," enabled"]}):(0,a.jsx)("span",{className:"inline-flex items-center rounded-full border border-border bg-card px-2 py-0.5 text-[10px] font-medium text-muted-foreground",children:"Not configured"})]})}),(0,a.jsxs)("div",{className:"flex flex-1 flex-col gap-3 overflow-y-auto border-t border-border bg-card/30 p-4",children:[!K&&(0,a.jsx)("p",{className:"text-[11px] leading-relaxed text-muted-foreground",children:"Voices added here run via OpenRouter's chat-completions API. Costs come back per-call from the API and surface on the run page."}),K&&(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("p",{className:"text-[11px] font-medium uppercase tracking-wider text-muted-foreground",children:"Models"}),(0,a.jsx)("div",{className:"grid grid-cols-1 gap-1 sm:grid-cols-2",children:t.map(e=>(0,a.jsxs)("button",{type:"button",disabled:I===e.id,onClick:()=>H(e),title:e.model_id,className:(0,c.cn)("flex items-center gap-2 rounded border px-2 py-1.5 text-left text-[11px] transition disabled:opacity-60",e.enabled?"border-primary/50 bg-primary/10 text-foreground":"border-border bg-card text-muted-foreground hover:border-muted-foreground/30"),children:[(0,a.jsx)("div",{className:(0,c.cn)("grid h-3 w-3 shrink-0 place-items-center rounded-sm border transition",e.enabled?"border-primary bg-primary text-primary-foreground":"border-border"),children:e.enabled&&(0,a.jsx)(d.A,{className:"h-2 w-2"})}),(0,a.jsx)("span",{className:"truncate font-mono",children:e.model_id})]},e.id))}),J&&(0,a.jsx)("p",{className:"text-[11px] text-destructive",children:J})]}),(M||!K)&&(0,a.jsxs)("div",{className:"space-y-2 rounded-md border border-border bg-background/40 p-3",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("label",{className:"text-[11px] font-medium uppercase tracking-wider text-muted-foreground",children:K?"Replace API key":"OpenRouter API key"}),(0,a.jsxs)("a",{href:"https://openrouter.ai/keys",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-[10px] text-muted-foreground hover:text-foreground",children:["Get a key ",(0,a.jsx)(s.A,{className:"h-2.5 w-2.5"})]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("input",{type:"password",value:v,onChange:e=>k(e.target.value),placeholder:"sk-or-v1-…",disabled:w,className:"h-8 flex-1 rounded-md border border-border bg-background px-2 font-mono text-xs focus:border-primary/60 focus:outline-none"}),(0,a.jsxs)("button",{type:"button",onClick:B,disabled:w||0===v.trim().length,className:"inline-flex h-8 items-center gap-1.5 rounded-md border border-primary/40 bg-primary/10 px-3 text-[11px] font-medium text-primary transition hover:bg-primary/20 disabled:cursor-not-allowed disabled:opacity-50",children:[w?(0,a.jsx)(o.A,{className:"h-3 w-3 animate-spin"}):(0,a.jsx)(d.A,{className:"h-3 w-3"}),w?"Saving…":"Save"]})]}),C&&(0,a.jsxs)("p",{className:"flex items-center gap-1 text-[11px] text-destructive",children:[(0,a.jsx)(i.A,{className:"h-3 w-3"}),C]})]}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[K&&!j&&(0,a.jsxs)("button",{type:"button",onClick:W,disabled:f,className:"inline-flex h-8 items-center gap-1.5 rounded-md border border-border bg-card px-3 text-[11px] font-medium text-foreground transition hover:border-muted-foreground/30 disabled:opacity-50",children:[f?(0,a.jsx)(o.A,{className:"h-3 w-3 animate-spin"}):null,"Add more models"]}),K&&!M&&(0,a.jsx)("button",{type:"button",onClick:()=>_(!0),className:"text-[11px] text-muted-foreground underline-offset-2 hover:underline",children:"Replace API key"})]}),j&&(0,a.jsxs)(a.Fragment,{children:[f&&(0,a.jsxs)("p",{className:"flex items-center gap-2 text-[11px] text-muted-foreground",children:[(0,a.jsx)(o.A,{className:"h-3 w-3 animate-spin"})," Loading catalog…"]}),b&&b.length>0&&(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,a.jsx)("p",{className:"text-[11px] font-medium uppercase tracking-wider text-muted-foreground",children:K?"Add more models":"Pick models"}),(0,a.jsxs)("button",{type:"button",onClick:D,disabled:0===L.size||E,className:"inline-flex h-7 items-center gap-1.5 rounded-md border border-primary/40 bg-primary/10 px-2.5 text-[11px] font-medium text-primary transition hover:bg-primary/20 disabled:cursor-not-allowed disabled:opacity-50",children:[E?(0,a.jsx)(o.A,{className:"h-3 w-3 animate-spin"}):null,"Add ",L.size>0?L.size:""]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2 rounded-md border border-border bg-background/40 px-2",children:[(0,a.jsx)(l.A,{className:"h-3 w-3 text-muted-foreground"}),(0,a.jsx)("input",{type:"text",value:P,onChange:e=>O(e.target.value),placeholder:"filter by id or name…",className:"h-7 flex-1 bg-transparent text-[11px] focus:outline-none"}),(0,a.jsxs)("span",{className:"text-[10px] text-muted-foreground",children:[Q.length,"/",b.length]})]}),V&&(0,a.jsx)("p",{className:"text-[11px] text-emerald-300",children:V}),T&&(0,a.jsxs)("p",{className:"flex items-center gap-1 text-[11px] text-destructive",children:[(0,a.jsx)(i.A,{className:"h-3 w-3"}),T]}),(0,a.jsx)("div",{className:"max-h-72 overflow-y-auto rounded-md border border-border",children:Q.map(e=>{let r=L.has(e.id),n=t.some(t=>t.model_id===e.id);return(0,a.jsxs)("label",{className:(0,c.cn)("flex cursor-pointer items-center gap-2 border-b border-border px-2 py-1.5 text-[11px] last:border-b-0 hover:bg-card/40",n&&"opacity-50"),children:[(0,a.jsx)("input",{type:"checkbox",checked:r,disabled:n,onChange:t=>{$(r=>{let a=new Set(r);return t.target.checked?a.add(e.id):a.delete(e.id),a})},className:"h-3 w-3 shrink-0"}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("div",{className:"truncate font-mono text-[11px]",children:[e.id,n&&(0,a.jsx)("span",{className:"ml-1 text-[10px] text-muted-foreground",children:"\xb7 added"})]}),(0,a.jsxs)("div",{className:"truncate text-[10px] text-muted-foreground",children:[e.name,e.contextLength?` \xb7 ${(e.contextLength/1e3).toFixed(0)}k ctx`:"",void 0!==e.inputCostPerMtok||void 0!==e.outputCostPerMtok?` \xb7 ${g(e.inputCostPerMtok)}/${g(e.outputCostPerMtok)} per Mtok`:""]})]})]},e.id)})})]})]})]})]})}function g(e){return void 0===e?"?":e<.01?`$${e.toFixed(4)}`:`$${e.toFixed(2)}`}},8799:(e,t,r)=>{Promise.resolve().then(r.bind(r,821)),Promise.resolve().then(r.bind(r,8344)),Promise.resolve().then(r.bind(r,7130)),Promise.resolve().then(r.bind(r,1727))},9707:(e,t,r)=>{"use strict";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)=>{"use strict";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"}]])}},e=>{e.O(0,[742,832,641,344,506,128,358],()=>e(e.s=8799)),_N_E=e.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[359],{63:(e,t,r)=>{"use strict";r.d(t,{Zp:()=>n});var s=r(9442);r(6074);var a=r(7362);function n({className:e,...t}){return(0,s.jsx)("div",{"data-slot":"card",className:(0,a.cn)("flex flex-col gap-6 rounded-xl border bg-card py-6 text-card-foreground shadow-sm",e),...t})}},862:(e,t,r)=>{"use strict";function s(e){return!!e&&e.phases[0]?.kind==="review_only"}r.d(t,{$:()=>s})},2471:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(3884).A)("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]])},2919:(e,t,r)=>{Promise.resolve().then(r.bind(r,6141))},3734:(e,t,r)=>{"use strict";r.d(t,{JR:()=>c,QJ:()=>n,VW:()=>o,YM:()=>m,m_:()=>i,r2:()=>x,u5:()=>d,x0:()=>u,ze:()=>s});let s={anthropic:"Claude",openai:"Codex",google:"Gemini",opencode:"OpenCode",moonshot:"Kimi",local:"Local LLM"},a={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 n(e){return e?s[e]??e:""}function o(e){return e?a[e]??"bg-muted":"bg-muted"}let i={claude:"Claude",codex:"Codex",gemini:"Gemini",opencode:"OpenCode",kimi:"Kimi",openrouter:"OpenRouter",local:"Local LLM"},l={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 d(e){return e?i[e]??e:""}function c(e){return e?l[e]??"bg-muted":"bg-muted"}let u={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(e){if(e)return u[e]}let x={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"}}},4372:(e,t,r)=>{"use strict";r.d(t,{G:()=>o});var s=r(9442),a=r(821),n=r(8344);function o({children:e}){return(0,s.jsxs)("div",{className:"flex h-screen w-screen overflow-hidden bg-background text-foreground",children:[(0,s.jsx)(a.AppSidebar,{}),(0,s.jsxs)("div",{className:"flex flex-1 flex-col overflow-hidden",children:[(0,s.jsx)(n.MobileTopBar,{}),(0,s.jsx)("main",{className:"flex-1 overflow-y-auto",children:e})]})]})}},5702:(e,t,r)=>{"use strict";r.d(t,{E:()=>l});var s=r(9442);r(6074);var a=r(9056),n=r(8113),o=r(7362);let i=(0,a.F)("inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3",{variants:{variant:{default:"bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"bg-destructive text-white focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40 [a&]:hover:bg-destructive/90",outline:"border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",ghost:"[a&]:hover:bg-accent [a&]:hover:text-accent-foreground",link:"text-primary underline-offset-4 [a&]:hover:underline"}},defaultVariants:{variant:"default"}});function l({className:e,variant:t="default",asChild:r=!1,...a}){let d=r?n.bL:"span";return(0,s.jsx)(d,{"data-slot":"badge","data-variant":t,className:(0,o.cn)(i({variant:t}),e),...a})}},6141:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>N});var s=r(9442),a=r(8821),n=r(2471),o=r(5902),i=r(6074),l=r(4372),d=r(6457),c=r(5702),u=r(6185),m=r(6441),x=r(862);function p({icon:e,label:t,value:r,wide:a,children:n}){let[o,l]=(0,i.useState)(!1);return(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsxs)("button",{type:"button",onClick:()=>l(e=>!e),className:"flex items-center gap-2 rounded-md border border-border bg-card px-3 py-1.5 text-sm transition hover:border-muted-foreground/40",children:[(0,s.jsx)("span",{className:"text-muted-foreground",children:e}),(0,s.jsx)("span",{className:"text-[10px] uppercase tracking-wider text-muted-foreground",children:t}),(0,s.jsx)("span",{className:"font-medium",children:r})]}),o&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"fixed inset-0 z-10",onClick:()=>l(!1)}),(0,s.jsx)("div",{className:`absolute left-0 top-full z-20 mt-1 rounded-md border border-border bg-popover p-1.5 shadow-xl ${a?"w-80":"w-56"}`,onClick:()=>l(!1),children:n})]})]})}var g=r(6289);let h=(0,r(3884).A)("dollar-sign",[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]]);var f=r(63),b=r(3734);function v({template:e,prompt:t,setPrompt:r,reviewOnly:a,artifactSpec:n,billingMode:o,costEstimate:i,overCap:l,isPending:d,onStart:c}){return(0,s.jsxs)(s.Fragment,{children:[a&&n&&(0,s.jsxs)("div",{className:"mb-2 flex flex-wrap items-center gap-2 text-xs text-muted-foreground",children:[(0,s.jsx)("span",{className:"font-medium text-foreground",children:n.label}),(0,s.jsx)("span",{className:"text-muted-foreground/60",children:"\xb7"}),(0,s.jsxs)("span",{children:["cap ",(n.maxBytes/1024).toLocaleString()," KB"]})]}),(0,s.jsxs)(f.Zp,{className:"overflow-hidden p-0 mb-4",children:[(0,s.jsx)("textarea",{value:t,onChange:e=>r(e.target.value),placeholder:a&&n?n.hint:"Describe what you want chorus to weigh in on. Paste code, errors, design docs — anything the reviewers should see.",className:`block w-full resize-none border-0 bg-transparent px-5 py-4 text-sm text-foreground placeholder:text-muted-foreground/70 focus:outline-none ${a?"font-mono text-[12px] leading-relaxed":""}`,rows:a?16:10,spellCheck:!a}),(0,s.jsxs)("div",{className:"flex flex-col gap-3 border-t border-border bg-card/40 px-5 py-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,s.jsx)(j,{template:e,reviewOnly:a}),(0,s.jsxs)("div",{className:"flex items-center justify-between gap-3 sm:justify-end",children:[(0,s.jsx)(y,{billingMode:o,costEstimate:i,overCap:l,template:e}),(0,s.jsxs)("button",{type:"button",onClick:c,disabled:!t||l||d,className:`inline-flex shrink-0 items-center gap-2 whitespace-nowrap rounded-md px-4 py-2 text-sm font-medium transition ${!t||l||d?"cursor-not-allowed bg-muted text-muted-foreground":"bg-primary text-primary-foreground hover:bg-primary/90"}`,children:[d?"Starting...":a?"Send for review":"Start the run",(0,s.jsx)(g.A,{className:"h-4 w-4"})]})]})]})]})]})}function j({template:e,reviewOnly:t}){return(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-3 text-xs text-muted-foreground",children:[!t&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,s.jsx)("span",{className:`h-1.5 w-1.5 rounded-full ${(0,b.JR)(e.phases[0]?.doer.lineage)}`}),"Doer: ",e.phases[0]?.doer.lineage]}),(0,s.jsx)("span",{className:"text-muted-foreground/50",children:"\xb7"})]}),(0,s.jsx)(w,{template:e}),e.phases.length>1&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"text-muted-foreground/50",children:"\xb7"}),(0,s.jsxs)("span",{className:"font-mono text-[10px]",children:[e.phases.length," phases"]})]})]})}function w({template:e}){let t=e.phases[0]?.reviewer.candidatesWithModels??[],r=new Map;for(let e of t)r.set(e.lineage,(r.get(e.lineage)??0)+1);return(0,s.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,s.jsx)("span",{className:"text-muted-foreground/80",children:"Reviewers:"}),t.map((e,t)=>{let a=(r.get(e.lineage)??0)>1,n=e.models?.[0]?.split("/").pop()??e.models?.[0],o=a&&n?`${e.lineage} \xb7 ${n}`:e.lineage;return(0,s.jsxs)("span",{className:"flex items-center gap-1",title:e.models?.[0]?`${e.lineage} \xb7 ${e.models[0]}`:e.lineage,children:[(0,s.jsx)("span",{className:`h-1.5 w-1.5 rounded-full ${(0,b.JR)(e.lineage)}`}),o]},`${e.lineage}-${e.models?.[0]??"default"}-${t}`)}),e.phases[0]?.reviewer.crossLineage&&(0,s.jsx)(c.E,{variant:"outline",className:"ml-1 border-border font-mono text-[9px] uppercase",title:"Reviewer must be a different lineage than the doer",children:"cross-lineage"})]})}function y({billingMode:e,costEstimate:t,overCap:r,template:a}){return"subscription"===e?(0,s.jsxs)("div",{className:"flex items-center gap-1.5 font-mono text-[10px] text-muted-foreground",title:`~${t.inputTokens.toLocaleString()} input tokens \xd7 ${t.reviewerCount} reviewers — counts against your CLI subscription quota, not billed per call`,children:["Subscription quota \xb7 ~",t.inputTokens.toLocaleString()," tok"]}):(0,s.jsxs)("div",{className:`flex items-center gap-1.5 font-mono text-[10px] ${r?"text-rose-300":"text-muted-foreground"}`,title:`~${t.inputTokens.toLocaleString()} input tokens \xd7 ${t.reviewerCount} reviewers; up to ${t.maxRounds} round${t.maxRounds>1?"s":""} on disagreement`,children:[(0,s.jsx)(h,{className:"h-3 w-3"}),t.maxRounds>1?`~$${t.usd.toFixed(3)} – $${t.usdRangeMax.toFixed(3)} est`:`~$${t.usd.toFixed(3)} est`,a.costCapUsd>0&&(0,s.jsxs)("span",{className:"text-muted-foreground/60",children:["/ cap $",a.costCapUsd.toFixed(2)]})]})}function N(){return(0,s.jsx)(i.Suspense,{fallback:(0,s.jsx)(l.G,{children:(0,s.jsx)("div",{className:"p-8 text-sm text-muted-foreground",children:"Loading…"})}),children:(0,s.jsx)(k,{})})}function k(){let e=(0,o.useSearchParams)(),t=(0,o.useRouter)(),[r,g]=(0,i.useTransition)(),[h,f]=(0,i.useState)([]),[b,j]=(0,i.useState)(null),[w,y]=(0,i.useState)(null);(0,i.useEffect)(()=>{(0,u.eG)().then(f).catch(e=>j(e instanceof u.$v?e.message:"Failed to load templates"))},[]);let[N,k]=(0,i.useState)("api");(0,i.useEffect)(()=>{(0,m.Dl)().then(e=>k(e.mode)).catch(()=>{})},[]);let $=e.get("template")??h[0]?.id??"",[C,S]=(0,i.useState)(""),R=[],L=h.find(e=>e.id===$)??h[0],M=(0,i.useMemo)(()=>(function(e){let{template:t,prompt:r,attachments:s}=e,a=t?.phases?.[0]?.reviewer?.candidates?.length??3,n=Math.max(1,t?.maxRounds??1),o=Math.ceil(r.length/4)+1500*s.length+(t?.estimatedBaselineTokens??800),i=(3e-6*o+.018000000000000002)*a;return{usd:i,usdRangeMax:i*n,inputTokens:o,reviewerCount:a,maxRounds:n}})({template:L,prompt:C,attachments:R}),[C,R,L]),E=!!("subscription"!==N&&L?.costCapUsd&&L.costCapUsd>0&&M.usdRangeMax>L.costCapUsd),[F,P]=(0,i.useState)(!1),[A,T]=(0,i.useState)(""),O=(0,x.$)(L),G=O?L?.phases?.[0]?.artifact:void 0;async function z(){if(L&&C){if(O&&G){let e=new TextEncoder().encode(C).length;if(e>G.maxBytes)return void y(`Artifact is ${e.toLocaleString()} bytes; this template caps at ${G.maxBytes.toLocaleString()}. Trim it down.`)}y(null),g(async()=>{try{let e=A.trim(),r=await (0,u.RL)({work:O?function(e){let t="Review the supplied artifact independently.";if(!e)return t;for(let t of e.split("\n")){let e=t.trim();if(0===e.length||e.startsWith("```")||e.startsWith("~~~"))continue;if(e.length<=80)return e;let r=e.slice(0,80),s=r.lastIndexOf(" ");return(s>40?r.slice(0,s):r)+"…"}return t}(C):C,templateId:L.id,files:R.length>0?R.map(e=>e.name):void 0,...O?{artifact:C}:{},...!O&&e.length>0?{repoPath:e}:{},yolo:F});t.push(`/runs/${r.slug||r.id}`)}catch(e){y(e instanceof u.$v?e.message:"Failed to create chat")}})}}return b?(0,s.jsx)(l.G,{children:(0,s.jsx)("div",{className:"mx-auto w-full max-w-6xl px-4 py-6 sm:px-6 sm:py-8 md:px-8 md:py-10",children:(0,s.jsxs)("div",{className:"rounded-lg border border-destructive/50 bg-destructive/10 p-4",children:[(0,s.jsx)("p",{className:"text-sm text-destructive",children:"Error loading templates"}),(0,s.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:b})]})})}):L?(0,s.jsx)(l.G,{children:(0,s.jsxs)("div",{className:"mx-auto w-full max-w-6xl px-4 py-6 sm:px-6 sm:py-8 md:px-8 md:py-10",children:[(0,s.jsx)(d.z,{eyebrow:"New chat",title:O?"Paste an artifact. Get reviews.":"Paste a task. Pick a template.",subtitle:O?"Chorus skips the doer and runs your text past three reviewers. Single pass — revise yourself and resubmit for another round.":"Chorus runs it past your reviewers and reports consensus."}),w&&(0,s.jsx)("div",{className:"mb-4 rounded-lg border border-destructive/50 bg-destructive/10 p-4",children:(0,s.jsx)("p",{className:"text-sm text-destructive",children:w})}),(0,s.jsx)("div",{className:"mb-4 flex flex-wrap items-center gap-2",children:(0,s.jsx)(p,{icon:(0,s.jsx)(a.A,{className:"h-3.5 w-3.5"}),label:"Template",value:L?.name||"Select a template",wide:!0,children:(0,s.jsx)("ul",{className:"space-y-1",children:h.map(r=>{let a=!1===r.isComplete;return(0,s.jsx)("li",{children:(0,s.jsxs)("button",{type:"button",disabled:a,onClick:()=>{if(a)return;let s=new URLSearchParams(e);s.set("template",r.id),t.push(`/new?${s.toString()}`)},className:`block w-full rounded-md p-2 text-left transition ${a?"cursor-not-allowed opacity-50":r.id===$?"bg-accent":"hover:bg-accent/50"}`,children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:"text-sm font-medium",children:r.name}),(0,x.$)(r)&&(0,s.jsx)(c.E,{variant:"outline",className:"border-blue-500/30 bg-blue-500/10 font-mono text-[9px] uppercase text-blue-300",children:"review only"}),a&&(0,s.jsx)(c.E,{variant:"outline",className:"border-amber-500/40 bg-amber-500/10 font-mono text-[9px] uppercase text-amber-300",children:"needs setup"})]}),(0,s.jsx)("div",{className:"text-xs text-muted-foreground line-clamp-1",children:a?"Edit this template's YAML to fill in models for your fleet.":r.description})]})},r.id)})})})}),(0,s.jsx)(v,{template:L,prompt:C,setPrompt:S,reviewOnly:O,artifactSpec:G,billingMode:N,costEstimate:M,overCap:E,isPending:r,onStart:z}),E&&(0,s.jsxs)("div",{className:"mb-4 flex items-start gap-2 rounded-md border border-rose-500/30 bg-rose-500/5 px-3 py-2 text-[11px] text-rose-200",children:[(0,s.jsx)(n.A,{className:"mt-0.5 h-3 w-3 shrink-0 text-rose-400"}),(0,s.jsxs)("span",{children:["Estimated cost"," ",(0,s.jsxs)("span",{className:"font-mono",children:["$",M.usd.toFixed(3)]})," ","exceeds template cap"," ",(0,s.jsxs)("span",{className:"font-mono",children:["$",L.costCapUsd.toFixed(2)]}),". Trim attachments, shorten the prompt, or raise the cap in template settings."]})]}),(0,s.jsxs)("div",{className:`mb-4 rounded-lg border border-dashed border-border bg-card/30 p-4 ${O?"opacity-50":""}`,children:[(0,s.jsxs)("div",{className:"mb-2 flex items-center gap-2",children:[(0,s.jsxs)("span",{className:"text-sm font-medium text-foreground",children:["Target repo"," ",(0,s.jsx)("span",{className:"text-muted-foreground",children:"(optional)"})]}),(0,s.jsx)(c.E,{variant:"outline",className:"border-emerald-500/30 bg-emerald-500/10 font-mono text-[10px] uppercase text-emerald-300",children:"opens PR"})]}),(0,s.jsx)("input",{type:"text",value:O?"":A,onChange:e=>T(e.target.value),disabled:O,placeholder:"/absolute/path/to/repo",className:"w-full rounded-md border border-border bg-background px-3 py-2 font-mono text-xs text-foreground placeholder:text-muted-foreground/50 focus:outline-none focus:ring-1 focus:ring-primary disabled:cursor-not-allowed disabled:opacity-60",spellCheck:!1}),(0,s.jsx)("p",{className:"mt-2 text-[11px] text-muted-foreground",children:O?"Review-only templates have no doer and no Ship phase, so there's nothing to commit. Pick a template with a doer (e.g. Tri-Review) to open a PR.":(0,s.jsxs)(s.Fragment,{children:["When set: doer makes real edits in this repo. After reviewers agree, chorus opens a PR via"," ",(0,s.jsx)("code",{className:"rounded bg-muted px-1",children:"gh pr create"})," (no auto-merge — you review + click Merge in GitHub). Leave blank to skip the Ship phase."]})})]}),(0,s.jsxs)("button",{type:"button",onClick:()=>P(e=>!e),className:`mb-4 flex w-full items-start justify-between gap-3 rounded-lg border px-4 py-3 text-left transition ${F?"border-rose-500/40 bg-rose-500/5":"border-dashed border-border bg-card/30 hover:border-foreground/30"}`,children:[(0,s.jsxs)("div",{className:"flex items-start gap-3",children:[(0,s.jsx)("span",{className:`mt-0.5 grid h-7 w-7 place-items-center rounded-md text-sm ${F?"bg-rose-500/20 text-rose-300":"bg-card text-muted-foreground"}`,children:"\uD83D\uDE80"}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:"text-sm font-medium text-foreground",children:"Yolo mode"}),(0,s.jsx)(c.E,{variant:"outline",className:"border-rose-500/30 bg-rose-500/10 font-mono text-[10px] uppercase text-rose-300",children:"unsafe"})]}),(0,s.jsx)("p",{className:"mt-0.5 text-[11px] text-muted-foreground",children:F?"Reviewer gates auto-approve. Permission prompts auto-allow. The driver merges without asking. Cost cap still enforced.":"Skip every ask-user gate for this single run. Useful for trusted templates or trivial fixes."})]})]}),(0,s.jsx)("span",{className:`flex h-5 w-9 shrink-0 items-center rounded-full border p-0.5 transition ${F?"border-rose-500/40 bg-rose-500/20":"border-border bg-card"}`,children:(0,s.jsx)("span",{className:`h-3.5 w-3.5 rounded-full transition-transform ${F?"translate-x-4 bg-rose-400":"bg-muted-foreground/50"}`})})]})]})}):(0,s.jsx)(l.G,{children:(0,s.jsx)("div",{className:"mx-auto w-full max-w-6xl px-4 py-12 text-sm text-muted-foreground sm:px-6 md:px-8",children:"Loading templates…"})})}},6289:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(3884).A)("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]])},6457:(e,t,r)=>{"use strict";r.d(t,{z:()=>a});var s=r(9442);function a({eyebrow:e,title:t,subtitle:r,action:n}){return(0,s.jsxs)("header",{className:"mb-6 flex flex-col gap-3 sm:flex-row sm:items-end sm:justify-between",children:[(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsx)("p",{className:"text-xs uppercase tracking-wider text-muted-foreground",children:e}),(0,s.jsx)("h1",{className:"mt-1 text-2xl font-semibold tracking-tight",children:t}),r&&(0,s.jsx)("p",{className:"mt-2 max-w-2xl text-sm leading-relaxed text-muted-foreground",children:r})]}),n&&(0,s.jsx)("div",{className:"shrink-0 self-start sm:self-auto",children:n})]})}},9056:(e,t,r)=>{"use strict";r.d(t,{F:()=>o});var s=r(142);let a=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,n=s.$,o=(e,t)=>r=>{var s;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:i}=t,l=Object.keys(o).map(e=>{let t=null==r?void 0:r[e],s=null==i?void 0:i[e];if(null===t)return null;let n=a(t)||a(s);return o[e][n]}),d=r&&Object.entries(r).reduce((e,t)=>{let[r,s]=t;return void 0===s||(e[r]=s),e},{});return n(e,l,null==t||null==(s=t.compoundVariants)?void 0:s.reduce((e,t)=>{let{class:r,className:s,...a}=t;return Object.entries(a).every(e=>{let[t,r]=e;return Array.isArray(r)?r.includes({...i,...d}[t]):({...i,...d})[t]===r})?[...e,r,s]:e},[]),null==r?void 0:r.class,null==r?void 0:r.className)}}},e=>{e.O(0,[742,832,641,344,506,128,358],()=>e(e.s=2919)),_N_E=e.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[566],{63:(e,t,r)=>{"use strict";r.d(t,{Zp:()=>i});var a=r(9442);r(6074);var n=r(7362);function i({className:e,...t}){return(0,a.jsx)("div",{"data-slot":"card",className:(0,n.cn)("flex flex-col gap-6 rounded-xl border bg-card py-6 text-card-foreground shadow-sm",e),...t})}},1749:(e,t,r)=>{"use strict";r.d(t,{$:()=>o});var a=r(9442);r(6074);var n=r(9056),i=r(8113),s=r(7362);let d=(0,n.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 o({className:e,variant:t="default",size:r="default",asChild:n=!1,...l}){let c=n?i.bL:"button";return(0,a.jsx)(c,{"data-slot":"button","data-variant":t,"data-size":r,className:(0,s.cn)(d({variant:t,size:r,className:e})),...l})}},1996:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>$});var a=r(9442),n=r(3149),i=r(6289),s=r(5902),d=r(6074),o=r(4284),l=r(1749),c=r(6441),u=r(8141),m=r(7847),p=r(63),x=r(7362);function g({className:e,type:t,...r}){return(0,a.jsx)("input",{type:t,"data-slot":"input",className:(0,x.cn)("h-9 w-full min-w-0 rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none selection:bg-primary selection:text-primary-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:bg-input/30","focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50","aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40",e),...r})}var h=r(2545),b=r(9707),f=r(4030),v=r(2881);let y=["anthropic/claude-sonnet-4.5","openai/gpt-5","google/gemini-2.5-pro","deepseek/deepseek-chat-v3.1","moonshotai/kimi-k2"];function k({apiKeys:e,updateApiKey:t}){let r=e.openrouter??"",[i,s]=(0,d.useState)({kind:"idle"}),[o,l]=(0,d.useState)(null),[c,u]=(0,d.useState)(new Set(y)),[m,j]=(0,d.useState)(!1),[w,N]=(0,d.useState)(null);async function C(){if(0!==r.trim().length&&"saving"!==i.kind){s({kind:"saving"});try{let e=await (0,v.M5)(r.trim());if(!e.valid)return void s({kind:"invalid",message:e.error??"OpenRouter rejected this key."});await S()}catch(e){s({kind:"invalid",message:e instanceof Error?e.message:String(e)})}}}async function S(){s({kind:"loading_catalog"});try{let{models:e}=await (0,v.Y8)();e.sort((e,t)=>e.id.localeCompare(t.id)),l(e),s({kind:"valid",modelCount:e.length})}catch(e){s({kind:"catalog_failed",message:e instanceof Error?e.message:String(e)})}}async function A(){if(0!==c.size&&!m){j(!0),N(null);try{let e=await (0,v.Eu)(Array.from(c)),t=e.added.length,r=e.skipped.length;N(`Added ${t} voice${1===t?"":"s"}`+(r>0?` \xb7 skipped ${r} (unknown id)`:""))}catch(e){N(`Couldn't add voices: ${e instanceof Error?e.message:String(e)}`)}finally{j(!1)}}}return(0,a.jsxs)("section",{className:"mb-8",children:[(0,a.jsxs)("h2",{className:"mb-3 flex flex-wrap items-baseline gap-x-2 text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:[(0,a.jsx)("span",{children:"API access"}),(0,a.jsx)("span",{className:"font-normal normal-case text-muted-foreground/70",children:"optional — gives you any model on OpenRouter as a chorus voice"})]}),(0,a.jsxs)(p.Zp,{className:"space-y-3 bg-card p-4",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("label",{htmlFor:"apikey-openrouter",className:"text-sm font-medium",children:"OpenRouter API key"}),(0,a.jsxs)("a",{href:"https://openrouter.ai/keys",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-[11px] text-muted-foreground hover:text-foreground",children:["Get a key ",(0,a.jsx)(h.A,{className:"h-2.5 w-2.5"})]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(g,{id:"apikey-openrouter",type:"password",autoComplete:"off",spellCheck:!1,placeholder:"sk-or-v1-…",value:r,onChange:e=>{t("openrouter",e.target.value),"idle"!==i.kind&&s({kind:"idle"}),l(null)},className:"flex-1 font-mono text-xs",disabled:"saving"===i.kind||"loading_catalog"===i.kind}),(0,a.jsxs)("button",{type:"button",onClick:C,disabled:0===r.trim().length||"saving"===i.kind||"loading_catalog"===i.kind||"valid"===i.kind,className:(0,x.cn)("inline-flex h-9 items-center gap-1.5 rounded-md border px-3 text-[11px] font-medium transition disabled:cursor-not-allowed disabled:opacity-50","valid"===i.kind?"border-emerald-500/40 bg-emerald-500/10 text-emerald-300":"border-primary/40 bg-primary/10 text-primary hover:bg-primary/20"),children:[("saving"===i.kind||"loading_catalog"===i.kind)&&(0,a.jsx)(n.A,{className:"h-3 w-3 animate-spin"}),"valid"===i.kind&&(0,a.jsx)(b.A,{className:"h-3 w-3"}),"saving"===i.kind?"Validating…":"loading_catalog"===i.kind?"Loading models…":"valid"===i.kind?"Validated":"Validate & save"]})]}),"invalid"===i.kind&&(0,a.jsxs)("p",{className:"flex items-center gap-1.5 text-xs text-destructive",children:[(0,a.jsx)(f.A,{className:"h-3 w-3"}),i.message]}),"catalog_failed"===i.kind&&(0,a.jsxs)("div",{className:"flex items-start justify-between gap-3 rounded-md border border-amber-500/40 bg-amber-500/5 px-3 py-2",children:[(0,a.jsxs)("p",{className:"flex items-start gap-1.5 text-xs text-amber-100",children:[(0,a.jsx)(f.A,{className:"mt-0.5 h-3 w-3 shrink-0"}),(0,a.jsxs)("span",{children:["Key saved, but couldn't load the model catalog:"," ",i.message]})]}),(0,a.jsx)("button",{type:"button",onClick:S,className:"shrink-0 rounded-md border border-amber-500/40 bg-amber-500/10 px-2.5 py-1 text-[11px] font-medium text-amber-100 hover:bg-amber-500/20",children:"Reload models"})]}),"valid"===i.kind&&o&&(0,a.jsxs)("div",{className:"space-y-2 rounded-md border border-emerald-500/20 bg-emerald-500/5 p-3",children:[(0,a.jsxs)("p",{className:"text-[11px] text-emerald-300",children:["✓ Key valid \xb7 ",i.modelCount," models available. Pick a starter set now or browse the full catalog on the Connect page later."]}),(0,a.jsx)("div",{className:"grid grid-cols-1 gap-1 sm:grid-cols-2",children:y.filter(e=>o.some(t=>t.id===e)).map(e=>{let t=c.has(e),r=o.find(t=>t.id===e);return(0,a.jsxs)("label",{className:(0,x.cn)("flex cursor-pointer items-center gap-2 rounded border px-2 py-1.5 text-[11px] transition",t?"border-primary/50 bg-primary/10 text-foreground":"border-border bg-card text-muted-foreground hover:border-muted-foreground/30"),children:[(0,a.jsx)("input",{type:"checkbox",checked:t,onChange:t=>{u(r=>{let a=new Set(r);return t.target.checked?a.add(e):a.delete(e),a})},className:"h-3 w-3 shrink-0"}),(0,a.jsx)("span",{className:"truncate font-mono",children:r?.id??e})]},e)})}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsxs)("button",{type:"button",onClick:A,disabled:0===c.size||m,className:"inline-flex h-7 items-center gap-1.5 rounded-md border border-primary/40 bg-primary/10 px-2.5 text-[11px] font-medium text-primary transition hover:bg-primary/20 disabled:cursor-not-allowed disabled:opacity-50",children:[m?(0,a.jsx)(n.A,{className:"h-3 w-3 animate-spin"}):null,"Add ",c.size>0?c.size:""," voice",1===c.size?"":"s"]}),w&&(0,a.jsx)("p",{className:"text-[11px] text-emerald-300",children:w})]})]}),(0,a.jsxs)("p",{className:"text-[11px] leading-relaxed text-muted-foreground/80",children:["Stored locally in ",(0,a.jsx)("code",{children:"~/.chorus/chorus.db"}),". Used only to call OpenRouter on your behalf. Direct API support for other providers (Anthropic, OpenAI, Google, xAI) is on the roadmap — today, route those models via OpenRouter."]})]})]})}var j=r(3734);let w=[{id:"claude-code",provider:"anthropic",label:"Claude Code",hint:"Anthropic — uses your existing Claude login"},{id:"codex-cli",provider:"openai",label:"Codex CLI",hint:"OpenAI — ChatGPT Plus/Pro subscription"},{id:"gemini-cli",provider:"google",label:"Gemini CLI",hint:"Google — uses your gcloud auth"},{id:"opencode-cli",provider:"opencode",label:"OpenCode",hint:"OpenCode Go — routes Kimi, DeepSeek, Grok"},{id:"kimi-cli",provider:"moonshot",label:"Kimi CLI",hint:"MoonshotAI — kimi-k2 plan"},{id:"cursor",provider:"cursor",label:"Cursor",hint:"Cursor IDE — invoke chorus from inside it"},{id:"windsurf",provider:"windsurf",label:"Windsurf",hint:"Windsurf IDE — invoke chorus from inside it"}],N={"claude-code":"claude","codex-cli":"codex","gemini-cli":"gemini","opencode-cli":"opencode","kimi-cli":"kimi"},C={"claude-code":"claude-code","codex-cli":"codex-cli","gemini-cli":"gemini-cli","opencode-cli":"opencode-cli","kimi-cli":"kimi-cli"},S={dot:"bg-muted-foreground/40",gradient:"bg-gradient-to-br from-muted/30 via-card to-card"},A=w.filter(e=>"cursor"!==e.id&&"windsurf"!==e.id);function P(e){return(0,a.jsxs)("section",{className:"mb-8",children:[(0,a.jsx)("h2",{className:"mb-3 text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:"CLI subscriptions"}),(0,a.jsx)("div",{className:"grid grid-cols-1 items-start gap-2 lg:grid-cols-2",children:A.map(t=>{let r=e.selectedClis.has(t.id),i=e.detection[t.id],s=i?.found===!0,d=e.detecting&&!i,o=!s&&!d&&e.manualOpen.has(t.id),l=e.manualBusy.has(t.id),c=s?j.r2[N[t.id]]??S:S;return(0,a.jsxs)("div",{className:(0,x.cn)("flex h-72 flex-col rounded-lg border transition",s?"border-border":"border-border/60 opacity-70",c.gradient),children:[(0,a.jsxs)("button",{type:"button",onClick:()=>s&&e.toggleCli(t.id),disabled:!s,className:(0,x.cn)("flex shrink-0 items-center gap-3 px-4 py-3 text-left transition",s?"hover:bg-card/30":"cursor-not-allowed"),children:[(0,a.jsx)("div",{className:(0,x.cn)("grid h-5 w-5 shrink-0 place-items-center rounded border transition",!s&&"opacity-50",r?"border-primary bg-primary text-primary-foreground":"border-border"),children:r&&(0,a.jsx)(b.A,{className:"h-3 w-3"})}),(0,a.jsxs)("div",{className:"flex min-w-0 flex-1 items-center gap-2",children:[(0,a.jsx)("span",{className:(0,x.cn)("h-2 w-2 shrink-0 rounded-full",c.dot)}),(0,a.jsx)("h3",{className:"whitespace-nowrap text-sm font-semibold",children:t.label}),s?(0,a.jsxs)("span",{className:"inline-flex items-center gap-1 rounded-full bg-emerald-500/10 px-2 py-0.5 text-[10px] font-medium uppercase tracking-wider text-emerald-300",children:[(0,a.jsx)(b.A,{className:"h-3 w-3"})," Installed"]}):d?(0,a.jsxs)("span",{className:"inline-flex items-center gap-1 rounded-full border border-border bg-card px-2 py-0.5 text-[10px] font-medium text-muted-foreground",children:[(0,a.jsx)(n.A,{className:"h-3 w-3 animate-spin"})," Searching…"]}):(0,a.jsx)("span",{className:"inline-flex items-center rounded-full border border-border bg-card px-2 py-0.5 text-[10px] font-medium text-muted-foreground",children:"Not found"})]})]}),(0,a.jsxs)("div",{className:"flex flex-1 flex-col gap-2 overflow-y-auto border-t border-border bg-card/30 p-4",children:[(0,a.jsx)("p",{className:"text-[11px] leading-relaxed text-muted-foreground",children:s&&i.path?(0,a.jsx)("code",{className:"rounded bg-muted/60 px-1.5 py-0.5 font-mono",children:i.path}):d?(0,a.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-muted-foreground",children:[(0,a.jsx)(n.A,{className:"h-3 w-3 animate-spin"}),"Probing PATH and known install dirs…"]}):t.hint}),!s&&!d&&(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("button",{type:"button",onClick:()=>e.toggleManual(t.id),className:"text-[11px] text-muted-foreground transition hover:text-foreground",children:o?"Cancel":"Don't see it? Set path manually →"}),o&&(0,a.jsx)(_,{cliId:t.id,value:e.manualPath[t.id]??"",onChange:r=>e.setManualPath(e=>({...e,[t.id]:r})),error:e.manualError[t.id],busy:l,onSubmit:()=>e.submitManualPath(t.id)})]}),s&&"opencode-cli"===t.id&&r&&(0,a.jsx)(O,{loading:e.opencodeModelsLoading,error:e.opencodeModelsError,models:e.opencodeModels,selected:e.selectedOpencodeModels,onToggle:e.toggleOpencodeModel}),s&&"opencode-cli"!==t.id&&r&&(0,a.jsx)(M,{cliId:t.id,voices:e.cliVoices,savingVoiceIds:e.savingVoiceIds,saveError:e.voiceSaveError,onToggle:e.toggleVoice})]})]},t.id)})}),(0,a.jsx)("p",{className:"mt-3 text-[11px] text-muted-foreground",children:"Cursor and Windsurf are IDEs that invoke chorus, not voices — wire them up on the Connect page after onboarding."})]})}function M({cliId:e,voices:t,savingVoiceIds:r,saveError:n,onToggle:i}){let s=C[e],d=t.filter(e=>e.provider===s).slice().sort((e,t)=>e.id===s?-1:t.id===s?1:e.model_id.localeCompare(t.model_id));if(0===d.length)return(0,a.jsx)("p",{className:"text-[11px] italic text-muted-foreground/70",children:"Models will populate after the daemon finishes seeding (refresh in a few seconds)."});let o=d.filter(e=>e.enabled).length;return(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsxs)("div",{className:"flex items-baseline justify-between gap-2",children:[(0,a.jsx)("p",{className:"text-[11px] font-medium uppercase tracking-wider text-muted-foreground",children:"Models"}),(0,a.jsxs)("p",{className:"text-[11px] text-muted-foreground/70",children:[o,"/",d.length," enabled"]})]}),n&&(0,a.jsx)("p",{className:"text-[11px] text-destructive",children:n}),(0,a.jsx)("div",{className:"grid grid-cols-1 gap-1",children:d.map(e=>{let t=e.enabled,n=e.id===s;return(0,a.jsxs)("button",{type:"button",disabled:r.has(e.id),onClick:()=>i(e),title:e.model_id,className:(0,x.cn)("flex items-center gap-2 rounded border px-2 py-1.5 text-left text-[11px] transition disabled:opacity-60",t?"border-primary/50 bg-primary/10 text-foreground":"border-border bg-card text-muted-foreground hover:border-muted-foreground/30"),children:[(0,a.jsx)("div",{className:(0,x.cn)("grid h-3 w-3 shrink-0 place-items-center rounded-sm border transition",t?"border-primary bg-primary text-primary-foreground":"border-border"),children:t&&(0,a.jsx)(b.A,{className:"h-2 w-2"})}),(0,a.jsx)("span",{className:"truncate font-mono",children:e.model_id}),n&&(0,a.jsx)("span",{className:"shrink-0 rounded-full bg-emerald-500/10 px-1.5 py-0.5 text-[9px] font-medium uppercase tracking-wider text-emerald-300",children:"current"})]},e.id)})})]})}function O({loading:e,error:t,models:r,selected:i,onToggle:s}){return(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsxs)("div",{className:"flex items-baseline justify-between gap-2",children:[(0,a.jsx)("p",{className:"text-[11px] font-medium uppercase tracking-wider text-muted-foreground",children:"Pick models to enable"}),(0,a.jsxs)("p",{className:"text-[11px] text-muted-foreground/70",children:[i.size," selected"]})]}),e&&(0,a.jsxs)("p",{className:"flex items-center gap-2 text-[11px] text-muted-foreground",children:[(0,a.jsx)(n.A,{className:"h-3 w-3 animate-spin"}),"Listing models from"," ",(0,a.jsx)("code",{className:"rounded bg-muted px-1",children:"opencode models"}),"…"]}),t&&(0,a.jsx)("p",{className:"text-[11px] text-destructive",children:t}),r&&(0,a.jsxs)("div",{className:"space-y-2",children:[Object.entries(r.gateways).filter(([e])=>e.startsWith("opencode")).sort(([e],[t])=>e.localeCompare(t)).map(([e,t])=>(0,a.jsxs)("div",{className:"space-y-1",children:[(0,a.jsxs)("p",{className:"text-[10px] font-mono text-muted-foreground/80",children:[e,"/"]}),(0,a.jsx)("div",{className:"grid grid-cols-1 gap-1",children:t.map(t=>{let r=i.has(t);return(0,a.jsxs)("button",{type:"button",onClick:()=>s(t),title:t,className:(0,x.cn)("flex items-center gap-2 rounded border px-2 py-1.5 text-left text-[11px] transition",r?"border-primary/50 bg-primary/10 text-foreground":"border-border bg-card text-muted-foreground hover:border-muted-foreground/30"),children:[(0,a.jsx)("div",{className:(0,x.cn)("grid h-3 w-3 shrink-0 place-items-center rounded-sm border transition",r?"border-primary bg-primary text-primary-foreground":"border-border"),children:r&&(0,a.jsx)(b.A,{className:"h-2 w-2"})}),(0,a.jsx)("span",{className:"truncate font-mono",children:t.slice(e.length+1)})]},t)})})]},e)),(0,a.jsxs)("p",{className:"text-[11px] leading-relaxed text-muted-foreground/70",children:["Pre-selected: ",r.defaultPicks.join(", ")||"none",". Change anytime in ",(0,a.jsx)("code",{className:"rounded bg-muted px-1",children:"Settings"}),"."]})]})]})}function _({cliId:e,value:t,onChange:r,error:i,busy:s,onSubmit:d}){let o=function(e){switch(e){case"claude-code":return"claude";case"codex-cli":return"codex";case"gemini-cli":return"gemini";case"opencode-cli":return"opencode";default:return"kimi"}}(e);return(0,a.jsxs)("div",{className:"space-y-2 rounded-md border border-border bg-card/50 p-3",children:[(0,a.jsxs)("p",{className:"text-[11px] leading-relaxed text-muted-foreground",children:["Paste the full path to the"," ",(0,a.jsx)("code",{className:"rounded bg-muted px-1",children:o})," binary. Run"," ",(0,a.jsxs)("code",{className:"rounded bg-muted px-1",children:["which ",o]})," (macOS / Linux) or ",(0,a.jsxs)("code",{className:"rounded bg-muted px-1",children:["where ",o]})," ","(Windows) to find it. The daemon will run"," ",(0,a.jsxs)("code",{className:"rounded bg-muted px-1",children:[o," --version"]})," with a 2s timeout to confirm the binary works and identifies as the"," ",o," CLI."]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(g,{value:t,onChange:e=>r(e.target.value),placeholder:`/full/path/to/${o}`,className:"flex-1 font-mono text-xs",spellCheck:!1,autoComplete:"off"}),(0,a.jsx)(l.$,{type:"button",variant:"secondary",disabled:s,onClick:d,children:s?(0,a.jsx)(n.A,{className:"h-4 w-4 animate-spin"}):"Verify"})]}),i&&(0,a.jsx)("p",{className:"text-[11px] text-destructive",children:i})]})}let I=[{id:"strict",label:"Strict",hint:"Read-only. Reviewers can inspect code but can't write files, exec shell, or hit the network."},{id:"workspace",label:"Workspace (recommended)",hint:"Read+write inside the chat dir, scoped shell, no network. Default for most teams."},{id:"full",label:"Full access",hint:"No sandbox at all. Only on a personal machine you fully trust."}];function z({sandboxProfile:e,setSandboxProfile:t,autoApprovePrompts:r,setAutoApprovePrompts:n,networkAccess:i,setNetworkAccess:s}){return(0,a.jsxs)("section",{className:"mb-8",children:[(0,a.jsx)("h2",{className:"mb-3 text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:"Permissions & sandbox"}),(0,a.jsx)("p",{className:"mb-4 text-xs leading-relaxed text-muted-foreground",children:"Controls what reviewers can do on your machine. You can change this anytime in Settings → Permissions."}),(0,a.jsx)("div",{className:"space-y-2",children:I.map(r=>{let n=e===r.id;return(0,a.jsxs)("button",{type:"button",onClick:()=>t(r.id),className:(0,x.cn)("flex w-full items-start gap-3 rounded-lg border p-4 text-left transition",n?"border-primary/50 bg-primary/10":"border-border bg-card hover:border-muted-foreground/30"),children:[(0,a.jsx)("div",{className:(0,x.cn)("mt-0.5 grid h-5 w-5 shrink-0 place-items-center rounded-full border transition",n?"border-primary bg-primary text-primary-foreground":"border-border"),children:n&&(0,a.jsx)(b.A,{className:"h-3 w-3"})}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("div",{className:"text-sm font-medium",children:r.label}),(0,a.jsx)("div",{className:"mt-1 text-xs leading-relaxed text-muted-foreground",children:r.hint})]})]},r.id)})}),(0,a.jsxs)("div",{className:"mt-3 space-y-2",children:[(0,a.jsxs)("label",{className:"flex cursor-pointer items-start gap-3 rounded-lg border border-border bg-card p-3",children:[(0,a.jsx)("input",{type:"checkbox",checked:r,onChange:e=>n(e.target.checked),className:"mt-1 h-4 w-4 cursor-pointer accent-primary"}),(0,a.jsxs)("div",{className:"min-w-0 flex-1 text-xs leading-relaxed",children:[(0,a.jsx)("div",{className:"text-sm font-medium",children:"Skip in-CLI permission prompts"}),(0,a.jsxs)("div",{className:"mt-0.5 text-muted-foreground",children:["Passes ",(0,a.jsx)("code",{className:"rounded bg-muted px-1",children:"--afk"})," /"," ",(0,a.jsx)("code",{className:"rounded bg-muted px-1",children:"auto_edit"}),"to spawned reviewers so they don't hang on per-tool prompts. Off = every action requires explicit consent in the CLI's TUI."]})]})]}),(0,a.jsxs)("label",{className:"flex cursor-pointer items-start gap-3 rounded-lg border border-border bg-card p-3",children:[(0,a.jsx)("input",{type:"checkbox",checked:i,onChange:e=>s(e.target.checked),className:"mt-1 h-4 w-4 cursor-pointer accent-primary"}),(0,a.jsxs)("div",{className:"min-w-0 flex-1 text-xs leading-relaxed",children:[(0,a.jsx)("div",{className:"text-sm font-medium",children:"Allow outbound network from reviewers"}),(0,a.jsx)("div",{className:"mt-0.5 text-muted-foreground",children:"Off by default. Templates that explicitly need network override per phase."})]})]})]})]})}var L=r(6185);async function E(e){for(let t of e.selectedClis){let e=w.find(e=>e.id===t);e&&await (0,L.WH)(e.provider,{kind:"cli_subscription",value:e.id,updatedAt:Date.now()})}for(let[t,r]of Object.entries(e.apiKeys)){let e=r.trim();e&&await (0,L.WH)(t,{kind:"api_key",value:e,updatedAt:Date.now()})}await (0,c.Ep)({sandboxProfile:e.sandboxProfile,autoApprovePrompts:e.autoApprovePrompts,networkAccess:e.networkAccess}),e.selectedClis.has("opencode-cli")&&e.opencodeModels&&await V(e),await (0,L.Xx)({onboarded:!0})}async function V(e){let{listVoices:t,updateVoice:a,createVoice:n}=await Promise.resolve().then(r.bind(r,7847)),i=new Map((await t({provider:"opencode-cli"}).catch(()=>[])).map(e=>[e.id,e])),s=e.opencodeModels;s&&await Promise.all(s.flat.map(async t=>{let r=`opencode-cli:${t}`,s=e.selectedOpencodeModels.has(t),d=i.get(r);try{if(d)d.enabled!==s&&await a(r,{enabled:s});else{let e,r,{lineage:a,vendor_family:i}=(r=((e=t.indexOf("/"))>=0?t.slice(e+1):t).toLowerCase()).includes("kimi")?{lineage:"moonshot",vendor_family:null}:r.includes("claude")?{lineage:"anthropic",vendor_family:null}:r.includes("gpt")||/(?:^|[^a-z])o[1-9](?:$|[^a-z0-9])/.test(r)?{lineage:"openai",vendor_family:null}:r.includes("gemini")?{lineage:"google",vendor_family:null}:r.includes("deepseek")?{lineage:"opencode",vendor_family:"deepseek"}:r.includes("llama")||r.includes("meta")?{lineage:"opencode",vendor_family:"meta"}:r.includes("mistral")||r.includes("mixtral")?{lineage:"opencode",vendor_family:"mistral"}:r.includes("grok")||r.includes("xai")?{lineage:"opencode",vendor_family:"xai"}:{lineage:"opencode",vendor_family:null};await n({provider:"opencode-cli",model_id:t,label:t,source:"cli",lineage:a,vendor_family:i,enabled:s})}}catch{}}))}function $(){let e=(0,s.useRouter)(),[t,r]=(0,d.useTransition)(),[p,x]=(0,d.useState)(null),[g,h]=(0,d.useState)(new Set),[b,f]=(0,d.useState)([]),[v,y]=(0,d.useState)(new Set),[j,w]=(0,d.useState)(null),[N,C]=(0,d.useState)({}),[S,A]=(0,d.useState)("workspace"),[M,O]=(0,d.useState)(!0),[_,I]=(0,d.useState)(!1),[V,$]=(0,d.useState)({}),[T,R]=(0,d.useState)(!0),[W,D]=(0,d.useState)(new Set),[G,K]=(0,d.useState)({}),[q,F]=(0,d.useState)({}),[Y,H]=(0,d.useState)(new Set),[J,U]=(0,d.useState)(null),[B,Z]=(0,d.useState)(null),[Q,X]=(0,d.useState)(!1),[ee,et]=(0,d.useState)(new Set);(0,d.useEffect)(()=>{let e=!1;return(0,c.fk)().then(t=>{if(e)return;let r={},a=new Set;for(let e of t)r[e.id]=e,e.found&&a.add(e.id);$(r),a.size>0&&h(a)}).catch(()=>{}).finally(()=>{e||R(!1)}),(0,m.listVoices)({source:"cli"}).then(t=>{e||f(t)}).catch(()=>{}),()=>{e=!0}},[]);let er=async e=>{y(t=>new Set(t).add(e.id)),w(null);try{let t=await (0,m.updateVoice)(e.id,{enabled:!e.enabled});f(e=>e.map(e=>e.id===t.id?t:e))}catch(e){w(e instanceof Error?e.message:"Couldn't save voice toggle.")}finally{y(t=>{let r=new Set(t);return r.delete(e.id),r})}};(0,d.useEffect)(()=>{!g.has("opencode-cli")||!V["opencode-cli"]?.found||J||Q||B||(X(!0),Z(null),(0,u.Ay)().then(e=>{U(e),et(t=>t.size>0?t:new Set(e.defaultPicks))}).catch(e=>{Z(e instanceof Error?e.message:"Couldn't list OpenCode models. Is the CLI authed (run `opencode auth login`)?")}).finally(()=>X(!1)))},[g,V,J,Q,B]);let ea=async e=>{let t=(G[e]||"").trim();if(!t)return void F(t=>({...t,[e]:"Enter the full path to the CLI program (e.g. /usr/local/bin/claude)."}));H(t=>new Set(t).add(e)),F(t=>({...t,[e]:""}));try{let r=await (0,c.iW)(e,t);if(r.found){try{await (0,c.Df)(e,r.path??t)}catch(t){F(r=>({...r,[e]:`Validation passed but save failed: ${t instanceof Error?t.message:"unknown error"}. Try again, or paste the path again.`}));return}$(t=>({...t,[e]:r})),h(t=>new Set(t).add(e)),(0,m.listVoices)({source:"cli"}).then(f).catch(()=>{}),D(t=>{let r=new Set(t);return r.delete(e),r})}else{let t=r.reason??"couldn't run that path";F(r=>({...r,[e]:`Validation failed: ${t}.`}))}}catch{F(t=>({...t,[e]:"Validation failed. Is the daemon running?"}))}finally{H(t=>{let r=new Set(t);return r.delete(e),r})}},en=g.size+Object.values(N).filter(e=>e.trim().length>0).length;return(0,a.jsx)("main",{className:"min-h-screen bg-background text-foreground",children:(0,a.jsxs)("div",{className:"mx-auto w-full max-w-5xl px-4 py-10 sm:px-6 sm:py-14",children:[(0,a.jsxs)("div",{className:"mb-8 flex items-center gap-3",children:[(0,a.jsx)("div",{className:"grid h-10 w-10 place-items-center rounded-md bg-primary/15 text-primary",children:(0,a.jsx)(o.U,{className:"h-6 w-6"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-xs uppercase tracking-wider text-muted-foreground",children:"Welcome to Chorus"}),(0,a.jsx)("h1",{className:"text-2xl font-semibold tracking-tight",children:"Connect at least one model to begin"})]})]}),(0,a.jsx)("p",{className:"mb-8 text-sm leading-relaxed text-muted-foreground",children:"Chorus runs your prompt past 2–4 LLMs of different lineages and synthesises consensus. Pick the CLI subscriptions you already have, or paste API keys. You can change these later in Settings."}),(0,a.jsx)(P,{selectedClis:g,toggleCli:e=>{h(t=>{let r=new Set(t);return r.has(e)?r.delete(e):r.add(e),r})},detection:V,detecting:T,cliVoices:b,savingVoiceIds:v,voiceSaveError:j,toggleVoice:er,manualOpen:W,toggleManual:e=>{D(t=>{let r=new Set(t);return r.has(e)?r.delete(e):r.add(e),r}),F(t=>({...t,[e]:""}))},manualPath:G,setManualPath:K,manualError:q,manualBusy:Y,submitManualPath:ea,opencodeModels:J,opencodeModelsError:B,opencodeModelsLoading:Q,selectedOpencodeModels:ee,toggleOpencodeModel:e=>{et(t=>{let r=new Set(t);return r.has(e)?r.delete(e):r.add(e),r})}}),(0,a.jsx)(k,{apiKeys:N,updateApiKey:(e,t)=>{C(r=>({...r,[e]:t}))}}),(0,a.jsx)(z,{sandboxProfile:S,setSandboxProfile:A,autoApprovePrompts:M,setAutoApprovePrompts:O,networkAccess:_,setNetworkAccess:I}),p&&(0,a.jsx)("div",{className:"mb-6 rounded-md border border-destructive/50 bg-destructive/10 px-4 py-3 text-sm text-destructive",children:p}),(0,a.jsxs)("div",{className:"flex flex-col-reverse gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:0===en?"Pick at least one to continue.":`${en} ${1===en?"credential":"credentials"} ready to save.`}),(0,a.jsx)(l.$,{onClick:()=>{(x(null),0===en)?x("Pick at least one CLI or paste at least one API key to continue."):r(async()=>{try{await E({selectedClis:g,apiKeys:N,sandboxProfile:S,autoApprovePrompts:M,networkAccess:_,opencodeModels:J,selectedOpencodeModels:ee}),e.push("/"),e.refresh()}catch(e){x(e instanceof L.$v?e.message:"Could not save. Is the Chorus daemon running?")}})},disabled:t||0===en,className:"w-full sm:w-auto",children:t?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.A,{className:"mr-1 h-4 w-4 animate-spin"}),"Saving…"]}):(0,a.jsxs)(a.Fragment,{children:["Get started",(0,a.jsx)(i.A,{className:"ml-1 h-4 w-4"})]})})]})]})})}},2545:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});let a=(0,r(3884).A)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]])},2881:(e,t,r)=>{"use strict";r.d(t,{Eu:()=>s,M5:()=>n,Y8:()=>i});var a=r(4411);async function n(e){return(0,a.T)("/openrouter/save-key",{method:"POST",body:JSON.stringify({apiKey:e})})}async function i(){return(0,a.T)("/openrouter/models")}async function s(e,t){return(0,a.T)("/openrouter/voices",{method:"POST",body:JSON.stringify(t?{modelIds:e,apiKey:t}:{modelIds:e})})}},3149:(e,t,r)=>{"use strict";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)=>{"use strict";r.d(t,{JR:()=>c,QJ:()=>i,VW:()=>s,YM:()=>m,m_:()=>d,r2:()=>p,u5:()=>l,x0:()=>u,ze:()=>a});let a={anthropic:"Claude",openai:"Codex",google:"Gemini",opencode:"OpenCode",moonshot:"Kimi",local:"Local LLM"},n={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 i(e){return e?a[e]??e:""}function s(e){return e?n[e]??"bg-muted":"bg-muted"}let d={claude:"Claude",codex:"Codex",gemini:"Gemini",opencode:"OpenCode",kimi:"Kimi",openrouter:"OpenRouter",local:"Local LLM"},o={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 l(e){return e?d[e]??e:""}function c(e){return e?o[e]??"bg-muted":"bg-muted"}let u={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(e){if(e)return u[e]}let p={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"}}},4030:(e,t,r)=>{"use strict";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"}]])},6289:(e,t,r)=>{"use strict";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"}]])},8600:(e,t,r)=>{Promise.resolve().then(r.bind(r,1996))},9056:(e,t,r)=>{"use strict";r.d(t,{F:()=>s});var a=r(142);let n=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,i=a.$,s=(e,t)=>r=>{var a;if((null==t?void 0:t.variants)==null)return i(e,null==r?void 0:r.class,null==r?void 0:r.className);let{variants:s,defaultVariants:d}=t,o=Object.keys(s).map(e=>{let t=null==r?void 0:r[e],a=null==d?void 0:d[e];if(null===t)return null;let i=n(t)||n(a);return s[e][i]}),l=r&&Object.entries(r).reduce((e,t)=>{let[r,a]=t;return void 0===a||(e[r]=a),e},{});return i(e,o,null==t||null==(a=t.compoundVariants)?void 0:a.reduce((e,t)=>{let{class:r,className:a,...n}=t;return Object.entries(n).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)}},9707:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});let a=(0,r(3884).A)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]])}},e=>{e.O(0,[742,641,506,128,358],()=>e(e.s=8600)),_N_E=e.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[974],{1195:(e,t,r)=>{"use strict";r.d(t,{OpencodeFleetCard:()=>x});var n=r(9442),s=r(6074),d=r(5445),a=r(9707),i=r(4030),l=r(2956),o=r(3734),c=r(7847),m=r(4411),u=r(7362);function x({health:e,voices:t}){let[r,i]=(0,s.useState)(!1),[l,g]=(0,s.useState)(t),[b,h]=(0,s.useState)(null),[f,v]=(0,s.useState)(null);async function y(e){v(e.id),h(null);try{let t=await (0,c.updateVoice)(e.id,{enabled:!e.enabled});g(e=>e.map(e=>e.id===t.id?t:e))}catch(e){h(e instanceof m.$?e.message:"Couldn't save. Is the daemon running?")}finally{v(null)}}let N=new Map;for(let e of l){let t=e.model_id.indexOf("/"),r=t>0?e.model_id.slice(0,t):"other",n=N.get(r)??[];n.push(e),N.set(r,n)}let j=Array.from(N.keys()).sort(),k=l.filter(e=>e.enabled).length;return(0,n.jsxs)("div",{className:(0,u.cn)("rounded-lg border border-border transition-colors hover:border-foreground/20",o.r2.opencode.gradient),children:[(0,n.jsxs)("button",{type:"button",onClick:()=>i(e=>!e),className:"flex w-full items-center gap-3 p-3 text-left",children:[(0,n.jsx)("span",{className:(0,u.cn)("h-2 w-2 shrink-0 rounded-full",o.r2.opencode.dot)}),(0,n.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,n.jsx)("div",{className:"text-sm font-medium",children:"OpenCode"}),(0,n.jsxs)("div",{className:"mt-0.5 flex items-center gap-2",children:[(0,n.jsx)(p,{status:e.status}),(0,n.jsxs)("span",{className:"text-[10px] text-muted-foreground",children:[k," model",1===k?"":"s"," enabled"]})]})]}),(0,n.jsx)(d.A,{className:(0,u.cn)("h-4 w-4 shrink-0 text-muted-foreground transition-transform",r&&"rotate-180")})]}),r&&(0,n.jsxs)("div",{className:"space-y-3 border-t border-border bg-card/50 p-3",children:[b&&(0,n.jsx)("p",{className:"text-[11px] text-destructive",children:b}),0===l.length?(0,n.jsxs)("p",{className:"text-[11px] text-muted-foreground",children:["No OpenCode voices detected yet. Run ",(0,n.jsx)("code",{className:"rounded bg-muted px-1",children:"opencode models"})," ","and restart the daemon."]}):(0,n.jsxs)("div",{className:"space-y-3",children:[j.map(e=>{let t=N.get(e)??[];return(0,n.jsxs)("div",{className:"space-y-1",children:[(0,n.jsxs)("p",{className:"text-[11px] font-mono text-muted-foreground/80",children:[e,"/"]}),(0,n.jsx)("div",{className:"grid grid-cols-1 gap-1 sm:grid-cols-2",children:t.map(t=>{let r=t.enabled,s=t.model_id.slice(e.length+1);return(0,n.jsxs)("button",{type:"button",disabled:f===t.id,onClick:()=>y(t),title:t.model_id,className:(0,u.cn)("flex items-center gap-2 rounded border px-2 py-1.5 text-left text-[11px] transition disabled:opacity-60",r?"border-primary/50 bg-primary/10 text-foreground":"border-border bg-card hover:border-muted-foreground/30 text-muted-foreground"),children:[(0,n.jsx)("div",{className:(0,u.cn)("grid h-3 w-3 shrink-0 place-items-center rounded-sm border transition",r?"border-primary bg-primary text-primary-foreground":"border-border"),children:r&&(0,n.jsx)(a.A,{className:"h-2 w-2"})}),(0,n.jsx)("span",{className:"truncate font-mono",children:s})]},t.id)})})]},e)}),(0,n.jsx)("p",{className:"text-[11px] leading-relaxed text-muted-foreground/70",children:"Toggles save automatically. Templates and the New Chat dialog will only offer models you've enabled here."})]})]})]})}function p({status:e}){switch(e){case"auth_invalid":case"quota_exhausted":case"rate_limited":return(0,n.jsxs)("span",{className:"inline-flex items-center gap-1 rounded-full bg-destructive/10 px-2 py-0.5 text-[10px] font-medium text-destructive",children:[(0,n.jsx)(i.A,{className:"h-3 w-3"}),"auth_invalid"===e?"Auth broken":"quota_exhausted"===e?"Quota out":"Rate-limited"]});default:return(0,n.jsxs)("span",{className:"inline-flex items-center gap-1 rounded-full bg-emerald-500/10 px-2 py-0.5 text-[10px] font-medium text-emerald-300",children:[(0,n.jsx)(l.A,{className:"h-3 w-3"}),"Connected"]})}}},2956:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=(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"}]])},3734:(e,t,r)=>{"use strict";r.d(t,{JR:()=>c,QJ:()=>d,VW:()=>a,YM:()=>u,m_:()=>i,r2:()=>x,u5:()=>o,x0:()=>m,ze:()=>n});let n={anthropic:"Claude",openai:"Codex",google:"Gemini",opencode:"OpenCode",moonshot:"Kimi",local:"Local LLM"},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"};function d(e){return e?n[e]??e:""}function a(e){return e?s[e]??"bg-muted":"bg-muted"}let i={claude:"Claude",codex:"Codex",gemini:"Gemini",opencode:"OpenCode",kimi:"Kimi",openrouter:"OpenRouter",local:"Local LLM"},l={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 o(e){return e?i[e]??e:""}function c(e){return e?l[e]??"bg-muted":"bg-muted"}let m={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 u(e){if(e)return m[e]}let x={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"}}},3761:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=(0,r(3884).A)("clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]])},4030:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=(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"}]])},5445:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=(0,r(3884).A)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]])},5626:(e,t,r)=>{Promise.resolve().then(r.bind(r,6501)),Promise.resolve().then(r.t.bind(r,2573,23)),Promise.resolve().then(r.bind(r,821)),Promise.resolve().then(r.bind(r,9823)),Promise.resolve().then(r.bind(r,8344)),Promise.resolve().then(r.bind(r,1195)),Promise.resolve().then(r.bind(r,8359))},6289:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=(0,r(3884).A)("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]])},8359:(e,t,r)=>{"use strict";r.d(t,{OpenRouterFleetCard:()=>h});var n=r(9442),s=r(6074),d=r(2573),a=r.n(d),i=r(5445),l=r(4030),o=r(6289),c=r(9707),m=r(3761),u=r(2956),x=r(3734),p=r(7847),g=r(4411),b=r(7362);function h({voices:e,health:t}){let r=t?.status==="auth_invalid",[d,f]=(0,s.useState)(r),[v,y]=(0,s.useState)(e),[N,j]=(0,s.useState)(null),[k,w]=(0,s.useState)(null);async function A(e){w(e.id),j(null);try{let t=await (0,p.updateVoice)(e.id,{enabled:!e.enabled});y(e=>e.map(e=>e.id===t.id?t:e))}catch(e){j(e instanceof g.$?e.message:"Couldn't save. Is the daemon running?")}finally{w(null)}}let C=v.filter(e=>e.enabled).length;return(0,n.jsxs)("div",{className:(0,b.cn)("rounded-lg border border-border transition-colors hover:border-foreground/20",x.r2.openrouter.gradient),children:[(0,n.jsxs)("button",{type:"button",onClick:()=>f(e=>!e),className:"flex w-full items-center gap-3 p-3 text-left",children:[(0,n.jsx)("span",{className:(0,b.cn)("h-2 w-2 shrink-0 rounded-full",x.r2.openrouter.dot)}),(0,n.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,n.jsx)("div",{className:"text-sm font-medium",children:"OpenRouter"}),(0,n.jsxs)("div",{className:"mt-0.5 flex items-center gap-2",children:[function(e){switch(e){case"quota_exhausted":return(0,n.jsxs)("span",{className:"inline-flex items-center gap-1 rounded-full bg-destructive/10 px-2 py-0.5 text-[10px] font-medium text-destructive",children:[(0,n.jsx)(l.A,{className:"h-3 w-3"}),"Credits out"]});case"auth_invalid":return(0,n.jsxs)("span",{className:"inline-flex items-center gap-1 rounded-full bg-destructive/10 px-2 py-0.5 text-[10px] font-medium text-destructive",children:[(0,n.jsx)(l.A,{className:"h-3 w-3"}),"Auth broken"]});case"rate_limited":return(0,n.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:[(0,n.jsx)(m.A,{className:"h-3 w-3"}),"Rate-limited"]});default:return(0,n.jsxs)("span",{className:"inline-flex items-center gap-1 rounded-full bg-emerald-500/10 px-2 py-0.5 text-[10px] font-medium text-emerald-300",children:[(0,n.jsx)(u.A,{className:"h-3 w-3"}),"Configured"]})}}(t?.status??"healthy"),(0,n.jsxs)("span",{className:"text-[10px] text-muted-foreground",children:[C," model",1===C?"":"s"," enabled"]})]})]}),(0,n.jsx)(i.A,{className:(0,b.cn)("h-4 w-4 shrink-0 text-muted-foreground transition-transform",d&&"rotate-180")})]}),d&&(0,n.jsxs)("div",{className:"space-y-2 border-t border-border bg-card/50 p-3",children:[r&&(0,n.jsxs)("div",{className:"flex items-start gap-2 rounded-md border border-destructive/40 bg-destructive/10 p-2.5",children:[(0,n.jsx)(l.A,{className:"mt-0.5 h-3.5 w-3.5 shrink-0 text-destructive"}),(0,n.jsxs)("div",{className:"min-w-0 flex-1 space-y-1.5",children:[(0,n.jsxs)("p",{className:"text-[11px] leading-relaxed text-destructive",children:["OpenRouter rejected the saved API key",t?.message?`: ${t.message}`:"."]}),(0,n.jsxs)(a(),{href:"/connect",className:"inline-flex items-center gap-1 rounded border border-destructive/50 bg-destructive/10 px-2 py-1 text-[11px] font-medium text-destructive transition hover:bg-destructive/20",children:["Fix on Connect",(0,n.jsx)(o.A,{className:"h-3 w-3"})]})]})]}),N&&(0,n.jsx)("p",{className:"text-[11px] text-destructive",children:N}),0===v.length?(0,n.jsx)("p",{className:"text-[11px] text-muted-foreground",children:"No OpenRouter voices yet. Add some on the Connect page."}):(0,n.jsx)("div",{className:"grid grid-cols-1 gap-1",children:v.map(e=>(0,n.jsxs)("button",{type:"button",disabled:k===e.id,onClick:()=>A(e),title:e.model_id,className:(0,b.cn)("flex items-center gap-2 rounded border px-2 py-1.5 text-left text-[11px] transition disabled:opacity-60",e.enabled?"border-primary/50 bg-primary/10 text-foreground":"border-border bg-card text-muted-foreground hover:border-muted-foreground/30"),children:[(0,n.jsx)("div",{className:(0,b.cn)("grid h-3 w-3 shrink-0 place-items-center rounded-sm border transition",e.enabled?"border-primary bg-primary text-primary-foreground":"border-border"),children:e.enabled&&(0,n.jsx)(c.A,{className:"h-2 w-2"})}),(0,n.jsx)("span",{className:"truncate font-mono",children:e.model_id})]},e.id))}),!r&&(0,n.jsx)("p",{className:"text-[11px] leading-relaxed text-muted-foreground/70",children:"Add or replace your API key on Connect. Toggles save automatically."})]})]})}},9707:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=(0,r(3884).A)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]])},9823:(e,t,r)=>{"use strict";r.d(t,{LineageFleetCard:()=>b});var n=r(9442),s=r(6074),d=r(5445),a=r(9707),i=r(4030),l=r(3761),o=r(2956),c=r(3734),m=r(7847),u=r(4411),x=r(7362);let p={anthropic:"claude",openai:"codex",google:"gemini",opencode:"opencode",moonshot:"kimi"},g={dot:"bg-muted-foreground/40",gradient:"bg-gradient-to-br from-muted/30 via-card to-card"};function b({lineage:e,label:t,voices:r,health:i}){let l,[o,f]=(0,s.useState)(!1),[v,y]=(0,s.useState)(r),[N,j]=(0,s.useState)(null),[k,w]=(0,s.useState)(null);async function A(e){w(e.id),j(null);try{let t=await (0,m.updateVoice)(e.id,{enabled:!e.enabled});y(e=>e.map(e=>e.id===t.id?t:e))}catch(e){j(e instanceof u.$?e.message:"Couldn't save. Is the daemon running?")}finally{w(null)}}let C=v.filter(e=>e.enabled).length,_=(l=p[e])?c.r2[l]:g;return(0,n.jsxs)("div",{className:(0,x.cn)("rounded-lg border border-border transition-colors hover:border-foreground/20",_.gradient),children:[(0,n.jsxs)("button",{type:"button",onClick:()=>f(e=>!e),className:"flex w-full items-center gap-3 p-3 text-left",children:[(0,n.jsx)("span",{className:(0,x.cn)("h-2 w-2 shrink-0 rounded-full",_.dot)}),(0,n.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,n.jsx)("div",{className:"text-sm font-medium",children:t}),(0,n.jsxs)("div",{className:"mt-0.5 flex items-center gap-2",children:[(0,n.jsx)(h,{status:i.status}),(0,n.jsxs)("span",{className:"text-[10px] text-muted-foreground",children:[C," model",1===C?"":"s"," enabled"]})]})]}),(0,n.jsx)(d.A,{className:(0,x.cn)("h-4 w-4 shrink-0 text-muted-foreground transition-transform",o&&"rotate-180")})]}),o&&(0,n.jsxs)("div",{className:"space-y-2 border-t border-border bg-card/50 p-3",children:[N&&(0,n.jsx)("p",{className:"text-[11px] text-destructive",children:N}),0===v.length?(0,n.jsx)("p",{className:"text-[11px] text-muted-foreground",children:"No voices detected for this provider yet."}):(0,n.jsx)("div",{className:"grid grid-cols-1 gap-1",children:v.map(e=>{let t=e.enabled;return(0,n.jsxs)("button",{type:"button",disabled:k===e.id,onClick:()=>A(e),title:e.model_id,className:(0,x.cn)("flex items-center gap-2 rounded border px-2 py-1.5 text-left text-[11px] transition disabled:opacity-60",t?"border-primary/50 bg-primary/10 text-foreground":"border-border bg-card hover:border-muted-foreground/30 text-muted-foreground"),children:[(0,n.jsx)("div",{className:(0,x.cn)("grid h-3 w-3 shrink-0 place-items-center rounded-sm border transition",t?"border-primary bg-primary text-primary-foreground":"border-border"),children:t&&(0,n.jsx)(a.A,{className:"h-2 w-2"})}),(0,n.jsx)("span",{className:"truncate font-mono",children:e.model_id})]},e.id)})}),(0,n.jsx)("p",{className:"text-[11px] leading-relaxed text-muted-foreground/70",children:"Toggles save automatically. Voice list is curated per chorus release — new models appear after upgrades."})]})]})}function h({status:e}){switch(e){case"auth_invalid":return(0,n.jsxs)("span",{className:"inline-flex items-center gap-1 rounded-full bg-destructive/10 px-2 py-0.5 text-[10px] font-medium text-destructive",children:[(0,n.jsx)(i.A,{className:"h-3 w-3"}),"Auth broken"]});case"quota_exhausted":return(0,n.jsxs)("span",{className:"inline-flex items-center gap-1 rounded-full bg-destructive/10 px-2 py-0.5 text-[10px] font-medium text-destructive",children:[(0,n.jsx)(i.A,{className:"h-3 w-3"}),"Quota out"]});case"rate_limited":return(0,n.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:[(0,n.jsx)(l.A,{className:"h-3 w-3"}),"Rate-limited"]});default:return(0,n.jsxs)("span",{className:"inline-flex items-center gap-1 rounded-full bg-emerald-500/10 px-2 py-0.5 text-[10px] font-medium text-emerald-300",children:[(0,n.jsx)(o.A,{className:"h-3 w-3"}),"Connected"]})}}}},e=>{e.O(0,[742,832,641,344,506,128,358],()=>e(e.s=5626)),_N_E=e.O()}]);
|