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:
@@ -2226,15 +2226,20 @@ export class DaemonClient {
|
||||
baseRef?: string;
|
||||
ignoreWhitespace?: boolean;
|
||||
}): { mode: "uncommitted" | "base"; baseRef?: string; ignoreWhitespace?: boolean } {
|
||||
const ignoreWhitespace = compare.ignoreWhitespace === true;
|
||||
if (compare.mode === "uncommitted") {
|
||||
return { mode: "uncommitted", ignoreWhitespace };
|
||||
return compare.ignoreWhitespace === true
|
||||
? { mode: "uncommitted", ignoreWhitespace: true }
|
||||
: { mode: "uncommitted" };
|
||||
}
|
||||
const trimmedBaseRef = compare.baseRef?.trim();
|
||||
if (!trimmedBaseRef) {
|
||||
return { mode: "base", ignoreWhitespace };
|
||||
return compare.ignoreWhitespace === true
|
||||
? { mode: "base", ignoreWhitespace: true }
|
||||
: { mode: "base" };
|
||||
}
|
||||
return { mode: "base", baseRef: trimmedBaseRef, ignoreWhitespace };
|
||||
return compare.ignoreWhitespace === true
|
||||
? { mode: "base", baseRef: trimmedBaseRef, ignoreWhitespace: true }
|
||||
: { mode: "base", baseRef: trimmedBaseRef };
|
||||
}
|
||||
|
||||
async getCheckoutDiff(
|
||||
|
||||
Reference in New Issue
Block a user