summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGeorge Potoshin <[email protected]>2025-06-16 01:38:44 +0200
committerGitHub <[email protected]>2025-06-15 18:38:44 -0500
commitc5eefd17528fd03a5c2553c8bf9d5c931597e09c (patch)
treec98a28eec93b25353b74fe59e906d6bb502ef172
parent77a6b3bdd6f68fe6ae5a69611b100b413e57473c (diff)
downloadopencode-c5eefd17528fd03a5c2553c8bf9d5c931597e09c.tar.gz
opencode-c5eefd17528fd03a5c2553c8bf9d5c931597e09c.zip
Fix: Improve Help UI Readability (Issue #99) (#117)
-rw-r--r--packages/opencode/src/cli/ui.ts16
1 files changed, 7 insertions, 9 deletions
diff --git a/packages/opencode/src/cli/ui.ts b/packages/opencode/src/cli/ui.ts
index aeb726427..f449a31a4 100644
--- a/packages/opencode/src/cli/ui.ts
+++ b/packages/opencode/src/cli/ui.ts
@@ -3,9 +3,9 @@ import { NamedError } from "../util/error"
export namespace UI {
const LOGO = [
- `█▀▀█ █▀▀█ █▀▀ █▀▀▄ █▀▀ █▀▀█ █▀▀▄ █▀▀`,
- `█░░█ █░░█ █▀▀ █░░█ █░░ █░░█ █░░█ █▀▀`,
- `▀▀▀▀ █▀▀▀ ▀▀▀ ▀ ▀ ▀▀▀ ▀▀▀▀ ▀▀▀ ▀▀▀`,
+ [`█▀▀█ █▀▀█ █▀▀ █▀▀▄ `, `█▀▀ █▀▀█ █▀▀▄ █▀▀`],
+ [`█░░█ █░░█ █▀▀ █░░█ `, `█░░ █░░█ █░░█ █▀▀`],
+ [`▀▀▀▀ █▀▀▀ ▀▀▀ ▀ ▀ `, `▀▀▀ ▀▀▀▀ ▀▀▀ ▀▀▀`],
]
export const CancelledError = NamedError.create("UICancelledError", z.void())
@@ -48,12 +48,10 @@ export namespace UI {
const result = []
for (const row of LOGO) {
if (pad) result.push(pad)
- for (let i = 0; i < row.length; i++) {
- const color =
- i > 18 ? Bun.color("white", "ansi") : Bun.color("gray", "ansi")
- const char = row[i]
- result.push(color + char)
- }
+ result.push(Bun.color("gray", "ansi"))
+ result.push(row[0])
+ result.push("\x1b[0m")
+ result.push(row[1])
result.push("\n")
}
return result.join("").trimEnd()