summaryrefslogtreecommitdiffstats
path: root/src/render/mod.rs
diff options
context:
space:
mode:
authorsigoden <sigoden@gmail.com>2023-03-11 18:53:36 +0800
committerGitHub <noreply@github.com>2023-03-11 18:53:36 +0800
commitcfb6ce6958751da5e13683ea07f42a5dbc4eae01 (patch)
treec7ec60ba7c1d2e37225ae6b1476057a18e2eb987 /src/render/mod.rs
parentdc09cb38d480342c9fe781a19fe72d2bb892b70c (diff)
downloadaichat-cfb6ce6958751da5e13683ea07f42a5dbc4eae01.tar.gz
feat: support light theme (#65)
There are two ways to enable the light theme: - add `light_theme: true` to config.yaml - use `AICHAT_LIGHT_THEME=true` env var
Diffstat (limited to 'src/render/mod.rs')
-rw-r--r--src/render/mod.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/render/mod.rs b/src/render/mod.rs
index 4d5c6d3..d200087 100644
--- a/src/render/mod.rs
+++ b/src/render/mod.rs
@@ -19,6 +19,7 @@ pub fn render_stream(
input: &str,
client: &ChatGptClient,
highlight: bool,
+ light_theme: bool,
repl: bool,
abort: SharedAbortSignal,
wg: WaitGroup,
@@ -28,9 +29,9 @@ pub fn render_stream(
let abort_clone = abort.clone();
spawn(move || {
let err = if repl {
- repl_render_stream(rx, abort)
+ repl_render_stream(rx, light_theme, abort)
} else {
- cmd_render_stream(rx, abort)
+ cmd_render_stream(rx, light_theme, abort)
};
if let Err(err) = err {
let err = format!("{err:?}");