MCPcopy Create free account
hub / github.com/GCWing/BitFun / get_mode_skill_configs

Function get_mode_skill_configs

src/apps/desktop/src/api/skill_api.rs:479–501  ·  view source on GitHub ↗
(
    state: State<'_, AppState>,
    mode_id: String,
    force_refresh: Option<bool>,
    workspace_path: Option<String>,
)

Source from the content-addressed store, hash-verified

477
478#[tauri::command]
479pub 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]
504pub async fn set_mode_skill_disabled(

Callers

nothing calls this directly

Calls 3

globalFunction · 0.85
refreshMethod · 0.45

Tested by

no test coverage detected