summaryrefslogtreecommitdiffstats
path: root/src/repl/prompt.rs
diff options
context:
space:
mode:
authorsigoden <sigoden@gmail.com>2023-11-01 22:15:55 +0800
committerGitHub <noreply@github.com>2023-11-01 22:15:55 +0800
commitf6da06dad9b2a76016209a7d58ad923c2c72f150 (patch)
tree1c74f306c194d3289fe06ed31a39a00c27ad0ca9 /src/repl/prompt.rs
parentda3c541b681b140feb52b4297167ca233535fa90 (diff)
downloadaichat-f6da06dad9b2a76016209a7d58ad923c2c72f150.tar.gz
refactor: improve code quanity (#194)
- extends ModelInfo for tokens calculating - refactor config/session.rs, improve export, render, getter/setter - modify main.rs, allow --model override session.model
Diffstat (limited to 'src/repl/prompt.rs')
-rw-r--r--src/repl/prompt.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/repl/prompt.rs b/src/repl/prompt.rs
index 7bed5e0..7007b53 100644
--- a/src/repl/prompt.rs
+++ b/src/repl/prompt.rs
@@ -23,7 +23,7 @@ impl ReplPrompt {
impl Prompt for ReplPrompt {
fn render_prompt_left(&self) -> Cow<str> {
if let Some(session) = &self.config.read().session {
- Cow::Owned(session.name.clone())
+ Cow::Owned(session.name().to_string())
} else if let Some(role) = &self.config.read().role {
Cow::Owned(role.name.clone())
} else {