summaryrefslogtreecommitdiffstats
path: root/src/cli.rs
diff options
context:
space:
mode:
authorPatrick Jackson <patrick@jackson.dev>2024-03-26 17:00:28 -0600
committerGitHub <noreply@github.com>2024-03-27 07:00:28 +0800
commit582f56e915a7c88eb0372496e298c9944f5832ae (patch)
treec95e19607288f9c740b1d76b477cede2c88a0466 /src/cli.rs
parent7f05dc1a4af868b64906666c65020838cf2aa985 (diff)
downloadaichat-582f56e915a7c88eb0372496e298c9944f5832ae.tar.gz
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 <sigoden@gmail.com>
Diffstat (limited to 'src/cli.rs')
-rw-r--r--src/cli.rs5
1 files changed, 4 insertions, 1 deletions
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<Option<String>>,
+ /// 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<Vec<String>>,
/// Disable syntax highlighting