mirror of
https://github.com/HKUDS/nanobot.git
synced 2026-09-04 02:01:48 +03:00
refactor(agent): make run usage explicit (#5546)
* refactor(agent): make run usage explicit * fix(api): capture usage per run
This commit is contained in:
@@ -144,11 +144,11 @@ class TestMessageToolSuppressLogic:
|
||||
async def on_progress(content: str, *, tool_hint: bool = False) -> None:
|
||||
progress.append((content, tool_hint))
|
||||
|
||||
final_content, _, _, _, _ = await loop._run_agent_loop(
|
||||
result = await loop._run_agent_loop(
|
||||
[], runtime=loop.llm_runtime(), on_progress=on_progress
|
||||
)
|
||||
|
||||
assert final_content == "Done"
|
||||
assert result.final_content == "Done"
|
||||
assert progress == [
|
||||
("Visible", False),
|
||||
('read foo.txt', True),
|
||||
|
||||
Reference in New Issue
Block a user