fix(ui): keep the viewer's printed copy readable on a legacy Windows console
The 'no index' guidance carried a literal em dash and the banner an ellipsis. A Windows console on an OEM codepage decodes raw UTF-8 as mojibake (#168), which is exactly what getGlyphs() exists to avoid — seen on the VM. Guidance now takes its dash from the glyph set; the banner uses a plain '...'. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
bcfe52efa5
commit
41a90c6ba4
@@ -1839,7 +1839,9 @@ program
|
||||
function printNoIndexGuidance(projectPath: string): void {
|
||||
error(`No CodeGraph index found for ${projectPath}`);
|
||||
console.error('');
|
||||
console.error(' The viewer reads an index that already exists — it never creates one.');
|
||||
// getGlyphs() (not a literal em dash): a legacy Windows console decodes raw
|
||||
// UTF-8 with its OEM codepage and renders one as mojibake (#168).
|
||||
console.error(` The viewer reads an index that already exists ${getGlyphs().dash} it never creates one.`);
|
||||
console.error(' To index this project:');
|
||||
console.error('');
|
||||
console.error(` ${chalk.cyan('codegraph init')}`);
|
||||
@@ -1944,7 +1946,7 @@ ${BROWSER_ENV}=none to never open one.
|
||||
const opened = options.open === false ? false : openBrowser(handle.url);
|
||||
console.log(
|
||||
opened
|
||||
? chalk.dim(' Opening your browser… press Ctrl+C to stop.')
|
||||
? chalk.dim(' Opening your browser... press Ctrl+C to stop.')
|
||||
: chalk.dim(' Open that URL in a browser. Press Ctrl+C to stop.')
|
||||
);
|
||||
console.log('');
|
||||
|
||||
Reference in New Issue
Block a user