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

Function parse_search_mode

src/mcp/mcp.c:15866–15877  ·  view source on GitHub ↗

Parse search mode string (0=compact, 1=full, 2=files). */

Source from the content-addressed store, hash-verified

15864
15865/* Parse search mode string (0=compact, 1=full, 2=files). */
15866static int parse_search_mode(const char *mode_str) {
15867 if (!mode_str) {
15868 return 0;
15869 }
15870 if (strcmp(mode_str, "full") == 0) {
15871 return SKIP_ONE;
15872 }
15873 if (strcmp(mode_str, "files") == 0) {
15874 return MCP_RETURN_2;
15875 }
15876 return 0;
15877}
15878
15879/* Validate shell-safe arguments for search. */
15880/* Search/grep paths and globs are ALWAYS single-quoted (POSIX sh) or

Callers 1

handle_search_codeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected