fix: pass stable task_id in CLI and gateway to preserve sandbox state across turns
Signed-off-by: rovle <lovre.pesut@gmail.com>
This commit is contained in:
parent
fe15a2c65c
commit
7d47e3b776
2 changed files with 2 additions and 1 deletions
1
cli.py
1
cli.py
|
|
@ -2157,6 +2157,7 @@ class HermesCLI:
|
||||||
result = self.agent.run_conversation(
|
result = self.agent.run_conversation(
|
||||||
user_message=message,
|
user_message=message,
|
||||||
conversation_history=self.conversation_history[:-1], # Exclude the message we just added
|
conversation_history=self.conversation_history[:-1], # Exclude the message we just added
|
||||||
|
task_id=self.session_id,
|
||||||
)
|
)
|
||||||
|
|
||||||
# Start agent in background thread
|
# Start agent in background thread
|
||||||
|
|
|
||||||
|
|
@ -2131,7 +2131,7 @@ class GatewayRunner:
|
||||||
if _p:
|
if _p:
|
||||||
_history_media_paths.add(_p)
|
_history_media_paths.add(_p)
|
||||||
|
|
||||||
result = agent.run_conversation(message, conversation_history=agent_history)
|
result = agent.run_conversation(message, conversation_history=agent_history, task_id=session_id)
|
||||||
result_holder[0] = result
|
result_holder[0] = result
|
||||||
|
|
||||||
# Return final response, or a message if something went wrong
|
# Return final response, or a message if something went wrong
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue