summaryrefslogtreecommitdiffstats
path: root/src/render/mod.rs
diff options
context:
space:
mode:
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 d200087..5980302 100644
--- a/src/render/mod.rs
+++ b/src/render/mod.rs
@@ -7,6 +7,7 @@ pub use self::markdown::MarkdownRender;
use self::repl::repl_render_stream;
use crate::client::ChatGptClient;
+use crate::config::SharedConfig;
use crate::print_now;
use crate::repl::{ReplyStreamHandler, SharedAbortSignal};
@@ -18,12 +19,12 @@ use std::thread::spawn;
pub fn render_stream(
input: &str,
client: &ChatGptClient,
- highlight: bool,
- light_theme: bool,
+ config: SharedConfig,
repl: bool,
abort: SharedAbortSignal,
wg: WaitGroup,
) -> Result<String> {
+ let (highlight, light_theme) = config.read().get_render_options();
let mut stream_handler = if highlight {
let (tx, rx) = unbounded();
let abort_clone = abort.clone();