@overlordai/server 1.0.178 → 1.0.180
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/adapters/help-text.d.ts.map +1 -1
- package/dist/adapters/help-text.js +3 -2
- package/dist/adapters/help-text.js.map +1 -1
- package/dist/adapters/nlu.service.js +4 -4
- package/dist/dispatcher/task-creation.service.d.ts.map +1 -1
- package/dist/dispatcher/task-creation.service.js +3 -1
- package/dist/dispatcher/task-creation.service.js.map +1 -1
- package/package.json +4 -4
- package/public/assets/{AccessTokensPage-1EKC1hiZ.js → AccessTokensPage-DSRaXrXC.js} +1 -1
- package/public/assets/{AdminPage-51tboyFu.js → AdminPage-quo_nZu0.js} +1 -1
- package/public/assets/AgentCliPage-B_cQKyB7.js +5 -0
- package/public/assets/{ApiReferencePage-TgiwRipe.js → ApiReferencePage-CkzYCBis.js} +1 -1
- package/public/assets/{ArchitecturePage-BzeZql6h.js → ArchitecturePage-B0j0c21l.js} +1 -1
- package/public/assets/{AuditLogPage-y6n7Px8g.js → AuditLogPage-DdW6Rjbw.js} +1 -1
- package/public/assets/{AutomationCreatePage-CajNO4bS.js → AutomationCreatePage-DglF_EDi.js} +1 -1
- package/public/assets/{AutomationDetailPage-Dgf3Tb9C.js → AutomationDetailPage-C3aTSg-j.js} +1 -1
- package/public/assets/{AutomationEditPage-DYaZj31T.js → AutomationEditPage-CcC-aVlt.js} +1 -1
- package/public/assets/{AutomationListPage-DxPUmPbs.js → AutomationListPage-DR_CE70e.js} +1 -1
- package/public/assets/{AutomationRunDetailPage-DmNxMDk5.js → AutomationRunDetailPage-CZ4pxP1x.js} +1 -1
- package/public/assets/{BindPlatformPage-MYeCpBFT.js → BindPlatformPage-Bn9R5es1.js} +1 -1
- package/public/assets/{BotIntegrationPage-Dnk8iYbr.js → BotIntegrationPage-BF9ii7I9.js} +1 -1
- package/public/assets/{BotManage-96DyyPVc.js → BotManage-CVBala6Z.js} +1 -1
- package/public/assets/{BotSetupPage-esAmTt5X.js → BotSetupPage-B2w5uyZ-.js} +1 -1
- package/public/assets/{ChangelogPage-BZmrhbzu.js → ChangelogPage-CQ09e6Bp.js} +1 -1
- package/public/assets/{Checkbox-CQt3GUhI.js → Checkbox-ksCSqTDb.js} +1 -1
- package/public/assets/{CliReferencePage-D-PUOTbI.js → CliReferencePage-CXSJI2NI.js} +3 -3
- package/public/assets/{ConfirmStageDialog-DIsZM7QS.js → ConfirmStageDialog-pT-iA956.js} +1 -1
- package/public/assets/{ConnectorsManage-v8CzbHwB.js → ConnectorsManage-Dfl92aJZ.js} +1 -1
- package/public/assets/{ConnectorsPage-Czxmo0rf.js → ConnectorsPage-B65QSW6u.js} +1 -1
- package/public/assets/{DeploymentPage-BmfGIQ--.js → DeploymentPage-CUZ5KK3d.js} +1 -1
- package/public/assets/{DevWorkflowPage-BwP87xBb.js → DevWorkflowPage-j3fyS7Y_.js} +1 -1
- package/public/assets/{DeveloperManage-Bu-dU6qo.js → DeveloperManage-BKyKIipO.js} +1 -1
- package/public/assets/{DeveloperSetupPage-PXns-tkJ.js → DeveloperSetupPage-BZoCYXpK.js} +1 -1
- package/public/assets/{DocsIndexPage-DHYB2eq5.js → DocsIndexPage-BvqoOdfl.js} +1 -1
- package/public/assets/{DocsLayout-DLxSnG0D.js → DocsLayout-C59ONhjV.js} +1 -1
- package/public/assets/{DocsPrimitives-D7h19aXG.js → DocsPrimitives-CipzCTEu.js} +1 -1
- package/public/assets/{EditProjectPage-BC0UDNOv.js → EditProjectPage-Bi5rAJ13.js} +1 -1
- package/public/assets/{EmptyState-CMDagsi4.js → EmptyState-DV7LUJer.js} +1 -1
- package/public/assets/{EnvVariablesPage-BB7ahnB1.js → EnvVariablesPage-jcd0s6Kk.js} +1 -1
- package/public/assets/{HomePage-CssNquOH.js → HomePage-CG2VZtpZ.js} +1 -1
- package/public/assets/{InfoRow-BxIE0xaA.js → InfoRow-DtLvNV_J.js} +1 -1
- package/public/assets/{InstallationPage-CcJ0J1Zn.js → InstallationPage-BCxuKwTs.js} +1 -1
- package/public/assets/{LandingPage-BiMt64NW.js → LandingPage-CnUihNQl.js} +1 -1
- package/public/assets/{LocalDevelopmentPage-D4FSxH3d.js → LocalDevelopmentPage-BvDGaeS9.js} +1 -1
- package/public/assets/{LoginPage-dLNo1JNx.js → LoginPage-CnO_s0hQ.js} +1 -1
- package/public/assets/{MetricBar-kakUenDO.js → MetricBar-DnOi5rBL.js} +1 -1
- package/public/assets/{MultiSelect-CmPlPDVq.js → MultiSelect-B-bLdzr4.js} +1 -1
- package/public/assets/{NotFoundPage-ohSBiBT-.js → NotFoundPage-H5psGKE8.js} +1 -1
- package/public/assets/{OnboardingGuide-cHKCR0M5.js → OnboardingGuide-Cj05MAli.js} +1 -1
- package/public/assets/{PermissionsPage-7-IPdVXg.js → PermissionsPage-CDjMHQvq.js} +1 -1
- package/public/assets/{PipelineConfigPage-BX6JMHM4.js → PipelineConfigPage-D_TTvIoA.js} +1 -1
- package/public/assets/{PipelineEditorPage-BeNxSKH5.js → PipelineEditorPage-xKDOKA_r.js} +1 -1
- package/public/assets/{PlanPage-B7z3l_2F.js → PlanPage-pjNFq5I8.js} +1 -1
- package/public/assets/{ProfilePage-DwsnCrys.js → ProfilePage-CS9IfoHU.js} +1 -1
- package/public/assets/{ProjectDetailPage-CzLqL69C.js → ProjectDetailPage-BFQsH4bl.js} +1 -1
- package/public/assets/{ProjectListPage-Do-9PkUN.js → ProjectListPage-DzCFTq0z.js} +1 -1
- package/public/assets/{PtyTerminal-Z14rUlQy.js → PtyTerminal-DWRVuu-D.js} +1 -1
- package/public/assets/{QuickAuth-CX1phe7h.js → QuickAuth-DmFeLmAr.js} +1 -1
- package/public/assets/{RemoveMemberConfirmDialog-DI3-C2N9.js → RemoveMemberConfirmDialog-CHU9g7rJ.js} +1 -1
- package/public/assets/{ReviewAggregatePage-tiy7PRsr.js → ReviewAggregatePage-Bf7aL-gD.js} +1 -1
- package/public/assets/{ReviewPage-CmbUljfI.js → ReviewPage-DV9HrPzi.js} +1 -1
- package/public/assets/{Select-LGk_EawR.js → Select-xdty1j0i.js} +1 -1
- package/public/assets/{SettingsPage-BpS56Ttu.js → SettingsPage-DAIr4JkV.js} +1 -1
- package/public/assets/{Skeleton-DaeQHyTP.js → Skeleton-CmBnyd29.js} +1 -1
- package/public/assets/{SkillPage-BexkozUK.js → SkillPage-Cj3pNfKV.js} +1 -1
- package/public/assets/TaskDetailPage-CLwDpv_i.js +21 -0
- package/public/assets/{TaskGuidePage-C5Ed0gO0.js → TaskGuidePage-nIfi5sYx.js} +1 -1
- package/public/assets/{TaskListPage-CdajIIwz.js → TaskListPage-BUcEF_A8.js} +1 -1
- package/public/assets/{TaskStatusBadge-CuTVIvqD.js → TaskStatusBadge-4rifJwVC.js} +1 -1
- package/public/assets/{TerminalHomePage-Cs3JoG8j.js → TerminalHomePage-BfTnmFzn.js} +1 -1
- package/public/assets/{TokenManage-BeDY8n-U.js → TokenManage-DUxh8mAN.js} +1 -1
- package/public/assets/{Tooltip-DjIk-pqB.js → Tooltip-CAj06OH3.js} +1 -1
- package/public/assets/{TotpSetupPage-C_NjLBdt.js → TotpSetupPage-DGSu7E4H.js} +1 -1
- package/public/assets/{WorkerDetailPage-CuuvI6Fx.js → WorkerDetailPage-BMQxaS56.js} +1 -1
- package/public/assets/{WorkerListPage-70g7vy3m.js → WorkerListPage-Dblt6aZ1.js} +1 -1
- package/public/assets/{WorkerOperationsPage-BL4BZ45w.js → WorkerOperationsPage-CzxRiINJ.js} +1 -1
- package/public/assets/{WorkerSetupGuidePage-jnyL_uM0.js → WorkerSetupGuidePage-WaRQgvcM.js} +1 -1
- package/public/assets/{WorkerSetupPage-ChyjqvnS.js → WorkerSetupPage-B5xXzfZ8.js} +1 -1
- package/public/assets/agent-type-options-BgAoGQFU.js +1 -0
- package/public/assets/{arrow-left-BL1QzlAp.js → arrow-left-Dsd8akiF.js} +1 -1
- package/public/assets/{arrow-right-BrrN-7YA.js → arrow-right-BwFsEszb.js} +1 -1
- package/public/assets/{bot-D-zp4qz4.js → bot-C7wSfjw1.js} +1 -1
- package/public/assets/{chevron-down-BOgq_PNA.js → chevron-down-SeRjAX4r.js} +1 -1
- package/public/assets/{chevron-left-BPO7Bb6l.js → chevron-left-BvZWPLc1.js} +1 -1
- package/public/assets/{chevron-right-DHCIokyJ.js → chevron-right-Dirw-Ueo.js} +1 -1
- package/public/assets/{chevron-up-wO9VgMYB.js → chevron-up-D_UYsCj8.js} +1 -1
- package/public/assets/{circle-alert-DkW4_zyQ.js → circle-alert-WAD2ix0l.js} +1 -1
- package/public/assets/{clock-BbJkwoCd.js → clock-oJUEgAKB.js} +1 -1
- package/public/assets/{copy-BBOWX6ou.js → copy-BWTAfZ7b.js} +1 -1
- package/public/assets/{developer-options-PMfL5Zv7.js → developer-options-Czaxdx-w.js} +1 -1
- package/public/assets/{download-CbWraeN_.js → download-l-ATQbZQ.js} +1 -1
- package/public/assets/{external-link-CEkNn2LX.js → external-link-BesNRyvW.js} +1 -1
- package/public/assets/{git-fork-B775P9bq.js → git-fork-_pBPs-xc.js} +1 -1
- package/public/assets/{index-Dh1GMLID.js → index-0QFy9ku9.js} +3 -3
- package/public/assets/{index-DwFw8jxe.css → index-CTXH5Ib6.css} +1 -1
- package/public/assets/{key-Dl9aLBg3.js → key-BilH6uAl.js} +1 -1
- package/public/assets/{link-2-BBq5JW-o.js → link-2-ELPNTQde.js} +1 -1
- package/public/assets/{loader-circle-wSNLBiy-.js → loader-circle-OCqj772N.js} +1 -1
- package/public/assets/{pencil-ZFPPMxtk.js → pencil-QmINK6St.js} +1 -1
- package/public/assets/{play-DX-9yzZV.js → play-CUByBpQ0.js} +1 -1
- package/public/assets/{plug-BxGp3gAo.js → plug-CvdRvl-j.js} +1 -1
- package/public/assets/{plus-Cn46sPb9.js → plus-D38pnIMa.js} +1 -1
- package/public/assets/{power-PnMndXJz.js → power-CzLnYo_h.js} +1 -1
- package/public/assets/{rotate-ccw-zdevuzi_.js → rotate-ccw-BsCb3qU2.js} +1 -1
- package/public/assets/{scroll-text-BGkAQAvr.js → scroll-text-CF1Ze80E.js} +1 -1
- package/public/assets/{settings-CfrsrJUV.js → settings-CqcmKnX4.js} +1 -1
- package/public/assets/{skip-forward-ckOfJ8QF.js → skip-forward-DcSN0O55.js} +1 -1
- package/public/assets/{status-colors-DC-m2CdG.js → status-colors-DlyerwQ7.js} +1 -1
- package/public/assets/{task-agent-ZWBurVoa.js → task-agent-Cgyq_UGX.js} +1 -1
- package/public/assets/{task-constants-DfpO4NY9.js → task-constants-D5ty4qUR.js} +1 -1
- package/public/assets/{task.store-B461yHYH.js → task.store-D_nwogGq.js} +1 -1
- package/public/assets/{timer-BFPhC5N0.js → timer-EysIetGz.js} +1 -1
- package/public/assets/{trash-2-CaIOqYj_.js → trash-2-CYdvAzYO.js} +1 -1
- package/public/assets/{useFetch-CJMNf1mK.js → useFetch-BqnEzaSJ.js} +1 -1
- package/public/assets/{users-BCrPK5sS.js → users-dmt7eU5B.js} +1 -1
- package/public/assets/{wifi-Cm-x6iNY.js → wifi-Bore97VF.js} +1 -1
- package/public/assets/{workflow-Burj_14o.js → workflow-DLz7dyVN.js} +1 -1
- package/public/assets/{zap-BAYG3kyF.js → zap-DhNn8k7Z.js} +1 -1
- package/public/index.html +10 -2
- package/public/sw.js +1 -1
- package/public/assets/AgentCliPage-HVXHK2Or.js +0 -3
- package/public/assets/TaskDetailPage-CElleGRa.js +0 -21
- package/public/assets/agent-type-options-BpMI3Naw.js +0 -1
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{a as g,r as p,j as e,a1 as $,B as I,f as M,h as S,t as y}from"./index-
|
|
1
|
+
import{a as g,r as p,j as e,a1 as $,B as I,f as M,h as S,t as y}from"./index-0QFy9ku9.js";import{S as C}from"./Select-xdty1j0i.js";import"./chevron-down-SeRjAX4r.js";const O={stages:[]};function q(){return{name:"",prompt:""}}function b({children:t}){return e.jsx("label",{className:"mb-1 block font-mono text-[11px] text-[var(--text-secondary)]",children:t})}function j({value:t,onChange:o,placeholder:a,type:r="text",className:c=""}){return e.jsx("input",{type:r,value:t,onChange:s=>o(s.target.value),placeholder:a,className:`w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-primary)] px-2.5 py-1.5 font-mono text-xs text-[var(--text-primary)] placeholder:text-[var(--text-muted)] focus:border-[var(--accent)] focus:outline-none ${c}`})}function J({checked:t,onChange:o}){return e.jsx("button",{type:"button",role:"switch","aria-checked":t,onClick:()=>o(!t),className:`relative inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border border-[var(--border)] transition-colors ${t?"bg-[var(--accent)]":"bg-[var(--bg-primary)]"}`,children:e.jsx("span",{className:`inline-block h-3.5 w-3.5 rounded-full bg-white shadow transition-transform ${t?"translate-x-[18px]":"translate-x-[2px]"}`})})}function N({value:t,onChange:o,placeholder:a,rows:r=4}){return e.jsx("textarea",{value:t,onChange:c=>o(c.target.value),placeholder:a,rows:r,className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-primary)] px-2.5 py-1.5 font-mono text-xs leading-relaxed text-[var(--text-primary)] placeholder:text-[var(--text-muted)] focus:border-[var(--accent)] focus:outline-none"})}function T({stage:t,index:o,selected:a,onSelect:r,onDelete:c}){const{t:s}=g(),i=t.prompt?$(t.prompt,60):"";return e.jsxs("div",{role:"button",tabIndex:0,onClick:r,onKeyDown:d=>{(d.key==="Enter"||d.key===" ")&&(d.preventDefault(),r())},className:`group relative flex w-full items-start gap-3 rounded-[4px] border px-4 py-3 text-left transition-colors ${a?"border-[var(--accent)] bg-[var(--bg-card)]":"border-[var(--border)] bg-[var(--bg-card)] hover:border-[var(--text-muted)]"}`,style:{borderLeftWidth:3,borderLeftColor:"var(--accent)"},children:[e.jsx("span",{className:"mt-0.5 shrink-0 font-mono text-[11px] text-[var(--text-muted)]",children:String(o+1).padStart(2,"0")}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"truncate font-mono text-xs font-bold text-[var(--text-primary)]",children:t.name||"unnamed"}),t.label&&e.jsx("span",{className:"truncate font-mono text-[11px] text-[var(--text-muted)]",children:t.label})]}),i&&e.jsxs("div",{className:"mt-0.5 truncate font-mono text-[11px] text-[var(--text-muted)]",children:["// ",i]}),e.jsxs("div",{className:"mt-1 flex items-center gap-2 font-mono text-[11px] text-[var(--text-muted)]",children:[t.gate&&e.jsx("span",{children:"gate"}),t.requireConfirm&&e.jsx("span",{children:"confirm"}),t.timeout!=null&&e.jsxs("span",{children:["timeout:",t.timeout,"s"]})]})]}),e.jsx("button",{type:"button",onClick:d=>{d.stopPropagation(),c()},className:"mt-0.5 shrink-0 rounded-[4px] p-0.5 text-[var(--text-muted)] opacity-0 transition-opacity hover:text-[var(--destructive)] group-hover:opacity-100","aria-label":s("pipeline.delete_stage"),children:e.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("polyline",{points:"3 6 5 6 21 6"}),e.jsx("path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"})]})})]})}function _({stage:t,onChange:o,allStageNames:a}){const{t:r}=g(),c=p.useMemo(()=>{const s=[{value:"",label:"-- select --"}];for(const i of a)i&&i!==t.name&&s.push({value:i,label:i});return s},[a,t.name]);return e.jsxs("div",{className:"space-y-4",children:[e.jsx("h3",{className:"font-mono text-sm font-semibold text-[var(--accent)]",children:r("pipeline.stage_properties")}),e.jsx("p",{className:"font-mono text-[11px] text-[var(--text-muted)]",children:r("pipeline.editing",{name:t.name||r("pipeline.unnamed")})}),e.jsxs("div",{children:[e.jsxs(b,{children:[r("pipeline.name")," *"]}),e.jsx(j,{value:t.name,onChange:s=>o({name:s}),placeholder:r("pipeline.stage_name")})]}),e.jsxs("div",{children:[e.jsx(b,{children:"label"}),e.jsx(j,{value:t.label??"",onChange:s=>o({label:s||void 0}),placeholder:"optional display label"})]}),e.jsxs("div",{children:[e.jsx(b,{children:"prompt *"}),e.jsx(N,{value:t.prompt,onChange:s=>o({prompt:s}),placeholder:"instructions for the agent...",rows:8})]}),e.jsxs("div",{children:[e.jsx(b,{children:"gate"}),e.jsx(j,{value:t.gate??"",onChange:s=>o({gate:s||void 0}),placeholder:"Pass condition, e.g.: no P1-P3 issues"})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(b,{children:r("pipeline.confirm_required")}),e.jsx(J,{checked:t.requireConfirm??!1,onChange:s=>o({requireConfirm:s})})]}),e.jsxs("div",{children:[e.jsx(b,{children:r("pipeline.timeout")}),e.jsx(j,{type:"number",value:String(t.timeout??""),onChange:s=>o({timeout:s?parseInt(s,10):void 0}),placeholder:"600"})]}),e.jsxs("div",{className:"border-t border-[var(--border)] pt-3",children:[e.jsx("p",{className:"mb-3 font-mono text-[11px] text-[var(--text-muted)]",children:r("pipeline.on_failure_section")}),e.jsxs("div",{className:"mb-3",children:[e.jsx(b,{children:r("pipeline.on_failure")}),e.jsx(C,{value:t.onFailure?"goto":"stop",onChange:s=>{o(s==="stop"?{onFailure:void 0}:{onFailure:{goto:"",maxLoops:3}})},options:[{value:"stop",label:r("pipeline.stop")},{value:"goto",label:r("pipeline.goto_stage")}]})]}),t.onFailure&&e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:[e.jsxs("div",{children:[e.jsx(b,{children:r("pipeline.goto")}),e.jsx(C,{value:t.onFailure.goto,onChange:s=>{var i;return o({onFailure:{goto:s,maxLoops:((i=t.onFailure)==null?void 0:i.maxLoops)??3}})},options:c})]}),e.jsxs("div",{children:[e.jsx(b,{children:r("pipeline.max_loops")}),e.jsx(j,{type:"number",value:String(t.onFailure.maxLoops),onChange:s=>{var i;return o({onFailure:{goto:((i=t.onFailure)==null?void 0:i.goto)??"",maxLoops:s?parseInt(s,10):3}})},placeholder:"3"})]})]})]}),e.jsxs("div",{className:"border-t border-[var(--border)] pt-3",children:[e.jsx("h4",{className:"mb-2 font-mono text-xs font-semibold text-[var(--accent)]",children:"params"}),e.jsx(N,{value:t.params?Object.entries(t.params).map(([s,i])=>`${s}=${i}`).join(`
|
|
2
2
|
`):"",onChange:s=>{if(!s.trim()){o({params:void 0});return}const i={};s.split(`
|
|
3
3
|
`).forEach(d=>{const l=d.indexOf("=");l>0&&(i[d.slice(0,l).trim()]=d.slice(l+1).trim())}),o({params:i})},placeholder:"KEY=value (one per line)",rows:3})]})]})}function B({value:t,onChange:o}){const[a,r]=p.useState(t.trim().length>0);return p.useEffect(()=>{!a&&t.trim().length>0&&r(!0)},[t,a]),e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)]",children:[e.jsxs("button",{type:"button",onClick:()=>r(c=>!c),className:"flex w-full items-center justify-between px-4 py-3 text-left font-mono text-xs font-semibold text-[var(--accent)]",children:[e.jsx("span",{children:"preamble"}),e.jsx("span",{className:"text-[11px] text-[var(--text-muted)]",children:a?"[-]":"[+]"})]}),a&&e.jsx("div",{className:"border-t border-[var(--border)] px-4 py-3",children:e.jsx(N,{value:t,onChange:o,placeholder:"Global pre-prompt injected before all stages",rows:4})})]})}function D({value:t,onChange:o}){const{t:a}=g(),[r,c]=p.useState(null),[s,i]=p.useState(!1),d=p.useMemo(()=>t??O,[t]),l=d.stages,h=r!=null?l[r]??null:null,f=p.useMemo(()=>l.map(n=>n.name),[l]),v=p.useCallback(n=>{o({...d,stages:n})},[o,d]),F=p.useCallback(()=>{const n=[...l,q()];v(n),c(n.length-1)},[l,v]),E=p.useCallback(n=>{const x=l.filter((m,u)=>u!==n);v(x),r===n?c(x.length>0?Math.min(n,x.length-1):null):r!=null&&r>n&&c(r-1)},[l,r,v]),w=p.useCallback((n,x)=>{const m=l.map((u,P)=>P===n?{...u,...x}:u);v(m)},[l,v]),k=p.useCallback((n,x)=>{const m=x==="up"?n-1:n+1;if(m<0||m>=l.length)return;const u=[...l];[u[n],u[m]]=[u[m],u[n]],v(u),r===n?c(m):r===m&&c(n)},[l,r,v]),L=p.useMemo(()=>JSON.stringify(d,null,2),[d]);return e.jsxs("div",{className:"flex flex-col gap-0",children:[e.jsx("div",{className:"mb-4 flex items-center gap-2",children:e.jsxs("button",{type:"button",onClick:()=>i(n=>!n),className:`rounded-[4px] border px-2 py-1 font-mono text-[11px] transition-colors ${s?"border-[var(--accent)] text-[var(--accent)]":"border-[var(--border)] text-[var(--text-muted)] hover:text-[var(--text-primary)]"}`,children:[a("pipeline.json_toggle")," ⇅"]})}),s&&e.jsx("pre",{className:"mb-4 max-h-[400px] overflow-auto rounded-[4px] border border-[var(--border)] bg-[var(--bg-primary)] p-3 font-mono text-[11px] leading-relaxed text-[var(--text-primary)]",children:L}),e.jsx("div",{className:"mb-4",children:e.jsx(B,{value:d.preamble??"",onChange:n=>o({...d,preamble:n||void 0})})}),e.jsxs("div",{className:"flex gap-6",children:[e.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[l.map((n,x)=>{var m;return e.jsxs("div",{children:[e.jsx(T,{stage:n,index:x,selected:r===x,onSelect:()=>c(x),onDelete:()=>E(x)}),x<l.length-1&&e.jsxs("div",{className:"flex items-center justify-center gap-2 py-2",children:[e.jsx("div",{className:"h-6 w-px bg-[var(--border)]"}),e.jsx("span",{className:"text-[11px] text-[var(--text-muted)]",children:"▼"}),e.jsx("div",{className:"h-6 w-px bg-[var(--border)]"})]}),((m=n.onFailure)==null?void 0:m.goto)&&e.jsx("div",{className:"flex items-center justify-center gap-1.5 py-1",children:e.jsxs("span",{className:"text-[11px] text-[var(--warning)]",children:["↺ loop → ",n.onFailure.goto," (max ",n.onFailure.maxLoops,")"]})})]},`${x}-${n.name}`)}),r!=null&&l.length>1&&e.jsxs("div",{className:"flex items-center gap-1 pl-7 pt-2",children:[e.jsxs("button",{type:"button",disabled:r===0,onClick:()=>k(r,"up"),className:"rounded-[4px] border border-[var(--border)] px-2 py-0.5 font-mono text-[11px] text-[var(--text-muted)] transition-colors hover:text-[var(--text-primary)] disabled:opacity-30",children:["▲ ",a("pipeline.up")]}),e.jsxs("button",{type:"button",disabled:r===l.length-1,onClick:()=>k(r,"down"),className:"rounded-[4px] border border-[var(--border)] px-2 py-0.5 font-mono text-[11px] text-[var(--text-muted)] transition-colors hover:text-[var(--text-primary)] disabled:opacity-30",children:["▼ ",a("pipeline.down")]})]}),e.jsx("div",{className:"flex items-center justify-center py-3",children:e.jsxs("button",{type:"button",onClick:F,className:"flex items-center gap-1.5 rounded-[4px] border border-dashed border-[var(--border)] px-4 py-2 font-mono text-xs text-[var(--accent)] transition-colors hover:border-[var(--accent)] hover:bg-[var(--bg-secondary)]",children:[e.jsx("span",{className:"text-sm leading-none",children:"+"})," ",a("pipeline.add_stage")]})}),h&&e.jsxs("div",{className:"mt-4 rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4 lg:hidden",children:[e.jsxs("div",{className:"mb-3 flex items-center justify-between",children:[e.jsx("span",{className:"font-mono text-xs font-semibold text-[var(--accent)]",children:a("pipeline.stage_properties")}),e.jsx("button",{type:"button",onClick:()=>c(null),className:"rounded-[4px] border border-[var(--border)] px-2 py-1 font-mono text-[11px] text-[var(--text-muted)]",children:"x"})]}),e.jsx(_,{stage:h,onChange:n=>w(r,n),allStageNames:f})]})]}),e.jsx("div",{className:"hidden w-[360px] shrink-0 rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-5 lg:block",style:{alignSelf:"flex-start",position:"sticky",top:0},children:h?e.jsx(_,{stage:h,onChange:n=>w(r,n),allStageNames:f}):e.jsx("div",{className:"flex min-h-[200px] items-center justify-center",children:e.jsx("p",{className:"font-mono text-xs text-[var(--text-muted)]",children:a("pipeline.select_stage")})})})]})]})}function W(){const{key:t}=I(),o=M(),{t:a}=g(),[r,c]=p.useState(null),[s,i]=p.useState(!0),[d,l]=p.useState(!1);p.useEffect(()=>{t&&S.get(`web/projects/${t}`).json().then(f=>{if(f.pipeline)try{c(JSON.parse(f.pipeline))}catch{c(null)}}).catch(()=>y.error(a("pipeline.failed_to_load_project"))).finally(()=>i(!1))},[t,a]);const h=p.useCallback(async()=>{if(t){l(!0);try{await S.put(`web/projects/${t}`,{json:{pipeline:r?JSON.stringify(r):null}}),y.success(a("pipeline.saved"))}catch{y.error(a("pipeline.failed_to_save"))}finally{l(!1)}}},[t,r,a]);return s?e.jsx("div",{className:"flex h-full items-center justify-center font-mono",children:e.jsx("p",{className:"text-sm text-[var(--text-muted)]",children:a("pipeline.loading_pipeline")})}):e.jsxs("div",{className:"flex h-full flex-col font-mono lowercase",children:[e.jsxs("div",{className:"flex flex-col gap-3 border-b border-[var(--border)] px-4 md:px-8 py-5 sm:flex-row sm:items-center sm:justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[e.jsx("span",{className:"text-base font-medium text-[var(--text-primary)] shrink-0",children:a("pipeline.title")}),e.jsx("span",{className:"text-sm text-[var(--text-muted)] truncate",children:a("pipeline.subtitle",{key:t??""})})]}),e.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[e.jsx("button",{type:"button",onClick:h,disabled:d,className:"rounded-[4px] bg-[var(--accent)] px-4 py-1.5 text-xs font-bold text-black disabled:opacity-50",children:a(d?"common.saving":"pipeline.save")}),e.jsx("button",{type:"button",onClick:()=>o(`/projects/${t}`),className:"rounded-[4px] border border-[var(--border)] px-4 py-1.5 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)] transition-colors",children:a("pipeline.cancel")})]})]}),e.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto p-4 md:p-8",children:e.jsx(D,{value:r,onChange:c})})]})}export{W as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{f as ee,a as te,k as se,r as s,h as b,o as a,t as N,x as re,j as t,K as ae,l as ne,I as oe}from"./index-
|
|
1
|
+
import{f as ee,a as te,k as se,r as s,h as b,o as a,t as N,x as re,j as t,K as ae,l as ne,I as oe}from"./index-0QFy9ku9.js";import{E as ce}from"./EmptyState-DV7LUJer.js";import{T as ie}from"./Skeleton-CmBnyd29.js";import{C as le}from"./ConfirmStageDialog-pT-iA956.js";import{f as de}from"./date-CmcdoD87.js";import{S as pe}from"./Select-xdty1j0i.js";import{P as ue}from"./plus-D38pnIMa.js";import{E as me}from"./external-link-BesNRyvW.js";import{C as xe}from"./chevron-left-BvZWPLc1.js";import{C as fe}from"./chevron-right-Dirw-Ueo.js";import"./clock-oJUEgAKB.js";import"./chevron-down-SeRjAX4r.js";const be=[a.QUEUED,a.ASSIGNED,a.RUNNING,a.SUSPENDED],ge=20;function he(c,n){if(!c)return null;const y=c.repoUrl.replace(/\.git$/,"").replace(/\/+$/,""),i=n.split("/").map(encodeURIComponent).join("/");return c.gitPlatform===oe.GITLAB?`${y}/-/tree/${i}/docs/specs`:`${y}/tree/${i}/docs/specs`}function ve(c){switch(c){case a.RUNNING:return"bg-[var(--accent)]";case a.QUEUED:return"bg-[var(--warning)]";case a.ASSIGNED:return"bg-[var(--info)]";case a.SUSPENDED:return"bg-[var(--warning)]";case a.COMPLETED:return"bg-[var(--accent)]";case a.FAILED:return"bg-[var(--destructive)]";case a.CANCELLED:return"bg-[#525252]";default:return"bg-[#525252]"}}function Le(){const c=ee(),{t:n}=te(),y=se(e=>e.taskSeq),[i,Q]=s.useState("in_progress"),[E,I]=s.useState([]),[L,U]=s.useState(!0),[g,_]=s.useState(void 0),[p,w]=s.useState(void 0),[u,k]=s.useState([]),[j,$]=s.useState({}),[H,A]=s.useState(new Set),[M,D]=s.useState(null),[h,P]=s.useState(null),[l,J]=s.useState([]),[m,O]=s.useState(""),[v,R]=s.useState(""),[T,G]=s.useState(!1),V=s.useMemo(()=>{const e={};for(const r of l)e[r.key]=r;return e},[l]);s.useEffect(()=>{let e=!1;return b.get("web/projects").json().then(r=>{e||J(r)}).catch(()=>{}),()=>{e=!0}},[]),s.useEffect(()=>{l.length>0&&!m&&O(l[0].key)},[l]);const C=s.useCallback(async e=>{U(!0);try{const r=new URLSearchParams({taskMode:"plan",limit:String(ge)});i==="in_progress"?r.set("status",be.join(",")):r.set("status",a.COMPLETED+","+a.FAILED+","+a.CANCELLED),e&&r.set("cursor",e);const S=await b.get(`web/tasks?${r}`).json(),x=S.data??[];I(x),_(S.nextCursor);const d=x.filter(o=>o.status===a.SUSPENDED).map(o=>o.id);if(d.length>0){const o=new Set;await Promise.all(d.map(async f=>{try{(await b.get(`web/tasks/${f}/pending-confirm`).json()).confirm&&o.add(f)}catch{}})),A(o)}else A(new Set);const q=x.filter(o=>o.status===a.COMPLETED).map(o=>o.id);if(q.length>0){const o={};await Promise.all(q.map(async f=>{try{const F=await b.get(`web/tasks?${new URLSearchParams({sourceTaskId:String(f),limit:"100"})}`).json();o[f]=(F.data??[]).length}catch{o[f]=0}})),$(o)}else $({})}catch{I([]),_(void 0)}finally{U(!1)}},[i]);s.useEffect(()=>{C(p)},[C,p,y]),s.useEffect(()=>{w(void 0),k([])},[i]);const Z=s.useCallback(()=>{g&&(k(e=>[...e,p??""]),w(g))},[g,p]),z=s.useCallback(()=>{u.length!==0&&(w(u.at(-1)||void 0),k(e=>e.slice(0,-1)))},[u]),W=u.length+1,K=s.useCallback(async()=>{if(!m||!v.trim()){N.error("project and description are required.");return}G(!0);try{const e=await b.post("web/tasks",{json:{projectKey:m,description:v.trim(),taskMode:"plan"}}).json();R(""),c(`/tasks/${e.task.id}`)}catch(e){const r=e instanceof Error?e.message:String(e);N.error(r)}finally{G(!1)}},[m,v,c]),X=s.useCallback(async e=>{try{const r=await b.get(`web/tasks/${e}/pending-confirm`).json();r.confirm?(D(e),P(r.confirm)):N.error(n("tasks.confirm_failed"))}catch{N.error(n("tasks.confirm_failed"))}},[n]),Y=s.useCallback(()=>{D(null),P(null),C(p)},[C,p]),B=s.useMemo(()=>l.map(e=>({value:e.key,label:e.name})),[l]);return re(null),t.jsxs("div",{className:"mx-auto max-w-6xl px-2 py-4 md:px-4 md:py-6 font-mono",children:[t.jsx("h1",{className:"sr-only",children:n("plan.title")}),t.jsxs("div",{className:"mb-6 flex flex-col gap-2 rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-3 md:flex-row md:items-center md:gap-3",children:[t.jsx(pe,{value:m,onChange:O,options:B.length>0?B:[{value:"",label:"loading..."}],className:"md:w-44 shrink-0"}),t.jsx("input",{type:"text",placeholder:n("plan.description_placeholder"),value:v,onChange:e=>R(e.target.value),onKeyDown:e=>{e.key==="Enter"&&!T&&K()},className:"flex-1 rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] placeholder:text-[var(--text-muted)] outline-none focus:border-[var(--accent)]"}),t.jsxs("button",{onClick:K,disabled:T||!m||!v.trim(),className:"flex shrink-0 items-center gap-1.5 rounded-[4px] bg-[var(--accent)] px-4 py-2 text-xs font-mono text-black transition-opacity hover:opacity-90 disabled:opacity-40 disabled:cursor-not-allowed",children:[t.jsx(ue,{className:"h-3.5 w-3.5"}),n(T?"common.creating":"plan.create")]})]}),t.jsx("div",{className:"mb-4 flex items-center gap-1 overflow-x-auto pb-1 no-scrollbar",children:["in_progress","completed"].map(e=>t.jsx("button",{onClick:()=>Q(e),className:`shrink-0 rounded-[4px] px-3 py-2 h-8 text-xs transition-colors ${i===e?"text-[var(--accent)] bg-[var(--bg-input)]":"text-[var(--text-muted)] bg-[var(--bg-card)] hover:text-[var(--text-secondary)]"}`,children:n(e==="in_progress"?"review.in_progress":"tasks.tab_completed")},e))}),t.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)]",children:[L&&E.length===0&&t.jsx("div",{className:"p-4",children:t.jsx(ie,{rows:4})}),!L&&E.length===0&&t.jsx(ce,{icon:ae,title:n("plan.no_plans"),description:n("plan.description_placeholder")}),E.map(e=>t.jsxs("div",{onClick:()=>c(`/tasks/${e.id}`),className:"flex cursor-pointer items-center gap-3 border-b border-[var(--border)] px-4 py-3 last:border-b-0 hover:bg-[var(--bg-input)] transition-colors",children:[t.jsx("span",{className:`h-2 w-2 shrink-0 rounded-full ${ve(e.status)}`}),t.jsxs("span",{className:"flex-1 truncate text-xs text-[var(--text-primary)] preserve-case",children:["#",e.id," ",ne(e)]}),e.status===a.SUSPENDED&&H.has(e.id)&&t.jsx("button",{onClick:r=>{r.stopPropagation(),X(e.id)},className:"shrink-0 rounded-[4px] px-2 py-0.5 text-[10px] font-bold text-black bg-[var(--warning)] hover:opacity-90 transition-opacity",children:n("tasks.pending_confirmation")}),e.status===a.COMPLETED&&j[e.id]!=null&&j[e.id]>0&&t.jsxs("span",{className:"shrink-0 rounded-[4px] px-2 py-0.5 text-[10px] font-bold",style:{color:"#3b82f6",backgroundColor:"rgba(59,130,246,0.12)"},title:`${j[e.id]} downstream task(s)`,children:[j[e.id]," tasks"]}),e.status===a.COMPLETED&&(()=>{const r=V[e.projectKey];if(!r)return null;let S="main";if(e.configSnapshot)try{const d=JSON.parse(e.configSnapshot);d.defaultBranch&&(S=d.defaultBranch)}catch{}const x=he(r,S);return x?t.jsxs("a",{href:x,target:"_blank",rel:"noopener noreferrer",onClick:d=>d.stopPropagation(),className:"shrink-0 flex items-center gap-1 rounded-[4px] border border-[var(--border)] px-2 py-0.5 text-[10px] text-[var(--text-muted)] hover:text-[var(--info)] hover:border-[var(--info)] transition-colors",title:n("plan.view_spec"),children:[t.jsx(me,{className:"h-2.5 w-2.5"}),n("plan.view_spec")]}):null})(),t.jsx("span",{className:"shrink-0 rounded-[4px] border border-[var(--border)] px-2 py-0.5 text-[11px] text-[var(--text-muted)]",children:e.projectKey}),t.jsx("span",{className:"shrink-0 text-[11px] text-[var(--text-muted)]",children:e.status.toLowerCase()}),t.jsx("span",{className:"shrink-0 text-[11px] text-[var(--text-muted)]",children:de(e.createdAt)})]},e.id))]}),(u.length>0||g)&&t.jsxs("div",{className:"mt-6 flex items-center justify-between",children:[t.jsxs("span",{className:"text-xs text-[var(--text-muted)]",children:["// page ",W]}),t.jsxs("div",{className:"flex gap-2",children:[t.jsxs("button",{onClick:z,disabled:u.length===0,className:"flex items-center gap-1 rounded-[4px] border border-[var(--border)] px-2.5 py-1 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)] hover:border-[var(--accent)] disabled:opacity-30 disabled:cursor-not-allowed transition-colors",children:[t.jsx(xe,{className:"h-3.5 w-3.5"}),n("tasks.prev")]}),t.jsxs("button",{onClick:Z,disabled:!g,className:"flex items-center gap-1 rounded-[4px] border border-[var(--border)] px-2.5 py-1 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)] hover:border-[var(--accent)] disabled:opacity-30 disabled:cursor-not-allowed transition-colors",children:[n("common.next"),t.jsx(fe,{className:"h-3.5 w-3.5"})]})]})]}),M!=null&&h&&t.jsx(le,{isOpen:!0,onClose:()=>{D(null),P(null)},taskId:M,stageName:h.stageName,timeoutSeconds:h.timeout,confirmType:h.confirmType,prompt:h.prompt,onSubmitted:Y})]})}export{Le as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as A,u as F,f as T,r as s,j as e,L as z,a7 as I,a8 as $,s as K,h as p,t as c}from"./index-
|
|
1
|
+
import{a as A,u as F,f as T,r as s,j as e,L as z,a7 as I,a8 as $,s as K,h as p,t as c}from"./index-0QFy9ku9.js";import{v as M}from"./password-CHk45-jw.js";import{I as o}from"./InfoRow-DtLvNV_J.js";import{u as V}from"./useFetch-BqnEzaSJ.js";function Q(){var y,k,C,P;const{t:r}=A(),{logout:L}=F(),E=T(),[S,m]=s.useState(!1),{data:t,loading:U,refetch:D}=V(()=>p.get("web/profile").json(),[]),[x,u]=s.useState(""),[d,b]=s.useState(""),[f,v]=s.useState(""),[g,h]=s.useState(!1),[j,n]=s.useState(""),[i,_]=s.useState(""),[w,N]=s.useState(!1);async function O(){if(n(""),!x){n(r("profile.current_password_required"));return}if(!d){n(r("profile.new_password_required"));return}const a=M(d);if(a){n(r(a));return}if(d!==f){n(r("profile.passwords_do_not_match"));return}try{h(!0),await p.put("web/profile/password",{json:{currentPassword:x,newPassword:d}}),c.success(r("profile.password_changed")),u(""),b(""),v("")}catch(l){const q=l instanceof Error?l.message:r("profile.failed_to_change_password");n(q)}finally{h(!1)}}async function R(){if(!i||i.length!==6){c.error(r("profile.totp_code_required"));return}try{N(!0),await p.post("web/profile/totp/regenerate",{json:{code:i}}),c.success(r("profile.two_fa_regenerated")),_(""),D()}catch(a){const l=a instanceof Error?a.message:r("profile.totp_code_invalid");c.error(l)}finally{N(!1)}}return U?e.jsx("div",{className:"flex justify-center py-20",children:e.jsx("div",{className:"h-5 w-5 animate-spin rounded-full border-2 border-[var(--border)] border-t-[var(--accent)]"})}):e.jsxs("div",{className:"mx-auto max-w-xl space-y-8 px-4 md:px-6 py-8 font-mono lowercase",children:[e.jsxs("h1",{className:"text-lg text-[var(--text-primary)]",children:[r("profile.title")," ",e.jsx("span",{className:"text-[var(--text-muted)]",children:r("profile.personal_settings")})]}),e.jsxs("section",{className:"rounded-[4px] bg-[var(--bg-card)] border border-[var(--border)] p-5",children:[e.jsx("h2",{className:"mb-4 text-sm font-semibold text-[var(--accent)]",children:r("profile.profile_info")}),t?e.jsxs("div",{className:"space-y-2",children:[e.jsx(o,{variant:"fixed-label",label:r("profile.username"),value:t.name}),e.jsx(o,{variant:"fixed-label",label:r("common.role"),value:t.role}),e.jsx(o,{variant:"fixed-label",label:r("profile.git_name"),value:t.gitName||r("common.not_set")}),e.jsx(o,{variant:"fixed-label",label:r("profile.git_email"),value:t.gitEmail||r("common.not_set")}),e.jsx(o,{variant:"fixed-label",label:r("profile.status"),value:t.status}),e.jsx(o,{variant:"fixed-label",label:r("profile.created_at"),value:new Date(t.createdAt).toLocaleDateString()})]}):e.jsx("p",{className:"text-sm text-[var(--text-secondary)]",children:r("profile.unable_to_load_profile")})]}),e.jsxs("section",{className:"rounded-[4px] bg-[var(--bg-card)] border border-[var(--border)] p-5",children:[e.jsx("h2",{className:"mb-4 text-sm font-semibold text-[var(--accent)]",children:r("profile.platform_accounts")}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(o,{variant:"fixed-label",label:"lark",value:(y=t==null?void 0:t.platformUids)!=null&&y.lark?`${t.platformUids.lark.slice(0,12)}... ✓`:r("profile.not_linked")}),e.jsx(o,{variant:"fixed-label",label:"slack",value:(k=t==null?void 0:t.platformUids)!=null&&k.slack?`${t.platformUids.slack.slice(0,12)}... ✓`:r("profile.not_linked")})]}),(!((C=t==null?void 0:t.platformUids)!=null&&C.lark)||!((P=t==null?void 0:t.platformUids)!=null&&P.slack))&&e.jsx("p",{className:"mt-3 text-xs text-[var(--text-muted)]",children:r("profile.bind_hint")})]}),e.jsxs("section",{className:"rounded-[4px] bg-[var(--bg-card)] border border-[var(--border)] p-5",children:[e.jsx("h2",{className:"mb-4 text-sm font-semibold text-[var(--accent)]",children:r("profile.change_password")}),e.jsxs("div",{className:"space-y-4",children:[j&&e.jsx("div",{className:"rounded-[4px] border border-[var(--destructive)] bg-[var(--bg-input)] px-3 py-2 text-sm text-[var(--destructive)]",children:j}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-xs text-[var(--text-secondary)]",children:r("profile.current_password")}),e.jsx("input",{type:"password",value:x,onChange:a=>u(a.target.value),className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-sm text-[var(--text-primary)] outline-none focus:border-[var(--accent)]"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-xs text-[var(--text-secondary)]",children:r("profile.new_password")}),e.jsx("input",{type:"password",value:d,onChange:a=>b(a.target.value),className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-sm text-[var(--text-primary)] outline-none focus:border-[var(--accent)]"}),e.jsx("p",{className:"mt-1 text-xs text-[var(--text-muted)]",children:r("profile.password_hint_10_20")})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-xs text-[var(--text-secondary)]",children:r("profile.confirm_password")}),e.jsx("input",{type:"password",value:f,onChange:a=>v(a.target.value),className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-sm text-[var(--text-primary)] outline-none focus:border-[var(--accent)]"})]}),e.jsx("div",{className:"flex justify-end",children:e.jsx("button",{onClick:O,disabled:g,className:"rounded-[4px] bg-[var(--accent)] px-4 py-2 text-xs font-medium text-black disabled:opacity-50",children:r(g?"common.updating":"profile.update_password")})})]})]}),e.jsxs("section",{className:"rounded-[4px] bg-[var(--bg-card)] border border-[var(--border)] p-5",children:[e.jsx("h2",{className:"mb-4 text-sm font-semibold text-[var(--accent)]",children:r("profile.two_factor_auth")}),e.jsxs("div",{className:"space-y-4",children:[e.jsx("div",{className:"flex items-center gap-2 text-sm",children:t!=null&&t.totpEnabled?e.jsxs("span",{className:"text-[var(--accent)]",children:["● ",r("profile.two_fa_enabled")]}):e.jsxs("span",{className:"text-[var(--text-muted)]",children:["● ",r("profile.two_fa_not_setup")]})}),(t==null?void 0:t.totpEnabled)&&e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:r("profile.regenerate_2fa_warning")}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-xs text-[var(--text-secondary)]",children:r("profile.current_totp_code")}),e.jsx("input",{type:"text",inputMode:"numeric",maxLength:6,placeholder:r("profile.totp_code_placeholder"),value:i,onChange:a=>{const l=a.target.value.replace(/\D/g,"").slice(0,6);_(l)},className:"w-full max-w-xs rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-sm text-[var(--text-primary)] outline-none focus:border-[var(--accent)] font-mono tracking-widest"})]}),e.jsx("div",{className:"flex justify-end",children:e.jsx("button",{onClick:R,disabled:w||i.length!==6,className:"rounded-[4px] border border-[var(--warning)] bg-transparent px-4 py-2 text-xs font-medium text-[var(--warning)] hover:bg-[var(--warning)] hover:text-black disabled:opacity-50 transition-colors",children:r(w?"profile.regenerating":"profile.regenerate_2fa")})})]})]})]}),e.jsxs(z,{to:"/access-tokens",className:"flex items-center gap-3 rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4 transition-colors hover:border-[var(--accent)]",children:[e.jsx(I,{size:16,className:"text-[var(--accent)]"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-[var(--text-primary)]",children:r("profile.access_tokens")}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:r("profile.access_tokens_desc")})]})]}),e.jsxs("button",{onClick:()=>m(!0),className:"flex w-full items-center gap-3 rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4 transition-colors hover:border-[var(--destructive)] text-left",children:[e.jsx($,{size:16,className:"text-[var(--destructive)]"}),e.jsx("span",{className:"text-sm text-[var(--destructive)]",children:r("common.log_out")})]}),e.jsxs("div",{className:"pt-2 pb-4 text-center text-xs text-[var(--text-muted)]",children:["overlord v","1.0.180"]}),e.jsx(K,{isOpen:S,onClose:()=>m(!1),onConfirm:()=>{L(),E("/login")},title:r("common.logout_title"),message:r("common.logout_message"),confirmLabel:r("common.logout"),confirmVariant:"warning"})]})}export{Q as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as R,a as T,j as e,s as q,B,f as K,u as H,i as J,r as x,_ as k,x as V,l as D,$ as z,h}from"./index-
|
|
1
|
+
import{c as R,a as T,j as e,s as q,B,f as K,u as H,i as J,r as x,_ as k,x as V,l as D,$ as z,h}from"./index-0QFy9ku9.js";import{U as P,A as G,R as Q}from"./RemoveMemberConfirmDialog-CHU9g7rJ.js";import{T as X}from"./Tooltip-CAj06OH3.js";import{c as _}from"./date-CmcdoD87.js";import{t as $}from"./status-colors-DlyerwQ7.js";import{I as o}from"./InfoRow-DtLvNV_J.js";import{u as Y}from"./useFetch-BqnEzaSJ.js";import{P as Z}from"./pencil-QmINK6St.js";import{T as ee}from"./trash-2-CYdvAzYO.js";import{A as te}from"./arrow-left-Dsd8akiF.js";import{P as re}from"./plus-D38pnIMa.js";import"./Select-xdty1j0i.js";import"./chevron-down-SeRjAX4r.js";/**
|
|
2
2
|
* @license lucide-react v0.469.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as R,a as P,v as G,r as o,I as x,Q as z,j as e,h as E,f as H,x as M}from"./index-
|
|
1
|
+
import{c as R,a as P,v as G,r as o,I as x,Q as z,j as e,h as E,f as H,x as M}from"./index-0QFy9ku9.js";import{S as U}from"./Select-xdty1j0i.js";import{b as D}from"./agent-type-options-BgAoGQFU.js";import{E as J}from"./EmptyState-DV7LUJer.js";import{T as O}from"./Skeleton-CmBnyd29.js";import{t as q}from"./date-CmcdoD87.js";import{u as W}from"./useFetch-BqnEzaSJ.js";import{P as $}from"./plus-D38pnIMa.js";import{A as K}from"./arrow-left-Dsd8akiF.js";import"./chevron-down-SeRjAX4r.js";/**
|
|
2
2
|
* @license lucide-react v0.469.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var Xr=Object.defineProperty;var jr=(e,t,i)=>t in e?Xr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i;var Oe=(e,t,i)=>jr(e,typeof t!="symbol"?t+"":t,i);import{r as Z,u as Gr,h as Jr,j as Mt}from"./index-
|
|
1
|
+
var Xr=Object.defineProperty;var jr=(e,t,i)=>t in e?Xr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i;var Oe=(e,t,i)=>jr(e,typeof t!="symbol"?t+"":t,i);import{r as Z,u as Gr,h as Jr,j as Mt}from"./index-0QFy9ku9.js";/**
|
|
2
2
|
* Copyright (c) 2014-2024 The xterm.js authors. All rights reserved.
|
|
3
3
|
* @license MIT
|
|
4
4
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as h,r as s,h as b,a9 as v,j as e,C as j}from"./index-
|
|
1
|
+
import{a as h,r as s,h as b,a9 as v,j as e,C as j}from"./index-0QFy9ku9.js";import{C as f}from"./copy-BWTAfZ7b.js";function y({mode:l}){const{t:o}=h(),[n,d]=s.useState([]),[x,c]=s.useState(null),[u,i]=s.useState(!1);s.useEffect(()=>{b.get("web/profile/tokens").json().then(t=>{const r=t.filter(m=>m.status===v.ACTIVE);d(r),r.length>0&&c(r[0].id)}).catch(()=>{})},[]);const a=l==="cli"?"ov login --token <your-token>":'curl -H "authorization: bearer <your-token>" http://localhost:9000/api/web/tasks',p=s.useCallback(()=>{navigator.clipboard.writeText(a),i(!0),setTimeout(()=>i(!1),2e3)},[a]);return n.length===0?null:e.jsxs("div",{className:"mb-8 rounded-[4px] border border-[var(--accent)]/20 bg-[var(--bg-card)] p-4",children:[e.jsxs("div",{className:"mb-3 flex items-center justify-between",children:[e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:o("docs.quick_start_with_token")}),e.jsx("select",{value:x??"",onChange:t=>c(Number(t.target.value)),className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-primary)] px-2 py-1 text-xs text-[var(--text-primary)]",children:n.map(t=>e.jsx("option",{value:t.id,children:t.label},t.id))})]}),e.jsxs("div",{className:"flex items-center justify-between gap-2 rounded-[4px] bg-[var(--bg-primary)] px-3 py-2",children:[e.jsx("code",{className:"text-xs text-[var(--accent)] break-all",children:a}),e.jsx("button",{onClick:p,className:"shrink-0 text-[var(--text-muted)] hover:text-[var(--text-primary)] transition-colors",children:u?e.jsx(j,{size:14}):e.jsx(f,{size:14})})]}),e.jsx("p",{className:"mt-2 text-[11px] text-[var(--text-muted)]",children:o("docs.replace_token_hint")})]})}export{y as Q};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as R,a as _,v as w,r as a,_ as c,j as e,X as C,V as D,h as g,s as I}from"./index-
|
|
1
|
+
import{c as R,a as _,v as w,r as a,_ as c,j as e,X as C,V as D,h as g,s as I}from"./index-0QFy9ku9.js";import{S as N}from"./Select-xdty1j0i.js";/**
|
|
2
2
|
* @license lucide-react v0.469.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as xe,B as me,f as ue,a as Z,k as pe,r,h as _,j as e,L as ve,Y as H,Z as be,t as j,o as p,b as ge,Q as he,X as fe}from"./index-
|
|
1
|
+
import{c as xe,B as me,f as ue,a as Z,k as pe,r,h as _,j as e,L as ve,Y as H,Z as be,t as j,o as p,b as ge,Q as he,X as fe}from"./index-0QFy9ku9.js";import{P as je}from"./PtyTerminal-DWRVuu-D.js";import{T as Ne}from"./Skeleton-CmBnyd29.js";import{C as K}from"./Checkbox-ksCSqTDb.js";import{f as we,b as ye}from"./date-CmcdoD87.js";import{b as Se}from"./agent-type-options-BgAoGQFU.js";import{T as z,g as q}from"./task-constants-D5ty4qUR.js";import{A as ke}from"./arrow-left-Dsd8akiF.js";import{L as Ce}from"./loader-circle-OCqj772N.js";import{P as Q}from"./play-CUByBpQ0.js";import{S as Te}from"./skip-forward-DcSN0O55.js";import{R as Re}from"./rotate-ccw-BsCb3qU2.js";import{C as Ae}from"./chevron-up-D_UYsCj8.js";import{C as Ee}from"./chevron-down-SeRjAX4r.js";import{C as De}from"./circle-alert-WAD2ix0l.js";/**
|
|
2
2
|
* @license lucide-react v0.469.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as w,f as k,k as F,r,x as K,j as e,h as N,o as m,E,l as B,X as T,H,t as y,Q}from"./index-Dh1GMLID.js";import{p as q}from"./developer-options-PMfL5Zv7.js";import{E as D}from"./EmptyState-CMDagsi4.js";import{T as L}from"./Skeleton-DaeQHyTP.js";import{C as z}from"./Checkbox-CQt3GUhI.js";import{S as C}from"./Select-LGk_EawR.js";import{f as P}from"./date-CmcdoD87.js";import{T as A}from"./Tooltip-DjIk-pqB.js";import{a as J}from"./agent-type-options-BpMI3Naw.js";import{g as X}from"./task-constants-DfpO4NY9.js";import{P as Z}from"./plus-Cn46sPb9.js";import{P as R}from"./play-DX-9yzZV.js";import{C as V}from"./chevron-left-BPO7Bb6l.js";import{C as W}from"./chevron-right-DHCIokyJ.js";import"./chevron-down-BOgq_PNA.js";function $(){const[s,i]=r.useState(void 0),[t,a]=r.useState(void 0),[p,n]=r.useState([]),b=r.useRef(void 0),u=r.useRef(void 0);b.current=s,u.current=t;const f=r.useCallback(c=>{i(c)},[]),x=r.useCallback(()=>{const c=b.current;c&&(n(j=>[...j,u.current??""]),a(c))},[]),g=r.useRef([]);g.current=p;const d=r.useCallback(()=>{const c=g.current;c.length!==0&&(a(c.at(-1)||void 0),n(c.slice(0,-1)))},[]),v=p.length+1,l=p.length>0;return{cursor:t,setNextCursor:f,goNext:x,goPrev:d,pageNumber:v,hasPrev:l,hasNext:!!s}}const I=20;function Y(s){switch(s){case m.RUNNING:return"bg-[var(--accent)]";case m.QUEUED:return"bg-[var(--warning)]";case m.ASSIGNED:return"bg-[var(--info)]";case m.SUSPENDED:return"bg-[var(--warning)]";case m.COMPLETED:return"bg-[var(--accent)]";case m.FAILED:return"bg-[var(--destructive)]";case m.CANCELLED:return"bg-[#525252]";default:return"bg-[#525252]"}}const ee=J(X);function se({taskId:s,onClose:i,onLaunched:t}){const{t:a}=w(),[p,n]=r.useState([Q.CLAUDE]),[b,u]=r.useState(""),[f,x]=r.useState(""),[g,d]=r.useState(!1);function v(o){n(c=>c.includes(o)?c.filter(j=>j!==o):[...c,o])}async function l(){if(p.length===0){y.error("select at least one review agent.");return}d(!0);try{await N.post(`web/tasks/${s}/review`,{json:{agentTypes:p,description:b.trim()||void 0,issueRef:f.trim()||void 0}}),y.success("review launched"),t(),i()}catch(o){const c=o instanceof Error?o.message:String(o);y.error(c)}finally{d(!1)}}return e.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4",children:e.jsxs("div",{className:"w-full max-w-sm rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-5 font-mono",children:[e.jsxs("div",{className:"mb-4 flex items-center justify-between",children:[e.jsx("span",{className:"text-sm font-bold text-[var(--text-primary)]",children:a("review.launch")}),e.jsx("button",{onClick:i,className:"text-[var(--text-muted)] hover:text-[var(--text-primary)] transition-colors",children:e.jsx(T,{className:"h-4 w-4"})})]}),e.jsxs("p",{className:"mb-3 text-[11px] text-[var(--text-muted)]",children:["task #",s," — ",a("review.select_agents")]}),e.jsx("div",{className:"mb-4 flex flex-col gap-2",children:ee.map(o=>e.jsx(z,{checked:p.includes(o.value),onCheckedChange:()=>v(o.value),label:o.label,containerClassName:"w-full gap-2.5 rounded-[4px] border border-[var(--border)] px-3 py-2 hover:bg-[var(--bg-input)] transition-colors"},o.value))}),e.jsx("textarea",{value:b,onChange:o=>u(o.target.value),placeholder:a("review.description_placeholder"),rows:3,className:"mb-3 w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] placeholder:text-[var(--text-muted)] outline-none focus:border-[var(--accent)] resize-none"}),e.jsx("input",{value:f,onChange:o=>x(o.target.value),placeholder:"--ref: Figma/Jira/Sentry URL",className:"mb-4 w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] placeholder:text-[var(--text-muted)] outline-none focus:border-[var(--accent)]"}),e.jsxs("div",{className:"flex gap-2",children:[e.jsxs("button",{onClick:l,disabled:g||p.length===0,className:"flex flex-1 items-center justify-center gap-1.5 rounded-[4px] bg-[var(--accent)] px-4 py-2 text-xs font-bold text-black disabled:opacity-40 disabled:cursor-not-allowed",children:[e.jsx(R,{className:"h-3 w-3"}),a(g?"common.processing":"review.launch")]}),e.jsx("button",{onClick:i,className:"rounded-[4px] border border-[var(--border)] px-4 py-2 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)] transition-colors",children:a("common.cancel")})]})]})})}function _({pag:s}){const{t:i}=w();return!s.hasPrev&&!s.hasNext?null:e.jsxs("div",{className:"mt-6 flex items-center justify-between",children:[e.jsxs("span",{className:"text-xs text-[var(--text-muted)]",children:["// page ",s.pageNumber]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsxs("button",{onClick:s.goPrev,disabled:!s.hasPrev,className:"flex items-center gap-1 rounded-[4px] border border-[var(--border)] px-2.5 py-1 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)] hover:border-[var(--accent)] disabled:opacity-30 disabled:cursor-not-allowed transition-colors",children:[e.jsx(V,{className:"h-3.5 w-3.5"}),i("tasks.prev")]}),e.jsxs("button",{onClick:s.goNext,disabled:!s.hasNext,className:"flex items-center gap-1 rounded-[4px] border border-[var(--border)] px-2.5 py-1 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)] hover:border-[var(--accent)] disabled:opacity-30 disabled:cursor-not-allowed transition-colors",children:[i("common.next"),e.jsx(W,{className:"h-3.5 w-3.5"})]})]})]})}function te({onRefresh:s,projectFilter:i,developerFilter:t}){const{t:a}=w(),p=k(),[n,b]=r.useState([]),[u,f]=r.useState(!0),[x,g]=r.useState(null),d=$(),v=r.useCallback(async l=>{f(!0);try{const o=new Date(Date.now()-6048e5).toISOString(),c=new URLSearchParams({status:m.COMPLETED,taskMode:"develop",reviewStatus:"null",completedAfter:o,limit:String(I)});i&&c.set("projectKey",i),t&&c.set("developerId",t),l&&c.set("cursor",l);const j=await N.get(`web/tasks?${c}`).json();b(j.data??[]),d.setNextCursor(j.nextCursor)}catch{b([]),d.setNextCursor(void 0)}finally{f(!1)}},[i,t]);return r.useEffect(()=>{v(d.cursor)},[v,d.cursor]),u&&n.length===0?e.jsx("div",{className:"p-4",children:e.jsx(L,{rows:4})}):!u&&n.length===0&&!d.hasPrev?e.jsx(D,{icon:E,title:a("review.no_reviews"),description:a("review.pending")}):e.jsxs(e.Fragment,{children:[n.length>0&&e.jsx("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)]",children:n.map(l=>e.jsxs("div",{className:"flex flex-col gap-1 border-b border-[var(--border)] px-4 py-3 last:border-b-0",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"h-2 w-2 shrink-0 rounded-full bg-[var(--accent)]"}),e.jsx(A,{content:l.description,className:"flex-1 min-w-0",children:e.jsxs("span",{className:"cursor-pointer truncate text-xs text-[var(--text-primary)] hover:text-[var(--accent)] transition-colors block preserve-case",onClick:()=>p(`/tasks/${l.id}`),children:["#",l.id," ",B(l)]})}),e.jsx("button",{onClick:async()=>{try{await N.post(`web/tasks/${l.id}/review-status`,{json:{reviewStatus:"dismissed"}}),v(d.cursor)}catch(o){let c="Failed to dismiss";try{if(o instanceof H){const j=await o.response.json();c=(j==null?void 0:j.message)??c}else o instanceof Error&&(c=o.message)}catch{}y.error(c)}},className:"shrink-0 flex items-center rounded-[4px] p-1.5 text-[var(--text-muted)] hover:text-[var(--text-primary)] transition-colors","aria-label":"dismiss",children:e.jsx(T,{className:"h-3.5 w-3.5"})}),e.jsxs("button",{onClick:()=>g(l.id),className:"shrink-0 flex items-center gap-1.5 rounded-[4px] px-3 py-1.5 text-[11px] font-medium text-[var(--accent)]",style:{backgroundColor:"rgba(34,197,94,0.12)"},children:[e.jsx(R,{className:"h-3 w-3"}),e.jsx("span",{className:"hidden md:inline",children:a("review.launch_short")})]})]}),e.jsxs("div",{className:"flex items-center gap-2 pl-5 text-[11px] text-[var(--text-muted)] min-w-0",children:[e.jsx("span",{className:"shrink-0",children:P(l.completedAt??l.createdAt)}),e.jsx("span",{className:"shrink-0",children:"·"}),e.jsx("span",{className:"shrink-0",children:l.projectKey}),l.workerName&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"shrink-0",children:"·"}),e.jsx("span",{className:"truncate",children:l.workerName})]})]})]},l.id))}),e.jsx(_,{pag:d}),x!==null&&e.jsx(se,{taskId:x,onClose:()=>g(null),onLaunched:()=>{s(),v(d.cursor)}})]})}function re(s){const i=new Map;for(const t of s){const a=t.sourceTaskId??t.id;i.has(a)||i.set(a,[]),i.get(a).push(t)}return Array.from(i.entries()).map(([t,a])=>({sourceTaskId:t,tasks:a}))}function ae({group:s,onClick:i}){const t=s.tasks[0],a=s.tasks.every(n=>n.status===m.COMPLETED||n.status===m.FAILED||n.status===m.CANCELLED),p=t==null?void 0:t.sourceCommitSha;return e.jsxs("div",{onClick:i,className:"flex cursor-pointer items-center gap-3 border-b border-[var(--border)] px-4 py-3 last:border-b-0 hover:bg-[var(--bg-input)] transition-colors",children:[e.jsx("span",{className:`h-2 w-2 shrink-0 rounded-full ${a?"bg-[var(--accent)]":"bg-[var(--warning)]"}`}),e.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[e.jsxs("div",{className:"flex items-center gap-1.5 min-w-0",children:[e.jsx(A,{content:(t==null?void 0:t.sourceTaskDescription)??(t==null?void 0:t.description),className:"truncate",children:e.jsxs("span",{className:"truncate text-xs text-[var(--text-primary)]",children:["source #",s.sourceTaskId]})}),p&&e.jsxs("span",{className:"shrink-0 font-mono text-[11px] text-[var(--accent)]",children:["@",p.slice(0,7)]})]}),e.jsxs("span",{className:"text-[11px] text-[var(--text-muted)]",children:[s.tasks.length," ",s.tasks.length===1?"agent":"agents"," · ",s.tasks.map(n=>(n.agentType??"claude").toLowerCase()).join(", ")]})]}),t&&e.jsx("span",{className:"shrink-0 rounded-[4px] border border-[var(--border)] px-2 py-0.5 text-[11px] text-[var(--text-muted)]",children:t.projectKey}),t&&e.jsx("span",{className:"shrink-0 text-[11px] text-[var(--text-muted)]",children:P(t.createdAt)}),e.jsx("div",{className:"flex shrink-0 items-center gap-1",children:s.tasks.map(n=>e.jsx("span",{className:`h-2 w-2 rounded-full ${Y(n.status)}`,title:n.status.toLowerCase()},n.id))})]})}function S({mode:s,projectFilter:i,developerFilter:t}){const{t:a}=w(),p=k(),[n,b]=r.useState([]),[u,f]=r.useState(!0),x=$(),g=r.useCallback(async d=>{f(!0);try{const v=new URLSearchParams({taskMode:"review",limit:String(I),groupBySource:"true"});s==="in_progress"?v.set("status",[m.QUEUED,m.ASSIGNED,m.RUNNING,m.SUSPENDED].join(",")):v.set("status",[m.COMPLETED,m.FAILED,m.CANCELLED].join(",")),i&&v.set("projectKey",i),t&&v.set("sourceDeveloperId",t),d&&v.set("cursor",d);const l=await N.get(`web/tasks?${v}`).json();b(re(l.data??[])),x.setNextCursor(l.nextCursor??void 0)}catch{b([]),x.setNextCursor(void 0)}finally{f(!1)}},[s,i,t]);return r.useEffect(()=>{g(x.cursor)},[g,x.cursor]),u&&n.length===0?e.jsx("div",{className:"p-4",children:e.jsx(L,{rows:4})}):!u&&n.length===0&&!x.hasPrev?e.jsx(D,{icon:E,title:a("review.no_reviews")}):e.jsxs(e.Fragment,{children:[n.length>0&&e.jsx("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)]",children:n.map(d=>e.jsx(ae,{group:d,onClick:()=>p(`/review/${d.sourceTaskId}`)},d.sourceTaskId))}),e.jsx(_,{pag:x})]})}function Ne(){const{t:s}=w(),i=k(),t=F(h=>h.taskSeq),[a,p]=r.useState("pending"),[n,b]=r.useState(0),[u,f]=r.useState(""),[x,g]=r.useState(""),[d,v]=r.useState([]),[l,o]=r.useState([]);K(null);const c=r.useCallback(()=>b(h=>h+1),[]);r.useEffect(()=>{let h=!1;return(async()=>{try{const[M,G]=await Promise.all([N.get("web/projects").json(),N.get("web/projects/-/developers").json()]);if(h)return;v(M),o(G)}catch{}})(),()=>{h=!0}},[]);const j=r.useMemo(()=>[{value:"",label:s("tasks.filter_project")},...d.map(h=>({value:h.key,label:h.name}))],[d,s]),O=r.useMemo(()=>[{value:"",label:s("tasks.filter_developer")},...q(l)],[l,s]),U=[{key:"pending",label:s("review.pending")},{key:"in_progress",label:s("review.in_progress")},{key:"history",label:s("review.history")}];return e.jsxs("div",{className:"mx-auto max-w-6xl px-2 py-4 md:px-4 md:py-6 font-mono",children:[e.jsx("h1",{className:"sr-only",children:s("review.title")}),e.jsxs("div",{className:"mb-4 flex flex-col gap-3 md:gap-4 md:flex-row md:items-center",children:[e.jsxs("div",{className:"flex items-center gap-1 overflow-x-auto pb-1 md:pb-0 no-scrollbar",children:[U.map(h=>e.jsx("button",{onClick:()=>p(h.key),className:`shrink-0 rounded-[4px] px-3 py-2 h-8 text-xs transition-colors ${a===h.key?"text-[var(--accent)] bg-[var(--bg-input)]":"text-[var(--text-muted)] bg-[var(--bg-card)] hover:text-[var(--text-secondary)]"}`,children:h.label},h.key)),e.jsxs("button",{onClick:()=>i("/plan"),className:"shrink-0 flex items-center gap-1 rounded-[4px] px-3 py-2 h-8 text-xs text-[var(--text-muted)] hover:text-[var(--accent)] transition-colors",children:[e.jsx(Z,{className:"h-3 w-3"}),s("plan.title")]})]}),e.jsxs("div",{className:"flex flex-col gap-2 md:ml-auto md:flex-row md:items-center",children:[e.jsx(C,{value:u,onChange:f,options:j,className:"md:w-40"}),e.jsx(C,{value:x,onChange:g,options:O,className:"md:w-40"})]})]}),a==="pending"&&e.jsx(te,{onRefresh:c,projectFilter:u,developerFilter:x},`pending-${n}-${t}-${u}-${x}`),a==="in_progress"&&e.jsx(S,{mode:"in_progress",projectFilter:u,developerFilter:x},`inprogress-${n}-${t}-${u}-${x}`),a==="history"&&e.jsx(S,{mode:"history",projectFilter:u,developerFilter:x},`history-${n}-${t}-${u}-${x}`)]})}export{Ne as default};
|
|
1
|
+
import{a as w,f as k,k as F,r,x as K,j as e,h as N,o as m,E,l as B,X as T,H,t as y,Q}from"./index-0QFy9ku9.js";import{p as q}from"./developer-options-Czaxdx-w.js";import{E as D}from"./EmptyState-DV7LUJer.js";import{T as L}from"./Skeleton-CmBnyd29.js";import{C as z}from"./Checkbox-ksCSqTDb.js";import{S as C}from"./Select-xdty1j0i.js";import{f as P}from"./date-CmcdoD87.js";import{T as A}from"./Tooltip-CAj06OH3.js";import{b as J}from"./agent-type-options-BgAoGQFU.js";import{g as X}from"./task-constants-D5ty4qUR.js";import{P as Z}from"./plus-D38pnIMa.js";import{P as R}from"./play-CUByBpQ0.js";import{C as V}from"./chevron-left-BvZWPLc1.js";import{C as W}from"./chevron-right-Dirw-Ueo.js";import"./chevron-down-SeRjAX4r.js";function $(){const[s,i]=r.useState(void 0),[t,a]=r.useState(void 0),[p,n]=r.useState([]),b=r.useRef(void 0),u=r.useRef(void 0);b.current=s,u.current=t;const f=r.useCallback(c=>{i(c)},[]),x=r.useCallback(()=>{const c=b.current;c&&(n(j=>[...j,u.current??""]),a(c))},[]),g=r.useRef([]);g.current=p;const d=r.useCallback(()=>{const c=g.current;c.length!==0&&(a(c.at(-1)||void 0),n(c.slice(0,-1)))},[]),v=p.length+1,l=p.length>0;return{cursor:t,setNextCursor:f,goNext:x,goPrev:d,pageNumber:v,hasPrev:l,hasNext:!!s}}const I=20;function Y(s){switch(s){case m.RUNNING:return"bg-[var(--accent)]";case m.QUEUED:return"bg-[var(--warning)]";case m.ASSIGNED:return"bg-[var(--info)]";case m.SUSPENDED:return"bg-[var(--warning)]";case m.COMPLETED:return"bg-[var(--accent)]";case m.FAILED:return"bg-[var(--destructive)]";case m.CANCELLED:return"bg-[#525252]";default:return"bg-[#525252]"}}const ee=J(X);function se({taskId:s,onClose:i,onLaunched:t}){const{t:a}=w(),[p,n]=r.useState([Q.CLAUDE]),[b,u]=r.useState(""),[f,x]=r.useState(""),[g,d]=r.useState(!1);function v(o){n(c=>c.includes(o)?c.filter(j=>j!==o):[...c,o])}async function l(){if(p.length===0){y.error("select at least one review agent.");return}d(!0);try{await N.post(`web/tasks/${s}/review`,{json:{agentTypes:p,description:b.trim()||void 0,issueRef:f.trim()||void 0}}),y.success("review launched"),t(),i()}catch(o){const c=o instanceof Error?o.message:String(o);y.error(c)}finally{d(!1)}}return e.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4",children:e.jsxs("div",{className:"w-full max-w-sm rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-5 font-mono",children:[e.jsxs("div",{className:"mb-4 flex items-center justify-between",children:[e.jsx("span",{className:"text-sm font-bold text-[var(--text-primary)]",children:a("review.launch")}),e.jsx("button",{onClick:i,className:"text-[var(--text-muted)] hover:text-[var(--text-primary)] transition-colors",children:e.jsx(T,{className:"h-4 w-4"})})]}),e.jsxs("p",{className:"mb-3 text-[11px] text-[var(--text-muted)]",children:["task #",s," — ",a("review.select_agents")]}),e.jsx("div",{className:"mb-4 flex flex-col gap-2",children:ee.map(o=>e.jsx(z,{checked:p.includes(o.value),onCheckedChange:()=>v(o.value),label:o.label,containerClassName:"w-full gap-2.5 rounded-[4px] border border-[var(--border)] px-3 py-2 hover:bg-[var(--bg-input)] transition-colors"},o.value))}),e.jsx("textarea",{value:b,onChange:o=>u(o.target.value),placeholder:a("review.description_placeholder"),rows:3,className:"mb-3 w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] placeholder:text-[var(--text-muted)] outline-none focus:border-[var(--accent)] resize-none"}),e.jsx("input",{value:f,onChange:o=>x(o.target.value),placeholder:"--ref: Figma/Jira/Sentry URL",className:"mb-4 w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] placeholder:text-[var(--text-muted)] outline-none focus:border-[var(--accent)]"}),e.jsxs("div",{className:"flex gap-2",children:[e.jsxs("button",{onClick:l,disabled:g||p.length===0,className:"flex flex-1 items-center justify-center gap-1.5 rounded-[4px] bg-[var(--accent)] px-4 py-2 text-xs font-bold text-black disabled:opacity-40 disabled:cursor-not-allowed",children:[e.jsx(R,{className:"h-3 w-3"}),a(g?"common.processing":"review.launch")]}),e.jsx("button",{onClick:i,className:"rounded-[4px] border border-[var(--border)] px-4 py-2 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)] transition-colors",children:a("common.cancel")})]})]})})}function _({pag:s}){const{t:i}=w();return!s.hasPrev&&!s.hasNext?null:e.jsxs("div",{className:"mt-6 flex items-center justify-between",children:[e.jsxs("span",{className:"text-xs text-[var(--text-muted)]",children:["// page ",s.pageNumber]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsxs("button",{onClick:s.goPrev,disabled:!s.hasPrev,className:"flex items-center gap-1 rounded-[4px] border border-[var(--border)] px-2.5 py-1 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)] hover:border-[var(--accent)] disabled:opacity-30 disabled:cursor-not-allowed transition-colors",children:[e.jsx(V,{className:"h-3.5 w-3.5"}),i("tasks.prev")]}),e.jsxs("button",{onClick:s.goNext,disabled:!s.hasNext,className:"flex items-center gap-1 rounded-[4px] border border-[var(--border)] px-2.5 py-1 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)] hover:border-[var(--accent)] disabled:opacity-30 disabled:cursor-not-allowed transition-colors",children:[i("common.next"),e.jsx(W,{className:"h-3.5 w-3.5"})]})]})]})}function te({onRefresh:s,projectFilter:i,developerFilter:t}){const{t:a}=w(),p=k(),[n,b]=r.useState([]),[u,f]=r.useState(!0),[x,g]=r.useState(null),d=$(),v=r.useCallback(async l=>{f(!0);try{const o=new Date(Date.now()-6048e5).toISOString(),c=new URLSearchParams({status:m.COMPLETED,taskMode:"develop",reviewStatus:"null",completedAfter:o,limit:String(I)});i&&c.set("projectKey",i),t&&c.set("developerId",t),l&&c.set("cursor",l);const j=await N.get(`web/tasks?${c}`).json();b(j.data??[]),d.setNextCursor(j.nextCursor)}catch{b([]),d.setNextCursor(void 0)}finally{f(!1)}},[i,t]);return r.useEffect(()=>{v(d.cursor)},[v,d.cursor]),u&&n.length===0?e.jsx("div",{className:"p-4",children:e.jsx(L,{rows:4})}):!u&&n.length===0&&!d.hasPrev?e.jsx(D,{icon:E,title:a("review.no_reviews"),description:a("review.pending")}):e.jsxs(e.Fragment,{children:[n.length>0&&e.jsx("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)]",children:n.map(l=>e.jsxs("div",{className:"flex flex-col gap-1 border-b border-[var(--border)] px-4 py-3 last:border-b-0",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"h-2 w-2 shrink-0 rounded-full bg-[var(--accent)]"}),e.jsx(A,{content:l.description,className:"flex-1 min-w-0",children:e.jsxs("span",{className:"cursor-pointer truncate text-xs text-[var(--text-primary)] hover:text-[var(--accent)] transition-colors block preserve-case",onClick:()=>p(`/tasks/${l.id}`),children:["#",l.id," ",B(l)]})}),e.jsx("button",{onClick:async()=>{try{await N.post(`web/tasks/${l.id}/review-status`,{json:{reviewStatus:"dismissed"}}),v(d.cursor)}catch(o){let c="Failed to dismiss";try{if(o instanceof H){const j=await o.response.json();c=(j==null?void 0:j.message)??c}else o instanceof Error&&(c=o.message)}catch{}y.error(c)}},className:"shrink-0 flex items-center rounded-[4px] p-1.5 text-[var(--text-muted)] hover:text-[var(--text-primary)] transition-colors","aria-label":"dismiss",children:e.jsx(T,{className:"h-3.5 w-3.5"})}),e.jsxs("button",{onClick:()=>g(l.id),className:"shrink-0 flex items-center gap-1.5 rounded-[4px] px-3 py-1.5 text-[11px] font-medium text-[var(--accent)]",style:{backgroundColor:"rgba(34,197,94,0.12)"},children:[e.jsx(R,{className:"h-3 w-3"}),e.jsx("span",{className:"hidden md:inline",children:a("review.launch_short")})]})]}),e.jsxs("div",{className:"flex items-center gap-2 pl-5 text-[11px] text-[var(--text-muted)] min-w-0",children:[e.jsx("span",{className:"shrink-0",children:P(l.completedAt??l.createdAt)}),e.jsx("span",{className:"shrink-0",children:"·"}),e.jsx("span",{className:"shrink-0",children:l.projectKey}),l.workerName&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"shrink-0",children:"·"}),e.jsx("span",{className:"truncate",children:l.workerName})]})]})]},l.id))}),e.jsx(_,{pag:d}),x!==null&&e.jsx(se,{taskId:x,onClose:()=>g(null),onLaunched:()=>{s(),v(d.cursor)}})]})}function re(s){const i=new Map;for(const t of s){const a=t.sourceTaskId??t.id;i.has(a)||i.set(a,[]),i.get(a).push(t)}return Array.from(i.entries()).map(([t,a])=>({sourceTaskId:t,tasks:a}))}function ae({group:s,onClick:i}){const t=s.tasks[0],a=s.tasks.every(n=>n.status===m.COMPLETED||n.status===m.FAILED||n.status===m.CANCELLED),p=t==null?void 0:t.sourceCommitSha;return e.jsxs("div",{onClick:i,className:"flex cursor-pointer items-center gap-3 border-b border-[var(--border)] px-4 py-3 last:border-b-0 hover:bg-[var(--bg-input)] transition-colors",children:[e.jsx("span",{className:`h-2 w-2 shrink-0 rounded-full ${a?"bg-[var(--accent)]":"bg-[var(--warning)]"}`}),e.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[e.jsxs("div",{className:"flex items-center gap-1.5 min-w-0",children:[e.jsx(A,{content:(t==null?void 0:t.sourceTaskDescription)??(t==null?void 0:t.description),className:"truncate",children:e.jsxs("span",{className:"truncate text-xs text-[var(--text-primary)]",children:["source #",s.sourceTaskId]})}),p&&e.jsxs("span",{className:"shrink-0 font-mono text-[11px] text-[var(--accent)]",children:["@",p.slice(0,7)]})]}),e.jsxs("span",{className:"text-[11px] text-[var(--text-muted)]",children:[s.tasks.length," ",s.tasks.length===1?"agent":"agents"," · ",s.tasks.map(n=>(n.agentType??"claude").toLowerCase()).join(", ")]})]}),t&&e.jsx("span",{className:"shrink-0 rounded-[4px] border border-[var(--border)] px-2 py-0.5 text-[11px] text-[var(--text-muted)]",children:t.projectKey}),t&&e.jsx("span",{className:"shrink-0 text-[11px] text-[var(--text-muted)]",children:P(t.createdAt)}),e.jsx("div",{className:"flex shrink-0 items-center gap-1",children:s.tasks.map(n=>e.jsx("span",{className:`h-2 w-2 rounded-full ${Y(n.status)}`,title:n.status.toLowerCase()},n.id))})]})}function S({mode:s,projectFilter:i,developerFilter:t}){const{t:a}=w(),p=k(),[n,b]=r.useState([]),[u,f]=r.useState(!0),x=$(),g=r.useCallback(async d=>{f(!0);try{const v=new URLSearchParams({taskMode:"review",limit:String(I),groupBySource:"true"});s==="in_progress"?v.set("status",[m.QUEUED,m.ASSIGNED,m.RUNNING,m.SUSPENDED].join(",")):v.set("status",[m.COMPLETED,m.FAILED,m.CANCELLED].join(",")),i&&v.set("projectKey",i),t&&v.set("sourceDeveloperId",t),d&&v.set("cursor",d);const l=await N.get(`web/tasks?${v}`).json();b(re(l.data??[])),x.setNextCursor(l.nextCursor??void 0)}catch{b([]),x.setNextCursor(void 0)}finally{f(!1)}},[s,i,t]);return r.useEffect(()=>{g(x.cursor)},[g,x.cursor]),u&&n.length===0?e.jsx("div",{className:"p-4",children:e.jsx(L,{rows:4})}):!u&&n.length===0&&!x.hasPrev?e.jsx(D,{icon:E,title:a("review.no_reviews")}):e.jsxs(e.Fragment,{children:[n.length>0&&e.jsx("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)]",children:n.map(d=>e.jsx(ae,{group:d,onClick:()=>p(`/review/${d.sourceTaskId}`)},d.sourceTaskId))}),e.jsx(_,{pag:x})]})}function Ne(){const{t:s}=w(),i=k(),t=F(h=>h.taskSeq),[a,p]=r.useState("pending"),[n,b]=r.useState(0),[u,f]=r.useState(""),[x,g]=r.useState(""),[d,v]=r.useState([]),[l,o]=r.useState([]);K(null);const c=r.useCallback(()=>b(h=>h+1),[]);r.useEffect(()=>{let h=!1;return(async()=>{try{const[M,G]=await Promise.all([N.get("web/projects").json(),N.get("web/projects/-/developers").json()]);if(h)return;v(M),o(G)}catch{}})(),()=>{h=!0}},[]);const j=r.useMemo(()=>[{value:"",label:s("tasks.filter_project")},...d.map(h=>({value:h.key,label:h.name}))],[d,s]),O=r.useMemo(()=>[{value:"",label:s("tasks.filter_developer")},...q(l)],[l,s]),U=[{key:"pending",label:s("review.pending")},{key:"in_progress",label:s("review.in_progress")},{key:"history",label:s("review.history")}];return e.jsxs("div",{className:"mx-auto max-w-6xl px-2 py-4 md:px-4 md:py-6 font-mono",children:[e.jsx("h1",{className:"sr-only",children:s("review.title")}),e.jsxs("div",{className:"mb-4 flex flex-col gap-3 md:gap-4 md:flex-row md:items-center",children:[e.jsxs("div",{className:"flex items-center gap-1 overflow-x-auto pb-1 md:pb-0 no-scrollbar",children:[U.map(h=>e.jsx("button",{onClick:()=>p(h.key),className:`shrink-0 rounded-[4px] px-3 py-2 h-8 text-xs transition-colors ${a===h.key?"text-[var(--accent)] bg-[var(--bg-input)]":"text-[var(--text-muted)] bg-[var(--bg-card)] hover:text-[var(--text-secondary)]"}`,children:h.label},h.key)),e.jsxs("button",{onClick:()=>i("/plan"),className:"shrink-0 flex items-center gap-1 rounded-[4px] px-3 py-2 h-8 text-xs text-[var(--text-muted)] hover:text-[var(--accent)] transition-colors",children:[e.jsx(Z,{className:"h-3 w-3"}),s("plan.title")]})]}),e.jsxs("div",{className:"flex flex-col gap-2 md:ml-auto md:flex-row md:items-center",children:[e.jsx(C,{value:u,onChange:f,options:j,className:"md:w-40"}),e.jsx(C,{value:x,onChange:g,options:O,className:"md:w-40"})]})]}),a==="pending"&&e.jsx(te,{onRefresh:c,projectFilter:u,developerFilter:x},`pending-${n}-${t}-${u}-${x}`),a==="in_progress"&&e.jsx(S,{mode:"in_progress",projectFilter:u,developerFilter:x},`inprogress-${n}-${t}-${u}-${x}`),a==="history"&&e.jsx(S,{mode:"history",projectFilter:u,developerFilter:x},`history-${n}-${t}-${u}-${x}`)]})}export{Ne as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as l,j as t}from"./index-
|
|
1
|
+
import{r as l,j as t}from"./index-0QFy9ku9.js";import{C as b}from"./chevron-down-SeRjAX4r.js";function h({value:r,onChange:x,options:c,placeholder:d,disabled:s=!1,className:m=""}){var i;const[a,n]=l.useState(!1),o=l.useRef(null),u=((i=c.find(e=>e.value===r))==null?void 0:i.label)??d??"";return l.useEffect(()=>{function e(v){o.current&&!o.current.contains(v.target)&&n(!1)}return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),t.jsxs("div",{ref:o,className:`relative ${m}`,children:[t.jsxs("button",{type:"button",disabled:s,onClick:()=>!s&&n(!a),"aria-expanded":a,"aria-haspopup":"listbox",className:`flex w-full items-center justify-between rounded-[4px] border bg-[var(--bg-input)] px-3 py-2 font-mono text-xs outline-none transition-colors ${a?"border-[var(--accent)] text-[var(--text-primary)]":"border-[var(--border)] text-[var(--text-primary)] hover:border-[var(--text-muted)]"} ${s?"cursor-not-allowed opacity-50":"cursor-pointer"}`,children:[t.jsx("span",{className:r?"":"text-[var(--text-muted)]",children:u}),t.jsx(b,{size:12,className:`ml-2 shrink-0 text-[var(--text-muted)] transition-transform ${a?"rotate-180":""}`})]}),a&&t.jsx("div",{role:"listbox",className:"absolute right-0 z-50 mt-1 max-h-48 min-w-full w-max max-w-[calc(100vw-2rem)] overflow-auto rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] py-1 shadow-lg",children:c.map(e=>t.jsxs("div",{children:[e.separator&&t.jsx("div",{className:"my-1 border-t border-[var(--border)]"}),t.jsxs("button",{type:"button",role:"option","aria-selected":e.value===r,onClick:()=>{x(e.value),n(!1)},className:`flex w-full items-center px-3 py-1.5 text-left font-mono text-xs transition-colors ${e.value===r?"bg-[var(--accent)]/10 text-[var(--accent)]":"text-[var(--text-secondary)] hover:bg-[var(--bg-input)] hover:text-[var(--text-primary)]"}`,children:[e.value===r&&t.jsx("span",{className:"mr-2 text-[var(--accent)]",children:">"}),e.label]})]},e.value))})]})}export{h as S};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e}from"./index-
|
|
1
|
+
import{j as e}from"./index-0QFy9ku9.js";const n="rounded-[4px] bg-[var(--border)] animate-pulse";function c({rows:r=5}){const a=[[60,200,80,120],[60,160,100,80],[60,220,70,140],[60,180,90,100],[60,190,110,90]];return e.jsx("div",{className:"flex flex-col gap-3",children:Array.from({length:r}).map((s,l)=>{const t=a[l%a.length];return e.jsx("div",{className:"flex gap-4",children:t.map((i,o)=>e.jsx("div",{className:n,style:{width:i,height:12}},o))},l)})})}function m({cards:r=4}){return e.jsx("div",{className:"grid grid-cols-2 gap-3",children:Array.from({length:r}).map((a,s)=>e.jsx("div",{className:`${n} h-20`},s))})}export{m as C,c as T};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as t,j as e}from"./index-
|
|
1
|
+
import{a as t,j as e}from"./index-0QFy9ku9.js";import{I as c,C as r}from"./DocsPrimitives-CipzCTEu.js";import{E as n}from"./external-link-BesNRyvW.js";import"./copy-BWTAfZ7b.js";const o=[{action:"create tasks",desc:"describe what you want done, overlord dispatches to a worker"},{action:"list & monitor tasks",desc:"check status, read execution logs, track progress"},{action:"cancel & retry tasks",desc:"manage task lifecycle"},{action:"confirm pipeline stages",desc:"approve or provide input for suspended stages"},{action:"manage projects",desc:"list projects, view members"},{action:"check cluster health",desc:"see worker status, online workers, queue depth"},{action:"search",desc:"find tasks, projects, and workers by keyword"},{action:"read notifications",desc:"check and clear your notification inbox"}],d=['create a task in project "frontend" to fix the login page styling',"what tasks are running right now?","show me the logs for task 42","how many workers are online?","cancel task 15"],i=[{name:"claude code",url:"https://claude.com/claude-code"},{name:"cursor",url:"https://cursor.com/cli"},{name:"windsurf",url:"https://windsurf.com"},{name:"codex",url:"https://openai.com/codex"}];function u(){t();const a=typeof window<"u"?window.location.origin:"https://your-server";return e.jsxs("div",{className:"mx-auto max-w-4xl px-4 md:px-6 py-8 font-mono lowercase",children:[e.jsx("div",{className:"mb-8",children:e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"// use overlord from your ai coding assistant — claude code, cursor, windsurf, codex, and more. install the skill and your assistant can create tasks, monitor execution, and manage your fleet."})}),e.jsxs("div",{className:"mb-8 rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4 space-y-3",children:[e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"// install"}),e.jsx(c,{code:"npx skills add overlord-run/skill"})]}),e.jsxs("div",{className:"mb-8 rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4 space-y-3",children:[e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"// configure — set these environment variables"}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsxs("div",{className:"flex items-center justify-between rounded-[4px] bg-[var(--bg-primary)] px-3 py-2 overflow-x-auto",children:[e.jsxs("code",{className:"text-xs text-[var(--text-primary)] whitespace-nowrap",children:[e.jsx("span",{className:"text-[var(--text-muted)]",children:"export "}),"OVERLORD_SERVER=",e.jsx("span",{className:"text-[var(--accent)]",children:a})]}),e.jsx(r,{text:`export OVERLORD_SERVER=${a}`})]}),e.jsxs("div",{className:"flex items-center justify-between rounded-[4px] bg-[var(--bg-primary)] px-3 py-2 overflow-x-auto",children:[e.jsxs("code",{className:"text-xs text-[var(--text-primary)] whitespace-nowrap",children:[e.jsx("span",{className:"text-[var(--text-muted)]",children:"export "}),"OVERLORD_TOKEN=",e.jsx("span",{className:"text-[var(--text-secondary)]",children:"your-token"})]}),e.jsx(r,{text:"export OVERLORD_TOKEN=your-token"})]})]}),e.jsxs("p",{className:"text-[11px] text-[var(--text-muted)]",children:["// create a token at ",e.jsx("a",{href:"/access-tokens",className:"text-[var(--accent)] hover:underline",children:"/access-tokens"})]})]}),e.jsxs("div",{className:"mb-8",children:[e.jsx("h2",{className:"mb-4 text-sm text-[var(--accent)]",children:"> capabilities"}),e.jsx("div",{className:"space-y-2",children:o.map(s=>e.jsxs("div",{className:"flex items-start gap-3 rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] px-4 py-3",children:[e.jsx("span",{className:"shrink-0 text-xs font-medium text-[var(--text-primary)]",children:s.action}),e.jsxs("span",{className:"text-xs text-[var(--text-muted)]",children:["// ",s.desc]})]},s.action))})]}),e.jsxs("div",{className:"mb-8",children:[e.jsx("h2",{className:"mb-4 text-sm text-[var(--accent)]",children:"> example usage"}),e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4 space-y-2",children:[e.jsx("p",{className:"mb-3 text-xs text-[var(--text-muted)]",children:"// just ask your ai agent naturally"}),d.map(s=>e.jsx("div",{className:"rounded-[4px] bg-[var(--bg-primary)] px-3 py-2",children:e.jsxs("code",{className:"text-xs text-[var(--text-secondary)]",children:[e.jsx("span",{className:"text-[var(--accent)]",children:"> "}),s]})},s))]})]}),e.jsxs("div",{className:"mb-8",children:[e.jsx("h2",{className:"mb-4 text-sm text-[var(--accent)]",children:"> compatible tools"}),e.jsx("div",{className:"grid grid-cols-2 gap-2 sm:grid-cols-4",children:i.map(s=>e.jsxs("a",{href:s.url,target:"_blank",rel:"noopener noreferrer",className:"flex items-center justify-center gap-1.5 rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] px-3 py-2.5 text-xs text-[var(--text-primary)] transition-colors hover:border-[var(--accent)]",children:[s.name,e.jsx(n,{className:"h-3 w-3 text-[var(--text-muted)]"})]},s.name))}),e.jsx("p",{className:"mt-2 text-[11px] text-[var(--text-muted)]",children:"// and any ai coding assistant that supports the skills protocol"})]}),e.jsx("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4",children:e.jsxs("p",{className:"text-xs text-[var(--text-muted)]",children:["// open source:"," ",e.jsx("a",{href:"https://github.com/overlord-run/skill",target:"_blank",rel:"noopener noreferrer",className:"text-[var(--accent)] hover:underline",children:"github.com/overlord-run/skill"})]})})]})}export{u as default};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import{c as xe,a as de,r as n,A as P,h,j as e,H as Qt,t as $,s as Le,B as Yt,f as Zt,F as es,p as ts,q as ss,k as gt,o as k,R as as,L as ie,l as bt,m as rs,X as Ee,y as ns,U as ls,G as jt,b as cs,I as Rt,J as is}from"./index-0QFy9ku9.js";import{u as os}from"./task.store-D_nwogGq.js";import{P as Nt}from"./PtyTerminal-DWRVuu-D.js";import{C as yt}from"./ConfirmStageDialog-pT-iA956.js";import{C as oe}from"./Checkbox-ksCSqTDb.js";import{S as kt}from"./Select-xdty1j0i.js";import{b as xs,f as Y,c as ds}from"./date-CmcdoD87.js";import{a as Dt}from"./status-colors-DlyerwQ7.js";import{g as we,H as ms}from"./task-agent-Cgyq_UGX.js";import{a as wt,b as _t}from"./agent-type-options-BgAoGQFU.js";import{T as ps,g as Z}from"./task-constants-D5ty4qUR.js";import{T as us}from"./Tooltip-CAj06OH3.js";import{A as hs}from"./arrow-left-Dsd8akiF.js";import{R as At}from"./rotate-ccw-BsCb3qU2.js";import{G as fs}from"./git-fork-_pBPs-xc.js";import{P as Ct}from"./play-CUByBpQ0.js";import{E as _e}from"./external-link-BesNRyvW.js";import{L as Pt}from"./loader-circle-OCqj772N.js";import{S as vs}from"./skip-forward-DcSN0O55.js";import"./clock-oJUEgAKB.js";import"./chevron-down-SeRjAX4r.js";/**
|
|
2
|
+
* @license lucide-react v0.469.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const gs=xe("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
|
|
7
|
+
* @license lucide-react v0.469.0 - ISC
|
|
8
|
+
*
|
|
9
|
+
* This source code is licensed under the ISC license.
|
|
10
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
+
*/const bs=xe("ListOrdered",[["path",{d:"M10 12h11",key:"6m4ad9"}],["path",{d:"M10 18h11",key:"11hvi2"}],["path",{d:"M10 6h11",key:"c7qv1k"}],["path",{d:"M4 10h2",key:"16xx2s"}],["path",{d:"M4 6h1v4",key:"cnovpq"}],["path",{d:"M6 18H4c0-1 2-2 2-3s-1-1.5-2-1",key:"m9a95d"}]]);/**
|
|
12
|
+
* @license lucide-react v0.469.0 - ISC
|
|
13
|
+
*
|
|
14
|
+
* This source code is licensed under the ISC license.
|
|
15
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
16
|
+
*/const js=xe("Maximize2",[["polyline",{points:"15 3 21 3 21 9",key:"mznyad"}],["polyline",{points:"9 21 3 21 3 15",key:"1avn1i"}],["line",{x1:"21",x2:"14",y1:"3",y2:"10",key:"ota7mn"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);/**
|
|
17
|
+
* @license lucide-react v0.469.0 - ISC
|
|
18
|
+
*
|
|
19
|
+
* This source code is licensed under the ISC license.
|
|
20
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
21
|
+
*/const Ns=xe("Minimize2",[["polyline",{points:"4 14 10 14 10 20",key:"11kfnr"}],["polyline",{points:"20 10 14 10 14 4",key:"rlmsce"}],["line",{x1:"14",x2:"21",y1:"10",y2:"3",key:"o5lafz"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);function ys(l,i){const a=new Date(l).getTime()-Date.now();if(a<=0)return i("tasks.tunnel_expired");const r=Math.floor(a/36e5),t=Math.floor(a%36e5/6e4);return r>0?i("tasks.tunnel_expires_hm",{h:r,m:t}):i("tasks.tunnel_expires_m",{m:t})}function St(l){switch(l){case"CONNECTED":return"var(--accent)";case"STARTING":return"var(--warning)";case"EXPIRED":return"var(--text-muted)";default:return"var(--text-muted)"}}function Et(l,i){switch(l){case"IDLE":case"CLOSED":return i("tasks.tunnel_idle");case"STARTING":return i("tasks.tunnel_starting");case"CONNECTED":return i("tasks.tunnel_connected");case"EXPIRED":return i("tasks.tunnel_expired");case"CLOSING":return i("tasks.tunnel_closing");default:return String(l).toLowerCase()}}function ks({taskId:l,taskFinished:i,compact:a}){const{t:r}=de(),[t,d]=n.useState(P.IDLE),[p,C]=n.useState(null),[f,M]=n.useState(null),[W,ee]=n.useState(""),[o,S]=n.useState(!1),[me,O]=n.useState(!1),F=n.useRef(null),D=n.useCallback(async()=>{try{const v=await h.get(`web/workspace-tunnel/${l}/status`).json();d(v.status),C(v.tunnelUrl??null),M(v.expiresAt??null),(v.status==="EXPIRED"||v.status==="IDLE"||v.status==="CLOSED")&&E()}catch{}},[l]);function pe(){E(),F.current=setInterval(D,5e3)}function E(){F.current&&(clearInterval(F.current),F.current=null)}n.useEffect(()=>{i&&(t===P.STARTING||t===P.CONNECTED)&&(d(P.IDLE),C(null),E())},[i,t]),n.useEffect(()=>{if(t!=="CONNECTED"||!f)return;const v=()=>{const T=ys(f,r);ee(T),T===r("tasks.tunnel_expired")&&(d(P.EXPIRED),C(null),E())};v();const R=setInterval(v,3e4);return()=>clearInterval(R)},[t,f]),n.useEffect(()=>()=>E(),[]),n.useEffect(()=>{i||D()},[D,i]);async function H(){S(!0);try{await h.post(`web/workspace-tunnel/${l}/start`),d(P.STARTING),pe()}catch(v){let R=r("tasks.tunnel_start_failed");try{if(v instanceof Qt){const T=await v.response.json();T!=null&&T.error&&(R=T.error,/code.*not found|ENOENT.*code|spawn code/i.test(R)&&(R+=". "+r("tasks.tunnel_install_code_hint")))}}catch{}$.error(R)}finally{S(!1)}}async function A(){S(!0);try{await h.post(`web/workspace-tunnel/${l}/stop`),d(P.IDLE),C(null),E()}catch{}finally{S(!1)}}async function U(){p&&(await navigator.clipboard.writeText(p),O(!0),setTimeout(()=>O(!1),2e3))}return a?e.jsxs("div",{className:"flex items-center gap-2 font-mono lowercase text-xs",children:[e.jsx("span",{className:"text-[var(--text-muted)]",children:"ide_tunnel:"}),e.jsx("span",{style:{color:St(t)},children:Et(t,r)}),(t==="IDLE"||t==="CLOSED"||t==="EXPIRED")&&e.jsx("button",{onClick:H,disabled:o,className:"rounded-[4px] px-2 py-1 text-[var(--info)] disabled:opacity-50",style:{backgroundColor:"rgba(59,130,246,0.12)"},children:r(o?"tasks.tunnel_starting":"tasks.tunnel_start")}),t==="CONNECTED"&&p&&e.jsx("a",{href:p.replace(/^https?:/,"cursor:"),target:"_blank",rel:"noopener noreferrer",className:"rounded-[4px] px-2 py-1 text-[var(--info)]",style:{backgroundColor:"rgba(59,130,246,0.12)"},children:r("tasks.tunnel_open_in_cursor")})]}):e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4 font-mono lowercase",children:[e.jsxs("div",{className:"mb-3 flex items-center justify-between",children:[e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:r("tasks.tunnel_header")}),e.jsxs("span",{className:"text-xs",style:{color:St(t)},children:["● ",Et(t,r)]})]}),t==="CONNECTED"&&f&&e.jsxs("p",{className:"mb-2 text-xs text-[var(--text-muted)]",children:["// ",W]}),t==="CONNECTED"&&p&&e.jsxs("div",{className:"mb-3 flex items-center gap-2 rounded-[4px] border border-[var(--border)] bg-[var(--bg-primary)] px-3 py-2",children:[e.jsx("code",{className:"flex-1 truncate text-xs text-[var(--text-primary)]",children:p}),e.jsxs("button",{onClick:U,className:"shrink-0 text-xs text-[var(--text-muted)] hover:text-[var(--text-primary)] transition-colors","aria-label":r("tasks.tunnel_copy_url"),children:["[",r("common.copy"),"]"]})]}),me&&e.jsx("p",{className:"mb-2 text-xs text-[var(--accent)]",children:r("tasks.tunnel_copied")}),t==="STARTING"&&e.jsx("p",{className:"mb-3 text-xs text-[var(--text-muted)]",children:r("tasks.tunnel_waiting")}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-xs",children:[(t==="IDLE"||t==="CLOSED")&&e.jsx("button",{onClick:H,disabled:o,className:"rounded-[4px] border border-[var(--accent)]/40 px-3 py-1.5 text-[var(--accent)] hover:bg-[var(--accent)]/10 transition-colors disabled:opacity-50",children:r(o?"tasks.tunnel_starting_button":"tasks.tunnel_start_button")}),t==="STARTING"&&e.jsx("button",{onClick:A,disabled:o,className:"rounded-[4px] border border-[var(--border)] px-3 py-1.5 text-[var(--text-secondary)] hover:text-[var(--text-primary)] transition-colors disabled:opacity-50",children:r(o?"tasks.tunnel_stopping":"tasks.tunnel_cancel")}),t==="CONNECTED"&&p&&e.jsxs(e.Fragment,{children:[e.jsx("a",{href:p.replace(/^https?:/,"cursor:"),target:"_blank",rel:"noopener noreferrer",className:"rounded-[4px] border border-[var(--accent)]/40 px-3 py-1.5 text-[var(--accent)] hover:bg-[var(--accent)]/10 transition-colors",children:r("tasks.tunnel_open_cursor")}),e.jsx("a",{href:p.replace(/^https?:/,"vscode:"),target:"_blank",rel:"noopener noreferrer",className:"rounded-[4px] border border-[var(--border)] px-3 py-1.5 text-[var(--text-secondary)] hover:text-[var(--text-primary)] transition-colors",children:r("tasks.tunnel_open_vscode")}),e.jsx("button",{onClick:A,disabled:o,className:"rounded-[4px] border border-[var(--destructive)]/40 px-3 py-1.5 text-[var(--destructive)] hover:bg-[var(--destructive)]/10 transition-colors disabled:opacity-50",children:r(o?"tasks.tunnel_stopping":"tasks.tunnel_stop")})]}),t==="EXPIRED"&&e.jsx("button",{onClick:H,disabled:o,className:"rounded-[4px] border border-[var(--accent)]/40 px-3 py-1.5 text-[var(--accent)] hover:bg-[var(--accent)]/10 transition-colors disabled:opacity-50",children:r(o?"tasks.tunnel_starting_button":"tasks.tunnel_restart")})]})]})}function ws({isOpen:l,onClose:i,onConfirm:a,taskId:r,isLoading:t}){const{t:d}=de();return e.jsx(Le,{isOpen:l,onClose:i,onConfirm:a,title:d("tasks.cancel_task_title"),message:d("tasks.cancel_task_message",{id:String(r)}),confirmLabel:d("tasks.cancel_task_confirm_label"),confirmVariant:"danger",isLoading:t})}function _s({isOpen:l,onClose:i,onConfirm:a,taskId:r,mrUrl:t,isLoading:d,reuseWorkspace:p,onReuseWorkspaceChange:C}){const{t:f}=de(),M=t?f("tasks.retry_message_with_mr",{id:String(r),url:t}):f("tasks.retry_message_without_mr",{id:String(r)});return e.jsx(Le,{isOpen:l,onClose:i,onConfirm:a,title:f("tasks.retry_title"),message:M,confirmLabel:f("tasks.retry_confirm_label"),confirmVariant:"accent",isLoading:d,children:e.jsx(oe,{checked:p,onCheckedChange:C,label:f("tasks.reuse_workspace_label"),containerClassName:"mt-3",labelClassName:"text-[var(--text-muted)]"})})}const Ce=["implement","test","verify","review","simplify","rebase","submit"],Cs=["analyze","discuss","document","confirm"],Ss=["review","report","fix"],Es=["review","report"],Ts=["analyze"];function Te(l){if(typeof l=="string")try{return Te(JSON.parse(l))}catch{return null}if(!l||typeof l!="object")return null;const i=l.stages;if(!Array.isArray(i)||i.length===0)return null;const a=i.map(r=>r&&typeof r=="object"?r.name:null).filter(r=>typeof r=="string"&&r.length>0);return a.length===i.length?a:null}function Ls(l){if(l.taskMode==="plan")return Cs;if(l.taskMode==="automation")return Ts;if(l.taskMode==="review"){let i=!1;if(l.configSnapshot)try{i=!!JSON.parse(l.configSnapshot).skipFix}catch{}return i?Es:Ss}if(!l.configSnapshot)return Ce;try{const i=JSON.parse(l.configSnapshot);return Te(i.pipeline)??Te(i)??Ce}catch{return Ce}}function Is(l){switch(l){case"stage_change":return"text-[var(--accent)]";case"info":return"text-[var(--text-secondary)]";case"warning":return"text-[var(--warning)]";case"error":return"text-[var(--destructive)]";case"system":return"text-[var(--info)]";default:return"text-[var(--text-muted)]"}}function Se({status:l,agentType:i}){const a=Dt(l),r=Z(i);return e.jsxs("span",{className:"inline-flex items-center gap-1.5 rounded-[4px] px-2 py-0.5 text-xs",style:{color:a},children:[e.jsx("span",{className:"h-1.5 w-1.5 rounded-[3px]",style:{backgroundColor:a}}),l.toLowerCase()," / ",r]})}function Tt({stages:l,runningBg:i="bg-[#1a1a1a]",py:a="py-1.5"}){return e.jsx(e.Fragment,{children:l.map(r=>{const t=r.status==="completed",d=r.status==="running",p=r.status==="failed";return e.jsxs("div",{className:`flex items-center gap-2 rounded-[4px] px-2 ${a} ${d?i:""}`,children:[t&&e.jsx(is,{className:"h-3.5 w-3.5 shrink-0 text-[var(--accent)]"}),d&&e.jsx(Pt,{className:"h-3.5 w-3.5 shrink-0 text-[var(--accent)]"}),p&&e.jsx(Ee,{className:"h-3.5 w-3.5 shrink-0 text-[var(--destructive)]"}),r.status==="pending"&&e.jsx(gs,{className:"h-3.5 w-3.5 shrink-0 text-[#525252]"}),e.jsx("span",{className:"text-xs",style:{color:t?"var(--accent)":d?"#e5e5e5":p?"var(--destructive)":"#525252",fontWeight:d?500:400},children:d?`> ${r.name}`:r.name})]},r.name)})})}function Lt({task:l,ptyStatus:i,displayAgentType:a,t:r,gap:t="gap-2 md:gap-3"}){return e.jsxs("div",{className:`flex items-center ${t}`,children:[e.jsx("span",{className:"text-[11px] font-medium text-[var(--text-muted)]",children:r("tasks.pty_terminal")}),e.jsxs("span",{className:`inline-flex items-center gap-1 text-[11px] ${i==="connected"?"text-[var(--accent)]":i==="connecting"?"text-[var(--warning)]":"text-[var(--text-muted)]"}`,children:[e.jsx("span",{className:`h-1.5 w-1.5 rounded-full ${i==="connected"?"bg-[var(--accent)]":i==="connecting"?"bg-[var(--warning)]":"bg-[#525252]"}`}),r(`tasks.${i}`)]}),e.jsx("span",{className:"text-[11px]",style:{color:Dt(l.status)},children:l.status.toLowerCase()}),l.currentStage&&e.jsxs("span",{className:"hidden md:inline text-[11px] text-[var(--accent)]",children:[r("tasks.stage"),": ",l.currentStage]}),e.jsxs("span",{className:"hidden md:inline text-[11px] text-[var(--text-muted)]",children:["agent: ",a]}),l.workerName&&e.jsxs("span",{className:"hidden md:inline text-[11px] text-[var(--text-muted)]",children:["worker: ",l.workerName]})]})}function It({isFinished:l,takeoverState:i,ptyRef:a,t:r}){return e.jsxs(e.Fragment,{children:[!l&&i==="auto"&&e.jsxs("button",{onClick:()=>{var t;return(t=a.current)==null?void 0:t.requestTakeover()},className:"flex items-center gap-1.5 rounded-[4px] px-2.5 h-10 md:h-8 text-[11px] font-medium text-[var(--warning)]",style:{backgroundColor:"rgba(245,158,11,0.12)"},children:[e.jsx(ms,{className:"h-3 w-3"}),r("tasks.take_over")]}),!l&&i==="manual"&&e.jsxs("button",{onClick:()=>{var t;return(t=a.current)==null?void 0:t.releaseTakeover()},className:"flex items-center gap-1.5 rounded-[4px] px-2.5 h-10 md:h-8 text-[11px] font-medium text-[var(--accent)]",style:{backgroundColor:"rgba(34,197,94,0.12)"},children:[e.jsx(At,{className:"h-3 w-3"}),r("tasks.restore_auto")]})]})}function Rs(l){const i=Ls(l),a=l.currentStage?i.indexOf(l.currentStage):-1;return i.map((r,t)=>{let d="pending";return l.status===k.COMPLETED?d="completed":l.status===k.FAILED&&t<=a?d=t===a?"failed":"completed":a>=0&&(t<a?d="completed":t===a&&(d="running")),{name:r,status:d}})}function K(l,i){if(!l||!i)return null;const a=l.repoUrl.replace(/\.git$/,"").replace(/\/+$/,""),r=i.split("/").map(encodeURIComponent).join("/");return l.gitPlatform===Rt.GITLAB?`${a}/-/tree/${r}`:`${a}/tree/${r}`}function Ds(l,i){if(!l)return null;const a=l.repoUrl.replace(/\.git$/,"").replace(/\/+$/,""),r=i.split("/").map(encodeURIComponent).join("/");return l.gitPlatform===Rt.GITLAB?`${a}/-/tree/${r}/docs/specs`:`${a}/tree/${r}/docs/specs`}function ta(){var ht,ft,vt;const{id:l}=Yt(),i=Zt(),{t:a}=de(),r=os(s=>s.cancelTask),[t,d]=n.useState(null),[p,C]=n.useState(null),[f,M]=n.useState([]),[W,ee]=n.useState(!0),[o,S]=n.useState(null),[me,O]=n.useState(!1),[F,D]=n.useState(!1),[pe,E]=n.useState(!1),[H,A]=n.useState(!1),[U,v]=n.useState(["claude"]),[R,T]=n.useState(""),[Ie,Re]=n.useState(!1),[De,Ae]=n.useState(""),[Pe,$e]=n.useState(!1),[$t,Me]=n.useState(!1),[Mt,Oe]=n.useState(!1),[Ot,Fe]=n.useState(!1),[Ue,qe]=n.useState(""),[Be,Ge]=n.useState(""),[ze,Ke]=n.useState("append"),[We,ue]=n.useState(!1),[He,Ft]=es(),[N,he]=n.useState("terminal"),[Je,Xe]=n.useState([]),[te,Ve]=n.useState(0),[J,q]=n.useState(0),[X,Qe]=n.useState(""),[se,Ut]=n.useState(""),[qt,fe]=n.useState(!1),[Bt,Ye]=n.useState(!1),[B,ve]=n.useState(null),[Ze,et]=n.useState("disconnected"),[ge,tt]=n.useState("auto"),ae=n.useRef(null),st=n.useRef(null),[at,rt]=n.useState([]),[nt,lt]=n.useState([]),x=Number(l),b=t?ps.includes(t.status):!1;ts(t?ss(t,100):null);const L=n.useCallback(async()=>{try{const s=await h.get(`web/tasks/${x}`).json();d(s)}catch{}},[x]),re=n.useCallback(async()=>{try{const s=await h.get(`web/tasks/${x}/logs`).json();M(s.lines)}catch{}},[x]),G=n.useCallback(async()=>{try{const s=await h.get(`web/tasks/${x}/pending-confirm`).json();S(s.confirm)}catch{S(null)}},[x]),ct=n.useCallback(async()=>{fe(!0);try{const s=new URLSearchParams;s.set("limit","50"),s.set("offset",String(J*50)),X&&s.set("type",X),se&&s.set("search",se);const c=await h.get(`web/tasks/${x}/events?${s}`).json();Xe(c.events),Ve(c.total)}catch{}finally{fe(!1)}},[x,J,X,se]);n.useEffect(()=>{N==="logs"&&ct()},[N,ct]),n.useEffect(()=>{N==="pipeline"&&!b&&h.get(`web/workspaces/${x}`).json().then(ve).catch(()=>ve(null))},[N,x,b]);const z=gt(s=>s.lastEvent),it=gt(s=>s.eventSeq);n.useEffect(()=>{ee(!0),d(null),C(null),M([]),S(null),ve(null),Xe([]),Ve(0),q(0),fe(!1),lt([]),Promise.all([L(),re(),G()]).finally(()=>ee(!1)),h.get(`web/tasks/${x}/external-links`).json().then(lt).catch(()=>{})},[x,L,re,G]),n.useEffect(()=>{t!=null&&t.projectKey&&h.get(`web/projects/${t.projectKey}`).json().then(C).catch(()=>C(null))},[t==null?void 0:t.projectKey]),n.useEffect(()=>{if(!t)return;let s=!1;return(async()=>{try{const c=[],m=[];let u=t.sourceTaskId??null,y=0;for(;u!=null&&y<2;){const _=await h.get(`web/tasks/${u}`).json();m.unshift({id:_.id,taskMode:_.taskMode??"develop"}),u=_.sourceTaskId??null,y++}c.push(...m),c.push({id:t.id,taskMode:t.taskMode??"develop"});const I=await h.get(`web/tasks?${new URLSearchParams({sourceTaskId:String(t.id),limit:"20"})}`).json();for(const _ of I.data??[])c.push({id:_.id,taskMode:_.taskMode??"develop"});s||rt(c)}catch{s||rt([])}})(),()=>{s=!0}},[t==null?void 0:t.id,t==null?void 0:t.sourceTaskId,t==null?void 0:t.taskMode]),n.useEffect(()=>{!z||it===0||(z.event==="task_status_changed"&&z.taskId===x||z.event==="task_created"&&z.taskId===x)&&(L(),G())},[it,z,x,L,G]),n.useEffect(()=>{if(b)return;const c=setInterval(()=>{document.visibilityState!=="hidden"&&Promise.all([L(),re(),G()])},15e3);return()=>clearInterval(c)},[b,L,re,G]);const ot=n.useCallback(()=>S(null),[]),V=n.useCallback(()=>{S(null),L()},[L]),Gt=(t==null?void 0:t.status)===k.FAILED||(t==null?void 0:t.status)===k.CANCELLED,be=(t==null?void 0:t.status)===k.COMPLETED||(t==null?void 0:t.status)===k.FAILED||(t==null?void 0:t.status)===k.CANCELLED,zt=(t==null?void 0:t.status)===k.COMPLETED&&(!(t!=null&&t.taskMode)||(t==null?void 0:t.taskMode)==="develop");n.useEffect(()=>{He.get("action")==="fork"&&t&&!W&&(be&&xt(),Ft(s=>(s.delete("action"),s),{replace:!0}))},[t,W,He,be]);async function Kt(){Me(!0);try{await r(x),O(!1),await L()}finally{Me(!1)}}async function Wt(){Oe(!0);try{await h.post(`web/tasks/${x}/retry`,{json:{reuseWorkspace:We}}),D(!1),ue(!1),await L()}finally{Oe(!1)}}function xt(){qe(""),Ge(""),Ke("append"),E(!0)}async function Ht(){Fe(!0);try{const s=Ue.trim()||void 0,c=await h.post(`web/tasks/${x}/fork`,{json:{description:s,descriptionMode:s?ze:void 0,agentType:Be||void 0}}).json();E(!1),$.success(a("tasks.fork_success")),i(`/tasks/${c.task.id}`)}catch{$.error(a("tasks.fork_error"))}finally{Fe(!1)}}async function Jt(){if(t){$e(!0);try{await h.post(`web/tasks/${x}/review`,{json:{agentTypes:U.length>0?U:[wt(we(t))],description:R.trim()||void 0,skipFix:Ie||void 0,issueRef:De.trim()||void 0}}).json(),A(!1),T(""),Re(!1),Ae(""),i(`/review/${x}`)}catch(s){const c=s instanceof Error?s.message:String(s);$.error(c)}finally{$e(!1)}}}const j=n.useMemo(()=>t?Rs(t):[],[t==null?void 0:t.configSnapshot,t==null?void 0:t.currentStage,t==null?void 0:t.status]),je=j.findIndex(s=>s.status==="running"),ne=n.useMemo(()=>{if(!(t!=null&&t.configSnapshot))return[];try{const s=JSON.parse(t.configSnapshot);return Array.isArray(s.defaultReviewers)?s.defaultReviewers:[]}catch{return[]}},[t==null?void 0:t.configSnapshot]);if(n.useEffect(()=>{if(ne.length>0)v(ne);else if(t){const s=we(t);v([wt(s)])}},[ne.join(","),t==null?void 0:t.id]),W)return e.jsx("div",{className:"flex h-full items-center justify-center font-mono",children:e.jsx("p",{className:"text-sm text-[var(--text-muted)]",children:a("tasks.loading_task")})});if(!t)return e.jsxs("div",{className:"mx-auto max-w-5xl px-6 py-8 font-mono lowercase text-center",children:[e.jsx("p",{className:"text-sm text-[var(--text-secondary)]",children:a("tasks.task_not_found")}),e.jsxs("button",{onClick:()=>i("/tasks"),className:"mt-4 rounded-[4px] border border-[var(--border)] px-3 py-1.5 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)] transition-colors",children:["< ",a("tasks.back_to_tasks")]})]});const w=t.status===k.QUEUED&&t.queuePosition!=null&&t.queueTotal!=null?{position:t.queuePosition,total:t.queueTotal}:null,g=xs(t.startedAt,t.completedAt),Q=we(t),Ne=Z(t.agentType),Xt=[{value:"",label:a("tasks.fork_agent_type_placeholder",{agent:Z(Q)})},..._t(Z,Q)],le=`${a("tasks.status_suspended")} / ${Ne}`,dt=w?e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-[var(--text-muted)]",children:"queue"}),e.jsxs("span",{className:"text-[var(--info)]",children:["#",w.position," / ",w.total]})]}):null,mt=t.taskMode&&t.taskMode!=="develop"?e.jsx("span",{className:"rounded-[4px] px-2 py-0.5 text-[10px] font-bold uppercase",style:t.taskMode==="plan"?{color:"#3b82f6",backgroundColor:"rgba(59,130,246,0.12)"}:{color:"#a855f7",backgroundColor:"rgba(168,85,247,0.12)"},children:t.taskMode}):null,ce=at.length>1?e.jsx("div",{className:"flex items-center gap-1 text-xs text-[var(--text-secondary)]",children:at.map((s,c)=>e.jsxs(as.Fragment,{children:[c>0&&e.jsx("span",{className:"text-[var(--text-muted)]",children:"→"}),e.jsxs(ie,{to:`/tasks/${s.id}`,className:s.id===t.id?"text-[var(--accent)]":"text-[var(--info)] hover:underline",children:[s.taskMode," #",s.id]})]},s.id))}):t.sourceTaskId?e.jsxs("span",{className:"text-xs text-[var(--text-muted)]",children:["source:"," ",e.jsxs(ie,{to:`/tasks/${t.sourceTaskId}`,className:"text-[var(--info)] hover:underline",children:["#",t.sourceTaskId]})]}):null,pt=e.jsxs("div",{className:"flex items-center gap-3 border-b border-[var(--border)] bg-[var(--bg-primary)] px-4 py-3 shrink-0 md:hidden",children:[e.jsx("button",{onClick:()=>i("/tasks"),className:"shrink-0 text-[var(--text-muted)]",children:e.jsx(hs,{className:"h-4 w-4"})}),e.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("span",{className:"truncate text-sm font-medium text-[var(--text-primary)] preserve-case",title:rs(t),children:["#",t.id," ",bt(t,80)]}),mt]}),ce&&e.jsx("div",{className:"text-[11px]",children:ce})]})]}),ye=e.jsxs("div",{className:"hidden md:flex items-center gap-4 border-b border-[var(--border)] bg-[var(--bg-primary)] px-5 shrink-0",style:{height:44},children:[e.jsx(Se,{status:t.status,agentType:t.agentType}),mt,g&&e.jsxs("span",{className:"text-xs text-[var(--text-muted)]",children:["// time cost: ",g]}),w&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-xs text-[var(--border)]",children:"|"}),e.jsx("span",{className:"text-xs text-[var(--info)]",children:a("tasks.queue_position",{position:String(w.position),total:String(w.total)})})]}),e.jsx("span",{className:"text-xs text-[var(--border)]",children:"|"}),e.jsxs(ie,{to:`/projects/${t.projectKey}`,className:"text-xs text-[var(--text-muted)] hover:text-[var(--text-primary)] transition-colors",children:["project: ",e.jsx("span",{className:"text-[var(--text-primary)]",children:t.projectKey})]}),t.branch&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-xs text-[var(--border)]",children:"|"}),e.jsxs("span",{className:"text-xs text-[var(--text-muted)]",children:["branch: ",K(p,t.branch)?e.jsx("a",{href:K(p,t.branch),target:"_blank",rel:"noopener noreferrer",className:"text-[var(--text-primary)] hover:text-[var(--info)] hover:underline transition-colors",children:t.branch}):e.jsx("span",{className:"text-[var(--text-primary)]",children:t.branch})]})]}),t.mrUrl&&/^https?:\/\//.test(t.mrUrl)&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-xs text-[var(--border)]",children:"|"}),e.jsxs("a",{href:t.mrUrl,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-[var(--info)] hover:underline",children:["MR: ",((ht=t.mrUrl.match(/!?\d+$/))==null?void 0:ht[0])??"view"]})]}),ce&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-xs text-[var(--border)]",children:"|"}),ce]})]}),ut=e.jsxs("div",{className:"flex items-center gap-3 border-t border-[var(--border)] bg-[var(--bg-primary)] px-4 md:px-5 shrink-0",style:{height:48},children:[!b&&e.jsxs("button",{onClick:()=>O(!0),className:"flex flex-1 md:flex-none items-center justify-center gap-1.5 rounded-[4px] bg-[var(--destructive)]/10 px-3 h-8 text-[11px] font-medium text-[var(--destructive)]",children:[e.jsx(Ee,{className:"h-3 w-3"}),a("tasks.cancel_task")]}),Gt&&e.jsxs("button",{onClick:()=>D(!0),className:"flex flex-1 md:flex-none items-center justify-center gap-1.5 rounded-[4px] bg-[var(--bg-card)] px-3 h-8 text-[11px] text-[var(--text-muted)] hover:text-[var(--text-primary)] hover:bg-[var(--bg-input)] transition-colors cursor-pointer",children:[e.jsx(At,{className:"h-3 w-3"}),a("tasks.retry_task")]}),be&&e.jsxs("button",{onClick:xt,className:"flex flex-1 md:flex-none items-center justify-center gap-1.5 rounded-[4px] bg-[var(--bg-card)] px-3 h-8 text-[11px] text-[var(--text-muted)] hover:text-[var(--text-primary)] hover:bg-[var(--bg-input)] transition-colors cursor-pointer",children:[e.jsx(fs,{className:"h-3 w-3"}),a("tasks.fork_task")]}),zt&&e.jsxs("button",{onClick:()=>A(!0),className:"flex flex-1 md:flex-none items-center justify-center gap-1.5 rounded-[4px] px-3 h-8 text-[11px] font-medium text-[var(--accent)]",style:{backgroundColor:"rgba(34,197,94,0.12)"},children:[e.jsx(Ct,{className:"h-3 w-3"}),a("review.launch")]}),t.workerId&&!b&&e.jsxs("button",{onClick:()=>{he("pipeline"),setTimeout(()=>{var s,c;(c=(s=st.current)==null?void 0:s.scrollIntoView)==null||c.call(s,{behavior:"smooth",block:"center"})},50)},className:"hidden lg:flex items-center justify-center gap-1.5 rounded-[4px] px-3 h-8 text-[11px] font-medium text-[var(--info)]",style:{backgroundColor:"rgba(59,130,246,0.12)"},children:[e.jsx(_e,{className:"h-3 w-3"}),a("tasks.cursor_tunnel")]})]}),Vt=e.jsxs("div",{className:"hidden w-[280px] shrink-0 flex-col gap-6 overflow-y-auto border-l border-[var(--border)] bg-[var(--bg-primary)] p-4 lg:flex",children:[e.jsxs("div",{className:"flex flex-col gap-3",children:[e.jsx("span",{className:"text-[11px] font-medium text-[var(--text-muted)]",children:a("tasks.pipeline_stages")}),e.jsx(Tt,{stages:j})]}),g&&e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] px-3 py-2 text-[11px] text-[var(--text-secondary)]",children:["// time cost: ",g]}),nt.length>0&&e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx("span",{className:"text-[11px] font-medium text-[var(--text-muted)]",children:a("tasks.external_refs")}),nt.map((s,c)=>e.jsxs("a",{href:s.externalIssueUrl.startsWith("http")?s.externalIssueUrl:"#",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1.5 text-[11px] text-[var(--accent)] hover:underline",children:[e.jsx(_e,{className:"h-3 w-3 shrink-0"}),e.jsx("span",{className:"capitalize",children:s.connectorPlatform}),": ",s.externalIssueId]},c))]}),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx("span",{className:"text-[11px] font-medium text-[var(--text-muted)]",children:a("tasks.activity_log")}),f.length>0?e.jsx("div",{className:"flex flex-col gap-1.5",children:f.slice(0,8).map((s,c)=>e.jsx("p",{className:"text-[11px] leading-relaxed text-[var(--text-muted)]",children:s},c))}):e.jsx("span",{className:"text-[11px] text-[var(--text-muted)]",children:a("tasks.no_activity")})]})]}),ke=e.jsxs(e.Fragment,{children:[e.jsx(ws,{isOpen:me,onClose:()=>O(!1),onConfirm:Kt,taskId:x,isLoading:$t}),e.jsx(_s,{isOpen:F,onClose:()=>{D(!1),ue(!1)},onConfirm:Wt,taskId:x,mrUrl:t.mrUrl??void 0,isLoading:Mt,reuseWorkspace:We,onReuseWorkspaceChange:ue}),e.jsx(Le,{isOpen:pe,onClose:()=>E(!1),onConfirm:Ht,title:a("tasks.fork_task"),message:a("tasks.fork_task_desc"),confirmLabel:a("tasks.fork_task"),confirmVariant:"accent",isLoading:Ot,children:e.jsxs("div",{className:"mt-3 flex flex-col gap-2",children:[e.jsxs("span",{className:"text-[11px] text-[var(--text-muted)]",children:["fork of #",x]}),e.jsxs("div",{className:"flex flex-col gap-1.5",children:[e.jsx("span",{className:"text-[11px] text-[var(--text-muted)]",children:a("tasks.form_agent_type")}),e.jsx(kt,{value:Be,onChange:Ge,options:Xt})]}),e.jsx("textarea",{value:Ue,onChange:s=>qe(s.target.value),placeholder:a("tasks.fork_description_placeholder"),rows:4,className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] placeholder:text-[var(--text-muted)] outline-none focus:border-[var(--accent)] resize-none"}),e.jsx(oe,{checked:ze==="replace",onCheckedChange:s=>Ke(s?"replace":"append"),label:e.jsxs("span",{children:[a("tasks.fork_replace_description"),e.jsx("span",{className:"mt-1 block text-[10px] text-[var(--text-muted)]",children:a("tasks.fork_append_hint")})]}),containerClassName:"w-full items-start rounded-[4px] border border-[var(--border)] bg-[var(--bg-primary)] px-3 py-2 text-[11px] text-[var(--text-secondary)]",indicatorClassName:"mt-0.5",labelClassName:"text-[11px] text-[var(--text-secondary)]"})]})}),H&&e.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4",children:e.jsxs("div",{className:"w-full max-w-sm rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-5 font-mono",children:[e.jsxs("div",{className:"mb-4 flex items-center justify-between",children:[e.jsx("span",{className:"text-sm font-bold text-[var(--text-primary)]",children:a("review.launch")}),e.jsx("button",{onClick:()=>A(!1),className:"text-[var(--text-muted)] hover:text-[var(--text-primary)] transition-colors",children:e.jsx(Ee,{className:"h-4 w-4"})})]}),e.jsxs("div",{className:"mb-3 flex items-center gap-2",children:[e.jsxs("p",{className:"text-[11px] text-[var(--text-muted)]",children:["task #",x," — ",a("review.select_agents")]}),ne.length>0&&e.jsx("span",{className:"rounded-[4px] border border-amber-500/40 bg-amber-500/10 px-1.5 py-0.5 text-[10px] text-amber-500",children:"using project defaults"})]}),e.jsx("div",{className:"mb-4 flex flex-col gap-2",children:_t(Z).map(s=>e.jsx(oe,{checked:U.includes(s.value),onCheckedChange:()=>v(c=>c.includes(s.value)?c.filter(m=>m!==s.value):[...c,s.value]),label:s.label,containerClassName:"w-full gap-2.5 rounded-[4px] border border-[var(--border)] px-3 py-2 hover:bg-[var(--bg-input)] transition-colors"},s.value))}),e.jsx("textarea",{value:R,onChange:s=>T(s.target.value),placeholder:a("review.description_placeholder"),rows:3,className:"mb-3 w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] placeholder:text-[var(--text-muted)] outline-none focus:border-[var(--accent)] resize-none"}),e.jsx(oe,{checked:Ie,onCheckedChange:Re,label:a("review.skip_fix_label"),containerClassName:"mb-3 w-full gap-2.5 rounded-[4px] border border-[var(--border)] px-3 py-2 hover:bg-[var(--bg-input)] transition-colors",labelClassName:"text-[var(--text-muted)]"}),e.jsx("input",{value:De,onChange:s=>Ae(s.target.value),placeholder:"--ref: Figma/Jira/Sentry URL",className:"mb-4 w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] placeholder:text-[var(--text-muted)] outline-none focus:border-[var(--accent)]"}),e.jsxs("div",{className:"flex gap-2",children:[e.jsxs("button",{onClick:Jt,disabled:Pe||U.length===0,className:"flex flex-1 items-center justify-center gap-1.5 rounded-[4px] bg-[var(--accent)] px-4 py-2 text-xs font-bold text-black disabled:opacity-40 disabled:cursor-not-allowed",children:[e.jsx(Ct,{className:"h-3 w-3"}),a(Pe?"common.processing":"review.launch")]}),e.jsx("button",{onClick:()=>A(!1),className:"rounded-[4px] border border-[var(--border)] px-4 py-2 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)] transition-colors",children:a("common.cancel")})]})]})})]});return Bt&&N==="terminal"?e.jsxs("div",{className:"fixed inset-0 z-50 flex flex-col bg-[var(--bg-primary)] font-mono lowercase h-screen",style:{height:"100dvh",paddingTop:"env(safe-area-inset-top, 0px)",paddingBottom:"env(safe-area-inset-bottom, 0px)"},children:[ye,e.jsxs("div",{className:"flex items-center justify-between border-b border-[var(--border)] px-5 shrink-0",style:{height:36,backgroundColor:"#111111"},children:[e.jsx(Lt,{task:t,ptyStatus:Ze,displayAgentType:Q,t:a,gap:"gap-3"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(It,{isFinished:b,takeoverState:ge,ptyRef:ae,t:a}),e.jsx("button",{onClick:()=>Ye(!1),className:"flex items-center rounded-[4px] bg-[var(--bg-card)] px-2.5 py-1 text-[var(--text-muted)]",children:e.jsx(Ns,{className:"h-3 w-3"})})]})]}),e.jsx("div",{className:"min-h-0 flex-1 overflow-hidden",children:e.jsx(Nt,{ref:ae,taskId:x,sessionId:t.currentSessionId??void 0,taskFinished:b,onStatusChange:et,onTakeoverChange:tt})}),ut,ke]}):t.status===k.SUSPENDED?e.jsxs("div",{className:"flex h-full flex-col font-mono lowercase",children:[pt,ye,e.jsx("div",{className:"flex items-center gap-2 border-b px-4 md:px-6 py-2 text-xs shrink-0",style:{backgroundColor:"rgba(245,158,11,0.08)",borderColor:"rgba(245,158,11,0.2)",color:"var(--warning)"},children:a("tasks.task_suspended_banner")}),e.jsxs("div",{className:"flex min-h-0 flex-1 flex-col md:flex-row gap-4 md:gap-6 p-4 md:p-6 overflow-y-auto",children:[e.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-4",children:[e.jsxs("div",{className:"hidden md:flex items-center gap-3",children:[e.jsxs("span",{className:"text-xl font-bold text-[var(--text-primary)]",children:["#",t.id]}),e.jsx("span",{className:"text-base text-[var(--text-secondary)] truncate max-w-[60%] preserve-case",children:e.jsx(us,{content:t.description,children:bt(t,200)})}),e.jsx("span",{className:"rounded-[4px] px-2.5 py-1 text-[11px] font-bold text-[var(--warning)]",style:{backgroundColor:"rgba(245,158,11,0.12)"},children:le})]}),e.jsx("div",{className:"flex items-center gap-2 md:hidden",children:e.jsx("span",{className:"rounded-[4px] px-2.5 py-1 text-[11px] font-bold text-[var(--warning)]",style:{backgroundColor:"rgba(245,158,11,0.12)"},children:le})}),o&&(()=>{const s=o.confirmType,c=s==="plan_decompose",m=s==="plan_review"||s==="code_review",u=s==="plan_review"?a("tasks.plan_review_message",{name:o.stageName}):c?o.prompt==="SPEC_PUSH_FAILED"?a("tasks.plan_decompose_push_failed_message"):a("tasks.plan_decompose_message"):s==="code_review"?a("tasks.code_review_message",{name:o.stageName}):o.prompt??a("tasks.pipeline_requires_confirmation"),y=a(s==="plan_review"?"tasks.approve_plan":c?"tasks.approve_plan_decompose":s==="code_review"?"tasks.approve_review":"tasks.confirm_and_proceed"),I=a(c?"tasks.reject_plan_decompose":m?"tasks.request_changes":"tasks.reject");return e.jsxs("div",{className:"rounded-[4px] border p-4",style:{borderColor:"rgba(245,158,11,0.27)",backgroundColor:"#1a1a1a"},children:[e.jsx("p",{className:"mb-2 text-[11px] font-bold text-[var(--accent)]",children:a("tasks.pending_confirmation")}),e.jsx("p",{className:"mb-3 text-xs text-[var(--text-secondary)]",children:u}),e.jsx("div",{className:"mb-3 flex flex-col gap-1.5 text-[11px]",children:e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-[var(--text-muted)]",children:"stage"}),e.jsx("span",{className:"text-[var(--text-primary)]",children:o.stageName})]})}),e.jsxs("div",{className:"flex flex-col gap-2 md:flex-row md:flex-wrap md:gap-3",children:[e.jsx("button",{onClick:async()=>{try{await h.post(`web/tasks/${x}/confirm-stage`,{json:{stageName:o.stageName,approved:!0,feedback:""}}),V()}catch{$.error(a("tasks.confirm_failed"))}},className:"flex-1 md:flex-none rounded-[4px] bg-[var(--accent)] px-4 py-2.5 md:py-2 text-[11px] font-bold text-[#0c0c0c]",children:y}),e.jsx("button",{onClick:async()=>{try{await h.post(`web/tasks/${x}/confirm-stage`,{json:{stageName:o.stageName,approved:!1,feedback:""}}),V()}catch{$.error(a("tasks.confirm_failed"))}},className:"flex-1 md:flex-none rounded-[4px] bg-[#1a1a1a] px-4 py-2.5 md:py-2 text-[11px] text-[var(--destructive)]",style:{border:"1px solid rgba(239,68,68,0.27)"},children:I})]})]})})(),e.jsxs("div",{className:"flex flex-col gap-3 rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4 lg:hidden",children:[e.jsx("span",{className:"text-xs font-bold text-[var(--accent)]",children:a("tasks.task_info")}),e.jsxs("div",{className:"flex flex-col gap-1.5 text-[11px]",children:[e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-[var(--text-muted)]",children:"status"}),e.jsx("span",{className:"font-bold text-[var(--warning)]",children:le})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-[var(--text-muted)]",children:"project"}),e.jsx("span",{className:"text-[var(--text-primary)]",children:t.projectKey})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-[var(--text-muted)]",children:"worker"}),e.jsx("span",{className:"text-[var(--text-primary)]",children:t.workerName??"-"})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-[var(--text-muted)]",children:"created"}),e.jsx("span",{className:"text-[var(--text-primary)]",children:Y(t.createdAt)})]})]})]}),e.jsx("div",{className:"hidden md:flex flex-wrap items-center gap-2 py-2",children:j.map((s,c)=>{const m=s.status==="failed",u=s.status==="completed",y=s.status==="running"&&t.status===k.SUSPENDED,I=m?"var(--destructive)":u?"var(--accent)":y?"var(--warning)":"#525252",_=m?"rgba(239,68,68,0.12)":u?"rgba(34,197,94,0.12)":y?"rgba(245,158,11,0.12)":"transparent";return e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"rounded-[4px] px-2.5 py-1 text-[11px]",style:{color:I,backgroundColor:_,fontWeight:y?700:400,border:y?`1px solid ${I}`:void 0},children:y?"confirm":`${s.name}${u?" ✓":m?" ✗":""}`}),c<j.length-1&&e.jsx("div",{className:"h-px w-6 bg-[var(--border)]"})]},s.name)})}),e.jsxs("div",{className:"hidden md:block min-h-[200px] flex-1 rounded-[4px] border border-[var(--border)] bg-[#0c0c0c] p-4",children:[e.jsx("p",{className:"mb-2 text-[11px] font-bold text-[var(--accent)]",children:a("tasks.pty_output")}),e.jsxs("div",{className:"flex flex-col gap-1",children:[f.slice(-10).map((s,c)=>e.jsx("p",{className:"text-[11px] leading-relaxed text-[var(--text-secondary)]",children:s},c)),f.length===0&&e.jsx("p",{className:"text-[11px] text-[var(--text-muted)]",children:a("tasks.no_output")})]})]})]}),e.jsxs("div",{className:"hidden w-[280px] shrink-0 flex-col gap-4 rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4 lg:flex",children:[e.jsx("span",{className:"text-[13px] font-bold text-[var(--accent)]",children:a("tasks.task_info")}),e.jsxs("div",{className:"flex flex-col gap-1.5 text-[11px]",children:[e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-[var(--text-muted)]",children:"status"}),e.jsx("span",{className:"font-bold text-[var(--warning)]",children:le})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-[var(--text-muted)]",children:"project"}),e.jsx("span",{className:"text-[var(--text-primary)]",children:t.projectKey})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-[var(--text-muted)]",children:"worker"}),e.jsx("span",{className:"text-[var(--text-primary)]",children:t.workerName??"-"})]})]}),e.jsx("div",{className:"h-px bg-[var(--border)]"}),e.jsx("span",{className:"text-xs font-bold text-[var(--accent)]",children:a("tasks.stage_timeline")}),e.jsx("div",{className:"flex flex-col gap-2",children:j.map(s=>{const c=s.status==="completed"?"var(--info)":s.status==="failed"?"var(--destructive)":s.status==="running"?"var(--warning)":"#525252",m=s.status==="failed"?"var(--destructive)":s.status==="running"?"var(--warning)":"#a3a3a3",u=s.status==="completed"?"completed":s.status==="running"?"suspended":s.status==="failed"?"failed":"pending";return e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"h-2 w-2 shrink-0 rounded-[4px]",style:{backgroundColor:c}}),e.jsxs("span",{className:"text-[11px]",style:{color:m,fontWeight:s.status==="running"?700:400},children:[s.name," ",u]})]},s.name)})}),e.jsx("div",{className:"h-px bg-[var(--border)]"}),e.jsx("div",{className:"flex flex-col gap-1.5 text-[11px]",children:e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-[var(--text-muted)]",children:"created"}),e.jsx("span",{className:"text-[var(--text-primary)]",children:Y(t.createdAt)})]})})]})]}),o&&e.jsx(yt,{isOpen:!!o,onClose:ot,taskId:x,stageName:o.stageName,timeoutSeconds:o.timeout,confirmType:o.confirmType,prompt:o.prompt,onSubmitted:V}),ke]}):e.jsxs("div",{className:"flex h-full flex-col overflow-hidden font-mono lowercase",children:[pt,e.jsxs("div",{className:"flex flex-wrap items-center gap-3 gap-y-1 border-b border-[var(--border)] bg-[var(--bg-primary)] px-4 py-2 shrink-0 md:hidden",children:[e.jsx(Se,{status:t.status,agentType:t.agentType}),g&&e.jsxs("span",{className:"shrink-0 text-[11px] text-[var(--text-muted)]",children:["// time cost: ",g]}),e.jsx("span",{className:"shrink-0 text-[11px] text-[var(--text-muted)]",children:t.projectKey}),t.workerName&&e.jsx("span",{className:"shrink-0 text-[11px] text-[var(--text-muted)]",children:t.workerName}),t.branch&&(K(p,t.branch)?e.jsx("a",{href:K(p,t.branch),target:"_blank",rel:"noopener noreferrer",className:"shrink-0 text-[11px] text-[var(--text-muted)] hover:text-[var(--info)] hover:underline truncate max-w-[80px] md:max-w-[120px] transition-colors",children:t.branch}):e.jsx("span",{className:"shrink-0 text-[11px] text-[var(--text-muted)] truncate max-w-[80px] md:max-w-[120px]",children:t.branch}))]}),ye,t.errorMessage&&e.jsxs("div",{className:"flex items-center gap-2 border-b px-6 py-2 text-xs shrink-0 bg-[var(--destructive)]/10 text-[var(--destructive)]",style:{borderColor:"rgba(239,68,68,0.2)"},children:["// error: ",t.errorMessage]}),w&&e.jsxs("div",{className:"flex items-center gap-2 border-b px-4 md:px-6 py-2 text-xs shrink-0 text-[var(--info)]",style:{backgroundColor:"color-mix(in srgb, var(--info) 8%, transparent)",borderColor:"color-mix(in srgb, var(--info) 20%, transparent)"},children:[e.jsx(bs,{className:"h-3.5 w-3.5 shrink-0"}),e.jsxs("span",{children:[a("tasks.queue_position_banner",{position:String(w.position),total:String(w.total)}),w.position>1?` — ${a("tasks.queue_ahead",{count:String(w.position-1)})}`:` — ${a("tasks.queue_next")}`]})]}),o&&e.jsx(yt,{isOpen:!!o,onClose:ot,taskId:x,stageName:o.stageName,timeoutSeconds:o.timeout,confirmType:o.confirmType,prompt:o.prompt,onSubmitted:V}),e.jsxs("div",{className:"flex min-h-0 flex-1 overflow-hidden",children:[e.jsxs("div",{className:"flex min-w-0 flex-1 flex-col overflow-hidden",children:[e.jsx("div",{className:"flex items-center border-b border-[var(--border)] shrink-0 overflow-x-auto no-scrollbar",children:["terminal","pipeline","logs","detail"].map(s=>e.jsx("button",{onClick:()=>he(s),className:`shrink-0 whitespace-nowrap px-4 py-2.5 text-xs transition-colors ${N===s?"border-b-2 border-[var(--accent)] text-[var(--accent)] font-medium":"text-[var(--text-muted)] hover:text-[var(--text-secondary)]"}`,children:a(s==="terminal"?"tasks.terminal":s==="pipeline"?"tasks.pipeline_tab":s==="logs"?"tasks.logs":"tasks.detail_tab")},s))}),N==="terminal"&&e.jsxs("div",{className:"flex min-h-0 flex-1 flex-col",children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-[var(--border)] px-3 md:px-5 shrink-0",style:{height:36,backgroundColor:"#111111"},children:[e.jsx(Lt,{task:t,ptyStatus:Ze,displayAgentType:Q,t:a}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(It,{isFinished:b,takeoverState:ge,ptyRef:ae,t:a}),!b&&ge==="requesting"&&e.jsxs("span",{className:"flex items-center gap-1.5 px-2.5 h-10 md:h-8 text-[11px] text-[var(--warning)]",children:[e.jsx(Pt,{className:"h-3 w-3 animate-spin"}),a("tasks.requesting_takeover")]}),!b&&t.currentStage&&t.status==="SUSPENDED"&&e.jsxs("button",{onClick:async()=>{try{await h.post(`web/tasks/${x}/confirm-stage`,{json:{stageName:t.currentStage,approved:!1,feedback:""}}),V()}catch{$.error(a("tasks.confirm_failed"))}},className:"hidden md:flex items-center gap-1.5 rounded-[4px] bg-[var(--bg-card)] px-2.5 h-10 md:h-8 text-[11px] text-[var(--text-muted)] hover:text-[var(--text-primary)] transition-colors",children:[e.jsx(vs,{className:"h-3 w-3"}),a("tasks.skip_stage")]}),e.jsx("button",{onClick:()=>Ye(!0),className:"hidden md:flex items-center rounded-[4px] bg-[var(--bg-card)] px-2.5 h-10 md:h-8 text-[var(--text-muted)]",children:e.jsx(js,{className:"h-3 w-3"})})]})]}),e.jsxs("div",{className:"border-b border-[var(--border)] px-4 py-2 shrink-0 md:hidden",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[t.currentStage&&e.jsxs("span",{className:"text-[11px] font-semibold text-[var(--accent)]",children:[a("tasks.stage"),": ",t.currentStage]}),e.jsxs("span",{className:"text-[11px] text-[var(--text-muted)]",children:["agent: ",Q]}),t.workerName&&e.jsxs("span",{className:"text-[11px] text-[var(--text-muted)]",children:["worker: ",t.workerName]})]}),e.jsx("div",{className:"overflow-x-auto no-scrollbar pr-4",style:{borderRadius:0},children:e.jsxs("div",{className:"flex items-center gap-1.5 py-0.5",children:[e.jsx("span",{className:"shrink-0 text-[11px] font-bold text-[var(--accent)]",children:a("tasks.stage_progress")}),j.map((s,c)=>{const m=s.status==="completed",u=s.status==="running",I=s.status==="failed"?"var(--destructive)":m||u?"var(--accent)":"#525252";return e.jsxs("div",{className:"flex items-center",children:[e.jsxs("span",{className:"shrink-0 text-[11px] leading-normal whitespace-nowrap",style:{color:I,fontWeight:u?600:400},children:[s.name,m?" ✓":u?" ...":""]}),c<j.length-1&&e.jsx("div",{className:"mx-1.5 h-px w-4 shrink-0",style:{backgroundColor:I}})]},s.name)})]})})]}),e.jsx("div",{className:"min-h-0 flex-1 overflow-hidden",children:e.jsx(Nt,{ref:ae,taskId:x,sessionId:t.currentSessionId??void 0,taskFinished:b,onStatusChange:et,onTakeoverChange:tt})}),ut]}),N==="pipeline"&&e.jsxs("div",{className:"flex min-h-0 flex-1 flex-col overflow-y-auto p-4 md:p-6 lg:p-8",children:[e.jsx("div",{className:"mb-4 md:mb-5 overflow-x-auto no-scrollbar",style:{borderRadius:0},children:e.jsx("div",{className:"flex items-center py-5",children:j.map((s,c)=>{const m=s.status==="completed",u=s.status==="running",_=s.status==="failed"?"var(--destructive)":m||u?"var(--accent)":"#525252";return e.jsxs("div",{className:"flex items-center",style:{flex:c<j.length-1?1:void 0},children:[e.jsxs("div",{className:"flex flex-col items-center gap-1.5",children:[e.jsxs("div",{className:"flex h-6 w-6 md:h-7 md:w-7 items-center justify-center rounded-full shrink-0",style:{backgroundColor:_},children:[m&&e.jsx("span",{className:"text-[11px] md:text-xs font-semibold text-[#0c0c0c]",children:"✓"}),u&&e.jsx("span",{className:"h-2 w-2 md:h-2.5 md:w-2.5 rounded-full bg-[#0c0c0c]"})]}),e.jsx("span",{className:"text-[11px] leading-normal font-medium whitespace-nowrap",style:{color:_},children:s.name})]}),c<j.length-1&&e.jsx("div",{className:"mx-1 md:mx-2 h-0.5 flex-1 min-w-3 rounded-full",style:{backgroundColor:c<(je>=0?je:0)?"var(--accent)":"#525252"}})]},s.name)})})}),t.currentStage&&e.jsxs("div",{className:"mb-4 md:mb-5 rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-3 text-xs leading-relaxed",children:[e.jsxs("p",{className:"text-[var(--text-secondary)]",children:["// stage: ",t.currentStage," (",je+1,"/",j.length,")"]}),t.startedAt&&e.jsxs("p",{className:"text-[var(--text-secondary)]",children:["// elapsed: ",Y(t.startedAt).replace(" ago","")]}),g&&e.jsxs("p",{className:"text-[var(--text-secondary)]",children:["// time cost: ",g]}),e.jsxs("p",{className:"text-[var(--text-secondary)]",children:["// retries: ",t.retryCount,"/2"]})]}),!t.currentStage&&g&&e.jsx("div",{className:"mb-4 md:mb-5 rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-3 text-xs leading-relaxed",children:e.jsxs("p",{className:"text-[var(--text-secondary)]",children:["// time cost: ",g]})}),e.jsx("button",{onClick:()=>he("terminal"),className:"flex-1 min-h-[100px] rounded-[4px] border border-dashed border-[var(--border)] flex items-center justify-center gap-2 text-[11px] text-[var(--text-muted)] hover:border-[var(--accent)] hover:text-[var(--accent)] transition-colors",children:e.jsxs("span",{children:["// ",a("tasks.view_terminal")]})}),e.jsxs("div",{className:"mt-4 rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4 lg:hidden",children:[e.jsx("span",{className:"text-[11px] font-bold text-[var(--accent)]",children:a("tasks.task_info")}),e.jsxs("div",{className:"mt-2 flex flex-col gap-1.5 text-[11px]",children:[e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-[var(--text-muted)]",children:"project"}),e.jsx("span",{className:"text-[var(--text-primary)]",children:t.projectKey})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-[var(--text-muted)]",children:"worker"}),e.jsx("span",{className:"text-[var(--text-primary)]",children:t.workerName??"-"})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-[var(--text-muted)]",children:"branch"}),e.jsx("span",{className:"text-[var(--text-primary)]",children:t.branch??"-"})]}),dt]})]}),e.jsxs("div",{className:"flex flex-col gap-6 mt-4 lg:hidden",children:[e.jsxs("div",{className:"flex flex-col gap-3",children:[e.jsx("span",{className:"text-[11px] font-medium text-[var(--text-muted)]",children:a("tasks.pipeline_stages")}),e.jsx(Tt,{stages:j,runningBg:"bg-[var(--bg-input)]",py:"py-2"})]}),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx("span",{className:"text-[11px] font-medium text-[var(--text-muted)]",children:a("tasks.activity_log")}),f.length>0?e.jsx("div",{className:"flex flex-col gap-1.5",children:f.slice(-12).map((s,c)=>e.jsx("p",{className:"text-[11px] leading-relaxed text-[var(--text-muted)]",children:s},c))}):e.jsx("span",{className:"text-[11px] text-[var(--text-muted)]",children:a("tasks.no_activity")})]})]})]}),N==="logs"&&e.jsxs("div",{className:"flex flex-1 flex-col gap-3 md:gap-5 overflow-y-auto p-4 md:p-6 lg:p-8",children:[e.jsx("span",{className:"text-[11px] font-bold text-[var(--accent)] md:hidden",children:a("tasks.task_logs")}),e.jsxs("div",{className:"flex flex-col gap-2 md:flex-row md:items-center md:gap-3",children:[e.jsx("div",{className:"flex items-center gap-1 overflow-x-auto no-scrollbar md:hidden",children:["","error","system"].map(s=>e.jsx("button",{onClick:()=>{Qe(s),q(0)},className:`shrink-0 rounded-[4px] px-2.5 py-1 text-[11px] ${X===s?"text-[var(--accent)] bg-[var(--bg-input)]":"text-[var(--text-muted)]"}`,children:s||"all"},s))}),e.jsx("div",{className:"hidden md:block",children:e.jsx(kt,{value:X,onChange:s=>{Qe(s),q(0)},options:[{value:"",label:"all"},{value:"stage_change",label:"stage_change"},{value:"info",label:"info"},{value:"warning",label:"warning"},{value:"error",label:"error"},{value:"system",label:"system"}],className:"w-36"})}),e.jsxs("div",{className:"flex flex-1 items-center gap-2 rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] px-3 py-2",children:[e.jsx(ns,{className:"h-3.5 w-3.5 text-[var(--text-muted)]"}),e.jsx("input",{type:"text",placeholder:a("tasks.search_logs"),value:se,onChange:s=>{Ut(s.target.value),q(0)},className:"flex-1 bg-transparent text-xs text-[var(--text-primary)] outline-none placeholder:text-[var(--text-muted)]"})]})]}),e.jsxs("div",{className:"flex flex-col gap-0.5",children:[Je.map((s,c)=>e.jsxs("div",{className:`flex items-start md:items-center gap-2 md:gap-4 rounded-[4px] px-2 md:px-3 py-2 text-[11px] md:text-xs ${c%2===0?"bg-[var(--bg-card)]":""}`,children:[e.jsx("span",{className:"shrink-0 text-[var(--text-muted)]",children:new Date(s.timestamp).toLocaleTimeString("en-US",{hour12:!1})}),e.jsx("span",{className:`shrink-0 font-medium ${Is(s.type)}`,children:s.type}),e.jsx("span",{className:"min-w-0 break-words md:truncate text-[var(--text-primary)]",children:s.message})]},s.id)),Je.length===0&&!qt&&e.jsx("p",{className:"py-8 text-center text-xs text-[var(--text-muted)]",children:a("tasks.no_log_entries")})]}),te>50&&e.jsxs("div",{className:"flex items-center justify-center gap-1",children:[Array.from({length:Math.ceil(te/50)}).slice(0,5).map((s,c)=>e.jsx("button",{onClick:()=>q(c),className:`rounded-[4px] px-2 py-1 text-xs ${J===c?"bg-[var(--accent)] text-black font-medium":"text-[var(--text-muted)] hover:text-[var(--text-primary)]"}`,children:c+1},c)),Math.ceil(te/50)>5&&e.jsx("button",{onClick:()=>q(J+1),disabled:J>=Math.ceil(te/50)-1,className:"rounded-[4px] px-2 py-1 text-xs text-[var(--text-muted)] disabled:opacity-30",children:">"})]})]}),N==="detail"&&e.jsxs("div",{className:"flex flex-1 flex-col gap-4 md:gap-5 overflow-y-auto p-4 md:p-6 lg:p-8",children:[e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4 md:p-5",children:[e.jsxs("div",{className:"mb-3 flex items-center gap-2",children:[e.jsx(ls,{className:"h-3.5 w-3.5 text-[var(--accent)]"}),e.jsx("span",{className:"text-[11px] font-bold text-[var(--accent)]",children:a("tasks.detail_basic_info")})]}),e.jsxs("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2 lg:grid-cols-3",children:[e.jsxs("div",{className:"flex flex-col gap-1 rounded-[4px] bg-[var(--bg-primary)] p-3",children:[e.jsx("span",{className:"text-[11px] text-[var(--text-muted)]",children:a("tasks.detail_creator")}),e.jsx("span",{className:"text-xs text-[var(--text-primary)]",children:t.creatorName??"-"})]}),e.jsxs("div",{className:"flex flex-col gap-1 rounded-[4px] bg-[var(--bg-primary)] p-3",children:[e.jsx("span",{className:"text-[11px] text-[var(--text-muted)]",children:a("common.created_at")}),e.jsx("span",{className:"text-xs text-[var(--text-primary)]",children:ds(t.createdAt)}),e.jsx("span",{className:"text-[11px] text-[var(--text-muted)]",children:Y(t.createdAt)})]}),e.jsxs("div",{className:"flex flex-col gap-1 rounded-[4px] bg-[var(--bg-primary)] p-3",children:[e.jsx("span",{className:"text-[11px] text-[var(--text-muted)]",children:a("common.status")}),e.jsx(Se,{status:t.status,agentType:t.agentType})]}),e.jsxs("div",{className:"flex flex-col gap-1 rounded-[4px] bg-[var(--bg-primary)] p-3",children:[e.jsx("span",{className:"text-[11px] text-[var(--text-muted)]",children:a("tasks.detail_project")}),e.jsx(ie,{to:`/projects/${t.projectKey}`,className:"text-xs text-[var(--info)] hover:underline transition-colors",children:t.projectKey})]}),e.jsxs("div",{className:"flex flex-col gap-1 rounded-[4px] bg-[var(--bg-primary)] p-3",children:[e.jsx("span",{className:"text-[11px] text-[var(--text-muted)]",children:a("tasks.detail_worker")}),e.jsx("span",{className:"text-xs text-[var(--text-primary)]",children:t.workerName??"-"})]}),e.jsxs("div",{className:"flex flex-col gap-1 rounded-[4px] bg-[var(--bg-primary)] p-3",children:[e.jsx("span",{className:"text-[11px] text-[var(--text-muted)]",children:a("tasks.form_agent_type")}),e.jsx("span",{className:"text-xs text-[var(--text-primary)]",children:Ne})]}),g&&e.jsxs("div",{className:"flex flex-col gap-1 rounded-[4px] bg-[var(--bg-primary)] p-3",children:[e.jsx("span",{className:"text-[11px] text-[var(--text-muted)]",children:a("tasks.detail_time_cost")}),e.jsx("span",{className:"text-xs text-[var(--text-primary)]",children:g})]}),t.branch&&e.jsxs("div",{className:"flex flex-col gap-1 rounded-[4px] bg-[var(--bg-primary)] p-3",children:[e.jsx("span",{className:"text-[11px] text-[var(--text-muted)]",children:a("tasks.detail_branch")}),K(p,t.branch)?e.jsx("a",{href:K(p,t.branch),target:"_blank",rel:"noopener noreferrer",className:"text-xs text-[var(--info)] hover:underline transition-colors truncate",children:t.branch}):e.jsx("span",{className:"text-xs text-[var(--text-primary)] truncate",children:t.branch})]}),t.mrUrl&&/^https?:\/\//.test(t.mrUrl)&&e.jsxs("div",{className:"flex flex-col gap-1 rounded-[4px] bg-[var(--bg-primary)] p-3",children:[e.jsx("span",{className:"text-[11px] text-[var(--text-muted)]",children:a("tasks.mr_link")}),e.jsx("a",{href:t.mrUrl,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-[var(--info)] hover:underline truncate",children:((ft=t.mrUrl.match(/!?\d+$/))==null?void 0:ft[0])??"view"})]})]})]}),e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4 md:p-5",children:[e.jsxs("div",{className:"mb-3 flex items-center gap-2",children:[e.jsx(jt,{className:"h-3.5 w-3.5 text-[var(--accent)]"}),e.jsx("span",{className:"text-[11px] font-bold text-[var(--accent)]",children:a("tasks.detail_task_name")})]}),e.jsxs("div",{className:"flex flex-col gap-3",children:[t.name&&e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx("span",{className:"text-[11px] text-[var(--text-muted)]",children:a("tasks.detail_ai_name")}),e.jsx("span",{className:"text-sm font-medium text-[var(--text-primary)]",children:t.name})]}),e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx("span",{className:"text-[11px] text-[var(--text-muted)]",children:a("tasks.detail_task_id")}),e.jsxs("span",{className:"text-xs text-[var(--text-secondary)]",children:["#",t.id]})]}),t.sourcePlatform&&e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx("span",{className:"text-[11px] text-[var(--text-muted)]",children:a("tasks.detail_source")}),e.jsx("span",{className:"text-xs text-[var(--text-secondary)]",children:t.sourcePlatform})]})]})]}),t.taskMode==="plan"&&t.status===k.COMPLETED&&(()=>{let s="main";if(t.configSnapshot)try{const m=JSON.parse(t.configSnapshot);m.defaultBranch&&(s=m.defaultBranch)}catch{}const c=Ds(p,s);return c?e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4 md:p-5",children:[e.jsxs("div",{className:"mb-3 flex items-center gap-2",children:[e.jsx(jt,{className:"h-3.5 w-3.5 text-[var(--accent)]"}),e.jsx("span",{className:"text-[11px] font-bold text-[var(--accent)]",children:a("plan.view_spec")})]}),e.jsxs("p",{className:"mb-2 text-xs text-[var(--text-muted)]",children:["the spec document was pushed to ",e.jsx("span",{className:"text-[var(--text-secondary)]",children:s})," at ",e.jsx("span",{className:"text-[var(--text-secondary)]",children:"docs/specs/"})]}),e.jsxs("a",{href:c,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1.5 rounded-[4px] border border-[var(--border)] px-3 py-1.5 text-xs text-[var(--info)] hover:underline transition-colors",children:[e.jsx(_e,{className:"h-3 w-3"}),a("plan.view_spec")]})]}):null})(),e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4 md:p-5",children:[e.jsxs("div",{className:"mb-3 flex items-center gap-2",children:[e.jsx(cs,{className:"h-3.5 w-3.5 text-[var(--accent)]"}),e.jsx("span",{className:"text-[11px] font-bold text-[var(--accent)]",children:a("tasks.detail_description")})]}),e.jsx("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] p-4 overflow-x-auto",children:e.jsx("pre",{className:"whitespace-pre-wrap break-words text-xs leading-relaxed text-[var(--text-secondary)] font-mono",children:t.description})})]})]})]}),N==="terminal"&&Vt,N==="pipeline"&&e.jsxs("div",{className:"hidden w-[420px] shrink-0 flex-col gap-5 overflow-y-auto border-l border-[var(--border)] bg-[var(--bg-primary)] p-5 lg:flex",children:[e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx("span",{className:"text-[13px] font-semibold text-[var(--accent)]",children:a("tasks.task_info")}),e.jsxs("div",{className:"flex flex-col gap-1.5 text-xs",children:[e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-[var(--text-muted)]",children:"project"}),e.jsx("span",{className:"text-[var(--text-primary)]",children:t.projectKey})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-[var(--text-muted)]",children:"creator"}),e.jsx("span",{className:"text-[var(--text-primary)]",children:t.creatorName??"-"})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-[var(--text-muted)]",children:"worker"}),e.jsx("span",{className:"text-[var(--text-primary)]",children:t.workerName??"-"})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-[var(--text-muted)]",children:a("common.created_at")}),e.jsx("span",{className:"text-[var(--text-primary)]",children:Y(t.createdAt)})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-[var(--text-muted)]",children:a("tasks.form_agent_type")}),e.jsx("span",{className:"text-[var(--text-primary)]",children:Ne})]}),g&&e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-[var(--text-muted)]",children:"time cost"}),e.jsx("span",{className:"text-[var(--text-primary)]",children:g})]}),dt]})]}),e.jsx("div",{className:"h-px bg-[var(--border)]"}),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx("span",{className:"text-[13px] font-semibold text-[var(--accent)]",children:a("tasks.workspace_section")}),e.jsxs("div",{className:"flex flex-col gap-1.5 text-xs",children:[e.jsxs("div",{className:"flex min-w-0 justify-between",children:[e.jsx("span",{className:"shrink-0 text-[var(--text-muted)]",children:"branch"}),e.jsx("span",{className:"ml-4 min-w-0 truncate text-[var(--text-primary)]",children:t.branch??(B==null?void 0:B.branch)??"-"})]}),e.jsxs("div",{className:"flex min-w-0 justify-between",children:[e.jsx("span",{className:"shrink-0 text-[var(--text-muted)]",children:"worktree"}),e.jsx("span",{className:"ml-4 min-w-0 truncate text-[var(--text-primary)]",children:(B==null?void 0:B.path)??"-"})]}),t.mrUrl&&e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-[var(--text-muted)]",children:a("tasks.mr_link")}),e.jsx("a",{href:t.mrUrl,target:"_blank",rel:"noopener noreferrer",className:"font-medium text-[var(--info)] hover:underline",children:((vt=t.mrUrl.match(/!?\d+$/))==null?void 0:vt[0])??"view"})]})]})]}),e.jsx("div",{className:"h-px bg-[var(--border)]"}),e.jsxs("div",{ref:st,className:"flex flex-col gap-2",children:[e.jsx("span",{className:"text-[13px] font-semibold text-[var(--accent)]",children:a("tasks.cursor_tunnel_section")}),t.workerId?e.jsx(ks,{taskId:x,taskFinished:b,compact:!0}):e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:a("tasks.no_worker_assigned")})]}),e.jsx("div",{className:"h-px bg-[var(--border)]"}),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx("span",{className:"text-[13px] font-semibold text-[var(--accent)]",children:a("tasks.stage_timeline")}),e.jsx("div",{className:"flex flex-col gap-2 text-xs",children:j.map(s=>{const c=s.status==="completed"?"✓":s.status==="running"?"→":"·",m=s.status==="running"?"var(--accent)":s.status==="completed"?"var(--info)":s.status==="failed"?"var(--destructive)":"#525252",u=s.status==="completed"?"done":s.status==="running"?"running...":s.status==="failed"?"failed":"pending";return e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"font-semibold",style:{color:m},children:c}),e.jsx("span",{className:s.status==="running"?"font-medium":"",style:{color:m},children:s.name}),e.jsxs("span",{className:"text-[11px]",style:{color:"#525252"},children:["— ",u]})]},s.name)})})]})]})]}),ke]})}export{ta as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as e}from"./index-
|
|
1
|
+
import{j as e}from"./index-0QFy9ku9.js";import{a as s}from"./DocsPrimitives-CipzCTEu.js";import"./copy-BWTAfZ7b.js";const a=`ov task create -d "implement oauth login" -p WEB -t feat
|
|
2
2
|
ov task plan -d "design auth system" -p WEB
|
|
3
3
|
ov task review 42 --agent codex,cursor
|
|
4
4
|
ov task fork 42 -d "retry with a simpler approach"`,r=`develop "implement oauth login" --project WEB --type feat
|