Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ In `openclaw.json`:
"sequential-thinking": {
"enabled": true,
"config": {
"thoughtLogging": true,
"thoughtLogging": false,
"models": [
"anthropic/claude-sonnet-4",
"google/gemini-3-flash-preview",
Expand Down Expand Up @@ -180,7 +180,7 @@ Facilitates a detailed, step-by-step thinking process for problem-solving and an

## Plugin Config

- `thoughtLogging` (boolean, default: `true`): Log formatted thoughts to console
- `thoughtLogging` (boolean, default: `false`): Log formatted thoughts to console
- `models` (string[], default: `[]`): Model IDs that should receive a prompt injection encouraging preference for `sequential_thinking` on complex problems. Empty strings are automatically filtered out.

## Differences from MCP Original
Expand Down
2 changes: 1 addition & 1 deletion openclaw.plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"thoughtLogging": {
"type": "boolean",
"description": "Log formatted thoughts to console",
"default": true
"default": false
},
"models": {
"type": "array",
Expand Down
10 changes: 5 additions & 5 deletions src/config.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@ import { resolveConfig } from "./config.js";
describe("resolveConfig", () => {
it("returns defaults when raw is empty", () => {
const result = resolveConfig({});
expect(result.thoughtLogging).toBe(true);
expect(result.thoughtLogging).toBe(false);
expect(result.models).toBeUndefined();
});

it("returns defaults when raw is not an object", () => {
expect(resolveConfig(undefined)).toEqual({ thoughtLogging: true });
expect(resolveConfig("invalid")).toEqual({ thoughtLogging: true });
expect(resolveConfig(undefined)).toEqual({ thoughtLogging: false });
expect(resolveConfig("invalid")).toEqual({ thoughtLogging: false });
});

it("defaults thoughtLogging to true when not provided", () => {
it("defaults thoughtLogging to false when not provided", () => {
const result = resolveConfig({ models: ["claude-sonnet-4"] });
expect(result.thoughtLogging).toBe(true);
expect(result.thoughtLogging).toBe(false);
expect(result.models).toEqual(["claude-sonnet-4"]);
});

Expand Down
4 changes: 2 additions & 2 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export type SequentialThinkingConfig = {

const ConfigSchema = z
.object({
thoughtLogging: z.boolean().catch(true),
thoughtLogging: z.boolean().catch(false),
models: z
.array(z.unknown())
.transform((models) =>
Expand All @@ -20,7 +20,7 @@ const ConfigSchema = z
.catch(undefined),
})
.catch({
thoughtLogging: true,
thoughtLogging: false,
});

export function resolveConfig(raw: unknown): SequentialThinkingConfig {
Expand Down
2 changes: 1 addition & 1 deletion src/tool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export class SequentialThinkingTool {
private thoughtLogging: boolean;

constructor(thoughtLogging?: boolean) {
this.thoughtLogging = thoughtLogging ?? true;
this.thoughtLogging = thoughtLogging ?? false;
}

private formatThought(thoughtData: ThoughtData): string {
Expand Down
Loading