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..02f6342605c8 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" @@ -247,8 +246,7 @@ export function Prompt(props: PromptProps) { createEffect(() => { if (!input || input.isDestroyed) return - if (props.disabled) input.cursorColor = theme.backgroundElement - if (!props.disabled) input.cursorColor = theme.text + input.cursorColor = props.disabled ? theme.backgroundElement : theme.primary }) const lastUserMessage = createMemo(() => { @@ -1303,7 +1301,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 +1342,140 @@ export function Prompt(props: PromptProps) { return ( <> (anchor = r)} visible={props.visible !== false} width="100%"> - + -