mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-15 22:03:45 +00:00
revert: remove unnecessary themeOverride params from theme functions
The optional theme parameter was added as a workaround for tsx dev mode, but that's a dev-only issue. Users running the built package don't need it.
This commit is contained in:
parent
7302fe5063
commit
00fa8b71c8
3 changed files with 13 additions and 30 deletions
|
|
@ -946,14 +946,13 @@ export function getMarkdownTheme(): MarkdownTheme {
|
|||
};
|
||||
}
|
||||
|
||||
export function getSelectListTheme(themeOverride?: Theme): SelectListTheme {
|
||||
const t = themeOverride ?? theme;
|
||||
export function getSelectListTheme(): SelectListTheme {
|
||||
return {
|
||||
selectedPrefix: (text: string) => t.fg("accent", text),
|
||||
selectedText: (text: string) => t.fg("accent", text),
|
||||
description: (text: string) => t.fg("muted", text),
|
||||
scrollInfo: (text: string) => t.fg("muted", text),
|
||||
noMatch: (text: string) => t.fg("muted", text),
|
||||
selectedPrefix: (text: string) => theme.fg("accent", text),
|
||||
selectedText: (text: string) => theme.fg("accent", text),
|
||||
description: (text: string) => theme.fg("muted", text),
|
||||
scrollInfo: (text: string) => theme.fg("muted", text),
|
||||
noMatch: (text: string) => theme.fg("muted", text),
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -964,13 +963,12 @@ export function getEditorTheme(): EditorTheme {
|
|||
};
|
||||
}
|
||||
|
||||
export function getSettingsListTheme(themeOverride?: Theme): import("@mariozechner/pi-tui").SettingsListTheme {
|
||||
const t = themeOverride ?? theme;
|
||||
export function getSettingsListTheme(): import("@mariozechner/pi-tui").SettingsListTheme {
|
||||
return {
|
||||
label: (text: string, selected: boolean) => (selected ? t.fg("accent", text) : text),
|
||||
value: (text: string, selected: boolean) => (selected ? t.fg("accent", text) : t.fg("muted", text)),
|
||||
description: (text: string) => t.fg("dim", text),
|
||||
cursor: t.fg("accent", "→ "),
|
||||
hint: (text: string) => t.fg("dim", text),
|
||||
label: (text: string, selected: boolean) => (selected ? theme.fg("accent", text) : text),
|
||||
value: (text: string, selected: boolean) => (selected ? theme.fg("accent", text) : theme.fg("muted", text)),
|
||||
description: (text: string) => theme.fg("dim", text),
|
||||
cursor: theme.fg("accent", "→ "),
|
||||
hint: (text: string) => theme.fg("dim", text),
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue