fix: console error leak (#1049)
Co-authored-by: Letta <noreply@letta.com>
This commit is contained in:
@@ -8,6 +8,7 @@ import { LETTA_CLOUD_API_URL } from "../../auth/oauth.js";
|
||||
import { resizeImageIfNeeded } from "../../cli/helpers/imageResize.js";
|
||||
import { SYSTEM_REMINDER_CLOSE, SYSTEM_REMINDER_OPEN } from "../../constants";
|
||||
import { settingsManager } from "../../settings-manager.js";
|
||||
import { debugLog } from "../../utils/debug.js";
|
||||
import { OVERFLOW_CONFIG, writeOverflowFile } from "./overflow.js";
|
||||
import { LIMITS } from "./truncation.js";
|
||||
import { validateRequiredParams } from "./validation.js";
|
||||
@@ -179,7 +180,7 @@ function formatWithLineNumbers(
|
||||
overflowPath = writeOverflowFile(content, workingDirectory, "Read");
|
||||
} catch (error) {
|
||||
// Silently fail if overflow file creation fails
|
||||
console.error("Failed to write overflow file:", error);
|
||||
debugLog("read", "Failed to write overflow file: %O", error);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
* When outputs exceed limits, full content can be written to overflow files.
|
||||
*/
|
||||
|
||||
import { debugLog } from "../../utils/debug.js";
|
||||
import { OVERFLOW_CONFIG, writeOverflowFile } from "./overflow.js";
|
||||
|
||||
// Limits based on Claude Code's proven production values
|
||||
@@ -64,7 +65,7 @@ export function truncateByChars(
|
||||
);
|
||||
} catch (error) {
|
||||
// Silently fail if overflow file creation fails
|
||||
console.error("Failed to write overflow file:", error);
|
||||
debugLog("truncation", "Failed to write overflow file: %O", error);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -167,7 +168,7 @@ export function truncateByLines(
|
||||
);
|
||||
} catch (error) {
|
||||
// Silently fail if overflow file creation fails
|
||||
console.error("Failed to write overflow file:", error);
|
||||
debugLog("truncation", "Failed to write overflow file: %O", error);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -250,7 +251,7 @@ export function truncateArray<T>(
|
||||
);
|
||||
} catch (error) {
|
||||
// Silently fail if overflow file creation fails
|
||||
console.error("Failed to write overflow file:", error);
|
||||
debugLog("truncation", "Failed to write overflow file: %O", error);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user