Rebrand to Galaxy, major improvements to Bedrock support, still needs some TLC though
This commit is contained in:
@@ -38,9 +38,9 @@ sentry = { workspace = true, optional = true }
|
||||
shellexpand.workspace = true
|
||||
strum.workspace = true
|
||||
strum_macros.workspace = true
|
||||
warpui.workspace = true
|
||||
warpui_extras = { workspace = true, features = ["default"] }
|
||||
warp_graphql.workspace = true
|
||||
galaxyui.workspace = true
|
||||
galaxyui_extras = { workspace = true, features = ["default"] }
|
||||
galaxy_graphql.workspace = true
|
||||
warp_multi_agent_api.workspace = true
|
||||
dirs.workspace = true
|
||||
lazy_static.workspace = true
|
||||
@@ -53,9 +53,9 @@ tokio = { workspace = true, features = ["rt"] }
|
||||
futures.workspace = true
|
||||
generic-array = "0.14.7"
|
||||
derivative.workspace = true
|
||||
warp_core.workspace = true
|
||||
warp_terminal.workspace = true
|
||||
warp_util.workspace = true
|
||||
galaxy_core.workspace = true
|
||||
galaxy_terminal.workspace = true
|
||||
galaxy_util.workspace = true
|
||||
chrono.workspace = true
|
||||
persistence.workspace = true
|
||||
priority-queue = "2.3.1"
|
||||
@@ -79,7 +79,7 @@ notify-debouncer-full.workspace = true
|
||||
filetime = "0.2.25"
|
||||
tempfile.workspace = true
|
||||
virtual-fs.workspace = true
|
||||
warp_core = { workspace = true, features = ["test-util"] }
|
||||
galaxy_core = { workspace = true, features = ["test-util"] }
|
||||
|
||||
[build-dependencies]
|
||||
anyhow.workspace = true
|
||||
|
||||
@@ -2,7 +2,7 @@ use std::{path::PathBuf, time::Duration};
|
||||
|
||||
use itertools::Itertools as _;
|
||||
use uuid::Uuid;
|
||||
use warp_core::features::FeatureFlag;
|
||||
use galaxy_core::features::FeatureFlag;
|
||||
use warp_multi_agent_api as api;
|
||||
|
||||
use crate::{
|
||||
|
||||
@@ -6,7 +6,7 @@ use itertools::Itertools as _;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use strum_macros::EnumDiscriminants;
|
||||
use uuid::Uuid;
|
||||
use warp_terminal::model::BlockId;
|
||||
use galaxy_terminal::model::BlockId;
|
||||
|
||||
use crate::{
|
||||
agent::{
|
||||
@@ -704,7 +704,7 @@ impl AIAgentPtyWriteMode {
|
||||
bytes: impl Into<Vec<u8>>,
|
||||
is_bracketed_paste_enabled: bool,
|
||||
) -> Vec<u8> {
|
||||
use warp_terminal::model::escape_sequences;
|
||||
use galaxy_terminal::model::escape_sequences;
|
||||
|
||||
let bytes = bytes.into();
|
||||
match self {
|
||||
|
||||
@@ -4,9 +4,9 @@ use std::{fmt::Display, ops::Range, time::SystemTime};
|
||||
|
||||
use itertools::Itertools as _;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use warp_core::command::ExitCode;
|
||||
use galaxy_core::command::ExitCode;
|
||||
use warp_multi_agent_api::apply_file_diffs_result::success::UpdatedFileContent;
|
||||
use warp_terminal::model::BlockId;
|
||||
use galaxy_terminal::model::BlockId;
|
||||
|
||||
use crate::{
|
||||
agent::FileLocations,
|
||||
|
||||
@@ -2,7 +2,7 @@ use std::collections::HashMap;
|
||||
use std::ops::Range;
|
||||
|
||||
use itertools::Itertools as _;
|
||||
use warp_terminal::shell::ShellLaunchData;
|
||||
use galaxy_terminal::shell::ShellLaunchData;
|
||||
|
||||
use crate::agent::action_result::FileContext;
|
||||
use crate::{index::locations::CodeContextLocation, paths::shell_native_absolute_path};
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
pub use crate::aws_credentials::{AwsCredentials, AwsCredentialsState};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use warp_multi_agent_api as api;
|
||||
use warpui::{Entity, ModelContext, SingletonEntity};
|
||||
use warpui_extras::secure_storage::{self, AppContextExt};
|
||||
use galaxyui::{Entity, ModelContext, SingletonEntity};
|
||||
use galaxyui_extras::secure_storage::{self, AppContextExt};
|
||||
|
||||
const SECURE_STORAGE_KEY: &str = "AiApiKeys";
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
use std::time::SystemTime;
|
||||
|
||||
use chrono::{DateTime, Local};
|
||||
use warp_core::ui::Icon;
|
||||
use galaxy_core::ui::Icon;
|
||||
use warp_multi_agent_api as api;
|
||||
|
||||
/// Temporary AWS credentials loaded from the AWS SDK.
|
||||
|
||||
@@ -7,8 +7,8 @@ use ignore::gitignore::Gitignore;
|
||||
use repo_metadata::entry::IgnoredPathStrategy;
|
||||
use repo_metadata::Repository;
|
||||
use std::{path::Path, sync::Arc};
|
||||
use warp_core::safe_error;
|
||||
use warpui::{Entity, ModelContext, ModelHandle};
|
||||
use galaxy_core::safe_error;
|
||||
use galaxyui::{Entity, ModelContext, ModelHandle};
|
||||
|
||||
use super::{
|
||||
fragment_metadata::{FragmentMetadata, LeafToFragmentMetadata, LeafToFragmentMetadataUpdates},
|
||||
@@ -46,11 +46,11 @@ cfg_if::cfg_if! {
|
||||
full_source_code_embedding::sync_client::CodebaseIndexSyncOperation,
|
||||
full_source_code_embedding::FragmentLocation
|
||||
};
|
||||
use warp_core::send_telemetry_from_ctx;
|
||||
use warp_core::interval_timer::IntervalTimer;
|
||||
use warpui::r#async::Timer;
|
||||
use warpui::SingletonEntity;
|
||||
use warp_core::sync_queue::SyncQueue;
|
||||
use galaxy_core::send_telemetry_from_ctx;
|
||||
use galaxy_core::interval_timer::IntervalTimer;
|
||||
use galaxyui::r#async::Timer;
|
||||
use galaxyui::SingletonEntity;
|
||||
use galaxy_core::sync_queue::SyncQueue;
|
||||
use sha2::Digest;
|
||||
}
|
||||
}
|
||||
@@ -584,7 +584,7 @@ impl CodebaseIndex {
|
||||
let mut flushed_fragment_result = FlushFragmentResult::default();
|
||||
|
||||
if !changed_files.deletions().is_empty() {
|
||||
if warp_core::channel::ChannelState::enable_debug_features() {
|
||||
if galaxy_core::channel::ChannelState::enable_debug_features() {
|
||||
log::info!(
|
||||
"Trying to remove changed files: {:?}",
|
||||
changed_files.deletions()
|
||||
@@ -650,7 +650,7 @@ impl CodebaseIndex {
|
||||
}
|
||||
|
||||
if !changed_files.upsertions.is_empty() {
|
||||
if warp_core::channel::ChannelState::enable_debug_features() {
|
||||
if galaxy_core::channel::ChannelState::enable_debug_features() {
|
||||
log::debug!(
|
||||
"Trying to upsert changed files: {:?}",
|
||||
&changed_files.upsertions
|
||||
|
||||
@@ -22,8 +22,8 @@ use std::collections::HashMap;
|
||||
use std::ops::Range;
|
||||
use std::path::PathBuf;
|
||||
use std::sync::Arc;
|
||||
use warp_util::standardized_path::StandardizedPath;
|
||||
use warpui::{App, SingletonEntity};
|
||||
use galaxy_util::standardized_path::StandardizedPath;
|
||||
use galaxyui::{App, SingletonEntity};
|
||||
|
||||
use super::{
|
||||
CodebaseIndex, CodebaseIndexTimeStampMetadata, TreeSourceSyncState,
|
||||
|
||||
@@ -16,18 +16,18 @@ cfg_if::cfg_if! {
|
||||
use crate::index::path_passes_filters;
|
||||
use ignore::gitignore::Gitignore;
|
||||
use notify_debouncer_full::notify::{RecursiveMode, WatchFilter};
|
||||
use warp_core::features::FeatureFlag;
|
||||
use galaxy_core::features::FeatureFlag;
|
||||
use watcher::{BulkFilesystemWatcher, BulkFilesystemWatcherEvent};
|
||||
use warpui::r#async::Timer;
|
||||
use warp_core::{send_telemetry_from_ctx, report_if_error};
|
||||
use galaxyui::r#async::Timer;
|
||||
use galaxy_core::{send_telemetry_from_ctx, report_if_error};
|
||||
use crate::telemetry::AITelemetryEvent;
|
||||
use instant::Instant;
|
||||
use warp_core::channel::ChannelState;
|
||||
use warp_core::safe_warn;
|
||||
use galaxy_core::channel::ChannelState;
|
||||
use galaxy_core::safe_warn;
|
||||
}
|
||||
}
|
||||
use warp_core::safe_anyhow;
|
||||
use warpui::{AppContext, Entity, ModelContext, ModelHandle, SingletonEntity};
|
||||
use galaxy_core::safe_anyhow;
|
||||
use galaxyui::{AppContext, Entity, ModelContext, ModelHandle, SingletonEntity};
|
||||
|
||||
use super::{
|
||||
codebase_index::{CodebaseIndexEvent, RetrievalID, SyncProgress},
|
||||
@@ -618,7 +618,7 @@ impl CodebaseIndexManager {
|
||||
};
|
||||
|
||||
let standardized_path =
|
||||
match warp_util::standardized_path::StandardizedPath::from_local_canonicalized(
|
||||
match galaxy_util::standardized_path::StandardizedPath::from_local_canonicalized(
|
||||
repo_path,
|
||||
) {
|
||||
Ok(path) => path,
|
||||
|
||||
@@ -35,17 +35,17 @@ impl FromStr for NodeHash {
|
||||
}
|
||||
}
|
||||
|
||||
impl From<NodeHash> for warp_graphql::full_source_code_embedding::NodeHash {
|
||||
impl From<NodeHash> for galaxy_graphql::full_source_code_embedding::NodeHash {
|
||||
fn from(value: NodeHash) -> Self {
|
||||
warp_graphql::full_source_code_embedding::NodeHash(value.0.to_string())
|
||||
galaxy_graphql::full_source_code_embedding::NodeHash(value.0.to_string())
|
||||
}
|
||||
}
|
||||
|
||||
impl TryFrom<warp_graphql::full_source_code_embedding::NodeHash> for NodeHash {
|
||||
impl TryFrom<galaxy_graphql::full_source_code_embedding::NodeHash> for NodeHash {
|
||||
type Error = Error;
|
||||
|
||||
fn try_from(
|
||||
value: warp_graphql::full_source_code_embedding::NodeHash,
|
||||
value: galaxy_graphql::full_source_code_embedding::NodeHash,
|
||||
) -> Result<Self, Self::Error> {
|
||||
Ok(Self(MerkleHash::from_str(&value.0)?))
|
||||
}
|
||||
@@ -99,17 +99,17 @@ impl FromStr for ContentHash {
|
||||
}
|
||||
}
|
||||
|
||||
impl From<ContentHash> for warp_graphql::full_source_code_embedding::ContentHash {
|
||||
impl From<ContentHash> for galaxy_graphql::full_source_code_embedding::ContentHash {
|
||||
fn from(value: ContentHash) -> Self {
|
||||
warp_graphql::full_source_code_embedding::ContentHash(value.0.to_string())
|
||||
galaxy_graphql::full_source_code_embedding::ContentHash(value.0.to_string())
|
||||
}
|
||||
}
|
||||
|
||||
impl TryFrom<warp_graphql::full_source_code_embedding::ContentHash> for ContentHash {
|
||||
impl TryFrom<galaxy_graphql::full_source_code_embedding::ContentHash> for ContentHash {
|
||||
type Error = Error;
|
||||
|
||||
fn try_from(
|
||||
value: warp_graphql::full_source_code_embedding::ContentHash,
|
||||
value: galaxy_graphql::full_source_code_embedding::ContentHash,
|
||||
) -> Result<Self, Self::Error> {
|
||||
Ok(Self(MerkleHash::from_str(&value.0)?))
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ use rayon::iter::{IntoParallelIterator, ParallelIterator};
|
||||
use repo_metadata::entry::is_file_parsable;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use sha2::{Digest, Sha256};
|
||||
use warp_util::standardized_path::StandardizedPath;
|
||||
use galaxy_util::standardized_path::StandardizedPath;
|
||||
|
||||
use std::{
|
||||
collections::{HashMap, HashSet},
|
||||
|
||||
@@ -19,7 +19,7 @@ fn test_node_hash_for_directory_is_sorted() {
|
||||
sandbox.with_files(vec![Stub::FileWithContent("bar", "bar")]);
|
||||
|
||||
let mut directory_entry = DirectoryEntry {
|
||||
path: warp_util::standardized_path::StandardizedPath::try_from_local(dirs.tests())
|
||||
path: galaxy_util::standardized_path::StandardizedPath::try_from_local(dirs.tests())
|
||||
.unwrap(),
|
||||
children: vec![],
|
||||
ignored: false,
|
||||
@@ -66,7 +66,7 @@ fn test_merkle_node_upsert_file() {
|
||||
)]);
|
||||
|
||||
let mut directory_entry = DirectoryEntry {
|
||||
path: warp_util::standardized_path::StandardizedPath::try_from_local(dirs.tests())
|
||||
path: galaxy_util::standardized_path::StandardizedPath::try_from_local(dirs.tests())
|
||||
.unwrap(),
|
||||
children: vec![],
|
||||
ignored: false,
|
||||
@@ -275,7 +275,7 @@ fn test_merkle_node_upsert_file() {
|
||||
|
||||
// Create a new MerkleTree with the expected structure manually
|
||||
let mut expected_directory_entry = DirectoryEntry {
|
||||
path: warp_util::standardized_path::StandardizedPath::try_from_local(dirs.tests())
|
||||
path: galaxy_util::standardized_path::StandardizedPath::try_from_local(dirs.tests())
|
||||
.unwrap(),
|
||||
children: vec![],
|
||||
ignored: false,
|
||||
@@ -291,7 +291,7 @@ fn test_merkle_node_upsert_file() {
|
||||
|
||||
// Create a subdirectory entry for 'a'
|
||||
let mut subdirectory_entry = DirectoryEntry {
|
||||
path: warp_util::standardized_path::StandardizedPath::try_from_local(
|
||||
path: galaxy_util::standardized_path::StandardizedPath::try_from_local(
|
||||
&dirs.tests().join("a"),
|
||||
)
|
||||
.unwrap(),
|
||||
@@ -336,7 +336,7 @@ fn test_merkle_node_remove_file() {
|
||||
]);
|
||||
|
||||
let mut directory_entry = DirectoryEntry {
|
||||
path: warp_util::standardized_path::StandardizedPath::try_from_local(dirs.tests())
|
||||
path: galaxy_util::standardized_path::StandardizedPath::try_from_local(dirs.tests())
|
||||
.unwrap(),
|
||||
children: vec![],
|
||||
ignored: false,
|
||||
@@ -420,7 +420,7 @@ fn test_merkle_node_remove_file() {
|
||||
|
||||
// Create a new MerkleNode with only the remaining files
|
||||
let mut directory_entry_after_remove = DirectoryEntry {
|
||||
path: warp_util::standardized_path::StandardizedPath::try_from_local(dirs.tests())
|
||||
path: galaxy_util::standardized_path::StandardizedPath::try_from_local(dirs.tests())
|
||||
.unwrap(),
|
||||
children: vec![],
|
||||
ignored: false,
|
||||
@@ -461,7 +461,7 @@ fn test_merkle_node_multiple_operations() {
|
||||
]);
|
||||
|
||||
let mut directory_entry = DirectoryEntry {
|
||||
path: warp_util::standardized_path::StandardizedPath::try_from_local(dirs.tests())
|
||||
path: galaxy_util::standardized_path::StandardizedPath::try_from_local(dirs.tests())
|
||||
.unwrap(),
|
||||
children: vec![],
|
||||
ignored: false,
|
||||
@@ -570,7 +570,7 @@ fn test_merkle_node_multiple_operations() {
|
||||
);
|
||||
|
||||
let mut directory_entry = DirectoryEntry {
|
||||
path: warp_util::standardized_path::StandardizedPath::try_from_local(dirs.tests())
|
||||
path: galaxy_util::standardized_path::StandardizedPath::try_from_local(dirs.tests())
|
||||
.unwrap(),
|
||||
children: vec![],
|
||||
ignored: false,
|
||||
@@ -772,7 +772,7 @@ fn test_merkle_node_multiple_operations() {
|
||||
|
||||
// Create a new MerkleTree with the expected final structure manually
|
||||
let mut expected_directory_entry = DirectoryEntry {
|
||||
path: warp_util::standardized_path::StandardizedPath::try_from_local(dirs.tests())
|
||||
path: galaxy_util::standardized_path::StandardizedPath::try_from_local(dirs.tests())
|
||||
.unwrap(),
|
||||
children: vec![],
|
||||
ignored: false,
|
||||
@@ -788,7 +788,7 @@ fn test_merkle_node_multiple_operations() {
|
||||
|
||||
// Create nested subdirectory structure
|
||||
let mut subdir1_entry = DirectoryEntry {
|
||||
path: warp_util::standardized_path::StandardizedPath::try_from_local(
|
||||
path: galaxy_util::standardized_path::StandardizedPath::try_from_local(
|
||||
&dirs.tests().join("subdir1"),
|
||||
)
|
||||
.unwrap(),
|
||||
@@ -798,7 +798,7 @@ fn test_merkle_node_multiple_operations() {
|
||||
};
|
||||
|
||||
let mut subdir2_entry = DirectoryEntry {
|
||||
path: warp_util::standardized_path::StandardizedPath::try_from_local(
|
||||
path: galaxy_util::standardized_path::StandardizedPath::try_from_local(
|
||||
&dirs.tests().join("subdir1/subdir2"),
|
||||
)
|
||||
.unwrap(),
|
||||
|
||||
@@ -31,7 +31,7 @@ pub async fn construct_test_merkle_tree(
|
||||
]);
|
||||
|
||||
let mut root_dir_entry = DirectoryEntry {
|
||||
path: warp_util::standardized_path::StandardizedPath::try_from_local(dirs.tests()).unwrap(),
|
||||
path: galaxy_util::standardized_path::StandardizedPath::try_from_local(dirs.tests()).unwrap(),
|
||||
children: vec![],
|
||||
ignored: false,
|
||||
loaded: true,
|
||||
@@ -41,7 +41,7 @@ pub async fn construct_test_merkle_tree(
|
||||
.expect("Should be able to insert root file");
|
||||
|
||||
let mut top_dir_entry = DirectoryEntry {
|
||||
path: warp_util::standardized_path::StandardizedPath::try_from_local(
|
||||
path: galaxy_util::standardized_path::StandardizedPath::try_from_local(
|
||||
&dirs.tests().join("top_dir"),
|
||||
)
|
||||
.unwrap(),
|
||||
@@ -54,7 +54,7 @@ pub async fn construct_test_merkle_tree(
|
||||
.expect("Should be able to insert file1");
|
||||
|
||||
let mut subdir_a_entry = DirectoryEntry {
|
||||
path: warp_util::standardized_path::StandardizedPath::try_from_local(
|
||||
path: galaxy_util::standardized_path::StandardizedPath::try_from_local(
|
||||
&dirs.tests().join("top_dir/subdir_a"),
|
||||
)
|
||||
.unwrap(),
|
||||
@@ -70,7 +70,7 @@ pub async fn construct_test_merkle_tree(
|
||||
.expect("Should be able to insert file3");
|
||||
|
||||
let mut subdir_b_entry = DirectoryEntry {
|
||||
path: warp_util::standardized_path::StandardizedPath::try_from_local(
|
||||
path: galaxy_util::standardized_path::StandardizedPath::try_from_local(
|
||||
&dirs.tests().join("top_dir/subdir_b"),
|
||||
)
|
||||
.unwrap(),
|
||||
|
||||
@@ -18,7 +18,7 @@ pub use merkle_tree::{ContentHash, NodeHash};
|
||||
use fragment_metadata::FragmentMetadata;
|
||||
use string_offset::ByteOffset;
|
||||
use thiserror::Error;
|
||||
use warp_graphql::queries::rerank_fragments::FragmentLocationInput;
|
||||
use galaxy_graphql::queries::rerank_fragments::FragmentLocationInput;
|
||||
|
||||
#[derive(Error, Debug)]
|
||||
pub enum Error {
|
||||
@@ -94,48 +94,48 @@ pub struct RepoMetadata {
|
||||
pub path: Option<String>,
|
||||
}
|
||||
|
||||
impl From<RepoMetadata> for warp_graphql::full_source_code_embedding::RepoMetadata {
|
||||
impl From<RepoMetadata> for galaxy_graphql::full_source_code_embedding::RepoMetadata {
|
||||
fn from(val: RepoMetadata) -> Self {
|
||||
Self { path: val.path }
|
||||
}
|
||||
}
|
||||
|
||||
impl From<EmbeddingConfig> for warp_graphql::full_source_code_embedding::EmbeddingConfig {
|
||||
impl From<EmbeddingConfig> for galaxy_graphql::full_source_code_embedding::EmbeddingConfig {
|
||||
fn from(val: EmbeddingConfig) -> Self {
|
||||
match val {
|
||||
EmbeddingConfig::OpenAiTextSmall3_256 => {
|
||||
warp_graphql::full_source_code_embedding::EmbeddingConfig::OpenaiTextSmall3256
|
||||
galaxy_graphql::full_source_code_embedding::EmbeddingConfig::OpenaiTextSmall3256
|
||||
}
|
||||
EmbeddingConfig::VoyageCode3_512 => {
|
||||
warp_graphql::full_source_code_embedding::EmbeddingConfig::VoyageCode3512
|
||||
galaxy_graphql::full_source_code_embedding::EmbeddingConfig::VoyageCode3512
|
||||
}
|
||||
EmbeddingConfig::Voyage3_5_512 => {
|
||||
warp_graphql::full_source_code_embedding::EmbeddingConfig::Voyage35512
|
||||
galaxy_graphql::full_source_code_embedding::EmbeddingConfig::Voyage35512
|
||||
}
|
||||
EmbeddingConfig::Voyage3_5_Lite_512 => {
|
||||
warp_graphql::full_source_code_embedding::EmbeddingConfig::Voyage35Lite512
|
||||
galaxy_graphql::full_source_code_embedding::EmbeddingConfig::Voyage35Lite512
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl TryFrom<warp_graphql::full_source_code_embedding::EmbeddingConfig> for EmbeddingConfig {
|
||||
impl TryFrom<galaxy_graphql::full_source_code_embedding::EmbeddingConfig> for EmbeddingConfig {
|
||||
type Error = Error;
|
||||
|
||||
fn try_from(
|
||||
value: warp_graphql::full_source_code_embedding::EmbeddingConfig,
|
||||
value: galaxy_graphql::full_source_code_embedding::EmbeddingConfig,
|
||||
) -> Result<Self, Self::Error> {
|
||||
match value {
|
||||
warp_graphql::full_source_code_embedding::EmbeddingConfig::OpenaiTextSmall3256 => {
|
||||
galaxy_graphql::full_source_code_embedding::EmbeddingConfig::OpenaiTextSmall3256 => {
|
||||
Ok(Self::OpenAiTextSmall3_256)
|
||||
}
|
||||
warp_graphql::full_source_code_embedding::EmbeddingConfig::Voyage35Lite512 => {
|
||||
galaxy_graphql::full_source_code_embedding::EmbeddingConfig::Voyage35Lite512 => {
|
||||
Ok(Self::Voyage3_5_Lite_512)
|
||||
}
|
||||
warp_graphql::full_source_code_embedding::EmbeddingConfig::VoyageCode3512 => {
|
||||
galaxy_graphql::full_source_code_embedding::EmbeddingConfig::VoyageCode3512 => {
|
||||
Ok(Self::VoyageCode3_512)
|
||||
}
|
||||
warp_graphql::full_source_code_embedding::EmbeddingConfig::Voyage35512 => {
|
||||
galaxy_graphql::full_source_code_embedding::EmbeddingConfig::Voyage35512 => {
|
||||
Ok(Self::Voyage3_5_512)
|
||||
}
|
||||
}
|
||||
@@ -161,7 +161,7 @@ pub struct Fragment {
|
||||
location: FragmentLocation,
|
||||
}
|
||||
|
||||
impl From<Fragment> for warp_graphql::full_source_code_embedding::Fragment {
|
||||
impl From<Fragment> for galaxy_graphql::full_source_code_embedding::Fragment {
|
||||
fn from(val: Fragment) -> Self {
|
||||
Self {
|
||||
content: val.content,
|
||||
@@ -170,7 +170,7 @@ impl From<Fragment> for warp_graphql::full_source_code_embedding::Fragment {
|
||||
}
|
||||
}
|
||||
|
||||
impl From<Fragment> for warp_graphql::queries::rerank_fragments::RerankFragmentInput {
|
||||
impl From<Fragment> for galaxy_graphql::queries::rerank_fragments::RerankFragmentInput {
|
||||
fn from(val: Fragment) -> Self {
|
||||
Self {
|
||||
content: val.content,
|
||||
@@ -184,11 +184,11 @@ impl From<Fragment> for warp_graphql::queries::rerank_fragments::RerankFragmentI
|
||||
}
|
||||
}
|
||||
|
||||
impl TryFrom<warp_graphql::queries::rerank_fragments::RerankFragment> for Fragment {
|
||||
impl TryFrom<galaxy_graphql::queries::rerank_fragments::RerankFragment> for Fragment {
|
||||
type Error = Error;
|
||||
|
||||
fn try_from(
|
||||
val: warp_graphql::queries::rerank_fragments::RerankFragment,
|
||||
val: galaxy_graphql::queries::rerank_fragments::RerankFragment,
|
||||
) -> Result<Self, Self::Error> {
|
||||
Ok(Self {
|
||||
content: val.content,
|
||||
|
||||
@@ -8,15 +8,15 @@ use std::{
|
||||
time::Duration,
|
||||
};
|
||||
#[cfg(feature = "local_fs")]
|
||||
use warpui::ModelHandle;
|
||||
use galaxyui::ModelHandle;
|
||||
|
||||
cfg_if::cfg_if! {
|
||||
if #[cfg(feature = "local_fs")] {
|
||||
use super::Error as CodebaseIndexError;
|
||||
use std::sync::Arc;
|
||||
use warpui::ModelContext;
|
||||
use galaxyui::ModelContext;
|
||||
use anyhow::Context;
|
||||
use warp_core::safe_info;
|
||||
use galaxy_core::safe_info;
|
||||
use super::{store_client::StoreClient, CodebaseIndex, EmbeddingConfig};
|
||||
}
|
||||
}
|
||||
@@ -176,7 +176,7 @@ pub(super) fn snapshot_dir() -> Option<PathBuf> {
|
||||
#[cfg(feature = "local_fs")]
|
||||
{
|
||||
let base_dir =
|
||||
warp_core::paths::secure_state_dir().unwrap_or_else(warp_core::paths::state_dir);
|
||||
galaxy_core::paths::secure_state_dir().unwrap_or_else(galaxy_core::paths::state_dir);
|
||||
let snapshot_dir_path = base_dir.join(REPO_SNAPSHOT_SUBDIR_NAME);
|
||||
|
||||
if !snapshot_dir_path.is_dir() {
|
||||
@@ -202,12 +202,12 @@ mod tests;
|
||||
#[cfg(feature = "local_fs")]
|
||||
pub(super) fn migrate_snapshots_to_secure_dir_if_needed() -> anyhow::Result<()> {
|
||||
// Only perform migration if a secure state directory is available.
|
||||
let Some(secure_base) = warp_core::paths::secure_state_dir() else {
|
||||
let Some(secure_base) = galaxy_core::paths::secure_state_dir() else {
|
||||
return Ok(());
|
||||
};
|
||||
|
||||
let new_dir = secure_base.join(REPO_SNAPSHOT_SUBDIR_NAME);
|
||||
let old_dir = warp_core::paths::state_dir().join(REPO_SNAPSHOT_SUBDIR_NAME);
|
||||
let old_dir = galaxy_core::paths::state_dir().join(REPO_SNAPSHOT_SUBDIR_NAME);
|
||||
|
||||
if new_dir == old_dir {
|
||||
return Ok(());
|
||||
|
||||
@@ -8,7 +8,7 @@ use std::{
|
||||
mem,
|
||||
sync::Arc,
|
||||
};
|
||||
use warp_core::sync_queue::{IsTransientError, SyncQueue, SyncQueueTaskTrait};
|
||||
use galaxy_core::sync_queue::{IsTransientError, SyncQueue, SyncQueueTaskTrait};
|
||||
|
||||
use super::{CodebaseContextConfig, NodeHash};
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
use typed_path::{TypedPath, TypedPathBuf, WindowsPath};
|
||||
use warp_terminal::shell::ShellLaunchData;
|
||||
use warp_util::path::{
|
||||
use galaxy_terminal::shell::ShellLaunchData;
|
||||
use galaxy_util::path::{
|
||||
convert_msys2_to_windows_native_path, convert_wsl_to_windows_host_path, msys2_exe_to_root,
|
||||
};
|
||||
use warpui::platform::OperatingSystem;
|
||||
use galaxyui::platform::OperatingSystem;
|
||||
|
||||
fn use_unix_paths(shell: Option<&ShellLaunchData>) -> bool {
|
||||
OperatingSystem::get().is_linux()
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
use std::path::PathBuf;
|
||||
|
||||
#[cfg(windows)]
|
||||
use warp_terminal::shell::{ShellLaunchData, ShellType};
|
||||
use galaxy_terminal::shell::{ShellLaunchData, ShellType};
|
||||
|
||||
use super::*;
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ use anyhow::Result;
|
||||
use repo_metadata::repositories::RepoDetectionSource;
|
||||
use std::collections::HashMap;
|
||||
use std::path::{Path, PathBuf};
|
||||
use warpui::{Entity, ModelContext, SingletonEntity};
|
||||
use galaxyui::{Entity, ModelContext, SingletonEntity};
|
||||
|
||||
cfg_if::cfg_if! {
|
||||
if #[cfg(feature = "local_fs")] {
|
||||
|
||||
@@ -10,9 +10,9 @@ use std::sync::LazyLock;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use strum_macros::{Display, EnumString, VariantNames};
|
||||
use warp_core::ui::color::CLAUDE_ORANGE;
|
||||
use warp_core::ui::icons::Icon;
|
||||
use warp_core::ui::theme::Fill;
|
||||
use galaxy_core::ui::color::CLAUDE_ORANGE;
|
||||
use galaxy_core::ui::icons::Icon;
|
||||
use galaxy_core::ui::theme::Fill;
|
||||
|
||||
/// Represents a skill provider/origin (Agents, Claude, Codex, or Warp).
|
||||
#[derive(
|
||||
@@ -159,7 +159,7 @@ pub fn provider_rank(provider: SkillProvider) -> usize {
|
||||
|
||||
pub fn home_skills_path(provider: SkillProvider) -> Option<PathBuf> {
|
||||
if provider == SkillProvider::Warp {
|
||||
return warp_core::paths::warp_home_skills_dir();
|
||||
return galaxy_core::paths::warp_home_skills_dir();
|
||||
}
|
||||
let definition = SKILL_PROVIDER_DEFINITIONS
|
||||
.iter()
|
||||
@@ -220,13 +220,13 @@ mod tests {
|
||||
fn warp_home_skills_path_uses_warp_home_path() {
|
||||
assert_eq!(
|
||||
home_skills_path(SkillProvider::Warp),
|
||||
warp_core::paths::warp_home_skills_dir()
|
||||
galaxy_core::paths::warp_home_skills_dir()
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn warp_home_skill_path_is_home_warp_skill() {
|
||||
let Some(warp_home_skills_dir) = warp_core::paths::warp_home_skills_dir() else {
|
||||
let Some(warp_home_skills_dir) = galaxy_core::paths::warp_home_skills_dir() else {
|
||||
eprintln!("Skipping test: home directory not available");
|
||||
return;
|
||||
};
|
||||
|
||||
@@ -3,7 +3,7 @@ use std::time::Duration;
|
||||
use serde::Serialize;
|
||||
use serde_json::{json, Value};
|
||||
use strum_macros::{EnumDiscriminants, EnumIter};
|
||||
use warp_core::{
|
||||
use galaxy_core::{
|
||||
features::FeatureFlag,
|
||||
register_telemetry_event,
|
||||
telemetry::{EnablementState, TelemetryEvent, TelemetryEventDesc},
|
||||
@@ -127,7 +127,7 @@ impl TelemetryEvent for AITelemetryEvent {
|
||||
}
|
||||
|
||||
fn event_descs() -> impl Iterator<Item = Box<dyn TelemetryEventDesc>> {
|
||||
warp_core::telemetry::enum_events::<Self>()
|
||||
galaxy_core::telemetry::enum_events::<Self>()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ tower.workspace = true
|
||||
tower-http = { workspace = true, features = ["trace", "cors"] }
|
||||
tracing.workspace = true
|
||||
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
|
||||
warp_cli.workspace = true
|
||||
galaxy_cli.workspace = true
|
||||
|
||||
[target.'cfg(target_os = "windows")'.dependencies]
|
||||
win32job = "2.0.1"
|
||||
|
||||
@@ -16,4 +16,4 @@ futures.workspace = true
|
||||
log.workspace = true
|
||||
reqwest.workspace = true
|
||||
url.workspace = true
|
||||
warpui_core.workspace = true
|
||||
galaxyui_core.workspace = true
|
||||
|
||||
@@ -7,7 +7,7 @@ use async_fs::{OpenOptions, create_dir_all};
|
||||
use bytes::Bytes;
|
||||
use futures::AsyncWriteExt;
|
||||
use reqwest::Url;
|
||||
use warpui_core::assets::asset_cache::{
|
||||
use galaxyui_core::assets::asset_cache::{
|
||||
Asset, AssetCache, AssetSource, AssetState, AsyncAssetId, AsyncAssetType,
|
||||
};
|
||||
|
||||
|
||||
@@ -15,4 +15,4 @@ quote = "1"
|
||||
syn = { version = "2", default-features = false, features = ["derive", "parsing", "proc-macro", "printing"] }
|
||||
proc-macro2 = "1"
|
||||
sha2.workspace = true
|
||||
warp_util.workspace = true
|
||||
galaxy_util.workspace = true
|
||||
|
||||
@@ -31,7 +31,7 @@ use std::{
|
||||
};
|
||||
use syn::{parse::Parse, Token};
|
||||
use syn::{parse_macro_input, LitStr};
|
||||
use warp_util::assets::{ASSETS_DIR, ASYNC_ASSETS_DIR, BUNDLED_ASSETS_DIR, REMOTE_ASSETS_DIR};
|
||||
use galaxy_util::assets::{ASSETS_DIR, ASYNC_ASSETS_DIR, BUNDLED_ASSETS_DIR, REMOTE_ASSETS_DIR};
|
||||
|
||||
struct MacroArgs {
|
||||
/// The name of the asset. E.g. `jpg/jellyfish_bg.jpg`
|
||||
@@ -73,7 +73,7 @@ fn construct_bundled_asset(asset_name: &str, asset_dir: &str) -> Result<TokenStr
|
||||
if full_asset_path(asset_name, asset_dir).exists() {
|
||||
let full_location = format!("{asset_dir}/{asset_name}");
|
||||
Ok(quote! {
|
||||
::warpui::assets::asset_cache::AssetSource::Bundled {
|
||||
::galaxyui::assets::asset_cache::AssetSource::Bundled {
|
||||
path: #full_location .into(),
|
||||
}
|
||||
})
|
||||
@@ -102,13 +102,13 @@ fn construct_remote_asset(asset_name: &str, asset_dir: &str) -> Result<TokenStre
|
||||
let mut hasher = sha2::Sha256::new();
|
||||
hasher.update(&contents);
|
||||
let hash: [u8; 32] = hasher.finalize().into();
|
||||
let url = warp_util::assets::hashed_asset_url(&warp_util::assets::hashed_asset_path(
|
||||
let url = galaxy_util::assets::hashed_asset_url(&galaxy_util::assets::hashed_asset_path(
|
||||
Path::new(asset_name),
|
||||
&hash,
|
||||
));
|
||||
|
||||
Ok(quote! {
|
||||
::asset_cache::url_source(::warp_util::assets::make_absolute_url( #url ))
|
||||
::asset_cache::url_source(::galaxy_util::assets::make_absolute_url( #url ))
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -34,20 +34,20 @@ objc2-app-kit.workspace = true
|
||||
objc2-core-foundation.workspace = true
|
||||
objc2-core-graphics.workspace = true
|
||||
tempfile.workspace = true
|
||||
warpui.workspace = true
|
||||
galaxyui.workspace = true
|
||||
|
||||
[target.'cfg(target_os = "linux")'.dependencies]
|
||||
ashpd.workspace = true
|
||||
futures.workspace = true
|
||||
image.workspace = true
|
||||
url.workspace = true
|
||||
warpui.workspace = true
|
||||
galaxyui.workspace = true
|
||||
x11rb = { workspace = true, features = ["xtest"] }
|
||||
zbus.workspace = true
|
||||
|
||||
[target.'cfg(target_os = "windows")'.dependencies]
|
||||
image.workspace = true
|
||||
warpui.workspace = true
|
||||
galaxyui.workspace = true
|
||||
windows = { workspace = true, features = [
|
||||
"Win32_Foundation",
|
||||
"Win32_Graphics_Gdi",
|
||||
|
||||
@@ -12,7 +12,7 @@ mod session;
|
||||
|
||||
use async_trait::async_trait;
|
||||
use pathfinder_geometry::vector::Vector2I;
|
||||
use warpui::r#async::Timer;
|
||||
use galaxyui::r#async::Timer;
|
||||
|
||||
use crate::{Action, ActionResult, Options};
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ mod screenshot;
|
||||
|
||||
use async_trait::async_trait;
|
||||
use pathfinder_geometry::vector::Vector2I;
|
||||
use warpui::r#async::Timer;
|
||||
use galaxyui::r#async::Timer;
|
||||
use x11rb::connection::Connection;
|
||||
use x11rb::protocol::xproto::{self, ConnectionExt as _};
|
||||
use x11rb::protocol::xtest::ConnectionExt as _;
|
||||
|
||||
@@ -5,7 +5,7 @@ mod screenshot;
|
||||
mod util;
|
||||
|
||||
use async_trait::async_trait;
|
||||
use warpui::r#async::Timer;
|
||||
use galaxyui::r#async::Timer;
|
||||
|
||||
use crate::{Action, ActionResult, Options};
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ use objc2_core_graphics::{
|
||||
CGScrollEventUnit,
|
||||
};
|
||||
use pathfinder_geometry::vector::Vector2I;
|
||||
use warpui::r#async::Timer;
|
||||
use galaxyui::r#async::Timer;
|
||||
|
||||
use crate::{MouseButton, ScrollDirection, ScrollDistance};
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ mod mouse;
|
||||
mod screenshot;
|
||||
|
||||
use async_trait::async_trait;
|
||||
use warpui::r#async::Timer;
|
||||
use galaxyui::r#async::Timer;
|
||||
use windows::Win32::System::StationsAndDesktops::{
|
||||
CloseDesktop, DESKTOP_ACCESS_FLAGS, DESKTOP_CONTROL_FLAGS, HDESK, OpenInputDesktop,
|
||||
};
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
[package]
|
||||
name = "warp_editor"
|
||||
name = "galaxy_editor"
|
||||
authors = ["Warp Team <dev@warp.dev>"]
|
||||
version = "0.1.0"
|
||||
edition = "2024"
|
||||
@@ -46,9 +46,9 @@ sum_tree.workspace = true
|
||||
thiserror.workspace = true
|
||||
pathfinder_color = "0.5.0"
|
||||
vec1.workspace = true
|
||||
warpui.workspace = true
|
||||
warp_core.workspace = true
|
||||
warp_util.workspace = true
|
||||
galaxyui.workspace = true
|
||||
galaxy_core.workspace = true
|
||||
galaxy_util.workspace = true
|
||||
rayon.workspace = true
|
||||
line-ending.workspace = true
|
||||
vim.workspace = true
|
||||
@@ -59,8 +59,8 @@ rust-embed.workspace = true
|
||||
enclose = "1.1.8"
|
||||
env_logger.workspace = true
|
||||
sum_tree = { workspace = true, features = ["test-util"] }
|
||||
warp_core = { workspace = true, features = ["test-util"] }
|
||||
warpui = { workspace = true, features = ["test-util"] }
|
||||
galaxy_core = { workspace = true, features = ["test-util"] }
|
||||
galaxyui = { workspace = true, features = ["test-util"] }
|
||||
criterion = { version = "0.5.1", features = ["html_reports"] }
|
||||
|
||||
[[bench]]
|
||||
|
||||
@@ -2,10 +2,10 @@ use std::fs;
|
||||
|
||||
use criterion::{Criterion, criterion_group, criterion_main};
|
||||
use rand::{SeedableRng, rngs::StdRng};
|
||||
use warp_editor::content::{
|
||||
use galaxy_editor::content::{
|
||||
buffer::Buffer, selection_model::BufferSelectionModel, text::IndentBehavior,
|
||||
};
|
||||
use warpui::{App, ModelHandle};
|
||||
use galaxyui::{App, ModelHandle};
|
||||
|
||||
const EDIT_SAMPLE_SIZE: usize = 10;
|
||||
const MAX_EDIT_REPLACEMENT_LENGTH: usize = 20;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
use std::cmp::Ordering;
|
||||
|
||||
use sum_tree::SumTree;
|
||||
use warpui::App;
|
||||
use galaxyui::App;
|
||||
|
||||
use super::{AnchorSide, Anchors};
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ use std::{
|
||||
sync::Arc,
|
||||
};
|
||||
use vec1::{Vec1, vec1};
|
||||
use warp_util::content_version::ContentVersion;
|
||||
use galaxy_util::content_version::ContentVersion;
|
||||
|
||||
use super::{
|
||||
anchor::{Anchor, AnchorSide, Anchors},
|
||||
@@ -34,7 +34,7 @@ use super::{
|
||||
undo::{NonAtomicType, UndoActionType, UndoArg, UndoStack},
|
||||
validation::validate_content,
|
||||
};
|
||||
use warp_core::{platform::SessionPlatform, safe_error};
|
||||
use galaxy_core::{platform::SessionPlatform, safe_error};
|
||||
|
||||
use crate::{
|
||||
content::{
|
||||
@@ -53,9 +53,9 @@ use crate::{
|
||||
use enum_iterator::all;
|
||||
use string_offset::{ByteOffset, CharOffset};
|
||||
use sum_tree::{SeekBias, SumTree};
|
||||
use warpui::{AppContext, Entity, ModelContext};
|
||||
use warpui::{EntityId, ModelHandle, elements::ListIndentLevel};
|
||||
use warpui::{
|
||||
use galaxyui::{AppContext, Entity, ModelContext};
|
||||
use galaxyui::{EntityId, ModelHandle, elements::ListIndentLevel};
|
||||
use galaxyui::{
|
||||
fonts::Weight,
|
||||
text::{TextBuffer, char_slice, point::Point},
|
||||
};
|
||||
@@ -836,7 +836,7 @@ impl Buffer {
|
||||
selection_model: ModelHandle<BufferSelectionModel>,
|
||||
ctx: &mut ModelContext<Self>,
|
||||
) -> Self {
|
||||
let parse_fn = if warp_core::features::FeatureFlag::MarkdownTables.is_enabled() {
|
||||
let parse_fn = if galaxy_core::features::FeatureFlag::MarkdownTables.is_enabled() {
|
||||
parse_markdown_with_gfm_tables
|
||||
} else {
|
||||
parse_markdown
|
||||
|
||||
@@ -12,7 +12,7 @@ use rand::SeedableRng;
|
||||
use rand::rngs::StdRng;
|
||||
use serde_yaml::{Mapping, Value};
|
||||
use vec1::{Vec1, vec1};
|
||||
use warpui::{App, AppContext, ModelContext, ModelHandle, ReadModel};
|
||||
use galaxyui::{App, AppContext, ModelContext, ModelHandle, ReadModel};
|
||||
|
||||
use crate::content::buffer::{
|
||||
AutoScrollBehavior, BufferEditAction, BufferSelectAction, EditOrigin, EmbeddedItemConversion,
|
||||
@@ -39,8 +39,8 @@ use crate::render::model::{
|
||||
};
|
||||
use string_offset::ByteOffset;
|
||||
use string_offset::CharOffset;
|
||||
use warpui::elements::ListIndentLevel;
|
||||
use warpui::text::point::Point;
|
||||
use galaxyui::elements::ListIndentLevel;
|
||||
use galaxyui::text::point::Point;
|
||||
|
||||
use crate::content::buffer::{Buffer, StyledBufferRun};
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ use markdown_parser::{FormattedText, FormattedTextFragment, FormattedTextLine};
|
||||
use std::ops::Range;
|
||||
use string_offset::CharOffset;
|
||||
use sum_tree::SumTree;
|
||||
use warpui::elements::ListIndentLevel;
|
||||
use galaxyui::elements::ListIndentLevel;
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct CoreEditorAction {
|
||||
|
||||
@@ -14,8 +14,8 @@ use rangemap::RangeSet;
|
||||
use rayon::iter::{IndexedParallelIterator, IntoParallelIterator, ParallelIterator};
|
||||
use urlocator::{UrlLocation, UrlLocator};
|
||||
use vec1::Vec1;
|
||||
use warp_core::{features::FeatureFlag, ui::theme::Fill as ThemeFill};
|
||||
use warpui::{
|
||||
use galaxy_core::{features::FeatureFlag, ui::theme::Fill as ThemeFill};
|
||||
use galaxyui::{
|
||||
AppContext,
|
||||
assets::asset_cache::AssetSource,
|
||||
fonts::Weight,
|
||||
@@ -39,7 +39,7 @@ use crate::{
|
||||
},
|
||||
};
|
||||
use string_offset::{ByteOffset, CharOffset};
|
||||
use warpui::text::char_slice;
|
||||
use galaxyui::text::char_slice;
|
||||
|
||||
use super::{
|
||||
buffer::{StyledBufferBlock, StyledBufferRun, StyledTextBlock},
|
||||
|
||||
@@ -15,8 +15,8 @@ use crate::{
|
||||
};
|
||||
use std::path::Path;
|
||||
use string_offset::CharOffset;
|
||||
use warp_core::features::FeatureFlag;
|
||||
use warpui::{
|
||||
use galaxy_core::features::FeatureFlag;
|
||||
use galaxyui::{
|
||||
App, SingletonEntity,
|
||||
assets::asset_cache::{AssetCache, AssetSource, AssetState},
|
||||
fonts::{Properties, Style, Weight},
|
||||
|
||||
@@ -199,7 +199,7 @@ impl Engine {
|
||||
buffer: &SumTree<BufferText>,
|
||||
buffer_offset: CharOffset,
|
||||
) -> anyhow::Result<Vec<Match>> {
|
||||
warpui::r#async::block_on(self.find(buffer, buffer_offset))
|
||||
galaxyui::r#async::block_on(self.find(buffer, buffer_offset))
|
||||
}
|
||||
|
||||
/// Find all matches for this pattern in the given slice of content.
|
||||
|
||||
@@ -4,7 +4,7 @@ use futures_lite::future;
|
||||
use itertools::Itertools;
|
||||
use rangemap::RangeSet;
|
||||
use sum_tree::SumTree;
|
||||
use warpui::App;
|
||||
use galaxyui::App;
|
||||
|
||||
use crate::content::{
|
||||
buffer::Buffer,
|
||||
|
||||
@@ -3,7 +3,7 @@ use std::ops::Range;
|
||||
|
||||
use rangemap::RangeSet;
|
||||
use string_offset::CharOffset;
|
||||
use warpui::{AppContext, Entity, ModelContext, ModelHandle};
|
||||
use galaxyui::{AppContext, Entity, ModelContext, ModelHandle};
|
||||
|
||||
use crate::content::edit::EditDelta;
|
||||
use crate::content::selection_model::BufferSelectionModel;
|
||||
|
||||
@@ -15,11 +15,11 @@ use std::collections::VecDeque;
|
||||
use std::fmt::Write;
|
||||
use std::iter;
|
||||
use std::{io, ops::Range};
|
||||
use warpui::text::point::Point;
|
||||
use warpui::{AppContext, ModelContext, ModelHandle};
|
||||
use galaxyui::text::point::Point;
|
||||
use galaxyui::{AppContext, ModelContext, ModelHandle};
|
||||
|
||||
use string_offset::CharOffset;
|
||||
use warpui::elements::{ListIndentLevel, ListNumbering};
|
||||
use galaxyui::elements::{ListIndentLevel, ListNumbering};
|
||||
|
||||
use crate::content::anchor::AnchorSide;
|
||||
use crate::content::selection_model::BufferSelectionModel;
|
||||
|
||||
@@ -4,7 +4,7 @@ use markdown_parser::{compute_formatted_text_delta, parse_markdown};
|
||||
use serde_yaml::Value;
|
||||
use string_offset::CharOffset;
|
||||
use vec1::Vec1;
|
||||
use warpui::{App, ReadModel};
|
||||
use galaxyui::{App, ReadModel};
|
||||
|
||||
use crate::content::{
|
||||
buffer::{
|
||||
@@ -60,7 +60,7 @@ print_endline "Hello, World!"
|
||||
#[test]
|
||||
fn test_mermaid_markdown_round_trip() {
|
||||
App::test((), |mut app| async move {
|
||||
let _flag = warp_core::features::FeatureFlag::MarkdownMermaid.override_enabled(true);
|
||||
let _flag = galaxy_core::features::FeatureFlag::MarkdownMermaid.override_enabled(true);
|
||||
let markdown = "```mermaid\ngraph TD\nA --> B\n```\n";
|
||||
let (buffer, _selection) = Buffer::mock_from_markdown(
|
||||
markdown,
|
||||
@@ -157,7 +157,7 @@ fn test_table_html_serialization() {
|
||||
#[test]
|
||||
fn test_gfm_table_html_serialization() {
|
||||
App::test((), |mut app| async move {
|
||||
let _flag = warp_core::features::FeatureFlag::MarkdownTables.override_enabled(true);
|
||||
let _flag = galaxy_core::features::FeatureFlag::MarkdownTables.override_enabled(true);
|
||||
let markdown = "\
|
||||
| header 1 | header 2 |\n\
|
||||
| --- | --- |\n\
|
||||
|
||||
@@ -5,7 +5,7 @@ use std::{
|
||||
|
||||
use bytes::Bytes;
|
||||
use mermaid_to_svg::MermaidTheme;
|
||||
use warpui::{
|
||||
use galaxyui::{
|
||||
AppContext, SingletonEntity,
|
||||
assets::asset_cache::{AssetCache, AssetSource, AssetState, AsyncAssetId, AsyncAssetType},
|
||||
image_cache::ImageType,
|
||||
|
||||
@@ -7,7 +7,7 @@ use crate::content::{
|
||||
text::{BlockType, BufferBlockStyle, IndentBehavior, TextStyles},
|
||||
};
|
||||
use string_offset::CharOffset;
|
||||
use warpui::App;
|
||||
use galaxyui::App;
|
||||
|
||||
#[test]
|
||||
fn test_no_blocks() {
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
use anyhow::anyhow;
|
||||
use string_offset::CharOffset;
|
||||
use warpui::text::{TextBuffer, point::Point, word_boundaries::WordBoundariesPolicy};
|
||||
use galaxyui::text::{TextBuffer, point::Point, word_boundaries::WordBoundariesPolicy};
|
||||
|
||||
use super::{
|
||||
buffer::{Buffer, ToBufferCharOffset, ToBufferPoint},
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
use itertools::Itertools;
|
||||
use markdown_parser::parse_markdown;
|
||||
use string_offset::CharOffset;
|
||||
use warp_core::features::FeatureFlag;
|
||||
use galaxy_core::features::FeatureFlag;
|
||||
|
||||
use crate::content::{
|
||||
buffer::{Buffer, EditOrigin},
|
||||
selection_model::BufferSelectionModel,
|
||||
text::IndentBehavior,
|
||||
};
|
||||
use warpui::{
|
||||
use galaxyui::{
|
||||
App,
|
||||
text::{TextBuffer, point::Point, word_boundaries::WordBoundariesPolicy},
|
||||
};
|
||||
|
||||
@@ -3,7 +3,7 @@ use std::ops::Range;
|
||||
use itertools::Itertools;
|
||||
use string_offset::CharOffset;
|
||||
use vec1::{Vec1, vec1};
|
||||
use warpui::{AppContext, Entity, ModelHandle};
|
||||
use galaxyui::{AppContext, Entity, ModelHandle};
|
||||
|
||||
use crate::content::{
|
||||
anchor::{Anchor, AnchorSide, AnchorUpdate, Anchors},
|
||||
@@ -309,7 +309,7 @@ impl BufferSelectionModel {
|
||||
}
|
||||
|
||||
/// Validate the buffer content with this selection model's anchors.
|
||||
pub fn validate_buffer(&self, ctx: &impl warpui::ModelAsRef) {
|
||||
pub fn validate_buffer(&self, ctx: &impl galaxyui::ModelAsRef) {
|
||||
self.buffer.as_ref(ctx).validate(&self.anchors);
|
||||
}
|
||||
|
||||
|
||||
@@ -30,11 +30,11 @@ use std::{
|
||||
};
|
||||
use string_offset::{ByteOffset, CharOffset, impl_offset};
|
||||
use sum_tree::{Cursor, SeekBias, SumTree};
|
||||
use warp_core::features::FeatureFlag;
|
||||
use warpui::elements::ListIndentLevel;
|
||||
use warpui::text::BlockHeaderSize as HeaderSize;
|
||||
use warpui::text::point::Point;
|
||||
use warpui::{
|
||||
use galaxy_core::features::FeatureFlag;
|
||||
use galaxyui::elements::ListIndentLevel;
|
||||
use galaxyui::text::BlockHeaderSize as HeaderSize;
|
||||
use galaxyui::text::point::Point;
|
||||
use galaxyui::{
|
||||
AppContext,
|
||||
fonts::{Properties, Style, Weight},
|
||||
};
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
use markdown_parser::CodeBlockText;
|
||||
use warpui::fonts::Weight;
|
||||
use galaxyui::fonts::Weight;
|
||||
|
||||
use markdown_parser::FormattedTable;
|
||||
use warp_core::features::FeatureFlag;
|
||||
use galaxy_core::features::FeatureFlag;
|
||||
|
||||
use super::{
|
||||
BufferBlockItem, BufferTextStyle, CodeBlockType, MarkdownStyle, TextStyles,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
use std::{collections::VecDeque, time::Duration};
|
||||
|
||||
use instant::Instant;
|
||||
use warp_util::content_version::ContentVersion;
|
||||
use galaxy_util::content_version::ContentVersion;
|
||||
|
||||
use crate::render::model::RenderedSelectionSet;
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ use crate::content::{
|
||||
},
|
||||
};
|
||||
use sum_tree::SumTree;
|
||||
use warpui::elements::ListIndentLevel;
|
||||
use galaxyui::elements::ListIndentLevel;
|
||||
|
||||
#[test]
|
||||
#[should_panic(
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use warpui::ModelContext;
|
||||
use galaxyui::ModelContext;
|
||||
|
||||
use crate::content::{buffer::BufferSnapshot, edit::PreciseDelta, version::BufferVersion};
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ use std::{any::Any, cell::Ref, ops::Range};
|
||||
use num_traits::SaturatingSub;
|
||||
use pathfinder_color::ColorU;
|
||||
use rangemap::{RangeMap, RangeSet};
|
||||
use warpui::{
|
||||
use galaxyui::{
|
||||
Action, AppContext, Element, TypedActionView, View, elements::Border,
|
||||
text_layout::PaintStyleOverride,
|
||||
};
|
||||
|
||||
@@ -3,7 +3,7 @@ use std::ops::Range;
|
||||
use itertools::{Either, Itertools};
|
||||
use line_ending::LineEnding;
|
||||
use vec1::{Vec1, vec1};
|
||||
use warpui::{
|
||||
use galaxyui::{
|
||||
AppContext, Entity, ModelAsRef, ModelContext, ModelHandle, clipboard::ClipboardContent,
|
||||
};
|
||||
|
||||
@@ -22,7 +22,7 @@ use crate::{
|
||||
selection::{SelectionMode, SelectionModel, TextDirection, TextUnit},
|
||||
};
|
||||
use string_offset::{ByteOffset, CharOffset};
|
||||
use warpui::elements::ListIndentLevel;
|
||||
use galaxyui::elements::ListIndentLevel;
|
||||
|
||||
/// A wrapper for a buffer that provides access to its internal update_content method.
|
||||
/// It's important this is only returned from `CoreEditorModel::update_content` method
|
||||
|
||||
@@ -47,7 +47,7 @@ use std::{
|
||||
use itertools::Itertools as _;
|
||||
use line_ending::LineEnding;
|
||||
|
||||
use warp_core::platform::SessionPlatform;
|
||||
use galaxy_core::platform::SessionPlatform;
|
||||
|
||||
/// A line ending format. This is the compile-time equivalent to [`LineEnding`].
|
||||
pub trait LineFormat {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#![allow(clippy::disallowed_methods)]
|
||||
|
||||
use super::*;
|
||||
use warp_core::platform::SessionPlatform;
|
||||
use galaxy_core::platform::SessionPlatform;
|
||||
|
||||
#[test]
|
||||
fn test_infer_line_ending_empty_file() {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use warpui::{
|
||||
use galaxyui::{
|
||||
AppContext, Element, SizeConstraint,
|
||||
elements::{
|
||||
Align, ConstrainedBox, Container, CornerRadius, CrossAxisAlignment, Empty, Flex, Icon,
|
||||
@@ -79,8 +79,8 @@ impl RenderableBlock for RenderableBrokenEmbedding {
|
||||
fn layout(
|
||||
&mut self,
|
||||
model: &crate::render::model::RenderState,
|
||||
ctx: &mut warpui::LayoutContext,
|
||||
app: &warpui::AppContext,
|
||||
ctx: &mut galaxyui::LayoutContext,
|
||||
app: &galaxyui::AppContext,
|
||||
) {
|
||||
self.row.layout(
|
||||
SizeConstraint::strict(vec2f(
|
||||
@@ -104,7 +104,7 @@ impl RenderableBlock for RenderableBrokenEmbedding {
|
||||
&mut self,
|
||||
model: &crate::render::model::RenderState,
|
||||
ctx: &mut super::RenderContext,
|
||||
app: &warpui::AppContext,
|
||||
app: &galaxyui::AppContext,
|
||||
) {
|
||||
let content = model.content();
|
||||
let broken_link = extract_block!(self.viewport_item, content, (block, BlockItem::Embedded(item)) => block.embedded(item));
|
||||
@@ -154,21 +154,21 @@ impl RenderableBlock for RenderableBrokenEmbedding {
|
||||
);
|
||||
}
|
||||
|
||||
ctx.paint.scene.start_layer(warpui::ClipBounds::ActiveLayer);
|
||||
ctx.paint.scene.start_layer(galaxyui::ClipBounds::ActiveLayer);
|
||||
self.row
|
||||
.paint(ctx.content_to_screen(content_origin), ctx.paint, app);
|
||||
ctx.paint.scene.stop_layer();
|
||||
}
|
||||
|
||||
fn after_layout(&mut self, ctx: &mut warpui::AfterLayoutContext, app: &warpui::AppContext) {
|
||||
fn after_layout(&mut self, ctx: &mut galaxyui::AfterLayoutContext, app: &galaxyui::AppContext) {
|
||||
self.row.after_layout(ctx, app);
|
||||
}
|
||||
|
||||
fn dispatch_event(
|
||||
&mut self,
|
||||
_model: &crate::render::model::RenderState,
|
||||
event: &warpui::event::DispatchedEvent,
|
||||
ctx: &mut warpui::EventContext,
|
||||
event: &galaxyui::event::DispatchedEvent,
|
||||
ctx: &mut galaxyui::EventContext,
|
||||
app: &AppContext,
|
||||
) -> bool {
|
||||
self.row.dispatch_event(event, ctx, app)
|
||||
|
||||
@@ -37,8 +37,8 @@ impl RenderableBlock for Empty {
|
||||
fn layout(
|
||||
&mut self,
|
||||
model: &RenderState,
|
||||
ctx: &mut warpui::LayoutContext,
|
||||
app: &warpui::AppContext,
|
||||
ctx: &mut galaxyui::LayoutContext,
|
||||
app: &galaxyui::AppContext,
|
||||
) {
|
||||
self.placeholder
|
||||
.layout(&self.viewport_item, model, ctx, app, |_| {
|
||||
@@ -49,7 +49,7 @@ impl RenderableBlock for Empty {
|
||||
});
|
||||
}
|
||||
|
||||
fn paint(&mut self, model: &RenderState, ctx: &mut RenderContext, _app: &warpui::AppContext) {
|
||||
fn paint(&mut self, model: &RenderState, ctx: &mut RenderContext, _app: &galaxyui::AppContext) {
|
||||
let content = model.content();
|
||||
let cursor = extract_block!(self.viewport_item, content, (block, BlockItem::TrailingNewLine(cursor)) => block.trailing_newline(cursor));
|
||||
if self.placeholder.paint(cursor.content_origin(), model, ctx) {
|
||||
|
||||
@@ -31,8 +31,8 @@ impl RenderableBlock for RenderableHeader {
|
||||
fn layout(
|
||||
&mut self,
|
||||
model: &RenderState,
|
||||
ctx: &mut warpui::LayoutContext,
|
||||
app: &warpui::AppContext,
|
||||
ctx: &mut galaxyui::LayoutContext,
|
||||
app: &galaxyui::AppContext,
|
||||
) {
|
||||
self.placeholder
|
||||
.layout(&self.viewport_item, model, ctx, app, |block| {
|
||||
@@ -53,7 +53,7 @@ impl RenderableBlock for RenderableHeader {
|
||||
});
|
||||
}
|
||||
|
||||
fn paint(&mut self, model: &RenderState, ctx: &mut RenderContext, _app: &warpui::AppContext) {
|
||||
fn paint(&mut self, model: &RenderState, ctx: &mut RenderContext, _app: &galaxyui::AppContext) {
|
||||
let content = model.content();
|
||||
let (paragraph, header_size) = extract_block!(
|
||||
self.viewport_item, content,
|
||||
|
||||
@@ -3,10 +3,10 @@ use crate::render::model::BlockItem;
|
||||
|
||||
use super::super::model::{RenderState, viewport::ViewportItem};
|
||||
use super::{RenderContext, RenderableBlock};
|
||||
use warp_core::ui::appearance::Appearance;
|
||||
use warp_core::ui::theme::color::internal_colors;
|
||||
use warpui::elements::{CrossAxisAlignment, Empty, Flex, ParentElement};
|
||||
use warpui::{
|
||||
use galaxy_core::ui::appearance::Appearance;
|
||||
use galaxy_core::ui::theme::color::internal_colors;
|
||||
use galaxyui::elements::{CrossAxisAlignment, Empty, Flex, ParentElement};
|
||||
use galaxyui::{
|
||||
AfterLayoutContext, AppContext, Element, LayoutContext, SingletonEntity, SizeConstraint,
|
||||
elements::Container, geometry::vector::vec2f,
|
||||
};
|
||||
@@ -71,8 +71,8 @@ impl RenderableBlock for RenderableHiddenSection {
|
||||
fn dispatch_event(
|
||||
&mut self,
|
||||
_model: &RenderState,
|
||||
event: &warpui::event::DispatchedEvent,
|
||||
ctx: &mut warpui::EventContext,
|
||||
event: &galaxyui::event::DispatchedEvent,
|
||||
ctx: &mut galaxyui::EventContext,
|
||||
app: &AppContext,
|
||||
) -> bool {
|
||||
self.element.dispatch_event(event, ctx, app)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use warpui::{
|
||||
use galaxyui::{
|
||||
elements::{CornerRadius, Radius},
|
||||
geometry::{
|
||||
rect::RectF,
|
||||
@@ -77,12 +77,12 @@ impl RenderableBlock for HorizontalRule {
|
||||
fn layout(
|
||||
&mut self,
|
||||
_model: &RenderState,
|
||||
_ctx: &mut warpui::LayoutContext,
|
||||
_app: &warpui::AppContext,
|
||||
_ctx: &mut galaxyui::LayoutContext,
|
||||
_app: &galaxyui::AppContext,
|
||||
) {
|
||||
}
|
||||
|
||||
fn paint(&mut self, model: &RenderState, ctx: &mut RenderContext, _app: &warpui::AppContext) {
|
||||
fn paint(&mut self, model: &RenderState, ctx: &mut RenderContext, _app: &galaxyui::AppContext) {
|
||||
let content = model.content();
|
||||
let horizontal_rule = extract_block!(self.viewport_item, content, (block, BlockItem::HorizontalRule(rule)) => block.horizontal_rule(rule));
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use warpui::{
|
||||
use galaxyui::{
|
||||
Element, SizeConstraint,
|
||||
elements::{CacheOption, Image},
|
||||
geometry::vector::vec2f,
|
||||
@@ -39,8 +39,8 @@ impl RenderableBlock for RenderableImage {
|
||||
fn layout(
|
||||
&mut self,
|
||||
model: &RenderState,
|
||||
ctx: &mut warpui::LayoutContext,
|
||||
app: &warpui::AppContext,
|
||||
ctx: &mut galaxyui::LayoutContext,
|
||||
app: &galaxyui::AppContext,
|
||||
) {
|
||||
let content = model.content();
|
||||
let (asset_source, config) = extract_block!(
|
||||
@@ -60,7 +60,7 @@ impl RenderableBlock for RenderableImage {
|
||||
self.image_element = Some(Box::new(image));
|
||||
}
|
||||
|
||||
fn paint(&mut self, model: &RenderState, ctx: &mut RenderContext, app: &warpui::AppContext) {
|
||||
fn paint(&mut self, model: &RenderState, ctx: &mut RenderContext, app: &galaxyui::AppContext) {
|
||||
let content = model.content();
|
||||
let positioned_image = extract_block!(
|
||||
self.viewport_item,
|
||||
@@ -83,7 +83,7 @@ impl RenderableBlock for RenderableImage {
|
||||
}
|
||||
|
||||
if selected {
|
||||
let rect_bounds = warpui::geometry::rect::RectF::new(screen_position, size);
|
||||
let rect_bounds = galaxyui::geometry::rect::RectF::new(screen_position, size);
|
||||
ctx.paint
|
||||
.scene
|
||||
.draw_rect_with_hit_recording(rect_bounds)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use std::ops::Range;
|
||||
|
||||
use warpui::{
|
||||
use galaxyui::{
|
||||
AfterLayoutContext, AppContext, Element, EventContext, LayoutContext, ModelHandle,
|
||||
PaintContext, SizeConstraint, WeakViewHandle,
|
||||
elements::Point,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use warpui::{
|
||||
use galaxyui::{
|
||||
AppContext, Element, SizeConstraint,
|
||||
elements::{Align, CacheOption, CornerRadius, Image, Radius, Text},
|
||||
geometry::vector::vec2f,
|
||||
@@ -33,7 +33,7 @@ impl RenderableBlock for RenderableMermaidDiagram {
|
||||
&self.viewport_item
|
||||
}
|
||||
|
||||
fn layout(&mut self, model: &RenderState, ctx: &mut warpui::LayoutContext, app: &AppContext) {
|
||||
fn layout(&mut self, model: &RenderState, ctx: &mut galaxyui::LayoutContext, app: &AppContext) {
|
||||
let content = model.content();
|
||||
let (asset_source, config) = extract_block!(
|
||||
self.viewport_item,
|
||||
@@ -111,7 +111,7 @@ impl RenderableBlock for RenderableMermaidDiagram {
|
||||
}
|
||||
}
|
||||
|
||||
fn after_layout(&mut self, ctx: &mut warpui::AfterLayoutContext, app: &warpui::AppContext) {
|
||||
fn after_layout(&mut self, ctx: &mut galaxyui::AfterLayoutContext, app: &galaxyui::AppContext) {
|
||||
if let Some(ref mut image_element) = self.image_element {
|
||||
image_element.after_layout(ctx, app);
|
||||
}
|
||||
|
||||
@@ -11,8 +11,8 @@ use std::{
|
||||
};
|
||||
use temporary_block::RenderableTemporaryBlock;
|
||||
use vim::vim::VimMode;
|
||||
use warp_core::ui::theme::Fill as ThemeFill;
|
||||
use warpui::{
|
||||
use galaxy_core::ui::theme::Fill as ThemeFill;
|
||||
use galaxyui::{
|
||||
AfterLayoutContext, AppContext, Element, Event, EventContext, LayoutContext, ModelHandle,
|
||||
PaintContext, SizeConstraint, WeakViewHandle,
|
||||
color::ColorU,
|
||||
@@ -85,7 +85,7 @@ pub enum VerticalExpansionBehavior {
|
||||
/// An element that renders rich text, with no additional UI or decorations.
|
||||
///
|
||||
/// This element caches the positions listed in [`super::model::saved_positions::SavedPositions`],
|
||||
/// and the parent view can overlay UI controls on top of them using a [`warpui::elements::Stack`].
|
||||
/// and the parent view can overlay UI controls on top of them using a [`galaxyui::elements::Stack`].
|
||||
///
|
||||
/// It additionally reserves horizontal gutters, which are considered in-bounds for content hit
|
||||
/// testing.
|
||||
@@ -1077,7 +1077,7 @@ impl<V: EditorView> Element for RichTextElement<V> {
|
||||
return;
|
||||
};
|
||||
ctx.scene
|
||||
.start_layer(warpui::ClipBounds::BoundedBy(clip_bounds));
|
||||
.start_layer(galaxyui::ClipBounds::BoundedBy(clip_bounds));
|
||||
// Save the clipped content layer z-index for hover detection.
|
||||
self.content_z_index = Some(ctx.scene.z_index());
|
||||
|
||||
@@ -1236,7 +1236,7 @@ impl<V: EditorView> NewScrollableElement for RichTextElement<V> {
|
||||
})
|
||||
}
|
||||
|
||||
fn scroll(&mut self, delta: warpui::units::Pixels, axis: Axis, ctx: &mut EventContext) {
|
||||
fn scroll(&mut self, delta: galaxyui::units::Pixels, axis: Axis, ctx: &mut EventContext) {
|
||||
if let Some(action) = V::Action::scroll(delta, axis) {
|
||||
ctx.dispatch_typed_action(action);
|
||||
}
|
||||
@@ -1257,7 +1257,7 @@ impl<V: EditorView> ScrollableElement for RichTextElement<V> {
|
||||
Some(self.vertical_scroll_data(app))
|
||||
}
|
||||
|
||||
fn scroll(&mut self, delta: warpui::units::Pixels, ctx: &mut EventContext) {
|
||||
fn scroll(&mut self, delta: galaxyui::units::Pixels, ctx: &mut EventContext) {
|
||||
if let Some(action) = V::Action::scroll(delta, Axis::Vertical) {
|
||||
ctx.dispatch_typed_action(action);
|
||||
}
|
||||
|
||||
@@ -8,8 +8,8 @@ use crate::{
|
||||
model::{BlockItem, RenderState, viewport::ViewportItem},
|
||||
},
|
||||
};
|
||||
use warpui::elements::ListIndentLevel;
|
||||
use warpui::{geometry::vector::vec2f, text_layout::TextFrame};
|
||||
use galaxyui::elements::ListIndentLevel;
|
||||
use galaxyui::{geometry::vector::vec2f, text_layout::TextFrame};
|
||||
|
||||
use super::{
|
||||
RenderableBlock,
|
||||
@@ -44,8 +44,8 @@ impl RenderableBlock for RenderableOrderedListItem {
|
||||
fn layout(
|
||||
&mut self,
|
||||
model: &RenderState,
|
||||
ctx: &mut warpui::LayoutContext,
|
||||
app: &warpui::AppContext,
|
||||
ctx: &mut galaxyui::LayoutContext,
|
||||
app: &galaxyui::AppContext,
|
||||
) {
|
||||
let text_layout = TextLayout::from_layout_context(ctx, app, model);
|
||||
let block_style = BufferBlockStyle::OrderedList {
|
||||
@@ -75,7 +75,7 @@ impl RenderableBlock for RenderableOrderedListItem {
|
||||
});
|
||||
}
|
||||
|
||||
fn paint(&mut self, model: &RenderState, ctx: &mut RenderContext, _app: &warpui::AppContext) {
|
||||
fn paint(&mut self, model: &RenderState, ctx: &mut RenderContext, _app: &galaxyui::AppContext) {
|
||||
let content = model.content();
|
||||
let paragraph = extract_block!(self.viewport_item, content, (block, BlockItem::OrderedList{ paragraph: inner, ..}) => block.ordered_list(inner));
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
use std::ops::Range;
|
||||
|
||||
use warp_core::ui::appearance::DEFAULT_UI_FONT_SIZE;
|
||||
use warpui::{
|
||||
use galaxy_core::ui::appearance::DEFAULT_UI_FONT_SIZE;
|
||||
use galaxyui::{
|
||||
PaintContext,
|
||||
elements::{CornerRadius, Point, Radius},
|
||||
geometry::{
|
||||
|
||||
@@ -47,8 +47,8 @@ impl RenderableBlock for RenderableParagraph {
|
||||
fn layout(
|
||||
&mut self,
|
||||
model: &RenderState,
|
||||
ctx: &mut warpui::LayoutContext,
|
||||
app: &warpui::AppContext,
|
||||
ctx: &mut galaxyui::LayoutContext,
|
||||
app: &galaxyui::AppContext,
|
||||
) {
|
||||
self.placeholder
|
||||
.layout(&self.viewport_item, model, ctx, app, |_| {
|
||||
@@ -59,7 +59,7 @@ impl RenderableBlock for RenderableParagraph {
|
||||
});
|
||||
}
|
||||
|
||||
fn paint(&mut self, model: &RenderState, ctx: &mut RenderContext, _app: &warpui::AppContext) {
|
||||
fn paint(&mut self, model: &RenderState, ctx: &mut RenderContext, _app: &galaxyui::AppContext) {
|
||||
let content = model.content();
|
||||
let paragraph = extract_block!(self.viewport_item, content, (block, BlockItem::Paragraph(inner)) => block.paragraph(inner));
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use std::sync::Arc;
|
||||
|
||||
use warpui::{
|
||||
use galaxyui::{
|
||||
AppContext, LayoutContext,
|
||||
geometry::vector::{Vector2F, vec2f},
|
||||
text_layout::Line,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use warpui::{
|
||||
use galaxyui::{
|
||||
AppContext, Element, SizeConstraint,
|
||||
elements::{Border, CornerRadius, Empty, Radius},
|
||||
geometry::vector::vec2f,
|
||||
@@ -48,7 +48,7 @@ impl RenderableBlock for RenderableRunnableCommand {
|
||||
&self.viewport_item
|
||||
}
|
||||
|
||||
fn layout(&mut self, _model: &RenderState, ctx: &mut warpui::LayoutContext, app: &AppContext) {
|
||||
fn layout(&mut self, _model: &RenderState, ctx: &mut galaxyui::LayoutContext, app: &AppContext) {
|
||||
self.footer.layout(
|
||||
SizeConstraint::strict(vec2f(
|
||||
self.viewport_item.content_size.x(),
|
||||
@@ -87,7 +87,7 @@ impl RenderableBlock for RenderableRunnableCommand {
|
||||
|
||||
// Place the button at a higher z-index for event handling. See the comment on
|
||||
// `RichTextElement::content_z_index` for context.
|
||||
ctx.paint.scene.start_layer(warpui::ClipBounds::ActiveLayer);
|
||||
ctx.paint.scene.start_layer(galaxyui::ClipBounds::ActiveLayer);
|
||||
|
||||
// Position the block footer right below the content area, flush with its right-hand edge.
|
||||
// This gives the footer some padding relative to the visible area with a background.
|
||||
@@ -102,15 +102,15 @@ impl RenderableBlock for RenderableRunnableCommand {
|
||||
ctx.paint.scene.stop_layer();
|
||||
}
|
||||
|
||||
fn after_layout(&mut self, ctx: &mut warpui::AfterLayoutContext, app: &warpui::AppContext) {
|
||||
fn after_layout(&mut self, ctx: &mut galaxyui::AfterLayoutContext, app: &galaxyui::AppContext) {
|
||||
self.footer.after_layout(ctx, app);
|
||||
}
|
||||
|
||||
fn dispatch_event(
|
||||
&mut self,
|
||||
_model: &crate::render::model::RenderState,
|
||||
event: &warpui::event::DispatchedEvent,
|
||||
ctx: &mut warpui::EventContext,
|
||||
event: &galaxyui::event::DispatchedEvent,
|
||||
ctx: &mut galaxyui::EventContext,
|
||||
app: &AppContext,
|
||||
) -> bool {
|
||||
self.footer.dispatch_event(event, ctx, app)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use std::ops::Range;
|
||||
use string_offset::CharOffset;
|
||||
use warpui::{
|
||||
use galaxyui::{
|
||||
AppContext, ClipBounds, Event, EventContext,
|
||||
elements::{
|
||||
Axis, CornerRadius, DEFAULT_SCROLL_WHEEL_PIXELS_PER_LINE, Radius, ScrollData,
|
||||
@@ -121,7 +121,7 @@ impl RenderableBlock for RenderableTable {
|
||||
&self.viewport_item
|
||||
}
|
||||
|
||||
fn layout(&mut self, _: &RenderState, _: &mut warpui::LayoutContext, _: &AppContext) {}
|
||||
fn layout(&mut self, _: &RenderState, _: &mut galaxyui::LayoutContext, _: &AppContext) {}
|
||||
|
||||
fn paint(&mut self, model: &RenderState, ctx: &mut RenderContext, _app: &AppContext) {
|
||||
let content = model.content();
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
use pathfinder_color::ColorU;
|
||||
use std::{cell::Cell, sync::Arc};
|
||||
use string_offset::CharOffset;
|
||||
use warpui::{
|
||||
use galaxyui::{
|
||||
elements::{Axis, scroll_delta_for_pointer_movement},
|
||||
fonts::FamilyId,
|
||||
geometry::{rect::RectF, vector::vec2f},
|
||||
@@ -214,7 +214,7 @@ fn cells_in_range_entire_table() {
|
||||
}
|
||||
|
||||
fn single_line_cell_layout(char_count: usize, line_height: f32, line_width: f32) -> CellLayout {
|
||||
use warpui::text_layout::CaretPosition;
|
||||
use galaxyui::text_layout::CaretPosition;
|
||||
let mut carets = Vec::with_capacity(char_count);
|
||||
let char_width = if char_count > 0 {
|
||||
line_width / char_count as f32
|
||||
|
||||
@@ -5,8 +5,8 @@ use crate::{
|
||||
render::model::{BlockItem, RenderState, RichTextStyles, bounds, viewport::ViewportItem},
|
||||
};
|
||||
use pathfinder_color::ColorU;
|
||||
use warpui::elements::ListIndentLevel;
|
||||
use warpui::{
|
||||
use galaxyui::elements::ListIndentLevel;
|
||||
use galaxyui::{
|
||||
AppContext, Element, SizeConstraint, WeakViewHandle,
|
||||
elements::{
|
||||
Align, Border, ConstrainedBox, Container, CornerRadius, Hoverable, Icon, MouseStateHandle,
|
||||
@@ -112,8 +112,8 @@ impl RenderableBlock for RenderableTaskList {
|
||||
fn layout(
|
||||
&mut self,
|
||||
model: &RenderState,
|
||||
ctx: &mut warpui::LayoutContext,
|
||||
app: &warpui::AppContext,
|
||||
ctx: &mut galaxyui::LayoutContext,
|
||||
app: &galaxyui::AppContext,
|
||||
) {
|
||||
self.task_list_icon.layout(
|
||||
SizeConstraint::strict(vec2f(self.icon_size, self.icon_size)),
|
||||
@@ -142,7 +142,7 @@ impl RenderableBlock for RenderableTaskList {
|
||||
})
|
||||
}
|
||||
|
||||
fn paint(&mut self, model: &RenderState, ctx: &mut RenderContext, app: &warpui::AppContext) {
|
||||
fn paint(&mut self, model: &RenderState, ctx: &mut RenderContext, app: &galaxyui::AppContext) {
|
||||
let content = model.content();
|
||||
let task_list = extract_block!(self.viewport_item, content, (block, BlockItem::TaskList{ paragraph: inner, ..}) => block.task_list(inner));
|
||||
let text_styling = &model.styles().base_text;
|
||||
@@ -174,8 +174,8 @@ impl RenderableBlock for RenderableTaskList {
|
||||
fn dispatch_event(
|
||||
&mut self,
|
||||
_model: &crate::render::model::RenderState,
|
||||
event: &warpui::event::DispatchedEvent,
|
||||
ctx: &mut warpui::EventContext,
|
||||
event: &galaxyui::event::DispatchedEvent,
|
||||
ctx: &mut galaxyui::EventContext,
|
||||
app: &AppContext,
|
||||
) -> bool {
|
||||
self.task_list_icon.dispatch_event(event, ctx, app)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use warp_core::ui::theme::Fill;
|
||||
use galaxy_core::ui::theme::Fill;
|
||||
|
||||
use crate::render::model::{BlockItem, Decoration, RenderState, viewport::ViewportItem};
|
||||
|
||||
@@ -36,12 +36,12 @@ impl RenderableBlock for RenderableTemporaryBlock {
|
||||
fn layout(
|
||||
&mut self,
|
||||
_model: &RenderState,
|
||||
_ctx: &mut warpui::LayoutContext,
|
||||
_app: &warpui::AppContext,
|
||||
_ctx: &mut galaxyui::LayoutContext,
|
||||
_app: &galaxyui::AppContext,
|
||||
) {
|
||||
}
|
||||
|
||||
fn paint(&mut self, model: &RenderState, ctx: &mut RenderContext, _app: &warpui::AppContext) {
|
||||
fn paint(&mut self, model: &RenderState, ctx: &mut RenderContext, _app: &galaxyui::AppContext) {
|
||||
// We cannot use `extract_block` macro here since we need to locate the viewport item by content height instead of charoffset
|
||||
// (temporary block has an offset of zero).
|
||||
let content = model.content();
|
||||
|
||||
@@ -23,12 +23,12 @@ impl RenderableBlock for RenderableTextBlock {
|
||||
fn layout(
|
||||
&mut self,
|
||||
_model: &RenderState,
|
||||
_ctx: &mut warpui::LayoutContext,
|
||||
_app: &warpui::AppContext,
|
||||
_ctx: &mut galaxyui::LayoutContext,
|
||||
_app: &galaxyui::AppContext,
|
||||
) {
|
||||
}
|
||||
|
||||
fn paint(&mut self, model: &RenderState, ctx: &mut RenderContext, _app: &warpui::AppContext) {
|
||||
fn paint(&mut self, model: &RenderState, ctx: &mut RenderContext, _app: &galaxyui::AppContext) {
|
||||
let content = model.content();
|
||||
let text_block = extract_block!(
|
||||
self.viewport_item,
|
||||
|
||||
@@ -3,8 +3,8 @@ use crate::{
|
||||
extract_block,
|
||||
render::model::{BlockItem, RenderState, RichTextStyles, bounds, viewport::ViewportItem},
|
||||
};
|
||||
use warpui::elements::ListIndentLevel;
|
||||
use warpui::{
|
||||
use galaxyui::elements::ListIndentLevel;
|
||||
use galaxyui::{
|
||||
Element, SizeConstraint,
|
||||
elements::{Border, CornerRadius, Radius, Rect},
|
||||
geometry::vector::vec2f,
|
||||
@@ -67,8 +67,8 @@ impl RenderableBlock for RenderableBulletList {
|
||||
fn layout(
|
||||
&mut self,
|
||||
model: &RenderState,
|
||||
ctx: &mut warpui::LayoutContext,
|
||||
app: &warpui::AppContext,
|
||||
ctx: &mut galaxyui::LayoutContext,
|
||||
app: &galaxyui::AppContext,
|
||||
) {
|
||||
self.bullet_point.layout(
|
||||
SizeConstraint::strict(vec2f(self.bullet_size, self.bullet_size)),
|
||||
@@ -88,7 +88,7 @@ impl RenderableBlock for RenderableBulletList {
|
||||
})
|
||||
}
|
||||
|
||||
fn paint(&mut self, model: &RenderState, ctx: &mut RenderContext, app: &warpui::AppContext) {
|
||||
fn paint(&mut self, model: &RenderState, ctx: &mut RenderContext, app: &galaxyui::AppContext) {
|
||||
let content = model.content();
|
||||
let unordered_list = extract_block!(self.viewport_item, content, (block, BlockItem::UnorderedList{ paragraph: inner, ..}) => block.unordered_list(inner));
|
||||
|
||||
|
||||
@@ -6,15 +6,15 @@ use std::ops::Range;
|
||||
use std::sync::Arc;
|
||||
|
||||
use crate::content::text::{BufferBlockStyle, TextStylesWithMetadata};
|
||||
use warpui::fonts::TextLayoutSystem;
|
||||
use galaxyui::fonts::TextLayoutSystem;
|
||||
#[cfg(test)]
|
||||
use warpui::fonts::{Style, Weight};
|
||||
use warpui::text_layout::{
|
||||
use galaxyui::fonts::{Style, Weight};
|
||||
use galaxyui::text_layout::{
|
||||
ClipConfig, LayoutCache, Line, StyleAndFont, TextAlignment, TextBorder, TextStyle,
|
||||
};
|
||||
use warpui::units::{IntoPixels, Pixels};
|
||||
use warpui::{AppContext, LayoutContext};
|
||||
use warpui::{color::ColorU, text_layout::TextFrame};
|
||||
use galaxyui::units::{IntoPixels, Pixels};
|
||||
use galaxyui::{AppContext, LayoutContext};
|
||||
use galaxyui::{color::ColorU, text_layout::TextFrame};
|
||||
|
||||
use super::model::{BlockSpacing, ParagraphStyles, RenderState, RichTextStyles};
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
//! End-to-end editor tests.
|
||||
|
||||
use warp_core::features::FeatureFlag;
|
||||
use warpui::{App, ModelHandle, ReadModel};
|
||||
use galaxy_core::features::FeatureFlag;
|
||||
use galaxyui::{App, ModelHandle, ReadModel};
|
||||
|
||||
use crate::content::{
|
||||
buffer::{
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
//! * The **reserved box** is the rectangle containing a block's content, padding, borders, and
|
||||
//! margin - all space reserved for the block.
|
||||
|
||||
use warpui::{
|
||||
use galaxyui::{
|
||||
geometry::{
|
||||
rect::RectF,
|
||||
vector::{Vector2F, vec2f},
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
use num_traits::SaturatingSub;
|
||||
use sum_tree::SeekBias;
|
||||
use warpui::units::{IntoPixels, Pixels};
|
||||
use galaxyui::units::{IntoPixels, Pixels};
|
||||
|
||||
use string_offset::CharOffset;
|
||||
|
||||
|
||||
@@ -16,10 +16,10 @@ use std::{cell::Cell, sync::Arc};
|
||||
use string_offset::CharOffset;
|
||||
|
||||
use sum_tree::SumTree;
|
||||
use warpui::assets::asset_cache::AssetSource;
|
||||
use warpui::fonts::FamilyId;
|
||||
use warpui::text_layout::{CaretPosition, TextFrame};
|
||||
use warpui::units::IntoPixels;
|
||||
use galaxyui::assets::asset_cache::AssetSource;
|
||||
use galaxyui::fonts::FamilyId;
|
||||
use galaxyui::text_layout::{CaretPosition, TextFrame};
|
||||
use galaxyui::units::IntoPixels;
|
||||
|
||||
fn test_table_layout() -> LaidOutTable {
|
||||
let source = "aaa\tbbb\nccc\tddd\n";
|
||||
|
||||
@@ -21,11 +21,11 @@ use serde_yaml::Mapping;
|
||||
use sum_tree::{SeekBias, SumTree};
|
||||
use vec1::Vec1;
|
||||
use vim::vim::{MotionType, VimMode};
|
||||
use warp_core::{
|
||||
use galaxy_core::{
|
||||
channel::ChannelState,
|
||||
ui::{Icon, theme::Fill as ThemeFill},
|
||||
};
|
||||
use warpui::{
|
||||
use galaxyui::{
|
||||
AppContext, Entity, EntityId, ModelContext, ModelHandle,
|
||||
assets::asset_cache::AssetSource,
|
||||
color::ColorU,
|
||||
@@ -69,7 +69,7 @@ use crate::{
|
||||
render::model::debug::Describe,
|
||||
};
|
||||
use string_offset::{CharOffset, impl_offset};
|
||||
use warpui::elements::ListIndentLevel;
|
||||
use galaxyui::elements::ListIndentLevel;
|
||||
|
||||
use super::{
|
||||
BLOCK_FOOTER_HEIGHT,
|
||||
@@ -664,7 +664,7 @@ impl LineCount {
|
||||
}
|
||||
|
||||
/// A character offset within a [`TextFrame`]. These offsets count characters in the Rust string
|
||||
/// passed to [`warpui::text_layout::LayoutCache::layout_text()`].
|
||||
/// passed to [`galaxyui::text_layout::LayoutCache::layout_text()`].
|
||||
///
|
||||
/// Frame offsets often, but not always, correspond to glyph indices and caret positions. However,
|
||||
/// they do not line up 1:1 if a glyph or grapheme contains multiple characters
|
||||
@@ -4305,7 +4305,7 @@ impl<'a> Positioned<'a, Paragraph> {
|
||||
vec2f(underline_width, UNDERLINE_THICKNESS),
|
||||
);
|
||||
|
||||
let dash = warpui::scene::Dash {
|
||||
let dash = galaxyui::scene::Dash {
|
||||
dash_length: DASHED_UNDERLINE_DASH_LENGTH,
|
||||
gap_length: DASHED_UNDERLINE_GAP_LENGTH,
|
||||
force_consistent_gap_length: true,
|
||||
@@ -4314,7 +4314,7 @@ impl<'a> Positioned<'a, Paragraph> {
|
||||
.scene
|
||||
.draw_rect_without_hit_recording(underline_rect)
|
||||
.with_border(
|
||||
warpui::scene::Border::bottom(UNDERLINE_THICKNESS)
|
||||
galaxyui::scene::Border::bottom(UNDERLINE_THICKNESS)
|
||||
.with_dashed_border(dash)
|
||||
.with_border_color(color),
|
||||
);
|
||||
|
||||
@@ -2,8 +2,8 @@ use rangemap::RangeSet;
|
||||
use std::{cell::Cell, sync::Arc};
|
||||
use sum_tree::SumTree;
|
||||
use vec1::{Vec1, vec1};
|
||||
use warpui::assets::asset_cache::AssetSource;
|
||||
use warpui::{
|
||||
use galaxyui::assets::asset_cache::AssetSource;
|
||||
use galaxyui::{
|
||||
color::ColorU,
|
||||
fonts::FamilyId,
|
||||
geometry::{rect::RectF, vector::vec2f},
|
||||
@@ -34,7 +34,7 @@ use crate::{
|
||||
};
|
||||
use markdown_parser::{FormattedTextStyles, Hyperlink};
|
||||
use string_offset::CharOffset;
|
||||
use warpui::elements::ListIndentLevel;
|
||||
use galaxyui::elements::ListIndentLevel;
|
||||
|
||||
#[test]
|
||||
fn test_height() {
|
||||
@@ -930,7 +930,7 @@ fn test_multiselect_autoscroll_bounding_box() {
|
||||
);
|
||||
}
|
||||
|
||||
// 18:09:15 [INFO] [warp_editor::render::model] Initial tree:
|
||||
// 18:09:15 [INFO] [galaxy_editor::render::model] Initial tree:
|
||||
// -------- 0.00px / 0 characters --------
|
||||
// Hidden (3067 characters, 87 lines, 20.00px tall)
|
||||
// -------- 20.00px / 3067 characters --------
|
||||
@@ -1033,7 +1033,7 @@ fn test_dedupe_hidden_ranges_logged_tree_is_unchanged() {
|
||||
assert_eq!(initial, resulting);
|
||||
}
|
||||
|
||||
// 18:09:14 [INFO] [warp_editor::render::model] Initial tree:
|
||||
// 18:09:14 [INFO] [galaxy_editor::render::model] Initial tree:
|
||||
// -------- 0.00px / 0 characters --------
|
||||
// Hidden (3066 characters, 87 lines, 20.00px tall)
|
||||
// -------- 20.00px / 3067 characters --------
|
||||
@@ -1158,17 +1158,17 @@ fn make_test_cell_layout() -> CellLayout {
|
||||
line_char_ranges: vec![CharOffset::from(0)..CharOffset::from(3)],
|
||||
line_widths: vec![30.0],
|
||||
line_caret_positions: vec![vec![
|
||||
warpui::text_layout::CaretPosition {
|
||||
galaxyui::text_layout::CaretPosition {
|
||||
position_in_line: 0.0,
|
||||
start_offset: 0,
|
||||
last_offset: 0,
|
||||
},
|
||||
warpui::text_layout::CaretPosition {
|
||||
galaxyui::text_layout::CaretPosition {
|
||||
position_in_line: 10.0,
|
||||
start_offset: 1,
|
||||
last_offset: 1,
|
||||
},
|
||||
warpui::text_layout::CaretPosition {
|
||||
galaxyui::text_layout::CaretPosition {
|
||||
position_in_line: 20.0,
|
||||
start_offset: 2,
|
||||
last_offset: 2,
|
||||
|
||||
@@ -19,7 +19,7 @@ mod tests;
|
||||
/// certain character runs are interactive. Within those runs, there's a 1:1 mapping between
|
||||
/// `char`s in the content model and `char`s in the text frame. It translates in two directions:
|
||||
/// * From a [`CharOffset`] relative to the start of the content model block (a [`super::Paragraph`])
|
||||
/// to the character index in the [`warpui::text_layout::TextFrame`].
|
||||
/// to the character index in the [`galaxyui::text_layout::TextFrame`].
|
||||
/// * From a [`FrameOffset`] in the `TextFrame` to the closest `CharOffset` in the content model
|
||||
/// block (for example, clicking within a placeholder should snap the cursor to a regular content
|
||||
/// character).
|
||||
|
||||
@@ -76,7 +76,7 @@ fn test_offset_map_placeholders() {
|
||||
fn test_end_to_end() {
|
||||
// Group imports here so they don't cause "unused import" warnings on other targets.
|
||||
|
||||
use warpui::{
|
||||
use galaxyui::{
|
||||
App, color::ColorU, elements::Fill, fonts::Cache as FontCache, text_layout::LayoutCache,
|
||||
};
|
||||
|
||||
@@ -97,7 +97,7 @@ fn test_end_to_end() {
|
||||
};
|
||||
|
||||
App::test((), |mut app| async move {
|
||||
let mut font_cache = FontCache::new(Box::new(warpui::platform::current::FontDB::new()));
|
||||
let mut font_cache = FontCache::new(Box::new(galaxyui::platform::current::FontDB::new()));
|
||||
let layout_cache = LayoutCache::new();
|
||||
let paragraph_styles = ParagraphStyles {
|
||||
font_family: font_cache
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
use std::sync::Arc;
|
||||
|
||||
use sum_tree::{Cursor, Dimension};
|
||||
use warpui::{
|
||||
use galaxyui::{
|
||||
geometry::vector::Vector2F,
|
||||
text_layout::Line,
|
||||
units::{IntoPixels, Pixels},
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use warpui::EntityId;
|
||||
use galaxyui::EntityId;
|
||||
|
||||
/// Utility for consistently creating and referencing saved position IDs for
|
||||
/// rich text.
|
||||
@@ -17,16 +17,16 @@ impl SavedPositions {
|
||||
|
||||
/// Saved position ID for the cursor location.
|
||||
pub fn cursor_id(&self) -> String {
|
||||
format!("warp_editor:cursor_{}", self.model_id)
|
||||
format!("galaxy_editor:cursor_{}", self.model_id)
|
||||
}
|
||||
|
||||
/// The bounding box for the text selection.
|
||||
pub fn text_selection_id(&self) -> String {
|
||||
format!("warp_editor:text_selection_{}", self.model_id)
|
||||
format!("galaxy_editor:text_selection_{}", self.model_id)
|
||||
}
|
||||
|
||||
/// The first line of the block that the mouse is currently hovered over.
|
||||
pub fn hovered_block_start(&self) -> String {
|
||||
format!("warp_editor:hovered_block_start_{}", self.model_id)
|
||||
format!("galaxy_editor:hovered_block_start_{}", self.model_id)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,8 +6,8 @@ use vec1::{Vec1, vec1};
|
||||
|
||||
use crate::content::text::BufferBlockStyle;
|
||||
use ordered_float::OrderedFloat;
|
||||
use warpui::elements::ListIndentLevel;
|
||||
use warpui::{
|
||||
use galaxyui::elements::ListIndentLevel;
|
||||
use galaxyui::{
|
||||
color::ColorU,
|
||||
elements::{Border, Fill},
|
||||
fonts::{FamilyId, Weight},
|
||||
@@ -241,7 +241,7 @@ pub fn layout(text: &str, styles: &RichTextStyles, max_width: impl IntoPixels) -
|
||||
width: line_width.as_f32(),
|
||||
trailing_whitespace_width: 0.,
|
||||
runs: vec![Run {
|
||||
font_id: warpui::fonts::FontId(0),
|
||||
font_id: galaxyui::fonts::FontId(0),
|
||||
styles: Default::default(),
|
||||
glyphs: mem::take(&mut glyphs_acc),
|
||||
width: line_width.as_f32(),
|
||||
@@ -280,7 +280,7 @@ pub fn layout(text: &str, styles: &RichTextStyles, max_width: impl IntoPixels) -
|
||||
width: line_width.as_f32(),
|
||||
trailing_whitespace_width: 0.,
|
||||
runs: vec![Run {
|
||||
font_id: warpui::fonts::FontId(0),
|
||||
font_id: galaxyui::fonts::FontId(0),
|
||||
styles: Default::default(),
|
||||
glyphs: glyphs_acc,
|
||||
width: line_width.as_f32(),
|
||||
@@ -316,7 +316,7 @@ pub fn init_logging() {
|
||||
static INIT: Once = Once::new();
|
||||
INIT.call_once(|| {
|
||||
env_logger::builder()
|
||||
.parse_filters("warp_editor=trace")
|
||||
.parse_filters("galaxy_editor=trace")
|
||||
.is_test(true)
|
||||
.init();
|
||||
});
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use float_cmp::ApproxEq;
|
||||
use sum_tree::{SeekBias, SumTree};
|
||||
use warpui::{
|
||||
use galaxyui::{
|
||||
SizeConstraint,
|
||||
geometry::{
|
||||
rect::RectF,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
use itertools::Itertools;
|
||||
use sum_tree::SumTree;
|
||||
|
||||
use warpui::{
|
||||
use galaxyui::{
|
||||
SizeConstraint,
|
||||
geometry::vector::vec2f,
|
||||
units::{IntoPixels, Pixels},
|
||||
|
||||
@@ -3,8 +3,8 @@ use std::ops::Range;
|
||||
use itertools::Itertools;
|
||||
use lazy_static::lazy_static;
|
||||
use pathfinder_color::ColorU;
|
||||
use warp_core::ui::theme::Fill;
|
||||
use warpui::{Entity, ModelContext, ModelHandle, r#async::SpawnedFutureHandle};
|
||||
use galaxy_core::ui::theme::Fill;
|
||||
use galaxyui::{Entity, ModelContext, ModelHandle, r#async::SpawnedFutureHandle};
|
||||
|
||||
use crate::{
|
||||
content::{
|
||||
@@ -276,7 +276,7 @@ impl Searcher {
|
||||
#[cfg(test)]
|
||||
pub fn search_finished(
|
||||
&self,
|
||||
ctx: &mut warpui::AppContext,
|
||||
ctx: &mut galaxyui::AppContext,
|
||||
) -> impl std::future::Future<Output = ()> + use<> {
|
||||
let maybe_search = self
|
||||
.search_handle
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use warpui::{App, ModelHandle};
|
||||
use galaxyui::{App, ModelHandle};
|
||||
|
||||
use crate::content::{
|
||||
buffer::{AutoScrollBehavior, Buffer, BufferEditAction, BufferSelectAction, EditOrigin},
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
use num_traits::SaturatingSub;
|
||||
use std::ops::Range;
|
||||
use vec1::Vec1;
|
||||
use warpui::{AppContext, Entity, ModelAsRef, ModelContext, ModelHandle, units::Pixels};
|
||||
use galaxyui::{AppContext, Entity, ModelAsRef, ModelContext, ModelHandle, units::Pixels};
|
||||
|
||||
use crate::{
|
||||
content::{
|
||||
@@ -16,7 +16,7 @@ use crate::{
|
||||
render::model::{RenderState, SoftWrapPoint},
|
||||
};
|
||||
use string_offset::CharOffset;
|
||||
use warpui::text::{TextBuffer, point::Point, word_boundaries::WordBoundariesPolicy};
|
||||
use galaxyui::text::{TextBuffer, point::Point, word_boundaries::WordBoundariesPolicy};
|
||||
|
||||
#[cfg(test)]
|
||||
#[path = "selection_tests.rs"]
|
||||
|
||||
@@ -3,8 +3,8 @@ use std::sync::Arc;
|
||||
use serde_yaml::Value;
|
||||
use sum_tree::SumTree;
|
||||
use vec1::vec1;
|
||||
use warp_core::features::FeatureFlag;
|
||||
use warpui::{App, ModelAsRef, units::IntoPixels};
|
||||
use galaxy_core::features::FeatureFlag;
|
||||
use galaxyui::{App, ModelAsRef, units::IntoPixels};
|
||||
|
||||
use crate::{
|
||||
content::{
|
||||
@@ -22,8 +22,8 @@ use crate::{
|
||||
selection::SelectionMode,
|
||||
};
|
||||
use string_offset::CharOffset;
|
||||
use warpui::assets::asset_cache::AssetSource;
|
||||
use warpui::text::word_boundaries::WordBoundariesPolicy;
|
||||
use galaxyui::assets::asset_cache::AssetSource;
|
||||
use galaxyui::text::word_boundaries::WordBoundariesPolicy;
|
||||
|
||||
use super::{SelectionModel, TextDirection, TextUnit};
|
||||
|
||||
@@ -37,7 +37,7 @@ impl SelectionModel {
|
||||
}
|
||||
}
|
||||
|
||||
fn selection_model_with_rendered_mermaid(app: &mut App) -> warpui::ModelHandle<SelectionModel> {
|
||||
fn selection_model_with_rendered_mermaid(app: &mut App) -> galaxyui::ModelHandle<SelectionModel> {
|
||||
app.add_model(|ctx| {
|
||||
let buffer = ctx.add_model(|_| Buffer::new(Box::new(|_, _| IndentBehavior::Ignore)));
|
||||
let buffer_selection = ctx.add_model(|_| BufferSelectionModel::new(buffer.clone()));
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
[package]
|
||||
name = "warp_cli"
|
||||
name = "galaxy_cli"
|
||||
edition = "2024"
|
||||
description = "CLI argument parsing for Warp"
|
||||
authors.workspace = true
|
||||
@@ -14,9 +14,9 @@ humantime.workspace = true
|
||||
jaq-all.workspace = true
|
||||
url = { workspace = true, features = ["serde"] }
|
||||
uuid = { workspace = true }
|
||||
warp_core = { path = "../warp_core" }
|
||||
galaxy_core = { path = "../galaxy_core" }
|
||||
color-print = "0.3"
|
||||
warp_util = { path = "../warp_util" }
|
||||
galaxy_util = { path = "../galaxy_util" }
|
||||
clap_complete = "4.5.58"
|
||||
anyhow.workspace = true
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user