From 582f56e915a7c88eb0372496e298c9944f5832ae Mon Sep 17 00:00:00 2001 From: Patrick Jackson Date: Tue, 26 Mar 2024 17:00:28 -0600 Subject: feat: add `save_session` config item and `--save-session` cli option (#370) * fix: sessions should save when exiting * feat: improve save sessions * feat: do not allow saving the temp session name * feat: allow creating a session without interactive use * feat: add `save_session` config and `--save-session` option --------- Co-authored-by: sigoden --- src/cli.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/cli.rs') diff --git a/src/cli.rs b/src/cli.rs index 5f35df4..344e2a6 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -12,13 +12,16 @@ pub struct Cli { /// Create or reuse a session #[clap(short = 's', long)] pub session: Option>, + /// Whether to save the session automatically + #[clap(long)] + pub save_session: bool, /// Execute commands using natural language #[clap(short = 'e', long)] pub execute: bool, /// Generate only code #[clap(short = 'c', long)] pub code: bool, - /// Attach files to the message to be sent. + /// Attach files to the message to be sent #[clap(short = 'f', long, num_args = 1.., value_name = "FILE")] pub file: Option>, /// Disable syntax highlighting -- cgit v1.2.3