fix: --generate-models parsed before vault initialization
This commit is contained in:
5 files changed
+37
-23
No files matched your search
+5
-5
@@ -102,7 +102,6 @@ async fn main() -> Result<()> {
|
||||
|
||||
let info_flag = cli.info
|
||||
|| cli.sync_models
|
||||
|| cli.generate_models.is_some()
|
||||
|| cli.list_models
|
||||
|| cli.list_roles
|
||||
|| cli.list_agents
|
||||
@@ -118,6 +117,10 @@ async fn main() -> Result<()> {
|
||||
|
||||
let log_path = setup_logger(cli.acp_server)?;
|
||||
|
||||
if let Some(path) = &cli.generate_models {
|
||||
return catalog::generate_models_file(path).await;
|
||||
}
|
||||
|
||||
if let Some(version) = &cli.update {
|
||||
let version = version.clone();
|
||||
let force = cli.force;
|
||||
@@ -250,6 +253,7 @@ async fn main() -> Result<()> {
|
||||
app_config,
|
||||
log_path,
|
||||
start_mcp_servers,
|
||||
info_flag,
|
||||
abort_signal.clone(),
|
||||
)
|
||||
.await?,
|
||||
@@ -297,10 +301,6 @@ async fn run(
|
||||
return sync_models(url.as_deref(), abort_signal.clone()).await;
|
||||
}
|
||||
|
||||
if let Some(path) = &cli.generate_models {
|
||||
return catalog::generate_models_file(path).await;
|
||||
}
|
||||
|
||||
if cli.list_models {
|
||||
for model in list_models(ctx.app.config.as_ref(), ModelType::Chat) {
|
||||
println!("{}", model.id());
|
||||
|
||||
Reference in new issue
Block a user