MCPcopy Create free account
hub / github.com/claude-code-best/claude-code / onChangeMainModelConfig

Function onChangeMainModelConfig

src/components/Settings/Config.tsx:257–278  ·  view source on GitHub ↗
(value: string | null)

Source from the content-addressed store, hash-verified

255 const autoUpdaterDisabledReason = getAutoUpdaterDisabledReason();
256
257 function onChangeMainModelConfig(value: string | null): void {
258 const previousModel = mainLoopModel;
259 logEvent('tengu_config_model_changed', {
260 from_model: previousModel as AnalyticsMetadata_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS,
261 to_model: value as AnalyticsMetadata_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS,
262 });
263 setAppState(prev => ({
264 ...prev,
265 mainLoopModel: value,
266 mainLoopModelForSession: null,
267 }));
268 setChanges(prev => {
269 const valStr =
270 modelDisplayString(value) +
271 (isBilledAsExtraUsage(value, false, isOpus1mMergeEnabled()) ? ' · Billed as extra usage' : '');
272 if ('model' in prev) {
273 const { model, ...rest } = prev;
274 return { ...rest, model: valStr };
275 }
276 return { ...prev, model: valStr };
277 });
278 }
279
280 function onChangeVerbose(value: boolean): void {
281 // Update the global config to persist the setting

Callers 1

ConfigFunction · 0.85

Calls 5

logEventFunction · 0.85
modelDisplayStringFunction · 0.85
isBilledAsExtraUsageFunction · 0.85
isOpus1mMergeEnabledFunction · 0.85
setAppStateFunction · 0.50

Tested by

no test coverage detected