fix(debug): unify LETTA_DEBUG and DEBUG gating (#1408)
Co-authored-by: Letta Code <noreply@letta.com>
This commit is contained in:
@@ -121,7 +121,12 @@ import {
|
||||
} from "../tools/manager";
|
||||
import type { ToolsetName, ToolsetPreference } from "../tools/toolset";
|
||||
import { formatToolsetName } from "../tools/toolset-labels";
|
||||
import { debugLog, debugLogFile, debugWarn } from "../utils/debug";
|
||||
import {
|
||||
debugLog,
|
||||
debugLogFile,
|
||||
debugWarn,
|
||||
isDebugEnabled,
|
||||
} from "../utils/debug";
|
||||
import { getVersion } from "../version";
|
||||
import {
|
||||
handleMcpAdd,
|
||||
@@ -3050,7 +3055,7 @@ export default function App({
|
||||
const agentName = agentState?.name || "Unnamed Agent";
|
||||
const isResumingConversation =
|
||||
resumedExistingConversation || messageHistory.length > 0;
|
||||
if (process.env.DEBUG) {
|
||||
if (isDebugEnabled()) {
|
||||
console.log(
|
||||
`[DEBUG] Header: resumedExistingConversation=${resumedExistingConversation}, messageHistory.length=${messageHistory.length}`,
|
||||
);
|
||||
@@ -4721,7 +4726,7 @@ export default function App({
|
||||
})
|
||||
.catch((err) => {
|
||||
// Silently ignore - not critical
|
||||
if (process.env.DEBUG) {
|
||||
if (isDebugEnabled()) {
|
||||
console.error(
|
||||
"[DEBUG] Failed to set conversation summary:",
|
||||
err,
|
||||
|
||||
Reference in New Issue
Block a user