mirror of
https://github.com/samvallad33/vestige.git
synced 2026-04-30 11:26:22 +02:00
Backend: - Emit WebSocket events from REST delete/promote/demote handlers - Emit DreamStarted/ConsolidationStarted from MCP tool dispatch - Add path validation in backup_to() for defense-in-depth Dashboard: - Fix ConnectionDiscovered field names (source_id/target_id) - Fix $effect → onMount in settings (prevents infinite loop) - Fix $derived → $derived.by in RetentionCurve - Fix field name mismatches in settings (nodesProcessed, etc.) - Fix nested <button> → <span role="button"> in memories - Fix unhandled Promise rejection in stats consolidation - Add missing EVENT_TYPE_COLORS entries - Add Three.js resource disposal and event listener cleanup - Eliminate duplicate root page, redirect to /graph - Update nav links and keyboard shortcuts to /graph All 734+ tests passing, 22MB binary, zero build warnings. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
4 lines
6.4 KiB
JavaScript
4 lines
6.4 KiB
JavaScript
import"../chunks/Bzak7iHL.js";import{o as qe}from"../chunks/BycUxjt3.js";import{p as Qe,s as b,c as Ye,t as E,g as e,a as ze,d as o,e as t,h as u,r as a}from"../chunks/DEYVqDYQ.js";import{d as Be,a as p,s as v}from"../chunks/ZM2C7QQX.js";import{i as ce}from"../chunks/CpubbTHs.js";import{e as Z,i as ue}from"../chunks/CiJhRXcr.js";import{a as x,f as g}from"../chunks/D5-kFxsM.js";import{b as _e,r as xe}from"../chunks/Bew31VOg.js";import{s as Ge}from"../chunks/zt9hmg4X.js";import{s as fe}from"../chunks/B9t3YtL9.js";import{b as He}from"../chunks/DNwVrE-V.js";import{a as f}from"../chunks/BcuCGYSa.js";import{N as Ie}from"../chunks/Dwpy08gq.js";var Je=g('<div class="h-24 bg-surface/50 rounded-lg animate-pulse"></div>'),Ke=g('<div class="grid gap-3"></div>'),Ue=g('<span class="text-xs px-1.5 py-0.5 bg-deep rounded text-muted"> </span>'),Ve=g('<div class="mt-4 pt-4 border-t border-subtle/20 space-y-3"><p class="text-sm text-text whitespace-pre-wrap"> </p> <div class="grid grid-cols-3 gap-3 text-xs text-dim"><div> </div> <div> </div> <div> </div></div> <div class="flex gap-2"><span role="button" tabindex="0" class="px-3 py-1.5 bg-recall/20 text-recall text-xs rounded hover:bg-recall/30 cursor-pointer select-none">Promote</span> <span role="button" tabindex="0" class="px-3 py-1.5 bg-decay/20 text-decay text-xs rounded hover:bg-decay/30 cursor-pointer select-none">Demote</span> <span role="button" tabindex="0" class="px-3 py-1.5 bg-decay/10 text-decay/60 text-xs rounded hover:bg-decay/20 ml-auto cursor-pointer select-none">Delete</span></div></div>'),We=g('<button><div class="flex items-start justify-between gap-4"><div class="flex-1 min-w-0"><div class="flex items-center gap-2 mb-2"><span class="w-2 h-2 rounded-full"></span> <span class="text-xs text-dim"> </span> <!></div> <p class="text-sm text-text leading-relaxed line-clamp-2"> </p></div> <div class="flex flex-col items-end gap-1 flex-shrink-0"><div class="w-12 h-1.5 bg-deep rounded-full overflow-hidden"><div class="h-full rounded-full"></div></div> <span class="text-xs text-muted"> </span></div></div> <!></button>'),Xe=g('<div class="grid gap-3"></div>'),Ze=g(`<div class="p-6 max-w-6xl mx-auto space-y-6"><div class="flex items-center justify-between"><h1 class="text-xl text-bright font-semibold">Memories</h1> <span class="text-dim text-sm"> </span></div> <div class="flex gap-3 flex-wrap"><input type="text" placeholder="Search memories..." class="flex-1 min-w-64 px-4 py-2.5 bg-surface border border-subtle/40 rounded-lg text-text text-sm
|
|
placeholder:text-muted focus:outline-none focus:border-synapse/60 focus:ring-1 focus:ring-synapse/30 transition"/> <select class="px-3 py-2.5 bg-surface border border-subtle/40 rounded-lg text-dim text-sm focus:outline-none"><option>All types</option><option>Fact</option><option>Concept</option><option>Event</option><option>Person</option><option>Place</option><option>Note</option><option>Pattern</option><option>Decision</option></select> <div class="flex items-center gap-2 text-xs text-dim"><span>Min retention:</span> <input type="range" min="0" max="1" step="0.1" class="w-24 accent-synapse"/> <span> </span></div></div> <!></div>`);function ut(ge,me){Qe(me,!0);let k=b(Ye([])),P=b(""),S=b(""),be="",h=b(0),F=b(!0),T=b(null),ee;qe(()=>m());async function m(){u(F,!0);try{const r={};e(P)&&(r.q=e(P)),e(S)&&(r.node_type=e(S)),e(h)>0&&(r.min_retention=String(e(h)));const c=await f.memories.list(r);u(k,c.memories,!0)}catch{u(k,[],!0)}finally{u(F,!1)}}function he(){clearTimeout(ee),ee=setTimeout(m,300)}function ye(r){return r>.7?"#10b981":r>.4?"#f59e0b":"#ef4444"}var M=Ze(),C=o(M),te=t(o(C),2),we=o(te);a(te),a(C);var A=t(C,2),$=o(A);xe($);var y=t($,2),N=o(y);N.value=N.__value="";var O=t(N);O.value=O.__value="fact";var R=t(O);R.value=R.__value="concept";var j=t(R);j.value=j.__value="event";var L=t(j);L.value=L.__value="person";var q=t(L);q.value=q.__value="place";var Q=t(q);Q.value=Q.__value="note";var Y=t(Q);Y.value=Y.__value="pattern";var ae=t(Y);ae.value=ae.__value="decision",a(y);var oe=t(y,2),D=t(o(oe),2);xe(D);var re=t(D,2),ke=o(re);a(re),a(oe),a(A);var Pe=t(A,2);{var Se=r=>{var c=Ke();Z(c,20,()=>Array(8),ue,(w,s)=>{var _=Je();x(w,_)}),a(c),x(r,c)},Te=r=>{var c=Xe();Z(c,21,()=>e(k),w=>w.id,(w,s)=>{var _=We(),z=o(_),B=o(z),G=o(B),se=o(G),H=t(se,2),$e=o(H,!0);a(H);var De=t(H,2);Z(De,17,()=>e(s).tags.slice(0,3),ue,(n,d)=>{var l=Ue(),J=o(l,!0);a(l),E(()=>v(J,e(d))),x(n,l)}),a(G);var ie=t(G,2),Ee=o(ie,!0);a(ie),a(B);var ne=t(B,2),I=o(ne),Fe=o(I);a(I);var de=t(I,2),Me=o(de);a(de),a(ne),a(z);var Ce=t(z,2);{var Ae=n=>{var d=Ve(),l=o(d),J=o(l,!0);a(l);var K=t(l,2),U=o(K),Ne=o(U);a(U);var V=t(U,2),Oe=o(V);a(V);var le=t(V,2),Re=o(le);a(le),a(K);var pe=t(K,2),W=o(pe),X=t(W,2),ve=t(X,2);a(pe),a(d),E((i,je,Le)=>{v(J,e(s).content),v(Ne,`Storage: ${i??""}%`),v(Oe,`Retrieval: ${je??""}%`),v(Re,`Created: ${Le??""}`)},[()=>(e(s).storageStrength*100).toFixed(1),()=>(e(s).retrievalStrength*100).toFixed(1),()=>new Date(e(s).createdAt).toLocaleDateString()]),p("click",W,i=>{i.stopPropagation(),f.memories.promote(e(s).id)}),p("keydown",W,i=>{i.key==="Enter"&&(i.stopPropagation(),f.memories.promote(e(s).id))}),p("click",X,i=>{i.stopPropagation(),f.memories.demote(e(s).id)}),p("keydown",X,i=>{i.key==="Enter"&&(i.stopPropagation(),f.memories.demote(e(s).id))}),p("click",ve,async i=>{i.stopPropagation(),await f.memories.delete(e(s).id),m()}),p("keydown",ve,async i=>{i.key==="Enter"&&(i.stopPropagation(),await f.memories.delete(e(s).id),m())}),x(n,d)};ce(Ce,n=>{var d;((d=e(T))==null?void 0:d.id)===e(s).id&&n(Ae)})}a(_),E((n,d)=>{var l;Ge(_,1,`text-left p-4 bg-surface/50 border border-subtle/20 rounded-lg hover:border-synapse/30
|
|
hover:bg-surface transition-all duration-200 group
|
|
${((l=e(T))==null?void 0:l.id)===e(s).id?"border-synapse/50 glow-synapse":""}`),fe(se,`background: ${(Ie[e(s).nodeType]||"#6b7280")??""}`),v($e,e(s).nodeType),v(Ee,e(s).content),fe(Fe,`width: ${e(s).retentionStrength*100}%; background: ${n??""}`),v(Me,`${d??""}%`)},[()=>ye(e(s).retentionStrength),()=>(e(s).retentionStrength*100).toFixed(0)]),p("click",_,()=>{var n;return u(T,((n=e(T))==null?void 0:n.id)===e(s).id?null:e(s),!0)}),x(w,_)}),a(c),x(r,c)};ce(Pe,r=>{e(F)?r(Se):r(Te,!1)})}a(M),E(r=>{v(we,`${e(k).length??""} results`),v(ke,`${r??""}%`)},[()=>(e(h)*100).toFixed(0)]),p("input",$,he),_e($,()=>e(P),r=>u(P,r)),p("change",y,m),He(y,()=>e(S),r=>u(S,r)),p("change",D,m),_e(D,()=>e(h),r=>u(h,r)),x(ge,M),ze()}Be(["input","change","click","keydown"]);export{ut as component};
|