Rebrand to Galaxy, major improvements to Bedrock support, still needs some TLC though
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
//! Context chips built into Warp
|
||||
|
||||
use chrono::Local;
|
||||
use warp_util::path::user_friendly_path;
|
||||
use galaxy_util::path::user_friendly_path;
|
||||
|
||||
use crate::terminal::shell::ShellType;
|
||||
|
||||
|
||||
@@ -23,8 +23,8 @@ use crate::{
|
||||
use futures::{pin_mut, FutureExt as _};
|
||||
use itertools::Itertools;
|
||||
use settings::Setting as _;
|
||||
use warp_completer::completer::{CommandExitStatus, CommandOutput};
|
||||
use warp_core::user_preferences::GetUserPreferences;
|
||||
use galaxy_completer::completer::{CommandExitStatus, CommandOutput};
|
||||
use galaxy_core::user_preferences::GetUserPreferences;
|
||||
|
||||
use super::ChipResult;
|
||||
use super::{
|
||||
@@ -47,12 +47,12 @@ use std::hash::{Hash as _, Hasher as _};
|
||||
use std::sync::Arc;
|
||||
use std::time::Duration;
|
||||
#[cfg(feature = "local_fs")]
|
||||
use warpui::WeakModelHandle;
|
||||
use warpui::{
|
||||
use galaxyui::WeakModelHandle;
|
||||
use galaxyui::{
|
||||
r#async::{SpawnedFutureHandle, Timer},
|
||||
AppContext, ViewHandle,
|
||||
};
|
||||
use warpui::{Entity, ModelAsRef, ModelContext, ModelHandle, SingletonEntity};
|
||||
use galaxyui::{Entity, ModelAsRef, ModelContext, ModelHandle, SingletonEntity};
|
||||
|
||||
#[cfg(test)]
|
||||
#[path = "current_prompt_test.rs"]
|
||||
@@ -592,7 +592,7 @@ impl CurrentPrompt {
|
||||
current_dir_path: Option<String>,
|
||||
environment_variables: Option<HashMap<String, String>>,
|
||||
timeout: Option<Duration>,
|
||||
) -> (Option<warp_completer::completer::CommandOutput>, bool) {
|
||||
) -> (Option<galaxy_completer::completer::CommandOutput>, bool) {
|
||||
let command_future = session
|
||||
.execute_command(
|
||||
&command,
|
||||
@@ -1217,7 +1217,7 @@ impl CurrentPrompt {
|
||||
#[cfg(test)]
|
||||
pub fn await_generators(
|
||||
&self,
|
||||
ctx: &mut warpui::AppContext,
|
||||
ctx: &mut galaxyui::AppContext,
|
||||
) -> futures_util::future::BoxFuture<'static, ()> {
|
||||
use futures_util::FutureExt;
|
||||
use itertools::Itertools;
|
||||
|
||||
@@ -9,9 +9,9 @@ use async_trait::async_trait;
|
||||
use itertools::Itertools;
|
||||
use parking_lot::Mutex;
|
||||
use settings::Setting as _;
|
||||
use warp_core::command::ExitCode;
|
||||
use warpui::{App, SingletonEntity};
|
||||
use warpui_extras::user_preferences;
|
||||
use galaxy_core::command::ExitCode;
|
||||
use galaxyui::{App, SingletonEntity};
|
||||
use galaxyui_extras::user_preferences;
|
||||
|
||||
#[cfg(feature = "local_fs")]
|
||||
use crate::code_review::diff_state::DiffStats;
|
||||
@@ -45,7 +45,7 @@ use crate::{
|
||||
};
|
||||
#[cfg(feature = "local_fs")]
|
||||
use repo_metadata::DirectoryWatcher;
|
||||
use warp_completer::completer::{CommandExitStatus, CommandOutput};
|
||||
use galaxy_completer::completer::{CommandExitStatus, CommandOutput};
|
||||
|
||||
use super::{ChipUpdateStatus, CurrentPrompt, PromptContext};
|
||||
|
||||
@@ -1170,7 +1170,7 @@ fn test_externally_driven_chip_skips_periodic_timer() {
|
||||
let repo_handle = watcher_handle.update(&mut app, |watcher, ctx| {
|
||||
watcher
|
||||
.add_directory(
|
||||
warp_util::standardized_path::StandardizedPath::from_local_canonicalized(
|
||||
galaxy_util::standardized_path::StandardizedPath::from_local_canonicalized(
|
||||
temp_dir.path(),
|
||||
)
|
||||
.unwrap(),
|
||||
@@ -1231,7 +1231,7 @@ fn test_git_status_change_updates_chip_value() {
|
||||
let repo_handle = watcher_handle.update(&mut app, |watcher, ctx| {
|
||||
watcher
|
||||
.add_directory(
|
||||
warp_util::standardized_path::StandardizedPath::from_local_canonicalized(
|
||||
galaxy_util::standardized_path::StandardizedPath::from_local_canonicalized(
|
||||
temp_dir.path(),
|
||||
)
|
||||
.unwrap(),
|
||||
|
||||
@@ -3,9 +3,9 @@ use std::cmp::Ordering;
|
||||
use crate::completer::SessionContext;
|
||||
use crate::ui_components::icons::Icon;
|
||||
use typed_path::TypedPathBuf;
|
||||
use warp_completer::completer::{EngineDirEntry, EngineFileType, PathCompletionContext};
|
||||
use warp_util::file_type::is_binary_file;
|
||||
use warpui::{r#async::SpawnedFutureHandle, AppContext, Entity, ModelContext};
|
||||
use galaxy_completer::completer::{EngineDirEntry, EngineFileType, PathCompletionContext};
|
||||
use galaxy_util::file_type::is_binary_file;
|
||||
use galaxyui::{r#async::SpawnedFutureHandle, AppContext, Entity, ModelContext};
|
||||
|
||||
use super::display_menu::GenericMenuItem;
|
||||
|
||||
|
||||
@@ -13,8 +13,8 @@ use crate::{
|
||||
terminal::input::MenuPositioningProvider,
|
||||
};
|
||||
use std::path::PathBuf;
|
||||
use warp_core::features::FeatureFlag;
|
||||
use warpui::{
|
||||
use galaxy_core::features::FeatureFlag;
|
||||
use galaxyui::{
|
||||
elements::{
|
||||
ChildView, Clipped, Container, CrossAxisAlignment, Element, Flex, MainAxisAlignment,
|
||||
MainAxisSize, ParentElement, Wrap,
|
||||
|
||||
@@ -27,14 +27,14 @@ use crate::view_components::{FeaturePopup, NewFeaturePopupEvent, NewFeaturePopup
|
||||
use pathfinder_color::ColorU;
|
||||
use pathfinder_geometry::vector::{vec2f, Vector2F};
|
||||
use std::path::PathBuf;
|
||||
use warp_core::ui::theme::Fill;
|
||||
use warp_core::{features::FeatureFlag, ui::theme::color::internal_colors};
|
||||
use warpui::elements::Empty;
|
||||
use warpui::keymap::Keystroke;
|
||||
use warpui::platform::Cursor;
|
||||
use warpui::ui_components::components::UiComponentStyles;
|
||||
use warpui::ui_components::components::{Coords, UiComponent};
|
||||
use warpui::{
|
||||
use galaxy_core::ui::theme::Fill;
|
||||
use galaxy_core::{features::FeatureFlag, ui::theme::color::internal_colors};
|
||||
use galaxyui::elements::Empty;
|
||||
use galaxyui::keymap::Keystroke;
|
||||
use galaxyui::platform::Cursor;
|
||||
use galaxyui::ui_components::components::UiComponentStyles;
|
||||
use galaxyui::ui_components::components::{Coords, UiComponent};
|
||||
use galaxyui::{
|
||||
elements::{
|
||||
Border, ChildAnchor, ChildView, ConstrainedBox, Container, CornerRadius,
|
||||
CrossAxisAlignment, Flex, Hoverable, MouseStateHandle, OffsetPositioning, ParentAnchor,
|
||||
@@ -78,12 +78,12 @@ pub fn render_git_diff_stats_content(
|
||||
let icon_element = if has_changes {
|
||||
// Use file icon when there are changes
|
||||
Icon::File
|
||||
.to_warpui_icon(Fill::Solid(internal_colors::neutral_6(theme)))
|
||||
.to_galaxyui_icon(Fill::Solid(internal_colors::neutral_6(theme)))
|
||||
.finish()
|
||||
} else {
|
||||
// Use diff icon when there are no changes
|
||||
Icon::Diff
|
||||
.to_warpui_icon(Fill::Solid(internal_colors::neutral_6(theme)))
|
||||
.to_galaxyui_icon(Fill::Solid(internal_colors::neutral_6(theme)))
|
||||
.finish()
|
||||
};
|
||||
|
||||
@@ -1810,7 +1810,7 @@ pub(crate) fn render_udi_chip(config: UdiChipConfig, appearance: &Appearance) ->
|
||||
if let Some(icon) = config.icon {
|
||||
content.add_child(
|
||||
Container::new(
|
||||
ConstrainedBox::new(icon.to_warpui_icon(Fill::Solid(config.color)).finish())
|
||||
ConstrainedBox::new(icon.to_galaxyui_icon(Fill::Solid(config.color)).finish())
|
||||
.with_height(icon_size)
|
||||
.with_width(icon_size)
|
||||
.finish(),
|
||||
|
||||
@@ -21,17 +21,17 @@ use crate::{
|
||||
},
|
||||
};
|
||||
use fuzzy_match::{match_indices_case_insensitive, FuzzyMatchResult};
|
||||
use warp_core::ui::theme::color::internal_colors;
|
||||
use warp_core::ui::{appearance::Appearance, builder::MIN_FONT_SIZE, theme::Fill};
|
||||
use warp_editor::editor::NavigationKey;
|
||||
use warpui::units::Pixels;
|
||||
use warpui::{
|
||||
use galaxy_core::ui::theme::color::internal_colors;
|
||||
use galaxy_core::ui::{appearance::Appearance, builder::MIN_FONT_SIZE, theme::Fill};
|
||||
use galaxy_editor::editor::NavigationKey;
|
||||
use galaxyui::units::Pixels;
|
||||
use galaxyui::{
|
||||
color::ColorU,
|
||||
elements::Highlight,
|
||||
fonts::{Properties, Weight},
|
||||
ui_components::components::{Coords, UiComponentStyles},
|
||||
};
|
||||
use warpui::{
|
||||
use galaxyui::{
|
||||
elements::{
|
||||
Border, ChildAnchor, ChildView, ClippedScrollStateHandle, ClippedScrollable,
|
||||
ConstrainedBox, Container, CornerRadius, CrossAxisAlignment, Dismiss, DispatchEventResult,
|
||||
@@ -47,8 +47,8 @@ use warpui::{
|
||||
ViewContext, ViewHandle, WindowId,
|
||||
};
|
||||
|
||||
use warpui::clipboard::ClipboardContent;
|
||||
use warpui::r#async::Timer;
|
||||
use galaxyui::clipboard::ClipboardContent;
|
||||
use galaxyui::r#async::Timer;
|
||||
|
||||
/// Trait for items that can be displayed in a generic menu
|
||||
pub trait GenericMenuItem: Debug + 'static {
|
||||
@@ -130,7 +130,7 @@ const ENV_SIDE_CAR_OUTER_RADIUS: f32 = 6.;
|
||||
const ENV_SIDE_CAR_INNER_RADIUS: f32 = 4.;
|
||||
|
||||
pub fn init(app: &mut AppContext) {
|
||||
use warpui::keymap::macros::*;
|
||||
use galaxyui::keymap::macros::*;
|
||||
|
||||
app.register_fixed_bindings([
|
||||
FixedBinding::new(
|
||||
@@ -702,7 +702,7 @@ impl DisplayChipMenu {
|
||||
let image_key = format!("env-sidecar:{}:image", data.id);
|
||||
|
||||
let icon = |icon: Icon| {
|
||||
ConstrainedBox::new(icon.to_warpui_icon(Fill::Solid(label_text_color)).finish())
|
||||
ConstrainedBox::new(icon.to_galaxyui_icon(Fill::Solid(label_text_color)).finish())
|
||||
.with_width(ENV_SIDE_CAR_ICON_SIZE)
|
||||
.with_height(ENV_SIDE_CAR_ICON_SIZE)
|
||||
.finish()
|
||||
@@ -825,7 +825,7 @@ impl DisplayChipMenu {
|
||||
theme.nonactive_ui_detail().into(),
|
||||
theme.active_ui_detail().into(),
|
||||
// Leave the scrollbar gutter background transparent.
|
||||
warpui::elements::Fill::None,
|
||||
galaxyui::elements::Fill::None,
|
||||
)
|
||||
.with_padding_start(0.)
|
||||
.with_padding_end(0.)
|
||||
@@ -919,7 +919,7 @@ impl DisplayChipMenu {
|
||||
updated_text.add_child(
|
||||
Container::new(
|
||||
ConstrainedBox::new(
|
||||
icon.to_warpui_icon(Fill::Solid(text_color)).finish(),
|
||||
icon.to_galaxyui_icon(Fill::Solid(text_color)).finish(),
|
||||
)
|
||||
.with_height(icon_size)
|
||||
.with_width(icon_size)
|
||||
@@ -1090,7 +1090,7 @@ impl DisplayChipMenu {
|
||||
let glyph_size = ENV_MENU_ICON_SIZE;
|
||||
|
||||
let icon_glyph = ConstrainedBox::new(
|
||||
icon.to_warpui_icon(Fill::Solid(main_text)).finish(),
|
||||
icon.to_galaxyui_icon(Fill::Solid(main_text)).finish(),
|
||||
)
|
||||
.with_width(glyph_size)
|
||||
.with_height(glyph_size)
|
||||
@@ -1117,7 +1117,7 @@ impl DisplayChipMenu {
|
||||
left_side.add_child(
|
||||
Container::new(
|
||||
ConstrainedBox::new(
|
||||
icon.to_warpui_icon(Fill::Solid(main_text)).finish(),
|
||||
icon.to_galaxyui_icon(Fill::Solid(main_text)).finish(),
|
||||
)
|
||||
.with_height(icon_size)
|
||||
.with_width(icon_size)
|
||||
@@ -1234,7 +1234,7 @@ impl DisplayChipMenu {
|
||||
scrollbar_width,
|
||||
theme.nonactive_ui_detail().into(),
|
||||
theme.active_ui_detail().into(),
|
||||
warpui::elements::Fill::None,
|
||||
galaxyui::elements::Fill::None,
|
||||
)
|
||||
.with_padding_end(0.)
|
||||
.with_padding_start(0.);
|
||||
|
||||
@@ -11,7 +11,7 @@ use std::{
|
||||
use chrono::{Local, SecondsFormat};
|
||||
#[cfg(test)]
|
||||
use parking_lot::Mutex;
|
||||
use warp_completer::completer::{CommandExitStatus, CommandOutput};
|
||||
use galaxy_completer::completer::{CommandExitStatus, CommandOutput};
|
||||
|
||||
#[cfg(test)]
|
||||
use std::sync::Arc;
|
||||
@@ -101,7 +101,7 @@ impl PromptChipLogger {
|
||||
|
||||
#[cfg(not(target_family = "wasm"))]
|
||||
fn init_runtime() -> Self {
|
||||
if !warp_core::channel::ChannelState::enable_debug_features() {
|
||||
if !galaxy_core::channel::ChannelState::enable_debug_features() {
|
||||
return Self::Disabled;
|
||||
}
|
||||
|
||||
@@ -133,8 +133,8 @@ impl PromptChipLogger {
|
||||
|
||||
#[cfg(not(target_family = "wasm"))]
|
||||
pub(crate) fn log_file_path() -> anyhow::Result<PathBuf> {
|
||||
let log_directory = warp_logging::log_directory()?;
|
||||
let channel_logfile_name = warp_core::channel::ChannelState::logfile_name();
|
||||
let log_directory = galaxy_logging::log_directory()?;
|
||||
let channel_logfile_name = galaxy_core::channel::ChannelState::logfile_name();
|
||||
Ok(log_directory.join(prompt_chip_log_filename(&channel_logfile_name)))
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
use super::*;
|
||||
use warp_completer::completer::{CommandExitStatus, CommandOutput};
|
||||
use galaxy_completer::completer::{CommandExitStatus, CommandOutput};
|
||||
|
||||
#[test]
|
||||
fn test_prompt_chip_log_filename_uses_channel_logfile_stem() {
|
||||
@@ -40,7 +40,7 @@ fn test_format_log_entry_preserves_stdout_and_stderr_sections() {
|
||||
stdout: b"https://github.com/warpdotdev/warp-internal/pull/123\n".to_vec(),
|
||||
stderr: b"warning output\n".to_vec(),
|
||||
status: CommandExitStatus::Success,
|
||||
exit_code: Some(warp_core::command::ExitCode::from(0)),
|
||||
exit_code: Some(galaxy_core::command::ExitCode::from(0)),
|
||||
};
|
||||
|
||||
let entry = format_log_entry(&ChipCommandLogEntry {
|
||||
|
||||
@@ -20,7 +20,7 @@ use std::time::Duration;
|
||||
use context_chip::PromptGenerator;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use smol_str::SmolStr;
|
||||
use warpui::{
|
||||
use galaxyui::{
|
||||
color::ColorU,
|
||||
elements::Text,
|
||||
fonts::{Properties, Weight},
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
use pathfinder_color::ColorU;
|
||||
use warp_core::ui::appearance::Appearance;
|
||||
use warp_core::ui::theme::Fill;
|
||||
use warpui::elements::{
|
||||
use galaxy_core::ui::appearance::Appearance;
|
||||
use galaxy_core::ui::theme::Fill;
|
||||
use galaxyui::elements::{
|
||||
ChildView, ClippedScrollStateHandle, ClippedScrollable, Dismiss, ParentElement, ScrollbarWidth,
|
||||
};
|
||||
use warpui::fonts::FamilyId;
|
||||
use warpui::{
|
||||
use galaxyui::fonts::FamilyId;
|
||||
use galaxyui::{
|
||||
elements::{
|
||||
ConstrainedBox, Container, CornerRadius, CrossAxisAlignment, DropShadow, Flex,
|
||||
MainAxisAlignment, MainAxisSize, Radius, Text,
|
||||
@@ -61,7 +61,7 @@ struct Styles {
|
||||
}
|
||||
|
||||
pub fn init(app: &mut AppContext) {
|
||||
use warpui::keymap::macros::*;
|
||||
use galaxyui::keymap::macros::*;
|
||||
|
||||
app.register_fixed_bindings([FixedBinding::new(
|
||||
"escape",
|
||||
@@ -168,7 +168,7 @@ impl NodeVersionPopupView {
|
||||
Container::new(
|
||||
ConstrainedBox::new(
|
||||
icons::Icon::NodeJS
|
||||
.to_warpui_icon(styles.tertiary_text_color.into())
|
||||
.to_galaxyui_icon(styles.tertiary_text_color.into())
|
||||
.finish(),
|
||||
)
|
||||
.with_width(24.)
|
||||
@@ -228,7 +228,7 @@ impl NodeVersionPopupView {
|
||||
Container::new(
|
||||
ConstrainedBox::new(
|
||||
icons::Icon::NodeJS
|
||||
.to_warpui_icon(styles.tertiary_text_color.into())
|
||||
.to_galaxyui_icon(styles.tertiary_text_color.into())
|
||||
.finish(),
|
||||
)
|
||||
.with_width(24.)
|
||||
@@ -372,7 +372,7 @@ impl View for NodeVersionPopupView {
|
||||
ScrollbarWidth::Auto,
|
||||
appearance.theme().nonactive_ui_detail().into(),
|
||||
appearance.theme().active_ui_detail().into(),
|
||||
warpui::elements::Fill::None,
|
||||
galaxyui::elements::Fill::None,
|
||||
)
|
||||
.with_overlayed_scrollbar()
|
||||
.finish();
|
||||
|
||||
@@ -10,7 +10,7 @@ pub use super::ContextChipKind;
|
||||
use itertools::Itertools;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use settings::Setting as _;
|
||||
use warpui::{Entity, GetSingletonModelHandle, ModelContext, SingletonEntity, UpdateModel};
|
||||
use galaxyui::{Entity, GetSingletonModelHandle, ModelContext, SingletonEntity, UpdateModel};
|
||||
|
||||
#[cfg(test)]
|
||||
#[path = "prompt_tests.rs"]
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use itertools::Itertools;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use warpui::{AppContext, SingletonEntity};
|
||||
use galaxyui::{AppContext, SingletonEntity};
|
||||
|
||||
use crate::context_chips::ContextChipKind;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
use serde_json::Value;
|
||||
use warpui::{App, SingletonEntity};
|
||||
use galaxyui::{App, SingletonEntity};
|
||||
|
||||
use super::Prompt;
|
||||
use crate::auth::AuthStateProvider;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use warpui::{AppContext, Entity, ModelContext, ModelHandle, SingletonEntity};
|
||||
use galaxyui::{AppContext, Entity, ModelContext, ModelHandle, SingletonEntity};
|
||||
|
||||
use crate::{
|
||||
menu::{MenuItem, MenuItemFields},
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
//! The renderer for a single context chip.
|
||||
|
||||
use pathfinder_color::ColorU;
|
||||
use warp_core::ui::theme::Fill;
|
||||
use warpui::elements::{
|
||||
use galaxy_core::ui::theme::Fill;
|
||||
use galaxyui::elements::{
|
||||
ConstrainedBox, DraggableState, Hoverable, MouseStateHandle, OffsetPositioning, ParentElement,
|
||||
ParentOffsetBounds, Stack,
|
||||
};
|
||||
use warpui::fonts::{Properties, Weight};
|
||||
use warpui::platform::Cursor;
|
||||
use warpui::ui_components::components::UiComponent;
|
||||
use warpui::Action;
|
||||
use warpui::{
|
||||
use galaxyui::fonts::{Properties, Weight};
|
||||
use galaxyui::platform::Cursor;
|
||||
use galaxyui::ui_components::components::UiComponent;
|
||||
use galaxyui::Action;
|
||||
use galaxyui::{
|
||||
elements::{Container, CrossAxisAlignment, Flex, Text},
|
||||
Element,
|
||||
};
|
||||
@@ -134,7 +134,7 @@ impl Renderer {
|
||||
let button = Hoverable::new(self.remove_button_state_handle.clone(), |_| {
|
||||
ConstrainedBox::new(
|
||||
icons::Icon::X
|
||||
.to_warpui_icon(appearance.theme().ui_error_color().into())
|
||||
.to_galaxyui_icon(appearance.theme().ui_error_color().into())
|
||||
.finish(),
|
||||
)
|
||||
.with_height(icon_size)
|
||||
@@ -164,7 +164,7 @@ impl Renderer {
|
||||
if let Some(icon) = self.kind.udi_icon() {
|
||||
content.add_child(
|
||||
Container::new(
|
||||
ConstrainedBox::new(icon.to_warpui_icon(Fill::Solid(color)).finish())
|
||||
ConstrainedBox::new(icon.to_galaxyui_icon(Fill::Solid(color)).finish())
|
||||
.with_height(font_size)
|
||||
.with_width(font_size)
|
||||
.finish(),
|
||||
@@ -214,8 +214,8 @@ impl Renderer {
|
||||
OffsetPositioning::offset_from_parent(
|
||||
vec2f(0., -2.5 * font_size),
|
||||
ParentOffsetBounds::Unbounded,
|
||||
warpui::elements::ParentAnchor::Center,
|
||||
warpui::elements::ChildAnchor::Center,
|
||||
galaxyui::elements::ParentAnchor::Center,
|
||||
galaxyui::elements::ChildAnchor::Center,
|
||||
),
|
||||
);
|
||||
stack.finish()
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
use pathfinder_color::ColorU;
|
||||
use warpui::fonts::Properties;
|
||||
use galaxyui::fonts::Properties;
|
||||
|
||||
use crate::context_chips::{ChipAvailability, ChipDisabledReason, ContextChipKind};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user