diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/cli.rs | 3 | ||||
| -rw-r--r-- | src/main.rs | 4 | ||||
| -rw-r--r-- | src/repl/mod.rs | 2 |
3 files changed, 7 insertions, 2 deletions
@@ -6,6 +6,9 @@ pub struct Cli { /// Select a LLM model #[clap(short, long)] pub model: Option<String>, + /// Use the system prompt + #[clap(long)] + pub prompt: Option<String>, /// Select a role #[clap(short, long)] pub role: Option<String>, diff --git a/src/main.rs b/src/main.rs index f3d3846..f691b6f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -80,7 +80,9 @@ async fn main() -> Result<()> { if cli.dry_run { config.write().dry_run = true; } - if let Some(name) = &cli.role { + if let Some(prompt) = &cli.prompt { + config.write().set_prompt(prompt)?; + } else if let Some(name) = &cli.role { config.write().set_role(name)?; } else if cli.execute { config.write().set_role(SHELL_ROLE)?; diff --git a/src/repl/mod.rs b/src/repl/mod.rs index dd1c735..6306f0b 100644 --- a/src/repl/mod.rs +++ b/src/repl/mod.rs @@ -32,7 +32,7 @@ lazy_static! { ReplCommand::new(".model", "Change the current LLM", State::all()), ReplCommand::new( ".prompt", - "Make a temporary role using a prompt", + "Create a temporary role using a custom prompt", State::able_change_role() ), ReplCommand::new( |
