From e35fd67efd442cdd551c16328089851b9db444a5 Mon Sep 17 00:00:00 2001 From: Benjamin Bartels Date: Mon, 23 Jun 2025 16:22:34 +0100 Subject: [PATCH 1/5] Adds ability to disable thought logging --- src/sequentialthinking/index.ts | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/sequentialthinking/index.ts b/src/sequentialthinking/index.ts index c10301d707..2d3c5a0a82 100644 --- a/src/sequentialthinking/index.ts +++ b/src/sequentialthinking/index.ts @@ -25,6 +25,14 @@ interface ThoughtData { class SequentialThinkingServer { private thoughtHistory: ThoughtData[] = []; private branches: Record = {}; + private disableThoughtLogging: boolean; // <-- ADDED + + constructor() { + // Disable logging if the ENV var is "1" or "true" (case-insensitive) + this.disableThoughtLogging = + process.env.DISABLE_THOUGHT_LOGGING === "1" || + (process.env.DISABLE_THOUGHT_LOGGING || "").toLowerCase() === "true"; + } private validateThoughtData(input: unknown): ThoughtData { const data = input as Record; @@ -100,8 +108,11 @@ class SequentialThinkingServer { this.branches[validatedInput.branchId].push(validatedInput); } - const formattedThought = this.formatThought(validatedInput); - console.error(formattedThought); + // --- ONLY LOG IF NOT DISABLED --- + if (!this.disableThoughtLogging) { + const formattedThought = this.formatThought(validatedInput); + console.error(formattedThought); + } return { content: [{ From ba9764424043c8d1ab59c8cc69ae6ff90d20767d Mon Sep 17 00:00:00 2001 From: Benjamin Bartels Date: Mon, 23 Jun 2025 16:24:57 +0100 Subject: [PATCH 2/5] Update index.ts --- src/sequentialthinking/index.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/sequentialthinking/index.ts b/src/sequentialthinking/index.ts index 2d3c5a0a82..c66adacf4a 100644 --- a/src/sequentialthinking/index.ts +++ b/src/sequentialthinking/index.ts @@ -28,10 +28,7 @@ class SequentialThinkingServer { private disableThoughtLogging: boolean; // <-- ADDED constructor() { - // Disable logging if the ENV var is "1" or "true" (case-insensitive) - this.disableThoughtLogging = - process.env.DISABLE_THOUGHT_LOGGING === "1" || - (process.env.DISABLE_THOUGHT_LOGGING || "").toLowerCase() === "true"; + this.disableThoughtLogging = (process.env.DISABLE_THOUGHT_LOGGING || "").toLowerCase() === "true"; } private validateThoughtData(input: unknown): ThoughtData { @@ -108,7 +105,6 @@ class SequentialThinkingServer { this.branches[validatedInput.branchId].push(validatedInput); } - // --- ONLY LOG IF NOT DISABLED --- if (!this.disableThoughtLogging) { const formattedThought = this.formatThought(validatedInput); console.error(formattedThought); From 472a58ca00fb5d0c527d20fe99c6e0a07b9121ce Mon Sep 17 00:00:00 2001 From: Benjamin Bartels Date: Mon, 23 Jun 2025 16:30:51 +0100 Subject: [PATCH 3/5] Update README.md --- src/sequentialthinking/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/sequentialthinking/README.md b/src/sequentialthinking/README.md index d7a03dca05..e64b521802 100644 --- a/src/sequentialthinking/README.md +++ b/src/sequentialthinking/README.md @@ -77,6 +77,8 @@ Add this to your `claude_desktop_config.json`: } ``` +To disable logging of thought information set env var: `DISABLE_THOUGHT_LOGGING` to `TRUE`. + ### Usage with VS Code For quick installation, click one of the installation buttons below... From 921f08287e59383097f5a7d7b10535ee39c8c294 Mon Sep 17 00:00:00 2001 From: Benjamin Bartels Date: Mon, 23 Jun 2025 17:36:05 +0100 Subject: [PATCH 4/5] Update index.ts --- src/sequentialthinking/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sequentialthinking/index.ts b/src/sequentialthinking/index.ts index c66adacf4a..bd486fdbb0 100644 --- a/src/sequentialthinking/index.ts +++ b/src/sequentialthinking/index.ts @@ -25,7 +25,7 @@ interface ThoughtData { class SequentialThinkingServer { private thoughtHistory: ThoughtData[] = []; private branches: Record = {}; - private disableThoughtLogging: boolean; // <-- ADDED + private disableThoughtLogging: boolean; constructor() { this.disableThoughtLogging = (process.env.DISABLE_THOUGHT_LOGGING || "").toLowerCase() === "true"; From 65c5e1e1dff61fa2ff1fa49d6a222910bafed0f9 Mon Sep 17 00:00:00 2001 From: Benjamin Bartels Date: Mon, 23 Jun 2025 18:40:16 +0100 Subject: [PATCH 5/5] Update src/sequentialthinking/README.md Co-authored-by: Cliff Hall --- src/sequentialthinking/README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/sequentialthinking/README.md b/src/sequentialthinking/README.md index e64b521802..fd90b9b111 100644 --- a/src/sequentialthinking/README.md +++ b/src/sequentialthinking/README.md @@ -77,7 +77,8 @@ Add this to your `claude_desktop_config.json`: } ``` -To disable logging of thought information set env var: `DISABLE_THOUGHT_LOGGING` to `TRUE`. +To disable logging of thought information set env var: `DISABLE_THOUGHT_LOGGING` to `true`. +Comment ### Usage with VS Code