mirror of
https://github.com/supermemoryai/supermemory.git
synced 2026-10-01 02:01:40 +00:00
_enhance_context_with_memories refreshes the system message by calling MEMORY_TAG_PATTERN.sub(tagged_memory, existing_content). Passing the memory text as a string replacement makes re.sub parse it as a template, so backslash sequences in ordinary memories are expanded rather than inserted. Two failures follow, both on the second and later turns, once a block exists to replace: "User's repo is at C:\Users\alice" -> re.error: bad escape \U "User writes \1 for a capture group" -> re.error: invalid group reference 1 The exception propagates out of context enhancement and aborts the turn. A callable replacement inserts the text verbatim and cannot be parsed as a template. Adds a regression test covering the Windows-path case, which fails on main with the production error. |
||
|---|---|---|
| .. | ||
| agent-framework-python | ||
| ai-sdk | ||
| cartesia-sdk-python | ||
| docs-test | ||
| hooks | ||
| lib | ||
| memory-graph | ||
| openai-sdk-python | ||
| pipecat-sdk-python | ||
| tools | ||
| ui | ||
| validation | ||