Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions app/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,7 @@ default = [
"agent_mode_pre_plan_xml",
"command_correction_key",
"kitty_images",
"iterm_images",
"grep_tool",
"validate_autosuggestions",
"clear_autosuggestion_on_escape",
Expand Down
8 changes: 2 additions & 6 deletions app/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ fn main() -> Result<()> {
let target_family = env::var("CARGO_CFG_TARGET_FAMILY")?;
let target_env = env::var("CARGO_CFG_TARGET_ENV")?;

add_features(&target_family, &target_os);
add_features(&target_family);

if target_os == "macos" && target_family != "wasm" {
println!("cargo:rustc-link-lib=framework=MetalKit");
Expand Down Expand Up @@ -233,16 +233,12 @@ fn get_build_profile_name() -> String {
.to_string()
}

fn add_features(target_family: &str, target_os: &str) {
fn add_features(target_family: &str) {
if target_family != "wasm" {
println!("cargo:rustc-cfg=feature=\"local_fs\"");
println!("cargo:rustc-cfg=feature=\"local_tty\"");
}

if target_os != "windows" {
println!("cargo:rustc-cfg=feature=\"iterm_images\"");
}

if env::var("PROFILE").ok().is_some_and(|val| val == "debug") {
println!("cargo:rustc-cfg=feature=\"agent_mode_debug\"");
}
Expand Down
2 changes: 1 addition & 1 deletion app/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2363,7 +2363,7 @@ pub fn enabled_features() -> HashSet<FeatureFlag> {
FeatureFlag::ImeMarkedText,
#[cfg(feature = "partial_next_command_suggestions")]
FeatureFlag::PartialNextCommandSuggestions,
#[cfg(feature = "iterm_images")]
#[cfg(all(not(windows), feature = "iterm_images"))]
FeatureFlag::ITermImages,
#[cfg(feature = "validate_autosuggestions")]
FeatureFlag::ValidateAutosuggestions,
Expand Down
14 changes: 14 additions & 0 deletions app/src/terminal/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,13 @@ pub enum Event {
image_data: Vec<u8>,
image_protocol: ImageProtocol,
},
/// The animation frames of a kitty image changed (`a=f`/`a=a`). The frames
/// follow frame 1, which is the already-received image itself; an empty list
/// means the animation is stopped.
AnimatedImageReceived {
image_id: u32,
frames: Vec<(Vec<u8>, u32)>,
},
BootstrapPrecmdDone,
/// A pluggable notification triggered via OSC 9 or OSC 777 escape sequences.
/// External programs can use this to trigger notifications in Zap.
Expand Down Expand Up @@ -480,6 +487,13 @@ impl Debug for Event {
Event::ImageReceived { image_id, .. } => {
write!(f, "ImageReceived(image_id: {image_id})")
}
Event::AnimatedImageReceived { image_id, frames } => {
write!(
f,
"AnimatedImageReceived(image_id: {image_id}, frames: {})",
frames.len()
)
}
Event::BootstrapPrecmdDone => write!(f, "BootstrapPrecmdDone"),
Event::PluggableNotification { title, body } => {
write!(f, "PluggableNotification(title: {title:?}, body: {body})")
Expand Down
Loading