@@ -85,35 +85,6 @@ export const state = Instance.state(async () => {
8585 }
8686 }
8787
88- // Inline config content has highest precedence
89- if ( Flag . OPENCODE_CONFIG_CONTENT ) {
90- result = mergeConfigConcatArrays ( result , JSON . parse ( Flag . OPENCODE_CONFIG_CONTENT ) )
91- log . debug ( "loaded custom config from OPENCODE_CONFIG_CONTENT" )
92- }
93-
94- // Global user config overrides remote config
95- const globalResult = await global ( )
96- result = mergeConfigConcatArrays ( result , globalResult . config )
97- allUnknownKeybinds . push ( ...globalResult . unknownKeybinds )
98-
99- // Custom config path overrides global
100- if ( Flag . OPENCODE_CONFIG ) {
101- const loaded = await loadFile ( Flag . OPENCODE_CONFIG )
102- result = mergeConfigConcatArrays ( result , loaded . config )
103- allUnknownKeybinds . push ( ...loaded . unknownKeybinds )
104- log . debug ( "loaded custom config" , { path : Flag . OPENCODE_CONFIG } )
105- }
106-
107- // Project config has highest precedence (overrides global and remote)
108- for ( const file of [ "opencode.jsonc" , "opencode.json" ] ) {
109- const found = await Filesystem . findUp ( file , Instance . directory , Instance . worktree )
110- for ( const resolved of found . toReversed ( ) ) {
111- const loaded = await loadFile ( resolved )
112- result = mergeConfigConcatArrays ( result , loaded . config )
113- allUnknownKeybinds . push ( ...loaded . unknownKeybinds )
114- }
115- }
116-
11788 // Inline config content has highest precedence
11889 if ( Flag . OPENCODE_CONFIG_CONTENT ) {
11990 result = mergeConfigConcatArrays ( result , JSON . parse ( Flag . OPENCODE_CONFIG_CONTENT ) )
0 commit comments