From c012a5f3462b6fc51485552502164787135e5a6d Mon Sep 17 00:00:00 2001 From: Charles Packer Date: Sun, 8 Mar 2026 18:30:14 -0700 Subject: [PATCH] fix(tui): gate debug footer stub behind LETTA_DEBUG_FOOTER env var (#1302) Co-authored-by: Letta Code --- src/cli/components/InputRich.tsx | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/src/cli/components/InputRich.tsx b/src/cli/components/InputRich.tsx index b2f1ca6..1b25924 100644 --- a/src/cli/components/InputRich.tsx +++ b/src/cli/components/InputRich.tsx @@ -269,20 +269,23 @@ const InputFooter = memo(function InputFooter({ useSyncExternalStore(subscribeToSubagents, getSubagentSnapshot); const backgroundAgents = [ ...getActiveBackgroundAgents(), - // DEBUG: hardcoded agent for local footer testing - { - id: "debug-bg-agent", - type: "Reflection", - description: "Debug background agent", - status: "running" as const, - agentURL: "https://app.letta.com/chat/agent-debug-link", - toolCalls: [], - totalTokens: 0, - durationMs: 0, - startTime: Date.now() - 12_000, - isBackground: true, - silent: true, - }, + ...(process.env.LETTA_DEBUG_FOOTER === "1" + ? [ + { + id: "debug-bg-agent", + type: "Reflection", + description: "Debug background agent", + status: "running" as const, + agentURL: "https://app.letta.com/chat/agent-debug-link", + toolCalls: [], + totalTokens: 0, + durationMs: 0, + startTime: Date.now() - 12_000, + isBackground: true, + silent: true, + }, + ] + : []), ]; // Tick counter for elapsed time display (only active when background agents exist)