From 37ee7da69b6aa69904d8a3c774a4b3afbca5159e Mon Sep 17 00:00:00 2001 From: Simon Klee Date: Sat, 18 Apr 2026 15:19:42 +0200 Subject: [PATCH] derive splash metadata once --- .../src/cli/cmd/run/runtime.lifecycle.ts | 39 +++++++++---------- 1 file changed, 19 insertions(+), 20 deletions(-) diff --git a/packages/opencode/src/cli/cmd/run/runtime.lifecycle.ts b/packages/opencode/src/cli/cmd/run/runtime.lifecycle.ts index 4127612cba..33ee30316a 100644 --- a/packages/opencode/src/cli/cmd/run/runtime.lifecycle.ts +++ b/packages/opencode/src/cli/cmd/run/runtime.lifecycle.ts @@ -92,21 +92,19 @@ function shutdown(renderer: CliRenderer): void { } } -function splashTitle(title: string | undefined, history: RunPrompt[]): string | undefined { +function splashInfo(title: string | undefined, history: RunPrompt[]) { if (title && !DEFAULT_TITLE.test(title)) { - return title + return { + title, + showSession: true, + } } const next = history.find((item) => item.text.trim().length > 0) - return next?.text ?? title -} - -function splashSession(title: string | undefined, history: RunPrompt[]): boolean { - if (title && !DEFAULT_TITLE.test(title)) { - return true + return { + title: next?.text ?? title, + showSession: !!next, } - - return !!history.find((item) => item.text.trim().length > 0) } function footerLabels(input: Pick): FooterLabels { @@ -171,9 +169,9 @@ export async function createRuntimeLifecycle(input: LifecycleInput): Promise {}) const { RunFooter } = await footerTask @@ -236,13 +234,14 @@ export async function createRuntimeLifecycle(input: LifecycleInput): Promise