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

Method handle_skill_selector_action

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

Source from the content-addressed store, hash-verified

2985 }
2986
2987 fn handle_skill_selector_action(
2988 &self,
2989 action: SkillSelectorAction,
2990 chat_view: &mut ChatView,
2991 chat_state: &mut ChatState,
2992 rt_handle: &tokio::runtime::Handle,
2993 ) {
2994 match action {
2995 SkillSelectorAction::ListSkills => {
2996 self.show_available_skill_list(chat_view, chat_state, rt_handle);
2997 }
2998 SkillSelectorAction::ConfigureSkills => {
2999 self.show_skill_config_selector(chat_view, chat_state, rt_handle);
3000 }
3001 SkillSelectorAction::Execute(selected) => {
3002 chat_view.hide_skill_selector();
3003 self.apply_skill_selection(&selected, chat_view);
3004 }
3005 SkillSelectorAction::Toggle(selected) => {
3006 self.set_skill_enabled(&selected, !selected.enabled, chat_state, rt_handle);
3007 self.show_skill_config_selector(chat_view, chat_state, rt_handle);
3008 }
3009 }
3010 }
3011
3012 /// Apply skill selection: fill input box with execution command
3013 fn apply_skill_selection(&self, selected: &SkillItem, chat_view: &mut ChatView) {

Callers 2

handle_key_eventMethod · 0.45
handle_non_key_eventMethod · 0.45

Calls 5

hide_skill_selectorMethod · 0.80
apply_skill_selectionMethod · 0.80
set_skill_enabledMethod · 0.45

Tested by

no test coverage detected