fix(ui): stop clipping the slash palette above the Build with Archie bar
This commit is contained in:
1 parent
4e95b91122
commit
35e2e0f943
2 files changed
+2
-2
No files matched your search
Vendored
+1
-1
@@ -318,4 +318,4 @@ Edge: ${e}`,EDGE_NOT_FOUND:e=>`Edge not found
|
||||
Edge: ${e}`,USEVUEFLOW_OPTIONS:()=>`The options parameter is deprecated and will be removed in the next major version. Please use the id parameter instead`},v7=class extends Error{constructor(e,...t){super(_7[e]?.call(_7,...t)),this.name=`VueFlowError`,this.code=e,this.args=t}};function y7(e){return`clientX`in e}function uce(e){return`sourceEvent`in e}function b7(e,t){let n=y7(e),r,i;return n?(r=e.clientX,i=e.clientY):`touches`in e&&e.touches.length>0?(r=e.touches[0].clientX,i=e.touches[0].clientY):`changedTouches`in e&&e.changedTouches.length>0?(r=e.changedTouches[0].clientX,i=e.changedTouches[0].clientY):(r=0,i=0),{x:r-(t?.left??0),y:i-(t?.top??0)}}var x7=()=>typeof navigator<`u`&&(navigator==null?void 0:navigator.userAgent)?.indexOf(`Mac`)>=0;function dce(e){return{width:e.dimensions?.width??e.width??0,height:e.dimensions?.height??e.height??0}}function S7(e,t=[1,1]){return{x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}}var fce=()=>!0;function C7(e){e?.classList.remove(`valid`,`connecting`,`vue-flow__handle-valid`,`vue-flow__handle-connecting`)}function pce(e,t,n){let r=[],i={x:e.x-n,y:e.y-n,width:n*2,height:n*2};for(let e of t.values())A5(i,k5(e))>0&&r.push(e);return r}var mce=250;function hce(e,t,n,r){let i=[],a=1/0,o=pce(e,n,t+mce);for(let n of o){let o=[...n.handleBounds?.source??[],...n.handleBounds?.target??[]];for(let s of o){if(r.nodeId===s.nodeId&&r.type===s.type&&r.id===s.id)continue;let{x:o,y:c}=m7(n,s,s.position,!0),l=Math.sqrt((o-e.x)**2+(c-e.y)**2);l>t||(l<a?(i=[{...s,x:o,y:c}],a=l):l===a&&i.push({...s,x:o,y:c}))}}if(!i.length)return null;if(i.length>1){let e=r.type===`source`?`target`:`source`;return i.find(t=>t.type===e)??i[0]}return i[0]}function w7(e,{handle:t,connectionMode:n,fromNodeId:r,fromHandleId:i,fromType:a,doc:o,lib:s,flowId:c,isValidConnection:l=fce},u,d,f,p){let m=a===`target`,h=t?o.querySelector(`.${s}-flow__handle[data-id="${c}-${t?.nodeId}-${t?.id}-${t?.type}"]`):null,{x:g,y:_}=b7(e),v=o.elementFromPoint(g,_),y=v?.classList.contains(`${s}-flow__handle`)?v:h,b={handleDomNode:y,isValid:!1,connection:null,toHandle:null};if(y){let e=T7(void 0,y),t=y.getAttribute(`data-nodeid`),a=y.getAttribute(`data-handleid`),o=y.classList.contains(`connectable`),s=y.classList.contains(`connectableend`);if(!t||!e)return b;let c={source:m?t:r,sourceHandle:m?a:i,target:m?r:t,targetHandle:m?i:a};b.connection=c,b.isValid=o&&s&&(n===y5.Strict?m&&e===`source`||!m&&e===`target`:t!==r||a!==i)&&l(c,{nodes:d,edges:u,sourceNode:f(c.source),targetNode:f(c.target)}),b.toHandle=E7(t,e,a,p,n,!0)}return b}function T7(e,t){return e||(t?.classList.contains(`target`)?`target`:t?.classList.contains(`source`)?`source`:null)}function gce(e,t){let n=null;return t?n=`valid`:e&&!t&&(n=`invalid`),n}function _ce(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}function E7(e,t,n,r,i,a=!1){let o=r.get(e);if(!o)return null;let s=i===y5.Strict?o.handleBounds?.[t]:[...o.handleBounds?.source??[],...o.handleBounds?.target??[]],c=(n?s?.find(e=>e.id===n):s?.[0])??null;return c&&a?{...c,...m7(o,c,c.position,!0)}:c}var D7={[g5.Left]:g5.Right,[g5.Right]:g5.Left,[g5.Top]:g5.Bottom,[g5.Bottom]:g5.Top},vce=[`production`,`prod`];function O7(e,...t){k7()&&console.warn(`[Vue Flow]: ${e}`,...t)}function k7(){return!vce.includes(`production`)}function A7(e,t,n,r,i){let a=t.querySelectorAll(`.vue-flow__handle.${e}`);return a?.length?Array.from(a).map(t=>{let a=t.getBoundingClientRect();return{id:t.getAttribute(`data-handleid`),type:e,nodeId:i,position:t.getAttribute(`data-handlepos`),x:(a.left-n.left)/r,y:(a.top-n.top)/r,...j5(t)}}):null}function j7(e,t,n,r,i,a=!1,o){i.value=!1,e.selected?(a||e.selected&&t)&&(r([e]),Je(()=>{o.blur()})):n([e])}function M7(e){return B(e)!==void 0}function yce(e,t,n,r){if(!e||!e.source||!e.target)return n(new v7(g7.EDGE_INVALID,e?.id??`[ID UNKNOWN]`)),!1;let i;return i=F5(e)?e:{...e,id:V5(e)},i=z5(i,void 0,r),!Qse(i,t)&&i}function bce(e,t,n,r,i){if(!t.source||!t.target)return i(new v7(g7.EDGE_INVALID,e.id)),!1;if(!n)return i(new v7(g7.EDGE_NOT_FOUND,e.id)),!1;let{id:a,...o}=e;return{...o,id:r?V5(t):a,source:t.source,target:t.target,sourceHandle:t.sourceHandle,targetHandle:t.targetHandle}}function N7(e,t,n){let r={},i=[];for(let a=0;a<e.length;++a){let o=e[a];if(!I5(o)){n(new v7(g7.NODE_INVALID,o?.id));continue}let s=Yse(o,t(o.id),o.parentNode);o.parentNode&&(r[o.parentNode]=!0),i[a]=s}for(let e of i){let a=t(e.parentNode)||i.find(t=>t.id===e.parentNode);e.parentNode&&!a&&n(new v7(g7.NODE_MISSING_PARENT,e.id,e.parentNode)),(e.parentNode||r[e.id])&&(r[e.id]&&(e.isParent=!0),a&&(a.isParent=!0))}return i}function P7(e,t,n,r,i,a){let o=i,s=r.get(o)||new Map;r.set(o,s.set(n,t)),o=`${i}-${e}`;let c=r.get(o)||new Map;if(r.set(o,c.set(n,t)),a){o=`${i}-${e}-${a}`;let s=r.get(o)||new Map;r.set(o,s.set(n,t))}}function F7(e,t,n){e.clear();for(let t of n){let{source:n,target:r,sourceHandle:i=null,targetHandle:a=null}=t,o={edgeId:t.id,source:n,target:r,sourceHandle:i,targetHandle:a},s=`${n}-${i}--${r}-${a}`;P7(`sourcLine truncated
|
||||
`)},z(e.data.summary||e.data.detail),9,sue)):P(``,!0),e.data.when||e.data.retry||e.data.continues?(I(),A(`div`,cue,[e.data.when?(I(),A(`span`,{key:0,class:`flex max-w-full min-w-0 items-center gap-0.5 rounded bg-secondary px-1 font-mono`,title:`Runs only when ${e.data.when}`},[k(B(Ml),{class:`size-3 shrink-0`,"aria-hidden":`true`}),L(`span`,uue,z(e.data.when),1)],8,lue)):P(``,!0),e.data.retry?(I(),A(`span`,{key:1,class:`flex items-center gap-0.5 rounded bg-secondary px-1`,title:`Up to ${e.data.retry} attempts`},[k(B(_te),{class:`size-3`,"aria-hidden":`true`}),V(`×`+z(e.data.retry),1)],8,due)):P(``,!0),e.data.continues?(I(),A(`span`,fue,[k(B(Tte),{class:`size-3`,"aria-hidden":`true`}),r[10]||=V(`continues`,-1)])):P(``,!0)])):P(``,!0),e.data.run?.error?(I(),A(`p`,{key:4,class:`mt-1 line-clamp-2 text-[11px] text-danger`,title:e.data.run.error},z(e.data.run.error),9,pue)):P(``,!0)],64))]),k(St,{"enter-from-class":`opacity-0 -translate-y-1`,"enter-active-class":`transition duration-200`,"leave-to-class":`opacity-0`,"leave-active-class":`transition duration-100`},{default:F(()=>[e.data.expanded?(I(),A(`div`,{key:0,class:`nodrag nopan nowheel cursor-auto border-t border-border`,onClick:r[6]||=bt(()=>{},[`stop`])},[G(t.$slots,`default`)])):P(``,!0)]),_:3}),k(B(Z7),{type:`source`,position:B(g5).Bottom},null,8,[`position`]),k(B(Z7),{id:`data-out`,type:`source`,position:B(g5).Right,class:`!opacity-0`},null,8,[`position`]),e.data.type===`switch`?(I(),K(B(Z7),{key:1,id:`otherwise`,type:`source`,position:B(g5).Right,class:`!opacity-0`},null,8,[`position`])):P(``,!0)],2))}}),hue={class:`pointer-events-none size-full rounded-xl border border-dashed border-border bg-muted/30`},gue={class:`flex items-center gap-1 px-2.5 pt-1.5 text-[11px] text-fg-subtle`},_ue={key:0},vue={key:1,class:`font-mono`},yue=N({__name:`LaneNode`,props:{data:{}},setup(e){return(t,n)=>(I(),A(`div`,hue,[L(`div`,gue,[e.data.lane===`switch`?(I(),A(H,{key:0},[k(B(ru),{class:`size-3`,"aria-hidden":`true`}),e.data.title==="default"?(I(),A(`span`,_ue,`otherwise`)):(I(),A(`span`,vue,`= `+z(e.data.title),1))],64)):(I(),A(H,{key:1},[k(B(Pl),{class:`size-3`,"aria-hidden":`true`}),V(z(e.data.title),1)],64))])]))}}),bue={class:`flex shrink-0 items-center justify-center gap-1 border-t border-border bg-card p-1`},S9=240,xue=416,C9=-140,Sue=72,Cue=.9,w9=N({__name:`WorkflowCanvas`,props:{yaml:{},stages:{},open:{},triggers:{},types:{},readonly:{type:Boolean},restartable:{type:Boolean},marks:{},problems:{},title:{},summary:{}},emits:[`toggle`,`insert`,`duplicate`,`move`,`remove`,`rename`,`restart`],setup(e,{emit:t}){let n=e,r=t,i=J(()=>!!n.types?.length&&!n.readonly),a=J(()=>[...n.types??[],`parallel`,`switch`]),o=J(()=>a.value.filter(e=>[`agent.run`,`workflow.call`].includes(e))),s=e=>e&&r0(e)?o.value:a.value,c=e=>e.kind===`step`?JSON.stringify(e.path??null):e.kind,l=q(null),u=q(null),d=iee(`(max-width: 767px)`),f=J(()=>{let e=S0(N0(n.yaml),n.stages??[]);return n.types?.length?{nodes:[{id:`workflow`,type:`step`,position:{x:0,y:C9},data:{kind:`workflow`,key:`workflow`,title:n.title||`Workflow`,type:``,detail:n.summary??``}},...e.nodes],edges:[{id:`flow-workflow-start`,source:`workflow`,target:`start`,kind:`flow`},...e.edges]}:e}),p=J(()=>f.value.nodes.filter(e=>e.data.path?.length===2).length),m=q({}),h=q({}),g=J(()=>f.value.nodes.find(e=>e.type===`step`&&c(e.data)===n.open));function _(e,t){m.value={...m.value,[e]:t},g.value?.id!==e&&(h.value={...h.value,[e]:t})}let v=J(()=>{let e=d.value?void 0:g.value?.id;return e&&m.value[e]?Math.max(0,m.value[e]-(h.value[e]??m.value[e])):0}),y=Nt(),b=ree(v,{duration:J(()=>y.value===`reduce`?0:200)}),x=J(()=>{let e=new Map;for(let t of f.value.nodes){if(t.type!==`step`)continue;let n=(t.id===g.value?.id?h.value[t.id]:void 0)??m.value[t.id];n!==void 0&&e.set(t.position.y,Math.max(e.get(t.position.y)??-72,n-Sue))}return[...e]}),S=e=>x.value.reduce((t,[n,r])=>n<e?t+r:t,0);function C(e){let t=e.data,a=c(t),o=t.path,s={triggers:t.kind===`start`?n.triggers??[]:t.triggers,expanded:!d.value&&a===n.open,editable:i.value,problem:o?n.problems?.[a]:void 0,onResize:t=>_(e.id,t)};return n.types?.length&&(s.onToggle=()=>r(`toggle`,a)),i.value&&o&&(s.onRename=e=>r(`rename`,o,e),s.onDuplicate=()=>r(`duplicate`,o),s.onRemove=()=>r(`remove`,o)),{...e,data:{...t,...s}}}let w=e=>{let t=g.value;return d.value||!t||!e.style?.width?!1:e.position.x<=t.position.x&&e.position.x+parseFloat(String(e.style.width))>=t.position.x+S9};function ee(e){let t=g.value;if(d.value||!t)return 0;if(e.id===t.id||w(e))return-88;let n=t.position.x+S9/2,r=e.style?.width?parseFloat(String(e.style.width)):e.type===`step`?S9:32,i=e.position.x+r/2;return Math.abs(i-n)<S9/2?0:i<n?-88:88}let te=J(()=>{let e=g.value;return f.value.nodes.map(t=>{let a=t;t.type===`add`?t={...t,data:{...t.data,types:s(t.data.insertAfter),editable:i.value,onInsert:e=>r(`insert`,t.data.insertAfter,e)}}:t.type===`step`&&(t=C(t));let o=n.marks?.[t.id];o&&(t={...t,data:{...t.data,mark:o}});let c=t.position.
Line truncated
|
||||
`),r=t.split(`
|
||||
`),i=Array.from({length:n.length+1},()=>Array(r.length+1).fill(0));for(let e=n.length-1;e>=0;e--)for(let t=r.length-1;t>=0;t--)i[e][t]=n[e]===r[t]?i[e+1][t+1]+1:Math.max(i[e+1][t],i[e][t+1]);let a=[],o=0,s=0;for(;o<n.length&&s<r.length;)n[o]===r[s]?(a.push({kind:`same`,text:n[o++]}),s++):i[o+1][s]>=i[o][s+1]?a.push({kind:`del`,text:n[o++]}):a.push({kind:`add`,text:r[s++]});for(;o<n.length;)a.push({kind:`del`,text:n[o++]});for(;s<r.length;)a.push({kind:`add`,text:r[s++]});return a}function T9(e){let t=Z1(e).toJS(),n=new Map;for(let r of N0(e).nodes){let{kind:e,path:i,stage:a,occurrence:o}=r.data;if(r.type!==`step`||e!==`step`||!i||a===void 0)continue;let s=t;for(let e of i)s=s?.[e];n.set(`${a}#${o??0}`,{node:r.id,signature:JSON.stringify(s??null)})}return n}function E9(e,t,n){let r=T9(e),i=T9(t),a={};for(let[e,t]of r){let r=i.get(e);r?r.signature!==t.signature&&(a[t.node]=`changed`):a[t.node]=n}return a}var Oue={class:`flex flex-col gap-3 md:grid md:h-[calc(100dvh-17rem)] md:min-h-[26rem] md:grid-cols-[18rem_1fr]`},kue=[`aria-current`,`onClick`],Aue={class:`flex items-center gap-2 text-sm`},jue={class:`font-mono text-xs text-fg-subtle`},Mue=[`title`],Nue={key:0,class:`px-3 py-2 text-sm text-fg-muted`},Pue={key:1,class:`flex min-h-0 flex-col gap-2`},Fue={class:`flex items-center gap-2 max-md:flex-wrap`},Iue={key:0,class:`rounded-lg border border-border p-4 text-sm text-fg-muted`},Lue={key:1,class:`min-h-0 flex-1 overflow-auto rounded-lg border border-border py-2 font-mono text-[13px] leading-6`},Rue={class:`inline-block w-4 select-none text-fg-subtle`},zue={key:2,class:`grid min-h-0 flex-1 gap-3 max-md:flex-none md:grid-cols-2`},Bue={class:`flex min-h-0 flex-col gap-1`},Vue={class:`text-xs font-medium text-fg-muted`},Hue={class:`min-h-0 flex-1 max-md:h-72 max-md:flex-none`},Uue={class:`flex min-h-0 flex-col gap-1`},Wue={class:`min-h-0 flex-1 max-md:h-72 max-md:flex-none`},Gue=N({__name:`WorkflowHistory`,props:Qe({revisions:{},current:{},error:{}},{selected:{default:0},selectedModifiers:{},mode:{default:`yaml`},modeModifiers:{}}),emits:Qe([`restore`],[`update:selected`,`update:mode`]),setup(e,{emit:t}){let n=e,r=t,i=Ne(e,`selected`),a=Ne(e,`mode`);M(()=>n.revisions,e=>{e.some(e=>e.version===i.value)||(i.value=(e.find(e=>e.yaml!==n.current)??e[0])?.version??0)},{immediate:!0});let o=J(()=>n.revisions.find(e=>e.version===i.value)),s=J(()=>o.value?.yaml??null),c=J(()=>s.value===null?[]:Due(s.value,n.current)),l=J(()=>s.value!==null&&s.value===n.current),u=J(()=>s.value===null?{}:E9(s.value,n.current,`removed`)),d=J(()=>s.value===null?{}:E9(n.current,s.value,`added`)),f={added:`default`,edited:`secondary`,removed:`destructive`};return(t,n)=>(I(),A(`div`,Oue,[L(`ol`,{class:R(B(U)(`min-h-0 divide-y divide-border overflow-y-auto rounded-lg border border-border`,e.revisions.length&&`max-md:hidden`)),"aria-label":`Revisions`},[(I(!0),A(H,null,j(e.revisions,e=>(I(),A(`li`,{key:e.version},[L(`button`,{type:`button`,class:R([`block w-full px-3 py-2 text-left hover:bg-secondary`,e.version===i.value&&`bg-secondary`]),"aria-current":e.version===i.value,onClick:t=>i.value=e.version},[L(`span`,Aue,[L(`span`,jue,`v`+z(e.version),1),k(B(E),{variant:f[e.change]},{default:F(()=>[V(z(e.change),1)]),_:2},1032,[`variant`])]),L(`span`,{class:`mt-0.5 block truncate text-xs text-fg-muted`,title:e.at},z(e.actor||`unknown`)+` · `+z(e.source||`unknown`)+` · `+z(B(aC)(e.at)),9,Mue)],10,kue)]))),128)),e.revisions.length?P(``,!0):(I(),A(`li`,Nue,z(e.error||`No recorded changes`),1))],2),e.revisions.length?(I(),K(B(Qu),{key:0,"model-value":String(i.value),"onUpdate:modelValue":n[0]||=e=>i.value=Number(e)},{default:F(()=>[k(B(nd),{class:`w-full md:hidden`,"aria-label":`Revision`},{default:F(()=>[k(B(rd))]),_:1}),k(B($u),null,{default:F(()=>[(I(!0),A(H,null,j(e.revisions,e=>(I(),K(B(td),{key:e.version,value:String(e.version)},{default:F(()=>[V(`v`+z(e.version)+` · `+z(e.change)+` · `+z(e.actor||`unknown`)+` · `+z(B(aC)(e.at)),1)]),_:2},1032,[`value`]))),128))]),_:1})]),_:1},8,[`model-value`])):P(``,!0),o.value?(I(),A(`div`,Pue,[L(`div`,Fue,[k(B(tD),{modelValue:a.value,"onUpdate:modelValue":n[1]||=e=>a.value=e},{default:F(()=>[k(B(rD),null,{default:F(()=>[k(B(iD),{value:`yaml`},{default:F(()=>[...n[3]||=[V(`YAML`,-1)]]),_:1}),k(B(iD),{value:`canvas`},{default:F(()=>[...n[4]||=[V(`Canvas`,-1)]]),_:1})]),_:1})]),_:1},8,[`modelValue`]),k(B(Y),{type:`button`,size:`sm`,variant:`outline`,class:`ml-auto`,disabled:s.value===null||l.value,title:s.value===null?`Workflow removed`:void 0,onClick:n[2]||=e=>r(`restore`,s.value)},{default:F(()=>[k(B(eu),{"data-icon":`inline-start`}),n[5]||=V(` Restore this version`,-1)]),_:1},8,[`disabled`,`title`])]),s.value===null?(I(),A(`p`,Iue,`Workflow removed in this revision.`)):a.value===`yaml`?(I(),A(`pre`,Lue,[L(`code`,null,[(I(!0),A(H,null,j(c.value,(e,t)=>(I(),A(`span`,{key:t,class:R([`block min-h-6 px-3 whitespace-pre-wrap`,{"bg-ok/10":e.kind===`add`,"bg-danger/10 text-danger":e.kind===`del`}])},[L(`span`,Rue
Line truncated
|
||||
`),i=Array.from({length:n.length+1},()=>Array(r.length+1).fill(0));for(let e=n.length-1;e>=0;e--)for(let t=r.length-1;t>=0;t--)i[e][t]=n[e]===r[t]?i[e+1][t+1]+1:Math.max(i[e+1][t],i[e][t+1]);let a=[],o=0,s=0;for(;o<n.length&&s<r.length;)n[o]===r[s]?(a.push({kind:`same`,text:n[o++]}),s++):i[o+1][s]>=i[o][s+1]?a.push({kind:`del`,text:n[o++]}):a.push({kind:`add`,text:r[s++]});for(;o<n.length;)a.push({kind:`del`,text:n[o++]});for(;s<r.length;)a.push({kind:`add`,text:r[s++]});return a}function T9(e){let t=Z1(e).toJS(),n=new Map;for(let r of N0(e).nodes){let{kind:e,path:i,stage:a,occurrence:o}=r.data;if(r.type!==`step`||e!==`step`||!i||a===void 0)continue;let s=t;for(let e of i)s=s?.[e];n.set(`${a}#${o??0}`,{node:r.id,signature:JSON.stringify(s??null)})}return n}function E9(e,t,n){let r=T9(e),i=T9(t),a={};for(let[e,t]of r){let r=i.get(e);r?r.signature!==t.signature&&(a[t.node]=`changed`):a[t.node]=n}return a}var Oue={class:`flex flex-col gap-3 md:grid md:h-[calc(100dvh-17rem)] md:min-h-[26rem] md:grid-cols-[18rem_1fr]`},kue=[`aria-current`,`onClick`],Aue={class:`flex items-center gap-2 text-sm`},jue={class:`font-mono text-xs text-fg-subtle`},Mue=[`title`],Nue={key:0,class:`px-3 py-2 text-sm text-fg-muted`},Pue={key:1,class:`flex min-h-0 flex-col gap-2`},Fue={class:`flex items-center gap-2 max-md:flex-wrap`},Iue={key:0,class:`rounded-lg border border-border p-4 text-sm text-fg-muted`},Lue={key:1,class:`min-h-0 flex-1 overflow-auto rounded-lg border border-border py-2 font-mono text-[13px] leading-6`},Rue={class:`inline-block w-4 select-none text-fg-subtle`},zue={key:2,class:`grid min-h-0 flex-1 gap-3 max-md:flex-none md:grid-cols-2`},Bue={class:`flex min-h-0 flex-col gap-1`},Vue={class:`text-xs font-medium text-fg-muted`},Hue={class:`min-h-0 flex-1 max-md:h-72 max-md:flex-none`},Uue={class:`flex min-h-0 flex-col gap-1`},Wue={class:`min-h-0 flex-1 max-md:h-72 max-md:flex-none`},Gue=N({__name:`WorkflowHistory`,props:Qe({revisions:{},current:{},error:{}},{selected:{default:0},selectedModifiers:{},mode:{default:`yaml`},modeModifiers:{}}),emits:Qe([`restore`],[`update:selected`,`update:mode`]),setup(e,{emit:t}){let n=e,r=t,i=Ne(e,`selected`),a=Ne(e,`mode`);M(()=>n.revisions,e=>{e.some(e=>e.version===i.value)||(i.value=(e.find(e=>e.yaml!==n.current)??e[0])?.version??0)},{immediate:!0});let o=J(()=>n.revisions.find(e=>e.version===i.value)),s=J(()=>o.value?.yaml??null),c=J(()=>s.value===null?[]:Due(s.value,n.current)),l=J(()=>s.value!==null&&s.value===n.current),u=J(()=>s.value===null?{}:E9(s.value,n.current,`removed`)),d=J(()=>s.value===null?{}:E9(n.current,s.value,`added`)),f={added:`default`,edited:`secondary`,removed:`destructive`};return(t,n)=>(I(),A(`div`,Oue,[L(`ol`,{class:R(B(U)(`min-h-0 divide-y divide-border overflow-y-auto rounded-lg border border-border`,e.revisions.length&&`max-md:hidden`)),"aria-label":`Revisions`},[(I(!0),A(H,null,j(e.revisions,e=>(I(),A(`li`,{key:e.version},[L(`button`,{type:`button`,class:R([`block w-full px-3 py-2 text-left hover:bg-secondary`,e.version===i.value&&`bg-secondary`]),"aria-current":e.version===i.value,onClick:t=>i.value=e.version},[L(`span`,Aue,[L(`span`,jue,`v`+z(e.version),1),k(B(E),{variant:f[e.change]},{default:F(()=>[V(z(e.change),1)]),_:2},1032,[`variant`])]),L(`span`,{class:`mt-0.5 block truncate text-xs text-fg-muted`,title:e.at},z(e.actor||`unknown`)+` · `+z(e.source||`unknown`)+` · `+z(B(aC)(e.at)),9,Mue)],10,kue)]))),128)),e.revisions.length?P(``,!0):(I(),A(`li`,Nue,z(e.error||`No recorded changes`),1))],2),e.revisions.length?(I(),K(B(Qu),{key:0,"model-value":String(i.value),"onUpdate:modelValue":n[0]||=e=>i.value=Number(e)},{default:F(()=>[k(B(nd),{class:`w-full md:hidden`,"aria-label":`Revision`},{default:F(()=>[k(B(rd))]),_:1}),k(B($u),null,{default:F(()=>[(I(!0),A(H,null,j(e.revisions,e=>(I(),K(B(td),{key:e.version,value:String(e.version)},{default:F(()=>[V(`v`+z(e.version)+` · `+z(e.change)+` · `+z(e.actor||`unknown`)+` · `+z(B(aC)(e.at)),1)]),_:2},1032,[`value`]))),128))]),_:1})]),_:1},8,[`model-value`])):P(``,!0),o.value?(I(),A(`div`,Pue,[L(`div`,Fue,[k(B(tD),{modelValue:a.value,"onUpdate:modelValue":n[1]||=e=>a.value=e},{default:F(()=>[k(B(rD),null,{default:F(()=>[k(B(iD),{value:`yaml`},{default:F(()=>[...n[3]||=[V(`YAML`,-1)]]),_:1}),k(B(iD),{value:`canvas`},{default:F(()=>[...n[4]||=[V(`Canvas`,-1)]]),_:1})]),_:1})]),_:1},8,[`modelValue`]),k(B(Y),{type:`button`,size:`sm`,variant:`outline`,class:`ml-auto`,disabled:s.value===null||l.value,title:s.value===null?`Workflow removed`:void 0,onClick:n[2]||=e=>r(`restore`,s.value)},{default:F(()=>[k(B(eu),{"data-icon":`inline-start`}),n[5]||=V(` Restore this version`,-1)]),_:1},8,[`disabled`,`title`])]),s.value===null?(I(),A(`p`,Iue,`Workflow removed in this revision.`)):a.value===`yaml`?(I(),A(`pre`,Lue,[L(`code`,null,[(I(!0),A(H,null,j(c.value,(e,t)=>(I(),A(`span`,{key:t,class:R([`block min-h-6 px-3 whitespace-pre-wrap`,{"bg-ok/10":e.kind===`add`,"bg-danger/10 text-danger":e.kind===`del`}])},[L(`span`,Rue
Line truncated
|
||||
@@ -42,7 +42,7 @@ onBeforeUnmount(() => {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="pointer-events-auto flex w-full max-w-xl flex-col overflow-hidden rounded-lg border border-border bg-popover shadow-[var(--shadow-md)]">
|
||||
<div class="pointer-events-auto flex w-full max-w-xl flex-col rounded-lg border border-border bg-popover shadow-[var(--shadow-md)]">
|
||||
<div v-if="hasConversation" class="flex items-center gap-1 border-b px-3 py-2">
|
||||
<Sparkles class="size-4 shrink-0 text-primary" aria-hidden="true" />
|
||||
<ChatSessionList />
|
||||
|
||||
Reference in new issue
Block a user