GitHub Copilot CLI lifecycle hooks use a deliberately smaller output * dialect: additionalContext is a top-level field, with no event envelope. */
| 705 | /* GitHub Copilot CLI lifecycle hooks use a deliberately smaller output |
| 706 | * dialect: additionalContext is a top-level field, with no event envelope. */ |
| 707 | static 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. */ |
| 721 | static char *ha_build_hermes_json(const char *text) { |
no outgoing calls
no test coverage detected