Transition to flash GA model when experiment flag is present. (#27570)

This commit is contained in:
David Pierce
2026-06-01 23:36:49 +00:00
committed by GitHub
parent 013914071c
commit 665228e983
25 changed files with 707 additions and 28 deletions
+17 -11
View File
@@ -1061,18 +1061,24 @@ export class ShellToolInvocation extends BaseToolInvocation<
}
signal.removeEventListener('abort', onAbort);
timeoutController.signal.removeEventListener('abort', onAbort);
if (tempFilePath) {
try {
await fsPromises.unlink(tempFilePath);
} catch {
// Ignore errors during unlink
// Only clean up if NOT running in background.
// Background processes need the temp directory and PID file to remain
// available until they exit.
if (!this.params.is_background) {
if (tempFilePath) {
try {
await fsPromises.unlink(tempFilePath);
} catch {
// Ignore errors during unlink
}
}
}
if (tempDir) {
try {
await fsPromises.rm(tempDir, { recursive: true, force: true });
} catch {
// Ignore errors during rm
if (tempDir) {
try {
await fsPromises.rm(tempDir, { recursive: true, force: true });
} catch {
// Ignore errors during rm
}
}
}
}