Fix agent close persistence, whitespace diff filtering, and diff param cleanup
- Persist snapshot before emitting closed agent to avoid data loss - Flush after branch rename so state hits disk immediately - Filter phantom whitespace-only files from ignore-whitespace diffs - Only include ignoreWhitespace param when true to keep payloads clean - Add createFeature test helper for AgentFeature construction
This commit is contained in:
@@ -1547,6 +1547,16 @@ export async function getCheckoutDiff(
|
||||
continue;
|
||||
}
|
||||
|
||||
// `git diff -w --name-status` can still surface paths whose only changes were
|
||||
// whitespace. Skip those empty tracked entries so callers don't see phantom files.
|
||||
if (
|
||||
ignoreWhitespace &&
|
||||
change.status.startsWith("M") &&
|
||||
(!stat || (!stat.isBinary && stat.additions === 0 && stat.deletions === 0))
|
||||
) {
|
||||
continue;
|
||||
}
|
||||
|
||||
structured.push({
|
||||
path: change.path,
|
||||
isNew: change.isNew,
|
||||
|
||||
Reference in New Issue
Block a user