Skip to content

armgit / jan

Public Imported from GitHub
0

Jan is an open source alternative to ChatGPT that runs 100% offline on your computer.

feat(agent-cli): honor --yolo on the default `jan` TUI launch

Akarshan Biswascdfb8482705c
diff --git a/src-tauri/src/bin/jan.rs b/src-tauri/src/bin/jan.rs
index a88cf322a..d4427bc11 100644
--- a/src-tauri/src/bin/jan.rs
+++ b/src-tauri/src/bin/jan.rs
@@ -49,6 +49,10 @@ Models downloaded in the Jan desktop app are automatically available here.",
struct Cli {
#[command(subcommand)]
command: Option<Commands>,
+ /// Disable the sandbox and auto-approve every tool call in the default agent
+ /// TUI (no prompts). Ignored when a subcommand is given.
+ #[arg(long)]
+ yolo: bool,
}
#[derive(Subcommand)]
@@ -396,7 +400,7 @@ async fn main() {
api_key: None,
}
.into_overrides();
- if let Err(e) = cli_agent_ui(".", None, None, None, Vec::new(), overrides, false).await {
+ if let Err(e) = cli_agent_ui(".", None, None, None, Vec::new(), overrides, cli.yolo).await {
eprintln!("Error: {e}");
std::process::exit(1);
}