Elffuss BraidHub

kikocis/continue public

main · 6.5 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() + " (beta)")}`;
16
17// ASCII art for just "CN" (first two letters)
18const CN_ASCII_ART = `
19${mind.multiline(` ██████╗███╗ ██╗
20 ██╔════╝████╗ ██║
21 ██║ ██╔██╗ ██║
22 ██║ ██║╚██╗██║
23 ╚██████╗██║ ╚████║
24 ╚═════╝╚═╝ ╚═══╝`)}
25 ${d("v" + getVersion() + " (beta)")}`;
26
27// Minimum terminal width required to display ASCII art properly
28const MIN_WIDTH_FOR_ASCII_ART = 75;
29
30/**
31 * Returns the ASCII art only if the terminal is wide enough to display it properly.
32 * If terminal is too narrow, returns just the version string.
33 */
34export function getDisplayableAsciiArt(): string {
35 const terminalWidth = process.stdout.columns || 80;
36
37 if (terminalWidth >= MIN_WIDTH_FOR_ASCII_ART) {
38 return CONTINUE_ASCII_ART;
39 }
40
41 // If terminal is too narrow, show just "CN" ASCII art
42 return CN_ASCII_ART;
43}
44
45export const CONTINUE_LOGO_ASCII_ART = `
46 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
47 @@@@@@@@@@@@@@@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