@@ -9,6 +9,7 @@ function getCoreMounts(): string[] {
99 `${ CONFIGS_DIR } /.claude:/root/.claude` ,
1010 `${ CONFIGS_DIR } /.claude.json:/root/.claude.json` ,
1111 `${ CONFIGS_DIR } /.codex:/root/.codex` ,
12+ `${ CONFIGS_DIR } /.copilot:/root/.copilot` ,
1213 `${ CONFIGS_DIR } /.opencode:/root/.config/opencode` ,
1314 `${ CONFIGS_DIR } /.gemini:/root/.gemini` ,
1415 `${ CONFIGS_DIR } /.local:/root/.local` ,
@@ -23,10 +24,10 @@ export async function ensureMountsFile(): Promise<void> {
2324
2425 ensureAppdataDir ( ) ;
2526 const home = os . homedir ( ) ;
26- const mounts : string [ ] = [ ... getCoreMounts ( ) ] ;
27+ const mounts : string [ ] = [ ] ;
2728
2829 printInfo ( "" ) ;
29- printInfo ( "MOUNTS.txt not found. Setting up default mount points ." ) ;
30+ printInfo ( "MOUNTS.txt not found. Creating... ." ) ;
3031 printInfo ( "" ) ;
3132 printInfo ( "Would you like to mount ~/.ssh (read-only)?" ) ;
3233 printInfo (
@@ -47,16 +48,23 @@ export async function ensureMountsFile(): Promise<void> {
4748 fs . writeFileSync ( MOUNTS_PATH , mounts . join ( "\n" ) + "\n" , { mode : 0o600 } ) ;
4849 printInfo ( "" ) ;
4950 printInfo ( `Created ${ MOUNTS_PATH } ` ) ;
50- printInfo ( "You can edit this file to customize mount points." ) ;
51+ printInfo ( "Core mounts are always applied. Modify this file to store additional mount points." ) ;
5152}
5253
5354export function loadMounts ( ) : string [ ] {
54- if ( ! fs . existsSync ( MOUNTS_PATH ) ) {
55- return [ ] ;
55+ const coreMounts = getCoreMounts ( ) ;
56+ const mountSet = new Set ( coreMounts ) ;
57+
58+ if ( fs . existsSync ( MOUNTS_PATH ) ) {
59+ const content = fs . readFileSync ( MOUNTS_PATH , "utf-8" ) ;
60+ const extraMounts = content
61+ . split ( "\n" )
62+ . map ( line => line . trim ( ) )
63+ . filter ( line => line && ! line . startsWith ( "#" ) ) ;
64+ for ( const mount of extraMounts ) {
65+ mountSet . add ( mount ) ;
66+ }
5667 }
57- const content = fs . readFileSync ( MOUNTS_PATH , "utf-8" ) ;
58- return content
59- . split ( "\n" )
60- . map ( line => line . trim ( ) )
61- . filter ( line => line && ! line . startsWith ( "#" ) ) ;
68+
69+ return Array . from ( mountSet ) ;
6270}
0 commit comments