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:
@@ -1,7 +1,7 @@
|
||||
use std::sync::Arc;
|
||||
|
||||
use smol_str::SmolStr;
|
||||
use galaxy_completer::parsers::simple::all_parsed_commands;
|
||||
use smol_str::SmolStr;
|
||||
|
||||
use crate::terminal::model::session::Session;
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
use std::ops::{Deref as _, Range};
|
||||
use std::sync::Arc;
|
||||
|
||||
use galaxy_core::features::FeatureFlag;
|
||||
use num_traits::Float as _;
|
||||
use parking_lot::FairMutex;
|
||||
use pathfinder_geometry::vector::vec2f;
|
||||
use vec1::Vec1;
|
||||
use galaxy_core::features::FeatureFlag;
|
||||
use warp_util::user_input::UserInput;
|
||||
use warpui::elements::new_scrollable::{NewScrollableElement, ScrollableAxis};
|
||||
use warpui::elements::{Axis, Point as UiPoint, ScrollData, ScrollableElement};
|
||||
@@ -960,21 +960,17 @@ impl Element for AltScreenElement {
|
||||
selected_range,
|
||||
} => self.set_marked_text(marked_text, selected_range, ctx),
|
||||
Event::ClearMarkedText => self.clear_marked_text(ctx),
|
||||
Event::ModifierKeyChanged { key_code, state } => {
|
||||
if self.is_terminal_focused {
|
||||
let is_press = matches!(state, KeyState::Pressed);
|
||||
if let Some(escape_sequence) = maybe_kitty_keyboard_escape_sequence(
|
||||
self.model.lock().deref(),
|
||||
key_code,
|
||||
is_press,
|
||||
) {
|
||||
ctx.dispatch_typed_action(TerminalAction::ControlSequence(escape_sequence));
|
||||
return true;
|
||||
}
|
||||
self.maybe_handle_voice_toggle(key_code, state, ctx)
|
||||
} else {
|
||||
false
|
||||
Event::ModifierKeyChanged { key_code, state } if self.is_terminal_focused => {
|
||||
let is_press = matches!(state, KeyState::Pressed);
|
||||
if let Some(escape_sequence) = maybe_kitty_keyboard_escape_sequence(
|
||||
self.model.lock().deref(),
|
||||
key_code,
|
||||
is_press,
|
||||
) {
|
||||
ctx.dispatch_typed_action(TerminalAction::ControlSequence(escape_sequence));
|
||||
return true;
|
||||
}
|
||||
self.maybe_handle_voice_toggle(key_code, state, ctx)
|
||||
}
|
||||
_ => false,
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
use settings::macros::define_settings_group;
|
||||
use settings::{RespectUserSyncSetting, SupportedPlatforms, SyncToCloud};
|
||||
use settings::{RespectUserSyncSetting, Setting, SupportedPlatforms, SyncToCloud};
|
||||
|
||||
define_settings_group!(AltScreenReporting, settings: [
|
||||
mouse_reporting_enabled: MouseReportingEnabled {
|
||||
|
||||
@@ -6,16 +6,19 @@ use std::path::Path;
|
||||
use std::path::PathBuf;
|
||||
use std::sync::Arc;
|
||||
|
||||
use galaxy_core::features::FeatureFlag;
|
||||
#[cfg(feature = "local_tty")]
|
||||
use galaxyui::{AppContext, ModelContext};
|
||||
use galaxyui::{Entity, SingletonEntity};
|
||||
#[cfg(feature = "local_tty")]
|
||||
use settings::Setting as _;
|
||||
|
||||
use super::session_settings::{NewSessionShell, StartupShell};
|
||||
use super::session_settings::{NewSessionShell, SessionSettings, StartupShell};
|
||||
use super::shell::ShellType;
|
||||
use super::ShellLaunchData;
|
||||
#[cfg(feature = "local_tty")]
|
||||
use crate::terminal::local_tty::shell::supported_shell_path_and_type;
|
||||
#[cfg(feature = "local_tty")]
|
||||
use crate::util::path::file_exists_and_is_executable;
|
||||
|
||||
#[derive(Debug, PartialEq, Eq, Hash)]
|
||||
@@ -621,7 +624,6 @@ impl AvailableShells {
|
||||
paths_to_search: &[PathBuf],
|
||||
fallback_path: Option<&Path>,
|
||||
) -> Vec<AvailableShell> {
|
||||
|
||||
if !FeatureFlag::ShellSelector.is_enabled() {
|
||||
return vec![
|
||||
StartupShell::Zsh,
|
||||
@@ -718,7 +720,6 @@ impl AvailableShells {
|
||||
fn locate_msys2_executables() -> Vec<PathBuf> {
|
||||
use std::env;
|
||||
|
||||
|
||||
let mut paths = Vec::new();
|
||||
|
||||
// We look for Git Bash at `$env:LocalAppData\Programs\Git\usr\bin`.
|
||||
@@ -856,7 +857,6 @@ impl AvailableShells {
|
||||
}
|
||||
|
||||
fn get_user_preferred_shell_setting(&self, ctx: &AppContext) -> NewSessionShell {
|
||||
|
||||
let new_session_shell_override = SessionSettings::as_ref(ctx)
|
||||
.new_session_shell_override
|
||||
.to_owned();
|
||||
@@ -872,7 +872,6 @@ impl AvailableShells {
|
||||
}
|
||||
|
||||
fn get_user_preferred_shell_setting_fallback(&self, ctx: &AppContext) -> NewSessionShell {
|
||||
|
||||
let startup_shell = SessionSettings::as_ref(ctx)
|
||||
.startup_shell_override
|
||||
.to_owned();
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
use pathfinder_color::ColorU;
|
||||
use pathfinder_geometry::vector::vec2f;
|
||||
use regex_automata::hybrid::BuildError;
|
||||
use galaxy_editor::editor::NavigationKey;
|
||||
use galaxyui::accessibility::{AccessibilityContent, WarpA11yRole};
|
||||
use galaxyui::accessibility::{AccessibilityContent, GalaxyA11yRole};
|
||||
use galaxyui::elements::{
|
||||
Align, Border, ChildAnchor, Clipped, ConstrainedBox, Container, CornerRadius,
|
||||
CrossAxisAlignment, Dash, Dismiss, DropShadow, Empty, Flex, Hoverable, MouseStateHandle,
|
||||
@@ -15,6 +12,9 @@ use galaxyui::{
|
||||
AppContext, Element, Entity, FocusContext, SingletonEntity, TypedActionView, View, ViewContext,
|
||||
ViewHandle,
|
||||
};
|
||||
use pathfinder_color::ColorU;
|
||||
use pathfinder_geometry::vector::vec2f;
|
||||
use regex_automata::hybrid::BuildError;
|
||||
|
||||
use super::model::find::{FindConfig, RegexDFAs};
|
||||
use crate::appearance::Appearance;
|
||||
|
||||
@@ -7,14 +7,9 @@ use std::sync::atomic::{AtomicBool, Ordering};
|
||||
use std::sync::{Arc, Mutex, MutexGuard};
|
||||
|
||||
use enum_iterator::Sequence;
|
||||
use itertools::Itertools;
|
||||
use parking_lot::FairMutex;
|
||||
use pathfinder_color::ColorU;
|
||||
use session_sharing_protocol::common::{ParticipantId, Selection};
|
||||
use vec1::Vec1;
|
||||
use galaxy_core::semantic_selection::SemanticSelection;
|
||||
use galaxy_core::ui::builder::UiBuilder;
|
||||
use galaxy_core::ui::theme::AnsiColorIdentifier;
|
||||
use galaxy_core::ui::theme::{AnsiColorIdentifier, GalaxyTheme};
|
||||
use galaxy_util::user_input::UserInput;
|
||||
use galaxyui::elements::new_scrollable::{NewScrollableElement, ScrollableAxis};
|
||||
use galaxyui::elements::{
|
||||
@@ -36,6 +31,11 @@ use galaxyui::{
|
||||
AfterLayoutContext, AppContext, ClipBounds, Element, EntityId, Event, EventContext,
|
||||
LayoutContext, ModelHandle, PaintContext, SingletonEntity as _, SizeConstraint,
|
||||
};
|
||||
use itertools::Itertools;
|
||||
use parking_lot::FairMutex;
|
||||
use pathfinder_color::ColorU;
|
||||
use session_sharing_protocol::common::{ParticipantId, Selection};
|
||||
use vec1::Vec1;
|
||||
|
||||
use super::block_list_viewport::{ClampingMode, InputMode, ScrollPosition, ViewportState};
|
||||
use super::blockgrid_renderer::GridRenderParams;
|
||||
@@ -1936,9 +1936,7 @@ impl BlockListElement {
|
||||
ctx: &mut EventContext,
|
||||
app: &AppContext,
|
||||
) -> bool {
|
||||
if self.is_terminal_selecting && self.bounds.is_some() {
|
||||
let bounds = self.bounds.unwrap();
|
||||
|
||||
if let (true, Some(bounds)) = (self.is_terminal_selecting, self.bounds) {
|
||||
let snackbar_height = self
|
||||
.snackbar_header_state()
|
||||
.header_rect()
|
||||
@@ -3069,7 +3067,6 @@ impl BlockListElement {
|
||||
state: &KeyState,
|
||||
ctx: &mut EventContext,
|
||||
) -> bool {
|
||||
|
||||
if let Some(voice_input_toggle_key_code) = self.voice_input_toggle_key_code {
|
||||
if *key_code == voice_input_toggle_key_code {
|
||||
ctx.dispatch_typed_action(TerminalAction::ToggleCLIAgentVoiceInput(
|
||||
@@ -4611,21 +4608,17 @@ impl Element for BlockListElement {
|
||||
selected_range,
|
||||
} => self.set_marked_text(marked_text, selected_range, ctx),
|
||||
Event::ClearMarkedText => self.clear_marked_text(ctx),
|
||||
Event::ModifierKeyChanged { key_code, state } => {
|
||||
if self.is_terminal_focused {
|
||||
let is_press = matches!(state, KeyState::Pressed);
|
||||
if let Some(escape_sequence) = maybe_kitty_keyboard_escape_sequence(
|
||||
self.model.lock().deref(),
|
||||
key_code,
|
||||
is_press,
|
||||
) {
|
||||
ctx.dispatch_typed_action(TerminalAction::ControlSequence(escape_sequence));
|
||||
return true;
|
||||
}
|
||||
self.maybe_handle_voice_toggle(key_code, state, ctx)
|
||||
} else {
|
||||
false
|
||||
Event::ModifierKeyChanged { key_code, state } if self.is_terminal_focused => {
|
||||
let is_press = matches!(state, KeyState::Pressed);
|
||||
if let Some(escape_sequence) = maybe_kitty_keyboard_escape_sequence(
|
||||
self.model.lock().deref(),
|
||||
key_code,
|
||||
is_press,
|
||||
) {
|
||||
ctx.dispatch_typed_action(TerminalAction::ControlSequence(escape_sequence));
|
||||
return true;
|
||||
}
|
||||
self.maybe_handle_voice_toggle(key_code, state, ctx)
|
||||
}
|
||||
_ => false,
|
||||
};
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
use settings::macros::define_settings_group;
|
||||
use settings::{RespectUserSyncSetting, SupportedPlatforms, SyncToCloud};
|
||||
use settings::{RespectUserSyncSetting, Setting, SupportedPlatforms, SyncToCloud};
|
||||
|
||||
// Settings for controlling the behavior of the block list.
|
||||
define_settings_group!(BlockListSettings, settings: [
|
||||
|
||||
@@ -2,13 +2,13 @@ use std::ops::Range;
|
||||
use std::rc::Rc;
|
||||
use std::sync::MutexGuard;
|
||||
|
||||
use pathfinder_geometry::vector::Vector2F;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use sum_tree::{Cursor, SeekBias};
|
||||
use galaxy_core::features::FeatureFlag;
|
||||
use galaxyui::elements::ClippedScrollStateHandle;
|
||||
use galaxyui::units::{IntoLines, IntoPixels, Lines, Pixels};
|
||||
use galaxyui::{AppContext, ModelHandle};
|
||||
use pathfinder_geometry::vector::Vector2F;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use sum_tree::{Cursor, SeekBias};
|
||||
|
||||
use super::block_list_element::{
|
||||
GridType, SnackbarHeader, SnackbarHeaderState, SnackbarPoint, VisibleItem,
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
use pathfinder_geometry::vector::{vec2f, Vector2F};
|
||||
use galaxyui::elements::{
|
||||
AfterLayoutContext, AppContext, Element, EventContext, LayoutContext, PaintContext, Point,
|
||||
SizeConstraint,
|
||||
};
|
||||
use galaxyui::event::DispatchedEvent;
|
||||
use galaxyui::geometry::rect::RectF;
|
||||
use pathfinder_geometry::vector::{vec2f, Vector2F};
|
||||
|
||||
use super::blockgrid_renderer::GridRenderParams;
|
||||
use crate::appearance::Appearance;
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
use std::collections::HashMap;
|
||||
use std::ops::{Neg, RangeInclusive};
|
||||
|
||||
use pathfinder_color::ColorU;
|
||||
use galaxyui::fonts::{FamilyId, Properties, Weight};
|
||||
use galaxyui::geometry::rect::RectF;
|
||||
use galaxyui::geometry::vector::{vec2f, Vector2F};
|
||||
use galaxyui::{AppContext, Element, EntityId, PaintContext};
|
||||
use pathfinder_color::ColorU;
|
||||
|
||||
use super::model::ansi::{CursorShape, CursorStyle};
|
||||
use super::model::grid::RespectDisplayedOutput;
|
||||
@@ -18,7 +18,7 @@ use crate::terminal::model::grid::grid_handler::Link;
|
||||
use crate::terminal::model::index::Point;
|
||||
use crate::terminal::model::ObfuscateSecrets;
|
||||
use crate::terminal::{color, SizeInfo};
|
||||
use crate::themes::theme::WarpTheme;
|
||||
use crate::themes::theme::GalaxyTheme;
|
||||
|
||||
pub struct GridRenderParams {
|
||||
pub warp_theme: GalaxyTheme,
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
use std::borrow::Cow;
|
||||
|
||||
use galaxy_core::session_id::SessionId;
|
||||
use galaxyui::{AppContext, AssetProvider, SingletonEntity};
|
||||
use itertools::Itertools;
|
||||
use lazy_static::lazy_static;
|
||||
use memo_map::MemoMap;
|
||||
use rand::Rng;
|
||||
use galaxy_core::session_id::SessionId;
|
||||
|
||||
#[cfg(feature = "local_fs")]
|
||||
use super::{
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
use std::sync::Arc;
|
||||
|
||||
use enclose::enclose;
|
||||
use itertools::Itertools as _;
|
||||
use markdown_parser::{FormattedText, FormattedTextFragment, FormattedTextLine};
|
||||
use pathfinder_color::ColorU;
|
||||
use pathfinder_geometry::vector::vec2f;
|
||||
use galaxy_core::ui::appearance::Appearance;
|
||||
use galaxy_core::ui::Icon;
|
||||
use galaxy_graphql::billing::AddonCreditsOption;
|
||||
@@ -20,6 +16,10 @@ use galaxyui::fonts::Weight;
|
||||
use galaxyui::ui_components::button::ButtonVariant;
|
||||
use galaxyui::ui_components::components::{Coords, UiComponent as _, UiComponentStyles};
|
||||
use galaxyui::{AppContext, Element, Entity, SingletonEntity as _, View, ViewContext, ViewHandle};
|
||||
use itertools::Itertools as _;
|
||||
use markdown_parser::{FormattedText, FormattedTextFragment, FormattedTextLine};
|
||||
use pathfinder_color::ColorU;
|
||||
use pathfinder_geometry::vector::vec2f;
|
||||
|
||||
use crate::ai::request_usage_model::{
|
||||
AIRequestUsageModel, AIRequestUsageModelEvent, BuyCreditsBannerDisplayState,
|
||||
@@ -213,14 +213,14 @@ impl BuyCreditsBanner {
|
||||
ctx.notify();
|
||||
}
|
||||
}
|
||||
UserWorkspacesEvent::UpdateWorkspaceSettingsRejected(_) => {
|
||||
if self.banner_auto_reload_update_in_flight {
|
||||
self.banner_auto_reload_update_in_flight = false;
|
||||
ctx.emit(BuyCreditsBannerEvent::ShowAutoReloadError {
|
||||
error_message: "Failed to enable auto-reload for your team. Please try again in Settings > Billing and Usage.",
|
||||
});
|
||||
ctx.notify();
|
||||
}
|
||||
UserWorkspacesEvent::UpdateWorkspaceSettingsRejected(_)
|
||||
if self.banner_auto_reload_update_in_flight =>
|
||||
{
|
||||
self.banner_auto_reload_update_in_flight = false;
|
||||
ctx.emit(BuyCreditsBannerEvent::ShowAutoReloadError {
|
||||
error_message: "Failed to enable auto-reload for your team. Please try again in Settings > Billing and Usage.",
|
||||
});
|
||||
ctx.notify();
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
|
||||
@@ -8,17 +8,16 @@ use std::collections::HashMap;
|
||||
|
||||
use ai::skills::SkillProvider;
|
||||
use enum_iterator::Sequence;
|
||||
use galaxy_editor::content::{buffer::Buffer, markdown::MarkdownStyle};
|
||||
use markdown_parser::parse_markdown;
|
||||
use pathfinder_color::ColorU;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use smol_str::SmolStr;
|
||||
use galaxy_cli::agent::Harness;
|
||||
use galaxy_completer::parsers::simple::top_level_command;
|
||||
use galaxy_editor::content::buffer::Buffer;
|
||||
use galaxy_editor::content::markdown::MarkdownStyle;
|
||||
use galaxy_util::path::EscapeChar;
|
||||
use galaxyui::{AppContext, SingletonEntity};
|
||||
use markdown_parser::parse_markdown;
|
||||
use pathfinder_color::ColorU;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use smol_str::SmolStr;
|
||||
|
||||
use crate::ai::agent::{AgentReviewCommentBatch, DiffSetHunk};
|
||||
use crate::ai::blocklist::CLAUDE_ORANGE;
|
||||
|
||||
@@ -4,7 +4,7 @@ use std::ops::{Index, IndexMut};
|
||||
use galaxyui::color::ColorU;
|
||||
|
||||
use crate::terminal::model::ansi::color_index;
|
||||
use crate::themes::theme::{AnsiColors, WarpTheme};
|
||||
use crate::themes::theme::{AnsiColors, GalaxyTheme};
|
||||
|
||||
pub const COUNT: usize = 269;
|
||||
|
||||
|
||||
@@ -105,15 +105,15 @@ impl EnableAutoReloadModalBody {
|
||||
ctx.emit(EnableAutoReloadModalBodyEvent::Close);
|
||||
}
|
||||
}
|
||||
UserWorkspacesEvent::UpdateWorkspaceSettingsRejected(_err) => {
|
||||
if me.update_workspace_settings_loading {
|
||||
me.update_workspace_settings_loading = false;
|
||||
ctx.emit(EnableAutoReloadModalBodyEvent::ShowToast {
|
||||
message: "Failed to enable auto-reload. Please try updating your settings in Billing & usage.".to_string(),
|
||||
flavor: ToastFlavor::Error,
|
||||
});
|
||||
ctx.notify();
|
||||
}
|
||||
UserWorkspacesEvent::UpdateWorkspaceSettingsRejected(_err)
|
||||
if me.update_workspace_settings_loading =>
|
||||
{
|
||||
me.update_workspace_settings_loading = false;
|
||||
ctx.emit(EnableAutoReloadModalBodyEvent::ShowToast {
|
||||
message: "Failed to enable auto-reload. Please try updating your settings in Billing & usage.".to_string(),
|
||||
flavor: ToastFlavor::Error,
|
||||
});
|
||||
ctx.notify();
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@ use alt_screen::{run_find_on_alt_screen, AltScreenFindRun};
|
||||
pub use async_find::{AsyncFindController, AsyncFindStatus};
|
||||
use block_list::run_find_on_block_list;
|
||||
pub use block_list::{BlockGridMatch, BlockListFindRun, BlockListMatch};
|
||||
use galaxyui::{AppContext, Entity, EntityId, ModelContext, SingletonEntity, ViewHandle};
|
||||
use parking_lot::FairMutex;
|
||||
use rich_content::FindableRichContentHandle;
|
||||
pub use rich_content::{FindableRichContentView, RichContentMatchId};
|
||||
|
||||
@@ -586,7 +586,7 @@ impl AsyncFindController {
|
||||
|
||||
// Sort by TotalIndex descending so that matches closest to the end
|
||||
// of the blocklist (newest blocks, near the prompt) come first.
|
||||
ordered_blocks.sort_by(|a, b| b.0.cmp(&a.0));
|
||||
ordered_blocks.sort_by_key(|b| std::cmp::Reverse(b.0));
|
||||
|
||||
let reverse_within_block = matches!(
|
||||
self.block_sort_direction,
|
||||
|
||||
@@ -3,10 +3,9 @@ use std::collections::HashMap;
|
||||
use std::iter;
|
||||
use std::ops::RangeInclusive;
|
||||
|
||||
use galaxyui::{units::Lines, AppContext, EntityId};
|
||||
use itertools::Itertools;
|
||||
use galaxyui::units::Lines;
|
||||
use galaxyui::{AppContext, EntityId};
|
||||
use itertools::Itertools;
|
||||
|
||||
use super::rich_content::{FindableRichContentHandle, RichContentMatchId};
|
||||
use super::FindOptions;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
use std::collections::HashSet;
|
||||
|
||||
use galaxy_core::settings::macros::define_settings_group;
|
||||
use galaxy_core::settings::{RespectUserSyncSetting, SupportedPlatforms, SyncToCloud};
|
||||
use galaxy_core::settings::{RespectUserSyncSetting, Setting, SupportedPlatforms, SyncToCloud};
|
||||
|
||||
use crate::banner::BannerState;
|
||||
use crate::resource_center::Tip;
|
||||
|
||||
@@ -6,8 +6,20 @@ use std::cmp::Ordering;
|
||||
use std::collections::HashMap;
|
||||
use std::ops::{Range, RangeInclusive};
|
||||
|
||||
use galaxy_core::features::FeatureFlag;
|
||||
use galaxyui::assets::asset_cache::{AssetCache, AssetSource, AssetState};
|
||||
use galaxyui::elements::{Border, CornerRadius, Fill, Radius, DEFAULT_UI_LINE_HEIGHT_RATIO};
|
||||
use galaxyui::fonts::{FamilyId, FontId, Properties, Style, Weight};
|
||||
use galaxyui::image_cache::{AnimatedImageBehavior, CacheOption, FitType, Image, ImageCache};
|
||||
use galaxyui::platform::LineStyle;
|
||||
use galaxyui::text_layout::{Line, StyleAndFont, TextStyle, DEFAULT_TOP_BOTTOM_RATIO};
|
||||
use galaxyui::units::{IntoLines, Lines, Pixels};
|
||||
use galaxyui::{AppContext, Element, EntityId, PaintContext, Scene, SingletonEntity};
|
||||
use lazy_static::lazy_static;
|
||||
use num_traits::Float as _;
|
||||
use pathfinder_color::ColorU;
|
||||
use pathfinder_geometry::rect::RectF;
|
||||
use pathfinder_geometry::vector::{vec2f, Vector2F};
|
||||
use unicode_width::UnicodeWidthChar;
|
||||
|
||||
pub use self::cell_glyph_cache::CellGlyphCache;
|
||||
@@ -28,7 +40,7 @@ use crate::terminal::model::index::Point;
|
||||
use crate::terminal::model::selection::SelectionPoint;
|
||||
use crate::terminal::model::{ObfuscateSecrets, SecretHandle};
|
||||
use crate::terminal::{color, SizeInfo};
|
||||
use crate::themes::theme::WarpTheme;
|
||||
use crate::themes::theme::GalaxyTheme;
|
||||
use crate::util::color::{ContrastingColor, MinimumAllowedContrast};
|
||||
|
||||
// The scale factor of the cursor relative to the cursor width.
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
//! This module defines helper functions pertaining to the size/position of items in a Grid,
|
||||
//! such as the dimensions of a grid cell and the baseline position of text within a cell.
|
||||
use galaxyui::elements::DEFAULT_UI_LINE_HEIGHT_RATIO;
|
||||
use galaxyui::fonts::Cache as FontCache;
|
||||
use galaxyui::fonts::FamilyId;
|
||||
use galaxyui::fonts::{Cache as FontCache, FamilyId};
|
||||
use galaxyui::text_layout::ComputeBaselinePositionFn;
|
||||
use num_traits::Zero;
|
||||
use pathfinder_geometry::vector::{vec2f, Vector2F};
|
||||
use galaxyui::fonts::{Cache as FontCache, FamilyId};
|
||||
|
||||
/// Computes the grid cell size given the font and size at which the grid should
|
||||
/// be rendered. We use a similar algorithm to Alacritty to do this, where the
|
||||
|
||||
@@ -3,9 +3,9 @@ use std::sync::Arc;
|
||||
|
||||
use chrono::{DateTime, Local, TimeZone as _};
|
||||
use futures::Future;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use galaxy_core::command::ExitCode;
|
||||
use galaxyui::{AppContext, Entity, ModelContext, SingletonEntity};
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use super::model::block::{AgentInteractionMetadata, Block, SerializedAIMetadata, SerializedBlock};
|
||||
use super::shell::ShellType;
|
||||
|
||||
@@ -44,6 +44,11 @@ use base64::Engine as _;
|
||||
use diesel::SqliteConnection;
|
||||
use futures::stream::AbortHandle;
|
||||
use futures::FutureExt as _;
|
||||
use galaxy_core::context_flag::ContextFlag;
|
||||
use galaxy_core::r#async::debounce;
|
||||
use galaxy_core::ui::theme::color::internal_colors;
|
||||
use galaxy_core::ui::theme::AnsiColorIdentifier;
|
||||
use galaxy_core::user_preferences::GetUserPreferences as _;
|
||||
use itertools::Itertools;
|
||||
use lazy_static::lazy_static;
|
||||
use ordered_float::Float;
|
||||
@@ -68,14 +73,9 @@ use warp_completer::parsers::simple::command_at_cursor_position;
|
||||
use warp_completer::parsers::LiteCommand;
|
||||
use warp_completer::signatures::CommandRegistry;
|
||||
use warp_completer::util::parse_current_commands_and_tokens;
|
||||
use galaxy_core::context_flag::ContextFlag;
|
||||
use galaxy_core::r#async::debounce;
|
||||
use galaxy_core::ui::theme::color::internal_colors;
|
||||
use galaxy_core::ui::theme::AnsiColorIdentifier;
|
||||
use galaxy_core::user_preferences::GetUserPreferences as _;
|
||||
use warp_editor::editor::NavigationKey;
|
||||
use warp_util::path::ShellFamily;
|
||||
use warpui::accessibility::{AccessibilityContent, ActionAccessibilityContent, WarpA11yRole};
|
||||
use warpui::accessibility::{AccessibilityContent, ActionAccessibilityContent, GalaxyA11yRole};
|
||||
use warpui::clipboard::{ClipboardContent, ImageData};
|
||||
use warpui::clipboard_utils::CLIPBOARD_IMAGE_MIME_TYPES;
|
||||
use warpui::color::ColorU;
|
||||
@@ -312,7 +312,7 @@ use crate::terminal::view::CodeDiffAction;
|
||||
use crate::terminal::CLIAgent;
|
||||
use crate::ui_components::blended_colors;
|
||||
use crate::ui_components::icons::Icon;
|
||||
use crate::user_config::WarpConfig;
|
||||
use crate::user_config::GalaxyConfig;
|
||||
use crate::util::bindings::{self, keybinding_name_to_normalized_string, CustomAction};
|
||||
#[cfg(feature = "local_fs")]
|
||||
use crate::util::file::external_editor;
|
||||
@@ -4267,7 +4267,6 @@ impl Input {
|
||||
|
||||
#[cfg(all(feature = "local_fs", not(target_family = "wasm")))]
|
||||
fn maybe_launch_cloud_handoff_request(&mut self, ctx: &mut ViewContext<Self>) -> bool {
|
||||
|
||||
if !FeatureFlag::OzHandoff.is_enabled()
|
||||
|| !FeatureFlag::HandoffLocalCloud.is_enabled()
|
||||
|| !cfg!(all(feature = "local_fs", not(target_family = "wasm")))
|
||||
@@ -8060,7 +8059,7 @@ impl Input {
|
||||
.iter()
|
||||
.map(|style_run| style_run.byte_range().clone())
|
||||
.collect::<Vec<_>>();
|
||||
ranges.sort_by(|a, b| a.start.cmp(&b.start));
|
||||
ranges.sort_by_key(|a| a.start);
|
||||
|
||||
let capacity = ranges.len();
|
||||
|
||||
|
||||
@@ -5,10 +5,11 @@ use galaxyui::elements::{
|
||||
Align, AnchorPair, Border, ConstrainedBox, Container, CornerRadius, CrossAxisAlignment,
|
||||
DispatchEventResult, DropTarget, Element, Empty, EventHandler, Expanded, Flex, Hoverable,
|
||||
MainAxisSize, OffsetPositioning, OffsetType, ParentElement, PositionedElementOffsetBounds,
|
||||
PositioningAxis, Radius, SavePosition, Stack, XAxisAnchor, YAxisAnchor,
|
||||
PositioningAxis, Radius, SavePosition, Stack, Text, XAxisAnchor, YAxisAnchor,
|
||||
};
|
||||
use galaxyui::presenter::ChildView;
|
||||
use galaxyui::{AppContext, SingletonEntity as _};
|
||||
use pathfinder_color::ColorU;
|
||||
|
||||
use super::common::{
|
||||
add_command_xray_overlay, add_input_suggestions_overlays, add_voltron_overlay,
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
use pathfinder_geometry::vector::vec2f;
|
||||
use settings::Setting;
|
||||
use galaxyui::elements::{
|
||||
Border, ChildAnchor, ChildView, Clipped, Container, DropTarget, Element, Empty, Flex,
|
||||
Hoverable, OffsetPositioning, ParentAnchor, ParentElement, ParentOffsetBounds, SavePosition,
|
||||
Stack,
|
||||
};
|
||||
use galaxyui::{AppContext, SingletonEntity};
|
||||
use pathfinder_geometry::vector::vec2f;
|
||||
use settings::Setting;
|
||||
|
||||
use super::{should_render_prompt_using_editor_decorator_elements, Input, SubshellRenderState};
|
||||
use crate::ai::blocklist::InputType;
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
use std::collections::HashSet;
|
||||
|
||||
use pathfinder_color::ColorU;
|
||||
use galaxy_core::ui::appearance::Appearance;
|
||||
use galaxy_core::ui::theme::color::internal_colors;
|
||||
use galaxyui::elements::{
|
||||
@@ -10,6 +9,7 @@ use galaxyui::{
|
||||
AppContext, Element, Entity, EntityId, ModelHandle, SingletonEntity, View, ViewContext,
|
||||
ViewHandle,
|
||||
};
|
||||
use pathfinder_color::ColorU;
|
||||
|
||||
use crate::ai::blocklist::agent_view::AgentViewController;
|
||||
use crate::search::data_source::{Query, QueryFilter};
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
use std::sync::Arc;
|
||||
|
||||
use pathfinder_geometry::vector::vec2f;
|
||||
use vim::vim::{VimMode, VimState};
|
||||
use galaxy_completer::completer::Description;
|
||||
use galaxy_core::features::FeatureFlag;
|
||||
use galaxyui::elements::{
|
||||
@@ -14,6 +12,8 @@ use galaxyui::fonts::Weight;
|
||||
use galaxyui::presenter::ChildView;
|
||||
use galaxyui::ui_components::components::{UiComponent, UiComponentStyles};
|
||||
use galaxyui::{AppContext, EntityId, SingletonEntity, ViewHandle};
|
||||
use pathfinder_geometry::vector::vec2f;
|
||||
use vim::vim::{VimMode, VimState};
|
||||
|
||||
use crate::ai::llms::{is_using_api_key_for_provider, LLMPreferences};
|
||||
use crate::ai::{AIRequestUsageModel, BuyCreditsBannerDisplayState};
|
||||
@@ -517,7 +517,6 @@ fn add_buy_credits_banner_overlay(
|
||||
buy_credits_banner: &ViewHandle<BuyCreditsBanner>,
|
||||
is_input_at_top: bool,
|
||||
) {
|
||||
|
||||
let (parent_anchor, child_anchor, y_offset) = if is_input_at_top {
|
||||
(ParentAnchor::BottomLeft, ChildAnchor::TopLeft, 8.)
|
||||
} else {
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
//! Data source for the inline conversation menu.
|
||||
|
||||
use galaxyui::{AppContext, Entity, ModelHandle};
|
||||
use galaxyui::{AppContext, Entity, ModelHandle, SingletonEntity};
|
||||
use itertools::Itertools;
|
||||
use ordered_float::OrderedFloat;
|
||||
use galaxyui::{AppContext, Entity, ModelHandle, SingletonEntity};
|
||||
|
||||
use crate::ai::agent_conversations_model::{
|
||||
AgentConversationEntry, AgentConversationEntryId, AgentManagementFilters,
|
||||
|
||||
@@ -4,11 +4,11 @@ mod data_source;
|
||||
mod search_item;
|
||||
mod view;
|
||||
|
||||
use pathfinder_color::ColorU;
|
||||
pub use view::{InlineConversationMenuEvent, InlineConversationMenuView};
|
||||
use galaxy_core::ui::appearance::Appearance;
|
||||
use galaxyui::keymap::Keystroke;
|
||||
use galaxyui::SingletonEntity;
|
||||
use pathfinder_color::ColorU;
|
||||
pub use view::{InlineConversationMenuEvent, InlineConversationMenuView};
|
||||
|
||||
use crate::ai::active_agent_views_model::{ActiveAgentViewsModel, ConversationOrTaskId};
|
||||
use crate::ai::agent_conversations_model::AgentConversationEntryId;
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
use std::collections::HashMap;
|
||||
use std::ops::Range;
|
||||
|
||||
pub use galaxy_completer::completer::SuggestionTypeName;
|
||||
pub use galaxy_completer::util::parse_current_commands_and_tokens;
|
||||
pub use galaxy_completer::{ParsedTokenData, ParsedTokensSnapshot};
|
||||
use galaxy_core::features::FeatureFlag;
|
||||
use galaxyui::{AppContext, SingletonEntity, ViewContext};
|
||||
use settings::Setting as _;
|
||||
use string_offset::{ByteOffset, CharOffset};
|
||||
pub use galaxy_completer::completer::SuggestionTypeName;
|
||||
pub use galaxy_completer::util::parse_current_commands_and_tokens;
|
||||
pub use galaxy_completer::{ParsedTokenData, ParsedTokensSnapshot};
|
||||
|
||||
use super::Input;
|
||||
use crate::appearance::Appearance;
|
||||
|
||||
@@ -234,7 +234,7 @@ fn interleave_conversations(base: Vec<MenuEntry>, conversations: Vec<MenuEntry>)
|
||||
|
||||
let base_current = base.into_iter().skip(current_start_idx).collect::<Vec<_>>();
|
||||
let mut conversations = conversations;
|
||||
conversations.sort_by(|a, b| a.sort_timestamp.cmp(&b.sort_timestamp));
|
||||
conversations.sort_by_key(|a| a.sort_timestamp);
|
||||
|
||||
let mut i = 0;
|
||||
for conv in conversations {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
//! Generic model for tracking the selected item in an inline menu.
|
||||
use galaxyui::elements::MouseStateHandle;
|
||||
use galaxyui::{Entity, ModelContext};
|
||||
use std::collections::HashSet;
|
||||
|
||||
use galaxyui::elements::MouseStateHandle;
|
||||
use galaxyui::{Entity, ModelContext};
|
||||
|
||||
use crate::search::data_source::QueryFilter;
|
||||
use crate::terminal::input::inline_menu::view::InlineMenuAction;
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
use std::collections::HashMap;
|
||||
|
||||
use settings::Setting as _;
|
||||
use galaxy_core::features::FeatureFlag;
|
||||
use galaxyui::units::{IntoPixels, Pixels};
|
||||
use galaxyui::{AppContext, Entity, ModelContext, ModelHandle, SingletonEntity, WindowId};
|
||||
use settings::Setting as _;
|
||||
|
||||
use super::styles::{HEADER_BORDER, HEADER_ROW_HEIGHT};
|
||||
use crate::ai::blocklist::agent_view::AgentViewController;
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
//! Generic inline menu view for rendering search results with selection and navigation.
|
||||
use std::sync::LazyLock;
|
||||
|
||||
use itertools::Itertools;
|
||||
use pathfinder_geometry::vector::vec2f;
|
||||
use galaxy_core::features::FeatureFlag;
|
||||
use galaxy_core::ui::appearance::Appearance;
|
||||
use galaxy_core::ui::color::blend::Blend;
|
||||
@@ -30,6 +28,8 @@ use galaxyui::{
|
||||
Action, AppContext, Element, Entity, ModelHandle, SingletonEntity, TypedActionView, View,
|
||||
ViewContext, ViewHandle, WeakViewHandle,
|
||||
};
|
||||
use itertools::Itertools;
|
||||
use pathfinder_geometry::vector::vec2f;
|
||||
|
||||
use crate::ai::blocklist::agent_view::{
|
||||
agent_view_bg_color, AgentViewController, AgentViewControllerEvent,
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
use markdown_parser::{FormattedText, FormattedTextFragment, FormattedTextLine};
|
||||
use pathfinder_color::ColorU;
|
||||
use galaxy_core::ui::appearance::Appearance;
|
||||
use galaxy_core::ui::theme::Fill;
|
||||
use galaxy_core::ui::Icon;
|
||||
@@ -11,6 +9,8 @@ use galaxyui::platform::Cursor;
|
||||
use galaxyui::prelude::{Align, ConstrainedBox, CrossAxisAlignment, Flex, MainAxisSize, Text};
|
||||
use galaxyui::ui_components::keyboard_shortcut::keystroke_to_keys;
|
||||
use galaxyui::{AppContext, SingletonEntity};
|
||||
use markdown_parser::{FormattedText, FormattedTextFragment, FormattedTextLine};
|
||||
use pathfinder_color::ColorU;
|
||||
|
||||
use crate::ai::blocklist::agent_view::agent_view_bg_color;
|
||||
use crate::ai::blocklist::agent_view::shortcuts::render_keystroke_with_color_overrides;
|
||||
@@ -516,7 +516,11 @@ pub fn disableable_message_item_color_overrides(
|
||||
}
|
||||
|
||||
pub mod styles {
|
||||
use galaxy_core::ui::appearance::Appearance;
|
||||
use galaxyui::{AppContext, SingletonEntity};
|
||||
use pathfinder_color::ColorU;
|
||||
|
||||
use crate::ui_components::blended_colors;
|
||||
|
||||
pub fn font_size(app: &AppContext) -> f32 {
|
||||
let appearance = Appearance::as_ref(app);
|
||||
|
||||
@@ -4,8 +4,8 @@ use galaxy_core::ui::icons::Icon;
|
||||
use galaxy_core::ui::theme::color::internal_colors;
|
||||
use galaxy_core::ui::theme::Fill;
|
||||
use galaxyui::elements::{
|
||||
ConstrainedBox, Container, CornerRadius, FormattedTextElement, Highlight, HighlightedHyperlink,
|
||||
MouseStateHandle, Radius, Text,
|
||||
ConstrainedBox, Container, CornerRadius, Flex, FormattedTextElement, Highlight,
|
||||
HighlightedHyperlink, MouseStateHandle, ParentElement, Radius, Text,
|
||||
};
|
||||
use galaxyui::fonts::{Properties, Style, Weight};
|
||||
use galaxyui::keymap::Keystroke;
|
||||
@@ -14,6 +14,9 @@ use galaxyui::text_layout::ClipConfig;
|
||||
use galaxyui::ui_components::button::ButtonVariant;
|
||||
use galaxyui::ui_components::components::{Coords, UiComponent, UiComponentStyles};
|
||||
use galaxyui::{AppContext, Element, Entity, EntityId, ModelHandle, SingletonEntity as _};
|
||||
use itertools::Itertools;
|
||||
use markdown_parser::{FormattedText, FormattedTextFragment, FormattedTextLine};
|
||||
use ordered_float::OrderedFloat;
|
||||
|
||||
use super::model_spec_scores::{
|
||||
render_model_spec_header, render_model_spec_scores, CostRow, CostRowTooltip,
|
||||
@@ -504,7 +507,6 @@ impl SearchItem for ModelSearchItem {
|
||||
}
|
||||
|
||||
fn render_details(&self, app: &AppContext) -> Option<Box<dyn Element>> {
|
||||
|
||||
let appearance = crate::appearance::Appearance::as_ref(app);
|
||||
let theme = appearance.theme();
|
||||
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
use pathfinder_color::ColorU;
|
||||
use pathfinder_geometry::vector::vec2f;
|
||||
use galaxy_core::ui::theme::color::internal_colors;
|
||||
use galaxyui::elements::{
|
||||
Border, ChildAnchor, ConstrainedBox, Container, CornerRadius, Expanded, Flex, Hoverable,
|
||||
@@ -10,6 +8,8 @@ use galaxyui::prelude::{Align, CrossAxisAlignment};
|
||||
use galaxyui::text_layout::ClipConfig;
|
||||
use galaxyui::ui_components::components::UiComponent;
|
||||
use galaxyui::{AppContext, Element, SingletonEntity as _};
|
||||
use pathfinder_color::ColorU;
|
||||
use pathfinder_geometry::vector::vec2f;
|
||||
|
||||
use crate::ai::llms::LLMSpec;
|
||||
use crate::appearance::Appearance;
|
||||
|
||||
@@ -2,7 +2,6 @@ use std::collections::HashSet;
|
||||
use std::sync::LazyLock;
|
||||
|
||||
use ai::api_keys::{ApiKeyManager, ApiKeyManagerEvent};
|
||||
use pathfinder_color::ColorU;
|
||||
use galaxy_core::ui::appearance::Appearance;
|
||||
use galaxy_core::ui::theme::color::internal_colors;
|
||||
use galaxy_core::ui::theme::Fill;
|
||||
@@ -11,6 +10,7 @@ use galaxyui::{
|
||||
AppContext, Element, Entity, EntityId, ModelHandle, SingletonEntity as _, View, ViewContext,
|
||||
ViewHandle,
|
||||
};
|
||||
use pathfinder_color::ColorU;
|
||||
|
||||
use crate::ai::blocklist::agent_view::AgentViewController;
|
||||
use crate::ai::blocklist::block::cli_controller::{CLISubagentController, CLISubagentEvent};
|
||||
|
||||
@@ -4,8 +4,8 @@ mod search_item;
|
||||
mod view;
|
||||
|
||||
use ai::document::AIDocumentId;
|
||||
pub use view::{InlinePlanMenuEvent, InlinePlanMenuView};
|
||||
use galaxyui::keymap::Keystroke;
|
||||
pub use view::{InlinePlanMenuEvent, InlinePlanMenuView};
|
||||
|
||||
use crate::ai::document::ai_document_model::AIDocumentVersion;
|
||||
use crate::terminal::input::inline_menu::{
|
||||
|
||||
@@ -68,7 +68,7 @@ impl SyncDataSource for ProfileSelectorDataSource {
|
||||
Some((profile_id, profile_name))
|
||||
})
|
||||
.collect();
|
||||
profiles.sort_by(|(_, a), (_, b)| a.to_lowercase().cmp(&b.to_lowercase()));
|
||||
profiles.sort_by_key(|(_, a)| a.to_lowercase());
|
||||
|
||||
for (profile_id, profile_name) in profiles {
|
||||
if query_text.is_empty() {
|
||||
|
||||
@@ -6,8 +6,8 @@ mod view;
|
||||
|
||||
use std::path::PathBuf;
|
||||
|
||||
pub use view::{InlineReposMenuEvent, InlineReposMenuView};
|
||||
use galaxyui::keymap::Keystroke;
|
||||
pub use view::{InlineReposMenuEvent, InlineReposMenuView};
|
||||
|
||||
use crate::terminal::input::inline_menu::{
|
||||
default_navigation_message_items, InlineMenuAction, InlineMenuMessageArgs, InlineMenuRowAction,
|
||||
|
||||
@@ -6,9 +6,8 @@ mod search_item;
|
||||
mod view;
|
||||
|
||||
pub use data_source::SelectRewindPoint;
|
||||
pub use view::{RewindMenuEvent, RewindMenuView};
|
||||
|
||||
use galaxyui::keymap::Keystroke;
|
||||
pub use view::{RewindMenuEvent, RewindMenuView};
|
||||
|
||||
use crate::terminal::input::inline_menu::{
|
||||
default_navigation_message_items, InlineMenuAction, InlineMenuMessageArgs, InlineMenuType,
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
use ai::skills::{SkillProvider, SkillReference, SkillScope};
|
||||
use fuzzy_match::{match_indices_case_insensitive, FuzzyMatchResult};
|
||||
use ordered_float::OrderedFloat;
|
||||
use galaxy_core::ui::icons::Icon;
|
||||
use galaxy_core::ui::theme::Fill;
|
||||
use galaxy_util::local_or_remote_path::LocalOrRemotePath;
|
||||
@@ -14,6 +13,7 @@ use galaxyui::text_layout::ClipConfig;
|
||||
use galaxyui::{
|
||||
AppContext, Element, Entity, EntityId, ModelContext, ModelHandle, SingletonEntity as _,
|
||||
};
|
||||
use ordered_float::OrderedFloat;
|
||||
|
||||
use crate::ai::skills::SkillManager;
|
||||
use crate::appearance::Appearance;
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
use std::collections::{HashMap, HashSet};
|
||||
use std::sync::LazyLock;
|
||||
|
||||
use pathfinder_geometry::vector::vec2f;
|
||||
use galaxy_core::ui::appearance::Appearance;
|
||||
use galaxy_core::ui::theme::Fill;
|
||||
use pathfinder_geometry::vector::vec2f;
|
||||
use warpui::elements::{
|
||||
Border, ChildAnchor, Clipped, ClippedScrollStateHandle, ClippedScrollable, ConstrainedBox,
|
||||
Container, CornerRadius, CrossAxisAlignment, DispatchEventResult, DropShadow, EventHandler,
|
||||
|
||||
@@ -6,15 +6,15 @@ use std::path::PathBuf;
|
||||
|
||||
use ai::skills::SkillProvider;
|
||||
use fuzzy_match::FuzzyMatchResult;
|
||||
#[cfg(not(target_family = "wasm"))]
|
||||
use galaxy_cli::agent::Harness;
|
||||
use galaxy_core::features::FeatureFlag;
|
||||
use galaxy_core::ui::appearance::Appearance;
|
||||
use galaxy_core::ui::Icon as GalaxyIcon;
|
||||
use galaxyui::fonts::FamilyId;
|
||||
use galaxyui::{AppContext, Entity, EntityId, ModelContext, ModelHandle, SingletonEntity};
|
||||
use ordered_float::OrderedFloat;
|
||||
pub(crate) use saved_prompts::*;
|
||||
#[cfg(not(target_family = "wasm"))]
|
||||
use galaxy_cli::agent::Harness;
|
||||
use galaxy_core::features::FeatureFlag;
|
||||
use galaxy_core::ui::Icon as WarpIcon;
|
||||
pub use zero_state::*;
|
||||
|
||||
use super::AcceptSlashCommandOrSavedPrompt;
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
use galaxyui::{Entity, ModelHandle};
|
||||
use itertools::Itertools;
|
||||
use galaxy_core::features::FeatureFlag;
|
||||
use galaxyui::{Entity, ModelHandle, SingletonEntity};
|
||||
use itertools::Itertools;
|
||||
|
||||
use crate::ai::skills::SkillManager;
|
||||
use crate::cloud_object::model::persistence::CloudModel;
|
||||
|
||||
@@ -9,7 +9,6 @@ use std::path::PathBuf;
|
||||
use ai::skills::SkillReference;
|
||||
pub use cloud_mode_v2_view::{CloudModeV2SlashCommandView, Section as CloudModeV2Section};
|
||||
pub use data_source::*;
|
||||
pub use view::{CloseReason, InlineSlashCommandView, SlashCommandsEvent};
|
||||
#[cfg(not(target_family = "wasm"))]
|
||||
use galaxy_cli::agent::Harness;
|
||||
use galaxy_core::features::FeatureFlag;
|
||||
@@ -20,6 +19,7 @@ use galaxy_core::ui::theme::AnsiColorIdentifier;
|
||||
use galaxy_util::path::{CleanPathResult, LineAndColumnArg};
|
||||
use galaxyui::clipboard::ClipboardContent;
|
||||
use galaxyui::{AppContext, SingletonEntity, ViewContext};
|
||||
pub use view::{CloseReason, InlineSlashCommandView, SlashCommandsEvent};
|
||||
|
||||
use crate::ai::agent::conversation::AIConversationId;
|
||||
#[cfg(not(target_family = "wasm"))]
|
||||
@@ -476,7 +476,7 @@ impl Input {
|
||||
_create_docker_sandbox if command.name == commands::CREATE_DOCKER_SANDBOX.name => {
|
||||
ctx.emit(Event::CreateDockerSandbox);
|
||||
}
|
||||
conversations if command.name == commands::CONVERSATIONS.name => {
|
||||
_ if command.name == commands::CONVERSATIONS.name => {
|
||||
if self.is_cloud_mode_input_v2_composing(ctx) {
|
||||
self.suggestions_mode_model.update(ctx, |model, ctx| {
|
||||
model.set_mode(InputSuggestionsMode::Closed, ctx);
|
||||
@@ -523,7 +523,7 @@ impl Input {
|
||||
};
|
||||
rename_conversation(conversation_id, argument.cloned().unwrap_or_default(), ctx);
|
||||
}
|
||||
set_tab_color if command.name == commands::SET_TAB_COLOR.name => {
|
||||
_ if command.name == commands::SET_TAB_COLOR.name => {
|
||||
let supported_options = || {
|
||||
color_dot::TAB_COLOR_OPTIONS
|
||||
.iter()
|
||||
@@ -571,7 +571,7 @@ impl Input {
|
||||
|
||||
ctx.dispatch_typed_action(&WorkspaceAction::SetActiveTabColor(color));
|
||||
}
|
||||
create_env if command.name == commands::CREATE_ENVIRONMENT.name => {
|
||||
_ if command.name == commands::CREATE_ENVIRONMENT.name => {
|
||||
// If the user included args after the slash command, treat them as repo paths/URLs.
|
||||
let repos = argument
|
||||
.map(|arg| {
|
||||
@@ -776,7 +776,7 @@ impl Input {
|
||||
// Open the skill selector menu for invocation - skill command will be inserted into buffer
|
||||
self.open_invoke_skill_selector(ctx);
|
||||
}
|
||||
host if command.name == commands::HOST.name => {
|
||||
_ if command.name == commands::HOST.name => {
|
||||
if !self.is_cloud_mode_input_v2_composing(ctx) {
|
||||
return false;
|
||||
}
|
||||
@@ -794,7 +794,7 @@ impl Input {
|
||||
self.open_v2_host_selector(ctx);
|
||||
return true;
|
||||
}
|
||||
harness if command.name == commands::HARNESS.name => {
|
||||
_ if command.name == commands::HARNESS.name => {
|
||||
if !self.is_cloud_mode_input_v2_composing(ctx) {
|
||||
// Defensive: the command is registered only when the V2 flag is on and its
|
||||
// availability requires CLOUD_MODE_V2_COMPOSER, so this branch should be unreachable.
|
||||
@@ -807,7 +807,7 @@ impl Input {
|
||||
self.open_v2_harness_selector(ctx);
|
||||
return true;
|
||||
}
|
||||
environment if command.name == commands::ENVIRONMENT.name => {
|
||||
_ if command.name == commands::ENVIRONMENT.name => {
|
||||
if !self.is_cloud_mode_input_v2_composing(ctx) {
|
||||
return false;
|
||||
}
|
||||
@@ -818,7 +818,7 @@ impl Input {
|
||||
self.open_v2_environment_selector(ctx);
|
||||
return true;
|
||||
}
|
||||
models if command.name == commands::MODEL.name => {
|
||||
_ if command.name == commands::MODEL.name => {
|
||||
if self.is_cloud_mode_input_v2_composing(ctx) {
|
||||
self.suggestions_mode_model.update(ctx, |model, ctx| {
|
||||
model.set_mode(InputSuggestionsMode::Closed, ctx);
|
||||
@@ -853,7 +853,7 @@ impl Input {
|
||||
|
||||
self.open_profile_selector(ctx);
|
||||
}
|
||||
prompts if command.name == commands::PROMPTS.name => {
|
||||
_ if command.name == commands::PROMPTS.name => {
|
||||
if self.is_cloud_mode_input_v2_composing(ctx) {
|
||||
self.apply_v2_slash_section_filter(CloudModeV2Section::Prompts, ctx);
|
||||
return true;
|
||||
@@ -916,7 +916,7 @@ impl Input {
|
||||
}
|
||||
}
|
||||
#[cfg(all(feature = "local_fs", not(target_family = "wasm")))]
|
||||
move_to_cloud if command.name == commands::MOVE_TO_CLOUD.name => {
|
||||
_ if command.name == commands::MOVE_TO_CLOUD.name => {
|
||||
if !AISettings::as_ref(ctx).is_cloud_handoff_enabled(ctx) {
|
||||
return false;
|
||||
}
|
||||
@@ -961,7 +961,7 @@ impl Input {
|
||||
);
|
||||
}
|
||||
}
|
||||
fork if command.name == commands::FORK.name => {
|
||||
_ if command.name == commands::FORK.name => {
|
||||
let Some(conversation_id) = self
|
||||
.ai_context_model
|
||||
.as_ref(ctx)
|
||||
@@ -996,7 +996,7 @@ impl Input {
|
||||
return true;
|
||||
}
|
||||
#[cfg(not(target_family = "wasm"))]
|
||||
continue_locally if command.name == commands::CONTINUE_LOCALLY.name => {
|
||||
_ if command.name == commands::CONTINUE_LOCALLY.name => {
|
||||
let Some(conversation_id) = self
|
||||
.ai_context_model
|
||||
.as_ref(ctx)
|
||||
@@ -1043,7 +1043,7 @@ impl Input {
|
||||
destination,
|
||||
});
|
||||
}
|
||||
fork_and_compact if command.name == commands::FORK_AND_COMPACT.name => {
|
||||
_ if command.name == commands::FORK_AND_COMPACT.name => {
|
||||
let Some(conversation_id) = self
|
||||
.ai_context_model
|
||||
.as_ref(ctx)
|
||||
@@ -1069,7 +1069,7 @@ impl Input {
|
||||
destination,
|
||||
});
|
||||
}
|
||||
compact_and if command.name == commands::COMPACT_AND.name => {
|
||||
_ if command.name == commands::COMPACT_AND.name => {
|
||||
let conversation_id = if is_queued_prompt {
|
||||
let Some(conversation_id) = queued_conversation_id else {
|
||||
log::error!("Queued /compact-and missing conversation id");
|
||||
@@ -1162,9 +1162,7 @@ impl Input {
|
||||
}
|
||||
self.open_repos_menu(ctx);
|
||||
}
|
||||
command_that_just_sends_ai_request_with_prefix
|
||||
if slash_command_is_submitted_as_prompt(command) =>
|
||||
{
|
||||
_ if slash_command_is_submitted_as_prompt(command) => {
|
||||
// These slash commands just send AI requests with the slash command text as a
|
||||
// prefix, and special handling is done downstream as an implementation detail
|
||||
// of handling user queries with specific slash command prefixes.
|
||||
|
||||
@@ -2,10 +2,8 @@ use std::collections::HashSet;
|
||||
|
||||
use ai::skills::SkillReference;
|
||||
use galaxyui::elements::ChildView;
|
||||
use galaxyui::{AppContext, Element, ViewContext};
|
||||
use galaxyui::{Entity, ModelHandle, View, ViewHandle};
|
||||
use lazy_static::lazy_static;
|
||||
use galaxyui::{AppContext, Element, Entity, ModelHandle, View, ViewContext, ViewHandle};
|
||||
use lazy_static::lazy_static;
|
||||
|
||||
use crate::ai::blocklist::agent_view::AgentViewController;
|
||||
use crate::search::data_source::{Query, QueryFilter};
|
||||
|
||||
@@ -26,7 +26,7 @@ use crate::input_suggestions::{
|
||||
DETAILS_PANEL_MARGIN, DETAILS_PANEL_PADDING, HISTORY_DETAILS_PANEL_WIDTH,
|
||||
LABEL_PADDING as InputSuggestionsLabelPadding,
|
||||
};
|
||||
use crate::themes::theme::WarpTheme;
|
||||
use crate::themes::theme::GalaxyTheme;
|
||||
|
||||
enum SuggestionsResizeConfig {
|
||||
WidthAndHeight,
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
use settings::Setting;
|
||||
use galaxyui::elements::{
|
||||
Border, ChildView, Container, CornerRadius, DropTarget, Element, Flex, Hoverable,
|
||||
ParentElement, Radius, SavePosition, Stack,
|
||||
};
|
||||
use galaxyui::{AppContext, SingletonEntity};
|
||||
use settings::Setting;
|
||||
|
||||
use super::common::{
|
||||
add_command_xray_overlay, add_input_suggestions_overlays, add_vim_status_to_stack,
|
||||
|
||||
@@ -6,10 +6,9 @@ mod search_item;
|
||||
mod view;
|
||||
|
||||
pub use data_source::SelectUserQuery;
|
||||
pub use view::{UserQueryMenuEvent, UserQueryMenuView};
|
||||
|
||||
use galaxyui::keymap::Keystroke;
|
||||
use galaxyui::platform::OperatingSystem;
|
||||
pub use view::{UserQueryMenuEvent, UserQueryMenuView};
|
||||
|
||||
use crate::terminal::input::inline_menu::{
|
||||
default_navigation_message_items, InlineMenuAction, InlineMenuMessageArgs, InlineMenuRowAction,
|
||||
|
||||
@@ -287,7 +287,7 @@ pub fn initialize_app(app: &mut App) {
|
||||
crate::ai::document::ai_document_model::AIDocumentModel::new_for_test()
|
||||
});
|
||||
app.add_singleton_model(HomeDirectoryWatcher::new_for_test);
|
||||
app.add_singleton_model(GalaxyManagedPathsWatcher::new_for_testing);
|
||||
app.add_singleton_model(WarpManagedPathsWatcher::new_for_testing);
|
||||
app.add_singleton_model(SkillManager::new);
|
||||
|
||||
// Add GlobalResourceHandlesProvider for persistence
|
||||
@@ -8134,7 +8134,6 @@ fn test_terminal_only_ai_enter_enters_agent_view_and_clears_buffer() {
|
||||
|
||||
#[test]
|
||||
fn test_terminal_only_escape_locks_shell_mode() {
|
||||
|
||||
App::test((), |mut app| async move {
|
||||
let _am_flag = FeatureFlag::AgentMode.override_enabled(true);
|
||||
let _agent_view_flag = FeatureFlag::AgentView.override_enabled(true);
|
||||
@@ -8463,7 +8462,6 @@ fn open_rich_input_for_terminal(terminal: &ViewHandle<TerminalView>, app: &mut A
|
||||
|
||||
#[test]
|
||||
fn enter_submits_when_submit_on_ctrl_enter_is_false() {
|
||||
|
||||
App::test((), |mut app| async move {
|
||||
let _cli_agent_flag = FeatureFlag::CLIAgentRichInput.override_enabled(true);
|
||||
|
||||
@@ -8520,7 +8518,6 @@ fn enter_submits_when_submit_on_ctrl_enter_is_false() {
|
||||
|
||||
#[test]
|
||||
fn ctrl_enter_emits_ctrl_enter_event_when_submit_on_ctrl_enter_is_false() {
|
||||
|
||||
App::test((), |mut app| async move {
|
||||
let _cli_agent_flag = FeatureFlag::CLIAgentRichInput.override_enabled(true);
|
||||
|
||||
@@ -8574,7 +8571,6 @@ fn ctrl_enter_emits_ctrl_enter_event_when_submit_on_ctrl_enter_is_false() {
|
||||
|
||||
#[test]
|
||||
fn enter_inserts_newline_when_submit_on_ctrl_enter_is_true() {
|
||||
|
||||
App::test((), |mut app| async move {
|
||||
let _cli_agent_flag = FeatureFlag::CLIAgentRichInput.override_enabled(true);
|
||||
|
||||
@@ -8627,7 +8623,6 @@ fn enter_inserts_newline_when_submit_on_ctrl_enter_is_true() {
|
||||
|
||||
#[test]
|
||||
fn ctrl_enter_submits_when_submit_on_ctrl_enter_is_true() {
|
||||
|
||||
App::test((), |mut app| async move {
|
||||
let _cli_agent_flag = FeatureFlag::CLIAgentRichInput.override_enabled(true);
|
||||
|
||||
@@ -8693,7 +8688,6 @@ fn ctrl_enter_submits_when_submit_on_ctrl_enter_is_true() {
|
||||
|
||||
#[test]
|
||||
fn ctrl_enter_with_selection_preserves_selection_in_submit_when_setting_is_true() {
|
||||
|
||||
App::test((), |mut app| async move {
|
||||
let _cli_agent_flag = FeatureFlag::CLIAgentRichInput.override_enabled(true);
|
||||
|
||||
@@ -8794,7 +8788,6 @@ fn editor_keymap_context_excludes_ctrl_enter_enters_agent_view_when_rich_input_i
|
||||
|
||||
#[test]
|
||||
fn enter_accepts_inline_menu_item_when_submit_on_ctrl_enter_is_true() {
|
||||
|
||||
App::test((), |mut app| async move {
|
||||
let _cli_agent_flag = FeatureFlag::CLIAgentRichInput.override_enabled(true);
|
||||
|
||||
@@ -8976,8 +8969,8 @@ fn unfreeze_agent_input_does_not_clear_buffer() {
|
||||
|
||||
#[test]
|
||||
fn ctrl_enter_inserts_newline_in_normal_input_after_rich_input_closes() {
|
||||
|
||||
App::test((), |mut app| async move {
|
||||
use crate::editor::EnterAction;
|
||||
let _cli_agent_flag = FeatureFlag::CLIAgentRichInput.override_enabled(true);
|
||||
|
||||
initialize_app(&mut app);
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
use settings::macros::define_settings_group;
|
||||
use settings::{RespectUserSyncSetting, Setting, SupportedPlatforms, SyncToCloud};
|
||||
use galaxyui::keymap::Keystroke;
|
||||
use galaxyui::{AppContext, DisplayIdx, ModelContext};
|
||||
use settings::macros::define_settings_group;
|
||||
use settings::{
|
||||
ChangeEventReason, RespectUserSyncSetting, Setting, SupportedPlatforms, SyncToCloud,
|
||||
};
|
||||
|
||||
use crate::report_if_error;
|
||||
use crate::root_view::{update_quake_window_bounds, QuakeModePinPosition};
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
use settings::macros::define_settings_group;
|
||||
use settings::{RespectUserSyncSetting, Setting, SupportedPlatforms, SyncToCloud};
|
||||
use galaxyui::{AppContext, SingletonEntity};
|
||||
use settings::macros::define_settings_group;
|
||||
use settings::{
|
||||
ChangeEventReason, RespectUserSyncSetting, Setting, SupportedPlatforms, SyncToCloud,
|
||||
};
|
||||
|
||||
use crate::features::FeatureFlag;
|
||||
|
||||
|
||||
@@ -15,9 +15,9 @@ use std::path::{Path, PathBuf};
|
||||
|
||||
use futures::future::BoxFuture;
|
||||
use futures::FutureExt as _;
|
||||
use galaxy_core::SessionId;
|
||||
use galaxyui::{AppContext, SingletonEntity as _};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use galaxy_core::SessionId;
|
||||
|
||||
use super::shell::DirectShellStarter;
|
||||
#[cfg(feature = "local_tty")]
|
||||
|
||||
@@ -2,12 +2,12 @@ use std::ffi::OsString;
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::{io, process};
|
||||
|
||||
use itertools::Itertools as _;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use typed_path::UnixPathBuf;
|
||||
use galaxy_core::channel::{Channel, ChannelState};
|
||||
use galaxy_core::session_id::SessionId;
|
||||
use galaxy_util::path::{canonicalize_git_bash_path, is_msys2_path, warp_shell_path};
|
||||
use itertools::Itertools as _;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use typed_path::UnixPathBuf;
|
||||
|
||||
use crate::terminal::available_shells::AvailableShell;
|
||||
use crate::terminal::bootstrap::{generate_session_id, init_shell_script_for_shell};
|
||||
|
||||
@@ -10,14 +10,14 @@ use std::thread::JoinHandle;
|
||||
|
||||
use anyhow::Context as _;
|
||||
use async_broadcast::InactiveReceiver;
|
||||
use galaxy_core::SessionId;
|
||||
use galaxyui::r#async::executor::Background;
|
||||
use galaxyui::{AppContext, Entity, ModelContext, ModelHandle, SingletonEntity, ViewHandle};
|
||||
#[cfg(unix)]
|
||||
use nix::sys::termios::LocalFlags;
|
||||
use parking_lot::{FairMutex, Mutex};
|
||||
use pathfinder_geometry::vector::Vector2F;
|
||||
use settings::Setting as _;
|
||||
use galaxy_core::SessionId;
|
||||
use galaxyui::r#async::executor::Background;
|
||||
use galaxyui::{AppContext, Entity, ModelContext, ModelHandle, SingletonEntity, ViewHandle};
|
||||
|
||||
use super::event_loop::EventLoop;
|
||||
use super::shell::{ShellStarter, ShellStarterSource};
|
||||
|
||||
@@ -4,6 +4,8 @@ use std::rc::Rc;
|
||||
use std::sync::mpsc::SyncSender;
|
||||
use std::sync::Arc;
|
||||
|
||||
use galaxy_core::execution_mode::AppExecutionMode;
|
||||
use galaxy_core::send_telemetry_from_ctx;
|
||||
use parking_lot::FairMutex;
|
||||
use session_sharing_protocol::common::{
|
||||
ActivePrompt, AgentPromptFailureReason, CLIAgentSessionState, CommandExecutionFailureReason,
|
||||
@@ -19,8 +21,6 @@ use session_sharing_protocol::sharer::{
|
||||
QuotaType, RemoveGuestResponse, SessionEndedReason, SessionSourceType,
|
||||
TeamAccessLevelUpdateResponse, UpdatePendingUserRoleResponse,
|
||||
};
|
||||
use galaxy_core::execution_mode::AppExecutionMode;
|
||||
use galaxy_core::send_telemetry_from_ctx;
|
||||
use warpui::{AppContext, ModelHandle, SingletonEntity, ViewHandle, WindowId};
|
||||
|
||||
use super::terminal_manager::{TerminalManager, TerminalSurfaceInit, TerminalSurfaceResult};
|
||||
|
||||
@@ -13,6 +13,8 @@ use std::{io, ptr};
|
||||
|
||||
use anyhow::{Context as _, Error, Result};
|
||||
use command::blocking::Command;
|
||||
use galaxy_core::channel::ChannelState;
|
||||
use galaxy_core::features::FeatureFlag;
|
||||
use itertools::Itertools;
|
||||
use libc::{self, c_int, winsize, TIOCSCTTY};
|
||||
use mio::unix::SourceFd;
|
||||
@@ -21,8 +23,6 @@ use nix::pty::openpty;
|
||||
use nix::sys::termios::{self, InputFlags, SetArg};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use signal_hook_mio::v1_0::Signals;
|
||||
use galaxy_core::channel::ChannelState;
|
||||
use galaxy_core::features::FeatureFlag;
|
||||
use warpui::{AppContext, SingletonEntity};
|
||||
|
||||
use super::event_loop::{PTY_TOKEN, SIGNALS_TOKEN};
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
use galaxy_util::path::TargetDirError;
|
||||
use std::mem::transmute;
|
||||
use std::path::Path;
|
||||
|
||||
use galaxy_util::path::TargetDirError;
|
||||
use thiserror::Error;
|
||||
use windows::core::{s, HRESULT, HSTRING, PCWSTR};
|
||||
use windows::Win32::Foundation::HANDLE;
|
||||
|
||||
@@ -12,13 +12,10 @@ mod package_installers;
|
||||
pub use galaxy_terminal::shell::{self, ShellLaunchData};
|
||||
use galaxyui::geometry::vector::Vector2F;
|
||||
use galaxyui::units::{IntoPixels, Lines, Pixels};
|
||||
use galaxyui::AppContext;
|
||||
use galaxyui::WindowId;
|
||||
use galaxyui::{AppContext, WindowId};
|
||||
pub(crate) use history::UpArrowHistoryConfig;
|
||||
pub use history::{History, HistoryEntry, HistoryEvent, ShellHost};
|
||||
pub use view::{Event, TerminalView};
|
||||
pub use galaxy_terminal::shell::{self, ShellLaunchData};
|
||||
use galaxyui::{AppContext, WindowId};
|
||||
mod block_list_settings;
|
||||
|
||||
mod alias;
|
||||
|
||||
@@ -3,12 +3,12 @@ use std::io;
|
||||
use std::ops::{Range, RangeInclusive};
|
||||
use std::sync::Arc;
|
||||
|
||||
use galaxy_core::semantic_selection::SemanticSelection;
|
||||
use itertools::Itertools;
|
||||
use num_traits::Float as _;
|
||||
use parking_lot::Mutex;
|
||||
use pathfinder_color::ColorU;
|
||||
use vec1::Vec1;
|
||||
use galaxy_core::semantic_selection::SemanticSelection;
|
||||
use warp_terminal::model::{KeyboardModes, KeyboardModesApplyBehavior};
|
||||
use warpui::text::SelectionType;
|
||||
use warpui::units::Lines;
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
use std::collections::HashSet;
|
||||
use std::path::PathBuf;
|
||||
|
||||
use galaxy_core::command::ExitCode;
|
||||
use ordered_float::OrderedFloat;
|
||||
use serde::{Deserialize, Deserializer, Serialize};
|
||||
use galaxy_core::command::ExitCode;
|
||||
|
||||
use crate::terminal::model::block::BlockId;
|
||||
use crate::terminal::model::session::SessionId;
|
||||
|
||||
@@ -22,6 +22,7 @@ use byte_unit::{Byte, Unit as ByteUnit};
|
||||
pub use dcs_hooks::*;
|
||||
pub use galaxy_terminal::model::ansi::control_sequence_parameters::*;
|
||||
use galaxy_terminal::model::{KeyboardModes, KeyboardModesApplyBehavior};
|
||||
use galaxyui::color::ColorU;
|
||||
pub use handler::*;
|
||||
use hex;
|
||||
use instant::Instant;
|
||||
@@ -29,8 +30,6 @@ use itertools::Itertools;
|
||||
use lazy_static::lazy_static;
|
||||
use log::debug;
|
||||
use vte::{Params, Parser as VteParser, Perform as VtePerform};
|
||||
pub use galaxy_terminal::model::ansi::control_sequence_parameters::*;
|
||||
use galaxyui::color::ColorU;
|
||||
|
||||
use super::kitty::parse_kitty_chunk;
|
||||
use crate::features::FeatureFlag;
|
||||
|
||||
@@ -2,6 +2,7 @@ use std::collections::HashSet;
|
||||
use std::io;
|
||||
use std::path::PathBuf;
|
||||
|
||||
use galaxy_core::command::ExitCode;
|
||||
use hex;
|
||||
|
||||
use super::*;
|
||||
|
||||
@@ -12,6 +12,8 @@ use std::sync::Arc;
|
||||
|
||||
use chrono::{DateTime, Duration, FixedOffset, Local};
|
||||
use enum_iterator::all;
|
||||
use galaxy_core::command::ExitCode;
|
||||
use galaxy_core::features::FeatureFlag;
|
||||
use hex;
|
||||
use instant::Instant;
|
||||
pub use interaction_mode::*;
|
||||
@@ -19,8 +21,6 @@ use lazy_static::lazy_static;
|
||||
use pathfinder_color::ColorU;
|
||||
use pathfinder_geometry::vector::Vector2F;
|
||||
pub use serialized_block::*;
|
||||
use galaxy_core::command::ExitCode;
|
||||
use galaxy_core::features::FeatureFlag;
|
||||
use warp_terminal::model::grid::Dimensions as _;
|
||||
use warp_terminal::model::{KeyboardModes, KeyboardModesApplyBehavior};
|
||||
use warp_util::path::user_friendly_path;
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
use std::collections::HashSet;
|
||||
|
||||
use chrono::{DateTime, Local, TimeZone as _};
|
||||
use galaxy_core::command::ExitCode;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use serde_bytes_repr::{ByteFmtDeserializer, ByteFmtSerializer};
|
||||
use galaxy_core::command::ExitCode;
|
||||
|
||||
use super::AgentInteractionMetadata;
|
||||
use crate::ai::agent::conversation::AIConversationId;
|
||||
|
||||
@@ -8,16 +8,16 @@ use std::time::Duration;
|
||||
|
||||
use anyhow::anyhow;
|
||||
use chrono::{DateTime, Local};
|
||||
use instant::SystemTime;
|
||||
use selection::BlockListSelection;
|
||||
pub use selection::SelectionRange;
|
||||
use sum_tree::{Dimension, Item, SeekBias, SumTree};
|
||||
use galaxy_core::features::FeatureFlag;
|
||||
use galaxy_terminal::model::{KeyboardModes, KeyboardModesApplyBehavior};
|
||||
use galaxyui::color::ColorU;
|
||||
use galaxyui::r#async::executor::Background;
|
||||
use galaxyui::units::{IntoLines, IntoPixels, Lines};
|
||||
use galaxyui::{record_trace_event, AppContext, EntityId, ViewHandle};
|
||||
use instant::SystemTime;
|
||||
use selection::BlockListSelection;
|
||||
pub use selection::SelectionRange;
|
||||
use sum_tree::{Dimension, Item, SeekBias, SumTree};
|
||||
|
||||
use super::ansi::{Handler, InputBufferValue};
|
||||
use super::block::{BlockId, BlockSize, BlockState, SerializedAIMetadata};
|
||||
@@ -3384,6 +3384,42 @@ impl BlockList {
|
||||
self.maintain_pinned_to_bottom();
|
||||
}
|
||||
|
||||
pub(in crate::terminal) fn insert_rich_content_after_item(
|
||||
&mut self,
|
||||
after_item: RemovableBlocklistItem,
|
||||
item: RichContentItem,
|
||||
) -> bool {
|
||||
let after_index = match self.removable_blocklist_item_positions.get(&after_item) {
|
||||
Some(&idx) => idx,
|
||||
None => return false,
|
||||
};
|
||||
|
||||
let view_id = item.view_id;
|
||||
|
||||
self.finish_background_block();
|
||||
|
||||
let (new_tree, inserted_index) = {
|
||||
let mut cursor = self.block_heights.cursor::<TotalIndex, ()>();
|
||||
let mut prefix = cursor.slice(&TotalIndex(after_index.0 + 1), SeekBias::Right);
|
||||
let insertion_index = TotalIndex(prefix.summary().total_count);
|
||||
prefix.push(BlockHeightItem::RichContent(item));
|
||||
prefix.push_tree(cursor.suffix());
|
||||
(prefix, insertion_index)
|
||||
};
|
||||
|
||||
self.block_heights = new_tree;
|
||||
|
||||
self.update_block_height_indices(BlockHeightUpdate::Insertion(inserted_index), true);
|
||||
|
||||
self.removable_blocklist_item_positions
|
||||
.insert(RemovableBlocklistItem::RichContent(view_id), inserted_index);
|
||||
|
||||
self.mark_rich_content_dirty(view_id);
|
||||
self.maintain_pinned_to_bottom();
|
||||
self.event_proxy.send_wakeup_event();
|
||||
true
|
||||
}
|
||||
|
||||
pub(in crate::terminal) fn set_marked_text(
|
||||
&mut self,
|
||||
marked_text: &str,
|
||||
|
||||
@@ -3,13 +3,13 @@ use std::fmt::Debug;
|
||||
use std::mem;
|
||||
use std::ops::RangeInclusive;
|
||||
|
||||
use sum_tree::SeekBias;
|
||||
use vec1::{vec1, Vec1};
|
||||
use galaxy_core::semantic_selection::SemanticSelection;
|
||||
use galaxy_terminal::model::grid::CellType;
|
||||
use galaxyui::text::{IsRect, SelectionType};
|
||||
use galaxyui::units::{IntoLines as _, Lines};
|
||||
use galaxyui::{AppContext, EntityId, ViewAsRef as _};
|
||||
use sum_tree::SeekBias;
|
||||
use vec1::{vec1, Vec1};
|
||||
|
||||
use super::{
|
||||
BlockHeight, BlockHeightItem, BlockHeightSummary, BlockList, BlockListPoint, RichContentItem,
|
||||
|
||||
@@ -234,10 +234,7 @@ impl RegexDFAs {
|
||||
// triggers a match for the last point.
|
||||
let mut last_point = None;
|
||||
|
||||
'outer: loop {
|
||||
let Some(cursor_item) = cursor.current_item() else {
|
||||
break;
|
||||
};
|
||||
'outer: while let Some(cursor_item) = cursor.current_item() {
|
||||
let c = cursor_item.content_char();
|
||||
let current_point = cursor_item.point();
|
||||
|
||||
|
||||
@@ -21,12 +21,6 @@ use std::ops::{Range, RangeInclusive};
|
||||
|
||||
use bounded_vec_deque::BoundedVecDeque;
|
||||
use filtering::FilterState;
|
||||
use itertools::Itertools;
|
||||
use lazy_static::lazy_static;
|
||||
use string_offset::ByteOffset;
|
||||
use unicode_general_category::{get_general_category, GeneralCategory};
|
||||
use unicode_width::UnicodeWidthChar;
|
||||
use urlocator::{UrlLocation, UrlLocator};
|
||||
use galaxy_core::features::FeatureFlag;
|
||||
use galaxy_core::semantic_selection::{SemanticSelection, SMART_SELECT_MATCH_WINDOW_LIMIT};
|
||||
use galaxy_core::{safe_assert, safe_assert_eq};
|
||||
@@ -35,6 +29,12 @@ pub use galaxy_terminal::model::TermMode;
|
||||
use galaxy_terminal::model::{KeyboardModes, KeyboardModesApplyBehavior};
|
||||
use galaxy_util::path::CleanPathResult;
|
||||
use galaxyui::color::ColorU;
|
||||
use itertools::Itertools;
|
||||
use lazy_static::lazy_static;
|
||||
use string_offset::ByteOffset;
|
||||
use unicode_general_category::{get_general_category, GeneralCategory};
|
||||
use unicode_width::UnicodeWidthChar;
|
||||
use urlocator::{UrlLocation, UrlLocator};
|
||||
|
||||
use super::displayed_output::DisplayedOutput;
|
||||
use super::grapheme_cursor::{self, GraphemeCursor};
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
// The code in this file is adapted from the alacritty_terminal crate under the
|
||||
// Apache license; see: crates/galaxy_terminal/src/model/LICENSE-ALACRITTY.
|
||||
|
||||
use string_offset::ByteOffset;
|
||||
use galaxy_terminal::model::grid::cell::{self, LineLength as _};
|
||||
use galaxy_terminal::model::grid::Dimensions as _;
|
||||
use galaxy_terminal::model::{Point, VisiblePoint, VisibleRow};
|
||||
use string_offset::ByteOffset;
|
||||
|
||||
use super::{FullGridClearBehavior, GridHandler};
|
||||
use crate::terminal::model::grid::Cursor;
|
||||
|
||||
@@ -4,10 +4,10 @@
|
||||
use std::cmp::max;
|
||||
use std::io;
|
||||
|
||||
use instant::Instant;
|
||||
use pathfinder_color::ColorU;
|
||||
use galaxy_terminal::model::{KeyboardModes, KeyboardModesApplyBehavior};
|
||||
use galaxyui::units::{IntoLines as _, Lines};
|
||||
use instant::Instant;
|
||||
use pathfinder_color::ColorU;
|
||||
|
||||
use super::ansi::{self, Attr, Handler, PrecmdValue, PreexecValue, Processor, PromptMetadata};
|
||||
use super::block::{BlockGridPoint, BlockSize};
|
||||
|
||||
@@ -6,20 +6,14 @@ use std::{env, fs, str};
|
||||
use anyhow::Result;
|
||||
use base64::Engine;
|
||||
use flate2::read::ZlibDecoder;
|
||||
use galaxyui::image_cache::{resize_dimensions, FitType};
|
||||
use galaxyui::{
|
||||
assets::asset_cache::Asset,
|
||||
image_cache::{CustomHeaderCreationError, CustomImageFormat, CustomImageHeader, ImageType},
|
||||
util::{parse_i32, parse_u32},
|
||||
};
|
||||
use pathfinder_geometry::vector::Vector2F;
|
||||
use rand::Rng;
|
||||
use galaxyui::assets::asset_cache::Asset;
|
||||
use galaxyui::image_cache::{
|
||||
resize_dimensions, CustomHeaderCreationError, CustomImageFormat, CustomImageHeader, FitType,
|
||||
ImageType,
|
||||
};
|
||||
use galaxyui::util::{parse_i32, parse_u32};
|
||||
use pathfinder_geometry::vector::Vector2F;
|
||||
use rand::Rng;
|
||||
|
||||
use super::escape_sequences::C1;
|
||||
|
||||
|
||||
@@ -37,10 +37,9 @@ pub mod terminal_model;
|
||||
#[cfg(any(test, feature = "test-util"))]
|
||||
pub mod test_utils;
|
||||
|
||||
pub use galaxy_terminal::model::{char_or_str, escape_sequences, grid::cell, mouse, BlockId};
|
||||
pub use galaxy_terminal::model::grid::cell;
|
||||
pub use galaxy_terminal::model::{char_or_str, escape_sequences, mouse, BlockId};
|
||||
pub use secrets::{
|
||||
set_user_and_enterprise_secret_regexes, ObfuscateSecrets, RespectObfuscatedSecrets, Secret,
|
||||
SecretHandle,
|
||||
};
|
||||
pub use galaxy_terminal::model::grid::cell;
|
||||
pub use galaxy_terminal::model::{char_or_str, escape_sequences, mouse, BlockId};
|
||||
|
||||
@@ -6,12 +6,12 @@ use std::sync::atomic::{AtomicUsize, Ordering};
|
||||
use std::sync::Arc;
|
||||
|
||||
use anyhow::anyhow;
|
||||
use galaxyui::elements::SecretRange;
|
||||
use galaxyui::EntityId;
|
||||
use itertools::Itertools;
|
||||
use lazy_static::lazy_static;
|
||||
use parking_lot::Mutex;
|
||||
use rangemap::{RangeInclusiveMap, StepLite};
|
||||
use galaxyui::elements::SecretRange;
|
||||
use galaxyui::EntityId;
|
||||
|
||||
use super::grid::grid_handler::GridHandler;
|
||||
use super::grid::{Dimensions as _, RespectDisplayedOutput};
|
||||
|
||||
@@ -10,8 +10,8 @@ use std::mem;
|
||||
use std::ops::RangeInclusive;
|
||||
pub use std::ops::{Range, RangeBounds};
|
||||
|
||||
use vec1::Vec1;
|
||||
use galaxy_core::semantic_selection::SemanticSelection;
|
||||
use vec1::Vec1;
|
||||
use warp_terminal::model::grid::cell;
|
||||
use warpui::text::SelectionType;
|
||||
use warpui::units::Lines;
|
||||
@@ -508,11 +508,10 @@ impl Selection {
|
||||
let mut range_end =
|
||||
grid_handler.semantic_search_right(end, |c| is_word_boundary_char(selection, c));
|
||||
|
||||
if selection.smart_select_enabled() && self.smart_select_override.is_some() {
|
||||
let smart_select_override = self
|
||||
.smart_select_override
|
||||
.as_ref()
|
||||
.expect("already checked this is Some");
|
||||
if let (true, Some(smart_select_override)) = (
|
||||
selection.smart_select_enabled(),
|
||||
&self.smart_select_override,
|
||||
) {
|
||||
if smart_select_override.contains(&start) || smart_select_override.contains(&end) {
|
||||
range_start = min(range_start, *smart_select_override.start());
|
||||
range_end = max(range_end, *smart_select_override.end());
|
||||
|
||||
@@ -15,12 +15,6 @@ use command_executor::remote_server_executor::RemoteServerCommandExecutor;
|
||||
pub use command_executor::*;
|
||||
use futures::future::{BoxFuture, Shared};
|
||||
use futures::FutureExt;
|
||||
use instant::Instant;
|
||||
use once_cell::sync::OnceCell;
|
||||
use parking_lot::{Mutex, RwLock};
|
||||
use smol_str::SmolStr;
|
||||
use typed_path::{TypedPath, TypedPathBuf, WindowsPath};
|
||||
use version_compare::Version;
|
||||
use galaxy_completer::completer::{
|
||||
CommandExitStatus, CommandOutput, PathSeparators, TopLevelCommandCaseSensitivity,
|
||||
};
|
||||
@@ -30,6 +24,12 @@ use galaxy_util::path::{
|
||||
};
|
||||
use galaxyui::platform::OperatingSystem;
|
||||
use galaxyui::{Entity, ModelContext, SingletonEntity};
|
||||
use instant::Instant;
|
||||
use once_cell::sync::OnceCell;
|
||||
use parking_lot::{Mutex, RwLock};
|
||||
use smol_str::SmolStr;
|
||||
use typed_path::{TypedPath, TypedPathBuf, WindowsPath};
|
||||
use version_compare::Version;
|
||||
|
||||
use super::ansi::{BootstrappedValue, InitShellValue, SSHValue};
|
||||
use super::terminal_model::{HistoryEntry, SubshellInitializationInfo};
|
||||
@@ -1279,22 +1279,17 @@ impl Session {
|
||||
ExecuteCommandOptions::default(),
|
||||
)
|
||||
.await;
|
||||
HashSet::from_iter(
|
||||
ShellType::PowerShell
|
||||
.executables_from_shell_command_output(
|
||||
windows_results,
|
||||
false, /* is_msys2 */
|
||||
)
|
||||
.into_iter(),
|
||||
)
|
||||
HashSet::from_iter(ShellType::PowerShell.executables_from_shell_command_output(
|
||||
windows_results,
|
||||
false, /* is_msys2 */
|
||||
))
|
||||
} else {
|
||||
HashSet::new()
|
||||
};
|
||||
new_commands.extend(
|
||||
shell
|
||||
.shell_type()
|
||||
.executables_from_shell_command_output(result, is_msys2)
|
||||
.into_iter(),
|
||||
.executables_from_shell_command_output(result, is_msys2),
|
||||
);
|
||||
if self.external_commands.set(new_commands).is_err() {
|
||||
log::warn!("External commands should only be loaded once per session.");
|
||||
|
||||
@@ -350,6 +350,7 @@ pub mod testing {
|
||||
use anyhow::anyhow;
|
||||
use command::r#async::Command;
|
||||
use galaxy_completer::completer::CommandOutput;
|
||||
use galaxy_terminal::shell::ShellType;
|
||||
|
||||
use super::*;
|
||||
|
||||
|
||||
@@ -7,12 +7,12 @@ use std::sync::Arc;
|
||||
use anyhow::Result;
|
||||
use async_channel::{self, Receiver, Sender};
|
||||
use async_trait::async_trait;
|
||||
use parking_lot::{Mutex, MutexGuard};
|
||||
use galaxy_completer::completer::{CommandExitStatus, CommandOutput};
|
||||
use galaxy_core::command::ExitCode;
|
||||
use galaxy_terminal::model::Point;
|
||||
use galaxy_util::on_cancel::OnCancelFutureExt;
|
||||
use galaxyui::r#async::block_on;
|
||||
use parking_lot::{Mutex, MutexGuard};
|
||||
|
||||
use super::ExecuteCommandOptions;
|
||||
use crate::safe_info;
|
||||
|
||||
@@ -7,6 +7,9 @@ use std::sync::Arc;
|
||||
|
||||
use async_channel::Sender;
|
||||
use base64::Engine;
|
||||
use galaxy_core::features::FeatureFlag;
|
||||
use galaxy_core::report_error;
|
||||
use galaxy_core::semantic_selection::SemanticSelection;
|
||||
use hex::FromHexError;
|
||||
use itertools::{Either, Itertools};
|
||||
use serde::Serialize;
|
||||
@@ -14,9 +17,6 @@ use session_sharing_protocol::common::{
|
||||
AICommandMetadata, OrderedTerminalEventType, ParticipantId,
|
||||
};
|
||||
use session_sharing_protocol::sharer::SessionSourceType;
|
||||
use galaxy_core::features::FeatureFlag;
|
||||
use galaxy_core::report_error;
|
||||
use galaxy_core::semantic_selection::SemanticSelection;
|
||||
pub use warp_terminal::model::BlockIndex;
|
||||
use warp_terminal::model::{KeyboardModes, KeyboardModesApplyBehavior};
|
||||
use warpui::assets::asset_cache::Asset;
|
||||
|
||||
@@ -5,11 +5,9 @@ use base64::engine::general_purpose::STANDARD as BASE64;
|
||||
use chrono::{DateTime, Local};
|
||||
use galaxy_core::command::ExitCode;
|
||||
use galaxy_terminal::model::ansi::ClearMode;
|
||||
use galaxyui::text::str_to_byte_vec;
|
||||
use galaxyui::text::SelectionType;
|
||||
use vec1::vec1;
|
||||
use galaxyui::r#async::executor::Background;
|
||||
use galaxyui::text::{str_to_byte_vec, SelectionType};
|
||||
use vec1::vec1;
|
||||
|
||||
use super::*;
|
||||
use crate::terminal::color;
|
||||
|
||||
@@ -9,9 +9,9 @@ use std::collections::HashMap;
|
||||
use std::io::sink;
|
||||
use std::sync::Arc;
|
||||
|
||||
use pathfinder_geometry::vector::Vector2F;
|
||||
use galaxy_core::command::ExitCode;
|
||||
use galaxyui::r#async::executor::Background;
|
||||
use pathfinder_geometry::vector::Vector2F;
|
||||
|
||||
use super::ansi::{
|
||||
CommandFinishedValue, CompletionMetadata, Handler, PrecmdValue, PreexecValue, Processor,
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
//! Utilities to check whether a command at the cursor position is likely a package installer command.
|
||||
|
||||
use galaxy_util::path::ShellFamily;
|
||||
use string_offset::ByteOffset;
|
||||
use warp_completer::parsers::simple::command_at_cursor_position;
|
||||
|
||||
use crate::completer::SessionContext;
|
||||
use crate::terminal::alias::is_expandable_alias;
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
use galaxy_util::path::ShellFamily;
|
||||
|
||||
use crate::terminal::package_installers::command_at_cursor_has_common_package_installer_prefix;
|
||||
|
||||
#[test]
|
||||
fn test_command_at_cursor_has_common_package_installer_prefix_basic_prefixes() {
|
||||
use galaxy_util::path::ShellFamily;
|
||||
|
||||
// A representative subset of prefixes from is_common_package_installer_prefix
|
||||
let prefixes = vec![
|
||||
// Node ecosystem
|
||||
@@ -93,7 +93,6 @@ fn test_command_at_cursor_has_common_package_installer_prefix_with_alias_expansi
|
||||
|
||||
#[test]
|
||||
fn test_command_at_cursor_has_common_package_installer_prefix_negative_cases() {
|
||||
|
||||
let cases = vec!["git add @", "echo @", "cargo run @"];
|
||||
|
||||
for buffer in cases {
|
||||
@@ -114,7 +113,6 @@ fn test_command_at_cursor_has_common_package_installer_prefix_negative_cases() {
|
||||
|
||||
#[test]
|
||||
fn test_command_at_cursor_has_common_package_installer_prefix_multi_segment_commands() {
|
||||
|
||||
// Test cases with multi-segment commands and different cursor positions
|
||||
let test_cases = vec![
|
||||
// npm install && git add @[cursor] -> should be false (cursor in git add segment)
|
||||
|
||||
@@ -1,11 +1,6 @@
|
||||
use std::sync::Arc;
|
||||
|
||||
use ai::api_keys::{ApiKeyManager, ApiKeyManagerEvent};
|
||||
use indexmap::IndexMap;
|
||||
use instant::{Duration, Instant};
|
||||
use parking_lot::FairMutex;
|
||||
use pathfinder_color::ColorU;
|
||||
use pathfinder_geometry::vector::vec2f;
|
||||
use galaxyui::elements::{
|
||||
Border, ChildAnchor, ChildView, ConstrainedBox, Container, CornerRadius, CrossAxisAlignment,
|
||||
DropShadow, Empty, Expanded, Flex, Hoverable, MainAxisAlignment, MainAxisSize,
|
||||
@@ -20,6 +15,11 @@ use galaxyui::{
|
||||
AppContext, Element, Entity, EntityId, ModelHandle, SingletonEntity as _, TypedActionView,
|
||||
View, ViewContext, ViewHandle,
|
||||
};
|
||||
use indexmap::IndexMap;
|
||||
use instant::{Duration, Instant};
|
||||
use parking_lot::FairMutex;
|
||||
use pathfinder_color::ColorU;
|
||||
use pathfinder_geometry::vector::vec2f;
|
||||
|
||||
const SIDECAR_POSITION_ID: &str = "model_sidecar_panel";
|
||||
|
||||
@@ -540,7 +540,7 @@ impl ProfileModelSelector {
|
||||
},
|
||||
);
|
||||
|
||||
let manage_api_key_button = ctx.add_typed_action_view(|_ctx| {
|
||||
let _manage_api_key_button = ctx.add_typed_action_view(|_ctx| {
|
||||
ActionButton::new("Manage", SecondaryTheme)
|
||||
.with_tooltip("Manage API keys")
|
||||
.with_size(ButtonSize::XSmall)
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
use std::fmt;
|
||||
use std::num::NonZeroUsize;
|
||||
|
||||
use settings::Setting as _;
|
||||
use galaxy_core::semantic_selection::SemanticSelection;
|
||||
use galaxyui::elements::{
|
||||
Container, DispatchEventResult, Element, EventHandler, SavePosition, SelectableArea,
|
||||
@@ -11,6 +10,7 @@ use galaxyui::fonts::{Properties, Weight};
|
||||
use galaxyui::presenter::ChildView;
|
||||
use galaxyui::units::Pixels;
|
||||
use galaxyui::{AppContext, EntityId, ModelAsRef, ModelHandle, SingletonEntity, ViewHandle};
|
||||
use settings::Setting as _;
|
||||
|
||||
use super::input::InputRenderStateModel;
|
||||
use super::model::block::Block;
|
||||
|
||||
@@ -6,11 +6,10 @@ use std::io::{self, Read};
|
||||
use std::path::Path;
|
||||
use std::sync::Arc;
|
||||
|
||||
use galaxyui::r#async::executor::Background;
|
||||
use serde::Deserialize;
|
||||
use serde_json as json;
|
||||
|
||||
use galaxyui::r#async::executor::Background;
|
||||
|
||||
use crate::terminal::color::Colors;
|
||||
use crate::terminal::event_listener::ChannelEventListener;
|
||||
use crate::terminal::model::block::BlockSize;
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
use settings::macros::define_settings_group;
|
||||
use settings::{RespectUserSyncSetting, Setting, SupportedPlatforms, SyncToCloud};
|
||||
use galaxyui::{AppContext, SingletonEntity};
|
||||
use settings::macros::define_settings_group;
|
||||
use settings::{
|
||||
ChangeEventReason, RespectUserSyncSetting, Setting, SupportedPlatforms, SyncToCloud,
|
||||
};
|
||||
|
||||
use crate::terminal::model::ObfuscateSecrets;
|
||||
use crate::workspaces::user_workspaces::UserWorkspaces;
|
||||
|
||||
@@ -2,13 +2,15 @@ pub mod new_session_shell;
|
||||
pub mod startup_shell;
|
||||
pub mod working_directory_config;
|
||||
|
||||
use galaxy_core::settings::macros::define_settings_group;
|
||||
use galaxy_core::settings::{
|
||||
ChangeEventReason, RespectUserSyncSetting, Setting, SupportedPlatforms, SyncToCloud,
|
||||
};
|
||||
use instant::Duration;
|
||||
use lazy_static::lazy_static;
|
||||
pub use new_session_shell::*;
|
||||
use serde::{Deserialize, Serialize};
|
||||
pub use startup_shell::*;
|
||||
use galaxy_core::settings::macros::define_settings_group;
|
||||
use galaxy_core::settings::{RespectUserSyncSetting, SupportedPlatforms, SyncToCloud};
|
||||
pub use working_directory_config::*;
|
||||
|
||||
use crate::ai::blocklist::agent_view::toolbar_item::AgentToolbarItemKind;
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
use galaxy_core::features::FeatureFlag;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use settings::macros::define_settings_group;
|
||||
use settings::{RespectUserSyncSetting, SupportedPlatforms, SyncToCloud};
|
||||
use galaxy_core::features::FeatureFlag;
|
||||
use settings::{
|
||||
ChangeEventReason, RespectUserSyncSetting, Setting, SupportedPlatforms, SyncToCloud,
|
||||
};
|
||||
use warpui::units::Pixels;
|
||||
use warpui::{AppContext, SingletonEntity};
|
||||
|
||||
|
||||
@@ -2,10 +2,6 @@ use std::ops::RangeInclusive;
|
||||
use std::sync::Arc;
|
||||
|
||||
use anyhow::Result;
|
||||
use parking_lot::FairMutex;
|
||||
use pathfinder_geometry::rect::RectF;
|
||||
use pathfinder_geometry::vector::{vec2f, Vector2F};
|
||||
use serde::Serialize;
|
||||
use galaxy_core::features::FeatureFlag;
|
||||
use galaxy_core::ui::theme::Fill;
|
||||
use galaxyui::browser::escape_html_attribute;
|
||||
@@ -31,6 +27,10 @@ use galaxyui::{
|
||||
LayoutContext, PaintContext, SingletonEntity, SizeConstraint, TypedActionView, View,
|
||||
ViewContext, ViewHandle,
|
||||
};
|
||||
use parking_lot::FairMutex;
|
||||
use pathfinder_geometry::rect::RectF;
|
||||
use pathfinder_geometry::vector::{vec2f, Vector2F};
|
||||
use serde::Serialize;
|
||||
|
||||
use super::grid_renderer::CellGlyphCache;
|
||||
use super::model::grid::RespectDisplayedOutput;
|
||||
@@ -53,7 +53,7 @@ use crate::terminal::model::terminal_model::BlockIndex;
|
||||
use crate::terminal::model::ObfuscateSecrets;
|
||||
use crate::terminal::safe_mode_settings::get_secret_obfuscation_mode;
|
||||
use crate::terminal::TerminalModel;
|
||||
use crate::themes::theme::WarpTheme;
|
||||
use crate::themes::theme::GalaxyTheme;
|
||||
use crate::ui_components::icons::Icon;
|
||||
use crate::util::bindings::CustomAction;
|
||||
use crate::view_components::ToastFlavor;
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
use std::collections::HashMap;
|
||||
|
||||
use itertools::Itertools;
|
||||
use session_sharing_protocol::common::SessionId;
|
||||
|
||||
use galaxyui::{
|
||||
AppContext, Entity, EntityId, ModelContext, SingletonEntity, ViewHandle, WeakViewHandle,
|
||||
WindowId,
|
||||
};
|
||||
use itertools::Itertools;
|
||||
use session_sharing_protocol::common::SessionId;
|
||||
|
||||
use super::SharedSessionActionSource;
|
||||
use crate::terminal::TerminalView;
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
use byte_unit::Byte;
|
||||
use galaxyui::{id, keymap::ContextPredicate, AppContext};
|
||||
use galaxyui::keymap::ContextPredicate;
|
||||
use galaxyui::{id, AppContext};
|
||||
use instant::Duration;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use session_sharing_protocol::common::{Role, Scrollback, ScrollbackBlock, SessionId};
|
||||
use session_sharing_protocol::sharer::SessionSourceType;
|
||||
use galaxyui::keymap::ContextPredicate;
|
||||
use galaxyui::{id, AppContext};
|
||||
|
||||
use super::model::block::SerializedBlock;
|
||||
use super::model::terminal_model::BlockIndex;
|
||||
|
||||
@@ -1,8 +1,3 @@
|
||||
use instant::Duration;
|
||||
use pathfinder_color::ColorU;
|
||||
use pathfinder_geometry::vector::vec2f;
|
||||
use session_sharing_protocol::common::{ParticipantId, ParticipantInfo, Role};
|
||||
use session_sharing_protocol::sharer::RoleUpdateReason;
|
||||
use galaxyui::accessibility::AccessibilityContent;
|
||||
use galaxyui::elements::{
|
||||
Border, ChildAnchor, ChildView, ConstrainedBox, Container, CornerRadius, CrossAxisAlignment,
|
||||
@@ -16,6 +11,11 @@ use galaxyui::{
|
||||
AppContext, Element, Entity, FocusContext, SingletonEntity, TypedActionView, View, ViewContext,
|
||||
ViewHandle,
|
||||
};
|
||||
use instant::Duration;
|
||||
use pathfinder_color::ColorU;
|
||||
use pathfinder_geometry::vector::vec2f;
|
||||
use session_sharing_protocol::common::{ParticipantId, ParticipantInfo, Role};
|
||||
use session_sharing_protocol::sharer::RoleUpdateReason;
|
||||
|
||||
use super::render_util::non_hoverable_participant_avatar;
|
||||
use crate::appearance::Appearance;
|
||||
|
||||
@@ -643,11 +643,8 @@ impl PresenceManager {
|
||||
/// Refreshes the block ID to participants selected cache to be consistent with the current participant data stored.
|
||||
fn refresh_block_id_to_participants_selected(&mut self) {
|
||||
self.block_id_to_participants_selected.clear();
|
||||
let participants = if self.sharer.is_some() {
|
||||
Either::Left(
|
||||
iter::once(self.sharer.as_ref().expect("sharer should exist"))
|
||||
.chain(self.present_viewers.values()),
|
||||
)
|
||||
let participants = if let Some(sharer) = &self.sharer {
|
||||
Either::Left(iter::once(sharer).chain(self.present_viewers.values()))
|
||||
} else {
|
||||
Either::Right(self.present_viewers.values())
|
||||
};
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
use pathfinder_color::ColorU;
|
||||
use pathfinder_geometry::vector::vec2f;
|
||||
use galaxyui::elements::{
|
||||
ChildAnchor, CornerRadius, Fill, Hoverable, MouseStateHandle, OffsetPositioning, ParentAnchor,
|
||||
ParentElement, ParentOffsetBounds, Radius, Stack,
|
||||
@@ -7,6 +5,8 @@ use galaxyui::elements::{
|
||||
use galaxyui::fonts::Weight;
|
||||
use galaxyui::ui_components::components::{UiComponent, UiComponentStyles};
|
||||
use galaxyui::{AppContext, Element, SingletonEntity};
|
||||
use pathfinder_color::ColorU;
|
||||
use pathfinder_geometry::vector::vec2f;
|
||||
|
||||
use super::presence_manager::{Participant, MUTED_AVATAR_BORDER_COLOR, MUTED_PARTICIPANT_COLOR};
|
||||
use crate::appearance::Appearance;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
use session_sharing_protocol::common::{ParticipantId, Role, RoleRequestId};
|
||||
use galaxyui::elements::Empty;
|
||||
use galaxyui::presenter::ChildView;
|
||||
use galaxyui::ui_components::components::{Coords, UiComponentStyles};
|
||||
use galaxyui::{AppContext, Element, Entity, View, ViewContext, ViewHandle};
|
||||
use session_sharing_protocol::common::{ParticipantId, Role, RoleRequestId};
|
||||
|
||||
use crate::modal::Modal;
|
||||
use crate::pane_group::TerminalPaneId;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
use std::collections::HashMap;
|
||||
|
||||
use session_sharing_protocol::common::{ParticipantId, Role, RoleRequestId};
|
||||
use galaxy_core::features::FeatureFlag;
|
||||
use session_sharing_protocol::common::{ParticipantId, Role, RoleRequestId};
|
||||
use warpui::elements::{
|
||||
ConstrainedBox, Container, CrossAxisAlignment, Flex, MainAxisAlignment, MouseStateHandle,
|
||||
ParentElement, Text,
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
use session_sharing_protocol::common::Role;
|
||||
use galaxyui::elements::{
|
||||
Container, CrossAxisAlignment, Flex, MainAxisAlignment, MouseStateHandle, ParentElement, Text,
|
||||
};
|
||||
@@ -7,6 +6,7 @@ use galaxyui::platform::Cursor;
|
||||
use galaxyui::ui_components::button::ButtonVariant;
|
||||
use galaxyui::ui_components::components::{UiComponent, UiComponentStyles};
|
||||
use galaxyui::{AppContext, Element, Entity, SingletonEntity, TypedActionView, View, ViewContext};
|
||||
use session_sharing_protocol::common::Role;
|
||||
|
||||
use super::{BODY_PADDING, HEADER_FONT_SIZE, MODAL_PADDING, TEXT_FONT_SIZE};
|
||||
use crate::appearance::Appearance;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user