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

Function printNoIndexGuidance

src/bin/codegraph.ts:2199–2213  ·  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

2197 * command that fixes it, and never print a stack trace.
2198 */
2199function printNoIndexGuidance(projectPath: string): void {
2200 error(`No CodeGraph index found for ${projectPath}`);
2201 console.error('');
2202 // getGlyphs() (not a literal em dash): a legacy Windows console decodes raw
2203 // UTF-8 with its OEM codepage and renders one as mojibake (#168).
2204 console.error(` The viewer reads an index that already exists ${getGlyphs().dash} it never creates one.`);
2205 console.error(' To index this project:');
2206 console.error('');
2207 console.error(` ${chalk.cyan('codegraph init')}`);
2208 console.error('');
2209 console.error(' Already indexed somewhere else? Point the viewer at it:');
2210 console.error('');
2211 console.error(` ${chalk.cyan('codegraph ui /path/to/indexed/project')}`);
2212 console.error('');
2213}
2214
2215/**
2216 * 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