fix: recall/commit/anchor 节点也在 WebUI 高亮并拉镜头

This commit is contained in:
root
2026-04-28 21:08:35 +08:00
parent 1a394ddd2b
commit d971afb934

View File

@ -695,8 +695,8 @@ def get_graph_highlight():
if row:
highlight_ids.append(row['id'])
# 检查是否有新创建的节点
if record.get('action') == 'create' and entity_name:
# 检查是否有新创建或 recall 的节点,用于拉镜头
if record.get('action') in ('create', 'recall', 'commit', 'anchor') and entity_name:
cursor = graph_db.conn.cursor()
cursor.execute("SELECT id FROM entities WHERE name = ?", (entity_name,))
row = cursor.fetchone()