Skip to content

Commit be9976d

Browse files
committed
fix(hook-augment): request format=json for the internal search_graph call
search_graph now defaults to TOON text, but ha_format_context parses the inner payload as JSON ("results"), so the Grep/Glob/Read hook augmenter silently produced no hookSpecificOutput — caught by the test_hook_augment.py Windows guard going red. Both internal call sites route through ha_build_args; request the JSON encoding there. Verified end-to-end: indexed fixture + PreToolUse payload via stdin emits the symbol context again. Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
1 parent bbeedf3 commit be9976d

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎src/cli/hook_augment.c‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,9 @@ static char *ha_build_args(const char *project, const char *token) {
146146
yyjson_mut_obj_add_str(doc, root, "project", project);
147147
yyjson_mut_obj_add_str(doc, root, "name_pattern", name_pattern);
148148
yyjson_mut_obj_add_int(doc, root, "limit", HA_RESULT_LIMIT);
149+
/* Programmatic consumer: search_graph defaults to TOON text, but
150+
* ha_format_context parses the inner payload as JSON ("results"). */
151+
yyjson_mut_obj_add_str(doc, root, "format", "json");
149152

150153
char *out = yyjson_mut_write(doc, 0, NULL);
151154
yyjson_mut_doc_free(doc);

0 commit comments

Comments
 (0)