PageSourceSearch

https://www.19pine.ai/app/assets/UserMemoryView-nEomIlL-.js

js 19pine.ai collected 2026-10-01 15:28:51 UTC 8,934 bytes, 17 lines download raw bytes

1import{k as B,Q as z,r as u,c as E,o as F,S as c,J as d,U as e,W as f,V as i,K as o,Z as H,F as j,a0 as N,X as K,j as R}from"./vendor-core-BXbNC1oJ.js";import{b as w,a as W}from"./_plugin-vue_export-helper-DeaGEAu3.js";import{P as Y}from"./PConfirmDialog-w3DtqbjF.js";import{s as P,u as G}from"./index-Bfn_wroP.js";import{j as J}from"./main-CTluKosS.js";import{T as O}from"./trash-2-BWNWd2MH.js";import"./preload-helper-fwxmMx4o.js";import"./analytics-BAV65Dpj.js";import"./env-MvOdH_iN.js";import"./acceptLanguage-D3Gg3e8c.js";import"./index-B2aZD4kB.js";import"./appOrigin-BaJgmYZD.js";import"./onboarding-DLWqg9qi.js";import"./vendor-sentry-9vP2hbkd.js";import"./loader-circle-KuQW9MGi.js";import"./naive-ui-uezjBets.js";import"./vendor-utils-DKuW2T68.js";import"./desktopDeepLink-By92AL15.js";import"./vendor-product-analytics-BqLDAa5u.js";import"./vendor-livekit-w_4IrL6H.js";try{let n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new n.Error().stack;t&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[t]="ebfdfe37-cb5f-45d8-84e1-ed0be6309361",n._sentryDebugIdIdentifier="sentry-dbid-ebfdfe37-cb5f-45d8-84e1-ed0be6309361")}catch{}/**
2 * @license lucide-vue-next v0.563.0 - ISC
3 *
4 * This source code is licensed under the ISC license.
5 * See the LICENSE file in the root directory of this source tree.
6 */const Q=w("brain",[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4",key:"1e3is1"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5",key:"1gqd8o"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77",key:"iwvgf7"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464",key:"efp6ie"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517",key:"1gq6am"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464",key:"k1g0md"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77",key:"q97ue3"}]]);/**
7 * @license lucide-vue-next v0.563.0 - ISC
8 *
9 * This source code is licensed under the ISC license.
10 * See the LICENSE file in the root directory of this source tree.
11 */const X=w("server-crash",[["path",{d:"M6 10H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2h-2",key:"4b9dqc"}],["path",{d:"M6 14H4a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-4a2 2 0 0 0-2-2h-2",key:"22nnkd"}],["path",{d:"M6 6h.01",key:"1utrut"}],["path",{d:"M6 18h.01",key:"uhywen"}],["path",{d:"m13 6-4 6h6l-4 6",key:"14hqih"}]]);/**
12 * @license lucide-vue-next v0.563.0 - ISC
13 *
14 * This source code is licensed under the ISC license.
15 * See the LICENSE file in the root directory of this source tree.
16 */const Z=w("shield-alert",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]),ee=(n,t=1,h=50)=>P({url:`/v2/users/${n}/memory`,method:"get",params:{page:t,page_size:h}}),te=(n,t)=>P({url:`/v2/users/${n}/memory/${encodeURIComponent(t)}`,method:"delete"}),se={class:"user-memory-view"},ae={class:"flex flex-col md:flex-row md:items-center md:justify-between gap-16 md:gap-0 mb-24"},oe={class:"flex-1"},re={class:"m-0 text-md md:text-lg"},ie={class:"mt-8 mb-0 text-xs md:text-sm text-gray-500"},ne={key:0,class:"flex flex-col items-center justify-center py-80"},le={class:"text-sm text-gray-500"},ce={key:1,class:"text-center py-80"},de={class:"text-gray-500 text-sm"},me={key:2,class:"text-center py-80"},ue={class:"text-gray-500 text-sm"},pe={key:3,class:"text-center py-80"},ye={class:"text-gray-500 text-sm mb-8"},fe={class:"text-gray-400 text-sm"},he={key:4,class:"space-y-24"},ve={class:"mb-12"},ge={class:"text-md font-semibold text-gray-900 m-0"},_e={class:"text-xs text-gray-400 mt-2 m-0"},be={class:"space-y-8"},xe={class:"flex-1 min-w-0"},ke={class:"text-sm font-medium text-gray-900 m-0"},Me={class:"text-sm text-gray-500 mt-4 m-0 break-words"},we=["title","onClick"],De={key:0,class:"pt-12 flex justify-center"},We=B({__name:"UserMemoryView",setup(n){const{t}=z({useScope:"local",messages:{en:{title:"Your Memory",subtitle:"What Pine remembers about you. You can remove any entry.",loading:"Loading memories...",accessDenied:"This feature requires experimental access.",serviceUnavailable:"Memory service is currently unavailable. Please try again later.",empty:{title:"No memories yet",description:"As you interact with Pine, your preferences and information will appear here."},loadMore:"Load more",delete:{title:"Delete memory",confirm:{title:"Delete memory?",message:'Remove "{name}" from your memory? This cannot be undone.',cancel:"Cancel",delete:"Delete"},success:"Memory deleted"}}
16,ja:{title:"あなたのメモリー",subtitle:"Pineがあなたについて記憶していること。任意のエントリを削除できます。",loading:"メモリーを読み込み中...",accessDenied:"この機能には実験的アクセスが必要です。",serviceUnavailable:"メモリーサービスは現在利用できません。後でもう一度お試しください。",empty:{title:"メモリーはまだありません",description:"Pineとのやり取りを通じて、あなたの好みや情報がここに表示されます。"},loadMore:"さらに読み込む",delete:{title:"メモリーを削除",confirm:{title:"メモリーを削除しますか?",message:"「{name}」をメモリーから削除しますか?この操作は元に戻せません。",cancel:"キャンセル",delete:"削除"},success:"メモリーを削除しました"}}}}),h=G(),V=J(),_=u(!1),b=u(!1),x=u(!1),D=u(!1),C=u(!1),p=u([]),k=u(!1),M=u(1),v=u(!1),y=u(null),S=E(()=>{const s={},a=new Map;for(const r of p.value){const m=r.category;a.has(m)||a.set(m,new Set);const U=r.displayName;a.get(m).has(U)||(a.get(m).add(U),s[m]||(s[m]=[]),s[m].push(r))}const l={},g=Object.keys(s).sort((r,m)=>r.localeCompare(m));for(const r of g)l[r]=s[r];return l});function T(s){return s.split("_").map(a=>a.charAt(0).toUpperCase()+a.slice(1)).join(" ")}async function I(s){try{return await ee(h.userInfo.id,s)}catch(a){const l=a?.response?.status;return l===403?D.value=!0:l===503&&(C.value=!0),null}}async function q(){_.value=!0;const s=await I(1);s&&(p.value=s.memories||[],k.value=s.hasMore,M.value=1),_.value=!1}async function L(){b.value=!0;const s=M.value+1,a=await I(s);a&&(p.value=[...p.value,...a.memories||[]],k.value=a.hasMore,M.value=s),b.value=!1}function A(s){y.value=s,v.value=!0}async function $(){if(y.value){x.value=!0;try{await te(h.userInfo.id,y.value.id),p.value=p.value.filter(s=>s.id!==y.value.id),V.success(t("delete.success"))}catch{}finally{x.value=!1,v.value=!1,y.value=null}}}return F(q),(s,a)=>(d(),c("div",se,[e("div",null,[e("div",ae,[e("div",oe,[e("h2",re,i(o(t)("title")),1),e("p",ie,i(o(t)("subtitle")),1)])]),_.value&&p.value.length===0?(d(),c("div",ne,[a[1]||(a[1]=e("div",{class:"mb-16"},[e("div",{class:"inline-block w-48 h-48 relative"},[e("div",{class:"absolute inset-0 border-2 border-gray-200 rounded-full"}),e("div",{class:"absolute inset-0 border-2 border-gray-400 rounded-full border-t-transparent animate-spin"})])],-1)),e("p",le,i(o(t)("loading")),1)])):D.value?(d(),c("div",ce,[f(o(Z),{class:"w-48 h-48 text-gray-300 mx-auto mb-16"}),e("p",de,i(o(t)("accessDenied")),1)])):C.value?(d(),c("div",me,[f(o(X),{class:"w-48 h-48 text-gray-300 mx-auto mb-16"}),e("p",ue,i(o(t)("serviceUnavailable")),1)])):p.value.length===0?(d(),c("div",pe,[f(o(Q),{class:"w-48 h-48 text-gray-300 mx-auto mb-16"}),e("p",ye,i(o(t)("empty.title")),1),e("p",fe,i(o(t)("empty.description")),1)])):(d(),c("div",he,[(d(!0),c(j,null,N(S.value,(l,g)=>(d(),c("div",{key:g},[e("div",ve,[e("h3",ge,i(T(g)),1),e("p",_e,i(l.length)+" "+i(l.length===1?"item":"items"),1)]),e("div",be,[(d(!0),c(j,null,N(l,r=>(d(),c("div",{key:r.id,class:"group flex items-start justify-between gap-12 p-12 rounded-12 border border-gray-100 hover:border-gray-200 transition-colors"},[e("div",xe,[e("p",ke,i(r.displayName),1),e("p",Me,i(r.value),1)]),e("button",{class:"flex-shrink-0 p-4 rounded-8 text-gray-400 hover:text-red-500 hover:bg-red-50 opacity-0 group-hover:opacity-100 transition-all",title:o(t)("delete.title"),onClick:m=>A(r)},[f(o(O),{class:"w-16 h-16"})],8,we)]))),128))])]))),128)),k.value?(d(),c("div",De,[f(W,{ghost:"",loading:b.value,onClick:L},{default:K(()=>[R(i(o(t)("loadMore")),1)]),_:1},8,["loading"])])):H("",!0)]))]),f(Y,{show:v.value,"onUpdate:show":a[0]||(a[0]=l=>v.value=l),title:o(t)("delete.confirm.title"),description:o(t)("delete.confirm.message",{name:y.value?.displayName||""}),"cancel-text":o(t)("delete.confirm.cancel"),"confirm-text":o(t)("delete.confirm.delete"),loading:x.value,"confirm-variant":"danger",width:"compact",onConfirm:$},null,8,["show","title","description","cancel-text","confirm-text","loading"])]))}});
16export{We as default};
17//# sourceMappingURL=UserMemoryView-nEomIlL-.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.