spec-cat 0.1.31 → 0.1.32
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.
- package/.output/nitro.json +1 -1
- package/.output/public/_nuxt/{BsJ_dJHc.js → 0gHHxxIN.js} +1 -1
- package/.output/public/_nuxt/{CDS7JE-l.js → BGjuZ_aG.js} +1 -1
- package/.output/public/_nuxt/{Ci786V3u.js → BMA_6bNq.js} +1 -1
- package/.output/public/_nuxt/{DCvzHL8b.js → BO4RhS76.js} +1 -1
- package/.output/public/_nuxt/C9uS_rHl.js +4 -0
- package/.output/public/_nuxt/{W2Mbi3xG.js → CAIM5SZW.js} +1 -1
- package/.output/public/_nuxt/{_2OJc4ud.js → CnSPKulS.js} +1 -1
- package/.output/public/_nuxt/{CPQPa0ek.js → CtnpjtN2.js} +1 -1
- package/.output/public/_nuxt/{DqClrdNt.js → FnrF2G0R.js} +1 -1
- package/.output/public/_nuxt/{DF0-w_FA.js → QiHGDbX5.js} +37 -37
- package/.output/public/_nuxt/{BqChKJFZ.js → RDjifZHL.js} +1 -1
- package/.output/public/_nuxt/builds/latest.json +1 -1
- package/.output/public/_nuxt/builds/meta/ef0111e7-5cb1-4e57-9dfa-802262c9017b.json +1 -0
- package/.output/public/_nuxt/{DRalfTNt.js → eGsZqesz.js} +1 -1
- package/.output/public/_nuxt/error-404.CbGlV_tK.css +1 -0
- package/.output/public/_nuxt/error-500.CUQ4fPr8.css +1 -0
- package/.output/public/_nuxt/rOoa58kt.js +1 -0
- package/.output/server/chunks/_/error-500.mjs.map +1 -1
- package/.output/server/chunks/build/client.precomputed.mjs +1 -1
- package/.output/server/chunks/build/client.precomputed.mjs.map +1 -1
- package/.output/server/chunks/nitro/nitro.mjs +954 -954
- package/.output/server/chunks/nitro/nitro.mjs.map +1 -1
- package/.output/server/chunks/routes/_ws.mjs +27 -4
- package/.output/server/chunks/routes/_ws.mjs.map +1 -1
- package/.output/server/chunks/routes/renderer.mjs.map +1 -1
- package/.output/server/node_modules/onnxruntime-node/bin/napi-v3/darwin/arm64/libonnxruntime.1.14.0.dylib +0 -0
- package/.output/server/node_modules/onnxruntime-node/bin/napi-v3/darwin/x64/libonnxruntime.1.14.0.dylib +0 -0
- package/.output/server/node_modules/sharp/build/Release/sharp-darwin-arm64v8.node +0 -0
- package/.output/server/node_modules/sharp/vendor/8.14.5/darwin-arm64v8/include/harfbuzz/hb-cplusplus.hh +223 -0
- package/.output/server/node_modules/sharp/vendor/8.14.5/darwin-arm64v8/include/vips/vips8 +60 -0
- package/.output/server/node_modules/sharp/vendor/8.14.5/{linux-x64/lib/libvips-cpp.so.42 → darwin-arm64v8/lib/libvips-cpp.42.dylib} +0 -0
- package/.output/server/node_modules/sharp/vendor/8.14.5/darwin-arm64v8/platform.json +1 -0
- package/.output/server/node_modules/sharp/vendor/8.14.5/{linux-x64 → darwin-arm64v8}/versions.json +1 -1
- package/.output/server/package.json +1 -1
- package/package.json +1 -1
- package/.output/public/_nuxt/C1AHXN0x.js +0 -4
- package/.output/public/_nuxt/GBAyQ0UT.js +0 -1
- package/.output/public/_nuxt/builds/meta/44cf44d9-d82d-4c3c-a2b1-a2ee9021c451.json +0 -1
- package/.output/public/_nuxt/error-404.BI7MGITY.css +0 -1
- package/.output/public/_nuxt/error-500.D0vfDezE.css +0 -1
- package/.output/server/node_modules/sharp/build/Release/sharp-linux-x64.node +0 -0
- package/.output/server/node_modules/sharp/vendor/8.14.5/linux-x64/platform.json +0 -1
- /package/.output/server/node_modules/sharp/vendor/8.14.5/{linux-x64 → darwin-arm64v8}/THIRD-PARTY-NOTICES.md +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{y as h,z as m,A as f,d as xe,L as ne,P as _e,Q as ar,S as lr,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 cr}from"./C1AHXN0x.js";import{a as ur,m as pr,u as hr}from"./CPQPa0ek.js";import{_ as fr}from"./DlAUqK2U.js";function dr(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"},[f("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 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"},[f("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"},[f("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m8.25 4.5 7.5 7.5-7.5 7.5"})])}function Nn(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"},[f("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"},[f("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 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"},[f("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 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"},[f("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 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"},[f("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 ai(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"},[f("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 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"},[f("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 li(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"},[f("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 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"},[f("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"})])}const yr={class:"flex items-start justify-between gap-2"},vr={class:"flex-1 min-w-0"},Tr={key:1,class:"flex items-center gap-2"},_r={class:"text-sm font-mono text-retro-text truncate"},Ar={key:0,class:"text-xs font-mono text-retro-green bg-retro-green/10 px-1.5 py-0.5 rounded flex-shrink-0"},Sr={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"},Er={class:"text-xs text-retro-muted mt-1 truncate"},Rr={class:"text-xs text-retro-muted/60 mt-1"},Cr={class:"truncate"},Lr={class:"truncate"},$r={class:"truncate"},Ir=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 d(){r.value=!1}const u=ur();async function T(A){try{await navigator.clipboard.writeText(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"))},[f("div",yr,[f("div",vr,[r.value?(h(),m("div",{key:0,class:"flex gap-2",onClick:x[1]||(x[1]=_e(()=>{},["stop"]))},[ar(f("input",{"onUpdate:modelValue":x[0]||(x[0]=$=>i.value=$),onKeyup:[wn(l,["enter"]),wn(d,["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),[[lr,i.value]])])):(h(),m("div",Tr,[f("h3",_r,E(t.conversation.title),1),t.conversation.finalized?(h(),m("span",Ar," 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",Sr," streaming ")):C("",!0)])),f("p",Er,E(S.value),1),f("p",Rr,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"}),f("span",Cr,"base: "+E(t.conversation.baseBranch),1)])):C("",!0),f("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"}),f("span",Lr,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(xr),{class:"w-3 h-3 flex-shrink-0"}),f("span",$r,E(t.conversation.worktreePath),1)])):C("",!0)])):C("",!0)]),f("div",{class:"flex gap-1 flex-shrink-0",onClick:x[7]||(x[7]=_e(()=>{},["stop"]))},[f("button",{onClick:a,class:"p-1 hover:bg-retro-panel rounded transition-colors",title:"Rename conversation"},[we(c(br),{class:"w-4 h-4 text-retro-muted hover:text-retro-cyan"})]),f("button",{onClick:x[6]||(x[6]=$=>s("archive")),class:"p-1 hover:bg-retro-cyan/20 rounded transition-colors",title:"Archive conversation"},[we(c(dr),{class:"w-4 h-4 text-retro-muted hover:text-retro-cyan"})])])])],2))}}),ci=fr(Ir,[["__scopeId","data-v-4d7fd350"]]),Mr={key:0,class:"h-3 w-3 flex-shrink-0 rounded-full border-2 border-retro-yellow border-t-transparent animate-spin"},Dr={key:2,class:"h-2 w-2 flex-shrink-0 rounded-full bg-retro-muted/70"},Or={class:"text-retro-muted"},Nr={class:"truncate text-retro-muted"},Pr={key:3,class:"hidden flex-shrink-0 text-retro-muted/70 sm:inline"},zr={key:0,class:"space-y-1 border-t border-retro-border/20 px-3 pb-2 pt-2"},Br={class:"min-w-14 flex-shrink-0"},Ur={class:"flex-shrink-0 text-retro-cyan"},Fr={class:"break-all"},Hr=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 d=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"},[f("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",Mr)):c(r)>0?(h(),re(c(Nn),{key:1,class:"h-3.5 w-3.5 flex-shrink-0 animate-pulse text-retro-muted"})):(h(),m("span",Dr)),f("span",Or,E(c(u)),1),_[1]||(_[1]=f("span",{class:"font-bold text-retro-cyan"},"Tools",-1)),f("span",Nr,E(c(d)),1),c(T)&&c(i)>0?(h(),m("span",Pr," · "+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",zr,[(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"},[f("span",Br,E(A.status==="running"?"[RUN]":A.status==="pending"?"[WAIT]":"[OK]"),1),f("span",Ur,E(A.name),1),f("span",Fr,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 Pn(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")},Gr=/^(?:[ \t]*(?:\n|$))+/,Wr=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,jr=/^ {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+|$)/,qr=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,jt=/(?:[*+-]|\d{1,9}[.)])/,zn=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Bn=I(zn).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(),Zr=I(zn).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]+)*)/,Yr=/^[^\n]+/,Zt=/(?!\s*\])(?:\\.|[^\[\]\\])+/,Vr=I(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Zt).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Xr=I(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,jt).getRegex(),dt="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]*?(?:-->|$))/,Qr=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",dt).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Un=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",dt).getRegex(),Kr=I(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Un).getRegex(),Vt={blockquote:Kr,code:Wr,def:Vr,fences:jr,heading:qr,hr:Ve,html:Qr,lheading:Bn,list:Xr,newline:Gr,paragraph:Un,table:Ye,text:Yr},vn=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",dt).getRegex(),Jr={...Vt,lheading:Zr,table:vn,paragraph:I(qt).replace("hr",Ve).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",vn).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",dt).getRegex()},es={...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 f,d as xe,L as ne,P as _e,Q as ar,S as lr,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 cr}from"./C9uS_rHl.js";import{a as ur,m as pr,u as hr}from"./CtnpjtN2.js";import{_ as fr}from"./DlAUqK2U.js";function dr(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"},[f("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 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"},[f("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"},[f("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m8.25 4.5 7.5 7.5-7.5 7.5"})])}function Nn(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"},[f("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"},[f("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 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"},[f("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 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"},[f("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 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"},[f("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 ai(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"},[f("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 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"},[f("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 li(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"},[f("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 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"},[f("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"})])}const yr={class:"flex items-start justify-between gap-2"},vr={class:"flex-1 min-w-0"},Tr={key:1,class:"flex items-center gap-2"},_r={class:"text-sm font-mono text-retro-text truncate"},Ar={key:0,class:"text-xs font-mono text-retro-green bg-retro-green/10 px-1.5 py-0.5 rounded flex-shrink-0"},Sr={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"},Er={class:"text-xs text-retro-muted mt-1 truncate"},Rr={class:"text-xs text-retro-muted/60 mt-1"},Cr={class:"truncate"},Lr={class:"truncate"},$r={class:"truncate"},Ir=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 d(){r.value=!1}const u=ur();async function T(A){try{await navigator.clipboard.writeText(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"))},[f("div",yr,[f("div",vr,[r.value?(h(),m("div",{key:0,class:"flex gap-2",onClick:x[1]||(x[1]=_e(()=>{},["stop"]))},[ar(f("input",{"onUpdate:modelValue":x[0]||(x[0]=$=>i.value=$),onKeyup:[wn(l,["enter"]),wn(d,["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),[[lr,i.value]])])):(h(),m("div",Tr,[f("h3",_r,E(t.conversation.title),1),t.conversation.finalized?(h(),m("span",Ar," 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",Sr," streaming ")):C("",!0)])),f("p",Er,E(S.value),1),f("p",Rr,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"}),f("span",Cr,"base: "+E(t.conversation.baseBranch),1)])):C("",!0),f("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"}),f("span",Lr,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(xr),{class:"w-3 h-3 flex-shrink-0"}),f("span",$r,E(t.conversation.worktreePath),1)])):C("",!0)])):C("",!0)]),f("div",{class:"flex gap-1 flex-shrink-0",onClick:x[7]||(x[7]=_e(()=>{},["stop"]))},[f("button",{onClick:a,class:"p-1 hover:bg-retro-panel rounded transition-colors",title:"Rename conversation"},[we(c(br),{class:"w-4 h-4 text-retro-muted hover:text-retro-cyan"})]),f("button",{onClick:x[6]||(x[6]=$=>s("archive")),class:"p-1 hover:bg-retro-cyan/20 rounded transition-colors",title:"Archive conversation"},[we(c(dr),{class:"w-4 h-4 text-retro-muted hover:text-retro-cyan"})])])])],2))}}),ci=fr(Ir,[["__scopeId","data-v-4d7fd350"]]),Mr={key:0,class:"h-3 w-3 flex-shrink-0 rounded-full border-2 border-retro-yellow border-t-transparent animate-spin"},Dr={key:2,class:"h-2 w-2 flex-shrink-0 rounded-full bg-retro-muted/70"},Or={class:"text-retro-muted"},Nr={class:"truncate text-retro-muted"},Pr={key:3,class:"hidden flex-shrink-0 text-retro-muted/70 sm:inline"},zr={key:0,class:"space-y-1 border-t border-retro-border/20 px-3 pb-2 pt-2"},Br={class:"min-w-14 flex-shrink-0"},Ur={class:"flex-shrink-0 text-retro-cyan"},Fr={class:"break-all"},Hr=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 d=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"},[f("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",Mr)):c(r)>0?(h(),re(c(Nn),{key:1,class:"h-3.5 w-3.5 flex-shrink-0 animate-pulse text-retro-muted"})):(h(),m("span",Dr)),f("span",Or,E(c(u)),1),_[1]||(_[1]=f("span",{class:"font-bold text-retro-cyan"},"Tools",-1)),f("span",Nr,E(c(d)),1),c(T)&&c(i)>0?(h(),m("span",Pr," · "+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",zr,[(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"},[f("span",Br,E(A.status==="running"?"[RUN]":A.status==="pending"?"[WAIT]":"[OK]"),1),f("span",Ur,E(A.name),1),f("span",Fr,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 Pn(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")},Gr=/^(?:[ \t]*(?:\n|$))+/,Wr=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,jr=/^ {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+|$)/,qr=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,jt=/(?:[*+-]|\d{1,9}[.)])/,zn=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Bn=I(zn).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(),Zr=I(zn).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]+)*)/,Yr=/^[^\n]+/,Zt=/(?!\s*\])(?:\\.|[^\[\]\\])+/,Vr=I(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Zt).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Xr=I(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,jt).getRegex(),dt="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]*?(?:-->|$))/,Qr=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",dt).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Un=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",dt).getRegex(),Kr=I(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Un).getRegex(),Vt={blockquote:Kr,code:Wr,def:Vr,fences:jr,heading:qr,hr:Ve,html:Qr,lheading:Bn,list:Xr,newline:Gr,paragraph:Un,table:Ye,text:Yr},vn=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",dt).getRegex(),Jr={...Vt,lheading:Zr,table:vn,paragraph:I(qt).replace("hr",Ve).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",vn).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",dt).getRegex()},es={...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",Bn).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},ts=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,ns=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Fn=/^( {2,}|\\)\n(?!\s*$)/,rs=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,mt=/[\p{P}\p{S}]/u,Xt=/[\s\p{P}\p{S}]/u,Hn=/[^\s\p{P}\p{S}]/u,ss=I(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Xt).getRegex(),Gn=/(?!~)[\p{P}\p{S}]/u,os=/(?!~)[\s\p{P}\p{S}]/u,is=/(?:[^\s\p{P}\p{S}]|~)/u,as=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,Wn=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,ls=I(Wn,"u").replace(/punct/g,mt).getRegex(),cs=I(Wn,"u").replace(/punct/g,Gn).getRegex(),jn="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",us=I(jn,"gu").replace(/notPunctSpace/g,Hn).replace(/punctSpace/g,Xt).replace(/punct/g,mt).getRegex(),ps=I(jn,"gu").replace(/notPunctSpace/g,is).replace(/punctSpace/g,os).replace(/punct/g,Gn).getRegex(),hs=I("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Hn).replace(/punctSpace/g,Xt).replace(/punct/g,mt).getRegex(),fs=I(/\\(punct)/,"gu").replace(/punct/g,mt).getRegex(),ds=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(),ms=I(Yt).replace("(?:-->|$)","-->").getRegex(),gs=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",ms).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),pt=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,ks=I(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",pt).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),qn=I(/^!?\[(label)\]\[(ref)\]/).replace("label",pt).replace("ref",Zt).getRegex(),Zn=I(/^!?\[(ref)\](?:\[\])?/).replace("ref",Zt).getRegex(),xs=I("reflink|nolink(?!\\()","g").replace("reflink",qn).replace("nolink",Zn).getRegex(),Qt={_backpedal:Ye,anyPunctuation:fs,autolink:ds,blockSkip:as,br:Fn,code:ns,del:Ye,emStrongLDelim:ls,emStrongRDelimAst:us,emStrongRDelimUnd:hs,escape:ts,link:ks,nolink:Zn,punctuation:ss,reflink:qn,reflinkSearch:xs,tag:gs,text:rs,url:Ye},bs={...Qt,link:I(/^!?\[(label)\]\((.*?)\)/).replace("label",pt).getRegex(),reflink:I(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",pt).getRegex()},Nt={...Qt,emStrongRDelimAst:ps,emStrongLDelim:cs,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.!#$%&'*+\/=?_`{\|}~-]+@)))/},ws={...Nt,br:I(Fn).replace("{2,}","*").getRegex(),text:I(Nt.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},it={normal:Vt,gfm:Jr,pedantic:es},Ue={normal:Qt,gfm:Nt,breaks:ws,pedantic:bs},ys={"&":"&","<":"<",">":">",'"':""","'":"'"},Tn=t=>ys[t];function ue(t,e){if(e){if(X.escapeTest.test(t))return t.replace(X.escapeReplace,Tn)}else if(X.escapeTestNoEncode.test(t))return t.replace(X.escapeReplaceNoEncode,Tn);return t}function _n(t){try{t=encodeURI(t).replace(X.percentDecode,"%")}catch{return null}return t}function An(t,e){const n=t.replace(X.findPipe,(i,a,l)=>{let d=!1,u=a;for(;--u>=0&&l[u]==="\\";)d=!d;return d?"|":" |"}),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 vs(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 Sn(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 d={type:t[0].charAt(0)==="!"?"image":"link",raw:n,href:i,title:a,text:l,tokens:s.inlineTokens(l)};return s.state.inLink=!1,d}function Ts(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{d as C,y as s,z as a,L as g,G as o,B as u,k as B,M as D,N as j,H as M,T as E,C as b,O as T,D as F,P as k,A as t,K as c,E as $,Q as W,R as w,S,g as v,o as L,I as R,J as z}from"./
|
|
1
|
+
import{d as C,y as s,z as a,L as g,G as o,B as u,k as B,M as D,N as j,H as M,T as E,C as b,O as T,D as F,P as k,A as t,K as c,E as $,Q as W,R as w,S,g as v,o as L,I as R,J as z}from"./C9uS_rHl.js";import{u as N,r as A,a as V,b as P,c as U}from"./BGjuZ_aG.js";const H=C({__name:"WorktreeStatusBadge",props:{status:{}},setup(h){const r=h,i=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"}})[r.status]);return(n,p)=>(s(),a("span",{class:g(["px-1.5 py-0.5 text-[10px] font-mono uppercase rounded",o(i).color])},u(o(i).label),3))}}),K={class:"w-full max-w-md mx-4 bg-retro-dark border border-retro-border rounded-lg shadow-xl"},O={class:"flex items-center justify-between px-4 py-3 border-b border-retro-border"},q={key:0,class:"p-2 text-xs font-mono text-retro-red bg-retro-red/10 border border-retro-red/30 rounded"},G=["disabled"],I=["disabled"],J={class:"flex justify-end gap-2 pt-2"},Q=["disabled"],X=["disabled"],Y=C({__name:"WorktreeCreateModal",props:{modelValue:{type:Boolean,default:!1},modelModifiers:{}},emits:["update:modelValue"],setup(h){const r=D(h,"modelValue"),i=N(),n=v(""),p=v(""),m=v(!1),x=v(""),f=async()=>{if(!n.value.trim()){x.value="Description is required";return}m.value=!0,x.value="";try{const d=await i.createWorktree({description:n.value.trim(),shortName:p.value.trim()||void 0});d.success?(n.value="",p.value="",r.value=!1):x.value=d.error||"Failed to create worktree"}catch(d){x.value=d instanceof Error?d.message:"Failed to create worktree"}finally{m.value=!1}},l=()=>{r.value=!1,n.value="",p.value="",x.value=""},_=d=>{d.key==="Escape"&&l()};return j(r,d=>{d?document.addEventListener("keydown",_):document.removeEventListener("keydown",_)}),(d,e)=>(s(),M(E,{to:"body"},[b(T,{"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:F(()=>[r.value?(s(),a("div",{key:0,class:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 backdrop-blur-sm",onClick:k(l,["self"])},[t("div",K,[t("div",O,[e[2]||(e[2]=t("h3",{class:"text-sm font-mono text-retro-text"},"Create Worktree",-1)),t("button",{type:"button",class:"p-1 rounded text-retro-muted hover:text-retro-text hover:bg-retro-panel transition-colors",onClick:l},[b(o(A),{class:"h-4 w-4"})])]),t("form",{class:"p-4 space-y-4",onSubmit:k(f,["prevent"])},[o(x)?(s(),a("div",q,u(o(x)),1)):c("",!0),t("div",null,[e[3]||(e[3]=t("label",{class:"block text-xs font-mono text-retro-muted mb-1"},[$(" Feature Description "),t("span",{class:"text-retro-red"},"*")],-1)),W(t("input",{"onUpdate:modelValue":e[0]||(e[0]=y=>w(n)?n.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:o(m)},null,8,G),[[S,o(n)]]),e[4]||(e[4]=t("p",{class:"mt-1 text-[10px] font-mono text-retro-subtle"}," A brief description of what this feature does ",-1))]),t("div",null,[e[5]||(e[5]=t("label",{class:"block text-xs font-mono text-retro-muted mb-1"},[$(" Short Name "),t("span",{class:"text-retro-subtle"},"(optional)")],-1)),W(t("input",{"onUpdate:modelValue":e[1]||(e[1]=y=>w(p)?p.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:o(m)},null,8,I),[[S,o(p)]]),e[6]||(e[6]=t("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))]),t("div",J,[t("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:o(m),onClick:l}," Cancel ",8,Q),t("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:o(m)||!o(n).trim()},u(o(m)?"Creating...":"Create"),9,X)])],32)])])):c("",!0)]),_:1})]))}}),Z={class:"h-full flex flex-col bg-retro-black"},ee={class:"flex-shrink-0 h-12 flex items-center justify-between px-4 border-b border-retro-border bg-retro-dark"},te={class:"flex items-center gap-2"},oe={key:0,class:"px-4 py-2 bg-retro-red/20 border-b border-retro-red/50"},re={class:"text-xs font-mono text-retro-red"},se={class:"flex-1 overflow-y-auto p-2 space-y-1"},ne={class:"flex items-start justify-between gap-2"},ae={class:"flex-1 min-w-0"},le={class:"flex items-center gap-2"},de={key:0,class:"px-1.5 py-0.5 text-[10px] font-mono uppercase bg-retro-yellow/20 text-retro-yellow rounded"},ie={key:1,class:"px-1.5 py-0.5 text-[10px] font-mono uppercase bg-retro-cyan/20 text-retro-cyan rounded"},ce={key:0,class:"mt-1 text-xs font-mono text-retro-muted truncate"},ue={class:"text-retro-subtle"},pe={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"},xe=["onClick"],be=["onClick"],fe={key:0,class:"mt-2 text-[10px] font-mono text-retro-green"},he={key:0,class:"flex flex-col items-center justify-center py-8 text-center"},ye=C({__name:"WorktreePanel",setup(h){const r=N(),i=v(!1);L(()=>{r.fetchWorktrees()});const n=()=>{r.fetchWorktrees()},p=()=>{i.value=!0},m=async f=>{await r.switchWorktree(f)},x=async f=>{confirm(`Delete worktree "${f}"? This will remove the worktree directory.`)&&await r.deleteWorktree(f,!1)};return(f,l)=>{const _=H,d=Y;return s(),a("div",Z,[t("div",ee,[l[1]||(l[1]=t("h2",{class:"text-sm font-mono text-retro-text"},"Worktrees",-1)),t("div",te,[t("button",{type:"button",class:"p-1.5 rounded text-retro-muted hover:text-retro-cyan hover:bg-retro-panel transition-colors",title:"Refresh",onClick:n},[b(o(V),{class:g(["h-4 w-4",{"animate-spin":o(r).loading}])},null,8,["class"])]),t("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:p},[b(o(P),{class:"h-4 w-4"})])])]),o(r).error?(s(),a("div",oe,[t("p",re,u(o(r).error),1)])):c("",!0),t("div",se,[(s(!0),a(R,null,z(o(r).worktrees,e=>(s(),a("div",{key:e.name,class:g(["group p-3 rounded-md border transition-colors",[e.isCurrent?"bg-retro-cyan/10 border-retro-cyan":"bg-retro-panel border-retro-border hover:border-retro-muted"]])},[t("div",ne,[t("div",ae,[t("div",le,[t("span",{class:g(["font-mono text-sm truncate",e.isCurrent?"text-retro-cyan":"text-retro-text"])},u(e.name),3),b(_,{status:e.status},null,8,["status"]),e.isMain?(s(),a("span",de," main ")):c("",!0),e.isCurrent?(s(),a("span",ie," current ")):c("",!0)]),e.lastCommit?(s(),a("div",ce,[t("span",ue,u(e.lastCommit.shortHash),1),l[2]||(l[2]=t("span",{class:"mx-1"},"·",-1)),t("span",null,u(e.lastCommit.message),1)])):c("",!0),t("div",pe,u(e.path),1)]),t("div",me,[!e.isCurrent&&!e.isMain?(s(),a("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:k(y=>m(e.name),["stop"])},[b(o(V),{class:"h-3.5 w-3.5"})],8,xe)):c("",!0),e.isMain?c("",!0):(s(),a("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:k(y=>x(e.name),["stop"])},[b(o(U),{class:"h-3.5 w-3.5"})],8,be))])]),e.commitCount>0?(s(),a("div",fe,u(e.commitCount)+" commit"+u(e.commitCount>1?"s":"")+" ahead ",1)):c("",!0)],2))),128)),!o(r).loading&&o(r).worktrees.length===0?(s(),a("div",he,[...l[3]||(l[3]=[t("p",{class:"text-sm font-mono text-retro-muted"},"No worktrees found",-1),t("p",{class:"mt-1 text-xs font-mono text-retro-subtle"},"Create a new worktree to start working on a feature",-1)])])):c("",!0)]),b(d,{modelValue:o(i),"onUpdate:modelValue":l[0]||(l[0]=e=>w(i)?i.value=e:null)},null,8,["modelValue"])])}}}),ge=C({__name:"index",setup(h){return(r,i)=>{const n=ye;return s(),M(n)}}});export{ge as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{$ as f,a0 as h,g as m}from"./
|
|
1
|
+
import{$ as f,a0 as h,g as m}from"./C9uS_rHl.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};
|
|
@@ -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"./
|
|
1
|
+
import{_ as s}from"./DlAUqK2U.js";import{x as i,y as a,z as u,A as e,B as o}from"./C9uS_rHl.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-555d49ed"]]);export{b as default};
|