MCPcopy Create free account
hub / github.com/Zoo-Code-Org/Zoo-Code / export

Method export

src/core/config/ContextProxy.ts:567–582  ·  view source on GitHub ↗

* Import / Export

()

Source from the content-addressed store, hash-verified

565 */
566
567 public async export(): Promise<GlobalSettings | undefined> {
568 try {
569 const globalSettings = globalSettingsExportSchema.parse(this.getValues())
570
571 // Exports should only contain global settings, so this skips project custom modes (those exist in the .roomode folder)
572 globalSettings.customModes = globalSettings.customModes?.filter((mode) => mode.source === "global")
573
574 return Object.fromEntries(Object.entries(globalSettings).filter(([_, value]) => value !== undefined))
575 } catch (error) {
576 if (error instanceof ZodError) {
577 TelemetryService.instance.captureSchemaValidationError({ schemaName: "GlobalSettings", error })
578 }
579
580 return undefined
581 }
582 }
583
584 /**
585 * Resets all global state, secrets, and in-memory caches.

Callers 3

importSettingsFromPathFunction · 0.45
exportSettingsFunction · 0.45

Calls 4

getValuesMethod · 0.95
parseMethod · 0.80
entriesMethod · 0.80

Tested by

no test coverage detected