@straiffi/archon 1.2.8 → 1.2.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{TestsDialog-XEE4TEv4.js → TestsDialog-BAX7URPJ.js} +1 -1
- package/dist/client/assets/{badge-RYXMXLW8.js → badge-DtLPY3ow.js} +12 -12
- package/dist/client/assets/index-CR9TvPQN.js +149 -0
- package/dist/client/assets/index-Qf62KDwt.css +2 -0
- package/dist/client/index.html +3 -3
- package/dist/server/db.js +33 -0
- package/dist/server/db.js.map +1 -1
- package/dist/server/index.js +120 -3
- package/dist/server/index.js.map +1 -1
- package/dist/server/lib/agent.js +2 -2
- package/dist/server/lib/agent.js.map +1 -1
- package/dist/server/lib/attachments.js +202 -0
- package/dist/server/lib/attachments.js.map +1 -0
- package/dist/server/lib/buildFlow.js +1 -1
- package/dist/server/lib/buildFlow.js.map +1 -1
- package/dist/server/lib/chatMessages.js +4 -1
- package/dist/server/lib/chatMessages.js.map +1 -1
- package/dist/server/lib/chatOperations.js +33 -11
- package/dist/server/lib/chatOperations.js.map +1 -1
- package/dist/server/lib/chats.js +8 -3
- package/dist/server/lib/chats.js.map +1 -1
- package/dist/server/lib/runtimePaths.js +7 -0
- package/dist/server/lib/runtimePaths.js.map +1 -1
- package/dist/server/lib/thinkingState.js +67 -0
- package/dist/server/lib/thinkingState.js.map +1 -0
- package/dist/server/lib/ticketUndo.js +2 -2
- package/dist/server/lib/ticketUndo.js.map +1 -1
- package/dist/server/lib/ticketWorkflowOperations.js +1 -1
- package/dist/server/lib/ticketWorkflowOperations.js.map +1 -1
- package/dist/server/lib/tickets.js +6 -0
- package/dist/server/lib/tickets.js.map +1 -1
- package/dist/server/workers/build.js +6 -1
- package/dist/server/workers/build.js.map +1 -1
- package/dist/server/workers/chat.js +55 -9
- package/dist/server/workers/chat.js.map +1 -1
- package/dist/server/workers/followUp.js +6 -1
- package/dist/server/workers/followUp.js.map +1 -1
- package/dist/server/workers/plan.js +7 -2
- package/dist/server/workers/plan.js.map +1 -1
- package/dist/server/workers/planFollowUp.js +7 -2
- package/dist/server/workers/planFollowUp.js.map +1 -1
- package/dist/server/workers/review.js +5 -0
- package/dist/server/workers/review.js.map +1 -1
- package/package.json +1 -1
- package/dist/client/assets/index-BAYGY5L6.js +0 -149
- package/dist/client/assets/index-DWMCGEsT.css +0 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-BYbx6iT9.js";import{At as t,Bt as n,Dt as r,Ft as i,It as a,a as o,d as s,ht as c,i as l,kt as u,n as d,o as f,r as p,t as m,u as h}from"./badge-RYXMXLW8.js";import{_ as g,a as _,c as v,d as y,f as ee,g as b,h as x,i as S,l as C,m as w,n as T,o as E,p as D,r as te,s as O,t as k,u as ne,v as re,y as ie}from"./index-BAYGY5L6.js";var A=e(n(),1),ae=(e,n)=>a(t(`/projects/${e}/test-sessions`),{method:`POST`,body:n,fallbackErrorMessage:`Unable to open the test runner right now.`}),oe=(e,n)=>a(t(`/tickets/${e}/test-sessions${n?`?project_id=${encodeURIComponent(n)}`:``}`),{method:`POST`,fallbackErrorMessage:`Unable to open the test runner right now.`}),se=(e,n={})=>a(t(`/test-sessions/${e}/discovery${n.commandId?`?command_id=${encodeURIComponent(n.commandId)}`:``}`),{signal:n.signal,fallbackErrorMessage:`Unable to discover tests right now.`}),ce=(e,n)=>a(t(`/test-sessions/${e}/run`),{method:`POST`,body:n,fallbackErrorMessage:`Unable to start the selected tests right now.`}),le=e=>a(t(`/test-sessions/${e}/stop`),{method:`POST`,fallbackErrorMessage:`Unable to stop the test run right now.`}),ue=e=>i(t(`/test-sessions/${e}`),{method:`DELETE`,fallbackErrorMessage:`Unable to close the test runner right now.`}),j=r(),M=256*1024,N=24,P=RegExp(`\x1B\\[[0-9;?]*[ -/]*[@-~]`,`g`),F=(e,t)=>d.t(`common:testsDialog.${e}`,t),de=(e,t)=>{let n=`${e}${t}`;return n.length<=M?n:n.slice(-M)},I=e=>e.replace(P,``),fe=e=>e.scrollHeight-e.scrollTop-e.clientHeight<=N,L=e=>{e.scrollTop=e.scrollHeight},pe=(e,t=!1)=>{L(e);let n=0,r=0;return n=window.requestAnimationFrame(()=>{L(e),t&&(r=window.requestAnimationFrame(()=>{L(e)}))}),()=>{window.cancelAnimationFrame(n),r!==0&&window.cancelAnimationFrame(r)}},me=e=>{if(!e)return[];try{let t=JSON.parse(e);return Array.isArray(t)?t.flatMap(e=>{if(!e||typeof e!=`object`||Array.isArray(e))return[];let t=e;if(typeof t.id!=`string`||typeof t.name!=`string`||typeof t.command!=`string`)return[];let n=t.runner===`vitest`||t.runner===`jest`||t.runner===`unknown`?t.runner:`auto`;return[{id:t.id,name:t.name,command:t.command,runner:n,...typeof t.cwd==`string`&&t.cwd.trim()!==``?{cwd:t.cwd}:{}}]}):[]}catch{return[]}},R=e=>e===`running`?`border-sky-400/40 bg-sky-500/10 text-sky-200`:e===`passed`?`border-emerald-400/40 bg-emerald-500/10 text-emerald-200`:e===`failed`||e===`error`?`border-rose-400/40 bg-rose-500/10 text-rose-200`:e===`stopped`?`border-amber-400/40 bg-amber-500/10 text-amber-200`:`border-border/70 bg-background/60 text-muted-foreground`,he=e=>e==null?null:e<1e3?`${e} ms`:`${(e/1e3).toFixed(e>=1e4?0:1)} s`,z=e=>{let t=e.split(`/`);return t[t.length-1]||e},B=e=>e.toLowerCase().trim().split(/\s+/).filter(Boolean),V=(e,t)=>e.length===0?!0:e.every(e=>t.some(t=>t.includes(e))),H=(e,t)=>{let n=B(t);return n.length===0?e:e.flatMap(e=>{let t=z(e.path);if(V(n,[t.toLowerCase(),e.path.toLowerCase()]))return[e];let r=e.cases.filter(r=>V(n,[t.toLowerCase(),e.path.toLowerCase(),r.name.toLowerCase()]));return r.length===0?[]:[{...e,cases:r}]})},U=e=>F(e===`passed`?`status.passed`:e===`failed`?`status.failed`:e===`running`?`status.running`:e===`error`?`status.error`:e===`stopped`?`status.stopped`:`status.idle`),ge=e=>e?.selection?e.selection.kind===`all`?F(`selection.allTests`):e.selection.kind===`case`?e.selection.name:z(e.selection.path):F(`selection.noRunYet`),W=e=>/(^|\s)(?:FAIL|✗)(\s|$)|\b(?:failed|error|stderr|Expected:|Received:)\b/i.test(e)?`failure`:/(^|\s)(?:PASS|✓)(\s|$)|\bpassed\b/i.test(e)?`success`:/\b(?:WARN|warning|skipped|todo|pending)\b/i.test(e)?`warning`:`default`,G=e=>e===`failure`?`text-rose-200`:e===`success`?`text-emerald-200`:e===`warning`?`text-amber-200`:`text-slate-200`,_e=(e,t)=>e===t?!0:e.length===t.length?e.every((e,n)=>{let r=t[n];return r!=null&&e.id===r.id&&e.name===r.name&&e.command===r.command&&e.cwd===r.cwd&&e.runner===r.runner}):!1,ve=`min-w-24 justify-center shadow-none transition-none disabled:opacity-100`,K=({line:e,tone:t})=>(0,j.jsx)(`div`,{"data-tone":t,className:s(`whitespace-pre-wrap break-words`,G(t)),children:e===``?` `:e}),q=(0,A.memo)(({canRunGranular:e,filePath:t,isActive:n,name:r,onRunCase:i})=>(0,j.jsxs)(`button`,{type:`button`,"aria-label":F(`caseRow.runAriaLabel`,{name:r}),title:r,className:s(`flex w-full min-w-0 items-center gap-2.5 rounded-xl px-2.5 py-1.5 text-left transition-colors outline-none focus-visible:ring-2 focus-visible:ring-ring/50`,e?`cursor-pointer hover:bg-sky-500/10`:`cursor-not-allowed opacity-60`,n&&`bg-sky-500/10`),disabled:!e,onClick:()=>{i(t,r)},children:[(0,j.jsx)(`span`,{className:`h-2 w-2 shrink-0 rounded-full bg-sky-300/80`}),(0,j.jsx)(`span`,{className:`truncate text-xs text-foreground`,children:r})]}));q.displayName=`TestCaseRow`;var J=(0,A.memo)(({activeSelectionKind:e,activeSelectionName:t,activeSelectionPath:n,canRunGranular:r,file:i,isExpanded:a,onRunCase:c,onRunFile:l,onToggleFile:u})=>{let d=e===`file`&&n===i.path,f=e===`case`&&n===i.path;return(0,j.jsx)(O,{open:a,onOpenChange:e=>{u(i.path,e)},children:(0,j.jsxs)(`div`,{className:`space-y-1`,children:[(0,j.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,j.jsx)(C,{asChild:!0,children:(0,j.jsx)(h,{type:`button`,variant:`ghost`,size:`icon-xs`,"aria-label":F(a?`fileRow.collapseAriaLabel`:`fileRow.expandAriaLabel`,{path:i.path}),className:`mt-1 shrink-0 text-muted-foreground hover:text-foreground`,children:(0,j.jsx)(o,{className:s(`h-4 w-4 transition-transform`,a&&`rotate-180`)})})}),(0,j.jsx)(`button`,{type:`button`,"aria-label":F(`fileRow.runAriaLabel`,{path:i.path}),className:s(`min-w-0 flex-1 rounded-xl border border-border/60 bg-background/20 px-2.5 py-2 text-left transition-colors outline-none focus-visible:ring-2 focus-visible:ring-ring/50`,r?`cursor-pointer hover:border-sky-400/35 hover:bg-sky-500/10`:`cursor-not-allowed opacity-60`,(d||f)&&`border-sky-400/45 bg-sky-500/10`),disabled:!r,onClick:()=>{l(i.path)},children:(0,j.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2.5`,children:[(0,j.jsx)(`span`,{className:`flex size-6 shrink-0 items-center justify-center rounded-md border border-border/70 bg-background/60 text-sky-200`,children:(0,j.jsx)(E,{className:`h-3.5 w-3.5`})}),(0,j.jsxs)(`span`,{className:`flex min-w-0 flex-1 items-start justify-between gap-3`,children:[(0,j.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,j.jsx)(`span`,{className:`block truncate text-xs font-medium text-foreground`,children:z(i.path)}),(0,j.jsx)(`span`,{className:`mt-0.5 block truncate text-[11px] text-muted-foreground`,children:i.path})]}),(0,j.jsx)(`span`,{className:`shrink-0 text-[11px] text-muted-foreground`,children:F(`fileRow.testCount`,{count:i.cases.length})})]})]})})]}),(0,j.jsx)(v,{children:(0,j.jsx)(`div`,{className:`ml-4 border-l border-border/60 pl-6`,children:i.cases.length===0?(0,j.jsx)(`p`,{className:`px-2.5 py-1.5 text-xs text-muted-foreground`,children:F(`fileRow.noNamedTests`)}):(0,j.jsx)(`div`,{className:`space-y-1`,children:i.cases.map(a=>{let o=e===`case`&&n===i.path&&t===a.name;return(0,j.jsx)(q,{canRunGranular:r,filePath:i.path,isActive:o,name:a.name,onRunCase:c},a.id)})})})})]})})});J.displayName=`DiscoveryFileRow`;var ye=(0,A.memo)(({activeSelectionKind:e,activeSelectionName:t,activeSelectionPath:n,availableCommands:r,canRunGranular:i,discovery:a,expandedFiles:c,fullSuiteOnlyNotice:u,isLoading:d,selectedCommandId:m,selectedCommandName:g,sessionError:v,sessionStatus:y,shouldShowCommandSelector:ee,onRunCase:b,onRunFile:x,onSelectCommand:C,onToggleFile:w})=>{let[E,D]=(0,A.useState)(``),O=(0,A.useMemo)(()=>H(a,E),[a,E]),k=(0,A.useMemo)(()=>O.reduce((e,t)=>e+t.cases.length,0),[O]),ne=B(E).length>0;return(0,j.jsx)(`aside`,{className:`min-h-0 border-b border-border/70 px-4 py-4 lg:border-r lg:border-b-0`,children:(0,j.jsxs)(`div`,{className:`flex h-full min-h-0 flex-col gap-3`,children:[ee&&(0,j.jsxs)(`div`,{className:`space-y-2`,children:[(0,j.jsx)(`p`,{className:`text-xs uppercase tracking-[0.22em] text-muted-foreground`,children:F(`scope.label`)}),(0,j.jsxs)(T,{children:[(0,j.jsx)(_,{asChild:!0,children:(0,j.jsxs)(h,{type:`button`,variant:`outline`,className:`w-full justify-between rounded-xl border-border/70 bg-background/60`,"aria-label":F(`scope.selectedCommandAriaLabel`),disabled:r.length===0||y===`running`,children:[(0,j.jsx)(`span`,{className:`truncate`,children:g??F(`scope.selectTestScope`)}),(0,j.jsx)(o,{className:`h-4 w-4 text-muted-foreground`})]})}),(0,j.jsx)(te,{align:`start`,className:`w-72`,children:r.map(e=>(0,j.jsx)(S,{className:s(m===e.id&&`bg-accent text-accent-foreground`),onSelect:()=>{C(e.id)},children:(0,j.jsx)(`span`,{className:`truncate`,children:e.name})},e.id))})]})]}),u&&(0,j.jsx)(`div`,{className:`rounded-2xl border border-border/70 bg-background/30 px-4 py-3 text-sm text-muted-foreground`,children:u}),(a.length>0||E.length>0)&&(0,j.jsxs)(`div`,{className:`relative mt-1 shrink-0`,children:[(0,j.jsx)(f,{type:`search`,value:E,onChange:e=>{D(e.target.value)},placeholder:F(`filter.placeholder`),"aria-label":F(`filter.ariaLabel`),className:`pr-10`}),E.length>0&&(0,j.jsx)(h,{type:`button`,variant:`ghost`,size:`icon-sm`,"aria-label":F(`filter.clearAriaLabel`),className:`absolute right-1 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground`,onClick:()=>{D(``)},children:(0,j.jsx)(p,{className:`size-4`})})]}),!r.length&&(0,j.jsx)(`div`,{className:`rounded-2xl border border-dashed border-border/70 bg-background/20 px-4 py-4 text-sm text-muted-foreground`,children:F(`discovery.noCommands`)}),v&&(0,j.jsx)(`div`,{className:`rounded-2xl border border-rose-500/30 bg-rose-500/10 px-4 py-3 text-sm text-rose-200`,children:v}),(0,j.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col gap-3 overflow-hidden rounded-2xl border border-border/70 bg-background/20 p-4`,children:[(0,j.jsxs)(`div`,{className:`shrink-0 flex items-start justify-between gap-3`,children:[(0,j.jsx)(`div`,{className:`min-w-0`,children:(0,j.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[F(`discovery.fileCount`,{count:O.length}),`, `,F(`discovery.caseCount`,{count:k})]})}),d&&(0,j.jsx)(l,{className:`h-4 w-4 animate-spin text-muted-foreground`})]}),(0,j.jsx)(`div`,{className:`min-h-0 flex-1 space-y-2 overflow-y-auto pr-1`,children:a.length===0&&!d?(0,j.jsx)(`div`,{className:`rounded-2xl border border-dashed border-border/70 bg-background/20 px-4 py-5 text-sm text-muted-foreground`,children:F(`discovery.noFilesDetected`)}):O.length===0?(0,j.jsx)(`div`,{className:`rounded-2xl border border-dashed border-border/70 bg-background/20 px-4 py-5 text-sm text-muted-foreground`,children:F(`discovery.noFilterMatches`)}):O.map(r=>(0,j.jsx)(J,{activeSelectionKind:e,activeSelectionName:t,activeSelectionPath:n,canRunGranular:i,file:r,isExpanded:ne||(c[r.path]??!1),onRunCase:b,onRunFile:x,onToggleFile:w},r.path))})]})]})})});ye.displayName=`DiscoveryPane`;var be=(0,A.memo)(({durationMs:e,output:t,outputTruncated:n,selectionLabel:r,status:i,summaryCounts:a,viewportRef:o,onScroll:c})=>{let l=(0,A.useMemo)(()=>t?I(t).replaceAll(`\r
|
|
1
|
+
import{a as e}from"./rolldown-runtime-BYbx6iT9.js";import{At as t,Dt as n,Ft as r,It as i,Vt as a,a as o,d as s,ht as c,i as l,kt as u,n as d,o as f,r as p,t as m,u as h}from"./badge-DtLPY3ow.js";import{_ as g,a as _,c as v,d as y,f as ee,g as b,h as x,i as S,l as C,m as w,n as T,o as E,p as D,r as te,s as O,t as k,u as ne,v as re,y as ie}from"./index-CR9TvPQN.js";var A=e(a(),1),ae=(e,n)=>i(t(`/projects/${e}/test-sessions`),{method:`POST`,body:n,fallbackErrorMessage:`Unable to open the test runner right now.`}),oe=(e,n)=>i(t(`/tickets/${e}/test-sessions${n?`?project_id=${encodeURIComponent(n)}`:``}`),{method:`POST`,fallbackErrorMessage:`Unable to open the test runner right now.`}),se=(e,n={})=>i(t(`/test-sessions/${e}/discovery${n.commandId?`?command_id=${encodeURIComponent(n.commandId)}`:``}`),{signal:n.signal,fallbackErrorMessage:`Unable to discover tests right now.`}),ce=(e,n)=>i(t(`/test-sessions/${e}/run`),{method:`POST`,body:n,fallbackErrorMessage:`Unable to start the selected tests right now.`}),le=e=>i(t(`/test-sessions/${e}/stop`),{method:`POST`,fallbackErrorMessage:`Unable to stop the test run right now.`}),ue=e=>r(t(`/test-sessions/${e}`),{method:`DELETE`,fallbackErrorMessage:`Unable to close the test runner right now.`}),j=n(),M=256*1024,N=24,P=RegExp(`\x1B\\[[0-9;?]*[ -/]*[@-~]`,`g`),F=(e,t)=>d.t(`common:testsDialog.${e}`,t),de=(e,t)=>{let n=`${e}${t}`;return n.length<=M?n:n.slice(-M)},I=e=>e.replace(P,``),fe=e=>e.scrollHeight-e.scrollTop-e.clientHeight<=N,L=e=>{e.scrollTop=e.scrollHeight},pe=(e,t=!1)=>{L(e);let n=0,r=0;return n=window.requestAnimationFrame(()=>{L(e),t&&(r=window.requestAnimationFrame(()=>{L(e)}))}),()=>{window.cancelAnimationFrame(n),r!==0&&window.cancelAnimationFrame(r)}},me=e=>{if(!e)return[];try{let t=JSON.parse(e);return Array.isArray(t)?t.flatMap(e=>{if(!e||typeof e!=`object`||Array.isArray(e))return[];let t=e;if(typeof t.id!=`string`||typeof t.name!=`string`||typeof t.command!=`string`)return[];let n=t.runner===`vitest`||t.runner===`jest`||t.runner===`unknown`?t.runner:`auto`;return[{id:t.id,name:t.name,command:t.command,runner:n,...typeof t.cwd==`string`&&t.cwd.trim()!==``?{cwd:t.cwd}:{}}]}):[]}catch{return[]}},R=e=>e===`running`?`border-sky-400/40 bg-sky-500/10 text-sky-200`:e===`passed`?`border-emerald-400/40 bg-emerald-500/10 text-emerald-200`:e===`failed`||e===`error`?`border-rose-400/40 bg-rose-500/10 text-rose-200`:e===`stopped`?`border-amber-400/40 bg-amber-500/10 text-amber-200`:`border-border/70 bg-background/60 text-muted-foreground`,he=e=>e==null?null:e<1e3?`${e} ms`:`${(e/1e3).toFixed(e>=1e4?0:1)} s`,z=e=>{let t=e.split(`/`);return t[t.length-1]||e},B=e=>e.toLowerCase().trim().split(/\s+/).filter(Boolean),V=(e,t)=>e.length===0?!0:e.every(e=>t.some(t=>t.includes(e))),H=(e,t)=>{let n=B(t);return n.length===0?e:e.flatMap(e=>{let t=z(e.path);if(V(n,[t.toLowerCase(),e.path.toLowerCase()]))return[e];let r=e.cases.filter(r=>V(n,[t.toLowerCase(),e.path.toLowerCase(),r.name.toLowerCase()]));return r.length===0?[]:[{...e,cases:r}]})},U=e=>F(e===`passed`?`status.passed`:e===`failed`?`status.failed`:e===`running`?`status.running`:e===`error`?`status.error`:e===`stopped`?`status.stopped`:`status.idle`),ge=e=>e?.selection?e.selection.kind===`all`?F(`selection.allTests`):e.selection.kind===`case`?e.selection.name:z(e.selection.path):F(`selection.noRunYet`),W=e=>/(^|\s)(?:FAIL|✗)(\s|$)|\b(?:failed|error|stderr|Expected:|Received:)\b/i.test(e)?`failure`:/(^|\s)(?:PASS|✓)(\s|$)|\bpassed\b/i.test(e)?`success`:/\b(?:WARN|warning|skipped|todo|pending)\b/i.test(e)?`warning`:`default`,G=e=>e===`failure`?`text-rose-200`:e===`success`?`text-emerald-200`:e===`warning`?`text-amber-200`:`text-slate-200`,_e=(e,t)=>e===t?!0:e.length===t.length?e.every((e,n)=>{let r=t[n];return r!=null&&e.id===r.id&&e.name===r.name&&e.command===r.command&&e.cwd===r.cwd&&e.runner===r.runner}):!1,ve=`min-w-24 justify-center shadow-none transition-none disabled:opacity-100`,K=({line:e,tone:t})=>(0,j.jsx)(`div`,{"data-tone":t,className:s(`whitespace-pre-wrap break-words`,G(t)),children:e===``?` `:e}),q=(0,A.memo)(({canRunGranular:e,filePath:t,isActive:n,name:r,onRunCase:i})=>(0,j.jsxs)(`button`,{type:`button`,"aria-label":F(`caseRow.runAriaLabel`,{name:r}),title:r,className:s(`flex w-full min-w-0 items-center gap-2.5 rounded-xl px-2.5 py-1.5 text-left transition-colors outline-none focus-visible:ring-2 focus-visible:ring-ring/50`,e?`cursor-pointer hover:bg-sky-500/10`:`cursor-not-allowed opacity-60`,n&&`bg-sky-500/10`),disabled:!e,onClick:()=>{i(t,r)},children:[(0,j.jsx)(`span`,{className:`h-2 w-2 shrink-0 rounded-full bg-sky-300/80`}),(0,j.jsx)(`span`,{className:`truncate text-xs text-foreground`,children:r})]}));q.displayName=`TestCaseRow`;var J=(0,A.memo)(({activeSelectionKind:e,activeSelectionName:t,activeSelectionPath:n,canRunGranular:r,file:i,isExpanded:a,onRunCase:c,onRunFile:l,onToggleFile:u})=>{let d=e===`file`&&n===i.path,f=e===`case`&&n===i.path;return(0,j.jsx)(O,{open:a,onOpenChange:e=>{u(i.path,e)},children:(0,j.jsxs)(`div`,{className:`space-y-1`,children:[(0,j.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,j.jsx)(C,{asChild:!0,children:(0,j.jsx)(h,{type:`button`,variant:`ghost`,size:`icon-xs`,"aria-label":F(a?`fileRow.collapseAriaLabel`:`fileRow.expandAriaLabel`,{path:i.path}),className:`mt-1 shrink-0 text-muted-foreground hover:text-foreground`,children:(0,j.jsx)(o,{className:s(`h-4 w-4 transition-transform`,a&&`rotate-180`)})})}),(0,j.jsx)(`button`,{type:`button`,"aria-label":F(`fileRow.runAriaLabel`,{path:i.path}),className:s(`min-w-0 flex-1 rounded-xl border border-border/60 bg-background/20 px-2.5 py-2 text-left transition-colors outline-none focus-visible:ring-2 focus-visible:ring-ring/50`,r?`cursor-pointer hover:border-sky-400/35 hover:bg-sky-500/10`:`cursor-not-allowed opacity-60`,(d||f)&&`border-sky-400/45 bg-sky-500/10`),disabled:!r,onClick:()=>{l(i.path)},children:(0,j.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2.5`,children:[(0,j.jsx)(`span`,{className:`flex size-6 shrink-0 items-center justify-center rounded-md border border-border/70 bg-background/60 text-sky-200`,children:(0,j.jsx)(E,{className:`h-3.5 w-3.5`})}),(0,j.jsxs)(`span`,{className:`flex min-w-0 flex-1 items-start justify-between gap-3`,children:[(0,j.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,j.jsx)(`span`,{className:`block truncate text-xs font-medium text-foreground`,children:z(i.path)}),(0,j.jsx)(`span`,{className:`mt-0.5 block truncate text-[11px] text-muted-foreground`,children:i.path})]}),(0,j.jsx)(`span`,{className:`shrink-0 text-[11px] text-muted-foreground`,children:F(`fileRow.testCount`,{count:i.cases.length})})]})]})})]}),(0,j.jsx)(v,{children:(0,j.jsx)(`div`,{className:`ml-4 border-l border-border/60 pl-6`,children:i.cases.length===0?(0,j.jsx)(`p`,{className:`px-2.5 py-1.5 text-xs text-muted-foreground`,children:F(`fileRow.noNamedTests`)}):(0,j.jsx)(`div`,{className:`space-y-1`,children:i.cases.map(a=>{let o=e===`case`&&n===i.path&&t===a.name;return(0,j.jsx)(q,{canRunGranular:r,filePath:i.path,isActive:o,name:a.name,onRunCase:c},a.id)})})})})]})})});J.displayName=`DiscoveryFileRow`;var ye=(0,A.memo)(({activeSelectionKind:e,activeSelectionName:t,activeSelectionPath:n,availableCommands:r,canRunGranular:i,discovery:a,expandedFiles:c,fullSuiteOnlyNotice:u,isLoading:d,selectedCommandId:m,selectedCommandName:g,sessionError:v,sessionStatus:y,shouldShowCommandSelector:ee,onRunCase:b,onRunFile:x,onSelectCommand:C,onToggleFile:w})=>{let[E,D]=(0,A.useState)(``),O=(0,A.useMemo)(()=>H(a,E),[a,E]),k=(0,A.useMemo)(()=>O.reduce((e,t)=>e+t.cases.length,0),[O]),ne=B(E).length>0;return(0,j.jsx)(`aside`,{className:`min-h-0 border-b border-border/70 px-4 py-4 lg:border-r lg:border-b-0`,children:(0,j.jsxs)(`div`,{className:`flex h-full min-h-0 flex-col gap-3`,children:[ee&&(0,j.jsxs)(`div`,{className:`space-y-2`,children:[(0,j.jsx)(`p`,{className:`text-xs uppercase tracking-[0.22em] text-muted-foreground`,children:F(`scope.label`)}),(0,j.jsxs)(T,{children:[(0,j.jsx)(_,{asChild:!0,children:(0,j.jsxs)(h,{type:`button`,variant:`outline`,className:`w-full justify-between rounded-xl border-border/70 bg-background/60`,"aria-label":F(`scope.selectedCommandAriaLabel`),disabled:r.length===0||y===`running`,children:[(0,j.jsx)(`span`,{className:`truncate`,children:g??F(`scope.selectTestScope`)}),(0,j.jsx)(o,{className:`h-4 w-4 text-muted-foreground`})]})}),(0,j.jsx)(te,{align:`start`,className:`w-72`,children:r.map(e=>(0,j.jsx)(S,{className:s(m===e.id&&`bg-accent text-accent-foreground`),onSelect:()=>{C(e.id)},children:(0,j.jsx)(`span`,{className:`truncate`,children:e.name})},e.id))})]})]}),u&&(0,j.jsx)(`div`,{className:`rounded-2xl border border-border/70 bg-background/30 px-4 py-3 text-sm text-muted-foreground`,children:u}),(a.length>0||E.length>0)&&(0,j.jsxs)(`div`,{className:`relative mt-1 shrink-0`,children:[(0,j.jsx)(f,{type:`search`,value:E,onChange:e=>{D(e.target.value)},placeholder:F(`filter.placeholder`),"aria-label":F(`filter.ariaLabel`),className:`pr-10`}),E.length>0&&(0,j.jsx)(h,{type:`button`,variant:`ghost`,size:`icon-sm`,"aria-label":F(`filter.clearAriaLabel`),className:`absolute right-1 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground`,onClick:()=>{D(``)},children:(0,j.jsx)(p,{className:`size-4`})})]}),!r.length&&(0,j.jsx)(`div`,{className:`rounded-2xl border border-dashed border-border/70 bg-background/20 px-4 py-4 text-sm text-muted-foreground`,children:F(`discovery.noCommands`)}),v&&(0,j.jsx)(`div`,{className:`rounded-2xl border border-rose-500/30 bg-rose-500/10 px-4 py-3 text-sm text-rose-200`,children:v}),(0,j.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col gap-3 overflow-hidden rounded-2xl border border-border/70 bg-background/20 p-4`,children:[(0,j.jsxs)(`div`,{className:`shrink-0 flex items-start justify-between gap-3`,children:[(0,j.jsx)(`div`,{className:`min-w-0`,children:(0,j.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[F(`discovery.fileCount`,{count:O.length}),`, `,F(`discovery.caseCount`,{count:k})]})}),d&&(0,j.jsx)(l,{className:`h-4 w-4 animate-spin text-muted-foreground`})]}),(0,j.jsx)(`div`,{className:`min-h-0 flex-1 space-y-2 overflow-y-auto pr-1`,children:a.length===0&&!d?(0,j.jsx)(`div`,{className:`rounded-2xl border border-dashed border-border/70 bg-background/20 px-4 py-5 text-sm text-muted-foreground`,children:F(`discovery.noFilesDetected`)}):O.length===0?(0,j.jsx)(`div`,{className:`rounded-2xl border border-dashed border-border/70 bg-background/20 px-4 py-5 text-sm text-muted-foreground`,children:F(`discovery.noFilterMatches`)}):O.map(r=>(0,j.jsx)(J,{activeSelectionKind:e,activeSelectionName:t,activeSelectionPath:n,canRunGranular:i,file:r,isExpanded:ne||(c[r.path]??!1),onRunCase:b,onRunFile:x,onToggleFile:w},r.path))})]})]})})});ye.displayName=`DiscoveryPane`;var be=(0,A.memo)(({durationMs:e,output:t,outputTruncated:n,selectionLabel:r,status:i,summaryCounts:a,viewportRef:o,onScroll:c})=>{let l=(0,A.useMemo)(()=>t?I(t).replaceAll(`\r
|
|
2
2
|
`,`
|
|
3
3
|
`).replaceAll(`\r`,`
|
|
4
4
|
`).split(`
|