MCPcopy Create free account
hub / github.com/Noumena-Network/code / onChangeMainModelConfig

Function onChangeMainModelConfig

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

Source from the content-addressed store, hash-verified

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

Callers 1

ConfigFunction · 0.85

Calls 5

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

Tested by

no test coverage detected