tool colors
parent
91a18af727
commit
a8e1d01a12
|
|
@ -172,6 +172,12 @@ function look(commit: StreamCommit, theme: RunEntryTheme): Paint {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (commit.kind === "tool" && commit.phase === "start") {
|
||||||
|
return {
|
||||||
|
fg: theme.tool.start ?? theme.tool.body,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (commit.kind === "assistant") {
|
if (commit.kind === "assistant") {
|
||||||
return { fg: theme.assistant.body }
|
return { fg: theme.assistant.body }
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,7 @@ import type { EntryKind } from "./types"
|
||||||
|
|
||||||
type Tone = {
|
type Tone = {
|
||||||
body: ColorInput
|
body: ColorInput
|
||||||
|
start?: ColorInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type RunEntryTheme = Record<EntryKind, Tone>
|
export type RunEntryTheme = Record<EntryKind, Tone>
|
||||||
|
|
@ -128,7 +129,8 @@ function map(theme: TuiThemeCurrent, syntax?: SyntaxStyle): RunTheme {
|
||||||
body: theme.textMuted,
|
body: theme.textMuted,
|
||||||
},
|
},
|
||||||
tool: {
|
tool: {
|
||||||
body: theme.warning,
|
body: theme.text,
|
||||||
|
start: theme.textMuted,
|
||||||
},
|
},
|
||||||
error: {
|
error: {
|
||||||
body: theme.error,
|
body: theme.error,
|
||||||
|
|
@ -162,9 +164,10 @@ const seed = {
|
||||||
error: rgba("#ef4444"),
|
error: rgba("#ef4444"),
|
||||||
}
|
}
|
||||||
|
|
||||||
function tone(body: ColorInput): Tone {
|
function tone(body: ColorInput, start?: ColorInput): Tone {
|
||||||
return {
|
return {
|
||||||
body,
|
body,
|
||||||
|
start,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -186,7 +189,7 @@ export const RUN_THEME_FALLBACK: RunTheme = {
|
||||||
user: tone(seed.highlight),
|
user: tone(seed.highlight),
|
||||||
assistant: tone(seed.text),
|
assistant: tone(seed.text),
|
||||||
reasoning: tone(seed.muted),
|
reasoning: tone(seed.muted),
|
||||||
tool: tone(seed.warning),
|
tool: tone(seed.text, seed.muted),
|
||||||
error: tone(seed.error),
|
error: tone(seed.error),
|
||||||
},
|
},
|
||||||
block: {
|
block: {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue