MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / noteRootRefusal

Method noteRootRefusal

src/mcp/engine.ts:428–435  ·  view source on GitHub ↗

* Record why the default project is refused (a sensitive folder, #2929's * guard), or clear that. Tool calls without a projectPath say why there is * no default project, and stderr says it once per reason, since every such * call re-resolves.

(refusal: string | null)

Source from the content-addressed store, hash-verified

426 * call re-resolves.
427 */
428 private noteRootRefusal(refusal: string | null): void {
429 this.toolHandler.setDefaultRootRefusal(refusal);
430 if (!refusal || refusal === this.loggedRootRefusal) return;
431 this.loggedRootRefusal = refusal;
432 process.stderr.write(
433 `[CodeGraph MCP] ${refusal} — no default project, live sync disabled. Tool calls can still pass projectPath for a project elsewhere.\n`
434 );
435 }
436
437 /** One stderr line when the default project came from the down-scan (#1606). */
438 private logSubprojectAdoption(searchFrom: string, root: string): void {

Callers 2

retryInitializeSyncMethod · 0.95
doInitializeMethod · 0.95

Calls 2

setDefaultRootRefusalMethod · 0.80
writeMethod · 0.65

Tested by

no test coverage detected