MCPcopy Create free account
hub / github.com/arctic-cli/interface / loadPluginConfig

Function loadPluginConfig

packages/arctic/src/auth/codex-oauth/config.ts:22–43  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

20 * @returns Plugin configuration
21 */
22export function loadPluginConfig(): PluginConfig {
23 try {
24 if (!existsSync(CONFIG_PATH)) {
25 return DEFAULT_CONFIG;
26 }
27
28 const fileContent = readFileSync(CONFIG_PATH, "utf-8");
29 const userConfig = JSON.parse(fileContent) as Partial<PluginConfig>;
30
31 // Merge with defaults
32 return {
33 ...DEFAULT_CONFIG,
34 ...userConfig,
35 };
36 } catch (error) {
37 console.warn(
38 `[arctic-codex-plugin] Failed to load config from ${CONFIG_PATH}:`,
39 (error as Error).message
40 );
41 return DEFAULT_CONFIG;
42 }
43}
44
45/**
46 * Get the effective CODEX_MODE setting

Callers 1

loaderFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected