mirror of
https://github.com/anomalyco/opencode.git
synced 2026-11-29 03:24:54 +00:00
fix(tui): give shell mode its own prompt color under new designs (#63605)
This commit is contained in:
parent
9bc30594ab
commit
fd6a1167b4
1 changed files with 5 additions and 2 deletions
|
|
@ -48,7 +48,7 @@ import { useConnected } from "../use-connected"
|
|||
import { useToast } from "../../ui/toast"
|
||||
import { createFadeIn } from "../../util/signal"
|
||||
import { DialogSkill } from "../dialog-skill"
|
||||
import { useConfig, useCursorStyle } from "../../config"
|
||||
import { useConfig, useCursorStyle, useNewDesigns } from "../../config"
|
||||
import { usePromptMove } from "./move"
|
||||
import { promptFilesForServer, resolvePastedAttachments } from "./local-attachment"
|
||||
import { locationKey, useData } from "../../context/data"
|
||||
|
|
@ -218,6 +218,7 @@ export function Prompt(props: PromptProps) {
|
|||
const exit = useExit()
|
||||
const dimensions = useTerminalDimensions()
|
||||
const theme = useTheme()
|
||||
const newDesigns = useNewDesigns()
|
||||
const { currentSyntax: syntax } = useThemes()
|
||||
const animationsEnabled = createMemo(() => config.animations ?? true)
|
||||
const list = createMemo(() => props.placeholders?.normal ?? [])
|
||||
|
|
@ -1583,7 +1584,9 @@ export function Prompt(props: PromptProps) {
|
|||
})
|
||||
const highlight = createMemo(() => {
|
||||
if (muted()) return theme.border.base
|
||||
if (store.mode === "shell") return theme.text.action.primary.selected
|
||||
if (store.mode === "shell")
|
||||
// The new designs' interactive color matches the first agent's, so shell takes the second categorical color.
|
||||
return newDesigns() ? (theme.categorical[1] ?? theme.categorical[0])[400] : theme.text.action.primary.selected
|
||||
return promptDisplay().agentColor ?? theme.border.base
|
||||
})
|
||||
const agentLabel = createMemo(() => (store.mode === "shell" ? "Shell" : promptDisplay().agentLabel))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue