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

Method show_available_subagent_list

src/apps/cli/src/ui/startup.rs:1899–1933  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

1897 }
1898
1899 fn show_available_subagent_list(&mut self) {
1900 let registry = get_agent_registry();
1901 let subagents = tokio::task::block_in_place(|| {
1902 let workspace = self.workspace_path_buf();
1903 let agent_type = self.agent_type.clone();
1904 tokio::runtime::Handle::current().block_on(registry.get_subagents_for_query(
1905 &SubagentQueryContext {
1906 parent_agent_type: Some(&agent_type),
1907 workspace_root: Some(workspace.as_path()),
1908 list_scope: SubagentListScope::TaskVisible,
1909 include_disabled: false,
1910 },
1911 ))
1912 });
1913
1914 if subagents.is_empty() {
1915 self.status = Some(format!(
1916 "No enabled subagents found for agent mode '{}'.",
1917 self.agent_type
1918 ));
1919 return;
1920 }
1921
1922 let subagent_items: Vec<SubagentItem> = subagents
1923 .into_iter()
1924 .map(Self::subagent_item_from_info)
1925 .collect();
1926
1927 if subagent_items.is_empty() {
1928 self.status = Some("No subagents found.".to_string());
1929 return;
1930 }
1931
1932 self.subagent_selector.show_list(subagent_items);
1933 }
1934
1935 fn show_subagent_config_selector(&mut self) {
1936 let registry = get_agent_registry();

Callers 1

Calls 7

get_agent_registryFunction · 0.85
collectMethod · 0.80
workspace_path_bufMethod · 0.45
cloneMethod · 0.45
is_emptyMethod · 0.45
show_listMethod · 0.45

Tested by

no test coverage detected