diff options
| author | sigoden <sigoden@gmail.com> | 2024-10-22 07:38:45 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-10-22 07:38:45 +0800 |
| commit | c7d85c624b1bd4ab8118ff80d692ee2b40669537 (patch) | |
| tree | 90f1c957645add0f6eb33c9664257407a3d41a57 /src/config/session.rs | |
| parent | a165fd19e752e3a998dedfe640e9ec838c2737c6 (diff) | |
| download | aichat-c7d85c624b1bd4ab8118ff80d692ee2b40669537.tar.gz | |
refactor: several improvements (#943)
- rename agents_config_dir to agents_data_dir
- do not save empty role name while saving the session
- rename delete keys (roles/sessions/rags/agents => role/session/rag/agent-data)
- improve some printing messages
Diffstat (limited to 'src/config/session.rs')
| -rw-r--r-- | src/config/session.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/config/session.rs b/src/config/session.rs index 2ad517c..717188b 100644 --- a/src/config/session.rs +++ b/src/config/session.rs @@ -240,7 +240,7 @@ impl Session { self.top_p = role.top_p(); self.use_tools = role.use_tools(); self.model = role.model().clone(); - self.role_name = Some(role.name().to_string()); + self.role_name = convert_option_string(role.name()); self.role_prompt = role.prompt().to_string(); self.dirty = true; } @@ -349,7 +349,7 @@ impl Session { })?; if is_repl { - println!("✨ Saved session to '{}'", session_path.display()); + println!("✨ Saved session to '{}'.", session_path.display()); } if self.name() != session_name { |
