Rebrand to Galaxy, major improvements to Bedrock support, still needs some TLC though
This commit is contained in:
@@ -3,7 +3,7 @@ use std::path::{Path, PathBuf};
|
||||
use uuid::Uuid;
|
||||
|
||||
use super::MCPProvider;
|
||||
use warpui::{AppContext, Entity, ModelContext, SingletonEntity};
|
||||
use galaxyui::{AppContext, Entity, ModelContext, SingletonEntity};
|
||||
|
||||
pub struct FileBasedMCPManager {}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use warpui::{Entity, ModelContext, SingletonEntity};
|
||||
use galaxyui::{Entity, ModelContext, SingletonEntity};
|
||||
|
||||
pub struct FileMCPWatcher {}
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@ use repo_metadata::repositories::DetectedRepositories;
|
||||
use std::collections::{hash_map::Entry, HashMap, HashSet};
|
||||
use std::path::{Path, PathBuf};
|
||||
use uuid::Uuid;
|
||||
use warp_core::features::FeatureFlag;
|
||||
use warpui::{AppContext, Entity, ModelContext, SingletonEntity};
|
||||
use galaxy_core::features::FeatureFlag;
|
||||
use galaxyui::{AppContext, Entity, ModelContext, SingletonEntity};
|
||||
|
||||
use crate::{
|
||||
ai::mcp::{
|
||||
|
||||
@@ -12,12 +12,12 @@ use settings::Setting as _;
|
||||
use std::collections::HashSet;
|
||||
use std::path::PathBuf;
|
||||
use uuid::Uuid;
|
||||
use warp_core::features::FeatureFlag;
|
||||
use warpui::{App, Entity, ModelHandle, SingletonEntity as _};
|
||||
use galaxy_core::features::FeatureFlag;
|
||||
use galaxyui::{App, Entity, ModelHandle, SingletonEntity as _};
|
||||
use watcher::HomeDirectoryWatcher;
|
||||
|
||||
// Helper to initialize dependencies and return FileBasedMCPManager handle
|
||||
fn setup_app(app: &mut App) -> warpui::ModelHandle<FileBasedMCPManager> {
|
||||
fn setup_app(app: &mut App) -> galaxyui::ModelHandle<FileBasedMCPManager> {
|
||||
app.add_singleton_model(DirectoryWatcher::new);
|
||||
app.add_singleton_model(|_| DetectedRepositories::default());
|
||||
app.add_singleton_model(RepoMetadataModel::new);
|
||||
|
||||
@@ -11,8 +11,8 @@ use std::io::ErrorKind;
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::pin::Pin;
|
||||
use std::sync::LazyLock;
|
||||
use warp_core::safe_warn;
|
||||
use warpui::{Entity, ModelContext, ModelHandle, SingletonEntity};
|
||||
use galaxy_core::safe_warn;
|
||||
use galaxyui::{Entity, ModelContext, ModelHandle, SingletonEntity};
|
||||
use watcher::HomeDirectoryWatcherEvent;
|
||||
|
||||
use crate::ai::mcp::{
|
||||
@@ -286,7 +286,7 @@ impl FileMCPWatcher {
|
||||
}
|
||||
|
||||
let Ok(std_path) =
|
||||
warp_util::standardized_path::StandardizedPath::from_local_canonicalized(subdir_path)
|
||||
galaxy_util::standardized_path::StandardizedPath::from_local_canonicalized(subdir_path)
|
||||
else {
|
||||
return;
|
||||
};
|
||||
|
||||
@@ -7,7 +7,7 @@ use crate::server::cloud_objects::update_manager::{UpdateManager, UpdateManagerE
|
||||
use crate::server::datetime_ext::DateTimeExt;
|
||||
use chrono::DateTime;
|
||||
use uuid::Uuid;
|
||||
use warpui::{Entity, ModelContext, SingletonEntity};
|
||||
use galaxyui::{Entity, ModelContext, SingletonEntity};
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct GalleryMCPServer {
|
||||
@@ -130,7 +130,7 @@ impl MCPGalleryManager {
|
||||
/// Update gallery items from the server response
|
||||
pub fn update_gallery_items(
|
||||
&mut self,
|
||||
templates: Vec<warp_graphql::mcp_gallery_template::MCPGalleryTemplate>,
|
||||
templates: Vec<galaxy_graphql::mcp_gallery_template::MCPGalleryTemplate>,
|
||||
ctx: &mut ModelContext<Self>,
|
||||
) {
|
||||
let mut gallery_items = HashMap::new();
|
||||
|
||||
@@ -28,8 +28,8 @@ use diesel::{QueryDsl, RunQueryDsl, SqliteConnection};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use strum::IntoEnumIterator;
|
||||
use strum_macros::EnumIter;
|
||||
use warp_core::ui::appearance::Appearance;
|
||||
use warp_core::ui::Icon;
|
||||
use galaxy_core::ui::appearance::Appearance;
|
||||
use galaxy_core::ui::Icon;
|
||||
|
||||
pub mod manager;
|
||||
pub mod templatable_manager;
|
||||
@@ -48,7 +48,7 @@ cfg_if::cfg_if! {
|
||||
|
||||
pub(crate) fn home_config_file_path(provider: MCPProvider) -> Option<PathBuf> {
|
||||
match provider {
|
||||
MCPProvider::Warp => warp_core::paths::warp_home_mcp_config_file_path(),
|
||||
MCPProvider::Warp => galaxy_core::paths::warp_home_mcp_config_file_path(),
|
||||
_ => dirs::home_dir().map(|home_dir| home_dir.join(provider.home_config_path())),
|
||||
}
|
||||
}
|
||||
@@ -147,7 +147,7 @@ mod tests {
|
||||
#[test]
|
||||
fn mcp_provider_from_file_path_recognizes_warp_home_path() {
|
||||
if let Some(warp_home_mcp_config_file_path) =
|
||||
warp_core::paths::warp_home_mcp_config_file_path()
|
||||
galaxy_core::paths::warp_home_mcp_config_file_path()
|
||||
{
|
||||
assert_eq!(
|
||||
mcp_provider_from_file_path(&warp_home_mcp_config_file_path),
|
||||
@@ -159,7 +159,7 @@ mod tests {
|
||||
|
||||
pub mod gallery;
|
||||
pub use gallery::MCPGalleryManager;
|
||||
use warpui::{AppContext, SingletonEntity as _};
|
||||
use galaxyui::{AppContext, SingletonEntity as _};
|
||||
pub mod templatable;
|
||||
pub use templatable::JsonTemplate;
|
||||
pub use templatable::{TemplatableMCPServer, TemplateVariable};
|
||||
|
||||
@@ -10,7 +10,7 @@ mod tests {
|
||||
};
|
||||
use serde_json;
|
||||
use std::collections::HashMap;
|
||||
use warp_managed_secrets::ManagedSecretValue;
|
||||
use galaxy_managed_secrets::ManagedSecretValue;
|
||||
|
||||
#[test]
|
||||
fn test_mcp_server_config_serialization_excludes_secret_env_values() {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
use std::future::Future;
|
||||
|
||||
use uuid::Uuid;
|
||||
use warpui::ModelSpawner;
|
||||
use galaxyui::ModelSpawner;
|
||||
|
||||
use super::TemplatableMCPServerManager;
|
||||
|
||||
|
||||
@@ -4,8 +4,8 @@ use chrono::DateTime;
|
||||
use handlebars::get_arguments;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use uuid::Uuid;
|
||||
use warp_core::ui::appearance::Appearance;
|
||||
use warpui::{AppContext, SingletonEntity as _};
|
||||
use galaxy_core::ui::appearance::Appearance;
|
||||
use galaxyui::{AppContext, SingletonEntity as _};
|
||||
|
||||
use crate::{
|
||||
cloud_object::{
|
||||
|
||||
@@ -5,7 +5,7 @@ use lazy_static::lazy_static;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::hash::{Hash, Hasher};
|
||||
use uuid::Uuid;
|
||||
use warp_managed_secrets::ManagedSecretValue;
|
||||
use galaxy_managed_secrets::ManagedSecretValue;
|
||||
|
||||
use crate::ai::mcp::{TemplatableMCPServer, TemplateVariable};
|
||||
use siphasher::sip::SipHasher;
|
||||
|
||||
@@ -22,8 +22,8 @@ use crate::ai::mcp::{templatable_installation::TemplatableMCPServerInstallation,
|
||||
use futures_util::stream::AbortHandle;
|
||||
use uuid::Uuid;
|
||||
#[cfg(not(target_family = "wasm"))]
|
||||
use warpui::ModelSpawner;
|
||||
use warpui::{Entity, SingletonEntity};
|
||||
use galaxyui::ModelSpawner;
|
||||
use galaxyui::{Entity, SingletonEntity};
|
||||
|
||||
#[cfg(not(target_family = "wasm"))]
|
||||
type ReconnectResultSender =
|
||||
@@ -319,7 +319,7 @@ impl TemplatableMCPServerManager {
|
||||
pub fn get_active_file_based_servers(
|
||||
&self,
|
||||
cwd: &std::path::Path,
|
||||
app: &warpui::AppContext,
|
||||
app: &galaxyui::AppContext,
|
||||
) -> HashMap<Uuid, &TemplatableMCPServerInfo> {
|
||||
FileBasedMCPManager::as_ref(app)
|
||||
.get_servers_for_working_directory(cwd, app)
|
||||
|
||||
@@ -55,10 +55,10 @@ use simple_logger::manager::LogManager;
|
||||
use simple_logger::SimpleLogger;
|
||||
use tokio::io::AsyncBufReadExt as _;
|
||||
use uuid::Uuid;
|
||||
use warp_core::safe_error;
|
||||
use warp_core::{execution_mode::AppExecutionMode, features::FeatureFlag, settings::Setting as _};
|
||||
use warpui::AppContext;
|
||||
use warpui::{windowing::WindowManager, ModelContext, SingletonEntity};
|
||||
use galaxy_core::safe_error;
|
||||
use galaxy_core::{execution_mode::AppExecutionMode, features::FeatureFlag, settings::Setting as _};
|
||||
use galaxyui::AppContext;
|
||||
use galaxyui::{windowing::WindowManager, ModelContext, SingletonEntity};
|
||||
|
||||
use super::{
|
||||
oauth::{self, AuthContext, FileBasedPersistedCredentialsMap, PersistedCredentialsMap},
|
||||
@@ -2097,8 +2097,8 @@ fn make_client_info() -> rmcp::model::ClientInfo {
|
||||
protocol_version: Default::default(),
|
||||
capabilities: Default::default(),
|
||||
client_info: rmcp::model::Implementation {
|
||||
name: warp_core::channel::ChannelState::app_id().to_string(),
|
||||
version: warp_core::channel::ChannelState::app_version()
|
||||
name: galaxy_core::channel::ChannelState::app_id().to_string(),
|
||||
version: galaxy_core::channel::ChannelState::app_version()
|
||||
.map(|v| v.to_string())
|
||||
.unwrap_or_default(),
|
||||
title: None,
|
||||
|
||||
@@ -13,12 +13,12 @@ use serde::de::DeserializeOwned;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use url::Url;
|
||||
use uuid::Uuid;
|
||||
use warp_core::channel::ChannelState;
|
||||
use warpui::ModelSpawner;
|
||||
use warpui_extras::secure_storage::AppContextExt as _;
|
||||
use galaxy_core::channel::ChannelState;
|
||||
use galaxyui::ModelSpawner;
|
||||
use galaxyui_extras::secure_storage::AppContextExt as _;
|
||||
|
||||
use super::{MCPServerState, TemplatableMCPServerManager};
|
||||
use {crate::ai::mcp::FileBasedMCPManager, warpui::SingletonEntity};
|
||||
use {crate::ai::mcp::FileBasedMCPManager, galaxyui::SingletonEntity};
|
||||
|
||||
pub(crate) const TEMPLATABLE_MCP_CREDENTIALS_KEY: &str = "TemplatableMcpCredentials";
|
||||
pub(crate) const FILE_BASED_MCP_CREDENTIALS_KEY: &str = "FileBasedMcpCredentials";
|
||||
@@ -476,7 +476,7 @@ impl TemplatableMCPServerManager {
|
||||
bail!("No spawned server found for uuid={server_uuid}");
|
||||
};
|
||||
|
||||
warpui::r#async::block_on(server_info.oauth_result_tx.send(result)).map_err(|_| {
|
||||
galaxyui::r#async::block_on(server_info.oauth_result_tx.send(result)).map_err(|_| {
|
||||
anyhow!("Failed to send OAuth result to server {server_uuid} - receiver dropped")
|
||||
})?;
|
||||
|
||||
@@ -486,7 +486,7 @@ impl TemplatableMCPServerManager {
|
||||
|
||||
pub fn save_credentials_to_secure_storage(
|
||||
&mut self,
|
||||
app: &mut warpui::AppContext,
|
||||
app: &mut galaxyui::AppContext,
|
||||
installation_uuid: Uuid,
|
||||
credentials: PersistedCredentials,
|
||||
) {
|
||||
@@ -517,7 +517,7 @@ impl TemplatableMCPServerManager {
|
||||
pub fn delete_credentials_from_secure_storage(
|
||||
&mut self,
|
||||
installation_uuid: Uuid,
|
||||
app: &mut warpui::AppContext,
|
||||
app: &mut galaxyui::AppContext,
|
||||
) {
|
||||
if let Some(template_uuid) = self.get_template_uuid(installation_uuid) {
|
||||
self.server_credentials.remove(&template_uuid);
|
||||
@@ -534,13 +534,13 @@ impl TemplatableMCPServerManager {
|
||||
|
||||
/// Loads credentials from secure storage at the provided key.
|
||||
pub(crate) fn load_credentials_from_secure_storage<T: DeserializeOwned + Default>(
|
||||
app: &mut warpui::AppContext,
|
||||
app: &mut galaxyui::AppContext,
|
||||
key: &str,
|
||||
) -> T {
|
||||
app.secure_storage()
|
||||
.read_value(key)
|
||||
.inspect_err(|err| {
|
||||
if !matches!(err, warpui_extras::secure_storage::Error::NotFound) {
|
||||
if !matches!(err, galaxyui_extras::secure_storage::Error::NotFound) {
|
||||
log::warn!("Failed to read MCP credentials from secure storage: {err:#}");
|
||||
}
|
||||
})
|
||||
@@ -551,7 +551,7 @@ pub(crate) fn load_credentials_from_secure_storage<T: DeserializeOwned + Default
|
||||
|
||||
/// Writes credentials to secure storage at the provided key.
|
||||
pub(crate) fn write_to_secure_storage<T: Serialize>(
|
||||
app: &mut warpui::AppContext,
|
||||
app: &mut galaxyui::AppContext,
|
||||
key: &str,
|
||||
credentials: &T,
|
||||
) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
use warpui::AppContext;
|
||||
use warpui::ModelContext;
|
||||
use galaxyui::AppContext;
|
||||
use galaxyui::ModelContext;
|
||||
|
||||
use super::TemplatableMCPServerManager;
|
||||
use crate::ai::mcp::templatable::{CloudTemplatableMCPServer, TemplatableMCPServer};
|
||||
@@ -159,7 +159,7 @@ impl TemplatableMCPServerManager {
|
||||
pub fn delete_credentials_from_secure_storage(
|
||||
&mut self,
|
||||
_sync_id: Uuid,
|
||||
_app: &mut warpui::AppContext,
|
||||
_app: &mut galaxyui::AppContext,
|
||||
) {
|
||||
log::warn!("Deleting credentials for MCP servers is not supported in WASM")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user