vestige/apps/dashboard/build/_app/immutable/nodes/7.UPq6Ja2I.js

2 lines
6 KiB
JavaScript
Raw Normal View History

import"../chunks/Bzak7iHL.js";import{o as ut}from"../chunks/DUC-ssvh.js";import{p as gt,s as T,c as Q,t as u,a as ft,d,e as s,h as $,g as t,r as e,G as ht}from"../chunks/BBD-8XME.js";import{d as bt,s as l,a as yt}from"../chunks/DNn3Nckx.js";import{i as R}from"../chunks/RaRNNC-y.js";import{e as U,i as D}from"../chunks/C5a--lgk.js";import{a as o,f as n}from"../chunks/CKcqngaU.js";import{s as q}from"../chunks/CBWLjDtu.js";import{a as Z}from"../chunks/BcuCGYSa.js";var wt=n("<button> </button>"),Rt=n('<div class="h-16 glass-subtle rounded-xl animate-pulse"></div>'),Nt=n('<div class="space-y-2"></div>'),St=n('<div class="text-center py-12 text-dim"><div class="text-4xl mb-3 opacity-20">◇</div> <p> </p> <p class="text-xs text-muted mt-1">Use "Remind me..." in conversation to create intentions.</p></div>'),kt=n('<span class="text-[10px] text-dream-glow"> </span>'),Ot=n('<span class="text-[10px] text-muted"> </span>'),$t=n('<div class="p-4 glass-subtle rounded-xl"><div class="flex items-start gap-3"><div class="w-8 h-8 rounded-lg bg-white/[0.04] flex items-center justify-center text-lg flex-shrink-0"> </div> <div class="flex-1 min-w-0"><p class="text-sm text-text"> </p> <div class="flex flex-wrap gap-2 mt-2"><span> </span> <span> </span> <span class="text-[10px] text-muted"> </span> <!> <!></div></div> <span class="text-[10px] text-muted flex-shrink-0"> </span></div></div>'),zt=n('<div class="space-y-2"></div>'),Ct=n('<div class="text-center py-8 text-dim"><div class="text-3xl mb-3 opacity-20">◬</div> <p class="text-sm">No predictions yet. Use Vestige more to train the predictive model.</p></div>'),It=n("<span> </span>"),Pt=n('<span class="text-dream-glow"> </span>'),Tt=n('<div class="p-3 glass-subtle rounded-xl flex items-start gap-3"><div class="w-6 h-6 rounded-full bg-dream/20 text-dream-glow text-xs flex items-center justify-center flex-shrink-0 mt-0.5"></div> <div class="flex-1 min-w-0"><p class="text-sm text-text line-clamp-2"> </p> <div class="flex gap-3 mt-1 text-xs text-muted"><span> </span> <!> <!></div></div></div>'),Ut=n('<div class="space-y-2"></div>'),Dt=n('<div class="p-6 max-w-5xl mx-auto space-y-8"><div class="flex items-center justify-between"><h1 class="text-xl text-bright font-semibold">Intentions & Predictions</h1> <span class="text-xs text-muted"> </span></div> <div class="space-y-4"><div class="flex items-center gap-2"><h2 class="text-sm text-bright font-semibold">Prospective Memory</h2> <span class="text-xs text-muted">"Remember to do X when Y happens"</span></div> <div class="flex gap-1.5"></div> <!></div> <div class="pt-6 border-t border-synapse/10 space-y-4"><div class="flex items-center gap-2"><h2 class="text-sm text-bright font-semibold">Predicted Needs</h2> <span class="text-xs text-muted">What you might need next</span></div> <!></div></div>');function Wt(tt,et){gt(et,!0);let z=T(Q([])),j=T(Q([])),A=T(!0),N=T("active");const at={active:"text-synapse-glow bg-synapse/10 border-synapse/30",fulfilled:"text-recall bg-recall/10 border-recall/30",cancelled:"text-dim bg-white/[0.03] border-subtle/20",snoozed:"text-dream-glow bg-dream/10 border-dream/30"},st={critical:"text-decay",high:"text-amber-400",normal:"text-dim",low:"text-muted"},rt={time:"⏰",context:"◎",event:"⚡"};ut(async()=>{await B()});async function B(){$(A,!0);try{const[r,i]=await Promise.all([Z.intentions(t(N)),Z.predict()]);$(z,r.intentions||[],!0),$(j,i.predictions||[],!0)}catch{}finally{$(A,!1)}}async function it(r){$(N,r,!0),await B()}function F(r){if(!r)return"";try{return new Date(r).toLocaleDateString("en-US",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}catch{return r}}var G=Dt(),L=s(G),H=d(s(L),2),dt=s(H);e(H),e(L);var M=d(L,2),Y=d(s(M),2);U(Y,20,()=>["active","fulfilled","snoozed","cancelled","all"],D,(r,i)=>{var v=wt(),a=s(v,!0);e(v),u(x=>{q(v,1,`px-3 py-1.5 rounded-xl text-xs transition ${t(N)===i?"bg-synapse/20 text-synapse-glow border border-synapse/40":"glass-subtle text-dim hover:bg-white/[0.03]"}`),l(a,x)},[()=>i.charAt(0).toUpperCase()+i.slice(1)]),yt("click",v,()=>it(i)),o(r,v)}),e(Y);var lt=d(Y,2