@@ -5,7 +5,7 @@ import { Logger } from './utils/logger';
55import { NotificationManager } from './utils/notifications' ;
66import { GitHubApiManager , GitHubTreeItem } from './utils/github' ;
77import { FileSystemManager } from './utils/fileSystem' ;
8-
8+ import { REPO_SYNC_CHAT_MODE_PATH , REPO_SYNC_INSTRUCTIONS_PATH , REPO_SYNC_PROMPT_PATH , } from './constant' ;
99export interface SyncResult {
1010 success : boolean ;
1111 itemsUpdated : number ;
@@ -140,13 +140,13 @@ export class SyncManager {
140140
141141 // Build list of allowed paths based on settings
142142 if ( this . config . syncChatmode ) {
143- allowedPaths . push ( 'prompts/chatmode/' ) ;
143+ allowedPaths . push ( REPO_SYNC_CHAT_MODE_PATH ) ;
144144 }
145145 if ( this . config . syncInstructions ) {
146- allowedPaths . push ( 'prompts/instructions/' ) ;
146+ allowedPaths . push ( REPO_SYNC_INSTRUCTIONS_PATH ) ;
147147 }
148148 if ( this . config . syncPrompt ) {
149- allowedPaths . push ( 'prompts/prompt/' ) ;
149+ allowedPaths . push ( REPO_SYNC_PROMPT_PATH ) ;
150150 }
151151
152152 // If no types are selected, return empty array
@@ -221,6 +221,19 @@ export class SyncManager {
221221
222222 // Filter relevant files
223223 const relevantFiles = this . filterRelevantFiles ( tree . tree ) ;
224+
225+ if ( relevantFiles . length === 0 ) {
226+ this . logger . warn ( `No relevant files found to sync in ${ repoUrl } based on current settings` ) ;
227+ const promptLocation = `${ REPO_SYNC_CHAT_MODE_PATH } , ${ REPO_SYNC_INSTRUCTIONS_PATH } , ${ REPO_SYNC_PROMPT_PATH } ` ;
228+ results . push ( {
229+ repository : repoUrl ,
230+ success : false ,
231+ itemsUpdated : 0 ,
232+ error : `No relevant files found, make sure prompts are in valid directories: ${ promptLocation } `
233+ } ) ;
234+ errors . push ( `${ repoUrl } : No relevant files found` ) ;
235+ continue ;
236+ }
224237 this . logger . debug ( `Found ${ relevantFiles . length } relevant files to sync for ${ repoUrl } ` ) ;
225238
226239 // Sync files
0 commit comments