D112: 修复HLDP Memory Engine SQL查询bug(l.summary→n.summary)
This commit is contained in:
parent
2686e42f04
commit
4f610d3596
@ -195,7 +195,7 @@ class HLDPTreeStore:
|
||||
def get_recent_leaves(self, persona_id: str = PERSONA_ID, limit: int = 10) -> list[dict]:
|
||||
"""获取最近叶子(按创建时间倒序)。"""
|
||||
rows = self.conn.execute(
|
||||
"""SELECT n.*, l.trigger_text, l.emergence_text, l.lock_text, l.summary
|
||||
"""SELECT n.*, l.trigger_text, l.emergence_text, l.lock_text, n.summary
|
||||
FROM hldp_nodes n LEFT JOIN hldp_leaves l ON n.path = l.node_path
|
||||
WHERE n.persona_id = ? AND n.node_type = 'leaf' AND n.state = 'alive'
|
||||
ORDER BY n.created_at DESC LIMIT ?""",
|
||||
@ -205,7 +205,7 @@ class HLDPTreeStore:
|
||||
def search_leaves(self, query: str, persona_id: str = PERSONA_ID, limit: int = 5) -> list[dict]:
|
||||
"""全文搜索叶子。"""
|
||||
rows = self.conn.execute(
|
||||
"""SELECT n.*, l.trigger_text, l.emergence_text, l.lock_text, l.summary
|
||||
"""SELECT n.*, l.trigger_text, l.emergence_text, l.lock_text, n.summary
|
||||
FROM hldp_nodes n
|
||||
JOIN hldp_leaves l ON n.path = l.node_path
|
||||
JOIN hldp_fts f ON n.id = f.rowid
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user