Files
zed/crates/feature_flags/src/flags.rs
T
Richard FeldmanandAmp 581e559002 Render subagents in thread (#46188)
## Summary

This PR adds the UI for displaying subagent tool calls:

### Thread view changes
- Add `expanded_subagents` state HashMap for tracking expanded cards  
- Implement `render_subagent_tool_call()` for collapsed card with label
and chevron
- Add subagent detection via `is_subagent()` and `tool_name` field
- Handle `SubagentThread` content type in tool call rendering
- Add expand/collapse toggle button for subagent cards
- Style collapsed cards similar to terminal tool calls
- Support inline image rendering in content blocks

### Agent panel changes
- Add `open_external_thread_with_server()` for testing with stubbed
servers

### Test support
- Add `acp_thread/test-support` feature to agent_ui
- Add base64 dev dependency for image tests

Release Notes:

- N/A

---------

Co-authored-by: Amp <amp@ampcode.com>
2026-01-14 13:49:51 -05:00

74 lines
1.5 KiB
Rust

use crate::FeatureFlag;
pub struct NotebookFeatureFlag;
impl FeatureFlag for NotebookFeatureFlag {
const NAME: &'static str = "notebooks";
}
pub struct PanicFeatureFlag;
impl FeatureFlag for PanicFeatureFlag {
const NAME: &'static str = "panic";
}
pub struct AgentV2FeatureFlag;
impl FeatureFlag for AgentV2FeatureFlag {
const NAME: &'static str = "agent-v2";
}
pub struct AcpBetaFeatureFlag;
impl FeatureFlag for AcpBetaFeatureFlag {
const NAME: &'static str = "acp-beta";
}
pub struct ToolPermissionsFeatureFlag;
impl FeatureFlag for ToolPermissionsFeatureFlag {
const NAME: &'static str = "tool-permissions";
fn enabled_for_staff() -> bool {
false
}
}
pub struct AgentSharingFeatureFlag;
impl FeatureFlag for AgentSharingFeatureFlag {
const NAME: &'static str = "agent-sharing";
}
pub struct SubagentsFeatureFlag;
impl FeatureFlag for SubagentsFeatureFlag {
const NAME: &'static str = "subagents";
fn enabled_for_staff() -> bool {
true
}
}
pub struct DiffReviewFeatureFlag;
impl FeatureFlag for DiffReviewFeatureFlag {
const NAME: &'static str = "diff-review";
fn enabled_for_staff() -> bool {
false
}
}
/// Whether to use the OpenAI Responses API format when sending requests to Cloud.
pub struct OpenAiResponsesApiFeatureFlag;
impl FeatureFlag for OpenAiResponsesApiFeatureFlag {
const NAME: &'static str = "open-ai-responses-api";
fn enabled_for_staff() -> bool {
// Add yourself to the flag manually to test it out.
false
}
}