pub(crate) mod agent_input_footer; mod agent_message_bar; mod agent_view_block; pub mod child_agent_status_card; mod controller; mod ephemeral_message_model; mod inline_agent_view_header; // TODO: Move orchestration_conversation_links module import elsewhere. pub(crate) mod orchestration_conversation_links; pub mod shortcuts; pub(crate) mod subagent_inline_panel; mod zero_state_block; pub use agent_input_footer::*; pub use agent_message_bar::*; pub use agent_view_block::*; pub use controller::*; pub use ephemeral_message_model::*; use galaxyui::fonts::Properties; pub use inline_agent_view_header::*; pub use zero_state_block::*; use std::sync::LazyLock; use galaxy_core::ui::theme::Fill; use galaxy_core::ui::{appearance::Appearance, color::blend::Blend}; use galaxyui::keymap::Keystroke; use galaxyui::{AppContext, SingletonEntity}; use pathfinder_color::ColorU; use crate::view_components::action_button::ActionButtonTheme; pub static ENTER_AGENT_VIEW_NEW_CONVERSATION_KEYSTROKE: LazyLock = LazyLock::new(|| { cfg_if::cfg_if! { if #[cfg(target_os = "macos")] { Keystroke { cmd: true, key: "enter".to_owned(), ..Default::default() } } else { Keystroke { ctrl: true, shift: true, key: "enter".to_owned(), ..Default::default() } } } }); pub fn agent_view_bg_fill(app: &AppContext) -> Fill { let appearance = Appearance::as_ref(app); appearance.theme().surface_overlay_1() } pub fn agent_view_bg_color(app: &AppContext) -> ColorU { agent_view_bg_fill(app) .blend(&Appearance::as_ref(app).theme().background()) .into_solid() } pub struct AgentViewHeaderTheme; impl ActionButtonTheme for AgentViewHeaderTheme { fn background(&self, _: bool, _: &Appearance) -> Option { None } fn text_color( &self, hovered: bool, background: Option, appearance: &Appearance, ) -> ColorU { if hovered { appearance .theme() .main_text_color(background.unwrap_or(appearance.theme().background())) .into_solid() } else { appearance .theme() .sub_text_color(background.unwrap_or(appearance.theme().background())) .into_solid() } } fn font_properties(&self) -> Option { Some(Properties::default()) } fn keyboard_shortcut_background(&self, appearance: &Appearance) -> Option { Some(appearance.theme().surface_overlay_2().into_solid()) } } pub struct AgentViewHeaderDisabledTheme; impl ActionButtonTheme for AgentViewHeaderDisabledTheme { fn background(&self, _: bool, _: &Appearance) -> Option { None } fn text_color(&self, _: bool, background: Option, appearance: &Appearance) -> ColorU { appearance .theme() .disabled_text_color(background.unwrap_or(appearance.theme().background())) .into_solid() } fn keyboard_shortcut_background(&self, _: &Appearance) -> Option { None } fn font_properties(&self) -> Option { Some(Properties::default()) } }