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:9173–9207  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9171}
9172
9173static void cbm_init_agent_registry_context(const char *home,
9174 cbm_agent_registry_context_t *registry) {
9175 memset(registry, 0, sizeof(*registry));
9176 registry->options.home_dir = home;
9177 registry->options.xdg_config_home = cbm_agent_registry_env_path(
9178 "XDG_CONFIG_HOME", home, registry->xdg_config_home, sizeof(registry->xdg_config_home));
9179 registry->options.appdata_dir = cbm_agent_registry_env_path(
9180 "APPDATA", home, registry->appdata_dir, sizeof(registry->appdata_dir));
9181 registry->options.glab_config_dir = cbm_agent_registry_env_path(
9182 "GLAB_CONFIG_DIR", home, registry->glab_config_dir, sizeof(registry->glab_config_dir));
9183 registry->options.kimi_code_home = cbm_agent_registry_env_path(
9184 "KIMI_CODE_HOME", home, registry->kimi_code_home, sizeof(registry->kimi_code_home));
9185 registry->options.continue_config_path = cbm_agent_registry_env_path(
9186 "CBM_CONTINUE_CONFIG_PATH", home, registry->continue_config_path,
9187 sizeof(registry->continue_config_path));
9188 registry->options.trae_config_path =
9189 cbm_agent_registry_env_path("CBM_TRAE_CONFIG_PATH", home, registry->trae_config_path,
9190 sizeof(registry->trae_config_path));
9191 registry->options.roo_config_path = cbm_agent_registry_env_path(
9192 "CBM_ROO_CONFIG_PATH", home, registry->roo_config_path, sizeof(registry->roo_config_path));
9193 registry->options.cody_config_path =
9194 cbm_agent_registry_env_path("CBM_CODY_CONFIG_PATH", home, registry->cody_config_path,
9195 sizeof(registry->cody_config_path));
9196 if (cbm_omp_agent_dir(home, registry->omp_agent_dir, sizeof(registry->omp_agent_dir))) {
9197 registry->options.omp_agent_dir = registry->omp_agent_dir;
9198 }
9199#ifdef _WIN32
9200 registry->options.is_windows = true;
9201#else
9202 registry->options.is_windows = false;
9203#endif
9204 registry->options.path_exists = cbm_agent_registry_path_exists;
9205 registry->options.command_exists = cbm_agent_registry_command_exists;
9206 registry->options.probe_context = registry;
9207}
9208
9209static void print_detected_registry_agents(const char *home, bool *any) {
9210 cbm_agent_registry_context_t registry;

Calls 2

cbm_omp_agent_dirFunction · 0.85

Tested by

no test coverage detected