MCPcopy
hub / github.com/continuedev/continue / getSharedConfig

Method getSharedConfig

core/util/GlobalContext.ts:146–159  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

144 }
145
146 getSharedConfig(): SharedConfigSchema {
147 const sharedConfig = this.get("sharedConfig") ?? {};
148 const result = sharedConfigSchema.safeParse(sharedConfig);
149 if (result.success) {
150 return result.data;
151 } else {
152 // in case of damaged shared config, repair it
153 // Attempt to salvage any values that are security concerns
154 console.error("Failed to load shared config, salvaging...", result.error);
155 const salvagedConfig = salvageSharedConfig(sharedConfig);
156 this.update("sharedConfig", salvagedConfig);
157 return salvagedConfig;
158 }
159 }
160
161 updateSharedConfig(
162 newValues: Partial<SharedConfigSchema>,

Callers 4

updateSharedConfigMethod · 0.95
migrateJsonSharedConfigFunction · 0.95

Calls 4

getMethod · 0.95
updateMethod · 0.95
salvageSharedConfigFunction · 0.90
errorMethod · 0.80

Tested by

no test coverage detected