fix(tui): restore shell mode styling (#38231)
This commit is contained in:
parent
aea36d7630
commit
dba5da7c10
1 changed files with 10 additions and 7 deletions
|
|
@ -1300,11 +1300,16 @@ export function Prompt(props: PromptProps) {
|
||||||
|
|
||||||
const highlight = createMemo(() => {
|
const highlight = createMemo(() => {
|
||||||
if (leader()) return themeV2.border.default
|
if (leader()) return themeV2.border.default
|
||||||
if (store.mode === "shell") return themeV2.background.action.primary.default
|
if (store.mode === "shell") return themeV2.text.action.primary.selected
|
||||||
const agent = local.agent.current()
|
const agent = local.agent.current()
|
||||||
if (!agent) return themeV2.border.default
|
if (!agent) return themeV2.border.default
|
||||||
return local.agent.color(agent.id)
|
return local.agent.color(agent.id)
|
||||||
})
|
})
|
||||||
|
const agentLabel = createMemo(() => {
|
||||||
|
if (store.mode === "shell") return "Shell"
|
||||||
|
const agent = local.agent.current()
|
||||||
|
return agent ? Locale.titlecase(agent.id) : undefined
|
||||||
|
})
|
||||||
|
|
||||||
const showVariant = createMemo(() => {
|
const showVariant = createMemo(() => {
|
||||||
const variants = local.model.variant.list()
|
const variants = local.model.variant.list()
|
||||||
|
|
@ -1313,7 +1318,7 @@ export function Prompt(props: PromptProps) {
|
||||||
return !!current
|
return !!current
|
||||||
})
|
})
|
||||||
|
|
||||||
const agentMetaAlpha = createFadeIn(() => !!local.agent.current(), animationsEnabled)
|
const agentMetaAlpha = createFadeIn(() => store.mode === "shell" || !!local.agent.current(), animationsEnabled)
|
||||||
const modelMetaAlpha = createFadeIn(() => !!local.agent.current() && store.mode === "normal", animationsEnabled)
|
const modelMetaAlpha = createFadeIn(() => !!local.agent.current() && store.mode === "normal", animationsEnabled)
|
||||||
const variantMetaAlpha = createFadeIn(
|
const variantMetaAlpha = createFadeIn(
|
||||||
() => !!local.agent.current() && store.mode === "normal" && showVariant(),
|
() => !!local.agent.current() && store.mode === "normal" && showVariant(),
|
||||||
|
|
@ -1460,12 +1465,10 @@ export function Prompt(props: PromptProps) {
|
||||||
/>
|
/>
|
||||||
<box flexDirection="row" flexShrink={0} paddingTop={1} gap={1} justifyContent="space-between">
|
<box flexDirection="row" flexShrink={0} paddingTop={1} gap={1} justifyContent="space-between">
|
||||||
<box flexDirection="row" gap={1}>
|
<box flexDirection="row" gap={1}>
|
||||||
<Show when={local.agent.current()} fallback={<box height={1} />}>
|
<Show when={agentLabel()} fallback={<box height={1} />}>
|
||||||
{(agent) => (
|
{(label) => (
|
||||||
<>
|
<>
|
||||||
<text fg={fadeColor(highlight(), agentMetaAlpha())}>
|
<text fg={fadeColor(highlight(), agentMetaAlpha())}>{label()}</text>
|
||||||
{store.mode === "shell" ? "Shell" : Locale.titlecase(agent().id)}
|
|
||||||
</text>
|
|
||||||
<Show when={store.mode === "normal" && local.permission.mode === "auto"}>
|
<Show when={store.mode === "normal" && local.permission.mode === "auto"}>
|
||||||
<text fg={fadeColor(themeV2.text.subdued, agentMetaAlpha())}>auto</text>
|
<text fg={fadeColor(themeV2.text.subdued, agentMetaAlpha())}>auto</text>
|
||||||
</Show>
|
</Show>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue