fix(startup): show --model flag override on startup screen (#898)

The startup screen was only reading model from env vars and settings,
ignoring the --model CLI flag since it's parsed by Commander.js after
the banner prints. Now eagerly parses --model from argv before rendering
so the displayed model matches what the session will actually use.
This commit is contained in:
Rayan Alkhelaiwi
2026-04-26 15:24:44 +03:00
committed by GitHub
parent 6dedffe5ff
commit d45628c413
3 changed files with 82 additions and 9 deletions

View File

@@ -134,9 +134,13 @@ async function main(): Promise<void> {
await validateProviderEnvForStartupOrExit()
// Parse --model early so the startup screen can display the override
const { eagerParseCliFlag } = await import('../utils/cliArgs.js')
const earlyModelFlag = eagerParseCliFlag('--model')
// Print the gradient startup screen before the Ink UI loads
const { printStartupScreen } = await import('../components/StartupScreen.js')
printStartupScreen()
printStartupScreen(earlyModelFlag)
// For all other paths, load the startup profiler
const {