feat: debug log file for diagnostics (#1211)

Co-authored-by: Letta <noreply@letta.com>
This commit is contained in:
cthomas
2026-02-27 16:49:26 -08:00
committed by GitHub
parent 22c31b3d74
commit e0cea19c9f
3 changed files with 151 additions and 25 deletions

View File

@@ -112,7 +112,7 @@ import {
} from "../tools/manager";
import type { ToolsetName, ToolsetPreference } from "../tools/toolset";
import { formatToolsetName } from "../tools/toolset-labels";
import { debugLog, debugWarn } from "../utils/debug";
import { debugLog, debugLogFile, debugWarn } from "../utils/debug";
import { getVersion } from "../version";
import {
handleMcpAdd,
@@ -1587,6 +1587,7 @@ export default function App({
useEffect(() => {
if (agentId && agentId !== "loading") {
chunkLog.init(agentId, telemetry.getSessionId());
debugLogFile.init(agentId, telemetry.getSessionId());
}
}, [agentId]);
@@ -11522,6 +11523,8 @@ ${SYSTEM_REMINDER_CLOSE}
billing_tier: billingTier ?? undefined,
// Recent chunk log for diagnostics
recent_chunks: chunkLog.getEntries(),
// Debug log tail for diagnostics
debug_log_tail: debugLogFile.getTail(),
}),
},
);