From 7f795727470a43249951dc8242de23da6830724d Mon Sep 17 00:00:00 2001 From: CreatorGhost Date: Sat, 11 Jul 2026 23:17:26 +0530 Subject: [PATCH 1/2] feat(tui): make carbon the default decode UI - Add carbon theme (true black + programmer green) and set as default - Ignore inherited opencode config themes; /theme choice persists under decode_theme - New DECODE block wordmark, single source for home and exit epilogue - Session top strip with brand, title, and token budget - Prompt: green caret prefix, hairline full border, right-docked agent badge - Sidebar: CONTEXT/MODIFIED FILES/TODOS/MCP/LSP headers with green stats and context meter - Left-aligned home with full-width prompt field --- packages/tui/src/component/logo.tsx | 69 ++-- packages/tui/src/component/prompt/index.tsx | 268 ++++++------ packages/tui/src/context/theme.tsx | 30 +- .../src/feature-plugins/sidebar/context.tsx | 27 +- .../tui/src/feature-plugins/sidebar/files.tsx | 20 +- .../src/feature-plugins/sidebar/footer.tsx | 8 +- .../tui/src/feature-plugins/sidebar/lsp.tsx | 20 +- .../tui/src/feature-plugins/sidebar/mcp.tsx | 27 +- .../tui/src/feature-plugins/sidebar/todo.tsx | 21 +- packages/tui/src/logo.ts | 4 +- packages/tui/src/routes/home.tsx | 5 +- packages/tui/src/routes/session/index.tsx | 391 ++++++++++-------- packages/tui/src/theme/assets/carbon.json | 255 ++++++++++++ packages/tui/src/theme/index.ts | 2 + packages/tui/src/util/presentation.ts | 27 +- 15 files changed, 731 insertions(+), 443 deletions(-) create mode 100644 packages/tui/src/theme/assets/carbon.json diff --git a/packages/tui/src/component/logo.tsx b/packages/tui/src/component/logo.tsx index db8e8dc71697..1aff29efa400 100644 --- a/packages/tui/src/component/logo.tsx +++ b/packages/tui/src/component/logo.tsx @@ -1,61 +1,40 @@ -import { RGBA, TextAttributes } from "@opentui/core" -import { For, type JSX } from "solid-js" -import { tint, useTheme } from "../context/theme" +import { TextAttributes } from "@opentui/core" +import { For } from "solid-js" +import { useTheme } from "../context/theme" +import { useDirectory } from "../context/directory" import { logo } from "../logo" export function Logo() { const { theme } = useTheme() - - const renderLine = (line: string, fg: RGBA, bold: boolean): JSX.Element[] => { - const shadow = tint(theme.background, fg, 0.25) - const attrs = bold ? TextAttributes.BOLD : undefined - return Array.from(line).map((char) => { - if (char === "_") { - return ( - - {" "} - - ) - } - if (char === "^") { - return ( - - ▀ - - ) - } - if (char === "~") { - return ( - - ▀ - - ) - } - if (char === ",") { - return ( - - ▄ - - ) - } - return ( - - {char} - - ) - }) - } + const directory = useDirectory() return ( {(line, index) => ( - {renderLine(line, theme.textMuted, false)} - {renderLine(logo.right[index()], theme.text, true)} + + {line} + + + {logo.right[index()]} + )} + + + ━━━━━━━━ + + + + decode runs commands on your behalf to help you build. + + + Directory {directory()} + + + ) } diff --git a/packages/tui/src/component/prompt/index.tsx b/packages/tui/src/component/prompt/index.tsx index 115c10296ef4..3e284200fe24 100644 --- a/packages/tui/src/component/prompt/index.tsx +++ b/packages/tui/src/component/prompt/index.tsx @@ -15,8 +15,7 @@ import path from "path" import { fileURLToPath } from "url" import { useLocal } from "../../context/local" import { Flag } from "@opencode-ai/core/flag/flag" -import { tint, useTheme } from "../../context/theme" -import { EmptyBorder, SplitBorder } from "../../ui/border" +import { useTheme } from "../../context/theme" import { useTuiPaths, useTuiTerminalEnvironment } from "../../context/runtime" import { useClipboard } from "../../context/clipboard" import { Spinner } from "../spinner" @@ -1303,7 +1302,6 @@ export function Prompt(props: PromptProps) { () => !!local.agent.current() && store.mode === "normal" && showVariant(), animationsEnabled, ) - const borderHighlight = createMemo(() => tint(theme.border, highlight(), agentMetaAlpha())) const placeholderText = createMemo(() => { if (props.showPlaceholder === false) return undefined @@ -1345,166 +1343,140 @@ export function Prompt(props: PromptProps) { return ( <> (anchor = r)} visible={props.visible !== false} width="100%"> - + -