diff options
| author | sigoden <sigoden@gmail.com> | 2023-03-16 17:02:09 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-03-16 17:02:09 +0800 |
| commit | 1ef97b2f32caecdb2eef9fe3755390f36d96eae5 (patch) | |
| tree | 269d9504e5959d2ca161862e0935103adc84b393 /src/repl/prompt.rs | |
| parent | 4a74f5cd72160585721dbce1e92c110125d046dd (diff) | |
| download | aichat-1ef97b2f32caecdb2eef9fe3755390f36d96eae5.tar.gz | |
feat: support multiple models (#71)
Diffstat (limited to 'src/repl/prompt.rs')
| -rw-r--r-- | src/repl/prompt.rs | 6 |
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() } } |
