summaryrefslogtreecommitdiffstats
path: root/src/repl/mod.rs
diff options
context:
space:
mode:
authorsigoden <sigoden@gmail.com>2024-05-11 09:23:59 +0800
committerGitHub <noreply@github.com>2024-05-11 09:23:59 +0800
commit1e8fc5d269985048d8d3023a615b94a8908571cf (patch)
treee1e43a67bf1e7b5d878d2a7cac5d25a07cda8bdc /src/repl/mod.rs
parent058299e500af86adbc065eced542e108ae325458 (diff)
downloadaichat-1e8fc5d269985048d8d3023a615b94a8908571cf.tar.gz
refactor: list roles includeing builtin roles (#499)
Diffstat (limited to 'src/repl/mod.rs')
-rw-r--r--src/repl/mod.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/repl/mod.rs b/src/repl/mod.rs
index d7cd9d1..db0c9d2 100644
--- a/src/repl/mod.rs
+++ b/src/repl/mod.rs
@@ -176,8 +176,7 @@ impl Repl {
Some(args) => match args.split_once(|c| c == '\n' || c == ' ') {
Some((name, text)) => {
let role = self.config.read().retrieve_role(name.trim())?;
- let input =
- Input::from_str(text.trim(), InputContext::new(Some(role), false));
+ let input = Input::from_str(text.trim(), InputContext::role(role));
self.ask(input).await?;
}
None => {