File tree Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -33,9 +33,12 @@ rooRocketUnpackHookable.hook('onFileOutputJsonMerge', async (state) => {
3333 const newData = JSON . parse ( state . data )
3434 const mergedData = defu ( newData , oldData )
3535 const dedupedModes = mergedData . customModes . filter ( ( mode : any ) => {
36- if ( ! existingModeSlugs . has ( mode . slug ) )
37- return existingModeSlugs . add ( mode . slug )
38- return false
36+ if ( existingModeSlugs . has ( mode . slug ) ) {
37+ logger . info ( `Present roomode entry overwritten: ${ mode . slug } ` )
38+ return false
39+ }
40+
41+ return existingModeSlugs . add ( mode . slug ) && true
3942 } )
4043
4144 const result = { ...mergedData , customModes : dedupedModes }
@@ -50,8 +53,12 @@ rooRocketUnpackHookable.hook('onFileOutputJsonMerge', async (state) => {
5053 const newData = JSON . parse ( state . data )
5154 const mergedData = structuredClone ( newData )
5255 for ( const [ key , value ] of Object . entries ( oldData . mcpServers ) ) {
53- if ( ! ( key in mergedData . mcpServers ) )
54- mergedData . mcpServers [ key ] = value
56+ if ( key in mergedData . mcpServers ) {
57+ logger . info ( `Present mcp server entry overwritten: ${ key } ` )
58+ continue
59+ }
60+
61+ mergedData . mcpServers [ key ] = value
5562 }
5663
5764 state . mergeResult = JSON . stringify ( mergedData , null , 2 )
You can’t perform that action at this time.
0 commit comments