Skip to content

Commit 2ea35bb

Browse files
iamdavidhilljonathanmiddleton
authored andcommitted
tweak(tui): new session banner with logo and details (anomalyco#13970)
1 parent be2c0ca commit 2ea35bb

File tree

1 file changed

+11
-3
lines changed
  • packages/opencode/src/cli/cmd/tui/routes/session

1 file changed

+11
-3
lines changed

packages/opencode/src/cli/cmd/tui/routes/session/index.tsx

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -227,12 +227,20 @@ export function Session() {
227227

228228
createEffect(() => {
229229
const title = Locale.truncate(session()?.title ?? "", 50)
230+
const pad = (text: string) => text.padEnd(10, " ")
231+
const weak = (text: string) => UI.Style.TEXT_DIM + pad(text) + UI.Style.TEXT_NORMAL
232+
const logo = UI.logo(" ").split(/\r?\n/)
230233
return exit.message.set(
231234
[
232235
``,
233-
` █▀▀█ ${UI.Style.TEXT_DIM}${title}${UI.Style.TEXT_NORMAL}`,
234-
` █ █ ${UI.Style.TEXT_DIM}opencode -s ${session()?.id}${UI.Style.TEXT_NORMAL}`,
235-
` ▀▀▀▀ `,
236+
`${logo[0] ?? ""}`,
237+
`${logo[1] ?? ""}`,
238+
`${logo[2] ?? ""}`,
239+
`${logo[3] ?? ""}`,
240+
``,
241+
` ${weak("Session")}${UI.Style.TEXT_NORMAL_BOLD}${title}${UI.Style.TEXT_NORMAL}`,
242+
` ${weak("Continue")}${UI.Style.TEXT_NORMAL_BOLD}opencode -s ${session()?.id}${UI.Style.TEXT_NORMAL}`,
243+
``,
236244
].join("\n"),
237245
)
238246
})

0 commit comments

Comments
 (0)