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

Function ha_build_copilot_json

src/cli/hook_augment.c:707–718  ·  view source on GitHub ↗

GitHub Copilot CLI lifecycle hooks use a deliberately smaller output * dialect: additionalContext is a top-level field, with no event envelope. */

Source from the content-addressed store, hash-verified

705/* GitHub Copilot CLI lifecycle hooks use a deliberately smaller output
706 * dialect: additionalContext is a top-level field, with no event envelope. */
707static char *ha_build_copilot_json(const char *text) {
708 yyjson_mut_doc *doc = yyjson_mut_doc_new(NULL);
709 if (!doc) {
710 return NULL;
711 }
712 yyjson_mut_val *root = yyjson_mut_obj(doc);
713 yyjson_mut_doc_set_root(doc, root);
714 yyjson_mut_obj_add_str(doc, root, "additionalContext", text);
715 char *json = yyjson_mut_write(doc, 0, NULL);
716 yyjson_mut_doc_free(doc);
717 return json;
718}
719
720/* Hermes pre_llm_call shell hooks inject context through one top-level key. */
721static char *ha_build_hermes_json(const char *text) {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected