fix(ui): show a parked task's error once and wrap long log lines on a phone

This commit is contained in:
sam committed 2026-10-19 01:47:34 +11:00
1 parent 8d0d707d3e
commit 30105666e2
5 files changed
+9 -9

No files matched your search

+1 -1
View File
@@ -1 +1 @@
.xterm{cursor:text;-webkit-user-select:none;user-select:none;position:relative}.xterm.focus,.xterm:focus{outline:none}.xterm .xterm-helpers{z-index:5;position:absolute;top:0}.xterm .xterm-helper-textarea{opacity:0;z-index:-5;white-space:nowrap;resize:none;border:0;width:0;height:0;margin:0;padding:0;position:absolute;top:0;left:-9999em;overflow:hidden}.xterm .composition-view{color:#fff;white-space:nowrap;z-index:1;background:#000;display:none;position:absolute}.xterm .composition-view.active{display:block}.xterm .xterm-viewport{cursor:default;background-color:#000;position:absolute;inset:0;overflow-y:scroll}.xterm .xterm-screen{position:relative}.xterm .xterm-screen canvas{position:absolute;top:0;left:0}.xterm-char-measure-element{visibility:hidden;line-height:normal;display:inline-block;position:absolute;top:0;left:-9999em}.xterm.enable-mouse-events{cursor:default}.xterm.xterm-cursor-pointer,.xterm .xterm-cursor-pointer{cursor:pointer}.xterm.column-select.focus{cursor:crosshair}.xterm .xterm-accessibility:not(.debug),.xterm .xterm-message{z-index:10;color:#0000;pointer-events:none;position:absolute;inset:0}.xterm .xterm-accessibility-tree:not(.debug) ::selection{color:#0000}.xterm .xterm-accessibility-tree{-webkit-user-select:text;user-select:text;white-space:pre;font-family:monospace}.xterm .xterm-accessibility-tree>div{transform-origin:0;width:fit-content}.xterm .live-region{width:1px;height:1px;position:absolute;left:-9999px;overflow:hidden}.xterm-dim{opacity:1!important}.xterm-underline-1{text-decoration:underline}.xterm-underline-2{-webkit-text-decoration:underline double;text-decoration:underline double}.xterm-underline-3{-webkit-text-decoration:underline wavy;text-decoration:underline wavy}.xterm-underline-4{-webkit-text-decoration:underline dotted;text-decoration:underline dotted}.xterm-underline-5{-webkit-text-decoration:underline dashed;text-decoration:underline dashed}.xterm-overline{text-decoration:overline}.xterm-overline.xterm-underline-1{text-decoration:underline overline}.xterm-overline.xterm-underline-2{-webkit-text-decoration:overline double underline;text-decoration:overline double underline}.xterm-overline.xterm-underline-3{-webkit-text-decoration:overline wavy underline;text-decoration:overline wavy underline}.xterm-overline.xterm-underline-4{-webkit-text-decoration:overline dotted underline;text-decoration:overline dotted underline}.xterm-overline.xterm-underline-5{-webkit-text-decoration:overline dashed underline;text-decoration:overline dashed underline}.xterm-strikethrough{text-decoration:line-through}.xterm-screen .xterm-decoration-container .xterm-decoration{z-index:6;position:absolute}.xterm-screen .xterm-decoration-container .xterm-decoration.xterm-decoration-top-layer{z-index:7}.xterm-decoration-overview-ruler{z-index:8;pointer-events:none;position:absolute;top:0;right:0}.xterm-decoration-top{z-index:2;position:relative}.xterm .xterm-scrollable-element>.scrollbar{cursor:default}.xterm .xterm-scrollable-element>.scrollbar>.scra{cursor:pointer;font-size:11px!important}.xterm .xterm-scrollable-element>.visible{opacity:1;z-index:11;background:0 0;transition:opacity .1s linear}.xterm .xterm-scrollable-element>.invisible{opacity:0;pointer-events:none}.xterm .xterm-scrollable-element>.invisible.fade{transition:opacity .8s linear}.xterm .xterm-scrollable-element>.shadow{display:none;position:absolute}.xterm .xterm-scrollable-element>.shadow.top{width:100%;height:3px;box-shadow:var(--vscode-scrollbar-shadow,#000) 0 6px 6px -6px inset;display:block;top:0;left:3px}.xterm .xterm-scrollable-element>.shadow.left{width:3px;height:100%;box-shadow:var(--vscode-scrollbar-shadow,#000) 6px 0 6px -6px inset;display:block;top:3px;left:0}.xterm .xterm-scrollable-element>.shadow.top-left-corner{width:3px;height:3px;display:block;top:0;left:0}.xterm .xterm-scrollable-element>.shadow.top.left{box-shadow:var(--vscode-scrollbar-shadow,#000) 6px 0 6px -6px inset}.vue-flow{z-index:0;direction:ltr;width:100%;height:100%;position:relative;overflow:hidden}.vue-flow__container{width:100%;height:100%;position:absolute;top:0;left:0}.vue-flow__pane{z-index:1}.vue-flow__pane.draggable{cursor:grab}.vue-flow__pane.selection{cursor:pointer}.vue-flow__pane.dragging{cursor:grabbing}.vue-flow__transformationpane{transform-origin:0 0;z-index:2;pointer-events:none}.vue-flow__viewport{z-index:4;overflow:clip}.vue-flow__selection{z-index:6}.vue-flow__edge-labels{pointer-events:none;-webkit-user-select:none;user-select:none;width:100%;height:100%;position:absolute}.vue-flow__nodesselection-rect:focus,.vue-flow__nodesselection-rect:focus-visible{outline:none}.vue-flow .vue-flow__edges{pointer-events:none;overflow:visible}.vue-flow__edge-path,.vue-flow__connection-path{stroke:#b1b1b7;stroke-width:1px;fill:none}.vue-flow__edge{pointer-events:visibleStroke;cursor:pointer}.vue-flow__edge.animated path{stroke-dasharray:5;animation:.5s linear infinite dashdraw}.vue-flow__edge.animated path.vue-flow__edge-interaction{stroke-dasharLine truncated
.xterm{cursor:text;-webkit-user-select:none;user-select:none;position:relative}.xterm.focus,.xterm:focus{outline:none}.xterm .xterm-helpers{z-index:5;position:absolute;top:0}.xterm .xterm-helper-textarea{opacity:0;z-index:-5;white-space:nowrap;resize:none;border:0;width:0;height:0;margin:0;padding:0;position:absolute;top:0;left:-9999em;overflow:hidden}.xterm .composition-view{color:#fff;white-space:nowrap;z-index:1;background:#000;display:none;position:absolute}.xterm .composition-view.active{display:block}.xterm .xterm-viewport{cursor:default;background-color:#000;position:absolute;inset:0;overflow-y:scroll}.xterm .xterm-screen{position:relative}.xterm .xterm-screen canvas{position:absolute;top:0;left:0}.xterm-char-measure-element{visibility:hidden;line-height:normal;display:inline-block;position:absolute;top:0;left:-9999em}.xterm.enable-mouse-events{cursor:default}.xterm.xterm-cursor-pointer,.xterm .xterm-cursor-pointer{cursor:pointer}.xterm.column-select.focus{cursor:crosshair}.xterm .xterm-accessibility:not(.debug),.xterm .xterm-message{z-index:10;color:#0000;pointer-events:none;position:absolute;inset:0}.xterm .xterm-accessibility-tree:not(.debug) ::selection{color:#0000}.xterm .xterm-accessibility-tree{-webkit-user-select:text;user-select:text;white-space:pre;font-family:monospace}.xterm .xterm-accessibility-tree>div{transform-origin:0;width:fit-content}.xterm .live-region{width:1px;height:1px;position:absolute;left:-9999px;overflow:hidden}.xterm-dim{opacity:1!important}.xterm-underline-1{text-decoration:underline}.xterm-underline-2{-webkit-text-decoration:underline double;text-decoration:underline double}.xterm-underline-3{-webkit-text-decoration:underline wavy;text-decoration:underline wavy}.xterm-underline-4{-webkit-text-decoration:underline dotted;text-decoration:underline dotted}.xterm-underline-5{-webkit-text-decoration:underline dashed;text-decoration:underline dashed}.xterm-overline{text-decoration:overline}.xterm-overline.xterm-underline-1{text-decoration:underline overline}.xterm-overline.xterm-underline-2{-webkit-text-decoration:overline double underline;text-decoration:overline double underline}.xterm-overline.xterm-underline-3{-webkit-text-decoration:overline wavy underline;text-decoration:overline wavy underline}.xterm-overline.xterm-underline-4{-webkit-text-decoration:overline dotted underline;text-decoration:overline dotted underline}.xterm-overline.xterm-underline-5{-webkit-text-decoration:overline dashed underline;text-decoration:overline dashed underline}.xterm-strikethrough{text-decoration:line-through}.xterm-screen .xterm-decoration-container .xterm-decoration{z-index:6;position:absolute}.xterm-screen .xterm-decoration-container .xterm-decoration.xterm-decoration-top-layer{z-index:7}.xterm-decoration-overview-ruler{z-index:8;pointer-events:none;position:absolute;top:0;right:0}.xterm-decoration-top{z-index:2;position:relative}.xterm .xterm-scrollable-element>.scrollbar{cursor:default}.xterm .xterm-scrollable-element>.scrollbar>.scra{cursor:pointer;font-size:11px!important}.xterm .xterm-scrollable-element>.visible{opacity:1;z-index:11;background:0 0;transition:opacity .1s linear}.xterm .xterm-scrollable-element>.invisible{opacity:0;pointer-events:none}.xterm .xterm-scrollable-element>.invisible.fade{transition:opacity .8s linear}.xterm .xterm-scrollable-element>.shadow{display:none;position:absolute}.xterm .xterm-scrollable-element>.shadow.top{width:100%;height:3px;box-shadow:var(--vscode-scrollbar-shadow,#000) 0 6px 6px -6px inset;display:block;top:0;left:3px}.xterm .xterm-scrollable-element>.shadow.left{width:3px;height:100%;box-shadow:var(--vscode-scrollbar-shadow,#000) 6px 0 6px -6px inset;display:block;top:3px;left:0}.xterm .xterm-scrollable-element>.shadow.top-left-corner{width:3px;height:3px;display:block;top:0;left:0}.xterm .xterm-scrollable-element>.shadow.top.left{box-shadow:var(--vscode-scrollbar-shadow,#000) 6px 0 6px -6px inset}.vue-flow{z-index:0;direction:ltr;width:100%;height:100%;position:relative;overflow:hidden}.vue-flow__container{width:100%;height:100%;position:absolute;top:0;left:0}.vue-flow__pane{z-index:1}.vue-flow__pane.draggable{cursor:grab}.vue-flow__pane.selection{cursor:pointer}.vue-flow__pane.dragging{cursor:grabbing}.vue-flow__transformationpane{transform-origin:0 0;z-index:2;pointer-events:none}.vue-flow__viewport{z-index:4;overflow:clip}.vue-flow__selection{z-index:6}.vue-flow__edge-labels{pointer-events:none;-webkit-user-select:none;user-select:none;width:100%;height:100%;position:absolute}.vue-flow__nodesselection-rect:focus,.vue-flow__nodesselection-rect:focus-visible{outline:none}.vue-flow .vue-flow__edges{pointer-events:none;overflow:visible}.vue-flow__edge-path,.vue-flow__connection-path{stroke:#b1b1b7;stroke-width:1px;fill:none}.vue-flow__edge{pointer-events:visibleStroke;cursor:pointer}.vue-flow__edge.animated path{stroke-dasharray:5;animation:.5s linear infinite dashdraw}.vue-flow__edge.animated path.vue-flow__edge-interaction{stroke-dasharLine truncated
+2 -2
View File
@@ -8,7 +8,7 @@ import{A as e,B as t,C as n,D as r,E as i,F as a,H as o,I as s,L as c,M as l,N a
`)}),t}function bm(e){let t=String(e||``).trim();if(!t.includes(`|`))return null;let n=t.replace(/^\|/,``).replace(/\|$/,``).split(`|`).map(e=>e.trim());return n.length>1&&n.every(e=>e!==``)?n:null}function xm(e){return e.every(e=>/^:?-{3,}:?$/.test(e))}var Sm={class:`[overflow-wrap:anywhere]`},Cm={key:0,class:`my-2 overflow-auto rounded-md border border-border bg-background/60 p-3`},wm={class:`font-mono text-[0.85em]`},Tm={key:1,class:`my-3 w-full border-collapse text-[0.92em]`},Em={key:2,class:`my-2 border-l-[3px] border-primary pl-3 text-fg-muted`},Dm={key:3,class:`mt-1 mb-2 text-xl leading-tight font-semibold tracking-[-0.02em]`},Om={key:4,class:`mt-1 mb-2 text-lg leading-tight font-semibold tracking-[-0.02em]`},km={key:5,class:`mt-1 mb-2 text-base leading-tight font-semibold tracking-[-0.02em]`},Am={key:6,class:`my-2.5 flex list-disc flex-col gap-1 pl-5`},jm={key:7,class:`my-2.5 flex list-decimal flex-col gap-1 pl-5`},Mm={key:8,class:`mb-2.5 last:mb-0`},Nm=N({__name:`ChatMarkdown`,props:{text:{}},setup(e){let t=e,n=J(()=>ym(t.text));return(e,t)=>(I(),A(`div`,Sm,[(I(!0),A(H,null,j(n.value,(e,t)=>(I(),A(H,{key:t},[e.kind===`pre`?(I(),A(`pre`,Cm,[L(`code`,wm,z(e.code),1)])):e.kind===`table`?(I(),A(`table`,Tm,[L(`thead`,null,[L(`tr`,null,[(I(!0),A(H,null,j(e.head,(e,t)=>(I(),A(`th`,{key:t,class:`border border-border bg-muted px-2 py-1.5 text-left font-semibold`},[k(gm,{inline:e},null,8,[`inline`])]))),128))])]),L(`tbody`,null,[(I(!0),A(H,null,j(e.rows,(e,t)=>(I(),A(`tr`,{key:t},[(I(!0),A(H,null,j(e,(e,t)=>(I(),A(`td`,{key:t,class:`border border-border px-2 py-1.5 text-left`},[k(gm,{inline:e},null,8,[`inline`])]))),128))]))),128))])])):e.kind===`blockquote`?(I(),A(`blockquote`,Em,[k(gm,{inline:e.inline},null,8,[`inline`])])):e.kind===`h1`?(I(),A(`h1`,Dm,[k(gm,{inline:e.inline},null,8,[`inline`])])):e.kind===`h2`?(I(),A(`h2`,Om,[k(gm,{inline:e.inline},null,8,[`inline`])])):e.kind===`h3`?(I(),A(`h3`,km,[k(gm,{inline:e.inline},null,8,[`inline`])])):e.kind===`ul`?(I(),A(`ul`,Am,[(I(!0),A(H,null,j(e.items,(e,t)=>(I(),A(`li`,{key:t},[k(gm,{inline:e},null,8,[`inline`])]))),128))])):e.kind===`ol`?(I(),A(`ol`,jm,[(I(!0),A(H,null,j(e.items,(e,t)=>(I(),A(`li`,{key:t},[k(gm,{inline:e},null,8,[`inline`])]))),128))])):e.kind===`p`?(I(),A(`p`,Mm,[k(gm,{inline:e.inline},null,8,[`inline`])])):P(``,!0)],64))),128))]))}}),Pm={class:`truncate`},Fm=N({__name:`ChatNavChip`,props:{path:{},label:{}},setup(e){return(t,n)=>{let r=Fe(`RouterLink`);return I(),K(r,{to:e.path,title:`Go to ${e.label||e.path}`,class:`inline-flex max-w-full items-center gap-1.5 rounded-md border border-primary/45 bg-primary-soft px-2.5 py-1 text-xs font-semibold text-link transition-colors hover:border-primary hover:bg-primary/15 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary`},{default:F(()=>[k(B(iu),{"aria-hidden":`true`,class:`size-3.5 shrink-0`}),L(`span`,Pm,z(e.label||e.path),1)]),_:1},8,[`to`,`title`])}}}),Im={key:1,class:`flex items-baseline gap-1.5 [overflow-wrap:anywhere]`},Lm={class:`font-semibold text-foreground`},Rm={key:0,class:`font-mono text-[0.95em] text-fg-subtle`},zm=N({__name:`ChatToolCall`,props:{tool:{},streaming:{type:Boolean}},setup(e){let t=e,n=J(()=>t.tool.name||t.tool.Name||t.tool.tool||`tool`),r=J(()=>t.tool.parameters||t.tool.Parameters||``),i=J(()=>!!(t.tool.err||t.tool.Err||t.tool.failed)),a=J(()=>t.tool.summary||t.tool.Summary||t.tool.text||t.tool.err||t.tool.Err||(t.streaming?i.value?`failed`:`running…`:`done`));return(t,o)=>e.tool.path?(I(),K(Fm,{key:0,path:e.tool.path,label:e.tool.label},null,8,[`path`,`label`])):(I(),A(`div`,Im,[k(B(yd),{"aria-hidden":`true`,class:`size-3.5 shrink-0 self-center text-fg-subtle`}),L(`span`,Lm,z(n.value),1),r.value?(I(),A(`code`,Rm,z(r.value),1)):P(``,!0),L(`span`,{class:R(B(U)(`text-fg-muted`,i.value&&`text-danger`))},z(a.value),3)]))}}),Bm={key:0,class:`mb-2 grid gap-0.5 text-xs`},Vm={key:1,class:`mb-2 flex flex-wrap gap-1.5`},Hm={key:3,class:`whitespace-pre-wrap`},Um=N({__name:`ChatBubble`,props:{text:{},tools:{default:()=>[]},media:{default:()=>[]},assistant:{type:Boolean,default:!1},streaming:{type:Boolean,default:!1}},setup(e){return(t,n)=>(I(),A(`div`,{class:R([`flex`,e.assistant?`justify-start`:`justify-end`])},[L(`div`,{class:R(B(U)(`max-w-[min(78ch,92%)] rounded-[0.85rem] px-3.5 py-2.5 text-sm leading-normal [overflow-wrap:anywhere]`,e.assistant?`bg-muted`:`bg-primary/15`))},[e.assistant&&e.tools.length?(I(),A(`div`,Bm,[(I(!0),A(H,null,j(e.tools,(t,n)=>(I(),K(zm,{key:n,tool:t,streaming:e.streaming},null,8,[`tool`,`streaming`]))),128))])):P(``,!0),e.media.length?(I(),A(`div`,Vm,[(I(!0),A(H,null,j(e.media,(e,t)=>(I(),K(lm,{key:t,attachment:e},null,8,[`attachment`]))),128))])):P(``,!0),e.assistant?(I(),K(Nm,{key:2,text:e.text},null,8,[`text`])):(I(),A(`div`,Hm,z(e.text),1)),G(t.$slots,`default`)],2)],2))}}),Wm={class:`text-sm`},Gm={key:0,class:`mt-1 text-fg-muted`},Km={key:1,class:`mt-2 flex flex-wrap gap-2`},qm=N({__name:`ChatChooseCard`,props Line truncated
`).map(e=>e.trim()).find(Boolean)||``,i=r.length>Dv?`${r.slice(0,Dv).trimEnd()}…`:r;return{text:i,full:n,truncated:i!==n}}function kv(e){return String(e||`event`).replaceAll(`_`,` `).replace(/\b\w/g,e=>e.toUpperCase())}function Av(e){let t=Number(e);if(!Number.isFinite(t)||t<0)return``;if(t<1e3)return`under 1 s`;let n=t/1e3;if(n<60)return`${n.toFixed(+(n<10))} s`;let r=Math.round(n),i=Math.floor(r/60),a=r%60;if(i<60)return a===0?`${i} min`:`${i} min ${a} s`;let o=Math.floor(i/60),s=i-o*60;return s===0?`${o} h`:`${o} h ${s} min`}function jv(e){let t=Number(e);return!Number.isFinite(t)||t<=0?``:t.toLocaleString(`en-US`)}function Mv(e){return typeof e==`string`?e:``}function Nv(e={}){let t=e.data||{},n=e.stage||`unknown stage`,r=e.workflow?`${e.workflow} workflow`:``;if(e.kind===`stage_start`)return{title:`Started stage: ${n}`,detail:r};if(e.kind===`stage_finish`){let e=Av(t.duration_ms),i=[r,e&&`ran for ${e}`].filter(Boolean).join(` · `);return{title:t.interrupted?`Stage interrupted: ${n}`:t.skipped?`Skipped stage: ${n}`:t.error?`Stage failed: ${n}`:`Finished stage: ${n}`,detail:[i,Mv(t.error),Mv(t.when)].filter(Boolean).join(` · `)}}if(e.kind===`task_retried`){let n=Number(t.retry_count);return{title:Number.isFinite(n)&&n>0?`Retry ${n}`:`Retry requested`,detail:[Mv(t.previous_stage)&&`after ${Mv(t.previous_stage)}`,Mv(t.previous_reason)].filter(Boolean).join(`: `)||e.detail||``}}if(e.kind===`agent_finish`){let r=jv(t.iterations),i=jv(t.tokens),a=Number(t.cached_tokens)||0,o=jv((Number(t.prompt_tokens)||0)-a),s=jv(t.completion_tokens),c=jv(t.cached_tokens),l=[r&&`${r} iterations`,i&&`${i} tokens`,o&&`${o} fresh prompt`,s&&`${s} completion`,c&&`${c} cached`,Mv(t.model)].filter(Boolean);return{title:`Agent ${Mv(t.status)||`finished`}: ${n}`,detail:l.join(` · `)||e.detail||``}}if(e.kind===`remediation_round`){let e=Number(t.of),n=Mv(t.author);return{title:`Remediation ${Mv(t.round)}${e>0?` of ${e}`:``}`,detail:[n&&`answers ${n}'s review`,t.review_id?`#${Mv(t.review_id)}`:``].filter(Boolean).join(` `)}}if(e.kind===`review_approved`){let e=Mv(t.pr_number);return{title:`Pull request approved`,detail:[Mv(t.author),e&&`#${e}`].filter(Boolean).join(` · `)}}if(e.kind===`step_retried`)return{title:`Attempt ${Mv(t.attempt)} of ${Mv(t.of)} failed: ${e.stage||`step`}`,detail:Mv(t.error),tone:`warn`};if(e.kind===`config_captured`)return{title:`Configuration captured`,detail:`The effective task-runtime configuration for this run.`};if(e.kind===`binding_started`){let e=Mv(t.source),n=Mv(t.capture_id),r=[{label:`binding ${Mv(t.binding_name)||Mv(t.binding_id)}`,to:`/events?tab=bindings`},...n?[{label:`captured event`,to:`/events?tab=inspector&capture=${encodeURIComponent(n)}`}]:[]];return t.unsigned===!0?{title:`Started by an unsigned event`,detail:e?`source ${e}`:``,tone:`warn`,links:r}:{title:`Started by an event`,detail:e?`source ${e}`:``,links:r}}if(e.kind===`changes_captured`){let e=t.totals??{},n=Number(e.files);return{title:`Change capture recorded`,detail:[Number.isFinite(n)&&n>0?`${n} file${n===1?``:`s`} changed`:``,t.captured_after?`captured after ${Mv(t.captured_after)}`:``].filter(Boolean).join(` · `)}}return{title:kv(e.kind||e.type),detail:e.detail||``}}var Pv=[`title`],Fv=N({__name:`ActivityRow`,props:{event:{}},emits:[`open`],setup(e,{emit:t}){let n=Ev();n.watchIdentities();let r=e,i=t,a=hv(),o=J(()=>a.taskIDFor(r.event)),s=J(()=>Ov(r.event,n.identityName));function c(){o.value>0&&i(`open`,o.value)}let l=J(()=>r.event.at?gh(r.event.at):`–`);return(e,t)=>(I(),K(B(Sv),{class:R(o.value>0?`cursor-pointer`:``),role:o.value>0?`link`:void 0,tabindex:o.value>0?0:void 0,title:o.value>0?`Open task details`:void 0,onClick:c,onKeydown:[_t(pt(c,[`prevent`]),[`enter`]),_t(pt(c,[`prevent`]),[`space`])]},{default:F(()=>[k(B(Q),{class:`font-medium`},{default:F(()=>[V(z(B(Nv)({...r.event,at:void 0,detail:void 0}).title),1)]),_:1}),k(B(Q),{class:`font-mono`},{default:F(()=>[V(z(o.value>0?`#${o.value}`:`–`),1)]),_:1}),k(B(Q),{class:`w-[55%] max-w-0`},{default:F(()=>[L(`span`,{class:`block truncate`,title:s.value.truncated?s.value.full:void 0},z(s.value.text),9,Pv)]),_:1}),k(B(Q),null,{default:F(()=>[V(z(l.value),1)]),_:1})]),_:1},8,[`class`,`role`,`tabindex`,`title`,`onKeydown`]))}}),Iv=[{value:`all`,label:`All`},{value:`tasks`,label:`Tasks`},{value:`system`,label:`System`}];function Lv(e){return(Number(e?.task_id)||0)>0}function Rv(e,t){return t===`tasks`?Lv(e):t!==`system`||!Lv(e)}function zv(e,t){return e.filter(e=>Rv(e,t))}function Bv(e,t){return e>0?``:t===`all`?`Waiting for activity`:t===`tasks`?`No task events yet`:`No system events yet`}function Vv(e,t){return`${e}:${t??0}`}function Hv(e){let t=[];for(let n of e){let e=n.kind||n.type||`event`,r=Number(n.task_id)||0,i=Vv(Ov(n).text,r),a=t[t.length-1];a&&a.key===i?(a.count+=1,a.events.push(n)):t.push({key:i,label:e,taskID:r,count:1,representative:n,events:[n]})}return t}var Uv={key:0,class:`font-normal text-fg-subtle`},Wv={role:`region`,"aria-label":`Activity`,"ari Line truncated
`,1)[0]??``;return t.length>80?`${t.slice(0,79)}…`:t}function sb(e){return(e?.merged||0)+(e?.completed||0)}function cb(e){return Object.entries(e?.inputs??{}).map(([e,t])=>({name:e,type:t.type,required:t.required===!0})).sort((e,t)=>e.name.localeCompare(t.name))}function lb(e,t){return e.filter(e=>e.required&&!(t[e.name]??``).trim()).map(e=>e.name)}function ub(e,t){switch(t){case`number`:{let t=e.trim();return t!==``&&!Number.isNaN(Number(t))?Number(t):e}case`bool`:return e===`true`||e!==`false`&&e;case`string`:return e;default:try{return JSON.parse(e)}catch{return e}}}function db(e,t){let n={};for(let r of e){let e=t[r.name];e!==void 0&&e!==``&&(n[r.name]=ub(e,r.type))}return n}var fb=[`onKeydown`],pb={key:0,class:`text-sm text-danger`,role:`alert`},mb={key:1,class:`grid gap-1.5`},hb=[`for`],gb={key:0,class:`font-normal text-fg-subtle`},_b=[`id`],vb=[`value`],yb={key:0,class:`text-xs text-fg-subtle`},bb={key:2,class:`grid gap-1.5`},xb=[`id`],Sb={class:`block truncate text-[13px] font-medium`},Cb={class:`block text-xs text-fg-subtle`},wb={key:0,class:`text-xs text-fg-subtle`},Tb={key:3,class:`grid gap-3`},Eb=[`for`],Db={class:`font-mono`},Ob={key:0,class:`text-fg-subtle`},kb={class:`grid gap-1.5`},Ab=[`for`],jb={class:`grid gap-1.5`},Mb=[`for`],Nb={key:4,class:`text-sm text-danger`,role:`alert`},Pb={class:`flex items-center gap-2 border-t border-border pt-4`},Fb={class:`mr-auto text-xs text-fg-subtle`},Ib=N({__name:`NewTaskForm`,props:{workflow:{},draft:{},initialWorkflow:{},initialInstructions:{}},emits:[`started`,`cancel`],setup(e,{emit:t}){let n=e,r=t,i=De(),a=q([]),o=q([]),s=q([]),c=q(``);Ue(async()=>{try{let[e,t]=await Promise.all([X.workflows(),X.repositories()]);a.value=(e?.definitions??[]).filter(e=>e.enabled),o.value=e?.workflows??[],s.value=(t??[]).map(e=>`${e.owner}/${e.name}`)}catch(e){c.value=String(e.message||e)}});let l=q(``),u=q(n.workflow??n.initialWorkflow??``),d=q(n.initialInstructions??``),f=q(ob(d.value)),p=q({});Ee(()=>{!u.value&&a.value[0]&&(u.value=a.value[0].id)});let m=J(()=>a.value.find(e=>e.id===u.value)),h=J(()=>cb(m.value)),g=J(()=>lb(h.value,p.value)),_=J(()=>m.value?.repository??`required`),v=J(()=>_.value!==`optional`&&_.value!==`none`),y=e=>o.value.find(t=>t.workflow===e),b=q(!1),x=q(``),S=J(()=>!(!l.value.trim()&&v.value||!u.value||!f.value.trim())&&g.value.length===0);async function C(){if(S.value&&!b.value){b.value=!0,x.value=``;try{let e=await X.workRequest({repository:_.value===`none`?``:l.value.trim(),workflow:u.value,title:f.value.trim(),instructions:d.value,inputs:db(h.value,p.value),...n.draft?{draft:n.draft}:{}});r(`started`,e.task_id)}catch(e){x.value=String(e.message||e)}finally{b.value=!1}}}return(e,t)=>(I(),A(`form`,{class:`grid gap-5`,onSubmit:pt(C,[`prevent`]),onKeydown:[_t(pt(C,[`meta`,`prevent`]),[`enter`]),_t(pt(C,[`ctrl`,`prevent`]),[`enter`])]},[c.value?(I(),A(`p`,pb,z(c.value),1)):P(``,!0),_.value===`none`?P(``,!0):(I(),A(`div`,mb,[L(`label`,{for:`${B(i)}-repo`,class:`text-[13px] font-medium`},[t[5]||=V(`Repository`,-1),v.value?P(``,!0):(I(),A(`span`,gb,` (optional)`))],8,hb),k(B(Z),{id:`${B(i)}-repo`,modelValue:l.value,"onUpdate:modelValue":t[0]||=e=>l.value=e,class:`font-mono`,placeholder:`owner/repository`,list:`${B(i)}-repos`,required:v.value},null,8,[`id`,`modelValue`,`list`,`required`]),L(`datalist`,{id:`${B(i)}-repos`},[(I(!0),A(H,null,j(s.value,e=>(I(),A(`option`,{key:e,value:e},null,8,vb))),128))],8,_b),s.value.length?(I(),A(`p`,yb,[t[6]||=V(`Configured: `,-1),(I(!0),A(H,null,j(s.value,e=>(I(),K(B(Y),{key:e,type:`button`,variant:`link`,size:`xs`,class:`h-auto px-1 font-mono text-fg-subtle`,onClick:t=>l.value=e},{default:F(()=>[V(z(e),1)]),_:2},1032,[`onClick`]))),128))])):P(``,!0)])),n.workflow?P(``,!0):(I(),A(`div`,bb,[L(`span`,{id:`${B(i)}-wf`,class:`text-[13px] font-medium`},`Workflow`,8,xb),k(B(lc),{modelValue:u.value,"onUpdate:modelValue":t[1]||=e=>u.value=e,"aria-labelledby":`${B(i)}-wf`,class:`grid grid-cols-1 gap-2 sm:grid-cols-3`,loop:``},{default:F(()=>[(I(!0),A(H,null,j(a.value,e=>(I(),K(B(dc),{key:e.id,value:e.id,class:`rounded-md border border-border bg-card px-3 py-2.5 text-left transition-colors hover:bg-secondary focus-visible:outline-2 focus-visible:outline-ring data-[state=checked]:border-primary data-[state=checked]:bg-secondary`},{default:F(()=>[L(`span`,Sb,z(e.name||e.id),1),L(`span`,Cb,[V(z(y(e.id)?.runs||0)+` runs`,1),y(e.id)?.runs?(I(),A(H,{key:0},[V(` · `+z(Math.round(B(sb)(y(e.id))/(y(e.id)?.runs||1)*100))+`% delivered`,1)],64)):P(``,!0)])]),_:2},1032,[`value`]))),128))]),_:1},8,[`modelValue`,`aria-labelledby`]),!a.value.length&&!c.value?(I(),A(`p`,wb,`No enabled workflows.`)):P(``,!0)])),h.value.length?(I(),A(`div`,Tb,[(I(!0),A(H,null,j(h.value,e=>(I(),A(`div`,{key:e.name,class:`grid gap-1.5`},[L(`label`,{for:`${B(i)}-input-${e.name}`,class:`text-[13px] font-medium`},[L(`span`,Db,z(e.name),1),e.required?(I(),A(`span`,Ob,` · required`)):P(``,!0)],8,Eb),k(B(Z),{id:`${B(i)}-input-${e.name}`,"model-value":p.value[e. Line truncated
`)){let e=n.indexOf(`:`);if(e<=0)continue;let r=n.slice(0,e).trim();r&&(t[r]=n.slice(e+1).trim())}return t}function Qb(e,t){if(!e.event_type)return{label:`Unidentified`,identified:!1};let n=t.find(t=>t.id===e.event_type);return{label:n?n.name:`Deleted type`,identified:!0}}function $b(e,t){if(!e)return`No event type`;let n=t.find(t=>t.id===e);return n?`${n.source} / ${n.name}`:`Deleted type`}function ex(e){let t=[...(e.headers||[]).map(e=>`${e.name} = ${e.value}`),...(e.payload||[]).map(e=>e.op===`present`?`${e.path} present`:`${e.path} = ${e.value??``}`)];return t.length?t.join(` · `):`any event`}function tx(e){return{headers:(e.headers||[]).filter(e=>e.name.trim()!==``).map(e=>({name:e.name.trim(),value:e.value})),payload:(e.payload||[]).filter(e=>e.path.trim()!==``).map(e=>e.op===`present`?{path:e.path.trim(),op:e.op}:{path:e.path.trim(),op:e.op,value:e.value??``})}}var nx=q([]),rx=q([]),ix=q(!0),ax=q(null),ox=q(!0),sx=q(null),cx=q(!1),lx=q(null);async function ux(){try{let e=await X.eventTypes(Xb().workspace);ix.value=e.enabled!==!1,nx.value=e.event_types||[],rx.value=e.proposals||[],ax.value=null}catch(e){ax.value=e.message||String(e)}finally{ox.value=!1}}function dx(e){return{headers:(e.headers||[]).map(e=>({...e})),payload:(e.payload||[]).map(e=>({...e}))}}function fx(e){lx.value=null,sx.value=e}function px(e){let t=xx.value.find(t=>String(t.id)===e.sample_id);fx({mode:`proposal`,id:null,source:e.source,name:``,rule:dx(e.rule),headersText:``,body:t?.body||``,exampleHeaders:e.headers||{}})}function mx(e=``){fx({mode:`paste`,id:null,source:e,name:``,rule:{headers:[],payload:[]},headersText:``,body:``,exampleHeaders:{}})}function hx(e){fx({mode:`edit`,id:e.id,source:e.source,name:e.name,rule:dx(e.rule),headersText:``,body:``,exampleHeaders:{}})}function gx(){sx.value=null}async function _x(){let e=sx.value;if(e){cx.value=!0;try{if(e.mode===`edit`&&e.id)await X.eventTypeUpdate(e.id,{name:e.name,rule:tx(e.rule)});else{let t=e.mode===`paste`?Zb(e.headersText):e.exampleHeaders;await X.eventTypeCreate({source:e.source,name:e.name,rule:e.mode===`paste`?void 0:tx(e.rule),example:{headers:t,body:e.body}})}sx.value=null,await ux()}catch(e){lx.value=e.message||String(e)}finally{cx.value=!1}}}var vx=q(null);async function yx(){let e=vx.value;if(vx.value=null,e)try{await X.eventTypeDelete(e.id),await ux()}catch(e){ax.value=e.message||String(e)}}var bx=100,xx=q([]),Sx=q(!0),Cx=q(null),wx=q(!0),Tx=q(null);async function Ex(){try{let e=await X.captures(bx);Sx.value=e.enabled!==!1,xx.value=e.captures||[],Cx.value=null}catch(e){Cx.value=e.message||String(e)}finally{wx.value=!1}}function Dx(e){let t=xx.value.find(t=>t.id===e);return t&&(Tx.value=t),!!t}function Ox(){xx.value.length&&(Tx.value=xx.value[0])}function kx(){Ch(`captures`,()=>{Ex(),ux()})}var Ax=N({__name:`Tabs`,props:{defaultValue:{},orientation:{},dir:{},activationMode:{},modelValue:{},unmountOnHide:{type:Boolean},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},emits:[`update:modelValue`],setup(e,{emit:t}){let n=e,r=t,i=Tt(n,`class`),a=O(i,r);return(e,t)=>(I(),K(B(el),W({"data-slot":`tabs`,"data-orientation":B(a).orientation||`horizontal`},B(a),{class:B(U)(`gap-2 group/tabs flex data-horizontal:flex-col`,n.class)}),{default:F(t=>[G(e.$slots,`default`,Ye(Ce(t)))]),_:3},16,[`data-orientation`,`class`]))}}),jx=N({__name:`TabsContent`,props:{value:{},forceMount:{type:Boolean},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){let t=e,n=Tt(t,`class`);return(e,r)=>(I(),K(B(rl),W({"data-slot":`tabs-content`,class:B(U)(`text-sm flex-1 outline-none`,t.class)},B(n)),{default:F(()=>[G(e.$slots,`default`)]),_:3},16,[`class`]))}}),Mx=N({__name:`TabsList`,props:{loop:{type:Boolean},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]},variant:{default:`default`}},setup(e){let t=e,n=Tt(t,`class`,`variant`);return(r,i)=>(I(),K(B(il),W({"data-slot":`tabs-list`,"data-variant":e.variant},B(n),{class:B(U)(B(Px)({variant:e.variant}),t.class)}),{default:F(()=>[G(r.$slots,`default`)]),_:3},16,[`data-variant`,`class`]))}}),Nx=N({__name:`TabsTrigger`,props:{value:{},disabled:{type:Boolean},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){let t=e,n=Tt(t,`class`),r=pe(n);return(e,n)=>(I(),K(B(al),W({"data-slot":`tabs-trigger`,class:B(U)(`gap-1.5 rounded-md border border-transparent px-1.5 py-0.5 text-sm font-medium group-data-[variant=default]/tabs-list:data-active:shadow-sm group-data-[variant=line]/tabs-list:data-active:shadow-none [&_svg:not([class*=size-])]:size-4 has-data-[icon=inline-end]:pr-1 has-data-[icon=inline-start]:pl-1 relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center whitespace-nowrap text-foreground/60 transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:Line truncated
`)){let e=n.indexOf(`:`);if(e<=0)continue;let r=n.slice(0,e).trim();r&&(t[r]=n.slice(e+1).trim())}return t}function Qb(e,t){if(!e.event_type)return{label:`Unidentified`,identified:!1};let n=t.find(t=>t.id===e.event_type);return{label:n?n.name:`Deleted type`,identified:!0}}function $b(e,t){if(!e)return`No event type`;let n=t.find(t=>t.id===e);return n?`${n.source} / ${n.name}`:`Deleted type`}function ex(e){let t=[...(e.headers||[]).map(e=>`${e.name} = ${e.value}`),...(e.payload||[]).map(e=>e.op===`present`?`${e.path} present`:`${e.path} = ${e.value??``}`)];return t.length?t.join(` · `):`any event`}function tx(e){return{headers:(e.headers||[]).filter(e=>e.name.trim()!==``).map(e=>({name:e.name.trim(),value:e.value})),payload:(e.payload||[]).filter(e=>e.path.trim()!==``).map(e=>e.op===`present`?{path:e.path.trim(),op:e.op}:{path:e.path.trim(),op:e.op,value:e.value??``})}}var nx=q([]),rx=q([]),ix=q(!0),ax=q(null),ox=q(!0),sx=q(null),cx=q(!1),lx=q(null);async function ux(){try{let e=await X.eventTypes(Xb().workspace);ix.value=e.enabled!==!1,nx.value=e.event_types||[],rx.value=e.proposals||[],ax.value=null}catch(e){ax.value=e.message||String(e)}finally{ox.value=!1}}function dx(e){return{headers:(e.headers||[]).map(e=>({...e})),payload:(e.payload||[]).map(e=>({...e}))}}function fx(e){lx.value=null,sx.value=e}function px(e){let t=xx.value.find(t=>String(t.id)===e.sample_id);fx({mode:`proposal`,id:null,source:e.source,name:``,rule:dx(e.rule),headersText:``,body:t?.body||``,exampleHeaders:e.headers||{}})}function mx(e=``){fx({mode:`paste`,id:null,source:e,name:``,rule:{headers:[],payload:[]},headersText:``,body:``,exampleHeaders:{}})}function hx(e){fx({mode:`edit`,id:e.id,source:e.source,name:e.name,rule:dx(e.rule),headersText:``,body:``,exampleHeaders:{}})}function gx(){sx.value=null}async function _x(){let e=sx.value;if(e){cx.value=!0;try{if(e.mode===`edit`&&e.id)await X.eventTypeUpdate(e.id,{name:e.name,rule:tx(e.rule)});else{let t=e.mode===`paste`?Zb(e.headersText):e.exampleHeaders;await X.eventTypeCreate({source:e.source,name:e.name,rule:e.mode===`paste`?void 0:tx(e.rule),example:{headers:t,body:e.body}})}sx.value=null,await ux()}catch(e){lx.value=e.message||String(e)}finally{cx.value=!1}}}var vx=q(null);async function yx(){let e=vx.value;if(vx.value=null,e)try{await X.eventTypeDelete(e.id),await ux()}catch(e){ax.value=e.message||String(e)}}var bx=100,xx=q([]),Sx=q(!0),Cx=q(null),wx=q(!0),Tx=q(null);async function Ex(){try{let e=await X.captures(bx);Sx.value=e.enabled!==!1,xx.value=e.captures||[],Cx.value=null}catch(e){Cx.value=e.message||String(e)}finally{wx.value=!1}}function Dx(e){let t=xx.value.find(t=>t.id===e);return t&&(Tx.value=t),!!t}function Ox(){xx.value.length&&(Tx.value=xx.value[0])}function kx(){Ch(`captures`,()=>{Ex(),ux()})}var Ax=N({__name:`Tabs`,props:{defaultValue:{},orientation:{},dir:{},activationMode:{},modelValue:{},unmountOnHide:{type:Boolean},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},emits:[`update:modelValue`],setup(e,{emit:t}){let n=e,r=t,i=Tt(n,`class`),a=O(i,r);return(e,t)=>(I(),K(B(el),W({"data-slot":`tabs`,"data-orientation":B(a).orientation||`horizontal`},B(a),{class:B(U)(`gap-2 group/tabs flex data-horizontal:flex-col`,n.class)}),{default:F(t=>[G(e.$slots,`default`,Ye(Ce(t)))]),_:3},16,[`data-orientation`,`class`]))}}),jx=N({__name:`TabsContent`,props:{value:{},forceMount:{type:Boolean},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){let t=e,n=Tt(t,`class`);return(e,r)=>(I(),K(B(rl),W({"data-slot":`tabs-content`,class:B(U)(`text-sm flex-1 outline-none`,t.class)},B(n)),{default:F(()=>[G(e.$slots,`default`)]),_:3},16,[`class`]))}}),Mx=N({__name:`TabsList`,props:{loop:{type:Boolean},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]},variant:{default:`default`}},setup(e){let t=e,n=Tt(t,`class`,`variant`);return(r,i)=>(I(),K(B(il),W({"data-slot":`tabs-list`,"data-variant":e.variant},B(n),{class:B(U)(B(Px)({variant:e.variant}),t.class)}),{default:F(()=>[G(r.$slots,`default`)]),_:3},16,[`data-variant`,`class`]))}}),Nx=N({__name:`TabsTrigger`,props:{value:{},disabled:{type:Boolean},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){let t=e,n=Tt(t,`class`),r=pe(n);return(e,n)=>(I(),K(B(al),W({"data-slot":`tabs-trigger`,class:B(U)(`gap-1.5 rounded-md border border-transparent px-1.5 py-0.5 text-sm font-medium group-data-[variant=default]/tabs-list:data-active:shadow-sm group-data-[variant=line]/tabs-list:data-active:shadow-none [&_svg:not([class*=size-])]:size-4 has-data-[icon=inline-end]:pr-1 has-data-[icon=inline-start]:pl-1 relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center whitespace-nowrap text-foreground/60 transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:Line truncated
WARNING: This link could potentially be dangerous`)){let e=window.open();if(e){try{e.opener=null}catch{}e.location.href=t}else console.warn(`Opening link blocked as opener could not be cleared`)}}var HN=ON(`CharSizeService`),UN=ON(`CoreBrowserService`),WN=ON(`MouseService`),GN=ON(`RenderService`),KN=ON(`SelectionService`),qN=ON(`CharacterJoinerService`),JN=ON(`ThemeService`),YN=ON(`LinkProviderService`),XN=new class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?nP.isErrorNoTelemetry(e)?new nP(e.message+`
@@ -23,7 +23,7 @@ WARNING: This link could potentially be dangerous`)){let e=window.open();if(e){t
`)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(e){this._refreshAnimationFrame||=this._coreBrowserService.window.requestAnimationFrame(()=>this._refresh()),rR&&e&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)}_refresh(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:this._activeSelectionMode===3})}_isClickInSelection(e){let t=this._getMouseBufferCoords(e),n=this._model.finalSelectionStart,r=this._model.finalSelectionEnd;return!n||!r||!t?!1:this._areCoordsInSelection(t,n,r)}isCellInSelection(e,t){let n=this._model.finalSelectionStart,r=this._model.finalSelectionEnd;return!n||!r?!1:this._areCoordsInSelection([e,t],n,r)}_areCoordsInSelection(e,t,n){return e[1]>t[1]&&e[1]<n[1]||t[1]===n[1]&&e[1]===t[1]&&e[0]>=t[0]&&e[0]<n[0]||t[1]<n[1]&&e[1]===n[1]&&e[0]<n[0]||t[1]<n[1]&&e[1]===t[1]&&e[0]>=t[0]}_selectWordAtCursor(e,t){let n=this._linkifier.currentLink?.link?.range;if(n)return this._model.selectionStart=[n.start.x-1,n.start.y-1],this._model.selectionStartLength=ER(n,this._bufferService.cols),this._model.selectionEnd=void 0,!0;let r=this._getMouseBufferCoords(e);return r?(this._selectWordAt(r,t),this._model.selectionEnd=void 0,!0):!1}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(e,t){this._model.clearSelection(),e=Math.max(e,0),t=Math.min(t,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,e],this._model.selectionEnd=[this._bufferService.cols,t],this.refresh(),this._onSelectionChange.fire()}_handleTrim(e){this._model.handleTrim(e)&&this.refresh()}_getMouseBufferCoords(e){let t=this._mouseService.getCoords(e,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(t)return t[0]--,t[1]--,t[1]+=this._bufferService.buffer.ydisp,t}_getMouseEventScrollAmount(e){let t=VL(this._coreBrowserService.window,e,this._screenElement)[1],n=this._renderService.dimensions.css.canvas.height;return t>=0&&t<=n?0:(t>n&&(t-=n),t=Math.min(Math.max(t,-DR),DR),t/=DR,t/Math.abs(t)+Math.round(t*(OR-1)))}shouldForceSelection(e){return $L?e.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:e.shiftKey}handleMouseDown(e){if(this._mouseDownTimeStamp=e.timeStamp,!(e.button===2&&this.hasSelection)&&e.button===0){if(!this._enabled){if(!this.shouldForceSelection(e))return;e.stopPropagation()}e.preventDefault(),this._dragScrollAmount=0,this._enabled&&e.shiftKey?this._handleIncrementalClick(e):e.detail===1?this._handleSingleClick(e):e.detail===2?this._handleDoubleClick(e):e.detail===3&&this._handleTripleClick(e),this._addMouseDownListeners(),this.refresh(!0)}}_addMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener(`mousemove`,this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener(`mouseup`,this._mouseUpListener)),this._dragScrollIntervalTimer=this._coreBrowserService.window.setInterval(()=>this._dragScroll(),kR)}_removeMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.removeEventListener(`mousemove`,this._mouseMoveListener),this._screenElement.ownerDocument.removeEventListener(`mouseup`,this._mouseUpListener)),this._coreBrowserService.window.clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=void 0}_handleIncrementalClick(e){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(e))}_handleSingleClick(e){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(e)?3:0,this._model.selectionStart=this._getMouseBufferCoords(e),!this._model.selectionStart)return;this._model.selectionEnd=void 0;let t=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);t&&t.length!==this._model.selectionStart[0]&&t.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(e){this._selectWordAtCursor(e,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(e){let t=this._getMouseBufferCoords(e);t&&(this._activeSelectionMode=2,this._selectLineAt(t[1]))}shouldColumnSelect(e){return e.altKey&&!($L&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(e){if(e.stopImmediatePropagation(),!this._model.selectionStart)return;let t=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(e),!this._model.selectionEnd){this.refresh(!0);return}this._activeSelectionMode===2?this._model.selectionEnd[1]<this._model.selectionStart[1]?this._model.selectionEnd[0]=0:this._model.selectionEnd[0]=this._bufferService.cols:this._activeSelectionMode===1&&this._selectToWordAt(this._model.selectionEnd),this._dragScrollAmount=this._getMouseEventScrollAmount(e),this._active Line truncated
`))),this._register(this._terminal.onA11yTab(e=>this._handleTab(e))),this._register(this._terminal.onKey(e=>this._handleKey(e.key))),this._register(this._terminal.onBlur(()=>this._clearLiveRegion())),this._register(this._renderService.onDimensionsChange(()=>this._refreshRowsDimensions())),this._register(nI(i,`selectionchange`,()=>this._handleSelectionChange())),this._register(this._coreBrowserService.onDprChange(()=>this._refreshRowsDimensions())),this._refreshRowsDimensions(),this._refreshRows(),this._register(gP(()=>{this._accessibilityContainer.remove(),this._rowElements.length=0}))}_handleTab(e){for(let t=0;t<e;t++)this._handleChar(` `)}_handleChar(e){this._liveRegionLineCount<kB+1&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==e&&(this._charsToAnnounce+=e):this._charsToAnnounce+=e,e===`
`&&(this._liveRegionLineCount++,this._liveRegionLineCount===kB+1&&(this._liveRegion.textContent+=sN.get())))}_clearLiveRegion(){this._liveRegion.textContent=``,this._liveRegionLineCount=0}_handleKey(e){this._clearLiveRegion(),/\p{Control}/u.test(e)||this._charsToConsume.push(e)}_refreshRows(e,t){this._liveRegionDebouncer.refresh(e,t,this._terminal.rows)}_renderRows(e,t){let n=this._terminal.buffer,r=n.lines.length.toString();for(let i=e;i<=t;i++){let e=n.lines.get(n.ydisp+i),t=[],a=e?.translateToString(!0,void 0,void 0,t)||``,o=(n.ydisp+i+1).toString(),s=this._rowElements[i];s&&(a.length===0?(s.textContent=`\xA0`,this._rowColumns.set(s,[0,1])):(s.textContent=a,this._rowColumns.set(s,t)),s.setAttribute(`aria-posinset`,o),s.setAttribute(`aria-setsize`,r),this._alignRowWidth(s))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce=``)}_handleBoundaryFocus(e,t){let n=e.target,r=this._rowElements[t===0?1:this._rowElements.length-2];if(n.getAttribute(`aria-posinset`)===(t===0?`1`:`${this._terminal.buffer.lines.length}`)||e.relatedTarget!==r)return;let i,a;if(t===0?(i=n,a=this._rowElements.pop(),this._rowContainer.removeChild(a)):(i=this._rowElements.shift(),a=n,this._rowContainer.removeChild(i)),i.removeEventListener(`focus`,this._topBoundaryFocusListener),a.removeEventListener(`focus`,this._bottomBoundaryFocusListener),t===0){let e=this._createAccessibilityTreeNode();this._rowElements.unshift(e),this._rowContainer.insertAdjacentElement(`afterbegin`,e)}else{let e=this._createAccessibilityTreeNode();this._rowElements.push(e),this._rowContainer.appendChild(e)}this._rowElements[0].addEventListener(`focus`,this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener(`focus`,this._bottomBoundaryFocusListener),this._terminal.scrollLines(t===0?-1:1),this._rowElements[t===0?1:this._rowElements.length-2].focus(),e.preventDefault(),e.stopImmediatePropagation()}_handleSelectionChange(){if(this._rowElements.length===0)return;let e=this._coreBrowserService.mainDocument.getSelection();if(!e)return;if(e.isCollapsed){this._rowContainer.contains(e.anchorNode)&&this._terminal.clearSelection();return}if(!e.anchorNode||!e.focusNode){console.error(`anchorNode and/or focusNode are null`);return}let t={node:e.anchorNode,offset:e.anchorOffset},n={node:e.focusNode,offset:e.focusOffset};if((t.node.compareDocumentPosition(n.node)&Node.DOCUMENT_POSITION_PRECEDING||t.node===n.node&&t.offset>n.offset)&&([t,n]=[n,t]),t.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(t={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(t.node))return;let r=this._rowElements.slice(-1)[0];if(n.node.compareDocumentPosition(r)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(n={node:r,offset:r.textContent?.length??0}),!this._rowContainer.contains(n.node))return;let i=({node:e,offset:t})=>{let n=e instanceof Text?e.parentNode:e,r=parseInt(n?.getAttribute(`aria-posinset`),10)-1;if(isNaN(r))return console.warn(`row is invalid. Race condition?`),null;let i=this._rowColumns.get(n);if(!i)return console.warn(`columns is null. Race condition?`),null;let a=t<i.length?i[t]:i.slice(-1)[0]+1;return a>=this._terminal.cols&&(++r,a=0),{row:r,column:a}},a=i(t),o=i(n);if(a&&o){if(a.row>o.row||a.row===o.row&&a.column>=o.column)throw Error(`invalid range`);this._terminal.select(a.column,a.row,(o.row-a.row)*this._terminal.cols-a.column+o.column)}}_handleResize(e){this._rowElements[this._rowElements.length-1].removeEventListener(`focus`,this._bottomBoundaryFocusListener);for(let e=this._rowContainer.children.length;e<this._terminal.rows;e++)this._rowElements[e]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[e]);for(;this._rowElements.length>e;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener(`focus`,this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){let e=this._coreBrowserService.mainDocument.createElement(`div`);return e.setAttribute(`role`,`listitem`),e.tabIndex=-1,this._refreshRowDimensions(e),e}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){Object.assign(this._accessibilityContainer.style,{width:`${this._renderService.dimensions.css.canvas.width}px`,fontSize:`${this._terminal.options.fontSize}px`}),this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let e=0;e<this._terminal.rows;e++)this._refreshRowDimensions(this._rowElements[e]),this._alignRowWidth(this._rowElements[e])}}_refreshRowDimensions(e){e.style.height=`${this._renderService.dimensions.css.cell.height}px`}_alignRowWidth(e){e.style.transform=``;let t=e.getBoundingClientRect().width,n=this._rowColumns.get(e)?.slice(-1)?.[0];if(!n)return;let Line truncated
`,t)}paste(e){this._core.paste(e)}refresh(e,t){this._verifyIntegers(e,t),this._core.refresh(e,t)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(e){this._addonManager.loadAddon(this,e)}static get strings(){return{get promptLabel(){return aN.get()},set promptLabel(e){aN.set(e)},get tooMuchOutput(){return sN.get()},set tooMuchOutput(e){sN.set(e)}}}_verifyIntegers(...e){for(HB of e)if(HB===1/0||isNaN(HB)||HB%1!=0)throw Error(`This API only accepts integers`)}_verifyPositiveIntegers(...e){for(HB of e)if(HB&&(HB===1/0||isNaN(HB)||HB%1!=0||HB<0))throw Error(`This API only accepts positive integers`)}},WB=2,GB=1,KB=class{activate(e){this._terminal=e}dispose(){}fit(){let e=this.proposeDimensions();if(!e||!this._terminal||isNaN(e.cols)||isNaN(e.rows))return;let t=this._terminal._core;(this._terminal.rows!==e.rows||this._terminal.cols!==e.cols)&&(t._renderService.clear(),this._terminal.resize(e.cols,e.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;let e=this._terminal._core._renderService.dimensions;if(e.css.cell.width===0||e.css.cell.height===0)return;let t=this._terminal.options.scrollback===0?0:this._terminal.options.overviewRuler?.width||14,n=window.getComputedStyle(this._terminal.element.parentElement),r=parseInt(n.getPropertyValue(`height`)),i=Math.max(0,parseInt(n.getPropertyValue(`width`))),a=window.getComputedStyle(this._terminal.element),o={top:parseInt(a.getPropertyValue(`padding-top`)),bottom:parseInt(a.getPropertyValue(`padding-bottom`)),right:parseInt(a.getPropertyValue(`padding-right`)),left:parseInt(a.getPropertyValue(`padding-left`))},s=o.top+o.bottom,c=o.right+o.left,l=r-s,u=i-c-t;return{cols:Math.max(WB,Math.floor(u/e.css.cell.width)),rows:Math.max(GB,Math.floor(l/e.css.cell.height))}}},qB={class:`flex h-[32rem] min-h-0 flex-col gap-2`},JB={key:0,class:`text-sm text-fg-muted`,role:`status`},YB=N({__name:`SandboxView`,props:{taskId:{},attempt:{}},setup(e){let t=e,n=q(null),r=q(`connecting`),i=null,a=null,o=null,s=null;function c(){try{o?.fit()}catch{}}return Ue(()=>{let e=n.value;if(!e)return;i=new UB({convertEol:!0,disableStdin:!0,cursorBlink:!1,fontFamily:`'IBM Plex Mono', ui-monospace, monospace`,fontSize:13,theme:{background:`#0b0f14`,foreground:`#e6edf3`}}),o=new KB,i.loadAddon(o),i.open(e),c();let l=window.location.protocol===`https:`?`wss:`:`ws:`,u=new URLSearchParams({attempt:String(t.attempt)}),d=new WebSocket(`${l}//${window.location.host}/api/tasks/${encodeURIComponent(t.taskId)}/sandbox?${u}`);a=d,d.binaryType=`arraybuffer`,d.onopen=()=>{r.value=`open`},d.onmessage=e=>{i&&(typeof e.data==`string`&&(r.value=`failed`),i.write(typeof e.data==`string`?e.data:new Uint8Array(e.data)))},d.onerror=()=>{r.value=`failed`},d.onclose=()=>{r.value!==`failed`&&(r.value=`closed`)},s=new ResizeObserver(c),s.observe(e)}),rt(()=>{s?.disconnect(),s=null,a?.close(),a=null,i?.dispose(),i=null,o=null}),(e,t)=>(I(),A(`div`,qB,[r.value===`open`?P(``,!0):(I(),A(`p`,JB,[r.value===`connecting`?(I(),A(H,{key:0},[V(`Connecting…`)],64)):r.value===`closed`?(I(),A(H,{key:1},[V(`The sandbox ended.`)],64)):(I(),A(H,{key:2},[V(`Sandbox unavailable.`)],64))])),L(`div`,{ref_key:`host`,ref:n,class:`min-h-0 flex-1 overflow-hidden rounded-md border border-border bg-[#0b0f14] p-2`},null,512)]))}}),XB={class:`flex flex-wrap items-center gap-3 border-b border-border pb-3`},ZB={class:`inline-flex items-center gap-2`},QB={class:`inline-flex items-center gap-2`},$B=`__all__`,eV=N({__name:`TaskLogFilters`,props:{filters:{},stages:{}},emits:[`filter`],setup(e,{emit:t}){let n=e,r=t,i=J(()=>yT.map(e=>({value:e.value||$B,label:e.label}))),a=J(()=>n.filters.level||$B),o=J(()=>n.filters.stage||$B);function s(e){r(`filter`,{...n.filters,...e})}function c(e){s({level:String(e)===$B?``:String(e)})}function l(e){s({stage:String(e)===$B?``:String(e)})}return(t,n)=>(I(),A(`div`,XB,[L(`div`,ZB,[k(B(Tf),{"model-value":a.value,"onUpdate:modelValue":c},{default:F(()=>[k(B(Mf),{size:`sm`,"aria-label":`Filter log entries by level`},{default:F(()=>[k(B(Nf))]),_:1}),k(B(Ef),null,{default:F(()=>[k(B(Df),null,{default:F(()=>[(I(!0),A(H,null,j(i.value,e=>(I(),K(B(kf),{key:e.value,value:e.value},{default:F(()=>[V(z(e.label),1)]),_:2},1032,[`value`]))),128))]),_:1})]),_:1})]),_:1},8,[`model-value`])]),L(`div`,QB,[k(B(Tf),{"model-value":o.value,"onUpdate:modelValue":l},{default:F(()=>[k(B(Mf),{size:`sm`,"aria-label":`Filter log entries by stage`},{default:F(()=>[k(B(Nf))]),_:1}),k(B(Ef),null,{default:F(()=>[k(B(Df),null,{default:F(()=>[k(B(kf),{value:$B},{default:F(()=>[...n[0]||=[V(`All stages`,-1)]]),_:1}),(I(!0),A(H,null,j(e.stages,e=>(I(),K(B(kf),{key:e,value:e},{default:F(()=>[V(z(e),1)]),_:2},1032,[`value`]))),128))]),_:1})]),_:1})]),_:1},8,[`model-value`])])]))}}),tV={class:`sr-only`,role:`status`,"aria-live":`polite`,"aria-atomic":`true`},nV={key:2,class:`flex flex-col items-start gap-2 py-3`},rV={key:0,class:`mt-2 flex flex-wrap items-cent Line truncated
`,t)}paste(e){this._core.paste(e)}refresh(e,t){this._verifyIntegers(e,t),this._core.refresh(e,t)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(e){this._addonManager.loadAddon(this,e)}static get strings(){return{get promptLabel(){return aN.get()},set promptLabel(e){aN.set(e)},get tooMuchOutput(){return sN.get()},set tooMuchOutput(e){sN.set(e)}}}_verifyIntegers(...e){for(HB of e)if(HB===1/0||isNaN(HB)||HB%1!=0)throw Error(`This API only accepts integers`)}_verifyPositiveIntegers(...e){for(HB of e)if(HB&&(HB===1/0||isNaN(HB)||HB%1!=0||HB<0))throw Error(`This API only accepts positive integers`)}},WB=2,GB=1,KB=class{activate(e){this._terminal=e}dispose(){}fit(){let e=this.proposeDimensions();if(!e||!this._terminal||isNaN(e.cols)||isNaN(e.rows))return;let t=this._terminal._core;(this._terminal.rows!==e.rows||this._terminal.cols!==e.cols)&&(t._renderService.clear(),this._terminal.resize(e.cols,e.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;let e=this._terminal._core._renderService.dimensions;if(e.css.cell.width===0||e.css.cell.height===0)return;let t=this._terminal.options.scrollback===0?0:this._terminal.options.overviewRuler?.width||14,n=window.getComputedStyle(this._terminal.element.parentElement),r=parseInt(n.getPropertyValue(`height`)),i=Math.max(0,parseInt(n.getPropertyValue(`width`))),a=window.getComputedStyle(this._terminal.element),o={top:parseInt(a.getPropertyValue(`padding-top`)),bottom:parseInt(a.getPropertyValue(`padding-bottom`)),right:parseInt(a.getPropertyValue(`padding-right`)),left:parseInt(a.getPropertyValue(`padding-left`))},s=o.top+o.bottom,c=o.right+o.left,l=r-s,u=i-c-t;return{cols:Math.max(WB,Math.floor(u/e.css.cell.width)),rows:Math.max(GB,Math.floor(l/e.css.cell.height))}}},qB={class:`flex h-[32rem] min-h-0 flex-col gap-2`},JB={key:0,class:`text-sm text-fg-muted`,role:`status`},YB=N({__name:`SandboxView`,props:{taskId:{},attempt:{}},setup(e){let t=e,n=q(null),r=q(`connecting`),i=null,a=null,o=null,s=null;function c(){try{o?.fit()}catch{}}return Ue(()=>{let e=n.value;if(!e)return;i=new UB({convertEol:!0,disableStdin:!0,cursorBlink:!1,fontFamily:`'IBM Plex Mono', ui-monospace, monospace`,fontSize:13,theme:{background:`#0b0f14`,foreground:`#e6edf3`}}),o=new KB,i.loadAddon(o),i.open(e),c();let l=window.location.protocol===`https:`?`wss:`:`ws:`,u=new URLSearchParams({attempt:String(t.attempt)}),d=new WebSocket(`${l}//${window.location.host}/api/tasks/${encodeURIComponent(t.taskId)}/sandbox?${u}`);a=d,d.binaryType=`arraybuffer`,d.onopen=()=>{r.value=`open`},d.onmessage=e=>{i&&(typeof e.data==`string`&&(r.value=`failed`),i.write(typeof e.data==`string`?e.data:new Uint8Array(e.data)))},d.onerror=()=>{r.value=`failed`},d.onclose=()=>{r.value!==`failed`&&(r.value=`closed`)},s=new ResizeObserver(c),s.observe(e)}),rt(()=>{s?.disconnect(),s=null,a?.close(),a=null,i?.dispose(),i=null,o=null}),(e,t)=>(I(),A(`div`,qB,[r.value===`open`?P(``,!0):(I(),A(`p`,JB,[r.value===`connecting`?(I(),A(H,{key:0},[V(`Connecting…`)],64)):r.value===`closed`?(I(),A(H,{key:1},[V(`The sandbox ended.`)],64)):(I(),A(H,{key:2},[V(`Sandbox unavailable.`)],64))])),L(`div`,{ref_key:`host`,ref:n,class:`min-h-0 flex-1 overflow-hidden rounded-md border border-border bg-[#0b0f14] p-2`},null,512)]))}}),XB={class:`flex flex-wrap items-center gap-3 border-b border-border pb-3`},ZB={class:`inline-flex items-center gap-2`},QB={class:`inline-flex items-center gap-2`},$B=`__all__`,eV=N({__name:`TaskLogFilters`,props:{filters:{},stages:{}},emits:[`filter`],setup(e,{emit:t}){let n=e,r=t,i=J(()=>yT.map(e=>({value:e.value||$B,label:e.label}))),a=J(()=>n.filters.level||$B),o=J(()=>n.filters.stage||$B);function s(e){r(`filter`,{...n.filters,...e})}function c(e){s({level:String(e)===$B?``:String(e)})}function l(e){s({stage:String(e)===$B?``:String(e)})}return(t,n)=>(I(),A(`div`,XB,[L(`div`,ZB,[k(B(Tf),{"model-value":a.value,"onUpdate:modelValue":c},{default:F(()=>[k(B(Mf),{size:`sm`,"aria-label":`Filter log entries by level`},{default:F(()=>[k(B(Nf))]),_:1}),k(B(Ef),null,{default:F(()=>[k(B(Df),null,{default:F(()=>[(I(!0),A(H,null,j(i.value,e=>(I(),K(B(kf),{key:e.value,value:e.value},{default:F(()=>[V(z(e.label),1)]),_:2},1032,[`value`]))),128))]),_:1})]),_:1})]),_:1},8,[`model-value`])]),L(`div`,QB,[k(B(Tf),{"model-value":o.value,"onUpdate:modelValue":l},{default:F(()=>[k(B(Mf),{size:`sm`,"aria-label":`Filter log entries by stage`},{default:F(()=>[k(B(Nf))]),_:1}),k(B(Ef),null,{default:F(()=>[k(B(Df),null,{default:F(()=>[k(B(kf),{value:$B},{default:F(()=>[...n[0]||=[V(`All stages`,-1)]]),_:1}),(I(!0),A(H,null,j(e.stages,e=>(I(),K(B(kf),{key:e,value:e},{default:F(()=>[V(z(e),1)]),_:2},1032,[`value`]))),128))]),_:1})]),_:1})]),_:1},8,[`model-value`])])]))}}),tV={class:`sr-only`,role:`status`,"aria-live":`polite`,"aria-atomic":`true`},nV={key:2,class:`flex flex-col items-start gap-2 py-3`},rV={key:0,class:`mt-2 flex flex-wrap items-cent Line truncated
`)}};hK.defaultYaml={explicit:!1,version:`1.2`},hK.defaultTags={"!!":`tag:yaml.org,2002:`};function gK(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){let t=`Anchor must not contain whitespace or control characters: ${JSON.stringify(e)}`;throw Error(t)}return!0}function _K(e){let t=new Set;return cK(e,{Value(e,n){n.anchor&&t.add(n.anchor)}}),t}function vK(e,t){for(let n=1;;++n){let r=`${e}${n}`;if(!t.has(r))return r}}function yK(e,t){let n=[],r=new Map,i=null;return{onAnchor:r=>{n.push(r),i??=_K(e);let a=vK(t,i);return i.add(a),a},setAnchors:()=>{for(let e of n){let t=r.get(e);if(typeof t==`object`&&t.anchor&&(eK(t.node)||nK(t.node)))t.node.anchor=t.anchor;else{let t=Error(`Failed to resolve repeated object (this should not happen)`);throw t.source=e,t}}},sourceObjects:r}}function bK(e,t,n,r){if(r&&typeof r==`object`){if(Array.isArray(r))for(let t=0,n=r.length;t<n;++t){let n=r[t],i=bK(e,r,String(t),n);i===void 0?delete r[t]:i!==n&&(r[t]=i)}else if(r instanceof Map)for(let t of Array.from(r.keys())){let n=r.get(t),i=bK(e,r,t,n);i===void 0?r.delete(t):i!==n&&r.set(t,i)}else if(r instanceof Set)for(let t of Array.from(r)){let n=bK(e,r,t,t);n===void 0?r.delete(t):n!==t&&(r.delete(t),r.add(n))}else for(let[t,n]of Object.entries(r)){let i=bK(e,r,t,n);i===void 0?delete r[t]:i!==n&&(r[t]=i)}}return e.call(t,n,r)}function xK(e,t,n){if(Array.isArray(e))return e.map((e,t)=>xK(e,String(t),n));if(e&&typeof e.toJSON==`function`){if(!n||!iK(e))return e.toJSON(t,n);let r={aliasCount:0,count:1,res:void 0};n.anchors.set(e,r),n.onCreate=e=>{r.res=e,delete n.onCreate};let i=e.toJSON(t,n);return n.onCreate&&n.onCreate(i),i}return typeof e==`bigint`&&!n?.keep?Number(e):e}var SK=class{constructor(e){Object.defineProperty(this,YG,{value:e})}clone(){let e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:t,maxAliasCount:n,onAnchor:r,reviver:i}={}){if(!ZG(e))throw TypeError(`A document argument is required`);let a={anchors:new Map,doc:e,keep:!0,mapAsMap:t===!0,mapKeyWarned:!1,maxAliasCount:typeof n==`number`?n:100},o=xK(this,``,a);if(typeof r==`function`)for(let{count:e,res:t}of a.anchors.values())r(t,e);return typeof i==`function`?bK(i,{"":o},``,o):o}},CK=class extends SK{constructor(e){super(UG),this.source=e,Object.defineProperty(this,"tag",{set(){throw Error(`Alias nodes cannot have tags`)}})}resolve(e,t){if(t?.maxAliasCount===0)throw ReferenceError(`Alias resolution is disabled`);let n;t?.aliasResolveCache?n=t.aliasResolveCache:(n=[],cK(e,{Node:(e,t)=>{(XG(t)||iK(t))&&n.push(t)}}),t&&(t.aliasResolveCache=n));let r;for(let e of n){if(e===this)break;e.anchor===this.source&&(r=e)}if(r&&t){let{anchors:e,doc:n,maxAliasCount:i}=t,a=e.get(r);if(a||=(xK(r,null,t),e.get(r)),a?.res===void 0)throw ReferenceError(`This should not happen: Alias anchor was not resolved?`);if(i>=0&&(a.count+=1,a.aliasCount===0&&(a.aliasCount=wK(n,r,e)),a.count*a.aliasCount>i))throw ReferenceError(`Excessive alias count indicates a resource exhaustion attack`)}return r}toJSON(e,t){if(!t)return{source:this.source};let n=this.resolve(t.doc,t);if(!n){let e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw ReferenceError(e)}return t.anchors.get(n).res}toString(e,t,n){let r=`*${this.source}`;if(e){if(gK(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){let e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw Error(e)}if(e.implicitKey)return`${r} `}return r}};function wK(e,t,n){if(XG(t)){let r=t.resolve(e),i=n&&r&&n.get(r);return i?i.count*i.aliasCount:0}if(nK(t)){let r=0;for(let i of t.items){let t=wK(e,i,n);t>r&&(r=t)}return r}if($G(t)){let r=wK(e,t.key,n),i=wK(e,t.value,n);return Math.max(r,i)}return 1}var TK=e=>!e||typeof e!=`function`&&typeof e!=`object`,EK=class extends SK{constructor(e){super(qG),this.value=e}toJSON(e,t){return t?.keep?this.value:xK(this.value,e,t)}toString(){return String(this.value)}};EK.BLOCK_FOLDED=`BLOCK_FOLDED`,EK.BLOCK_LITERAL=`BLOCK_LITERAL`,EK.PLAIN=`PLAIN`,EK.QUOTE_DOUBLE=`QUOTE_DOUBLE`,EK.QUOTE_SINGLE=`QUOTE_SINGLE`;var DK=`tag:yaml.org,2002:`;function OK(e,t,n){if(t){let e=n.filter(e=>e.tag===t),r=e.find(e=>!e.format)??e[0];if(!r)throw Error(`Tag ${t} not found`);return r}return n.find(t=>t.identify?.(e)&&!t.format)}function kK(e,t,n){if(ZG(e)&&(e=e.contents),rK(e))return e;if($G(e)){let t=n.schema[GG].createNode?.(n.schema,null,n);return t.items.push(e),t}(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt<`u`&&e instanceof BigInt)&&(e=e.valueOf());let{aliasDuplicateObjects:r,onAnchor:i,onTagObj:a,schema:o,sourceObjects:s}=n,c;if(r&&e&&typeof e==`object`){if(c=s.get(e),c)return c.anchor??(c.anchor=i(e)),new CK(c.anchor);c={anchor:null,node:null},s.set(e,c)}t?.startsWith(`!!`)&&(t=DK+t.slice(2));let l=OK(e,t,o.tags);if(!l){if(e&&typeof e.toJSON==`function`&&(e=e.toJSON()),!e||typeof e!=`object`){let t=new EK(e);return c&&(c.node=t),t Line truncated
`)?PK(n,t):n.includes(`
`)?`
+3 -3
View File
@@ -20,7 +20,7 @@ const fields = () => Object.entries(props.entry.fields ?? {});
<template>
<div
class="grid grid-cols-[62px_52px_1fr] items-baseline gap-3 border-b border-b-border border-l-2 px-1 py-2 hover:bg-accent"
class="grid grid-cols-[62px_52px_1fr] items-baseline gap-x-3 gap-y-1 max-sm:grid-cols-[62px_1fr] border-b border-b-border border-l-2 px-1 py-2 hover:bg-accent"
:class="rowClass(props.entry.level)"
>
<span class="font-mono text-fg-subtle">{{
@@ -32,8 +32,8 @@ const fields = () => Object.entries(props.entry.fields ?? {});
>
{{ (props.entry.level || "info").toUpperCase() }}
</span>
<span class="flex min-w-0 flex-wrap items-baseline gap-2">
<span class="break-words font-mono text-foreground">{{
<span class="flex min-w-0 flex-wrap items-baseline gap-2 max-sm:col-span-2">
<span class="min-w-0 font-mono text-foreground [overflow-wrap:anywhere]">{{
props.entry.message || props.entry.msg || ""
}}</span>
<span
+2 -2
View File
@@ -127,7 +127,7 @@ const startedAt = computed(() => {
timeLimit
}}</span>
</div>
<p v-if="attempt.error" role="alert" class="mb-3 whitespace-pre-wrap break-words text-sm text-danger">{{ attempt.error }}</p>
<p v-if="attempt.error && attempt.error !== run.task?.park_reason" role="alert" class="mb-3 whitespace-pre-wrap break-words text-sm text-danger">{{ attempt.error }}</p>
<ol
v-if="stages.length"
:aria-label="`Stages recorded in attempt ${attempt.attempt}`"
@@ -142,7 +142,7 @@ const startedAt = computed(() => {
@select="selectStage(stage)"
/>
</ol>
<Empty v-else>
<Empty v-else-if="!attempt.error">
<EmptyHeader>
<EmptyTitle>No workflow steps recorded</EmptyTitle>
</EmptyHeader>
+1 -1
View File
@@ -174,7 +174,7 @@ const headerActions = computed(() =>
<Button variant="ghost" size="sm" :disabled="jumping || run.attemptNumber == null" @click="jumpToLog">Jump to log line</Button>
</AlertTitle>
<AlertDescription>
<p v-if="failure.detail" class="mt-0.5 font-mono text-xs break-words text-fg-muted">{{ failure.detail }}</p>
<p v-if="failure.detail" class="mt-0.5 font-mono text-xs text-fg-muted [overflow-wrap:anywhere]">{{ failure.detail }}</p>
<p v-if="jumpError" class="mt-1 text-xs" role="alert">{{ jumpError }}</p>
<Button v-if="failure.parked && run.attempts?.recovery" as-child size="sm" class="mt-2">
<RouterLink :to="run.attempts.recovery.link">{{ run.attempts.recovery.label }}</RouterLink>