| 7774 | } |
| 7775 | |
| 7776 | static void cbm_init_agent_registry_context(const char *home, |
| 7777 | cbm_agent_registry_context_t *registry) { |
| 7778 | memset(registry, 0, sizeof(*registry)); |
| 7779 | registry->options.home_dir = home; |
| 7780 | registry->options.xdg_config_home = cbm_agent_registry_env_path( |
| 7781 | "XDG_CONFIG_HOME", home, registry->xdg_config_home, sizeof(registry->xdg_config_home)); |
| 7782 | registry->options.appdata_dir = cbm_agent_registry_env_path( |
| 7783 | "APPDATA", home, registry->appdata_dir, sizeof(registry->appdata_dir)); |
| 7784 | registry->options.glab_config_dir = cbm_agent_registry_env_path( |
| 7785 | "GLAB_CONFIG_DIR", home, registry->glab_config_dir, sizeof(registry->glab_config_dir)); |
| 7786 | registry->options.kimi_code_home = cbm_agent_registry_env_path( |
| 7787 | "KIMI_CODE_HOME", home, registry->kimi_code_home, sizeof(registry->kimi_code_home)); |
| 7788 | registry->options.continue_config_path = cbm_agent_registry_env_path( |
| 7789 | "CBM_CONTINUE_CONFIG_PATH", home, registry->continue_config_path, |
| 7790 | sizeof(registry->continue_config_path)); |
| 7791 | registry->options.trae_config_path = |
| 7792 | cbm_agent_registry_env_path("CBM_TRAE_CONFIG_PATH", home, registry->trae_config_path, |
| 7793 | sizeof(registry->trae_config_path)); |
| 7794 | registry->options.roo_config_path = cbm_agent_registry_env_path( |
| 7795 | "CBM_ROO_CONFIG_PATH", home, registry->roo_config_path, sizeof(registry->roo_config_path)); |
| 7796 | registry->options.cody_config_path = |
| 7797 | cbm_agent_registry_env_path("CBM_CODY_CONFIG_PATH", home, registry->cody_config_path, |
| 7798 | sizeof(registry->cody_config_path)); |
| 7799 | #ifdef _WIN32 |
| 7800 | registry->options.is_windows = true; |
| 7801 | #else |
| 7802 | registry->options.is_windows = false; |
| 7803 | #endif |
| 7804 | registry->options.path_exists = cbm_agent_registry_path_exists; |
| 7805 | registry->options.command_exists = cbm_agent_registry_command_exists; |
| 7806 | registry->options.probe_context = registry; |
| 7807 | } |
| 7808 | |
| 7809 | static void print_detected_registry_agents(const char *home, bool *any) { |
| 7810 | cbm_agent_registry_context_t registry; |
no test coverage detected