Skip to content

Local code intelligence for developers and AI agents. Connect code, docs and infrastructure in a persistent graph, with CBM Lens, MCP tools, agent integrations and change-aware test selection.

fix(hook-augment): request format=json for the internal search_graph call

Martin Vogelbe9976dd31b8
diff --git a/src/cli/hook_augment.c b/src/cli/hook_augment.c
index 35ff15f78..fb602239e 100644
--- a/src/cli/hook_augment.c
+++ b/src/cli/hook_augment.c
@@ -146,6 +146,9 @@ static char *ha_build_args(const char *project, const char *token) {
yyjson_mut_obj_add_str(doc, root, "project", project);
yyjson_mut_obj_add_str(doc, root, "name_pattern", name_pattern);
yyjson_mut_obj_add_int(doc, root, "limit", HA_RESULT_LIMIT);
+ /* Programmatic consumer: search_graph defaults to TOON text, but
+ * ha_format_context parses the inner payload as JSON ("results"). */
+ yyjson_mut_obj_add_str(doc, root, "format", "json");
char *out = yyjson_mut_write(doc, 0, NULL);
yyjson_mut_doc_free(doc);