feat: startup git clone for template repo + pass config through
- ensure_repo_ready() at startup: clone if missing, fetch if exists - TemplateRepoConfig gains local_path field - list_all_templates/select_template/extract_repo_template accept repo config - Remove hardcoded repo_dir(), use config.local_path
This commit is contained in:
@@ -197,6 +197,8 @@ async fn list_llm_calls(
|
||||
.map_err(db_err)
|
||||
}
|
||||
|
||||
async fn list_templates() -> Json<Vec<template::TemplateListItem>> {
|
||||
Json(template::list_all_templates().await)
|
||||
async fn list_templates(
|
||||
State(state): State<Arc<AppState>>,
|
||||
) -> Json<Vec<template::TemplateListItem>> {
|
||||
Json(template::list_all_templates(state.config.template_repo.as_ref()).await)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user