mirror of
https://github.com/sigoden/aichat
synced 2024-11-18 09:28:27 +00:00
fix: windows no stream output (#37)
This commit is contained in:
parent
2a7a6f5f27
commit
ee81275431
@ -32,10 +32,10 @@ pub fn render_stream(
|
||||
} else {
|
||||
cmd_render_stream(rx, abort)
|
||||
};
|
||||
if let Err(err) = err {
|
||||
let err = format!("{err:?}");
|
||||
print_now!("{}\n\n", err.trim());
|
||||
}
|
||||
if let Err(err) = err {
|
||||
let err = format!("{err:?}");
|
||||
print_now!("{}\n\n", err.trim());
|
||||
}
|
||||
drop(wg);
|
||||
});
|
||||
ReplyStreamHandler::new(Some(tx), abort_clone)
|
||||
|
@ -18,11 +18,9 @@ use unicode_width::UnicodeWidthStr;
|
||||
pub fn repl_render_stream(rx: Receiver<ReplyStreamEvent>, abort: SharedAbortSignal) -> Result<()> {
|
||||
enable_raw_mode()?;
|
||||
let mut stdout = io::stdout();
|
||||
queue!(stdout, event::DisableMouseCapture)?;
|
||||
|
||||
let ret = repl_render_stream_inner(rx, abort, &mut stdout);
|
||||
|
||||
queue!(stdout, event::DisableMouseCapture)?;
|
||||
disable_raw_mode()?;
|
||||
|
||||
ret
|
||||
|
Loading…
Reference in New Issue
Block a user