summaryrefslogtreecommitdiffstats
path: root/src/repl/prompt.rs
diff options
context:
space:
mode:
authorsigoden <sigoden@gmail.com>2023-03-16 17:02:09 +0800
committerGitHub <noreply@github.com>2023-03-16 17:02:09 +0800
commit1ef97b2f32caecdb2eef9fe3755390f36d96eae5 (patch)
tree269d9504e5959d2ca161862e0935103adc84b393 /src/repl/prompt.rs
parent4a74f5cd72160585721dbce1e92c110125d046dd (diff)
downloadaichat-1ef97b2f32caecdb2eef9fe3755390f36d96eae5.tar.gz
feat: support multiple models (#71)
Diffstat (limited to 'src/repl/prompt.rs')
-rw-r--r--src/repl/prompt.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/repl/prompt.rs b/src/repl/prompt.rs
index 1a59ba3..8c670f4 100644
--- a/src/repl/prompt.rs
+++ b/src/repl/prompt.rs
@@ -76,10 +76,10 @@ impl Prompt for ReplPrompt {
}
fn render_prompt_right(&self) -> Cow<str> {
- if let Some(conversation) = self.config.read().conversation.as_ref() {
- conversation.reamind_tokens().to_string().into()
- } else {
+ if self.config.read().conversation.is_none() {
Cow::Borrowed("")
+ } else {
+ self.config.read().get_reamind_tokens().to_string().into()
}
}