tweak(tui): new session banner with logo and details (#13970)
This commit is contained in:
@@ -227,12 +227,20 @@ export function Session() {
|
||||
|
||||
createEffect(() => {
|
||||
const title = Locale.truncate(session()?.title ?? "", 50)
|
||||
const pad = (text: string) => text.padEnd(10, " ")
|
||||
const weak = (text: string) => UI.Style.TEXT_DIM + pad(text) + UI.Style.TEXT_NORMAL
|
||||
const logo = UI.logo(" ").split(/\r?\n/)
|
||||
return exit.message.set(
|
||||
[
|
||||
``,
|
||||
` █▀▀█ ${UI.Style.TEXT_DIM}${title}${UI.Style.TEXT_NORMAL}`,
|
||||
` █ █ ${UI.Style.TEXT_DIM}opencode -s ${session()?.id}${UI.Style.TEXT_NORMAL}`,
|
||||
` ▀▀▀▀ `,
|
||||
`${logo[0] ?? ""}`,
|
||||
`${logo[1] ?? ""}`,
|
||||
`${logo[2] ?? ""}`,
|
||||
`${logo[3] ?? ""}`,
|
||||
``,
|
||||
` ${weak("Session")}${UI.Style.TEXT_NORMAL_BOLD}${title}${UI.Style.TEXT_NORMAL}`,
|
||||
` ${weak("Continue")}${UI.Style.TEXT_NORMAL_BOLD}opencode -s ${session()?.id}${UI.Style.TEXT_NORMAL}`,
|
||||
``,
|
||||
].join("\n"),
|
||||
)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user