spec-cat 0.1.45 → 0.1.46

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (26) hide show
  1. package/.output/nitro.json +1 -1
  2. package/.output/public/_nuxt/{D6L1fjPL.js → BIqAiadP.js} +1 -1
  3. package/.output/public/_nuxt/{-cMJ30jf.js → BIsfrp4O.js} +1 -1
  4. package/.output/public/_nuxt/{D_svUirm.js → ByZGFnUA.js} +48 -48
  5. package/.output/public/_nuxt/{B4NAMCh5.js → CE5wWE6n.js} +2 -2
  6. package/.output/public/_nuxt/CUoKmmxS.js +1 -0
  7. package/.output/public/_nuxt/{CJlPVUja.js → CjEIgEdp.js} +1 -1
  8. package/.output/public/_nuxt/CzV00gDF.js +1 -0
  9. package/.output/public/_nuxt/{606_6V9S.js → DIf4tF5h.js} +1 -1
  10. package/.output/public/_nuxt/{BGzddYiz.js → DTdHw1D1.js} +1 -1
  11. package/.output/public/_nuxt/{D8F4N5Iq.js → DVcuiuw1.js} +1 -1
  12. package/.output/public/_nuxt/DXeEovpj.js +1 -0
  13. package/.output/public/_nuxt/{B7LxQ0TU.js → DYmVuetx.js} +1 -1
  14. package/.output/public/_nuxt/builds/latest.json +1 -1
  15. package/.output/public/_nuxt/builds/meta/49ff9598-e142-4df6-bb2c-e8c36d984a47.json +1 -0
  16. package/.output/public/_nuxt/wza-2j7w.js +1 -0
  17. package/.output/server/chunks/build/client.precomputed.mjs +1 -1
  18. package/.output/server/chunks/build/client.precomputed.mjs.map +1 -1
  19. package/.output/server/chunks/nitro/nitro.mjs +663 -663
  20. package/.output/server/package.json +1 -1
  21. package/package.json +1 -1
  22. package/.output/public/_nuxt/BGeGoN6B.js +0 -1
  23. package/.output/public/_nuxt/BfgZhXjw.js +0 -1
  24. package/.output/public/_nuxt/CJ55Om3p.js +0 -1
  25. package/.output/public/_nuxt/CnqXL3nu.js +0 -1
  26. package/.output/public/_nuxt/builds/meta/5567f874-e186-4cd9-ae4c-1a9a207c8045.json +0 -1
@@ -0,0 +1 @@
1
+ import{a as H,aa as C,ab as U,X as A,ac as W,O as T,ad as G,k as M,ae as J,af as X,g as Z,s as N,Z as Q,ag as Y,G as K,ah as ee,ai as te,aj as F,d as ae,y as g,z as p,A as _,B as w,K as S,I as V,J as I,L as k,E as se}from"./CE5wWE6n.js";import{k as re}from"./DVcuiuw1.js";const ne={trailing:!0};function oe(e,a=25,l={}){if(l={...ne,...l},!Number.isFinite(a))throw new TypeError("Expected `wait` to be a finite number");let c,r,y=[],s,t;const h=(d,u)=>(s=ie(e,d,u),s.finally(()=>{if(s=null,l.trailing&&t&&!r){const b=h(d,t);return t=null,b}}),s),D=function(...d){return l.trailing&&(t=d),s||new Promise(u=>{const b=!r&&l.leading;clearTimeout(r),r=setTimeout(()=>{r=null;const n=l.leading?c:h(this,d);t=null;for(const i of y)i(n);y=[]},a),b?(c=h(this,d),u(c)):y.push(u)})},o=d=>{d&&(clearTimeout(d),r=null)};return D.isPending=()=>!!r,D.cancel=()=>{o(r),y=[],t=null},D.flush=()=>{if(o(r),!t||s)return;const d=t;return t=null,h(this,d)},D}async function ie(e,a,l){return await e.apply(a,l)}const le=Symbol.for("nuxt:client-only"),ce=e=>e==="defer"||e===!1;function $e(...e){const a=typeof e[e.length-1]=="string"?e.pop():void 0;ue(e[0],e[1])&&e.unshift(a);let[l,c,r={}]=e,y=!1;const s=M(()=>te(l));if(typeof s.value!="string")throw new TypeError("[nuxt] [useAsyncData] key must be a string.");if(typeof c!="function")throw new TypeError("[nuxt] [useAsyncData] handler must be a function.");const t=H();r.server??=!0,r.default??=fe,r.getCachedData??=j,r.lazy??=!1,r.immediate??=!0,r.deep??=C.deep,r.dedupe??="cancel",r._functionName,t._asyncData[s.value];function h(){const n={cause:"initial",dedupe:r.dedupe};return t._asyncData[s.value]?._init||(n.cachedData=r.getCachedData(s.value,t,{cause:"initial"}),t._asyncData[s.value]=q(t,s.value,c,r,n.cachedData)),()=>t._asyncData[s.value].execute(n)}const D=h(),o=t._asyncData[s.value];o._deps++;const d=r.server!==!1&&t.payload.serverRendered;{let n=function(m){const f=t._asyncData[m];f?._deps&&(f._deps--,f._deps===0&&f?._off())};const i=J();if(i&&d&&r.immediate&&!i.sp&&(i.sp=[]),i&&!i._nuxtOnBeforeMountCbs){i._nuxtOnBeforeMountCbs=[];const m=i._nuxtOnBeforeMountCbs;U(()=>{m.forEach(f=>{f()}),m.splice(0,m.length)}),A(()=>m.splice(0,m.length))}const P=i&&(i._nuxtClientOnly||W(le,!1));d&&t.isHydrating&&(o.error.value||o.data.value!=null)?(o.pending.value=!1,o.status.value=o.error.value?"error":"success"):i&&(!P&&t.payload.serverRendered&&t.isHydrating||r.lazy)&&r.immediate?i._nuxtOnBeforeMountCbs.push(D):r.immediate&&D();const v=X(),x=T(s,(m,f)=>{if((m||f)&&m!==f){y=!0;const R=t._asyncData[f]?.data.value!==C.value,z=t._asyncDataPromises[f]!==void 0,L={cause:"initial",dedupe:r.dedupe};if(!t._asyncData[m]?._init){let O;f&&R?O=t._asyncData[f].data.value:(O=r.getCachedData(m,t,{cause:"initial"}),L.cachedData=O),t._asyncData[m]=q(t,m,c,r,O)}t._asyncData[m]._deps++,f&&n(f),(r.immediate||R||z)&&t._asyncData[m].execute(L),F(()=>{y=!1})}},{flush:"sync"}),E=r.watch?T(r.watch,()=>{y||(t._asyncData[s.value]?._execute.isPending()&&F(()=>{t._asyncData[s.value]?._execute.flush()}),t._asyncData[s.value]?._execute({cause:"watch",dedupe:r.dedupe}))}):()=>{};v&&G(()=>{x(),E(),n(s.value)})}const u={data:B(()=>t._asyncData[s.value]?.data),pending:B(()=>t._asyncData[s.value]?.pending),status:B(()=>t._asyncData[s.value]?.status),error:B(()=>t._asyncData[s.value]?.error),refresh:(...n)=>t._asyncData[s.value]?._init?t._asyncData[s.value].execute(...n):h()(),execute:(...n)=>u.refresh(...n),clear:()=>{const n=t._asyncData[s.value];if(n?._abortController)try{n._abortController.abort(new DOMException("AsyncData aborted by user.","AbortError"))}finally{n._abortController=void 0}$(t,s.value)}},b=Promise.resolve(t._asyncDataPromises[s.value]).then(()=>u);return Object.assign(b,u),b}function B(e){return M({get(){return e()?.value},set(a){const l=e();l&&(l.value=a)}})}function ue(e,a){return!(typeof e=="string"||typeof e=="object"&&e!==null||typeof e=="function"&&typeof a=="function")}function $(e,a){a in e.payload.data&&(e.payload.data[a]=void 0),a in e.payload._errors&&(e.payload._errors[a]=C.errorValue),e._asyncData[a]&&(e._asyncData[a].data.value=void 0,e._asyncData[a].error.value=C.errorValue,e._asyncData[a].pending.value=!1,e._asyncData[a].status.value="idle"),a in e._asyncDataPromises&&(e._asyncDataPromises[a]=void 0)}function de(e,a){const l={};for(const c of a)l[c]=e[c];return l}function q(e,a,l,c,r){e.payload._errors[a]??=C.errorValue;const y=c.getCachedData!==j,s=l,t=c.deep?Z:N,h=r!=null,D=e.hook("app:data:refresh",async d=>{(!d||d.includes(a))&&await o.execute({cause:"refresh:hook"})}),o={data:t(h?r:c.default()),pending:N(!h),error:ee(e.payload._errors,a),status:N("idle"),execute:(...d)=>{const[u,b=void 0]=d,n=u&&b===void 0&&typeof u=="object"?u:{};if(e._asyncDataPromises[a]&&ce(n.dedupe??c.dedupe))return e._asyncDataPromises[a];if(n.cause==="initial"||e.isHydrating){const v="cachedData"in n?n.cachedData:c.getCachedData(a,e,{cause:n.cause??"refresh:manual"});if(v!=null)return e.payload.data[a]=o.data.value=v,o.error.value=C.errorValue,o.status.value="success",Promise.resolve(v)}o.pending.value=!0,o._abortController&&o._abortController.abort(new DOMException("AsyncData request cancelled by deduplication","AbortError")),o._abortController=new AbortController,o.status.value="pending";const i=new AbortController,P=new Promise((v,x)=>{try{const E=n.timeout??c.timeout,m=me([o._abortController?.signal,n?.signal],i.signal,E);if(m.aborted){const f=m.reason;x(f instanceof Error?f:new DOMException(String(f??"Aborted"),"AbortError"));return}return m.addEventListener("abort",()=>{const f=m.reason;x(f instanceof Error?f:new DOMException(String(f??"Aborted"),"AbortError"))},{once:!0,signal:i.signal}),Promise.resolve(s(e,{signal:m})).then(v,x)}catch(E){x(E)}}).then(async v=>{let x=v;c.transform&&(x=await c.transform(v)),c.pick&&(x=de(x,c.pick)),e.payload.data[a]=x,o.data.value=x,o.error.value=C.errorValue,o.status.value="success"}).catch(v=>{if(e._asyncDataPromises[a]&&e._asyncDataPromises[a]!==P||o._abortController?.signal.aborted)return e._asyncDataPromises[a];if(typeof DOMException<"u"&&v instanceof DOMException&&v.name==="AbortError")return o.status.value="idle",e._asyncDataPromises[a];o.error.value=Y(v),o.data.value=K(c.default()),o.status.value="error"}).finally(()=>{o.pending.value=!1,i.abort(),delete e._asyncDataPromises[a]});return e._asyncDataPromises[a]=P,e._asyncDataPromises[a]},_execute:oe((...d)=>o.execute(...d),0,{leading:!0}),_default:c.default,_deps:0,_init:!0,_hash:void 0,_off:()=>{D(),e._asyncData[a]?._init&&(e._asyncData[a]._init=!1),y||Q(()=>{e._asyncData[a]?._init||($(e,a),o.execute=()=>Promise.resolve(),o.data.value=C.value)})}};return o}const fe=()=>C.value,j=(e,a,l)=>{if(a.isHydrating)return a.payload.data[e];if(l.cause!=="refresh:manual"&&l.cause!=="refresh:hook")return a.static.data[e]};function me(e,a,l){const c=e.filter(s=>!!s);if(typeof l=="number"&&l>=0){const s=AbortSignal.timeout?.(l);s&&c.push(s)}if(AbortSignal.any)return AbortSignal.any(c);const r=new AbortController;for(const s of c)if(s.aborted){const t=s.reason??new DOMException("Aborted","AbortError");try{r.abort(t)}catch{r.abort()}return r.signal}const y=()=>{const t=c.find(h=>h.aborted)?.reason??new DOMException("Aborted","AbortError");try{r.abort(t)}catch{r.abort()}};for(const s of c)s.addEventListener?.("abort",y,{once:!0,signal:a});return r.signal}const be={class:"space-y-3"},ye={key:0,class:"rounded border border-retro-border bg-retro-panel px-4 py-3"},_e={key:1,class:"rounded border border-retro-border bg-retro-panel px-4 py-3"},he={class:"text-xs font-mono text-retro-yellow"},ge={key:2,class:"rounded border border-retro-border bg-retro-panel px-4 py-3"},pe={key:3,class:"space-y-4"},ve={key:0,class:"text-xs font-mono text-retro-muted"},De={key:1,class:"text-xs font-mono text-retro-muted"},xe={class:"flex flex-col gap-2"},Ce={class:"flex flex-col gap-2"},we={class:"flex items-start justify-between gap-3"},Pe={class:"text-sm font-mono text-retro-text"},Ee={key:0,class:"text-xs font-mono text-retro-yellow"},Se={key:1,class:"text-xs font-mono text-retro-yellow"},Me={class:"text-xs text-retro-muted leading-tight"},Oe={class:"flex flex-wrap gap-2"},ke={key:0,class:"text-xs font-mono text-retro-yellow"},Be={class:"space-y-1.5"},Ne=["value","checked","disabled","onChange"],Ve={class:"flex-1 space-y-0.5"},Ie={class:"flex items-center gap-2"},Re={class:"text-sm font-mono text-retro-text"},Le={key:0,class:"text-[0.55rem] font-mono uppercase tracking-[0.25em] text-retro-cyan border border-retro-cyan rounded-full px-2 py-0.5"},Te={class:"text-xs text-retro-muted leading-tight"},je=ae({__name:"ProviderSelector",props:{providers:{},selected:{},permissionMode:{},pending:{type:Boolean},errorMessage:{}},emits:["select"],setup(e,{emit:a}){const l=e,c=a,r=[{key:"streaming",label:"Streaming"},{key:"permissions",label:"Permissions"},{key:"resume",label:"Session Resume"},{key:"autoCommit",label:"Auto Commit"}],y=M(()=>l.permissionMode==="ask"||l.permissionMode==="plan"),s=M(()=>re[l.permissionMode]),t=M(()=>!0);function h(u){const b=!y.value||u.capabilities.permissions,n=!t.value||u.capabilities.streaming;return b&&n}function D(u){return y.value&&!u.capabilities.permissions?`${u.name} cannot be used with ${s.value} because it does not expose permission prompts.`:t.value&&!u.capabilities.streaming?`${u.name} is unavailable because streaming runtime prerequisites are not satisfied.`:null}function o(u,b){h(u)&&c("select",{providerId:u.id,modelKey:b})}function d(u,b){return l.selected.providerId===u&&l.selected.modelKey===b}return(u,b)=>(g(),p("div",be,[e.pending?(g(),p("div",ye,[...b[0]||(b[0]=[_("p",{class:"text-xs font-mono text-retro-text"},"Loading providers…",-1)])])):e.errorMessage?(g(),p("div",_e,[_("p",he,"Unable to load providers: "+w(e.errorMessage),1)])):e.providers.length===0?(g(),p("div",ge,[...b[1]||(b[1]=[_("p",{class:"text-xs font-mono text-retro-muted"},"No AI providers are configured on the server. Check with your administrator.",-1)])])):(g(),p("div",pe,[y.value?(g(),p("p",ve," Permission mode "+w(s.value)+" requires a provider that supports permission prompts. Incompatible providers are disabled. ",1)):S("",!0),t.value?(g(),p("p",De," Chat currently requires a provider with streaming support. Providers without streaming are shown for preparation but disabled. ")):S("",!0),(g(!0),p(V,null,I(e.providers,n=>(g(),p("article",{key:n.id,class:k(["rounded border border-retro-border bg-retro-panel p-4 space-y-3 transition",{"border-retro-cyan bg-retro-cyan/5":e.selected.providerId===n.id,"hover:border-retro-muted":e.selected.providerId!==n.id}])},[_("div",xe,[_("div",Ce,[_("div",we,[_("span",Pe,w(n.name),1),y.value&&!n.capabilities.permissions?(g(),p("div",Ee," Permissions missing ")):t.value&&!n.capabilities.streaming?(g(),p("div",Se," Streaming missing ")):S("",!0)]),_("p",Me,w(n.description),1),_("div",Oe,[(g(),p(V,null,I(r,i=>_("span",{key:i.key,class:k(["inline-flex items-center gap-1.5 rounded-full border px-2.5 py-0.5 text-[0.6rem] font-mono uppercase tracking-[0.18em]",n.capabilities[i.key]?"border-retro-cyan/70 text-retro-cyan bg-retro-cyan/10":"border-retro-border text-retro-muted bg-retro-dark/60"])},[_("span",{class:k(["h-1.5 w-1.5 rounded-full",n.capabilities[i.key]?"bg-retro-cyan":"bg-retro-muted"])},null,2),se(" "+w(i.label),1)],2)),64))])])]),D(n)?(g(),p("p",ke,w(D(n)),1)):S("",!0),_("div",Be,[(g(!0),p(V,null,I(n.models,i=>(g(),p("label",{key:i.key,class:k(["flex items-start gap-3 px-3 py-2 rounded border cursor-pointer transition-colors",[d(n.id,i.key)?"border-retro-cyan bg-retro-cyan/10":"border-retro-border bg-retro-panel hover:border-retro-muted",h(n)?"":"opacity-60 cursor-not-allowed"]])},[_("input",{type:"radio",name:"provider-model",value:`${n.id}:${i.key}`,checked:d(n.id,i.key),disabled:!h(n),class:"mt-1 h-3.5 w-3.5 text-retro-cyan accent-retro-cyan",onChange:P=>o(n,i.key)},null,40,Ne),_("div",Ve,[_("div",Ie,[_("span",Re,w(i.label),1),i.default?(g(),p("span",Le," Default ")):S("",!0)]),_("p",Te,w(i.description),1)])],2))),128))])],2))),128))]))]))}});export{je as _,$e as u};
@@ -1 +1 @@
1
- import{_ as s}from"./DlAUqK2U.js";import{x as i,y as a,z as u,A as e,B as o}from"./B4NAMCh5.js";const l={class:"antialiased bg-white dark:bg-black dark:text-white font-sans grid min-h-screen overflow-hidden place-content-center text-black"},c={class:"max-w-520px text-center"},d=["textContent"],p=["textContent"],f={__name:"error-500",props:{appName:{type:String,default:"Nuxt"},version:{type:String,default:""},status:{type:Number,default:500},statusText:{type:String,default:"Server error"},description:{type:String,default:"This page is temporarily unavailable."}},setup(t){const r=t;return i({title:`${r.status} - ${r.statusText} | ${r.appName}`,script:[{innerHTML:`!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))r(e);new MutationObserver(e=>{for(const o of e)if("childList"===o.type)for(const e of o.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&r(e)}).observe(document,{childList:!0,subtree:!0})}function r(e){if(e.ep)return;e.ep=!0;const r=function(e){const r={};return e.integrity&&(r.integrity=e.integrity),e.referrerPolicy&&(r.referrerPolicy=e.referrerPolicy),"use-credentials"===e.crossOrigin?r.credentials="include":"anonymous"===e.crossOrigin?r.credentials="omit":r.credentials="same-origin",r}(e);fetch(e.href,r)}}();`}],style:[{innerHTML:'*,:after,:before{border-color:var(--un-default-border-color,#e5e7eb);border-style:solid;border-width:0;box-sizing:border-box}:after,:before{--un-content:""}html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{line-height:inherit;margin:0}h1{font-size:inherit;font-weight:inherit}h1,p{margin:0}*,:after,:before{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 transparent;--un-ring-shadow:0 0 transparent;--un-shadow-inset: ;--un-shadow:0 0 transparent;--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgba(147,197,253,.5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }'}]}),(g,n)=>(a(),u("div",l,[n[0]||(n[0]=e("div",{class:"-bottom-1/2 fixed h-1/2 left-0 right-0 spotlight"},null,-1)),e("div",c,[e("h1",{class:"font-medium mb-8 sm:text-10xl text-8xl",textContent:o(t.status)},null,8,d),e("p",{class:"font-light leading-tight mb-16 px-8 sm:px-0 sm:text-4xl text-xl",textContent:o(t.description)},null,8,p)])]))}},b=s(f,[["__scopeId","data-v-6dec408c"]]);export{b as default};
1
+ import{_ as s}from"./DlAUqK2U.js";import{x as i,y as a,z as u,A as e,B as o}from"./CE5wWE6n.js";const l={class:"antialiased bg-white dark:bg-black dark:text-white font-sans grid min-h-screen overflow-hidden place-content-center text-black"},c={class:"max-w-520px text-center"},d=["textContent"],p=["textContent"],f={__name:"error-500",props:{appName:{type:String,default:"Nuxt"},version:{type:String,default:""},status:{type:Number,default:500},statusText:{type:String,default:"Server error"},description:{type:String,default:"This page is temporarily unavailable."}},setup(t){const r=t;return i({title:`${r.status} - ${r.statusText} | ${r.appName}`,script:[{innerHTML:`!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))r(e);new MutationObserver(e=>{for(const o of e)if("childList"===o.type)for(const e of o.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&r(e)}).observe(document,{childList:!0,subtree:!0})}function r(e){if(e.ep)return;e.ep=!0;const r=function(e){const r={};return e.integrity&&(r.integrity=e.integrity),e.referrerPolicy&&(r.referrerPolicy=e.referrerPolicy),"use-credentials"===e.crossOrigin?r.credentials="include":"anonymous"===e.crossOrigin?r.credentials="omit":r.credentials="same-origin",r}(e);fetch(e.href,r)}}();`}],style:[{innerHTML:'*,:after,:before{border-color:var(--un-default-border-color,#e5e7eb);border-style:solid;border-width:0;box-sizing:border-box}:after,:before{--un-content:""}html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{line-height:inherit;margin:0}h1{font-size:inherit;font-weight:inherit}h1,p{margin:0}*,:after,:before{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 transparent;--un-ring-shadow:0 0 transparent;--un-shadow-inset: ;--un-shadow:0 0 transparent;--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgba(147,197,253,.5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }'}]}),(g,n)=>(a(),u("div",l,[n[0]||(n[0]=e("div",{class:"-bottom-1/2 fixed h-1/2 left-0 right-0 spotlight"},null,-1)),e("div",c,[e("h1",{class:"font-medium mb-8 sm:text-10xl text-8xl",textContent:o(t.status)},null,8,d),e("p",{class:"font-light leading-tight mb-16 px-8 sm:px-0 sm:text-4xl text-xl",textContent:o(t.description)},null,8,p)])]))}},b=s(f,[["__scopeId","data-v-6dec408c"]]);export{b as default};
@@ -0,0 +1 @@
1
+ import{y as e,z as r,A as o}from"./CE5wWE6n.js";function i(t,n){return e(),r("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[o("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99"})])}function s(t,n){return e(),r("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[o("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 4.5v15m7.5-7.5h-15"})])}function c(t,n){return e(),r("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[o("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0"})])}function d(t,n){return e(),r("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[o("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18 18 6M6 6l12 12"})])}export{i as a,s as b,c,d as r};
@@ -1,4 +1,4 @@
1
- import{y as h,z as m,A as d,d as xe,L as ne,P as _e,Q as lr,S as cr,U as wn,B as E,K as C,C as we,G as c,g as Ne,k as y,H as re,I as he,J as Oe,N as Ht,E as Ze,V as ur}from"./B4NAMCh5.js";import{a as pr,m as hr,u as dr}from"./D8F4N5Iq.js";import{_ as fr}from"./DlAUqK2U.js";function mr(t,e){return h(),m("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[d("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m20.25 7.5-.625 10.632a2.25 2.25 0 0 1-2.247 2.118H6.622a2.25 2.25 0 0 1-2.247-2.118L3.75 7.5M10 11.25h4M3.375 7.5h17.25c.621 0 1.125-.504 1.125-1.125v-1.5c0-.621-.504-1.125-1.125-1.125H3.375c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125Z"})])}function gr(t,e){return h(),m("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[d("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M9 12.75 11.25 15 15 9.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"})])}function Gt(t,e){return h(),m("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[d("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m8.25 4.5 7.5 7.5-7.5 7.5"})])}function Pn(t,e){return h(),m("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[d("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 6v6h4.5m4.5 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"})])}function yn(t,e){return h(),m("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[d("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M17.25 6.75 22.5 12l-5.25 5.25m-10.5 0L1.5 12l5.25-5.25m7.5-3-4.5 16.5"})])}function kr(t,e){return h(),m("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[d("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M8.25 3v1.5M4.5 8.25H3m18 0h-1.5M4.5 12H3m18 0h-1.5m-15 3.75H3m18 0h-1.5M8.25 19.5V21M12 3v1.5m0 15V21m3.75-18v1.5m0 15V21m-9-1.5h10.5a2.25 2.25 0 0 0 2.25-2.25V6.75a2.25 2.25 0 0 0-2.25-2.25H6.75A2.25 2.25 0 0 0 4.5 6.75v10.5a2.25 2.25 0 0 0 2.25 2.25Zm.75-12h9v9h-9v-9Z"})])}function xr(t,e){return h(),m("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[d("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 9v3.75m9-.75a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9 3.75h.008v.008H12v-.008Z"})])}function br(t,e){return h(),m("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[d("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M2.25 12.75V12A2.25 2.25 0 0 1 4.5 9.75h15A2.25 2.25 0 0 1 21.75 12v.75m-8.69-6.44-2.12-2.12a1.5 1.5 0 0 0-1.061-.44H4.5A2.25 2.25 0 0 0 2.25 6v12a2.25 2.25 0 0 0 2.25 2.25h15A2.25 2.25 0 0 0 21.75 18V9a2.25 2.25 0 0 0-2.25-2.25h-5.379a1.5 1.5 0 0 1-1.06-.44Z"})])}function ci(t,e){return h(),m("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[d("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M21.752 15.002A9.72 9.72 0 0 1 18 15.75c-5.385 0-9.75-4.365-9.75-9.75 0-1.33.266-2.597.748-3.752A9.753 9.753 0 0 0 3 11.25C3 16.635 7.365 21 12.75 21a9.753 9.753 0 0 0 9.002-5.998Z"})])}function wr(t,e){return h(),m("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[d("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m16.862 4.487 1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L6.832 19.82a4.5 4.5 0 0 1-1.897 1.13l-2.685.8.8-2.685a4.5 4.5 0 0 1 1.13-1.897L16.863 4.487Zm0 0L19.5 7.125"})])}function ui(t,e){return h(),m("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[d("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 3v2.25m6.364.386-1.591 1.591M21 12h-2.25m-.386 6.364-1.591-1.591M12 18.75V21m-4.773-4.227-1.591 1.591M5.25 12H3m4.227-4.773L5.636 5.636M15.75 12a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0Z"})])}function yr(t,e){return h(),m("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[d("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15.75 6a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0ZM4.501 20.118a7.5 7.5 0 0 1 14.998 0A17.933 17.933 0 0 1 12 21.75c-2.676 0-5.216-.584-7.499-1.632Z"})])}function vn(t){if(typeof document>"u"||!document.body)throw new Error("Clipboard is unavailable in this environment");const e=document.createElement("textarea"),n=document.activeElement instanceof HTMLElement?document.activeElement:null;e.value=t,e.setAttribute("readonly",""),e.setAttribute("aria-hidden","true"),e.style.position="fixed",e.style.top="0",e.style.left="-9999px",e.style.opacity="0",document.body.appendChild(e);try{if(e.focus(),e.select(),e.setSelectionRange(0,e.value.length),!(typeof document.execCommand=="function"&&document.execCommand("copy")))throw new Error("Failed to copy to clipboard")}finally{document.body.removeChild(e),n?.focus()}}async function vr(t){if(typeof navigator<"u"&&navigator.clipboard?.writeText)try{await navigator.clipboard.writeText(t);return}catch{vn(t);return}vn(t)}const Tr={class:"flex items-start justify-between gap-2"},_r={class:"flex-1 min-w-0"},Ar={key:1,class:"flex items-center gap-2"},Sr={class:"text-sm font-mono text-retro-text truncate"},Er={key:0,class:"text-xs font-mono text-retro-green bg-retro-green/10 px-1.5 py-0.5 rounded flex-shrink-0"},Rr={key:2,class:"text-xs font-mono text-retro-cyan bg-retro-cyan/10 px-1.5 py-0.5 rounded border border-retro-cyan/30 flex-shrink-0"},Cr={class:"text-xs text-retro-muted mt-1 truncate"},Lr={class:"text-xs text-retro-muted/60 mt-1"},$r={class:"truncate"},Ir={class:"truncate"},Mr={class:"truncate"},Dr=xe({__name:"ConversationItem",props:{conversation:{},isActive:{type:Boolean},isStreaming:{type:Boolean},isPreviewing:{type:Boolean}},emits:["select","archive","rename"],setup(t,{emit:e}){const n=t,s=e,r=Ne(!1),i=Ne("");function a(){i.value=n.conversation.title,r.value=!0}function l(){const A=i.value.trim();A&&A!==n.conversation.title&&s("rename",A),r.value=!1}function f(){r.value=!1}const u=pr();async function T(A){try{await vr(A),u.success("Copied to clipboard",1500)}catch{u.error("Failed to copy")}}const S=y(()=>{const A=n.conversation.messages;if(!A.length)return"No messages";const x=A[A.length-1],$=x.content.slice(0,60);return $.length<x.content.length?$+"...":$}),_=y(()=>{const A=new Date(n.conversation.updatedAt),$=new Date().getTime()-A.getTime(),ee=Math.floor($/(1e3*60*60*24));return ee===0?A.toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit"}):ee===1?"Yesterday":ee<7?`${ee} days ago`:A.toLocaleDateString()});return(A,x)=>(h(),m("div",{class:ne(["p-3 rounded border cursor-pointer transition-colors",[t.isPreviewing&&t.isActive?"border-retro-magenta bg-retro-magenta/15 ring-1 ring-retro-magenta/40":t.isPreviewing?"border-retro-magenta/40 bg-retro-magenta/5":t.isActive?"border-retro-cyan/80 bg-retro-cyan/8":"border-retro-border hover:border-retro-cyan/40",t.isStreaming&&t.isPreviewing&&t.isActive?"streaming-preview-active-border":t.isStreaming&&t.isPreviewing?"streaming-preview-border":t.isStreaming&&t.isActive?"streaming-active-border":t.isStreaming?"streaming-border":"",t.conversation.finalized?"opacity-50":""]]),onClick:x[8]||(x[8]=$=>s("select"))},[d("div",Tr,[d("div",_r,[r.value?(h(),m("div",{key:0,class:"flex gap-2",onClick:x[1]||(x[1]=_e(()=>{},["stop"]))},[lr(d("input",{"onUpdate:modelValue":x[0]||(x[0]=$=>i.value=$),onKeyup:[wn(l,["enter"]),wn(f,["escape"])],onBlur:l,class:"flex-1 px-2 py-1 text-sm font-mono bg-retro-black border border-retro-cyan rounded text-retro-text focus:outline-none focus:ring-1 focus:ring-retro-cyan",autofocus:""},null,544),[[cr,i.value]])])):(h(),m("div",Ar,[d("h3",Sr,E(t.conversation.title),1),t.conversation.finalized?(h(),m("span",Er," finalized ")):t.isPreviewing?(h(),m("span",{key:1,class:ne(["text-xs font-mono px-1.5 py-0.5 rounded border border-retro-magenta/30 flex-shrink-0",t.isActive?"text-retro-magenta bg-retro-magenta/15":"text-retro-magenta/80 bg-retro-magenta/5"])}," previewing ",2)):C("",!0),t.isStreaming?(h(),m("span",Rr," streaming ")):C("",!0)])),d("p",Cr,E(S.value),1),d("p",Lr,E(_.value),1),t.conversation.worktreeBranch||t.conversation.baseBranch?(h(),m("div",{key:2,class:"mt-1.5 flex flex-wrap gap-1",onClick:x[5]||(x[5]=_e(()=>{},["stop"]))},[t.conversation.baseBranch?(h(),m("button",{key:0,onClick:x[2]||(x[2]=$=>T(t.conversation.baseBranch)),class:"inline-flex items-center gap-1 px-1.5 py-0.5 text-xs font-mono rounded border border-retro-cyan/30 text-retro-cyan hover:border-retro-cyan hover:bg-retro-cyan/10 transition-colors max-w-full",title:"Click to copy base branch"},[we(c(yn),{class:"w-3 h-3 flex-shrink-0"}),d("span",$r,"base: "+E(t.conversation.baseBranch),1)])):C("",!0),d("button",{onClick:x[3]||(x[3]=$=>T(t.conversation.worktreeBranch)),class:"inline-flex items-center gap-1 px-1.5 py-0.5 text-xs font-mono rounded border border-retro-green/30 text-retro-green hover:border-retro-green hover:bg-retro-green/10 transition-colors max-w-full",title:"Click to copy branch"},[we(c(yn),{class:"w-3 h-3 flex-shrink-0"}),d("span",Ir,E(t.conversation.worktreeBranch),1)]),t.conversation.worktreePath?(h(),m("button",{key:1,onClick:x[4]||(x[4]=$=>T(t.conversation.worktreePath)),class:"inline-flex items-center gap-1 px-1.5 py-0.5 text-xs font-mono rounded border border-retro-muted/30 text-retro-muted hover:border-retro-muted hover:bg-retro-muted/10 transition-colors max-w-full",title:"Click to copy path"},[we(c(br),{class:"w-3 h-3 flex-shrink-0"}),d("span",Mr,E(t.conversation.worktreePath),1)])):C("",!0)])):C("",!0)]),d("div",{class:"flex gap-1 flex-shrink-0",onClick:x[7]||(x[7]=_e(()=>{},["stop"]))},[d("button",{onClick:a,class:"p-1 hover:bg-retro-panel rounded transition-colors",title:"Rename conversation"},[we(c(wr),{class:"w-4 h-4 text-retro-muted hover:text-retro-cyan"})]),d("button",{onClick:x[6]||(x[6]=$=>s("archive")),class:"p-1 hover:bg-retro-cyan/20 rounded transition-colors",title:"Archive conversation"},[we(c(mr),{class:"w-4 h-4 text-retro-muted hover:text-retro-cyan"})])])])],2))}}),pi=fr(Dr,[["__scopeId","data-v-64e8df74"]]),Or={key:0,class:"h-3 w-3 flex-shrink-0 rounded-full border-2 border-retro-yellow border-t-transparent animate-spin"},Nr={key:2,class:"h-2 w-2 flex-shrink-0 rounded-full bg-retro-muted/70"},Pr={class:"text-retro-muted"},zr={class:"truncate text-retro-muted"},Br={key:3,class:"hidden flex-shrink-0 text-retro-muted/70 sm:inline"},Ur={key:0,class:"space-y-1 border-t border-retro-border/20 px-3 pb-2 pt-2"},Fr={class:"min-w-14 flex-shrink-0"},Hr={class:"flex-shrink-0 text-retro-cyan"},Gr={class:"break-all"},Wr=xe({__name:"ChatToolGroupSummary",props:{tools:{}},setup(t){const e=t,n=Ne(!1),s=y(()=>e.tools.filter(S=>S.status==="running").length),r=y(()=>e.tools.filter(S=>S.status==="pending").length),i=y(()=>e.tools.filter(S=>S.status==="complete").length),a=y(()=>[...e.tools].reverse().find(S=>S.status!=="complete")??e.tools[e.tools.length-1]);function l(S){const _=S.inputSummary.trim();return _?`${S.name} ${_}`:S.name}const f=y(()=>{const S=a.value;if(!S)return"Tools";const _=l(S);return e.tools.length===1?_:s.value>0||r.value>0?`${e.tools.length} tools · latest ${_}`:`${e.tools.length} tools · ${_}`}),u=y(()=>s.value>0?"[RUN]":r.value>0?"[WAIT]":"[TOOLS]"),T=y(()=>s.value>0||r.value>0);return(S,_)=>(h(),m("div",{class:ne(["my-2 rounded border",c(T)?"border-retro-border/40 bg-retro-dark/30":"border-retro-border/20 bg-retro-panel/20"]),"data-testid":"tool-group-summary"},[d("button",{class:"flex w-full items-center gap-2 px-3 py-2 text-left text-xs font-mono transition-colors hover:bg-retro-dark/30",onClick:_[0]||(_[0]=A=>n.value=!c(n))},[c(s)>0?(h(),m("span",Or)):c(r)>0?(h(),re(c(Pn),{key:1,class:"h-3.5 w-3.5 flex-shrink-0 animate-pulse text-retro-muted"})):(h(),m("span",Nr)),d("span",Pr,E(c(u)),1),_[1]||(_[1]=d("span",{class:"font-bold text-retro-cyan"},"Tools",-1)),d("span",zr,E(c(f)),1),c(T)&&c(i)>0?(h(),m("span",Br," · "+E(c(i))+" done ",1)):C("",!0),we(c(Gt),{class:ne(["ml-auto h-3 w-3 flex-shrink-0 text-retro-muted transition-transform",{"rotate-90":c(n)}])},null,8,["class"])]),c(n)?(h(),m("div",Ur,[(h(!0),m(he,null,Oe(t.tools,A=>(h(),m("div",{key:A.id,class:"flex items-start gap-2 text-xs font-mono text-retro-muted"},[d("span",Fr,E(A.status==="running"?"[RUN]":A.status==="pending"?"[WAIT]":"[OK]"),1),d("span",Hr,E(A.name),1),d("span",Gr,E(A.inputSummary||"No summary available"),1)]))),128))])):C("",!0)],2))}});function Wt(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Se=Wt();function zn(t){Se=t}var Ye={exec:()=>null};function I(t,e=""){let n=typeof t=="string"?t:t.source;const s={replace:(r,i)=>{let a=typeof i=="string"?i:i.source;return a=a.replace(X.caret,"$1"),n=n.replace(r,a),s},getRegex:()=>new RegExp(n,e)};return s}var X={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i")},jr=/^(?:[ \t]*(?:\n|$))+/,qr=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Zr=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Ve=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Yr=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,jt=/(?:[*+-]|\d{1,9}[.)])/,Bn=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Un=I(Bn).replace(/bull/g,jt).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Vr=I(Bn).replace(/bull/g,jt).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),qt=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Xr=/^[^\n]+/,Zt=/(?!\s*\])(?:\\.|[^\[\]\\])+/,Qr=I(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Zt).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Kr=I(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,jt).getRegex(),ft="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Yt=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Jr=I("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Yt).replace("tag",ft).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Fn=I(qt).replace("hr",Ve).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ft).getRegex(),es=I(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Fn).getRegex(),Vt={blockquote:es,code:qr,def:Qr,fences:Zr,heading:Yr,hr:Ve,html:Jr,lheading:Un,list:Kr,newline:jr,paragraph:Fn,table:Ye,text:Xr},Tn=I("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Ve).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ft).getRegex(),ts={...Vt,lheading:Vr,table:Tn,paragraph:I(qt).replace("hr",Ve).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Tn).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ft).getRegex()},ns={...Vt,html:I(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Yt).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Ye,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:I(qt).replace("hr",Ve).replace("heading",` *#{1,6} *[^
1
+ import{y as h,z as m,A as d,d as xe,L as ne,Q as _e,R as lr,U as cr,V as wn,B as E,K as C,C as we,G as c,g as Ne,k as y,H as re,I as he,J as Oe,O as Ht,E as Ze,W as ur}from"./CE5wWE6n.js";import{a as pr,m as hr,u as dr}from"./DVcuiuw1.js";import{_ as fr}from"./DlAUqK2U.js";function mr(t,e){return h(),m("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[d("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m20.25 7.5-.625 10.632a2.25 2.25 0 0 1-2.247 2.118H6.622a2.25 2.25 0 0 1-2.247-2.118L3.75 7.5M10 11.25h4M3.375 7.5h17.25c.621 0 1.125-.504 1.125-1.125v-1.5c0-.621-.504-1.125-1.125-1.125H3.375c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125Z"})])}function gr(t,e){return h(),m("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[d("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M9 12.75 11.25 15 15 9.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"})])}function Gt(t,e){return h(),m("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[d("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m8.25 4.5 7.5 7.5-7.5 7.5"})])}function Pn(t,e){return h(),m("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[d("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 6v6h4.5m4.5 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"})])}function yn(t,e){return h(),m("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[d("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M17.25 6.75 22.5 12l-5.25 5.25m-10.5 0L1.5 12l5.25-5.25m7.5-3-4.5 16.5"})])}function kr(t,e){return h(),m("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[d("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M8.25 3v1.5M4.5 8.25H3m18 0h-1.5M4.5 12H3m18 0h-1.5m-15 3.75H3m18 0h-1.5M8.25 19.5V21M12 3v1.5m0 15V21m3.75-18v1.5m0 15V21m-9-1.5h10.5a2.25 2.25 0 0 0 2.25-2.25V6.75a2.25 2.25 0 0 0-2.25-2.25H6.75A2.25 2.25 0 0 0 4.5 6.75v10.5a2.25 2.25 0 0 0 2.25 2.25Zm.75-12h9v9h-9v-9Z"})])}function xr(t,e){return h(),m("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[d("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 9v3.75m9-.75a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9 3.75h.008v.008H12v-.008Z"})])}function br(t,e){return h(),m("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[d("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M2.25 12.75V12A2.25 2.25 0 0 1 4.5 9.75h15A2.25 2.25 0 0 1 21.75 12v.75m-8.69-6.44-2.12-2.12a1.5 1.5 0 0 0-1.061-.44H4.5A2.25 2.25 0 0 0 2.25 6v12a2.25 2.25 0 0 0 2.25 2.25h15A2.25 2.25 0 0 0 21.75 18V9a2.25 2.25 0 0 0-2.25-2.25h-5.379a1.5 1.5 0 0 1-1.06-.44Z"})])}function ci(t,e){return h(),m("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[d("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M21.752 15.002A9.72 9.72 0 0 1 18 15.75c-5.385 0-9.75-4.365-9.75-9.75 0-1.33.266-2.597.748-3.752A9.753 9.753 0 0 0 3 11.25C3 16.635 7.365 21 12.75 21a9.753 9.753 0 0 0 9.002-5.998Z"})])}function wr(t,e){return h(),m("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[d("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m16.862 4.487 1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L6.832 19.82a4.5 4.5 0 0 1-1.897 1.13l-2.685.8.8-2.685a4.5 4.5 0 0 1 1.13-1.897L16.863 4.487Zm0 0L19.5 7.125"})])}function ui(t,e){return h(),m("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[d("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 3v2.25m6.364.386-1.591 1.591M21 12h-2.25m-.386 6.364-1.591-1.591M12 18.75V21m-4.773-4.227-1.591 1.591M5.25 12H3m4.227-4.773L5.636 5.636M15.75 12a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0Z"})])}function yr(t,e){return h(),m("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[d("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15.75 6a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0ZM4.501 20.118a7.5 7.5 0 0 1 14.998 0A17.933 17.933 0 0 1 12 21.75c-2.676 0-5.216-.584-7.499-1.632Z"})])}function vn(t){if(typeof document>"u"||!document.body)throw new Error("Clipboard is unavailable in this environment");const e=document.createElement("textarea"),n=document.activeElement instanceof HTMLElement?document.activeElement:null;e.value=t,e.setAttribute("readonly",""),e.setAttribute("aria-hidden","true"),e.style.position="fixed",e.style.top="0",e.style.left="-9999px",e.style.opacity="0",document.body.appendChild(e);try{if(e.focus(),e.select(),e.setSelectionRange(0,e.value.length),!(typeof document.execCommand=="function"&&document.execCommand("copy")))throw new Error("Failed to copy to clipboard")}finally{document.body.removeChild(e),n?.focus()}}async function vr(t){if(typeof navigator<"u"&&navigator.clipboard?.writeText)try{await navigator.clipboard.writeText(t);return}catch{vn(t);return}vn(t)}const Tr={class:"flex items-start justify-between gap-2"},_r={class:"flex-1 min-w-0"},Ar={key:1,class:"flex items-center gap-2"},Sr={class:"text-sm font-mono text-retro-text truncate"},Er={key:0,class:"text-xs font-mono text-retro-green bg-retro-green/10 px-1.5 py-0.5 rounded flex-shrink-0"},Rr={key:2,class:"text-xs font-mono text-retro-cyan bg-retro-cyan/10 px-1.5 py-0.5 rounded border border-retro-cyan/30 flex-shrink-0"},Cr={class:"text-xs text-retro-muted mt-1 truncate"},Lr={class:"text-xs text-retro-muted/60 mt-1"},$r={class:"truncate"},Ir={class:"truncate"},Mr={class:"truncate"},Dr=xe({__name:"ConversationItem",props:{conversation:{},isActive:{type:Boolean},isStreaming:{type:Boolean},isPreviewing:{type:Boolean}},emits:["select","archive","rename"],setup(t,{emit:e}){const n=t,s=e,r=Ne(!1),i=Ne("");function a(){i.value=n.conversation.title,r.value=!0}function l(){const A=i.value.trim();A&&A!==n.conversation.title&&s("rename",A),r.value=!1}function f(){r.value=!1}const u=pr();async function T(A){try{await vr(A),u.success("Copied to clipboard",1500)}catch{u.error("Failed to copy")}}const S=y(()=>{const A=n.conversation.messages;if(!A.length)return"No messages";const x=A[A.length-1],$=x.content.slice(0,60);return $.length<x.content.length?$+"...":$}),_=y(()=>{const A=new Date(n.conversation.updatedAt),$=new Date().getTime()-A.getTime(),ee=Math.floor($/(1e3*60*60*24));return ee===0?A.toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit"}):ee===1?"Yesterday":ee<7?`${ee} days ago`:A.toLocaleDateString()});return(A,x)=>(h(),m("div",{class:ne(["p-3 rounded border cursor-pointer transition-colors",[t.isPreviewing&&t.isActive?"border-retro-magenta bg-retro-magenta/15 ring-1 ring-retro-magenta/40":t.isPreviewing?"border-retro-magenta/40 bg-retro-magenta/5":t.isActive?"border-retro-cyan/80 bg-retro-cyan/8":"border-retro-border hover:border-retro-cyan/40",t.isStreaming&&t.isPreviewing&&t.isActive?"streaming-preview-active-border":t.isStreaming&&t.isPreviewing?"streaming-preview-border":t.isStreaming&&t.isActive?"streaming-active-border":t.isStreaming?"streaming-border":"",t.conversation.finalized?"opacity-50":""]]),onClick:x[8]||(x[8]=$=>s("select"))},[d("div",Tr,[d("div",_r,[r.value?(h(),m("div",{key:0,class:"flex gap-2",onClick:x[1]||(x[1]=_e(()=>{},["stop"]))},[lr(d("input",{"onUpdate:modelValue":x[0]||(x[0]=$=>i.value=$),onKeyup:[wn(l,["enter"]),wn(f,["escape"])],onBlur:l,class:"flex-1 px-2 py-1 text-sm font-mono bg-retro-black border border-retro-cyan rounded text-retro-text focus:outline-none focus:ring-1 focus:ring-retro-cyan",autofocus:""},null,544),[[cr,i.value]])])):(h(),m("div",Ar,[d("h3",Sr,E(t.conversation.title),1),t.conversation.finalized?(h(),m("span",Er," finalized ")):t.isPreviewing?(h(),m("span",{key:1,class:ne(["text-xs font-mono px-1.5 py-0.5 rounded border border-retro-magenta/30 flex-shrink-0",t.isActive?"text-retro-magenta bg-retro-magenta/15":"text-retro-magenta/80 bg-retro-magenta/5"])}," previewing ",2)):C("",!0),t.isStreaming?(h(),m("span",Rr," streaming ")):C("",!0)])),d("p",Cr,E(S.value),1),d("p",Lr,E(_.value),1),t.conversation.worktreeBranch||t.conversation.baseBranch?(h(),m("div",{key:2,class:"mt-1.5 flex flex-wrap gap-1",onClick:x[5]||(x[5]=_e(()=>{},["stop"]))},[t.conversation.baseBranch?(h(),m("button",{key:0,onClick:x[2]||(x[2]=$=>T(t.conversation.baseBranch)),class:"inline-flex items-center gap-1 px-1.5 py-0.5 text-xs font-mono rounded border border-retro-cyan/30 text-retro-cyan hover:border-retro-cyan hover:bg-retro-cyan/10 transition-colors max-w-full",title:"Click to copy base branch"},[we(c(yn),{class:"w-3 h-3 flex-shrink-0"}),d("span",$r,"base: "+E(t.conversation.baseBranch),1)])):C("",!0),d("button",{onClick:x[3]||(x[3]=$=>T(t.conversation.worktreeBranch)),class:"inline-flex items-center gap-1 px-1.5 py-0.5 text-xs font-mono rounded border border-retro-green/30 text-retro-green hover:border-retro-green hover:bg-retro-green/10 transition-colors max-w-full",title:"Click to copy branch"},[we(c(yn),{class:"w-3 h-3 flex-shrink-0"}),d("span",Ir,E(t.conversation.worktreeBranch),1)]),t.conversation.worktreePath?(h(),m("button",{key:1,onClick:x[4]||(x[4]=$=>T(t.conversation.worktreePath)),class:"inline-flex items-center gap-1 px-1.5 py-0.5 text-xs font-mono rounded border border-retro-muted/30 text-retro-muted hover:border-retro-muted hover:bg-retro-muted/10 transition-colors max-w-full",title:"Click to copy path"},[we(c(br),{class:"w-3 h-3 flex-shrink-0"}),d("span",Mr,E(t.conversation.worktreePath),1)])):C("",!0)])):C("",!0)]),d("div",{class:"flex gap-1 flex-shrink-0",onClick:x[7]||(x[7]=_e(()=>{},["stop"]))},[d("button",{onClick:a,class:"p-1 hover:bg-retro-panel rounded transition-colors",title:"Rename conversation"},[we(c(wr),{class:"w-4 h-4 text-retro-muted hover:text-retro-cyan"})]),d("button",{onClick:x[6]||(x[6]=$=>s("archive")),class:"p-1 hover:bg-retro-cyan/20 rounded transition-colors",title:"Archive conversation"},[we(c(mr),{class:"w-4 h-4 text-retro-muted hover:text-retro-cyan"})])])])],2))}}),pi=fr(Dr,[["__scopeId","data-v-64e8df74"]]),Or={key:0,class:"h-3 w-3 flex-shrink-0 rounded-full border-2 border-retro-yellow border-t-transparent animate-spin"},Nr={key:2,class:"h-2 w-2 flex-shrink-0 rounded-full bg-retro-muted/70"},Pr={class:"text-retro-muted"},zr={class:"truncate text-retro-muted"},Br={key:3,class:"hidden flex-shrink-0 text-retro-muted/70 sm:inline"},Ur={key:0,class:"space-y-1 border-t border-retro-border/20 px-3 pb-2 pt-2"},Fr={class:"min-w-14 flex-shrink-0"},Hr={class:"flex-shrink-0 text-retro-cyan"},Gr={class:"break-all"},Wr=xe({__name:"ChatToolGroupSummary",props:{tools:{}},setup(t){const e=t,n=Ne(!1),s=y(()=>e.tools.filter(S=>S.status==="running").length),r=y(()=>e.tools.filter(S=>S.status==="pending").length),i=y(()=>e.tools.filter(S=>S.status==="complete").length),a=y(()=>[...e.tools].reverse().find(S=>S.status!=="complete")??e.tools[e.tools.length-1]);function l(S){const _=S.inputSummary.trim();return _?`${S.name} ${_}`:S.name}const f=y(()=>{const S=a.value;if(!S)return"Tools";const _=l(S);return e.tools.length===1?_:s.value>0||r.value>0?`${e.tools.length} tools · latest ${_}`:`${e.tools.length} tools · ${_}`}),u=y(()=>s.value>0?"[RUN]":r.value>0?"[WAIT]":"[TOOLS]"),T=y(()=>s.value>0||r.value>0);return(S,_)=>(h(),m("div",{class:ne(["my-2 rounded border",c(T)?"border-retro-border/40 bg-retro-dark/30":"border-retro-border/20 bg-retro-panel/20"]),"data-testid":"tool-group-summary"},[d("button",{class:"flex w-full items-center gap-2 px-3 py-2 text-left text-xs font-mono transition-colors hover:bg-retro-dark/30",onClick:_[0]||(_[0]=A=>n.value=!c(n))},[c(s)>0?(h(),m("span",Or)):c(r)>0?(h(),re(c(Pn),{key:1,class:"h-3.5 w-3.5 flex-shrink-0 animate-pulse text-retro-muted"})):(h(),m("span",Nr)),d("span",Pr,E(c(u)),1),_[1]||(_[1]=d("span",{class:"font-bold text-retro-cyan"},"Tools",-1)),d("span",zr,E(c(f)),1),c(T)&&c(i)>0?(h(),m("span",Br," · "+E(c(i))+" done ",1)):C("",!0),we(c(Gt),{class:ne(["ml-auto h-3 w-3 flex-shrink-0 text-retro-muted transition-transform",{"rotate-90":c(n)}])},null,8,["class"])]),c(n)?(h(),m("div",Ur,[(h(!0),m(he,null,Oe(t.tools,A=>(h(),m("div",{key:A.id,class:"flex items-start gap-2 text-xs font-mono text-retro-muted"},[d("span",Fr,E(A.status==="running"?"[RUN]":A.status==="pending"?"[WAIT]":"[OK]"),1),d("span",Hr,E(A.name),1),d("span",Gr,E(A.inputSummary||"No summary available"),1)]))),128))])):C("",!0)],2))}});function Wt(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Se=Wt();function zn(t){Se=t}var Ye={exec:()=>null};function I(t,e=""){let n=typeof t=="string"?t:t.source;const s={replace:(r,i)=>{let a=typeof i=="string"?i:i.source;return a=a.replace(X.caret,"$1"),n=n.replace(r,a),s},getRegex:()=>new RegExp(n,e)};return s}var X={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i")},jr=/^(?:[ \t]*(?:\n|$))+/,qr=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Zr=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Ve=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Yr=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,jt=/(?:[*+-]|\d{1,9}[.)])/,Bn=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Un=I(Bn).replace(/bull/g,jt).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Vr=I(Bn).replace(/bull/g,jt).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),qt=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Xr=/^[^\n]+/,Zt=/(?!\s*\])(?:\\.|[^\[\]\\])+/,Qr=I(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Zt).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Kr=I(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,jt).getRegex(),ft="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Yt=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Jr=I("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Yt).replace("tag",ft).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Fn=I(qt).replace("hr",Ve).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ft).getRegex(),es=I(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Fn).getRegex(),Vt={blockquote:es,code:qr,def:Qr,fences:Zr,heading:Yr,hr:Ve,html:Jr,lheading:Un,list:Kr,newline:jr,paragraph:Fn,table:Ye,text:Xr},Tn=I("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Ve).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ft).getRegex(),ts={...Vt,lheading:Vr,table:Tn,paragraph:I(qt).replace("hr",Ve).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Tn).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ft).getRegex()},ns={...Vt,html:I(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Yt).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Ye,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:I(qt).replace("hr",Ve).replace("heading",` *#{1,6} *[^
2
2
  ]`).replace("lheading",Un).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},rs=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,ss=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Hn=/^( {2,}|\\)\n(?!\s*$)/,os=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,mt=/[\p{P}\p{S}]/u,Xt=/[\s\p{P}\p{S}]/u,Gn=/[^\s\p{P}\p{S}]/u,is=I(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Xt).getRegex(),Wn=/(?!~)[\p{P}\p{S}]/u,as=/(?!~)[\s\p{P}\p{S}]/u,ls=/(?:[^\s\p{P}\p{S}]|~)/u,cs=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,jn=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,us=I(jn,"u").replace(/punct/g,mt).getRegex(),ps=I(jn,"u").replace(/punct/g,Wn).getRegex(),qn="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",hs=I(qn,"gu").replace(/notPunctSpace/g,Gn).replace(/punctSpace/g,Xt).replace(/punct/g,mt).getRegex(),ds=I(qn,"gu").replace(/notPunctSpace/g,ls).replace(/punctSpace/g,as).replace(/punct/g,Wn).getRegex(),fs=I("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Gn).replace(/punctSpace/g,Xt).replace(/punct/g,mt).getRegex(),ms=I(/\\(punct)/,"gu").replace(/punct/g,mt).getRegex(),gs=I(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),ks=I(Yt).replace("(?:-->|$)","-->").getRegex(),xs=I("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",ks).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),pt=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,bs=I(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",pt).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Zn=I(/^!?\[(label)\]\[(ref)\]/).replace("label",pt).replace("ref",Zt).getRegex(),Yn=I(/^!?\[(ref)\](?:\[\])?/).replace("ref",Zt).getRegex(),ws=I("reflink|nolink(?!\\()","g").replace("reflink",Zn).replace("nolink",Yn).getRegex(),Qt={_backpedal:Ye,anyPunctuation:ms,autolink:gs,blockSkip:cs,br:Hn,code:ss,del:Ye,emStrongLDelim:us,emStrongRDelimAst:hs,emStrongRDelimUnd:fs,escape:rs,link:bs,nolink:Yn,punctuation:is,reflink:Zn,reflinkSearch:ws,tag:xs,text:os,url:Ye},ys={...Qt,link:I(/^!?\[(label)\]\((.*?)\)/).replace("label",pt).getRegex(),reflink:I(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",pt).getRegex()},Nt={...Qt,emStrongRDelimAst:ds,emStrongLDelim:ps,url:I(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},vs={...Nt,br:I(Hn).replace("{2,}","*").getRegex(),text:I(Nt.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},it={normal:Vt,gfm:ts,pedantic:ns},Ue={normal:Qt,gfm:Nt,breaks:vs,pedantic:ys},Ts={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},_n=t=>Ts[t];function ue(t,e){if(e){if(X.escapeTest.test(t))return t.replace(X.escapeReplace,_n)}else if(X.escapeTestNoEncode.test(t))return t.replace(X.escapeReplaceNoEncode,_n);return t}function An(t){try{t=encodeURI(t).replace(X.percentDecode,"%")}catch{return null}return t}function Sn(t,e){const n=t.replace(X.findPipe,(i,a,l)=>{let f=!1,u=a;for(;--u>=0&&l[u]==="\\";)f=!f;return f?"|":" |"}),s=n.split(X.splitPipe);let r=0;if(s[0].trim()||s.shift(),s.length>0&&!s.at(-1)?.trim()&&s.pop(),e)if(s.length>e)s.splice(e);else for(;s.length<e;)s.push("");for(;r<s.length;r++)s[r]=s[r].trim().replace(X.slashPipe,"|");return s}function Fe(t,e,n){const s=t.length;if(s===0)return"";let r=0;for(;r<s&&t.charAt(s-r-1)===e;)r++;return t.slice(0,s-r)}function _s(t,e){if(t.indexOf(e[1])===-1)return-1;let n=0;for(let s=0;s<t.length;s++)if(t[s]==="\\")s++;else if(t[s]===e[0])n++;else if(t[s]===e[1]&&(n--,n<0))return s;return n>0?-2:-1}function En(t,e,n,s,r){const i=e.href,a=e.title||null,l=t[1].replace(r.other.outputLinkReplace,"$1");s.state.inLink=!0;const f={type:t[0].charAt(0)==="!"?"image":"link",raw:n,href:i,title:a,text:l,tokens:s.inlineTokens(l)};return s.state.inLink=!1,f}function As(t,e,n){const s=t.match(n.other.indentCodeCompensation);if(s===null)return e;const r=s[1];return e.split(`
3
3
  `).map(i=>{const a=i.match(n.other.beginningSpace);if(a===null)return i;const[l]=a;return l.length>=r.length?i.slice(r.length):i}).join(`
4
4
  `)}var ht=class{options;rules;lexer;constructor(t){this.options=t||Se}space(t){const e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){const e=this.rules.block.code.exec(t);if(e){const n=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?n:Fe(n,`
@@ -1 +1 @@
1
- import{u as f,a as g}from"./D8F4N5Iq.js";import{_ as x,u as S}from"./BfgZhXjw.js";import{d as _,o as y,F as M,y as w,z as C,A as s,C as h,G as n,k as i}from"./B4NAMCh5.js";const A={class:"p-6 max-w-2xl"},E={class:"mt-8 space-y-8"},D=_({__name:"settings",async setup(P){let r,a;const o=f(),d=g();y(()=>{o.hydrate()});const{data:p,pending:l,error:c}=([r,a]=M(()=>S("ai-providers",()=>$fetch("/api/ai/providers"))),r=await r,a(),r),m=i(()=>p.value?.providers??[]),u=i(()=>{const t=c.value;return t?t instanceof Error?t.message:String(t):null}),v=t=>{o.setProviderSelection(t),d.success("Settings saved")};return(t,e)=>(w(),C("div",A,[e[2]||(e[2]=s("h1",{class:"text-2xl font-bold text-retro-cyan font-mono"},"Settings",-1)),e[3]||(e[3]=s("p",{class:"mt-2 text-retro-muted"},"Configure your Spec Cat preferences.",-1)),s("div",E,[s("section",null,[e[0]||(e[0]=s("h2",{class:"text-lg font-mono text-retro-text mb-4"},"AI Provider",-1)),e[1]||(e[1]=s("p",{class:"text-sm text-retro-muted mb-4"}," Select the provider and model that should power new conversations. ",-1)),h(x,{providers:m.value,selected:n(o).providerSelection,permissionMode:n(o).permissionMode,pending:n(l),errorMessage:u.value,onSelect:v},null,8,["providers","selected","permissionMode","pending","errorMessage"])])])]))}});export{D as default};
1
+ import{u as f,a as g}from"./DVcuiuw1.js";import{_ as x,u as S}from"./CUoKmmxS.js";import{d as _,o as y,F as M,y as w,z as C,A as s,C as h,G as n,k as i}from"./CE5wWE6n.js";const A={class:"p-6 max-w-2xl"},E={class:"mt-8 space-y-8"},D=_({__name:"settings",async setup(P){let r,a;const o=f(),d=g();y(()=>{o.hydrate()});const{data:p,pending:l,error:c}=([r,a]=M(()=>S("ai-providers",()=>$fetch("/api/ai/providers"))),r=await r,a(),r),m=i(()=>p.value?.providers??[]),u=i(()=>{const t=c.value;return t?t instanceof Error?t.message:String(t):null}),v=t=>{o.setProviderSelection(t),d.success("Settings saved")};return(t,e)=>(w(),C("div",A,[e[2]||(e[2]=s("h1",{class:"text-2xl font-bold text-retro-cyan font-mono"},"Settings",-1)),e[3]||(e[3]=s("p",{class:"mt-2 text-retro-muted"},"Configure your Spec Cat preferences.",-1)),s("div",E,[s("section",null,[e[0]||(e[0]=s("h2",{class:"text-lg font-mono text-retro-text mb-4"},"AI Provider",-1)),e[1]||(e[1]=s("p",{class:"text-sm text-retro-muted mb-4"}," Select the provider and model that should power new conversations. ",-1)),h(x,{providers:m.value,selected:n(o).providerSelection,permissionMode:n(o).permissionMode,pending:n(l),errorMessage:u.value,onSelect:v},null,8,["providers","selected","permissionMode","pending","errorMessage"])])])]))}});export{D as default};
@@ -1 +1 @@
1
- import{_ as f,$ as h,g as m}from"./B4NAMCh5.js";const p="claude",l="sonnet",g=[{value:"sonnet",label:"Sonnet",description:"Balanced performance and cost"},{value:"opus",label:"Opus",description:"Most capable, higher cost"},{value:"haiku",label:"Haiku",description:"Fast and cost-effective"}];function M(e){if(!e)return{};const t={},s=typeof e.claudeModel=="string"&&g.some(n=>n.value===e.claudeModel)?e.claudeModel:void 0;typeof e.providerId=="string"?(t.providerId=e.providerId,typeof e.providerModelKey=="string"&&e.providerModelKey.length>0?t.providerModelKey=e.providerModelKey:s?t.providerModelKey=s:t.providerModelKey=l):s&&(t.providerId="claude",t.providerModelKey=s),(e.theme==="dark"||e.theme==="light")&&(t.theme=e.theme);const r=e.permissionMode;return r&&["plan","ask","auto","bypass"].includes(String(r))&&(t.permissionMode=r),typeof e.autoGenerateCommitMessages=="boolean"&&(t.autoGenerateCommitMessages=e.autoGenerateCommitMessages),t}const y=f("settings",{state:()=>({providerId:p,providerModelKey:l,theme:"dark",permissionMode:"ask",autoGenerateCommitMessages:!1,_hydrated:!1}),getters:{providerSelection:e=>({providerId:e.providerId,modelKey:e.providerModelKey})},actions:{async hydrate(){if(!this._hydrated)try{const e=await $fetch("/api/settings"),t=M(e);t.providerId!==void 0&&(this.providerId=t.providerId),t.providerModelKey!==void 0&&(this.providerModelKey=t.providerModelKey),t.theme!==void 0&&(this.theme=t.theme),t.permissionMode!==void 0&&(this.permissionMode=t.permissionMode),t.autoGenerateCommitMessages!==void 0&&(this.autoGenerateCommitMessages=t.autoGenerateCommitMessages),this._hydrated=!0}catch(e){console.error("Failed to load settings:",e)}},setTheme(e){this.theme=e,this._saveToServer()},setProviderSelection(e){this.providerId=e.providerId,this.providerModelKey=typeof e.modelKey=="string"&&e.modelKey.length>0?e.modelKey:l,this._saveToServer(!0)},setPermissionMode(e){this.permissionMode=e,this._saveToServer()},setAutoGenerateCommitMessages(e){this.autoGenerateCommitMessages=e,this._saveToServer()},resetToDefaults(){this.providerId=p,this.providerModelKey=l,this.theme="dark",this.permissionMode="ask",this.autoGenerateCommitMessages=!1,this._saveToServer()},_saveToServer(e=!1){const t={providerId:this.providerId,providerModelKey:this.providerModelKey,claudeModel:this.providerId==="claude"?this.providerModelKey:void 0,theme:this.theme,permissionMode:this.permissionMode,autoGenerateCommitMessages:this.autoGenerateCommitMessages};$fetch("/api/settings",{method:"POST",body:t}).then(s=>{if(!e||!s?.settings)return;const r=s.settings.providerId,n=s.settings.providerModelKey;typeof r=="string"&&(this.providerId=r),typeof n=="string"&&n.length>0&&(this.providerModelKey=n)}).catch(s=>{console.error("Failed to save settings:",s)})}}}),I=Object.freeze(Object.defineProperty({__proto__:null,useSettingsStore:y},Symbol.toStringTag,{value:"Module"})),d=m([]);function S(){const e=(i,o="info",a=3e3)=>{const c=`toast-${Date.now()}-${Math.random().toString(36).slice(2)}`,v={id:c,message:i,type:o,duration:a};return d.value.push(v),a>0&&setTimeout(()=>{t(c)},a),c},t=i=>{const o=d.value.findIndex(a=>a.id===i);o!==-1&&d.value.splice(o,1)},s=(i,o)=>e(i,"success",o),r=(i,o)=>e(i,"error",o),n=(i,o)=>e(i,"info",o),u=(i,o)=>e(i,"warning",o);return{toasts:h(d),add:e,remove:t,success:s,error:r,info:n,warning:u}}const A=Object.freeze(Object.defineProperty({__proto__:null,useToast:S},Symbol.toStringTag,{value:"Module"}));function T(){return`blk-${Date.now()}-${Math.random().toString(36).substring(2,6)}`}function E(e){return Array.isArray(e.contentBlocks)&&e.contentBlocks.length>0}const K={plan:"Plan Mode",ask:"Ask Before",auto:"Auto Edit",bypass:"Bypass"},C={plan:"The assistant will create a plan before making changes",ask:"The assistant will ask before each action",auto:"The assistant can read and edit files automatically",bypass:"Skip all permission checks (dangerous)"},k=300,O=600,D=400;function b(){return`msg-${Date.now()}-${Math.random().toString(36).substring(2,8)}`}const G=2,N=100,L=80;function P(){return`conv-${Math.random().toString(36).slice(2,12)}`}function R(e){const s=e.trim().replace(/\n/g," ");return s.length<=50?s:s.slice(0,50).trim()+"..."}function $(e){if(!e||typeof e!="object")return!1;const t=e;return typeof t.id=="string"&&typeof t.title=="string"&&Array.isArray(t.messages)&&typeof t.createdAt=="string"&&typeof t.updatedAt=="string"&&typeof t.cwd=="string"}function H(e){if(!e||typeof e!="object")return!1;const t=e;return typeof t.id=="string"&&typeof t.sourceConversationId=="string"&&typeof t.title=="string"&&Array.isArray(t.messages)&&typeof t.createdAt=="string"&&typeof t.updatedAt=="string"&&typeof t.archivedAt=="string"&&typeof t.cwd=="string"}export{l as D,N as M,D as P,G as S,L as W,S as a,H as b,k as c,O as d,P as e,p as f,b as g,R as h,$ as i,T as j,K as k,C as l,E as m,A as n,I as s,y as u};
1
+ import{M as f,$ as h,g as m}from"./CE5wWE6n.js";const p="claude",l="sonnet",g=[{value:"sonnet",label:"Sonnet",description:"Balanced performance and cost"},{value:"opus",label:"Opus",description:"Most capable, higher cost"},{value:"haiku",label:"Haiku",description:"Fast and cost-effective"}];function M(e){if(!e)return{};const t={},s=typeof e.claudeModel=="string"&&g.some(n=>n.value===e.claudeModel)?e.claudeModel:void 0;typeof e.providerId=="string"?(t.providerId=e.providerId,typeof e.providerModelKey=="string"&&e.providerModelKey.length>0?t.providerModelKey=e.providerModelKey:s?t.providerModelKey=s:t.providerModelKey=l):s&&(t.providerId="claude",t.providerModelKey=s),(e.theme==="dark"||e.theme==="light")&&(t.theme=e.theme);const r=e.permissionMode;return r&&["plan","ask","auto","bypass"].includes(String(r))&&(t.permissionMode=r),typeof e.autoGenerateCommitMessages=="boolean"&&(t.autoGenerateCommitMessages=e.autoGenerateCommitMessages),t}const y=f("settings",{state:()=>({providerId:p,providerModelKey:l,theme:"dark",permissionMode:"ask",autoGenerateCommitMessages:!1,_hydrated:!1}),getters:{providerSelection:e=>({providerId:e.providerId,modelKey:e.providerModelKey})},actions:{async hydrate(){if(!this._hydrated)try{const e=await $fetch("/api/settings"),t=M(e);t.providerId!==void 0&&(this.providerId=t.providerId),t.providerModelKey!==void 0&&(this.providerModelKey=t.providerModelKey),t.theme!==void 0&&(this.theme=t.theme),t.permissionMode!==void 0&&(this.permissionMode=t.permissionMode),t.autoGenerateCommitMessages!==void 0&&(this.autoGenerateCommitMessages=t.autoGenerateCommitMessages),this._hydrated=!0}catch(e){console.error("Failed to load settings:",e)}},setTheme(e){this.theme=e,this._saveToServer()},setProviderSelection(e){this.providerId=e.providerId,this.providerModelKey=typeof e.modelKey=="string"&&e.modelKey.length>0?e.modelKey:l,this._saveToServer(!0)},setPermissionMode(e){this.permissionMode=e,this._saveToServer()},setAutoGenerateCommitMessages(e){this.autoGenerateCommitMessages=e,this._saveToServer()},resetToDefaults(){this.providerId=p,this.providerModelKey=l,this.theme="dark",this.permissionMode="ask",this.autoGenerateCommitMessages=!1,this._saveToServer()},_saveToServer(e=!1){const t={providerId:this.providerId,providerModelKey:this.providerModelKey,claudeModel:this.providerId==="claude"?this.providerModelKey:void 0,theme:this.theme,permissionMode:this.permissionMode,autoGenerateCommitMessages:this.autoGenerateCommitMessages};$fetch("/api/settings",{method:"POST",body:t}).then(s=>{if(!e||!s?.settings)return;const r=s.settings.providerId,n=s.settings.providerModelKey;typeof r=="string"&&(this.providerId=r),typeof n=="string"&&n.length>0&&(this.providerModelKey=n)}).catch(s=>{console.error("Failed to save settings:",s)})}}}),_=Object.freeze(Object.defineProperty({__proto__:null,useSettingsStore:y},Symbol.toStringTag,{value:"Module"})),d=m([]);function S(){const e=(i,o="info",a=3e3)=>{const c=`toast-${Date.now()}-${Math.random().toString(36).slice(2)}`,v={id:c,message:i,type:o,duration:a};return d.value.push(v),a>0&&setTimeout(()=>{t(c)},a),c},t=i=>{const o=d.value.findIndex(a=>a.id===i);o!==-1&&d.value.splice(o,1)},s=(i,o)=>e(i,"success",o),r=(i,o)=>e(i,"error",o),n=(i,o)=>e(i,"info",o),u=(i,o)=>e(i,"warning",o);return{toasts:h(d),add:e,remove:t,success:s,error:r,info:n,warning:u}}const A=Object.freeze(Object.defineProperty({__proto__:null,useToast:S},Symbol.toStringTag,{value:"Module"}));function T(){return`blk-${Date.now()}-${Math.random().toString(36).substring(2,6)}`}function E(e){return Array.isArray(e.contentBlocks)&&e.contentBlocks.length>0}const K={plan:"Plan Mode",ask:"Ask Before",auto:"Auto Edit",bypass:"Bypass"},C={plan:"The assistant will create a plan before making changes",ask:"The assistant will ask before each action",auto:"The assistant can read and edit files automatically",bypass:"Skip all permission checks (dangerous)"},k=300,O=600,D=400;function b(){return`msg-${Date.now()}-${Math.random().toString(36).substring(2,8)}`}const G=2,N=100,L=80;function P(){return`conv-${Math.random().toString(36).slice(2,12)}`}function R(e){const s=e.trim().replace(/\n/g," ");return s.length<=50?s:s.slice(0,50).trim()+"..."}function $(e){if(!e||typeof e!="object")return!1;const t=e;return typeof t.id=="string"&&typeof t.title=="string"&&Array.isArray(t.messages)&&typeof t.createdAt=="string"&&typeof t.updatedAt=="string"&&typeof t.cwd=="string"}function H(e){if(!e||typeof e!="object")return!1;const t=e;return typeof t.id=="string"&&typeof t.sourceConversationId=="string"&&typeof t.title=="string"&&Array.isArray(t.messages)&&typeof t.createdAt=="string"&&typeof t.updatedAt=="string"&&typeof t.archivedAt=="string"&&typeof t.cwd=="string"}export{l as D,N as M,D as P,G as S,L as W,S as a,H as b,k as c,O as d,P as e,p as f,b as g,R as h,$ as i,T as j,K as k,C as l,E as m,A as n,_ as s,y as u};
@@ -0,0 +1 @@
1
+ import{d as _,y as i,z as l,L as w,G as n,B as p,k as B,M as V,N as F,O as N,H as S,T,C as x,P as z,D as j,Q as v,A as o,K as u,E as W,R as $,S as C,U as D,g as k,o as q,I as L,J as P}from"./CE5wWE6n.js";import{r as O,a as M,b as R,c as U}from"./CzV00gDF.js";const A=_({__name:"WorktreeStatusBadge",props:{status:{}},setup(t){const e=t,s=B(()=>({clean:{label:"clean",color:"text-retro-green bg-retro-green/20"},dirty:{label:"dirty",color:"text-retro-yellow bg-retro-yellow/20"},ahead:{label:"ahead",color:"text-retro-cyan bg-retro-cyan/20"},behind:{label:"behind",color:"text-retro-orange bg-retro-orange/20"},diverged:{label:"diverged",color:"text-retro-red bg-retro-red/20"}})[e.status]);return(a,h)=>(i(),l("span",{class:w(["px-1.5 py-0.5 text-[10px] font-mono uppercase rounded",n(s).color])},p(n(s).label),3))}}),E=V("worktree",{state:()=>({worktrees:[],currentBranch:"",mainWorktree:"",workingDirectory:"",loading:!1,error:null}),getters:{activeWorktree:t=>t.worktrees.find(e=>e.isCurrent),featureWorktrees:t=>t.worktrees.filter(e=>!e.isMain),mainWorktreeInfo:t=>t.worktrees.find(e=>e.isMain),hasWorktrees:t=>t.worktrees.length>1,dirtyWorktrees:t=>t.worktrees.filter(e=>e.status==="dirty")},actions:{async initialize(){if(!this.workingDirectory)try{const{cwd:t}=await $fetch("/api/cwd");this.workingDirectory=t}catch(t){console.error("Failed to get working directory:",t),this.workingDirectory=""}},async fetchWorktrees(){await this.initialize(),this.loading=!0,this.error=null;try{const t=await $fetch("/api/worktrees",{query:{workingDirectory:this.workingDirectory}});this.worktrees=t.worktrees,this.currentBranch=t.currentBranch,this.mainWorktree=t.mainWorktree}catch(t){this.error=t instanceof Error?t.message:"Failed to fetch worktrees",console.error("Failed to fetch worktrees:",t)}finally{this.loading=!1}},async createWorktree(t){await this.initialize(),this.loading=!0,this.error=null;try{const e=await $fetch("/api/worktrees",{method:"POST",query:{workingDirectory:this.workingDirectory},body:t});return e.success&&e.worktree?this.worktrees.push(e.worktree):e.error&&(this.error=e.error),e}catch(e){const s=e instanceof Error?e.message:"Failed to create worktree";return this.error=s,{success:!1,error:s}}finally{this.loading=!1}},async deleteWorktree(t,e=!1){await this.initialize(),this.loading=!0,this.error=null;try{const s=await $fetch(`/api/worktrees/${t}`,{method:"DELETE",query:{workingDirectory:this.workingDirectory,deleteBranch:e.toString()}});return s.success?this.worktrees=this.worktrees.filter(a=>a.name!==t):s.error&&(this.error=s.error),s}catch(s){const a=s instanceof Error?s.message:"Failed to delete worktree";return this.error=a,{success:!1,error:a}}finally{this.loading=!1}},async switchWorktree(t){await this.initialize(),this.loading=!0,this.error=null;try{const e=await $fetch(`/api/worktrees/${t}/switch`,{method:"POST",query:{workingDirectory:this.workingDirectory}});return e.success?(this.worktrees=this.worktrees.map(s=>({...s,isCurrent:s.name===t})),this.currentBranch=t):e.error&&(this.error=e.error),e}catch(e){const s=e instanceof Error?e.message:"Failed to switch worktree";return this.error=s,{success:!1,error:s}}finally{this.loading=!1}},clearError(){this.error=null}}}),H={class:"w-full max-w-md mx-4 bg-retro-dark border border-retro-border rounded-lg shadow-xl"},I={class:"flex items-center justify-between px-4 py-3 border-b border-retro-border"},K={key:0,class:"p-2 text-xs font-mono text-retro-red bg-retro-red/10 border border-retro-red/30 rounded"},G=["disabled"],J=["disabled"],Q={class:"flex justify-end gap-2 pt-2"},X=["disabled"],Y=["disabled"],Z=_({__name:"WorktreeCreateModal",props:{modelValue:{type:Boolean,default:!1},modelModifiers:{}},emits:["update:modelValue"],setup(t){const e=F(t,"modelValue"),s=E(),a=k(""),h=k(""),m=k(!1),f=k(""),b=async()=>{if(!a.value.trim()){f.value="Description is required";return}m.value=!0,f.value="";try{const d=await s.createWorktree({description:a.value.trim(),shortName:h.value.trim()||void 0});d.success?(a.value="",h.value="",e.value=!1):f.value=d.error||"Failed to create worktree"}catch(d){f.value=d instanceof Error?d.message:"Failed to create worktree"}finally{m.value=!1}},c=()=>{e.value=!1,a.value="",h.value="",f.value=""},g=d=>{d.key==="Escape"&&c()};return N(e,d=>{d?document.addEventListener("keydown",g):document.removeEventListener("keydown",g)}),(d,r)=>(i(),S(T,{to:"body"},[x(z,{"enter-active-class":"transition-opacity duration-200","enter-from-class":"opacity-0","enter-to-class":"opacity-100","leave-active-class":"transition-opacity duration-200","leave-from-class":"opacity-100","leave-to-class":"opacity-0"},{default:j(()=>[e.value?(i(),l("div",{key:0,class:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 backdrop-blur-sm",onClick:v(c,["self"])},[o("div",H,[o("div",I,[r[2]||(r[2]=o("h3",{class:"text-sm font-mono text-retro-text"},"Create Worktree",-1)),o("button",{type:"button",class:"p-1 rounded text-retro-muted hover:text-retro-text hover:bg-retro-panel transition-colors",onClick:c},[x(n(O),{class:"h-4 w-4"})])]),o("form",{class:"p-4 space-y-4",onSubmit:v(b,["prevent"])},[n(f)?(i(),l("div",K,p(n(f)),1)):u("",!0),o("div",null,[r[3]||(r[3]=o("label",{class:"block text-xs font-mono text-retro-muted mb-1"},[W(" Feature Description "),o("span",{class:"text-retro-red"},"*")],-1)),$(o("input",{"onUpdate:modelValue":r[0]||(r[0]=y=>C(a)?a.value=y:null),type:"text",placeholder:"e.g., Add user authentication",class:"w-full px-3 py-2 text-sm font-mono bg-retro-black border border-retro-border rounded text-retro-text placeholder-retro-subtle focus:outline-none focus:border-retro-cyan",disabled:n(m)},null,8,G),[[D,n(a)]]),r[4]||(r[4]=o("p",{class:"mt-1 text-[10px] font-mono text-retro-subtle"}," A brief description of what this feature does ",-1))]),o("div",null,[r[5]||(r[5]=o("label",{class:"block text-xs font-mono text-retro-muted mb-1"},[W(" Short Name "),o("span",{class:"text-retro-subtle"},"(optional)")],-1)),$(o("input",{"onUpdate:modelValue":r[1]||(r[1]=y=>C(h)?h.value=y:null),type:"text",placeholder:"e.g., auth",class:"w-full px-3 py-2 text-sm font-mono bg-retro-black border border-retro-border rounded text-retro-text placeholder-retro-subtle focus:outline-none focus:border-retro-cyan",disabled:n(m)},null,8,J),[[D,n(h)]]),r[6]||(r[6]=o("p",{class:"mt-1 text-[10px] font-mono text-retro-subtle"}," Override the auto-generated branch name (e.g., 001-auth instead of 001-add-user-authentication) ",-1))]),o("div",Q,[o("button",{type:"button",class:"px-3 py-1.5 text-xs font-mono text-retro-muted hover:text-retro-text bg-retro-panel hover:bg-retro-border rounded transition-colors",disabled:n(m),onClick:c}," Cancel ",8,X),o("button",{type:"submit",class:"px-3 py-1.5 text-xs font-mono text-retro-black bg-retro-cyan hover:bg-retro-cyan/80 rounded transition-colors disabled:opacity-50 disabled:cursor-not-allowed",disabled:n(m)||!n(a).trim()},p(n(m)?"Creating...":"Create"),9,Y)])],32)])])):u("",!0)]),_:1})]))}}),ee={class:"h-full flex flex-col bg-retro-black"},te={class:"flex-shrink-0 h-12 flex items-center justify-between px-4 border-b border-retro-border bg-retro-dark"},re={class:"flex items-center gap-2"},oe={key:0,class:"px-4 py-2 bg-retro-red/20 border-b border-retro-red/50"},se={class:"text-xs font-mono text-retro-red"},ne={class:"flex-1 overflow-y-auto p-2 space-y-1"},ae={class:"flex items-start justify-between gap-2"},ie={class:"flex-1 min-w-0"},le={class:"flex items-center gap-2"},ce={key:0,class:"px-1.5 py-0.5 text-[10px] font-mono uppercase bg-retro-yellow/20 text-retro-yellow rounded"},de={key:1,class:"px-1.5 py-0.5 text-[10px] font-mono uppercase bg-retro-cyan/20 text-retro-cyan rounded"},ue={key:0,class:"mt-1 text-xs font-mono text-retro-muted truncate"},pe={class:"text-retro-subtle"},he={class:"mt-1 text-[10px] font-mono text-retro-subtle truncate"},me={class:"flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity"},fe=["onClick"],xe=["onClick"],be={key:0,class:"mt-2 text-[10px] font-mono text-retro-green"},ye={key:0,class:"flex flex-col items-center justify-center py-8 text-center"},ke=_({__name:"WorktreePanel",setup(t){const e=E(),s=k(!1);q(()=>{e.fetchWorktrees()});const a=()=>{e.fetchWorktrees()},h=()=>{s.value=!0},m=async b=>{await e.switchWorktree(b)},f=async b=>{confirm(`Delete worktree "${b}"? This will remove the worktree directory.`)&&await e.deleteWorktree(b,!1)};return(b,c)=>{const g=A,d=Z;return i(),l("div",ee,[o("div",te,[c[1]||(c[1]=o("h2",{class:"text-sm font-mono text-retro-text"},"Worktrees",-1)),o("div",re,[o("button",{type:"button",class:"p-1.5 rounded text-retro-muted hover:text-retro-cyan hover:bg-retro-panel transition-colors",title:"Refresh",onClick:a},[x(n(M),{class:w(["h-4 w-4",{"animate-spin":n(e).loading}])},null,8,["class"])]),o("button",{type:"button",class:"p-1.5 rounded text-retro-muted hover:text-retro-green hover:bg-retro-panel transition-colors",title:"Create worktree",onClick:h},[x(n(R),{class:"h-4 w-4"})])])]),n(e).error?(i(),l("div",oe,[o("p",se,p(n(e).error),1)])):u("",!0),o("div",ne,[(i(!0),l(L,null,P(n(e).worktrees,r=>(i(),l("div",{key:r.name,class:w(["group p-3 rounded-md border transition-colors",[r.isCurrent?"bg-retro-cyan/10 border-retro-cyan":"bg-retro-panel border-retro-border hover:border-retro-muted"]])},[o("div",ae,[o("div",ie,[o("div",le,[o("span",{class:w(["font-mono text-sm truncate",r.isCurrent?"text-retro-cyan":"text-retro-text"])},p(r.name),3),x(g,{status:r.status},null,8,["status"]),r.isMain?(i(),l("span",ce," main ")):u("",!0),r.isCurrent?(i(),l("span",de," current ")):u("",!0)]),r.lastCommit?(i(),l("div",ue,[o("span",pe,p(r.lastCommit.shortHash),1),c[2]||(c[2]=o("span",{class:"mx-1"},"·",-1)),o("span",null,p(r.lastCommit.message),1)])):u("",!0),o("div",he,p(r.path),1)]),o("div",me,[!r.isCurrent&&!r.isMain?(i(),l("button",{key:0,type:"button",class:"p-1 rounded text-retro-muted hover:text-retro-cyan hover:bg-retro-dark transition-colors",title:"Switch to this worktree",onClick:v(y=>m(r.name),["stop"])},[x(n(M),{class:"h-3.5 w-3.5"})],8,fe)):u("",!0),r.isMain?u("",!0):(i(),l("button",{key:1,type:"button",class:"p-1 rounded text-retro-muted hover:text-retro-red hover:bg-retro-dark transition-colors",title:"Delete worktree",onClick:v(y=>f(r.name),["stop"])},[x(n(U),{class:"h-3.5 w-3.5"})],8,xe))])]),r.commitCount>0?(i(),l("div",be,p(r.commitCount)+" commit"+p(r.commitCount>1?"s":"")+" ahead ",1)):u("",!0)],2))),128)),!n(e).loading&&n(e).worktrees.length===0?(i(),l("div",ye,[...c[3]||(c[3]=[o("p",{class:"text-sm font-mono text-retro-muted"},"No worktrees found",-1),o("p",{class:"mt-1 text-xs font-mono text-retro-subtle"},"Create a new worktree to start working on a feature",-1)])])):u("",!0)]),x(d,{modelValue:n(s),"onUpdate:modelValue":c[0]||(c[0]=r=>C(s)?s.value=r:null)},null,8,["modelValue"])])}}}),ve=_({__name:"index",setup(t){return(e,s)=>{const a=ke;return i(),S(a)}}});export{ve as default};
@@ -1,4 +1,4 @@
1
- import{u as Y,r as j,a as Q,C as q,_ as i,b as X,c as _,d as w,e as n,f as Z}from"./606_6V9S.js";import{u as ee}from"./D8F4N5Iq.js";import{d as te,o as se,z as a,A as t,G as c,H as S,I as A,J as I,C as o,K as oe,g as re,k as ne,y as r,L as ae,B as T}from"./B4NAMCh5.js";import"./DlAUqK2U.js";const ie={class:"h-screen flex flex-col bg-retro-black text-retro-text font-mono overflow-hidden"},le={class:"h-14 shrink-0 border-b border-retro-border bg-retro-panel/50 px-8 flex items-center justify-between"},de={class:"shrink-0 flex border-b border-retro-border bg-retro-panel/30"},pe=["onClick"],ce={class:"flex-1 min-h-0 overflow-y-auto"},ue={key:0,class:"p-8"},me={class:"grid grid-cols-2 gap-4"},be={class:"px-2 py-0.5 bg-retro-panel border border-retro-border text-[10px] text-retro-muted font-bold rounded uppercase tracking-tight"},ge={key:1,class:"p-8 space-y-6 max-w-2xl mx-auto"},ke={class:"space-y-2"},xe={class:"space-y-2"},he={class:"space-y-2"},ye={class:"space-y-2"},fe={class:"space-y-2"},ve={class:"space-y-2"},_e={key:2,class:"p-8 space-y-8 max-w-2xl mx-auto"},we={class:"space-y-2"},Se={class:"space-y-2"},Ae={class:"space-y-2"},Ie={class:"space-y-2"},Te={class:"space-y-2"},Be={class:"space-y-2"},$e={class:"space-y-2"},Ue={class:"space-y-2"},Ce={class:"space-y-2"},Ee={class:"space-y-2"},Re={class:"space-y-2"},Me={class:"space-y-2"},De={class:"space-y-2"},Pe=te({__name:"design-guide",setup(Oe){const{isDark:B,toggleTheme:m}=Y(),$=ee();se(async()=>{await $.hydrate()});const b=[{id:"m1",role:"user",content:"Design System Validation Message",timestamp:new Date().toISOString()}],g={id:"blk-session-1",type:"session_init",model:"claude-sonnet-4-6",tools:["Read","Write","Edit","Bash","Glob","Grep","Agent"],permissionMode:"auto",cwd:"/Users/red/src/brick"},l={id:"blk-text-1",type:"text",text:"Here is a simple text response from the assistant."},k={id:"blk-text-2",type:"text",text:`## Markdown Rendering
1
+ import{u as Y,r as j,a as Q,C as q,_ as i,b as X,c as _,d as w,e as n,f as Z}from"./DIf4tF5h.js";import{u as ee}from"./DVcuiuw1.js";import{d as te,o as se,z as a,A as t,G as c,H as S,I as A,J as I,C as o,K as oe,g as re,k as ne,y as r,L as ae,B as T}from"./CE5wWE6n.js";import"./DlAUqK2U.js";const ie={class:"h-screen flex flex-col bg-retro-black text-retro-text font-mono overflow-hidden"},le={class:"h-14 shrink-0 border-b border-retro-border bg-retro-panel/50 px-8 flex items-center justify-between"},de={class:"shrink-0 flex border-b border-retro-border bg-retro-panel/30"},pe=["onClick"],ce={class:"flex-1 min-h-0 overflow-y-auto"},ue={key:0,class:"p-8"},me={class:"grid grid-cols-2 gap-4"},be={class:"px-2 py-0.5 bg-retro-panel border border-retro-border text-[10px] text-retro-muted font-bold rounded uppercase tracking-tight"},ge={key:1,class:"p-8 space-y-6 max-w-2xl mx-auto"},ke={class:"space-y-2"},xe={class:"space-y-2"},he={class:"space-y-2"},ye={class:"space-y-2"},fe={class:"space-y-2"},ve={class:"space-y-2"},_e={key:2,class:"p-8 space-y-8 max-w-2xl mx-auto"},we={class:"space-y-2"},Se={class:"space-y-2"},Ae={class:"space-y-2"},Ie={class:"space-y-2"},Te={class:"space-y-2"},Be={class:"space-y-2"},$e={class:"space-y-2"},Ue={class:"space-y-2"},Ce={class:"space-y-2"},Ee={class:"space-y-2"},Re={class:"space-y-2"},Me={class:"space-y-2"},De={class:"space-y-2"},Pe=te({__name:"design-guide",setup(Oe){const{isDark:B,toggleTheme:m}=Y(),$=ee();se(async()=>{await $.hydrate()});const b=[{id:"m1",role:"user",content:"Design System Validation Message",timestamp:new Date().toISOString()}],g={id:"blk-session-1",type:"session_init",model:"claude-sonnet-4-6",tools:["Read","Write","Edit","Bash","Glob","Grep","Agent"],permissionMode:"auto",cwd:"/Users/red/src/brick"},l={id:"blk-text-1",type:"text",text:"Here is a simple text response from the assistant."},k={id:"blk-text-2",type:"text",text:`## Markdown Rendering
2
2
 
3
3
  This block demonstrates **bold**, *italic*, \`inline code\`, and:
4
4
 
@@ -1 +1 @@
1
- {"id":"5567f874-e186-4cd9-ae4c-1a9a207c8045","timestamp":1776863107988}
1
+ {"id":"49ff9598-e142-4df6-bb2c-e8c36d984a47","timestamp":1776912282250}
@@ -0,0 +1 @@
1
+ {"id":"49ff9598-e142-4df6-bb2c-e8c36d984a47","timestamp":1776912282250,"prerendered":[]}
@@ -0,0 +1 @@
1
+ import{_ as e}from"./DlAUqK2U.js";import{z as r,y as c}from"./CE5wWE6n.js";const o={};function t(n,s){return c(),r("div")}const f=e(o,[["render",t]]);export{f as default};