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

Method show_skill_config_selector

src/apps/cli/src/modes/chat.rs:2957–2985  ·  view source on GitHub ↗
(
        &self,
        chat_view: &mut ChatView,
        chat_state: &mut ChatState,
        rt_handle: &tokio::runtime::Handle,
    )

Source from the content-addressed store, hash-verified

2955 }
2956
2957 fn show_skill_config_selector(
2958 &self,
2959 chat_view: &mut ChatView,
2960 chat_state: &mut ChatState,
2961 rt_handle: &tokio::runtime::Handle,
2962 ) {
2963 let skills = tokio::task::block_in_place(|| {
2964 let workspace = self.agent.workspace_path_buf();
2965 let agent_type = self.agent_type.clone();
2966 rt_handle.block_on(async {
2967 let registry = SkillRegistry::global();
2968 registry
2969 .get_mode_skill_infos_for_workspace(Some(workspace.as_path()), &agent_type)
2970 .await
2971 })
2972 });
2973
2974 let skill_items: Vec<SkillItem> = skills
2975 .into_iter()
2976 .map(Self::skill_item_from_mode_info)
2977 .collect();
2978
2979 if skill_items.is_empty() {
2980 chat_state.add_system_message("No skills found.".to_string());
2981 return;
2982 }
2983
2984 chat_view.show_skill_config(skill_items);
2985 }
2986
2987 fn handle_skill_selector_action(
2988 &self,

Callers 1

Calls 8

globalFunction · 0.85
collectMethod · 0.80
add_system_messageMethod · 0.80
show_skill_configMethod · 0.80
workspace_path_bufMethod · 0.45
cloneMethod · 0.45
is_emptyMethod · 0.45

Tested by

no test coverage detected