diff options
| author | sigoden <sigoden@gmail.com> | 2023-03-09 16:42:13 +0800 |
|---|---|---|
| committer | sigoden <sigoden@gmail.com> | 2023-03-09 16:52:04 +0800 |
| commit | c45d71cdeabbced7a55381e3b431c3eae3799ac0 (patch) | |
| tree | fd90f862d51930063ac5c94e4bf60f74c7db9d86 | |
| parent | 05d20f207fedf03c2a564438a0d44a2d85d4ed2d (diff) | |
| download | aichat-c45d71cdeabbced7a55381e3b431c3eae3799ac0.tar.gz | |
refactor: trivial updates
- change prompt's temp role name
- questionnaire of 'save chat messages' default set true
- `.info` do not show role name
| -rw-r--r-- | src/config/mod.rs | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/config/mod.rs b/src/config/mod.rs index 04f08b3..64be3bd 100644 --- a/src/config/mod.rs +++ b/src/config/mod.rs @@ -24,7 +24,7 @@ const CONFIG_FILE_NAME: &str = "config.yaml"; const ROLES_FILE_NAME: &str = "roles.yaml"; const HISTORY_FILE_NAME: &str = "history.txt"; const MESSAGE_FILE_NAME: &str = "messages.md"; -const TEMP_ROLE_NAME: &str = "%PROMPT%"; +const TEMP_ROLE_NAME: &str = "P"; const SET_COMPLETIONS: [&str; 9] = [ ".set api_key", ".set temperature", @@ -241,16 +241,10 @@ impl Config { .temperature .map(|v| v.to_string()) .unwrap_or("-".into()); - let role_name = self - .role - .as_ref() - .map(|v| v.name.to_string()) - .unwrap_or("-".into()); let items = vec