Skip to content

dsh-star-map

Verified

dsh-star-map · v0.1.2 · MIT · Web UI

会遗忘的记忆星图:把你的记忆画成一张 3D 星图,越重要越亮,久不提起会慢慢暗下去(DeepSeek Harness 插件)

Install

dsh plugin add dsh-star-map

Confirm the layer applied with dsh --profile default --dump-config — see the install guide.

Source

Published to npm without a public repository. Inspect the package contents before installing.

Tags

Creators

Readme

dsh-star-map · 会遗忘的记忆星图

把你的记忆画成一张 3D 星图:球越大越重要,越亮记得越牢,久不提起的会慢慢暗下去;拖动旋转、滚轮缩放、点一颗星看原文。

规则来自 B 站教程《给AI做一张会遗忘的记忆星图(3D版)》(UP:星野OVO,BV1T9sQ6sEgg),实现在这里从零写成一份纯 Canvas 页面(不依赖 three.js)。

预览


它按什么规则遗忘

  1. 忘得先快后慢
  2. 越重要,忘得越慢
  3. 重新提起,会往回弹一点

亮度按这条算:

w = e^(−(天数 ÷ 半衰期))
半衰期:重要(热)30 天 / 一般(温)12 天 / 琐碎(冷)6 天
被反复提起的,亮度回弹(每次 +0.35,最多两次)
最终亮度 =(基础保留 + 回弹)× 重要度系数

最后那个「重要度系数」是我加的:不加的话,聊天流水靠“被提得多”就能冒充重要记忆。

球大小 = 重要度;颜色 = 来源分类。


安装

装到 DeepSeek Harness:侧边栏「插件」→ 添加插件 → 填包名 dsh-star-map(或本地目录路径)→ 重启。

装完左侧出现「星图」。


数据从哪来

默认读 ~/.dsh/memory/store.jsonl(每行一个 JSON,至少要有 text;weight 0~1 决定重要度)。

没有这个文件也不报错,星图显示「还没数据」。

生成 / 刷新

node gen.mjs        # 生成 data.js(插件读它)+ 待复习清单
node query.mjs      # 今天的摘要(最亮 5 + 快忘 5)
node query.mjs 音响            # 搜关键词,按「还剩多少」排序
node query.mjs --dim 10       # 最该回想的十条
node query.mjs --bright 10    # 最牢的十条

生成结果写到:

~/.dsh/worlds/default/room/星图/      data.json / data.js / 待复习清单.md / 星图摘要.md
<本插件>/assets/data.js               面板读的那份

接口

GET /x-star-map/index.html   星图页面
GET /x-star-map/data.js      数据
GET /x-star-map/api/info     自检(数据大小、更新时间)

许可

MIT。