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

Function cbm_copilot_add_hook_event

src/cli/cli.c:3565–3579  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3563}
3564
3565static bool cbm_copilot_add_hook_event(yyjson_mut_doc *doc, yyjson_mut_val *hooks,
3566 const char *event_key, const char *bash_command,
3567 const char *powershell_command) {
3568 yyjson_mut_val *entries = yyjson_mut_arr(doc);
3569 yyjson_mut_val *entry = yyjson_mut_obj(doc);
3570 if (!entries || !entry || !yyjson_mut_obj_add_str(doc, entry, "type", "command") ||
3571 !yyjson_mut_obj_add_str(doc, entry, "bash", bash_command) ||
3572 !yyjson_mut_obj_add_str(doc, entry, "powershell", powershell_command) ||
3573 !yyjson_mut_obj_add_int(doc, entry, "timeoutSec", COPILOT_HOOK_TIMEOUT_SEC) ||
3574 !yyjson_mut_arr_append(entries, entry) ||
3575 !yyjson_mut_obj_add_val(doc, hooks, event_key, entries)) {
3576 return false;
3577 }
3578 return true;
3579}
3580
3581static char *cbm_build_copilot_hook_manifest(const char *binary_path) {
3582 char session_bash[CLI_BUF_8K];

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected