Add inline thinking mode helper

This commit is contained in:
Dmitry Lyalin
2026-01-31 11:23:44 -05:00
parent 364954851a
commit 8b04b21648

View File

@@ -0,0 +1,29 @@
/**
* @license
* Copyright 2026 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import type { LoadedSettings } from '../../config/settings.js';
export type InlineThinkingMode = 'off' | 'summary' | 'full';
export function getInlineThinkingMode(
settings: LoadedSettings,
): InlineThinkingMode {
const ui = settings.merged.ui;
if (ui?.showInlineThinkingFull) {
return 'full';
}
if (ui?.showInlineThinkingSummary) {
return 'summary';
}
if (ui?.showInlineThinking) {
return 'full';
}
return 'off';
}