mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-15 09:01:14 +00:00
Improve edit tool diff display with context-aware rendering
- Add generateDiffString() function in edit tool to create unified diffs with line numbers and 4 lines of context - Store only the formatted diff string in tool result details instead of full file contents - Update tool-execution renderer to parse and colorize the diff string - Filter out message_update events from session saving to prevent verbose session files - Add markdown nested list and table rendering tests
This commit is contained in:
parent
2f0f0a913e
commit
c75f53f6f2
7 changed files with 584 additions and 64 deletions
|
|
@ -192,7 +192,10 @@ describe("Coding Agent Tools", () => {
|
|||
});
|
||||
|
||||
expect(getTextOutput(result)).toContain("Successfully replaced");
|
||||
expect(result.details).toBeUndefined();
|
||||
expect(result.details).toBeDefined();
|
||||
expect(result.details.diff).toBeDefined();
|
||||
expect(typeof result.details.diff).toBe("string");
|
||||
expect(result.details.diff).toContain("testing");
|
||||
});
|
||||
|
||||
it("should fail if text not found", async () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue