mirror of
https://github.com/qwibitai/nanoclaw.git
synced 2026-06-04 10:14:47 +08:00
Merge pull request #2595 from IamAdamJowett/fix/transcript-rotate-age-zero-disable
fix(agent-runner): honor zero/negative transcript rotate-age override
This commit is contained in:
@@ -257,8 +257,12 @@ function transcriptRotateBytes(): number {
|
|||||||
* non-positive value) disables the age check; size alone then governs.
|
* non-positive value) disables the age check; size alone then governs.
|
||||||
*/
|
*/
|
||||||
function transcriptRotateAgeMs(): number {
|
function transcriptRotateAgeMs(): number {
|
||||||
const days = Number(process.env.CLAUDE_TRANSCRIPT_ROTATE_AGE_DAYS);
|
const raw = process.env.CLAUDE_TRANSCRIPT_ROTATE_AGE_DAYS;
|
||||||
return Number.isFinite(days) && days > 0 ? days * 86_400_000 : 14 * 86_400_000;
|
if (raw === undefined || raw.trim() === '') return 14 * 86_400_000;
|
||||||
|
const days = Number(raw);
|
||||||
|
if (!Number.isFinite(days)) return 14 * 86_400_000;
|
||||||
|
// Explicit non-positive override disables the age check; size alone governs.
|
||||||
|
return days > 0 ? days * 86_400_000 : Infinity;
|
||||||
}
|
}
|
||||||
|
|
||||||
function claudeProjectsDir(): string {
|
function claudeProjectsDir(): string {
|
||||||
|
|||||||
Reference in New Issue
Block a user