summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAriane Emory <[email protected]>2026-02-04 19:29:46 -0500
committerGitHub <[email protected]>2026-02-04 18:29:46 -0600
commit4387f9fb9a6a364e88df51208ec40f21a948f7bd (patch)
tree5c265e548423be70ca01102b443a58cebdba825a
parent31e2feb347e32adf173ab239b4ecb98d5127679a (diff)
downloadopencode-4387f9fb9a6a364e88df51208ec40f21a948f7bd.tar.gz
opencode-4387f9fb9a6a364e88df51208ec40f21a948f7bd.zip
feat: Allow the function to hide or show thinking blocks to be bound to a key (resolves #12168) (#12171)
-rw-r--r--packages/opencode/src/cli/cmd/tui/routes/session/index.tsx1
-rw-r--r--packages/opencode/src/config/config.ts1
-rw-r--r--packages/sdk/js/src/v2/gen/types.gen.ts4
-rw-r--r--packages/web/src/content/docs/keybinds.mdx3
4 files changed, 8 insertions, 1 deletions
diff --git a/packages/opencode/src/cli/cmd/tui/routes/session/index.tsx b/packages/opencode/src/cli/cmd/tui/routes/session/index.tsx
index 9a000f953..8a38d9e6f 100644
--- a/packages/opencode/src/cli/cmd/tui/routes/session/index.tsx
+++ b/packages/opencode/src/cli/cmd/tui/routes/session/index.tsx
@@ -546,6 +546,7 @@ export function Session() {
{
title: showThinking() ? "Hide thinking" : "Show thinking",
value: "session.toggle.thinking",
+ keybind: "display_thinking",
category: "Session",
slash: {
name: "thinking",
diff --git a/packages/opencode/src/config/config.ts b/packages/opencode/src/config/config.ts
index 436e82983..7c7f1cc43 100644
--- a/packages/opencode/src/config/config.ts
+++ b/packages/opencode/src/config/config.ts
@@ -899,6 +899,7 @@ export namespace Config {
terminal_suspend: z.string().optional().default("ctrl+z").describe("Suspend terminal"),
terminal_title_toggle: z.string().optional().default("none").describe("Toggle terminal title"),
tips_toggle: z.string().optional().default("<leader>h").describe("Toggle tips on home screen"),
+ display_thinking: z.string().optional().default("none").describe("Toggle thinking blocks visibility"),
})
.strict()
.meta({
diff --git a/packages/sdk/js/src/v2/gen/types.gen.ts b/packages/sdk/js/src/v2/gen/types.gen.ts
index 8050b47d6..cb1606e3f 100644
--- a/packages/sdk/js/src/v2/gen/types.gen.ts
+++ b/packages/sdk/js/src/v2/gen/types.gen.ts
@@ -1309,6 +1309,10 @@ export type KeybindsConfig = {
* Toggle tips on home screen
*/
tips_toggle?: string
+ /**
+ * Toggle thinking blocks visibility
+ */
+ display_thinking?: string
}
/**
diff --git a/packages/web/src/content/docs/keybinds.mdx b/packages/web/src/content/docs/keybinds.mdx
index 51508a4f8..25fe2a1d9 100644
--- a/packages/web/src/content/docs/keybinds.mdx
+++ b/packages/web/src/content/docs/keybinds.mdx
@@ -97,7 +97,8 @@ OpenCode has a list of keybinds that you can customize through the OpenCode conf
"history_next": "down",
"terminal_suspend": "ctrl+z",
"terminal_title_toggle": "none",
- "tips_toggle": "<leader>h"
+ "tips_toggle": "<leader>h",
+ "display_thinking": "none"
}
}
```