mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-28 01:21:43 +00:00
fix(gateway): honor previewed replies in queued follow-ups
This commit is contained in:
parent
d67e602cc8
commit
35bbc6851b
2 changed files with 19 additions and 2 deletions
|
|
@ -324,9 +324,24 @@ class TestQueuedMessageAlreadyStreamed:
|
|||
def test_queued_path_detects_confirmed_final_stream_delivery(self):
|
||||
"""Confirmed final streamed delivery should skip the resend."""
|
||||
_sc = self._make_mock_sc(already_sent=True, final_response_sent=True)
|
||||
response = {"response_previewed": False}
|
||||
|
||||
_already_streamed = bool(
|
||||
_sc and getattr(_sc, "final_response_sent", False)
|
||||
(_sc and getattr(_sc, "final_response_sent", False))
|
||||
or bool(response.get("response_previewed"))
|
||||
)
|
||||
|
||||
assert _already_streamed is True
|
||||
|
||||
def test_queued_path_detects_previewed_response_delivery(self):
|
||||
"""A response already previewed via the adapter should not be resent
|
||||
before processing the queued follow-up."""
|
||||
_sc = self._make_mock_sc(already_sent=False, final_response_sent=False)
|
||||
response = {"response_previewed": True}
|
||||
|
||||
_already_streamed = bool(
|
||||
(_sc and getattr(_sc, "final_response_sent", False))
|
||||
or bool(response.get("response_previewed"))
|
||||
)
|
||||
|
||||
assert _already_streamed is True
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue