docs(graph-ui): document memory graph polish

This commit is contained in:
youzini
2026-06-04 08:30:51 +00:00
parent 4f79cbc8b3
commit 72c7c9e0ed
4 changed files with 21 additions and 7 deletions

View File

@@ -18,7 +18,7 @@ index.js 主入口:事件钩子、设置管理、流程调度、
├── llm/ LLM 请求封装
├── runtime/ 运行时状态、设置默认值、身份解析、注入式控制器/工厂
├── host/ SillyTavern 宿主适配(事件绑定、上下文、原生渲染)
├── ui/ 面板、图谱渲染、消息级 UI、召回卡片
├── ui/ 面板、自定义 Canvas 图谱渲染、消息级 UI、召回卡片
├── ena-planner/ ENA Planner独立规划子系统
└── native/ Native/WASM 加速灰度fail-open 回退 JS
```
@@ -187,7 +187,7 @@ ST-BME/
│ ├── st-native-render.js
│ └── adapter/
├── ui/ # 面板、图谱和消息级 UI
├── ui/ # 面板、自定义 Canvas 图谱和消息级 UI
│ ├── panel.html
│ ├── panel.js
│ ├── panel-bridge.js
@@ -196,9 +196,9 @@ ST-BME/
│ ├── ui-status.js
│ ├── message-render-limit.js # 聊天区渲染楼层限制策略
│ ├── history-notice.js # 历史变更通知文案
│ ├── graph-renderer.js
│ ├── graph-layout-solver.js
│ ├── graph-native-bridge.js
│ ├── graph-renderer.js # Canvas 图谱渲染:诊断/防护、语义样式、瞬时高亮、星系初始布局
│ ├── graph-layout-solver.js # 布局求解;原生/worker 布局仍通过桥接加速并回退 JS
│ ├── graph-native-bridge.js # 原生/worker 布局桥接
│ ├── recall-message-ui.js
│ ├── recall-message-ui-controller.js # 召回卡片挂载/刷新工厂(封装定时器/observer 状态)
│ ├── hide-engine.js

View File

@@ -21,6 +21,8 @@
用户输入文本和召回注入块始终是两件事:用户楼层 `mes` 保留原始输入;召回内容作为单独 block 注入提示词。用户编辑召回卡片只改变该楼层的召回 artifact不等同于改写用户说过的话。
如果面板图谱当前可见,召回记录还会驱动一次短暂的节点高亮,让用户看到本轮召回关联了哪些记忆节点。这个高亮只存在于渲染层;持久存储边界仍然是消息上的 `message.extra.bme_recall`
## 控制器封装
`ui/recall-message-ui-controller.js` 是一个工厂,封装了卡片挂载/刷新所需的全部状态定时器、MutationObserver、session、诊断 Map。这是 VM 测试税重构的产物——这些有状态的 UI 逻辑从 `index.js` 抽出,状态不再泄漏到模块级全局。

View File

@@ -106,7 +106,13 @@ The config page contains these workspaces:
### Graph area
Desktop shows a realtime graph area. Mobile provides subview switching:
Desktop shows a realtime graph area with a deep-space visual style for the current memory graph. Nodes and edges use semantic styling; hovering or selecting an item keeps related structure highlighted while unrelated content is gently dimmed.
When recall or extraction runs while the graph is visible, the relevant nodes may show brief highlights for memories used or newly produced in that turn. These highlights are render-only and do not change the memory graph; reduced-motion preferences are respected.
New graphs start with a “memory star system” layout: core memories near the center, topic memories around them, and fragment memories near related anchors. Existing layouts are reused first.
Mobile provides subview switching:
- **Realtime graph**
- **Cognitive view**

View File

@@ -106,7 +106,13 @@
### 图谱区域
桌面端会显示实时图谱区域。移动端提供子视图切换:
桌面端会显示实时图谱区域,用深色星空风格呈现当前记忆图谱。节点和关系会按语义类型使用不同样式;悬停或选中时,相关结构保持高亮,其余内容会轻微淡出,便于聚焦。
召回和提取发生时,如果图谱可见,会出现短暂的节点高亮,提示本轮用到或新产生的记忆。这些高亮只是渲染效果,不会改变记忆图谱本身;开启减少动态效果时会自动降低动画感。
新图谱会以“记忆星系”方式生成初始布局:核心记忆靠近中心,主题记忆环绕分布,碎片记忆靠近相关锚点。已有布局会优先复用。
移动端提供子视图切换:
- **实时图谱**
- **认知视图**