Fix cursor focus and selection in input box, add AWS env var warning box, and remove AWS Bedrock login banner

This commit is contained in:
2026-07-02 14:54:15 -05:00
parent 4770ac06b5
commit 3769646ca6
1194 changed files with 5312 additions and 8032 deletions
+7 -8
View File
@@ -1,9 +1,9 @@
use std::cell::RefCell;
use pathfinder_color::ColorU;
use pathfinder_geometry::vector::Vector2F;
use galaxy_core::ui::appearance::Appearance;
use galaxy_core::ui::theme::Fill;
use pathfinder_color::ColorU;
use pathfinder_geometry::vector::Vector2F;
use warp_editor::render::element::VerticalExpansionBehavior;
use warpui::elements::{
Border, ChildView, Clipped, ConstrainedBox, Container, CornerRadius, CrossAxisAlignment, Flex,
@@ -238,12 +238,11 @@ impl CommentEditor {
EditorViewEvent::CmdEnter => {
self.save_comment(ctx);
}
EditorViewEvent::EscapePressed => {
// Dismiss the comment composer when pressing Escape on an empty draft.
if self.editor.as_ref(ctx).model().as_ref(ctx).is_empty(ctx) {
self.reset(ctx);
ctx.emit(CommentEditorEvent::CloseEditor);
}
EditorViewEvent::EscapePressed
if self.editor.as_ref(ctx).model().as_ref(ctx).is_empty(ctx) =>
{
self.reset(ctx);
ctx.emit(CommentEditorEvent::CloseEditor);
}
_ => {}
}
+5 -11
View File
@@ -7,23 +7,17 @@ use std::rc::Rc;
use std::sync::Arc;
use futures::stream::AbortHandle;
use galaxy_core::ui::theme::Fill;
use galaxy_editor::{
content::{edit::TemporaryBlock, version::BufferVersion},
multiline::{AnyMultilineString, MultilineStr, MultilineString, LF},
render::model::{Decoration, LineCount, LineDecoration},
};
use galaxy_core::ui::theme::{AnsiColorIdentifier, Fill};
use galaxy_editor::content::edit::TemporaryBlock;
use galaxy_editor::content::version::BufferVersion;
use galaxy_editor::multiline::{AnyMultilineString, MultilineStr, MultilineString, LF};
use galaxy_editor::render::model::{Decoration, LineCount, LineDecoration};
use galaxyui::{Entity, ModelContext};
use itertools::Itertools;
use pathfinder_color::ColorU;
use rangemap::RangeMap;
use similar::{ChangeTag, DiffOp, TextDiff};
use string_offset::CharOffset;
use galaxy_core::ui::theme::{AnsiColorIdentifier, Fill};
use galaxy_editor::content::edit::TemporaryBlock;
use galaxy_editor::content::version::BufferVersion;
use galaxy_editor::multiline::{AnyMultilineString, MultilineStr, MultilineString, LF};
use galaxy_editor::render::model::{Decoration, LineCount, LineDecoration};
use super::super::DiffResult;
use crate::appearance::Appearance;
+1 -1
View File
@@ -1,6 +1,7 @@
use std::collections::HashMap;
use galaxy_editor::multiline::{MultilineStr, MultilineString};
use galaxyui::App;
use rangemap::RangeMap;
use unindent::Unindent as _;
@@ -9,7 +10,6 @@ use crate::code::editor::diff::ChangeType;
#[test]
fn test_diff_generation() {
use galaxyui::App;
App::test((), |_| async move {
let (change_mapping, deletion_mapping) = DiffModel::compute_diff_internal(
MultilineStr::try_new("Hello World\nThis is the second line.\nThis is the third.")
+19 -27
View File
@@ -3,11 +3,6 @@ use std::ops::Range;
use std::sync::atomic::{AtomicBool, Ordering};
use std::sync::Arc;
pub use gutter_button::{AddAsContextButton, CommentButton, RevertHunkButton};
use parking_lot::Mutex;
use pathfinder_color::ColorU;
use pathfinder_geometry::rect::RectF;
use pathfinder_geometry::vector::{vec2f, Vector2F};
use galaxy_core::features::FeatureFlag;
use galaxy_core::ui::appearance::Appearance;
use galaxy_core::ui::theme::color::internal_colors;
@@ -32,10 +27,11 @@ use galaxyui::{
AfterLayoutContext, AppContext, ClipBounds, Element, Event, EventContext, LayoutContext,
ModelHandle, PaintContext, SingletonEntity, SizeConstraint,
};
use pathfinder_geometry::{
rect::RectF,
vector::{vec2f, Vector2F},
};
pub use gutter_button::{AddAsContextButton, CommentButton, RevertHunkButton};
use parking_lot::Mutex;
use pathfinder_color::ColorU;
use pathfinder_geometry::rect::RectF;
use pathfinder_geometry::vector::{vec2f, Vector2F};
use super::diff::{DiffHunkDisplay, DiffStatus};
use super::model::DiffNavigationState;
@@ -1632,26 +1628,22 @@ impl<V: EditorView> Element for EditorWrapper<V> {
ctx.notify();
}
}
Some(Event::LeftMouseDown { position, .. }) => {
if !gutter_handled {
let in_bound = self
.gutter_element_range_containing_position(*position, false)
.is_some();
self.state_handle
.in_click
.store(in_bound, Ordering::Relaxed);
}
Some(Event::LeftMouseDown { position, .. }) if !gutter_handled => {
let in_bound = self
.gutter_element_range_containing_position(*position, false)
.is_some();
self.state_handle
.in_click
.store(in_bound, Ordering::Relaxed);
}
Some(Event::LeftMouseUp { position, .. }) => {
if !gutter_handled {
let was_clicking = self.state_handle.in_click.swap(false, Ordering::Relaxed);
Some(Event::LeftMouseUp { position, .. }) if !gutter_handled => {
let was_clicking = self.state_handle.in_click.swap(false, Ordering::Relaxed);
if was_clicking {
if let Some(gutter_range) =
self.gutter_element_range_containing_position(*position, false)
{
(self.click_handler)(gutter_range, ctx);
}
if was_clicking {
if let Some(gutter_range) =
self.gutter_element_range_containing_position(*position, false)
{
(self.click_handler)(gutter_range, ctx);
}
}
}
+3 -3
View File
@@ -7,9 +7,6 @@ use galaxy_editor::content::markdown::MarkdownStyle;
use galaxy_editor::editor::EmbeddedItemModel;
use galaxy_editor::render::element::{RenderContext, RenderableBlock};
use galaxy_editor::render::layout::TextLayout;
use pathfinder_geometry::vector::{vec2f, Vector2F};
use serde_yaml::Mapping;
use uuid::Uuid;
use galaxy_editor::render::model::viewport::ViewportItem;
use galaxy_editor::render::model::{
BlockSpacing, EmbeddedItem, EmbeddedItemHTMLRepresentation, EmbeddedItemRichFormat,
@@ -18,6 +15,9 @@ use galaxy_editor::render::model::{
use galaxyui::event::DispatchedEvent;
use galaxyui::units::Pixels;
use galaxyui::{AppContext, EntityId, EventContext, LayoutContext, ViewHandle, WindowId};
use pathfinder_geometry::vector::{vec2f, Vector2F};
use serde_yaml::Mapping;
use uuid::Uuid;
use crate::code::editor::comment_editor::CommentEditor;
use crate::code_review::comments::CommentId;
+3 -6
View File
@@ -4,7 +4,7 @@
use pathfinder_color::ColorU;
use warp_editor::editor::NavigationKey;
use warp_editor::search::{SearchEvent, Searcher};
pub use warpui::accessibility::{AccessibilityContent, WarpA11yRole};
pub use warpui::accessibility::{AccessibilityContent, GalaxyA11yRole};
use warpui::elements::{
Align, Border, ChildAnchor, Clipped, ConstrainedBox, Container, CornerRadius,
CrossAxisAlignment, DropShadow, Element, Flex, Hoverable, MainAxisAlignment, MouseStateHandle,
@@ -318,11 +318,8 @@ impl CodeEditorFind {
EditorEvent::Escape => {
self.close_find_bar(ctx);
}
EditorEvent::Navigate(NavigationKey::Tab) => {
// If replace editor is currently open and the user presses 'tab', focus on the find editor
if self.is_replace_open {
ctx.focus(&self.replace_editor);
}
EditorEvent::Navigate(NavigationKey::Tab) if self.is_replace_open => {
ctx.focus(&self.replace_editor);
}
_ => {}
}
+1 -1
View File
@@ -1,6 +1,6 @@
use galaxy_editor::render::model::{LineCount, RenderLineLocation};
use std::ops::Range;
use galaxy_editor::render::model::{LineCount, RenderLineLocation};
#[derive(Debug, Clone, PartialEq, Eq)]
pub enum EditorLineLocation {
+18 -18
View File
@@ -9,24 +9,6 @@ use std::sync::Arc;
use std::{cmp, mem};
use ai::diff_validation::DiffDelta;
use itertools::Itertools;
use languages::{language_by_filename, language_by_local_filename, language_by_name, Language};
use line_ending::LineEnding;
use num_traits::SaturatingSub;
use rangemap::{RangeMap, RangeSet};
use string_offset::CharOffset;
use syntax_tree::{ColorMap, DecorationStateEvent, SyntaxTreeState};
use vec1::{vec1, Vec1};
use vim::vim::{
BracketChar, CharacterMotion, Direction, FindCharMotion, FirstNonWhitespaceMotion,
InsertPosition, LineMotion, MotionType, TextObjectInclusion, TextObjectType, VimOperator,
VimTextObject, WordBound, WordMotion, WordType,
};
use vim::{
find_next_paragraph_end, find_previous_paragraph_start, vim_a_block, vim_a_paragraph,
vim_a_quote, vim_a_word, vim_find_char_on_line, vim_find_matching_bracket, vim_inner_block,
vim_inner_paragraph, vim_inner_quote, vim_inner_word, vim_word_iterator_from_offset,
};
use galaxy_core::platform::SessionPlatform;
use galaxy_core::semantic_selection::SemanticSelection;
use galaxy_core::ui::theme::Fill;
@@ -62,6 +44,24 @@ use galaxyui::text::point::Point;
use galaxyui::text::TextBuffer;
use galaxyui::units::{IntoPixels, Pixels};
use galaxyui::{AppContext, Entity, ModelContext, ModelHandle, SingletonEntity};
use itertools::Itertools;
use languages::{language_by_filename, language_by_local_filename, language_by_name, Language};
use line_ending::LineEnding;
use num_traits::SaturatingSub;
use rangemap::{RangeMap, RangeSet};
use string_offset::CharOffset;
use syntax_tree::{ColorMap, DecorationStateEvent, SyntaxTreeState};
use vec1::{vec1, Vec1};
use vim::vim::{
BracketChar, CharacterMotion, Direction, FindCharMotion, FirstNonWhitespaceMotion,
InsertPosition, LineMotion, MotionType, TextObjectInclusion, TextObjectType, VimOperator,
VimTextObject, WordBound, WordMotion, WordType,
};
use vim::{
find_next_paragraph_end, find_previous_paragraph_start, vim_a_block, vim_a_paragraph,
vim_a_quote, vim_a_word, vim_find_char_on_line, vim_find_matching_bracket, vim_inner_block,
vim_inner_paragraph, vim_inner_quote, vim_inner_word, vim_word_iterator_from_offset,
};
use super::super::DiffResult;
use super::comments::{EditorCommentsModel, PendingComment, PendingCommentEvent};
+2
View File
@@ -1,6 +1,8 @@
use std::path::Path;
use futures::channel::oneshot;
use galaxy_util::content_version::ContentVersion;
use galaxyui::App;
use vec1::vec1;
use super::*;
+7 -7
View File
@@ -7,13 +7,6 @@ use std::path::Path;
use std::rc::Rc;
use ai::diff_validation::DiffDelta;
use lazy_static::lazy_static;
use num_traits::SaturatingSub;
use pathfinder_geometry::vector::vec2f;
use settings::Setting as _;
use string_offset::CharOffset;
use vec1::{vec1, Vec1};
use vim::vim::{Direction, InsertPosition, VimMode, VimModel, VimState, VimSubscriber};
use galaxy_core::platform::SessionPlatform;
use galaxy_editor::content::buffer::{
Buffer, BufferEditAction, EditOrigin, InitialBufferState, ToBufferCharOffset as _,
@@ -52,6 +45,13 @@ use galaxyui::{
AppContext, BlurContext, CursorInfo, Element, Entity, FocusContext, ModelHandle,
SingletonEntity, View, ViewContext, ViewHandle, WeakViewHandle, WindowId,
};
use lazy_static::lazy_static;
use num_traits::SaturatingSub;
use pathfinder_geometry::vector::vec2f;
use settings::Setting as _;
use string_offset::CharOffset;
use vec1::{vec1, Vec1};
use vim::vim::{Direction, InsertPosition, VimMode, VimModel, VimState, VimSubscriber};
use crate::appearance::Appearance;
use crate::code::editor::comment_editor::{CommentEditor, CommentEditorEvent};
+3 -3
View File
@@ -5,9 +5,6 @@ use std::collections::{HashMap, HashSet};
use std::fmt::Debug;
use std::ops::Range;
use lazy_static::lazy_static;
use rangemap::RangeSet;
use string_offset::CharOffset;
use galaxy_editor::content::version::BufferVersion;
use galaxy_editor::editor::{EmbeddedItemModel, RunnableCommandModel, TextDecoration};
use galaxy_editor::model::{CoreEditorModel, PlainTextEditorModel};
@@ -21,6 +18,9 @@ use galaxyui::event::ModifiersState;
use galaxyui::keymap::{EditableBinding, FixedBinding, Keystroke, PerPlatformKeystroke};
use galaxyui::units::Pixels;
use galaxyui::{AppContext, TypedActionView, ViewContext, WeakViewHandle};
use lazy_static::lazy_static;
use rangemap::RangeSet;
use string_offset::CharOffset;
use crate::cmd_or_ctrl_shift;
use crate::code::editor::line::EditorLineLocation;
+5 -5
View File
@@ -1,8 +1,3 @@
use vim::vim::{
BracketChar, CharacterMotion, Direction, FindCharMotion, FirstNonWhitespaceMotion,
InsertPosition, LineMotion, ModeTransition, MotionType, TextObjectType, VimHandler, VimMode,
VimMotion, VimOperand, VimOperator, VimTextObject, WordMotion,
};
use galaxy_editor::content::buffer::{
AutoScrollBehavior, BufferEditAction, EditOrigin, SelectionOffsets, ToBufferCharOffset as _,
VimInsertPoint,
@@ -13,6 +8,11 @@ use galaxy_editor::selection::{TextDirection, TextUnit};
use galaxyui::text::point::Point;
use galaxyui::units::IntoPixels;
use galaxyui::{SingletonEntity, ViewContext};
use vim::vim::{
BracketChar, CharacterMotion, Direction, FindCharMotion, FirstNonWhitespaceMotion,
InsertPosition, LineMotion, ModeTransition, MotionType, TextObjectType, VimHandler, VimMode,
VimMotion, VimOperand, VimOperator, VimTextObject, WordMotion,
};
use super::{CodeEditorEvent, CodeEditorView};
use crate::code::editor::find::view::Event as FindViewEvent;
@@ -1,8 +1,5 @@
use std::sync::Arc;
use pathfinder_geometry::vector::Vector2F;
use unindent::Unindent;
use vim::vim::{MotionType, VimMode};
use galaxy_core::features::FeatureFlag;
use galaxy_core::settings::Setting;
use galaxy_core::ui::appearance::Appearance;
@@ -16,6 +13,9 @@ use galaxyui::platform::WindowStyle;
use galaxyui::text::point::Point;
use galaxyui::units::IntoPixels;
use galaxyui::{App, SingletonEntity, TypedActionView, UpdateModel, ViewHandle};
use pathfinder_geometry::vector::Vector2F;
use unindent::Unindent;
use vim::vim::{MotionType, VimMode};
use crate::auth::AuthStateProvider;
use crate::cloud_object::model::persistence::CloudModel;