spec-cat 0.1.22 → 0.1.24

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 (52) hide show
  1. package/.output/nitro.json +1 -1
  2. package/.output/public/_nuxt/{D2jWy6Yv.js → 4fNBhYih.js} +1 -1
  3. package/.output/public/_nuxt/{DuDc88rI.js → 9w_2Mmlc.js} +1 -1
  4. package/.output/public/_nuxt/{NsKpYGKU.js → B5CkRg11.js} +1 -1
  5. package/.output/public/_nuxt/BIEXFa_-.js +1 -0
  6. package/.output/public/_nuxt/{B6Qdx9x3.js → BXYy_1q3.js} +1 -1
  7. package/.output/public/_nuxt/{xDSloGc6.js → BwGW6ro4.js} +2 -2
  8. package/.output/public/_nuxt/{CnyGP5yJ.js → C3zox5gF.js} +1 -1
  9. package/.output/public/_nuxt/{CXlw6va7.js → CTvl5rYA.js} +1 -1
  10. package/.output/public/_nuxt/Cdz7yq-9.js +156 -0
  11. package/.output/public/_nuxt/{DYq0avGL.js → D9HkWjwL.js} +1 -1
  12. package/.output/public/_nuxt/{BDt4jGdk.js → DCQ8fVjv.js} +1 -1
  13. package/.output/public/_nuxt/{hWTomhWa.js → DEYVPkjx.js} +1 -1
  14. package/.output/public/_nuxt/builds/latest.json +1 -1
  15. package/.output/public/_nuxt/builds/meta/3ad3d42f-406b-41b2-a79c-2b068cdf0ccd.json +1 -0
  16. package/.output/public/_nuxt/{default.eSO6fRPf.css → default.D3bZ26KV.css} +1 -1
  17. package/.output/public/_nuxt/entry.CE6x3Mpw.css +1 -0
  18. package/.output/public/_nuxt/{CXuoBUW5.js → q7giXQYI.js} +1 -1
  19. package/.output/public/_nuxt/useTheme.Dp77PlfC.css +1 -0
  20. package/.output/server/chunks/_/conversationStore.mjs +13 -1
  21. package/.output/server/chunks/_/conversationStore.mjs.map +1 -1
  22. package/.output/server/chunks/_/jobPersister.mjs +326 -0
  23. package/.output/server/chunks/_/jobPersister.mjs.map +1 -0
  24. package/.output/server/chunks/_/jobQueue.mjs +714 -0
  25. package/.output/server/chunks/_/jobQueue.mjs.map +1 -0
  26. package/.output/server/chunks/build/client.precomputed.mjs +1 -1
  27. package/.output/server/chunks/build/client.precomputed.mjs.map +1 -1
  28. package/.output/server/chunks/nitro/nitro.mjs +651 -643
  29. package/.output/server/chunks/routes/_ws.mjs +133 -527
  30. package/.output/server/chunks/routes/_ws.mjs.map +1 -1
  31. package/.output/server/chunks/routes/api/index.get.mjs +25 -14
  32. package/.output/server/chunks/routes/api/index.get.mjs.map +1 -1
  33. package/.output/server/chunks/routes/api/index.get2.mjs +14 -141
  34. package/.output/server/chunks/routes/api/index.get2.mjs.map +1 -1
  35. package/.output/server/chunks/routes/api/index.get3.mjs +167 -0
  36. package/.output/server/chunks/routes/api/index.get3.mjs.map +1 -0
  37. package/.output/server/chunks/routes/api/index.post.mjs +77 -116
  38. package/.output/server/chunks/routes/api/index.post.mjs.map +1 -1
  39. package/.output/server/chunks/routes/api/index.post2.mjs +149 -0
  40. package/.output/server/chunks/routes/api/index.post2.mjs.map +1 -0
  41. package/.output/server/chunks/routes/api/jobs/_id/cancel.post.mjs +48 -0
  42. package/.output/server/chunks/routes/api/jobs/_id/cancel.post.mjs.map +1 -0
  43. package/.output/server/chunks/routes/api/jobs/_id_.get.mjs +55 -0
  44. package/.output/server/chunks/routes/api/jobs/_id_.get.mjs.map +1 -0
  45. package/.output/server/package.json +1 -1
  46. package/bin/spec-cat.js +15 -0
  47. package/package.json +1 -1
  48. package/.output/public/_nuxt/Ce5fR5lE.js +0 -150
  49. package/.output/public/_nuxt/builds/meta/23707bc3-d223-45cd-b9db-ffcc7aca2680.json +0 -1
  50. package/.output/public/_nuxt/entry.BtencOYX.css +0 -1
  51. package/.output/public/_nuxt/useTheme.CYXKgjUm.css +0 -1
  52. package/.output/public/_nuxt/z5m_gN1E.js +0 -1
@@ -1 +1 @@
1
- import{y as i,z as s,A as n,$ as a}from"./xDSloGc6.js";function l(r,e){return i(),s("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"},[n("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 h(r,e){return i(),s("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"},[n("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 4.5v15m7.5-7.5h-15"})])}function w(r,e){return i(),s("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"},[n("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 k(r,e){return i(),s("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"},[n("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18 18 6M6 6l12 12"})])}const u=a("worktree",{state:()=>({worktrees:[],currentBranch:"",mainWorktree:"",workingDirectory:"",loading:!1,error:null}),getters:{activeWorktree:r=>r.worktrees.find(e=>e.isCurrent),featureWorktrees:r=>r.worktrees.filter(e=>!e.isMain),mainWorktreeInfo:r=>r.worktrees.find(e=>e.isMain),hasWorktrees:r=>r.worktrees.length>1,dirtyWorktrees:r=>r.worktrees.filter(e=>e.status==="dirty")},actions:{async initialize(){if(!this.workingDirectory)try{const{cwd:r}=await $fetch("/api/cwd");this.workingDirectory=r}catch(r){console.error("Failed to get working directory:",r),this.workingDirectory=""}},async fetchWorktrees(){await this.initialize(),this.loading=!0,this.error=null;try{const r=await $fetch("/api/worktrees",{query:{workingDirectory:this.workingDirectory}});this.worktrees=r.worktrees,this.currentBranch=r.currentBranch,this.mainWorktree=r.mainWorktree}catch(r){this.error=r instanceof Error?r.message:"Failed to fetch worktrees",console.error("Failed to fetch worktrees:",r)}finally{this.loading=!1}},async createWorktree(r){await this.initialize(),this.loading=!0,this.error=null;try{const e=await $fetch("/api/worktrees",{method:"POST",query:{workingDirectory:this.workingDirectory},body:r});return e.success&&e.worktree?this.worktrees.push(e.worktree):e.error&&(this.error=e.error),e}catch(e){const t=e instanceof Error?e.message:"Failed to create worktree";return this.error=t,{success:!1,error:t}}finally{this.loading=!1}},async deleteWorktree(r,e=!1){await this.initialize(),this.loading=!0,this.error=null;try{const t=await $fetch(`/api/worktrees/${r}`,{method:"DELETE",query:{workingDirectory:this.workingDirectory,deleteBranch:e.toString()}});return t.success?this.worktrees=this.worktrees.filter(o=>o.name!==r):t.error&&(this.error=t.error),t}catch(t){const o=t instanceof Error?t.message:"Failed to delete worktree";return this.error=o,{success:!1,error:o}}finally{this.loading=!1}},async switchWorktree(r){await this.initialize(),this.loading=!0,this.error=null;try{const e=await $fetch(`/api/worktrees/${r}/switch`,{method:"POST",query:{workingDirectory:this.workingDirectory}});return e.success?(this.worktrees=this.worktrees.map(t=>({...t,isCurrent:t.name===r})),this.currentBranch=r):e.error&&(this.error=e.error),e}catch(e){const t=e instanceof Error?e.message:"Failed to switch worktree";return this.error=t,{success:!1,error:t}}finally{this.loading=!1}},clearError(){this.error=null}}});export{l as a,h as b,w as c,k as r,u};
1
+ import{y as i,z as s,A as n,$ as a}from"./BwGW6ro4.js";function l(r,e){return i(),s("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"},[n("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 h(r,e){return i(),s("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"},[n("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 4.5v15m7.5-7.5h-15"})])}function w(r,e){return i(),s("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"},[n("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 k(r,e){return i(),s("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"},[n("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18 18 6M6 6l12 12"})])}const u=a("worktree",{state:()=>({worktrees:[],currentBranch:"",mainWorktree:"",workingDirectory:"",loading:!1,error:null}),getters:{activeWorktree:r=>r.worktrees.find(e=>e.isCurrent),featureWorktrees:r=>r.worktrees.filter(e=>!e.isMain),mainWorktreeInfo:r=>r.worktrees.find(e=>e.isMain),hasWorktrees:r=>r.worktrees.length>1,dirtyWorktrees:r=>r.worktrees.filter(e=>e.status==="dirty")},actions:{async initialize(){if(!this.workingDirectory)try{const{cwd:r}=await $fetch("/api/cwd");this.workingDirectory=r}catch(r){console.error("Failed to get working directory:",r),this.workingDirectory=""}},async fetchWorktrees(){await this.initialize(),this.loading=!0,this.error=null;try{const r=await $fetch("/api/worktrees",{query:{workingDirectory:this.workingDirectory}});this.worktrees=r.worktrees,this.currentBranch=r.currentBranch,this.mainWorktree=r.mainWorktree}catch(r){this.error=r instanceof Error?r.message:"Failed to fetch worktrees",console.error("Failed to fetch worktrees:",r)}finally{this.loading=!1}},async createWorktree(r){await this.initialize(),this.loading=!0,this.error=null;try{const e=await $fetch("/api/worktrees",{method:"POST",query:{workingDirectory:this.workingDirectory},body:r});return e.success&&e.worktree?this.worktrees.push(e.worktree):e.error&&(this.error=e.error),e}catch(e){const t=e instanceof Error?e.message:"Failed to create worktree";return this.error=t,{success:!1,error:t}}finally{this.loading=!1}},async deleteWorktree(r,e=!1){await this.initialize(),this.loading=!0,this.error=null;try{const t=await $fetch(`/api/worktrees/${r}`,{method:"DELETE",query:{workingDirectory:this.workingDirectory,deleteBranch:e.toString()}});return t.success?this.worktrees=this.worktrees.filter(o=>o.name!==r):t.error&&(this.error=t.error),t}catch(t){const o=t instanceof Error?t.message:"Failed to delete worktree";return this.error=o,{success:!1,error:o}}finally{this.loading=!1}},async switchWorktree(r){await this.initialize(),this.loading=!0,this.error=null;try{const e=await $fetch(`/api/worktrees/${r}/switch`,{method:"POST",query:{workingDirectory:this.workingDirectory}});return e.success?(this.worktrees=this.worktrees.map(t=>({...t,isCurrent:t.name===r})),this.currentBranch=r):e.error&&(this.error=e.error),e}catch(e){const t=e instanceof Error?e.message:"Failed to switch worktree";return this.error=t,{success:!1,error:t}}finally{this.loading=!1}},clearError(){this.error=null}}});export{l as a,h as b,w as c,k as r,u};
@@ -1 +1 @@
1
- import{y as o,z as n,A as r,d as P,K as p,O as k,Q as D,S as j,U as C,B as d,P as m,C as v,G as g,g as B,k as f,M as E}from"./xDSloGc6.js";import{a as V,u as z}from"./BDt4jGdk.js";import{_ as Z}from"./DlAUqK2U.js";function H(e,i){return o(),n("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"},[r("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 M(e,i){return o(),n("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"},[r("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 N(e,i){return o(),n("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"},[r("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 re(e,i){return o(),n("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"},[r("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 I(e,i){return o(),n("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"},[r("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 oe(e,i){return o(),n("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"},[r("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"})])}const K={class:"flex items-start justify-between gap-2"},U={class:"flex-1 min-w-0"},F={key:1,class:"flex items-center gap-2"},G={class:"text-sm font-mono text-retro-text truncate"},O={key:0,class:"text-xs font-mono text-retro-green bg-retro-green/10 px-1.5 py-0.5 rounded flex-shrink-0"},Q={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"},R={class:"text-xs text-retro-muted mt-1 truncate"},Y={class:"text-xs text-retro-muted/60 mt-1"},q={class:"truncate"},J={class:"truncate"},W={class:"truncate"},X=P({__name:"ConversationItem",props:{conversation:{},isActive:{type:Boolean},isStreaming:{type:Boolean},isPreviewing:{type:Boolean}},emits:["select","archive","rename"],setup(e,{emit:i}){const l=e,u=i,c=B(!1),h=B("");function S(){h.value=l.conversation.title,c.value=!0}function b(){const s=h.value.trim();s&&s!==l.conversation.title&&u("rename",s),c.value=!1}function T(){c.value=!1}const y=V();async function w(s){try{await navigator.clipboard.writeText(s),y.success("Copied to clipboard",1500)}catch{y.error("Failed to copy")}}const $=f(()=>{const s=l.conversation.messages;if(!s.length)return"No messages";const t=s[s.length-1],a=t.content.slice(0,60);return a.length<t.content.length?a+"...":a}),L=f(()=>{const s=new Date(l.conversation.updatedAt),a=new Date().getTime()-s.getTime(),x=Math.floor(a/(1e3*60*60*24));return x===0?s.toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit"}):x===1?"Yesterday":x<7?`${x} days ago`:s.toLocaleDateString()});return(s,t)=>(o(),n("div",{class:p(["p-3 rounded border cursor-pointer transition-colors",[e.isPreviewing&&e.isActive?"border-retro-magenta bg-retro-magenta/15 ring-1 ring-retro-magenta/40":e.isPreviewing?"border-retro-magenta/40 bg-retro-magenta/5":e.isActive?"border-retro-cyan/80 bg-retro-cyan/8":"border-retro-border hover:border-retro-cyan/40",e.isStreaming&&e.isPreviewing&&e.isActive?"streaming-preview-active-border":e.isStreaming&&e.isPreviewing?"streaming-preview-border":e.isStreaming?"streaming-border":"",e.conversation.finalized?"opacity-50":""]]),onClick:t[8]||(t[8]=a=>u("select"))},[r("div",K,[r("div",U,[c.value?(o(),n("div",{key:0,class:"flex gap-2",onClick:t[1]||(t[1]=k(()=>{},["stop"]))},[D(r("input",{"onUpdate:modelValue":t[0]||(t[0]=a=>h.value=a),onKeyup:[C(b,["enter"]),C(T,["escape"])],onBlur:b,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),[[j,h.value]])])):(o(),n("div",F,[r("h3",G,d(e.conversation.title),1),e.conversation.finalized?(o(),n("span",O," finalized ")):e.isPreviewing?(o(),n("span",{key:1,class:p(["text-xs font-mono px-1.5 py-0.5 rounded border border-retro-magenta/30 flex-shrink-0",e.isActive?"text-retro-magenta bg-retro-magenta/15":"text-retro-magenta/80 bg-retro-magenta/5"])}," previewing ",2)):m("",!0),e.isStreaming?(o(),n("span",Q," streaming ")):m("",!0)])),r("p",R,d($.value),1),r("p",Y,d(L.value),1),e.conversation.worktreeBranch||e.conversation.baseBranch?(o(),n("div",{key:2,class:"mt-1.5 flex flex-wrap gap-1",onClick:t[5]||(t[5]=k(()=>{},["stop"]))},[e.conversation.baseBranch?(o(),n("button",{key:0,onClick:t[2]||(t[2]=a=>w(e.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"},[v(g(M),{class:"w-3 h-3 flex-shrink-0"}),r("span",q,"base: "+d(e.conversation.baseBranch),1)])):m("",!0),r("button",{onClick:t[3]||(t[3]=a=>w(e.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"},[v(g(M),{class:"w-3 h-3 flex-shrink-0"}),r("span",J,d(e.conversation.worktreeBranch),1)]),e.conversation.worktreePath?(o(),n("button",{key:1,onClick:t[4]||(t[4]=a=>w(e.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"},[v(g(N),{class:"w-3 h-3 flex-shrink-0"}),r("span",W,d(e.conversation.worktreePath),1)])):m("",!0)])):m("",!0)]),r("div",{class:"flex gap-1 flex-shrink-0",onClick:t[7]||(t[7]=k(()=>{},["stop"]))},[r("button",{onClick:S,class:"p-1 hover:bg-retro-panel rounded transition-colors",title:"Rename conversation"},[v(g(I),{class:"w-4 h-4 text-retro-muted hover:text-retro-cyan"})]),r("button",{onClick:t[6]||(t[6]=a=>u("archive")),class:"p-1 hover:bg-retro-cyan/20 rounded transition-colors",title:"Archive conversation"},[v(g(H),{class:"w-4 h-4 text-retro-muted hover:text-retro-cyan"})])])])],2))}}),ne=Z(X,[["__scopeId","data-v-0e13e376"]]);function A(e){typeof document>"u"||(e==="dark"?document.documentElement.classList.add("dark"):document.documentElement.classList.remove("dark"),document.cookie=`spec-cat-theme=${e};path=/;SameSite=Lax`)}function se(){const e=z(),i=f(()=>e.theme),l=f(()=>e.theme==="dark");function u(){const c=e.theme==="dark"?"light":"dark";e.setTheme(c),A(c)}return E(()=>e.theme,c=>{A(c)},{immediate:!0}),{theme:i,isDark:l,toggleTheme:u}}export{ne as C,re as a,N as b,I as c,M as d,H as e,oe as r,se as u};
1
+ import{y as o,z as n,A as r,d as P,K as p,O as k,Q as D,S as j,U as C,B as d,P as m,C as v,G as g,g as B,k as f,M as E}from"./BwGW6ro4.js";import{a as V,u as z}from"./DCQ8fVjv.js";import{_ as Z}from"./DlAUqK2U.js";function H(e,i){return o(),n("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"},[r("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 M(e,i){return o(),n("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"},[r("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 N(e,i){return o(),n("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"},[r("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 re(e,i){return o(),n("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"},[r("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 I(e,i){return o(),n("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"},[r("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 oe(e,i){return o(),n("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"},[r("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"})])}const K={class:"flex items-start justify-between gap-2"},U={class:"flex-1 min-w-0"},F={key:1,class:"flex items-center gap-2"},G={class:"text-sm font-mono text-retro-text truncate"},O={key:0,class:"text-xs font-mono text-retro-green bg-retro-green/10 px-1.5 py-0.5 rounded flex-shrink-0"},Q={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"},R={class:"text-xs text-retro-muted mt-1 truncate"},Y={class:"text-xs text-retro-muted/60 mt-1"},q={class:"truncate"},J={class:"truncate"},W={class:"truncate"},X=P({__name:"ConversationItem",props:{conversation:{},isActive:{type:Boolean},isStreaming:{type:Boolean},isPreviewing:{type:Boolean}},emits:["select","archive","rename"],setup(e,{emit:i}){const l=e,u=i,c=B(!1),h=B("");function S(){h.value=l.conversation.title,c.value=!0}function b(){const s=h.value.trim();s&&s!==l.conversation.title&&u("rename",s),c.value=!1}function T(){c.value=!1}const y=V();async function w(s){try{await navigator.clipboard.writeText(s),y.success("Copied to clipboard",1500)}catch{y.error("Failed to copy")}}const $=f(()=>{const s=l.conversation.messages;if(!s.length)return"No messages";const t=s[s.length-1],a=t.content.slice(0,60);return a.length<t.content.length?a+"...":a}),L=f(()=>{const s=new Date(l.conversation.updatedAt),a=new Date().getTime()-s.getTime(),x=Math.floor(a/(1e3*60*60*24));return x===0?s.toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit"}):x===1?"Yesterday":x<7?`${x} days ago`:s.toLocaleDateString()});return(s,t)=>(o(),n("div",{class:p(["p-3 rounded border cursor-pointer transition-colors",[e.isPreviewing&&e.isActive?"border-retro-magenta bg-retro-magenta/15 ring-1 ring-retro-magenta/40":e.isPreviewing?"border-retro-magenta/40 bg-retro-magenta/5":e.isActive?"border-retro-cyan/80 bg-retro-cyan/8":"border-retro-border hover:border-retro-cyan/40",e.isStreaming&&e.isPreviewing&&e.isActive?"streaming-preview-active-border":e.isStreaming&&e.isPreviewing?"streaming-preview-border":e.isStreaming&&e.isActive?"streaming-active-border":e.isStreaming?"streaming-border":"",e.conversation.finalized?"opacity-50":""]]),onClick:t[8]||(t[8]=a=>u("select"))},[r("div",K,[r("div",U,[c.value?(o(),n("div",{key:0,class:"flex gap-2",onClick:t[1]||(t[1]=k(()=>{},["stop"]))},[D(r("input",{"onUpdate:modelValue":t[0]||(t[0]=a=>h.value=a),onKeyup:[C(b,["enter"]),C(T,["escape"])],onBlur:b,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),[[j,h.value]])])):(o(),n("div",F,[r("h3",G,d(e.conversation.title),1),e.conversation.finalized?(o(),n("span",O," finalized ")):e.isPreviewing?(o(),n("span",{key:1,class:p(["text-xs font-mono px-1.5 py-0.5 rounded border border-retro-magenta/30 flex-shrink-0",e.isActive?"text-retro-magenta bg-retro-magenta/15":"text-retro-magenta/80 bg-retro-magenta/5"])}," previewing ",2)):m("",!0),e.isStreaming?(o(),n("span",Q," streaming ")):m("",!0)])),r("p",R,d($.value),1),r("p",Y,d(L.value),1),e.conversation.worktreeBranch||e.conversation.baseBranch?(o(),n("div",{key:2,class:"mt-1.5 flex flex-wrap gap-1",onClick:t[5]||(t[5]=k(()=>{},["stop"]))},[e.conversation.baseBranch?(o(),n("button",{key:0,onClick:t[2]||(t[2]=a=>w(e.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"},[v(g(M),{class:"w-3 h-3 flex-shrink-0"}),r("span",q,"base: "+d(e.conversation.baseBranch),1)])):m("",!0),r("button",{onClick:t[3]||(t[3]=a=>w(e.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"},[v(g(M),{class:"w-3 h-3 flex-shrink-0"}),r("span",J,d(e.conversation.worktreeBranch),1)]),e.conversation.worktreePath?(o(),n("button",{key:1,onClick:t[4]||(t[4]=a=>w(e.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"},[v(g(N),{class:"w-3 h-3 flex-shrink-0"}),r("span",W,d(e.conversation.worktreePath),1)])):m("",!0)])):m("",!0)]),r("div",{class:"flex gap-1 flex-shrink-0",onClick:t[7]||(t[7]=k(()=>{},["stop"]))},[r("button",{onClick:S,class:"p-1 hover:bg-retro-panel rounded transition-colors",title:"Rename conversation"},[v(g(I),{class:"w-4 h-4 text-retro-muted hover:text-retro-cyan"})]),r("button",{onClick:t[6]||(t[6]=a=>u("archive")),class:"p-1 hover:bg-retro-cyan/20 rounded transition-colors",title:"Archive conversation"},[v(g(H),{class:"w-4 h-4 text-retro-muted hover:text-retro-cyan"})])])])],2))}}),ne=Z(X,[["__scopeId","data-v-3d162cc0"]]);function A(e){typeof document>"u"||(e==="dark"?document.documentElement.classList.add("dark"):document.documentElement.classList.remove("dark"),document.cookie=`spec-cat-theme=${e};path=/;SameSite=Lax`)}function se(){const e=z(),i=f(()=>e.theme),l=f(()=>e.theme==="dark");function u(){const c=e.theme==="dark"?"light":"dark";e.setTheme(c),A(c)}return E(()=>e.theme,c=>{A(c)},{immediate:!0}),{theme:i,isDark:l,toggleTheme:u}}export{ne as C,re as a,N as b,I as c,M as d,H as e,oe as r,se as u};