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

Method noteRootRefusal

src/mcp/engine.ts:458–465  ·  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

456 * call re-resolves.
457 */
458 private noteRootRefusal(refusal: string | null): void {
459 this.toolHandler.setDefaultRootRefusal(refusal);
460 if (!refusal || refusal === this.loggedRootRefusal) return;
461 this.loggedRootRefusal = refusal;
462 process.stderr.write(
463 `[CodeGraph MCP] ${refusal} — no default project, live sync disabled. Tool calls can still pass projectPath for a project elsewhere.\n`
464 );
465 }
466
467 /** One stderr line when the default project came from the down-scan (#1606). */
468 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