Rebrand to Galaxy, major improvements to Bedrock support, still needs some TLC though
This commit is contained in:
@@ -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};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user