mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-30 15:04:16 -07:00
Remove deprecated inline thinking setting
This commit is contained in:
@@ -179,17 +179,14 @@ their corresponding top-level category object in your `settings.json` file.
|
|||||||
- **Default:** `false`
|
- **Default:** `false`
|
||||||
- **Requires restart:** Yes
|
- **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):
|
- **`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`
|
- **Default:** `false`
|
||||||
|
|
||||||
- **`ui.showInlineThinkingSummary`** (boolean):
|
- **`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`
|
- **Default:** `false`
|
||||||
|
|
||||||
- **`ui.showStatusInTitle`** (boolean):
|
- **`ui.showStatusInTitle`** (boolean):
|
||||||
|
|||||||
@@ -373,16 +373,6 @@ const SETTINGS_SCHEMA = {
|
|||||||
description: 'Hide the window title bar',
|
description: 'Hide the window title bar',
|
||||||
showInDialog: true,
|
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: {
|
showInlineThinkingFull: {
|
||||||
type: 'boolean',
|
type: 'boolean',
|
||||||
label: 'Show Inline Thinking (Full)',
|
label: 'Show Inline Thinking (Full)',
|
||||||
|
|||||||
@@ -19,7 +19,8 @@ vi.mock('../contexts/SettingsContext.js', async () => {
|
|||||||
useSettings: () => ({
|
useSettings: () => ({
|
||||||
merged: {
|
merged: {
|
||||||
ui: {
|
ui: {
|
||||||
showInlineThinking: false,
|
showInlineThinkingFull: false,
|
||||||
|
showInlineThinkingSummary: false,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ vi.mock('../contexts/SettingsContext.js', () => ({
|
|||||||
useSettings: () => ({
|
useSettings: () => ({
|
||||||
merged: {
|
merged: {
|
||||||
ui: {
|
ui: {
|
||||||
showInlineThinking: false,
|
|
||||||
showInlineThinkingFull: false,
|
showInlineThinkingFull: false,
|
||||||
showInlineThinkingSummary: false,
|
showInlineThinkingSummary: false,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -82,6 +82,17 @@ import path from 'node:path';
|
|||||||
|
|
||||||
const MAX_THOUGHT_SUMMARY_LENGTH = 140;
|
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 {
|
function summarizeThought(thought: ThoughtSummary): ThoughtSummary {
|
||||||
const subject = thought.subject.trim();
|
const subject = thought.subject.trim();
|
||||||
if (subject) {
|
if (subject) {
|
||||||
@@ -93,12 +104,14 @@ function summarizeThought(thought: ThoughtSummary): ThoughtSummary {
|
|||||||
return { subject: '', description: '' };
|
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: '' };
|
return { subject: description, description: '' };
|
||||||
}
|
}
|
||||||
|
|
||||||
const trimmed = description
|
const trimmed = descriptionGraphemes
|
||||||
.slice(0, MAX_THOUGHT_SUMMARY_LENGTH - 3)
|
.slice(0, MAX_THOUGHT_SUMMARY_LENGTH - 3)
|
||||||
|
.join('')
|
||||||
.trimEnd();
|
.trimEnd();
|
||||||
return { subject: `${trimmed}...`, description: '' };
|
return { subject: `${trimmed}...`, description: '' };
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,9 +21,5 @@ export function getInlineThinkingMode(
|
|||||||
return 'summary';
|
return 'summary';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ui?.showInlineThinking) {
|
|
||||||
return 'full';
|
|
||||||
}
|
|
||||||
|
|
||||||
return 'off';
|
return 'off';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -187,13 +187,6 @@
|
|||||||
"default": false,
|
"default": false,
|
||||||
"type": "boolean"
|
"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": {
|
"showInlineThinkingFull": {
|
||||||
"title": "Show Inline Thinking (Full)",
|
"title": "Show Inline Thinking (Full)",
|
||||||
"description": "Show full model thinking details inline.",
|
"description": "Show full model thinking details inline.",
|
||||||
|
|||||||
Reference in New Issue
Block a user