diff --git a/ui-tui/packages/hermes-ink/src/ink/components/AlternateScreen.tsx b/ui-tui/packages/hermes-ink/src/ink/components/AlternateScreen.tsx index bb18608172..f135d70c68 100644 --- a/ui-tui/packages/hermes-ink/src/ink/components/AlternateScreen.tsx +++ b/ui-tui/packages/hermes-ink/src/ink/components/AlternateScreen.tsx @@ -2,6 +2,7 @@ import React, { type PropsWithChildren, useContext, useInsertionEffect } from 'r import { c as _c } from 'react/compiler-runtime' import instances from '../instances.js' +import { CURSOR_HOME, ERASE_SCREEN, ERASE_SCROLLBACK } from '../termio/csi.js' import { DISABLE_MOUSE_TRACKING, ENABLE_MOUSE_TRACKING, ENTER_ALT_SCREEN, EXIT_ALT_SCREEN } from '../termio/dec.js' import { TerminalWriteContext } from '../useTerminalNotification.js' @@ -51,7 +52,9 @@ export function AlternateScreen(t0: Props) { return } - writeRaw(ENTER_ALT_SCREEN + '\x1B[2J\x1B[H' + (mouseTracking ? ENABLE_MOUSE_TRACKING : '')) + writeRaw( + ENTER_ALT_SCREEN + ERASE_SCROLLBACK + ERASE_SCREEN + CURSOR_HOME + (mouseTracking ? ENABLE_MOUSE_TRACKING : '') + ) ink?.setAltScreenActive(true, mouseTracking) return () => { diff --git a/ui-tui/src/bootBanner.ts b/ui-tui/src/bootBanner.ts deleted file mode 100644 index 2c85387bd4..0000000000 --- a/ui-tui/src/bootBanner.ts +++ /dev/null @@ -1,26 +0,0 @@ -const GOLD = '\x1b[38;2;255;215;0m' -const AMBER = '\x1b[38;2;255;191;0m' -const BRONZE = '\x1b[38;2;205;127;50m' -const DIM = '\x1b[38;2;184;134;11m' -const RESET = '\x1b[0m' - -const LOGO = [ - '██╗ ██╗███████╗██████╗ ███╗ ███╗███████╗███████╗ █████╗ ██████╗ ███████╗███╗ ██╗████████╗', - '██║ ██║██╔════╝██╔══██╗████╗ ████║██╔════╝██╔════╝ ██╔══██╗██╔════╝ ██╔════╝████╗ ██║╚══██╔══╝', - '███████║█████╗ ██████╔╝██╔████╔██║█████╗ ███████╗█████╗███████║██║ ███╗█████╗ ██╔██╗ ██║ ██║ ', - '██╔══██║██╔══╝ ██╔══██╗██║╚██╔╝██║██╔══╝ ╚════██║╚════╝██╔══██║██║ ██║██╔══╝ ██║╚██╗██║ ██║ ', - '██║ ██║███████╗██║ ██║██║ ╚═╝ ██║███████╗███████║ ██║ ██║╚██████╔╝███████╗██║ ╚████║ ██║ ', - '╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚══════╝ ╚═╝ ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═══╝ ╚═╝ ' -] - -const GRADIENT = [GOLD, GOLD, AMBER, AMBER, BRONZE, BRONZE] as const -const LOGO_WIDTH = 98 - -const TAGLINE = `${DIM}⚕ Nous Research · Messenger of the Digital Gods${RESET}` -const FALLBACK = `\x1b[1m${GOLD}⚕ NOUS HERMES${RESET}` - -export function bootBanner(cols: number = process.stdout.columns || 80): string { - const body = cols >= LOGO_WIDTH ? LOGO.map((text, i) => `${GRADIENT[i]}${text}${RESET}`).join('\n') : FALLBACK - - return `\n${body}\n${TAGLINE}\n\n` -} diff --git a/ui-tui/src/entry.tsx b/ui-tui/src/entry.tsx index 6f1506e5aa..8fdf9f68fb 100644 --- a/ui-tui/src/entry.tsx +++ b/ui-tui/src/entry.tsx @@ -1,5 +1,4 @@ #!/usr/bin/env -S node --max-old-space-size=8192 --expose-gc -import { bootBanner } from './bootBanner.js' import { GatewayClient } from './gatewayClient.js' import { setupGracefulExit } from './lib/gracefulExit.js' import { formatBytes, type HeapDumpResult, performHeapDump } from './lib/memory.js' @@ -10,8 +9,6 @@ if (!process.stdin.isTTY) { process.exit(0) } -process.stdout.write(bootBanner()) - const gw = new GatewayClient() gw.start()