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:
@@ -5,7 +5,6 @@
|
||||
//!
|
||||
//! Separated into its own module so the two codepaths are easy to distinguish.
|
||||
|
||||
use pathfinder_geometry::vector::vec2f;
|
||||
use galaxy_core::features::FeatureFlag;
|
||||
use galaxyui::elements::{
|
||||
ChildAnchor, ChildView, Clipped, ConstrainedBox, Container, CrossAxisAlignment, Flex,
|
||||
@@ -13,6 +12,7 @@ use galaxyui::elements::{
|
||||
ParentOffsetBounds, Shrinkable, Stack,
|
||||
};
|
||||
use galaxyui::{Element, ViewHandle};
|
||||
use pathfinder_geometry::vector::vec2f;
|
||||
|
||||
use super::CodeReviewHeader;
|
||||
use crate::appearance::Appearance;
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
mod header_revamp;
|
||||
|
||||
use pathfinder_geometry::vector::vec2f;
|
||||
use galaxy_core::features::FeatureFlag;
|
||||
use galaxyui::elements::{
|
||||
Align, ChildAnchor, ChildView, Clipped, ConstrainedBox, Container, CrossAxisAlignment, Flex,
|
||||
@@ -13,6 +12,7 @@ use galaxyui::platform::Cursor;
|
||||
use galaxyui::ui_components::button::{ButtonVariant, TextAndIcon, TextAndIconAlignment};
|
||||
use galaxyui::ui_components::components::{Coords, UiComponent, UiComponentStyles};
|
||||
use galaxyui::{AppContext, Element, ModelHandle, ViewHandle};
|
||||
use pathfinder_geometry::vector::vec2f;
|
||||
|
||||
use crate::appearance::Appearance;
|
||||
use crate::code_review::code_review_view::{
|
||||
|
||||
@@ -6,6 +6,11 @@ use std::sync::Arc;
|
||||
use std::time::Duration;
|
||||
|
||||
use ai::project_context::model::ProjectContextModel;
|
||||
use galaxy_core::channel::{Channel, ChannelState};
|
||||
use galaxy_core::features::FeatureFlag;
|
||||
use galaxy_core::ui::theme::color::internal_colors;
|
||||
use galaxy_core::ui::theme::GalaxyTheme;
|
||||
use galaxy_core::{safe_error, safe_info, SessionId};
|
||||
use indexmap::IndexMap;
|
||||
use itertools::Itertools;
|
||||
#[cfg(feature = "local_fs")]
|
||||
@@ -16,10 +21,6 @@ use rand::distributions::Alphanumeric;
|
||||
use rand::Rng;
|
||||
use string_offset::CharOffset;
|
||||
use vec1::Vec1;
|
||||
use galaxy_core::channel::{Channel, ChannelState};
|
||||
use galaxy_core::features::FeatureFlag;
|
||||
use galaxy_core::ui::theme::color::internal_colors;
|
||||
use galaxy_core::{safe_error, safe_info, SessionId};
|
||||
use warp_editor::content::buffer::{AutoScrollBehavior, InitialBufferState, SelectionOffsets};
|
||||
use warp_editor::model::CoreEditorModel;
|
||||
use warp_editor::render::element::VerticalExpansionBehavior;
|
||||
@@ -65,6 +66,7 @@ use crate::ai::agent::{
|
||||
AIAgentAttachment, AgentReviewCommentBatch, CurrentHead, DiffBase, DiffSetHunk,
|
||||
};
|
||||
use crate::ai::blocklist::agent_view::AgentViewEntryOrigin;
|
||||
use crate::ai::persisted_workspace::{LspTask, PersistedWorkspace};
|
||||
use crate::appearance::Appearance;
|
||||
use crate::code::buffer_location::LocalOrRemotePath;
|
||||
use crate::code::editor::comment_editor::DEFAULT_COMMENT_MAX_WIDTH;
|
||||
@@ -921,7 +923,6 @@ impl CodeReviewView {
|
||||
server_type: Option<lsp::supported_servers::LSPServerType>,
|
||||
ctx: &mut ViewContext<Self>,
|
||||
) {
|
||||
|
||||
let server_type =
|
||||
server_type.or_else(|| lsp::LanguageId::from_path(path).map(|id| id.server_type()));
|
||||
let Some(server_type) = server_type else {
|
||||
@@ -5664,28 +5665,25 @@ impl CodeReviewView {
|
||||
ctx
|
||||
);
|
||||
}
|
||||
CodeEditorEvent::ContentChanged { origin, .. } => {
|
||||
if origin.from_user() {
|
||||
if let Some((view_handle, content_version)) = self.last_revert.take() {
|
||||
let same_content_version =
|
||||
content_version == editor.as_ref(ctx).version(ctx);
|
||||
CodeEditorEvent::ContentChanged { origin, .. } if origin.from_user() => {
|
||||
if let Some((view_handle, content_version)) = self.last_revert.take() {
|
||||
let same_content_version = content_version == editor.as_ref(ctx).version(ctx);
|
||||
|
||||
// If the revert was for a different editor or the content version is the same, keep the revert.
|
||||
if view_handle.id() != editor.id() || same_content_version {
|
||||
self.last_revert = Some((view_handle, content_version));
|
||||
} else {
|
||||
self.last_revert = None;
|
||||
self.dismiss_revert_toast(ctx);
|
||||
}
|
||||
// If the revert was for a different editor or the content version is the same, keep the revert.
|
||||
if view_handle.id() != editor.id() || same_content_version {
|
||||
self.last_revert = Some((view_handle, content_version));
|
||||
} else {
|
||||
self.last_revert = None;
|
||||
self.dismiss_revert_toast(ctx);
|
||||
}
|
||||
}
|
||||
|
||||
if self.find_model.as_ref(ctx).is_find_bar_open()
|
||||
&& FeatureFlag::CodeReviewFind.is_enabled()
|
||||
{
|
||||
self.find_model.update(ctx, |model, model_ctx| {
|
||||
model.run_search(self.editor_handles(), model_ctx);
|
||||
});
|
||||
}
|
||||
if self.find_model.as_ref(ctx).is_find_bar_open()
|
||||
&& FeatureFlag::CodeReviewFind.is_enabled()
|
||||
{
|
||||
self.find_model.update(ctx, |model, model_ctx| {
|
||||
model.run_search(self.editor_handles(), model_ctx);
|
||||
});
|
||||
}
|
||||
}
|
||||
_ => {}
|
||||
|
||||
@@ -3,10 +3,10 @@ use std::sync::Arc;
|
||||
|
||||
use ai::agent::action::InsertReviewComment;
|
||||
use chrono::Local;
|
||||
use lsp::LspManagerModel;
|
||||
use repo_metadata::repositories::DetectedRepositories;
|
||||
use galaxy_core::features::FeatureFlag;
|
||||
use galaxy_core::ui::appearance::Appearance;
|
||||
use lsp::LspManagerModel;
|
||||
use repo_metadata::repositories::DetectedRepositories;
|
||||
use warp_editor::content::buffer::InitialBufferState;
|
||||
use warp_editor::render::element::VerticalExpansionBehavior;
|
||||
use warp_editor::render::model::LineCount;
|
||||
|
||||
@@ -1,10 +1,5 @@
|
||||
use std::borrow::Cow;
|
||||
|
||||
use indexmap::IndexMap;
|
||||
use pathfinder_color::ColorU;
|
||||
use pathfinder_geometry::vector::vec2f;
|
||||
use string_offset::CharOffset;
|
||||
use vec1::vec1;
|
||||
use galaxy_core::features::FeatureFlag;
|
||||
use galaxy_core::ui::color::blend::Blend;
|
||||
use galaxy_core::ui::theme::color::internal_colors::{
|
||||
@@ -35,6 +30,11 @@ use galaxyui::{
|
||||
AppContext, Entity, EntityId, ModelHandle, SingletonEntity, TypedActionView, View, ViewContext,
|
||||
ViewHandle, WeakViewHandle,
|
||||
};
|
||||
use indexmap::IndexMap;
|
||||
use pathfinder_color::ColorU;
|
||||
use pathfinder_geometry::vector::vec2f;
|
||||
use string_offset::CharOffset;
|
||||
use vec1::vec1;
|
||||
|
||||
use crate::ai::request_usage_model::{AIRequestUsageModel, AIRequestUsageModelEvent};
|
||||
use crate::appearance::Appearance;
|
||||
|
||||
@@ -6,9 +6,9 @@
|
||||
use std::rc::Rc;
|
||||
|
||||
use chrono::{Duration, Local};
|
||||
use pathfinder_color::ColorU;
|
||||
use galaxy_core::ui::theme::color::internal_colors::{neutral_1, neutral_2, text_sub};
|
||||
use galaxy_core::ui::theme::Fill;
|
||||
use pathfinder_color::ColorU;
|
||||
use warp_editor::content::buffer::InitialBufferState;
|
||||
use warp_editor::render::element::VerticalExpansionBehavior;
|
||||
use warpui::elements::new_scrollable::ScrollableAppearance;
|
||||
|
||||
@@ -131,7 +131,7 @@ fn collect_pending_imported_thread_dfs<'a>(
|
||||
// Get children of this comment.
|
||||
if let Some(children) = children_map.get(comment.github_comment_id()) {
|
||||
let mut sorted_children = children.to_vec();
|
||||
sorted_children.sort_by(|a, b| a.last_update_time.cmp(&b.last_update_time));
|
||||
sorted_children.sort_by_key(|a| a.last_update_time);
|
||||
for child in sorted_children {
|
||||
collect_pending_imported_thread_dfs(child, children_map, result);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
//! Trigger button + [`CodeReviewDiffMenu`] overlay for picking the diff
|
||||
//! target in the code review header.
|
||||
use pathfinder_geometry::vector::vec2f;
|
||||
use galaxy_core::ui::theme::Fill;
|
||||
use galaxyui::elements::{
|
||||
ChildAnchor, ChildView, ConstrainedBox, Container, CornerRadius, CrossAxisAlignment, Element,
|
||||
@@ -17,6 +16,7 @@ use galaxyui::{
|
||||
id, AppContext, Entity, FocusContext, SingletonEntity as _, TypedActionView, View, ViewContext,
|
||||
ViewHandle,
|
||||
};
|
||||
use pathfinder_geometry::vector::vec2f;
|
||||
|
||||
use crate::appearance::Appearance;
|
||||
use crate::code_review::diff_menu::{CodeReviewDiffMenu, CodeReviewDiffMenuEvent};
|
||||
|
||||
@@ -10,8 +10,8 @@ use std::sync::Arc;
|
||||
use std::time::Duration;
|
||||
|
||||
use anyhow::Result;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use galaxy_core::SessionId;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use warp_util::remote_path::RemotePath;
|
||||
use warp_util::standardized_path::StandardizedPath;
|
||||
use warpui::{AppContext, ModelContext, ModelHandle};
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
|
||||
use std::sync::Arc;
|
||||
|
||||
use galaxy_core::{send_telemetry_from_ctx, HostId, SessionId};
|
||||
use instant::Instant;
|
||||
use remote_server::manager::{RemoteServerManager, RemoteServerManagerEvent};
|
||||
use galaxy_core::{send_telemetry_from_ctx, HostId, SessionId};
|
||||
use warp_util::remote_path::RemotePath;
|
||||
use warp_util::standardized_path::StandardizedPath;
|
||||
use warpui::{ModelContext, SingletonEntity};
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
use std::collections::HashMap;
|
||||
use std::ops::Range;
|
||||
|
||||
use string_offset::CharOffset;
|
||||
#[cfg(not(target_family = "wasm"))]
|
||||
use galaxy_core::channel::ChannelState;
|
||||
use galaxy_core::send_telemetry_from_ctx;
|
||||
@@ -12,6 +11,7 @@ use galaxy_editor::search::Searcher;
|
||||
use galaxy_editor::search::{RestorableSearchResults, SelectedResult};
|
||||
use galaxyui::r#async::SpawnedFutureHandle;
|
||||
use galaxyui::{AppContext, Entity, EntityId, ModelContext, ViewHandle, WeakViewHandle};
|
||||
use string_offset::CharOffset;
|
||||
|
||||
use crate::code::local_code_editor::LocalCodeEditorView;
|
||||
use crate::code_review::code_review_view::CodeReviewView;
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
use std::path::PathBuf;
|
||||
use std::sync::Arc;
|
||||
|
||||
use galaxy_core::ui::appearance::Appearance;
|
||||
use repo_metadata::repositories::DetectedRepositories;
|
||||
use string_offset::CharOffset;
|
||||
use galaxy_core::ui::appearance::Appearance;
|
||||
use warp_editor::content::buffer::InitialBufferState;
|
||||
use warp_editor::render::element::VerticalExpansionBehavior;
|
||||
use warpui::elements::Empty;
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
//! + confirm async, extend `GitDialogMode`, add the per-mode action and
|
||||
//! outcome variant, and wire up dispatch.
|
||||
|
||||
use pathfinder_geometry::vector::vec2f;
|
||||
use galaxy_core::features::FeatureFlag;
|
||||
use galaxy_core::send_telemetry_from_ctx;
|
||||
use galaxy_core::ui::appearance::Appearance;
|
||||
@@ -26,6 +25,7 @@ use galaxyui::{
|
||||
AppContext, Entity, FocusContext, ModelHandle, SingletonEntity, TypedActionView, View,
|
||||
ViewContext, ViewHandle,
|
||||
};
|
||||
use pathfinder_geometry::vector::vec2f;
|
||||
|
||||
use crate::code::buffer_location::LocalOrRemotePath;
|
||||
use crate::code::editor::{add_color, remove_color};
|
||||
|
||||
@@ -2,10 +2,10 @@ use std::path::{Path, PathBuf};
|
||||
use std::time::Duration;
|
||||
|
||||
use async_channel::Sender;
|
||||
use repo_metadata::repository::{RepositorySubscriber, SubscriberId};
|
||||
use repo_metadata::{Repository, RepositoryUpdate};
|
||||
use galaxyui::r#async::SpawnedFutureHandle;
|
||||
use galaxyui::{Entity, ModelContext, ModelHandle};
|
||||
use repo_metadata::repository::{RepositorySubscriber, SubscriberId};
|
||||
use repo_metadata::{Repository, RepositoryUpdate};
|
||||
|
||||
use super::{GitRepoStatusEvent, GitStatusMetadata};
|
||||
use crate::code_review::diff_state::diff_metadata_against_head;
|
||||
|
||||
@@ -24,12 +24,13 @@ pub(crate) mod diff_selector;
|
||||
#[cfg_attr(not(feature = "local_fs"), allow(dead_code))]
|
||||
pub(crate) mod file_invalidation_queue;
|
||||
|
||||
use std::path::{Path, PathBuf};
|
||||
|
||||
use code_review_view::CodeReviewAction;
|
||||
use galaxyui::keymap::{EditableBinding, FixedBinding};
|
||||
use galaxyui::{
|
||||
id, AppContext, Entity, EntityId, ModelContext, SingletonEntity, WeakViewHandle, WindowId,
|
||||
};
|
||||
use std::path::{Path, PathBuf};
|
||||
|
||||
use crate::code::buffer_location::LocalOrRemotePath;
|
||||
use crate::code_review::telemetry_event::CodeReviewPaneEntrypoint;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
use std::fmt::Display;
|
||||
use std::time::Duration;
|
||||
|
||||
use galaxy_core::telemetry::{EnablementState, TelemetryEvent, TelemetryEventDesc};
|
||||
use serde::Serialize;
|
||||
use serde_json::json;
|
||||
use serde_with::SerializeDisplay;
|
||||
|
||||
Reference in New Issue
Block a user