MCPcopy Index your code
hub / github.com/codeaashu/claude-code / onChangeMainModelConfig

Function onChangeMainModelConfig

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

Source from the content-addressed store, hash-verified

201 const shouldShowExternalIncludesToggle = hasExternalClaudeMdIncludes(memoryFiles);
202 const autoUpdaterDisabledReason = getAutoUpdaterDisabledReason();
203 function onChangeMainModelConfig(value: string | null): void {
204 const previousModel = mainLoopModel;
205 logEvent('tengu_config_model_changed', {
206 from_model: previousModel as AnalyticsMetadata_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS,
207 to_model: value as AnalyticsMetadata_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS
208 });
209 setAppState(prev => ({
210 ...prev,
211 mainLoopModel: value,
212 mainLoopModelForSession: null
213 }));
214 setChanges(prev_0 => {
215 const valStr = modelDisplayString(value) + (isBilledAsExtraUsage(value, false, isOpus1mMergeEnabled()) ? ' · Billed as extra usage' : '');
216 if ('model' in prev_0) {
217 const {
218 model,
219 ...rest
220 } = prev_0;
221 return {
222 ...rest,
223 model: valStr
224 };
225 }
226 return {
227 ...prev_0,
228 model: valStr
229 };
230 });
231 }
232 function onChangeVerbose(value_0: boolean): void {
233 // Update the global config to persist the setting
234 saveGlobalConfig(current => ({

Callers 1

ConfigFunction · 0.85

Calls 4

logEventFunction · 0.85
modelDisplayStringFunction · 0.85
isBilledAsExtraUsageFunction · 0.85
isOpus1mMergeEnabledFunction · 0.85

Tested by

no test coverage detected