MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / cbm_init_agent_registry_context

Function cbm_init_agent_registry_context

src/cli/cli.c:7981–8012  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7979}
7980
7981static void cbm_init_agent_registry_context(const char *home,
7982 cbm_agent_registry_context_t *registry) {
7983 memset(registry, 0, sizeof(*registry));
7984 registry->options.home_dir = home;
7985 registry->options.xdg_config_home = cbm_agent_registry_env_path(
7986 "XDG_CONFIG_HOME", home, registry->xdg_config_home, sizeof(registry->xdg_config_home));
7987 registry->options.appdata_dir = cbm_agent_registry_env_path(
7988 "APPDATA", home, registry->appdata_dir, sizeof(registry->appdata_dir));
7989 registry->options.glab_config_dir = cbm_agent_registry_env_path(
7990 "GLAB_CONFIG_DIR", home, registry->glab_config_dir, sizeof(registry->glab_config_dir));
7991 registry->options.kimi_code_home = cbm_agent_registry_env_path(
7992 "KIMI_CODE_HOME", home, registry->kimi_code_home, sizeof(registry->kimi_code_home));
7993 registry->options.continue_config_path = cbm_agent_registry_env_path(
7994 "CBM_CONTINUE_CONFIG_PATH", home, registry->continue_config_path,
7995 sizeof(registry->continue_config_path));
7996 registry->options.trae_config_path =
7997 cbm_agent_registry_env_path("CBM_TRAE_CONFIG_PATH", home, registry->trae_config_path,
7998 sizeof(registry->trae_config_path));
7999 registry->options.roo_config_path = cbm_agent_registry_env_path(
8000 "CBM_ROO_CONFIG_PATH", home, registry->roo_config_path, sizeof(registry->roo_config_path));
8001 registry->options.cody_config_path =
8002 cbm_agent_registry_env_path("CBM_CODY_CONFIG_PATH", home, registry->cody_config_path,
8003 sizeof(registry->cody_config_path));
8004#ifdef _WIN32
8005 registry->options.is_windows = true;
8006#else
8007 registry->options.is_windows = false;
8008#endif
8009 registry->options.path_exists = cbm_agent_registry_path_exists;
8010 registry->options.command_exists = cbm_agent_registry_command_exists;
8011 registry->options.probe_context = registry;
8012}
8013
8014static void print_detected_registry_agents(const char *home, bool *any) {
8015 cbm_agent_registry_context_t registry;

Calls 1

Tested by

no test coverage detected