(&mut self)
| 1933 | } |
| 1934 | |
| 1935 | fn show_subagent_config_selector(&mut self) { |
| 1936 | let registry = get_agent_registry(); |
| 1937 | let subagents = tokio::task::block_in_place(|| { |
| 1938 | let workspace = self.workspace_path_buf(); |
| 1939 | let agent_type = self.agent_type.clone(); |
| 1940 | tokio::runtime::Handle::current().block_on(registry.get_subagents_for_query( |
| 1941 | &SubagentQueryContext { |
| 1942 | parent_agent_type: Some(&agent_type), |
| 1943 | workspace_root: Some(workspace.as_path()), |
| 1944 | list_scope: SubagentListScope::RegistryManagement, |
| 1945 | include_disabled: true, |
| 1946 | }, |
| 1947 | )) |
| 1948 | }); |
| 1949 | |
| 1950 | let subagent_items: Vec<SubagentItem> = subagents |
| 1951 | .into_iter() |
| 1952 | .map(Self::subagent_item_from_info) |
| 1953 | .collect(); |
| 1954 | |
| 1955 | if subagent_items.is_empty() { |
| 1956 | self.status = Some("No subagents found.".to_string()); |
| 1957 | return; |
| 1958 | } |
| 1959 | |
| 1960 | self.subagent_selector.show_config(subagent_items); |
| 1961 | } |
| 1962 | |
| 1963 | fn handle_subagent_selector_action(&mut self, action: SubagentSelectorAction) { |
| 1964 | match action { |
no test coverage detected