mirror of
https://github.com/DeusData/codebase-memory-mcp.git
synced 2026-11-03 08:03:38 +08:00
fix(cli): clarify hook reminder guidance
Clarify the Codex/Gemini/Antigravity SessionStart reminder so it recommends graph tools before broad grep for structural code discovery instead of implying they replace file reads. Spell out that auto-indexing uses the MCP server CWD or explicit repo paths when enabled, and add a focused Codex hook regression assertion for the wording. Signed-off-by: Andrew Hundt <ATHundt@gmail.com>
This commit is contained in:
+3
-2
@@ -1639,8 +1639,9 @@ int cbm_remove_codex_mcp(const char *config_path) {
|
||||
* and NO newlines. (issues #330 + Gemini/Antigravity parity) */
|
||||
#define CMM_SESSION_REMINDER_CMD \
|
||||
"echo \"Code discovery: prefer codebase-memory-mcp (search_graph, trace_path, " \
|
||||
"get_code, query_graph, search_code) over grep/file-read; graph-backed tools " \
|
||||
"auto-index CWD or explicit repo paths when auto_index=true and under " \
|
||||
"get_code, query_graph, search_code) before broad grep for structural code " \
|
||||
"discovery; graph-backed tools auto-index the MCP server CWD or explicit repo " \
|
||||
"paths when auto_index=true and under " \
|
||||
"auto_index_limit; search_code needs an indexed project; call _hidden_tools " \
|
||||
"for explicit index_repository.\""
|
||||
|
||||
|
||||
@@ -1783,6 +1783,9 @@ TEST(cli_codex_session_hook_issue330) {
|
||||
ASSERT(strstr(d, "[[hooks.SessionStart]]") != NULL);
|
||||
ASSERT(strstr(d, "[[hooks.SessionStart.hooks]]") != NULL);
|
||||
ASSERT(strstr(d, "search_graph") != NULL);
|
||||
ASSERT(strstr(d, "before broad grep for structural code discovery") != NULL);
|
||||
ASSERT(strstr(d, "MCP server CWD") != NULL);
|
||||
ASSERT(strstr(d, "grep/file-read") == NULL);
|
||||
ASSERT(strstr(d, "[mcp_servers.other]") != NULL); /* pre-existing content preserved */
|
||||
/* Idempotent: a second upsert leaves exactly ONE hook block. */
|
||||
ASSERT_EQ(cbm_upsert_codex_hooks(cfg), 0);
|
||||
|
||||
Reference in New Issue
Block a user