diff --git a/app/Cargo.toml b/app/Cargo.toml index 1f90fcf3142..d7ab3ca078c 100644 --- a/app/Cargo.toml +++ b/app/Cargo.toml @@ -620,7 +620,6 @@ default = [ "ambient_agents_rtc", "cloud_mode", "cloud_mode_from_local_session", - "cloud_mode_image_context", "agent_mode_computer_use", "background_computer_use", "oz_platform_skills", @@ -976,7 +975,6 @@ classic_completions = [] native_shell_completions = [] cloud_mode = [] cloud_mode_from_local_session = [] -cloud_mode_image_context = [] force_classic_completions = [] agent_view_conversation_list_view = ["agent_view"] inline_history_menu = ["agent_view"] diff --git a/app/src/ai/blocklist/agent_view/agent_input_footer/mod.rs b/app/src/ai/blocklist/agent_view/agent_input_footer/mod.rs index af02ce7960d..8b7635f835d 100644 --- a/app/src/ai/blocklist/agent_view/agent_input_footer/mod.rs +++ b/app/src/ai/blocklist/agent_view/agent_input_footer/mod.rs @@ -2183,13 +2183,10 @@ impl AgentInputFooter { is_conversation_transcript_context: bool, app: &AppContext, ) -> Option> { - let is_cloud_mode = FeatureFlag::CloudModeImageContext.is_enabled() - && self - .ambient_agent_view_model - .as_ref() - .is_some_and(|ambient_agent_model| { - ambient_agent_model.as_ref(app).is_ambient_agent() - }); + let is_cloud_mode = self + .ambient_agent_view_model + .as_ref() + .is_some_and(|ambient_agent_model| ambient_agent_model.as_ref(app).is_ambient_agent()); if !item.available_in().is_available_for_agent_view() || !item.available_to_session_viewer(shared_status, is_cloud_mode) { diff --git a/app/src/ai/blocklist/controller/shared_session.rs b/app/src/ai/blocklist/controller/shared_session.rs index 958738e01b2..0d12bd687f3 100644 --- a/app/src/ai/blocklist/controller/shared_session.rs +++ b/app/src/ai/blocklist/controller/shared_session.rs @@ -723,8 +723,8 @@ impl BlocklistAIController { } }); - // If there are no file downloads (or the feature is disabled), send the query immediately. - if file_downloads.is_empty() || !FeatureFlag::CloudModeImageContext.is_enabled() { + // If there are no file downloads, send the query immediately. + if file_downloads.is_empty() { self.send_shared_session_query( prompt, conversation_id, diff --git a/app/src/features.rs b/app/src/features.rs index d3f907db7a3..1f52e27ecb5 100644 --- a/app/src/features.rs +++ b/app/src/features.rs @@ -389,8 +389,6 @@ fn enabled_features() -> HashSet { FeatureFlag::CloudMode, #[cfg(feature = "cloud_mode_from_local_session")] FeatureFlag::CloudModeFromLocalSession, - #[cfg(feature = "cloud_mode_image_context")] - FeatureFlag::CloudModeImageContext, #[cfg(feature = "summarization_via_message_replacement")] FeatureFlag::SummarizationViaMessageReplacement, #[cfg(feature = "pluggable_notifications")] diff --git a/app/src/terminal/input.rs b/app/src/terminal/input.rs index 9b8a9c07e29..2d169f6bd49 100644 --- a/app/src/terminal/input.rs +++ b/app/src/terminal/input.rs @@ -4509,11 +4509,6 @@ impl Input { ctx, ); } else { - if !pending_attachments.is_empty() { - log::warn!( - "Cannot upload cloud follow-up attachments: CloudModeImageContext is disabled" - ); - } ctx.emit(Event::SubmitCloudFollowup { prompt }); } } else { @@ -4543,7 +4538,7 @@ impl Input { } fn should_upload_cloud_followup_attachments(pending_attachments: &[PendingAttachment]) -> bool { - !pending_attachments.is_empty() && FeatureFlag::CloudModeImageContext.is_enabled() + !pending_attachments.is_empty() } /// Primary entry point for submitting the input buffer as an AI query. Routes to the correct @@ -4840,10 +4835,6 @@ impl Input { &self, ctx: &mut ViewContext, ) -> HandoffLaunchAttachments { - if !FeatureFlag::CloudModeImageContext.is_enabled() { - return HandoffLaunchAttachments::default(); - } - let mut request_attachments: Vec = self .ai_context_model .as_ref(ctx) @@ -11817,12 +11808,9 @@ impl Input { // Shared session viewers cannot attach images unless in cloud mode let is_viewer = self.model.lock().shared_session_status().is_viewer(); - let is_cloud_mode_with_images = FeatureFlag::CloudModeImageContext.is_enabled() - && self - .ambient_agent_view_model() - .is_some_and(|ambient_agent_model| { - ambient_agent_model.as_ref(ctx).is_ambient_agent() - }); + let is_cloud_mode_with_images = self + .ambient_agent_view_model() + .is_some_and(|ambient_agent_model| ambient_agent_model.as_ref(ctx).is_ambient_agent()); if is_viewer && !is_cloud_mode_with_images { self.insert_clipboard_text_content(ctx, content); return; @@ -11878,15 +11866,11 @@ impl Input { /// Check if we can attach on filepaths paste or drag-drop fn can_attach_on_filepaths_paste_or_dragdrop(&self, ctx: &mut ViewContext) -> bool { - // Shared session viewers cannot attach images unless in cloud mode - // with the CloudModeImageContext feature enabled. + // Shared session viewers cannot attach images unless in cloud mode. let is_viewer = self.model.lock().shared_session_status().is_viewer(); - let is_cloud_mode_with_images = FeatureFlag::CloudModeImageContext.is_enabled() - && self - .ambient_agent_view_model() - .is_some_and(|ambient_agent_model| { - ambient_agent_model.as_ref(ctx).is_ambient_agent() - }); + let is_cloud_mode_with_images = self + .ambient_agent_view_model() + .is_some_and(|ambient_agent_model| ambient_agent_model.as_ref(ctx).is_ambient_agent()); if is_viewer && !is_cloud_mode_with_images { return false; } @@ -15178,8 +15162,7 @@ impl Input { let ambient_agent_task_id = self .ambient_agent_view_model() .and_then(|ambient_agent_model| ambient_agent_model.as_ref(ctx).task_id()); - let has_uploads = (!images.is_empty() || !files.is_empty()) - && FeatureFlag::CloudModeImageContext.is_enabled(); + let has_uploads = !images.is_empty() || !files.is_empty(); if let Some(task_id) = ambient_agent_task_id.filter(|_| has_uploads) { // Upload files first, then send prompt with file references in callback diff --git a/app/src/terminal/input_tests.rs b/app/src/terminal/input_tests.rs index e2283bad68d..3b5847c0d2e 100644 --- a/app/src/terminal/input_tests.rs +++ b/app/src/terminal/input_tests.rs @@ -10176,7 +10176,7 @@ fn restore_cloud_followup_input_after_upload_failure_restores_prompt() { } #[test] -fn should_upload_cloud_followup_attachments_matches_cloud_mode_image_context_flag() { +fn should_upload_cloud_followup_attachments_reflects_pending_attachments() { use base64::Engine as _; let attachment = PendingAttachment::Image(ImageContext { @@ -10190,17 +10190,9 @@ fn should_upload_cloud_followup_attachments_matches_cloud_mode_image_context_fla !Input::should_upload_cloud_followup_attachments(&[]), "no pending attachments should submit the text-only follow-up immediately" ); - - let flag_guard = FeatureFlag::CloudModeImageContext.override_enabled(false); - assert!( - !Input::should_upload_cloud_followup_attachments(std::slice::from_ref(&attachment)), - "follow-up attachments should not upload while CloudModeImageContext is disabled" - ); - drop(flag_guard); - let _flag_guard = FeatureFlag::CloudModeImageContext.override_enabled(true); assert!( Input::should_upload_cloud_followup_attachments(&[attachment]), - "follow-up attachments should upload when CloudModeImageContext is enabled" + "follow-up attachments should upload when present" ); } diff --git a/app/src/terminal/view.rs b/app/src/terminal/view.rs index a73e7a85d55..dca665d1c5d 100644 --- a/app/src/terminal/view.rs +++ b/app/src/terminal/view.rs @@ -3035,8 +3035,8 @@ pub(crate) fn file_attach_allowed_for_shared_session( ambient_agent_view_model: Option<&ModelHandle>, ctx: &AppContext, ) -> bool { - let is_cloud_mode = FeatureFlag::CloudModeImageContext.is_enabled() - && ambient_agent_view_model.is_some_and(|model| model.as_ref(ctx).is_ambient_agent()); + let is_cloud_mode = + ambient_agent_view_model.is_some_and(|model| model.as_ref(ctx).is_ambient_agent()); AgentToolbarItemKind::FileAttach .available_to_session_viewer(shared_session_status, is_cloud_mode) } diff --git a/crates/warp_features/src/lib.rs b/crates/warp_features/src/lib.rs index 49e10d2ae9a..147a425786e 100644 --- a/crates/warp_features/src/lib.rs +++ b/crates/warp_features/src/lib.rs @@ -661,9 +661,6 @@ pub enum FeatureFlag { /// Enables image upload for ambient agents. AmbientAgentsImageUpload, - /// Enables image attachment support for cloud mode conversations. - CloudModeImageContext, - /// Enables loading and returning bundled skills in the SkillManager. BundledSkills,