@@ -114,17 +114,17 @@ describe("CustomModesManager", () => {
114114 expect ( modes ) . toHaveLength ( 2 )
115115 } )
116116
117- it ( "should load modes from .roo/roo_modes directory" , async ( ) => {
117+ it ( "should load modes from .roo/modes directory" , async ( ) => {
118118 const settingsModes = [ { slug : "mode1" , name : "Mode 1" , roleDefinition : "Role 1" , groups : [ "read" ] } ]
119119 const rooModesMode1 = { slug : "mode2" , name : "Mode 2" , roleDefinition : "Role 2" , groups : [ "read" ] }
120120 const rooModesMode2 = { slug : "mode3" , name : "Mode 3" , roleDefinition : "Role 3" , groups : [ "edit" ] }
121121
122122 ; ( fileExistsAtPath as Mock ) . mockImplementation ( async ( path : string ) => {
123- // Return true for settings path and roo_modes directories
124- return path === mockSettingsPath || path . includes ( "roo_modes " ) || path === mockRoomodes
123+ // Return true for settings path and modes directories
124+ return path === mockSettingsPath || path . includes ( "modes " ) || path === mockRoomodes
125125 } )
126126 ; ( fs . readdir as Mock ) . mockImplementation ( async ( path : string ) => {
127- if ( path . includes ( "roo_modes " ) ) {
127+ if ( path . includes ( "modes " ) ) {
128128 return [
129129 { name : "mode1.yaml" , isFile : ( ) => true } ,
130130 { name : "mode2.yml" , isFile : ( ) => true } ,
@@ -155,7 +155,7 @@ describe("CustomModesManager", () => {
155155 expect ( modes . map ( ( m ) => m . slug ) ) . toContain ( "mode3" )
156156 } )
157157
158- it ( "should respect precedence: project .roo/roo_modes > .roomodes > global .roo/roo_modes > settings" , async ( ) => {
158+ it ( "should respect precedence: project .roo/modes > .roomodes > global .roo/modes > settings" , async ( ) => {
159159 const settingsMode = { slug : "test" , name : "Settings" , roleDefinition : "Settings Role" , groups : [ "read" ] }
160160 const globalRooMode = {
161161 slug : "test" ,
@@ -175,7 +175,7 @@ describe("CustomModesManager", () => {
175175 return true // All paths exist
176176 } )
177177 ; ( fs . readdir as Mock ) . mockImplementation ( async ( path : string ) => {
178- if ( path . includes ( "roo_modes " ) ) {
178+ if ( path . includes ( "modes " ) ) {
179179 return [ { name : "test.yaml" , isFile : ( ) => true } ]
180180 }
181181 return [ ]
@@ -187,12 +187,12 @@ describe("CustomModesManager", () => {
187187 if ( path === mockRoomodes ) {
188188 return yaml . stringify ( { customModes : [ roomodesMode ] } )
189189 }
190- // Global .roo/roo_modes
191- if ( path . includes ( "roo_modes " ) && ! path . includes ( mockWorkspacePath ) ) {
190+ // Global .roo/modes
191+ if ( path . includes ( "modes " ) && ! path . includes ( mockWorkspacePath ) ) {
192192 return yaml . stringify ( { customModes : [ globalRooMode ] } )
193193 }
194- // Project .roo/roo_modes
195- if ( path . includes ( "roo_modes " ) && path . includes ( mockWorkspacePath ) ) {
194+ // Project .roo/modes
195+ if ( path . includes ( "modes " ) && path . includes ( mockWorkspacePath ) ) {
196196 return yaml . stringify ( { customModes : [ projectRooMode ] } )
197197 }
198198 throw new Error ( "File not found" )
@@ -202,16 +202,16 @@ describe("CustomModesManager", () => {
202202
203203 // Should have only one mode with the slug "test"
204204 expect ( modes ) . toHaveLength ( 1 )
205- // Project .roo/roo_modes should take precedence
205+ // Project .roo/modes should take precedence
206206 expect ( modes [ 0 ] . name ) . toBe ( "Project Roo" )
207207 expect ( modes [ 0 ] . roleDefinition ) . toBe ( "Project Roo Role" )
208208 } )
209209
210- it ( "should handle empty .roo/roo_modes directory" , async ( ) => {
210+ it ( "should handle empty .roo/modes directory" , async ( ) => {
211211 const settingsModes = [ { slug : "mode1" , name : "Mode 1" , roleDefinition : "Role 1" , groups : [ "read" ] } ]
212212
213213 ; ( fileExistsAtPath as Mock ) . mockImplementation ( async ( path : string ) => {
214- return path === mockSettingsPath || path . includes ( "roo_modes " )
214+ return path === mockSettingsPath || path . includes ( "modes " )
215215 } )
216216 ; ( fs . readdir as Mock ) . mockImplementation ( async ( ) => {
217217 return [ ] // Empty directory
@@ -230,12 +230,12 @@ describe("CustomModesManager", () => {
230230 expect ( modes [ 0 ] . slug ) . toBe ( "mode1" )
231231 } )
232232
233- it ( "should handle non-existent .roo/roo_modes directory" , async ( ) => {
233+ it ( "should handle non-existent .roo/modes directory" , async ( ) => {
234234 const settingsModes = [ { slug : "mode1" , name : "Mode 1" , roleDefinition : "Role 1" , groups : [ "read" ] } ]
235235
236236 ; ( fileExistsAtPath as Mock ) . mockImplementation ( async ( path : string ) => {
237- // roo_modes directories don't exist
238- if ( path . includes ( "roo_modes " ) ) {
237+ // modes directories don't exist
238+ if ( path . includes ( "modes " ) ) {
239239 return false
240240 }
241241 return path === mockSettingsPath
@@ -254,14 +254,14 @@ describe("CustomModesManager", () => {
254254 expect ( modes [ 0 ] . slug ) . toBe ( "mode1" )
255255 } )
256256
257- it ( "should preserve sourceFile property for modes loaded from .roo/roo_modes " , async ( ) => {
257+ it ( "should preserve sourceFile property for modes loaded from .roo/modes " , async ( ) => {
258258 const rooModesMode = { slug : "test" , name : "Test Mode" , roleDefinition : "Test Role" , groups : [ "read" ] }
259259
260260 ; ( fileExistsAtPath as Mock ) . mockImplementation ( async ( path : string ) => {
261- return path === mockSettingsPath || path . includes ( "roo_modes " )
261+ return path === mockSettingsPath || path . includes ( "modes " )
262262 } )
263263 ; ( fs . readdir as Mock ) . mockImplementation ( async ( path : string ) => {
264- if ( path . includes ( "roo_modes " ) ) {
264+ if ( path . includes ( "modes " ) ) {
265265 return [ { name : "test.yaml" , isFile : ( ) => true } ]
266266 }
267267 return [ ]
0 commit comments