deepseek-plastic-memory 2.1.5 → 3.3.8

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.
@@ -0,0 +1,286 @@
1
+ <!DOCTYPE html>
2
+ <html lang="zh-CN">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
6
+ <title>记忆星空 · 可塑性记忆</title>
7
+ <style>
8
+ :root {
9
+ --bg: #03050c;
10
+ --panel: rgba(9, 13, 24, .72);
11
+ --line: rgba(126, 156, 255, .15);
12
+ --line-soft: rgba(126, 156, 255, .07);
13
+ --fg: #dfe6ff;
14
+ --dim: rgba(210, 220, 255, .48);
15
+ --accent: #7fb0ff;
16
+ --gold: #ffcf7a;
17
+ --green: #6ad39a;
18
+ --red: #ff8a8a;
19
+ }
20
+ * { box-sizing: border-box; }
21
+ html { color-scheme: dark; }
22
+ html, body { height: 100%; margin: 0; background: var(--bg); color: var(--fg); overflow: hidden; }
23
+ body { font: 13px/1.6 -apple-system, "Segoe UI", "Microsoft YaHei UI", "Microsoft YaHei", system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
24
+ #sky { position: fixed; inset: 0; display: block; width: 100%; height: 100%; cursor: grab; }
25
+ #sky.dragging { cursor: grabbing; }
26
+
27
+ .glass {
28
+ background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
29
+ backdrop-filter: blur(16px) saturate(1.2);
30
+ box-shadow: 0 18px 48px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .04);
31
+ }
32
+
33
+ #top {
34
+ position: fixed; top: 14px; left: 0; right: 0; margin: 0 auto; width: max-content;
35
+ display: flex; align-items: center; gap: 9px; padding: 8px 12px;
36
+ z-index: 20; max-width: calc(100vw - 40px); white-space: nowrap;
37
+ }
38
+ #top .brand { font-size: 11px; letter-spacing: .2em; opacity: .45; text-transform: uppercase; }
39
+ #search {
40
+ width: clamp(150px, 15vw, 230px); background: rgba(255, 255, 255, .04); border: 1px solid var(--line);
41
+ border-radius: 9px; color: var(--fg); font-size: 12.5px; padding: 6px 10px; outline: none;
42
+ }
43
+ #search:focus { border-color: rgba(127, 176, 255, .55); background: rgba(127, 176, 255, .07); }
44
+ select, .btn {
45
+ background: rgba(255, 255, 255, .04); border: 1px solid var(--line); color: var(--fg);
46
+ border-radius: 9px; font-size: 12px; padding: 6px 10px; outline: none; cursor: pointer; transition: .15s;
47
+ }
48
+ select:hover, .btn:hover { border-color: rgba(127, 176, 255, .4); background: rgba(127, 176, 255, .08); }
49
+ .btn.danger { color: #ffb4b4; border-color: rgba(255, 120, 120, .55); background: rgba(255, 80, 80, .15); }
50
+ .btn.on { border-color: rgba(255, 207, 122, .55); color: var(--gold); background: rgba(255, 207, 122, .1); }
51
+ .btn.ghost { background: transparent; }
52
+ .btn, select, #top .brand { white-space: nowrap; }
53
+ #hitInfo { font-size: 11.5px; color: var(--dim); white-space: nowrap; }
54
+ select option, select optgroup {
55
+ background-color: #0d1526; color: #dfe6ff;
56
+ }
57
+ select option:checked { background-color: #1d2b4a; color: #ffffff; }
58
+ select:focus { border-color: rgba(127, 176, 255, .55); }
59
+
60
+ #themes {
61
+ position: fixed; top: 74px; right: 14px; z-index: 24; display: flex; gap: 3px; padding: 5px;
62
+ }
63
+ #themes .tbtn {
64
+ border: 1px solid transparent; background: transparent; color: var(--dim);
65
+ border-radius: 8px; font-size: 11.5px; padding: 5px 10px; cursor: pointer; transition: .15s;
66
+ }
67
+ #themes .tbtn:hover { color: var(--fg); background: rgba(255, 255, 255, .06); }
68
+ #themes .tbtn.on { color: #cfe2ff; border-color: rgba(127, 176, 255, .45); background: rgba(127, 176, 255, .12); }
69
+
70
+ #demo {
71
+ position: fixed; right: 14px; top: 120px; z-index: 23; padding: 6px 10px 6px 8px; max-width: min(360px, calc(100vw - 28px));
72
+ display: flex; align-items: center; gap: 10px; font-size: 12px;
73
+ background: rgba(12, 18, 32, .55); border: 1px solid rgba(140, 170, 220, .18);
74
+ }
75
+ #demo .tbtn { background: transparent; border: 1px solid transparent; color: var(--dim); }
76
+ #demo .tbtn.on { color: #cfe2ff; border-color: rgba(127, 176, 255, .45); background: rgba(127, 176, 255, .12); }
77
+ #demo .demo-body { display: none; align-items: center; gap: 12px; }
78
+ #demo.on .demo-body { display: flex; }
79
+ #demo .demo-row { display: flex; align-items: center; gap: 6px; color: var(--dim); white-space: nowrap; }
80
+ #demo input[type="range"] { width: 90px; accent-color: #7fb0ff; }
81
+ #demo b { color: #cfe2ff; font-weight: 600; min-width: 10px; text-align: center; }
82
+ #demo input[type="checkbox"] { accent-color: #7fb0ff; }
83
+
84
+ body.demo-clean #top,
85
+ body.demo-clean #panel,
86
+ body.demo-clean #curve,
87
+ body.demo-clean #themes,
88
+ body.demo-clean #hint { display: none !important; }
89
+ body.demo-clean #demo { right: 14px; top: 14px; opacity: .28; }
90
+ body.demo-clean #demo:hover { opacity: 1; }
91
+
92
+ #panel {
93
+ position: fixed; left: 14px; top: 74px; bottom: 236px; width: 306px;
94
+ display: flex; flex-direction: column; z-index: 15; overflow: hidden;
95
+ }
96
+ #panel .head { padding: 11px 13px 9px; border-bottom: 1px solid var(--line-soft); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
97
+ #panel .head h1 { font-size: 13.5px; font-weight: 600; margin: 0; letter-spacing: .05em; }
98
+ #panel .head .tag { font-size: 10.5px; color: var(--dim); border: 1px solid var(--line); border-radius: 999px; padding: 1px 7px; white-space: nowrap; }
99
+ #panel .body { padding: 10px 12px 14px; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 9px; }
100
+ #panel .body::-webkit-scrollbar { width: 7px; }
101
+ #panel .body::-webkit-scrollbar-thumb { background: rgba(127, 176, 255, .18); border-radius: 8px; }
102
+
103
+ .label { font-size: 11px; color: var(--dim); letter-spacing: .06em; }
104
+ .stat { display: flex; gap: 12px; font-size: 11.5px; color: var(--dim); }
105
+ .stat b { color: var(--fg); font-weight: 600; }
106
+ textarea, input[type=text] {
107
+ width: 100%; background: rgba(255, 255, 255, .035); border: 1px solid var(--line);
108
+ border-radius: 10px; color: var(--fg); font: inherit; font-size: 12.5px; padding: 8px 10px; outline: none; resize: vertical;
109
+ }
110
+ textarea:focus, input[type=text]:focus { border-color: rgba(127, 176, 255, .55); }
111
+ .row { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; }
112
+ .row.end { justify-content: flex-end; }
113
+ .muted { color: var(--dim); font-size: 11.5px; line-height: 1.65; }
114
+ .hr { height: 1px; background: var(--line-soft); margin: 2px 0; }
115
+ .star-item {
116
+ display: flex; align-items: center; gap: 7px; padding: 6px 8px; border-radius: 9px; cursor: pointer;
117
+ border: 1px solid transparent; transition: .14s; font-size: 12.5px;
118
+ }
119
+ .star-item:hover { background: rgba(127, 176, 255, .08); border-color: rgba(127, 176, 255, .25); }
120
+ .star-item.on { background: rgba(127, 176, 255, .13); border-color: rgba(127, 176, 255, .4); }
121
+ .star-item .dot { width: 7px; height: 7px; border-radius: 999px; background: #9fc6ff; box-shadow: 0 0 8px #6fa8ff; flex: 0 0 auto; }
122
+ .star-item .nm { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
123
+ .star-item .ct { font-size: 10.5px; color: var(--dim); }
124
+ .star-item.sub { padding-left: 18px; }
125
+ .star-item.sub .dot { width: 5px; height: 5px; background: #b9cbe8; box-shadow: 0 0 6px #7f9cc8; }
126
+ .mem {
127
+ border: 1px solid var(--line-soft); border-radius: 10px; padding: 7px 9px; display: flex; flex-direction: column; gap: 3px;
128
+ }
129
+ .mem .t { font-size: 12.5px; line-height: 1.55; }
130
+ .mem .m { font-size: 10.5px; color: var(--dim); display: flex; gap: 7px; align-items: center; }
131
+ .mem .acts { display: flex; gap: 6px; justify-content: flex-end; }
132
+ .chip {
133
+ display: inline-flex; align-items: center; gap: 5px; font-size: 11px; border: 1px solid var(--line);
134
+ border-radius: 999px; padding: 2px 8px; cursor: pointer; color: var(--dim); transition: .15s;
135
+ background: transparent;
136
+ }
137
+ .chip:hover { color: var(--fg); border-color: rgba(127, 176, 255, .45); background: rgba(127, 176, 255, .08); }
138
+ .chip.gold { color: var(--gold); border-color: rgba(255, 207, 122, .3); }
139
+ .pill { font-size: 10px; border-radius: 999px; padding: 0 6px; border: 1px solid var(--line); color: var(--dim); }
140
+ .pill.fixed { color: var(--gold); border-color: rgba(255, 207, 122, .35); }
141
+
142
+ /* 左下角:遗忘曲线 */
143
+ #curve { position: fixed; left: 14px; bottom: 14px; width: 344px; z-index: 16; transition: width .22s, height .22s, border-radius .22s; }
144
+ #curve .chead { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; cursor: pointer; user-select: none; }
145
+ #curve .chead .t { font-size: 12px; letter-spacing: .05em; }
146
+ #curve .chead .n { font-size: 10.5px; color: var(--dim); margin-left: 8px; }
147
+ #curve .cbody { padding: 0 8px 8px; }
148
+ #curve svg { display: block; width: 100%; height: auto; overflow: visible; }
149
+ #curve .zones { display: flex; flex-direction: column; gap: 4px; margin-top: 2px; }
150
+ #curve .zone { display: flex; gap: 6px; align-items: flex-start; }
151
+ #curve .zone .zt { font-size: 10px; color: var(--dim); flex: 0 0 50px; padding-top: 3px; }
152
+ #curve .zone .zc { display: flex; gap: 4px; flex-wrap: wrap; flex: 1 1 auto; }
153
+ #curve.collapsed { width: 44px; height: 44px; border-radius: 50%; }
154
+ #curve.collapsed .chead { padding: 0; height: 44px; justify-content: center; }
155
+ #curve.collapsed .chead .t, #curve.collapsed .chead .n, #curve.collapsed .cbody { display: none; }
156
+ #curve.collapsed .chead .chev { transform: rotate(180deg); }
157
+ .chev { display: inline-block; transition: transform .2s ease; opacity: .5; font-size: 10px; }
158
+
159
+ #ask {
160
+ position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(.97);
161
+ width: min(430px, calc(100vw - 40px)); padding: 18px 20px 14px; z-index: 60;
162
+ opacity: 0; pointer-events: none; transition: opacity .16s, transform .16s;
163
+ }
164
+ #ask.show { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%) scale(1); }
165
+ #ask .ask-t { font-size: 14px; font-weight: 600; color: #e2e9ff; margin-bottom: 8px; }
166
+ #ask .ask-m { font-size: 12.5px; line-height: 1.75; color: rgba(214,224,255,.78); margin-bottom: 14px; }
167
+ #ask .ask-n { font-size: 11px; color: var(--dim); margin-bottom: 12px; }
168
+
169
+ #peek {
170
+ position: fixed; right: 14px; top: 50%; transform: translateY(-50%) translateX(10px);
171
+ width: 300px; max-height: 46vh; overflow: hidden; padding: 12px 14px; z-index: 18;
172
+ opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s;
173
+ }
174
+ #peek.show { opacity: 1; transform: translateY(-50%) translateX(0); }
175
+ #peek .pk-t { font-size: 13px; font-weight: 600; color: #dce8ff; margin-bottom: 5px; }
176
+ #peek .pk-m { font-size: 11px; color: var(--dim); margin-bottom: 7px; }
177
+ #peek .pk-p { font-size: 12px; line-height: 1.68; color: #e6eeff; opacity: .92; white-space: pre-wrap; }
178
+
179
+ #hint { position: fixed; right: 14px; bottom: 14px; z-index: 14; font-size: 11px; color: var(--dim); text-align: right; line-height: 1.7; }
180
+ #toast {
181
+ position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 10px);
182
+ padding: 8px 16px; border-radius: 999px; font-size: 12.5px; z-index: 40;
183
+ opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
184
+ }
185
+ #toast.show { opacity: 1; transform: translate(-50%, 0); }
186
+ #toast.bad { color: var(--red); }
187
+ #toast.good { color: var(--green); }
188
+
189
+ #fallback { position: fixed; inset: 0; display: none; align-items: center; justify-content: center; background: radial-gradient(circle at 50% 40%, #0b1226, #04060e 70%); z-index: 60; padding: 24px; }
190
+ #fallback .box { max-width: 460px; text-align: center; line-height: 1.9; }
191
+ #fallback h2 { font-size: 16px; font-weight: 600; margin: 0 0 8px; }
192
+ #fallback p { color: var(--dim); font-size: 12.5px; margin: 0; }
193
+ .fadein { animation: fadein .5s ease both; }
194
+ @keyframes fadein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
195
+ </style>
196
+ </head>
197
+ <body>
198
+ <canvas id="sky"></canvas>
199
+
200
+ <div id="top" class="glass fadein">
201
+ <span class="brand">memory sky</span>
202
+ <input id="search" type="text" placeholder="检索记忆…" autocomplete="off" spellcheck="false" />
203
+ <span id="hitInfo"></span>
204
+ <select id="scope" title="记忆库"></select>
205
+ <button id="wsDel" class="btn" title="删掉这个工作区的记忆库" style="display:none">删库</button>
206
+ <button id="aiClassify" class="btn" title="让 AI 把每条记忆重新归类">AI 分类</button>
207
+ <button id="pinnedBtn" class="btn" title="只看固定记忆">固定记忆</button>
208
+ <button id="resetBtn" class="btn ghost" title="回到全景">全景</button>
209
+ </div>
210
+
211
+ <div id="themes" class="glass fadein">
212
+ <button class="tbtn" data-theme="nebula">星野</button>
213
+ <button class="tbtn" data-theme="starburst">恒星暴</button>
214
+ </div>
215
+
216
+ <div id="demo" class="glass fadein">
217
+ <button id="demoToggle" class="tbtn">演示模式</button>
218
+ <span class="demo-body">
219
+ <span class="demo-row">转速 <input id="demoSpeed" type="range" min="1" max="100" step="1" value="40" /><b id="demoSpeedText">40</b></span>
220
+ <label class="demo-row"><input id="demoClean" type="checkbox" /> 只留星空</label>
221
+ </span>
222
+ </div>
223
+
224
+ <div id="panel" class="glass fadein">
225
+ <div class="head">
226
+ <h1>可塑性记忆</h1>
227
+ <span class="tag" id="panelTag">总览</span>
228
+ </div>
229
+ <div class="body" id="panelBody"></div>
230
+ </div>
231
+
232
+ <div id="curve" class="glass fadein">
233
+ <div class="chead" id="curveHead">
234
+ <span><span class="t">遗忘曲线</span><span class="n" id="curveCount"></span></span>
235
+ <span class="chev">▾</span>
236
+ </div>
237
+ <div class="cbody">
238
+ <svg id="curveSvg" viewBox="0 0 330 104">
239
+ <defs>
240
+ <linearGradient id="cg" x1="0" y1="0" x2="1" y2="0.9">
241
+ <stop offset="0%" stop-color="#9fd0ff" stop-opacity=".95" />
242
+ <stop offset="52%" stop-color="#8ea2c8" stop-opacity=".7" />
243
+ <stop offset="100%" stop-color="#4a4f66" stop-opacity=".42" />
244
+ </linearGradient>
245
+ <filter id="cglow" x="-20%" y="-60%" width="140%" height="220%">
246
+ <feGaussianBlur stdDeviation="2.6" result="b" />
247
+ <feMerge><feMergeNode in="b" /><feMergeNode in="SourceGraphic" /></feMerge>
248
+ </filter>
249
+ </defs>
250
+ <path id="curvePath" d="M6,14 C 84,20 176,52 324,92" fill="none" stroke="url(#cg)" stroke-width="1.5" filter="url(#cglow)" stroke-linecap="round" />
251
+ <g id="curveDots"></g>
252
+ <g id="curveLabels"></g>
253
+ </svg>
254
+ <div class="zones" id="curveZones"></div>
255
+ </div>
256
+ </div>
257
+
258
+ <div id="ask" class="glass">
259
+ <div class="ask-t">AI 分类</div>
260
+ <div class="ask-m">Ai分类功能将会消耗token,建议间隔时间长一点运行一次,确认运行?</div>
261
+ <div class="ask-n" id="askNote"></div>
262
+ <div class="row end">
263
+ <button id="askNo" class="btn ghost">取消</button>
264
+ <button id="askYes" class="btn">确认运行</button>
265
+ </div>
266
+ </div>
267
+
268
+ <div id="peek" class="glass">
269
+ <div class="pk-t"></div>
270
+ <div class="pk-m"></div>
271
+ <div class="pk-p"></div>
272
+ </div>
273
+
274
+ <div id="hint">拖拽:绕中心转 · 滚轮:缩放 · 单击:选中 · 双击星辰:放大它</div>
275
+ <div id="toast" class="glass"></div>
276
+
277
+ <div id="fallback">
278
+ <div class="box">
279
+ <h2>Edge 没开 WebGL</h2>
280
+ <p>星空全靠显卡实时渲染。在 Edge 设置里打开「使用图形加速」,或者更新显卡驱动再来。</p>
281
+ </div>
282
+ </div>
283
+
284
+ <script type="module" src="./app.js"></script>
285
+ </body>
286
+ </html>