mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-27 01:11:40 +00:00
refactor: unify gateway session title sync flow
This commit is contained in:
parent
59d45346ba
commit
3438de3623
8 changed files with 421 additions and 61 deletions
|
|
@ -782,6 +782,22 @@ async def test_base_processing_releases_post_delivery_callback_after_main_send()
|
|||
assert released == [True]
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_post_delivery_callbacks_compose_for_same_session():
|
||||
"""Multiple post-delivery callbacks for a session should all run."""
|
||||
adapter = ProgressCaptureAdapter()
|
||||
fired = []
|
||||
|
||||
adapter.register_post_delivery_callback("sess", lambda: fired.append("first"), generation=3)
|
||||
adapter.register_post_delivery_callback("sess", lambda: fired.append("second"), generation=3)
|
||||
|
||||
callback = adapter.pop_post_delivery_callback("sess", generation=3)
|
||||
assert callable(callback)
|
||||
callback()
|
||||
|
||||
assert fired == ["first", "second"]
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_run_agent_drops_tool_progress_after_generation_invalidation(monkeypatch, tmp_path):
|
||||
import yaml
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue