mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-25 00:51:20 +00:00
Fix memory tool entry parsing when content contains section sign
- Use ENTRY_DELIMITER (\\n§\\n) instead of '§' when splitting entries in _read_file - Prevents incorrect parsing when memory entries contain '§' character - Aligns read logic with write logic for consistency
This commit is contained in:
parent
669e4d0297
commit
66d9983d46
1 changed files with 3 additions and 1 deletions
|
|
@ -345,7 +345,9 @@ class MemoryStore:
|
|||
if not raw.strip():
|
||||
return []
|
||||
|
||||
entries = [e.strip() for e in raw.split("§")]
|
||||
# Use ENTRY_DELIMITER for consistency with _write_file. Splitting by "§"
|
||||
# alone would incorrectly split entries that contain "§" in their content.
|
||||
entries = [e.strip() for e in raw.split(ENTRY_DELIMITER)]
|
||||
return [e for e in entries if e]
|
||||
|
||||
@staticmethod
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue