feat: add file edit diff progress view
Capture file edit snapshots through runner tool lifecycle hooks and render unified diffs in the WebUI with folding and truncation controls.
This commit is contained in:
1 parent
207813d3b5
commit
7768672c5b
40 files changed
+2224
-1753
No files matched your search
@@ -47,6 +47,12 @@ async def test_runner_calls_hooks_in_order():
|
||||
[tc.name for tc in context.tool_calls],
|
||||
))
|
||||
|
||||
async def before_execute_tool(self, context, tool_call, tool, params) -> None:
|
||||
events.append(("before_execute_tool", context.iteration, tool_call.name, params))
|
||||
|
||||
async def after_execute_tool(self, context, tool_call, tool, params, result) -> None:
|
||||
events.append(("after_execute_tool", context.iteration, tool_call.name, result))
|
||||
|
||||
async def after_iteration(self, context: AgentHookContext) -> None:
|
||||
events.append((
|
||||
"after_iteration",
|
||||
@@ -75,6 +81,8 @@ async def test_runner_calls_hooks_in_order():
|
||||
assert events == [
|
||||
("before_iteration", 0),
|
||||
("before_execute_tools", 0, ["list_dir"]),
|
||||
("before_execute_tool", 0, "list_dir", {"path": "."}),
|
||||
("after_execute_tool", 0, "list_dir", "tool result"),
|
||||
(
|
||||
"after_iteration",
|
||||
0,
|
||||
|
||||
Reference in new issue
Block a user