Remove deprecated inline thinking setting

This commit is contained in:
Dmitry Lyalin
2026-02-01 15:05:36 -05:00
parent f35143cdd3
commit 2490db7200
7 changed files with 21 additions and 32 deletions

View File

@@ -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)',

View File

@@ -19,7 +19,8 @@ vi.mock('../contexts/SettingsContext.js', async () => {
useSettings: () => ({
merged: {
ui: {
showInlineThinking: false,
showInlineThinkingFull: false,
showInlineThinkingSummary: false,
},
},
}),

View File

@@ -16,7 +16,6 @@ vi.mock('../contexts/SettingsContext.js', () => ({
useSettings: () => ({
merged: {
ui: {
showInlineThinking: false,
showInlineThinkingFull: false,
showInlineThinkingSummary: false,
},

View File

@@ -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: '' };
}

View File

@@ -21,9 +21,5 @@ export function getInlineThinkingMode(
return 'summary';
}
if (ui?.showInlineThinking) {
return 'full';
}
return 'off';
}