From 6971ef6f9641aa66520229bda6676f527839b433 Mon Sep 17 00:00:00 2001 From: Erik Fehn Date: Thu, 2 Jul 2026 23:31:59 -0700 Subject: [PATCH] fix: make blank LangSmith input disable tracing A LANGCHAIN_TRACING_V2=true saved by an earlier setup survived in ~/.openwiki/.env when the user later left the LangSmith prompt blank, because saveOpenWikiEnv merges updates and never clears the flag. Blank input now explicitly writes LANGCHAIN_TRACING_V2=false. Co-Authored-By: Claude Fable 5 --- src/credentials.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/credentials.tsx b/src/credentials.tsx index b0a99e82..ce68bc41 100644 --- a/src/credentials.tsx +++ b/src/credentials.tsx @@ -320,6 +320,11 @@ export function InitSetup({ if (nextLangSmithKey.length > 0) { updates.LANGCHAIN_PROJECT = "openwiki"; updates.LANGCHAIN_TRACING_V2 = "true"; + } else { + // Blank input must act as an off switch: without this, a + // LANGCHAIN_TRACING_V2=true saved by an earlier setup stays in + // ~/.openwiki/.env and tracing silently remains enabled. + updates.LANGCHAIN_TRACING_V2 = "false"; } }