claude-session-memory 0.2.0 → 0.3.0
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/README.md +47 -10
- package/dist/cli.js +0 -0
- package/dist/database.js +15 -0
- package/dist/database.js.map +1 -1
- package/dist/server.js +89 -0
- package/dist/server.js.map +1 -1
- package/dist/tools/get-stats.d.ts +7 -2
- package/dist/tools/get-stats.js +22 -0
- package/dist/tools/get-stats.js.map +1 -1
- package/dist/tools/query-memory.js +2 -0
- package/dist/tools/query-memory.js.map +1 -1
- package/dist/tools/review-session.d.ts +19 -0
- package/dist/tools/review-session.js +54 -0
- package/dist/tools/review-session.js.map +1 -0
- package/dist/utils/session-intelligence.d.ts +36 -0
- package/dist/utils/session-intelligence.js +154 -0
- package/dist/utils/session-intelligence.js.map +1 -0
- package/dist/utils/token-savings.d.ts +10 -0
- package/dist/utils/token-savings.js +27 -0
- package/dist/utils/token-savings.js.map +1 -0
- package/dist/web/routes/analytics.js +6 -0
- package/dist/web/routes/analytics.js.map +1 -1
- package/dist/web-dist/assets/AnalyticsPage-B0ZCSmi7.js +3 -0
- package/dist/web-dist/assets/{DashboardPage-DtQ8bcLR.js → DashboardPage-BmkQ7Pir.js} +1 -1
- package/dist/web-dist/assets/{DecisionDetailPage-CoNQF-FB.js → DecisionDetailPage-DSNQOk0G.js} +1 -1
- package/dist/web-dist/assets/{DecisionsPage-F2KA9sQF.js → DecisionsPage-Druu3aUr.js} +1 -1
- package/dist/web-dist/assets/{ImportExportPage-CqhNTw6I.js → ImportExportPage-yQxs-fBD.js} +1 -1
- package/dist/web-dist/assets/{SessionDetailPage-DtQ1Jsmp.js → SessionDetailPage-D0ruOy8B.js} +1 -1
- package/dist/web-dist/assets/{SessionsPage-BVR-mFw1.js → SessionsPage-5lqQKejq.js} +1 -1
- package/dist/web-dist/assets/{SettingsPage-Dluf2etQ.js → SettingsPage-Dj2KkiKe.js} +1 -1
- package/dist/web-dist/assets/{StatCard.vue_vue_type_script_setup_true_lang-DRCbHjfR.js → StatCard.vue_vue_type_script_setup_true_lang-HwJVk8w_.js} +1 -1
- package/dist/web-dist/assets/{TagPill.vue_vue_type_script_setup_true_lang-D3QpKM6-.js → TagPill.vue_vue_type_script_setup_true_lang-CA2dOM-H.js} +1 -1
- package/dist/web-dist/assets/{decisions-D4RIsPGu.js → decisions-zp0xvZqp.js} +1 -1
- package/dist/web-dist/assets/{index-CB5v6K3L.js → index-Bl3DbLj3.js} +2 -2
- package/dist/web-dist/assets/{index-DnStDInH.css → index-CoMkCnBk.css} +1 -1
- package/dist/web-dist/assets/{installCanvasRenderer-ZjWTVaVA.js → installCanvasRenderer-CuEbBLw0.js} +1 -1
- package/dist/web-dist/assets/{sessions-CbnjP7UX.js → sessions-CtlNQ8lw.js} +1 -1
- package/dist/web-dist/assets/useApi-DkK919W_.js +1 -0
- package/dist/web-dist/index.html +2 -2
- package/package.json +1 -1
- package/schema.sql +12 -0
- package/templates/memory-instructions.md +10 -0
- package/dist/web-dist/assets/AnalyticsPage-CFlZyCBZ.js +0 -3
- package/dist/web-dist/assets/useApi-goimj9yG.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as B,m as k,e as N,f as n,g as e,p as T,v as V,F as m,i as v,u as x,t as c,j as w,r as b,b as C,k as P,o,q as h,c as S,w as q,s as A,h as E}from"./index-
|
|
1
|
+
import{a as B,m as k,e as N,f as n,g as e,p as T,v as V,F as m,i as v,u as x,t as c,j as w,r as b,b as C,k as P,o,q as h,c as S,w as q,s as A,h as E}from"./index-Bl3DbLj3.js";import{u as L}from"./decisions-zp0xvZqp.js";import{a as O,_ as K}from"./TagPill.vue_vue_type_script_setup_true_lang-CA2dOM-H.js";import"./useApi-DkK919W_.js";const U={class:"p-8"},G={class:"mb-6"},H={class:"relative"},I={class:"flex gap-8"},J={class:"w-56 flex-shrink-0"},Q={class:"mb-6"},R={class:"space-y-2"},W=["onClick"],X={key:0,class:"material-symbols-outlined text-bg-dark text-xs leading-none",style:{"font-size":"14px"}},Y={class:"flex-1 min-w-0"},Z={class:"bg-bg-dark/40 rounded-xl cyber-border overflow-hidden"},ee={class:"grid grid-cols-[40px_1fr_100px_140px_100px_60px] items-center px-4 py-3 border-b border-primary/10 text-xs font-semibold text-slate-400 uppercase tracking-wider"},te=["checked"],se=["checked","onChange"],ae={class:"min-w-0"},oe={class:"text-sm font-semibold text-white truncate"},le={class:"text-xs text-slate-500 truncate mt-0.5"},ie={class:"flex gap-1 flex-wrap"},re={class:"text-xs text-slate-400"},ne={class:"text-xs text-slate-500 font-mono truncate"},de={key:1,class:"py-20 text-center"},ce={key:2,class:"py-20 text-center text-slate-400"},ue={class:"flex items-center justify-between mt-4"},pe={class:"flex items-center gap-3"},xe={key:0,class:"text-sm text-primary font-bold"},me={class:"flex items-center gap-4"},ve={class:"text-xs text-slate-500"},be={class:"flex gap-1"},ge=["disabled"],fe=["onClick"],he=["disabled"],_=20,Se=B({__name:"DecisionsPage",setup(_e){const i=L(),u=b(""),r=b(["active"]),l=b(1),d=b(new Set),M=["active","deprecated","superseded"];function $(a){const t=r.value.indexOf(a);t>=0?r.value.splice(t,1):r.value.push(a)}function D(){r.value=[],u.value=""}function g(){const a={offset:String((l.value-1)*_),limit:String(_)};r.value.length>0&&(a.status=r.value.join(",")),u.value.trim()&&(a.search=u.value.trim()),i.fetchDecisions(a)}const f=C(()=>Math.max(1,Math.ceil(i.total/_))),y=C(()=>i.decisions.length>0&&i.decisions.every(a=>d.value.has(a.id)));function z(){y.value?d.value.clear():i.decisions.forEach(a=>d.value.add(a.id))}function j(a){d.value.has(a)?d.value.delete(a):d.value.add(a)}return k([r,u],()=>{l.value=1,g()},{deep:!0}),k(l,g),N(g),(a,t)=>{const F=P("router-link");return o(),n("div",U,[e("div",G,[e("div",H,[t[4]||(t[4]=e("span",{class:"material-symbols-outlined absolute left-4 top-1/2 -translate-y-1/2 text-slate-400"},"search",-1)),T(e("input",{"onUpdate:modelValue":t[0]||(t[0]=s=>u.value=s),type:"text",placeholder:"Search Architectural Memory...",class:"w-full pl-12 pr-24 py-3.5 bg-bg-dark/60 border border-primary/20 rounded-xl text-white placeholder-slate-500 focus:outline-none focus:border-primary/50 focus:ring-1 focus:ring-primary/30"},null,512),[[V,u.value]]),t[5]||(t[5]=e("span",{class:"absolute right-4 top-1/2 -translate-y-1/2 text-xs text-slate-500 bg-bg-dark/80 px-2 py-1 rounded border border-primary/10"},"CMD + K",-1))])]),e("div",I,[e("div",J,[e("div",{class:"flex justify-between items-center mb-4"},[t[6]||(t[6]=e("h3",{class:"text-primary font-bold text-sm uppercase tracking-wider"},"Filters",-1)),e("button",{onClick:D,class:"text-xs text-slate-400 hover:text-primary"},"Clear all")]),e("div",Q,[t[7]||(t[7]=e("p",{class:"text-xs font-semibold text-slate-400 uppercase tracking-wider mb-3"},"Status",-1)),e("div",R,[(o(),n(m,null,v(M,s=>e("button",{key:s,onClick:p=>$(s),class:"flex items-center gap-3 cursor-pointer group w-full"},[e("span",{class:h(["w-4 h-4 rounded flex-shrink-0 flex items-center justify-center border transition-colors",r.value.includes(s)?"bg-primary border-primary":"border-slate-600 bg-bg-dark/60 group-hover:border-slate-400"])},[r.value.includes(s)?(o(),n("span",X,"check")):w("",!0)],2),e("span",{class:h(["text-sm capitalize group-hover:text-white transition-colors",r.value.includes(s)?"text-white":"text-slate-400"])},c(s),3)],8,W)),64))])])]),e("div",Y,[e("div",Z,[e("div",ee,[e("div",null,[e("input",{type:"checkbox",checked:y.value,onChange:z,class:"w-4 h-4 rounded border-primary/30 bg-bg-dark text-primary"},null,40,te)]),t[8]||(t[8]=e("div",null,"Title",-1)),t[9]||(t[9]=e("div",null,"Status",-1)),t[10]||(t[10]=e("div",null,"Tags",-1)),t[11]||(t[11]=e("div",null,"Date",-1)),t[12]||(t[12]=e("div",null,"Session",-1))]),x(i).decisions.length>0?(o(!0),n(m,{key:0},v(x(i).decisions,s=>(o(),S(F,{key:s.id,to:`/decisions/${s.id}`,class:"grid grid-cols-[40px_1fr_100px_140px_100px_60px] items-center px-4 py-4 border-b border-primary/5 hover:bg-primary/5 transition-colors"},{default:q(()=>[e("div",{onClick:t[1]||(t[1]=A(()=>{},["prevent"]))},[e("input",{type:"checkbox",checked:d.value.has(s.id),onChange:p=>j(s.id),class:"w-4 h-4 rounded border-primary/30 bg-bg-dark text-primary"},null,40,se)]),e("div",ae,[e("h4",oe,c(s.title),1),e("p",le,c(s.decision),1)]),e("div",null,[E(O,{status:s.status},null,8,["status"])]),e("div",ie,[(o(!0),n(m,null,v(s.tags.slice(0,2),p=>(o(),S(K,{key:p,tag:p},null,8,["tag"]))),128))]),e("div",re,c(s.created_at?.split(" ")[0]),1),e("div",ne,c(s.session_id?.slice(0,6)),1)]),_:2},1032,["to"]))),128)):x(i).loading?(o(),n("div",ce,"Loading...")):(o(),n("div",de,[...t[13]||(t[13]=[e("span",{class:"material-symbols-outlined text-5xl text-primary/30 mb-4"},"cloud_off",-1),e("h4",{class:"text-lg font-semibold text-slate-300"},"No decisions found",-1),e("p",{class:"text-sm text-slate-500 mt-1"},"Try a different query or start a conversation in Claude Code to create new architectural memories.",-1)])]))]),e("div",ue,[e("div",pe,[d.value.size>0?(o(),n("span",xe,c(d.value.size)+" items selected",1)):w("",!0)]),e("div",me,[e("span",ve,"Showing "+c(x(i).decisions.length)+" of "+c(x(i).total)+" memories",1),e("div",be,[e("button",{onClick:t[2]||(t[2]=s=>l.value=Math.max(1,l.value-1)),disabled:l.value<=1,class:"px-3 py-1.5 rounded bg-bg-dark/60 cyber-border text-xs text-slate-400 hover:text-primary disabled:opacity-30"},"<",8,ge),(o(!0),n(m,null,v(Math.min(f.value,5),s=>(o(),n("button",{key:s,onClick:p=>l.value=s,class:h(["px-3 py-1.5 rounded text-xs font-bold",s===l.value?"bg-primary text-bg-dark":"bg-bg-dark/60 cyber-border text-slate-400 hover:text-primary"])},c(s),11,fe))),128)),e("button",{onClick:t[3]||(t[3]=s=>l.value=Math.min(f.value,l.value+1)),disabled:l.value>=f.value,class:"px-3 py-1.5 rounded bg-bg-dark/60 cyber-border text-xs text-slate-400 hover:text-primary disabled:opacity-30"},">",8,he)])])])])])])}}});export{Se as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{d as I,r as p,a as D,f as a,g as e,F as C,i as R,l as x,t as l,q as v,s as j,j as u,u as r,o as n}from"./index-
|
|
1
|
+
import{d as I,r as p,a as D,f as a,g as e,F as C,i as R,l as x,t as l,q as v,s as j,j as u,u as r,o as n}from"./index-Bl3DbLj3.js";import{a as S}from"./useApi-DkK919W_.js";const E=I("import",()=>{const y=p(!1),s=p(!1),i=p(null),c=p(null),d=p(null);async function m(){y.value=!0,d.value=null;try{i.value=await S.scanSessions()}catch(g){d.value=g.message}finally{y.value=!1}}async function f(g){s.value=!0,d.value=null;try{c.value=await S.runImport(g)}catch(h){d.value=h.message}finally{s.value=!1}}function k(){i.value=null,c.value=null,d.value=null}return{scanning:y,importing:s,scanResult:i,importResult:c,error:d,scan:m,runImport:f,reset:k}}),N={class:"p-8"},F={class:"grid grid-cols-1 lg:grid-cols-2 gap-8"},O={class:"bg-bg-dark/40 rounded-xl cyber-border p-6"},B={class:"grid grid-cols-3 gap-3 mb-6"},V=["onClick"],$={class:"bg-bg-dark rounded-lg p-4 cyber-border mb-6 font-mono text-xs text-slate-400 overflow-auto max-h-40"},L={key:0},M={key:1},P={key:2},T=["disabled"],U={class:"bg-bg-dark/40 rounded-xl cyber-border p-6"},A={class:"text-xs text-primary hover:underline cursor-pointer"},J={key:0,class:"mb-6"},z={class:"bg-bg-dark/60 rounded-lg p-4 cyber-border space-y-2"},q={class:"flex items-center gap-2 text-sm"},H={class:"text-slate-300"},Z=["disabled"],G={class:"mt-8"},K={class:"bg-bg-dark/40 rounded-xl cyber-border p-6"},Q=["disabled"],W={key:1,class:"space-y-4"},X={class:"grid grid-cols-3 gap-4"},Y={class:"bg-bg-dark/60 rounded-lg p-4 cyber-border text-center"},tt={class:"text-2xl font-bold text-white"},et={class:"bg-bg-dark/60 rounded-lg p-4 cyber-border text-center"},st={class:"text-2xl font-bold text-primary"},ot={class:"bg-bg-dark/60 rounded-lg p-4 cyber-border text-center"},rt={class:"text-2xl font-bold text-slate-400"},lt={key:0,class:"bg-bg-dark/60 rounded-lg cyber-border overflow-hidden"},at={class:"w-full text-sm"},nt={class:"p-3 text-slate-300 font-mono text-xs truncate max-w-[300px]"},it={class:"p-3 text-right text-white"},dt={class:"p-3 text-right text-primary font-bold"},pt={class:"flex gap-3"},ct=["disabled"],bt={class:"material-symbols-outlined"},ut={key:1,class:"bg-emerald-500/10 border border-emerald-500/30 rounded-lg p-4"},mt={class:"text-sm text-slate-300"},xt={key:2,class:"mt-4 bg-red-500/10 border border-red-500/30 rounded-lg p-4 text-red-400 text-sm"},vt=D({__name:"ImportExportPage",setup(y){const s=E(),i=p("json"),c=p(!1),d=p(null),m=p(!1),f=[{id:"json",label:"JSON",icon:"data_object",desc:"Full structured export"},{id:"markdown",label:"MD",icon:"description",desc:"Human-readable format"},{id:"csv",label:"CSV",icon:"table_chart",desc:"Spreadsheet compatible"}];async function k(){c.value=!0;try{const b=await S.exportData(i.value);let t,o;i.value==="json"?(t=new Blob([JSON.stringify(b,null,2)],{type:"application/json"}),o="memory-export.json"):i.value==="csv"?(t=new Blob([b],{type:"text/csv"}),o="memory-export.csv"):(t=new Blob([b],{type:"text/markdown"}),o="memory-export.md");const _=URL.createObjectURL(t),w=document.createElement("a");w.href=_,w.download=o,w.click(),URL.revokeObjectURL(_)}finally{c.value=!1}}function g(b){m.value=!1;const t=b.dataTransfer?.files;t&&t.length>0&&(d.value=t[0])}function h(b){const t=b.target;t.files&&t.files.length>0&&(d.value=t.files[0])}return(b,t)=>(n(),a("div",N,[t[26]||(t[26]=e("header",{class:"mb-8"},[e("h2",{class:"text-2xl font-extrabold text-white tracking-tight"},"Data Portability"),e("p",{class:"text-slate-400 text-sm mt-1"},"Migrate and extract your datasets with cryptographic integrity.")],-1)),e("div",F,[e("div",O,[t[6]||(t[6]=e("h3",{class:"font-bold text-lg text-white mb-6"},"Export Dataset",-1)),t[7]||(t[7]=e("p",{class:"text-xs font-semibold text-slate-400 uppercase tracking-wider mb-3"},"Output Format",-1)),e("div",B,[(n(),a(C,null,R(f,o=>e("button",{key:o.id,onClick:_=>i.value=o.id,class:v(["p-4 rounded-lg text-center transition-all",i.value===o.id?"neon-border bg-primary/10":"cyber-border bg-bg-dark/60 hover:bg-primary/5"])},[e("span",{class:v(["material-symbols-outlined text-2xl mb-1",i.value===o.id?"text-primary":"text-slate-400"])},l(o.icon),3),e("p",{class:v(["text-sm font-bold",i.value===o.id?"text-primary":"text-slate-300"])},l(o.label),3)],10,V)),64))]),t[8]||(t[8]=e("p",{class:"text-xs font-semibold text-slate-400 uppercase tracking-wider mb-3"},"Schema Preview",-1)),e("div",$,[i.value==="json"?(n(),a("pre",L,`{
|
|
2
2
|
"version": "1.0",
|
|
3
3
|
"exported_at": "...",
|
|
4
4
|
"decisions": [...],
|
package/dist/web-dist/assets/{SessionDetailPage-DtQ1Jsmp.js → SessionDetailPage-D0ruOy8B.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as y,e as b,f as o,g as s,h as n,w as _,t as l,j as d,F as p,i as x,u as k,b as v,k as S,x as w,o as a,l as D,c as C}from"./index-
|
|
1
|
+
import{a as y,e as b,f as o,g as s,h as n,w as _,t as l,j as d,F as p,i as x,u as k,b as v,k as S,x as w,o as a,l as D,c as C}from"./index-Bl3DbLj3.js";import{u as B}from"./sessions-CtlNQ8lw.js";import{_ as c}from"./StatCard.vue_vue_type_script_setup_true_lang-HwJVk8w_.js";import{a as N,_ as V}from"./TagPill.vue_vue_type_script_setup_true_lang-CA2dOM-H.js";import"./useApi-DkK919W_.js";const $={key:0,class:"p-8"},E={class:"flex items-center gap-2 text-sm mb-6"},F={class:"text-primary font-medium"},L={class:"mb-8"},M={class:"text-2xl font-bold text-white tracking-tight mb-2"},T={class:"flex items-center gap-4 text-sm text-slate-400"},j={key:0},I={key:0,class:"text-slate-400 mt-3"},P={class:"grid grid-cols-1 md:grid-cols-3 gap-6 mb-8"},R={class:"bg-bg-dark/40 rounded-xl cyber-border p-6"},q={class:"space-y-0"},z={class:"flex flex-col items-center"},A={key:0,class:"w-0.5 flex-1 bg-primary/20 my-1"},G={class:"flex items-center gap-3 mb-1"},H={class:"text-xs text-slate-500"},J={class:"text-sm font-semibold text-white group-hover:text-primary transition-colors"},K={class:"flex gap-1 mt-2"},O={key:1,class:"p-8 text-center py-20 text-slate-400"},Q={key:2,class:"p-8 text-center py-20"},es=y({__name:"SessionDetailPage",setup(U){const g=w(),r=B(),f=v(()=>g.params.id);b(()=>r.fetchSessionDetail(f.value));const t=v(()=>r.detail);return(W,e)=>{const u=S("router-link");return t.value?(a(),o("div",$,[s("nav",E,[n(u,{to:"/sessions",class:"text-slate-400 hover:text-primary transition-colors"},{default:_(()=>[...e[0]||(e[0]=[D("Sessions",-1)])]),_:1}),e[1]||(e[1]=s("span",{class:"text-slate-600"},">",-1)),s("span",F,"#"+l(t.value.id.slice(0,8)),1)]),s("header",L,[s("h2",M,"Session #"+l(t.value.id.slice(0,8)),1),s("div",T,[s("span",null,"Started: "+l(t.value.started_at),1),t.value.ended_at?(a(),o("span",j,"Ended: "+l(t.value.ended_at),1)):d("",!0)]),t.value.summary?(a(),o("p",I,l(t.value.summary),1)):d("",!0)]),s("div",P,[n(c,{label:"Decisions Made",value:t.value.decision_count,icon:"psychology"},null,8,["value"]),n(c,{label:"Duration",value:"—",icon:"schedule"}),n(c,{label:"Status",value:"Complete",icon:"check_circle"})]),s("div",R,[e[3]||(e[3]=s("h3",{class:"font-bold text-lg text-white mb-6"},"Decision Timeline",-1)),s("div",q,[(a(!0),o(p,null,x(t.value.decisions,(i,h)=>(a(),o("div",{key:i.id,class:"flex gap-4"},[s("div",z,[e[2]||(e[2]=s("div",{class:"w-3 h-3 rounded-full bg-primary shadow-[0_0_8px_rgba(13,242,242,0.4)] mt-1.5"},null,-1)),h<t.value.decisions.length-1?(a(),o("div",A)):d("",!0)]),n(u,{to:`/decisions/${i.id}`,class:"pb-6 flex-1 group"},{default:_(()=>[s("div",G,[n(N,{status:i.status},null,8,["status"]),s("span",H,l(i.created_at),1)]),s("h4",J,l(i.title),1),s("div",K,[(a(!0),o(p,null,x(i.tags,m=>(a(),C(V,{key:m,tag:m},null,8,["tag"]))),128))])]),_:2},1032,["to"])]))),128))])])])):k(r).loading?(a(),o("div",O,"Loading...")):(a(),o("div",Q,[...e[4]||(e[4]=[s("span",{class:"material-symbols-outlined text-5xl text-primary/30 mb-4"},"error",-1),s("h3",{class:"text-lg text-slate-300"},"Session not found",-1)])]))}}});export{es as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as V}from"./sessions-
|
|
1
|
+
import{u as V}from"./sessions-CtlNQ8lw.js";import{_ as f}from"./StatCard.vue_vue_type_script_setup_true_lang-HwJVk8w_.js";import{a as $,_ as E}from"./TagPill.vue_vue_type_script_setup_true_lang-CA2dOM-H.js";import{a as N}from"./useApi-DkK919W_.js";import{a as T,e as B,f as l,g as s,h as c,u as p,F as g,i as v,j as x,b as L,k as j,o,q as y,t as i,l as _,w as k,c as F,r as w}from"./index-Bl3DbLj3.js";const A={class:"p-8"},M={class:"grid grid-cols-1 md:grid-cols-3 gap-6 mb-8"},P={class:"space-y-4"},q=["onClick"],z={class:"flex-1 min-w-0"},H={class:"flex items-center gap-3 mb-2"},O={class:"text-lg font-bold text-white"},R={class:"flex items-center gap-4 text-xs text-slate-500 mb-2"},G={class:"flex items-center gap-1"},J={class:"flex items-center gap-1"},K={class:"flex items-center gap-1"},Q={key:0,class:"text-sm text-slate-400 line-clamp-2"},U={key:0,class:"px-6 pb-6 border-t border-primary/10"},W={key:0,class:"space-y-0"},X={class:"flex flex-col items-center"},Y={key:0,class:"w-0.5 flex-1 bg-primary/20 my-1"},Z={class:"flex items-center gap-2 mb-1"},I={class:"text-xs text-slate-500"},ss={class:"text-sm font-semibold text-white group-hover:text-primary transition-colors"},es={class:"flex gap-1 mt-1"},ts={key:1,class:"text-sm text-slate-500 py-4"},os={key:0,class:"text-center py-20 text-slate-400"},ls={key:1,class:"text-center py-20"},us=T({__name:"SessionsPage",setup(as){const a=V(),d=w(null),u=w({});B(()=>{a.fetchSessions({offset:"0",limit:"50"})});function S(n){if(d.value===n){d.value=null;return}d.value=n,u.value[n]||N.getSession(n).then(e=>{u.value[n]=e.decisions||[]})}const C=L(()=>a.sessions.length===0?0:(a.sessions.reduce((e,m)=>e+(m.decision_count||0),0)/a.sessions.length).toFixed(1));return(n,e)=>{const m=j("router-link");return o(),l("div",A,[e[7]||(e[7]=s("header",{class:"flex justify-between items-center mb-8"},[s("div",null,[s("h2",{class:"text-2xl font-bold text-white tracking-tight"},"Session History")])],-1)),s("div",M,[c(f,{label:"Total Sessions",value:p(a).total,icon:"history"},null,8,["value"]),c(f,{label:"Avg Decisions",value:C.value,icon:"psychology"},null,8,["value"]),c(f,{label:"Success Rate",value:"98.2%",icon:"check_circle"})]),s("div",P,[(o(!0),l(g,null,v(p(a).sessions,(t,b)=>(o(),l("div",{key:t.id,class:y(["bg-bg-dark/40 rounded-xl overflow-hidden transition-all",d.value===t.id?"neon-border":"cyber-border"])},[s("button",{onClick:r=>S(t.id),class:"w-full p-6 flex items-start justify-between text-left hover:bg-primary/5 transition-colors"},[s("div",z,[s("div",H,[s("h3",O,"Session #"+i(t.id.slice(0,8)),1),s("span",{class:y(["px-2.5 py-1 rounded-full text-[10px] font-bold border uppercase",b===0?"bg-emerald-500/20 text-emerald-400 border-emerald-500/30":"bg-slate-500/20 text-slate-400 border-slate-500/30"])},i(b===0?"ACTIVE":"COMPLETED"),3)]),s("div",R,[s("span",G,[e[0]||(e[0]=s("span",{class:"material-symbols-outlined text-sm"},"calendar_today",-1)),_(" "+i(t.started_at?.split(" ")[0]),1)]),s("span",J,[e[1]||(e[1]=s("span",{class:"material-symbols-outlined text-sm"},"schedule",-1)),_(" "+i(t.started_at?.split(" ")[1]?.slice(0,5)),1)]),s("span",K,[e[2]||(e[2]=s("span",{class:"material-symbols-outlined text-sm"},"psychology",-1)),_(" "+i(t.decision_count)+" Decisions ",1)])]),t.summary?(o(),l("p",Q,i(t.summary),1)):x("",!0)]),s("span",{class:y(["material-symbols-outlined text-slate-500 transition-transform",{"rotate-180":d.value===t.id}])},"expand_more",2)],8,q),d.value===t.id?(o(),l("div",U,[e[5]||(e[5]=s("h4",{class:"text-xs font-bold text-primary uppercase tracking-wider mt-4 mb-4"},"Decision Timeline",-1)),u.value[t.id]?(o(),l("div",W,[(o(!0),l(g,null,v(u.value[t.id],(r,D)=>(o(),l("div",{key:r.id,class:"flex gap-4"},[s("div",X,[e[3]||(e[3]=s("div",{class:"w-3 h-3 rounded-full bg-primary shadow-[0_0_8px_rgba(13,242,242,0.4)] mt-1.5"},null,-1)),D<u.value[t.id].length-1?(o(),l("div",Y)):x("",!0)]),c(m,{to:`/decisions/${r.id}`,class:"pb-4 flex-1 group"},{default:k(()=>[s("div",Z,[c($,{status:r.status},null,8,["status"]),s("span",I,i(r.created_at?.split(" ")[1]?.slice(0,5)),1)]),s("h5",ss,i(r.title),1),s("div",es,[(o(!0),l(g,null,v(r.tags?.slice(0,3),h=>(o(),F(E,{key:h,tag:h},null,8,["tag"]))),128))])]),_:2},1032,["to"])]))),128))])):(o(),l("div",ts,"Loading decisions...")),c(m,{to:`/sessions/${t.id}`,class:"mt-2 text-xs text-primary hover:underline font-medium"},{default:k(()=>[...e[4]||(e[4]=[_("View full session details",-1)])]),_:1},8,["to"])])):x("",!0)],2))),128))]),p(a).loading?(o(),l("div",os,"Loading...")):p(a).sessions.length===0?(o(),l("div",ls,[...e[6]||(e[6]=[s("span",{class:"material-symbols-outlined text-5xl text-primary/30 mb-4"},"history",-1),s("h4",{class:"text-lg font-semibold text-slate-300"},"No sessions found",-1)])])):x("",!0)])}}});export{us as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as A,r as l,a as I,e as D,f as x,y as f,F as j,g as e,t as o,q as R,u as g,j as y,p as F,v as L,z as M,l as _,s as z,b as B,o as p}from"./index-
|
|
1
|
+
import{d as A,r as l,a as I,e as D,f as x,y as f,F as j,g as e,t as o,q as R,u as g,j as y,p as F,v as L,z as M,l as _,s as z,b as B,o as p}from"./index-Bl3DbLj3.js";import{a as b}from"./useApi-DkK919W_.js";const N=A("settings",()=>{const h=l(null),s=l(null),i=l(!1);async function r(){i.value=!0;try{h.value=await b.getDatabaseInfo()}finally{i.value=!1}}async function d(){s.value=await b.getApiKeyStatus()}async function n(w){s.value=await b.saveApiKey(w)}async function u(){s.value=await b.removeApiKey()}async function c(){await b.vacuum(),await r()}async function a(){await b.rebuildFts()}return{dbInfo:h,apiKeyStatus:s,loading:i,fetchDatabaseInfo:r,fetchApiKeyStatus:d,saveApiKey:n,removeApiKey:u,vacuum:c,rebuildFts:a}}),P={class:"p-8"},V={class:"grid grid-cols-1 lg:grid-cols-2 gap-6 mb-8"},T={class:"bg-bg-dark/40 rounded-xl cyber-border p-6"},$={class:"space-y-4"},E={class:"flex justify-between items-center"},O={class:"text-sm text-slate-200 font-mono text-right max-w-[60%] truncate"},U={class:"flex justify-between items-center"},Y={class:"text-sm text-white font-bold"},H={class:"flex justify-between items-center"},q={class:"flex items-center gap-2"},G={class:"text-sm text-white font-medium"},W={class:"bg-bg-dark/40 rounded-xl cyber-border p-6"},Z={class:"space-y-4"},J={class:"flex justify-between items-center"},Q={class:"text-sm text-white font-bold"},X={class:"bg-bg-dark/40 rounded-xl cyber-border p-6 mb-8",id:"api-key"},ee={key:0,class:"flex items-center justify-between p-3 bg-emerald-500/5 border border-emerald-500/20 rounded-lg mb-4"},te={class:"flex items-center gap-3"},se={class:"text-xs text-slate-500 font-mono"},ae={class:"flex gap-3"},le=["disabled"],ne={key:1,class:"mt-3 text-xs text-emerald-400 flex items-center gap-1"},ie={class:"grid grid-cols-1 lg:grid-cols-2 gap-4 mb-8"},oe=["disabled"],re=["disabled"],de={class:"bg-bg-dark/40 rounded-xl border border-red-500/30 p-6 flex items-center justify-between"},ue={class:"bg-bg-dark rounded-xl border border-red-500/30 p-6 max-w-md w-full mx-4"},ce={key:1,class:"text-center py-20 text-slate-400"},pe=I({__name:"SettingsPage",setup(h){const s=N(),i=l(!1),r=l(!1),d=l(!1),n=l(""),u=l(!1),c=l(!1);D(()=>{s.fetchDatabaseInfo(),s.fetchApiKeyStatus()});const a=B(()=>s.dbInfo);function w(m){return m<1024?`${m} B`:m<1024*1024?`${(m/1024).toFixed(1)} KB`:`${(m/(1024*1024)).toFixed(1)} MB`}async function S(){i.value=!0;try{await s.vacuum()}finally{i.value=!1}}async function K(){r.value=!0;try{await s.rebuildFts()}finally{r.value=!1}}async function k(){if(n.value.trim()){u.value=!0,c.value=!1;try{await s.saveApiKey(n.value.trim()),n.value="",c.value=!0,setTimeout(()=>c.value=!1,3e3)}finally{u.value=!1}}}async function C(){await s.removeApiKey()}return(m,t)=>(p(),x("div",P,[t[22]||(t[22]=f('<nav class="flex items-center gap-2 text-sm mb-6"><span class="text-slate-400">Settings</span><span class="text-slate-600">></span><span class="text-primary font-medium">Database Settings</span></nav><header class="mb-8"><h2 class="text-2xl font-extrabold text-white tracking-tight">Database Settings</h2><p class="text-slate-400 text-sm mt-1">Configure local storage, health parameters, and search indexing for your MCP instance.</p></header>',2)),a.value?(p(),x(j,{key:0},[e("div",V,[e("div",T,[t[7]||(t[7]=e("div",{class:"flex items-center gap-3 mb-6"},[e("span",{class:"material-symbols-outlined text-primary"},"storage"),e("h3",{class:"font-bold text-lg text-white"},"Database Information")],-1)),e("dl",$,[e("div",E,[t[4]||(t[4]=e("dt",{class:"text-sm text-slate-400"},"Path",-1)),e("dd",O,o(a.value.path),1)]),e("div",U,[t[5]||(t[5]=e("dt",{class:"text-sm text-slate-400"},"Size",-1)),e("dd",Y,o(w(a.value.sizeBytes)),1)]),e("div",H,[t[6]||(t[6]=e("dt",{class:"text-sm text-slate-400"},"WAL Mode",-1)),e("dd",q,[e("div",{class:R(["w-2 h-2 rounded-full",a.value.walEnabled?"bg-emerald-500 shadow-[0_0_8px_rgba(16,185,129,0.6)]":"bg-red-500"])},null,2),e("span",G,o(a.value.walEnabled?"Enabled":"Disabled"),1)])])])]),e("div",W,[t[10]||(t[10]=e("div",{class:"flex items-center gap-3 mb-6"},[e("span",{class:"material-symbols-outlined text-primary"},"dns"),e("h3",{class:"font-bold text-lg text-white"},"MCP Server")],-1)),e("dl",Z,[t[9]||(t[9]=f('<div class="flex justify-between items-center"><dt class="text-sm text-slate-400">Registration</dt><dd class="text-sm text-slate-200">Registered (Local)</dd></div><div class="flex justify-between items-center"><dt class="text-sm text-slate-400">Health Status</dt><dd class="flex items-center gap-2"><span class="px-2.5 py-1 rounded-full text-[10px] font-bold bg-emerald-500/20 text-emerald-400 border border-emerald-500/30">HEALTHY</span></dd></div>',2)),e("div",J,[t[8]||(t[8]=e("dt",{class:"text-sm text-slate-400"},"Records",-1)),e("dd",Q,o(a.value.decisionCount)+" decisions, "+o(a.value.sessionCount)+" sessions",1)])])])]),e("div",X,[t[14]||(t[14]=e("div",{class:"flex items-center gap-3 mb-6"},[e("span",{class:"material-symbols-outlined text-primary"},"key"),e("h3",{class:"font-bold text-lg text-white"},"Anthropic API Key")],-1)),t[15]||(t[15]=e("p",{class:"text-sm text-slate-400 mb-4"},"Required for the AI Coach feature on the Insights page. Your key is stored locally in the database and never sent anywhere except Anthropic's API.",-1)),g(s).apiKeyStatus?.configured?(p(),x("div",ee,[e("div",te,[t[11]||(t[11]=e("div",{class:"w-2 h-2 rounded-full bg-emerald-500 shadow-[0_0_8px_rgba(16,185,129,0.6)]"},null,-1)),t[12]||(t[12]=e("span",{class:"text-sm text-emerald-400 font-medium"},"Key configured",-1)),e("span",se,o(g(s).apiKeyStatus.maskedKey),1)]),e("button",{onClick:C,class:"text-xs text-red-400 hover:text-red-300 transition-colors"},"Remove")])):y("",!0),e("div",ae,[F(e("input",{"onUpdate:modelValue":t[0]||(t[0]=v=>n.value=v),type:"password",placeholder:"sk-ant-api03-...",class:"flex-1 bg-bg-dark border border-primary/20 rounded-lg px-4 py-2.5 text-sm text-slate-200 placeholder-slate-600 focus:outline-none focus:border-primary/50 transition-colors font-mono",onKeydown:M(k,["enter"])},null,544),[[L,n.value]]),e("button",{onClick:k,disabled:!n.value.trim()||u.value,class:"bg-primary hover:bg-primary/80 disabled:bg-primary/30 disabled:cursor-not-allowed text-bg-dark px-6 py-2.5 rounded-lg font-bold text-sm transition-all"},o(u.value?"Saving...":g(s).apiKeyStatus?.configured?"Update Key":"Save Key"),9,le)]),c.value?(p(),x("div",ne,[...t[13]||(t[13]=[e("span",{class:"material-symbols-outlined text-sm"},"check_circle",-1),_(" API key saved successfully ",-1)])])):y("",!0)]),t[21]||(t[21]=e("h3",{class:"font-bold text-lg text-white mb-4"},"Maintenance Operations",-1)),e("div",ie,[e("button",{onClick:S,disabled:i.value,class:"bg-bg-dark/40 rounded-xl cyber-border p-6 text-left hover:bg-primary/5 transition-colors flex items-center justify-between group"},[...t[16]||(t[16]=[f('<div class="flex items-center gap-4"><span class="material-symbols-outlined text-primary text-2xl">cleaning_services</span><div><h4 class="font-semibold text-white group-hover:text-primary transition-colors">Vacuum Database</h4><p class="text-xs text-slate-500 mt-0.5">Optimize and reclaim unused storage space</p></div></div><span class="material-symbols-outlined text-slate-500">chevron_right</span>',2)])],8,oe),e("button",{onClick:K,disabled:r.value,class:"bg-bg-dark/40 rounded-xl cyber-border p-6 text-left hover:bg-primary/5 transition-colors flex items-center justify-between group"},[...t[17]||(t[17]=[f('<div class="flex items-center gap-4"><span class="material-symbols-outlined text-primary text-2xl">manage_search</span><div><h4 class="font-semibold text-white group-hover:text-primary transition-colors">Rebuild Search Index</h4><p class="text-xs text-slate-500 mt-0.5">Refresh full-text search capabilities</p></div></div><span class="material-symbols-outlined text-slate-500">chevron_right</span>',2)])],8,re)]),e("div",de,[t[18]||(t[18]=e("div",null,[e("h4",{class:"font-bold text-red-400 flex items-center gap-2"},[e("span",{class:"text-lg"},"⚠"),_(" Danger Zone ")]),e("p",{class:"text-sm text-slate-400 mt-1"},"Irreversibly delete all database records and reset the system to factory state.")],-1)),e("button",{onClick:t[1]||(t[1]=v=>d.value=!0),class:"bg-red-500/20 hover:bg-red-500/30 text-red-400 border border-red-500/30 font-bold py-2.5 px-6 rounded-lg transition-colors flex-shrink-0"},"Reset Database")]),d.value?(p(),x("div",{key:0,class:"fixed inset-0 bg-black/60 flex items-center justify-center z-50",onClick:t[3]||(t[3]=z(v=>d.value=!1,["self"]))},[e("div",ue,[t[19]||(t[19]=e("h4",{class:"font-bold text-red-400 text-lg mb-2"},"Reset Database?",-1)),t[20]||(t[20]=e("p",{class:"text-sm text-slate-400 mb-6"},"This action is not available via the web UI for safety. Use the CLI instead.",-1)),e("button",{onClick:t[2]||(t[2]=v=>d.value=!1),class:"w-full bg-slate-700 hover:bg-slate-600 text-white font-bold py-2.5 rounded-lg"},"Close")])])):y("",!0)],64)):g(s).loading?(p(),x("div",ce,"Loading...")):y("",!0),t[23]||(t[23]=f('<div class="mt-12 text-center space-y-2"><div class="flex items-center justify-center gap-6 text-xs text-slate-500"><span class="flex items-center gap-1"><span class="material-symbols-outlined text-sm">lock</span> LOCAL-FIRST</span><span>·</span><span class="flex items-center gap-1"><span class="material-symbols-outlined text-sm">cloud_off</span> NO CLOUD SYNCING</span></div><p class="text-xs text-slate-600 italic">Your data stays on your machine.</p></div>',1))]))}});export{pe as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as n,f as s,g as a,t,j as l,o}from"./index-
|
|
1
|
+
import{a as n,f as s,g as a,t,j as l,o}from"./index-Bl3DbLj3.js";const c={class:"bg-bg-dark/40 p-5 rounded-xl cyber-border neon-glow"},d={class:"text-xs font-medium text-slate-400 uppercase tracking-widest mb-1"},i={class:"flex items-end justify-between"},r={class:"text-3xl font-bold text-white"},m={key:0,class:"text-emerald-500 text-xs font-bold mb-1"},x={key:1,class:"material-symbols-outlined text-primary"},h=n({__name:"StatCard",props:{label:{},value:{},icon:{},delta:{}},setup(e){return(b,u)=>(o(),s("div",c,[a("p",d,t(e.label),1),a("div",i,[a("h3",r,t(e.value),1),e.delta?(o(),s("span",m,t(e.delta),1)):e.icon?(o(),s("span",x,t(e.icon),1)):l("",!0)])]))}});export{h as _};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,f as r,q as p,t as s,o}from"./index-
|
|
1
|
+
import{a,f as r,q as p,t as s,o}from"./index-Bl3DbLj3.js";const u=a({__name:"StatusBadge",props:{status:{}},setup(e){const t={active:"bg-emerald-500/20 text-emerald-400 border-emerald-500/30",deprecated:"bg-red-500/20 text-red-400 border-red-500/30",superseded:"bg-orange-500/20 text-orange-400 border-orange-500/30"};return(n,d)=>(o(),r("span",{class:p(["px-2.5 py-1 rounded-full text-[10px] font-bold border uppercase",t[e.status]||t.active])},s(e.status),3))}}),c={class:"px-2 py-0.5 rounded text-[10px] font-bold bg-primary/10 text-primary uppercase"},m=a({__name:"TagPill",props:{tag:{}},setup(e){return(t,n)=>(o(),r("span",c," #"+s(e.tag),1))}});export{m as _,u as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as v,r as i}from"./index-
|
|
1
|
+
import{d as v,r as i}from"./index-Bl3DbLj3.js";import{a as n}from"./useApi-DkK919W_.js";const y=v("decisions",()=>{const l=i([]),o=i(0),c=i(null),a=i(!1),s=i(null);async function u(t){a.value=!0,s.value=null;try{const e=await n.getDecisions(t);l.value=e.decisions,o.value=e.total}catch(e){s.value=e.message}finally{a.value=!1}}async function r(t){a.value=!0,s.value=null;try{c.value=await n.getDecision(t)}catch(e){s.value=e.message}finally{a.value=!1}}async function f(t,e){await n.updateDecision(t,{status:e})}return{decisions:l,total:o,detail:c,loading:a,error:s,fetchDecisions:u,fetchDecisionDetail:r,updateDecisionStatus:f}});export{y as u};
|