(
state: State<'_, AppState>,
mode_id: String,
force_refresh: Option<bool>,
workspace_path: Option<String>,
)
| 477 | |
| 478 | #[tauri::command] |
| 479 | pub async fn get_mode_skill_configs( |
| 480 | state: State<'_, AppState>, |
| 481 | mode_id: String, |
| 482 | force_refresh: Option<bool>, |
| 483 | workspace_path: Option<String>, |
| 484 | ) -> Result<Value, String> { |
| 485 | let registry = SkillRegistry::global(); |
| 486 | |
| 487 | if force_refresh.unwrap_or(false) { |
| 488 | registry.refresh().await; |
| 489 | } |
| 490 | |
| 491 | let mode_skill_infos = get_mode_skill_infos_for_workspace_input( |
| 492 | &state, |
| 493 | registry, |
| 494 | &mode_id, |
| 495 | workspace_path.as_deref(), |
| 496 | ) |
| 497 | .await?; |
| 498 | |
| 499 | serde_json::to_value(mode_skill_infos) |
| 500 | .map_err(|e| format!("Failed to serialize mode skill configs: {}", e)) |
| 501 | } |
| 502 | |
| 503 | #[tauri::command] |
| 504 | pub async fn set_mode_skill_disabled( |
nothing calls this directly
no test coverage detected