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

Method push_current_popup_to_stack

src/apps/cli/src/ui/startup.rs:1173–1202  ·  view source on GitHub ↗

Push the currently visible popup onto the navigation stack and hide it

(&mut self)

Source from the content-addressed store, hash-verified

1171
1172 /// Push the currently visible popup onto the navigation stack and hide it
1173 fn push_current_popup_to_stack(&mut self) {
1174 if self.command_palette.is_visible() {
1175 self.popup_stack.push(PopupType::CommandPalette);
1176 self.command_palette.hide();
1177 } else if self.model_selector.is_visible() {
1178 self.popup_stack.push(PopupType::ModelSelector);
1179 self.model_selector.hide();
1180 } else if self.agent_selector.is_visible() {
1181 self.popup_stack.push(PopupType::AgentSelector);
1182 self.agent_selector.hide();
1183 } else if self.session_selector.is_visible() {
1184 self.popup_stack.push(PopupType::SessionSelector);
1185 self.session_selector.hide();
1186 } else if self.skill_selector.is_visible() {
1187 self.popup_stack.push(PopupType::SkillSelector);
1188 self.skill_selector.hide();
1189 } else if self.subagent_selector.is_visible() {
1190 self.popup_stack.push(PopupType::SubagentSelector);
1191 self.subagent_selector.hide();
1192 } else if self.theme_selector.is_visible() {
1193 self.popup_stack.push(PopupType::ThemeSelector);
1194 self.theme_selector.hide();
1195 } else if self.provider_selector.is_visible() {
1196 self.popup_stack.push(PopupType::ProviderSelector);
1197 self.provider_selector.hide();
1198 } else if self.model_config_form.is_visible() {
1199 self.popup_stack.push(PopupType::ModelConfigForm);
1200 self.model_config_form.hide();
1201 }
1202 }
1203
1204 fn show_session_selector(&mut self) {
1205 self.push_current_popup_to_stack();

Callers 9

handle_keyMethod · 0.80
handle_palette_actionMethod · 0.80
handle_commandMethod · 0.80
show_session_selectorMethod · 0.80
show_model_selectorMethod · 0.80
show_agent_selectorMethod · 0.80
show_theme_selectorMethod · 0.80
show_skill_selectorMethod · 0.80

Calls 3

is_visibleMethod · 0.45
pushMethod · 0.45
hideMethod · 0.45

Tested by

no test coverage detected