mirror of
https://github.com/modelcontextprotocol/servers.git
synced 2026-04-27 08:15:16 +02:00
Merge pull request #2186 from bbartels/patch-1
Adds ability to disable thought logging
This commit is contained in:
@@ -77,6 +77,9 @@ Add this to your `claude_desktop_config.json`:
|
||||
}
|
||||
```
|
||||
|
||||
To disable logging of thought information set env var: `DISABLE_THOUGHT_LOGGING` to `true`.
|
||||
Comment
|
||||
|
||||
### Usage with VS Code
|
||||
|
||||
For quick installation, click one of the installation buttons below...
|
||||
|
||||
@@ -25,6 +25,11 @@ interface ThoughtData {
|
||||
class SequentialThinkingServer {
|
||||
private thoughtHistory: ThoughtData[] = [];
|
||||
private branches: Record<string, ThoughtData[]> = {};
|
||||
private disableThoughtLogging: boolean;
|
||||
|
||||
constructor() {
|
||||
this.disableThoughtLogging = (process.env.DISABLE_THOUGHT_LOGGING || "").toLowerCase() === "true";
|
||||
}
|
||||
|
||||
private validateThoughtData(input: unknown): ThoughtData {
|
||||
const data = input as Record<string, unknown>;
|
||||
@@ -100,8 +105,10 @@ class SequentialThinkingServer {
|
||||
this.branches[validatedInput.branchId].push(validatedInput);
|
||||
}
|
||||
|
||||
const formattedThought = this.formatThought(validatedInput);
|
||||
console.error(formattedThought);
|
||||
if (!this.disableThoughtLogging) {
|
||||
const formattedThought = this.formatThought(validatedInput);
|
||||
console.error(formattedThought);
|
||||
}
|
||||
|
||||
return {
|
||||
content: [{
|
||||
|
||||
Reference in New Issue
Block a user