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.

fix: remove app command

Louis2a4b99a1a7b5
diff --git a/src-tauri/src/bin/jan-cli.rs b/src-tauri/src/bin/jan-cli.rs
index f9cbb01d8..8c38df17c 100644
--- a/src-tauri/src/bin/jan-cli.rs
+++ b/src-tauri/src/bin/jan-cli.rs
@@ -104,12 +104,6 @@ enum Commands {
#[command(subcommand)]
cmd: ModelsCommands,
},
- /// Show app configuration and data folder location
- #[command(display_order = 12)]
- App {
- #[command(subcommand)]
- cmd: AppCommands,
- },
}
@@ -233,16 +227,6 @@ enum ModelsCommands {
},
}
-// ── App subcommands ────────────────────────────────────────────────────────
-
-#[derive(Subcommand)]
-enum AppCommands {
- /// Print the Jan data folder path (where models, threads, and config are stored)
- DataFolder,
- /// Print the Jan configuration as JSON
- Config,
-}
-
// ── ASCII logo ─────────────────────────────────────────────────────────────
/// Build a left-aligned, bright-yellow ASCII logo for the help header.
@@ -299,7 +283,6 @@ async fn main() {
match cli.command {
Commands::Threads { cmd } => handle_threads(cmd).await,
Commands::Models { cmd } => handle_models(cmd).await,
- Commands::App { cmd } => handle_app(cmd),
Commands::Serve { args } => handle_serve(args).await,
Commands::Launch { program, program_args, model, bin, port, api_key, n_gpu_layers, ctx_size, fit, verbose, select } => {
let program = program.unwrap_or_else(select_program_interactively);
@@ -1357,26 +1340,3 @@ fn build_llamacpp_config(n_gpu_layers: i32, ctx_size: i32, timeout: i32, fit: bo
ctx_shift: false,
}
}
-
-// ── App handlers ───────────────────────────────────────────────────────────
-
-fn handle_app(cmd: AppCommands) {
- match cmd {
- AppCommands::DataFolder => {
- let folder = cli_get_data_folder();
- println!(
- "{}",
- serde_json::to_string_pretty(&serde_json::json!({ "data_folder": folder }))
- .unwrap()
- );
- }
-
- AppCommands::Config => match cli_get_config() {
- Ok(config) => println!("{}", serde_json::to_string_pretty(&config).unwrap()),
- Err(e) => {
- eprintln!("Error: {e}");
- std::process::exit(1);
- }
- },
- }
-}