feat: Split out --status-plugins to show only plugin information

Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat>
This commit is contained in:
Andrew Phillips
2025-09-03 08:45:37 -03:00
parent 58bb70a2a4
commit e14c85a5af
3 changed files with 55 additions and 28 deletions

View File

@@ -92,6 +92,7 @@ fn main() -> Result<(), Error> {
Delete,
Info,
Status,
StatusPlugins,
Server,
GenerateConfig,
}
@@ -112,6 +113,8 @@ fn main() -> Result<(), Error> {
mode = KeepModes::Info;
} else if args.mode.status {
mode = KeepModes::Status;
} else if args.mode.status_plugins {
mode = KeepModes::StatusPlugins;
} else if args.mode.server {
mode = KeepModes::Server;
} else if args.mode.generate_config {
@@ -128,10 +131,10 @@ fn main() -> Result<(), Error> {
// Validate output format usage
if let Some(output_format_str) = &settings.output_format {
if output_format_str != "table" && mode != KeepModes::Info && mode != KeepModes::Status && mode != KeepModes::List {
if output_format_str != "table" && mode != KeepModes::Info && mode != KeepModes::Status && mode != KeepModes::StatusPlugins && mode != KeepModes::List {
cmd.error(
ErrorKind::InvalidValue,
"--output-format can only be used with --info, --status, or --list modes"
"--output-format can only be used with --info, --status, --status-plugins, or --list modes"
).exit();
}
}
@@ -198,7 +201,8 @@ fn main() -> Result<(), Error> {
KeepModes::List => modes::list::mode_list(&mut cmd, &settings, ids, tags, &mut conn, data_path),
KeepModes::Delete => modes::delete::mode_delete(&mut cmd, &settings, &settings, ids, tags, &mut conn, data_path),
KeepModes::Info => modes::info::mode_info(&mut cmd, &settings, ids, tags, &mut conn, data_path),
KeepModes::Status => modes::status::mode_status(&mut cmd, &settings, data_path, db_path),
KeepModes::Status => modes::status::mode_status(&mut cmd, &settings, data_path, db_path, false),
KeepModes::StatusPlugins => modes::status::mode_status(&mut cmd, &settings, data_path, db_path, true),
KeepModes::Server => modes::server::mode_server(&mut cmd, &settings, &mut conn, data_path),
KeepModes::GenerateConfig => modes::generate_config::mode_generate_config(&mut cmd, &settings),
KeepModes::Unknown => unreachable!(),