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:
@@ -337,8 +337,10 @@ export async function main(args: string[]) {
|
||||
sessionManager.saveMessage(event.message);
|
||||
}
|
||||
|
||||
// Log all events
|
||||
sessionManager.saveEvent(event);
|
||||
// Log all events except message_update (too verbose)
|
||||
if (event.type !== "message_update") {
|
||||
sessionManager.saveEvent(event);
|
||||
}
|
||||
});
|
||||
|
||||
// Determine mode: interactive if no messages provided
|
||||
|
||||
Reference in New Issue
Block a user