fix(webui): strip the task detail page to one head strip and honest states
The page stacked five chrome strips before its content and every state wrote an essay. The head is now one strip -- title, workflow, actions, a single meta line -- the retry explainer is gone (the confirm dialog already carries the commit-discard consequence), and empty states say the fact in the title without a paragraph re-deriving it.
This commit is contained in:
1 parent
abe2f40e05
commit
cf11f63271
9 files changed
+67
-106
No files matched your search
Vendored
+1
-1
@@ -1,2 +1,2 @@
|
||||
/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */
|
||||
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){:root,:host{--shimmer-angle:20deg}*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-x-reverse:0;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial;--tw-content:"";--tw-scrollbar-thumb:#0000;--tw-scrollbar-track:#0000;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-animation-delay:0s;--tw-animation-direction:normal;--tw-animation-duration:initial;--tw-animation-fill-mode:none;--tw-animation-iteration-count:1;--tw-enter-blur:0;--tw-enter-opacity:1;--tw-enter-rotate:0;--tw-enter-scale:1;--tw-enter-translate-x:0;--tw-enter-translate-y:0;--tw-exit-blur:0;--tw-exit-opacity:1;--tw-exit-rotate:0;--tw-exit-scale:1;--tw-exit-translate-x:0;--tw-exit-translate-y:0;--scroll-fade-t:0;--scroll-fade-b:0;--scroll-fade-s:0;--scroll-fade-e:0;--scroll-fade-mask:initial;--shimmer-image:initial;--shimmer-text-fill:initial}}}@font-face{font-family:Geist Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/geist-cyrillic-ext-wght-normal.woff2)format("woff2-variations");unicode-range:U+460-52F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Geist Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/geist-cyrillic-wght-normal.woff2)format("woff2-variations");unicode-range:U+301,U+400-45F,U+490-491,U+4B0-4B1,U+2116}@font-face{font-family:Geist Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/geist-vietnamese-wght-normal.woff2)format("woff2-variations");unicode-range:U+102-103,U+110-111,U+128-129,U+168-169,U+1A0-1A1,U+1AF-1B0,U+300-301,U+303-304,U+308-309,U+323,U+329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Geist Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/geist-latin-ext-wght-normal.woff2)format("woff2-variations");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Geist Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/geist-latin-wght-normal.woff2)format("woff2-variations");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@layer theme{:root,:host{--font-sans:"Geist Variable", sans-serif;--color-black:#000;--spacing:.25rem;--container-xs:20rem;--container-sm:24rem;--container-lg:32rem;--container-2xl:42rem;--container-3xl:48rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height:calc(1.5 / 1);--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2 / 1.5);--text-3xl:1.875rem;--text-3xl--line-height:calc(2.25 / 1.875);--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-tight:-.025em;--tracking-wide:.025em;--tracking-widest:.1em;--leading-tight:1.25;--leading-snug:1.375;--leading-normal:1.5;--leading-relaxed:1.625;--radius-xs:.125rem;--radius-md:10px;--radius-4xl:2rem;--shadow-md:0 4px 6px -1px #0000001a, 0 2px 4px -2px #0000001a;--ease-in-out:cubic-bezier(.4, 0, .2, 1);--animate-spin:spin 1s linear infinite;--animate-pulse:pulse 2sLine truncated
|
||||
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){:root,:host{--shimmer-angle:20deg}*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-x-reverse:0;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial;--tw-content:"";--tw-scrollbar-thumb:#0000;--tw-scrollbar-track:#0000;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-animation-delay:0s;--tw-animation-direction:normal;--tw-animation-duration:initial;--tw-animation-fill-mode:none;--tw-animation-iteration-count:1;--tw-enter-blur:0;--tw-enter-opacity:1;--tw-enter-rotate:0;--tw-enter-scale:1;--tw-enter-translate-x:0;--tw-enter-translate-y:0;--tw-exit-blur:0;--tw-exit-opacity:1;--tw-exit-rotate:0;--tw-exit-scale:1;--tw-exit-translate-x:0;--tw-exit-translate-y:0;--scroll-fade-t:0;--scroll-fade-b:0;--scroll-fade-s:0;--scroll-fade-e:0;--scroll-fade-mask:initial;--shimmer-image:initial;--shimmer-text-fill:initial}}}@font-face{font-family:Geist Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/geist-cyrillic-ext-wght-normal.woff2)format("woff2-variations");unicode-range:U+460-52F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Geist Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/geist-cyrillic-wght-normal.woff2)format("woff2-variations");unicode-range:U+301,U+400-45F,U+490-491,U+4B0-4B1,U+2116}@font-face{font-family:Geist Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/geist-vietnamese-wght-normal.woff2)format("woff2-variations");unicode-range:U+102-103,U+110-111,U+128-129,U+168-169,U+1A0-1A1,U+1AF-1B0,U+300-301,U+303-304,U+308-309,U+323,U+329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Geist Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/geist-latin-ext-wght-normal.woff2)format("woff2-variations");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Geist Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/geist-latin-wght-normal.woff2)format("woff2-variations");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@layer theme{:root,:host{--font-sans:"Geist Variable", sans-serif;--color-black:#000;--spacing:.25rem;--container-xs:20rem;--container-sm:24rem;--container-lg:32rem;--container-2xl:42rem;--container-3xl:48rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height:calc(1.5 / 1);--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2 / 1.5);--text-3xl:1.875rem;--text-3xl--line-height:calc(2.25 / 1.875);--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-tight:-.025em;--tracking-wide:.025em;--tracking-widest:.1em;--leading-tight:1.25;--leading-snug:1.375;--leading-normal:1.5;--leading-relaxed:1.625;--radius-xs:.125rem;--radius-md:10px;--radius-4xl:2rem;--shadow-md:0 4px 6px -1px #0000001a, 0 2px 4px -2px #0000001a;--ease-in-out:cubic-bezier(.4, 0, .2, 1);--animate-spin:spin 1s linear infinite;--animate-pulse:pulse 2sLine truncated
|
||||
Vendored
+4
-4
@@ -12,9 +12,9 @@ var e=Object.defineProperty,t=(t,n)=>{let r={};for(var i in t)e(r,i,{get:t[i],en
|
||||
- less than the value passed to \`max\` (or ${Mb} if no \`max\` prop is set)
|
||||
- \`null\` or \`undefined\` if the progress is indeterminate.
|
||||
|
||||
Defaulting to \`null\`.`),null)}function Lb(e){return Fb(e)&&!Number.isNaN(e)&&e>0?e:(console.error(`Invalid prop \`max\` of value \`${e}\` supplied to \`ProgressRoot\`. Only numbers greater than 0 are valid max values. Defaulting to \`${Mb}\`.`),Mb)}var Rb=M({__name:`ProgressRoot`,props:{modelValue:{type:[Number,null],required:!1},max:{type:Number,required:!1,default:Mb},getValueLabel:{type:Function,required:!1,default:(e,t)=>Fb(e)?`${Math.round(e/t*Mb)}%`:void 0},getValueText:{type:Function,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[`update:modelValue`,`update:max`],setup(e,{emit:t}){let n=e,r=t;Y();let i=Um(n,`modelValue`,r,{passive:n.modelValue===void 0}),a=Um(n,`max`,r,{passive:n.max===void 0});j(()=>i.value,async e=>{let t=Ib(e,n.max);t!==e&&(await or(),i.value=t)},{immediate:!0}),j(()=>n.max,e=>{let t=Lb(n.max);t!==e&&(a.value=t)},{immediate:!0});let o=W(()=>cm(i.value)?`indeterminate`:i.value===a.value?`complete`:`loading`);return Pb({modelValue:i,max:a,progressState:o}),(e,t)=>(I(),R(k(X),{"as-child":e.asChild,as:e.as,"aria-valuemax":k(a),"aria-valuemin":0,"aria-valuenow":Fb(k(i))?k(i):void 0,"aria-valuetext":e.getValueText?.(k(i),k(a)),"aria-label":e.getValueLabel(k(i),k(a)),role:`progressbar`,"data-state":o.value,"data-value":k(i)??void 0,"data-max":k(a)},{default:A(()=>[P(e.$slots,`default`,{modelValue:k(i)})]),_:3},8,[`as-child`,`as`,`aria-valuemax`,`aria-valuenow`,`aria-valuetext`,`aria-label`,`data-state`,`data-value`,`data-max`]))}}),zb=M({__name:`ProgressIndicator`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){let t=e,n=Nb();return Y(),(e,r)=>(I(),R(k(X),U(t,{"data-state":k(n).progressState.value,"data-value":k(n).modelValue?.value??void 0,"data-max":k(n).max.value}),{default:A(()=>[P(e.$slots,`default`)]),_:3},16,[`data-state`,`data-value`,`data-max`]))}}),[Bb,Vb]=am(`ScrollAreaRoot`),Hb=M({__name:`ScrollAreaRoot`,props:{type:{type:String,required:!1,default:`hover`},dir:{type:String,required:!1},scrollHideDelay:{type:Number,required:!1,default:600},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e,{expose:t}){let n=e,r=O(0),i=O(0),a=O(),o=O(),s=O(),c=O(),l=O(!1),u=O(!1),{type:d,dir:f,scrollHideDelay:p}=Dn(n),m=ah(f);function h(){a.value?.scrollTo({top:0})}function g(){a.value?.scrollTo({top:0,left:0})}t({viewport:a,scrollTop:h,scrollTopLeft:g});let{forwardRef:_,currentElement:v}=Y();return Vb({type:d,dir:m,scrollHideDelay:p,scrollArea:v,viewport:a,onViewportChange:e=>{a.value=e||void 0},content:o,onContentChange:e=>{o.value=e},scrollbarX:s,scrollbarXEnabled:l,scrollbarY:c,scrollbarYEnabled:u,onScrollbarXChange:e=>{s.value=e||void 0},onScrollbarYChange:e=>{c.value=e||void 0},onScrollbarXEnabledChange:e=>{l.value=e},onScrollbarYEnabledChange:e=>{u.value=e},onCornerWidthChange:e=>{r.value=e},onCornerHeightChange:e=>{i.value=e}}),(e,t)=>(I(),R(k(X),{ref:k(_),"as-child":n.asChild,as:e.as,dir:k(m),style:ye({position:`relative`,"--reka-scroll-area-corner-width":`${r.value}px`,"--reka-scroll-area-corner-height":`${i.value}px`})},{default:A(()=>[P(e.$slots,`default`)]),_:3},8,[`as-child`,`as`,`dir`,`style`]))}}),Ub=M({__name:`ScrollAreaCornerImpl`,setup(e){let t=Bb(),n=O(0),r=O(0),i=W(()=>!!n.value&&!!r.value);function a(){let e=t.scrollbarX.value?.offsetHeight||0;t.onCornerHeightChange(e),r.value=e}function o(){let e=t.scrollbarY.value?.offsetWidth||0;t.onCornerWidthChange(e),n.value=e}return Hm(t.scrollbarX.value,a),Hm(t.scrollbarY.value,o),j(()=>t.scrollbarX.value,a),j(()=>t.scrollbarY.value,o),(e,a)=>i.value?(I(),R(k(X),U({key:0,style:{width:`${n.value}px`,height:`${r.value}px`,position:`absolute`,right:k(t).dir.value===`ltr`?0:void 0,left:k(t).dir.value===`rtl`?0:void 0,bottom:0}},e.$parent?.$props),{default:A(()=>[P(e.$slots,`default`)]),_:3},16,[`style`])):H(`v-if`,!0)}}),Wb=M({__name:`ScrollAreaCorner`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){let t=e,{forwardRef:n}=Y(),r=Bb(),i=W(()=>!!r.scrollbarX.value&&!!r.scrollbarY.value),a=W(()=>r.type.value!==`scroll`&&i.value);return(e,r)=>a.value?(I(),R(Ub,U({key:0},t,{ref:k(n)}),{default:A(()=>[P(e.$slots,`default`)]),_:3},16)):H(`v-if`,!0)}});function Gb(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function Kb(e){let t=qb(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function qb(e,t){let n=e/t;return Number.isNaN(n)?0:n}function Jb(e,t=()=>{}){let n={left:e.scrollLeft,top:e.scrollTop},r=0;return(function i(){let a={left:e.scrollLeft,top:e.scrollTop},o=n.left!==a.left,s=n.top!==a.top;(o||s)&&t(),n=a,r=window.requestAnimationFrame(i)})(),()=>window.cancelAnimationFrame(r)}function Yb(e,t,n=`ltr`){let r=Kb(t),i=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,a=t.scrollbar.size-i,o=t.content-t.viewport,s=a-r,c=n===`ltr`?[0,o]:[o*-1,0],l=im(e,c[0],c[1]);return Gb([0,o],[0,s])(l)}functLine truncated
|
||||
Defaulting to \`null\`.`),null)}function Lb(e){return Fb(e)&&!Number.isNaN(e)&&e>0?e:(console.error(`Invalid prop \`max\` of value \`${e}\` supplied to \`ProgressRoot\`. Only numbers greater than 0 are valid max values. Defaulting to \`${Mb}\`.`),Mb)}var Rb=M({__name:`ProgressRoot`,props:{modelValue:{type:[Number,null],required:!1},max:{type:Number,required:!1,default:Mb},getValueLabel:{type:Function,required:!1,default:(e,t)=>Fb(e)?`${Math.round(e/t*Mb)}%`:void 0},getValueText:{type:Function,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[`update:modelValue`,`update:max`],setup(e,{emit:t}){let n=e,r=t;Y();let i=Um(n,`modelValue`,r,{passive:n.modelValue===void 0}),a=Um(n,`max`,r,{passive:n.max===void 0});j(()=>i.value,async e=>{let t=Ib(e,n.max);t!==e&&(await or(),i.value=t)},{immediate:!0}),j(()=>n.max,e=>{let t=Lb(n.max);t!==e&&(a.value=t)},{immediate:!0});let o=W(()=>cm(i.value)?`indeterminate`:i.value===a.value?`complete`:`loading`);return Pb({modelValue:i,max:a,progressState:o}),(e,t)=>(I(),R(k(X),{"as-child":e.asChild,as:e.as,"aria-valuemax":k(a),"aria-valuemin":0,"aria-valuenow":Fb(k(i))?k(i):void 0,"aria-valuetext":e.getValueText?.(k(i),k(a)),"aria-label":e.getValueLabel(k(i),k(a)),role:`progressbar`,"data-state":o.value,"data-value":k(i)??void 0,"data-max":k(a)},{default:A(()=>[P(e.$slots,`default`,{modelValue:k(i)})]),_:3},8,[`as-child`,`as`,`aria-valuemax`,`aria-valuenow`,`aria-valuetext`,`aria-label`,`data-state`,`data-value`,`data-max`]))}}),zb=M({__name:`ProgressIndicator`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){let t=e,n=Nb();return Y(),(e,r)=>(I(),R(k(X),U(t,{"data-state":k(n).progressState.value,"data-value":k(n).modelValue?.value??void 0,"data-max":k(n).max.value}),{default:A(()=>[P(e.$slots,`default`)]),_:3},16,[`data-state`,`data-value`,`data-max`]))}}),[Bb,Vb]=am(`ScrollAreaRoot`),Hb=M({__name:`ScrollAreaRoot`,props:{type:{type:String,required:!1,default:`hover`},dir:{type:String,required:!1},scrollHideDelay:{type:Number,required:!1,default:600},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e,{expose:t}){let n=e,r=O(0),i=O(0),a=O(),o=O(),s=O(),c=O(),l=O(!1),u=O(!1),{type:d,dir:f,scrollHideDelay:p}=Dn(n),m=ah(f);function h(){a.value?.scrollTo({top:0})}function g(){a.value?.scrollTo({top:0,left:0})}t({viewport:a,scrollTop:h,scrollTopLeft:g});let{forwardRef:_,currentElement:v}=Y();return Vb({type:d,dir:m,scrollHideDelay:p,scrollArea:v,viewport:a,onViewportChange:e=>{a.value=e||void 0},content:o,onContentChange:e=>{o.value=e},scrollbarX:s,scrollbarXEnabled:l,scrollbarY:c,scrollbarYEnabled:u,onScrollbarXChange:e=>{s.value=e||void 0},onScrollbarYChange:e=>{c.value=e||void 0},onScrollbarXEnabledChange:e=>{l.value=e},onScrollbarYEnabledChange:e=>{u.value=e},onCornerWidthChange:e=>{r.value=e},onCornerHeightChange:e=>{i.value=e}}),(e,t)=>(I(),R(k(X),{ref:k(_),"as-child":n.asChild,as:e.as,dir:k(m),style:ye({position:`relative`,"--reka-scroll-area-corner-width":`${r.value}px`,"--reka-scroll-area-corner-height":`${i.value}px`})},{default:A(()=>[P(e.$slots,`default`)]),_:3},8,[`as-child`,`as`,`dir`,`style`]))}}),Ub=M({__name:`ScrollAreaCornerImpl`,setup(e){let t=Bb(),n=O(0),r=O(0),i=W(()=>!!n.value&&!!r.value);function a(){let e=t.scrollbarX.value?.offsetHeight||0;t.onCornerHeightChange(e),r.value=e}function o(){let e=t.scrollbarY.value?.offsetWidth||0;t.onCornerWidthChange(e),n.value=e}return Hm(t.scrollbarX.value,a),Hm(t.scrollbarY.value,o),j(()=>t.scrollbarX.value,a),j(()=>t.scrollbarY.value,o),(e,a)=>i.value?(I(),R(k(X),U({key:0,style:{width:`${n.value}px`,height:`${r.value}px`,position:`absolute`,right:k(t).dir.value===`ltr`?0:void 0,left:k(t).dir.value===`rtl`?0:void 0,bottom:0}},e.$parent?.$props),{default:A(()=>[P(e.$slots,`default`)]),_:3},16,[`style`])):H(`v-if`,!0)}}),Wb=M({__name:`ScrollAreaCorner`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){let t=e,{forwardRef:n}=Y(),r=Bb(),i=W(()=>!!r.scrollbarX.value&&!!r.scrollbarY.value),a=W(()=>r.type.value!==`scroll`&&i.value);return(e,r)=>a.value?(I(),R(Ub,U({key:0},t,{ref:k(n)}),{default:A(()=>[P(e.$slots,`default`)]),_:3},16)):H(`v-if`,!0)}});function Gb(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function Kb(e){let t=qb(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function qb(e,t){let n=e/t;return Number.isNaN(n)?0:n}function Jb(e,t=()=>{}){let n={left:e.scrollLeft,top:e.scrollTop},r=0;return(function i(){let a={left:e.scrollLeft,top:e.scrollTop},o=n.left!==a.left,s=n.top!==a.top;(o||s)&&t(),n=a,r=window.requestAnimationFrame(i)})(),()=>window.cancelAnimationFrame(r)}function Yb(e,t,n=`ltr`){let r=Kb(t),i=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,a=t.scrollbar.size-i,o=t.content-t.viewport,s=a-r,c=n===`ltr`?[0,o]:[o*-1,0],l=im(e,c[0],c[1]);return Gb([0,o],[0,s])(l)}functLine truncated
|
||||
`),r=[],i=null,a=null,o=()=>{r.length&&(t.push({kind:`p`,inline:Aw(r.join(` `))}),r=[])},s=()=>{i&&=(t.push({kind:i.tag,items:i.items.map(e=>Aw(e))}),null)};for(let e=0;e<n.length;e++){let c=n[e];if(c.startsWith("```")){o(),s(),a?(t.push({kind:`pre`,code:a.join(`
|
||||
`)}),a=null):a=[];continue}if(a){a.push(c);continue}let l=Mw(c),u=e+1<n.length?Mw(n[e+1]):null;if(l&&u&&Nw(u)&&l.length===u.length){o(),s();let r=[];for(e+=2;e<n.length;e++){let t=Mw(n[e]);if(!t||t.length!==l.length){e--;break}r.push(t)}t.push({kind:`table`,head:l.map(e=>Aw(e)),rows:r.map(e=>e.map(e=>Aw(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:Aw(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]);continue}if(c.startsWith(`>`)){o(),s(),t.push({kind:`blockquote`,inline:Aw(c.replace(/^>\s?/,``))});continue}r.push(c)}return o(),s(),a&&t.push({kind:`pre`,code:a.join(`
|
||||
`)}),t}function Mw(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 Nw(e){return e.every(e=>/^:?-{3,}:?$/.test(e))}var Pw={class:`[overflow-wrap:anywhere]`},Fw={key:0,class:`my-2 overflow-auto rounded-md border border-border bg-background/60 p-3`},Iw={class:`font-mono text-[0.85em]`},Lw={key:1,class:`my-3 w-full border-collapse text-[0.92em]`},Rw={key:2,class:`my-2 border-l-[3px] border-primary pl-3 text-fg-muted`},zw={key:3,class:`mt-1 mb-2 text-xl leading-tight font-semibold tracking-[-0.02em]`},Bw={key:4,class:`mt-1 mb-2 text-lg leading-tight font-semibold tracking-[-0.02em]`},Vw={key:5,class:`mt-1 mb-2 text-base leading-tight font-semibold tracking-[-0.02em]`},Hw={key:6,class:`my-2.5 flex list-disc flex-col gap-1 pl-5`},Uw={key:7,class:`my-2.5 flex list-decimal flex-col gap-1 pl-5`},Ww={key:8,class:`mb-2.5 last:mb-0`},Gw=M({__name:`ChatMarkdown`,props:{text:{}},setup(e){let t=e,n=W(()=>jw(t.text));return(e,t)=>(I(),L(`div`,Pw,[(I(!0),L(F,null,N(n.value,(e,t)=>(I(),L(F,{key:t},[e.kind===`pre`?(I(),L(`pre`,Fw,[z(`code`,Iw,D(e.code),1)])):e.kind===`table`?(I(),L(`table`,Lw,[z(`thead`,null,[z(`tr`,null,[(I(!0),L(F,null,N(e.head,(e,t)=>(I(),L(`th`,{key:t,class:`border border-border bg-muted px-2 py-1.5 text-left font-semibold`},[B(Ow,{inline:e},null,8,[`inline`])]))),128))])]),z(`tbody`,null,[(I(!0),L(F,null,N(e.rows,(e,t)=>(I(),L(`tr`,{key:t},[(I(!0),L(F,null,N(e,(e,t)=>(I(),L(`td`,{key:t,class:`border border-border px-2 py-1.5 text-left`},[B(Ow,{inline:e},null,8,[`inline`])]))),128))]))),128))])])):e.kind===`blockquote`?(I(),L(`blockquote`,Rw,[B(Ow,{inline:e.inline},null,8,[`inline`])])):e.kind===`h1`?(I(),L(`h1`,zw,[B(Ow,{inline:e.inline},null,8,[`inline`])])):e.kind===`h2`?(I(),L(`h2`,Bw,[B(Ow,{inline:e.inline},null,8,[`inline`])])):e.kind===`h3`?(I(),L(`h3`,Vw,[B(Ow,{inline:e.inline},null,8,[`inline`])])):e.kind===`ul`?(I(),L(`ul`,Hw,[(I(!0),L(F,null,N(e.items,(e,t)=>(I(),L(`li`,{key:t},[B(Ow,{inline:e},null,8,[`inline`])]))),128))])):e.kind===`ol`?(I(),L(`ol`,Uw,[(I(!0),L(F,null,N(e.items,(e,t)=>(I(),L(`li`,{key:t},[B(Ow,{inline:e},null,8,[`inline`])]))),128))])):e.kind===`p`?(I(),L(`p`,Ww,[B(Ow,{inline:e.inline},null,8,[`inline`])])):H(``,!0)],64))),128))]))}}),Kw={class:`truncate`},qw=M({__name:`ChatNavChip`,props:{path:{},label:{}},setup(e){return(t,n)=>{let r=ha(`RouterLink`);return I(),R(r,{to:e.path,title:`Go to ${e.label||e.path}`,class:`inline-flex max-w-full items-center gap-1.5 rounded-full border border-primary/45 bg-primary-soft px-2.5 py-1 text-xs font-semibold text-primary transition-colors hover:border-primary hover:bg-primary/15 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary`},{default:A(()=>[B(k(Vu),{"aria-hidden":`true`,class:`size-3.5 shrink-0`}),z(`span`,Kw,D(e.label||e.path),1)]),_:1},8,[`to`,`title`])}}}),Jw={key:1,class:`flex items-baseline gap-1.5 [overflow-wrap:anywhere]`},Yw={class:`font-semibold text-foreground`},Xw={key:0,class:`font-mono text-[0.95em] text-fg-subtle`},Zw=M({__name:`ChatToolCall`,props:{tool:{},streaming:{type:Boolean}},setup(e){let t=e,n=W(()=>t.tool.name||t.tool.Name||t.tool.tool||`tool`),r=W(()=>t.tool.parameters||t.tool.Parameters||``),i=W(()=>!!(t.tool.err||t.tool.Err||t.tool.failed)),a=W(()=>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(),R(qw,{key:0,path:e.tool.path,label:e.tool.label},null,8,[`path`,`label`])):(I(),L(`div`,Jw,[B(k(pd),{"aria-hidden":`true`,class:`size-3.5 shrink-0 self-center text-fg-subtle`}),z(`span`,Yw,D(n.value),1),r.value?(I(),L(`code`,Xw,D(r.value),1)):H(``,!0),z(`span`,{class:E(k(q)(`text-fg-muted`,i.value&&`text-danger`))},D(a.value),3)]))}}),Qw={key:0,class:`mb-2 grid gap-0.5 text-xs`},$w={key:2,class:`whitespace-pre-wrap`},eT=M({__name:`ChatBubble`,props:{text:{},tools:{default:()=>[]},assistant:{type:Boolean,default:!1},streaming:{type:Boolean,default:!1}},setup(e){return(t,n)=>(I(),L(`div`,{class:E([`flex`,e.assistant?`justify-start`:`justify-end`])},[z(`div`,{class:E(k(q)(`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?(I(),L(`div`,Qw,[(I(!0),L(F,null,N(e.tools,(t,n)=>(I(),R(Zw,{key:n,tool:t,streaming:e.streaming},null,8,[`tool`,`streaming`]))),128))])):H(``,!0),e.assistant?(I(),R(Gw,{key:1,text:e.text},null,8,[`text`])):(I(),L(`div`,$w,D(e.text),1)),P(t.$slots,`default`)],2)],2))}}),tT={class:`w-full self-center justify-self-center py-6 text-center`},nT={class:`grid gap-2`},rT=[`onClick`],iT=M({__name:`ChatEmptyState`,emits:[`prompt`],setup(e,{emit:t}){let n=t,r=[`Summarise active tasks`,`Show running agents`,`Check system status`];return(e,t)=>(I(),L(`div`,tT,[t[0]||=z(`span`,{"aria-hidden":`true`,class:`mx-auto mb-3 grid size-9 pLine truncated
|
||||
`).map(e=>e.trim()).find(Boolean)||``,r=n.length>xA?`${n.slice(0,xA).trimEnd()}…`:n;return{text:r,full:t,truncated:r!==t}}var CA=[`title`],wA=M({__name:`ActivityRow`,props:{event:{}},emits:[`open`],setup(e,{emit:t}){let n=e,r=t,i=W(()=>Gk(n.event)),a=W(()=>SA(n.event));function o(){i.value>0&&r(`open`,i.value)}let s=W(()=>n.event.at?LO(n.event.at):`—`);return(e,t)=>(I(),R(k(sO),{class:E(i.value>0?`cursor-pointer`:``),role:i.value>0?`link`:void 0,tabindex:i.value>0?0:void 0,title:i.value>0?`Open task details`:void 0,onClick:o,onKeydown:[fu(uu(o,[`prevent`]),[`enter`]),fu(uu(o,[`prevent`]),[`space`])]},{default:A(()=>[B(k(Q),{class:`font-medium`},{default:A(()=>[V(D(n.event.kind||n.event.type||`event`),1)]),_:1}),B(k(Q),{class:`font-mono`},{default:A(()=>[V(D(i.value>0?`#${i.value}`:`—`),1)]),_:1}),B(k(Q),{class:`w-[55%] max-w-0`},{default:A(()=>[z(`span`,{class:`block truncate`,title:a.value.truncated?a.value.full:void 0},D(a.value.text),9,CA)]),_:1}),B(k(Q),null,{default:A(()=>[V(D(s.value),1)]),_:1})]),_:1},8,[`class`,`role`,`tabindex`,`title`,`onKeydown`]))}}),TA={role:`region`,"aria-label":`Live activity`,"aria-live":`polite`},EA=M({__name:`LiveActivityCard`,setup(e){let t=DT();function n(e){t.push(`/tasks?task=${encodeURIComponent(e)}`)}return(e,t)=>(I(),R(k(HD),null,{default:A(()=>[B(k(qD),null,{default:A(()=>[B(k(JD),null,{default:A(()=>[...t[0]||=[V(`Live activity`,-1)]]),_:1}),B(k(GD),null,{default:A(()=>[...t[1]||=[V(`Last 50, newest first`,-1)]]),_:1}),B(k(UD),null,{default:A(()=>[B(k(lO),{variant:k(Vk)},{default:A(()=>[V(D(k(Bk)),1)]),_:1},8,[`variant`])]),_:1})]),_:1}),B(k(WD),null,{default:A(()=>[z(`div`,TA,[B(k(aO),null,{default:A(()=>[B(k(cO),null,{default:A(()=>[B(k(sO),null,{default:A(()=>[B(k($),null,{default:A(()=>[...t[2]||=[V(`Event`,-1)]]),_:1}),B(k($),null,{default:A(()=>[...t[3]||=[V(`Task`,-1)]]),_:1}),B(k($),null,{default:A(()=>[...t[4]||=[V(`Detail`,-1)]]),_:1}),B(k($),null,{default:A(()=>[...t[5]||=[V(`When`,-1)]]),_:1})]),_:1})]),_:1}),B(k(oO),null,{default:A(()=>[k(zk).length?(I(!0),L(F,{key:1},N(k(zk),(e,t)=>(I(),R(wA,{key:t,event:e,onOpen:n},null,8,[`event`]))),128)):(I(),R(k(sO),{key:0},{default:A(()=>[B(k(Q),{colspan:`4`},{default:A(()=>[B(k(YD),null,{default:A(()=>[B(k(QD),null,{default:A(()=>[B(k(tO),null,{default:A(()=>[...t[6]||=[V(`Waiting for activity`,-1)]]),_:1}),B(k(ZD),null,{default:A(()=>[...t[7]||=[V(`Events appear here as Archie works.`,-1)]]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}))]),_:1})]),_:1})])]),_:1})]),_:1}))}}),DA=M({__name:`Progress`,props:{modelValue:{default:0},max:{},getValueLabel:{},getValueText:{},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){let t=e,n=PS(t,`class`);return(e,r)=>(I(),R(k(Rb),U({"data-slot":`progress`},k(n),{class:k(q)(`bg-muted h-1 rounded-full relative flex w-full items-center overflow-x-hidden`,t.class)}),{default:A(()=>[B(k(zb),{"data-slot":`progress-indicator`,class:`bg-primary size-full flex-1 transition-all`,style:ye(`transform: translateX(-${100-(t.modelValue??0)}%);`)},null,8,[`style`])]),_:1},16,[`class`]))}}),OA=`archie.setup-complete.dismissed.v1`;function kA(e,t=globalThis.localStorage){if(!e?.steps?.length)return{kind:`omit`,remaining:[]};let n=e.steps.filter(e=>!e.done);return n.length?(t?.removeItem?.(OA),{kind:`incomplete`,remaining:n}):t?.getItem?.(`archie.setup-complete.dismissed.v1`)===`1`?{kind:`dismissed`,remaining:[]}:{kind:`complete`,remaining:[]}}function AA(e=globalThis.localStorage){e?.setItem?.(OA,`1`)}var jA={class:`text-lg font-semibold text-primary`},MA={class:`flex flex-col gap-3`},NA={key:0,class:`mt-0.5 text-xs text-fg-subtle`},PA=M({__name:`SetupPanel`,setup(e){let t=O(kA(Fk.value));j(Fk,()=>{t.value=kA(Fk.value)});let n=W(()=>Fk.value?.steps??[]),r=W(()=>{let e=n.value.length;return e?Math.round((e-t.value.remaining.length)/e*100):0});function i(){AA(),t.value=kA(Fk.value)}return(e,a)=>t.value.kind===`incomplete`?(I(),R(k(HD),{key:0},{default:A(()=>[B(k(qD),null,{default:A(()=>[B(k(JD),null,{default:A(()=>[...a[0]||=[V(`Finish setting up`,-1)]]),_:1}),B(k(GD),null,{default:A(()=>[...a[1]||=[V(`Archie needs these before it can work on its own.`,-1)]]),_:1}),B(k(UD),null,{default:A(()=>[z(`span`,jA,D(r.value)+`%`,1)]),_:1})]),_:1}),B(k(WD),null,{default:A(()=>[B(k(DA),{"model-value":r.value,class:`mb-4`},null,8,[`model-value`]),z(`ul`,MA,[(I(!0),L(F,null,N(n.value,(e,t)=>(I(),L(`li`,{key:t,class:`flex items-start gap-3`},[z(`span`,{class:E([`mt-px grid size-[18px] flex-none place-items-center rounded-full border-[1.5px] border-border-strong text-xs text-fg-subtle`,e.done?`border-transparent bg-ok-soft text-ok`:``])},[e.done?(I(),R(k(Hu),{key:0,class:`size-3`})):H(``,!0)],2),z(`div`,null,[z(`div`,{class:E([`text-sm`,e.done?`text-fg-muted line-through`:``])},D(e.title),3),e.detail?(I(),L(`div`,NA,D(e.detail),1)):H(``,!0)])]))),128))])]),_:1})]),_:1})):t.value.kind===`complete`?(I(),R(k(HD),{key:1},{default:A(()=>[B(k(qD),null,{default:A(()=>[B(k(JD),nul
Line truncated
|
||||
`)}return(e,i)=>k(zN)?(I(),R(hN,{key:0,title:`Update status`,description:`Not configured on this deployment.`})):k(RN)?(I(),R(k(HD),{key:1,class:`mb-4`},{default:A(()=>[B(k(WD),null,{default:A(()=>[B(k(YD),null,{default:A(()=>[B(k(QD),null,{default:A(()=>[B(k(tO),null,{default:A(()=>[...i[0]||=[V(`Update status unavailable`,-1)]]),_:1}),B(k(ZD),null,{default:A(()=>[V(D(k(RN)),1)]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})):(I(),R(hN,{key:2,title:`Update status`,description:`Whether what's running matches what's installed.`},{default:A(()=>[k(LN).length?(I(),R(k(aO),{key:1},{default:A(()=>[B(k(cO),null,{default:A(()=>[B(k(sO),null,{default:A(()=>[B(k($),null,{default:A(()=>[...i[3]||=[V(`Component`,-1)]]),_:1}),B(k($),null,{default:A(()=>[...i[4]||=[V(`Install type`,-1)]]),_:1}),B(k($),null,{default:A(()=>[...i[5]||=[V(`Running`,-1)]]),_:1}),B(k($),null,{default:A(()=>[...i[6]||=[V(`Latest available`,-1)]]),_:1}),B(k($),null,{default:A(()=>[...i[7]||=[V(`Status`,-1)]]),_:1})]),_:1})]),_:1}),B(k(oO),null,{default:A(()=>[(I(!0),L(F,null,N(k(LN),e=>(I(),R(k(sO),{key:e.id||e.label,title:r(e)},{default:A(()=>[B(k(Q),{class:`font-medium`},{default:A(()=>[V(D(e.label||e.id),1)]),_:2},1024),B(k(Q),{class:`font-mono`},{default:A(()=>[V(D(e.install_type||`—`),1)]),_:2},1024),B(k(Q),{class:`font-mono`},{default:A(()=>[V(D(e.running_version||`—`),1)]),_:2},1024),B(k(Q),{class:`font-mono`},{default:A(()=>[V(D(e.latest_available||`—`),1)]),_:2},1024),B(k(Q),null,{default:A(()=>[B(k(lO),{variant:n[e.status||``]||`idle`},{default:A(()=>[V(D(t[e.status||``]||e.status),1)]),_:2},1032,[`variant`])]),_:2},1024)]),_:2},1032,[`title`]))),128))]),_:1})]),_:1})):(I(),R(k(YD),{key:0},{default:A(()=>[B(k(QD),null,{default:A(()=>[B(k(tO),null,{default:A(()=>[...i[1]||=[V(`No components reported`,-1)]]),_:1}),B(k(ZD),null,{default:A(()=>[...i[2]||=[V(`The configured update-check command returned nothing.`,-1)]]),_:1})]),_:1})]),_:1}))]),_:1}))}}),aF=M({__name:`SystemStatusPage`,setup(e){async function t(){await Promise.all([IN(),BN(),HN()])}return ia(t),(e,n)=>(I(),L(`div`,null,[B(gD,{title:`Status`,subtitle:`What archied is running with right now.`},{default:A(()=>[B(k(Z),{variant:`outline`,onClick:t},{default:A(()=>[B(k(id),{"data-icon":`inline-start`}),n[0]||=V(` Refresh `,-1)]),_:1})]),_:1}),B(TP),B(iF),B(rF),k(FN)?(I(),R(pP,{key:0})):(I(),L(F,{key:1},[B($P),B(fP,{ids:k(sP)},null,8,[`ids`]),B(eF)],64))]))}}),oF=M({__name:`LifecycleActionList`,props:{actions:{}},setup(e){let t=e;function n(e){return e===`quiet`?`ghost`:e===`danger`?`destructive`:`outline`}return(e,r)=>(I(),L(F,null,[r[2]||=z(`h3`,{class:`mt-5 mb-2 text-sm font-semibold text-fg-muted`},`Actions`,-1),t.actions.length?(I(),R(_N,{key:1},{default:A(()=>[(I(!0),L(F,null,N(t.actions,e=>(I(),R(oP,{key:e.id,label:e.id},{value:A(()=>[z(`span`,null,[B(k(Z),{variant:n(e.kind),size:`xs`,disabled:``},{default:A(()=>[V(D(e.label??e.id),1)]),_:2},1032,[`variant`])])]),_:2},1032,[`label`]))),128))]),_:1})):(I(),R(k(YD),{key:0},{default:A(()=>[B(k(QD),null,{default:A(()=>[B(k(tO),null,{default:A(()=>[...r[0]||=[V(`No actions reported`,-1)]]),_:1}),B(k(ZD),null,{default:A(()=>[...r[1]||=[V(`The server did not return any operator actions.`,-1)]]),_:1})]),_:1})]),_:1}))],64))}}),sF=M({__name:`LifecycleStatusList`,props:{statuses:{}},setup(e){let t=e;return(e,n)=>(I(),L(F,null,[n[2]||=z(`h3`,{class:`mt-5 mb-2 text-sm font-semibold text-fg-muted first:mt-0`},`Statuses`,-1),t.statuses.length?(I(),R(_N,{key:1},{default:A(()=>[(I(!0),L(F,null,N(t.statuses,e=>(I(),R(oP,{key:e.id,label:e.id},{value:A(()=>[z(`span`,null,[B(k(lO),{variant:e.kind??k(YA)(e.id)},{default:A(()=>[V(D(e.label??k(JA)(e.id)),1)]),_:2},1032,[`variant`])])]),_:2},1032,[`label`]))),128))]),_:1})):(I(),R(k(YD),{key:0},{default:A(()=>[B(k(QD),null,{default:A(()=>[B(k(tO),null,{default:A(()=>[...n[0]||=[V(`No statuses reported`,-1)]]),_:1}),B(k(ZD),null,{default:A(()=>[...n[1]||=[V(`The server did not return any lifecycle statuses.`,-1)]]),_:1})]),_:1})]),_:1}))],64))}}),cF=M({__name:`LifecycleCard`,setup(e){let t=W(()=>YN.value?.statuses??[]),n=W(()=>YN.value?.actions??[]);return(e,r)=>k(XN)?(I(),R(hN,{key:0,title:`Work lifecycle`,description:`The task statuses and operator actions archied ships.`},{default:A(()=>[B(k(YD),null,{default:A(()=>[B(k(QD),null,{default:A(()=>[B(k(tO),null,{default:A(()=>[...r[0]||=[V(`Lifecycle unavailable`,-1)]]),_:1}),B(k(ZD),null,{default:A(()=>[V(D(k(XN)),1)]),_:1})]),_:1})]),_:1})]),_:1})):(I(),R(hN,{key:1,title:`Work lifecycle`,description:`The task statuses and operator actions archied ships.`},{default:A(()=>[B(sF,{statuses:t.value},null,8,[`statuses`]),B(oF,{actions:n.value},null,8,[`actions`])]),_:1}))}}),lF=M({__name:`SystemTasksPage`,setup(e){async function t(){await Promise.all([IN(),ZN()])}return ia(t),(e,n)=>(I(),L(`div`,null,[B(gD,{title:`Task settings`,subtitle:`How work moves through archied, and what it is allowed to spend.`},{default:A(()=>[B(k(Z),{variant:`outline`,onClick
Line truncated
|
||||
`)}),t}function Mw(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 Nw(e){return e.every(e=>/^:?-{3,}:?$/.test(e))}var Pw={class:`[overflow-wrap:anywhere]`},Fw={key:0,class:`my-2 overflow-auto rounded-md border border-border bg-background/60 p-3`},Iw={class:`font-mono text-[0.85em]`},Lw={key:1,class:`my-3 w-full border-collapse text-[0.92em]`},Rw={key:2,class:`my-2 border-l-[3px] border-primary pl-3 text-fg-muted`},zw={key:3,class:`mt-1 mb-2 text-xl leading-tight font-semibold tracking-[-0.02em]`},Bw={key:4,class:`mt-1 mb-2 text-lg leading-tight font-semibold tracking-[-0.02em]`},Vw={key:5,class:`mt-1 mb-2 text-base leading-tight font-semibold tracking-[-0.02em]`},Hw={key:6,class:`my-2.5 flex list-disc flex-col gap-1 pl-5`},Uw={key:7,class:`my-2.5 flex list-decimal flex-col gap-1 pl-5`},Ww={key:8,class:`mb-2.5 last:mb-0`},Gw=M({__name:`ChatMarkdown`,props:{text:{}},setup(e){let t=e,n=W(()=>jw(t.text));return(e,t)=>(I(),L(`div`,Pw,[(I(!0),L(F,null,N(n.value,(e,t)=>(I(),L(F,{key:t},[e.kind===`pre`?(I(),L(`pre`,Fw,[z(`code`,Iw,D(e.code),1)])):e.kind===`table`?(I(),L(`table`,Lw,[z(`thead`,null,[z(`tr`,null,[(I(!0),L(F,null,N(e.head,(e,t)=>(I(),L(`th`,{key:t,class:`border border-border bg-muted px-2 py-1.5 text-left font-semibold`},[B(Ow,{inline:e},null,8,[`inline`])]))),128))])]),z(`tbody`,null,[(I(!0),L(F,null,N(e.rows,(e,t)=>(I(),L(`tr`,{key:t},[(I(!0),L(F,null,N(e,(e,t)=>(I(),L(`td`,{key:t,class:`border border-border px-2 py-1.5 text-left`},[B(Ow,{inline:e},null,8,[`inline`])]))),128))]))),128))])])):e.kind===`blockquote`?(I(),L(`blockquote`,Rw,[B(Ow,{inline:e.inline},null,8,[`inline`])])):e.kind===`h1`?(I(),L(`h1`,zw,[B(Ow,{inline:e.inline},null,8,[`inline`])])):e.kind===`h2`?(I(),L(`h2`,Bw,[B(Ow,{inline:e.inline},null,8,[`inline`])])):e.kind===`h3`?(I(),L(`h3`,Vw,[B(Ow,{inline:e.inline},null,8,[`inline`])])):e.kind===`ul`?(I(),L(`ul`,Hw,[(I(!0),L(F,null,N(e.items,(e,t)=>(I(),L(`li`,{key:t},[B(Ow,{inline:e},null,8,[`inline`])]))),128))])):e.kind===`ol`?(I(),L(`ol`,Uw,[(I(!0),L(F,null,N(e.items,(e,t)=>(I(),L(`li`,{key:t},[B(Ow,{inline:e},null,8,[`inline`])]))),128))])):e.kind===`p`?(I(),L(`p`,Ww,[B(Ow,{inline:e.inline},null,8,[`inline`])])):H(``,!0)],64))),128))]))}}),Kw={class:`truncate`},qw=M({__name:`ChatNavChip`,props:{path:{},label:{}},setup(e){return(t,n)=>{let r=ha(`RouterLink`);return I(),R(r,{to:e.path,title:`Go to ${e.label||e.path}`,class:`inline-flex max-w-full items-center gap-1.5 rounded-full 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:A(()=>[B(k(Vu),{"aria-hidden":`true`,class:`size-3.5 shrink-0`}),z(`span`,Kw,D(e.label||e.path),1)]),_:1},8,[`to`,`title`])}}}),Jw={key:1,class:`flex items-baseline gap-1.5 [overflow-wrap:anywhere]`},Yw={class:`font-semibold text-foreground`},Xw={key:0,class:`font-mono text-[0.95em] text-fg-subtle`},Zw=M({__name:`ChatToolCall`,props:{tool:{},streaming:{type:Boolean}},setup(e){let t=e,n=W(()=>t.tool.name||t.tool.Name||t.tool.tool||`tool`),r=W(()=>t.tool.parameters||t.tool.Parameters||``),i=W(()=>!!(t.tool.err||t.tool.Err||t.tool.failed)),a=W(()=>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(),R(qw,{key:0,path:e.tool.path,label:e.tool.label},null,8,[`path`,`label`])):(I(),L(`div`,Jw,[B(k(pd),{"aria-hidden":`true`,class:`size-3.5 shrink-0 self-center text-fg-subtle`}),z(`span`,Yw,D(n.value),1),r.value?(I(),L(`code`,Xw,D(r.value),1)):H(``,!0),z(`span`,{class:E(k(q)(`text-fg-muted`,i.value&&`text-danger`))},D(a.value),3)]))}}),Qw={key:0,class:`mb-2 grid gap-0.5 text-xs`},$w={key:2,class:`whitespace-pre-wrap`},eT=M({__name:`ChatBubble`,props:{text:{},tools:{default:()=>[]},assistant:{type:Boolean,default:!1},streaming:{type:Boolean,default:!1}},setup(e){return(t,n)=>(I(),L(`div`,{class:E([`flex`,e.assistant?`justify-start`:`justify-end`])},[z(`div`,{class:E(k(q)(`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?(I(),L(`div`,Qw,[(I(!0),L(F,null,N(e.tools,(t,n)=>(I(),R(Zw,{key:n,tool:t,streaming:e.streaming},null,8,[`tool`,`streaming`]))),128))])):H(``,!0),e.assistant?(I(),R(Gw,{key:1,text:e.text},null,8,[`text`])):(I(),L(`div`,$w,D(e.text),1)),P(t.$slots,`default`)],2)],2))}}),tT={class:`w-full self-center justify-self-center py-6 text-center`},nT={class:`grid gap-2`},rT=[`onClick`],iT=M({__name:`ChatEmptyState`,emits:[`prompt`],setup(e,{emit:t}){let n=t,r=[`Summarise active tasks`,`Show running agents`,`Check system status`];return(e,t)=>(I(),L(`div`,tT,[t[0]||=z(`span`,{"aria-hidden":`true`,class:`mx-auto mb-3 grid size-9 placLine truncated
|
||||
`).map(e=>e.trim()).find(Boolean)||``,r=n.length>xA?`${n.slice(0,xA).trimEnd()}…`:n;return{text:r,full:t,truncated:r!==t}}var CA=[`title`],wA=M({__name:`ActivityRow`,props:{event:{}},emits:[`open`],setup(e,{emit:t}){let n=e,r=t,i=W(()=>Gk(n.event)),a=W(()=>SA(n.event));function o(){i.value>0&&r(`open`,i.value)}let s=W(()=>n.event.at?LO(n.event.at):`—`);return(e,t)=>(I(),R(k(sO),{class:E(i.value>0?`cursor-pointer`:``),role:i.value>0?`link`:void 0,tabindex:i.value>0?0:void 0,title:i.value>0?`Open task details`:void 0,onClick:o,onKeydown:[fu(uu(o,[`prevent`]),[`enter`]),fu(uu(o,[`prevent`]),[`space`])]},{default:A(()=>[B(k(Q),{class:`font-medium`},{default:A(()=>[V(D(n.event.kind||n.event.type||`event`),1)]),_:1}),B(k(Q),{class:`font-mono`},{default:A(()=>[V(D(i.value>0?`#${i.value}`:`—`),1)]),_:1}),B(k(Q),{class:`w-[55%] max-w-0`},{default:A(()=>[z(`span`,{class:`block truncate`,title:a.value.truncated?a.value.full:void 0},D(a.value.text),9,CA)]),_:1}),B(k(Q),null,{default:A(()=>[V(D(s.value),1)]),_:1})]),_:1},8,[`class`,`role`,`tabindex`,`title`,`onKeydown`]))}}),TA={role:`region`,"aria-label":`Live activity`,"aria-live":`polite`},EA=M({__name:`LiveActivityCard`,setup(e){let t=DT();function n(e){t.push(`/tasks?task=${encodeURIComponent(e)}`)}return(e,t)=>(I(),R(k(HD),null,{default:A(()=>[B(k(qD),null,{default:A(()=>[B(k(JD),null,{default:A(()=>[...t[0]||=[V(`Live activity`,-1)]]),_:1}),B(k(GD),null,{default:A(()=>[...t[1]||=[V(`Last 50, newest first`,-1)]]),_:1}),B(k(UD),null,{default:A(()=>[B(k(lO),{variant:k(Vk)},{default:A(()=>[V(D(k(Bk)),1)]),_:1},8,[`variant`])]),_:1})]),_:1}),B(k(WD),null,{default:A(()=>[z(`div`,TA,[B(k(aO),null,{default:A(()=>[B(k(cO),null,{default:A(()=>[B(k(sO),null,{default:A(()=>[B(k($),null,{default:A(()=>[...t[2]||=[V(`Event`,-1)]]),_:1}),B(k($),null,{default:A(()=>[...t[3]||=[V(`Task`,-1)]]),_:1}),B(k($),null,{default:A(()=>[...t[4]||=[V(`Detail`,-1)]]),_:1}),B(k($),null,{default:A(()=>[...t[5]||=[V(`When`,-1)]]),_:1})]),_:1})]),_:1}),B(k(oO),null,{default:A(()=>[k(zk).length?(I(!0),L(F,{key:1},N(k(zk),(e,t)=>(I(),R(wA,{key:t,event:e,onOpen:n},null,8,[`event`]))),128)):(I(),R(k(sO),{key:0},{default:A(()=>[B(k(Q),{colspan:`4`},{default:A(()=>[B(k(YD),null,{default:A(()=>[B(k(QD),null,{default:A(()=>[B(k(tO),null,{default:A(()=>[...t[6]||=[V(`Waiting for activity`,-1)]]),_:1}),B(k(ZD),null,{default:A(()=>[...t[7]||=[V(`Events appear here as Archie works.`,-1)]]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}))]),_:1})]),_:1})])]),_:1})]),_:1}))}}),DA=M({__name:`Progress`,props:{modelValue:{default:0},max:{},getValueLabel:{},getValueText:{},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){let t=e,n=PS(t,`class`);return(e,r)=>(I(),R(k(Rb),U({"data-slot":`progress`},k(n),{class:k(q)(`bg-muted h-1 rounded-full relative flex w-full items-center overflow-x-hidden`,t.class)}),{default:A(()=>[B(k(zb),{"data-slot":`progress-indicator`,class:`bg-primary size-full flex-1 transition-all`,style:ye(`transform: translateX(-${100-(t.modelValue??0)}%);`)},null,8,[`style`])]),_:1},16,[`class`]))}}),OA=`archie.setup-complete.dismissed.v1`;function kA(e,t=globalThis.localStorage){if(!e?.steps?.length)return{kind:`omit`,remaining:[]};let n=e.steps.filter(e=>!e.done);return n.length?(t?.removeItem?.(OA),{kind:`incomplete`,remaining:n}):t?.getItem?.(`archie.setup-complete.dismissed.v1`)===`1`?{kind:`dismissed`,remaining:[]}:{kind:`complete`,remaining:[]}}function AA(e=globalThis.localStorage){e?.setItem?.(OA,`1`)}var jA={class:`text-lg font-semibold text-link`},MA={class:`flex flex-col gap-3`},NA={key:0,class:`mt-0.5 text-xs text-fg-subtle`},PA=M({__name:`SetupPanel`,setup(e){let t=O(kA(Fk.value));j(Fk,()=>{t.value=kA(Fk.value)});let n=W(()=>Fk.value?.steps??[]),r=W(()=>{let e=n.value.length;return e?Math.round((e-t.value.remaining.length)/e*100):0});function i(){AA(),t.value=kA(Fk.value)}return(e,a)=>t.value.kind===`incomplete`?(I(),R(k(HD),{key:0},{default:A(()=>[B(k(qD),null,{default:A(()=>[B(k(JD),null,{default:A(()=>[...a[0]||=[V(`Finish setting up`,-1)]]),_:1}),B(k(GD),null,{default:A(()=>[...a[1]||=[V(`Archie needs these before it can work on its own.`,-1)]]),_:1}),B(k(UD),null,{default:A(()=>[z(`span`,jA,D(r.value)+`%`,1)]),_:1})]),_:1}),B(k(WD),null,{default:A(()=>[B(k(DA),{"model-value":r.value,class:`mb-4`},null,8,[`model-value`]),z(`ul`,MA,[(I(!0),L(F,null,N(n.value,(e,t)=>(I(),L(`li`,{key:t,class:`flex items-start gap-3`},[z(`span`,{class:E([`mt-px grid size-[18px] flex-none place-items-center rounded-full border-[1.5px] border-border-strong text-xs text-fg-subtle`,e.done?`border-transparent bg-ok-soft text-ok`:``])},[e.done?(I(),R(k(Hu),{key:0,class:`size-3`})):H(``,!0)],2),z(`div`,null,[z(`div`,{class:E([`text-sm`,e.done?`text-fg-muted line-through`:``])},D(e.title),3),e.detail?(I(),L(`div`,NA,D(e.detail),1)):H(``,!0)])]))),128))])]),_:1})]),_:1})):t.value.kind===`complete`?(I(),R(k(HD),{key:1},{default:A(()=>[B(k(qD),null,{default:A(()=>[B(k(JD),null,{
Line truncated
|
||||
`)}return(e,i)=>k(zN)?(I(),R(hN,{key:0,title:`Update status`,description:`Not configured on this deployment.`})):k(RN)?(I(),R(k(HD),{key:1,class:`mb-4`},{default:A(()=>[B(k(WD),null,{default:A(()=>[B(k(YD),null,{default:A(()=>[B(k(QD),null,{default:A(()=>[B(k(tO),null,{default:A(()=>[...i[0]||=[V(`Update status unavailable`,-1)]]),_:1}),B(k(ZD),null,{default:A(()=>[V(D(k(RN)),1)]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})):(I(),R(hN,{key:2,title:`Update status`,description:`Whether what's running matches what's installed.`},{default:A(()=>[k(LN).length?(I(),R(k(aO),{key:1},{default:A(()=>[B(k(cO),null,{default:A(()=>[B(k(sO),null,{default:A(()=>[B(k($),null,{default:A(()=>[...i[3]||=[V(`Component`,-1)]]),_:1}),B(k($),null,{default:A(()=>[...i[4]||=[V(`Install type`,-1)]]),_:1}),B(k($),null,{default:A(()=>[...i[5]||=[V(`Running`,-1)]]),_:1}),B(k($),null,{default:A(()=>[...i[6]||=[V(`Latest available`,-1)]]),_:1}),B(k($),null,{default:A(()=>[...i[7]||=[V(`Status`,-1)]]),_:1})]),_:1})]),_:1}),B(k(oO),null,{default:A(()=>[(I(!0),L(F,null,N(k(LN),e=>(I(),R(k(sO),{key:e.id||e.label,title:r(e)},{default:A(()=>[B(k(Q),{class:`font-medium`},{default:A(()=>[V(D(e.label||e.id),1)]),_:2},1024),B(k(Q),{class:`font-mono`},{default:A(()=>[V(D(e.install_type||`—`),1)]),_:2},1024),B(k(Q),{class:`font-mono`},{default:A(()=>[V(D(e.running_version||`—`),1)]),_:2},1024),B(k(Q),{class:`font-mono`},{default:A(()=>[V(D(e.latest_available||`—`),1)]),_:2},1024),B(k(Q),null,{default:A(()=>[B(k(lO),{variant:n[e.status||``]||`idle`},{default:A(()=>[V(D(t[e.status||``]||e.status),1)]),_:2},1032,[`variant`])]),_:2},1024)]),_:2},1032,[`title`]))),128))]),_:1})]),_:1})):(I(),R(k(YD),{key:0},{default:A(()=>[B(k(QD),null,{default:A(()=>[B(k(tO),null,{default:A(()=>[...i[1]||=[V(`No components reported`,-1)]]),_:1}),B(k(ZD),null,{default:A(()=>[...i[2]||=[V(`The configured update-check command returned nothing.`,-1)]]),_:1})]),_:1})]),_:1}))]),_:1}))}}),aF=M({__name:`SystemStatusPage`,setup(e){async function t(){await Promise.all([IN(),BN(),HN()])}return ia(t),(e,n)=>(I(),L(`div`,null,[B(gD,{title:`Status`,subtitle:`What archied is running with right now.`},{default:A(()=>[B(k(Z),{variant:`outline`,onClick:t},{default:A(()=>[B(k(id),{"data-icon":`inline-start`}),n[0]||=V(` Refresh `,-1)]),_:1})]),_:1}),B(TP),B(iF),B(rF),k(FN)?(I(),R(pP,{key:0})):(I(),L(F,{key:1},[B($P),B(fP,{ids:k(sP)},null,8,[`ids`]),B(eF)],64))]))}}),oF=M({__name:`LifecycleActionList`,props:{actions:{}},setup(e){let t=e;function n(e){return e===`quiet`?`ghost`:e===`danger`?`destructive`:`outline`}return(e,r)=>(I(),L(F,null,[r[2]||=z(`h3`,{class:`mt-5 mb-2 text-sm font-semibold text-fg-muted`},`Actions`,-1),t.actions.length?(I(),R(_N,{key:1},{default:A(()=>[(I(!0),L(F,null,N(t.actions,e=>(I(),R(oP,{key:e.id,label:e.id},{value:A(()=>[z(`span`,null,[B(k(Z),{variant:n(e.kind),size:`xs`,disabled:``},{default:A(()=>[V(D(e.label??e.id),1)]),_:2},1032,[`variant`])])]),_:2},1032,[`label`]))),128))]),_:1})):(I(),R(k(YD),{key:0},{default:A(()=>[B(k(QD),null,{default:A(()=>[B(k(tO),null,{default:A(()=>[...r[0]||=[V(`No actions reported`,-1)]]),_:1}),B(k(ZD),null,{default:A(()=>[...r[1]||=[V(`The server did not return any operator actions.`,-1)]]),_:1})]),_:1})]),_:1}))],64))}}),sF=M({__name:`LifecycleStatusList`,props:{statuses:{}},setup(e){let t=e;return(e,n)=>(I(),L(F,null,[n[2]||=z(`h3`,{class:`mt-5 mb-2 text-sm font-semibold text-fg-muted first:mt-0`},`Statuses`,-1),t.statuses.length?(I(),R(_N,{key:1},{default:A(()=>[(I(!0),L(F,null,N(t.statuses,e=>(I(),R(oP,{key:e.id,label:e.id},{value:A(()=>[z(`span`,null,[B(k(lO),{variant:e.kind??k(YA)(e.id)},{default:A(()=>[V(D(e.label??k(JA)(e.id)),1)]),_:2},1032,[`variant`])])]),_:2},1032,[`label`]))),128))]),_:1})):(I(),R(k(YD),{key:0},{default:A(()=>[B(k(QD),null,{default:A(()=>[B(k(tO),null,{default:A(()=>[...n[0]||=[V(`No statuses reported`,-1)]]),_:1}),B(k(ZD),null,{default:A(()=>[...n[1]||=[V(`The server did not return any lifecycle statuses.`,-1)]]),_:1})]),_:1})]),_:1}))],64))}}),cF=M({__name:`LifecycleCard`,setup(e){let t=W(()=>YN.value?.statuses??[]),n=W(()=>YN.value?.actions??[]);return(e,r)=>k(XN)?(I(),R(hN,{key:0,title:`Work lifecycle`,description:`The task statuses and operator actions archied ships.`},{default:A(()=>[B(k(YD),null,{default:A(()=>[B(k(QD),null,{default:A(()=>[B(k(tO),null,{default:A(()=>[...r[0]||=[V(`Lifecycle unavailable`,-1)]]),_:1}),B(k(ZD),null,{default:A(()=>[V(D(k(XN)),1)]),_:1})]),_:1})]),_:1})]),_:1})):(I(),R(hN,{key:1,title:`Work lifecycle`,description:`The task statuses and operator actions archied ships.`},{default:A(()=>[B(sF,{statuses:t.value},null,8,[`statuses`]),B(oF,{actions:n.value},null,8,[`actions`])]),_:1}))}}),lF=M({__name:`SystemTasksPage`,setup(e){async function t(){await Promise.all([IN(),ZN()])}return ia(t),(e,n)=>(I(),L(`div`,null,[B(gD,{title:`Task settings`,subtitle:`How work moves through archied, and what it is allowed to spend.`},{default:A(()=>[B(k(Z),{variant:`outline`,onClick
Line truncated
|
||||
@@ -1,7 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
import { computed } from "vue";
|
||||
|
||||
import { Empty, EmptyDescription, EmptyHeader, EmptyTitle } from "@/components/ui/empty";
|
||||
import { Empty, EmptyHeader, EmptyTitle } from "@/components/ui/empty";
|
||||
|
||||
import JsonBlock from "./JsonBlock.vue";
|
||||
import PanelError from "./PanelError.vue";
|
||||
@@ -44,31 +44,18 @@ const recognised = computed(() => schema.value === CONFIG_SCHEMA);
|
||||
|
||||
<Empty v-else-if="!event">
|
||||
<EmptyHeader>
|
||||
<EmptyTitle>Not captured for this run</EmptyTitle>
|
||||
<EmptyDescription>
|
||||
Archie records the effective configuration when it dispatches an attempt. Attempt {{ attempt }} has no such
|
||||
record — it predates the record, or the capture did not run. Nothing here says the run used the defaults.
|
||||
</EmptyDescription>
|
||||
<EmptyTitle>No configuration captured for attempt {{ attempt }}</EmptyTitle>
|
||||
</EmptyHeader>
|
||||
</Empty>
|
||||
|
||||
<div v-else>
|
||||
<p class="mb-2 max-w-[75ch] text-sm text-fg-muted">
|
||||
This is attempt {{ event.attempt }}'s effective task-runtime configuration: a non-secret subset covering bot
|
||||
identity, models, limits, budgets, dispatch, diff cap, notifications, forge host and tool policy. It is not the
|
||||
dashboard configuration view — providers, repositories, identities, credentials and lock state are not part of
|
||||
it.
|
||||
</p>
|
||||
<div class="mb-3 text-xs text-fg-muted">
|
||||
Captured {{ event.at || "at an unrecorded time"
|
||||
}}<span v-if="event.stage"> in stage {{ event.stage }}</span>
|
||||
</div>
|
||||
<JsonBlock v-if="recognised" :value="document" />
|
||||
<template v-else>
|
||||
<p class="mb-2 text-sm text-warn">
|
||||
Recorded in an unknown schema{{ schema ? ` (${schema})` : "" }}. The raw payload is shown verbatim; nothing
|
||||
here reinterprets it.
|
||||
</p>
|
||||
<p class="mb-2 text-sm text-warn">Unknown schema{{ schema ? ` (${schema})` : "" }} — shown verbatim.</p>
|
||||
<JsonBlock :value="event.data" />
|
||||
</template>
|
||||
</div>
|
||||
|
||||
@@ -43,20 +43,13 @@ const nothingRecorded = computed(() => !props.state?.found || !captures.value.le
|
||||
<Empty v-else-if="undecodable">
|
||||
<EmptyHeader>
|
||||
<EmptyTitle>A change capture was recorded but could not be read</EmptyTitle>
|
||||
<EmptyDescription>
|
||||
This attempt has a change capture event, but this dashboard could not decode its payload. That is a read
|
||||
failure, not a statement about what the attempt changed.
|
||||
</EmptyDescription>
|
||||
</EmptyHeader>
|
||||
</Empty>
|
||||
|
||||
<Empty v-else-if="nothingRecorded">
|
||||
<EmptyHeader>
|
||||
<EmptyTitle>No change capture was recorded for this attempt</EmptyTitle>
|
||||
<EmptyDescription>
|
||||
Archie records what an attempt changed when it commits or pushes that work. Nothing was recorded here — the
|
||||
attempt may predate capture, or it produced no commit. This is not the same as "no files changed".
|
||||
</EmptyDescription>
|
||||
<EmptyTitle>No change capture recorded for this attempt</EmptyTitle>
|
||||
<EmptyDescription>The attempt may predate capture, or it produced no commit.</EmptyDescription>
|
||||
</EmptyHeader>
|
||||
</Empty>
|
||||
|
||||
|
||||
@@ -31,10 +31,7 @@ defineEmits<{ retry: [] }>();
|
||||
@retry="$emit('retry')"
|
||||
/>
|
||||
<div v-else>
|
||||
<p class="mb-3 text-sm text-fg-muted">
|
||||
The stored task record and its events, verbatim. Events are unfiltered on purpose: this is every event the task
|
||||
has, and each one carries the attempt it belongs to. Attempt {{ attempt }} is the one selected above.
|
||||
</p>
|
||||
<p class="mb-3 text-sm text-fg-muted">The stored record and every event, verbatim.</p>
|
||||
<JsonBlock :value="state" />
|
||||
</div>
|
||||
</template>
|
||||
@@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { Play, RefreshCw } from "@lucide/vue";
|
||||
import { RefreshCw } from "@lucide/vue";
|
||||
import { computed } from "vue";
|
||||
|
||||
import {
|
||||
@@ -24,30 +24,26 @@ import { useTaskRun } from "./use-task-run";
|
||||
* Restarting a task as a new run.
|
||||
*
|
||||
* The control is only live where the task itself offers the action: a new run
|
||||
* can only start from a parked task, so anywhere else the page says why rather
|
||||
* than offering a button that will be refused. The refusal that does arrive
|
||||
* (the task moved between the read and the click) is rendered from the error
|
||||
* class, because "you cannot do that", "your session has expired" and "the
|
||||
* daemon did not answer" need three different responses from the operator.
|
||||
* can only start from a parked task, so anywhere else the button is disabled
|
||||
* and the title says why. The refusal that does arrive (the task moved between
|
||||
* the read and the click) is rendered from the error class, because "you
|
||||
* cannot do that", "your session has expired" and "the daemon did not answer"
|
||||
* need three different responses from the operator.
|
||||
*
|
||||
* `compact` renders the bare control for the header's action row; on its own
|
||||
* the component also renders the disabled reason.
|
||||
*/
|
||||
const props = defineProps<{ id: string }>();
|
||||
const props = defineProps<{ id?: string; compact?: boolean }>();
|
||||
|
||||
const run = useTaskRun();
|
||||
|
||||
// The action's own kind decides how loud the button is: `retry` is primary in
|
||||
// the served catalogue, and would be quiet on the day it is not.
|
||||
const variant = computed(() => (run.retryKind === "primary" ? "default" : "outline"));
|
||||
|
||||
const confirmText = computed(
|
||||
() =>
|
||||
`Start a new run for "${run.task?.title || `task ${props.id}`}"? This is a new attempt, and the previous attempt's commits are discarded.`,
|
||||
() => `Start a new run for "${run.task?.title || `task ${props.id}`}"? The previous attempt's commits are discarded.`,
|
||||
);
|
||||
|
||||
const unavailable = computed(() => {
|
||||
if (run.canRetry || run.taskList === undefined) return "";
|
||||
return run.task
|
||||
? `A new run can only start from a parked task. This task is ${statusLabel(run.task.status ?? "")}.`
|
||||
: "This task's operator controls could not be read.";
|
||||
return run.task ? `New runs start from a parked task. This task is ${statusLabel(run.task.status ?? "")}.` : "";
|
||||
});
|
||||
|
||||
const errorText = computed(() => {
|
||||
@@ -60,37 +56,32 @@ const errorText = computed(() => {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<section class="mb-4 flex flex-wrap items-center gap-3" aria-label="Start a new run">
|
||||
<AlertDialog>
|
||||
<AlertDialogTrigger as-child>
|
||||
<Button :variant="variant" :disabled="!run.canRetry || run.retryBusy" title="Retry this task as a new run">
|
||||
<Spinner v-if="run.retryBusy" data-icon="inline-start" />
|
||||
<Play v-else data-icon="inline-start" />
|
||||
{{ run.retryBusy ? "Starting…" : "Start a new run" }}
|
||||
</Button>
|
||||
</AlertDialogTrigger>
|
||||
<AlertDialogContent>
|
||||
<AlertDialogHeader>
|
||||
<AlertDialogTitle>Start a new run</AlertDialogTitle>
|
||||
<AlertDialogDescription>{{ confirmText }}</AlertDialogDescription>
|
||||
</AlertDialogHeader>
|
||||
<AlertDialogFooter>
|
||||
<AlertDialogCancel>Cancel</AlertDialogCancel>
|
||||
<AlertDialogAction @click="run.performRetry">
|
||||
<RefreshCw data-icon="inline-start" />
|
||||
Start a new run
|
||||
</AlertDialogAction>
|
||||
</AlertDialogFooter>
|
||||
</AlertDialogContent>
|
||||
</AlertDialog>
|
||||
|
||||
<p class="min-w-0 flex-1 basis-[22rem] text-sm text-fg-muted">
|
||||
Starts a new attempt for this task: a fresh worktree reset onto the base branch. The previous attempt's
|
||||
commits are discarded — they are not carried into the new run.
|
||||
</p>
|
||||
<p v-if="unavailable" class="min-w-0 flex-1 basis-[22rem] text-sm text-fg-muted">{{ unavailable }}</p>
|
||||
<Alert v-if="errorText" variant="destructive" class="basis-full">
|
||||
<AlertDescription>{{ errorText }}</AlertDescription>
|
||||
</Alert>
|
||||
</section>
|
||||
</template>
|
||||
<AlertDialog>
|
||||
<AlertDialogTrigger as-child>
|
||||
<Button
|
||||
:variant="run.retryKind === 'primary' ? 'default' : 'outline'"
|
||||
:disabled="!run.canRetry || run.retryBusy"
|
||||
:title="unavailable || 'Retry this task as a new run'"
|
||||
>
|
||||
<Spinner v-if="run.retryBusy" data-icon="inline-start" />
|
||||
{{ run.retryBusy ? "Starting…" : "Start a new run" }}
|
||||
</Button>
|
||||
</AlertDialogTrigger>
|
||||
<AlertDialogContent>
|
||||
<AlertDialogHeader>
|
||||
<AlertDialogTitle>Start a new run</AlertDialogTitle>
|
||||
<AlertDialogDescription>{{ confirmText }}</AlertDialogDescription>
|
||||
</AlertDialogHeader>
|
||||
<AlertDialogFooter>
|
||||
<AlertDialogCancel>Cancel</AlertDialogCancel>
|
||||
<AlertDialogAction @click="run.performRetry">
|
||||
<RefreshCw data-icon="inline-start" />
|
||||
Start a new run
|
||||
</AlertDialogAction>
|
||||
</AlertDialogFooter>
|
||||
</AlertDialogContent>
|
||||
</AlertDialog>
|
||||
<Alert v-if="errorText" variant="destructive" class="mt-2">
|
||||
<AlertDescription>{{ errorText }}</AlertDescription>
|
||||
</Alert>
|
||||
</template>
|
||||
@@ -6,7 +6,6 @@ import { Card, CardContent } from "@/components/ui/card";
|
||||
import { Tabs } from "@/components/ui/tabs";
|
||||
|
||||
import AttemptSelector from "./AttemptSelector.vue";
|
||||
import StartNewRun from "./StartNewRun.vue";
|
||||
import TabBar from "./TabBar.vue";
|
||||
import TaskDetailNotice from "./TaskDetailNotice.vue";
|
||||
import TaskHeader from "./TaskHeader.vue";
|
||||
@@ -46,7 +45,6 @@ const run = provideTaskRun(taskId);
|
||||
<TaskHeader :id="rawId" />
|
||||
<TaskMetaBar />
|
||||
<TaskNotes :id="rawId" />
|
||||
<StartNewRun :id="rawId" />
|
||||
<AttemptSelector />
|
||||
|
||||
<Card>
|
||||
|
||||
+13
-18
@@ -5,34 +5,28 @@ import { RouterLink } from "vue-router";
|
||||
|
||||
import { Button } from "@/components/ui/button";
|
||||
|
||||
import StartNewRun from "./StartNewRun.vue";
|
||||
import { useTaskRun } from "./use-task-run";
|
||||
|
||||
/**
|
||||
* The run page's head: which task this is, and the two things an operator does
|
||||
* from here -- go back, or re-read everything.
|
||||
* The run page's head, one strip: the task, its workflow line, and the
|
||||
* actions. Back and Refresh are page chrome; Start a new run lives here too,
|
||||
* since a restart is the page's one decision. The commit-discard consequence
|
||||
* is stated in the confirm dialog, not beside the button.
|
||||
*/
|
||||
const props = defineProps<{ id: string }>();
|
||||
|
||||
const run = useTaskRun();
|
||||
|
||||
const title = computed(() => run.task?.title || `Task #${props.id}`);
|
||||
const sub = computed(() => {
|
||||
const task = run.task;
|
||||
return [
|
||||
`One run of task ${props.id}`,
|
||||
task?.workflow ? `${task.workflow} workflow` : "",
|
||||
task?.repo ? `${task.owner}/${task.repo}` : "",
|
||||
]
|
||||
.filter(Boolean)
|
||||
.join(" · ");
|
||||
});
|
||||
const workflow = computed(() => (run.task?.workflow ? `${run.task.workflow} workflow` : ""));
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="mb-5 flex flex-wrap items-start justify-between gap-5">
|
||||
<div>
|
||||
<h1 class="text-3xl font-semibold tracking-[-0.03em]">{{ title }}</h1>
|
||||
<p class="mt-2 text-sm text-fg-muted">{{ sub }}</p>
|
||||
<div class="mb-4 flex flex-wrap items-start justify-between gap-x-5 gap-y-2">
|
||||
<div class="min-w-0">
|
||||
<h1 class="text-2xl font-semibold tracking-[-0.02em]">{{ title }}</h1>
|
||||
<p v-if="workflow" class="mt-1 text-sm text-fg-muted">{{ workflow }}</p>
|
||||
</div>
|
||||
<div class="flex flex-wrap items-center gap-2">
|
||||
<Button variant="outline" as-child>
|
||||
@@ -41,10 +35,11 @@ const sub = computed(() => {
|
||||
Back to tasks
|
||||
</RouterLink>
|
||||
</Button>
|
||||
<Button @click="run.refreshAll">
|
||||
<Button variant="outline" @click="run.refreshAll">
|
||||
<RefreshCw data-icon="inline-start" />
|
||||
Refresh
|
||||
</Button>
|
||||
<StartNewRun compact :id="id" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</template>
|
||||
@@ -20,10 +20,10 @@ const run = useTaskRun();
|
||||
|
||||
const note = computed(() => {
|
||||
if (run.taskList === null) {
|
||||
return "The task list could not be read, so this page cannot show the task's current status or its operator controls. The run history below comes from the task's own endpoints.";
|
||||
return "The task list could not be read, so the current status and operator controls are unavailable.";
|
||||
}
|
||||
if (Array.isArray(run.taskList) && !run.task) {
|
||||
return `Task ${props.id} is not among the tasks this dashboard lists (the list covers the 100 most recently updated). Its recorded attempts are shown below; the Debug tab holds the stored record verbatim.`;
|
||||
return `Task ${props.id} is outside the recent-tasks list (the 100 most recently updated). Its recorded attempts are shown below.`;
|
||||
}
|
||||
return "";
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user