summaryrefslogtreecommitdiffstats
path: root/src/cli.rs
diff options
context:
space:
mode:
authorsigoden <sigoden@gmail.com>2023-10-30 10:07:01 +0800
committerGitHub <noreply@github.com>2023-10-30 10:07:01 +0800
commitb276dfedd2d13de9918b9b87a3d543e7b5eca95e (patch)
tree33e1f864ef38e45ebc297e15ce519ee8105b8757 /src/cli.rs
parent632a6fcc0bfb5b33858cd0fa3876e43ce2073cb3 (diff)
downloadaichat-b276dfedd2d13de9918b9b87a3d543e7b5eca95e.tar.gz
feat: support textwrap (#171)
* feat: support textwrap * improve cmd_render_stream * done cmd_render_stream * add `-w` alias to `--wrap` * done repl_render_stream * add `config.wrap_code` * remove cached config.wrap_width * fix unxpected duplicate lines on kitty * refactor markdown render * improve render * fix test
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 183a965..91c48e8 100644
--- a/src/cli.rs
+++ b/src/cli.rs
@@ -7,7 +7,7 @@ pub struct Cli {
/// List all models
#[clap(long)]
pub list_models: bool,
- /// Choose a llm model
+ /// Choose a LLM model
#[clap(short, long)]
pub model: Option<String>,
/// List all roles
@@ -25,6 +25,9 @@ pub struct Cli {
/// Initiate or continue a session
#[clap(short = 's', long)]
pub session: Option<Option<String>>,
+ /// Specify the text-wrapping mode (no*, auto, <max-width>)
+ #[clap(short = 'w', long)]
+ pub wrap: Option<String>,
/// Print information
#[clap(long)]
pub info: bool,