Wrapping up bedrock implementation
This commit is contained in:
@@ -21,10 +21,10 @@ use crate::{
|
||||
},
|
||||
};
|
||||
use futures::{pin_mut, FutureExt as _};
|
||||
use itertools::Itertools;
|
||||
use settings::Setting as _;
|
||||
use galaxy_completer::completer::{CommandExitStatus, CommandOutput};
|
||||
use galaxy_core::user_preferences::GetUserPreferences;
|
||||
use itertools::Itertools;
|
||||
use settings::Setting as _;
|
||||
|
||||
use super::ChipResult;
|
||||
use super::{
|
||||
@@ -42,10 +42,6 @@ use super::{
|
||||
use crate::code_review::git_status_update::{GitRepoStatusEvent, GitRepoStatusModel};
|
||||
#[cfg(feature = "local_fs")]
|
||||
use crate::context_chips::display_chip::GitLineChanges;
|
||||
use std::collections::{HashMap, HashSet};
|
||||
use std::hash::{Hash as _, Hasher as _};
|
||||
use std::sync::Arc;
|
||||
use std::time::Duration;
|
||||
#[cfg(feature = "local_fs")]
|
||||
use galaxyui::WeakModelHandle;
|
||||
use galaxyui::{
|
||||
@@ -53,6 +49,10 @@ use galaxyui::{
|
||||
AppContext, ViewHandle,
|
||||
};
|
||||
use galaxyui::{Entity, ModelAsRef, ModelContext, ModelHandle, SingletonEntity};
|
||||
use std::collections::{HashMap, HashSet};
|
||||
use std::hash::{Hash as _, Hasher as _};
|
||||
use std::sync::Arc;
|
||||
use std::time::Duration;
|
||||
|
||||
#[cfg(test)]
|
||||
#[path = "current_prompt_test.rs"]
|
||||
|
||||
@@ -6,12 +6,12 @@ use std::{
|
||||
};
|
||||
|
||||
use async_trait::async_trait;
|
||||
use itertools::Itertools;
|
||||
use parking_lot::Mutex;
|
||||
use settings::Setting as _;
|
||||
use galaxy_core::command::ExitCode;
|
||||
use galaxyui::{App, SingletonEntity};
|
||||
use galaxyui_extras::user_preferences;
|
||||
use itertools::Itertools;
|
||||
use parking_lot::Mutex;
|
||||
use settings::Setting as _;
|
||||
|
||||
#[cfg(feature = "local_fs")]
|
||||
use crate::code_review::diff_state::DiffStats;
|
||||
@@ -43,9 +43,9 @@ use crate::{
|
||||
History,
|
||||
},
|
||||
};
|
||||
use galaxy_completer::completer::{CommandExitStatus, CommandOutput};
|
||||
#[cfg(feature = "local_fs")]
|
||||
use repo_metadata::DirectoryWatcher;
|
||||
use galaxy_completer::completer::{CommandExitStatus, CommandOutput};
|
||||
|
||||
use super::{ChipUpdateStatus, CurrentPrompt, PromptContext};
|
||||
|
||||
|
||||
@@ -2,10 +2,10 @@ use std::cmp::Ordering;
|
||||
|
||||
use crate::completer::SessionContext;
|
||||
use crate::ui_components::icons::Icon;
|
||||
use typed_path::TypedPathBuf;
|
||||
use galaxy_completer::completer::{EngineDirEntry, EngineFileType, PathCompletionContext};
|
||||
use galaxy_util::file_type::is_binary_file;
|
||||
use galaxyui::{r#async::SpawnedFutureHandle, AppContext, Entity, ModelContext};
|
||||
use typed_path::TypedPathBuf;
|
||||
|
||||
use super::display_menu::GenericMenuItem;
|
||||
|
||||
|
||||
@@ -12,7 +12,6 @@ use crate::{
|
||||
context_chips::display_chip::DisplayChipAction,
|
||||
terminal::input::MenuPositioningProvider,
|
||||
};
|
||||
use std::path::PathBuf;
|
||||
use galaxy_core::features::FeatureFlag;
|
||||
use galaxyui::{
|
||||
elements::{
|
||||
@@ -22,6 +21,7 @@ use galaxyui::{
|
||||
AppContext, Entity, EntityId, FocusContext, ModelHandle, SingletonEntity, TypedActionView,
|
||||
View, ViewContext, ViewHandle,
|
||||
};
|
||||
use std::path::PathBuf;
|
||||
|
||||
use super::{
|
||||
display_chip::{DisplayChip, DisplayChipConfig, PromptDisplayChipEvent},
|
||||
|
||||
@@ -24,9 +24,6 @@ use crate::util::bindings::keybinding_name_to_display_string;
|
||||
use crate::util::truncation::truncate_from_beginning;
|
||||
use crate::view_components::action_button::{ActionButtonTheme, NakedTheme};
|
||||
use crate::view_components::{FeaturePopup, NewFeaturePopupEvent, NewFeaturePopupLabel};
|
||||
use pathfinder_color::ColorU;
|
||||
use pathfinder_geometry::vector::{vec2f, Vector2F};
|
||||
use std::path::PathBuf;
|
||||
use galaxy_core::ui::theme::Fill;
|
||||
use galaxy_core::{features::FeatureFlag, ui::theme::color::internal_colors};
|
||||
use galaxyui::elements::Empty;
|
||||
@@ -44,6 +41,9 @@ use galaxyui::{
|
||||
AppContext, Element, Entity, EntityId, Gradient, ModelHandle, SingletonEntity, TypedActionView,
|
||||
View, ViewContext, ViewHandle,
|
||||
};
|
||||
use pathfinder_color::ColorU;
|
||||
use pathfinder_geometry::vector::{vec2f, Vector2F};
|
||||
use std::path::PathBuf;
|
||||
|
||||
use crate::appearance::Appearance;
|
||||
use crate::completer::SessionContext;
|
||||
|
||||
@@ -702,10 +702,13 @@ impl DisplayChipMenu {
|
||||
let image_key = format!("env-sidecar:{}:image", data.id);
|
||||
|
||||
let icon = |icon: Icon| {
|
||||
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()
|
||||
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()
|
||||
};
|
||||
|
||||
let label_text = |text: &str| {
|
||||
|
||||
@@ -9,9 +9,9 @@ use std::{
|
||||
};
|
||||
|
||||
use chrono::{Local, SecondsFormat};
|
||||
use galaxy_completer::completer::{CommandExitStatus, CommandOutput};
|
||||
#[cfg(test)]
|
||||
use parking_lot::Mutex;
|
||||
use galaxy_completer::completer::{CommandExitStatus, CommandOutput};
|
||||
|
||||
#[cfg(test)]
|
||||
use std::sync::Arc;
|
||||
|
||||
@@ -18,13 +18,13 @@ use std::collections::HashMap;
|
||||
use std::time::Duration;
|
||||
|
||||
use context_chip::PromptGenerator;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use smol_str::SmolStr;
|
||||
use galaxyui::{
|
||||
color::ColorU,
|
||||
elements::Text,
|
||||
fonts::{Properties, Weight},
|
||||
};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use smol_str::SmolStr;
|
||||
|
||||
use crate::ui_components::{blended_colors, icons::Icon};
|
||||
use crate::{appearance::Appearance, features::FeatureFlag, themes::theme::PromptColors};
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
use pathfinder_color::ColorU;
|
||||
use galaxy_core::ui::appearance::Appearance;
|
||||
use galaxy_core::ui::theme::Fill;
|
||||
use galaxyui::elements::{
|
||||
@@ -15,6 +14,7 @@ use galaxyui::{
|
||||
AppContext, Element, Entity, ModelHandle, SingletonEntity, TypedActionView, View, ViewContext,
|
||||
ViewHandle,
|
||||
};
|
||||
use pathfinder_color::ColorU;
|
||||
|
||||
use crate::menu::{self, Event as MenuEvent, Menu, MenuItemFields};
|
||||
use crate::terminal::model_events::{ModelEvent, ModelEventDispatcher};
|
||||
|
||||
@@ -7,10 +7,10 @@ use crate::{
|
||||
};
|
||||
|
||||
pub use super::ContextChipKind;
|
||||
use galaxyui::{Entity, GetSingletonModelHandle, ModelContext, SingletonEntity, UpdateModel};
|
||||
use itertools::Itertools;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use settings::Setting as _;
|
||||
use galaxyui::{Entity, GetSingletonModelHandle, ModelContext, SingletonEntity, UpdateModel};
|
||||
|
||||
#[cfg(test)]
|
||||
#[path = "prompt_tests.rs"]
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use galaxyui::{AppContext, SingletonEntity};
|
||||
use itertools::Itertools;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use galaxyui::{AppContext, SingletonEntity};
|
||||
|
||||
use crate::context_chips::ContextChipKind;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
use serde_json::Value;
|
||||
use galaxyui::{App, SingletonEntity};
|
||||
use serde_json::Value;
|
||||
|
||||
use super::Prompt;
|
||||
use crate::auth::AuthStateProvider;
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
//! The renderer for a single context chip.
|
||||
|
||||
use pathfinder_color::ColorU;
|
||||
use galaxy_core::ui::theme::Fill;
|
||||
use galaxyui::elements::{
|
||||
ConstrainedBox, DraggableState, Hoverable, MouseStateHandle, OffsetPositioning, ParentElement,
|
||||
@@ -14,6 +13,7 @@ use galaxyui::{
|
||||
elements::{Container, CrossAxisAlignment, Flex, Text},
|
||||
Element,
|
||||
};
|
||||
use pathfinder_color::ColorU;
|
||||
|
||||
use crate::appearance::Appearance;
|
||||
use crate::ui_components::icons;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
use pathfinder_color::ColorU;
|
||||
use galaxyui::fonts::Properties;
|
||||
use pathfinder_color::ColorU;
|
||||
|
||||
use crate::context_chips::{ChipAvailability, ChipDisabledReason, ContextChipKind};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user