first pass of merging in warp (doesn't build)
This commit is contained in:
@@ -1,29 +1,28 @@
|
||||
use std::iter;
|
||||
use std::path::Path;
|
||||
|
||||
use galaxy_core::ui::theme::Fill;
|
||||
use warpui::elements::{
|
||||
Border, ChildView, ConstrainedBox, Container, CornerRadius, CrossAxisAlignment, Empty,
|
||||
Expanded, Flex, HighlightedRange, MainAxisAlignment, MainAxisSize, MouseStateHandle,
|
||||
ParentElement, Radius, Shrinkable, Text,
|
||||
};
|
||||
use warpui::ui_components::components::UiComponent;
|
||||
use warpui::{AppContext, Element, EventContext, SingletonEntity, ViewHandle};
|
||||
|
||||
use crate::ai::agent::ProgrammingLanguage;
|
||||
use crate::ai::blocklist::inline_action::inline_action_header::{
|
||||
INLINE_ACTION_HEADER_VERTICAL_PADDING, INLINE_ACTION_HORIZONTAL_PADDING,
|
||||
};
|
||||
use crate::ai::blocklist::inline_action::inline_action_icons::icon_size;
|
||||
use crate::appearance::Appearance;
|
||||
use crate::code::editor::view::CodeEditorView;
|
||||
use crate::code::editor_management::CodeSource;
|
||||
use crate::search::files::icon::icon_from_file_path;
|
||||
use crate::search::ItemHighlightState;
|
||||
use galaxy_core::ui::theme::Fill;
|
||||
use galaxyui::elements::{ChildView, HighlightedRange, MouseStateHandle};
|
||||
use galaxyui::{
|
||||
elements::{
|
||||
Border, ConstrainedBox, Container, CornerRadius, CrossAxisAlignment, Empty, Expanded, Flex,
|
||||
MainAxisAlignment, MainAxisSize, ParentElement, Radius, Shrinkable, Text,
|
||||
},
|
||||
ui_components::components::UiComponent,
|
||||
AppContext, Element, SingletonEntity,
|
||||
};
|
||||
use galaxyui::{EventContext, ViewHandle};
|
||||
use std::iter;
|
||||
|
||||
use crate::code::editor::view::CodeEditorView;
|
||||
use crate::ui_components::blended_colors;
|
||||
use crate::ui_components::buttons::icon_button;
|
||||
use crate::{ai::agent::ProgrammingLanguage, ui_components::buttons::icon_button_with_color};
|
||||
use crate::{appearance::Appearance, ui_components::icons::Icon};
|
||||
use std::path::Path;
|
||||
use crate::ui_components::buttons::{icon_button, icon_button_with_color};
|
||||
use crate::ui_components::icons::Icon;
|
||||
|
||||
const CODE_BLOCK_CORNER_RADIUS: f32 = 8.0;
|
||||
|
||||
@@ -118,6 +117,7 @@ pub fn render_code_block_plain(
|
||||
code: &str,
|
||||
find_highlight_ranges: impl Iterator<Item = HighlightedRange>,
|
||||
options: CodeBlockOptions,
|
||||
selectable: bool,
|
||||
app: &AppContext,
|
||||
source: Option<CodeSource>,
|
||||
) -> Box<dyn Element> {
|
||||
@@ -131,7 +131,7 @@ pub fn render_code_block_plain(
|
||||
)
|
||||
.with_color(blended_colors::text_main(theme, theme.surface_1()))
|
||||
.with_highlights(find_highlight_ranges)
|
||||
.with_selectable(true)
|
||||
.with_selectable(selectable)
|
||||
.finish();
|
||||
|
||||
render_code_block_internal(code, code_element, options, app, source, false)
|
||||
@@ -171,6 +171,7 @@ pub fn render_runnable_code_snippet(
|
||||
mouse_handles,
|
||||
file_path: None,
|
||||
},
|
||||
true,
|
||||
app,
|
||||
None,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user