@@ -1002,7 +1002,17 @@ cbm_detected_agents_t cbm_detect_agents(const char *home_dir) {
10021002
10031003 agents .aider = cbm_find_cli ("aider" , home_dir )[0 ] != '\0' ;
10041004
1005- snprintf (path , sizeof (path ), "%s/.config/Code/User/globalStorage/kilocode.kilo-code" , home_dir );
1005+ #ifdef __APPLE__
1006+ snprintf (path , sizeof (path ),
1007+ "%s/Library/Application Support/Code/User/globalStorage/kilocode.kilo-code" , home_dir );
1008+ #else
1009+ {
1010+ const char * kc_cfg = cbm_app_config_dir ();
1011+ if (kc_cfg ) {
1012+ snprintf (path , sizeof (path ), "%s/Code/User/globalStorage/kilocode.kilo-code" , kc_cfg );
1013+ }
1014+ }
1015+ #endif
10061016 agents .kilocode = dir_exists (path );
10071017
10081018#ifdef __APPLE__
@@ -2738,9 +2748,16 @@ static void install_editor_agent_configs(const cbm_detected_agents_t *agents, co
27382748 if (agents -> kilocode ) {
27392749 char cp [CLI_BUF_1K ];
27402750 char ip [CLI_BUF_1K ];
2751+ #ifdef __APPLE__
27412752 snprintf (cp , sizeof (cp ),
2742- "%s/.config/Code/User/globalStorage/kilocode.kilo-code/settings/mcp_settings.json" ,
2753+ "%s/Library/Application Support/Code/User/globalStorage/"
2754+ "kilocode.kilo-code/settings/mcp_settings.json" ,
27432755 home );
2756+ #else
2757+ snprintf (cp , sizeof (cp ),
2758+ "%s/Code/User/globalStorage/kilocode.kilo-code/settings/mcp_settings.json" ,
2759+ cbm_app_config_dir ());
2760+ #endif
27442761 snprintf (ip , sizeof (ip ), "%s/.kilocode/rules/codebase-memory-mcp.md" , home );
27452762 install_generic_agent_config ("KiloCode" , binary_path , cp , ip , dry_run ,
27462763 cbm_install_editor_mcp );
@@ -3013,9 +3030,16 @@ static void uninstall_editor_agents(const cbm_detected_agents_t *agents, const c
30133030 if (agents -> kilocode ) {
30143031 char cp [CLI_BUF_1K ];
30153032 char ip [CLI_BUF_1K ];
3033+ #ifdef __APPLE__
30163034 snprintf (cp , sizeof (cp ),
3017- "%s/.config/Code/User/globalStorage/kilocode.kilo-code/settings/mcp_settings.json" ,
3035+ "%s/Library/Application Support/Code/User/globalStorage/"
3036+ "kilocode.kilo-code/settings/mcp_settings.json" ,
30183037 home );
3038+ #else
3039+ snprintf (cp , sizeof (cp ),
3040+ "%s/Code/User/globalStorage/kilocode.kilo-code/settings/mcp_settings.json" ,
3041+ cbm_app_config_dir ());
3042+ #endif
30193043 snprintf (ip , sizeof (ip ), "%s/.kilocode/rules/codebase-memory-mcp.md" , home );
30203044 uninstall_agent_mcp_instr ((mcp_uninstall_args_t ){"KiloCode" , cp , ip }, dry_run ,
30213045 cbm_remove_editor_mcp );
0 commit comments