Elffuss BraidHub

kikocis/continue public

5fda066adb4e · 6.1 KiBRawPermalink
1import chalk from "chalk";
2import { mind } from "gradient-string";
3
4import { getVersion } from "./version.js";
5
6const d = chalk.dim;
7
8export const CONTINUE_ASCII_ART = `
9${mind.multiline(` ██████╗ ██████╗ ███╗ ██╗████████╗██╗███╗ ██╗██╗ ██╗███████╗
10 ██╔════╝██╔═══██╗████╗ ██║╚══██╔══╝██║████╗ ██║██║ ██║██╔════╝
11 ██║ ██║ ██║██╔██╗ ██║ ██║ ██║██╔██╗ ██║██║ ██║█████╗
12 ██║ ██║ ██║██║╚██╗██║ ██║ ██║██║╚██╗██║██║ ██║██╔══╝
13 ╚██████╗╚██████╔╝██║ ╚████║ ██║ ██║██║ ╚████║╚██████╔╝███████╗
14 ╚═════╝ ╚═════╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═══╝ ╚═════╝ ╚══════╝`)}
15 ${d("v" + getVersion())}`;
16
17// Minimum terminal width required to display ASCII art properly
18const MIN_WIDTH_FOR_ASCII_ART = 75;
19
20/**
21 * Returns the ASCII art only if the terminal is wide enough to display it properly.
22 * If terminal is too narrow, returns just the version string.
23 */
24export function getDisplayableAsciiArt(): string {
25 const terminalWidth = process.stdout.columns || 80;
26
27 if (terminalWidth >= MIN_WIDTH_FOR_ASCII_ART) {
28 return CONTINUE_ASCII_ART;
29 }
30
31 // If terminal is too narrow, just show a simple version
32 return `\n${chalk.bold.blue("CONTINUE")} ${d("v" + getVersion())}\n`;
33}
34
35export const CONTINUE_LOGO_ASCII_ART = `
36 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
37 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@
38 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@
39 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@
40 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@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