Rebase onto upstream (a4d95fd)
#12
@@ -393,7 +393,9 @@ class AgentLoop:
|
|||||||
logger.info(f"Response to {msg.channel}:{msg.sender_id}: {preview}")
|
logger.info(f"Response to {msg.channel}:{msg.sender_id}: {preview}")
|
||||||
|
|
||||||
# Save to session (include tool names so consolidation sees what happened)
|
# Save to session (include tool names so consolidation sees what happened)
|
||||||
session.add_message("user", msg.content)
|
# Store current_message (not msg.content) so the time prefix is preserved
|
||||||
|
# and cache keys match on subsequent turns
|
||||||
|
session.add_message("user", current_message)
|
||||||
session.add_message("assistant", final_content,
|
session.add_message("assistant", final_content,
|
||||||
tools_used=tools_used if tools_used else None)
|
tools_used=tools_used if tools_used else None)
|
||||||
self.sessions.save(session)
|
self.sessions.save(session)
|
||||||
|
|||||||
Reference in New Issue
Block a user