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

Function printNoIndexGuidance

src/bin/codegraph.ts:2278–2292  ·  view source on GitHub ↗

* Print the "no index here" guidance. * * The viewer READS an index; it never builds one — indexing stays the user's * decision, exactly as it is for the MCP tools. So a missing index is normal * input, not a failure to apologize for: say what is missing, say the one * command that fixes it, an

(projectPath: string)

Source from the content-addressed store, hash-verified

2276 * command that fixes it, and never print a stack trace.
2277 */
2278function printNoIndexGuidance(projectPath: string): void {
2279 error(`No CodeGraph index found for ${projectPath}`);
2280 console.error('');
2281 // getGlyphs() (not a literal em dash): a legacy Windows console decodes raw
2282 // UTF-8 with its OEM codepage and renders one as mojibake (#168).
2283 console.error(` The viewer reads an index that already exists ${getGlyphs().dash} it never creates one.`);
2284 console.error(' To index this project:');
2285 console.error('');
2286 console.error(` ${chalk.cyan('codegraph init')}`);
2287 console.error('');
2288 console.error(' Already indexed somewhere else? Point the viewer at it:');
2289 console.error('');
2290 console.error(` ${chalk.cyan('codegraph ui /path/to/indexed/project')}`);
2291 console.error('');
2292}
2293
2294/**
2295 * codegraph ui [path] (alias: web)

Callers 1

mainFunction · 0.85

Calls 3

getGlyphsFunction · 0.90
errorFunction · 0.70
errorMethod · 0.65

Tested by

no test coverage detected