Commit 3d43ef8
committed
telegram: save user message before agent loop for session recall
session_search inside the agent loop could never find the current
turn's data. The user message was appended to an in-memory slice
but only persisted to disk AFTER RunWithMessages completed.
This meant the vector index never had the current conversation's
content, and deepSearch read a stale session file from disk.
Now the user message is saved to the Store immediately after
being appended, using a Store.Save call that bypasses the
TurnCount increment (which happens once at the normal end-of-turn
save).1 parent 43ba6de commit 3d43ef8
1 file changed
Lines changed: 18 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
998 | 998 | | |
999 | 999 | | |
1000 | 1000 | | |
| 1001 | + | |
| 1002 | + | |
| 1003 | + | |
| 1004 | + | |
| 1005 | + | |
| 1006 | + | |
| 1007 | + | |
| 1008 | + | |
| 1009 | + | |
| 1010 | + | |
| 1011 | + | |
| 1012 | + | |
| 1013 | + | |
| 1014 | + | |
| 1015 | + | |
| 1016 | + | |
| 1017 | + | |
| 1018 | + | |
1001 | 1019 | | |
1002 | 1020 | | |
1003 | 1021 | | |
| |||
0 commit comments