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

Source from the content-addressed store, hash-verified

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

Calls 1

Tested by

no test coverage detected