Files
paseo/packages
Mohamed Boudra 9993c73f90 Fix Claude agent test for file change event detection
The test was failing because it only checked for file changes in a
structured `output.files` array, but the actual implementation returns
file changes in different formats depending on the tool type.

The test now checks for file changes in two ways:
1. Structured `output.files` array (original check)
2. Structured tool outputs with `type: "file_write"` or `type: "file_edit"`
   which include a `filePath` field

This matches how the claude-agent implementation structures tool results
in the `buildStructuredToolResult` method (lines 1081-1162), which creates
different output structures for file write/edit tools that include the
filePath directly in the output object rather than in a files array.

The test now properly detects when Claude creates files using either:
- Legacy file change tracking via output.files array
- Modern structured outputs for write_file/edit_file tools

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-30 01:25:09 +00:00
..