fix(webui): drop settings hints that restate their label
This commit is contained in:
1 parent
9e566e7278
commit
8664e8cd97
3 files changed
+4
-4
No files matched your search
Vendored
+1
-1
@@ -12,7 +12,7 @@ Defaulting to \`null\`.`),null)}function ec(e){return Qs(e)&&!Number.isNaN(e)&&e
|
||||
`)}),a=null):a=[];continue}if(a){a.push(c);continue}let l=Fd(c),u=e+1<n.length?Fd(n[e+1]):null;if(l&&u&&Id(u)&&l.length===u.length){o(),s();let r=[];for(e+=2;e<n.length;e++){let t=Fd(n[e]);if(!t||t.length!==l.length){e--;break}r.push(t)}t.push({kind:`table`,head:l.map(e=>Nd(e)),rows:r.map(e=>e.map(e=>Nd(e)))});continue}if(!c.trim()){o(),s();continue}let d=c.match(/^(#{1,3})\s+(.+)$/);if(d){o(),s(),t.push({kind:`h${d[1].length}`,inline:Nd(d[2])});continue}let f=c.match(/^\s*[-*]\s+(.+)$/),p=c.match(/^\s*\d+[.)]\s+(.+)$/);if(f||p){o();let e=p?`ol`:`ul`;(!i||i.tag!==e)&&(s(),i={tag:e,items:[]}),i.items.push((f||p)[1])}else c.startsWith(`>`)?(o(),s(),t.push({kind:`blockquote`,inline:Nd(c.replace(/^>\s?/,``))})):r.push(c)}return o(),s(),a&&t.push({kind:`pre`,code:a.join(`
|
||||
`)}),t}function Fd(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 Id(e){return e.every(e=>/^:?-{3,}:?$/.test(e))}var Ld={class:`[overflow-wrap:anywhere]`},Rd={key:0,class:`my-2 overflow-auto rounded-md border border-border bg-background/60 p-3`},zd={class:`font-mono text-[0.85em]`},Bd={key:1,class:`my-3 w-full border-collapse text-[0.92em]`},Vd={key:2,class:`my-2 border-l-[3px] border-primary pl-3 text-fg-muted`},Hd={key:3,class:`mt-1 mb-2 text-xl leading-tight font-semibold tracking-[-0.02em]`},Ud={key:4,class:`mt-1 mb-2 text-lg leading-tight font-semibold tracking-[-0.02em]`},Wd={key:5,class:`mt-1 mb-2 text-base leading-tight font-semibold tracking-[-0.02em]`},Gd={key:6,class:`my-2.5 flex list-disc flex-col gap-1 pl-5`},Kd={key:7,class:`my-2.5 flex list-decimal flex-col gap-1 pl-5`},qd={key:8,class:`mb-2.5 last:mb-0`},Jd=k({__name:`ChatMarkdown`,props:{text:{}},setup(e){let t=e,n=I(()=>Pd(t.text));return(e,t)=>(R(),G(`div`,Ld,[(R(!0),G(H,null,K(n.value,(e,t)=>(R(),G(H,{key:t},[e.kind===`pre`?(R(),G(`pre`,Rd,[W(`code`,zd,V(e.code),1)])):e.kind===`table`?(R(),G(`table`,Bd,[W(`thead`,null,[W(`tr`,null,[(R(!0),G(H,null,K(e.head,(e,t)=>(R(),G(`th`,{key:t,class:`border border-border bg-muted px-2 py-1.5 text-left font-semibold`},[M(jd,{inline:e},null,8,[`inline`])]))),128))])]),W(`tbody`,null,[(R(!0),G(H,null,K(e.rows,(e,t)=>(R(),G(`tr`,{key:t},[(R(!0),G(H,null,K(e,(e,t)=>(R(),G(`td`,{key:t,class:`border border-border px-2 py-1.5 text-left`},[M(jd,{inline:e},null,8,[`inline`])]))),128))]))),128))])])):e.kind===`blockquote`?(R(),G(`blockquote`,Vd,[M(jd,{inline:e.inline},null,8,[`inline`])])):e.kind===`h1`?(R(),G(`h1`,Hd,[M(jd,{inline:e.inline},null,8,[`inline`])])):e.kind===`h2`?(R(),G(`h2`,Ud,[M(jd,{inline:e.inline},null,8,[`inline`])])):e.kind===`h3`?(R(),G(`h3`,Wd,[M(jd,{inline:e.inline},null,8,[`inline`])])):e.kind===`ul`?(R(),G(`ul`,Gd,[(R(!0),G(H,null,K(e.items,(e,t)=>(R(),G(`li`,{key:t},[M(jd,{inline:e},null,8,[`inline`])]))),128))])):e.kind===`ol`?(R(),G(`ol`,Kd,[(R(!0),G(H,null,K(e.items,(e,t)=>(R(),G(`li`,{key:t},[M(jd,{inline:e},null,8,[`inline`])]))),128))])):e.kind===`p`?(R(),G(`p`,qd,[M(jd,{inline:e.inline},null,8,[`inline`])])):L(``,!0)],64))),128))]))}}),Yd={class:`truncate`},Xd=k({__name:`ChatNavChip`,props:{path:{},label:{}},setup(e){return(t,n)=>{let r=je(`RouterLink`);return R(),q(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:j(()=>[M(z(Gt),{"aria-hidden":`true`,class:`size-3.5 shrink-0`}),W(`span`,Yd,V(e.label||e.path),1)]),_:1},8,[`to`,`title`])}}}),Zd={key:1,class:`flex items-baseline gap-1.5 [overflow-wrap:anywhere]`},Qd={class:`font-semibold text-foreground`},$d={key:0,class:`font-mono text-[0.95em] text-fg-subtle`},ef=k({__name:`ChatToolCall`,props:{tool:{},streaming:{type:Boolean}},setup(e){let t=e,n=I(()=>t.tool.name||t.tool.Name||t.tool.tool||`tool`),r=I(()=>t.tool.parameters||t.tool.Parameters||``),i=I(()=>!!(t.tool.err||t.tool.Err||t.tool.failed)),a=I(()=>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?(R(),q(Xd,{key:0,path:e.tool.path,label:e.tool.label},null,8,[`path`,`label`])):(R(),G(`div`,Zd,[M(z(Jn),{"aria-hidden":`true`,class:`size-3.5 shrink-0 self-center text-fg-subtle`}),W(`span`,Qd,V(n.value),1),r.value?(R(),G(`code`,$d,V(r.value),1)):L(``,!0),W(`span`,{class:N(z(Z)(`text-fg-muted`,i.value&&`text-danger`))},V(a.value),3)]))}}),tf={key:0,class:`mb-2 grid gap-0.5 text-xs`},nf={key:1,class:`mb-2 flex flex-wrap gap-1.5`},rf={key:3,class:`whitespace-pre-wrap`},af=k({__name:`ChatBubble`,props:{text:{},tools:{default:()=>[]},media:{default:()=>[]},assistant:{type:Boolean,default:!1},streaming:{type:Boolean,default:!1}},setup(e){return(t,n)=>(R(),G(`div`,{class:N([`flex`,e.assistant?`justify-start`:`justify-end`])},[W(`div`,{class:N(z(Z)(`max-w-[min(78ch,86%)] rounded-[0.85rem] px-4 py-3 leading-normal [overflow-wrap:anywhere]`,e.assistant?`bg-muted`:`bg-primary/15`))},[e.assistant&&e.tools.length?(R(),G(`div`,tf,[(R(!0),G(H,null,K(e.tools,(t,n)=>(R(),q(ef,{key:n,tool:t,streaming:e.streaming},null,8,[`tool`,`streaming`]))),128))])):L(``,!0),e.media.length?(R(),G(`div`,nf,[(R(!0),G(H,null,K(e.media,(e,t)=>(R(),q(wd,{key:t,attachment:e},null,8,[`attachment`]))),128))])):L(``,!0),e.assistant?(R(),q(Jd,{key:2,text:e.text},null,8,[`text`])):(R(),G(`div`,rf,V(e.text),1)),P(t.$slots,`default`)],2)],2))}}),of={class:`text-sm`},sf={class:`font-medium`},cf={key:0,class:`mt-1 text-fg-muted`},lf={key:1,class:`mt-2 flex flex-wrap gap-2`},uf=k({__name:`ChatChooLine truncated
|
||||
`).map(e=>e.trim()).find(Boolean)||``,r=n.length>Z_?`${n.slice(0,Z_).trimEnd()}…`:n;return{text:r,full:t,truncated:r!==t}}function $_(e){return String(e||`event`).replaceAll(`_`,` `).replace(/\b\w/g,e=>e.toUpperCase())}function ev(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 tv(e){let t=Number(e);return!Number.isFinite(t)||t<=0?``:t.toLocaleString(`en-US`)}function nv(e){return typeof e==`string`?e:``}function rv(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=ev(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,nv(t.error),nv(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:[nv(t.previous_stage)&&`after ${nv(t.previous_stage)}`,nv(t.previous_reason)].filter(Boolean).join(`: `)||e.detail||``}}if(e.kind===`agent_finish`){let r=tv(t.iterations),i=tv(t.tokens),a=Number(t.cached_tokens)||0,o=tv((Number(t.prompt_tokens)||0)-a),s=tv(t.completion_tokens),c=tv(t.cached_tokens),l=[r&&`${r} iterations`,i&&`${i} tokens`,o&&`${o} fresh prompt`,s&&`${s} completion`,c&&`${c} cached`,nv(t.model)].filter(Boolean);return{title:`Agent ${nv(t.status)||`finished`}: ${n}`,detail:l.join(` · `)||e.detail||``}}if(e.kind===`remediation_round`){let e=Number(t.of),n=nv(t.author);return{title:`Remediation ${nv(t.round)}${e>0?` of ${e}`:``}`,detail:[n&&`answers ${n}'s review`,t.review_id?`#${nv(t.review_id)}`:``].filter(Boolean).join(` `)}}if(e.kind===`review_approved`){let e=nv(t.pr_number);return{title:`Pull request approved`,detail:[nv(t.author),e&&`#${e}`].filter(Boolean).join(` · `)}}if(e.kind===`step_retried`)return{title:`Attempt ${nv(t.attempt)} of ${nv(t.of)} failed: ${e.stage||`step`}`,detail:nv(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=nv(t.source),n=nv(t.capture_id),r=[{label:`binding ${nv(t.binding_name)||nv(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 ${nv(t.captured_after)}`:``].filter(Boolean).join(` · `)}}return{title:$_(e.kind||e.type),detail:e.detail||``}}var iv=[`title`],av=k({__name:`ActivityRow`,props:{event:{}},emits:[`open`],setup(e,{emit:t}){let n=e,r=t,i=e_(),a=I(()=>i.taskIDFor(n.event)),o=I(()=>Q_(n.event));function s(){a.value>0&&r(`open`,a.value)}let c=I(()=>n.event.at?Ng(n.event.at):`—`);return(e,t)=>(R(),q(z(Y_),{class:N(a.value>0?`cursor-pointer`:``),role:a.value>0?`link`:void 0,tabindex:a.value>0?0:void 0,title:a.value>0?`Open task details`:void 0,onClick:s,onKeydown:[yt(Ct(s,[`prevent`]),[`enter`]),yt(Ct(s,[`prevent`]),[`space`])]},{default:j(()=>[M(z(Q),{class:`font-medium`},{default:j(()=>[A(V(z(rv)({...n.event,at:void 0,detail:void 0}).title),1)]),_:1}),M(z(Q),{class:`font-mono`},{default:j(()=>[A(V(a.value>0?`#${a.value}`:`—`),1)]),_:1}),M(z(Q),{class:`w-[55%] max-w-0`},{default:j(()=>[W(`span`,{class:`block truncate`,title:o.value.truncated?o.value.full:void 0},V(o.value.text),9,iv)]),_:1}),M(z(Q),null,{default:j(()=>[A(V(c.value),1)]),_:1})]),_:1},8,[`class`,`role`,`tabindex`,`title`,`onKeydown`]))}}),ov=[{value:`all`,label:`All`},{value:`tasks`,label:`Tasks`},{value:`system`,label:`System`}];function sv(e){return(Number(e?.task_id)||0)>0}function cv(e,t){return t===`tasks`?sv(e):t!==`system`||!sv(e)}function lv(e,t){return e.filter(e=>cv(e,t))}function uv(e,t){return e>0?``:t===`all`?`Waiting for activity`:t===`tasks`?`No task events yet`:`No system events yet`}function dv(e,t){return`${e}:${t??0}`}function fv(e){let t=[];for(let n of e){let e=n.kind||n.type||`event`,r=Number(n.task_id)||0,i=dv(Q_(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 pv={role:`region`,"aria-label":`Live activity`,"aria-live":`polite`},mv={class:`max-h-[28rem] overflow-y-auto`},hv=[`aria-expanded`,`aria-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 Cy(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 wy(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 Ty(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 Ey(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 Dy=J([]),Oy=J([]),ky=J(!0),Ay=J(null),jy=J(null),My=J(!1),Ny=J(null);async function Py(){try{let e=await X.eventTypes(xy().workspace);ky.value=e.enabled!==!1,Dy.value=e.event_types||[],Oy.value=e.proposals||[],Ay.value=null}catch(e){Ay.value=e.message||String(e)}}function Fy(e){return{headers:(e.headers||[]).map(e=>({...e})),payload:(e.payload||[]).map(e=>({...e}))}}function Iy(e){Ny.value=null,jy.value=e}function Ly(e){let t=Gy.value.find(t=>String(t.id)===e.sample_id);Iy({mode:`proposal`,id:null,source:e.source,name:``,rule:Fy(e.rule),headersText:``,body:t?.body||``,exampleHeaders:e.headers||{}})}function Ry(e=``){Iy({mode:`paste`,id:null,source:e,name:``,rule:{headers:[],payload:[]},headersText:``,body:``,exampleHeaders:{}})}function zy(e){Iy({mode:`edit`,id:e.id,source:e.source,name:e.name,rule:Fy(e.rule),headersText:``,body:``,exampleHeaders:{}})}function By(){jy.value=null}async function Vy(){let e=jy.value;if(e){My.value=!0;try{if(e.mode===`edit`&&e.id)await X.eventTypeUpdate(e.id,{name:e.name,rule:Ey(e.rule)});else{let t=e.mode===`paste`?Sy(e.headersText):e.exampleHeaders;await X.eventTypeCreate({source:e.source,name:e.name,rule:e.mode===`paste`?void 0:Ey(e.rule),example:{headers:t,body:e.body}})}jy.value=null,await Py()}catch(e){Ny.value=e.message||String(e)}finally{My.value=!1}}}var Hy=J(null);async function Uy(){let e=Hy.value;if(Hy.value=null,e)try{await X.eventTypeDelete(e.id),await Py()}catch(e){Ay.value=e.message||String(e)}}var Wy=100,Gy=J([]),Ky=J(!0),qy=J(null),Jy=J(!0),Yy=J(null);async function Xy(){try{let e=await X.captures(Wy);Ky.value=e.enabled!==!1,Gy.value=e.captures||[],qy.value=null}catch(e){qy.value=e.message||String(e)}finally{Jy.value=!1}}function Zy(e){let t=Gy.value.find(t=>t.id===e);return t&&(Yy.value=t),!!t}function Qy(){Gy.value.length&&(Yy.value=Gy.value[0])}function $y(){he(`captures`,()=>{Xy(),Py()})}var eb=k({__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:n}){let r=e,i=n,a=Ot(r,`class`),o=t(a,i);return(e,t)=>(R(),q(z(tl),U({"data-slot":`tabs`,"data-orientation":z(o).orientation||`horizontal`},z(o),{class:z(Z)(`gap-2 group/tabs flex data-horizontal:flex-col`,r.class)}),{default:j(t=>[P(e.$slots,`default`,rt(ke(t)))]),_:3},16,[`data-orientation`,`class`]))}}),tb=k({__name:`TabsContent`,props:{value:{},forceMount:{type:Boolean},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){let t=e,n=Ot(t,`class`);return(e,r)=>(R(),q(z(il),U({"data-slot":`tabs-content`,class:z(Z)(`text-sm flex-1 outline-none`,t.class)},z(n)),{default:j(()=>[P(e.$slots,`default`)]),_:3},16,[`class`]))}}),nb=k({__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=Ot(t,`class`,`variant`);return(r,i)=>(R(),q(z(al),U({"data-slot":`tabs-list`,"data-variant":e.variant},z(n),{class:z(Z)(z(ib)({variant:e.variant}),t.class)}),{default:j(()=>[P(r.$slots,`default`)]),_:3},16,[`data-variant`,`class`]))}}),rb=k({__name:`TabsTrigger`,props:{value:{},disabled:{type:Boolean},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){let t=e,n=Ot(t,`class`),r=ce(n);return(e,n)=>(R(),q(z(ol),U({"data-slot":`tabs-trigger`,class:z(Z)(`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:outline-ring disabled:pointerLine 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 Cy(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 wy(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 Ty(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 Ey(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 Dy=J([]),Oy=J([]),ky=J(!0),Ay=J(null),jy=J(null),My=J(!1),Ny=J(null);async function Py(){try{let e=await X.eventTypes(xy().workspace);ky.value=e.enabled!==!1,Dy.value=e.event_types||[],Oy.value=e.proposals||[],Ay.value=null}catch(e){Ay.value=e.message||String(e)}}function Fy(e){return{headers:(e.headers||[]).map(e=>({...e})),payload:(e.payload||[]).map(e=>({...e}))}}function Iy(e){Ny.value=null,jy.value=e}function Ly(e){let t=Gy.value.find(t=>String(t.id)===e.sample_id);Iy({mode:`proposal`,id:null,source:e.source,name:``,rule:Fy(e.rule),headersText:``,body:t?.body||``,exampleHeaders:e.headers||{}})}function Ry(e=``){Iy({mode:`paste`,id:null,source:e,name:``,rule:{headers:[],payload:[]},headersText:``,body:``,exampleHeaders:{}})}function zy(e){Iy({mode:`edit`,id:e.id,source:e.source,name:e.name,rule:Fy(e.rule),headersText:``,body:``,exampleHeaders:{}})}function By(){jy.value=null}async function Vy(){let e=jy.value;if(e){My.value=!0;try{if(e.mode===`edit`&&e.id)await X.eventTypeUpdate(e.id,{name:e.name,rule:Ey(e.rule)});else{let t=e.mode===`paste`?Sy(e.headersText):e.exampleHeaders;await X.eventTypeCreate({source:e.source,name:e.name,rule:e.mode===`paste`?void 0:Ey(e.rule),example:{headers:t,body:e.body}})}jy.value=null,await Py()}catch(e){Ny.value=e.message||String(e)}finally{My.value=!1}}}var Hy=J(null);async function Uy(){let e=Hy.value;if(Hy.value=null,e)try{await X.eventTypeDelete(e.id),await Py()}catch(e){Ay.value=e.message||String(e)}}var Wy=100,Gy=J([]),Ky=J(!0),qy=J(null),Jy=J(!0),Yy=J(null);async function Xy(){try{let e=await X.captures(Wy);Ky.value=e.enabled!==!1,Gy.value=e.captures||[],qy.value=null}catch(e){qy.value=e.message||String(e)}finally{Jy.value=!1}}function Zy(e){let t=Gy.value.find(t=>t.id===e);return t&&(Yy.value=t),!!t}function Qy(){Gy.value.length&&(Yy.value=Gy.value[0])}function $y(){he(`captures`,()=>{Xy(),Py()})}var eb=k({__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:n}){let r=e,i=n,a=Ot(r,`class`),o=t(a,i);return(e,t)=>(R(),q(z(tl),U({"data-slot":`tabs`,"data-orientation":z(o).orientation||`horizontal`},z(o),{class:z(Z)(`gap-2 group/tabs flex data-horizontal:flex-col`,r.class)}),{default:j(t=>[P(e.$slots,`default`,rt(ke(t)))]),_:3},16,[`data-orientation`,`class`]))}}),tb=k({__name:`TabsContent`,props:{value:{},forceMount:{type:Boolean},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){let t=e,n=Ot(t,`class`);return(e,r)=>(R(),q(z(il),U({"data-slot":`tabs-content`,class:z(Z)(`text-sm flex-1 outline-none`,t.class)},z(n)),{default:j(()=>[P(e.$slots,`default`)]),_:3},16,[`class`]))}}),nb=k({__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=Ot(t,`class`,`variant`);return(r,i)=>(R(),q(z(al),U({"data-slot":`tabs-list`,"data-variant":e.variant},z(n),{class:z(Z)(z(ib)({variant:e.variant}),t.class)}),{default:j(()=>[P(r.$slots,`default`)]),_:3},16,[`data-variant`,`class`]))}}),rb=k({__name:`TabsTrigger`,props:{value:{},disabled:{type:Boolean},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){let t=e,n=Ot(t,`class`),r=ce(n);return(e,n)=>(R(),q(z(ol),U({"data-slot":`tabs-trigger`,class:z(Z)(`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:outline-ring disabled:pointerLine truncated
|
||||
`)}};ML.defaultYaml={explicit:!1,version:`1.2`},ML.defaultTags={"!!":`tag:yaml.org,2002:`};function NL(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 PL(e){let t=new Set;return TL(e,{Value(e,n){n.anchor&&t.add(n.anchor)}}),t}function FL(e,t){for(let n=1;;++n){let r=`${e}${n}`;if(!t.has(r))return r}}function IL(e,t){let n=[],r=new Map,i=null;return{onAnchor:r=>{n.push(r),i??=PL(e);let a=FL(t,i);return i.add(a),a},setAnchors:()=>{for(let e of n){let t=r.get(e);if(typeof t==`object`&&t.anchor&&(_L(t.node)||yL(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 LL(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=LL(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=LL(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=LL(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=LL(e,r,t,n);i===void 0?delete r[t]:i!==n&&(r[t]=i)}}return e.call(t,n,r)}function RL(e,t,n){if(Array.isArray(e))return e.map((e,t)=>RL(e,String(t),n));if(e&&typeof e.toJSON==`function`){if(!n||!xL(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 zL=class{constructor(e){Object.defineProperty(this,fL,{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(!mL(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=RL(this,``,a);if(typeof r==`function`)for(let{count:e,res:t}of a.anchors.values())r(t,e);return typeof i==`function`?LL(i,{"":o},``,o):o}},BL=class extends zL{constructor(e){super(oL),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=[],TL(e,{Node:(e,t)=>{(pL(t)||xL(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||=(RL(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=VL(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(NL(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 VL(e,t,n){if(pL(t)){let r=t.resolve(e),i=n&&r&&n.get(r);return i?i.count*i.aliasCount:0}if(yL(t)){let r=0;for(let i of t.items){let t=VL(e,i,n);t>r&&(r=t)}return r}if(gL(t)){let r=VL(e,t.key,n),i=VL(e,t.value,n);return Math.max(r,i)}return 1}var HL=e=>!e||typeof e!=`function`&&typeof e!=`object`,UL=class extends zL{constructor(e){super(uL),this.value=e}toJSON(e,t){return t?.keep?this.value:RL(this.value,e,t)}toString(){return String(this.value)}};UL.BLOCK_FOLDED=`BLOCK_FOLDED`,UL.BLOCK_LITERAL=`BLOCK_LITERAL`,UL.PLAIN=`PLAIN`,UL.QUOTE_DOUBLE=`QUOTE_DOUBLE`,UL.QUOTE_SINGLE=`QUOTE_SINGLE`;var WL=`tag:yaml.org,2002:`;function GL(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 KL(e,t,n){if(mL(e)&&(e=e.contents),bL(e))return e;if(gL(e)){let t=n.schema[cL].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 BL(c.anchor);c={anchor:null,node:null},s.set(e,c)}t?.startsWith(`!!`)&&(t=WL+t.slice(2));let l=GL(e,t,o.tags);if(!l){if(e&&typeof e.toJSON==`function`&&(e=e.toJSON()),!e||typeof e!=`object`){let t=new UL(e);return c&&(c.node=t),t
Line truncated
|
||||
`)?ZL(n,t):n.includes(`
|
||||
`)?`
|
||||
|
||||
@@ -89,7 +89,7 @@ const pullPolicy = computed({
|
||||
<DraftHint :kind="KIND" path="max_concurrency" />
|
||||
</div>
|
||||
</SettingRow>
|
||||
<SettingRow label="Max uptime" for="cr-uptime" hint="Agent container time limit.">
|
||||
<SettingRow label="Max uptime" for="cr-uptime">
|
||||
<div class="flex flex-wrap items-center gap-3">
|
||||
<DurationInput id="cr-uptime" v-model="runtime.max_uptime" :units="['m', 'h']" />
|
||||
<DraftHint :kind="KIND" path="max_uptime" />
|
||||
|
||||
@@ -72,7 +72,7 @@ const taskRuntime = seconds("max_task_runtime_seconds");
|
||||
<SettingRow label="Alert webhook" hint="Receives each raised and resolved alert. Empty disables." for="task-notify">
|
||||
<div class="flex flex-wrap items-center gap-3"><Input id="task-notify" v-model="policy.notify_webhook" type="url" class="max-w-md" /><DraftHint :kind="POLICY" path="notify_webhook" /></div>
|
||||
</SettingRow>
|
||||
<SettingRow label="Webhook severity" hint="The lowest severity delivered.">
|
||||
<SettingRow label="Webhook severity" hint="Minimum severity.">
|
||||
<div class="flex flex-wrap items-center gap-3">
|
||||
<Select :model-value="policy.notify_min_severity || 'warning'" @update:model-value="policy.notify_min_severity = String($event)">
|
||||
<SelectTrigger class="w-40" aria-label="Webhook severity"><SelectValue /></SelectTrigger>
|
||||
@@ -114,7 +114,7 @@ const taskRuntime = seconds("max_task_runtime_seconds");
|
||||
<DraftHint :kind="KIND" path="max_model_tool_steps" />
|
||||
</div>
|
||||
</SettingRow>
|
||||
<SettingRow label="Gate failures in a row" hint="In a row, then parked.">
|
||||
<SettingRow label="Gate failures in a row" hint="Then parked.">
|
||||
<div class="flex flex-wrap items-center gap-3">
|
||||
<NumberField v-model="limits.max_consecutive_gate_failures" :min="0" class="w-32">
|
||||
<NumberFieldContent>
|
||||
|
||||
Reference in new issue
Block a user