Major features: - Auto-compact: triggers conversation summarization when context window >= 85%, compacts Bedrock message history to a summary pair, and tracks live context tokens - Bedrock summarization: plumbs `is_summarization` flag through translator/client/response pipeline, handles SummarizeConversation input type, and marks `summarized` in metadata - Session restore: rebuilds bedrock_message_history from persisted task messages via newly-public `convert_proto_message`, preventing empty history on reconnect - Subagent orchestration: adds SubagentQuestion/Answer/CompletionSummary event types, parent-child question routing with depth limits, retry counting, and drain methods - Summarization UI: inline SummarizationView in AI blocks with progress/finished states Refactors: - Rename WarpTheme → GalaxyTheme across ~100 files (rebrand continuation) - Rename warp_home_config_dir → galaxy_home_config_dir and related path functions - Predefined rules: replace "System Defined Rule #N" with descriptive names (e.g. "Correctness Over Speed", "Never Guess") and add lookup helpers - Usage view: replace cumulative input/output token display with live context tokens, cache hit rate calculation, and separate cache read/write stats - Telemetry: remove verbose doc comments, simplify trait definitions - Facts view: simplify delete permission check (always allow local deletion) - Remove warp_managed_paths_watcher.rs (dead code) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
120 lines
3.3 KiB
Rust
120 lines
3.3 KiB
Rust
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<Keystroke> = 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<Fill> {
|
|
None
|
|
}
|
|
|
|
fn text_color(
|
|
&self,
|
|
hovered: bool,
|
|
background: Option<Fill>,
|
|
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<Properties> {
|
|
Some(Properties::default())
|
|
}
|
|
|
|
fn keyboard_shortcut_background(&self, appearance: &Appearance) -> Option<ColorU> {
|
|
Some(appearance.theme().surface_overlay_2().into_solid())
|
|
}
|
|
}
|
|
|
|
pub struct AgentViewHeaderDisabledTheme;
|
|
|
|
impl ActionButtonTheme for AgentViewHeaderDisabledTheme {
|
|
fn background(&self, _: bool, _: &Appearance) -> Option<Fill> {
|
|
None
|
|
}
|
|
|
|
fn text_color(&self, _: bool, background: Option<Fill>, appearance: &Appearance) -> ColorU {
|
|
appearance
|
|
.theme()
|
|
.disabled_text_color(background.unwrap_or(appearance.theme().background()))
|
|
.into_solid()
|
|
}
|
|
|
|
fn keyboard_shortcut_background(&self, _: &Appearance) -> Option<ColorU> {
|
|
None
|
|
}
|
|
|
|
fn font_properties(&self) -> Option<Properties> {
|
|
Some(Properties::default())
|
|
}
|
|
}
|