Light palette, chosen from the terminal's background or the Colours setting

This commit is contained in:
Callum Alpass committed 2026-11-02 23:21:55 +11:00
1 parent 3ef67c5b50
commit 49fc25f7a2
11 files changed
+91 -42

No files matched your search

+3
View File
@@ -145,6 +145,9 @@ async function runUi(attachNeedle?: string) {
const layout = await loadLayout();
// The kitty keyboard protocol lets terminals that support it send shift+enter, for newlines.
const renderer = await createCliRenderer({ exitOnCtrlC: false, useMouse: true, useKittyKeyboard: {} });
const { applyTheme } = await import("./ui/theme.ts");
// Terminals that don't say what their background is get the dark palette.
applyTheme(config.theme === "auto" ? ((await renderer.waitForThemeMode(300)) ?? "dark") : config.theme);
createRoot(renderer).render(createElement(App, { session, config, layout, ...(attachThreadId ? { attachThreadId } : {}) }));
}