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
3 changes: 3 additions & 0 deletions app/src/ai/blocklist/agent_view/agent_input_footer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -813,6 +813,7 @@ impl AgentInputFooter {
}
}

<<<<<<< HEAD
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚨 [CRITICAL] Unresolved merge-conflict markers are committed here, so this file will not compile. Resolve the conflict and remove the markers before merging.

pub fn is_v2_environment_selector_open(&self, app: &AppContext) -> bool {
self.environment_selector
.as_ref()
Expand All @@ -825,6 +826,8 @@ impl AgentInputFooter {
}
}

=======
>>>>>>> b5e670ed (curr)
fn should_render_cloud_mode_v2(&self, app: &AppContext) -> bool {
FeatureFlag::CloudModeInputV2.is_enabled()
&& FeatureFlag::CloudMode.is_enabled()
Expand Down
3 changes: 3 additions & 0 deletions app/src/search/slash_command_menu/static_commands/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,14 @@ bitflags! {
/// Requires AI to be globally enabled.
const AI_ENABLED = 1 << 7;
const NOT_CLOUD_AGENT = 1 << 8;
<<<<<<< HEAD
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚨 [CRITICAL] Unresolved merge-conflict markers are committed here, so this file will not compile. Resolve the conflict and remove the markers before merging.

/// Set on the session context iff the slash command data source was constructed via
/// `SlashCommandDataSource::for_cloud_mode_v2` *and* `FeatureFlag::CloudModeInputV2`
/// is enabled. Commands that require this bit are hidden everywhere except the V2
/// cloud-mode composing input.
const CLOUD_AGENT_V2 = 1 << 9;
=======
>>>>>>> b5e670ed (curr)
}
}

Expand Down
68 changes: 68 additions & 0 deletions app/src/terminal/input/slash_commands/cloud_mode_v2_view.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use std::collections::{HashMap, HashSet};
use std::sync::LazyLock;

<<<<<<< HEAD
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚨 [CRITICAL] This file contains unresolved merge-conflict markers, so the Rust parser will fail before any of the new slash-command behavior can run. Resolve the conflict and remove every marker in this file.

use pathfinder_geometry::vector::vec2f;
use warp_core::ui::appearance::Appearance;
use warp_core::ui::theme::Fill;
Expand All @@ -10,14 +11,26 @@ use warpui::elements::{
Flex, Hoverable, MainAxisSize, MouseInBehavior, MouseStateHandle, OffsetPositioning,
ParentElement, PositionedElementAnchor, PositionedElementOffsetBounds, Radius, SavePosition,
ScrollTarget, ScrollToPositionMode, ScrollbarWidth, Stack, Text,
=======
use warp_core::ui::appearance::Appearance;
use warp_core::ui::theme::Fill;
use warpui::elements::{
Border, ClippedScrollStateHandle, ClippedScrollable, ConstrainedBox, Container, CornerRadius,
CrossAxisAlignment, DispatchEventResult, DropShadow, EventHandler, Flex, Hoverable,
MainAxisSize, MouseInBehavior, MouseStateHandle, ParentElement, Radius, SavePosition,
ScrollTarget, ScrollToPositionMode, ScrollbarWidth, Text,
>>>>>>> b5e670ed (curr)
};
use warpui::platform::Cursor;
use warpui::{
AppContext, Element, Entity, ModelHandle, SingletonEntity, TypedActionView, View, ViewContext,
};

use crate::search::data_source::QueryFilter;
<<<<<<< HEAD
use crate::search::item::SearchItemDetail;
=======
>>>>>>> b5e670ed (curr)
use crate::search::mixer::{AddAsyncSourceOptions, SearchMixer, SearchMixerEvent};
use crate::search::result_renderer::{QueryResultRenderer, QueryResultRendererStyles};
use crate::search::slash_command_menu::static_commands::commands::COMMAND_REGISTRY;
Expand Down Expand Up @@ -51,12 +64,16 @@ const MENU_CORNER_RADIUS: f32 = 6.;

const ROW_VERTICAL_PADDING: f32 = 4.;

<<<<<<< HEAD
const ICON_SIZE: f32 = 16.;

=======
>>>>>>> b5e670ed (curr)
const DIVIDER_HEIGHT: f32 = 1.;

const DIVIDER_VERTICAL_PADDING: f32 = 0.;

<<<<<<< HEAD
const SIDECAR_WIDTH: f32 = MENU_WIDTH;

const SIDECAR_MAX_HEIGHT: f32 = 240.;
Expand All @@ -69,10 +86,13 @@ const SIDECAR_TITLE_TO_DESCRIPTION_GAP: f32 = 4.;

const NAME_DESCRIPTION_GAP_PX: f32 = 8.;

=======
>>>>>>> b5e670ed (curr)
fn row_position_id(visible_idx: usize) -> String {
format!("cloud_mode_v2_slash_row_{visible_idx}")
}

<<<<<<< HEAD
fn item_is_truncated_in_row(detail: &SearchItemDetail, app: &AppContext) -> bool {
let appearance = Appearance::as_ref(app);
let font_size = inline_styles::font_size(appearance);
Expand All @@ -91,6 +111,8 @@ fn item_is_truncated_in_row(detail: &SearchItemDetail, app: &AppContext) -> bool
}
}

=======
>>>>>>> b5e670ed (curr)
static QUERY_RESULT_RENDERER_STYLES: LazyLock<QueryResultRendererStyles> =
LazyLock::new(|| QueryResultRendererStyles {
result_item_height_fn: |appearance| appearance.monospace_font_size() + 8.,
Expand Down Expand Up @@ -910,6 +932,7 @@ impl CloudModeV2SlashCommandView {
.with_vertical_padding(ROW_VERTICAL_PADDING)
.finish()
}
<<<<<<< HEAD

fn selected_detail_data(&self) -> Option<SearchItemDetail> {
match &self.menu_state {
Expand Down Expand Up @@ -1025,6 +1048,48 @@ impl CloudModeV2SlashCommandView {
}

fn render_menu_panel(&self, app: &AppContext) -> Box<dyn Element> {
=======
}

impl Entity for CloudModeV2SlashCommandView {
type Event = SlashCommandsEvent;
}

impl TypedActionView for CloudModeV2SlashCommandView {
type Action = CloudModeV2SlashCommandAction;

fn handle_action(&mut self, action: &Self::Action, ctx: &mut ViewContext<Self>) {
match action {
CloudModeV2SlashCommandAction::Accept {
item,
cmd_or_ctrl_enter,
} => {
self.emit_selection(item, *cmd_or_ctrl_enter, ctx);
}
CloudModeV2SlashCommandAction::HoverIdx(idx) => {
let idx = *idx;
match &self.menu_state {
MenuState::NoSearchActive { .. } => self.set_browsing_selection(idx, ctx),
MenuState::SearchActive { .. } => self.set_search_selection(idx, ctx),
}
}
CloudModeV2SlashCommandAction::ToggleSection(section) => {
self.toggle_section(*section, ctx);
}
CloudModeV2SlashCommandAction::Dismiss => {
self.dismiss(ctx);
}
}
}
}

impl View for CloudModeV2SlashCommandView {
fn ui_name() -> &'static str {
"CloudModeV2SlashCommandView"
}

fn render(&self, app: &AppContext) -> Box<dyn Element> {
>>>>>>> b5e670ed (curr)
let appearance = Appearance::as_ref(app);
let theme = appearance.theme();
let menu_bg = inline_styles::menu_background_color(app);
Expand Down Expand Up @@ -1093,6 +1158,7 @@ impl CloudModeV2SlashCommandView {
}
}

<<<<<<< HEAD
impl Entity for CloudModeV2SlashCommandView {
type Event = SlashCommandsEvent;
}
Expand Down Expand Up @@ -1151,6 +1217,8 @@ impl View for CloudModeV2SlashCommandView {
}
}

=======
>>>>>>> b5e670ed (curr)
fn render_section_header(section: Section, app: &AppContext) -> Box<dyn Element> {
let appearance = Appearance::as_ref(app);
let theme = appearance.theme();
Expand Down
3 changes: 3 additions & 0 deletions app/src/terminal/input/slash_commands/data_source/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -237,9 +237,12 @@ impl SlashCommandDataSource {
session_context |= Availability::AI_ENABLED;
}

<<<<<<< HEAD
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚨 [CRITICAL] Unresolved merge-conflict markers are committed here, so this file will not compile. Resolve the conflict and remove the markers before merging.

if self.is_cloud_mode_v2 && FeatureFlag::CloudModeInputV2.is_enabled() {
session_context |= Availability::CLOUD_AGENT_V2;
}
=======
>>>>>>> b5e670ed (curr)
if !self.is_cloud_mode_v2 {
session_context |= Availability::NOT_CLOUD_AGENT;
}
Expand Down
Loading