Skip to content

Commit ebc4712

Browse files
blue-azclaudebracesproul
authored
fix: make blank LangSmith input disable tracing (#54)
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 <noreply@anthropic.com> Co-authored-by: Brace Sproul <braceasproul@gmail.com>
1 parent d75a9f3 commit ebc4712

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

‎src/credentials.tsx‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -401,6 +401,11 @@ export function InitSetup({
401401
if (nextLangSmithKey.length > 0) {
402402
updates.LANGCHAIN_PROJECT = "openwiki";
403403
updates.LANGCHAIN_TRACING_V2 = "true";
404+
} else {
405+
// Blank input must act as an off switch: without this, a
406+
// LANGCHAIN_TRACING_V2=true saved by an earlier setup stays in
407+
// ~/.openwiki/.env and tracing silently remains enabled.
408+
updates.LANGCHAIN_TRACING_V2 = "false";
404409
}
405410
}
406411

0 commit comments

Comments
 (0)