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

Method show_available_skill_list

src/apps/cli/src/modes/chat.rs:2921–2955  ·  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

2919 }
2920
2921 fn show_available_skill_list(
2922 &self,
2923 chat_view: &mut ChatView,
2924 chat_state: &mut ChatState,
2925 rt_handle: &tokio::runtime::Handle,
2926 ) {
2927 let skills = tokio::task::block_in_place(|| {
2928 let workspace = self.agent.workspace_path_buf();
2929 let agent_type = self.agent_type.clone();
2930 rt_handle.block_on(async {
2931 let registry = SkillRegistry::global();
2932 registry
2933 .get_resolved_skills_for_workspace(Some(workspace.as_path()), Some(&agent_type))
2934 .await
2935 })
2936 });
2937
2938 if skills.is_empty() {
2939 chat_state.add_system_message(format!(
2940 "No enabled skills found for agent mode '{}'. Add skills in .bitfun/skills/, .cursor/skills/, or ~/.cursor/skills/, or enable built-in skills for this mode.",
2941 self.agent_type
2942 ));
2943 return;
2944 }
2945
2946 let skill_items: Vec<SkillItem> =
2947 skills.into_iter().map(Self::skill_item_from_info).collect();
2948
2949 if skill_items.is_empty() {
2950 chat_state.add_system_message("No skills found.".to_string());
2951 return;
2952 }
2953
2954 chat_view.show_skill_list(skill_items);
2955 }
2956
2957 fn show_skill_config_selector(
2958 &self,

Callers 1

Calls 8

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

Tested by

no test coverage detected