From 2490db72002dfe0032ea7816a8493715d87bb401 Mon Sep 17 00:00:00 2001 From: Dmitry Lyalin Date: Sun, 1 Feb 2026 15:05:36 -0500 Subject: [PATCH] Remove deprecated inline thinking setting --- docs/get-started/configuration.md | 11 ++++------- packages/cli/src/config/settingsSchema.ts | 10 ---------- .../cli/src/ui/components/MainContent.test.tsx | 3 ++- .../src/ui/components/QuittingDisplay.test.tsx | 1 - packages/cli/src/ui/hooks/useGeminiStream.ts | 17 +++++++++++++++-- packages/cli/src/ui/utils/inlineThinkingMode.ts | 4 ---- schemas/settings.schema.json | 7 ------- 7 files changed, 21 insertions(+), 32 deletions(-) diff --git a/docs/get-started/configuration.md b/docs/get-started/configuration.md index 381f6b657b..b695651db1 100644 --- a/docs/get-started/configuration.md +++ b/docs/get-started/configuration.md @@ -179,17 +179,14 @@ their corresponding top-level category object in your `settings.json` file. - **Default:** `false` - **Requires restart:** Yes -- **`ui.showInlineThinking`** (boolean): - - **Description:** Show model thinking summaries inline in the conversation - (deprecated; prefer the specific thinking modes). - - **Default:** `false` - - **`ui.showInlineThinkingFull`** (boolean): - - **Description:** Show full model thinking details inline. + - **Description:** Show full model thinking details inline. If both full and + summary modes are enabled, full mode takes precedence. - **Default:** `false` - **`ui.showInlineThinkingSummary`** (boolean): - - **Description:** Show a short summary of model thinking inline. + - **Description:** Show a short summary of model thinking inline. Summaries + truncate long content (about 140 characters) and append an ellipsis. - **Default:** `false` - **`ui.showStatusInTitle`** (boolean): diff --git a/packages/cli/src/config/settingsSchema.ts b/packages/cli/src/config/settingsSchema.ts index ba461ecb0b..2589933fea 100644 --- a/packages/cli/src/config/settingsSchema.ts +++ b/packages/cli/src/config/settingsSchema.ts @@ -373,16 +373,6 @@ const SETTINGS_SCHEMA = { description: 'Hide the window title bar', showInDialog: true, }, - showInlineThinking: { - type: 'boolean', - label: 'Show Inline Thinking', - category: 'UI', - requiresRestart: false, - default: false, - description: - 'Show model thinking summaries inline in the conversation (deprecated; prefer the specific thinking modes).', - showInDialog: false, - }, showInlineThinkingFull: { type: 'boolean', label: 'Show Inline Thinking (Full)', diff --git a/packages/cli/src/ui/components/MainContent.test.tsx b/packages/cli/src/ui/components/MainContent.test.tsx index 06a7209d70..284edff82c 100644 --- a/packages/cli/src/ui/components/MainContent.test.tsx +++ b/packages/cli/src/ui/components/MainContent.test.tsx @@ -19,7 +19,8 @@ vi.mock('../contexts/SettingsContext.js', async () => { useSettings: () => ({ merged: { ui: { - showInlineThinking: false, + showInlineThinkingFull: false, + showInlineThinkingSummary: false, }, }, }), diff --git a/packages/cli/src/ui/components/QuittingDisplay.test.tsx b/packages/cli/src/ui/components/QuittingDisplay.test.tsx index ab20a12d83..b004b95ca8 100644 --- a/packages/cli/src/ui/components/QuittingDisplay.test.tsx +++ b/packages/cli/src/ui/components/QuittingDisplay.test.tsx @@ -16,7 +16,6 @@ vi.mock('../contexts/SettingsContext.js', () => ({ useSettings: () => ({ merged: { ui: { - showInlineThinking: false, showInlineThinkingFull: false, showInlineThinkingSummary: false, }, diff --git a/packages/cli/src/ui/hooks/useGeminiStream.ts b/packages/cli/src/ui/hooks/useGeminiStream.ts index aaa8d9c440..7d1ee32d89 100644 --- a/packages/cli/src/ui/hooks/useGeminiStream.ts +++ b/packages/cli/src/ui/hooks/useGeminiStream.ts @@ -82,6 +82,17 @@ import path from 'node:path'; const MAX_THOUGHT_SUMMARY_LENGTH = 140; +function splitGraphemes(value: string): string[] { + if (typeof Intl !== 'undefined' && 'Segmenter' in Intl) { + const segmenter = new Intl.Segmenter(undefined, { + granularity: 'grapheme', + }); + return Array.from(segmenter.segment(value), (segment) => segment.segment); + } + + return Array.from(value); +} + function summarizeThought(thought: ThoughtSummary): ThoughtSummary { const subject = thought.subject.trim(); if (subject) { @@ -93,12 +104,14 @@ function summarizeThought(thought: ThoughtSummary): ThoughtSummary { return { subject: '', description: '' }; } - if (description.length <= MAX_THOUGHT_SUMMARY_LENGTH) { + const descriptionGraphemes = splitGraphemes(description); + if (descriptionGraphemes.length <= MAX_THOUGHT_SUMMARY_LENGTH) { return { subject: description, description: '' }; } - const trimmed = description + const trimmed = descriptionGraphemes .slice(0, MAX_THOUGHT_SUMMARY_LENGTH - 3) + .join('') .trimEnd(); return { subject: `${trimmed}...`, description: '' }; } diff --git a/packages/cli/src/ui/utils/inlineThinkingMode.ts b/packages/cli/src/ui/utils/inlineThinkingMode.ts index 27c7ac8d04..2afb5d6a9a 100644 --- a/packages/cli/src/ui/utils/inlineThinkingMode.ts +++ b/packages/cli/src/ui/utils/inlineThinkingMode.ts @@ -21,9 +21,5 @@ export function getInlineThinkingMode( return 'summary'; } - if (ui?.showInlineThinking) { - return 'full'; - } - return 'off'; } diff --git a/schemas/settings.schema.json b/schemas/settings.schema.json index 6dc942afbf..5627193f15 100644 --- a/schemas/settings.schema.json +++ b/schemas/settings.schema.json @@ -187,13 +187,6 @@ "default": false, "type": "boolean" }, - "showInlineThinking": { - "title": "Show Inline Thinking", - "description": "Show model thinking summaries inline in the conversation (deprecated; prefer the specific thinking modes).", - "markdownDescription": "Show model thinking summaries inline in the conversation (deprecated; prefer the specific thinking modes).\n\n- Category: `UI`\n- Requires restart: `no`\n- Default: `false`", - "default": false, - "type": "boolean" - }, "showInlineThinkingFull": { "title": "Show Inline Thinking (Full)", "description": "Show full model thinking details inline.",