Rebrand to Galaxy, major improvements to Bedrock support, still needs some TLC though
This commit is contained in:
@@ -5,7 +5,7 @@ use crate::terminal::model::{
|
||||
};
|
||||
use chrono::{DateTime, FixedOffset, Utc};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use warp_graphql::mutations::share_block::DisplaySetting as GqlDisplaySetting;
|
||||
use galaxy_graphql::mutations::share_block::DisplaySetting as GqlDisplaySetting;
|
||||
|
||||
// These are pixel heights of various parts of an embedded block.
|
||||
pub const TITLE_HEIGHT: u32 = 34;
|
||||
|
||||
@@ -23,7 +23,7 @@ use anyhow::{anyhow, Result};
|
||||
use async_channel::Sender;
|
||||
use async_trait::async_trait;
|
||||
use chrono::{DateTime, Utc};
|
||||
use warp_graphql::object_permissions::AccessLevel;
|
||||
use galaxy_graphql::object_permissions::AccessLevel;
|
||||
|
||||
use crate::{
|
||||
cloud_object::{
|
||||
|
||||
@@ -22,12 +22,12 @@ use super::update_manager::UpdateManager;
|
||||
use chrono::{DateTime, Utc};
|
||||
use futures_util::stream::AbortHandle;
|
||||
use std::time::Duration;
|
||||
use warpui::r#async::Timer;
|
||||
use galaxyui::r#async::Timer;
|
||||
|
||||
use async_channel::Sender;
|
||||
|
||||
use std::sync::Arc;
|
||||
use warpui::{Entity, ModelContext, RequestState, SingletonEntity};
|
||||
use galaxyui::{Entity, ModelContext, RequestState, SingletonEntity};
|
||||
|
||||
use instant::Instant;
|
||||
|
||||
|
||||
@@ -7,8 +7,8 @@ use std::{
|
||||
};
|
||||
|
||||
use settings::manager::SettingsManager;
|
||||
use warp_core::execution_mode::{AppExecutionMode, ExecutionMode};
|
||||
use warpui::{App, ModelHandle, SingletonEntity};
|
||||
use galaxy_core::execution_mode::{AppExecutionMode, ExecutionMode};
|
||||
use galaxyui::{App, ModelHandle, SingletonEntity};
|
||||
|
||||
use crate::{
|
||||
auth::{auth_manager::AuthManager, AuthStateProvider},
|
||||
|
||||
@@ -79,13 +79,13 @@ use std::collections::{HashMap, HashSet};
|
||||
use std::future::Future;
|
||||
use std::sync::{mpsc::SyncSender, Arc};
|
||||
use std::time::Duration;
|
||||
use warp_core::features::FeatureFlag;
|
||||
use warp_graphql::mcp_gallery_template::MCPGalleryTemplate;
|
||||
use warp_graphql::object_permissions::AccessLevel;
|
||||
use warp_graphql::scalars::time::ServerTimestamp;
|
||||
use warpui::r#async::{FutureId, Timer};
|
||||
use warpui::{duration_with_jitter, AppContext};
|
||||
use warpui::{Entity, ModelContext, RequestState, RetryOption, SingletonEntity};
|
||||
use galaxy_core::features::FeatureFlag;
|
||||
use galaxy_graphql::mcp_gallery_template::MCPGalleryTemplate;
|
||||
use galaxy_graphql::object_permissions::AccessLevel;
|
||||
use galaxy_graphql::scalars::time::ServerTimestamp;
|
||||
use galaxyui::r#async::{FutureId, Timer};
|
||||
use galaxyui::{duration_with_jitter, AppContext};
|
||||
use galaxyui::{Entity, ModelContext, RequestState, RetryOption, SingletonEntity};
|
||||
|
||||
use super::listener::ObjectUpdateMessage;
|
||||
|
||||
@@ -2703,8 +2703,8 @@ impl UpdateManager {
|
||||
ctx: &mut ModelContext<Self>,
|
||||
) where
|
||||
P: 'static + FnMut(Arc<dyn ObjectClient>) -> S,
|
||||
S: warpui::r#async::Spawnable + Future<Output = anyhow::Result<R>>,
|
||||
<S as Future>::Output: warpui::r#async::SpawnableOutput,
|
||||
S: galaxyui::r#async::Spawnable + Future<Output = anyhow::Result<R>>,
|
||||
<S as Future>::Output: galaxyui::r#async::SpawnableOutput,
|
||||
F: 'static + FnMut(R, &mut AppContext) -> Option<ServerPermissions>,
|
||||
{
|
||||
let object_client = self.object_client.clone();
|
||||
@@ -2765,8 +2765,8 @@ impl UpdateManager {
|
||||
mut on_success: impl FnMut(&mut Self, M, &mut ModelContext<Self>) + 'static,
|
||||
) where
|
||||
P: 'static + FnMut(Arc<dyn ObjectClient>) -> S,
|
||||
S: warpui::r#async::Spawnable + Future<Output = anyhow::Result<M>>,
|
||||
<S as Future>::Output: warpui::r#async::SpawnableOutput,
|
||||
S: galaxyui::r#async::Spawnable + Future<Output = anyhow::Result<M>>,
|
||||
<S as Future>::Output: galaxyui::r#async::SpawnableOutput,
|
||||
{
|
||||
let cloud_model = CloudModel::handle(ctx);
|
||||
let uid = server_id.uid();
|
||||
|
||||
@@ -3,9 +3,9 @@ use std::{collections::HashMap, sync::Arc, time::Duration};
|
||||
use chrono::{DateTime, Utc};
|
||||
use futures_lite::future;
|
||||
use settings::{RespectUserSyncSetting, SyncToCloud};
|
||||
use warp_core::features::FeatureFlag;
|
||||
use warp_graphql::{object_permissions::AccessLevel, scalars::time::ServerTimestamp};
|
||||
use warpui::{App, ModelHandle, SingletonEntity};
|
||||
use galaxy_core::features::FeatureFlag;
|
||||
use galaxy_graphql::{object_permissions::AccessLevel, scalars::time::ServerTimestamp};
|
||||
use galaxyui::{App, ModelHandle, SingletonEntity};
|
||||
|
||||
#[cfg(test)]
|
||||
use crate::server::server_api::object::MockObjectClient;
|
||||
@@ -1666,7 +1666,7 @@ fn test_sync_state_after_creation_failure_item_not_in_sync_queue() {
|
||||
.await;
|
||||
|
||||
// await long enough that all the sync queue retries are exhausted
|
||||
warpui::r#async::Timer::after(Duration::from_secs(10)).await;
|
||||
galaxyui::r#async::Timer::after(Duration::from_secs(10)).await;
|
||||
|
||||
// because there aren't any items in the sync queue left for this object,
|
||||
// it should be marked as errored
|
||||
@@ -1758,7 +1758,7 @@ fn test_sync_state_after_update_failure_item_in_sync_queue() {
|
||||
.await;
|
||||
|
||||
// await long enough that all the sync queue retries are exhausted
|
||||
warpui::r#async::Timer::after(Duration::from_secs(10)).await;
|
||||
galaxyui::r#async::Timer::after(Duration::from_secs(10)).await;
|
||||
|
||||
// because notebook updates are dependent on one another, all should have registered
|
||||
// as failed and there should be no updates left in the sync queue.
|
||||
@@ -2580,7 +2580,7 @@ fn test_metadata_after_trash_item_failure() {
|
||||
.await;
|
||||
|
||||
// await long enough that all the trash object retries are exhausted
|
||||
warpui::r#async::Timer::after(Duration::from_secs(10)).await;
|
||||
galaxyui::r#async::Timer::after(Duration::from_secs(10)).await;
|
||||
|
||||
assert_trashed_status_for_object(&mut app, &sync_id.uid(), false);
|
||||
assert_pending_status_for_object(&mut app, &sync_id.uid(), false);
|
||||
@@ -5761,7 +5761,7 @@ fn test_move_object_personal_to_team_failure() {
|
||||
.await;
|
||||
|
||||
// await long enough that all the move object retries are exhausted
|
||||
warpui::r#async::Timer::after(Duration::from_secs(10)).await;
|
||||
galaxyui::r#async::Timer::after(Duration::from_secs(10)).await;
|
||||
|
||||
assert_pending_online_only_change_for_object(&mut app, &sync_id.uid(), false);
|
||||
|
||||
@@ -6096,7 +6096,7 @@ fn test_move_workflow_with_enums_personal_to_team_failure() {
|
||||
.await;
|
||||
|
||||
// await long enough that all the move object retries are exhausted
|
||||
warpui::r#async::Timer::after(Duration::from_secs(10)).await;
|
||||
galaxyui::r#async::Timer::after(Duration::from_secs(10)).await;
|
||||
|
||||
// The workflow and enum should remain in the personal space
|
||||
assert_pending_online_only_change_for_object(&mut app, &workflow_sync_id.uid(), false);
|
||||
@@ -6341,7 +6341,7 @@ fn test_move_object_root_to_folder_failure() {
|
||||
.await;
|
||||
|
||||
// await long enough that all the move object retries are exhausted
|
||||
warpui::r#async::Timer::after(Duration::from_secs(10)).await;
|
||||
galaxyui::r#async::Timer::after(Duration::from_secs(10)).await;
|
||||
|
||||
assert_pending_online_only_change_for_object(&mut app, &sync_id.uid(), false);
|
||||
|
||||
@@ -6533,7 +6533,7 @@ fn test_move_object_folder_to_root_failure() {
|
||||
.await;
|
||||
|
||||
// await long enough that all the move object retries are exhausted
|
||||
warpui::r#async::Timer::after(Duration::from_secs(10)).await;
|
||||
galaxyui::r#async::Timer::after(Duration::from_secs(10)).await;
|
||||
|
||||
assert_pending_online_only_change_for_object(&mut app, &sync_id.uid(), false);
|
||||
|
||||
@@ -6729,7 +6729,7 @@ fn test_move_object_folder_to_folder_failure() {
|
||||
.await;
|
||||
|
||||
// await long enough that all the move object retries are exhausted
|
||||
warpui::r#async::Timer::after(Duration::from_secs(10)).await;
|
||||
galaxyui::r#async::Timer::after(Duration::from_secs(10)).await;
|
||||
|
||||
assert_pending_online_only_change_for_object(&mut app, &sync_id.uid(), false);
|
||||
|
||||
@@ -7496,7 +7496,7 @@ fn test_add_guest_failure() {
|
||||
ctx.await_spawned_future(update_manager.spawned_futures[0])
|
||||
})
|
||||
.await;
|
||||
warpui::r#async::Timer::after(Duration::from_secs(10)).await;
|
||||
galaxyui::r#async::Timer::after(Duration::from_secs(10)).await;
|
||||
|
||||
assert_pending_online_only_change_for_object(&mut app, &uid, false);
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
use std::fmt::{Display, Formatter};
|
||||
|
||||
use anyhow::{Ok, Result};
|
||||
use warp_graphql::experiment::Experiment;
|
||||
use galaxy_graphql::experiment::Experiment;
|
||||
|
||||
use super::ServerExperiment;
|
||||
|
||||
|
||||
@@ -14,11 +14,11 @@
|
||||
use crate::features::FeatureFlag;
|
||||
use crate::workspaces::user_workspaces::UserWorkspaces;
|
||||
use crate::workspaces::workspace::CustomerType;
|
||||
use warpui::AppContext;
|
||||
use galaxyui::AppContext;
|
||||
#[cfg(not(test))]
|
||||
use warpui::SingletonEntity as _;
|
||||
use galaxyui::SingletonEntity as _;
|
||||
#[cfg(test)]
|
||||
use warpui::SingletonEntity;
|
||||
use galaxyui::SingletonEntity;
|
||||
|
||||
mod convert;
|
||||
mod model;
|
||||
|
||||
@@ -5,7 +5,7 @@ use std::collections::HashSet;
|
||||
use super::ServerExperiment;
|
||||
use crate::{persistence::ModelEvent, report_if_error, GlobalResourceHandlesProvider};
|
||||
use anyhow::Context;
|
||||
use warpui::{Entity, ModelContext, SingletonEntity};
|
||||
use galaxyui::{Entity, ModelContext, SingletonEntity};
|
||||
|
||||
#[cfg(test)]
|
||||
pub use tests::TestModel;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use super::{ServerExperiment, ServerExperiments};
|
||||
use crate::{GlobalResourceHandles, GlobalResourceHandlesProvider};
|
||||
use warpui::{App, Entity, SingletonEntity};
|
||||
use galaxyui::{App, Entity, SingletonEntity};
|
||||
|
||||
/// A model for testing purposes only.
|
||||
///
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
pub mod schema;
|
||||
|
||||
use warp_graphql::client::RequestOptions;
|
||||
pub use warp_graphql::client::{get_request_context, get_user_facing_error_message, GraphQLError};
|
||||
use galaxy_graphql::client::RequestOptions;
|
||||
pub use galaxy_graphql::client::{get_request_context, get_user_facing_error_message, GraphQLError};
|
||||
|
||||
/// Returns the default [`RequestOptions`] that should be used for a GraphQL request.
|
||||
pub fn default_request_options() -> RequestOptions {
|
||||
|
||||
@@ -19,7 +19,7 @@ use crate::{
|
||||
};
|
||||
|
||||
use anyhow::{bail, Result};
|
||||
use warp_graphql::{
|
||||
use galaxy_graphql::{
|
||||
generic_string_object::GenericStringObjectFormat,
|
||||
mutations::update_generic_string_object::{
|
||||
GenericStringObjectUpdate, UpdateGenericStringObjectResult,
|
||||
|
||||
@@ -7,10 +7,10 @@ use crate::cloud_object::{GenericStringObjectUniqueKey, UniquePer};
|
||||
use crate::server::ids::{HashedSqliteId, ObjectUid, ServerId, SyncId};
|
||||
|
||||
impl From<GenericStringObjectUniqueKey>
|
||||
for warp_graphql::generic_string_object::GenericStringObjectUniqueKey
|
||||
for galaxy_graphql::generic_string_object::GenericStringObjectUniqueKey
|
||||
{
|
||||
fn from(key: GenericStringObjectUniqueKey) -> Self {
|
||||
use warp_graphql::generic_string_object::GenericStringObjectUniqueKey as GraphQLFormat;
|
||||
use galaxy_graphql::generic_string_object::GenericStringObjectUniqueKey as GraphQLFormat;
|
||||
GraphQLFormat {
|
||||
key: key.key,
|
||||
unique_per: key.unique_per.into(),
|
||||
@@ -18,40 +18,40 @@ impl From<GenericStringObjectUniqueKey>
|
||||
}
|
||||
}
|
||||
|
||||
impl From<UniquePer> for warp_graphql::generic_string_object::UniquePer {
|
||||
impl From<UniquePer> for galaxy_graphql::generic_string_object::UniquePer {
|
||||
fn from(unique_per: UniquePer) -> Self {
|
||||
use warp_graphql::generic_string_object::UniquePer as GraphQLUniquePer;
|
||||
use galaxy_graphql::generic_string_object::UniquePer as GraphQLUniquePer;
|
||||
match unique_per {
|
||||
UniquePer::User => GraphQLUniquePer::User,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<ObjectActionType> for warp_graphql::object_actions::ActionType {
|
||||
impl From<ObjectActionType> for galaxy_graphql::object_actions::ActionType {
|
||||
fn from(action: ObjectActionType) -> Self {
|
||||
match action {
|
||||
ObjectActionType::Execute => warp_graphql::object_actions::ActionType::Executed,
|
||||
ObjectActionType::Execute => galaxy_graphql::object_actions::ActionType::Executed,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Converts the graphql action type ("EXECUTED", etc) to ObjectActionType.
|
||||
fn try_into_object_action_type(
|
||||
action_type: warp_graphql::object_actions::ActionType,
|
||||
action_type: galaxy_graphql::object_actions::ActionType,
|
||||
) -> Result<ObjectActionType, anyhow::Error> {
|
||||
match action_type {
|
||||
warp_graphql::object_actions::ActionType::Executed => Ok(ObjectActionType::Execute),
|
||||
galaxy_graphql::object_actions::ActionType::Executed => Ok(ObjectActionType::Execute),
|
||||
}
|
||||
}
|
||||
|
||||
/// Converts the graphql action entry (SingleAction, BundledActions) into its ObjectAction corollary.
|
||||
fn try_into_object_action(
|
||||
record: &warp_graphql::object_actions::ActionRecord,
|
||||
record: &galaxy_graphql::object_actions::ActionRecord,
|
||||
uid: ObjectUid,
|
||||
hashed_sqlite_id: HashedSqliteId,
|
||||
) -> Result<ObjectAction, anyhow::Error> {
|
||||
match record {
|
||||
warp_graphql::object_actions::ActionRecord::SingleAction(s) => Ok(ObjectAction {
|
||||
galaxy_graphql::object_actions::ActionRecord::SingleAction(s) => Ok(ObjectAction {
|
||||
action_type: try_into_object_action_type(s.action_type)?,
|
||||
action_subtype: ObjectActionSubtype::SingleAction {
|
||||
timestamp: s.timestamp.utc(),
|
||||
@@ -62,7 +62,7 @@ fn try_into_object_action(
|
||||
uid,
|
||||
hashed_sqlite_id,
|
||||
}),
|
||||
warp_graphql::object_actions::ActionRecord::BundledActions(b) => Ok(ObjectAction {
|
||||
galaxy_graphql::object_actions::ActionRecord::BundledActions(b) => Ok(ObjectAction {
|
||||
action_type: try_into_object_action_type(b.action_type)?,
|
||||
action_subtype: ObjectActionSubtype::BundledActions {
|
||||
count: b.count,
|
||||
@@ -73,7 +73,7 @@ fn try_into_object_action(
|
||||
uid,
|
||||
hashed_sqlite_id,
|
||||
}),
|
||||
warp_graphql::object_actions::ActionRecord::Unknown => {
|
||||
galaxy_graphql::object_actions::ActionRecord::Unknown => {
|
||||
Err(anyhow!("Unknown object action subtype"))
|
||||
}
|
||||
}
|
||||
@@ -81,7 +81,7 @@ fn try_into_object_action(
|
||||
|
||||
/// Converts the graphql action history type into an ObjectActionHistory, requires converting
|
||||
/// the individual actions, action types, and action subtypes.
|
||||
impl TryInto<ObjectActionHistory> for warp_graphql::object_actions::ObjectActionHistory {
|
||||
impl TryInto<ObjectActionHistory> for galaxy_graphql::object_actions::ObjectActionHistory {
|
||||
type Error = anyhow::Error;
|
||||
fn try_into(self) -> Result<ObjectActionHistory, Self::Error> {
|
||||
let uid: ObjectUid = self.uid.into_inner();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Re-export types from warp_server_client.
|
||||
pub use warp_server_client::ids::{
|
||||
// Re-export types from galaxy_server_client.
|
||||
pub use galaxy_server_client::ids::{
|
||||
parse_sqlite_id_to_uid, ApiKeyUid, ClientId, HashableId, HashedSqliteId, ObjectUid, ServerId,
|
||||
ServerIdAndType, SyncId, ToServerId,
|
||||
};
|
||||
@@ -9,7 +9,7 @@ pub use warp_server_client::ids::{
|
||||
/// Takes type and desired prefix for HashableId.
|
||||
///
|
||||
/// Note: This macro uses `$crate::server::ids::*` paths, so it only works within the warp crate.
|
||||
/// For types defined in warp_server_client, use `warp_server_client::server_id_traits!` instead.
|
||||
/// For types defined in galaxy_server_client, use `galaxy_server_client::server_id_traits!` instead.
|
||||
#[macro_export]
|
||||
macro_rules! server_id_traits {
|
||||
($t:ty, $prefix:literal) => {
|
||||
|
||||
@@ -14,4 +14,4 @@ pub mod telemetry;
|
||||
pub(crate) mod telemetry_ext;
|
||||
pub mod voice_transcriber;
|
||||
|
||||
pub use warp_core::operating_system_info::OperatingSystemInfo;
|
||||
pub use galaxy_core::operating_system_info::OperatingSystemInfo;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
//! Mirrors the pattern used by [`crate::ai::execution_profiles::editor::manager::ExecutionProfileEditorManager`].
|
||||
use std::collections::HashMap;
|
||||
|
||||
use warpui::{Entity, SingletonEntity, WindowId};
|
||||
use galaxyui::{Entity, SingletonEntity, WindowId};
|
||||
|
||||
use crate::workspace::PaneViewLocator;
|
||||
|
||||
|
||||
@@ -8,10 +8,10 @@
|
||||
//! so the user can pick up items captured since the pane was opened. The
|
||||
//! pane header also exposes a refresh icon that reloads the snapshot in
|
||||
//! place.
|
||||
use warp_editor::content::buffer::InitialBufferState;
|
||||
use warp_editor::render::element::VerticalExpansionBehavior;
|
||||
use warp_util::path::LineAndColumnArg;
|
||||
use warpui::{
|
||||
use galaxy_editor::content::buffer::InitialBufferState;
|
||||
use galaxy_editor::render::element::VerticalExpansionBehavior;
|
||||
use galaxy_util::path::LineAndColumnArg;
|
||||
use galaxyui::{
|
||||
elements::{ChildView, MouseStateHandle},
|
||||
text_layout::ClipConfig,
|
||||
ui_components::components::UiComponent,
|
||||
|
||||
@@ -3,7 +3,7 @@ use std::fmt;
|
||||
use bounded_vec_deque::BoundedVecDeque;
|
||||
use chrono::{DateTime, FixedOffset};
|
||||
use enclose::enclose;
|
||||
use warpui::{Entity, ModelContext, SingletonEntity};
|
||||
use galaxyui::{Entity, ModelContext, SingletonEntity};
|
||||
|
||||
use crate::server::datetime_ext::DateTimeExt;
|
||||
use crate::server::server_api::ServerApiProvider;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
use super::{NetworkLogItem, NetworkLogModel, NETWORK_LOGGING_MAX_ITEMS};
|
||||
use warpui::App;
|
||||
use galaxyui::App;
|
||||
|
||||
#[test]
|
||||
fn empty_snapshot_is_empty_string() {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
use std::time::Duration;
|
||||
use warpui::RetryOption;
|
||||
use galaxyui::RetryOption;
|
||||
|
||||
use crate::server::server_api::presigned_upload::HttpStatusError;
|
||||
|
||||
|
||||
@@ -34,10 +34,10 @@ use prost::Message;
|
||||
use referral::ReferralsClient;
|
||||
use team::TeamClient;
|
||||
use url::Url;
|
||||
use warp_core::context_flag::ContextFlag;
|
||||
use warp_core::errors::{register_error, AnyhowErrorExt, ErrorExt};
|
||||
use warp_managed_secrets::client::ManagedSecretsClient;
|
||||
use warpui::{r#async::BoxFuture, ModelContext};
|
||||
use galaxy_core::context_flag::ContextFlag;
|
||||
use galaxy_core::errors::{register_error, AnyhowErrorExt, ErrorExt};
|
||||
use galaxy_managed_secrets::client::ManagedSecretsClient;
|
||||
use galaxyui::{r#async::BoxFuture, ModelContext};
|
||||
use workspace::WorkspaceClient;
|
||||
|
||||
use crate::server::telemetry::TelemetryApi;
|
||||
@@ -58,9 +58,9 @@ use std::fmt;
|
||||
use std::path::Path;
|
||||
use std::sync::Arc;
|
||||
use std::time::Duration;
|
||||
use warp_core::telemetry::TelemetryEvent;
|
||||
use warpui::Entity;
|
||||
use warpui::SingletonEntity;
|
||||
use galaxy_core::telemetry::TelemetryEvent;
|
||||
use galaxyui::Entity;
|
||||
use galaxyui::SingletonEntity;
|
||||
|
||||
use super::experiments::ServerExperiment;
|
||||
use super::experiments::ServerExperiments;
|
||||
@@ -401,7 +401,7 @@ pub struct ServerApi {
|
||||
// We technically use OAuth2 for headless device authentication.
|
||||
oauth_client: self::auth::OAuth2Client,
|
||||
/// Cached ambient workload token for requests from ambient agents.
|
||||
ambient_workload_token: Arc<Mutex<Option<warp_isolation_platform::WorkloadToken>>>,
|
||||
ambient_workload_token: Arc<Mutex<Option<galaxy_isolation_platform::WorkloadToken>>>,
|
||||
/// The ambient agent task ID for requests from cloud agents.
|
||||
ambient_agent_task_id: Arc<RwLock<Option<AmbientAgentTaskId>>>,
|
||||
/// The source of agent runs (e.g. CLI, GitHub Action). Set once at startup and immutable.
|
||||
@@ -491,8 +491,9 @@ impl ServerApi {
|
||||
}
|
||||
|
||||
fn create_oauth_client() -> self::auth::OAuth2Client {
|
||||
let server_root =
|
||||
Url::parse(&ChannelState::server_root_url()).expect("Server root URL must be valid");
|
||||
let server_root_str = ChannelState::server_root_url();
|
||||
let server_root = Url::parse(&server_root_str)
|
||||
.unwrap_or_else(|_| Url::parse("http://localhost").unwrap());
|
||||
|
||||
let token_url = server_root
|
||||
.join("/api/v1/oauth/token")
|
||||
@@ -507,7 +508,7 @@ impl ServerApi {
|
||||
.set_device_authorization_url(oauth2::DeviceAuthorizationUrl::from_url(device_url))
|
||||
}
|
||||
|
||||
pub fn send_graphql_request<'a, QF, O: warp_graphql::client::Operation<QF> + Send + 'a>(
|
||||
pub fn send_graphql_request<'a, QF, O: galaxy_graphql::client::Operation<QF> + Send + 'a>(
|
||||
&'a self,
|
||||
operation: O,
|
||||
timeout: Option<Duration>,
|
||||
@@ -541,7 +542,7 @@ impl ServerApi {
|
||||
headers.insert(name.to_string(), value);
|
||||
}
|
||||
|
||||
let options = warp_graphql::client::RequestOptions {
|
||||
let options = galaxy_graphql::client::RequestOptions {
|
||||
auth_token: auth_token.bearer_token(),
|
||||
timeout,
|
||||
headers,
|
||||
|
||||
@@ -11,8 +11,8 @@ use std::{
|
||||
collections::{HashMap, HashSet},
|
||||
time::Duration,
|
||||
};
|
||||
use warp_core::channel::ChannelState;
|
||||
use warp_core::{features::FeatureFlag, report_error};
|
||||
use galaxy_core::channel::ChannelState;
|
||||
use galaxy_core::{features::FeatureFlag, report_error};
|
||||
use warp_multi_agent_api::ConversationData;
|
||||
|
||||
use super::auth::AuthClient;
|
||||
@@ -61,12 +61,12 @@ use ai::index::full_source_code_embedding::{
|
||||
store_client::{IntermediateNode, StoreClient},
|
||||
CodebaseContextConfig, ContentHash, EmbeddingConfig, NodeHash, RepoMetadata,
|
||||
};
|
||||
use warp_graphql::client::Operation;
|
||||
use galaxy_graphql::client::Operation;
|
||||
#[cfg(not(feature = "agent_mode_evals"))]
|
||||
use warp_graphql::queries::get_request_limit_info::{
|
||||
use galaxy_graphql::queries::get_request_limit_info::{
|
||||
GetRequestLimitInfo, GetRequestLimitInfoVariables,
|
||||
};
|
||||
use warp_graphql::{
|
||||
use galaxy_graphql::{
|
||||
ai::{AgentTaskState, PlatformErrorCode},
|
||||
mutations::{
|
||||
confirm_file_artifact_upload::{
|
||||
@@ -961,7 +961,7 @@ pub trait AIClient: 'static + Send + Sync {
|
||||
}
|
||||
|
||||
fn into_file_artifact_record(
|
||||
artifact: warp_graphql::mutations::create_file_artifact_upload_target::FileArtifact,
|
||||
artifact: galaxy_graphql::mutations::create_file_artifact_upload_target::FileArtifact,
|
||||
) -> FileArtifactRecord {
|
||||
FileArtifactRecord {
|
||||
artifact_uid: artifact.artifact_uid.into_inner(),
|
||||
@@ -1122,7 +1122,7 @@ impl AIClient for ServerApi {
|
||||
let response = self.send_graphql_request(operation, None).await?;
|
||||
|
||||
match response.user {
|
||||
warp_graphql::queries::get_request_limit_info::UserResult::UserOutput(user_output) => {
|
||||
galaxy_graphql::queries::get_request_limit_info::UserResult::UserOutput(user_output) => {
|
||||
let request_limit_info = user_output.user.request_limit_info.into();
|
||||
|
||||
let workspace_bonus_grants = user_output
|
||||
@@ -1158,10 +1158,10 @@ impl AIClient for ServerApi {
|
||||
bonus_grants,
|
||||
})
|
||||
}
|
||||
warp_graphql::queries::get_request_limit_info::UserResult::UserFacingError(e) => {
|
||||
galaxy_graphql::queries::get_request_limit_info::UserResult::UserFacingError(e) => {
|
||||
Err(anyhow!(get_user_facing_error_message(e)))
|
||||
}
|
||||
warp_graphql::queries::get_request_limit_info::UserResult::Unknown => {
|
||||
galaxy_graphql::queries::get_request_limit_info::UserResult::Unknown => {
|
||||
Err(anyhow!("failed to get request limit info"))
|
||||
}
|
||||
}
|
||||
@@ -1175,9 +1175,9 @@ impl AIClient for ServerApi {
|
||||
let response = self.send_graphql_request(operation, None).await?;
|
||||
|
||||
match response.user {
|
||||
warp_graphql::queries::get_feature_model_choices::UserResult::UserOutput(
|
||||
warp_graphql::queries::get_feature_model_choices::UserOutput {
|
||||
user: warp_graphql::queries::get_feature_model_choices::User { mut workspaces },
|
||||
galaxy_graphql::queries::get_feature_model_choices::UserResult::UserOutput(
|
||||
galaxy_graphql::queries::get_feature_model_choices::UserOutput {
|
||||
user: galaxy_graphql::queries::get_feature_model_choices::User { mut workspaces },
|
||||
},
|
||||
) if !workspaces.is_empty() => {
|
||||
// This is safe (`remove()` can panic) because we ensure workspaces is non-empty
|
||||
@@ -1211,7 +1211,7 @@ impl AIClient for ServerApi {
|
||||
let response = operation
|
||||
.send_request(
|
||||
self.client.clone(),
|
||||
warp_graphql::client::RequestOptions {
|
||||
galaxy_graphql::client::RequestOptions {
|
||||
auth_token,
|
||||
..default_request_options()
|
||||
},
|
||||
@@ -1483,7 +1483,7 @@ impl AIClient for ServerApi {
|
||||
&self,
|
||||
server_conversation_token: ServerConversationToken,
|
||||
) -> anyhow::Result<(ConversationData, ServerAIConversationMetadata), anyhow::Error> {
|
||||
use warp_graphql::queries::list_ai_conversations::{
|
||||
use galaxy_graphql::queries::list_ai_conversations::{
|
||||
ListAIConversations, ListAIConversationsInput, ListAIConversationsResult,
|
||||
ListAIConversationsVariables,
|
||||
};
|
||||
@@ -1531,7 +1531,7 @@ impl AIClient for ServerApi {
|
||||
if !FeatureFlag::CloudConversations.is_enabled() {
|
||||
return Ok(vec![]);
|
||||
}
|
||||
use warp_graphql::queries::list_ai_conversations::{
|
||||
use galaxy_graphql::queries::list_ai_conversations::{
|
||||
ListAIConversationMetadata, ListAIConversationMetadataResult,
|
||||
ListAIConversationMetadataVariables, ListAIConversationsInput,
|
||||
};
|
||||
@@ -1571,11 +1571,11 @@ impl AIClient for ServerApi {
|
||||
&self,
|
||||
server_conversation_token: ServerConversationToken,
|
||||
) -> anyhow::Result<AIAgentConversationFormat, anyhow::Error> {
|
||||
use warp_graphql::queries::get_ai_conversation_format::{
|
||||
use galaxy_graphql::queries::get_ai_conversation_format::{
|
||||
GetAIConversationFormat, GetAIConversationFormatResult,
|
||||
GetAIConversationFormatVariables,
|
||||
};
|
||||
use warp_graphql::queries::list_ai_conversations::ListAIConversationsInput;
|
||||
use galaxy_graphql::queries::list_ai_conversations::ListAIConversationsInput;
|
||||
|
||||
let conversation_id = server_conversation_token.as_str().to_string();
|
||||
let operation = GetAIConversationFormat::build(GetAIConversationFormatVariables {
|
||||
@@ -1958,13 +1958,13 @@ impl AIClient for ServerApi {
|
||||
}
|
||||
}
|
||||
|
||||
impl TryFrom<warp_graphql::queries::get_feature_model_choices::FeatureModelChoice>
|
||||
impl TryFrom<galaxy_graphql::queries::get_feature_model_choices::FeatureModelChoice>
|
||||
for ModelsByFeature
|
||||
{
|
||||
type Error = anyhow::Error;
|
||||
|
||||
fn try_from(
|
||||
value: warp_graphql::queries::get_feature_model_choices::FeatureModelChoice,
|
||||
value: galaxy_graphql::queries::get_feature_model_choices::FeatureModelChoice,
|
||||
) -> Result<Self, Self::Error> {
|
||||
Ok(Self {
|
||||
agent_mode: value.agent_mode.try_into()?,
|
||||
@@ -1975,10 +1975,10 @@ impl TryFrom<warp_graphql::queries::get_feature_model_choices::FeatureModelChoic
|
||||
}
|
||||
}
|
||||
|
||||
impl TryFrom<warp_graphql::workspace::FeatureModelChoice> for ModelsByFeature {
|
||||
impl TryFrom<galaxy_graphql::workspace::FeatureModelChoice> for ModelsByFeature {
|
||||
type Error = anyhow::Error;
|
||||
|
||||
fn try_from(value: warp_graphql::workspace::FeatureModelChoice) -> Result<Self, Self::Error> {
|
||||
fn try_from(value: galaxy_graphql::workspace::FeatureModelChoice) -> Result<Self, Self::Error> {
|
||||
Ok(Self {
|
||||
agent_mode: value.agent_mode.try_into()?,
|
||||
coding: value.coding.try_into()?,
|
||||
@@ -1988,11 +1988,11 @@ impl TryFrom<warp_graphql::workspace::FeatureModelChoice> for ModelsByFeature {
|
||||
}
|
||||
}
|
||||
|
||||
impl TryFrom<warp_graphql::queries::get_feature_model_choices::AvailableLlms> for AvailableLLMs {
|
||||
impl TryFrom<galaxy_graphql::queries::get_feature_model_choices::AvailableLlms> for AvailableLLMs {
|
||||
type Error = anyhow::Error;
|
||||
|
||||
fn try_from(
|
||||
value: warp_graphql::queries::get_feature_model_choices::AvailableLlms,
|
||||
value: galaxy_graphql::queries::get_feature_model_choices::AvailableLlms,
|
||||
) -> Result<Self, Self::Error> {
|
||||
Self::new(
|
||||
value.default_id.into(),
|
||||
@@ -2002,10 +2002,10 @@ impl TryFrom<warp_graphql::queries::get_feature_model_choices::AvailableLlms> fo
|
||||
}
|
||||
}
|
||||
|
||||
impl TryFrom<warp_graphql::workspace::AvailableLlms> for AvailableLLMs {
|
||||
impl TryFrom<galaxy_graphql::workspace::AvailableLlms> for AvailableLLMs {
|
||||
type Error = anyhow::Error;
|
||||
|
||||
fn try_from(value: warp_graphql::workspace::AvailableLlms) -> Result<Self, Self::Error> {
|
||||
fn try_from(value: galaxy_graphql::workspace::AvailableLlms) -> Result<Self, Self::Error> {
|
||||
Self::new(
|
||||
value.default_id.into(),
|
||||
value.choices.into_iter().map(LLMInfo::from),
|
||||
@@ -2014,8 +2014,8 @@ impl TryFrom<warp_graphql::workspace::AvailableLlms> for AvailableLLMs {
|
||||
}
|
||||
}
|
||||
|
||||
impl From<warp_graphql::queries::get_feature_model_choices::LlmInfo> for LLMInfo {
|
||||
fn from(value: warp_graphql::queries::get_feature_model_choices::LlmInfo) -> Self {
|
||||
impl From<galaxy_graphql::queries::get_feature_model_choices::LlmInfo> for LLMInfo {
|
||||
fn from(value: galaxy_graphql::queries::get_feature_model_choices::LlmInfo) -> Self {
|
||||
let host_configs = {
|
||||
let mut map = std::collections::HashMap::new();
|
||||
for config in value.host_configs {
|
||||
@@ -2047,8 +2047,8 @@ impl From<warp_graphql::queries::get_feature_model_choices::LlmInfo> for LLMInfo
|
||||
}
|
||||
}
|
||||
|
||||
impl From<warp_graphql::workspace::LlmInfo> for LLMInfo {
|
||||
fn from(value: warp_graphql::workspace::LlmInfo) -> Self {
|
||||
impl From<galaxy_graphql::workspace::LlmInfo> for LLMInfo {
|
||||
fn from(value: galaxy_graphql::workspace::LlmInfo) -> Self {
|
||||
let host_configs = {
|
||||
let mut map = std::collections::HashMap::new();
|
||||
for config in value.host_configs {
|
||||
@@ -2080,10 +2080,10 @@ impl From<warp_graphql::workspace::LlmInfo> for LLMInfo {
|
||||
}
|
||||
}
|
||||
|
||||
impl From<warp_graphql::queries::get_feature_model_choices::RoutingHostConfig>
|
||||
impl From<galaxy_graphql::queries::get_feature_model_choices::RoutingHostConfig>
|
||||
for RoutingHostConfig
|
||||
{
|
||||
fn from(value: warp_graphql::queries::get_feature_model_choices::RoutingHostConfig) -> Self {
|
||||
fn from(value: galaxy_graphql::queries::get_feature_model_choices::RoutingHostConfig) -> Self {
|
||||
Self {
|
||||
enabled: value.enabled,
|
||||
model_routing_host: value.model_routing_host.into(),
|
||||
@@ -2091,8 +2091,8 @@ impl From<warp_graphql::queries::get_feature_model_choices::RoutingHostConfig>
|
||||
}
|
||||
}
|
||||
|
||||
impl From<warp_graphql::workspace::RoutingHostConfig> for RoutingHostConfig {
|
||||
fn from(value: warp_graphql::workspace::RoutingHostConfig) -> Self {
|
||||
impl From<galaxy_graphql::workspace::RoutingHostConfig> for RoutingHostConfig {
|
||||
fn from(value: galaxy_graphql::workspace::RoutingHostConfig) -> Self {
|
||||
Self {
|
||||
enabled: value.enabled,
|
||||
model_routing_host: value.model_routing_host.into(),
|
||||
@@ -2100,16 +2100,16 @@ impl From<warp_graphql::workspace::RoutingHostConfig> for RoutingHostConfig {
|
||||
}
|
||||
}
|
||||
|
||||
impl From<warp_graphql::queries::get_feature_model_choices::LlmModelHost> for LLMModelHost {
|
||||
fn from(value: warp_graphql::queries::get_feature_model_choices::LlmModelHost) -> Self {
|
||||
impl From<galaxy_graphql::queries::get_feature_model_choices::LlmModelHost> for LLMModelHost {
|
||||
fn from(value: galaxy_graphql::queries::get_feature_model_choices::LlmModelHost) -> Self {
|
||||
match value {
|
||||
warp_graphql::queries::get_feature_model_choices::LlmModelHost::DirectApi => {
|
||||
galaxy_graphql::queries::get_feature_model_choices::LlmModelHost::DirectApi => {
|
||||
LLMModelHost::DirectApi
|
||||
}
|
||||
warp_graphql::queries::get_feature_model_choices::LlmModelHost::AwsBedrock => {
|
||||
galaxy_graphql::queries::get_feature_model_choices::LlmModelHost::AwsBedrock => {
|
||||
LLMModelHost::AwsBedrock
|
||||
}
|
||||
warp_graphql::queries::get_feature_model_choices::LlmModelHost::Other(value) => {
|
||||
galaxy_graphql::queries::get_feature_model_choices::LlmModelHost::Other(value) => {
|
||||
report_error!(anyhow!(
|
||||
"Unknown LlmModelHost '{value}'. Make sure to update client GraphQL types!"
|
||||
));
|
||||
@@ -2119,23 +2119,23 @@ impl From<warp_graphql::queries::get_feature_model_choices::LlmModelHost> for LL
|
||||
}
|
||||
}
|
||||
|
||||
impl From<warp_graphql::queries::get_feature_model_choices::LlmProvider> for LLMProvider {
|
||||
fn from(value: warp_graphql::queries::get_feature_model_choices::LlmProvider) -> Self {
|
||||
impl From<galaxy_graphql::queries::get_feature_model_choices::LlmProvider> for LLMProvider {
|
||||
fn from(value: galaxy_graphql::queries::get_feature_model_choices::LlmProvider) -> Self {
|
||||
match value {
|
||||
warp_graphql::queries::get_feature_model_choices::LlmProvider::Openai => {
|
||||
galaxy_graphql::queries::get_feature_model_choices::LlmProvider::Openai => {
|
||||
LLMProvider::OpenAI
|
||||
}
|
||||
warp_graphql::queries::get_feature_model_choices::LlmProvider::Anthropic => {
|
||||
galaxy_graphql::queries::get_feature_model_choices::LlmProvider::Anthropic => {
|
||||
LLMProvider::Anthropic
|
||||
}
|
||||
warp_graphql::queries::get_feature_model_choices::LlmProvider::Google => {
|
||||
galaxy_graphql::queries::get_feature_model_choices::LlmProvider::Google => {
|
||||
LLMProvider::Google
|
||||
}
|
||||
warp_graphql::queries::get_feature_model_choices::LlmProvider::Xai => LLMProvider::Xai,
|
||||
warp_graphql::queries::get_feature_model_choices::LlmProvider::Unknown => {
|
||||
galaxy_graphql::queries::get_feature_model_choices::LlmProvider::Xai => LLMProvider::Xai,
|
||||
galaxy_graphql::queries::get_feature_model_choices::LlmProvider::Unknown => {
|
||||
LLMProvider::Unknown
|
||||
}
|
||||
warp_graphql::queries::get_feature_model_choices::LlmProvider::Other(value) => {
|
||||
galaxy_graphql::queries::get_feature_model_choices::LlmProvider::Other(value) => {
|
||||
report_error!(anyhow!(
|
||||
"Invalid LlmProvider '{value}'. Make sure to update client GraphQL types!"
|
||||
));
|
||||
@@ -2145,15 +2145,15 @@ impl From<warp_graphql::queries::get_feature_model_choices::LlmProvider> for LLM
|
||||
}
|
||||
}
|
||||
|
||||
impl From<warp_graphql::workspace::LlmProvider> for LLMProvider {
|
||||
fn from(value: warp_graphql::workspace::LlmProvider) -> Self {
|
||||
impl From<galaxy_graphql::workspace::LlmProvider> for LLMProvider {
|
||||
fn from(value: galaxy_graphql::workspace::LlmProvider) -> Self {
|
||||
match value {
|
||||
warp_graphql::workspace::LlmProvider::Openai => LLMProvider::OpenAI,
|
||||
warp_graphql::workspace::LlmProvider::Anthropic => LLMProvider::Anthropic,
|
||||
warp_graphql::workspace::LlmProvider::Google => LLMProvider::Google,
|
||||
warp_graphql::workspace::LlmProvider::Xai => LLMProvider::Xai,
|
||||
warp_graphql::workspace::LlmProvider::Unknown => LLMProvider::Unknown,
|
||||
warp_graphql::workspace::LlmProvider::Other(value) => {
|
||||
galaxy_graphql::workspace::LlmProvider::Openai => LLMProvider::OpenAI,
|
||||
galaxy_graphql::workspace::LlmProvider::Anthropic => LLMProvider::Anthropic,
|
||||
galaxy_graphql::workspace::LlmProvider::Google => LLMProvider::Google,
|
||||
galaxy_graphql::workspace::LlmProvider::Xai => LLMProvider::Xai,
|
||||
galaxy_graphql::workspace::LlmProvider::Unknown => LLMProvider::Unknown,
|
||||
galaxy_graphql::workspace::LlmProvider::Other(value) => {
|
||||
report_error!(anyhow!(
|
||||
"Invalid LlmProvider '{value}'. Make sure to update client GraphQL types!"
|
||||
));
|
||||
@@ -2163,8 +2163,8 @@ impl From<warp_graphql::workspace::LlmProvider> for LLMProvider {
|
||||
}
|
||||
}
|
||||
|
||||
impl From<warp_graphql::queries::get_feature_model_choices::LlmSpec> for LLMSpec {
|
||||
fn from(value: warp_graphql::queries::get_feature_model_choices::LlmSpec) -> Self {
|
||||
impl From<galaxy_graphql::queries::get_feature_model_choices::LlmSpec> for LLMSpec {
|
||||
fn from(value: galaxy_graphql::queries::get_feature_model_choices::LlmSpec) -> Self {
|
||||
Self {
|
||||
cost: value.cost as f32,
|
||||
quality: value.quality as f32,
|
||||
@@ -2173,8 +2173,8 @@ impl From<warp_graphql::queries::get_feature_model_choices::LlmSpec> for LLMSpec
|
||||
}
|
||||
}
|
||||
|
||||
impl From<warp_graphql::workspace::LlmSpec> for LLMSpec {
|
||||
fn from(value: warp_graphql::workspace::LlmSpec) -> Self {
|
||||
impl From<galaxy_graphql::workspace::LlmSpec> for LLMSpec {
|
||||
fn from(value: galaxy_graphql::workspace::LlmSpec) -> Self {
|
||||
Self {
|
||||
cost: value.cost as f32,
|
||||
quality: value.quality as f32,
|
||||
@@ -2183,8 +2183,8 @@ impl From<warp_graphql::workspace::LlmSpec> for LLMSpec {
|
||||
}
|
||||
}
|
||||
|
||||
impl From<warp_graphql::queries::get_feature_model_choices::LlmUsageMetadata> for LLMUsageMetadata {
|
||||
fn from(value: warp_graphql::queries::get_feature_model_choices::LlmUsageMetadata) -> Self {
|
||||
impl From<galaxy_graphql::queries::get_feature_model_choices::LlmUsageMetadata> for LLMUsageMetadata {
|
||||
fn from(value: galaxy_graphql::queries::get_feature_model_choices::LlmUsageMetadata) -> Self {
|
||||
Self {
|
||||
request_multiplier: value.request_multiplier.max(1) as usize,
|
||||
credit_multiplier: value.credit_multiplier.map(|v| v as f32),
|
||||
@@ -2192,8 +2192,8 @@ impl From<warp_graphql::queries::get_feature_model_choices::LlmUsageMetadata> fo
|
||||
}
|
||||
}
|
||||
|
||||
impl From<warp_graphql::workspace::LlmUsageMetadata> for LLMUsageMetadata {
|
||||
fn from(value: warp_graphql::workspace::LlmUsageMetadata) -> Self {
|
||||
impl From<galaxy_graphql::workspace::LlmUsageMetadata> for LLMUsageMetadata {
|
||||
fn from(value: galaxy_graphql::workspace::LlmUsageMetadata) -> Self {
|
||||
Self {
|
||||
request_multiplier: value.request_multiplier.max(1) as usize,
|
||||
credit_multiplier: value.credit_multiplier.map(|v| v as f32),
|
||||
@@ -2201,50 +2201,50 @@ impl From<warp_graphql::workspace::LlmUsageMetadata> for LLMUsageMetadata {
|
||||
}
|
||||
}
|
||||
|
||||
impl From<warp_graphql::queries::get_feature_model_choices::DisableReason> for DisableReason {
|
||||
fn from(value: warp_graphql::queries::get_feature_model_choices::DisableReason) -> Self {
|
||||
impl From<galaxy_graphql::queries::get_feature_model_choices::DisableReason> for DisableReason {
|
||||
fn from(value: galaxy_graphql::queries::get_feature_model_choices::DisableReason) -> Self {
|
||||
match value {
|
||||
warp_graphql::queries::get_feature_model_choices::DisableReason::AdminDisabled => {
|
||||
galaxy_graphql::queries::get_feature_model_choices::DisableReason::AdminDisabled => {
|
||||
DisableReason::AdminDisabled
|
||||
}
|
||||
warp_graphql::queries::get_feature_model_choices::DisableReason::OutOfRequests => {
|
||||
galaxy_graphql::queries::get_feature_model_choices::DisableReason::OutOfRequests => {
|
||||
DisableReason::OutOfRequests
|
||||
}
|
||||
warp_graphql::queries::get_feature_model_choices::DisableReason::ProviderOutage => {
|
||||
galaxy_graphql::queries::get_feature_model_choices::DisableReason::ProviderOutage => {
|
||||
DisableReason::ProviderOutage
|
||||
}
|
||||
warp_graphql::queries::get_feature_model_choices::DisableReason::RequiresUpgrade => {
|
||||
galaxy_graphql::queries::get_feature_model_choices::DisableReason::RequiresUpgrade => {
|
||||
DisableReason::RequiresUpgrade
|
||||
}
|
||||
warp_graphql::queries::get_feature_model_choices::DisableReason::Other(_) => {
|
||||
galaxy_graphql::queries::get_feature_model_choices::DisableReason::Other(_) => {
|
||||
DisableReason::Unavailable
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<warp_graphql::workspace::DisableReason> for DisableReason {
|
||||
fn from(value: warp_graphql::workspace::DisableReason) -> Self {
|
||||
impl From<galaxy_graphql::workspace::DisableReason> for DisableReason {
|
||||
fn from(value: galaxy_graphql::workspace::DisableReason) -> Self {
|
||||
match value {
|
||||
warp_graphql::workspace::DisableReason::AdminDisabled => DisableReason::AdminDisabled,
|
||||
warp_graphql::workspace::DisableReason::OutOfRequests => DisableReason::OutOfRequests,
|
||||
warp_graphql::workspace::DisableReason::ProviderOutage => DisableReason::ProviderOutage,
|
||||
warp_graphql::workspace::DisableReason::RequiresUpgrade => {
|
||||
galaxy_graphql::workspace::DisableReason::AdminDisabled => DisableReason::AdminDisabled,
|
||||
galaxy_graphql::workspace::DisableReason::OutOfRequests => DisableReason::OutOfRequests,
|
||||
galaxy_graphql::workspace::DisableReason::ProviderOutage => DisableReason::ProviderOutage,
|
||||
galaxy_graphql::workspace::DisableReason::RequiresUpgrade => {
|
||||
DisableReason::RequiresUpgrade
|
||||
}
|
||||
warp_graphql::workspace::DisableReason::Other(_) => DisableReason::Unavailable,
|
||||
galaxy_graphql::workspace::DisableReason::Other(_) => DisableReason::Unavailable,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Conversions for AIConversationMetadata from GraphQL types
|
||||
|
||||
fn convert_harness(harness: warp_graphql::ai::AgentHarness) -> AIAgentHarness {
|
||||
fn convert_harness(harness: galaxy_graphql::ai::AgentHarness) -> AIAgentHarness {
|
||||
match harness {
|
||||
warp_graphql::ai::AgentHarness::Oz => AIAgentHarness::Oz,
|
||||
warp_graphql::ai::AgentHarness::ClaudeCode => AIAgentHarness::ClaudeCode,
|
||||
warp_graphql::ai::AgentHarness::Gemini => AIAgentHarness::Gemini,
|
||||
warp_graphql::ai::AgentHarness::Other(value) => {
|
||||
galaxy_graphql::ai::AgentHarness::Oz => AIAgentHarness::Oz,
|
||||
galaxy_graphql::ai::AgentHarness::ClaudeCode => AIAgentHarness::ClaudeCode,
|
||||
galaxy_graphql::ai::AgentHarness::Gemini => AIAgentHarness::Gemini,
|
||||
galaxy_graphql::ai::AgentHarness::Other(value) => {
|
||||
report_error!(anyhow!(
|
||||
"Invalid AgentHarness '{value}'. Make sure to update client GraphQL types!"
|
||||
));
|
||||
@@ -2254,15 +2254,15 @@ fn convert_harness(harness: warp_graphql::ai::AgentHarness) -> AIAgentHarness {
|
||||
}
|
||||
|
||||
fn convert_block_snapshot_format(
|
||||
format: warp_graphql::ai::SerializedBlockFormat,
|
||||
format: galaxy_graphql::ai::SerializedBlockFormat,
|
||||
) -> AIAgentSerializedBlockFormat {
|
||||
match format {
|
||||
warp_graphql::ai::SerializedBlockFormat::JsonV1 => AIAgentSerializedBlockFormat::JsonV1,
|
||||
galaxy_graphql::ai::SerializedBlockFormat::JsonV1 => AIAgentSerializedBlockFormat::JsonV1,
|
||||
}
|
||||
}
|
||||
|
||||
fn convert_conversation_format(
|
||||
format: warp_graphql::ai::AIConversationFormat,
|
||||
format: galaxy_graphql::ai::AIConversationFormat,
|
||||
) -> AIAgentConversationFormat {
|
||||
AIAgentConversationFormat {
|
||||
has_task_list: format.has_task_list,
|
||||
@@ -2286,10 +2286,10 @@ fn convert_usage_metadata(
|
||||
}
|
||||
}
|
||||
|
||||
impl TryFrom<warp_graphql::ai::AIConversation> for ServerAIConversationMetadata {
|
||||
impl TryFrom<galaxy_graphql::ai::AIConversation> for ServerAIConversationMetadata {
|
||||
type Error = anyhow::Error;
|
||||
|
||||
fn try_from(value: warp_graphql::ai::AIConversation) -> Result<Self, Self::Error> {
|
||||
fn try_from(value: galaxy_graphql::ai::AIConversation) -> Result<Self, Self::Error> {
|
||||
let usage = convert_usage_metadata(
|
||||
value.usage.usage_metadata.summarized,
|
||||
value.usage.usage_metadata.context_window_usage,
|
||||
@@ -2326,13 +2326,13 @@ impl TryFrom<warp_graphql::ai::AIConversation> for ServerAIConversationMetadata
|
||||
}
|
||||
}
|
||||
|
||||
impl TryFrom<warp_graphql::queries::list_ai_conversations::AIConversationMetadata>
|
||||
impl TryFrom<galaxy_graphql::queries::list_ai_conversations::AIConversationMetadata>
|
||||
for ServerAIConversationMetadata
|
||||
{
|
||||
type Error = anyhow::Error;
|
||||
|
||||
fn try_from(
|
||||
value: warp_graphql::queries::list_ai_conversations::AIConversationMetadata,
|
||||
value: galaxy_graphql::queries::list_ai_conversations::AIConversationMetadata,
|
||||
) -> Result<Self, Self::Error> {
|
||||
let usage = convert_usage_metadata(
|
||||
value.usage.usage_metadata.summarized,
|
||||
|
||||
@@ -10,23 +10,23 @@ use instant::Duration;
|
||||
use mockall::{automock, predicate::*};
|
||||
use oauth2::TokenResponse;
|
||||
use thiserror::Error;
|
||||
use warp_core::errors::{AnyhowErrorExt, ErrorExt};
|
||||
use warp_graphql::client::Operation;
|
||||
use warp_graphql::mutations::expire_api_key::{
|
||||
use galaxy_core::errors::{AnyhowErrorExt, ErrorExt};
|
||||
use galaxy_graphql::client::Operation;
|
||||
use galaxy_graphql::mutations::expire_api_key::{
|
||||
ExpireApiKey, ExpireApiKeyResult, ExpireApiKeyVariables,
|
||||
};
|
||||
use warp_graphql::queries::get_conversation_usage::{
|
||||
use galaxy_graphql::queries::get_conversation_usage::{
|
||||
ConversationUsage, GetConversationUsage, GetConversationUsageVariables, UserResult,
|
||||
};
|
||||
|
||||
use warp_graphql::mutations::set_user_is_onboarded::{
|
||||
use galaxy_graphql::mutations::set_user_is_onboarded::{
|
||||
SetUserIsOnboarded, SetUserIsOnboardedResult, SetUserIsOnboardedVariables,
|
||||
};
|
||||
use warp_graphql::mutations::update_user_settings::{
|
||||
use galaxy_graphql::mutations::update_user_settings::{
|
||||
UpdateUserSettings, UpdateUserSettingsInput, UpdateUserSettingsResult,
|
||||
UpdateUserSettingsVariables,
|
||||
};
|
||||
use warp_graphql::mutations::{
|
||||
use galaxy_graphql::mutations::{
|
||||
create_anonymous_user::{
|
||||
AnonymousUserType, CreateAnonymousUser, CreateAnonymousUserResult,
|
||||
CreateAnonymousUserVariables,
|
||||
@@ -36,13 +36,13 @@ use warp_graphql::mutations::{
|
||||
},
|
||||
mint_custom_token::{MintCustomTokenResult, MintCustomTokenVariables},
|
||||
};
|
||||
use warp_graphql::object_permissions::OwnerType;
|
||||
use warp_graphql::queries::api_keys::{
|
||||
use galaxy_graphql::object_permissions::OwnerType;
|
||||
use galaxy_graphql::queries::api_keys::{
|
||||
ApiKeyProperties, ApiKeyPropertiesResult, ApiKeys, ApiKeysVariables,
|
||||
};
|
||||
use warp_graphql::queries::get_user::{GetUser, GetUserVariables, UserOutput as GqlUserOutput};
|
||||
use warp_graphql::queries::get_user_settings::{GetUserSettings, GetUserSettingsVariables};
|
||||
use warpui::r#async::BoxFuture;
|
||||
use galaxy_graphql::queries::get_user::{GetUser, GetUserVariables, UserOutput as GqlUserOutput};
|
||||
use galaxy_graphql::queries::get_user_settings::{GetUserSettings, GetUserSettingsVariables};
|
||||
use galaxyui::r#async::BoxFuture;
|
||||
|
||||
use crate::auth::UserUid;
|
||||
use crate::server::graphql::{default_request_options, get_user_facing_error_message};
|
||||
@@ -168,7 +168,7 @@ pub trait AuthClient: 'static + Send + Sync {
|
||||
&self,
|
||||
days: Option<i32>,
|
||||
limit: Option<i32>,
|
||||
last_updated_end_timestamp: Option<warp_graphql::scalars::Time>,
|
||||
last_updated_end_timestamp: Option<galaxy_graphql::scalars::Time>,
|
||||
) -> Result<Vec<ConversationUsage>>;
|
||||
|
||||
async fn set_is_telemetry_enabled(&self, value: bool) -> Result<()>;
|
||||
@@ -201,7 +201,7 @@ pub trait AuthClient: 'static + Send + Sync {
|
||||
&self,
|
||||
name: String,
|
||||
team_id: Option<cynic::Id>,
|
||||
expires_at: Option<warp_graphql::scalars::Time>,
|
||||
expires_at: Option<galaxy_graphql::scalars::Time>,
|
||||
) -> Result<GenerateApiKeyResult>;
|
||||
|
||||
async fn expire_api_key(&self, key_uid: &ApiKeyUid) -> Result<ExpireApiKeyResult>;
|
||||
@@ -221,9 +221,9 @@ impl AuthClient for ServerApi {
|
||||
anonymous_user_type: AnonymousUserType,
|
||||
) -> Result<CreateAnonymousUserResult> {
|
||||
let variables = CreateAnonymousUserVariables {
|
||||
input: warp_graphql::mutations::create_anonymous_user::CreateAnonymousUserInput {
|
||||
input: galaxy_graphql::mutations::create_anonymous_user::CreateAnonymousUserInput {
|
||||
anonymous_user_type,
|
||||
expiration_type: warp_graphql::mutations::create_anonymous_user::AnonymousUserExpirationType::NoExpiration,
|
||||
expiration_type: galaxy_graphql::mutations::create_anonymous_user::AnonymousUserExpirationType::NoExpiration,
|
||||
referral_code,
|
||||
},
|
||||
request_context: get_request_context(),
|
||||
@@ -329,7 +329,7 @@ impl AuthClient for ServerApi {
|
||||
};
|
||||
|
||||
let operation =
|
||||
warp_graphql::mutations::mint_custom_token::MintCustomToken::build(variables);
|
||||
galaxy_graphql::mutations::mint_custom_token::MintCustomToken::build(variables);
|
||||
let response = self.send_graphql_request(operation, None).await?;
|
||||
Ok(response.mint_custom_token)
|
||||
}
|
||||
@@ -363,7 +363,7 @@ impl AuthClient for ServerApi {
|
||||
let response = operation
|
||||
.send_request(
|
||||
self.client.clone(),
|
||||
warp_graphql::client::RequestOptions {
|
||||
galaxy_graphql::client::RequestOptions {
|
||||
auth_token: auth_token.map(ToOwned::to_owned),
|
||||
headers: std::collections::HashMap::from([(
|
||||
EXPERIMENT_ID_HEADER.to_string(),
|
||||
@@ -377,8 +377,8 @@ impl AuthClient for ServerApi {
|
||||
.ok_or_else(|| anyhow!("Expected valid response.data"))?;
|
||||
|
||||
match response.user {
|
||||
warp_graphql::queries::get_user::UserResult::UserOutput(user_output) => Ok(user_output),
|
||||
warp_graphql::queries::get_user::UserResult::Unknown => {
|
||||
galaxy_graphql::queries::get_user::UserResult::UserOutput(user_output) => Ok(user_output),
|
||||
galaxy_graphql::queries::get_user::UserResult::Unknown => {
|
||||
Err(anyhow!("Unable to fetch user"))
|
||||
}
|
||||
}
|
||||
@@ -392,7 +392,7 @@ impl AuthClient for ServerApi {
|
||||
let response = self.send_graphql_request(operation, None).await?;
|
||||
|
||||
match response.user {
|
||||
warp_graphql::queries::get_user_settings::UserResult::UserOutput(user_output) => {
|
||||
galaxy_graphql::queries::get_user_settings::UserResult::UserOutput(user_output) => {
|
||||
match user_output.user.settings {
|
||||
Some(user_settings) => Ok(Some(SyncedUserSettings {
|
||||
is_cloud_conversation_storage_enabled: user_settings
|
||||
@@ -403,7 +403,7 @@ impl AuthClient for ServerApi {
|
||||
None => Ok(None),
|
||||
}
|
||||
}
|
||||
warp_graphql::queries::get_user_settings::UserResult::Unknown => {
|
||||
galaxy_graphql::queries::get_user_settings::UserResult::Unknown => {
|
||||
Err(anyhow!("Unable to fetch user settings"))
|
||||
}
|
||||
}
|
||||
@@ -414,7 +414,7 @@ impl AuthClient for ServerApi {
|
||||
&self,
|
||||
days: Option<i32>,
|
||||
limit: Option<i32>,
|
||||
last_updated_end_timestamp: Option<warp_graphql::scalars::Time>,
|
||||
last_updated_end_timestamp: Option<galaxy_graphql::scalars::Time>,
|
||||
) -> Result<Vec<ConversationUsage>> {
|
||||
let operation = GetConversationUsage::build(GetConversationUsageVariables {
|
||||
request_context: get_request_context(),
|
||||
@@ -572,7 +572,7 @@ impl AuthClient for ServerApi {
|
||||
.exchange_device_access_token(details)
|
||||
.request_async(
|
||||
self.client.as_ref(),
|
||||
|delay| warpui::r#async::Timer::after(delay).map(|_| ()),
|
||||
|delay| galaxyui::r#async::Timer::after(delay).map(|_| ()),
|
||||
Some(timeout),
|
||||
)
|
||||
.await
|
||||
@@ -606,7 +606,7 @@ impl AuthClient for ServerApi {
|
||||
&self,
|
||||
name: String,
|
||||
team_id: Option<cynic::Id>,
|
||||
expires_at: Option<warp_graphql::scalars::Time>,
|
||||
expires_at: Option<galaxy_graphql::scalars::Time>,
|
||||
) -> Result<GenerateApiKeyResult> {
|
||||
let variables = GenerateApiKeyVariables {
|
||||
input: GenerateApiKeyInput {
|
||||
@@ -650,13 +650,13 @@ impl AuthClient for ServerApi {
|
||||
}
|
||||
|
||||
// Issue a new token.
|
||||
let workload_token = match warp_isolation_platform::issue_workload_token(Some(
|
||||
let workload_token = match galaxy_isolation_platform::issue_workload_token(Some(
|
||||
AMBIENT_WORKLOAD_TOKEN_DURATION,
|
||||
))
|
||||
.await
|
||||
{
|
||||
Ok(token) => token,
|
||||
Err(warp_isolation_platform::IsolationPlatformError::NoIsolationPlatformDetected) => {
|
||||
Err(galaxy_isolation_platform::IsolationPlatformError::NoIsolationPlatformDetected) => {
|
||||
return Ok(None);
|
||||
}
|
||||
Err(e) => return Err(e.into()),
|
||||
|
||||
@@ -12,8 +12,8 @@ use cynic::{MutationBuilder, QueryBuilder};
|
||||
#[cfg(test)]
|
||||
use mockall::automock;
|
||||
use std::convert::TryFrom;
|
||||
use warp_core::channel::{Channel, ChannelState};
|
||||
use warp_graphql::{
|
||||
use galaxy_core::channel::{Channel, ChannelState};
|
||||
use galaxy_graphql::{
|
||||
mutations::{
|
||||
share_block::{BlockInput, ShareBlock, ShareBlockResult, ShareBlockVariables},
|
||||
unshare_block::{
|
||||
@@ -127,7 +127,7 @@ impl BlockClient for ServerApi {
|
||||
let response = self.send_graphql_request(operation, None).await?;
|
||||
|
||||
match response.user {
|
||||
warp_graphql::queries::get_blocks_for_user::UserResult::UserOutput(user_output) => {
|
||||
galaxy_graphql::queries::get_blocks_for_user::UserResult::UserOutput(user_output) => {
|
||||
Ok(user_output
|
||||
.user
|
||||
.blocks
|
||||
@@ -135,7 +135,7 @@ impl BlockClient for ServerApi {
|
||||
.filter_map(|block| block.try_into().ok())
|
||||
.collect())
|
||||
}
|
||||
warp_graphql::queries::get_blocks_for_user::UserResult::Unknown => {
|
||||
galaxy_graphql::queries::get_blocks_for_user::UserResult::Unknown => {
|
||||
Err(anyhow!("Unable to fetch blocks"))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,32 +9,32 @@ use crate::features::FeatureFlag;
|
||||
use mockall::automock;
|
||||
|
||||
use crate::server::graphql::{get_request_context, get_user_facing_error_message};
|
||||
use warp_graphql::mutations::create_simple_integration::{
|
||||
use galaxy_graphql::mutations::create_simple_integration::{
|
||||
CreateSimpleIntegration, CreateSimpleIntegrationOutput, CreateSimpleIntegrationResult,
|
||||
CreateSimpleIntegrationVariables, SimpleIntegrationConfig,
|
||||
};
|
||||
use warp_graphql::queries::get_integrations_using_environment::{
|
||||
use galaxy_graphql::queries::get_integrations_using_environment::{
|
||||
GetIntegrationsUsingEnvironment, GetIntegrationsUsingEnvironmentInput,
|
||||
GetIntegrationsUsingEnvironmentOutput, GetIntegrationsUsingEnvironmentResult,
|
||||
GetIntegrationsUsingEnvironmentVariables,
|
||||
};
|
||||
use warp_graphql::queries::get_oauth_connect_tx_status::{
|
||||
use galaxy_graphql::queries::get_oauth_connect_tx_status::{
|
||||
GetOAuthConnectTxStatus, GetOAuthConnectTxStatusInput, GetOAuthConnectTxStatusResult,
|
||||
GetOAuthConnectTxStatusVariables, OauthConnectTxStatus,
|
||||
};
|
||||
use warp_graphql::queries::get_simple_integrations::{
|
||||
use galaxy_graphql::queries::get_simple_integrations::{
|
||||
SimpleIntegrations, SimpleIntegrationsInput, SimpleIntegrationsOutput,
|
||||
SimpleIntegrationsResult, SimpleIntegrationsVariables,
|
||||
};
|
||||
use warp_graphql::queries::suggest_cloud_environment_image::{
|
||||
use galaxy_graphql::queries::suggest_cloud_environment_image::{
|
||||
RepoInput as SuggestCloudEnvironmentImageRepoInput, SuggestCloudEnvironmentImage,
|
||||
SuggestCloudEnvironmentImageInput, SuggestCloudEnvironmentImageResult,
|
||||
SuggestCloudEnvironmentImageVariables,
|
||||
};
|
||||
use warp_graphql::queries::user_github_info::{
|
||||
use galaxy_graphql::queries::user_github_info::{
|
||||
GithubAuthRequiredOutput, UserGithubInfo, UserGithubInfoResult, UserGithubInfoVariables,
|
||||
};
|
||||
use warp_graphql::queries::user_repo_auth_status::{
|
||||
use galaxy_graphql::queries::user_repo_auth_status::{
|
||||
RepoInput as UserRepoAuthStatusRepoInput, UserRepoAuthStatus, UserRepoAuthStatusInput,
|
||||
UserRepoAuthStatusOutput, UserRepoAuthStatusResult, UserRepoAuthStatusVariables,
|
||||
};
|
||||
|
||||
@@ -3,21 +3,21 @@ use std::collections::HashMap;
|
||||
use anyhow::{anyhow, Context, Result};
|
||||
use async_trait::async_trait;
|
||||
use cynic::{MutationBuilder, QueryBuilder};
|
||||
use warp_graphql::mutations::issue_task_identity_token::{
|
||||
use galaxy_graphql::mutations::issue_task_identity_token::{
|
||||
IssueTaskIdentityToken, IssueTaskIdentityTokenInput, IssueTaskIdentityTokenResult,
|
||||
IssueTaskIdentityTokenVariables,
|
||||
};
|
||||
use warp_graphql::object_permissions::OwnerType;
|
||||
use warp_graphql::queries::list_managed_secrets::{
|
||||
use galaxy_graphql::object_permissions::OwnerType;
|
||||
use galaxy_graphql::queries::list_managed_secrets::{
|
||||
ListManagedSecrets, ListManagedSecretsVariables, ManagedSecretsInput, ManagedSecretsResult,
|
||||
};
|
||||
use warp_graphql::queries::managed_secret_config::{
|
||||
use galaxy_graphql::queries::managed_secret_config::{
|
||||
GetManagedSecretConfig, GetManagedSecretConfigVariables, UserResult,
|
||||
};
|
||||
use warp_graphql::queries::task_secrets::{
|
||||
use galaxy_graphql::queries::task_secrets::{
|
||||
ManagedSecretValue, TaskSecrets, TaskSecretsInput, TaskSecretsResult, TaskSecretsVariables,
|
||||
};
|
||||
use warp_graphql::{
|
||||
use galaxy_graphql::{
|
||||
managed_secrets::{ManagedSecret, ManagedSecretType},
|
||||
mutations::{
|
||||
create_managed_secret::{
|
||||
@@ -35,12 +35,12 @@ use warp_graphql::{
|
||||
},
|
||||
object_permissions::Owner,
|
||||
};
|
||||
use warp_managed_secrets::client::{SecretOwner, TaskIdentityToken};
|
||||
use galaxy_managed_secrets::client::{SecretOwner, TaskIdentityToken};
|
||||
|
||||
use super::ServerApi;
|
||||
use crate::server::graphql::{get_request_context, get_user_facing_error_message};
|
||||
|
||||
pub use warp_managed_secrets::client::{ManagedSecretConfigs, ManagedSecretsClient};
|
||||
pub use galaxy_managed_secrets::client::{ManagedSecretConfigs, ManagedSecretsClient};
|
||||
|
||||
#[cfg_attr(not(target_family = "wasm"), async_trait)]
|
||||
#[cfg_attr(target_family = "wasm", async_trait(?Send))]
|
||||
@@ -254,7 +254,7 @@ impl ManagedSecretsClient for ServerApi {
|
||||
|
||||
async fn issue_task_identity_token(
|
||||
&self,
|
||||
options: warp_managed_secrets::client::IdentityTokenOptions,
|
||||
options: galaxy_managed_secrets::client::IdentityTokenOptions,
|
||||
) -> Result<TaskIdentityToken> {
|
||||
let requested_duration_seconds = options
|
||||
.requested_duration
|
||||
|
||||
@@ -49,8 +49,8 @@ use cynic::{MutationBuilder, QueryBuilder, SubscriptionBuilder};
|
||||
#[cfg(test)]
|
||||
use mockall::{automock, predicate::*};
|
||||
use std::collections::HashMap;
|
||||
use warp_core::report_error;
|
||||
use warp_graphql::{
|
||||
use galaxy_core::report_error;
|
||||
use galaxy_graphql::{
|
||||
error::UserFacingErrorInterface,
|
||||
generic_string_object::GenericStringObjectInput,
|
||||
mutations::{
|
||||
@@ -986,7 +986,7 @@ impl ObjectClient for ServerApi {
|
||||
};
|
||||
|
||||
match gso.format {
|
||||
warp_graphql::generic_string_object::GenericStringObjectFormat::JsonEnvVarCollection => {
|
||||
galaxy_graphql::generic_string_object::GenericStringObjectFormat::JsonEnvVarCollection => {
|
||||
parse_server_gso::<EnvVarCollection, JsonSerializer>(
|
||||
&mut updated_generic_string_objects,
|
||||
GenericStringObjectFormat::Json(JsonObjectType::EnvVarCollection),
|
||||
@@ -996,7 +996,7 @@ impl ObjectClient for ServerApi {
|
||||
gso.serialized_model,
|
||||
);
|
||||
}
|
||||
warp_graphql::generic_string_object::GenericStringObjectFormat::JsonPreference => {
|
||||
galaxy_graphql::generic_string_object::GenericStringObjectFormat::JsonPreference => {
|
||||
parse_server_gso::<Preference, JsonSerializer>(
|
||||
&mut updated_generic_string_objects,
|
||||
GenericStringObjectFormat::Json(JsonObjectType::Preference),
|
||||
@@ -1006,7 +1006,7 @@ impl ObjectClient for ServerApi {
|
||||
gso.serialized_model,
|
||||
);
|
||||
}
|
||||
warp_graphql::generic_string_object::GenericStringObjectFormat::JsonWorkflowEnum => {
|
||||
galaxy_graphql::generic_string_object::GenericStringObjectFormat::JsonWorkflowEnum => {
|
||||
parse_server_gso::<WorkflowEnum, JsonSerializer>(
|
||||
&mut updated_generic_string_objects,
|
||||
GenericStringObjectFormat::Json(JsonObjectType::WorkflowEnum),
|
||||
@@ -1016,7 +1016,7 @@ impl ObjectClient for ServerApi {
|
||||
gso.serialized_model,
|
||||
);
|
||||
}
|
||||
warp_graphql::generic_string_object::GenericStringObjectFormat::JsonAIFact => {
|
||||
galaxy_graphql::generic_string_object::GenericStringObjectFormat::JsonAIFact => {
|
||||
parse_server_gso::<AIFact, JsonSerializer>(
|
||||
&mut updated_generic_string_objects,
|
||||
GenericStringObjectFormat::Json(JsonObjectType::AIFact),
|
||||
@@ -1026,7 +1026,7 @@ impl ObjectClient for ServerApi {
|
||||
gso.serialized_model,
|
||||
);
|
||||
}
|
||||
warp_graphql::generic_string_object::GenericStringObjectFormat::JsonMCPServer => {
|
||||
galaxy_graphql::generic_string_object::GenericStringObjectFormat::JsonMCPServer => {
|
||||
parse_server_gso::<MCPServer, JsonSerializer>(
|
||||
&mut updated_generic_string_objects,
|
||||
GenericStringObjectFormat::Json(JsonObjectType::MCPServer),
|
||||
@@ -1036,7 +1036,7 @@ impl ObjectClient for ServerApi {
|
||||
gso.serialized_model,
|
||||
);
|
||||
}
|
||||
warp_graphql::generic_string_object::GenericStringObjectFormat::JsonAIExecutionProfile => {
|
||||
galaxy_graphql::generic_string_object::GenericStringObjectFormat::JsonAIExecutionProfile => {
|
||||
parse_server_gso::<AIExecutionProfile, JsonSerializer>(
|
||||
&mut updated_generic_string_objects,
|
||||
GenericStringObjectFormat::Json(JsonObjectType::AIExecutionProfile),
|
||||
@@ -1046,7 +1046,7 @@ impl ObjectClient for ServerApi {
|
||||
gso.serialized_model,
|
||||
);
|
||||
}
|
||||
warp_graphql::generic_string_object::GenericStringObjectFormat::JsonTemplatableMCPServer => {
|
||||
galaxy_graphql::generic_string_object::GenericStringObjectFormat::JsonTemplatableMCPServer => {
|
||||
parse_server_gso::<TemplatableMCPServer, JsonSerializer>(
|
||||
&mut updated_generic_string_objects,
|
||||
GenericStringObjectFormat::Json(JsonObjectType::TemplatableMCPServer),
|
||||
@@ -1056,7 +1056,7 @@ impl ObjectClient for ServerApi {
|
||||
gso.serialized_model,
|
||||
);
|
||||
}
|
||||
warp_graphql::generic_string_object::GenericStringObjectFormat::JsonCloudEnvironment => {
|
||||
galaxy_graphql::generic_string_object::GenericStringObjectFormat::JsonCloudEnvironment => {
|
||||
parse_server_gso::<AmbientAgentEnvironment, JsonSerializer>(
|
||||
&mut updated_generic_string_objects,
|
||||
GenericStringObjectFormat::Json(JsonObjectType::CloudEnvironment),
|
||||
@@ -1066,7 +1066,7 @@ impl ObjectClient for ServerApi {
|
||||
gso.serialized_model,
|
||||
);
|
||||
}
|
||||
warp_graphql::generic_string_object::GenericStringObjectFormat::JsonScheduledAmbientAgent => {
|
||||
galaxy_graphql::generic_string_object::GenericStringObjectFormat::JsonScheduledAmbientAgent => {
|
||||
parse_server_gso::<ScheduledAmbientAgent, JsonSerializer>(
|
||||
&mut updated_generic_string_objects,
|
||||
GenericStringObjectFormat::Json(JsonObjectType::ScheduledAmbientAgent),
|
||||
@@ -1296,7 +1296,7 @@ impl ObjectClient for ServerApi {
|
||||
let response = self.send_graphql_request(operation, None).await?;
|
||||
|
||||
let result = match response.untrash_object {
|
||||
warp_graphql::mutations::untrash_object::UntrashObjectResult::UntrashObjectOutput(
|
||||
galaxy_graphql::mutations::untrash_object::UntrashObjectResult::UntrashObjectOutput(
|
||||
output,
|
||||
) => {
|
||||
if output.success {
|
||||
|
||||
@@ -5,8 +5,8 @@ use async_trait::async_trait;
|
||||
use cynic::{MutationBuilder, QueryBuilder};
|
||||
#[cfg(test)]
|
||||
use mockall::{automock, predicate::*};
|
||||
use warp_core::channel::ChannelState;
|
||||
use warp_graphql::{
|
||||
use galaxy_core::channel::ChannelState;
|
||||
use galaxy_graphql::{
|
||||
mutations::send_referral_invite_emails::{
|
||||
SendReferralInviteEmails, SendReferralInviteEmailsResult, SendReferralInviteEmailsVariables,
|
||||
},
|
||||
@@ -47,7 +47,7 @@ impl ReferralsClient for ServerApi {
|
||||
let response = self.send_graphql_request(operation, None).await?;
|
||||
|
||||
match response.user {
|
||||
warp_graphql::queries::get_referral_info::UserResult::UserOutput(user_output) => {
|
||||
galaxy_graphql::queries::get_referral_info::UserResult::UserOutput(user_output) => {
|
||||
Ok(ReferralInfo {
|
||||
url: format!(
|
||||
"{}/referral/{}",
|
||||
@@ -60,7 +60,7 @@ impl ReferralsClient for ServerApi {
|
||||
is_referred: user_output.user.referrals.is_referred,
|
||||
})
|
||||
}
|
||||
warp_graphql::queries::get_referral_info::UserResult::Unknown => {
|
||||
galaxy_graphql::queries::get_referral_info::UserResult::Unknown => {
|
||||
Err(anyhow!("Unable to fetch referral info"))
|
||||
}
|
||||
}
|
||||
@@ -68,7 +68,7 @@ impl ReferralsClient for ServerApi {
|
||||
|
||||
async fn send_invite(&self, emails: Vec<String>) -> Result<Vec<String>> {
|
||||
let variables = SendReferralInviteEmailsVariables {
|
||||
input: warp_graphql::mutations::send_referral_invite_emails::SendReferralInviteEmailsInput {
|
||||
input: galaxy_graphql::mutations::send_referral_invite_emails::SendReferralInviteEmailsInput {
|
||||
emails,
|
||||
},
|
||||
request_context: get_request_context(),
|
||||
|
||||
@@ -6,57 +6,57 @@ use crate::workspaces::workspace::Workspace;
|
||||
use anyhow::{anyhow, Result};
|
||||
use async_trait::async_trait;
|
||||
use cynic::{MutationBuilder, QueryBuilder};
|
||||
use warp_graphql::mutations::add_invite_link_domain_restriction::{
|
||||
use galaxy_graphql::mutations::add_invite_link_domain_restriction::{
|
||||
AddInviteLinkDomainRestriction, AddInviteLinkDomainRestrictionInput,
|
||||
AddInviteLinkDomainRestrictionResult, AddInviteLinkDomainRestrictionVariables,
|
||||
};
|
||||
use warp_graphql::mutations::create_team::{
|
||||
use galaxy_graphql::mutations::create_team::{
|
||||
CreateTeam, CreateTeamInput, CreateTeamResult, CreateTeamVariables,
|
||||
};
|
||||
use warp_graphql::mutations::delete_invite_link_domain_restriction::{
|
||||
use galaxy_graphql::mutations::delete_invite_link_domain_restriction::{
|
||||
DeleteInviteLinkDomainRestriction, DeleteInviteLinkDomainRestrictionInput,
|
||||
DeleteInviteLinkDomainRestrictionResult, DeleteInviteLinkDomainRestrictionVariables,
|
||||
};
|
||||
use warp_graphql::mutations::delete_team_invite::{
|
||||
use galaxy_graphql::mutations::delete_team_invite::{
|
||||
DeleteTeamInvite, DeleteTeamInviteInput, DeleteTeamInviteResult, DeleteTeamInviteVariables,
|
||||
};
|
||||
use warp_graphql::mutations::join_team_with_team_discovery::{
|
||||
use galaxy_graphql::mutations::join_team_with_team_discovery::{
|
||||
JoinTeamWithTeamDiscovery, JoinTeamWithTeamDiscoveryInput, JoinTeamWithTeamDiscoveryResult,
|
||||
JoinTeamWithTeamDiscoveryVariables, TeamDiscoveryEntrypoint,
|
||||
};
|
||||
use warp_graphql::mutations::remove_user_from_team::{
|
||||
use galaxy_graphql::mutations::remove_user_from_team::{
|
||||
RemoveUserFromTeam, RemoveUserFromTeamInput, RemoveUserFromTeamResult,
|
||||
RemoveUserFromTeamVariables,
|
||||
};
|
||||
use warp_graphql::mutations::rename_team::{
|
||||
use galaxy_graphql::mutations::rename_team::{
|
||||
RenameTeam, RenameTeamInput, RenameTeamResult, RenameTeamVariables,
|
||||
};
|
||||
use warp_graphql::mutations::reset_invite_links::{
|
||||
use galaxy_graphql::mutations::reset_invite_links::{
|
||||
ResetInviteLinks, ResetInviteLinksInput, ResetInviteLinksResult, ResetInviteLinksVariables,
|
||||
};
|
||||
use warp_graphql::mutations::send_team_invite_email::{
|
||||
use galaxy_graphql::mutations::send_team_invite_email::{
|
||||
SendTeamInviteEmail, SendTeamInviteEmailInput, SendTeamInviteEmailResult,
|
||||
SendTeamInviteEmailVariables,
|
||||
};
|
||||
use warp_graphql::mutations::set_is_invite_link_enabled::{
|
||||
use galaxy_graphql::mutations::set_is_invite_link_enabled::{
|
||||
SetIsInviteLinkEnabled, SetIsInviteLinkEnabledInput, SetIsInviteLinkEnabledResult,
|
||||
SetIsInviteLinkEnabledVariables,
|
||||
};
|
||||
use warp_graphql::mutations::set_team_discoverability::{
|
||||
use galaxy_graphql::mutations::set_team_discoverability::{
|
||||
SetTeamDiscoverability, SetTeamDiscoverabilityInput, SetTeamDiscoverabilityResult,
|
||||
SetTeamDiscoverabilityVariables,
|
||||
};
|
||||
use warp_graphql::mutations::set_team_member_role::{
|
||||
use galaxy_graphql::mutations::set_team_member_role::{
|
||||
SetTeamMemberRole, SetTeamMemberRoleInput, SetTeamMemberRoleResult, SetTeamMemberRoleVariables,
|
||||
};
|
||||
use warp_graphql::mutations::transfer_team_ownership::{
|
||||
use galaxy_graphql::mutations::transfer_team_ownership::{
|
||||
TransferTeamOwnership, TransferTeamOwnershipInput, TransferTeamOwnershipResult,
|
||||
TransferTeamOwnershipVariables,
|
||||
};
|
||||
use warp_graphql::queries::get_discoverable_teams::{
|
||||
use galaxy_graphql::queries::get_discoverable_teams::{
|
||||
GetDiscoverableTeams, GetDiscoverableTeamsVariables,
|
||||
};
|
||||
use warp_graphql::queries::get_workspaces_metadata_for_user::{
|
||||
use galaxy_graphql::queries::get_workspaces_metadata_for_user::{
|
||||
GetWorkspacesMetadataForUser, GetWorkspacesMetadataForUserVariables, PricingInfoResult,
|
||||
};
|
||||
|
||||
@@ -175,10 +175,10 @@ impl TeamClient for ServerApi {
|
||||
let response = self.send_graphql_request(operation, None).await?;
|
||||
|
||||
let metadata = match response.user {
|
||||
warp_graphql::queries::get_workspaces_metadata_for_user::UserResult::UserOutput(
|
||||
galaxy_graphql::queries::get_workspaces_metadata_for_user::UserResult::UserOutput(
|
||||
user_output,
|
||||
) => user_output.user.into(),
|
||||
warp_graphql::queries::get_workspaces_metadata_for_user::UserResult::Unknown => {
|
||||
galaxy_graphql::queries::get_workspaces_metadata_for_user::UserResult::Unknown => {
|
||||
return Err(anyhow!("Unable to fetch workspaces metadata"));
|
||||
}
|
||||
};
|
||||
@@ -502,7 +502,7 @@ impl TeamClient for ServerApi {
|
||||
let result = self.send_graphql_request(operation, None).await?;
|
||||
|
||||
match result.user {
|
||||
warp_graphql::queries::get_discoverable_teams::UserResult::UserOutput(user_output) => {
|
||||
galaxy_graphql::queries::get_discoverable_teams::UserResult::UserOutput(user_output) => {
|
||||
Ok(user_output
|
||||
.user
|
||||
.discoverable_teams
|
||||
@@ -510,10 +510,10 @@ impl TeamClient for ServerApi {
|
||||
.map(|gql_team_data| Ok(gql_team_data.into()))
|
||||
.collect::<Result<Vec<DiscoverableTeam>>>()?)
|
||||
}
|
||||
warp_graphql::queries::get_discoverable_teams::UserResult::UserFacingError(
|
||||
galaxy_graphql::queries::get_discoverable_teams::UserResult::UserFacingError(
|
||||
user_facing_error,
|
||||
) => Err(anyhow!(get_user_facing_error_message(user_facing_error))),
|
||||
warp_graphql::queries::get_discoverable_teams::UserResult::Unknown => {
|
||||
galaxy_graphql::queries::get_discoverable_teams::UserResult::Unknown => {
|
||||
Err(anyhow!("unknown error while getting discoverable teams"))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,21 +4,21 @@ use crate::workspaces::workspace::AiOverages;
|
||||
use anyhow::{anyhow, Result};
|
||||
use async_trait::async_trait;
|
||||
use cynic::{MutationBuilder, QueryBuilder};
|
||||
use warp_graphql::error::UserFacingErrorInterface;
|
||||
use warp_graphql::mutations::purchase_addon_credits::{
|
||||
use galaxy_graphql::error::UserFacingErrorInterface;
|
||||
use galaxy_graphql::mutations::purchase_addon_credits::{
|
||||
PurchaseAddonCredits, PurchaseAddonCreditsInput, PurchaseAddonCreditsResult,
|
||||
PurchaseAddonCreditsVariables,
|
||||
};
|
||||
use warp_graphql::mutations::stripe_billing_portal::{
|
||||
use galaxy_graphql::mutations::stripe_billing_portal::{
|
||||
StripeBillingPortal, StripeBillingPortalInput, StripeBillingPortalResult,
|
||||
StripeBillingPortalVariables,
|
||||
};
|
||||
use warp_graphql::mutations::update_workspace_settings::{
|
||||
use galaxy_graphql::mutations::update_workspace_settings::{
|
||||
AddonCreditsSettingsInput, UpdateWorkspaceSettings, UpdateWorkspaceSettingsInput,
|
||||
UpdateWorkspaceSettingsResult, UpdateWorkspaceSettingsVariables,
|
||||
UsageBasedPricingSettingsInput,
|
||||
};
|
||||
use warp_graphql::queries::get_ai_overages_for_workspace::{
|
||||
use galaxy_graphql::queries::get_ai_overages_for_workspace::{
|
||||
GetAiOveragesForWorkspace, GetAiOveragesForWorkspaceVariables, UserResult,
|
||||
};
|
||||
|
||||
|
||||
@@ -7,8 +7,8 @@ use std::{
|
||||
sync::Arc,
|
||||
time::Duration,
|
||||
};
|
||||
use warp_graphql::scalars::time::ServerTimestamp;
|
||||
use warpui::{r#async::FutureId, Entity, ModelContext, RequestState, RetryOption, SingletonEntity};
|
||||
use galaxy_graphql::scalars::time::ServerTimestamp;
|
||||
use galaxyui::{r#async::FutureId, Entity, ModelContext, RequestState, RetryOption, SingletonEntity};
|
||||
|
||||
use lazy_static::lazy_static;
|
||||
use uuid::Uuid;
|
||||
|
||||
@@ -27,8 +27,8 @@ use chrono::{DateTime, Duration, Utc};
|
||||
use firebase::FirebaseError;
|
||||
use itertools::Itertools;
|
||||
use std::sync::Arc;
|
||||
use warp_server_client::cloud_object::ServerPermissions;
|
||||
use warpui::{r#async::Timer, App, Entity, ModelHandle, SingletonEntity};
|
||||
use galaxy_server_client::cloud_object::ServerPermissions;
|
||||
use galaxyui::{r#async::Timer, App, Entity, ModelHandle, SingletonEntity};
|
||||
|
||||
#[cfg(test)]
|
||||
use crate::server::server_api::object::MockObjectClient;
|
||||
|
||||
@@ -3,10 +3,10 @@ use std::{fs::remove_file, time::Duration};
|
||||
|
||||
use anyhow::Context;
|
||||
use chrono::{LocalResult, TimeZone, Utc};
|
||||
use warp_core::execution_mode::AppExecutionMode;
|
||||
use warp_core::{report_error, report_if_error};
|
||||
use warpui::r#async::{FutureExt as _, Timer};
|
||||
use warpui::{App, Entity, ModelContext, SingletonEntity};
|
||||
use galaxy_core::execution_mode::AppExecutionMode;
|
||||
use galaxy_core::{report_error, report_if_error};
|
||||
use galaxyui::r#async::{FutureExt as _, Timer};
|
||||
use galaxyui::{App, Entity, ModelContext, SingletonEntity};
|
||||
|
||||
use super::{rudder_event_file_path, RUDDER_TELEMETRY_EVENTS_FILE_NAME};
|
||||
use crate::auth::AuthStateProvider;
|
||||
@@ -107,7 +107,7 @@ impl TelemetryCollector {
|
||||
if execution_mode.send_telemetry_at_shutdown() {
|
||||
let privacy_settings_snapshot = PrivacySettings::as_ref(ctx).get_snapshot(ctx);
|
||||
let server_api = self.server_api.clone();
|
||||
match warpui::r#async::block_on(async move {
|
||||
match galaxyui::r#async::block_on(async move {
|
||||
server_api
|
||||
.flush_telemetry_events(privacy_settings_snapshot)
|
||||
.with_timeout(TELEMETRY_SHUTDOWN_FLUSH_TIMEOUT)
|
||||
@@ -144,7 +144,7 @@ impl TelemetryCollector {
|
||||
async move {
|
||||
let new_path = rudder_event_file_path();
|
||||
let old_path =
|
||||
warp_core::paths::state_dir().join(RUDDER_TELEMETRY_EVENTS_FILE_NAME);
|
||||
galaxy_core::paths::state_dir().join(RUDDER_TELEMETRY_EVENTS_FILE_NAME);
|
||||
|
||||
// Try flushing from both new and legacy locations.
|
||||
for path in [new_path, old_path] {
|
||||
@@ -156,7 +156,7 @@ impl TelemetryCollector {
|
||||
// case where we accidentally try to re-flush the events on the next app startup.
|
||||
if let Err(e) = remove_file(&path) {
|
||||
if e.kind() != std::io::ErrorKind::NotFound {
|
||||
warp_core::report_error!(
|
||||
galaxy_core::report_error!(
|
||||
anyhow::anyhow!(e).context("Failed to remove persisted event file")
|
||||
);
|
||||
}
|
||||
@@ -184,7 +184,7 @@ impl TelemetryCollector {
|
||||
if let LocalResult::Single(timestamp) =
|
||||
Utc.timestamp_opt(last_active_timestamp, 0)
|
||||
{
|
||||
warpui::telemetry::record_app_active_event(
|
||||
galaxyui::telemetry::record_app_active_event(
|
||||
auth_state.user_id().map(|uid| uid.as_string()),
|
||||
auth_state.anonymous_id(),
|
||||
timestamp,
|
||||
|
||||
@@ -10,7 +10,7 @@ use serde_json::{json, Value};
|
||||
use std::sync::OnceLock;
|
||||
|
||||
#[cfg(target_family = "wasm")]
|
||||
use warpui::platform::wasm;
|
||||
use galaxyui::platform::wasm;
|
||||
|
||||
static TELEMETRY_CONTEXT: OnceLock<TelemetryContext> = OnceLock::new();
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
use warp_core::telemetry::{TelemetryContextModel, TelemetryContextProvider};
|
||||
use warpui::{AppContext, ModelContext, SingletonEntity};
|
||||
use galaxy_core::telemetry::{TelemetryContextModel, TelemetryContextProvider};
|
||||
use galaxyui::{AppContext, ModelContext, SingletonEntity};
|
||||
|
||||
use crate::auth::AuthStateProvider;
|
||||
|
||||
|
||||
@@ -10,14 +10,14 @@ use session_sharing_protocol::common::SessionId as SharedSessionId;
|
||||
use session_sharing_protocol::sharer::SessionEndedReason;
|
||||
use strum_macros::EnumDiscriminants;
|
||||
use strum_macros::EnumIter;
|
||||
use warp_completer::completer::MatchType;
|
||||
use warp_core::command::ExitCode;
|
||||
use warp_core::telemetry::EnablementState;
|
||||
use warp_core::telemetry::TelemetryEvent as TelemetryEventTrait;
|
||||
use warp_core::telemetry::TelemetryEventDesc;
|
||||
use warpui::keymap::Keystroke;
|
||||
use warpui::notification::{NotificationSendError, RequestPermissionsOutcome};
|
||||
use warpui::rendering::ThinStrokes;
|
||||
use galaxy_completer::completer::MatchType;
|
||||
use galaxy_core::command::ExitCode;
|
||||
use galaxy_core::telemetry::EnablementState;
|
||||
use galaxy_core::telemetry::TelemetryEvent as TelemetryEventTrait;
|
||||
use galaxy_core::telemetry::TelemetryEventDesc;
|
||||
use galaxyui::keymap::Keystroke;
|
||||
use galaxyui::notification::{NotificationSendError, RequestPermissionsOutcome};
|
||||
use galaxyui::rendering::ThinStrokes;
|
||||
|
||||
use crate::ai::agent::api::ServerConversationToken;
|
||||
use crate::ai::agent::conversation::AIConversationId;
|
||||
@@ -105,7 +105,7 @@ use crate::workspace::tab_settings::TabCloseButtonPosition;
|
||||
use crate::workspace::tab_settings::WorkspaceDecorationVisibility;
|
||||
use crate::workspace::TabMovement;
|
||||
use session_sharing_protocol::sharer::SessionSourceType;
|
||||
use warp_core::interval_timer::TimingDataPoint;
|
||||
use galaxy_core::interval_timer::TimingDataPoint;
|
||||
|
||||
#[derive(Clone, Serialize, Deserialize)]
|
||||
pub struct BootstrappingInfo {
|
||||
@@ -2624,7 +2624,7 @@ pub enum TelemetryEvent {
|
||||
AgentManagementViewCopiedSessionLink,
|
||||
/// Detected that Warp is running in an isolated sandbox.
|
||||
DetectedIsolationPlatform {
|
||||
platform: warp_isolation_platform::IsolationPlatformType,
|
||||
platform: galaxy_isolation_platform::IsolationPlatformType,
|
||||
},
|
||||
|
||||
AgentTipShown {
|
||||
@@ -2852,7 +2852,7 @@ impl TelemetryEventTrait for TelemetryEvent {
|
||||
}
|
||||
|
||||
fn event_descs() -> impl Iterator<Item = Box<dyn TelemetryEventDesc>> {
|
||||
warp_core::telemetry::enum_events::<Self>()
|
||||
galaxy_core::telemetry::enum_events::<Self>()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5008,7 +5008,7 @@ impl TelemetryEvent {
|
||||
// We initialize the feature flags so that we can determine which telemetry events to print.
|
||||
crate::init_feature_flags();
|
||||
|
||||
let events: serde_json::Map<String, Value> = warp_core::telemetry::all_events()
|
||||
let events: serde_json::Map<String, Value> = galaxy_core::telemetry::all_events()
|
||||
.filter_map(|event| {
|
||||
if !event.enablement_state().is_enabled() {
|
||||
return None;
|
||||
@@ -6677,7 +6677,7 @@ impl TelemetryEventDesc for TelemetryEventDiscriminants {
|
||||
Self::ObjectLinkCopied => "The web link to an object has been copied.",
|
||||
Self::FileTreeToggled => "Opened the file tree/project explorer",
|
||||
Self::GlobalSearchOpened => "Opened the global search view",
|
||||
Self::GlobalSearchQueryStarted => "Started a global search (warp_ripgrep) search",
|
||||
Self::GlobalSearchQueryStarted => "Started a global search (galaxy_ripgrep) search",
|
||||
Self::FileTreeItemAttachedAsContext => {
|
||||
"Attached a file or directory as context from the file tree"
|
||||
}
|
||||
@@ -6994,7 +6994,7 @@ impl TelemetryEventDesc for TelemetryEventDiscriminants {
|
||||
}
|
||||
}
|
||||
|
||||
warp_core::register_telemetry_event!(TelemetryEvent);
|
||||
galaxy_core::register_telemetry_event!(TelemetryEvent);
|
||||
|
||||
#[cfg(test)]
|
||||
#[path = "events_test.rs"]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use warp_core::telemetry::TelemetryEventDesc;
|
||||
use galaxy_core::telemetry::TelemetryEventDesc;
|
||||
|
||||
#[derive(Debug)]
|
||||
enum TelemetryEventPropertyError {
|
||||
@@ -16,7 +16,7 @@ enum TelemetryEventPropertyError {
|
||||
#[cfg(not(target_family = "wasm"))]
|
||||
fn telemetry_events_have_nonempty_name_and_description() -> Result<(), TelemetryEventPropertyError>
|
||||
{
|
||||
for event in warp_core::telemetry::all_events() {
|
||||
for event in galaxy_core::telemetry::all_events() {
|
||||
if event.name().is_empty() {
|
||||
return Err(TelemetryEventPropertyError::EmptyName(event));
|
||||
}
|
||||
|
||||
@@ -5,17 +5,17 @@
|
||||
macro_rules! send_telemetry_sync_from_ctx {
|
||||
($event:expr, $ctx:expr) => {
|
||||
#[allow(unused_imports)]
|
||||
use warp_core::telemetry::TelemetryEvent as _;
|
||||
use galaxy_core::telemetry::TelemetryEvent as _;
|
||||
let event = $event;
|
||||
if event.enablement_state().is_enabled() {
|
||||
let server_api =
|
||||
<$crate::server::server_api::ServerApiProvider as warpui::SingletonEntity>::handle(
|
||||
<$crate::server::server_api::ServerApiProvider as galaxyui::SingletonEntity>::handle(
|
||||
$ctx,
|
||||
)
|
||||
.as_ref($ctx)
|
||||
.get();
|
||||
let privacy_settings_snapshot =
|
||||
<$crate::settings::PrivacySettings as warpui::SingletonEntity>::handle($ctx)
|
||||
<$crate::settings::PrivacySettings as galaxyui::SingletonEntity>::handle($ctx)
|
||||
.as_ref($ctx)
|
||||
.get_snapshot($ctx);
|
||||
let _ = $ctx.spawn(
|
||||
@@ -40,16 +40,16 @@ macro_rules! send_telemetry_sync_from_ctx {
|
||||
macro_rules! send_telemetry_sync_from_app_ctx {
|
||||
($event:expr, $app_ctx:expr) => {
|
||||
#[allow(unused_imports)]
|
||||
use warp_core::telemetry::TelemetryEvent as _;
|
||||
use galaxy_core::telemetry::TelemetryEvent as _;
|
||||
if $event.enablement_state().is_enabled() {
|
||||
let server_api =
|
||||
<$crate::server::server_api::ServerApiProvider as warpui::SingletonEntity>::handle(
|
||||
<$crate::server::server_api::ServerApiProvider as galaxyui::SingletonEntity>::handle(
|
||||
$app_ctx,
|
||||
)
|
||||
.as_ref($app_ctx)
|
||||
.get();
|
||||
let privacy_settings_snapshot =
|
||||
<$crate::settings::PrivacySettings as warpui::SingletonEntity>::handle($app_ctx)
|
||||
<$crate::settings::PrivacySettings as galaxyui::SingletonEntity>::handle($app_ctx)
|
||||
.as_ref($app_ctx)
|
||||
.get_snapshot($app_ctx);
|
||||
$app_ctx
|
||||
@@ -75,12 +75,12 @@ macro_rules! send_telemetry_sync_from_app_ctx {
|
||||
macro_rules! send_telemetry_on_executor {
|
||||
($auth_state: expr, $event:expr, $executor:expr) => {
|
||||
#[allow(unused_imports)]
|
||||
use warp_core::telemetry::TelemetryEvent as _;
|
||||
use galaxy_core::telemetry::TelemetryEvent as _;
|
||||
let event = $event;
|
||||
if event.enablement_state().is_enabled() {
|
||||
let user_id = $auth_state.user_id().map(|uid| uid.as_string());
|
||||
let anonymous_id = $auth_state.anonymous_id();
|
||||
warpui::record_telemetry_on_executor!(
|
||||
galaxyui::record_telemetry_on_executor!(
|
||||
user_id,
|
||||
anonymous_id,
|
||||
event.name().into(),
|
||||
|
||||
@@ -28,22 +28,22 @@ use std::fs::File;
|
||||
use std::fs::OpenOptions;
|
||||
use std::future::Future;
|
||||
use std::path::{Path, PathBuf};
|
||||
use warp_core::channel::RudderStackDestination;
|
||||
use warpui::telemetry::Event;
|
||||
use galaxy_core::channel::RudderStackDestination;
|
||||
use galaxyui::telemetry::Event;
|
||||
|
||||
/// Filename for file where telemetry events are written on app quit.
|
||||
const RUDDER_TELEMETRY_EVENTS_FILE_NAME: &str = "rudder_telemetry_events.json";
|
||||
|
||||
/// Filepath where the Rudder events should be written on app quit.
|
||||
fn rudder_event_file_path() -> PathBuf {
|
||||
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)
|
||||
.join(RUDDER_TELEMETRY_EVENTS_FILE_NAME)
|
||||
}
|
||||
|
||||
/// Removes all telemetry events from the app telemetry event queue.
|
||||
pub fn clear_event_queue() {
|
||||
let _ = warpui::telemetry::flush_events();
|
||||
let _ = galaxyui::telemetry::flush_events();
|
||||
}
|
||||
|
||||
pub struct TelemetryApi {
|
||||
@@ -91,7 +91,7 @@ impl TelemetryApi {
|
||||
// Batches up telemetry events from the global queue and sends a Message to the Rudderstack API.
|
||||
// Returns the number of events that were flushed.
|
||||
pub async fn flush_events(&self, settings_snapshot: PrivacySettingsSnapshot) -> Result<usize> {
|
||||
let events = warpui::telemetry::flush_events();
|
||||
let events = galaxyui::telemetry::flush_events();
|
||||
let event_count = events.len();
|
||||
|
||||
#[cfg(not(target_family = "wasm"))]
|
||||
@@ -169,7 +169,7 @@ impl TelemetryApi {
|
||||
|
||||
let file = File::create(path)?;
|
||||
|
||||
let events = warpui::telemetry::flush_events();
|
||||
let events = galaxyui::telemetry::flush_events();
|
||||
if events.len() > max_event_count {
|
||||
log::error!("More telemetry events in queue than the limit to persist")
|
||||
}
|
||||
@@ -198,7 +198,7 @@ impl TelemetryApi {
|
||||
|
||||
#[cfg(not(target_family = "wasm"))]
|
||||
fn persist_events_to_telemetry_log_file(&self, events: Vec<Event>) -> Result<()> {
|
||||
let log_directory = warp_logging::log_directory()?;
|
||||
let log_directory = galaxy_logging::log_directory()?;
|
||||
let telemetry_file_path = log_directory.join(&*ChannelState::telemetry_file_name());
|
||||
|
||||
let file = OpenOptions::new()
|
||||
@@ -214,16 +214,16 @@ impl TelemetryApi {
|
||||
&self,
|
||||
user_id: Option<UserUid>,
|
||||
anonymous_id: String,
|
||||
event: impl warp_core::telemetry::TelemetryEvent,
|
||||
event: impl galaxy_core::telemetry::TelemetryEvent,
|
||||
settings_snapshot: PrivacySettingsSnapshot,
|
||||
) -> Result<()> {
|
||||
let event = warpui::telemetry::create_event(
|
||||
let event = galaxyui::telemetry::create_event(
|
||||
user_id.map(|uid| uid.as_string()),
|
||||
anonymous_id,
|
||||
event.name().into(),
|
||||
event.payload(),
|
||||
event.contains_ugc(),
|
||||
warpui::time::get_current_time(),
|
||||
galaxyui::time::get_current_time(),
|
||||
);
|
||||
|
||||
self.send_telemetry_event_internal(event, settings_snapshot)
|
||||
|
||||
@@ -15,22 +15,22 @@ fn test_persist_events_doesnt_include_ugc_events() {
|
||||
let user_id = Some("user".into());
|
||||
let anonymous_id = "anonymous_id".to_owned();
|
||||
|
||||
warpui::telemetry::record_event(
|
||||
galaxyui::telemetry::record_event(
|
||||
user_id.clone(),
|
||||
anonymous_id.clone(),
|
||||
"non UGC event name".into(),
|
||||
None, /* payload */
|
||||
false, /* contains_ugc */
|
||||
warpui::time::get_current_time(),
|
||||
galaxyui::time::get_current_time(),
|
||||
);
|
||||
|
||||
warpui::telemetry::record_event(
|
||||
galaxyui::telemetry::record_event(
|
||||
user_id.clone(),
|
||||
anonymous_id.clone(),
|
||||
"UGC event name".into(),
|
||||
None, /* payload */
|
||||
true, /* contains_ugc */
|
||||
warpui::time::get_current_time(),
|
||||
galaxyui::time::get_current_time(),
|
||||
);
|
||||
|
||||
let file_path = dirs.root().join("rudderstack");
|
||||
|
||||
@@ -6,11 +6,11 @@ use super::telemetry::secret_redaction::redact_secrets_in_value;
|
||||
use crate::auth::UserUid;
|
||||
use chrono::{DateTime, Utc};
|
||||
use serde_json::{json, Value};
|
||||
use warp_core::{
|
||||
use galaxy_core::{
|
||||
channel::{Channel, ChannelState},
|
||||
execution_mode,
|
||||
};
|
||||
use warpui::telemetry::EventPayload;
|
||||
use galaxyui::telemetry::EventPayload;
|
||||
|
||||
use super::telemetry::telemetry_context;
|
||||
|
||||
@@ -18,7 +18,7 @@ pub trait TelemetryExt {
|
||||
fn to_rudder_batch_message(self) -> RudderBatchMessage;
|
||||
}
|
||||
|
||||
impl TelemetryExt for warpui::telemetry::Event {
|
||||
impl TelemetryExt for galaxyui::telemetry::Event {
|
||||
fn to_rudder_batch_message(self) -> RudderBatchMessage {
|
||||
let message = match self.payload {
|
||||
EventPayload::IdentifyUser {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use chrono::Utc;
|
||||
use serde_json::json;
|
||||
use warpui::telemetry::{Event, EventPayload};
|
||||
use galaxyui::telemetry::{Event, EventPayload};
|
||||
|
||||
use super::*;
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
use std::sync::Arc;
|
||||
|
||||
use async_trait::async_trait;
|
||||
use warpui::{Entity, SingletonEntity};
|
||||
use galaxyui::{Entity, SingletonEntity};
|
||||
|
||||
use crate::ai::voice::transcribe::{Provider, TranscribeRequest};
|
||||
use crate::voice::transcriber::Transcriber;
|
||||
|
||||
Reference in New Issue
Block a user