Files
oh-my-pi/packages/coding-agent/src/startup-splash.ts
T
2026-06-17 10:53:08 -04:00

20 lines
790 B
TypeScript

/** Inputs used to decide whether the optional startup splash may run for this process. */
export interface StartupSplashDecisionOptions {
readonly configured: boolean;
readonly isInteractive: boolean;
readonly resuming: boolean;
readonly quiet: boolean;
readonly timing: boolean;
readonly stdinIsTTY: boolean | undefined;
readonly stdoutIsTTY: boolean | undefined;
}
/** Returns true only for explicitly enabled, normal interactive TTY startup. */
export function shouldShowStartupSplash(options: StartupSplashDecisionOptions): boolean {
if (!options.configured) return false;
if (!options.isInteractive) return false;
if (options.resuming || options.quiet) return false;
if (options.timing) return false;
return options.stdinIsTTY === true && options.stdoutIsTTY === true;
}