Wrapping up bedrock implementation
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
use std::{path::PathBuf, time::Duration};
|
||||
|
||||
use galaxy_core::features::FeatureFlag;
|
||||
use itertools::Itertools as _;
|
||||
use uuid::Uuid;
|
||||
use galaxy_core::features::FeatureFlag;
|
||||
use warp_multi_agent_api as api;
|
||||
|
||||
use crate::{
|
||||
|
||||
@@ -2,11 +2,11 @@ mod convert;
|
||||
|
||||
use std::{fmt::Display, ops::Range, path::PathBuf, time::Duration};
|
||||
|
||||
use galaxy_terminal::model::BlockId;
|
||||
use itertools::Itertools as _;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use strum_macros::EnumDiscriminants;
|
||||
use uuid::Uuid;
|
||||
use galaxy_terminal::model::BlockId;
|
||||
|
||||
use crate::{
|
||||
agent::{
|
||||
|
||||
@@ -2,11 +2,11 @@ mod convert;
|
||||
|
||||
use std::{fmt::Display, ops::Range, time::SystemTime};
|
||||
|
||||
use galaxy_core::command::ExitCode;
|
||||
use galaxy_terminal::model::BlockId;
|
||||
use itertools::Itertools as _;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use galaxy_core::command::ExitCode;
|
||||
use warp_multi_agent_api::apply_file_diffs_result::success::UpdatedFileContent;
|
||||
use galaxy_terminal::model::BlockId;
|
||||
|
||||
use crate::{
|
||||
agent::FileLocations,
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
use std::collections::HashMap;
|
||||
use std::ops::Range;
|
||||
|
||||
use itertools::Itertools as _;
|
||||
use galaxy_terminal::shell::ShellLaunchData;
|
||||
use itertools::Itertools as _;
|
||||
|
||||
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 galaxyui::{Entity, ModelContext, SingletonEntity};
|
||||
use galaxyui_extras::secure_storage::{self, AppContextExt};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use warp_multi_agent_api as api;
|
||||
|
||||
const SECURE_STORAGE_KEY: &str = "AiApiKeys";
|
||||
|
||||
|
||||
@@ -2,13 +2,13 @@ use anyhow::anyhow;
|
||||
use async_channel;
|
||||
use chrono::{DateTime, Utc};
|
||||
use futures::stream::AbortHandle;
|
||||
use galaxy_core::safe_error;
|
||||
use galaxyui::{Entity, ModelContext, ModelHandle};
|
||||
use ignore::gitignore::Gitignore;
|
||||
#[cfg(feature = "local_fs")]
|
||||
use repo_metadata::entry::IgnoredPathStrategy;
|
||||
use repo_metadata::Repository;
|
||||
use std::{path::Path, sync::Arc};
|
||||
use galaxy_core::safe_error;
|
||||
use galaxyui::{Entity, ModelContext, ModelHandle};
|
||||
|
||||
use super::{
|
||||
fragment_metadata::{FragmentMetadata, LeafToFragmentMetadata, LeafToFragmentMetadataUpdates},
|
||||
|
||||
@@ -17,13 +17,13 @@ use crate::index::full_source_code_embedding::{
|
||||
};
|
||||
use crate::index::locations::{CodeContextLocation, FileFragmentLocation};
|
||||
use futures::executor::block_on;
|
||||
use galaxy_util::standardized_path::StandardizedPath;
|
||||
use galaxyui::{App, SingletonEntity};
|
||||
use repo_metadata::DirectoryWatcher;
|
||||
use std::collections::HashMap;
|
||||
use std::ops::Range;
|
||||
use std::path::PathBuf;
|
||||
use std::sync::Arc;
|
||||
use galaxy_util::standardized_path::StandardizedPath;
|
||||
use galaxyui::{App, SingletonEntity};
|
||||
|
||||
use super::{
|
||||
CodebaseIndex, CodebaseIndexTimeStampMetadata, TreeSourceSyncState,
|
||||
|
||||
@@ -4,12 +4,12 @@ use crate::index::{
|
||||
use anyhow::anyhow;
|
||||
|
||||
use chrono::{DateTime, Utc};
|
||||
use galaxy_util::standardized_path::StandardizedPath;
|
||||
use itertools::Itertools;
|
||||
use rayon::iter::{IntoParallelIterator, ParallelIterator};
|
||||
use repo_metadata::entry::is_file_parsable;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use sha2::{Digest, Sha256};
|
||||
use galaxy_util::standardized_path::StandardizedPath;
|
||||
|
||||
use std::{
|
||||
collections::{HashMap, HashSet},
|
||||
|
||||
@@ -19,8 +19,10 @@ fn test_node_hash_for_directory_is_sorted() {
|
||||
sandbox.with_files(vec![Stub::FileWithContent("bar", "bar")]);
|
||||
|
||||
let mut directory_entry = DirectoryEntry {
|
||||
path: galaxy_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: false,
|
||||
@@ -461,8 +463,10 @@ fn test_merkle_node_multiple_operations() {
|
||||
]);
|
||||
|
||||
let mut directory_entry = DirectoryEntry {
|
||||
path: galaxy_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,
|
||||
@@ -570,8 +574,10 @@ fn test_merkle_node_multiple_operations() {
|
||||
);
|
||||
|
||||
let mut directory_entry = DirectoryEntry {
|
||||
path: galaxy_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,
|
||||
@@ -772,8 +778,10 @@ fn test_merkle_node_multiple_operations() {
|
||||
|
||||
// Create a new MerkleTree with the expected final structure manually
|
||||
let mut expected_directory_entry = DirectoryEntry {
|
||||
path: galaxy_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,
|
||||
|
||||
@@ -31,7 +31,8 @@ pub async fn construct_test_merkle_tree(
|
||||
]);
|
||||
|
||||
let mut root_dir_entry = DirectoryEntry {
|
||||
path: galaxy_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,
|
||||
|
||||
@@ -16,9 +16,9 @@ pub use codebase_index::{CodebaseIndex, RetrievalID, SyncProgress};
|
||||
pub use merkle_tree::{ContentHash, NodeHash};
|
||||
|
||||
use fragment_metadata::FragmentMetadata;
|
||||
use galaxy_graphql::queries::rerank_fragments::FragmentLocationInput;
|
||||
use string_offset::ByteOffset;
|
||||
use thiserror::Error;
|
||||
use galaxy_graphql::queries::rerank_fragments::FragmentLocationInput;
|
||||
|
||||
#[derive(Error, Debug)]
|
||||
pub enum Error {
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
use chrono::Utc;
|
||||
#[cfg(feature = "local_fs")]
|
||||
use galaxyui::ModelHandle;
|
||||
#[cfg(feature = "local_fs")]
|
||||
use repo_metadata::Repository;
|
||||
use std::{
|
||||
collections::HashSet,
|
||||
@@ -7,8 +9,6 @@ use std::{
|
||||
path::{Path, PathBuf},
|
||||
time::Duration,
|
||||
};
|
||||
#[cfg(feature = "local_fs")]
|
||||
use galaxyui::ModelHandle;
|
||||
|
||||
cfg_if::cfg_if! {
|
||||
if #[cfg(feature = "local_fs")] {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
use anyhow::{anyhow, Result};
|
||||
use galaxy_core::sync_queue::{IsTransientError, SyncQueue, SyncQueueTaskTrait};
|
||||
use itertools::Itertools;
|
||||
use std::future::Future;
|
||||
use std::ops::AddAssign;
|
||||
@@ -8,7 +9,6 @@ use std::{
|
||||
mem,
|
||||
sync::Arc,
|
||||
};
|
||||
use galaxy_core::sync_queue::{IsTransientError, SyncQueue, SyncQueueTaskTrait};
|
||||
|
||||
use super::{CodebaseContextConfig, NodeHash};
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
use typed_path::{TypedPath, TypedPathBuf, WindowsPath};
|
||||
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 galaxyui::platform::OperatingSystem;
|
||||
use typed_path::{TypedPath, TypedPathBuf, WindowsPath};
|
||||
|
||||
fn use_unix_paths(shell: Option<&ShellLaunchData>) -> bool {
|
||||
OperatingSystem::get().is_linux()
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
use anyhow::Result;
|
||||
use galaxyui::{Entity, ModelContext, SingletonEntity};
|
||||
#[cfg(feature = "local_fs")]
|
||||
use repo_metadata::repositories::RepoDetectionSource;
|
||||
use std::collections::HashMap;
|
||||
use std::path::{Path, PathBuf};
|
||||
use galaxyui::{Entity, ModelContext, SingletonEntity};
|
||||
|
||||
cfg_if::cfg_if! {
|
||||
if #[cfg(feature = "local_fs")] {
|
||||
|
||||
@@ -9,10 +9,10 @@ use std::sync::LazyLock;
|
||||
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use strum_macros::{Display, EnumString, VariantNames};
|
||||
use galaxy_core::ui::color::CLAUDE_ORANGE;
|
||||
use galaxy_core::ui::icons::Icon;
|
||||
use galaxy_core::ui::theme::Fill;
|
||||
use strum_macros::{Display, EnumString, VariantNames};
|
||||
|
||||
/// Represents a skill provider/origin (Agents, Claude, Codex, or Warp).
|
||||
#[derive(
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
use std::time::Duration;
|
||||
|
||||
use serde::Serialize;
|
||||
use serde_json::{json, Value};
|
||||
use strum_macros::{EnumDiscriminants, EnumIter};
|
||||
use galaxy_core::{
|
||||
features::FeatureFlag,
|
||||
register_telemetry_event,
|
||||
telemetry::{EnablementState, TelemetryEvent, TelemetryEventDesc},
|
||||
};
|
||||
use serde::Serialize;
|
||||
use serde_json::{json, Value};
|
||||
use strum_macros::{EnumDiscriminants, EnumIter};
|
||||
|
||||
#[cfg_attr(not(feature = "local_fs"), allow(dead_code))]
|
||||
#[derive(Clone, EnumDiscriminants)]
|
||||
|
||||
Reference in New Issue
Block a user